forge
Explore
Log in

Don't you dare go Hollow

The lookahead drain witness pins TPL_FUT=0

Browse files at this commit

a500a02c87f09852c5fdb64386cabb7b38a9b09dAhmet Kaan GümüşParent: 87c6dbd
  • fix
    • the lookahead drain witness pins TPL_FUT=0
Show full message
fix(av1): the lookahead drain witness pins TPL_FUT=0

WIN=11 also reads the buffered next group, so the identity arm was
testing the lambda window. Drain, order, and the filter-move arm stay.
crates/ec-av1/src/encoder.rsmodified+11 -5
@@ -3755,11 +3755,15 @@ mod tests {
3755 /// (`Av1Encoder::drain_pending` hands the closed group to `ready` and3755 /// (`Av1Encoder::drain_pending` hands the closed group to `ready` and
3756 /// codes the group before it) must not change WHAT is coded:3756 /// codes the group before it) must not change WHAT is coded:
3757 ///3757 ///
3758- /// * with the future half of the filter window empty the stream is byte3758+ /// * with the future half of the filter window empty AND the top ARF's
3759- /// for byte the one the encoder coded without a lookahead, at every3759+ /// temporal lambda window pinned to the past (`TPL_FUT=0`) the stream
3760- /// run length -- 1 picture (no hidden frame at all), 7 (a short group),3760+ /// is byte for byte the one the encoder coded without a lookahead, at
3761- /// 8 (exactly `mini_gop`), 9 (a group plus a tail) and 17 -- and at a3761+ /// every run length -- 1 picture (no hidden frame at all), 7 (a short
3762- /// GOP short enough (8) that key frames drain the buffer mid-run;3762+ /// group), 8 (exactly `mini_gop`), 9 (a group plus a tail) and 17 --
3763+ /// and at a GOP short enough (8) that key frames drain the buffer
3764+ /// mid-run. lane-tplhalf's WIN=11 default also reads that buffer, so
3765+ /// the identity arm pins the lambda window off or this witness tests
3766+ /// a different lever;
3763 /// * every run decodes to exactly its picture count through OUR decoder3767 /// * every run decodes to exactly its picture count through OUR decoder
3764 /// and through ffmpeg, sample-exact between the two, so the flush and3768 /// and through ffmpeg, sample-exact between the two, so the flush and
3765 /// the `show_existing_frame` order survive the delay;3769 /// the `show_existing_frame` order survive the delay;
@@ -3781,6 +3785,7 @@ mod tests {
3781 let run = |n: usize, gop: usize, on: bool, fut: usize| -> (Vec<u8>, Vec<Packet>) {3785 let run = |n: usize, gop: usize, on: bool, fut: usize| -> (Vec<u8>, Vec<Packet>) {
3782 set_lookahead(Some(on));3786 set_lookahead(Some(on));
3783 set_arf_tf_future(Some(fut));3787 set_arf_tf_future(Some(fut));
3788+ set_tpl_fut(Some(0));
3784 let config = EncoderConfig {3789 let config = EncoderConfig {
3785 // FINE (not the 120 the other facade tests use): at a coarse3790 // FINE (not the 120 the other facade tests use): at a coarse
3786 // quantizer this fixture's ARF codes almost pure skip (173791 // quantizer this fixture's ARF codes almost pure skip (17
@@ -3849,6 +3854,7 @@ mod tests {
3849 let (symmetric, _) = run(17, 32, true, 1);3854 let (symmetric, _) = run(17, 32, true, 1);
3850 set_lookahead(None);3855 set_lookahead(None);
3851 set_arf_tf_future(None);3856 set_arf_tf_future(None);
3857+ set_tpl_fut(None);
3852 assert!(3858 assert!(
3853 base != symmetric,3859 base != symmetric,
3854 "one display-future neighbour left the top ARF's filter unchanged \3860 "one display-future neighbour left the top ARF's filter unchanged \