vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Jan 12 13:40:19 2018 +0100| [2e134414b827f0d8e7f9df12e5d1baefd5201d9e] | committer: Thomas Guillem
packetizer: hevc: split pref/suffix sei > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2e134414b827f0d8e7f9df12e5d1baefd5201d9e --- modules/mux/mp4/libmp4mux.c | 17 +++++++++++++---- modules/packetizer/hevc_nal.c | 12 ++++++++---- modules/packetizer/hevc_nal.h | 9 ++++++--- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c index 4eea3ef2f9..0d40a87589 100644 --- a/modules/mux/mp4/libmp4mux.c +++ b/modules/mux/mp4/libmp4mux.c @@ -622,13 +622,22 @@ static bo_t *GetHvcCTag(es_format_t *p_fmt, bool b_completeness) } break; case HEVC_NAL_PREF_SEI: - if(params.i_sei_count != HEVC_DCR_SEI_COUNT) + if(params.i_seipref_count != HEVC_DCR_SEI_COUNT) { - params.p_sei[params.i_sei_count] = p_nal; - params.rgi_sei[params.i_sei_count] = i_nal; - params.i_sei_count++; + params.p_seipref[params.i_seipref_count] = p_nal; + params.rgi_seipref[params.i_seipref_count] = i_nal; + params.i_seipref_count++; } break; + case HEVC_NAL_SUFF_SEI: + if(params.i_seisuff_count != HEVC_DCR_SEI_COUNT) + { + params.p_seisuff[params.i_seisuff_count] = p_nal; + params.rgi_seisuff[params.i_seisuff_count] = i_nal; + params.i_seisuff_count++; + } + break; + default: break; } diff --git a/modules/packetizer/hevc_nal.c b/modules/packetizer/hevc_nal.c index 82468b4ac8..38baf6d127 100644 --- a/modules/packetizer/hevc_nal.c +++ b/modules/packetizer/hevc_nal.c @@ -1402,7 +1402,8 @@ uint8_t * hevc_create_dcr( const struct hevc_dcr_params *p_params, HEVC_DCR_ADD_SIZES(p_params->i_vps_count, p_params->rgi_vps); HEVC_DCR_ADD_SIZES(p_params->i_sps_count, p_params->rgi_sps); HEVC_DCR_ADD_SIZES(p_params->i_pps_count, p_params->rgi_pps); - HEVC_DCR_ADD_SIZES(p_params->i_sei_count, p_params->rgi_sei); + HEVC_DCR_ADD_SIZES(p_params->i_seipref_count, p_params->rgi_seipref); + HEVC_DCR_ADD_SIZES(p_params->i_seisuff_count, p_params->rgi_seisuff); uint8_t *p_data = malloc( i_total_size ); if( p_data == NULL ) @@ -1430,7 +1431,8 @@ uint8_t * hevc_create_dcr( const struct hevc_dcr_params *p_params, (i_nal_length_size - 1) ); /* total number of arrays */ *p++ = !!p_params->i_vps_count + !!p_params->i_sps_count + - !!p_params->i_pps_count + !!p_params->i_sei_count; + !!p_params->i_pps_count + !!p_params->i_seipref_count + + !!p_params->i_seisuff_count; /* Write NAL arrays */ HEVC_DCR_ADD_NALS(HEVC_NAL_VPS, p_params->i_vps_count, @@ -1439,8 +1441,10 @@ uint8_t * hevc_create_dcr( const struct hevc_dcr_params *p_params, p_params->p_sps, p_params->rgi_sps); HEVC_DCR_ADD_NALS(HEVC_NAL_PPS, p_params->i_pps_count, p_params->p_pps, p_params->rgi_pps); - HEVC_DCR_ADD_NALS(HEVC_NAL_PREF_SEI, p_params->i_sei_count, - p_params->p_sei, p_params->rgi_sei); + HEVC_DCR_ADD_NALS(HEVC_NAL_PREF_SEI, p_params->i_seipref_count, + p_params->p_seipref, p_params->rgi_seipref); + HEVC_DCR_ADD_NALS(HEVC_NAL_SUFF_SEI, p_params->i_seisuff_count, + p_params->p_seisuff, p_params->rgi_seisuff); return p_data; } diff --git a/modules/packetizer/hevc_nal.h b/modules/packetizer/hevc_nal.h index ed4c9cade1..777622d903 100644 --- a/modules/packetizer/hevc_nal.h +++ b/modules/packetizer/hevc_nal.h @@ -220,12 +220,15 @@ struct hevc_dcr_params const uint8_t *p_vps[HEVC_DCR_VPS_COUNT], *p_sps[HEVC_DCR_SPS_COUNT], *p_pps[HEVC_DCR_VPS_COUNT], - *p_sei[HEVC_DCR_SEI_COUNT]; + *p_seipref[HEVC_DCR_SEI_COUNT], + *p_seisuff[HEVC_DCR_SEI_COUNT]; uint8_t rgi_vps[HEVC_DCR_VPS_COUNT], rgi_sps[HEVC_DCR_SPS_COUNT], rgi_pps[HEVC_DCR_PPS_COUNT], - rgi_sei[HEVC_DCR_SEI_COUNT]; - uint8_t i_vps_count, i_sps_count, i_pps_count, i_sei_count; + rgi_seipref[HEVC_DCR_SEI_COUNT], + rgi_seisuff[HEVC_DCR_SEI_COUNT]; + uint8_t i_vps_count, i_sps_count, i_pps_count; + uint8_t i_seipref_count, i_seisuff_count; struct hevc_dcr_values *p_values; }; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
