av2_set_seq_tile_info,av2_set_tile_info detect err - #5224
Open
wantehchang wants to merge 1 commit into
Open
Conversation
Port Yannis's PR AOMediaCodec#5187 to the encoder, part 2. Detect errors in av2_set_seq_tile_info() and av2_set_tile_info() with assertions. These two functions return void, and although they have or can be given access to cm->error, some of their callers have not called setjmp(), so they can't call avm_internal_error(). Do not recalculate sb_cols and sb_rows in av2_set_tile_info(). They are already calculated by the av2_get_tile_limits() call and saved in tiles->sb_cols and tiles->sb_rows. Although av2_set_seq_tile_info() and av2_set_tile_info() are quite similar, they are different enough that it is hard to merge them into a single function.
wantehchang
force-pushed
the
port-read-tile-params-to-encoder
branch
from
August 6, 2026 18:27
1caf50a to
e1cb68b
Compare
wantehchang
commented
Aug 6, 2026
| int i, start_sb; | ||
|
|
||
| av2_get_tile_limits(&cm->tiles, mi_params->mi_rows, mi_params->mi_cols, | ||
| av2_get_tile_limits(tiles, mi_params->mi_rows, mi_params->mi_cols, |
Member
Author
There was a problem hiding this comment.
Here I replaced &cm->tiles with the local variable tiles (see line 1039).
y-guyon
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port Yannis's PR #5187 to the encoder, part 2.
Detect errors in av2_set_seq_tile_info() and av2_set_tile_info() with assertions. These two functions return void, and although they have or can be given access to cm->error, some of their callers have not called setjmp(), so they can't call avm_internal_error().
Do not recalculate sb_cols and sb_rows in av2_set_tile_info(). They are already calculated by the av2_get_tile_limits() call and saved in tiles->sb_cols and tiles->sb_rows.
Although av2_set_seq_tile_info() and av2_set_tile_info() are quite similar, they are different enough that it is hard to merge them into a single function.