An intra transform unit no longer clones its coefficient grid
Browse files at this commitad3e7b0591384eb0d785e8296b947c5c1930b54dParent: 8a8b3ca- perf
- an intra transform unit no longer clones its coefficient grid
1 changed file +6 -13
- crates/ec-av1/src/decode.rs +6 -13
crates/ec-av1/src/decode.rsmodified+6 -13
| @@ -13416,19 +13416,12 @@ fn read_plane( | ||
| 13416 | 13416 | filter_intra, |
| 13417 | 13417 | smooth_neighbor, fctx, |
| 13418 | 13418 | ); |
| 13419 | - Ok(if tx_side == side { | |
| 13420 | - residual_grid_placeholder(&levels, side) | |
| 13421 | - } else { | |
| 13422 | - levels | |
| 13423 | - }) | |
| 13424 | -} | |
| 13425 | - | |
| 13426 | -/// `record`'s neighbour state only reads whether *the coded grid* (not the | |
| 13427 | -/// residual) has nonzero entries, so the levels this function already built | |
| 13428 | -/// are what it wants back; this helper exists only to name that clearly at | |
| 13429 | -/// the one call site where `tx_side == side`. | |
| 13430 | -fn residual_grid_placeholder(levels: &[i32], _tx_side: usize) -> Vec<i32> { | |
| 13431 | - levels.to_vec() | |
| 13419 | + // `record`'s neighbour state only reads whether *the coded grid* (not the | |
| 13420 | + // residual) has nonzero entries, so the levels this function already | |
| 13421 | + // built are what it wants back -- both arms of the old `tx_side == side` | |
| 13422 | + // branch returned exactly that, one of them through a full `to_vec` copy | |
| 13423 | + // of the grid per intra transform unit (lane-coefbuf). | |
| 13424 | + Ok(levels) | |
| 13432 | 13425 | } |
| 13433 | 13426 | |
| 13434 | 13427 | /// Decodes one whole-block coded superblock/quadrant/leaf: its mode, then its |