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 {
436436 if c % step != 0 {
437437 continue;
438438 }
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 {
440442 TX_16X16 | TX_32X32 if c * 4 >= 8 && c * 4 + 8 <= uv_w => 16,
441443 TX_16X16 | TX_32X32 | TX_8X8 => 8,
442444 _ => 4,
443445 };
446+ if taps == 4 && c % 8 == 0 {
447+ taps = 8;
448+ }
444449 let (bl, li, th) = limits(level, sharpness);
445450 let off = r * 4 * uv_stride + c * 4;
446451 if uv_w >= c * 4 + 4 {
@@ -464,11 +469,16 @@ impl LfGrids {
464469 if r % step != 0 {
465470 continue;
466471 }
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 {
468475 TX_16X16 | TX_32X32 if r * 4 >= 8 && r * 4 + 8 <= uv_h => 16,
469476 TX_16X16 | TX_32X32 | TX_8X8 => 8,
470477 _ => 4,
471478 };
479+ if taps == 4 && r % 8 == 0 {
480+ taps = 8;
481+ }
472482 let (bl, li, th) = limits(level, sharpness);
473483 let off = r * 4 * uv_stride + c * 4;
474484 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
339339
340340 Flash 429 until 2026-09-18 19:27. Continue on main grok.
341341
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+