A split-transform superblock-level strip published no TXFM_CONTEXT band
Browse files at this commit79abd1e668357c06c30c5f4c752925eefdbda491Parent: a43f3c7- fix
- a split-transform superblock-level strip published no TXFM_CONTEXT band
1 changed file +17 -1
- crates/ec-av1/src/decode.rs +17 -1
crates/ec-av1/src/decode.rsmodified+17 -1
| @@ -7542,11 +7542,18 @@ fn decode_intra_rect_in_inter( | |||
| 7542 | // The INTER frame's own `TXFM_CONTEXT` bands, not the key frame's | 7542 | // The INTER frame's own `TXFM_CONTEXT` bands, not the key frame's |
| 7543 | // deblock-grid approximation -- [`tx_size_context_txfm_rect`]. | 7543 | // deblock-grid approximation -- [`tx_size_context_txfm_rect`]. |
| 7544 | let ctx = tx_size_context_txfm_rect(neighbours, (mi_r, mi_c), bw.min(64), bh.min(64)); | 7544 | let ctx = tx_size_context_txfm_rect(neighbours, (mi_r, mi_c), bw.min(64), bh.min(64)); |
| 7545 | - match tx_cat { | 7545 | + let d = match tx_cat { |
| 7546 | 1 => dec.symbol(&mut cdfs.tx_size_cat1[ctx]), | 7546 | 1 => dec.symbol(&mut cdfs.tx_size_cat1[ctx]), |
| 7547 | 2 => dec.symbol(&mut cdfs.tx_size_cat2[ctx]), | 7547 | 2 => dec.symbol(&mut cdfs.tx_size_cat2[ctx]), |
| 7548 | _ => dec.symbol(&mut cdfs.tx_size_cat3[ctx]), | 7548 | _ => dec.symbol(&mut cdfs.tx_size_cat3[ctx]), |
| 7549 | + }; | ||
| 7550 | + if std::env::var_os("EC_TRACE_MODE_STEP").is_some() { | ||
| 7551 | + eprintln!( | ||
| 7552 | + "EC_ISTEP mi_row={mi_r} mi_col={mi_c} name=tx_depth val={d} ctx={ctx} cat={tx_cat} rng={}", | ||
| 7553 | + dec.debug_state().0 | ||
| 7554 | + ); | ||
| 7549 | } | 7555 | } |
| 7556 | + d | ||
| 7550 | } else { | 7557 | } else { |
| 7551 | 0 | 7558 | 0 |
| 7552 | }; | 7559 | }; |
| @@ -9584,6 +9591,15 @@ fn decode_block_rect64( | |||
| 9584 | let (puv_size, puv_colors) = | 9591 | let (puv_size, puv_colors) = |
| 9585 | palette_uv.as_ref().map_or((0, [0u16; 8]), |p| (p.size, p.u_colors)); | 9592 | palette_uv.as_ref().map_or((0, [0u16; 8]), |p| (p.size, p.u_colors)); |
| 9586 | neighbours.record_palette_uv_rect((mi_r, mi_c), bw, bh, puv_size, puv_colors); | 9593 | neighbours.record_palette_uv_rect((mi_r, mi_c), bw, bh, puv_size, puv_colors); |
| 9594 | + // lane-frame36 r2: `set_txfm_ctxs` runs for EVERY block and this early | ||
| 9595 | + // return skips the fn's own tail, so a SPLIT superblock-level strip | ||
| 9596 | + // published no TXFM_CONTEXT band and the next block read the row's init | ||
| 9597 | + // value 64 as its left transform height. Measured on the 10-bit | ||
| 9598 | + // 3840x1608 stream, decode-order frame 33: after the split 16x64 strip | ||
| 9599 | + // at mi(192,140) (`tx_depth=1` -> TX_16X32) the 32x64 block at | ||
| 9600 | + // mi(192,144) took `tx_size_cat3` row 2 where libaom takes row 1. The | ||
| 9601 | + // bands carry the SPLIT unit's size, not the block's. | ||
| 9602 | + txfm_partition_update_rect(neighbours, (mi_r, mi_c), (tx_w, tx_h), (bw, bh)); | ||
| 9587 | RECT_PARTITION_HITS.with(|c| c.set(c.get() + 1)); | 9603 | RECT_PARTITION_HITS.with(|c| c.set(c.get() + 1)); |
| 9588 | return Ok(()); | 9604 | return Ok(()); |
| 9589 | } | 9605 | } |