[FFmpeg-devel] [PATCH] avcodec/tiff: add limited support for ReferenceBlackWhite and YCbCrCoefficients tags

Michael Niedermayer michael at niedermayer.cc
Fri Oct 4 22:35:42 EEST 2019


On Fri, Oct 04, 2019 at 09:24:05AM +0300, Skakov Pavel wrote:
> >You should use AVRationals instead. It's ideal seeing the way these
> >values are coded in the bitstream.
> >
> >See libavutil/rational.h
> 

> 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 ...

Thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191004/6f6d41b8/attachment.sig>


More information about the ffmpeg-devel mailing list