VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert or make Blu-rays and DVDs! :)
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. I have a blu-ray I want to scale down to 480p, and SD resolution is rec.601 colors, while the blu-ray is rec.709.

    When I try to convert it, artifacts or color splotches seem to appear. Here is a screenshot comparison of what I am talking about. Look at the brown hair closely.

    http://screenshotcomparison.com/comparison/125704



    I am trying to convert it like this in my script and it's the only way I know how to. This is making the artifacts appear.
    Code:
    Colormatrix(mode="rec.709->rec.601", clamp=0, threads=0)
    Is there a better way to do this without introducing those artifacts on the colors?
    Last edited by killerteengohan; 10th Dec 2018 at 04:23.
    Quote Quote  
  2. Dithering? It looks like "random" noise.
    Quote Quote  
  3. I don't believe colormatrix uses dithering.

    They appear to me like they are already there, just ALOT less visible until I try the conversion.
    Last edited by killerteengohan; 10th Dec 2018 at 11:13.
    Quote Quote  
  4. Why do both screenshots have the same colors if you ran them through ColorMatrix()?
    Quote Quote  
  5. ColorMatrix() doesn't dither. I think noise in the original is being accentuated by the conversion because noise in the three channels is crossing channels.
    Quote Quote  
  6. what kind of source filter do you use; lsmash or else ?
    Quote Quote  
  7. Originally Posted by jagabo View Post
    ColorMatrix() doesn't dither. I think noise in the original is being accentuated by the conversion because noise in the three channels is crossing channels.
    Why doesn't it do this to the video, when I convert it to RGB? it looks perfect when I am viewing it with ConvertToRGB. I don't want it to end up RGB and would prefer to keep YV12, but it seems to change it better.
    Quote Quote  
  8. Originally Posted by themaster1 View Post
    what kind of source filter do you use; lsmash or else ?
    AVCSource for this one
    Quote Quote  
  9. Originally Posted by killerteengohan View Post
    Originally Posted by jagabo View Post
    ColorMatrix() doesn't dither. I think noise in the original is being accentuated by the conversion because noise in the three channels is crossing channels.
    Why doesn't it do this to the video, when I convert it to RGB? it looks perfect when I am viewing it with ConvertToRGB. I don't want it to end up RGB and would prefer to keep YV12, but it seems to change it better.
    Because limited range YUV has only about 1/6 as many valid colors as RGB. So errors in YUV to YUV conversions result in more visible errors than in YUV to RGB conversions.
    Quote Quote  
  10. Also, ConvertToRGB is just one 8bit operation . Colormatrix and ConvertToRGB (either encoding, or for when it's displayed) adds another lossy 8bit step , so you'd expect more rounding errors too


    You can try a higher bit depth conversion for colormatrix. It should be slightly better when using higher precision. But you probably have to play with the down conversion and dithering algorithm, and some of the settings used. Perhaps with avsresize, avisynthshader , or with vapoursynth

    Also, if your desired end format was 10bit instead of 8bit, it would have fewer errors, more valid converted RGB colors . At decent bitrates compression efficiency is better too

    Can you post a sample of that source?
    Quote Quote  
  11. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by killerteengohan View Post
    Why doesn't it do this to the video, when I convert it to RGB? it looks perfect when I am viewing it with ConvertToRGB. I don't want it to end up RGB and would prefer to keep YV12, but it seems to change it better.
    Because limited range YUV has only about 1/6 as many valid colors as RGB. So errors in YUV to YUV conversions result in more visible errors than in YUV to RGB conversions.
    We also view YUV in RGB anyway, as it has to be decoded to RGB to simply view it on any consumer level lcd monitor/gpu.
    Last edited by KarMa; 11th Dec 2018 at 06:16.
    Quote Quote  
  12. Originally Posted by KarMa View Post
    Originally Posted by jagabo View Post
    Originally Posted by killerteengohan View Post
    Why doesn't it do this to the video, when I convert it to RGB? it looks perfect when I am viewing it with ConvertToRGB. I don't want it to end up RGB and would prefer to keep YV12, but it seems to change it better.
    Because limited range YUV has only about 1/6 as many valid colors as RGB. So errors in YUV to YUV conversions result in more visible errors than in YUV to RGB conversions.
    We also view YUV in RGB anyway, as it has to be decoded to RGB to simply view it on any consumer level lcd monitor/gpu.
    Yes, so when using ColorMatrix() you have two colorspace conversions (YUV -> YUV -> RGB), not just one (YUV -> RGB).
    Quote Quote  
  13. What with conversion from YCbCr601 to RGB to YCbCr709 - do you see same result?
    Quote Quote  
  14. I don't have the OP's video but using his before image in an AviSynth script -- yes, I got the same result.

    I also verified that ColorMatrix() doesn't add grain using some test images with shallow gradients and Histogram(mode="luma").
    Quote Quote  
  15. Originally Posted by jagabo View Post
    I don't have the OP's video but using his before image in an AviSynth script -- yes, I got the same result.

    I also verified that ColorMatrix() doesn't add grain using some test images with shallow gradients and Histogram(mode="luma").
    Weird... same artifacts? have no source to verify but perhaps is able to average area (remove noise - selective gaussian blur?).
    Perhaps doing this conversion in more than 8 bit depth can help. Can't see anything on samples except those noise...
    Quote Quote  
  16. Originally Posted by poisondeathray View Post
    You can try a higher bit depth conversion for colormatrix. It should be slightly better when using higher precision. But you probably have to play with the down conversion and dithering algorithm, and some of the settings used. Perhaps with avsresize, avisynthshader , or with vapoursynth
    Definitely better, but you can probably tweak the dither algorithm slightly better with fmtc in vapoursynth . It's the dither algorithm now that is adding a very fine pattern noise (mode 0 is ordered) . -1 disables the down conversion dither, but the rounding becomes off and you get color shift

    Because I started with the PNG , converted it back to YUV to simulate the starting point, and back to RGB for the screenshot


    1) "New" Original

    Code:
    ImageSource("1544429049_4120357968.png")
    ConvertToYV12(matrix="rec709")
    ConvertToRGB(matrix="rec709")
    Image
    [Attachment 47451 - Click to enlarge]


    2) "usual" 8bit colormatrix, and back to RGB for the screenshot

    Code:
    ImageSource("1544429049_4120357968.png")
    ConvertToYV12(matrix="rec709")
    Colormatrix(mode="Rec.709->Rec.601", clamp=0)
    ConvertToRGB24(matrix="Rec601")
    Image
    [Attachment 47452 - Click to enlarge]


    3) 16bit colormatrix, back to 8bit , and to RGB for the screenshot

    Code:
    ImageSource("1544429049_4120357968.png")
    ConvertToYV12(matrix="rec709")
    ConvertBits(16) 
    ResizeShader(matrixin="Rec709", matrixout="Rec601", kernel="colormatrix")
    ConvertBits(8, dither=0)
    ConvertToRGB24(matrix="Rec601")
    Image
    [Attachment 47453 - Click to enlarge]
    Quote Quote  
  17. Originally Posted by pandy View Post
    Originally Posted by jagabo View Post
    I don't have the OP's video but using his before image in an AviSynth script -- yes, I got the same result.

    I also verified that ColorMatrix() doesn't add grain using some test images with shallow gradients and Histogram(mode="luma").
    Weird... same artifacts?
    Not exactly because I was starting with his RGB image and converting it back to rec.709 YV12 as my starting point. But very similar.
    Quote Quote  



Similar Threads