Mask non-pixel-exact COMPOUND_REFERENCE plain-average blend — r16
Browse files at this commit232e604388a7d46f614d58f65f96356f776c0819Parent: d9c1c2d- fix
- mask non-pixel-exact COMPOUND_REFERENCE plain-average blend — r16
1 changed file +29 -0
- crates/ec-av1/src/decode.rs +29 -0
crates/ec-av1/src/decode.rsmodified+29 -0
| @@ -4445,6 +4445,25 @@ fn decode_inter_block( | |||
| 4445 | weighted/simple-average combine only, lane-av1comp", | 4445 | weighted/simple-average combine only, lane-av1comp", |
| 4446 | )); | 4446 | )); |
| 4447 | } | 4447 | } |
| 4448 | + // corner-cut (lane-av1comp r16): a real aomenc stream (fixtures/ | ||
| 4449 | + // av1comp-r16-compound-mismatch.obu, seed 42) proved | ||
| 4450 | + // predict_compound_intermediate/combine_compound wrong by up to | ||
| 4451 | + // 4/255 in a ~30x32 patch of one 32x32 quadrant, spilling a few | ||
| 4452 | + // pixels into neighbours (loop-filter-shaped, not a desync -- | ||
| 4453 | + // DRL/assign_compound_mv/dist_wtd_comp_weight_assign all cross- | ||
| 4454 | + // checked bit-for-bit against libaom decodemv.c/reconinter.c and | ||
| 4455 | + // matched). Root cause not yet isolated; refuse by name rather | ||
| 4456 | + // than ship a non-pixel-exact compound blend. Ceiling: r13/r14's | ||
| 4457 | + // MC plumbing above this line stays -- only the plain-average | ||
| 4458 | + // reconstruct is masked off again. Upgrade: bisect against the | ||
| 4459 | + // pinned fixture (frame 1, rows 16-31 cols 32-63). | ||
| 4460 | + return Err(unsupported( | ||
| 4461 | + "a COMPOUND_REFERENCE block using the plain/distance-weighted \ | ||
| 4462 | + average blend (comp_group_idx == 0) -- proven non-pixel-exact \ | ||
| 4463 | + against a real aomenc stream (lane-av1comp r16, see \ | ||
| 4464 | + av1comp-r16-compound-mismatch.obu)", | ||
| 4465 | + )); | ||
| 4466 | + #[allow(unreachable_code)] | ||
| 4448 | let (fwd_offset, bck_offset, compound_idx) = if !skip_mode && enable_jnt_comp { | 4467 | let (fwd_offset, bck_offset, compound_idx) = if !skip_mode && enable_jnt_comp { |
| 4449 | let idx_ctx = get_comp_index_context( | 4468 | let idx_ctx = get_comp_index_context( |
| 4450 | neighbours, | 4469 | neighbours, |
| @@ -5277,6 +5296,16 @@ fn decode_inter_block8( | |||
| 5277 | weighted/simple-average combine only, lane-av1comp", | 5296 | weighted/simple-average combine only, lane-av1comp", |
| 5278 | )); | 5297 | )); |
| 5279 | } | 5298 | } |
| 5299 | + // corner-cut (lane-av1comp r16): same non-pixel-exact plain- | ||
| 5300 | + // average defect as the 16x16 leaf's own mask above -- see | ||
| 5301 | + // that comment. | ||
| 5302 | + return Err(unsupported( | ||
| 5303 | + "a COMPOUND_REFERENCE 8x8 leaf using the plain/distance-weighted \ | ||
| 5304 | + average blend (comp_group_idx == 0) -- proven non-pixel-exact \ | ||
| 5305 | + against a real aomenc stream (lane-av1comp r16, see \ | ||
| 5306 | + av1comp-r16-compound-mismatch.obu)", | ||
| 5307 | + )); | ||
| 5308 | + #[allow(unreachable_code)] | ||
| 5280 | let (fwd_offset, bck_offset, compound_idx) = if !skip_mode && enable_jnt_comp { | 5309 | let (fwd_offset, bck_offset, compound_idx) = if !skip_mode && enable_jnt_comp { |
| 5281 | let idx_ctx = get_comp_index_context( | 5310 | let idx_ctx = get_comp_index_context( |
| 5282 | neighbours, | 5311 | neighbours, |