From a8ff69ce2bad1c4bb043e88ea35f5ab5691d4f3c Mon Sep 17 00:00:00 2001 From: Ivan Kalvachev Date: Wed, 27 Jun 2007 14:27:47 +0000 Subject: [PATCH] Identify the loop_filter flag as such and remove the unused variables in the context. Originally committed as revision 9447 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmv2.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 259b754a95..35eab80020 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -36,8 +36,6 @@ typedef struct Wmv2Context{ MpegEncContext s; int j_type_bit; int j_type; - int flag3; - int flag63; int abt_flag; int abt_type; int abt_type_table[6]; @@ -74,7 +72,7 @@ static int encode_ext_header(Wmv2Context *w){ put_bits(&pb, 11, FFMIN(s->bit_rate/1024, 2047)); put_bits(&pb, 1, w->mspel_bit=1); - put_bits(&pb, 1, w->flag3=1); + put_bits(&pb, 1, s->loop_filter); put_bits(&pb, 1, w->abt_flag=1); put_bits(&pb, 1, w->j_type_bit=1); put_bits(&pb, 1, w->top_left_mv_flag=0); @@ -329,7 +327,7 @@ static int decode_ext_header(Wmv2Context *w){ fps = get_bits(&gb, 5); s->bit_rate = get_bits(&gb, 11)*1024; w->mspel_bit = get_bits1(&gb); - w->flag3 = get_bits1(&gb); + s->loop_filter = get_bits1(&gb); w->abt_flag = get_bits1(&gb); w->j_type_bit = get_bits1(&gb); w->top_left_mv_flag= get_bits1(&gb); @@ -341,8 +339,8 @@ static int decode_ext_header(Wmv2Context *w){ s->slice_height = s->mb_height / code; if(s->avctx->debug&FF_DEBUG_PICT_INFO){ - av_log(s->avctx, AV_LOG_DEBUG, "fps:%d, br:%d, qpbit:%d, abt_flag:%d, j_type_bit:%d, tl_mv_flag:%d, mbrl_bit:%d, code:%d, flag3:%d, slices:%d\n", - fps, s->bit_rate, w->mspel_bit, w->abt_flag, w->j_type_bit, w->top_left_mv_flag, w->per_mb_rl_bit, code, w->flag3, + av_log(s->avctx, AV_LOG_DEBUG, "fps:%d, br:%d, qpbit:%d, abt_flag:%d, j_type_bit:%d, tl_mv_flag:%d, mbrl_bit:%d, code:%d, loop_filter:%d, slices:%d\n", + fps, s->bit_rate, w->mspel_bit, w->abt_flag, w->j_type_bit, w->top_left_mv_flag, w->per_mb_rl_bit, code, s->loop_filter, code); } return 0;