Unified · Split
| @@ -341,9 +341,9 @@ static void check_loop_filter(void) · 340 unmodified lines | |||
| 341 | c = c*9/10; | 341 | c = c*9/10; |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | #define CHECK_LOOP_FILTER(name, align, ...) \ | 344 | #define CHECK_LOOP_FILTER(name, align, idc) \ |
| 345 | do { \ | 345 | do { \ |
| 346 | if (check_func(h.name, #name "_%dbpp", bit_depth)) { \ | 346 | if (check_func(h.name, #name #idc "_%dbpp", bit_depth)) { \ |
| 347 | for (j = 0; j < 36; j++) { \ | 347 | for (j = 0; j < 36; j++) { \ |
| 348 | intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \ | 348 | intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \ |
| 349 | for (i = 0; i < 1024; i+=4) { \ | 349 | for (i = 0; i < 1024; i+=4) { \ |
| @@ -355,7 +355,7 @@ static void check_loop_filter(void) · 5 unmodified lines | |||
| 355 | call_ref(dst0 + off, 32, alphas[j], betas[j], tc0[j]); \ | 355 | call_ref(dst0 + off, 32, alphas[j], betas[j], tc0[j]); \ |
| 356 | call_new(dst1 + off, 32, alphas[j], betas[j], tc0[j]); \ | 356 | call_new(dst1 + off, 32, alphas[j], betas[j], tc0[j]); \ |
| 357 | if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \ | 357 | 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 " \ |
| 359 | "tc0:{%d,%d,%d,%d}\n", j, alphas[j], betas[j], \ | 359 | "tc0:{%d,%d,%d,%d}\n", j, alphas[j], betas[j], \ |
| 360 | tc0[j][0], tc0[j][1], tc0[j][2], tc0[j][3]); \ | 360 | tc0[j][0], tc0[j][1], tc0[j][2], tc0[j][3]); \ |
| 361 | fail(); \ | 361 | fail(); \ |
| @@ -365,12 +365,16 @@ static void check_loop_filter(void) · 3 unmodified lines | |||
| 365 | } \ | 365 | } \ |
| 366 | } while (0) | 366 | } while (0) |
| 367 | 367 | ||
| 368 | CHECK_LOOP_FILTER(h264_v_loop_filter_luma, 1); | 368 | CHECK_LOOP_FILTER(h264_v_loop_filter_luma, 1,); |
| 369 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma, 0); | 369 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma, 0,); |
| 370 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff, 0); | 370 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff, 0,); |
| 371 | CHECK_LOOP_FILTER(h264_v_loop_filter_chroma, 1); | 371 | CHECK_LOOP_FILTER(h264_v_loop_filter_chroma, 1,); |
| 372 | CHECK_LOOP_FILTER(h264_h_loop_filter_chroma, 0); | 372 | CHECK_LOOP_FILTER(h264_h_loop_filter_chroma, 0,); |
| 373 | CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff, 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); | ||
| 374 | #undef CHECK_LOOP_FILTER | 378 | #undef CHECK_LOOP_FILTER |
| 375 | } | 379 | } |
| 376 | } | 380 | } |
| @@ -397,9 +401,9 @@ static void check_loop_filter_intra(void) · 20 unmodified lines | |||
| 397 | a = a*9/10; | 401 | a = a*9/10; |
| 398 | } | 402 | } |
| 399 | 403 | ||
| 400 | #define CHECK_LOOP_FILTER(name, align) \ | 404 | #define CHECK_LOOP_FILTER(name, align, idc) \ |
| 401 | do { \ | 405 | do { \ |
| 402 | if (check_func(h.name, #name "_%dbpp", bit_depth)) { \ | 406 | if (check_func(h.name, #name #idc "_%dbpp", bit_depth)) { \ |
| 403 | for (j = 0; j < 36; j++) { \ | 407 | for (j = 0; j < 36; j++) { \ |
| 404 | intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \ | 408 | intptr_t off = 8 * 32 + (j & 15) * 4 * !align; \ |
| 405 | for (i = 0; i < 1024; i+=4) { \ | 409 | for (i = 0; i < 1024; i+=4) { \ |
| @@ -411,7 +415,7 @@ static void check_loop_filter_intra(void) · 5 unmodified lines | |||
| 411 | call_ref(dst0 + off, 32, alphas[j], betas[j]); \ | 415 | call_ref(dst0 + off, 32, alphas[j], betas[j]); \ |
| 412 | call_new(dst1 + off, 32, alphas[j], betas[j]); \ | 416 | call_new(dst1 + off, 32, alphas[j], betas[j]); \ |
| 413 | if (memcmp(dst0, dst1, 32 * 16 * SIZEOF_PIXEL)) { \ | 417 | 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", \ |
| 415 | j, alphas[j], betas[j]); \ | 419 | j, alphas[j], betas[j]); \ |
| 416 | fail(); \ | 420 | fail(); \ |
| 417 | } \ | 421 | } \ |
| @@ -420,12 +424,16 @@ static void check_loop_filter_intra(void) · 2 unmodified lines | |||
| 420 | } \ | 424 | } \ |
| 421 | } while (0) | 425 | } while (0) |
| 422 | 426 | ||
| 423 | CHECK_LOOP_FILTER(h264_v_loop_filter_luma_intra, 1); | 427 | CHECK_LOOP_FILTER(h264_v_loop_filter_luma_intra, 1,); |
| 424 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma_intra, 0); | 428 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma_intra, 0,); |
| 425 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff_intra, 0); | 429 | CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff_intra, 0,); |
| 426 | CHECK_LOOP_FILTER(h264_v_loop_filter_chroma_intra, 1); | 430 | CHECK_LOOP_FILTER(h264_v_loop_filter_chroma_intra, 1,); |
| 427 | CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_intra, 0); | 431 | CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_intra, 0,); |
| 428 | CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff_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); | ||
| 429 | #undef CHECK_LOOP_FILTER | 437 | #undef CHECK_LOOP_FILTER |
| 430 | } | 438 | } |
| 431 | } | 439 | } |