From patchwork Sat Apr 15 22:05:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 41199 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp1412232pzb; Sat, 15 Apr 2023 15:06:57 -0700 (PDT) X-Google-Smtp-Source: AKy350Z0iksGOtzYiWc4aon+/25y+nXK8G2oEhlJm0uvj1rqc7wGEz+V6DG2pmYQoT7gOYQh9dOH X-Received: by 2002:a17:907:2149:b0:94a:4d06:3de3 with SMTP id rk9-20020a170907214900b0094a4d063de3mr2788785ejb.72.1681596417570; Sat, 15 Apr 2023 15:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681596417; cv=none; d=google.com; s=arc-20160816; b=iGy4sj9uWsbMdqHkrpE6XlylxMxYAWXrJez+mC30LsgozgKwW6M3zBDtJZsoyn+IHR ldKZwU6Y0RpN0fuyIkGE/zVG9+AsdSgrROalGYQrqkjldperZ0COZP8Tn597967VsknV VPexjcPrrJJbD25yfGQm6rArLgCamKRiOFkZV6wyDGjaWqypexiF3hyRk5Yw/3WPiuX2 4d1nqauhUMaoMgaHW531Iph1P2nH2iTSzT/dxIYTRdxLEiMpCKr3q+ryTHTP0GKHp/V9 8gA9gPzEvzHPHG9r+JPFDv7sv4RewO7P0k+p1qgZRzvZKH3b9dxrVScSCWWmBxPuwzDK LpXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:delivered-to; bh=pGUfyFX+Shxx17f+bpTmVaqI9uG3eFdpcsBeP5qm3pg=; b=Cy8pBkLV8SexUQMLNcW+/Phm4KeSCDlWGz2TIN7YuivvjqSFeKK0Op8JQLpo8qMB30 anmYhlS/W1PumvcfqBEAiriXdyYG7Vpnt+plBC1owKfs6V6WDK/rE6mbp4J936gw9Db7 9dPfWtAM8MfV7rxDo6fQVJMAiGjsG6Kh+wuLpPwpItk3JPUkj4acUnmJcgkmQD0jb6Yb JJW7rOG0I80JDo+b2q9j2OBgpfMaZ4DUbtloG91vweWOcp9r4I7ClfRYybsEqXOfJneK Z4yb1w1yoefvNUvGwrLm+WYjRZwhxYM55xNwFPkxxX/+5/i0uDho4BDTSfSybGdcHpVp TwVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id wi24-20020a170906fd5800b0094f174acc94si2412345ejb.408.2023.04.15.15.06.57; Sat, 15 Apr 2023 15:06:57 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B768B68BE34; Sun, 16 Apr 2023 01:06:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (unknown [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64A3E68BE17 for ; Sun, 16 Apr 2023 01:06:15 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id E6378E0C64; Sun, 16 Apr 2023 00:05:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wWcfOnw6GrZw; Sun, 16 Apr 2023 00:05:34 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 3651AE8A1B; Sun, 16 Apr 2023 00:05:33 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Apr 2023 00:05:57 +0200 Message-Id: <20230415220558.16122-5-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230415220558.16122-1-cus@passwd.hu> References: <20230415220558.16122-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/6] tests: do not override movflags defaults 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 Cc: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: +OjOTdoVMVu7 It does not matter if the default is 0, but still it is cleaner that way. Signed-off-by: Marton Balint --- libavformat/tests/movenc.c | 54 +++++++++++++++++++------------------- tests/fate/subtitles.mak | 2 +- tests/fate/vcodec.mak | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/libavformat/tests/movenc.c b/libavformat/tests/movenc.c index 6f9d381927..fca3213285 100644 --- a/libavformat/tests/movenc.c +++ b/libavformat/tests/movenc.c @@ -389,7 +389,7 @@ int main(int argc, char **argv) // samples. One moov+mdat with 1 second of data and one moof+mdat with 1 // second of data. init_out("non-empty-moov"); - av_dict_set(&opts, "movflags", "frag_keyframe", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe", 0); init(0, 0); mux_gops(2); finish(); @@ -398,7 +398,7 @@ int main(int argc, char **argv) // Write a similar file, but with B-frames and audio preroll, handled // via an edit list. init_out("non-empty-moov-elst"); - av_dict_set(&opts, "movflags", "frag_keyframe", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe", 0); av_dict_set(&opts, "use_editlist", "1", 0); init(1, 1); mux_gops(2); @@ -410,7 +410,7 @@ int main(int argc, char **argv) // of the first audio packet is > 0, but it is set to zero since edit // lists aren't used, increasing the duration of the first packet instead. init_out("non-empty-moov-no-elst"); - av_dict_set(&opts, "movflags", "frag_keyframe", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe", 0); av_dict_set(&opts, "use_editlist", "0", 0); init(1, 0); mux_gops(2); @@ -420,7 +420,7 @@ int main(int argc, char **argv) format = "ismv"; // Write an ISMV, with B-frames and audio preroll. init_out("ismv"); - av_dict_set(&opts, "movflags", "frag_keyframe", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe", 0); init(1, 1); mux_gops(2); finish(); @@ -430,7 +430,7 @@ int main(int argc, char **argv) // An initial moov that doesn't contain any samples, followed by two // moof+mdat pairs. init_out("empty-moov"); - av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0); av_dict_set(&opts, "use_editlist", "0", 0); init(0, 0); mux_gops(2); @@ -442,7 +442,7 @@ int main(int argc, char **argv) // pts/dts 0. avoid_negative_ts behaves in the same way as // in non-empty-moov-no-elst above. init_out("empty-moov-no-elst"); - av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0); init(1, 0); mux_gops(2); finish(); @@ -454,7 +454,7 @@ int main(int argc, char **argv) // This should trigger a warning - we check that the warning is produced. init_count_warnings(); init_out("empty-moov-no-elst-no-adjust"); - av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0); av_dict_set(&opts, "avoid_negative_ts", "disabled", 0); init(1, 0); mux_gops(2); @@ -467,7 +467,7 @@ int main(int argc, char **argv) // Verify that delay_moov produces the same as empty_moov for // simple input init_out("delay-moov"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0); av_dict_set(&opts, "use_editlist", "0", 0); init(0, 0); mux_gops(2); @@ -477,7 +477,7 @@ int main(int argc, char **argv) // Test writing content that requires an edit list using delay_moov init_out("delay-moov-elst"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0); init(1, 1); mux_gops(2); finish(); @@ -486,7 +486,7 @@ int main(int argc, char **argv) // Test writing a file with one track lacking packets, with delay_moov. skip_write_audio = 1; init_out("delay-moov-empty-track"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0); init(0, 0); mux_gops(2); // The automatic flushing shouldn't output anything, since we're still @@ -501,7 +501,7 @@ int main(int argc, char **argv) // Check that manually flushing still outputs things as expected. This // produces two fragments, while the one above produces only one. init_out("delay-moov-empty-track-flush"); - av_dict_set(&opts, "movflags", "frag_custom+delay_moov", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov", 0); init(0, 0); mux_gops(1); av_write_frame(ctx, NULL); // Force writing the moov @@ -519,7 +519,7 @@ int main(int argc, char **argv) // Verify that the header written by delay_moov when manually flushed // is identical to the one by empty_moov. init_out("empty-moov-header"); - av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0); av_dict_set(&opts, "use_editlist", "0", 0); init(0, 0); close_out(); @@ -542,7 +542,7 @@ int main(int argc, char **argv) finish(); init_out("delay-moov-header"); - av_dict_set(&opts, "movflags", "frag_custom+delay_moov", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov", 0); av_dict_set(&opts, "use_editlist", "0", 0); init(0, 0); check(out_size == 0, "Output written during init with delay_moov"); @@ -563,7 +563,7 @@ int main(int argc, char **argv) // Verify that we can produce an identical second fragment without // writing the first one. First write the reference fragments that // we want to reproduce. - av_dict_set(&opts, "movflags", "frag_custom+empty_moov+dash", 0); + av_dict_set(&opts, "movflags", "+frag_custom+empty_moov+dash", 0); init(0, 0); mux_gops(1); av_write_frame(ctx, NULL); // Output the first fragment @@ -576,7 +576,7 @@ int main(int argc, char **argv) // Produce the same second fragment without actually writing the first // one before. - av_dict_set(&opts, "movflags", "frag_custom+empty_moov+dash+frag_discont", 0); + av_dict_set(&opts, "movflags", "+frag_custom+empty_moov+dash+frag_discont", 0); av_dict_set(&opts, "fragment_index", "2", 0); av_dict_set(&opts, "avoid_negative_ts", "disabled", 0); av_dict_set(&opts, "use_editlist", "0", 0); @@ -591,7 +591,7 @@ int main(int argc, char **argv) // Produce the same thing by using delay_moov, which requires a slightly // different call sequence. - av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0); av_dict_set(&opts, "fragment_index", "2", 0); init(0, 0); skip_gops(1); @@ -607,7 +607,7 @@ int main(int argc, char **argv) // Test discontinuously written fragments with B-frames (where the // assumption of starting at pts=0 works) but not with audio preroll // (which can't be guessed). - av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash", 0); init(1, 0); mux_gops(1); init_out("delay-moov-elst-init"); @@ -622,7 +622,7 @@ int main(int argc, char **argv) memcpy(content, hash, HASH_SIZE); finish(); - av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0); av_dict_set(&opts, "fragment_index", "2", 0); init(1, 0); skip_gops(1); @@ -640,7 +640,7 @@ int main(int argc, char **argv) // Test discontinuously written fragments with B-frames and audio preroll, // properly signaled. - av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash", 0); init(1, 1); mux_gops(1); init_out("delay-moov-elst-signal-init"); @@ -655,7 +655,7 @@ int main(int argc, char **argv) memcpy(content, hash, HASH_SIZE); finish(); - av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0); av_dict_set(&opts, "fragment_index", "2", 0); init(1, 1); signal_init_ts(); @@ -673,7 +673,7 @@ int main(int argc, char **argv) // Test muxing discontinuous fragments with very large (> (1<<31)) timestamps. - av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0); + av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0); av_dict_set(&opts, "fragment_index", "2", 0); init(1, 1); signal_init_ts(); @@ -700,7 +700,7 @@ int main(int argc, char **argv) // match - the input stream starts at pts=-2048, but that part is excluded // by the edit list. init_out("vfr"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+dash", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov+dash", 0); init_fps(1, 1, 3); mux_frames(gop_size/2, 0); duration /= 10; @@ -719,7 +719,7 @@ int main(int argc, char **argv) init_count_warnings(); clear_duration = 1; init_out("vfr-noduration"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+dash", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov+dash", 0); init_fps(1, 1, 3); mux_frames(gop_size/2, 0); duration /= 10; @@ -735,7 +735,7 @@ int main(int argc, char **argv) // this will cause write_data_type to be called with the type unknown. force_iobuf_size = 1500; init_out("large_frag"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0); init_fps(1, 1, 3); mux_gops(2); finish(); @@ -748,7 +748,7 @@ int main(int argc, char **argv) // the expected, but we simulate dropped frames at one point. do_interleave = 1; init_out("vfr-noduration-interleave"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0); av_dict_set(&opts, "frag_duration", "650000", 0); init_fps(1, 1, 30); mux_frames(gop_size/2, 0); @@ -771,7 +771,7 @@ int main(int argc, char **argv) // with negative cts values, removing the edit list for the // video track. init_out("delay-moov-elst-neg-cts"); - av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+negative_cts_offsets", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov+negative_cts_offsets", 0); init(1, 1); mux_gops(2); finish(); @@ -781,7 +781,7 @@ int main(int argc, char **argv) // with negative cts values, avoiding any edit lists, allowing // to use empty_moov instead of delay_moov. init_out("empty-moov-neg-cts"); - av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov+negative_cts_offsets", 0); + av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov+negative_cts_offsets", 0); init(1, 0); mux_gops(2); finish(); diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak index e6684a814b..59595b9cc1 100644 --- a/tests/fate/subtitles.mak +++ b/tests/fate/subtitles.mak @@ -39,7 +39,7 @@ FATE_SUBTITLES_ASS-$(call DEMDEC, MOV, MOVTEXT) += fate-sub-movtext fate-sub-movtext: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 FATE_SUBTITLES-$(call ENCDEC, MOVTEXT, MOV) += fate-binsub-movtextenc -fate-binsub-movtextenc: CMD = md5 -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags frag_keyframe+empty_moov +fate-binsub-movtextenc: CMD = md5 -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags +frag_keyframe+empty_moov FATE_SUBTITLES_ASS-$(call DEMDEC, MPL2, MPL2) += fate-sub-mpl2 fate-sub-mpl2: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MPL2_capability_tester.txt diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index bf9de0327a..fbee264a9d 100644 --- a/tests/fate/vcodec.mak +++ b/tests/fate/vcodec.mak @@ -111,7 +111,7 @@ fate-vsynth%-dnxhd-1080i-10bit: ENCOPTS = -s hd1080 -b 185M -flags +ildct \ -pix_fmt yuv422p10 -frames 5 -qmax 8 fate-vsynth%-dnxhd-1080i-10bit: DECOPTS = -sws_flags area+accurate_rnd+bitexact -fate-vsynth%-dnxhd-1080i-colr: ENCOPTS = -s hd1080 -b 120M -flags +ildct -movflags write_colr \ +fate-vsynth%-dnxhd-1080i-colr: ENCOPTS = -s hd1080 -b 120M -flags +ildct -movflags +write_colr \ -pix_fmt yuv422p -frames 5 -qmax 8 fate-vsynth%-dnxhd-1080i-colr: DECOPTS = -sws_flags area+accurate_rnd+bitexact