From: Zhao Zhili <quinkblack@foxmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Zhao Zhili <quinkblack@foxmail.com> Subject: [FFmpeg-devel] [PATCH v2] avformat/movenc: enable compressorname for mp4 mode Date: Mon, 13 Jun 2022 00:03:59 +0800 Message-ID: <tencent_C970C82D419AAC406B9A419F4DAB094EF608@qq.com> (raw) In-Reply-To: <tencent_8D9A5940649A2D9F9FAB324E1370082DD508@qq.com> Signed-off-by: Zhao Zhili <quinkblack@foxmail.com> --- v2: update fate test libavformat/movenc.c | 5 +++-- tests/ref/lavf/mp4 | 6 +++--- tests/ref/vsynth/vsynth1-mpeg4 | 2 +- tests/ref/vsynth/vsynth2-mpeg4 | 2 +- tests/ref/vsynth/vsynth3-mpeg4 | 2 +- tests/ref/vsynth/vsynth_lena-mpeg4 | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index de971f94e8..c2dc354ed3 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2121,7 +2121,9 @@ static void find_compressor(char * compressor_name, int len, MOVTrack *track) || (track->par->width == 1440 && track->par->height == 1080) || (track->par->width == 1920 && track->par->height == 1080); - if ((track->mode == MODE_AVIF || track->mode == MODE_MOV) && + if ((track->mode == MODE_AVIF || + track->mode == MODE_MOV || + track->mode == MODE_MP4) && (encoder = av_dict_get(track->st->metadata, "encoder", NULL, 0))) { av_strlcpy(compressor_name, encoder->value, 32); } else if (track->par->codec_id == AV_CODEC_ID_MPEG2VIDEO && xdcam_res) { @@ -2210,7 +2212,6 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex avio_wb32(pb, 0); /* Data size (= 0) */ avio_wb16(pb, 1); /* Frame count (= 1) */ - /* FIXME not sure, ISO 14496-1 draft where it shall be set to 0 */ find_compressor(compressor_name, 32, track); avio_w8(pb, strlen(compressor_name)); avio_write(pb, compressor_name, 31); diff --git a/tests/ref/lavf/mp4 b/tests/ref/lavf/mp4 index 0becfd34f5..b05fa34d0b 100644 --- a/tests/ref/lavf/mp4 +++ b/tests/ref/lavf/mp4 @@ -1,9 +1,9 @@ -71c4ff2e747fe6f8169ff29244fe181d *tests/data/lavf/lavf.mp4 +a6e44724cab1c4b50c49b0fd227b87d3 *tests/data/lavf/lavf.mp4 312477 tests/data/lavf/lavf.mp4 tests/data/lavf/lavf.mp4 CRC=0x9d9a638a -3c5734ad6d05e4afc2ccefef1385e882 *tests/data/lavf/lavf.mp4 +19cbdb02f2f3e35bae779e2323be1b8e *tests/data/lavf/lavf.mp4 321363 tests/data/lavf/lavf.mp4 tests/data/lavf/lavf.mp4 CRC=0xe8130120 -07348e31d11d92396e1eedc48ea14802 *tests/data/lavf/lavf.mp4 +8ab9dd09f02b6d8146a40fc3c918d979 *tests/data/lavf/lavf.mp4 312021 tests/data/lavf/lavf.mp4 tests/data/lavf/lavf.mp4 CRC=0x9d9a638a diff --git a/tests/ref/vsynth/vsynth1-mpeg4 b/tests/ref/vsynth/vsynth1-mpeg4 index e5abc146bc..0926f3323e 100644 --- a/tests/ref/vsynth/vsynth1-mpeg4 +++ b/tests/ref/vsynth/vsynth1-mpeg4 @@ -1,4 +1,4 @@ -a7e57333c57e0f8a551374b063a41d9e *tests/data/fate/vsynth1-mpeg4.mp4 +7825630f9100ce18338dc598b56619ab *tests/data/fate/vsynth1-mpeg4.mp4 540105 tests/data/fate/vsynth1-mpeg4.mp4 f80ec173d37f2f91add031e95579a220 *tests/data/fate/vsynth1-mpeg4.out.rawvideo stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-mpeg4 b/tests/ref/vsynth/vsynth2-mpeg4 index 7857d45803..47725e0007 100644 --- a/tests/ref/vsynth/vsynth2-mpeg4 +++ b/tests/ref/vsynth/vsynth2-mpeg4 @@ -1,4 +1,4 @@ -b751a2d3b4e693ca39d4fafa0175fc9d *tests/data/fate/vsynth2-mpeg4.mp4 +74ab83b391f9c90f7f00fe2c3dfb6b3d *tests/data/fate/vsynth2-mpeg4.mp4 159330 tests/data/fate/vsynth2-mpeg4.mp4 2645405bc5350acc85ad72f3352f5135 *tests/data/fate/vsynth2-mpeg4.out.rawvideo stddev: 6.02 PSNR: 32.53 MAXDIFF: 89 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth3-mpeg4 b/tests/ref/vsynth/vsynth3-mpeg4 index a241e929c6..e2489d0501 100644 --- a/tests/ref/vsynth/vsynth3-mpeg4 +++ b/tests/ref/vsynth/vsynth3-mpeg4 @@ -1,4 +1,4 @@ -7ca3bbb8bed55d558346d258f5bea440 *tests/data/fate/vsynth3-mpeg4.mp4 +963a2970c57e1c7d46e209d5392fbeec *tests/data/fate/vsynth3-mpeg4.mp4 26037 tests/data/fate/vsynth3-mpeg4.mp4 fc0d8c1e58d254031e6207dfcae8f867 *tests/data/fate/vsynth3-mpeg4.out.rawvideo stddev: 9.66 PSNR: 28.43 MAXDIFF: 79 bytes: 86700/ 86700 diff --git a/tests/ref/vsynth/vsynth_lena-mpeg4 b/tests/ref/vsynth/vsynth_lena-mpeg4 index 375c3fc659..9b7984c68f 100644 --- a/tests/ref/vsynth/vsynth_lena-mpeg4 +++ b/tests/ref/vsynth/vsynth_lena-mpeg4 @@ -1,4 +1,4 @@ -a0d0edee19f6658d0e93d294e32a1a6f *tests/data/fate/vsynth_lena-mpeg4.mp4 +954162c34c24abe7a8fa6bfadcbb7dee *tests/data/fate/vsynth_lena-mpeg4.mp4 119742 tests/data/fate/vsynth_lena-mpeg4.mp4 9a1e085d9e488c5ead0c940c9612a37a *tests/data/fate/vsynth_lena-mpeg4.out.rawvideo stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200 -- 2.35.3 _______________________________________________ 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".
prev parent reply other threads:[~2022-06-12 16:04 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-30 7:49 [FFmpeg-devel] [PATCH 1/2] " Zhao Zhili 2022-06-12 16:03 ` Zhao Zhili [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=tencent_C970C82D419AAC406B9A419F4DAB094EF608@qq.com \ --to=quinkblack@foxmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git