From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AE1514038D for ; Sun, 23 Jan 2022 04:45:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 10BA268AFC0; Sun, 23 Jan 2022 06:45:27 +0200 (EET) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0369D68AEA4 for ; Sun, 23 Jan 2022 06:45:20 +0200 (EET) Received: from f0b13fde3b442eed7d21db83966c973e ([1.152.189.70]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id 20N4j6Zd019675 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Sun, 23 Jan 2022 04:45:12 GMT Date: Sun, 23 Jan 2022 15:45:02 +1100 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: <755fd91b4ae6c9327668f339acfc67fcdd02c0bd.1631867851.git.pross@xvid.org> <54d14822e998e9f1ac99e919fe223433d3c509e2.1631867851.git.pross@xvid.org> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 2/2] avformat/img2dec: add GEM Raster image demuxer X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============4516273226905889041==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4516273226905889041== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kT8y4Iw9Xa4NV7B+" Content-Disposition: inline --kT8y4Iw9Xa4NV7B+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 : >=20 > > +static int gem_probe(const AVProbeData *p) > > +{ > > + const uint8_t *b =3D p->buf; > > + int ret =3D 0; > > + if ( AV_RB16(b ) >=3D 1 && AV_RB16(b ) <=3D 3 && > > + AV_RB16(b + 2) >=3D 8 && AV_RB16(b + 2) <=3D 779 && > > + (AV_RB16(b + 4) > 0 || AV_RB16(b + 4) <=3D 8) && > > + (AV_RB16(b + 6) > 0 || AV_RB16(b + 6) <=3D 8) && > > + AV_RB16(b + 8) && > > + AV_RB16(b + 10) && > > + AV_RB16(b + 12) && > > + AV_RB16(b + 14)) { > > + ret =3D AVPROBE_SCORE_EXTENSION / 4; >=20 > 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) =3D=3D AV_RN32("STTT") || > > + AV_RN32(b + 16) =3D=3D AV_RN32("TIMG") || > > + AV_RN32(b + 16) =3D=3D AV_RN32("XIMG")) > > + ret +=3D 1; >=20 > Should be EXTENSION + 1 Agree. -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --kT8y4Iw9Xa4NV7B+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCYezdSgAKCRBnYHnFrEDd a1YkAJ4hJcU4aU4aWBE8E37NCgW3AVvAAQCeMP6xFqrHqIkO3NIT0n5tgKq0YvA= =KhSc -----END PGP SIGNATURE----- --kT8y4Iw9Xa4NV7B+-- --===============4516273226905889041== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============4516273226905889041==--