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 2/6] lavf: APV demuxer
Date: Mon, 21 Apr 2025 23:30:32 +0200
Message-ID: <20250421213032.GN4991@pb2> (raw)
In-Reply-To: <20250419190712.1265201-3-sw@jkqxz.net>


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

On Sat, Apr 19, 2025 at 08:07:00PM +0100, Mark Thompson wrote:
> Demuxes raw streams as defined in draft spec section 10.2.
> ---
>  libavformat/Makefile     |   1 +
>  libavformat/allformats.c |   1 +
>  libavformat/apvdec.c     | 245 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 247 insertions(+)
>  create mode 100644 libavformat/apvdec.c
[...]

> +static int apv_probe(const AVProbeData *p)
> +{
> +    GetBitContext gbc;
> +    APVHeaderInfo header;
> +    uint32_t au_size, tag, pbu_size;
> +    int score = AVPROBE_SCORE_EXTENSION + 1;
> +    int ret;
> +
> +    init_get_bits8(&gbc, p->buf, p->buf_size);
> +
> +    au_size = get_bits_long(&gbc, 32);
> +    if (au_size < 16) {
> +        // Too small.
> +        return 0;
> +    }
> +    // The spec doesn't have this tag, but the reference software and
> +    // all current files do.  Treat it as optional and skip if present,
> +    // but if it is there then this is definitely an APV file.
> +    tag = get_bits_long(&gbc, 32);
> +    if (tag == APV_TAG) {
> +        pbu_size = get_bits_long(&gbc, 32);
> +        score = AVPROBE_SCORE_MAX;
> +    } else {
> +        pbu_size = tag;
> +    }
> +    if (pbu_size < 16) {
> +        // Too small.
> +        return 0;
> +    }
> +
> +    ret = apv_extract_header_info(&header, &gbc);
> +    if (ret == 0)
> +        return 0;
> +    return score;
> +}

tools/probetest 256 4096
Failure of apv probing code with score=51 type=1 p=F14 size=32

(yes i saw you posted a new patch, but still had the old one locally
and saw this, so reporting anyway)

thx

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

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato

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

  parent reply	other threads:[~2025-04-21 21:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-19 19:06 [FFmpeg-devel] [PATCH 0/6] APV support Mark Thompson
2025-04-19 19:06 ` [FFmpeg-devel] [PATCH 1/6] lavc: APV codec ID and descriptor Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 2/6] lavf: APV demuxer Mark Thompson
2025-04-20 16:07   ` Derek Buitenhuis
2025-04-20 16:20     ` James Almer
2025-04-20 16:57       ` Mark Thompson
2025-04-20 18:59         ` James Almer
2025-04-21  0:54   ` Michael Niedermayer
2025-04-21 14:59     ` Mark Thompson
2025-04-21 15:22       ` Andreas Rheinhardt
2025-04-21 21:30   ` Michael Niedermayer [this message]
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 3/6] lavc/cbs: APV support Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 4/6] lavc: APV decoder Mark Thompson
2025-04-21 14:09   ` James Almer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 5/6] lavc/apv: AVX2 transquant for x86-64 Mark Thompson
2025-04-19 20:34   ` Mark Thompson
2025-04-19 21:16   ` James Almer
2025-04-20  1:48   ` James Almer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 6/6] lavc: APV metadata bitstream filter Mark Thompson

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=20250421213032.GN4991@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