On Sat, Sep 28, 2019 at 07:13:59PM +0300, Skakov Pavel wrote: > >This ensures the default ycbcr_subsampling is 2 while also > >ensuring the subsampling values are correct for all pixel formats. > >This solution while it takes a few lines more code should be more > >robust > > In TIFF specification only CbCr subsampling is allowed. The field is > explicitly named "YCbCrSubsampling", so introducing another subsampling > variable serves no purpose other than introducing confusion.
Well, you are technically correct But having subsampling of 2 "accessible" when subsampling is not 2 is asking for out of array accesses. I mean if you set subsampling so it is always correct for the used pixel format then any code can use it and its fine But if subsampling is only valid for one colorspace and 2 otherwise now you have to proof and maintain that condition that no code ever uses the subsampling value unless the colorspace is ycbcr I have no strong oppinon on this but at the least the subsampling field would need to be renamed to ycbcr_subsampling if its invalid in the more general case thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you drop bombs on a foreign country and kill a hundred thousand innocent people, expect your government to call the consequence "unprovoked inhuman terrorist attacks" and use it to justify dropping more bombs and killing more people. The technology changed, the idea is old.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".