From 3ad74adfa16def07a378b63c832cf4471a1819f0 Mon Sep 17 00:00:00 2001 From: Helge Norberg Date: Thu, 24 Nov 2016 18:49:41 +0100 Subject: [PATCH] #488 Fixed bug where HD material was always recorded using the BT.601 color matrix instead of the BT.709 color matrix. --- CHANGELOG | 8 ++++++++ modules/ffmpeg/consumer/ffmpeg_consumer.cpp | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 749f02d6f..00a47ab3c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,14 @@ General o Created automatically generated build number, so that it is easier to see whether a build is newer or older than an other. +Consumers +--------- + + o FFmpeg consumer: + + Fixed long overdue bug where HD material was always recorded using the + BT.601 color matrix instead of the BT.709 color matrix. RGB codecs like + qtrle was never affected but all the YCbCr based codecs were. + Producers --------- diff --git a/modules/ffmpeg/consumer/ffmpeg_consumer.cpp b/modules/ffmpeg/consumer/ffmpeg_consumer.cpp index e6f1ded38..25f2b87b0 100644 --- a/modules/ffmpeg/consumer/ffmpeg_consumer.cpp +++ b/modules/ffmpeg/consumer/ffmpeg_consumer.cpp @@ -702,6 +702,11 @@ private: adjust_video_filter(codec, in_video_format_, filt_vsink, filtergraph); + if (in_video_format_.width < 1280) + video_graph_->scale_sws_opts = "out_color_matrix=bt601"; + else + video_graph_->scale_sws_opts = "out_color_matrix=bt709"; + configure_filtergraph( *video_graph_, filtergraph, -- 2.39.2