Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 04/13] lavf: use AV_CODEC_PROP_FIELDS where appropriate
Date: Mon, 15 May 2023 20:59:42 +0200
Message-ID: <20230515185942.GO1391451@pb2> (raw)
In-Reply-To: <168362189020.3843.14417317264187506189@lain.khirnov.net>


[-- Attachment #1.1: Type: text/plain, Size: 2389 bytes --]

On Tue, May 09, 2023 at 10:44:50AM +0200, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2023-05-08 16:15:42)
> > On Sun, May 07, 2023 at 03:32:46PM +0200, Anton Khirnov wrote:
> > > H.264 and mpeg12 parsers need to be adjusted at the same time to stop
> > > using the value of AVCodecContext.ticks_per_frame, because it is not set
> > > correctly unless the codec has been opened. Previously this would result
> > > in both the parser and lavf seeing the same incorrect value, which would
> > > cancel out.
> > > Updating lavf and not the parsers would result in correct value in lavf,
> > > but the wrong one in parsers, which would break some tests.
> > > ---
> > >  libavcodec/h264_parser.c      |  4 ++--
> > >  libavcodec/mpegvideo_parser.c |  2 +-
> > >  libavformat/avformat.c        |  9 ++++++---
> > >  libavformat/demux.c           | 29 +++++++++++++++++++----------
> > >  libavformat/internal.h        |  3 +++
> > >  5 files changed, 31 insertions(+), 16 deletions(-)
> > 
> > Doesnt this sort of change need a major ABI bump ?
> > it sounds like lavc and lavf interdepend here both ways
> 
> No, we do not guarantee bug compatibility.
> 
> Libavformat seeing ticks_per_frame=1 for codecs that set it to 2 upon
> being opened is a bug. Same for the parser.
> 
> It just so happens that libavformat AND its internal parser instance see
> the same incorrect value and this cancels out in cases that are tested
> by FATE (it would break if we had more thorough tests for repeating
> single fields).

This patch seems to change tbr
./ffmpeg -i fate-suite//h264/lossless.h264
Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv420p(progressive), 640x480, 25 fps, 60 tbr, 1200k tbn
vs.
Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv420p(progressive), 640x480, 25 fps, 120 tbr, 1200k tbn

with 
./ffmpeg -i fate-suite//h264/lossless.h264  -f framecrc -

The output uses 1/60 thats odd because if every frame can be represented in
1/60 then tbr is 1/60 or more course
OTOH if tbr is finer than 1/60 then not every frame can be represented in 1/60

maybe iam missing something but the new value seems worse and also
not consistent with what ffmpeg actually uses

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.

[-- 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".

  reply	other threads:[~2023-05-15 18:59 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-07 13:32 [FFmpeg-devel] [PATCH 01/13] lavu/frame: extend AVFrame.repeat_pict documentation Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 02/13] fftools/ffmpeg: fix computing video frame duration from repeat_pict Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 03/13] lavc/codec_desc: add a property for codecs that support field coding Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 04/13] lavf: use AV_CODEC_PROP_FIELDS where appropriate Anton Khirnov
2023-05-08 14:12   ` Michael Niedermayer
2023-05-09  8:37     ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2023-05-08 14:15   ` [FFmpeg-devel] [PATCH " Michael Niedermayer
2023-05-09  8:44     ` Anton Khirnov
2023-05-15 18:59       ` Michael Niedermayer [this message]
2023-05-15 20:44         ` Anton Khirnov
2023-05-16 17:41           ` Michael Niedermayer
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 05/13] lavc/av1*: fix exporting framerate Anton Khirnov
2023-05-10 11:52   ` James Almer
2023-05-14 19:39     ` [FFmpeg-devel] [PATCH] " Anton Khirnov
2023-05-14 19:50       ` James Almer
2023-05-15  8:22         ` Anton Khirnov
2023-05-15 11:41           ` James Almer
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 06/13] lavc/libdav1d: " Anton Khirnov
2023-05-15  8:22   ` [FFmpeg-devel] [PATCH] " Anton Khirnov
2023-05-15 11:47     ` James Almer
2023-05-15 12:22       ` Anton Khirnov
2023-05-15 12:41         ` James Almer
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 07/13] lavc/ratecontrol: use AVCodecContext.framerate when available Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 08/13] lavc/msmpeg4enc: " Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 09/13] libaomenc: " Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 10/13] lavc/libkvazaar, libopenh264enc: drop redundant checks Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 11/13] lavc/libvpxenc: send frame durations to the encoder Anton Khirnov
2023-05-09  1:18   ` James Zern
2023-05-09  9:09     ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2023-05-09 18:17       ` James Zern
2023-05-10  6:34         ` Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 12/13] lavc: deprecate AVCodecContext.ticks_per_frame Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 13/13] fftools/ffmpeg: stop using deprecated ticks_per_frame Anton Khirnov
2023-05-07 16:59 ` [FFmpeg-devel] [PATCH 01/13] lavu/frame: extend AVFrame.repeat_pict documentation Kieran Kunhya
2023-05-07 18:01   ` 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=20230515185942.GO1391451@pb2 \
    --to=michael@niedermayer.cc \
    --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