2 #include <freerdp/config.h>
8 #include <winpr/wlog.h>
9 #include <winpr/crypto.h>
10 #include <freerdp/primitives.h>
11 #include <freerdp/utils/profiler.h>
15 #define PADDING_FILL_VALUE 0x37
19 static BOOL similar(
const BYTE* src,
const BYTE* dst,
size_t size)
21 for (
size_t x = 0; x < size; x++)
23 int diff = src[x] - dst[x];
27 (void)fprintf(stderr,
"%" PRIuz
" %02" PRIX8
" : %02" PRIX8
" diff=%d\n", x, src[x],
36 static BOOL similarRGB(
const BYTE* src,
const BYTE* dst,
size_t size, UINT32 format, BOOL use444)
38 const UINT32 bpp = FreeRDPGetBytesPerPixel(format);
39 BYTE fill = PADDING_FILL_VALUE;
40 if (!FreeRDPColorHasAlpha(format))
43 for (
size_t x = 0; x < size; x++)
45 const LONG maxDiff = 4;
56 sColor = FreeRDPReadColor(src, format);
57 dColor = FreeRDPReadColor(dst, format);
60 FreeRDPSplitColor(sColor, format, &sR, &sG, &sB, &sA, NULL);
61 FreeRDPSplitColor(dColor, format, &dR, &dG, &dB, &dA, NULL);
63 if ((labs(sR - dR) > maxDiff) || (labs(sG - dG) > maxDiff) || (labs(sB - dB) > maxDiff))
67 "Color value mismatch R[%02X %02X], G[%02X %02X], B[%02X %02X] at position %" PRIuz
69 sR, dR, sG, dG, sA, dA, x);
77 "[%s] Invalid destination alpha value 0x%02X [expected 0x%02X] at position %" PRIuz
79 use444 ?
"AVC444" :
"AVC420", dA, fill, x);
87 static void get_size(BOOL large, UINT32* width, UINT32* height)
89 UINT32 shift = large ? 8 : 1;
90 winpr_RAND(width,
sizeof(*width));
91 winpr_RAND(height,
sizeof(*height));
93 *width = (*width % 64 + 1) << shift;
94 *height = (*height % 64 + 1) << shift;
97 static BOOL check_padding(
const BYTE* psrc,
size_t size,
size_t padding,
const char* buffer)
100 const BYTE* src = NULL;
101 const BYTE* esrc = NULL;
102 size_t halfPad = (padding + 1) / 2;
107 src = psrc - halfPad;
108 esrc = src + size + halfPad;
110 for (
size_t x = 0; x < halfPad; x++)
112 const BYTE s = *src++;
113 const BYTE d = *esrc++;
119 while ((x < halfPad) && (*esrc++ !=
'A'))
122 (void)fprintf(stderr,
123 "Buffer underflow detected %02" PRIx8
" != %02X %s [%" PRIuz
"-%" PRIuz
125 d,
'A', buffer, start, x);
133 while ((x < halfPad) && (*esrc++ !=
'A'))
136 (void)fprintf(stderr,
137 "Buffer overflow detected %02" PRIx8
" != %02X %s [%" PRIuz
"-%" PRIuz
139 d,
'A', buffer, start, x);
147 static void* set_padding(
size_t size,
size_t padding)
149 size_t halfPad = (padding + 1) / 2;
151 BYTE* src = winpr_aligned_malloc(size + 2 * halfPad, 16);
156 memset(&src[0],
'A', halfPad);
157 memset(&src[halfPad], PADDING_FILL_VALUE, size);
158 memset(&src[halfPad + size],
'A', halfPad);
159 psrc = &src[halfPad];
161 if (!check_padding(psrc, size, padding,
"init"))
163 winpr_aligned_free(src);
170 static void free_padding(
void* src,
size_t padding)
177 ptr = ((BYTE*)src) - (padding + 1) / 2;
178 winpr_aligned_free(ptr);
193 BYTE* luma[3] = { 0 };
194 BYTE* chroma[3] = { 0 };
195 BYTE* yuv[3] = { 0 };
196 BYTE* pmain[3] = { 0 };
197 BYTE* paux[3] = { 0 };
198 UINT32 lumaStride[3];
199 UINT32 chromaStride[3];
201 const size_t padding = 10000;
203 PROFILER_DEFINE(yuvCombine)
204 PROFILER_DEFINE(yuvSplit)
205 awidth = roi.width + 16 - roi.width % 16;
206 aheight = roi.height + 16 - roi.height % 16;
207 (void)fprintf(stderr,
208 "Running YUVCombine on frame size %" PRIu32
"x%" PRIu32
" [%" PRIu32
"x%" PRIu32
210 roi.width, roi.height, awidth, aheight);
211 PROFILER_CREATE(yuvCombine,
"YUV420CombineToYUV444")
212 PROFILER_CREATE(yuvSplit, "YUV444SplitToYUV420")
215 rect.right = roi.width;
216 rect.bottom = roi.height;
218 if (!prims || !prims->YUV420CombineToYUV444)
221 for (UINT32 x = 0; x < 3; x++)
223 size_t halfStride = ((x > 0) ? awidth / 2 : awidth);
224 size_t size = aheight * awidth;
225 size_t halfSize = ((x > 0) ? halfStride * aheight / 2 : awidth * aheight);
226 yuvStride[x] = awidth;
228 if (!(yuv[x] = set_padding(size, padding)))
231 lumaStride[x] = halfStride;
233 if (!(luma[x] = set_padding(halfSize, padding)))
236 if (!(pmain[x] = set_padding(halfSize, padding)))
239 chromaStride[x] = halfStride;
241 if (!(chroma[x] = set_padding(halfSize, padding)))
244 if (!(paux[x] = set_padding(halfSize, padding)))
247 memset(luma[x], 0xAB + 3 * x, halfSize);
248 memset(chroma[x], 0x80 + 2 * x, halfSize);
250 if (!check_padding(luma[x], halfSize, padding,
"luma"))
253 if (!check_padding(chroma[x], halfSize, padding,
"chroma"))
256 if (!check_padding(pmain[x], halfSize, padding,
"main"))
259 if (!check_padding(paux[x], halfSize, padding,
"aux"))
262 if (!check_padding(yuv[x], size, padding,
"yuv"))
266 PROFILER_ENTER(yuvCombine)
269 if (prims->YUV420CombineToYUV444(AVC444_LUMA, cnv.cpv, lumaStride, roi.width, roi.height, yuv,
270 yuvStride, &rect) != PRIMITIVES_SUCCESS)
272 PROFILER_EXIT(yuvCombine)
277 if (prims->YUV420CombineToYUV444(AVC444_CHROMAv1, cnv.cpv, chromaStride, roi.width, roi.height,
278 yuv, yuvStride, &rect) != PRIMITIVES_SUCCESS)
280 PROFILER_EXIT(yuvCombine)
284 PROFILER_EXIT(yuvCombine)
286 for (
size_t x = 0; x < 3; x++)
288 size_t halfStride = ((x > 0) ? awidth / 2 : awidth);
289 size_t size = 1ULL * aheight * awidth;
290 size_t halfSize = ((x > 0) ? halfStride * aheight / 2 : awidth * aheight);
292 if (!check_padding(luma[x], halfSize, padding,
"luma"))
295 if (!check_padding(chroma[x], halfSize, padding,
"chroma"))
298 if (!check_padding(yuv[x], size, padding,
"yuv"))
302 PROFILER_ENTER(yuvSplit)
305 if (prims->YUV444SplitToYUV420(cnv.cpv, yuvStride, pmain, lumaStride, paux, chromaStride,
306 &roi) != PRIMITIVES_SUCCESS)
308 PROFILER_EXIT(yuvSplit)
312 PROFILER_EXIT(yuvSplit)
314 for (UINT32 x = 0; x < 3; x++)
316 size_t halfStride = ((x > 0) ? awidth / 2 : awidth);
317 size_t size = aheight * awidth;
318 size_t halfSize = ((x > 0) ? halfStride * aheight / 2 : awidth * aheight);
320 if (!check_padding(pmain[x], halfSize, padding,
"main"))
323 if (!check_padding(paux[x], halfSize, padding,
"aux"))
326 if (!check_padding(yuv[x], size, padding,
"yuv"))
330 for (
size_t i = 0; i < 3; i++)
332 for (
size_t y = 0; y < roi.height; y++)
334 UINT32 w = roi.width;
335 UINT32 lstride = lumaStride[i];
336 UINT32 cstride = chromaStride[i];
340 w = (roi.width + 3) / 4;
342 if (roi.height > (roi.height + 1) / 2)
346 if (!similar(luma[i] + y * lstride, pmain[i] + y * lstride, w))
357 UINT32 rem = roi.height % 16;
359 if (y > roi.height - rem)
363 if (!similar(chroma[i] + y * cstride, paux[i] + y * cstride, w))
368 PROFILER_PRINT_HEADER
369 PROFILER_PRINT(yuvSplit)
370 PROFILER_PRINT(yuvCombine)
371 PROFILER_PRINT_FOOTER
374 PROFILER_FREE(yuvCombine)
375 PROFILER_FREE(yuvSplit)
377 for (UINT32 x = 0; x < 3; x++)
379 free_padding(yuv[x], padding);
380 free_padding(luma[x], padding);
381 free_padding(chroma[x], padding);
382 free_padding(pmain[x], padding);
383 free_padding(paux[x], padding);
399 BYTE* yuv[3] = { 0 };
402 BYTE* rgb_dst = NULL;
406 size_t padding = 100ULL * 16ULL;
408 const UINT32 formats[] = { PIXEL_FORMAT_XRGB32, PIXEL_FORMAT_XBGR32, PIXEL_FORMAT_ARGB32,
409 PIXEL_FORMAT_ABGR32, PIXEL_FORMAT_RGBA32, PIXEL_FORMAT_RGBX32,
410 PIXEL_FORMAT_BGRA32, PIXEL_FORMAT_BGRX32 };
411 PROFILER_DEFINE(rgbToYUV420)
412 PROFILER_DEFINE(rgbToYUV444)
413 PROFILER_DEFINE(yuv420ToRGB)
414 PROFILER_DEFINE(yuv444ToRGB)
416 awidth = roi.width + 16 - roi.width % 16;
417 aheight = roi.height + 16 - roi.height % 16;
418 stride = 1ULL * awidth *
sizeof(UINT32);
419 size = 1ULL * awidth * aheight;
426 if (!prims || !prims->RGBToYUV444_8u_P3AC4R || !prims->YUV444ToRGB_8u_P3AC4R)
431 uvwidth = (awidth + 1) / 2;
432 uvsize = (aheight + 1) / 2 * uvwidth;
434 if (!prims || !prims->RGBToYUV420_8u_P3AC4R || !prims->YUV420ToRGB_8u_P3AC4R)
438 (void)fprintf(stderr,
"Running AVC%s on frame size %" PRIu32
"x%" PRIu32
"\n",
439 use444 ?
"444" :
"420", roi.width, roi.height);
442 if (!(rgb = set_padding(size *
sizeof(UINT32), padding)))
445 if (!(rgb_dst = set_padding(size *
sizeof(UINT32), padding)))
448 if (!(yuv[0] = set_padding(size, padding)))
451 if (!(yuv[1] = set_padding(uvsize, padding)))
454 if (!(yuv[2] = set_padding(uvsize, padding)))
457 for (
size_t y = 0; y < roi.height; y++)
459 BYTE* line = &rgb[y * stride];
461 for (UINT32 x = 0; x < roi.width; x++)
463 line[x * 4 + 0] = 0x81;
464 line[x * 4 + 1] = 0x33;
465 line[x * 4 + 2] = 0xAB;
466 line[x * 4 + 3] = 0xFF;
470 yuv_step[0] = awidth;
471 yuv_step[1] = uvwidth;
472 yuv_step[2] = uvwidth;
474 for (UINT32 x = 0; x < ARRAYSIZE(formats); x++)
477 const UINT32 DstFormat = formats[x];
478 printf(
"Testing destination color format %s\n", FreeRDPGetColorFormatName(DstFormat));
479 memset(rgb_dst, PADDING_FILL_VALUE, size *
sizeof(UINT32));
481 PROFILER_CREATE(rgbToYUV420,
"RGBToYUV420")
482 PROFILER_CREATE(rgbToYUV444, "RGBToYUV444")
483 PROFILER_CREATE(yuv420ToRGB, "YUV420ToRGB")
484 PROFILER_CREATE(yuv444ToRGB, "YUV444ToRGB")
488 PROFILER_ENTER(rgbToYUV444)
489 rc = prims->RGBToYUV444_8u_P3AC4R(rgb, DstFormat, stride, yuv, yuv_step, &roi);
490 PROFILER_EXIT(rgbToYUV444)
492 if (rc != PRIMITIVES_SUCCESS)
495 PROFILER_PRINT_HEADER
496 PROFILER_PRINT(rgbToYUV444)
497 PROFILER_PRINT_FOOTER
501 PROFILER_ENTER(rgbToYUV420)
502 rc = prims->RGBToYUV420_8u_P3AC4R(rgb, DstFormat, stride, yuv, yuv_step, &roi);
503 PROFILER_EXIT(rgbToYUV420)
505 if (rc != PRIMITIVES_SUCCESS)
508 PROFILER_PRINT_HEADER
509 PROFILER_PRINT(rgbToYUV420)
510 PROFILER_PRINT_FOOTER
513 if (!check_padding(rgb, size *
sizeof(UINT32), padding,
"rgb"))
519 if ((!check_padding(yuv[0], size, padding,
"Y")) ||
520 (!check_padding(yuv[1], uvsize, padding,
"U")) ||
521 (!check_padding(yuv[2], uvsize, padding,
"V")))
530 PROFILER_ENTER(yuv444ToRGB)
531 rc = prims->YUV444ToRGB_8u_P3AC4R(cnv.cpv, yuv_step, rgb_dst, stride, DstFormat, &roi);
532 PROFILER_EXIT(yuv444ToRGB)
534 if (rc != PRIMITIVES_SUCCESS)
538 PROFILER_EXIT(yuv444ToRGB)
539 PROFILER_PRINT_HEADER
540 PROFILER_PRINT(yuv444ToRGB)
541 PROFILER_PRINT_FOOTER
543 if (rc != PRIMITIVES_SUCCESS)
548 PROFILER_ENTER(yuv420ToRGB)
550 if (prims->YUV420ToRGB_8u_P3AC4R(cnv.cpv, yuv_step, rgb_dst, stride, DstFormat, &roi) !=
553 PROFILER_EXIT(yuv420ToRGB)
557 PROFILER_EXIT(yuv420ToRGB)
558 PROFILER_PRINT_HEADER
559 PROFILER_PRINT(yuv420ToRGB)
560 PROFILER_PRINT_FOOTER
563 if (!check_padding(rgb_dst, size *
sizeof(UINT32), padding,
"rgb dst"))
566 if ((!check_padding(yuv[0], size, padding,
"Y")) ||
567 (!check_padding(yuv[1], uvsize, padding,
"U")) ||
568 (!check_padding(yuv[2], uvsize, padding,
"V")))
571 for (
size_t y = 0; y < roi.height; y++)
573 BYTE* srgb = &rgb[y * stride];
574 BYTE* drgb = &rgb_dst[y * stride];
576 if (!similarRGB(srgb, drgb, roi.width, DstFormat, use444))
580 PROFILER_FREE(rgbToYUV420)
581 PROFILER_FREE(rgbToYUV444)
582 PROFILER_FREE(yuv420ToRGB)
583 PROFILER_FREE(yuv444ToRGB)
588 free_padding(rgb, padding);
589 free_padding(rgb_dst, padding);
590 free_padding(yuv[0], padding);
591 free_padding(yuv[1], padding);
592 free_padding(yuv[2], padding);
596 static BOOL allocate_yuv420(BYTE** planes, UINT32 width, UINT32 height, UINT32 padding)
598 const size_t size = 1ULL * width * height;
599 const size_t uvwidth = (1ULL + width) / 2;
600 const size_t uvsize = (1ULL + height) / 2 * uvwidth;
602 if (!(planes[0] = set_padding(size, padding)))
605 if (!(planes[1] = set_padding(uvsize, padding)))
608 if (!(planes[2] = set_padding(uvsize, padding)))
613 free_padding(planes[0], padding);
614 free_padding(planes[1], padding);
615 free_padding(planes[2], padding);
619 static void free_yuv420(BYTE** planes, UINT32 padding)
624 free_padding(planes[0], padding);
625 free_padding(planes[1], padding);
626 free_padding(planes[2], padding);
631 static BOOL check_yuv420(BYTE** planes, UINT32 width, UINT32 height, UINT32 padding)
633 const size_t size = 1ULL * width * height;
634 const size_t uvwidth = (width + 1) / 2;
635 const size_t uvsize = (height + 1) / 2 * uvwidth;
636 const BOOL yOk = check_padding(planes[0], size, padding,
"Y");
637 const BOOL uOk = check_padding(planes[1], uvsize, padding,
"U");
638 const BOOL vOk = check_padding(planes[2], uvsize, padding,
"V");
639 return (yOk && uOk && vOk);
642 static BOOL check_for_mismatches(
const BYTE* planeA,
const BYTE* planeB, UINT32 size)
646 for (UINT32 x = 0; x < size; x++)
648 const BYTE a = planeA[x];
649 const BYTE b = planeB[x];
651 if (fabsf((
float)a - (
float)b) > 2.0f)
654 (void)fprintf(stderr,
"[%08x] %02x != %02x\n", x, a, b);
661 static BOOL compare_yuv420(BYTE** planesA, BYTE** planesB, UINT32 width, UINT32 height,
665 const size_t size = 1ULL * width * height;
666 const size_t uvwidth = (1ULL * width + 1) / 2;
667 const size_t uvsize = (1ULL * height + 1) / 2 * uvwidth;
669 if (check_for_mismatches(planesA[0], planesB[0], size))
671 (void)fprintf(stderr,
"Mismatch in Y planes!");
675 if (check_for_mismatches(planesA[1], planesB[1], uvsize))
677 (void)fprintf(stderr,
"Mismatch in U planes!");
681 if (check_for_mismatches(planesA[2], planesB[2], uvsize))
683 (void)fprintf(stderr,
"Mismatch in V planes!");
690 static UINT32 prand(UINT32 max)
695 winpr_RAND(&tmp,
sizeof(tmp));
696 return tmp % (max - 1) + 1;
704 BYTE* luma[3] = { 0 };
705 BYTE* chroma[3] = { 0 };
706 BYTE* lumaGeneric[3] = { 0 };
707 BYTE* chromaGeneric[3] = { 0 };
712 const size_t padding = 0x1000;
714 __RGBToAVC444YUV_t fkt = NULL;
715 __RGBToAVC444YUV_t gen = NULL;
716 const UINT32 formats[] = { PIXEL_FORMAT_XRGB32, PIXEL_FORMAT_XBGR32, PIXEL_FORMAT_ARGB32,
717 PIXEL_FORMAT_ABGR32, PIXEL_FORMAT_RGBA32, PIXEL_FORMAT_RGBX32,
718 PIXEL_FORMAT_BGRA32, PIXEL_FORMAT_BGRX32 };
719 PROFILER_DEFINE(rgbToYUV444)
720 PROFILER_DEFINE(rgbToYUV444opt)
724 if (awidth % 16 != 0)
725 awidth += 16 - roi.width % 16;
727 aheight = roi.height;
729 if (aheight % 16 != 0)
730 aheight += 16 - roi.height % 16;
732 stride = 1ULL * awidth *
sizeof(UINT32);
733 size = 1ULL * awidth * aheight;
734 uvwidth = 1ULL * (awidth + 1) / 2;
736 if (!prims || !
generic)
742 fkt = prims->RGBToAVC444YUV;
743 gen =
generic->RGBToAVC444YUV;
747 fkt = prims->RGBToAVC444YUVv2;
748 gen =
generic->RGBToAVC444YUVv2;
758 (void)fprintf(stderr,
"Running AVC444 on frame size %" PRIu32
"x%" PRIu32
"\n", roi.width,
762 if (!(rgb = set_padding(size *
sizeof(UINT32), padding)))
765 if (!allocate_yuv420(luma, awidth, aheight, padding))
768 if (!allocate_yuv420(chroma, awidth, aheight, padding))
771 if (!allocate_yuv420(lumaGeneric, awidth, aheight, padding))
774 if (!allocate_yuv420(chromaGeneric, awidth, aheight, padding))
777 for (
size_t y = 0; y < roi.height; y++)
779 BYTE* line = &rgb[y * stride];
781 for (UINT32 x = 0; x < roi.width; x++)
784 line[x * 4 + 0] = prand(UINT8_MAX);
785 line[x * 4 + 1] = prand(UINT8_MAX);
786 line[x * 4 + 2] = prand(UINT8_MAX);
787 line[x * 4 + 3] = prand(UINT8_MAX);
789 line[x * 4 + 0] = (y * roi.width + x) * 16 + 5;
790 line[x * 4 + 1] = (y * roi.width + x) * 16 + 7;
791 line[x * 4 + 2] = (y * roi.width + x) * 16 + 11;
792 line[x * 4 + 3] = (y * roi.width + x) * 16 + 0;
797 yuv_step[0] = awidth;
798 yuv_step[1] = uvwidth;
799 yuv_step[2] = uvwidth;
801 for (UINT32 x = 0; x <
sizeof(formats) /
sizeof(formats[0]); x++)
804 const UINT32 DstFormat = formats[x];
805 printf(
"Testing destination color format %s\n", FreeRDPGetColorFormatName(DstFormat));
806 PROFILER_CREATE(rgbToYUV444,
"RGBToYUV444-generic")
807 PROFILER_CREATE(rgbToYUV444opt, "RGBToYUV444-optimized")
809 for (UINT32 cnt = 0; cnt < 10; cnt++)
811 PROFILER_ENTER(rgbToYUV444opt)
812 rc = fkt(rgb, DstFormat, stride, luma, yuv_step, chroma, yuv_step, &roi);
813 PROFILER_EXIT(rgbToYUV444opt)
815 if (rc != PRIMITIVES_SUCCESS)
819 PROFILER_PRINT_HEADER
820 PROFILER_PRINT(rgbToYUV444opt)
821 PROFILER_PRINT_FOOTER
823 if (!check_padding(rgb, size *
sizeof(UINT32), padding,
"rgb"))
829 if (!check_yuv420(luma, awidth, aheight, padding) ||
830 !check_yuv420(chroma, awidth, aheight, padding))
836 for (UINT32 cnt = 0; cnt < 10; cnt++)
838 PROFILER_ENTER(rgbToYUV444)
839 rc = gen(rgb, DstFormat, stride, lumaGeneric, yuv_step, chromaGeneric, yuv_step, &roi);
840 PROFILER_EXIT(rgbToYUV444)
842 if (rc != PRIMITIVES_SUCCESS)
846 PROFILER_PRINT_HEADER
847 PROFILER_PRINT(rgbToYUV444)
848 PROFILER_PRINT_FOOTER
850 if (!check_padding(rgb, size *
sizeof(UINT32), padding,
"rgb"))
856 if (!check_yuv420(lumaGeneric, awidth, aheight, padding) ||
857 !check_yuv420(chromaGeneric, awidth, aheight, padding))
863 if (!compare_yuv420(luma, lumaGeneric, awidth, aheight, padding) ||
864 !compare_yuv420(chroma, chromaGeneric, awidth, aheight, padding))
871 PROFILER_FREE(rgbToYUV444)
872 PROFILER_FREE(rgbToYUV444opt)
874 if (rc != PRIMITIVES_SUCCESS)
880 free_padding(rgb, padding);
881 free_yuv420(luma, padding);
882 free_yuv420(chroma, padding);
883 free_yuv420(lumaGeneric, padding);
884 free_yuv420(chromaGeneric, padding);
888 int TestPrimitivesYUV(
int argc,
char* argv[])
890 BOOL large = (argc > 1);
894 prim_test_setup(FALSE);
897 for (UINT32 x = 0; x < 5; x++)
904 int crc = sscanf(argv[1],
"%" PRIu32
"x%" PRIu32, &roi.width, &roi.height);
913 get_size(large, &roi.width, &roi.height);
915 printf(
"-------------------- GENERIC ------------------------\n");
917 if (!TestPrimitiveYUV(
generic, roi, TRUE))
919 printf(
"TestPrimitiveYUV (444) failed.\n");
923 printf(
"---------------------- END --------------------------\n");
924 printf(
"------------------- OPTIMIZED -----------------------\n");
926 if (!TestPrimitiveYUV(prims, roi, TRUE))
928 printf(
"TestPrimitiveYUV (444) failed.\n");
932 printf(
"---------------------- END --------------------------\n");
933 printf(
"-------------------- GENERIC ------------------------\n");
935 if (!TestPrimitiveYUV(
generic, roi, FALSE))
937 printf(
"TestPrimitiveYUV (420) failed.\n");
941 printf(
"---------------------- END --------------------------\n");
942 printf(
"------------------- OPTIMIZED -----------------------\n");
944 if (!TestPrimitiveYUV(prims, roi, FALSE))
946 printf(
"TestPrimitiveYUV (420) failed.\n");
950 printf(
"---------------------- END --------------------------\n");
951 printf(
"-------------------- GENERIC ------------------------\n");
953 if (!TestPrimitiveYUVCombine(
generic, roi))
955 printf(
"TestPrimitiveYUVCombine failed.\n");
959 printf(
"---------------------- END --------------------------\n");
960 printf(
"------------------- OPTIMIZED -----------------------\n");
962 if (!TestPrimitiveYUVCombine(prims, roi))
964 printf(
"TestPrimitiveYUVCombine failed.\n");
968 printf(
"---------------------- END --------------------------\n");
969 printf(
"------------------- OPTIMIZED -----------------------\n");
971 if (!TestPrimitiveRgbToLumaChroma(prims, roi, 1))
973 printf(
"TestPrimitiveRgbToLumaChroma failed.\n");
977 printf(
"---------------------- END --------------------------\n");
978 printf(
"-------------------- GENERIC ------------------------\n");
980 if (!TestPrimitiveRgbToLumaChroma(prims, roi, 2))
982 printf(
"TestPrimitiveYUVCombine failed.\n");
986 printf(
"---------------------- END --------------------------\n");