Skip to content

Fix race on reading intrabc blocks in above wavefront rows - #5572

Open
mrt-amd wants to merge 1 commit into
AOMediaCodec:mainfrom
mrt-amd:fix-intrabc-race
Open

mrt-amd wants to merge 1 commit into
AOMediaCodec:mainfrom
mrt-amd:fix-intrabc-race

Conversation

@mrt-amd

@mrt-amd mrt-amd commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Adds extra synchronisation delay to ensure that all above blocks which are valid targets for global intrabc are already available when the current block encode runs.

Fixes #5571.

This can decrease speed noticeably on row-mt intra-only encodes with global intrabc enabled as row threads don't parallelise as well (modes not using it, including inter frames, are not affected).

I think the current proposal is the best solution, though there are alternatives with different tradeoffs:

  • Disallow global intrabc vectors from pointing into the unavailable region. This is directly a small quality loss.
  • Synchronise only if required. Wait at the point where the encoder wants to look at a vector into a not-yet-coded block, which would be either when the hash search finds a match there or when the regular search enter that region. Probably this happens less and the impact might therefore be lower, but implementation looks a lot more complex.

Adds extra synchronisation delay to ensure that all above blocks which
are valid targets for global intrabc are already available when the
current block encode runs.

Fixes AOMediaCodec#5571.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

avmenc intrabc may use not-yet-coded blocks in row-mt mode

2 participants