History

checkasm/h264: test 4:2:2 chroma loop filter functions

Janne Grunau committed 7 years ago

Commit f8abf7d1 parent 186bd301 file · +26 −18Browse files

Unified · Split

tests/checkasm/h264dsp.c+26−18
@@ -341,9 +341,9 @@ static void check_loop_filter(void) · 340 unmodified lines
341341 c = c*9/10;
342342 }
343343
344−#define CHECK_LOOP_FILTER(name, align, ...) \
344+#define CHECK_LOOP_FILTER(name, align, idc) \
345345 do { \
346− if (check_func(h.name, #name "_%dbpp", bit_depth)) { \
346+ if (check_func(h.name, #name #idc "_%dbpp", bit_depth)) { \
347347 for (j = 0; j < 36; j++) { \
348348 intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \
349349 for (i = 0; i < 1024; i+=4) { \
@@ -355,7 +355,7 @@ static void check_loop_filter(void) · 5 unmodified lines
355355 call_ref(dst0 + off, 32, alphas[j], betas[j], tc0[j]); \
356356 call_new(dst1 + off, 32, alphas[j], betas[j], tc0[j]); \
357357 if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \
358− fprintf(stderr, #name ": j:%d, alpha:%d beta:%d " \
358+ fprintf(stderr, #name #idc ": j:%d, alpha:%d beta:%d " \
359359 "tc0:{%d,%d,%d,%d}\n", j, alphas[j], betas[j], \
360360 tc0[j][0], tc0[j][1], tc0[j][2], tc0[j][3]); \
361361 fail(); \
@@ -365,12 +365,16 @@ static void check_loop_filter(void) · 3 unmodified lines
365365 } \
366366 } while (0)
367367
368− CHECK_LOOP_FILTER(h264_v_loop_filter_luma, 1);
369− CHECK_LOOP_FILTER(h264_h_loop_filter_luma, 0);
370− CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff, 0);
371− CHECK_LOOP_FILTER(h264_v_loop_filter_chroma, 1);
372− CHECK_LOOP_FILTER(h264_h_loop_filter_chroma, 0);
373− CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff, 0);
368+ CHECK_LOOP_FILTER(h264_v_loop_filter_luma, 1,);
369+ CHECK_LOOP_FILTER(h264_h_loop_filter_luma, 0,);
370+ CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff, 0,);
371+ CHECK_LOOP_FILTER(h264_v_loop_filter_chroma, 1,);
372+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma, 0,);
373+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff, 0,);
374+
375+ ff_h264dsp_init(&h, bit_depth, 2);
376+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma, 0, 422);
377+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff, 0, 422);
374378 #undef CHECK_LOOP_FILTER
375379 }
376380 }
@@ -397,9 +401,9 @@ static void check_loop_filter_intra(void) · 20 unmodified lines
397401 a = a*9/10;
398402 }
399403
400−#define CHECK_LOOP_FILTER(name, align) \
404+#define CHECK_LOOP_FILTER(name, align, idc) \
401405 do { \
402− if (check_func(h.name, #name "_%dbpp", bit_depth)) { \
406+ if (check_func(h.name, #name #idc "_%dbpp", bit_depth)) { \
403407 for (j = 0; j < 36; j++) { \
404408 intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \
405409 for (i = 0; i < 1024; i+=4) { \
@@ -411,7 +415,7 @@ static void check_loop_filter_intra(void) · 5 unmodified lines
411415 call_ref(dst0 + off, 32, alphas[j], betas[j]); \
412416 call_new(dst1 + off, 32, alphas[j], betas[j]); \
413417 if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \
414− fprintf(stderr, #name ": j:%d, alpha:%d beta:%d\n", \
418+ fprintf(stderr, #name #idc ": j:%d, alpha:%d beta:%d\n", \
415419 j, alphas[j], betas[j]); \
416420 fail(); \
417421 } \
@@ -420,12 +424,16 @@ static void check_loop_filter_intra(void) · 2 unmodified lines
420424 } \
421425 } while (0)
422426
423− CHECK_LOOP_FILTER(h264_v_loop_filter_luma_intra, 1);
424− CHECK_LOOP_FILTER(h264_h_loop_filter_luma_intra, 0);
425− CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff_intra, 0);
426− CHECK_LOOP_FILTER(h264_v_loop_filter_chroma_intra, 1);
427− CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_intra, 0);
428− CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff_intra, 0);
427+ CHECK_LOOP_FILTER(h264_v_loop_filter_luma_intra, 1,);
428+ CHECK_LOOP_FILTER(h264_h_loop_filter_luma_intra, 0,);
429+ CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff_intra, 0,);
430+ CHECK_LOOP_FILTER(h264_v_loop_filter_chroma_intra, 1,);
431+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_intra, 0,);
432+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff_intra, 0,);
433+
434+ ff_h264dsp_init(&h, bit_depth, 2);
435+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_intra, 0, 422);
436+ CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff_intra, 0, 422);
429437 #undef CHECK_LOOP_FILTER
430438 }
431439 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t