On 2022-04-21 09:46 pm, Vignesh Venkatasubramanian wrote:
On Thu, Apr 21, 2022 at 2:08 AM Gyan Doshi <ffm...@gyani.pro> wrote:


On 2022-04-20 09:54 am, Gyan Doshi wrote:

On 2022-04-20 02:49 am, Paul B Mahol wrote:
On Tue, Apr 19, 2022 at 10:57 PM Vignesh Venkatasubramanian <
vigneshv-at-google....@ffmpeg.org> wrote:

Add support for parsing AVIF still images. This patches supports
AVIF still images that have exactly 1 item (i.e.) no alpha channel.
Essentially, we will have to parse the "iloc" box and populate
the mov index.

With this patch, we can decode still AVIF images like so:
ffmpeg -i image.avif image.png

Partially fixes trac ticket #7621

LGTM
Will push tomorrow if no one else has.
Can you provide a sample AVIF image and command that this patch allows
decoding of?

I tried a couple of samples from Netflix[1] and MS[2] and none worked,
even with forcing MOV demuxer ("moov atom not found" or "error reading
header").
Thanks for verifying. The test files you tried are invalid/not
supported by this patch. Please see the explanation below.

[1]: http://download.opencontent.netflix.com/?prefix=AV1/Chimera/AVIF/
These files are not valid AVIF since they don't have the major brand
set to "mif1" and not "avif". They are also missing a few other
mandatory boxes. libavif (the reference AVIF library) also is not able
to parse these files. These files were likely made when the AVIF
specification was not yet finalized.

$ ./avifdec --info Chimera-AV1-8bit-1280x720-3363kbps-100.avif
ERROR: Failed to decode image: BMFF parsing failed
Diagnostics:
  * [Strict] Item ID 1 of type 'av01' is missing mandatory pixi property

[2]:
https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Microsoft

These files have EXIF metadata and will contain more than one item
entry in the iloc box. This patch does not support that (however, i
have a follow-up patch to fix this). The files in this directory
return AVERROR_PATCHWELCOME as intended.

For a set of working AVIF files that are supported by this patch you
can try the files under "Link-U" and "Netflix" subdirectories of this repo:

https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Link-U

https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Netflix/avif
Ok, these work.

The command is as mentioned in the commit message:
./ffmpeg -i <avif file> output.png

Please let me know if you have more questions. Thank you!

Add informative log msgs in the patchwelcome blocks.

Are there plans to add support for transforms like cropping, rotation?

Regards,
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to