comparison wmv2.c @ 5193:19ed7e6ef927 libavcodec

Identify the loop_filter flag as such and remove the unused variables in the context.
author iive
date Wed, 27 Jun 2007 14:27:47 +0000
parents b215d5a5fa9a
children 2b72f9bc4f06
comparison
equal deleted inserted replaced
5192:3bfa0f33c854 5193:19ed7e6ef927
34 34
35 typedef struct Wmv2Context{ 35 typedef struct Wmv2Context{
36 MpegEncContext s; 36 MpegEncContext s;
37 int j_type_bit; 37 int j_type_bit;
38 int j_type; 38 int j_type;
39 int flag3;
40 int flag63;
41 int abt_flag; 39 int abt_flag;
42 int abt_type; 40 int abt_type;
43 int abt_type_table[6]; 41 int abt_type_table[6];
44 int per_mb_abt; 42 int per_mb_abt;
45 int per_block_abt; 43 int per_block_abt;
72 70
73 put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); //yes 29.97 -> 29 71 put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); //yes 29.97 -> 29
74 put_bits(&pb, 11, FFMIN(s->bit_rate/1024, 2047)); 72 put_bits(&pb, 11, FFMIN(s->bit_rate/1024, 2047));
75 73
76 put_bits(&pb, 1, w->mspel_bit=1); 74 put_bits(&pb, 1, w->mspel_bit=1);
77 put_bits(&pb, 1, w->flag3=1); 75 put_bits(&pb, 1, s->loop_filter);
78 put_bits(&pb, 1, w->abt_flag=1); 76 put_bits(&pb, 1, w->abt_flag=1);
79 put_bits(&pb, 1, w->j_type_bit=1); 77 put_bits(&pb, 1, w->j_type_bit=1);
80 put_bits(&pb, 1, w->top_left_mv_flag=0); 78 put_bits(&pb, 1, w->top_left_mv_flag=0);
81 put_bits(&pb, 1, w->per_mb_rl_bit=1); 79 put_bits(&pb, 1, w->per_mb_rl_bit=1);
82 put_bits(&pb, 3, code=1); 80 put_bits(&pb, 3, code=1);
327 init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8); 325 init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size*8);
328 326
329 fps = get_bits(&gb, 5); 327 fps = get_bits(&gb, 5);
330 s->bit_rate = get_bits(&gb, 11)*1024; 328 s->bit_rate = get_bits(&gb, 11)*1024;
331 w->mspel_bit = get_bits1(&gb); 329 w->mspel_bit = get_bits1(&gb);
332 w->flag3 = get_bits1(&gb); 330 s->loop_filter = get_bits1(&gb);
333 w->abt_flag = get_bits1(&gb); 331 w->abt_flag = get_bits1(&gb);
334 w->j_type_bit = get_bits1(&gb); 332 w->j_type_bit = get_bits1(&gb);
335 w->top_left_mv_flag= get_bits1(&gb); 333 w->top_left_mv_flag= get_bits1(&gb);
336 w->per_mb_rl_bit = get_bits1(&gb); 334 w->per_mb_rl_bit = get_bits1(&gb);
337 code = get_bits(&gb, 3); 335 code = get_bits(&gb, 3);
339 if(code==0) return -1; 337 if(code==0) return -1;
340 338
341 s->slice_height = s->mb_height / code; 339 s->slice_height = s->mb_height / code;
342 340
343 if(s->avctx->debug&FF_DEBUG_PICT_INFO){ 341 if(s->avctx->debug&FF_DEBUG_PICT_INFO){
344 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", 342 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",
345 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, 343 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,
346 code); 344 code);
347 } 345 }
348 return 0; 346 return 0;
349 } 347 }
350 348