Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Peter Ross <pross@xvid.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] avformat/img2dec: add GEM Raster image demuxer
Date: Sun, 23 Jan 2022 15:45:02 +1100
Message-ID: <YezdTllEHmdrUIyn@f0b13fde3b442eed7d21db83966c973e> (raw)
In-Reply-To: <CAB0OVGqo+e8YiK443zX4tADhNuGgUyk=+NM3BVy6Y1q09TAmmw@mail.gmail.com>


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

On Sun, Jan 23, 2022 at 01:01:58AM +0100, Carl Eugen Hoyos wrote:
> Am Fr., 17. Sept. 2021 um 10:39 Uhr schrieb Peter Ross <pross@xvid.org>:
> 
> > +static int gem_probe(const AVProbeData *p)
> > +{
> > +    const uint8_t *b = p->buf;
> > +    int ret = 0;
> > +    if ( AV_RB16(b     ) >= 1 && AV_RB16(b    ) <= 3  &&
> > +         AV_RB16(b +  2) >= 8 && AV_RB16(b + 2) <= 779 &&
> > +        (AV_RB16(b +  4) > 0  || AV_RB16(b + 4) <= 8) &&
> > +        (AV_RB16(b +  6) > 0  || AV_RB16(b + 6) <= 8) &&
> > +         AV_RB16(b +  8) &&
> > +         AV_RB16(b + 10) &&
> > +         AV_RB16(b + 12) &&
> > +         AV_RB16(b + 14)) {
> > +        ret = AVPROBE_SCORE_EXTENSION / 4;
> 
> Without running probetest, this score looks too high to me.
> (1, 2 or 3 followed by anything not 0 with some restrictions?)

The probetest warning is only triggered when the score is greater than
AVPROBE_SCORE_EXTENSION / 4

This score is consistent with other image2 demuxers like bmp and pcx.

How much lower does it need to be?

> Why is the above sufficient? Are there files in the wild
> without the fourcc's below?

Correct, not all files have the fourcc's below.

> > +        if (AV_RN32(b + 16) == AV_RN32("STTT") ||
> > +            AV_RN32(b + 16) == AV_RN32("TIMG") ||
> > +            AV_RN32(b + 16) == AV_RN32("XIMG"))
> > +            ret += 1;
> 
> Should be EXTENSION + 1

Agree.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

[-- 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:[~2022-01-23  4:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <755fd91b4ae6c9327668f339acfc67fcdd02c0bd.1631867851.git.pross@xvid.org>
     [not found] ` <54d14822e998e9f1ac99e919fe223433d3c509e2.1631867851.git.pross@xvid.org>
2022-01-20 12:48   ` Andreas Rheinhardt
2022-01-23  0:01   ` Carl Eugen Hoyos
2022-01-23  4:45     ` Peter Ross [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=YezdTllEHmdrUIyn@f0b13fde3b442eed7d21db83966c973e \
    --to=pross@xvid.org \
    --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