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] avformat/mxfenc: SMPTE RDD 48:2018 Amd 1:2022 (FFV1 in MXF) support
Date: Wed, 5 Apr 2023 14:42:49 +0200
Message-ID: <20230405124249.GY1164690@pb2> (raw)
In-Reply-To: <20230405123116.GX1164690@pb2>


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

On Wed, Apr 05, 2023 at 02:31:16PM +0200, Michael Niedermayer wrote:
> On Tue, Apr 04, 2023 at 11:37:54PM +0200, Jerome Martinez wrote:
> > On 04/04/2023 19:32, Michael Niedermayer wrote:
> > > On Tue, Apr 04, 2023 at 04:57:03PM +0200, Jerome Martinez wrote:
> > > > On 04/04/2023 16:43, Michael Niedermayer wrote:
> > > > > On Mon, Apr 03, 2023 at 12:07:06AM +0200, Jerome Martinez wrote:
> > > > > > On 02/04/2023 22:07, Michael Niedermayer wrote:
> > > > > > 
> > > > > > +        if (f->version == 4 && f->micro_version > 2) {
> > > > > > +            av_log(f->avctx, AV_LOG_ERROR, "unsupported version 4 micro_version %d\n",
> > > > > > +                f->micro_version);
> > > > > > +            return AVERROR_PATCHWELCOME;
> > > > > > +        }
> > > > > >        }
> > > > > >        f->ac = get_symbol(c, state, 0);
> > > > > you do not know if the decoder will have any problem with these files
> > > > 
> > > > But you don't don't if the decoder will have no problem, it seems safer to
> > > > me to reject something we are not sure to support.
> > > "each new micro-version after this first stable variant is compatible with the previous micro-version: decoders **SHOULD NOT** reject FFV1 bitstreams due to an unknown micro-version equal or above the micro-version considered as stable."
> > 
> > This sentence is about a stable version, and version 4 is not stable, so
> > FFV1 version 4 micro_version 3 is not necessarily compatible with FFV1
> > version 4 micro_version 2, and so on, until we freeze the micro-version
> > considered as stable. It is actually same for FFV1 version 3 e.g. "if
> > (f->version == 3 && f->micro_version > 1 || f->version > 3) get_rac(&fs->c,
> > (uint8_t[]) { 129 });" seems to say that version 3 micro_version 2 is not
> > compatible with version 3 micro_version 1 (and acceptable, only version 3
> > micro_version 5 and above must be compatible with version 3 micro_version 4
> > because micro_version 4 is the one flagged as stable).
> > Reason I suggested this micro_version check for version 4 (I didn't add it
> > for version 3 because version 3 has a micro-version considered as stable).
> > Anyway, it is not important to me, just apply the patch you prefer.
> 
> Theres a practical problem with rejecting increased micro versions.
> That problem is that we would not be able to introduce compatible changes
> as even if they are compatible the micro_version itself would break all
> decoders
> 
> 
> > 
> > 
> > > 
> > > 
> > > [...]
> > > >   libavcodec/ffv1dec.c |    5 +++++
> > > >   libavformat/mxfenc.c |    4 ++++
> > > >   2 files changed, 9 insertions(+)
> > > > 9b094eb0bd0888725a4a3fac925ef1fa733a48c3  0001-avcodec-ffv1dec-reject-unsupported-ffv1-versions.patch
> > > >  From dc0382709e548ef2514198bc866028066134d33e Mon Sep 17 00:00:00 2001
> > > > From: Jerome Martinez <jerome@mediaarea.net>
> > > > Date: Mon, 3 Apr 2023 00:04:53 +0200
> > > > Subject: [PATCH] avcodec/ffv1dec: reject unsupported ffv1 versions
> > > > 
> > > > And add similar check in libavformat/mxfenc
> > > > ---
> > > >   libavcodec/ffv1dec.c | 5 +++++
> > > >   libavformat/mxfenc.c | 4 ++++
> > > >   2 files changed, 9 insertions(+)
> > > the patch is mostly ok
> > > iam a bit undecided if a decoder change and a muxer bugfix belong in the
> > > same patch, so do as you prefer
> > 
> > I think that both parts are about the same thing (and in the future both
> > should be changed at the same time) but it is really subjective, let me know
> > if you prefer that I send 2 separated patches and I'll do it, else please
> > apply one of the already proposed patch.
> 
> The problem is "same" "time"
> In the world of libavcodec, "time" is specified in libavcodec/version.h
> In the world of libavformat, "time" is specified in libavformat/version.h
> 
> Now if neither version is increased then you certainly can not assume
> anything and any mixture can occurr. You can have before and after
> libs mixed in any way on a system. For many changes this is ok
> but sometimes the libavformat change needs the libavcodec feature.
> So doing it in the same commit can be done here but it cannot be the
> default (future) way to do it
> 
> If you bump the minor versions of both libs with a change then you can have
> libavcodec  libavformat
> before      before
> after       before
> after       after
> 
> If you bump the major versions of both libs with a change then you can have
> before      before
> after       after
> 
> the last variant is hard as major isnt bumped often.
> 
> so the way changes are introduced to 2 libs is to do it
> first to libavcodec (this tests the after before case)
> then subsequently to libavformat (this tests the after after case)
> And with such seperate changes you just tested all legal combinations
> without any need to think about it :)
> 
> OTOH if a commit does both libs together it requires an actual review
> of what happens if not both libs are upgraded together on the user side.
> 
> The idea is simple, split it in 2 and things get naturally tested
> and no need to spend any time on odd lib mixes as the only case is naturally
> tested between the 2 commits.
> 

> Ill apply one of the patches as its ok here, but it might be "not ok" for
> future changes to ffv1 in both libs, it depends on the exact changes

Changed my mind, ill push it splited in 2. Its more consistent with how
such changes have been done, even when its not needed here

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu

[-- 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-04-05 12:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-14 15:45 Jerome Martinez
2023-01-16 14:00 ` Tomas Härdin
2023-01-16 14:17   ` Jerome Martinez
2023-01-18 10:12     ` Tomas Härdin
2023-01-18 14:25       ` Jerome Martinez
2023-01-18 13:40 ` Tomas Härdin
2023-01-18 14:15   ` Jerome Martinez
2023-01-20 15:17     ` Tomas Härdin
2023-01-29 16:36       ` Dave Rice
2023-01-31 14:53         ` Tomas Härdin
2023-03-14  9:52           ` Jerome Martinez
2023-03-15 14:00             ` Tomas Härdin
2023-03-24 13:59               ` Dave Rice
2023-03-25 18:29                 ` Tomas Härdin
2023-04-01 14:37             ` Michael Niedermayer
2023-04-01 15:20               ` Jerome Martinez
2023-04-01 15:43                 ` Michael Niedermayer
2023-04-01 17:11                   ` Jerome Martinez
2023-04-02 20:07                     ` Michael Niedermayer
2023-04-02 22:07                       ` Jerome Martinez
2023-04-04 14:43                         ` Michael Niedermayer
2023-04-04 14:57                           ` Jerome Martinez
2023-04-04 17:32                             ` Michael Niedermayer
2023-04-04 21:37                               ` Jerome Martinez
2023-04-05 12:31                                 ` Michael Niedermayer
2023-04-05 12:42                                   ` Michael Niedermayer [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=20230405124249.GY1164690@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