Commit c0dc81e3 authored by Wan-Teh Chang's avatar Wan-Teh Chang Committed by Commit Bot

Roll src/third_party/libavif/src/ 1d32f88ab..0265cd7a1 (41 commits)

There is an API change in this libavif update. avifDecoderParse() no
longer takes the image data as input. Instead, an avifIO object needs to
be associated with an avifDecoder, and the avifDecoder calls the read()
method of the avifIO object to read image data incrementally. Eventually
Chrome will use its custom avifIO implementation. For now just use the
built-in avifIO object that reads from a memory buffer.

https://chromium.googlesource.com/external/github.com/AOMediaCodec/libavif.git/+log/1d32f88ab33e..0265cd7a10d1

$ git log 1d32f88ab..0265cd7a1 --date=short --no-merges --format='%ad %ae %s'
2020-10-08 jdrago Add some clarifying comments to the avifDecodeSample struct
2020-10-08 wtc Declare the sizeHint field of avifIO as uint64_t
2020-10-08 wtc avifDecoderReadItem callers can rely on contract
2020-10-08 wtc Change prototypes of functions for memory avifIO
2020-10-08 wtc More cleanup for avifDecoderReadItem()
2020-10-08 wtc Compare frameIndex with INT_MAX before int cast
2020-09-23 wtc Check for avifImageRGBToYUV failures
2020-10-07 wtc Use CHECKERR in avifDecoderFindMetadata()
2020-10-08 wtc Rewrite a loop as a do-while loop
2020-10-08 wtc Miscellaneous comment fixes
(...)
2020-09-24 jdrago Reintroduce an important size check in avifROStreamReadBoxHeader()
2020-09-23 wtc Fix GCC -Wclobbered warnings
2020-09-23 derek.buitenhuis avifIO: Remove API functions that take FILE* arguments
2020-09-22 jdrago avifdec: Error out properly when RGB conversion fails
2020-09-22 dnovomesky Use new API in gdk-pixbuf loader
2020-09-21 jdrago Mark avifIOCreateTestReader as static
2020-09-21 jdrago avifenc: Allow the setting/overriding of XMP, Exif, and ICC profiles
2020-09-21 jdrago Move Exif and XMP metadata (if present) to the front of the mdat for streaming considerations
2020-09-21 jdrago Rename sizeLimit to sizeHint, it better matches the comment and conveys its optional nature
2020-09-21 jdrago avifIO reader API

Created with:
  roll-dep src/third_party/libavif/src
R=dalecurtis@chromium.org,pkasting@chromium.org

Bug: 1136922
Change-Id: I53e9600ec3650aa59212483e3281c9765b935533
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462936Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816390}
parent ebfe89ba
......@@ -342,7 +342,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libavif
# and whatever else without interference from each other.
'libavif_revision': '1d32f88ab33e04b74f4e978bf30f0184d3a96011',
'libavif_revision': '0265cd7a10d1425cf42908458a0807e919195914',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling nearby
# and whatever else without interference from each other.
......
......@@ -607,8 +607,18 @@ bool AVIFImageDecoder::MaybeCreateDemuxer() {
return false;
}
avifROData raw_data = {image_data_->bytes(), image_data_->size()};
auto ret = avifDecoderParse(decoder_.get(), &raw_data);
// Chrome doesn't use XMP and Exif metadata. Ignoring XMP and Exif will ensure
// avifDecoderParse() isn't waiting for some tiny Exif payload hiding at the
// end of a file.
decoder_->ignoreXMP = AVIF_TRUE;
decoder_->ignoreExif = AVIF_TRUE;
auto ret = avifDecoderSetIOMemory(decoder_.get(), image_data_->bytes(),
image_data_->size());
if (ret != AVIF_RESULT_OK) {
DVLOG(1) << "avifDecoderSetIOMemory failed: " << avifResultToString(ret);
return false;
}
ret = avifDecoderParse(decoder_.get());
if (ret != AVIF_RESULT_OK) {
DVLOG(1) << "avifDecoderParse failed: " << avifResultToString(ret);
return false;
......
......@@ -10,6 +10,7 @@ source_set("libavif") {
"src/src/avif.c",
"src/src/codec_dav1d.c",
"src/src/colr.c",
"src/src/io.c",
"src/src/mem.c",
"src/src/obu.c",
"src/src/rawdata.c",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment