Skip to content

"YCbCr Matrix: None" guessing bug (seems doing full (pc) range instead of limited (tv) range) #49

Closed

Description

@realfinder

as said here #10 (comment)

I think this easy to fix :)

Activity

  1. seiya-git commented on Dec 3, 2025

    @seiya-git

    Can u test this build?
    assrender_bin_win.zip

  2. seiya-git commented on Dec 3, 2025

    @seiya-git

    mpv for "ctest5HD vid.avi" set bt.601 for hd, but assrender use bt.709 for width > 1024 or height > 576 in this build, should we set bt.601 for any video size if matrix not set in frame prop?

  3. realfinder commented on Dec 3, 2025

    @realfinder
    Author

    Can u test this build?
    assrender_bin_win.zip

    that fix it! thanks!

    but still act weird without frame properties! propClearAll().assrender("Z:\ctest5\ctest5.ass"), the weird thing is that the video colors change which assrender should not do that (it should only have an effect on YCbCr subtitle output. The video should always be untouched.)

  4. realfinder commented on Dec 3, 2025

    @realfinder
    Author

    mpv for "ctest5HD vid.avi" set bt.601 for hd, but assrender use bt.709 for width > 1024 or height > 576 in this build, should we set bt.601 for any video size if matrix not set in frame prop?

    I think that should be the case of "'YCbCr Matrix' is missing from a script", not if "YCbCr Matrix: None" which is different case

  5. seiya-git commented on Dec 3, 2025

    @seiya-git

    when 'YCbCr Matrix' is missing from a script assrender set "color_mt = MATRIX_BT601;" for any video size

  6. realfinder commented on Dec 3, 2025

    @realfinder
    Author

    when 'YCbCr Matrix' is missing from a script assrender set "color_mt = MATRIX_BT601;" for any video size

    yes, that was done since #2 (for now the only one that still dont follow clsid2/mpc-hc#974 (comment))

    also there are this #5

  7. seiya-git commented on Dec 3, 2025

    @seiya-git

    I see, I will look into it

  8. seiya-git commented on Dec 4, 2025

    @seiya-git
    a = AVISource("ctest5SD vid.avi").propSet("_Matrix", 1).assrender("ctest5.ass")
    b = AVISource("ctest5SD vid.avi").propClearAll().assrender("ctest5.ass")
    Overlay(a, b, mode="difference", pc_range=false)
    

    and

    a = AVISource("ctest5HD vid.avi").propSet("_Matrix", 5).assrender("ctest5.ass")
    b = AVISource("ctest5HD vid.avi").propClearAll().assrender("ctest5.ass")
    Overlay(a, b, mode="difference", pc_range=false)
    

    Strange that there are no differences here.
    I also compared MPV and AvsPmod: both show the same colors from the AVS script, regardless of whether ASSRender is used.

  9. realfinder commented on Dec 4, 2025

    @realfinder
    Author

    Strange that there are no differences here.

    yes this code wont trigger it, you should use avspmod and switch between the "ctest5SD vid.avi" and "ctest5HD vid.avi"

    AVISource("Z:\ctest5\ctest5HD vid.avi").propSet("_Matrix", 1)
    #~ AVISource("Z:\ctest5\ctest5SD vid.avi").propSet("_Matrix", 5)
    
    propClearAll().assrender("Z:\ctest5\ctest5.ass")
    
  10. seiya-git commented on Dec 5, 2025

    @seiya-git

    It's not AssRender's fault, because AssRender doesn't change the frame colors; it only blends the subtitle-rendered frame with the target frame.

  11. realfinder commented on Dec 5, 2025

    @realfinder
    Author

    It's not AssRender's fault, because AssRender doesn't change the frame colors; it only blends the subtitle-rendered frame with the target frame.

    but it only happen with AssRender

  12. seiya-git commented on Dec 9, 2025

    @seiya-git

    Can u test this build?
    assrender64.zip
    also fixed error displaying if file not found...

  13. realfinder commented on Dec 9, 2025

    @realfinder
    Author

    Can u test this build?
    assrender64.zip

    that work fine! thanks!

    you can do a PR so pinterf can merge it and close this

  14. seiya-git commented on Dec 9, 2025

    @seiya-git

    @pinterf @realfinder
    #50
    Probably we can set this as 0.36.0 release?

  15. realfinder commented on Dec 9, 2025

    @realfinder
    Author

    Probably we can set this as 0.36.0 release?

    sure, it's been a long time since the last update (I think Libass and the other components have improved a lot since then), and the recent fixes are also worthwhile

  16. seiya-git commented on Jan 22, 2026

    @seiya-git

    @pinterf this can be closed, fixed in latest release

  17. pinterf commented on Feb 1, 2026

    @pinterf
    Owner

    yes this code wont trigger it, you should use avspmod and switch between the "ctest5SD vid.avi" and "ctest5HD vid.avi"

    Regarding #52/ #53, still don't get it why it happeded, and would like to reproduce.

    @seiya-git So the comparison which @realfinder did, must be different (expected case)
    But when we use the plane avs_make_writeable, without avs_frame_copy, then it shows the very same output?

    (Plus: avspmod is needed to see the difference, if I understood well?)

  18. pinterf commented on Feb 2, 2026

    @pinterf
    Owner

    @realfinder: Can you help me? I was not able to reproduce your avspmod display difference, or I just did not understand correctly what to do or what to look at.
    Could you tell me again the exact steps? (I made the two scripts for SD and HD which had frame-property clear before calling assrender, and switched betwen them (ctrl-tab) and see nothing. Or I don't know what should I see there. Thanks you.

  19. realfinder commented on Feb 2, 2026

    @realfinder
    Author

    Could you tell me again the exact steps? (I made the two scripts for SD and HD which had frame-property clear before calling assrender, and switched betwen them (ctrl-tab) and see nothing. Or I don't know what should I see there. Thanks you.

    you need to use
    ctest5SD vid.zip
    ctest5HD vid.zip
    ctest5.zip

    with this script

    AVISource("Z:\ctest5\ctest5HD vid.avi").propSet("_Matrix", 1)
    #~ AVISource("Z:\ctest5\ctest5SD vid.avi").propSet("_Matrix", 5)
    
    propClearAll().assrender("Z:\ctest5\ctest5.ass")
    

    and switch between "ctest5SD vid.avi" and "ctest5HD vid.avi" in avspmod using "ctrl+Q" and see the color in the preview

    note: "ctrl+Q" after highlight both "ctest5SD vid.avi" and "ctest5HD vid.avi" lines

  20. pinterf commented on Feb 2, 2026

    @pinterf
    Owner

    Thanks. (For me the CTRL-Q does not refresh immediately, I have to click into the preview pics area.)

    What should I experience?

    The colors are changing, yes, but they do differ without assrender as well.
    The HD and SD files are different, the avspmod color picker shows different colors:
    SD's yellow is A12C8E, while HD is A82C88.

    (I reverted the infamous code part (avs_make_writable w/o copy) to the original one, I'm testing with that)

  21. realfinder commented on Feb 2, 2026

    @realfinder
    Author

    (For me the CTRL-Q does not refresh immediately, I have to click into the preview pics area.)

    I forgot to mention that :) sorry

  22. pinterf commented on Feb 2, 2026

    @pinterf
    Owner

    (CTRL-Q was just a side note :) )
    Additionally, I edited my comment, since it contained a sentence of no sense - forgot to delete.

    So my question is that if I can see different colorsm then is it good, or not?

  23. realfinder commented on Feb 2, 2026

    @realfinder
    Author

    So my question is that if I can see different colorsm then is it good, or not?

    better script

    AVISource("Z:\ctest5\ctest5HD vid.avi").propSet("_Matrix", 1)
    #~ AVISource("Z:\ctest5\ctest5SD vid.avi").propSet("_Matrix", 5)
    
    propClearAll()
    assrender("Z:\ctest5\ctest5.ass").StackHorizontal(last)
    

    both right and left side should has the same color

  24. pinterf commented on Feb 2, 2026

    @pinterf
    Owner

    Thanks. In my latest test left and right colors are the same (and have same hex values in color picker).
    I will create a test build for you some hours later or tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions