ffmpeg/tools: Fix incorrect transfer characteristics

Both Rec. 601 and sRGB looked extremely wrong before, resulting in weird or warped colors. Since it is very difficult to find up to date and accurate information on standards, we should simply go for what has the most widespread support.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-02-19 23:30:20 +01:00
parent 03a8168beb
commit 303c14de4e

View file

@ -172,12 +172,12 @@ AVColorTransferCharacteristic ffmpeg::tools::obs_to_av_color_transfer_characteri
{
switch (v) {
case VIDEO_CS_601:
return AVCOL_TRC_LINEAR;
return AVCOL_TRC_SMPTE240M;
case VIDEO_CS_DEFAULT:
case VIDEO_CS_709:
return AVCOL_TRC_BT709;
case VIDEO_CS_SRGB:
return AVCOL_TRC_IEC61966_2_1;
case VIDEO_CS_SRGB: // sRGB with Gamma 2.2
return AVCOL_TRC_GAMMA22;
default:
throw std::invalid_argument("Unknown Color Transfer Characteristics");
}