Mailing List Archive

Update colorsys with YUV conversions?
https://github.com/python/cpython/pull/29512
adds what appears to be well written conversions between RGB and YUV
color systems, with tests. Are we allowing such improvements? If not,
a module docstring note or comment should be added.

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/FV73RE3TSWDYBOJLZIONUJCX6FA32SZB/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Update colorsys with YUV conversions? [ In reply to ]
I guess that you should agree on constants and then stick to them.
Otherwise, we might have to add a parameter later to chose the
conversion standard.

The PR uses "ATSC BT.709 standard constant".

Wikipedia says:
"When encoding Y’CBCR video, BT.709 creates gamma-encoded luma (Y’)
using matrix coefficients 0.2126, 0.7152, and 0.0722 (together they
add to 1). BT.709-1 used slightly different 0.2125, 0.7154, 0.0721
(changed to standard ones in BT.709-2)."
https://en.wikipedia.org/wiki/Rec._709#Luma_coefficients

Victor

On Fri, Nov 12, 2021 at 11:28 PM Terry Reedy <tjreedy@udel.edu> wrote:
>
> https://github.com/python/cpython/pull/29512
> adds what appears to be well written conversions between RGB and YUV
> color systems, with tests. Are we allowing such improvements? If not,
> a module docstring note or comment should be added.
>
> --
> Terry Jan Reedy
>
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-leave@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/FV73RE3TSWDYBOJLZIONUJCX6FA32SZB/
> Code of Conduct: http://python.org/psf/codeofconduct/



--
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/ZWI3UTU3FADBHF4CP3WLTUQVLWNQKPUY/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: Update colorsys with YUV conversions? [ In reply to ]
There was talk of deprecating colorsys, but PEP 594 now lists it under
"modules to keep" so I don't see why we couldn't improve it. The OP's
reasons for doing so seem solid. I don't know anything about this topic so
I'll leave it at that.

On Fri, Nov 12, 2021 at 2:22 PM Terry Reedy <tjreedy@udel.edu> wrote:

> https://github.com/python/cpython/pull/29512
> adds what appears to be well written conversions between RGB and YUV
> color systems, with tests. Are we allowing such improvements? If not,
> a module docstring note or comment should be added.
>
> --
> Terry Jan Reedy
>
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-leave@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/FV73RE3TSWDYBOJLZIONUJCX6FA32SZB/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>