[FFmpeg-devel] [PATCH] avcodec/tiff: Check for Tiled and Stripped TIFFs

Anton Khirnov anton at khirnov.net
Thu May 21 13:13:15 EEST 2020


Quoting Michael Niedermayer (2020-05-21 08:59:27)
> 
> I dont see IS_IRAP_NAL() and IS_IDR_NAL() to check every field in the headers
> to be consistent with IDR / IRAP NALs, which is what the tiff code in this
> thread does kind off ..
> 
> to match hevc, i could add something like
> #define HAVE_TILES(s)  s->has_tiles
> #define HAVE_STRIPS(s) s->strips
> 
> but iam not sure what that would simplify
> The validity checks are needed once and if thats put in a macro then maybe that
> could be called HAVE_RANDOM_TILE_BITS() and HAVE_RANDOM_STRIP_BITS() could be
> maybe a possibility
> then again if thats what is suggested then i would suggest to rather add 2
> local variable with these names instead of a macro which would seem more
> readable
> 
> whats your opinion ?

I see little difference between a macro and a local variable in this
case, either one is fine with me. And both are significantly more
readable than a giant condition that the reader has to reverse engineer
into (have_tiles && have_strips)

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list