From e64a1a9aae0200d14feed49a4c6cf537bf5708a4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 8 Nov 2020 22:34:18 +0100 Subject: Obey requests to change the video range of RGB content. Video that comes in with RGB pixels will not have its video level ranges changed by libswscale (it only does this for YUV and greyscale). Here we add code to do it ourselves for RGB content coming in via image files (e.g. PNG/DPX etc). Part of #1851. --- src/lib/ffmpeg_image_proxy.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib/ffmpeg_image_proxy.h') diff --git a/src/lib/ffmpeg_image_proxy.h b/src/lib/ffmpeg_image_proxy.h index 62b99d280..4fca899f4 100644 --- a/src/lib/ffmpeg_image_proxy.h +++ b/src/lib/ffmpeg_image_proxy.h @@ -19,6 +19,7 @@ */ #include "image_proxy.h" +#include "types.h" #include #include #include @@ -26,8 +27,8 @@ class FFmpegImageProxy : public ImageProxy { public: - explicit FFmpegImageProxy (boost::filesystem::path); - explicit FFmpegImageProxy (dcp::ArrayData); + explicit FFmpegImageProxy (boost::filesystem::path, VideoRange video_range); + explicit FFmpegImageProxy (dcp::ArrayData, VideoRange video_range); FFmpegImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); Result image ( @@ -44,6 +45,7 @@ public: private: dcp::ArrayData _data; + VideoRange _video_range; mutable int64_t _pos; /** Path of a file that this image came from, if applicable; stored so that failed-decode errors can give more detail. -- cgit v1.2.3