You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	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 Originally committed as revision 16859 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		
				
					committed by
					
						 Kostya Shishkov
						Kostya Shishkov
					
				
			
			
				
	
			
			
			
						parent
						
							3021a8a70b
						
					
				
				
					commit
					f92a6c66ed
				
			| @@ -1075,11 +1075,11 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) | ||||
| static int decode_entry_point(AVCodecContext *avctx, GetBitContext *gb) | ||||
| { | ||||
|     VC1Context *v = avctx->priv_data; | ||||
|     int i, blink, clentry; | ||||
|     int i; | ||||
|  | ||||
|     av_log(avctx, AV_LOG_DEBUG, "Entry point: %08X\n", show_bits_long(gb, 32)); | ||||
|     blink = get_bits1(gb); // broken link | ||||
|     clentry = get_bits1(gb); // closed entry | ||||
|     v->broken_link = get_bits1(gb); | ||||
|     v->closed_entry = get_bits1(gb); | ||||
|     v->panscanflag = get_bits1(gb); | ||||
|     v->refdist_flag = get_bits1(gb); | ||||
|     v->s.loop_filter = get_bits1(gb); | ||||
| @@ -1115,7 +1115,7 @@ static int decode_entry_point(AVCodecContext *avctx, GetBitContext *gb) | ||||
|         "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n" | ||||
|         "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n" | ||||
|         "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n", | ||||
|         blink, clentry, v->panscanflag, v->refdist_flag, v->s.loop_filter, | ||||
|         v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->s.loop_filter, | ||||
|         v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode); | ||||
|  | ||||
|     return 0; | ||||
| @@ -1139,8 +1139,8 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) | ||||
|  | ||||
|     v->bi_type = 0; | ||||
|     if(v->s.pict_type == FF_B_TYPE) { | ||||
|         v->bfraction = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); | ||||
|         v->bfraction = ff_vc1_bfraction_lut[v->bfraction]; | ||||
|         v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); | ||||
|         v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; | ||||
|         if(v->bfraction == 0) { | ||||
|             v->s.pict_type = FF_BI_TYPE; | ||||
|         } | ||||
| @@ -1381,8 +1381,8 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) | ||||
|         v->uvsamp = get_bits1(gb); | ||||
|     if(v->finterpflag) v->interpfrm = get_bits1(gb); | ||||
|     if(v->s.pict_type == FF_B_TYPE) { | ||||
|         v->bfraction = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); | ||||
|         v->bfraction = ff_vc1_bfraction_lut[v->bfraction]; | ||||
|         v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); | ||||
|         v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; | ||||
|         if(v->bfraction == 0) { | ||||
|             v->s.pict_type = FF_BI_TYPE; /* XXX: should not happen here */ | ||||
|         } | ||||
|   | ||||
| @@ -307,6 +307,9 @@ typedef struct VC1Context{ | ||||
|     int x8_type; | ||||
|  | ||||
|     uint32_t *cbp_base, *cbp; | ||||
|     uint8_t bfraction_lut_index;///< Index for BFRACTION value (see Table 40, reproduced into ff_vc1_bfraction_lut[]) | ||||
|     uint8_t broken_link;        ///< Broken link flag (BROKEN_LINK syntax element) | ||||
|     uint8_t closed_entry;       ///< Closed entry point flag (CLOSED_ENTRY syntax element) | ||||
| } VC1Context; | ||||
|  | ||||
| #endif /* AVCODEC_VC1_H */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user