зеркало из https://github.com/mozilla/gecko-dev.git
b7811b117b
This patch implements the transparency support for AVIF image files. To convert the decoded YCbCr and Alpha data to RGBA, a function named `ConvertYCbCrAToARGB` is created to do this job in the following procedure: ConvertYCbCrAToARGB: If the layout of the YCbCr is I420 Calling libyuv::I420AlphaToARGB Else Fill RGB data converted by ConvertYCbCrToRGB in ARGB buffer first Insert the alpha data to ARGB buffer On the other hand, this patch refactors the nsAVIFDecoder a bit to make the lifetime of the parsed data and decoded image data clearer. They won't live longer than Parser object and {Dav1d, AOM}Decoder object. This should improve the code readability. This patch also adds a transparent image test (TransparentAVIFTestCase) to check the FLAG_HAS_TRANSPARENCY is posted or not. The test image file `transparent.avif` is from Bug 1654462. Differential Revision: https://phabricator.services.mozilla.com/D98951 |
||
---|---|---|
.. | ||
icon | ||
EXIF.cpp | ||
EXIF.h | ||
GIF2.h | ||
iccjpeg.c | ||
iccjpeg.h | ||
moz.build | ||
nsAVIFDecoder.cpp | ||
nsAVIFDecoder.h | ||
nsBMPDecoder.cpp | ||
nsBMPDecoder.h | ||
nsGIFDecoder2.cpp | ||
nsGIFDecoder2.h | ||
nsICODecoder.cpp | ||
nsICODecoder.h | ||
nsIconDecoder.cpp | ||
nsIconDecoder.h | ||
nsJPEGDecoder.cpp | ||
nsJPEGDecoder.h | ||
nsPNGDecoder.cpp | ||
nsPNGDecoder.h | ||
nsWebPDecoder.cpp | ||
nsWebPDecoder.h |