Commit 5986d30314 for ffmpeg
commit 5986d3031439c392d8517a0cca903264ed60c33e
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Fri Oct 30 08:05:07 2026 +0100
avcodec/dovi_rpu: fix the default YCC to RGB matrix and offsets
The defaults of an RPU without display management metadata had the two
chroma coefficients of the green row with the wrong sign and the offsets
as 1/4 and 2, where ETSI GS CCM 001 clause 6.2.2 gives -1754 and -4383
and the offsets 1/16 and 1/2, as every stream carries them.
diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c
index f19c1922f1..99765b9f77 100644
--- a/libavcodec/dovi_rpu.c
+++ b/libavcodec/dovi_rpu.c
@@ -99,16 +99,16 @@ const AVDOVIColorMetadata ff_dovi_color_default = {
{ 0, 8192 },
{ 14742, 8192 },
{ 9575, 8192 },
- { 1754, 8192 },
- { 4383, 8192 },
+ { -1754, 8192 },
+ { -4383, 8192 },
{ 9575, 8192 },
{ 17372, 8192 },
{ 0, 8192 },
},
.ycc_to_rgb_offset = {
- { 1, 4 },
- { 2, 1 },
- { 2, 1 },
+ { 1, 16 },
+ { 1, 2 },
+ { 1, 2 },
},
.rgb_to_lms_matrix = {
{ 5845, 16384 },