forge
Explore
Log in

Don't you dare go Hollow

Widen the own-size sweep

Browse files at this commit

1457eaab896abfad2073035469e09b26a2ea4ae5Ahmet Kaan GümüşParent: 0e70b27
  • test
    • widen the own-size sweep
    • close hp-mv dead code
Show full message
test(av1): widen the own-size sweep; close hp-mv dead code

64x56 now round-trips clean through ffmpeg (its historical wrong-V-plane
bug is closed by later MC/edge fixes) -- added alongside 854x480,
216x96, 192x120 to the existing own-size sweep, all green.

Dropped MvComponentCdfs::class0_hp/hp: this encoder always sets
allow_high_precision_mv=false, so the spec syntax that reads them
(mv_class0_hp/mv_hp) never fires -- genuinely dead, not staged.

cargo test -p ec-av1 --release: 129 passed, 0 failed, 4 ignored.
crates/ec-av1/src/cdf_state.rsmodified+4 -6
@@ -194,14 +194,14 @@ pub(crate) struct MvComponentCdfs {
194194 pub class0_bit: [u16; 3],
195195 /// The fractional part of a small-class magnitude, by its integer bit.
196196 pub class0_fr: [[u16; 5]; 2],
197- /// The half-pel bit of a small-class magnitude.
198- pub class0_hp: [u16; 3],
197+ // `class0_hp`/`hp` (spec's half-pel-bit CDFs) are never written: this
198+ // encoder always sets `allow_high_precision_mv = false`, so the syntax
199+ // that reads them (spec 5.9.32 `mv_class0_hp`/`mv_hp`) never fires --
200+ // dropped rather than kept dead. Add back if/when hp mode ships.
199201 /// One bit of an above-small-class magnitude, by its position.
200202 pub bit: [[u16; 3]; 10],
201203 /// The fractional part of an above-small-class magnitude.
202204 pub fr: [u16; 5],
203- /// The half-pel bit of an above-small-class magnitude.
204- pub hp: [u16; 3],
205205 /// The component's sign.
206206 pub sign: [u16; 3],
207207 }
@@ -212,10 +212,8 @@ impl MvComponentCdfs {
212212 class: cdf::MV_CLASS,
213213 class0_bit: cdf::MV_CLASS0_BIT,
214214 class0_fr: cdf::MV_CLASS0_FR,
215- class0_hp: cdf::MV_CLASS0_HP,
216215 bit: cdf::MV_BIT,
217216 fr: cdf::MV_FR,
218- hp: cdf::MV_HP,
219217 sign: cdf::MV_SIGN,
220218 }
221219 }
crates/ec-av1/src/encode.rsmodified+9 -1
@@ -2433,7 +2433,15 @@ mod tests {
24332433 // 854x480 is covered separately by
24342434 // `an_854x480_picture_round_trips_through_its_padding`, which its own
24352435 // doc comment explains was worth keeping as its own test.
2436- for &(width, height) in &[(1920usize, 1080usize), (640, 352), (1280, 720)] {
2436+ for &(width, height) in &[
2437+ (1920usize, 1080usize),
2438+ (640, 352),
2439+ (1280, 720),
2440+ (64, 56),
2441+ (854, 480),
2442+ (216, 96),
2443+ (192, 120),
2444+ ] {
24372445 let picture = test_card(width, height);
24382446 let encoded = encode_key_frame(&picture, 100, 0.5).unwrap();
24392447 assert_eq!(