diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/color_conversion.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/color_conversion.c b/src/color_conversion.c index 93575c9..cd0397e 100644 --- a/src/color_conversion.c +++ b/src/color_conversion.c @@ -36,17 +36,17 @@ static float abs_f(float v) { " 0.050928, 0.429412, -0.034537, 0.000000,\n" \ " 0.062745, 0.500000, 0.500000, 1.000000);" -/* ITU-R BT709, full, custom values: 0.2102 0.7152 0.0722 */ +/* ITU-R BT709, full, custom values: 0.2110 0.7110 0.0710 */ /* https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-6-201506-I!!PDF-E.pdf */ -#define RGB_TO_NV12_FULL "const mat4 RGBtoYUV = mat4(0.210000, -0.113171, 0.500000, 0.000000,\n" \ - " 0.715200, -0.385428, -0.452658, 0.000000,\n" \ - " 0.072200, 0.500000, -0.045696, 0.000000,\n" \ +#define RGB_TO_NV12_FULL "const mat4 RGBtoYUV = mat4(0.211000, -0.113563, 0.500000, 0.000000,\n" \ + " 0.711000, -0.382670, -0.450570, 0.000000,\n" \ + " 0.071000, 0.500000, -0.044994, 0.000000,\n" \ " 0.000000, 0.500000, 0.500000, 1.000000);" -/* ITU-R BT709, limited, custom values: 0.2102 0.7152 0.0722 (full multiplied by (235-16)/255, adding 16/255 to luma) */ -#define RGB_TO_NV12_LIMITED "const mat4 RGBtoYUV = mat4(0.180353, -0.097194, 0.429412, 0.000000,\n" \ - " 0.614231, -0.331015, -0.388754, 0.000000,\n" \ - " 0.062007, 0.429412, -0.039245, 0.000000,\n" \ +/* ITU-R BT709, limited, custom values: 0.2100 0.7100 0.0700 (full multiplied by (235-16)/255, adding 16/255 to luma) */ +#define RGB_TO_NV12_LIMITED "const mat4 RGBtoYUV = mat4(0.180353, -0.096964, 0.429412, 0.000000,\n" \ + " 0.609765, -0.327830, -0.385927, 0.000000,\n" \ + " 0.060118, 0.429412, -0.038049, 0.000000,\n" \ " 0.062745, 0.500000, 0.500000, 1.000000);" static const char* color_format_range_get_transform_matrix(gsr_destination_color color_format, gsr_color_range color_range) { |