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 v3] avformat/framecrcenc: compute the checksum for side data
Date: Mon, 6 May 2024 03:34:18 +0200
Message-ID: <20240506013418.GC6420@pb2> (raw)
In-Reply-To: <862a3032-917d-4c62-8825-d920945859ca@gmail.com>


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

On Sat, May 04, 2024 at 10:54:59PM -0300, James Almer wrote:
> On 5/4/2024 10:45 PM, Michael Niedermayer wrote:
> > On Sat, May 04, 2024 at 06:02:25PM -0300, James Almer wrote:
> > > 
> > > 
> > > On 5/4/2024 5:58 PM, Michael Niedermayer wrote:
> > > > On Sat, May 04, 2024 at 12:16:00PM -0300, James Almer wrote:
> > > > > On 5/4/2024 5:34 AM, Marton Balint wrote:
> > > > > > 
> > > > > > 
> > > > > > On Thu, 2 May 2024, James Almer wrote:
> > > > > > 
> > > > > > > On 5/2/2024 6:23 PM, Marton Balint wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > >    On Wed, 1 May 2024, Michael Niedermayer wrote:
> > > > > > > > 
> > > > > > > > >    This allows detecting issues in side data related code, same as what
> > > > > > > > >    framecrc does for before already for packet data itself.
> > > > > > > > > 
> > > > > > > > >    This basically reverts c6ae560a18d67b9ddaa25a0338b7fb55e3312e57.
> > > > > > > > 
> > > > > > > >    Can you at least add an option which allows disabling dumping the side
> > > > > > > >    data? Changing the format of framecrc output again and again is
> > > > > > > > not very
> > > > > > > 
> > > > > > > The framehash/framemd5 muxer is versioned, which is what you should
> > > > > > > use if you want parseable output.
> > > > > > 
> > > > > > Okay, but then the question is that why framecrc is using different code
> > > > > > and options?
> > > > > 
> > > > > Originally it was framecrc (using AVAdler) and framemd5 (using AVMD5). The
> > > > > latter was renamed/aliased to framehash and made to use the AVHash API,
> > > > > which supports all lavu hashing algorithms, and is versioned.
> > > > > If anyone cared, framecrc could be also made into an alias of framehash that
> > > > > defaults to adler32 output, but it would result in a massive change to
> > > > > reference files, if anything because AVHash initializes adler32 with a 1
> > > > > whereas framecrc does it with a 0.
> > > > 
> > > > normally starting adler32 at 0 is bad as one could prefix by a 0 byte with
> > > > no checksum change, but given we also show the size that spcific case isnt
> > > > an issue
> > > > 
> > > > can we make the initial value for adler32 configureable so as to improve long
> > > > term stability of checksums ? (or add a adler32_1 to AVHash)
> > > 
> > > av_hash_init() already initializes adler32 with a 1. No need to do anything
> > > there. It's the framecrc muxer that uses adler32 with 0 as init value.
> > 
> > i was thinking about av_hash_init() supporting a 0 init to avoid changing every
> > checksum. Which would
> > increase git repository size
> > and make long term comparissions harder because framecrc would not be comparable
> > at all. not just some extra fields that occasionally appear
> 
> Adding AVOptions is not backwards compatible, as it would only work on
> AVHashContext from the introductory commit onwards, so the only alternative
> is probably a new init function that takes an input seed argument. Just not
> an uint32_t, as that's not extensible. It would need to be an uint8_t array.

or "adler320" in addition to "adler32"

thx

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

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable

[-- 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:[~2024-05-06  1:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 23:19 Michael Niedermayer
2024-05-02 15:05 ` [FFmpeg-devel] [PATCH] avformat/framecrcenc: support calculating checksum of IAMF " James Almer
2024-05-02 15:16   ` Andreas Rheinhardt
2024-05-02 18:33     ` James Almer
2024-05-02 21:23 ` [FFmpeg-devel] [PATCH v3] avformat/framecrcenc: compute the checksum for " Marton Balint
2024-05-02 21:29   ` James Almer
2024-05-04  8:34     ` Marton Balint
2024-05-04 15:16       ` James Almer
2024-05-04 17:17         ` Marton Balint
2024-05-04 20:58         ` Michael Niedermayer
2024-05-04 21:02           ` James Almer
2024-05-05  1:45             ` Michael Niedermayer
2024-05-05  1:54               ` James Almer
2024-05-06  1:34                 ` Michael Niedermayer [this message]
2024-05-02 23:27   ` Michael Niedermayer

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=20240506013418.GC6420@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