gecko-dev/image/decoders
Chun-Min Chang b7811b117b Bug 1654462 - Add alpha support in nsAVIFDecoder r=jbauman
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
2020-12-16 01:27:14 +00:00
..
icon Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
EXIF.cpp
EXIF.h
GIF2.h
iccjpeg.c
iccjpeg.h
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
nsAVIFDecoder.cpp Bug 1654462 - Add alpha support in nsAVIFDecoder r=jbauman 2020-12-16 01:27:14 +00:00
nsAVIFDecoder.h Bug 1654462 - Add alpha support in nsAVIFDecoder r=jbauman 2020-12-16 01:27:14 +00:00
nsBMPDecoder.cpp Backed out changeset 40784ea31188 (bug 651482) for Reftest failures in bmp-corrupted/wrapper.html?invalid-compression-BITFIELDS.bmp. CLOSED TREE 2020-05-22 12:21:32 +03:00
nsBMPDecoder.h Bug 1615394 - Add color management support to the BMP decoder. r=tnikkel 2020-03-03 14:16:00 +00:00
nsGIFDecoder2.cpp Bug 1620600 - Add flags to allow image decoders to produce sRGB output. r=tnikkel 2020-04-10 16:26:33 +00:00
nsGIFDecoder2.h
nsICODecoder.cpp Bug 1622661 - Removed 'else' after 'return'. r=tnikkel 2020-03-31 19:27:35 +00:00
nsICODecoder.h Bug 1255105 - Use SurfacePipe in the BMP decoder. r=tnikkel 2020-03-02 23:24:12 +00:00
nsIconDecoder.cpp Bug 1620600 - Add flags to allow image decoders to produce sRGB output. r=tnikkel 2020-04-10 16:26:33 +00:00
nsIconDecoder.h
nsJPEGDecoder.cpp Bug 1588310 - Improving progressive JPEG scans. r=tnikkel 2020-12-05 23:42:23 +00:00
nsJPEGDecoder.h Bug 1620600 - Add flags to allow image decoders to produce sRGB output. r=tnikkel 2020-04-10 16:26:33 +00:00
nsPNGDecoder.cpp Bug 1645042 - Revert bug 1631615 and color manage untagged images. r=tnikkel 2020-06-11 21:46:45 +00:00
nsPNGDecoder.h Bug 1620600 - Add flags to allow image decoders to produce sRGB output. r=tnikkel 2020-04-10 16:26:33 +00:00
nsWebPDecoder.cpp Bug 1645042 - Revert bug 1631615 and color manage untagged images. r=tnikkel 2020-06-11 21:46:45 +00:00
nsWebPDecoder.h