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] avformat: add DAT (Digital Audio Tape) demuxer
Date: Sat, 1 Feb 2025 03:13:01 +0100
Message-ID: <20250201021301.GL4991@pb2> (raw)
In-Reply-To: <90daf990-cdc3-4cf5-94af-f1eec9a093c1@mediaarea.net>


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

Hi Jerome

On Wed, Jan 29, 2025 at 06:02:57PM +0100, Jerome Martinez wrote:
> Le 25/01/2025 à 01:46, Michael Niedermayer a écrit :
> > [...]
> > this passes tests.
> > 
> > but if you want, you could instead of testing "extra metadata (not needed for decoding)"
> > test more than 1 packet
> > 
> > having a best case score of 1 seems to be something that will
> > likely fail sooner or later by not detecting a dat file
> 
> Maybe misunderstanding, the cdxl parser provides score of 1, the DAT patches
> provide a score of the count of detected frames so better.

yes, this is the 2nd such dumb mistake i make in the last few days
the whole (still ongoing) "mobbing" compaign against me seems to
affect the quality of my reviews and work


> But attached is a v2 of the 2nd patch, less compilation warnings, using less
> metadata not impacting the decoding and handling corner cases like bad
> metadata e.g. 16-bit 4-ch (impossible) and 32 kHz 12-bit 4-ch.
> 12-bit is not yet handled but the patch provides the detection of such file
> and a smooth rejection of the file.
> 
> Jérôme

>  dat.c |   49 ++++++++++++++++++++++++++++++++++++-------------
>  1 file changed, 36 insertions(+), 13 deletions(-)
> cf8d17c26eddaa608bcaa8551c263e6efb077f3d  0002-avformat-dat-improve-DAT-demuxer.patch
> From 90211198a936ca7087dbf04e5d636fd9992a8332 Mon Sep 17 00:00:00 2001
> From: Jerome Martinez <jerome@mediaarea.net>
> Date: Wed, 22 Jan 2025 16:08:18 +0100
> Subject: [PATCH 2/4] avformat/dat: improve DAT demuxer
> 
> Less false positive detection
> Better computation of data size with 12-bit

[...]

> @@ -82,21 +97,29 @@ static int parse_frame(uint8_t *frame, AVCodecParameters *par)
>      uint8_t *mainid = subid+4;
>      int chan_index = (mainid[0] >> 0) & 0x3;
>      int rate_index = (mainid[0] >> 2) & 0x3;
> +    int fmtid      = (mainid[0] >> 6) & 0x3;
> +    int trackpitch = (mainid[1] >> 2) & 0x3;
>      int enc_index  = (mainid[1] >> 6) & 0x3;
>      int dataid     = (subid[0] >> 0) & 0xf;

> +    int encoded_size = 0;
> +    int encoded_size = encoded_samples[rate_index] * encoded_samples_mul[trackpitch] * encoded_chans[chan_index] * encoded_quantization[enc_index] / 8;

duplicate variable

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch

[-- 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:[~2025-02-01  2:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a2f813dd-06db-43dc-b64a-22c8038ce1fa@mediaarea.net>
     [not found] ` <20250117204315.GO4991@pb2>
2025-01-22 11:26   ` Jerome Martinez
2025-01-25  0:46     ` Michael Niedermayer
2025-01-29 17:02       ` Jerome Martinez
2025-02-01  2:13         ` 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=20250201021301.GL4991@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