forge
Explore
Log in

Don't you dare go Hollow

The 128 root offers PARTITION_HORZ and PARTITION_VERT

Browse files at this commit

d106c89c17b2170cf9ff035b946eed07255ea6c5Ahmet Kaan GümüşParent: 4568a63
  • feat
    • the 128 root offers PARTITION_HORZ and PARTITION_VERT
Show full message
feat(av1): the 128 root offers PARTITION_HORZ and PARTITION_VERT

search_root_128_rect prices the root as two 128x64 / 64x128 skip blocks --
single reference or compound, the shipped NONE machinery halved. The first
half is published into the mi grid before the second is searched (the writer
publishes it too), and the grid is put back for the four-superblock arm; the
NONE / HORZ / VERT candidates are ranked together against the split.
search_skip_64 now takes a (w, h) footprint and tiles it into squares of its
shorter side, which is byte-identical at w == h. Census extended with the
HORZ/VERT counts. Witness green on the first draft: 2640 forced 128x64 and
2640 forced 64x128 halves sample-exact through decode_stream and ffmpeg, with
17 HORZ + 9 VERT unforced over 12 frames. Pin q=150 8290 -> 8291; the q=60 pin
does not move; EC_AV1_B128HV=0 restores both.
crates/ec-av1/src/encode.rsmodified+7 -1
@@ -18360,7 +18360,13 @@ mod tests {
18360 // 33017 at q=60 (the same LENGTH, different bytes).18360 // 33017 at q=60 (the same LENGTH, different bytes).
18361 // Re-taken at the merge of lane-arftf (ARF filter strength 2) and18361 // Re-taken at the merge of lane-arftf (ARF filter strength 2) and
18362 // lane-rlclamp onto the 128 compound default.18362 // lane-rlclamp onto the 128 compound default.
18363- let pins: [(u8, usize, u64); 2] = [(150, 8290, 0x92cb11033d1f5813), (60, 33227, 0x57ee6b1f8eacd881)];18363+ // Re-taken on lane-b128hv: the 128 root now also offers PARTITION_HORZ
18364+ // and PARTITION_VERT ([`b128_rect`]), two 128x64 / 64x128 skip blocks,
18365+ // so every inter frame whose RD takes one codes a different partition
18366+ // -- 8290 -> 8291 bytes at q=150. The q=60 pin does NOT move: at that
18367+ // quantizer the rect cut never wins its own comparison on this clip.
18368+ // `EC_AV1_B128HV=0` restores 8290 exactly.
18369+ let pins: [(u8, usize, u64); 2] = [(150, 8291, 0x1f00bb0eb099a27f), (60, 33227, 0x57ee6b1f8eacd881)];
18364 let coded: Vec<(u8, usize, u64)> = pins18370 let coded: Vec<(u8, usize, u64)> = pins
18365 .iter()18371 .iter()
18366 .map(|&(q, _, _)| {18372 .map(|&(q, _, _)| {