Skip to content

decoder: check profile interop conformance ASAP - #5181

Open
wantehchang wants to merge 1 commit into
AOMediaCodec:mainfrom
wantehchang:decoder-check_profile_interop_conformance-asap
Open

decoder: check profile interop conformance ASAP#5181
wantehchang wants to merge 1 commit into
AOMediaCodec:mainfrom
wantehchang:decoder-check_profile_interop_conformance-asap

Conversation

@wantehchang

Copy link
Copy Markdown
Member

read_sequence_header_obu() should call
av2_check_profile_interop_conformance() as soon as it has read all the members of seq_params checked by that function. This allows the av2_max_level_bitrate() call in read_sequence_header_obu() to assume seq_params->seq_profile_idc is a supported profile.

Document the members of seq_params checked by
av2_check_profile_interop_conformance().

read_sequence_header_obu() should call
av2_check_profile_interop_conformance() as soon as it has read all the
members of seq_params checked by that function. This allows the
av2_max_level_bitrate() call in read_sequence_header_obu() to assume
seq_params->seq_profile_idc is a supported profile.

Document the members of seq_params checked by
av2_check_profile_interop_conformance().
Comment thread av2/common/annexA.c
} break;
default:
// Profile 5+ - reserved/unsupported
return 0;

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.

Note that av2_check_profile_interop_conformance() returns 0 if the profile is reserved/unsupported.

Comment thread av2/decoder/obu.c
if (!av2_check_profile_interop_conformance(seq_params, &cm->error, 1)) {
avm_internal_error(&cm->error, AVM_CODEC_UNSUP_BITSTREAM,
"Unsupported profile, bitdepth, chroma format or number "
"of embedded layers");

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.

I added "profile" to the error message because av2_check_profile_interop_conformance() also returns 0 if the profile is unsupported.

Comment thread av2/decoder/obu.c
int64_t seq_bitrate = av2_max_level_bitrate(
seq_params->seq_profile_idc, seq_params->seq_max_level_idx,
seq_params->seq_tier, seq_params->subsampling_x,
seq_params->subsampling_y, seq_params->monochrome);

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.

This av2_max_level_bitrate() call can now assume seq_params->seq_profile_idc is a supported profile. It won't need to check for unsupported profiles.

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.

2 participants