[FFmpeg-devel] [PATCH v5 1/1] avutil/csp: create public API for colorspace structs

Leo Izen leo.izen at gmail.com
Wed May 25 00:51:49 EEST 2022


On 5/24/22 16:56, Andreas Rheinhardt wrote:
> Leo Izen:
>> +#define AVUTIL_CSP_DENOM 100000
> 
> Why not 300000 given that the denominator of one of the constants has a
> factor of three?
> (Sorry if this has already been answered before.)
> 

I suggested this to haasn, but he pointed out that the 1/3 can be (and 
is) manually coded as {1, 3} without using the macro. The spec defines 
it as one-third exactly, not via a float value. Adding a factor of 3 to 
every denominator shouldn't be necessary as the various av_q functions 
handle that gracefully already.

-Leo Izen (thebombzen)


More information about the ffmpeg-devel mailing list