-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Significantly simplify gain map API #2481
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maryla: Thanks a lot for the pull request! I only reviewed the changes to avif.h. Please see my comments in CHANGLOG.md and at avif.h:1182.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
I didn't check the changes related to grid images in src/read.c. It would be good to ask Yannis or Vignesh check those changes.
src/read.c
Outdated
|
||
// If the item is a grid, copies the codec type property (av1C or av2C) from the first grid tile to the grid item. | ||
// Also checks that all tiles have the same codec type and that it's valid. | ||
static avifResult avifAdoptGridTileCodecTypeIfNeeded(avifDecoder * decoder, avifDecoderItem * item, const avifTileInfo * info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Same here, this function probably should be named "avifDecoderAdoptGridTileCodecTypeIfNeeded".
Gain map metadata is now alwayas parsed (when gain map code is enabled at compile time). Ideally, gain map metadata should be stored towards the beginning of the file (since it's in the 'mdat' part).
It can be replaced with a check that image->gainMap is not NULL.
And rename to AVIF_IMAGE_CONTENT_...
Following changes in libavif AOMediaCodec/libavif#2481 PiperOrigin-RevId: 689374767
Following changes in libavif AOMediaCodec/libavif#2481 PiperOrigin-RevId: 689374767
Following changes in libavif AOMediaCodec/libavif#2481 PiperOrigin-RevId: 689374767
Following changes in libavif AOMediaCodec/libavif#2481 PiperOrigin-RevId: 689374767
Following changes in libavif AOMediaCodec/libavif#2481 PiperOrigin-RevId: 689374767
Following changes in libavif AOMediaCodec/libavif#2481 PiperOrigin-RevId: 689374767
Following changes in libavif AOMediaCodec/libavif#2481 PiperOrigin-RevId: 690987236
enableParsingGainMapMetadata
: gain map metadata is always parsed nowenableDecodingGainMap
andignoreColorAndAlpha
withimageContentToDecode
bit fieldgainMapPresent
, the same information is available by checkingdecoder->image->gainMap != NULL