зеркало из 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 |
||
---|---|---|
.. | ||
Common.cpp | ||
Common.h | ||
TestADAM7InterpolatingFilter.cpp | ||
TestAnimationFrameBuffer.cpp | ||
TestBlendAnimationFilter.cpp | ||
TestContainers.cpp | ||
TestCopyOnWrite.cpp | ||
TestDecodeToSurface.cpp | ||
TestDecoders.cpp | ||
TestDecodersPerf.cpp | ||
TestDeinterlacingFilter.cpp | ||
TestDownscalingFilter.cpp | ||
TestDownscalingFilterNoSkia.cpp | ||
TestFrameAnimator.cpp | ||
TestLoader.cpp | ||
TestMetadata.cpp | ||
TestRemoveFrameRectFilter.cpp | ||
TestSourceBuffer.cpp | ||
TestStreamingLexer.cpp | ||
TestSurfaceCache.cpp | ||
TestSurfacePipeIntegration.cpp | ||
TestSurfaceSink.cpp | ||
TestSwizzleFilter.cpp | ||
animated-with-extra-image-sub-blocks.gif | ||
blend.gif | ||
blend.png | ||
blend.webp | ||
bug-1655846.avif | ||
corrupt-with-bad-bmp-height.ico | ||
corrupt-with-bad-bmp-width.ico | ||
corrupt-with-bad-ico-bpp.ico | ||
corrupt.jpg | ||
downscaled.avif | ||
downscaled.bmp | ||
downscaled.gif | ||
downscaled.ico | ||
downscaled.icon | ||
downscaled.jpg | ||
downscaled.png | ||
downscaled.webp | ||
first-frame-green.gif | ||
first-frame-green.png | ||
first-frame-green.webp | ||
first-frame-padding.gif | ||
green-1x1-truncated.gif | ||
green-large-bmp.ico | ||
green-large-png.ico | ||
green-multiple-sizes.ico | ||
green.avif | ||
green.bmp | ||
green.gif | ||
green.icc_srgb.webp | ||
green.ico | ||
green.icon | ||
green.jpg | ||
green.png | ||
green.webp | ||
invalid-truncated-metadata.bmp | ||
large.avif | ||
large.webp | ||
moz.build | ||
multilayer.avif | ||
no-frame-delay.gif | ||
perf_cmyk.jpg | ||
perf_gray.jpg | ||
perf_gray.png | ||
perf_gray_alpha.png | ||
perf_srgb.gif | ||
perf_srgb.png | ||
perf_srgb_alpha.png | ||
perf_srgb_alpha_lossless.webp | ||
perf_srgb_alpha_lossy.webp | ||
perf_srgb_lossless.webp | ||
perf_srgb_lossy.webp | ||
perf_ycbcr.jpg | ||
rle4.bmp | ||
rle8.bmp | ||
stackcheck.avif | ||
transparent-ico-with-and-mask.ico | ||
transparent-if-within-ico.bmp | ||
transparent-no-alpha-header.webp | ||
transparent.avif | ||
transparent.gif | ||
transparent.png | ||
transparent.webp |