X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=theme.cpp;h=2c9af01cf69b36cc150d0f98c6140cefa814b650;hb=08cf2c37c4178cf5dd029f960f1553ff111bb48e;hp=1536503adcece94f4ba20b7e2d626eb1604b86c0;hpb=ddfffde8a53a1049ad07f43bfb0f0ecd54b8e022;p=nageru diff --git a/theme.cpp b/theme.cpp index 1536503..2c9af01 100644 --- a/theme.cpp +++ b/theme.cpp @@ -143,8 +143,14 @@ int EffectChain_finalize(lua_State* L) // happens in a pass not run by Movit (see Mixer::subsample_chroma()). output_ycbcr_format.chroma_subsampling_x = 1; output_ycbcr_format.chroma_subsampling_y = 1; - output_ycbcr_format.luma_coefficients = YCBCR_REC_709; - output_ycbcr_format.full_range = true; + + // Rec. 709 would be the sane thing to do, but it seems many players + // (e.g. MPlayer and VLC) just default to BT.601 coefficients no matter + // what (see discussions in e.g. https://trac.ffmpeg.org/ticket/4978). + // We _do_ set the right flags, though, so that a player that works + // properly doesn't have to guess. + output_ycbcr_format.luma_coefficients = YCBCR_REC_601; + output_ycbcr_format.full_range = false; output_ycbcr_format.num_levels = 256; chain->add_ycbcr_output(inout_format, OUTPUT_ALPHA_FORMAT_POSTMULTIPLIED, output_ycbcr_format, YCBCR_OUTPUT_SPLIT_Y_AND_CBCR);