Mercurial > libavcodec.hg
comparison vc1.c @ 5519:b790f8c0ee24 libavcodec
use skip_bits where appropriate
author | alex |
---|---|
date | Thu, 09 Aug 2007 01:08:28 +0000 |
parents | 9f8219a3b86f |
children | d92fa6e5fc8c |
comparison
equal
deleted
inserted
replaced
5518:d2ef80f5fd7e | 5519:b790f8c0ee24 |
---|---|
911 v->s.avctx->height = v->s.avctx->coded_height; | 911 v->s.avctx->height = v->s.avctx->coded_height; |
912 v->broadcast = get_bits1(gb); | 912 v->broadcast = get_bits1(gb); |
913 v->interlace = get_bits1(gb); | 913 v->interlace = get_bits1(gb); |
914 v->tfcntrflag = get_bits1(gb); | 914 v->tfcntrflag = get_bits1(gb); |
915 v->finterpflag = get_bits1(gb); | 915 v->finterpflag = get_bits1(gb); |
916 get_bits1(gb); // reserved | 916 skip_bits1(gb); // reserved |
917 | 917 |
918 v->s.h_edge_pos = v->s.avctx->coded_width; | 918 v->s.h_edge_pos = v->s.avctx->coded_width; |
919 v->s.v_edge_pos = v->s.avctx->coded_height; | 919 v->s.v_edge_pos = v->s.avctx->coded_height; |
920 | 920 |
921 av_log(v->s.avctx, AV_LOG_DEBUG, | 921 av_log(v->s.avctx, AV_LOG_DEBUG, |
973 | 973 |
974 v->hrd_param_flag = get_bits1(gb); | 974 v->hrd_param_flag = get_bits1(gb); |
975 if(v->hrd_param_flag) { | 975 if(v->hrd_param_flag) { |
976 int i; | 976 int i; |
977 v->hrd_num_leaky_buckets = get_bits(gb, 5); | 977 v->hrd_num_leaky_buckets = get_bits(gb, 5); |
978 get_bits(gb, 4); //bitrate exponent | 978 skip_bits(gb, 4); //bitrate exponent |
979 get_bits(gb, 4); //buffer size exponent | 979 skip_bits(gb, 4); //buffer size exponent |
980 for(i = 0; i < v->hrd_num_leaky_buckets; i++) { | 980 for(i = 0; i < v->hrd_num_leaky_buckets; i++) { |
981 get_bits(gb, 16); //hrd_rate[n] | 981 skip_bits(gb, 16); //hrd_rate[n] |
982 get_bits(gb, 16); //hrd_buffer[n] | 982 skip_bits(gb, 16); //hrd_buffer[n] |
983 } | 983 } |
984 } | 984 } |
985 return 0; | 985 return 0; |
986 } | 986 } |
987 | 987 |
1003 v->overlap = get_bits1(gb); | 1003 v->overlap = get_bits1(gb); |
1004 v->quantizer_mode = get_bits(gb, 2); | 1004 v->quantizer_mode = get_bits(gb, 2); |
1005 | 1005 |
1006 if(v->hrd_param_flag){ | 1006 if(v->hrd_param_flag){ |
1007 for(i = 0; i < v->hrd_num_leaky_buckets; i++) { | 1007 for(i = 0; i < v->hrd_num_leaky_buckets; i++) { |
1008 get_bits(gb, 8); //hrd_full[n] | 1008 skip_bits(gb, 8); //hrd_full[n] |
1009 } | 1009 } |
1010 } | 1010 } |
1011 | 1011 |
1012 if(get_bits1(gb)){ | 1012 if(get_bits1(gb)){ |
1013 avctx->coded_width = (get_bits(gb, 12)+1)<<1; | 1013 avctx->coded_width = (get_bits(gb, 12)+1)<<1; |
1057 if(v->bfraction == 0) { | 1057 if(v->bfraction == 0) { |
1058 v->s.pict_type = BI_TYPE; | 1058 v->s.pict_type = BI_TYPE; |
1059 } | 1059 } |
1060 } | 1060 } |
1061 if(v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) | 1061 if(v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) |
1062 get_bits(gb, 7); // skip buffer fullness | 1062 skip_bits(gb, 7); // skip buffer fullness |
1063 | 1063 |
1064 /* calculate RND */ | 1064 /* calculate RND */ |
1065 if(v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) | 1065 if(v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) |
1066 v->rnd = 1; | 1066 v->rnd = 1; |
1067 if(v->s.pict_type == P_TYPE) | 1067 if(v->s.pict_type == P_TYPE) |
1276 v->s.pict_type = P_TYPE; // skipped pic | 1276 v->s.pict_type = P_TYPE; // skipped pic |
1277 v->p_frame_skipped = 1; | 1277 v->p_frame_skipped = 1; |
1278 return 0; | 1278 return 0; |
1279 } | 1279 } |
1280 if(v->tfcntrflag) | 1280 if(v->tfcntrflag) |
1281 get_bits(gb, 8); | 1281 skip_bits(gb, 8); |
1282 if(v->broadcast) { | 1282 if(v->broadcast) { |
1283 if(!v->interlace || v->psf) { | 1283 if(!v->interlace || v->psf) { |
1284 v->rptfrm = get_bits(gb, 2); | 1284 v->rptfrm = get_bits(gb, 2); |
1285 } else { | 1285 } else { |
1286 v->tff = get_bits1(gb); | 1286 v->tff = get_bits1(gb); |