gecko-dev/image/test
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
..
browser Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham 2020-12-15 10:34:54 +00:00
crashtests Bug 1676172. Add crashtest. r=aosmond 2020-11-13 08:31:02 +00:00
fuzzing Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
gtest Bug 1654462 - Add alpha support in nsAVIFDecoder r=jbauman 2020-12-16 01:27:14 +00:00
mochitest Bug 1653458: re-enable test_bug1325080.html for fission+xorigin r=kashav 2020-10-30 17:05:15 +00:00
reftest Bug 1588310. Add reftest. 2020-12-05 23:43:37 +00:00
unit Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp 2020-07-15 11:20:45 +00:00