Commit 2e134414 authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by Thomas Guillem

packetizer: hevc: split pref/suffix sei

parent f42992b6
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
};
......
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