This handles macroblock edges for the chroma components in the same way as for the luma compoment for 4:4:4 streams. The Spec explicitly states that the deblocking filter is not applied to edges at the boundary of the picture.
Unified · Split
| @@ -2361,17 +2361,19 @@ static av_always_inline void xchg_mb_border(H264Context *h, uint8_t *src_y, · 2360 unmodified lines | |||
| 2361 | } | 2361 | } |
| 2362 | if (simple || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) { | 2362 | if (simple || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) { |
| 2363 | if (chroma444) { | 2363 | if (chroma444) { |
| 2364 | if (deblock_topleft) { | 2364 | if (deblock_top) { |
| 2365 | XCHG(top_border_m1 + (24 << pixel_shift), src_cb - (7 << pixel_shift), 1); | 2365 | if (deblock_topleft) { |
| 2366 | XCHG(top_border_m1 + (40 << pixel_shift), src_cr - (7 << pixel_shift), 1); | 2366 | XCHG(top_border_m1 + (24 << pixel_shift), src_cb - (7 << pixel_shift), 1); |
| 2367 | } | 2367 | XCHG(top_border_m1 + (40 << pixel_shift), src_cr - (7 << pixel_shift), 1); |
| 2368 | XCHG(top_border + (16 << pixel_shift), src_cb + (1 << pixel_shift), xchg); | 2368 | } |
| 2369 | XCHG(top_border + (24 << pixel_shift), src_cb + (9 << pixel_shift), 1); | 2369 | XCHG(top_border + (16 << pixel_shift), src_cb + (1 << pixel_shift), xchg); |
| 2370 | XCHG(top_border + (32 << pixel_shift), src_cr + (1 << pixel_shift), xchg); | 2370 | XCHG(top_border + (24 << pixel_shift), src_cb + (9 << pixel_shift), 1); |
| 2371 | XCHG(top_border + (40 << pixel_shift), src_cr + (9 << pixel_shift), 1); | 2371 | XCHG(top_border + (32 << pixel_shift), src_cr + (1 << pixel_shift), xchg); |
| 2372 | if (h->mb_x + 1 < h->mb_width) { | 2372 | XCHG(top_border + (40 << pixel_shift), src_cr + (9 << pixel_shift), 1); |
| 2373 | XCHG(h->top_borders[top_idx][h->mb_x + 1] + (16 << pixel_shift), src_cb + (17 << pixel_shift), 1); | 2373 | if (h->mb_x + 1 < h->mb_width) { |
| 2374 | XCHG(h->top_borders[top_idx][h->mb_x + 1] + (32 << pixel_shift), src_cr + (17 << pixel_shift), 1); | 2374 | XCHG(h->top_borders[top_idx][h->mb_x + 1] + (16 << pixel_shift), src_cb + (17 << pixel_shift), 1); |
| 2375 | XCHG(h->top_borders[top_idx][h->mb_x + 1] + (32 << pixel_shift), src_cr + (17 << pixel_shift), 1); | ||
| 2376 | } | ||
| 2375 | } | 2377 | } |
| 2376 | } else { | 2378 | } else { |
| 2377 | if (deblock_top) { | 2379 | if (deblock_top) { |