-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with creating 10bit version of YCbCr #10
Comments
For anything where the "gamut" (the allowed space of values) fit in the proposed element type, it would definitely be good to broaden the bounds. I didn't take the time to figure out the proper gamut for all the color types; I did look into |
In general ColorTypes hasn't been exporting |
I think we don't need a lot of different typealiases, what we might need though is something along the way of |
So I think adding Fractional makes only sense for |
Other problems I am currently running into is that the |
Clearly that will have to fixed. Feel free to try whatever fix works for your more general case. |
Is there currently any encoding of the range of a colour? Currently it seems that those values are hard-coded for conversion. |
Yeah, the YIQ and YCbCr types are not "first class," they are just tacked on because I didn't want to completely ditch old methods like |
Y'CrCb to RGB is a mess: http://www.fourcc.org/fccyvrgb.php I would propose to only implement conversion for 8, 10 and 12 bit Y'CrCb as defined in [1] and [2] [1] https://en.wikipedia.org/wiki/Rec._709 |
This might get easier when switching to |
(After all, that's what those numbers really mean. Integer intensities definitely stink.) In other words, I give my approval to change YCbCr so that rather than effectively being 8-bit like it is now, we use "normalized" YCbCr. I think that will make your life much easier. |
For further reference here are the actual parameters from the standards. https://www.itu.int/rec/R-REC-BT.709-6-201506-I |
A few of the types are only defined as
Would it be appropriate to change these type bounds to
Fractional
instead?The idea is coming from #9 to define:
I can create a PR for doing this, but I don't know for which formats this would be appropriate and how to fix the tests.
The text was updated successfully, but these errors were encountered: