* [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations
@ 2023-10-01 12:55 Anton Khirnov
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 2/9] lavf/demux: restrict video parser duration handling to just GIF Anton Khirnov
` (7 more replies)
0 siblings, 8 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
---
libavfilter/yadif_common.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavfilter/yadif_common.c b/libavfilter/yadif_common.c
index b26989f574..21097011f5 100644
--- a/libavfilter/yadif_common.c
+++ b/libavfilter/yadif_common.c
@@ -151,6 +151,7 @@ int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame)
av_frame_free(&yadif->prev);
if (yadif->out->pts != AV_NOPTS_VALUE)
yadif->out->pts *= 2;
+ yadif->out->duration *= 2;
return ff_filter_frame(ctx->outputs[0], yadif->out);
}
@@ -168,6 +169,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (yadif->out->pts != AV_NOPTS_VALUE)
yadif->out->pts *= 2;
+ if (!(yadif->mode & 1))
+ yadif->out->duration *= 2;
return return_frame(ctx, 0);
}
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 2/9] lavf/demux: restrict video parser duration handling to just GIF
2023-10-01 12:55 [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations Anton Khirnov
@ 2023-10-01 12:55 ` Anton Khirnov
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 3/9] lavf/gifdec: do not mark as notimestamps Anton Khirnov
` (6 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
The parser does not have a timebase associated with it, so in general it
makes no sense for it to be exporting durations. Longer-term this
should be handled more cleanly with a new parser API.
---
libavformat/demux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/demux.c b/libavformat/demux.c
index 6decb08698..45cdb8e1b7 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -1200,7 +1200,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt,
st->time_base,
AV_ROUND_DOWN);
}
- } else if ((s->iformat->flags & AVFMT_NOTIMESTAMPS) && st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
+ } else if (st->codecpar->codec_id == AV_CODEC_ID_GIF) {
if (st->time_base.num > 0 && st->time_base.den > 0 &&
sti->parser->duration) {
out_pkt->duration = sti->parser->duration;
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 3/9] lavf/gifdec: do not mark as notimestamps
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 ` Anton Khirnov
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 4/9] lavc/mpegvideo_parser: reduce variable scopes Anton Khirnov
` (5 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
The demuxer does not set packet timestamps itself after
c6b6356635f598b095606cd126f31bc6ab916225 and instead relies on the
parser to do it. However, this does not matter from the caller
perspective as it still happens inside the demuxer. The demuxer should
thus not be flagged as not having timestamps.
---
libavformat/gifdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c
index 774358e1fa..32286adafe 100644
--- a/libavformat/gifdec.c
+++ b/libavformat/gifdec.c
@@ -285,7 +285,7 @@ const AVInputFormat ff_gif_demuxer = {
.read_probe = gif_probe,
.read_header = gif_read_header,
.read_packet = gif_read_packet,
- .flags = AVFMT_GENERIC_INDEX | AVFMT_NOTIMESTAMPS,
+ .flags = AVFMT_GENERIC_INDEX,
.extensions = "gif",
.priv_class = &demuxer_class,
};
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 4/9] lavc/mpegvideo_parser: reduce variable scopes
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 ` 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
` (4 subsequent siblings)
7 siblings, 1 reply; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
Drop some variables only used in a switch().
---
libavcodec/mpegvideo_parser.c | 33 ++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index d0b22634bb..76cd2a5131 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -105,22 +105,17 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
{
struct MpvParseContext *pc = s->priv_data;
const uint8_t *buf_end = buf + buf_size;
- uint32_t start_code;
- int frame_rate_index, ext_type, bytes_left;
- int frame_rate_ext_n, frame_rate_ext_d;
- int top_field_first, repeat_first_field, progressive_frame;
- int horiz_size_ext, vert_size_ext, bit_rate_ext;
+ int bytes_left;
int did_set_size=0;
int set_dim_ret = 0;
int bit_rate = 0;
int vbv_delay = 0;
- int chroma_format;
enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE;
//FIXME replace the crap with get_bits()
s->repeat_pict = 0;
while (buf < buf_end) {
- start_code= -1;
+ uint32_t start_code = -1;
buf= avpriv_find_start_code(buf, buf_end, &start_code);
bytes_left = buf_end - buf;
switch(start_code) {
@@ -134,6 +129,8 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
break;
case SEQ_START_CODE:
if (bytes_left >= 7) {
+ int frame_rate_index;
+
pc->width = (buf[0] << 4) | (buf[1] >> 4);
pc->height = ((buf[1] & 0x0f) << 8) | buf[2];
if(!avctx->width || !avctx->height || !avctx->coded_width || !avctx->coded_height){
@@ -154,20 +151,18 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
case EXT_START_CODE:
if (bytes_left >= 1) {
- ext_type = (buf[0] >> 4);
- switch(ext_type) {
+ switch (buf[0] >> 4) { // ext_type
case 0x1: /* sequence extension */
if (bytes_left >= 6) {
- horiz_size_ext = ((buf[1] & 1) << 1) | (buf[2] >> 7);
- vert_size_ext = (buf[2] >> 5) & 3;
- bit_rate_ext = ((buf[2] & 0x1F)<<7) | (buf[3]>>1);
- frame_rate_ext_n = (buf[5] >> 5) & 3;
- frame_rate_ext_d = (buf[5] & 0x1f);
+ int horiz_size_ext = ((buf[1] & 1) << 1) | (buf[2] >> 7);
+ int vert_size_ext = (buf[2] >> 5) & 3;
+ int bit_rate_ext = ((buf[2] & 0x1F)<<7) | (buf[3]>>1);
+ int frame_rate_ext_n = (buf[5] >> 5) & 3;
+ int frame_rate_ext_d = (buf[5] & 0x1f);
pc->progressive_sequence = buf[1] & (1 << 3);
avctx->has_b_frames= !(buf[5] >> 7);
- chroma_format = (buf[1] >> 1) & 3;
- switch (chroma_format) {
+ switch ((buf[1] >> 1) & 3) { // chroma_format
case 1: pix_fmt = AV_PIX_FMT_YUV420P; break;
case 2: pix_fmt = AV_PIX_FMT_YUV422P; break;
case 3: pix_fmt = AV_PIX_FMT_YUV444P; break;
@@ -190,9 +185,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
case 0x8: /* picture coding extension */
if (bytes_left >= 5) {
- top_field_first = buf[3] & (1 << 7);
- repeat_first_field = buf[3] & (1 << 1);
- progressive_frame = buf[4] & (1 << 7);
+ int top_field_first = buf[3] & (1 << 7);
+ int repeat_first_field = buf[3] & (1 << 1);
+ int progressive_frame = buf[4] & (1 << 7);
/* check if we must repeat the frame */
if (repeat_first_field) {
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 5/9] lavc/mpegvideo_parser: improve exporting field-coding information
2023-10-01 12:55 [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations Anton Khirnov
` (2 preceding siblings ...)
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 4/9] lavc/mpegvideo_parser: reduce variable scopes Anton Khirnov
@ 2023-10-01 12:55 ` Anton Khirnov
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 6/9] lavc/mpeg4videodec: do not invent a framerate from guessed numbers Anton Khirnov
` (3 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
* export AVCodecParserContext.picture_structure.
* when there are two field pictures in the packet, set
the interlacing parameters accordingly:
* repeat_pict=1 and picture_structure=FRAME to indicate 2 fields
* field_order to indicate the first field of the two
---
libavcodec/mpegvideo_parser.c | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 76cd2a5131..2cd0348317 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -111,9 +111,15 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
int bit_rate = 0;
int vbv_delay = 0;
enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE;
-//FIXME replace the crap with get_bits()
- s->repeat_pict = 0;
+ // number of picture coding extensions (i.e. MPEG2 pictures)
+ // in this packet - should be 1 or 2
+ int nb_pic_ext = 0;
+ // when there are two pictures in the packet this indicates
+ // which field is in the first of them
+ int first_field = AV_FIELD_UNKNOWN;
+
+//FIXME replace the crap with get_bits()
while (buf < buf_end) {
uint32_t start_code = -1;
buf= avpriv_find_start_code(buf, buf_end, &start_code);
@@ -124,7 +130,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
s->pict_type = (buf[1] >> 3) & 7;
if (bytes_left >= 4)
vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3);
- s->repeat_pict = 1;
}
break;
case SEQ_START_CODE:
@@ -190,6 +195,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
int progressive_frame = buf[4] & (1 << 7);
/* check if we must repeat the frame */
+ s->repeat_pict = 1;
if (repeat_first_field) {
if (pc->progressive_sequence) {
if (top_field_first)
@@ -208,6 +214,19 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->field_order = AV_FIELD_BB;
} else
s->field_order = AV_FIELD_PROGRESSIVE;
+
+ s->picture_structure = buf[2] & 3;
+
+ if (!nb_pic_ext) {
+ // remember parity of the first field for the case
+ // when there are 2 fields in packet
+ switch (s->picture_structure) {
+ case AV_PICTURE_STRUCTURE_BOTTOM_FIELD: first_field = AV_FIELD_BB; break;
+ case AV_PICTURE_STRUCTURE_TOP_FIELD: first_field = AV_FIELD_TT; break;
+ }
+ }
+
+ nb_pic_ext++;
}
break;
}
@@ -243,6 +262,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->coded_width = FFALIGN(pc->width, 16);
s->coded_height = FFALIGN(pc->height, 16);
}
+
+ if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO || nb_pic_ext > 1) {
+ s->repeat_pict = 1;
+ s->picture_structure = AV_PICTURE_STRUCTURE_FRAME;
+ s->field_order = nb_pic_ext > 1 ? first_field : AV_FIELD_PROGRESSIVE;
+ }
}
static int mpegvideo_parse(AVCodecParserContext *s,
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 6/9] lavc/mpeg4videodec: do not invent a framerate from guessed numbers
2023-10-01 12:55 [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations Anton Khirnov
` (3 preceding siblings ...)
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 ` Anton Khirnov
2023-10-01 13:14 ` Andreas Rheinhardt
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 7/9] fftools/ffmpeg_dec: disregard demuxer timestamps for NOTIMESTAMPS formats Anton Khirnov
` (2 subsequent siblings)
7 siblings, 1 reply; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
Improves timestamps for fate-m4v*
---
libavcodec/mpeg4videodec.c | 3 --
tests/ref/fate/m4v | 84 +++++++++++++++++++-------------------
tests/ref/fate/m4v-cfr | 1 +
3 files changed, 43 insertions(+), 45 deletions(-)
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index a8dd57bf6b..b24fe3db20 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -3141,9 +3141,6 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb,
av_log(s->avctx, AV_LOG_WARNING,
"time_increment_bits set to %d bits, based on bitstream analysis\n", ctx->time_increment_bits);
- if (s->avctx->framerate.num && 4*s->avctx->framerate.num < 1<<ctx->time_increment_bits) {
- s->avctx->framerate.num = 1<<ctx->time_increment_bits;
- }
}
if (IS_3IV1)
diff --git a/tests/ref/fate/m4v b/tests/ref/fate/m4v
index cebe443adc..4eee84d01b 100644
--- a/tests/ref/fate/m4v
+++ b/tests/ref/fate/m4v
@@ -1,47 +1,47 @@
-#tb 0: 1/60
+#tb 0: 1/5
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 320x240
#sar 0: 1/1
0, 0, 0, 1, 115200, 0x7262156b
-0, 11, 11, 1, 115200, 0xa6aebc2f
-0, 22, 22, 1, 115200, 0x9c7beba1
-0, 33, 33, 1, 115200, 0x556037a2
-0, 44, 44, 1, 115200, 0x532e3a23
-0, 60, 60, 1, 115200, 0x110511f4
-0, 71, 71, 1, 115200, 0xb7f929a4
-0, 82, 82, 1, 115200, 0xdab9f3c2
-0, 93, 93, 1, 115200, 0x441413dd
-0, 104, 104, 1, 115200, 0x01163f33
-0, 120, 120, 1, 115200, 0x47720c78
-0, 131, 131, 1, 115200, 0x07c21356
-0, 142, 142, 1, 115200, 0x085d4291
-0, 153, 153, 1, 115200, 0xf6db074c
-0, 164, 164, 1, 115200, 0x95093e75
-0, 180, 180, 1, 115200, 0x5f8118ef
-0, 191, 191, 1, 115200, 0x2b4de34a
-0, 202, 202, 1, 115200, 0x0a731857
-0, 213, 213, 1, 115200, 0xd75ef3be
-0, 224, 224, 1, 115200, 0x321cf5a9
-0, 240, 240, 1, 115200, 0x3eb222fd
-0, 251, 251, 1, 115200, 0xc7d92f3e
-0, 262, 262, 1, 115200, 0x6fda0366
-0, 273, 273, 1, 115200, 0x6bb61b03
-0, 284, 284, 1, 115200, 0x5f367ef8
-0, 300, 300, 1, 115200, 0x237d0c77
-0, 311, 311, 1, 115200, 0xafa813ef
-0, 322, 322, 1, 115200, 0x39263ef4
-0, 333, 333, 1, 115200, 0x47c70441
-0, 344, 344, 1, 115200, 0xd43fffb0
-0, 360, 360, 1, 115200, 0x75696afb
-0, 371, 371, 1, 115200, 0xb0f117a3
-0, 382, 382, 1, 115200, 0x002f42f0
-0, 393, 393, 1, 115200, 0xa192487e
-0, 404, 404, 1, 115200, 0x19a7072e
-0, 420, 420, 1, 115200, 0xc500669c
-0, 431, 431, 1, 115200, 0xe4636ba9
-0, 442, 442, 1, 115200, 0xdf3d5d86
-0, 453, 453, 1, 115200, 0xf30825d5
-0, 464, 464, 1, 115200, 0xe3c944a1
-0, 480, 480, 1, 115200, 0x8fec4420
-0, 491, 491, 1, 115200, 0x9381fdab
+0, 1, 1, 1, 115200, 0xa6aebc2f
+0, 2, 2, 1, 115200, 0x9c7beba1
+0, 3, 3, 1, 115200, 0x556037a2
+0, 4, 4, 1, 115200, 0x532e3a23
+0, 5, 5, 1, 115200, 0x110511f4
+0, 6, 6, 1, 115200, 0xb7f929a4
+0, 7, 7, 1, 115200, 0xdab9f3c2
+0, 8, 8, 1, 115200, 0x441413dd
+0, 9, 9, 1, 115200, 0x01163f33
+0, 10, 10, 1, 115200, 0x47720c78
+0, 11, 11, 1, 115200, 0x07c21356
+0, 12, 12, 1, 115200, 0x085d4291
+0, 13, 13, 1, 115200, 0xf6db074c
+0, 14, 14, 1, 115200, 0x95093e75
+0, 15, 15, 1, 115200, 0x5f8118ef
+0, 16, 16, 1, 115200, 0x2b4de34a
+0, 17, 17, 1, 115200, 0x0a731857
+0, 18, 18, 1, 115200, 0xd75ef3be
+0, 19, 19, 1, 115200, 0x321cf5a9
+0, 20, 20, 1, 115200, 0x3eb222fd
+0, 21, 21, 1, 115200, 0xc7d92f3e
+0, 22, 22, 1, 115200, 0x6fda0366
+0, 23, 23, 1, 115200, 0x6bb61b03
+0, 24, 24, 1, 115200, 0x5f367ef8
+0, 25, 25, 1, 115200, 0x237d0c77
+0, 26, 26, 1, 115200, 0xafa813ef
+0, 27, 27, 1, 115200, 0x39263ef4
+0, 28, 28, 1, 115200, 0x47c70441
+0, 29, 29, 1, 115200, 0xd43fffb0
+0, 30, 30, 1, 115200, 0x75696afb
+0, 31, 31, 1, 115200, 0xb0f117a3
+0, 32, 32, 1, 115200, 0x002f42f0
+0, 33, 33, 1, 115200, 0xa192487e
+0, 34, 34, 1, 115200, 0x19a7072e
+0, 35, 35, 1, 115200, 0xc500669c
+0, 36, 36, 1, 115200, 0xe4636ba9
+0, 37, 37, 1, 115200, 0xdf3d5d86
+0, 38, 38, 1, 115200, 0xf30825d5
+0, 39, 39, 1, 115200, 0xe3c944a1
+0, 40, 40, 1, 115200, 0x8fec4420
+0, 41, 41, 1, 115200, 0x9381fdab
diff --git a/tests/ref/fate/m4v-cfr b/tests/ref/fate/m4v-cfr
index e2d02032fe..4eee84d01b 100644
--- a/tests/ref/fate/m4v-cfr
+++ b/tests/ref/fate/m4v-cfr
@@ -44,3 +44,4 @@
0, 38, 38, 1, 115200, 0xf30825d5
0, 39, 39, 1, 115200, 0xe3c944a1
0, 40, 40, 1, 115200, 0x8fec4420
+0, 41, 41, 1, 115200, 0x9381fdab
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 7/9] fftools/ffmpeg_dec: disregard demuxer timestamps for NOTIMESTAMPS formats
2023-10-01 12:55 [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations Anton Khirnov
` (4 preceding siblings ...)
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 12:55 ` Anton Khirnov
2023-10-01 13:18 ` Andreas Rheinhardt
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 8/9] fftools/ffmpeg_enc: do not round frame durations prematurely Anton Khirnov
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 9/9] fftools/ffmpeg: move derivation of frame duration from filter framerate Anton Khirnov
7 siblings, 1 reply; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
In this case any timestamps are guessed by compute_pkt_fields() in
libavformat. Since we are decoding the stream, we have more accurate
information from the decoder and do not need any guesses.
Eliminates spurious PTS gaps in a number of FATE tests.
Also avoids dropping the majority of frames in fate-dirac*
---
fftools/ffmpeg_dec.c | 8 +++-
tests/ref/fate/dirac | 28 ++++++++++++++
tests/ref/fate/dirac-low-delay | 28 ++++++++++++++
tests/ref/fate/mpeg2-ticket6677 | 14 +++----
tests/ref/fate/vc1_ilaced_twomv | 24 ++++++------
tests/ref/fate/vc1_sa00040 | 12 +++---
tests/ref/fate/vc1_sa00050 | 28 +++++++-------
tests/ref/fate/vc1_sa10091 | 26 ++++++-------
tests/ref/fate/vc1_sa10143 | 58 ++++++++++++++---------------
tests/ref/fate/vc1_sa20021 | 62 +++++++++++++++----------------
tests/ref/fate/xvid-custom-matrix | 2 +-
tests/ref/fate/xvid-idct | 2 +-
12 files changed, 177 insertions(+), 115 deletions(-)
diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c
index 1de8234a97..fcee8b65ac 100644
--- a/fftools/ffmpeg_dec.c
+++ b/fftools/ffmpeg_dec.c
@@ -540,8 +540,9 @@ static int send_filter_eof(InputStream *ist)
return 0;
}
-static int packet_decode(InputStream *ist, const AVPacket *pkt, AVFrame *frame)
+static int packet_decode(InputStream *ist, AVPacket *pkt, AVFrame *frame)
{
+ const InputFile *ifile = input_files[ist->file_index];
Decoder *d = ist->decoder;
AVCodecContext *dec = ist->dec_ctx;
const char *type_desc = av_get_media_type_string(dec->codec_type);
@@ -556,6 +557,11 @@ static int packet_decode(InputStream *ist, const AVPacket *pkt, AVFrame *frame)
if (pkt && pkt->size == 0)
return 0;
+ if (pkt && ifile->format_nots) {
+ pkt->pts = AV_NOPTS_VALUE;
+ pkt->dts = AV_NOPTS_VALUE;
+ }
+
ret = avcodec_send_packet(dec, pkt);
if (ret < 0 && !(ret == AVERROR_EOF && !pkt)) {
// In particular, we don't expect AVERROR(EAGAIN), because we read all
diff --git a/tests/ref/fate/dirac b/tests/ref/fate/dirac
index f3f3dafb19..2027a44395 100644
--- a/tests/ref/fate/dirac
+++ b/tests/ref/fate/dirac
@@ -5,3 +5,31 @@
#sar 0: 1/1
0, 0, 0, 1, 115200, 0xf73819e8
0, 1, 1, 1, 115200, 0x082e3788
+0, 2, 2, 1, 115200, 0x9fe73790
+0, 3, 3, 1, 115200, 0x58f63cc4
+0, 4, 4, 1, 115200, 0xd91c3767
+0, 5, 5, 1, 115200, 0xac39658c
+0, 6, 6, 1, 115200, 0xd6d57406
+0, 7, 7, 1, 115200, 0x791b707f
+0, 8, 8, 1, 115200, 0x02e05e31
+0, 9, 9, 1, 115200, 0x7737ca43
+0, 10, 10, 1, 115200, 0xa9b5b019
+0, 11, 11, 1, 115200, 0x8b2685be
+0, 12, 12, 1, 115200, 0x2f547334
+0, 13, 13, 1, 115200, 0x9c2ba0ad
+0, 14, 14, 1, 115200, 0x17069da3
+0, 15, 15, 1, 115200, 0xbc7fadd1
+0, 16, 16, 1, 115200, 0xbf651cce
+0, 17, 17, 1, 115200, 0x2e1abc0d
+0, 18, 18, 1, 115200, 0xc6c9a945
+0, 19, 19, 1, 115200, 0x5234c510
+0, 20, 20, 1, 115200, 0x84b5ab26
+0, 21, 21, 1, 115200, 0xf01da61e
+0, 22, 22, 1, 115200, 0xfb339d74
+0, 23, 23, 1, 115200, 0x0973bf98
+0, 24, 24, 1, 115200, 0x7467023a
+0, 25, 25, 1, 115200, 0x3c8ba9a1
+0, 26, 26, 1, 115200, 0xdc699e3e
+0, 27, 27, 1, 115200, 0xe57f9d2e
+0, 28, 28, 1, 115200, 0x79b18bc4
+0, 29, 29, 1, 115200, 0x4c4c98a0
diff --git a/tests/ref/fate/dirac-low-delay b/tests/ref/fate/dirac-low-delay
index 13bf8e8517..758f17f05d 100644
--- a/tests/ref/fate/dirac-low-delay
+++ b/tests/ref/fate/dirac-low-delay
@@ -5,3 +5,31 @@
#sar 0: 1/1
0, 0, 0, 1, 115200, 0x2599a172
0, 1, 1, 1, 115200, 0x08a8c08d
+0, 2, 2, 1, 115200, 0xf586aa9e
+0, 3, 3, 1, 115200, 0x5295c51e
+0, 4, 4, 1, 115200, 0x06b3d0c4
+0, 5, 5, 1, 115200, 0xed28999a
+0, 6, 6, 1, 115200, 0x566e7b4b
+0, 7, 7, 1, 115200, 0x146f8309
+0, 8, 8, 1, 115200, 0x9f57cbbc
+0, 9, 9, 1, 115200, 0xc9d6c278
+0, 10, 10, 1, 115200, 0xaf76c2eb
+0, 11, 11, 1, 115200, 0xf83854c7
+0, 12, 12, 1, 115200, 0x73a5c2c3
+0, 13, 13, 1, 115200, 0x91eb991f
+0, 14, 14, 1, 115200, 0x886a8c3b
+0, 15, 15, 1, 115200, 0x469ca5a8
+0, 16, 16, 1, 115200, 0x4666791d
+0, 17, 17, 1, 115200, 0xe010cab0
+0, 18, 18, 1, 115200, 0x1130ab51
+0, 19, 19, 1, 115200, 0x9fb4cca2
+0, 20, 20, 1, 115200, 0xd6e0b861
+0, 21, 21, 1, 115200, 0xd7289bea
+0, 22, 22, 1, 115200, 0x71bb6079
+0, 23, 23, 1, 115200, 0xf43ba8b6
+0, 24, 24, 1, 115200, 0xfb02a209
+0, 25, 25, 1, 115200, 0x45f2e2ce
+0, 26, 26, 1, 115200, 0x9b28a90a
+0, 27, 27, 1, 115200, 0x037ca263
+0, 28, 28, 1, 115200, 0x1985baba
+0, 29, 29, 1, 115200, 0x05a5a7f7
diff --git a/tests/ref/fate/mpeg2-ticket6677 b/tests/ref/fate/mpeg2-ticket6677
index 01e46b559b..faf4721726 100644
--- a/tests/ref/fate/mpeg2-ticket6677
+++ b/tests/ref/fate/mpeg2-ticket6677
@@ -3,10 +3,10 @@
#codec_id 0: rawvideo
#dimensions 0: 720x480
#sar 0: 8/9
-0, 1, 1, 1, 518400, 0xc1866f5f
-0, 2, 2, 2, 518400, 0x9ba32764
-0, 4, 4, 1, 518400, 0xa9031bb8
-0, 5, 5, 1, 518400, 0x5e2c3502
-0, 6, 6, 1, 518400, 0xe860027a
-0, 7, 7, 2, 518400, 0xa9152430
-0, 9, 9, 1, 518400, 0xb98dd9f7
+0, 0, 0, 1, 518400, 0xc1866f5f
+0, 1, 1, 2, 518400, 0x9ba32764
+0, 3, 3, 1, 518400, 0xa9031bb8
+0, 4, 4, 1, 518400, 0x5e2c3502
+0, 5, 5, 1, 518400, 0xe860027a
+0, 6, 6, 2, 518400, 0xa9152430
+0, 8, 8, 1, 518400, 0xb98dd9f7
diff --git a/tests/ref/fate/vc1_ilaced_twomv b/tests/ref/fate/vc1_ilaced_twomv
index 096e5fc87b..99f346d4ab 100644
--- a/tests/ref/fate/vc1_ilaced_twomv
+++ b/tests/ref/fate/vc1_ilaced_twomv
@@ -4,15 +4,15 @@
#dimensions 0: 1920x1080
#sar 0: 1/1
0, 0, 0, 1, 3110400, 0xc95e8861
-0, 2, 2, 1, 3110400, 0xf58b5cbf
-0, 3, 3, 1, 3110400, 0x2f866f33
-0, 4, 4, 1, 3110400, 0x05c18415
-0, 5, 5, 1, 3110400, 0x4077ca93
-0, 6, 6, 1, 3110400, 0x44d105fc
-0, 7, 7, 1, 3110400, 0xa0608374
-0, 8, 8, 1, 3110400, 0x407689dc
-0, 9, 9, 1, 3110400, 0x4707d00a
-0, 10, 10, 1, 3110400, 0x74986831
-0, 11, 11, 1, 3110400, 0xa5912619
-0, 12, 12, 1, 3110400, 0x44aa5565
-0, 13, 13, 1, 3110400, 0xb9752774
+0, 1, 1, 1, 3110400, 0xf58b5cbf
+0, 2, 2, 1, 3110400, 0x2f866f33
+0, 3, 3, 1, 3110400, 0x05c18415
+0, 4, 4, 1, 3110400, 0x4077ca93
+0, 5, 5, 1, 3110400, 0x44d105fc
+0, 6, 6, 1, 3110400, 0xa0608374
+0, 7, 7, 1, 3110400, 0x407689dc
+0, 8, 8, 1, 3110400, 0x4707d00a
+0, 9, 9, 1, 3110400, 0x74986831
+0, 10, 10, 1, 3110400, 0xa5912619
+0, 11, 11, 1, 3110400, 0x44aa5565
+0, 12, 12, 1, 3110400, 0xb9752774
diff --git a/tests/ref/fate/vc1_sa00040 b/tests/ref/fate/vc1_sa00040
index 554b838ff0..44844cabb3 100644
--- a/tests/ref/fate/vc1_sa00040
+++ b/tests/ref/fate/vc1_sa00040
@@ -6,15 +6,15 @@
0, 0, 0, 1, 38016, 0xa6f15db5
0, 1, 1, 1, 38016, 0xa6f15db5
0, 2, 2, 1, 38016, 0xa6f15db5
-0, 4, 4, 1, 38016, 0x5c4ef0e7
-0, 5, 5, 1, 38016, 0x53a42d1d
-0, 6, 6, 1, 38016, 0x68f7d89e
+0, 3, 3, 1, 38016, 0x5c4ef0e7
+0, 4, 4, 1, 38016, 0x53a42d1d
+0, 5, 5, 1, 38016, 0x68f7d89e
+0, 6, 6, 1, 38016, 0xc15f4368
0, 7, 7, 1, 38016, 0xc15f4368
-0, 8, 8, 1, 38016, 0xc15f4368
+0, 8, 8, 1, 38016, 0xd1bd47a8
0, 9, 9, 1, 38016, 0xd1bd47a8
-0, 10, 10, 1, 38016, 0xd1bd47a8
+0, 10, 10, 1, 38016, 0xe1e821ca
0, 11, 11, 1, 38016, 0xe1e821ca
0, 12, 12, 1, 38016, 0xe1e821ca
0, 13, 13, 1, 38016, 0xe1e821ca
0, 14, 14, 1, 38016, 0xe1e821ca
-0, 15, 15, 1, 38016, 0xe1e821ca
diff --git a/tests/ref/fate/vc1_sa00050 b/tests/ref/fate/vc1_sa00050
index d30b1bfbe3..b8e89352f7 100644
--- a/tests/ref/fate/vc1_sa00050
+++ b/tests/ref/fate/vc1_sa00050
@@ -6,13 +6,14 @@
0, 0, 0, 1, 115200, 0xb8830eef
0, 1, 1, 1, 115200, 0xb8830eef
0, 2, 2, 1, 115200, 0xb8830eef
-0, 4, 4, 1, 115200, 0x952ff5e1
-0, 5, 5, 1, 115200, 0xa4362b14
-0, 6, 6, 1, 115200, 0x32bacbe7
+0, 3, 3, 1, 115200, 0x952ff5e1
+0, 4, 4, 1, 115200, 0xa4362b14
+0, 5, 5, 1, 115200, 0x32bacbe7
+0, 6, 6, 1, 115200, 0x509eb814
0, 7, 7, 1, 115200, 0x509eb814
-0, 8, 8, 1, 115200, 0x509eb814
+0, 8, 8, 1, 115200, 0x11a76c3e
0, 9, 9, 1, 115200, 0x11a76c3e
-0, 10, 10, 1, 115200, 0x11a76c3e
+0, 10, 10, 1, 115200, 0x00cf734a
0, 11, 11, 1, 115200, 0x00cf734a
0, 12, 12, 1, 115200, 0x00cf734a
0, 13, 13, 1, 115200, 0x00cf734a
@@ -20,16 +21,15 @@
0, 15, 15, 1, 115200, 0x00cf734a
0, 16, 16, 1, 115200, 0x00cf734a
0, 17, 17, 1, 115200, 0x00cf734a
-0, 18, 18, 1, 115200, 0x00cf734a
+0, 18, 18, 1, 115200, 0xfddf48e6
0, 19, 19, 1, 115200, 0xfddf48e6
-0, 20, 20, 1, 115200, 0xfddf48e6
-0, 21, 21, 1, 115200, 0x1eccebbf
-0, 22, 22, 1, 115200, 0x3da2f77e
-0, 23, 23, 1, 115200, 0x7c232572
-0, 24, 24, 1, 115200, 0xedf426e5
+0, 20, 20, 1, 115200, 0x1eccebbf
+0, 21, 21, 1, 115200, 0x3da2f77e
+0, 22, 22, 1, 115200, 0x7c232572
+0, 23, 23, 1, 115200, 0xedf426e5
+0, 24, 24, 1, 115200, 0x5324ab20
0, 25, 25, 1, 115200, 0x5324ab20
-0, 26, 26, 1, 115200, 0x5324ab20
-0, 27, 27, 1, 115200, 0xa23e66bb
+0, 26, 26, 1, 115200, 0xa23e66bb
+0, 27, 27, 1, 115200, 0x680a50ff
0, 28, 28, 1, 115200, 0x680a50ff
0, 29, 29, 1, 115200, 0x680a50ff
-0, 30, 30, 1, 115200, 0x680a50ff
diff --git a/tests/ref/fate/vc1_sa10091 b/tests/ref/fate/vc1_sa10091
index ebfe2710ca..63f25c2b6a 100644
--- a/tests/ref/fate/vc1_sa10091
+++ b/tests/ref/fate/vc1_sa10091
@@ -4,32 +4,32 @@
#dimensions 0: 720x480
#sar 0: 1/1
0, 0, 0, 1, 518400, 0xae20b4fa
+0, 1, 1, 1, 518400, 0x2b4ccdf9
0, 2, 2, 1, 518400, 0x2b4ccdf9
0, 3, 3, 1, 518400, 0x2b4ccdf9
0, 4, 4, 1, 518400, 0x2b4ccdf9
0, 5, 5, 1, 518400, 0x2b4ccdf9
-0, 6, 6, 1, 518400, 0x2b4ccdf9
+0, 6, 6, 1, 518400, 0x70d9a891
0, 7, 7, 1, 518400, 0x70d9a891
0, 8, 8, 1, 518400, 0x70d9a891
-0, 9, 9, 1, 518400, 0x70d9a891
-0, 10, 10, 1, 518400, 0xa461ee86
+0, 9, 9, 1, 518400, 0xa461ee86
+0, 10, 10, 1, 518400, 0x722bc6e8
0, 11, 11, 1, 518400, 0x722bc6e8
0, 12, 12, 1, 518400, 0x722bc6e8
-0, 13, 13, 1, 518400, 0x722bc6e8
+0, 13, 13, 1, 518400, 0xf752fd2c
0, 14, 14, 1, 518400, 0xf752fd2c
-0, 15, 15, 1, 518400, 0xf752fd2c
-0, 16, 16, 1, 518400, 0x91abcaca
+0, 15, 15, 1, 518400, 0x91abcaca
+0, 16, 16, 1, 518400, 0x572727c3
0, 17, 17, 1, 518400, 0x572727c3
-0, 18, 18, 1, 518400, 0x572727c3
+0, 18, 18, 1, 518400, 0x24c12382
0, 19, 19, 1, 518400, 0x24c12382
-0, 20, 20, 1, 518400, 0x24c12382
+0, 20, 20, 1, 518400, 0x9aa39fe8
0, 21, 21, 1, 518400, 0x9aa39fe8
-0, 22, 22, 1, 518400, 0x9aa39fe8
-0, 23, 23, 1, 518400, 0x5cb6bd19
-0, 24, 24, 1, 518400, 0x704d9300
+0, 22, 22, 1, 518400, 0x5cb6bd19
+0, 23, 23, 1, 518400, 0x704d9300
+0, 24, 24, 1, 518400, 0x590fad49
0, 25, 25, 1, 518400, 0x590fad49
0, 26, 26, 1, 518400, 0x590fad49
-0, 27, 27, 1, 518400, 0x590fad49
+0, 27, 27, 1, 518400, 0x46bea10b
0, 28, 28, 1, 518400, 0x46bea10b
0, 29, 29, 1, 518400, 0x46bea10b
-0, 30, 30, 1, 518400, 0x46bea10b
diff --git a/tests/ref/fate/vc1_sa10143 b/tests/ref/fate/vc1_sa10143
index db89cc9e41..cf59ab9b12 100644
--- a/tests/ref/fate/vc1_sa10143
+++ b/tests/ref/fate/vc1_sa10143
@@ -4,32 +4,32 @@
#dimensions 0: 720x480
#sar 0: 1/1
0, 0, 0, 1, 518400, 0x34fa7f55
-0, 2, 2, 1, 518400, 0x60466bc1
-0, 3, 3, 1, 518400, 0xe68dff1e
-0, 4, 4, 1, 518400, 0x790ac06a
-0, 5, 5, 1, 518400, 0xb3b26b27
-0, 6, 6, 1, 518400, 0x8840096c
-0, 7, 7, 1, 518400, 0xf75c3d61
-0, 8, 8, 1, 518400, 0xca071781
-0, 9, 9, 1, 518400, 0xa8e6edf9
-0, 10, 10, 1, 518400, 0xabb61984
-0, 11, 11, 1, 518400, 0x0b31dedd
-0, 12, 12, 1, 518400, 0xf44378ef
-0, 13, 13, 1, 518400, 0xf7268996
-0, 14, 14, 1, 518400, 0x8c5b1ff4
-0, 15, 15, 1, 518400, 0xda356fd2
-0, 16, 16, 1, 518400, 0x0e091c57
-0, 17, 17, 1, 518400, 0x17645e68
-0, 18, 18, 1, 518400, 0xf47a71ef
-0, 19, 19, 1, 518400, 0x6c440498
-0, 20, 20, 1, 518400, 0xd705bd32
-0, 21, 21, 1, 518400, 0x0800edd0
-0, 22, 22, 1, 518400, 0x902be119
-0, 23, 23, 1, 518400, 0x0f7d7bc4
-0, 24, 24, 1, 518400, 0x9f4dc421
-0, 25, 25, 1, 518400, 0x3b8c8d5a
-0, 26, 26, 1, 518400, 0xbcdfb2b9
-0, 27, 27, 1, 518400, 0xa02a46c3
-0, 28, 28, 1, 518400, 0x8ecde915
-0, 29, 29, 1, 518400, 0x20576bfd
-0, 30, 30, 1, 518400, 0xac40bc36
+0, 1, 1, 1, 518400, 0x60466bc1
+0, 2, 2, 1, 518400, 0xe68dff1e
+0, 3, 3, 1, 518400, 0x790ac06a
+0, 4, 4, 1, 518400, 0xb3b26b27
+0, 5, 5, 1, 518400, 0x8840096c
+0, 6, 6, 1, 518400, 0xf75c3d61
+0, 7, 7, 1, 518400, 0xca071781
+0, 8, 8, 1, 518400, 0xa8e6edf9
+0, 9, 9, 1, 518400, 0xabb61984
+0, 10, 10, 1, 518400, 0x0b31dedd
+0, 11, 11, 1, 518400, 0xf44378ef
+0, 12, 12, 1, 518400, 0xf7268996
+0, 13, 13, 1, 518400, 0x8c5b1ff4
+0, 14, 14, 1, 518400, 0xda356fd2
+0, 15, 15, 1, 518400, 0x0e091c57
+0, 16, 16, 1, 518400, 0x17645e68
+0, 17, 17, 1, 518400, 0xf47a71ef
+0, 18, 18, 1, 518400, 0x6c440498
+0, 19, 19, 1, 518400, 0xd705bd32
+0, 20, 20, 1, 518400, 0x0800edd0
+0, 21, 21, 1, 518400, 0x902be119
+0, 22, 22, 1, 518400, 0x0f7d7bc4
+0, 23, 23, 1, 518400, 0x9f4dc421
+0, 24, 24, 1, 518400, 0x3b8c8d5a
+0, 25, 25, 1, 518400, 0xbcdfb2b9
+0, 26, 26, 1, 518400, 0xa02a46c3
+0, 27, 27, 1, 518400, 0x8ecde915
+0, 28, 28, 1, 518400, 0x20576bfd
+0, 29, 29, 1, 518400, 0xac40bc36
diff --git a/tests/ref/fate/vc1_sa20021 b/tests/ref/fate/vc1_sa20021
index 450504f83c..11b7ed71ca 100644
--- a/tests/ref/fate/vc1_sa20021
+++ b/tests/ref/fate/vc1_sa20021
@@ -4,62 +4,62 @@
#dimensions 0: 704x480
#sar 0: 1/1
0, 0, 0, 1, 506880, 0x884bc093
-0, 2, 2, 1, 506880, 0x4b09548f
-0, 3, 3, 1, 506880, 0x195cbee1
-0, 4, 4, 1, 506880, 0xc8141e28
-0, 5, 5, 1, 506880, 0xb170c49b
+0, 1, 1, 1, 506880, 0x4b09548f
+0, 2, 2, 1, 506880, 0x195cbee1
+0, 3, 3, 1, 506880, 0xc8141e28
+0, 4, 4, 1, 506880, 0xb170c49b
+0, 5, 5, 1, 506880, 0x2782268a
0, 6, 6, 1, 506880, 0x2782268a
0, 7, 7, 1, 506880, 0x2782268a
0, 8, 8, 1, 506880, 0x2782268a
-0, 9, 9, 1, 506880, 0x2782268a
+0, 9, 9, 1, 506880, 0xe6803b32
0, 10, 10, 1, 506880, 0xe6803b32
-0, 11, 11, 1, 506880, 0xe6803b32
+0, 11, 11, 1, 506880, 0xa5ef9baf
0, 12, 12, 1, 506880, 0xa5ef9baf
-0, 13, 13, 1, 506880, 0xa5ef9baf
-0, 14, 14, 1, 506880, 0x46e8cbcb
-0, 15, 15, 1, 506880, 0x28a2239b
+0, 13, 13, 1, 506880, 0x46e8cbcb
+0, 14, 14, 1, 506880, 0x28a2239b
+0, 15, 15, 1, 506880, 0x7667af2f
0, 16, 16, 1, 506880, 0x7667af2f
-0, 17, 17, 1, 506880, 0x7667af2f
-0, 18, 18, 1, 506880, 0x8011bcaf
+0, 17, 17, 1, 506880, 0x8011bcaf
+0, 18, 18, 1, 506880, 0xd422115b
0, 19, 19, 1, 506880, 0xd422115b
0, 20, 20, 1, 506880, 0xd422115b
-0, 21, 21, 1, 506880, 0xd422115b
-0, 22, 22, 1, 506880, 0xbcee0b5b
-0, 23, 23, 1, 506880, 0x08fe9ec8
+0, 21, 21, 1, 506880, 0xbcee0b5b
+0, 22, 22, 1, 506880, 0x08fe9ec8
+0, 23, 23, 1, 506880, 0xc8fb8b37
0, 24, 24, 1, 506880, 0xc8fb8b37
-0, 25, 25, 1, 506880, 0xc8fb8b37
+0, 25, 25, 1, 506880, 0x2c698b52
0, 26, 26, 1, 506880, 0x2c698b52
0, 27, 27, 1, 506880, 0x2c698b52
-0, 28, 28, 1, 506880, 0x2c698b52
+0, 28, 28, 1, 506880, 0x2b4ad9bc
0, 29, 29, 1, 506880, 0x2b4ad9bc
0, 30, 30, 1, 506880, 0x2b4ad9bc
0, 31, 31, 1, 506880, 0x2b4ad9bc
-0, 32, 32, 1, 506880, 0x2b4ad9bc
+0, 32, 32, 1, 506880, 0x92e84ebb
0, 33, 33, 1, 506880, 0x92e84ebb
-0, 34, 34, 1, 506880, 0x92e84ebb
+0, 34, 34, 1, 506880, 0xdb877da3
0, 35, 35, 1, 506880, 0xdb877da3
0, 36, 36, 1, 506880, 0xdb877da3
-0, 37, 37, 1, 506880, 0xdb877da3
+0, 37, 37, 1, 506880, 0x44610654
0, 38, 38, 1, 506880, 0x44610654
-0, 39, 39, 1, 506880, 0x44610654
-0, 40, 40, 1, 506880, 0xe254ce67
-0, 41, 41, 1, 506880, 0xa6085385
+0, 39, 39, 1, 506880, 0xe254ce67
+0, 40, 40, 1, 506880, 0xa6085385
+0, 41, 41, 1, 506880, 0x2d45d744
0, 42, 42, 1, 506880, 0x2d45d744
-0, 43, 43, 1, 506880, 0x2d45d744
-0, 44, 44, 1, 506880, 0x6e684f51
-0, 45, 45, 1, 506880, 0xe96186cf
+0, 43, 43, 1, 506880, 0x6e684f51
+0, 44, 44, 1, 506880, 0xe96186cf
+0, 45, 45, 1, 506880, 0xb535d369
0, 46, 46, 1, 506880, 0xb535d369
0, 47, 47, 1, 506880, 0xb535d369
-0, 48, 48, 1, 506880, 0xb535d369
+0, 48, 48, 1, 506880, 0xeed0b7e0
0, 49, 49, 1, 506880, 0xeed0b7e0
0, 50, 50, 1, 506880, 0xeed0b7e0
0, 51, 51, 1, 506880, 0xeed0b7e0
-0, 52, 52, 1, 506880, 0xeed0b7e0
-0, 53, 53, 1, 506880, 0x8789b20b
-0, 54, 54, 1, 506880, 0x0a0f42fb
+0, 52, 52, 1, 506880, 0x8789b20b
+0, 53, 53, 1, 506880, 0x0a0f42fb
+0, 54, 54, 1, 506880, 0x09bbac2d
0, 55, 55, 1, 506880, 0x09bbac2d
0, 56, 56, 1, 506880, 0x09bbac2d
0, 57, 57, 1, 506880, 0x09bbac2d
0, 58, 58, 1, 506880, 0x09bbac2d
-0, 59, 59, 1, 506880, 0x09bbac2d
-0, 60, 60, 1, 506880, 0xda77f0df
+0, 59, 59, 1, 506880, 0xda77f0df
diff --git a/tests/ref/fate/xvid-custom-matrix b/tests/ref/fate/xvid-custom-matrix
index 32f629f32d..3590086d39 100644
--- a/tests/ref/fate/xvid-custom-matrix
+++ b/tests/ref/fate/xvid-custom-matrix
@@ -26,4 +26,4 @@
0, 16, 16, 1, 622080, a7ce423456a59bdb4d5921aff1a27691
0, 17, 17, 1, 622080, 881c9561c9ab66a7659145173f8e8cda
0, 18, 18, 1, 622080, 7413961f9accd1d32e116592a6448e9b
-0, 21, 21, 1, 622080, c66409494fd1714e6236596f476cece6
+0, 19, 19, 1, 622080, c66409494fd1714e6236596f476cece6
diff --git a/tests/ref/fate/xvid-idct b/tests/ref/fate/xvid-idct
index cdbba2fa27..100296c9be 100644
--- a/tests/ref/fate/xvid-idct
+++ b/tests/ref/fate/xvid-idct
@@ -26,4 +26,4 @@
0, 16, 16, 1, 622080, 0a1453df21e4547447ec8f27a0d4d5ec
0, 17, 17, 1, 622080, d3495686e769df299b1732326fa3f17e
0, 18, 18, 1, 622080, 602e9020397b1e82b58b1ff6b9733d21
-0, 21, 21, 1, 622080, 759bd3f739a3b99309efa5c1a697e34d
+0, 19, 19, 1, 622080, 759bd3f739a3b99309efa5c1a697e34d
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 8/9] fftools/ffmpeg_enc: do not round frame durations prematurely
2023-10-01 12:55 [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations Anton Khirnov
` (5 preceding siblings ...)
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 7/9] fftools/ffmpeg_dec: disregard demuxer timestamps for NOTIMESTAMPS formats Anton Khirnov
@ 2023-10-01 12:55 ` Anton Khirnov
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 9/9] fftools/ffmpeg: move derivation of frame duration from filter framerate Anton Khirnov
7 siblings, 0 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* [FFmpeg-devel] [PATCH 9/9] fftools/ffmpeg: move derivation of frame duration from filter framerate
2023-10-01 12:55 [FFmpeg-devel] [PATCH 1/9] lavfi/yadif: update output frame durations Anton Khirnov
` (6 preceding siblings ...)
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 8/9] fftools/ffmpeg_enc: do not round frame durations prematurely Anton Khirnov
@ 2023-10-01 12:55 ` Anton Khirnov
7 siblings, 0 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-01 12:55 UTC (permalink / raw)
To: ffmpeg-devel
From ffmpeg_enc to ffmpeg_filter, which is a more appropriate
place for it.
---
fftools/ffmpeg_enc.c | 9 +--------
fftools/ffmpeg_filter.c | 6 +++++-
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 6c00156121..ec9cebbd96 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -1109,16 +1109,9 @@ static int do_video_out(OutputFile *of, OutputStream *ost, AVFrame *frame)
int64_t nb_frames, nb_frames_prev, i;
double duration = 0;
- if (frame) {
- FrameData *fd = frame_data(frame);
-
+ if (frame)
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)
- duration = 1 / (av_q2d(fd->frame_rate_filter) * av_q2d(enc->time_base));
- }
-
video_sync_process(of, ost, frame, duration,
&nb_frames, &nb_frames_prev);
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 9bf870b615..b6348d7f87 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1817,8 +1817,12 @@ static int fg_output_step(OutputFilterPriv *ofp, int flush)
if (ost->type == AVMEDIA_TYPE_VIDEO) {
AVRational fr = av_buffersink_get_frame_rate(filter);
- if (fr.num > 0 && fr.den > 0)
+ if (fr.num > 0 && fr.den > 0) {
fd->frame_rate_filter = fr;
+
+ if (!frame->duration)
+ frame->duration = av_rescale_q(1, av_inv_q(fr), frame->time_base);
+ }
}
ret = enc_frame(ost, frame);
--
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 6/9] lavc/mpeg4videodec: do not invent a framerate from guessed numbers
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
0 siblings, 1 reply; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-10-01 13:14 UTC (permalink / raw)
To: ffmpeg-devel
Anton Khirnov:
> Improves timestamps for fate-m4v*
What makes the new cfr timestamps better?
> ---
> libavcodec/mpeg4videodec.c | 3 --
> tests/ref/fate/m4v | 84 +++++++++++++++++++-------------------
> tests/ref/fate/m4v-cfr | 1 +
> 3 files changed, 43 insertions(+), 45 deletions(-)
>
> diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
> index a8dd57bf6b..b24fe3db20 100644
> --- a/libavcodec/mpeg4videodec.c
> +++ b/libavcodec/mpeg4videodec.c
> @@ -3141,9 +3141,6 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb,
>
> av_log(s->avctx, AV_LOG_WARNING,
> "time_increment_bits set to %d bits, based on bitstream analysis\n", ctx->time_increment_bits);
> - if (s->avctx->framerate.num && 4*s->avctx->framerate.num < 1<<ctx->time_increment_bits) {
> - s->avctx->framerate.num = 1<<ctx->time_increment_bits;
> - }
> }
>
> if (IS_3IV1)
> diff --git a/tests/ref/fate/m4v b/tests/ref/fate/m4v
> index cebe443adc..4eee84d01b 100644
> --- a/tests/ref/fate/m4v
> +++ b/tests/ref/fate/m4v
> @@ -1,47 +1,47 @@
> -#tb 0: 1/60
> +#tb 0: 1/5
> #media_type 0: video
> #codec_id 0: rawvideo
> #dimensions 0: 320x240
> #sar 0: 1/1
> 0, 0, 0, 1, 115200, 0x7262156b
> -0, 11, 11, 1, 115200, 0xa6aebc2f
> -0, 22, 22, 1, 115200, 0x9c7beba1
> -0, 33, 33, 1, 115200, 0x556037a2
> -0, 44, 44, 1, 115200, 0x532e3a23
> -0, 60, 60, 1, 115200, 0x110511f4
> -0, 71, 71, 1, 115200, 0xb7f929a4
> -0, 82, 82, 1, 115200, 0xdab9f3c2
> -0, 93, 93, 1, 115200, 0x441413dd
> -0, 104, 104, 1, 115200, 0x01163f33
> -0, 120, 120, 1, 115200, 0x47720c78
> -0, 131, 131, 1, 115200, 0x07c21356
> -0, 142, 142, 1, 115200, 0x085d4291
> -0, 153, 153, 1, 115200, 0xf6db074c
> -0, 164, 164, 1, 115200, 0x95093e75
> -0, 180, 180, 1, 115200, 0x5f8118ef
> -0, 191, 191, 1, 115200, 0x2b4de34a
> -0, 202, 202, 1, 115200, 0x0a731857
> -0, 213, 213, 1, 115200, 0xd75ef3be
> -0, 224, 224, 1, 115200, 0x321cf5a9
> -0, 240, 240, 1, 115200, 0x3eb222fd
> -0, 251, 251, 1, 115200, 0xc7d92f3e
> -0, 262, 262, 1, 115200, 0x6fda0366
> -0, 273, 273, 1, 115200, 0x6bb61b03
> -0, 284, 284, 1, 115200, 0x5f367ef8
> -0, 300, 300, 1, 115200, 0x237d0c77
> -0, 311, 311, 1, 115200, 0xafa813ef
> -0, 322, 322, 1, 115200, 0x39263ef4
> -0, 333, 333, 1, 115200, 0x47c70441
> -0, 344, 344, 1, 115200, 0xd43fffb0
> -0, 360, 360, 1, 115200, 0x75696afb
> -0, 371, 371, 1, 115200, 0xb0f117a3
> -0, 382, 382, 1, 115200, 0x002f42f0
> -0, 393, 393, 1, 115200, 0xa192487e
> -0, 404, 404, 1, 115200, 0x19a7072e
> -0, 420, 420, 1, 115200, 0xc500669c
> -0, 431, 431, 1, 115200, 0xe4636ba9
> -0, 442, 442, 1, 115200, 0xdf3d5d86
> -0, 453, 453, 1, 115200, 0xf30825d5
> -0, 464, 464, 1, 115200, 0xe3c944a1
> -0, 480, 480, 1, 115200, 0x8fec4420
> -0, 491, 491, 1, 115200, 0x9381fdab
> +0, 1, 1, 1, 115200, 0xa6aebc2f
> +0, 2, 2, 1, 115200, 0x9c7beba1
> +0, 3, 3, 1, 115200, 0x556037a2
> +0, 4, 4, 1, 115200, 0x532e3a23
> +0, 5, 5, 1, 115200, 0x110511f4
> +0, 6, 6, 1, 115200, 0xb7f929a4
> +0, 7, 7, 1, 115200, 0xdab9f3c2
> +0, 8, 8, 1, 115200, 0x441413dd
> +0, 9, 9, 1, 115200, 0x01163f33
> +0, 10, 10, 1, 115200, 0x47720c78
> +0, 11, 11, 1, 115200, 0x07c21356
> +0, 12, 12, 1, 115200, 0x085d4291
> +0, 13, 13, 1, 115200, 0xf6db074c
> +0, 14, 14, 1, 115200, 0x95093e75
> +0, 15, 15, 1, 115200, 0x5f8118ef
> +0, 16, 16, 1, 115200, 0x2b4de34a
> +0, 17, 17, 1, 115200, 0x0a731857
> +0, 18, 18, 1, 115200, 0xd75ef3be
> +0, 19, 19, 1, 115200, 0x321cf5a9
> +0, 20, 20, 1, 115200, 0x3eb222fd
> +0, 21, 21, 1, 115200, 0xc7d92f3e
> +0, 22, 22, 1, 115200, 0x6fda0366
> +0, 23, 23, 1, 115200, 0x6bb61b03
> +0, 24, 24, 1, 115200, 0x5f367ef8
> +0, 25, 25, 1, 115200, 0x237d0c77
> +0, 26, 26, 1, 115200, 0xafa813ef
> +0, 27, 27, 1, 115200, 0x39263ef4
> +0, 28, 28, 1, 115200, 0x47c70441
> +0, 29, 29, 1, 115200, 0xd43fffb0
> +0, 30, 30, 1, 115200, 0x75696afb
> +0, 31, 31, 1, 115200, 0xb0f117a3
> +0, 32, 32, 1, 115200, 0x002f42f0
> +0, 33, 33, 1, 115200, 0xa192487e
> +0, 34, 34, 1, 115200, 0x19a7072e
> +0, 35, 35, 1, 115200, 0xc500669c
> +0, 36, 36, 1, 115200, 0xe4636ba9
> +0, 37, 37, 1, 115200, 0xdf3d5d86
> +0, 38, 38, 1, 115200, 0xf30825d5
> +0, 39, 39, 1, 115200, 0xe3c944a1
> +0, 40, 40, 1, 115200, 0x8fec4420
> +0, 41, 41, 1, 115200, 0x9381fdab
> diff --git a/tests/ref/fate/m4v-cfr b/tests/ref/fate/m4v-cfr
> index e2d02032fe..4eee84d01b 100644
> --- a/tests/ref/fate/m4v-cfr
> +++ b/tests/ref/fate/m4v-cfr
> @@ -44,3 +44,4 @@
> 0, 38, 38, 1, 115200, 0xf30825d5
> 0, 39, 39, 1, 115200, 0xe3c944a1
> 0, 40, 40, 1, 115200, 0x8fec4420
> +0, 41, 41, 1, 115200, 0x9381fdab
_______________________________________________
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 7/9] fftools/ffmpeg_dec: disregard demuxer timestamps for NOTIMESTAMPS formats
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
0 siblings, 1 reply; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-10-01 13:18 UTC (permalink / raw)
To: ffmpeg-devel
Anton Khirnov:
> In this case any timestamps are guessed by compute_pkt_fields() in
> libavformat. Since we are decoding the stream, we have more accurate
> information from the decoder and do not need any guesses.
>
> Eliminates spurious PTS gaps in a number of FATE tests.
>
> Also avoids dropping the majority of frames in fate-dirac*
Why did that happen?
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 4/9] lavc/mpegvideo_parser: reduce variable scopes
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
0 siblings, 0 replies; 14+ messages in thread
From: Michael Niedermayer @ 2023-10-01 20:28 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]
On Sun, Oct 01, 2023 at 02:55:47PM +0200, Anton Khirnov wrote:
> Drop some variables only used in a switch().
> ---
> libavcodec/mpegvideo_parser.c | 33 ++++++++++++++-------------------
> 1 file changed, 14 insertions(+), 19 deletions(-)
should be ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct answer.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 6/9] lavc/mpeg4videodec: do not invent a framerate from guessed numbers
2023-10-01 13:14 ` Andreas Rheinhardt
@ 2023-10-02 8:56 ` Anton Khirnov
0 siblings, 0 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-02 8:56 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting Andreas Rheinhardt (2023-10-01 15:14:49)
> Anton Khirnov:
> > Improves timestamps for fate-m4v*
>
> What makes the new cfr timestamps better?
The framerate, and frame durations derived from it, are no longer
garbage, so the last frame has a larger timestamps and does not get
dropped.
--
Anton Khirnov
_______________________________________________
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 7/9] fftools/ffmpeg_dec: disregard demuxer timestamps for NOTIMESTAMPS formats
2023-10-01 13:18 ` Andreas Rheinhardt
@ 2023-10-02 8:59 ` Anton Khirnov
0 siblings, 0 replies; 14+ messages in thread
From: Anton Khirnov @ 2023-10-02 8:59 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting Andreas Rheinhardt (2023-10-01 15:18:30)
> Anton Khirnov:
> > In this case any timestamps are guessed by compute_pkt_fields() in
> > libavformat. Since we are decoding the stream, we have more accurate
> > information from the decoder and do not need any guesses.
> >
> > Eliminates spurious PTS gaps in a number of FATE tests.
> >
> > Also avoids dropping the majority of frames in fate-dirac*
>
> Why did that happen?
lavf generated timestamps that were consecutive integers with a timebase
of 1/1200000
--
Anton Khirnov
_______________________________________________
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".
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-10-02 8:59 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [FFmpeg-devel] [PATCH 8/9] fftools/ffmpeg_enc: do not round frame durations prematurely Anton Khirnov
2023-10-01 12:55 ` [FFmpeg-devel] [PATCH 9/9] fftools/ffmpeg: move derivation of frame duration from filter framerate Anton Khirnov
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