Commit bca172ee authored by Thomas Guillem's avatar Thomas Guillem

packetizer: h264: fill colour_desc

parent 7b38aad8
......@@ -427,11 +427,22 @@ static bool h264_parse_sequence_parameter_set_rbsp( bs_t *p_bs,
i_tmp = bs_read( p_bs, 1 );
if( i_tmp )
{
bs_read( p_bs, 4 );
bs_read( p_bs, 3 );
p_sps->vui.colour.b_full_range = bs_read( p_bs, 1 );
/* colour desc */
i_tmp = bs_read( p_bs, 1 );
if ( i_tmp )
bs_read( p_bs, 24 );
{
p_sps->vui.colour.i_colour_primaries = bs_read( p_bs, 8 );
p_sps->vui.colour.i_transfer_characteristics = bs_read( p_bs, 8 );
p_sps->vui.colour.i_matrix_coefficients = bs_read( p_bs, 8 );
}
else
{
p_sps->vui.colour.i_colour_primaries = HXXX_PRIMARIES_UNSPECIFIED;
p_sps->vui.colour.i_transfer_characteristics = HXXX_TRANSFER_UNSPECIFIED;
p_sps->vui.colour.i_matrix_coefficients = HXXX_MATRIX_UNSPECIFIED;
}
}
/* chroma loc info */
......
......@@ -112,6 +112,12 @@ struct h264_sequence_parameter_set_t
struct {
bool b_valid;
int i_sar_num, i_sar_den;
struct {
bool b_full_range;
uint8_t i_colour_primaries;
uint8_t i_transfer_characteristics;
uint8_t i_matrix_coefficients;
} colour;
bool b_timing_info_present_flag;
uint32_t i_num_units_in_tick;
uint32_t i_time_scale;
......
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