Add the avifContainerDump() function
Use the avifContainerDump() function in the info() function in avifdec.c to dump the container info instead of the first frame's info. I noticed this issue while trying to debug monochrome images encoded with libaom before commit 2172ed0. The container yuvFormat was YUV400 but the first frame's yuvFormat was YUV420. avifdec -i printed YUV420, so I could not see the container yuvFormat was wrong. Obviously it would be best to dump both the container info and every frame's info, but that could be confusing to average users, or at least too verbose.
Ext: Update to dav1d 0.8.0 (#437)
* Ext: Update to dav1d 0.8.0 Release notes: https://code.videolan.org/videolan/dav1d/-/tags/0.8.0 * Changelog: Add entry for dav1d 0.8.0 update
Check out the SVT-AV1 v0.8.6 tag
It was released on 2020-11-28: https://github.com/AOMediaCodec/SVT-AV1/releases/tag/v0.8.6
Explicit export public API to fix shared library build on MSVC (#439)
* Export symbols in shared lib * Minor clean on cmake script * Use header macros only
Add avifEncoderAddImageGrid() for grid image encoding, basic mdat and…
… iprp dedup
avifenc: Implement grid encoding (-g, --grid)
Hint at the existence of avifEncoderAddImageGrid() in avif_example_en…
…code
Only check for too-small grid tiles when actually encoding a grid
(Mentioned in #443 conversation)
Fix -Wmissing-prototypes and -Wcast-qual warnings
Add 'static' to function signatures of avifImageSplitGrid() and
avifEncoderFindExistingChunk(). This fix was suggested by Pascal
Massimino.
Change the type of the cellImages parameter of avifEncoderAddImageGrid()
from:
const avifImage ** cellImages
to
const avifImage * const * cellImages
so that we can cast a avifImage ** pointer to the new type without the
-Wcast-qual warning. This fix was suggested by Yuan Tong.
Fix https://crbug.com/oss-fuzz/28622.Better handling for export headers (#447)
* Better handling for export headers * More refinement on export headers. * Add comment to explain export macros. * Minor change on comment
Fix some clang warnings (#448)
Fix some clang warnings - Disable `-Wused-but-marked-unused` on Clang on MINGW. This solves #435. I created an issue but didn't get response from MINGW maintainers for a week, so for now just disable the warning in this case. - Remove extra semicolon in `codec_svt.c`. This fixes `-Wextra-semi-stmt` warning.
Fix two bugs in alpha in grid image encoding
Set the gridCols and gridRows fields of gridAlphaItem. Pass cellIndex, not 0, as the last argument to the avifEncoderDataCreateItem(encoder->data, "av01", "Alpha", 6, 0) call.
Change "MS CL" to "MSVC" in the status message and comment. Merge two target_compile_definitions() calls on the avif target.
Rename the gridX and gridY params of avifImageDump
The gridX and gridY parameters of avifImageDump() are renamed gridCols and gridRows, respectively.
Miscellaneous cleanup for src/write.c
Declare the cellIndex parameter of avifEncoderDataCreateItem() as uint32_t to be consistent with the type of cellIndex elsewhere. Add parentheses around the expressions to be cast to uint8_t. Use a simpler equivalent expression to calculate mdatEndSearchOffset. Declare imageWidth and imageHeight right before first use. Remove an unneeded uint32_t cast when assigning the return value of avifRWStreamOffset() to chunkOffset, which is no longer of the uint32_t type.
Simplify avifEncoderAddImageInternal conditionals
Simplify some conditionals in avifEncoderAddImageInternal(). Since we require all cellImages have the same width, height, and depth, move the checks for invalid values of width, height, and depth outside the for loop and perform those checks on just firstCell. Check gridCount > 1 instead of whether gridColorID or gridAlphaID is nonzero. gridCount > 1 is an equivalent condition and is used elsewhere in the function. In the single-image case, we only need to check if the alpha planes of cellImages have fully opaque values if firstCell has an alpha plane. (If firstCell does not have an alpha plane, then no cellImages have an alpha plane.)
Change preposition in imir comment from along to about to remove ambi…
…guity
Correct grid split place on high-depth image (#455)
`avifImageSplitGrid` split image into grid at wrong place on x-axis on high-depth images.
avifImageSplitGrid need not allocate cell planes
avifImageSplitGrid() does not need to call avifImageAllocatePlanes() on the cell images. It can just point the cell images' planes to the pixel data of gridSplitImage. This issue was reported by Nicholas Hayes (0xC0000054) in #331. Fix a bug in aomCodecEncodeImage() when copying pixel data from avifImage to aom_image_t. The number of bytes per row should be the width times bytesPerPixel, not image->yuvRowBytes[yuvPlane].
Declare gridCols and gridRows as uint32_t
Declare gridCols and gridRows as uint32_t (instead of uint8_t) so that 256 (the maximum legal value) can be represented. Also make some cleanup changes.
fix avis encode bug on Deduplication
Change-Id: Ic5a2a781d08f00d878a160d8a7aae4f0a563a62f
test/docker/build.sh: Dependency update
Update nasm to 2.15.05 Update aom to v2.0.1 Update dav1d to 0.8.0 Update libgav1 to commit b712ad2 Update rav1e to the 0.3 maintenance branch
Fix ugly newlines before first parameter on calls in clang-format, re…
…format files
Expose AOM specific film grain advanced options (#456)
Film grain is a post-decode step in AV1 which adds synthetic noise on the image. When encoding an image using 8 bit, limited range (this is the best choice If performance and compatibility are both the case), color banding artifact can usually appear on color gradient areas. Adding noise (dithering) can reduce such artifact, but doing such will significantly increase the file size (random data is hard to compress). Film grain uses several parameters to model the noise, so it solves banding without inflating file size.
clang-format (from recent change to .clang-format)
Fix "Adjust min/max/speed defaults in avifenc" change
(I adjusted the wrong defaults.) Fixes: #440
Change avifenc default speed from 4 to 6
Speed 6 is the fastest speed in libaom's good-quality usage mode. In one testing Frank Galligan performed on 20 images, the average encoding times for speeds 3, 4, 6, 8 are roughly: - Speed 3: 125 seconds - Speed 4: 63 seconds - Speed 6: 42 seconds - Speed 8: 11 seconds So speed 6 is likely to save 1/3 of the encoding time compared with speed 4. #440
Add AVIF_ prefix to AOM_OPTION_xxx enum constants
Otherwise AOM_OPTION_xxx looks like a macro or enum constant defined by libaom.
Let developers know they can ignore avifIO.write
Add comment so that developers know that avifIO's `write` member is currently unused. They can simply set it to a null pointer.
Use procedure specified in H.273 to quantize YUV (#459)
Old `avifReformatStateYToUNorm` and `avifReformatStateUVToUNorm` functions quantize YUV value at very first without extra precision, and can introduce severer than normal banding. This PR changes to follow the procedure specified in H.273, and can give better result on limited range images. Updated formulas passed avifyuv test with maxDrift=1 (only tested 8bit and 10bit. 12bit is too slow).
docker/build.sh: Sync dav1d and libgav1 versions
dav1d 0.8.1, libgav1 4a89dc3
ext/libgav1.cmd: sync to 4a89dc3, update abseil-cpp
update abseil-cpp -b lts_2020_09_23 update libgav1 to 4a89dc3 now in sync with docker/build.sh