[vlc-commits] packetizer: hevc: only use prematched vps
Francois Cartegnie
git at videolan.org
Tue Oct 3 12:11:44 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Oct 2 17:31:40 2017 +0200| [7688c7c602882452838b05ba6f7cbdfb9c764f61] | committer: Francois Cartegnie
packetizer: hevc: only use prematched vps
stop requiring aligned vps list
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7688c7c602882452838b05ba6f7cbdfb9c764f61
---
modules/packetizer/hevc.c | 2 +-
modules/packetizer/hevc_nal.c | 9 ++++-----
modules/packetizer/hevc_nal.h | 2 +-
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index 9bdca109ba..3262b602ca 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -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;
diff --git a/modules/packetizer/hevc_nal.c b/modules/packetizer/hevc_nal.c
index 5c53de5b7b..90d8ce2102 100644
--- a/modules/packetizer/hevc_nal.c
+++ b/modules/packetizer/hevc_nal.c
@@ -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;
diff --git a/modules/packetizer/hevc_nal.h b/modules/packetizer/hevc_nal.h
index b0c91c0682..7f1d3f3183 100644
--- a/modules/packetizer/hevc_nal.h
+++ b/modules/packetizer/hevc_nal.h
@@ -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,
More information about the vlc-commits
mailing list