#11182: yuvtestsrc and yuv444p->rgba->yuv444p conversion result in huge 
difference
-------------------------------------+-------------------------------------
             Reporter:  Andrew-R     |                    Owner:  (none)
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:  swscale
              Version:  unspecified  |               Resolution:  invalid
             Keywords:  colorspace   |               Blocked By:
  color_primaries                    |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Balling):

 I already see one mistake in mozilla calculator, they use Precision that
 is 5. It needs to be only 4 for ycbcr to rgb, but Precision of rgb to
 ycbcr matrix must be increased if you are working with 14 bits or 12 bits
 per channel. See: "The decoding matrix for BT.2020-NCL is this with 14
 decimal places" here https://en.wikipedia.org/wiki/YCbCr

 Let us check some stuff with that calculator. First of all there is a rule
 that when you convert 8 bit YCbCr to 10 bit YCbCr you just multiply by 4,
 even if this is suboptimal that was how ITU defined it. That means that
 235 is just multiplied by 4 and you get 940 and that is the same value.
 Indeed, both 8 bit value of 235, 128, 128 and 940, 512, 512 decode to
 perfect values 255, 255, 255 and 1023, 1023, 1023, both of them are
 reference white. Very cute. Same for 64, 512, 512 is perfect 0, 0, 0.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11182#comment:49>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to