[vlc-commits] av1: read the color range as a video_color_range_t
Steve Lhomme
git at videolan.org
Mon Dec 17 13:20:36 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Dec 13 15:39:18 2018 +0100| [36c950342d17394e43e79d5fe56e08a100ea9676] | committer: Steve Lhomme
av1: read the color range as a video_color_range_t
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=36c950342d17394e43e79d5fe56e08a100ea9676
---
modules/packetizer/av1.c | 4 ++--
modules/packetizer/av1_obu.c | 4 ++--
modules/packetizer/av1_obu.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/packetizer/av1.c b/modules/packetizer/av1.c
index 47ac8fd363..9782aaa3d5 100644
--- a/modules/packetizer/av1.c
+++ b/modules/packetizer/av1.c
@@ -136,7 +136,7 @@ static void UpdateDecoderFormat(decoder_t *p_dec)
video_color_primaries_t prim;
video_color_space_t space;
video_transfer_func_t xfer;
- bool full;
+ video_color_range_t full;
if(p_dec->fmt_in.video.primaries == COLOR_PRIMARIES_UNDEF &&
AV1_get_colorimetry(p_sys->p_sequence_header, &prim, &xfer, &space, &full) &&
prim != COLOR_PRIMARIES_UNDEF &&
@@ -147,7 +147,7 @@ static void UpdateDecoderFormat(decoder_t *p_dec)
p_dec->fmt_out.video.primaries = prim;
p_dec->fmt_out.video.transfer = xfer;
p_dec->fmt_out.video.space = space;
- p_dec->fmt_out.video.color_range = full ? COLOR_RANGE_FULL : COLOR_RANGE_LIMITED;
+ p_dec->fmt_out.video.color_range = full;
}
if(!p_dec->fmt_in.i_extra && !p_dec->fmt_out.i_extra)
diff --git a/modules/packetizer/av1_obu.c b/modules/packetizer/av1_obu.c
index 0488c36e93..1707f3ee88 100644
--- a/modules/packetizer/av1_obu.c
+++ b/modules/packetizer/av1_obu.c
@@ -535,14 +535,14 @@ bool AV1_get_colorimetry(const av1_OBU_sequence_header_t *p_seq,
video_color_primaries_t *p_primaries,
video_transfer_func_t *p_transfer,
video_color_space_t *p_colorspace,
- bool *p_full_range)
+ video_color_range_t *p_full_range)
{
if(!p_seq->color_config.color_description_present_flag)
return false;
*p_primaries = iso_23001_8_cp_to_vlc_primaries(p_seq->color_config.color_primaries);
*p_transfer = iso_23001_8_tc_to_vlc_xfer(p_seq->color_config.transfer_characteristics);
*p_colorspace = iso_23001_8_mc_to_vlc_coeffs(p_seq->color_config.matrix_coefficients);
- *p_full_range = p_seq->color_config.color_range == COLOR_RANGE_FULL;
+ *p_full_range = p_seq->color_config.color_range ? COLOR_RANGE_FULL : COLOR_RANGE_LIMITED;
return true;
}
diff --git a/modules/packetizer/av1_obu.h b/modules/packetizer/av1_obu.h
index db71f7c8dc..ca17b2421b 100644
--- a/modules/packetizer/av1_obu.h
+++ b/modules/packetizer/av1_obu.h
@@ -165,7 +165,7 @@ void AV1_get_frame_max_dimensions(const av1_OBU_sequence_header_t *, unsigned *,
void AV1_get_profile_level(const av1_OBU_sequence_header_t *, int *, int *, int *);
bool AV1_get_colorimetry( const av1_OBU_sequence_header_t *,
video_color_primaries_t *, video_transfer_func_t *,
- video_color_space_t *, bool *);
+ video_color_space_t *, video_color_range_t *);
bool AV1_get_frame_rate(const av1_OBU_sequence_header_t *, unsigned *, unsigned *);
More information about the vlc-commits
mailing list