forge
Explore
Log in

Don't you dare go Hollow

vp9kf: chroma 64x64 border 4-tap is 8-tap (adjust_mask)

Browse files at this commit

e2fa4f01a3b96f73a4cbb02db75df82b0790d686Ahmet Kaan GümüşParent: 82ca712
left_border_uv 0x1111 / above_border_uv 0x000f. U 16→7, V 20→11, Y still
byte-exact. keyframes_match_ffmpeg still FAIL at U(31,11). Not pushed.
crates/ec-vp9/src/loopfilter.rsmodified+12 -2
@@ -436,11 +436,16 @@ impl LfGrids {
436 if c % step != 0 {436 if c % step != 0 {
437 continue;437 continue;
438 }438 }
439- let taps = match uv_tx {439+ // vp9_adjust_mask: 4-tap on a 64x64 left border is
440+ // promoted to 8-tap (`left_uv[TX_4] & 0x1111` → TX_8).
441+ let mut taps = match uv_tx {
440 TX_16X16 | TX_32X32 if c * 4 >= 8 && c * 4 + 8 <= uv_w => 16,442 TX_16X16 | TX_32X32 if c * 4 >= 8 && c * 4 + 8 <= uv_w => 16,
441 TX_16X16 | TX_32X32 | TX_8X8 => 8,443 TX_16X16 | TX_32X32 | TX_8X8 => 8,
442 _ => 4,444 _ => 4,
443 };445 };
446+ if taps == 4 && c % 8 == 0 {
447+ taps = 8;
448+ }
444 let (bl, li, th) = limits(level, sharpness);449 let (bl, li, th) = limits(level, sharpness);
445 let off = r * 4 * uv_stride + c * 4;450 let off = r * 4 * uv_stride + c * 4;
446 if uv_w >= c * 4 + 4 {451 if uv_w >= c * 4 + 4 {
@@ -464,11 +469,16 @@ impl LfGrids {
464 if r % step != 0 {469 if r % step != 0 {
465 continue;470 continue;
466 }471 }
467- let taps = match uv_tx {472+ // above_border_uv 0x000f: 4-tap on a 64x64 top border
473+ // is promoted to 8-tap.
474+ let mut taps = match uv_tx {
468 TX_16X16 | TX_32X32 if r * 4 >= 8 && r * 4 + 8 <= uv_h => 16,475 TX_16X16 | TX_32X32 if r * 4 >= 8 && r * 4 + 8 <= uv_h => 16,
469 TX_16X16 | TX_32X32 | TX_8X8 => 8,476 TX_16X16 | TX_32X32 | TX_8X8 => 8,
470 _ => 4,477 _ => 4,
471 };478 };
479+ if taps == 4 && r % 8 == 0 {
480+ taps = 8;
481+ }
472 let (bl, li, th) = limits(level, sharpness);482 let (bl, li, th) = limits(level, sharpness);
473 let off = r * 4 * uv_stride + c * 4;483 let off = r * 4 * uv_stride + c * 4;
474 if uv_h >= r * 4 + 4 {484 if uv_h >= r * 4 + 4 {
lanes/vp9kf.report.mdmodified+16 -0
@@ -339,3 +339,19 @@ Next: chroma ss11 at U(31,11) — likely remaining 4-vs-8 dual threshold or TX_3
339 339
340 Flash 429 until 2026-09-18 19:27. Continue on main grok.340 Flash 429 until 2026-09-18 19:27. Continue on main grok.
341 341
342+## HANDOFF #7 (2026-09-15) — chroma 64x64 border 4→8
343+
344+`vp9_adjust_mask` promotes 4-tap UV on a 64x64 border to 8-tap
345+(`left_uv[TX_4] & 0x1111` → TX_8; `above_uv[TX_4] & 0x000f` → TX_8).
346+Also: TX_32 UV bits are OR'd into TX_16 before ss11 reads them — do not
347+skip TX_32; do not treat skip as the 16-pixel miss.
348+
349+U 16→7, V 20→11. Y still 0. Isolated `vpx_lpf_horizontal_4` matches our
350+filter4; remaining cluster is U(31..32,11..12) where 8-tap inner p0/q0
351+disagree after V+H (x31 is the last pixel of the previous 8-pack H).
352+
353+Next: port `vp9_setup_mask` UV rule for <16x16 (only the first 8x8 of
354+each 16x16 calls `build_masks`; the other three are `build_y_mask`).
355+Do not touch luma.
356+
357+