From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2E695429F8 for ; Fri, 10 Jun 2022 17:37:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C394468B380; Fri, 10 Jun 2022 20:37:43 +0300 (EEST) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4B23B68B0F9 for ; Fri, 10 Jun 2022 20:37:37 +0300 (EEST) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-30ce6492a60so279387107b3.8 for ; Fri, 10 Jun 2022 10:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=0BfMvilKGS3NODfmP9YsUltY9/WWKGH5CJujtSlkU7Q=; b=GgrzYZoomT8/zFMhPg0QT+60QPzKlqtElS5eFOL7nxHc5ei2Nrqq38/xV7qdJezRNS Arr8AEmj8F3P4SffFzEgThA35RlDkRCWFTyGspSlCp2EBFyN2sEkXzghVik/vlD9NuLw PftBOqJR0bBqLqdj9CpQElLGquw1FzicnY2eAaqqRBffwvTv8HI+HL5ORzfvDBcA42Zo HBDMDNMR88m7AUuh0yshTG2866qT+c8nnlebdonwwfsMF74Q2UyAAGSs4UrUcY2363nj VpQcbhHpMAYk/efVhgkVUjVPLNz5YA6UaLHZU9Z7elpexDtdy6sRgaTIfX48/YKcOAq/ 4wow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=0BfMvilKGS3NODfmP9YsUltY9/WWKGH5CJujtSlkU7Q=; b=BBHSmLbMiA8D+A3fJA21pNce/HE0LRI1WM1d/anONeLd7wM5rkDVH0OT10VV8/4kT1 R/tFatdi1hPeVdbhmD53bJ8HpsVwJwBUI9Ywo+HgCHHhsoN7cN1gc6BWCHi6vEZpEsKP FOtvsFWaPK/Y3VOAU2AfYj/EcL3/KOw/q2oTPqChpUs8FZOZ1hTPFWWiB99EoL/oKD0C sOxajteLuqWjXhghNo7a3/AgVJHDb2E/FUcT9LWcA12CfBivvQyuR/2S2ZQ1C1ICmou6 MwX3zOAZMpwZIUCkL+X7zLqQiR+i6o9ACdVRl2J66rNWqmKZZHWtYvrQxoeFmrXyJLpV G4Eg== X-Gm-Message-State: AOAM530dIHvmYAsf879roDX1Z3lFttVREjXcas6eOWhZRQbDfeoxNR41 cv111TRqmKju35F0N+lcLrF3GQGHIWk0tKcmtMz/JEsheQE= X-Google-Smtp-Source: ABdhPJzhbTy35z/z0yXxzPxShREvHuMyMceLlp7VN09JkPPKDikHMV22UuYRArzoISjMTn3Mcvwzgh636NFoX9qtYKQ= X-Received: by 2002:a0d:d791:0:b0:30c:329a:1b16 with SMTP id z139-20020a0dd791000000b0030c329a1b16mr51896222ywd.274.1654882654908; Fri, 10 Jun 2022 10:37:34 -0700 (PDT) MIME-Version: 1.0 References: <085f0277-e678-4d20-f2bf-fbf55ed959d8@gyani.pro> <20220610173012.3573186-1-vigneshv@google.com> In-Reply-To: From: Vignesh Venkatasubramanian Date: Fri, 10 Jun 2022 10:37:23 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] avformat/mov: Only read the primary item for AVIF X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, Jun 10, 2022 at 10:33 AM Andreas Rheinhardt wrote: > > Vignesh Venkatasubramanian: > > Update the still AVIF parser to only read the primary item. With this > > patch, AVIF still images with exif/icc/alpha channel will no longer > > fail to parse. > > > > For example, this patch enables parsing of files in: > > https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Microsoft > > > > Adding two fate tests: > > 1) demuxing of still image with 1 item - this test will pass regardlesss > > of this patch. > > 2) demuxing of still image with 2 items - this test will fail without > > this patch and will pass with patch applied. > > > > Partially fixes trac ticket #7621 > > > > Signed-off-by: Vignesh Venkatasubramanian > > --- > > libavformat/isom.h | 1 + > > libavformat/mov.c | 41 ++++++++++--------- > > tests/fate/mov.mak | 9 ++++ > > .../fate/mov-avif-demux-still-image-1-item | 11 +++++ > > .../mov-avif-demux-still-image-multiple-items | 11 +++++ > > 5 files changed, 53 insertions(+), 20 deletions(-) > > create mode 100644 tests/ref/fate/mov-avif-demux-still-image-1-item > > create mode 100644 tests/ref/fate/mov-avif-demux-still-image-multiple-items > > > > diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak > > index 2fae054423..842c7f9aa1 100644 > > --- a/tests/fate/mov.mak > > +++ b/tests/fate/mov.mak > > @@ -17,6 +17,8 @@ FATE_MOV = fate-mov-3elist \ > > fate-mov-bbi-elst-starts-b \ > > fate-mov-neg-firstpts-discard-frames \ > > fate-mov-stream-shorter-than-movie \ > > + fate-mov-avif-demux-still-image-1-item \ > > + fate-mov-avif-demux-still-image-multiple-items \ > > > > FATE_MOV_FFPROBE = fate-mov-neg-firstpts-discard \ > > fate-mov-neg-firstpts-discard-vorbis \ > > @@ -138,6 +140,13 @@ FATE_MOV_FFMPEG_FFPROBE-$(call TRANSCODE, TTML SUBRIP, MP4 MOV, SRT_DEMUXER TTML > > fate-mov-mp4-ttml-stpp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000" "-map 0 -c copy" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags" > > fate-mov-mp4-ttml-dfxp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000 -tag:s dfxp -strict unofficial" "-map 0 -c copy" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags" > > > > +# avif demuxing - still image with 1 item. > > +fate-mov-avif-demux-still-image-1-item: CMD = framemd5 -i $(TARGET_SAMPLES)/avif/still_image.avif -c:v copy > > + > > +# avif demuxing - still image with multiple items. only the primary item will be > > +# parsed. > > +fate-mov-avif-demux-still-image-multiple-items: CMD = framemd5 -i $(TARGET_SAMPLES)/avif/still_image_exif.avif -c:v copy > > Can we create such files with our muxer? In this case one could use a > remux test, i.e. a test that creates the file and the demuxes the just > created file. > Unfortunately, the file with exif cannot be created using the ffmpeg's muxer as of now. So we will have to get that externally (i made that with MP4Box). The other still image file however can be creating using our muxer. I will add another test that does remuxing for the 1-item case in a separate patch if that's alright (since it's not directly related to what this patch is doing). I was also going to add some fate tests for animated AVIF muxing/parsing, so i will include that in the other patch as well. > > + > > # Resulting remux should have: > > # 1. first audio stream with AV_DISPOSITION_HEARING_IMPAIRED > > # 2. second audio stream with AV_DISPOSITION_VISUAL_IMPAIRED | DESCRIPTIONS > > diff --git a/tests/ref/fate/mov-avif-demux-still-image-1-item b/tests/ref/fate/mov-avif-demux-still-image-1-item > > new file mode 100644 > > index 0000000000..93773afd4e > > --- /dev/null > > +++ b/tests/ref/fate/mov-avif-demux-still-image-1-item > > @@ -0,0 +1,11 @@ > > +#format: frame checksums > > +#version: 2 > > +#hash: MD5 > > +#extradata 0, 13, b52ae298d37128862ef1918cf916239c > > +#tb 0: 1/1 > > +#media_type 0: video > > +#codec_id 0: av1 > > +#dimensions 0: 352x288 > > +#sar 0: 1/1 > > +#stream#, dts, pts, duration, size, hash > > +0, 0, 0, 1, 36265, 235b0c6e389c4084845981e08d60db04 > > diff --git a/tests/ref/fate/mov-avif-demux-still-image-multiple-items b/tests/ref/fate/mov-avif-demux-still-image-multiple-items > > new file mode 100644 > > index 0000000000..93773afd4e > > --- /dev/null > > +++ b/tests/ref/fate/mov-avif-demux-still-image-multiple-items > > @@ -0,0 +1,11 @@ > > +#format: frame checksums > > +#version: 2 > > +#hash: MD5 > > +#extradata 0, 13, b52ae298d37128862ef1918cf916239c > > +#tb 0: 1/1 > > +#media_type 0: video > > +#codec_id 0: av1 > > +#dimensions 0: 352x288 > > +#sar 0: 1/1 > > +#stream#, dts, pts, duration, size, hash > > +0, 0, 0, 1, 36265, 235b0c6e389c4084845981e08d60db04 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". -- Vignesh _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".