From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 8/9] fftools/ffmpeg_enc: do not round frame durations prematurely Date: Sun, 1 Oct 2023 14:55:51 +0200 Message-ID: <20231001125552.23976-8-anton@khirnov.net> (raw) In-Reply-To: <20231001125552.23976-1-anton@khirnov.net> Changes the results of fate-idroq-video-encode and fate-lavf* tests, where different frames now get duplicated by framerate conversion code. --- fftools/ffmpeg_enc.c | 6 +++--- tests/ref/fate/idroq-video-encode | 2 +- tests/ref/lavf/dv_ntsc | 4 ++-- tests/ref/lavf/gxf_ntsc | 6 +++--- tests/ref/lavf/ismv | 6 +++--- tests/ref/lavf/mov | 6 +++--- tests/ref/lavf/mp4 | 6 +++--- tests/ref/lavf/mpg | 4 ++-- tests/ref/lavf/mxf | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index b40a6211a9..6c00156121 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -1030,11 +1030,11 @@ static void video_sync_process(OutputFile *of, OutputStream *ost, *nb_frames = 0; else if (delta > 0.6) e->next_pts = llrint(sync_ipts); - frame->duration = duration; + frame->duration = llrint(duration); break; case VSYNC_DROP: case VSYNC_PASSTHROUGH: - frame->duration = duration; + frame->duration = llrint(duration); e->next_pts = llrint(sync_ipts); break; default: @@ -1112,7 +1112,7 @@ static int do_video_out(OutputFile *of, OutputStream *ost, AVFrame *frame) if (frame) { FrameData *fd = frame_data(frame); - duration = lrintf(frame->duration * av_q2d(frame->time_base) / av_q2d(enc->time_base)); + duration = frame->duration * av_q2d(frame->time_base) / av_q2d(enc->time_base); if (duration <= 0 && fd->frame_rate_filter.num > 0 && fd->frame_rate_filter.den > 0) diff --git a/tests/ref/fate/idroq-video-encode b/tests/ref/fate/idroq-video-encode index bdb6fedf56..f777247efd 100644 --- a/tests/ref/fate/idroq-video-encode +++ b/tests/ref/fate/idroq-video-encode @@ -1 +1 @@ -e9ff61023826fce304350ff6e7c63b2f +6d8303bb56b8da2a63efef323aea235e diff --git a/tests/ref/lavf/dv_ntsc b/tests/ref/lavf/dv_ntsc index 410b6ec254..c6aa6b1fbb 100644 --- a/tests/ref/lavf/dv_ntsc +++ b/tests/ref/lavf/dv_ntsc @@ -1,3 +1,3 @@ -5569626370c7c72d40de2c4559e32856 *tests/data/lavf/lavf.dv_ntsc +d28a4c67aa8e3413458de9ca7e6f00ed *tests/data/lavf/lavf.dv_ntsc 3480000 tests/data/lavf/lavf.dv_ntsc -tests/data/lavf/lavf.dv_ntsc CRC=0xa0088163 +tests/data/lavf/lavf.dv_ntsc CRC=0xaa69ba6a diff --git a/tests/ref/lavf/gxf_ntsc b/tests/ref/lavf/gxf_ntsc index 60efd80462..d74e8d8ba4 100644 --- a/tests/ref/lavf/gxf_ntsc +++ b/tests/ref/lavf/gxf_ntsc @@ -1,3 +1,3 @@ -9a27673c85f1671ba9ff7cd33e5735de *tests/data/lavf/lavf.gxf_ntsc -794660 tests/data/lavf/lavf.gxf_ntsc -tests/data/lavf/lavf.gxf_ntsc CRC=0xdcd39443 +5071abe1fd46a3ca3d669203c6d45883 *tests/data/lavf/lavf.gxf_ntsc +793900 tests/data/lavf/lavf.gxf_ntsc +tests/data/lavf/lavf.gxf_ntsc CRC=0xb73f184e diff --git a/tests/ref/lavf/ismv b/tests/ref/lavf/ismv index ac7f72ba33..bb89412d8c 100644 --- a/tests/ref/lavf/ismv +++ b/tests/ref/lavf/ismv @@ -1,9 +1,9 @@ 48fb8d7a5d19bd60f3a49ccf4b7d6593 *tests/data/lavf/lavf.ismv 313169 tests/data/lavf/lavf.ismv tests/data/lavf/lavf.ismv CRC=0x9d9a638a -d19cd8e310a2e94fe0a0d11c5dc29217 *tests/data/lavf/lavf.ismv -322075 tests/data/lavf/lavf.ismv -tests/data/lavf/lavf.ismv CRC=0xe8130120 +b3ba38e148c00466441627ea04749f63 *tests/data/lavf/lavf.ismv +322247 tests/data/lavf/lavf.ismv +tests/data/lavf/lavf.ismv CRC=0xc5569484 3b6023766845b51b075aed474c00f73c *tests/data/lavf/lavf.ismv 312546 tests/data/lavf/lavf.ismv tests/data/lavf/lavf.ismv CRC=0x9d9a638a diff --git a/tests/ref/lavf/mov b/tests/ref/lavf/mov index 75a0c4892d..cfc64141aa 100644 --- a/tests/ref/lavf/mov +++ b/tests/ref/lavf/mov @@ -1,9 +1,9 @@ 11bd76730274924e02623172b82b5236 *tests/data/lavf/lavf.mov 357539 tests/data/lavf/lavf.mov tests/data/lavf/lavf.mov CRC=0xbb2b949b -6efa586655e3db043cb29668f5216610 *tests/data/lavf/lavf.mov -366621 tests/data/lavf/lavf.mov -tests/data/lavf/lavf.mov CRC=0xa9793231 +9ed9ce9b636f85b62d3c3583ff84691e *tests/data/lavf/lavf.mov +366793 tests/data/lavf/lavf.mov +tests/data/lavf/lavf.mov CRC=0xc75fc595 c80c625ded376602e71d5aa6ac6fdb1c *tests/data/lavf/lavf.mov 356921 tests/data/lavf/lavf.mov tests/data/lavf/lavf.mov CRC=0xbb2b949b diff --git a/tests/ref/lavf/mp4 b/tests/ref/lavf/mp4 index b05fa34d0b..686e4f48f8 100644 --- a/tests/ref/lavf/mp4 +++ b/tests/ref/lavf/mp4 @@ -1,9 +1,9 @@ a6e44724cab1c4b50c49b0fd227b87d3 *tests/data/lavf/lavf.mp4 312477 tests/data/lavf/lavf.mp4 tests/data/lavf/lavf.mp4 CRC=0x9d9a638a -19cbdb02f2f3e35bae779e2323be1b8e *tests/data/lavf/lavf.mp4 -321363 tests/data/lavf/lavf.mp4 -tests/data/lavf/lavf.mp4 CRC=0xe8130120 +0906d4bcb61dd8bcb21a37d6b5b48ea2 *tests/data/lavf/lavf.mp4 +321535 tests/data/lavf/lavf.mp4 +tests/data/lavf/lavf.mp4 CRC=0xc5569484 8ab9dd09f02b6d8146a40fc3c918d979 *tests/data/lavf/lavf.mp4 312021 tests/data/lavf/lavf.mp4 tests/data/lavf/lavf.mp4 CRC=0x9d9a638a diff --git a/tests/ref/lavf/mpg b/tests/ref/lavf/mpg index 332b7114b5..9cf783d26d 100644 --- a/tests/ref/lavf/mpg +++ b/tests/ref/lavf/mpg @@ -1,9 +1,9 @@ 01bbdea588da51ab4a9d1d26f3443c96 *tests/data/lavf/lavf.mpg 372736 tests/data/lavf/lavf.mpg tests/data/lavf/lavf.mpg CRC=0x000e23ae -87b447b78a7d1141b9d41bb3aa50434d *tests/data/lavf/lavf.mpg +67a87970fae5cbd878ad6353aa9138da *tests/data/lavf/lavf.mpg 389120 tests/data/lavf/lavf.mpg -tests/data/lavf/lavf.mpg CRC=0x60ba4ab9 +tests/data/lavf/lavf.mpg CRC=0x9264985a 284f41c914df75c12de01e223d65f87f *tests/data/lavf/lavf.mpg 372736 tests/data/lavf/lavf.mpg tests/data/lavf/lavf.mpg CRC=0x000e23ae diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf index 3f0c74818a..fdd1ef5c9c 100644 --- a/tests/ref/lavf/mxf +++ b/tests/ref/lavf/mxf @@ -1,9 +1,9 @@ 9ec1ad83b3400de11ca2f70b3b2d4c4d *tests/data/lavf/lavf.mxf 526393 tests/data/lavf/lavf.mxf tests/data/lavf/lavf.mxf CRC=0x8dddfaab -546eb8c864c0d76c6a9d5303701e9031 *tests/data/lavf/lavf.mxf -561721 tests/data/lavf/lavf.mxf -tests/data/lavf/lavf.mxf CRC=0x96ff1b48 +3edfabe839a29f5902969c15ebac6d8d *tests/data/lavf/lavf.mxf +551481 tests/data/lavf/lavf.mxf +tests/data/lavf/lavf.mxf CRC=0xf091e687 5bd0ce691510e6fae969886c32ad7a14 *tests/data/lavf/lavf.mxf 526393 tests/data/lavf/lavf.mxf tests/data/lavf/lavf.mxf CRC=0x8dddfaab -- 2.40.1 _______________________________________________ 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".
next prev parent reply other threads:[~2023-10-01 12:57 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-01 12:55 [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations Anton Khirnov 2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 2/9] lavf/demux: restrict video parser duration handling to just GIF Anton Khirnov 2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 3/9] lavf/gifdec: do not mark as notimestamps Anton Khirnov 2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 4/9] lavc/mpegvideo_parser: reduce variable scopes Anton Khirnov 2023-10-01 20:28 ` Michael Niedermayer 2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 5/9] lavc/mpegvideo_parser: improve exporting field-coding information Anton Khirnov 2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 6/9] lavc/mpeg4videodec: do not invent a framerate from guessed numbers Anton Khirnov 2023-10-01 13:14 ` Andreas Rheinhardt 2023-10-02 8:56 ` Anton Khirnov 2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 7/9] fftools/ffmpeg_dec: disregard demuxer timestamps for NOTIMESTAMPS formats Anton Khirnov 2023-10-01 13:18 ` Andreas Rheinhardt 2023-10-02 8:59 ` Anton Khirnov 2023-10-01 12:55 ` Anton Khirnov [this message] 2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 9/9] fftools/ffmpeg: move derivation of frame duration from filter framerate Anton Khirnov
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=20231001125552.23976-8-anton@khirnov.net \ --to=anton@khirnov.net \ --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