The per-tile search job arms its own order hints
Browse files at this commitaeaf6ba721d10a963086ebecc9578c14c3318c4aParent: 945005e- fix
- the per-tile search job arms its own order hints
1 changed file +5 -0
crates/ec-av1/src/encode.rsmodified+5 -0
| @@ -5537,6 +5537,11 @@ pub(crate) fn encode_inter_frame( | |||
| 5537 | let search_tile = |index: usize, | 5537 | let search_tile = |index: usize, |
| 5538 | fctx: &crate::decode::FrameCtx| | 5538 | fctx: &crate::decode::FrameCtx| |
| 5539 | -> Result<Vec<(usize, Quadrant)>> { | 5539 | -> Result<Vec<(usize, Quadrant)>> { |
| 5540 | + // Thread-local, and this job may be running on a `search_tiles` | ||
| 5541 | + // worker: `ref_distance`'s order-hint distance (the scaled motion | ||
| 5542 | + // search step) is read by the SEARCH, so every worker arms it or the | ||
| 5543 | + // tile's bits depend on the thread count. | ||
| 5544 | + crate::tile::arm_order_hints(seq.order_hint_bits, order_hint, order_hints); | ||
| 5540 | let rect = layout.rect(index); | 5545 | let rect = layout.rect(index); |
| 5541 | let mut luma = fresh_plane(&picture_y8, frame_width, frame_height, true_width, true_height); | 5546 | let mut luma = fresh_plane(&picture_y8, frame_width, frame_height, true_width, true_height); |
| 5542 | let mut chroma = [ | 5547 | let mut chroma = [ |