Commit 7688c7c6 authored by François Cartegnie's avatar François Cartegnie 🤞

packetizer: hevc: only use prematched vps

stop requiring aligned vps list
parent 5f3ca90a
......@@ -463,7 +463,7 @@ static void ActivateSets(decoder_t *p_dec,
if(!p_dec->fmt_in.video.i_frame_rate || !p_dec->fmt_in.video.i_frame_rate_base)
{
unsigned num, den;
if(hevc_get_frame_rate( p_sps, p_dec->p_sys->rgi_p_decvps, &num, &den ))
if(hevc_get_frame_rate( p_sps, p_vps, &num, &den ))
{
p_dec->fmt_out.video.i_frame_rate = num;
p_dec->fmt_out.video.i_frame_rate_base = den;
......
......@@ -1081,7 +1081,7 @@ static bool hevc_get_picture_CtbsYsize( const hevc_sequence_parameter_set_t *p_s
}
bool hevc_get_frame_rate( const hevc_sequence_parameter_set_t *p_sps,
hevc_video_parameter_set_t **pp_vps,
const hevc_video_parameter_set_t *p_vps,
unsigned *pi_num, unsigned *pi_den )
{
if( p_sps->vui_parameters_present_flag && p_sps->vui.vui_timing_info_present_flag )
......@@ -1090,11 +1090,10 @@ bool hevc_get_frame_rate( const hevc_sequence_parameter_set_t *p_sps,
*pi_num = p_sps->vui.timing.vui_time_scale;
return (*pi_den && *pi_num);
}
else if( pp_vps && pp_vps[p_sps->sps_video_parameter_set_id] &&
pp_vps[p_sps->sps_video_parameter_set_id]->vps_timing_info_present_flag )
else if( p_vps && p_vps->vps_timing_info_present_flag )
{
*pi_den = pp_vps[p_sps->sps_video_parameter_set_id]->vps_num_units_in_tick;
*pi_num = pp_vps[p_sps->sps_video_parameter_set_id]->vps_time_scale;
*pi_den = p_vps->vps_num_units_in_tick;
*pi_num = p_vps->vps_time_scale;
return (*pi_den && *pi_num);
}
return false;
......
......@@ -185,7 +185,7 @@ bool hevc_get_sps_profile_tier_level( const hevc_sequence_parameter_set_t *,
bool hevc_get_picture_size( const hevc_sequence_parameter_set_t *, unsigned *p_w, unsigned *p_h,
unsigned *p_vw, unsigned *p_vh );
bool hevc_get_frame_rate( const hevc_sequence_parameter_set_t *,
hevc_video_parameter_set_t ** /* HEVC_MAX_VPS || NULL */,
const hevc_video_parameter_set_t * /* can be NULL */,
unsigned *pi_num, unsigned *pi_den );
bool hevc_get_colorimetry( const hevc_sequence_parameter_set_t *p_sps,
video_color_primaries_t *p_primaries,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment