VideoHelp Forum

+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 38 of 38
Thread
  1. Again, nice work, Sharc.
    Quote Quote  
  2. Originally Posted by Sharc View Post
    I took the matrix coefficients for R'G'B' -> Y'CbCr conversion from ITU-R BT.709-6, formula 3.5. For 8bit n=8.
    There is issue with this formula - normally you should use 10 bit (8.2 code) and in 10 bit apply mentioned error rounding - conversion to 8 bit values is performed by truncation of fractional part i.e. 8 bit values without fraction - there is no error rounding there - this is subtle but important difference (if you work with broadcast equipment and sources then those differences begin to be obvious).
    Not sure why there is many errors in standards and recommendations...
    Quote Quote  
  3. Here is an interesting tidbit to add to this discussion. Fortunately the calculation results agree with Sharc's calculations for 709.

    https://www.silicondust.com/yuv-to-rgb-conversion-for-tv-video/
    Quote Quote  
  4. Here is the ffmpeg code I use to encode to Y,Cb,Cr 709:

    Code:
    ffmpeg -y   -loop 1 -t 60  -i "color_bars.bmp"  -pix_fmt yuv420p  -c:v  libx265  -c:a  none  -crf 0  -vf scale=w=1280:h=720:out_color_matrix=bt709:out_range=limited  -color_primaries bt709  -color_trc bt709  -colorspace bt709  -r 59.94    bars.mp4
    Quote Quote  
  5. Sharc: would you be willing to work out the conversion equation for BT.2020 / BT.2100?

    Thanks.
    Quote Quote  
  6. Originally Posted by chris319 View Post
    Sharc: would you be willing to work out the conversion equation for BT.2020 / BT.2100?

    Thanks.
    Do you mean doing the matrix inversions? I have really no experience at all with BT.2020, I am not even sure whether the matrix conversion principle still applies for BT.2020 similar as for 601/709.
    Maybe someone else will chime in .....
    Quote Quote  
  7. Do you mean doing the matrix inversions? I have really no experience at all with BT.2020, I am not even sure whether the matrix conversion principle still applies for BT.2020 similar as for 601/709.
    Yes. The math is way over my head.

    Page 4:

    https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-2-201510-I!!PDF-E.pdf
    Quote Quote  
  8. https://github.com/sekrit-twc/zimg
    conversion library between colorspaces, bitdepths, resolutions ... so while avoiding apps that use it, maybe you can use it directly, there is some API examples
    Quote Quote  



Similar Threads