VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. What is the most accurate way to convert 10-bit full-range YUV to RGB per BT.709?

    I've searched for hours to no avail. I need the actual equation, not avisynth or ffmpeg code.

    Thank you.
    Quote Quote  
  2. Here is what I have come up with for 10-bit YUV to RGB, BT.709, range = 0 - 1023.

    r = y + 1.53964687446332*(v-512)
    g = y - 0.457674666142168*(v-512) - 0.183142873500381*(u-512)
    b = y + 1.8141786671051*(u-512)
    Last edited by chris319; 24th Aug 2023 at 10:16.
    Quote Quote  
  3. Source please and specify if this is 709 or 601.
    Last edited by pandy; 24th Aug 2023 at 04:32.
    Quote Quote  
  4. Thx, whenever i see so many digits after point it's trig my curiosity and raise some question about computing accuracy.
    Quote Quote  
  5. Originally Posted by pandy View Post
    Thx, whenever i see so many digits after point it's trig my curiosity and raise some question about computing accuracy.
    Well it works the best of anything I've tried for BT.709, and I've tried several. There are still some off-by-one errors and one off-by-two error in 10 bit. It is probably what avisynth and ffmpeg should be using for BT.709. It works fine with single-precision floats and does not need double-precision floats. Again, I am using the values in RP-219 as a reference.

    Sharc's math is over my head.
    Last edited by chris319; 25th Aug 2023 at 03:39.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!