Skip to content

av2_set_seq_tile_info,av2_set_tile_info detect err - #5224

Open
wantehchang wants to merge 1 commit into
AOMediaCodec:mainfrom
wantehchang:port-read-tile-params-to-encoder
Open

av2_set_seq_tile_info,av2_set_tile_info detect err#5224
wantehchang wants to merge 1 commit into
AOMediaCodec:mainfrom
wantehchang:port-read-tile-params-to-encoder

Conversation

@wantehchang

@wantehchang wantehchang commented Aug 6, 2026

Copy link
Copy Markdown
Member

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.

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
wantehchang force-pushed the port-read-tile-params-to-encoder branch from 1caf50a to e1cb68b Compare August 6, 2026 18:27
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,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I replaced &cm->tiles with the local variable tiles (see line 1039).

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.

3 participants