libkvazaar: Set frame rate as a rational number
Updates libkvazaar to pass the exact frame rate to Kvazaar by setting the numerator and denominator separately instead of a single floating point number. The exact frame rate is needed for writing timing info to the bitstream. Requires Kvazaar version 0.8.1. Signed-off-by: Arttu Ylä-Outinen <arttu.yla-outinen@tut.fi> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
		
							parent
							
								
									7486418683
								
							
						
					
					
						commit
						472d488ebc
					
				
							
								
								
									
										2
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@ -4482,7 +4482,7 @@ enabled libgsm            && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
 | 
				
			|||||||
                                   check_lib "${gsm_hdr}" gsm_create -lgsm && break;
 | 
					                                   check_lib "${gsm_hdr}" gsm_create -lgsm && break;
 | 
				
			||||||
                               done || die "ERROR: libgsm not found"; }
 | 
					                               done || die "ERROR: libgsm not found"; }
 | 
				
			||||||
enabled libilbc           && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
 | 
					enabled libilbc           && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
 | 
				
			||||||
enabled libkvazaar        && require_pkg_config "kvazaar >= 0.7.1" kvazaar.h kvz_api_get
 | 
					enabled libkvazaar        && require_pkg_config "kvazaar >= 0.8.1" kvazaar.h kvz_api_get
 | 
				
			||||||
enabled libmfx            && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit
 | 
					enabled libmfx            && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit
 | 
				
			||||||
enabled libmp3lame        && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
 | 
					enabled libmp3lame        && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
 | 
				
			||||||
enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
 | 
					enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
 | 
				
			||||||
 | 
				
			|||||||
@ -80,8 +80,8 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx)
 | 
				
			|||||||
    cfg->width  = avctx->width;
 | 
					    cfg->width  = avctx->width;
 | 
				
			||||||
    cfg->height = avctx->height;
 | 
					    cfg->height = avctx->height;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    cfg->framerate =
 | 
					    cfg->framerate_num   = avctx->time_base.den;
 | 
				
			||||||
      avctx->time_base.den / (double)(avctx->time_base.num * avctx->ticks_per_frame);
 | 
					    cfg->framerate_denom = avctx->time_base.num * avctx->ticks_per_frame;
 | 
				
			||||||
    cfg->target_bitrate = avctx->bit_rate;
 | 
					    cfg->target_bitrate = avctx->bit_rate;
 | 
				
			||||||
    cfg->vui.sar_width  = avctx->sample_aspect_ratio.num;
 | 
					    cfg->vui.sar_width  = avctx->sample_aspect_ratio.num;
 | 
				
			||||||
    cfg->vui.sar_height = avctx->sample_aspect_ratio.den;
 | 
					    cfg->vui.sar_height = avctx->sample_aspect_ratio.den;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user