1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

[Cosmetics] Remove if(profile < PROFILE_ADVANCED) from decode_sequence_header()

as it's always true and reindent code inside by the way.

Originally committed as revision 6209 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Kostya Shishkov 2006-09-09 11:28:02 +00:00
parent d1d28ddf99
commit 6cf6d0ec1a

View File

@ -1164,8 +1164,6 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb)
"LOOPFILTER shell not be enabled in simple profile\n");
}
if (v->profile < PROFILE_ADVANCED)
{
v->res_x8 = get_bits(gb, 1); //reserved
if (v->res_x8)
{
@ -1181,7 +1179,6 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb)
"0 for reserved RES_FASTTX is forbidden\n");
//return -1;
}
}
v->fastuvmc = get_bits(gb, 1); //common
if (!v->profile && !v->fastuvmc)
@ -1200,8 +1197,6 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb)
v->dquant = get_bits(gb, 2); //common
v->vstransform = get_bits(gb, 1); //common
if (v->profile < PROFILE_ADVANCED)
{
v->res_transtab = get_bits(gb, 1);
if (v->res_transtab)
{
@ -1209,12 +1204,9 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb)
"1 for reserved RES_TRANSTAB is forbidden\n");
return -1;
}
}
v->overlap = get_bits(gb, 1); //common
if (v->profile < PROFILE_ADVANCED)
{
v->s.resync_marker = get_bits(gb, 1);
v->rangered = get_bits(gb, 1);
if (v->rangered && v->profile == PROFILE_SIMPLE)
@ -1222,13 +1214,10 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb)
av_log(avctx, AV_LOG_INFO,
"RANGERED should be set to 0 in simple profile\n");
}
}
v->s.max_b_frames = avctx->max_b_frames = get_bits(gb, 3); //common
v->quantizer_mode = get_bits(gb, 2); //common
if (v->profile < PROFILE_ADVANCED)
{
v->finterpflag = get_bits(gb, 1); //common
v->res_rtm_flag = get_bits(gb, 1); //reserved
if (!v->res_rtm_flag)
@ -1250,8 +1239,6 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb)
v->dquant, v->quantizer_mode, avctx->max_b_frames
);
return 0;
}
return -1;
}
static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)