Commit 24de0741 authored by Thomas Guillem's avatar Thomas Guillem

codec: hxxx_helper: add hxxx_helper_get_colorimetry

parent 0f74383d
......@@ -475,7 +475,6 @@ hxxx_helper_set_extra(struct hxxx_helper *hh, const void *p_extra,
return VLC_SUCCESS;;
}
block_t *
h264_helper_get_annexb_config(const struct hxxx_helper *hh)
{
......@@ -600,3 +599,29 @@ h264_helper_get_current_dpb_values(const struct hxxx_helper *hh,
return h264_get_dpb_values(hsps->h264_sps, p_depth, p_delay) ?
VLC_SUCCESS : VLC_EGENERIC;
}
int
hxxx_helper_get_colorimetry(const struct hxxx_helper *hh,
video_color_primaries_t *p_primaries,
video_transfer_func_t *p_transfer,
video_color_space_t *p_colorspace,
bool *p_full_range)
{
switch (hh->i_codec)
{
case VLC_CODEC_H264:
{
const struct hxxx_helper_nal *hsps = h264_helper_get_current_sps(hh);
if (hsps == NULL)
return VLC_EGENERIC;
return h264_get_colorimetry(hsps->h264_sps, p_primaries, p_transfer,
p_colorspace, p_full_range)
== true ? VLC_SUCCESS : VLC_EGENERIC;
}
case VLC_CODEC_HEVC:
/* FIXME */
return VLC_EGENERIC;
default:
vlc_assert_unreachable();
}
}
......@@ -86,3 +86,9 @@ int h264_helper_get_current_sar(const struct hxxx_helper *hh, int *p_num, int *p
int h264_helper_get_current_dpb_values(const struct hxxx_helper *hh,
uint8_t *p_depth, unsigned *pi_delay);
int hxxx_helper_get_colorimetry(const struct hxxx_helper *hh,
video_color_primaries_t *p_primaries,
video_transfer_func_t *p_transfer,
video_color_space_t *p_colorspace,
bool *p_full_range);
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