[FFmpeg-devel] [PATCH] avcodec/tiff: add limited support for ReferenceBlackWhite and YCbCrCoefficients tags
Skakov Pavel
pavelsx at gmail.com
Fri Oct 4 23:30:38 EEST 2019
>> Can AVRational be used even through the values are essentially unsigned? LibTIFF really likes to encode 0..1 values with denominator 0xFFFFFFFF.
>
> floats do not have enough precission to store unsigned 32/32bit fractions
> just consider a float has 32bit (and a good part is really small and large
> numbers) the faction has 64bits with num+den.
>
> Thats not awnsering your question but rather i wonder why you ask it here
> instead of with floats
> for 32bit signed fractions. i think the difference wontg matter but you
> should probably test this ...
Of course floats don't have enough precision for exact values but that's not the issue here as we only need to match the values (so some rounding is actually good).
The point was that ffmpeg has AVRational that might be a cleaner approach at handling given rationals than matching the other software's way (floats).
More information about the ffmpeg-devel
mailing list