Commit b9c652a7 authored by Sebastien Alaiwan's avatar Sebastien Alaiwan Committed by sebastien alaiwan

Deduplicate profile check

Change-Id: I5dbccf4d39f0ec5d93300913dd0a37640eb2a444
parent 15ad8e4e
......@@ -4049,15 +4049,13 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
"Invalid frame marker");
cm->profile = av1_read_profile(rb);
#if CONFIG_HIGHBITDEPTH
if (cm->profile >= MAX_PROFILES)
aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Unsupported bitstream profile");
#else
if (cm->profile >= PROFILE_2)
const BITSTREAM_PROFILE MAX_SUPPORTED_PROFILE =
CONFIG_HIGHBITDEPTH ? MAX_PROFILES : PROFILE_2;
if (cm->profile >= MAX_SUPPORTED_PROFILE)
aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Unsupported bitstream profile");
#endif
cm->show_existing_frame = aom_rb_read_bit(rb);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment