Mercurial > libavcodec.hg
comparison vc1.c @ 8692:48442253aac2 libavcodec
Record B-fraction index from frame header and two fields from entry point structure
into VC-1 context.
Patch by Gwenole Beauchesne
(gbeauchesne <whirlpool> splitted <dash> desktop <dit> com)
Thread [PATCH][VC-1] Record extra syntax elements for VA API support
author | kostya |
---|---|
date | Fri, 30 Jan 2009 17:15:08 +0000 |
parents | ed386fa1399e |
children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
8691:25aa5388fa97 | 8692:48442253aac2 |
---|---|
1073 } | 1073 } |
1074 | 1074 |
1075 static int decode_entry_point(AVCodecContext *avctx, GetBitContext *gb) | 1075 static int decode_entry_point(AVCodecContext *avctx, GetBitContext *gb) |
1076 { | 1076 { |
1077 VC1Context *v = avctx->priv_data; | 1077 VC1Context *v = avctx->priv_data; |
1078 int i, blink, clentry; | 1078 int i; |
1079 | 1079 |
1080 av_log(avctx, AV_LOG_DEBUG, "Entry point: %08X\n", show_bits_long(gb, 32)); | 1080 av_log(avctx, AV_LOG_DEBUG, "Entry point: %08X\n", show_bits_long(gb, 32)); |
1081 blink = get_bits1(gb); // broken link | 1081 v->broken_link = get_bits1(gb); |
1082 clentry = get_bits1(gb); // closed entry | 1082 v->closed_entry = get_bits1(gb); |
1083 v->panscanflag = get_bits1(gb); | 1083 v->panscanflag = get_bits1(gb); |
1084 v->refdist_flag = get_bits1(gb); | 1084 v->refdist_flag = get_bits1(gb); |
1085 v->s.loop_filter = get_bits1(gb); | 1085 v->s.loop_filter = get_bits1(gb); |
1086 v->fastuvmc = get_bits1(gb); | 1086 v->fastuvmc = get_bits1(gb); |
1087 v->extended_mv = get_bits1(gb); | 1087 v->extended_mv = get_bits1(gb); |
1113 | 1113 |
1114 av_log(avctx, AV_LOG_DEBUG, "Entry point info:\n" | 1114 av_log(avctx, AV_LOG_DEBUG, "Entry point info:\n" |
1115 "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n" | 1115 "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n" |
1116 "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n" | 1116 "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n" |
1117 "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n", | 1117 "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n", |
1118 blink, clentry, v->panscanflag, v->refdist_flag, v->s.loop_filter, | 1118 v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->s.loop_filter, |
1119 v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode); | 1119 v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode); |
1120 | 1120 |
1121 return 0; | 1121 return 0; |
1122 } | 1122 } |
1123 | 1123 |
1137 } else v->s.pict_type = FF_P_TYPE; | 1137 } else v->s.pict_type = FF_P_TYPE; |
1138 } else v->s.pict_type = v->s.pict_type ? FF_P_TYPE : FF_I_TYPE; | 1138 } else v->s.pict_type = v->s.pict_type ? FF_P_TYPE : FF_I_TYPE; |
1139 | 1139 |
1140 v->bi_type = 0; | 1140 v->bi_type = 0; |
1141 if(v->s.pict_type == FF_B_TYPE) { | 1141 if(v->s.pict_type == FF_B_TYPE) { |
1142 v->bfraction = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); | 1142 v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); |
1143 v->bfraction = ff_vc1_bfraction_lut[v->bfraction]; | 1143 v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; |
1144 if(v->bfraction == 0) { | 1144 if(v->bfraction == 0) { |
1145 v->s.pict_type = FF_BI_TYPE; | 1145 v->s.pict_type = FF_BI_TYPE; |
1146 } | 1146 } |
1147 } | 1147 } |
1148 if(v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE) | 1148 if(v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE) |
1379 v->rnd = get_bits1(gb); | 1379 v->rnd = get_bits1(gb); |
1380 if(v->interlace) | 1380 if(v->interlace) |
1381 v->uvsamp = get_bits1(gb); | 1381 v->uvsamp = get_bits1(gb); |
1382 if(v->finterpflag) v->interpfrm = get_bits1(gb); | 1382 if(v->finterpflag) v->interpfrm = get_bits1(gb); |
1383 if(v->s.pict_type == FF_B_TYPE) { | 1383 if(v->s.pict_type == FF_B_TYPE) { |
1384 v->bfraction = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); | 1384 v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); |
1385 v->bfraction = ff_vc1_bfraction_lut[v->bfraction]; | 1385 v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; |
1386 if(v->bfraction == 0) { | 1386 if(v->bfraction == 0) { |
1387 v->s.pict_type = FF_BI_TYPE; /* XXX: should not happen here */ | 1387 v->s.pict_type = FF_BI_TYPE; /* XXX: should not happen here */ |
1388 } | 1388 } |
1389 } | 1389 } |
1390 pqindex = get_bits(gb, 5); | 1390 pqindex = get_bits(gb, 5); |