X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=ycbcr_input.cpp;h=d1d849a2038e6a0d58958de61954e6d3edab10a0;hp=3e691d812fa8acc6b31e0bd09fa4a57bb45e2701;hb=9a00101dbb6f98d21c6b8ce4d33200af840ea908;hpb=37f56fcbe571b2322243f6de59494bf9e0cbb37a diff --git a/ycbcr_input.cpp b/ycbcr_input.cpp index 3e691d8..d1d849a 100644 --- a/ycbcr_input.cpp +++ b/ycbcr_input.cpp @@ -5,6 +5,7 @@ #include #include +#include "effect_util.h" #include "util.h" #include "ycbcr_input.h" @@ -201,6 +202,14 @@ std::string YCbCrInput::output_fragment_shader() coeff[1] = 0.7152; coeff[2] = 0.0722; break; + + case YCBCR_REC_2020: + // Rec. 2020, page 4. + coeff[0] = 0.2627; + coeff[1] = 0.6780; + coeff[2] = 0.0593; + break; + default: assert(false); } @@ -214,7 +223,7 @@ std::string YCbCrInput::output_fragment_shader() scale[1] = 1.0; scale[2] = 1.0; } else { - // Rec. 601, page 4; Rec. 709, page 19. + // Rec. 601, page 4; Rec. 709, page 19; Rec. 2020, page 4. offset[0] = 16.0 / 255.0; offset[1] = 128.0 / 255.0; offset[2] = 128.0 / 255.0;