[vlc-commits] dav1d/aom: forward the colorimetry metadata from the container to the output

Steve Lhomme git at videolan.org
Wed Jan 9 11:40:20 CET 2019


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jan  9 11:30:58 2019 +0100| [e033427f8d5ea4a2afe45de7286820cc1b53472a] | committer: Steve Lhomme

dav1d/aom: forward the colorimetry metadata from the container to the output

If there is none and the stream contains some, it will be overridden in
NewPicture() otherwise the container values are used.

Fixes #21578

(cherry picked from commit b59710fbdf8f2f985b675bb5d6085b1459cc5f8c)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=e033427f8d5ea4a2afe45de7286820cc1b53472a
---

 modules/codec/aom.c   | 4 ++++
 modules/codec/dav1d.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/modules/codec/aom.c b/modules/codec/aom.c
index 86dd7d1d77..4735678ade 100644
--- a/modules/codec/aom.c
+++ b/modules/codec/aom.c
@@ -327,6 +327,10 @@ static int OpenDecoder(vlc_object_t *p_this)
         dec->fmt_out.video.i_sar_num = dec->fmt_in.video.i_sar_num;
         dec->fmt_out.video.i_sar_den = dec->fmt_in.video.i_sar_den;
     }
+    dec->fmt_out.video.primaries   = dec->fmt_in.video.primaries;
+    dec->fmt_out.video.transfer    = dec->fmt_in.video.transfer;
+    dec->fmt_out.video.space       = dec->fmt_in.video.space;
+    dec->fmt_out.video.b_color_range_full = dec->fmt_in.video.b_color_range_full;
 
     return VLC_SUCCESS;
 }
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index 61cca369ef..2ebc548fca 100644
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -314,6 +314,10 @@ static int OpenDecoder(vlc_object_t *p_this)
         dec->fmt_out.video.i_sar_num = dec->fmt_in.video.i_sar_num;
         dec->fmt_out.video.i_sar_den = dec->fmt_in.video.i_sar_den;
     }
+    dec->fmt_out.video.primaries   = dec->fmt_in.video.primaries;
+    dec->fmt_out.video.transfer    = dec->fmt_in.video.transfer;
+    dec->fmt_out.video.space       = dec->fmt_in.video.space;
+    dec->fmt_out.video.b_color_range_full = dec->fmt_in.video.b_color_range_full;
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list