[FFmpeg-devel] [PATCH v5 1/1] avutil/csp: create public API for colorspace structs
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sat May 28 13:42:14 EEST 2022
Leo Izen:
>
> 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.
>
Then I don't even know why we prescribe the denominator the user should
use; why don't we let choosing the precision to them?
- Andreas
More information about the ffmpeg-devel
mailing list