wip(interp3): compound 8x8 leaf ref-frame ctx
Browse files at this commitd1e3384a730e77fbddd5c0492ddf24b9499bc7d2Parent: f16facf1 changed file +13 -10
- crates/ec-av1/src/decode.rs +13 -10
crates/ec-av1/src/decode.rsmodified+13 -10
| @@ -19147,21 +19147,24 @@ fn decode_inter_block8( | ||
| 19147 | 19147 | let (ref0, ref1) = if skip_mode { |
| 19148 | 19148 | (skip_mode_frame[0] as i8, skip_mode_frame[1] as i8) |
| 19149 | 19149 | } else { |
| 19150 | + // lane-interp3 r2 (class twin-functions-drift): this leaf | |
| 19151 | + // passed a hard-coded `LAST_FRAME` for every inter | |
| 19152 | + // neighbour -- the old "coarse LAST_FRAME-or-intra" | |
| 19153 | + // approximation -- while the side bands have carried the | |
| 19154 | + // neighbour's REAL reference per mi since lane-inter8 r2. | |
| 19155 | + // Every `av1_collect_neighbors_ref_counts` vote below | |
| 19156 | + // (`uni_comp_ref_p1`, `comp_ref`, `comp_bwdref`, ...) was | |
| 19157 | + // therefore taken off the wrong CDF row. Same two args | |
| 19158 | + // [`decode_inter_block`]'s own compound arm passes | |
| 19159 | + // (`-1` when the band is unavailable is start_tile's / | |
| 19160 | + // start_row's own reset value, so no `has_above` guard). | |
| 19150 | 19161 | read_compound_ref_frames( |
| 19151 | 19162 | dec, |
| 19152 | 19163 | cdfs, |
| 19153 | 19164 | above_nbr, |
| 19154 | 19165 | left_nbr, |
| 19155 | - if has_above && above_inter { | |
| 19156 | - LAST_FRAME | |
| 19157 | - } else { | |
| 19158 | - -1 | |
| 19159 | - }, | |
| 19160 | - if has_left && left_inter { | |
| 19161 | - LAST_FRAME | |
| 19162 | - } else { | |
| 19163 | - -1 | |
| 19164 | - }, | |
| 19166 | + above_ref0, | |
| 19167 | + left_ref0, | |
| 19165 | 19168 | ) |
| 19166 | 19169 | }; |
| 19167 | 19170 | leaf_refs = (ref0, Some(ref1)); |