From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTP id EE5CE48BF4
	for <ffmpegdev@gitmailbox.com>; Wed, 10 Jan 2024 02:37:52 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E775168CE0E;
	Wed, 10 Jan 2024 04:37:49 +0200 (EET)
Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net
 [217.70.183.196])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 816B168CCFE
 for <ffmpeg-devel@ffmpeg.org>; Wed, 10 Jan 2024 04:37:43 +0200 (EET)
Received: by mail.gandi.net (Postfix) with ESMTPSA id AE091E0002
 for <ffmpeg-devel@ffmpeg.org>; Wed, 10 Jan 2024 02:37:42 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc;
 s=gm1; t=1704854262;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=W/yi+u4S9G7ZzzfxlNWZM8izBGlhwmP4TppJBUjY0xw=;
 b=dN1drSD+mtNfkLd71NJiE0nSTeAWzi0j1IFWi5lJGNlchwb564hk7Kq7odqBUdHHlLbtCJ
 6lIR5DhZi5uyylwLx390uetQT1cuL3auHDyalCz64UvSEsEHVjqrSxWCaaj0VIm6D1/oW+
 VSuW12swsCE+kj5ONWQvhuq9w0JbbKpbOSf+9+2lgAzUSKAmAu9YDHtRwWI3OGXkJnekYg
 YEd+1DIAgGaEsVhlCm+p8Y4dW3o8WeC/lVRveJj4EvR77ylu9LBGFRWbGcsyJn/kNKZlU4
 LFWl+MvoheXhdBIuANB+daAr9CCUIngrLVlkJsVi2u5PfLB1F9oHPx9eazeMxA==
Date: Wed, 10 Jan 2024 03:37:41 +0100
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <20240110023741.GP6420@pb2>
References: <PAVPR08MB9795F65579D514D9E32A4C949A61A@PAVPR08MB9795.eurprd08.prod.outlook.com>
MIME-Version: 1.0
In-Reply-To: <PAVPR08MB9795F65579D514D9E32A4C949A61A@PAVPR08MB9795.eurprd08.prod.outlook.com>
X-GND-Sasl: michael@niedermayer.cc
Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mdec: DC reading for STRv1
 is like STRv2
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: multipart/mixed; boundary="===============4068040559837528553=="
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20240110023741.GP6420@pb2/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>


--===============4068040559837528553==
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="wWFYW5Jz+rDTjnpL"
Content-Disposition: inline


--wWFYW5Jz+rDTjnpL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 02, 2024 at 02:49:26AM +0000, aybe aybe wrote:
> Hi,
>=20
> As I understand, support for .STR files is broken for almost 10 years now=
 (since 161442ff2c4b0dd8a5072c6bbe6bf55303fffccf it seems).
>=20
> Currently, ffmpeg fails with tons of errors like this on version 1 STRs, =
e.g. Wipeout 1:
> [mdec @ 00000000027c72c0] ac-tex damaged at 1 9
>=20
> What happens is that only the audio is present in the video file.
>=20
> Anyway, that one character patch fixes the problem, video is now rendered.
>=20
> Signed-off-by: aybe <aybe@users.noreply.github.com>
> ---
>   libavcodec/mdec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
> index 44b12471a9..c4904216b8 100644
> --- a/libavcodec/mdec.c
> +++ b/libavcodec/mdec.c
> @@ -68,7 +68,7 @@ static inline int mdec_decode_block_intra(MDECContext *=
a, int16_t *block, int n)
>       const int qscale =3D a->qscale;
>=20
>       /* DC coefficient */
> -    if (a->version =3D=3D 2) {
> +    if (a->version <=3D 2) {
>           block[0] =3D 2 * get_sbits(&a->gb, 10) + 1024;
>       } else {
>           component =3D (n <=3D 3 ? 0 : n - 4 + 1);
> --
> 2.41.0.windows.1

This is how the patch should look: (there are differencs in the whitespace
which git seems to have problems with in above)
not sure where these differences came from

thx

diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 44b12471a9e..c4904216b81 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -68,7 +68,7 @@ static inline int mdec_decode_block_intra(MDECContext *a,=
 int16_t *block, int n)
     const int qscale =3D a->qscale;

     /* DC coefficient */
-    if (a->version =3D=3D 2) {
+    if (a->version <=3D 2) {
         block[0] =3D 2 * get_sbits(&a->gb, 10) + 1024;
     } else {
         component =3D (n <=3D 3 ? 0 : n - 4 + 1);


[...]

--=20
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.

--wWFYW5Jz+rDTjnpL
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZZ4C9QAKCRBhHseHBAsP
qzeEAJ488+cfY8zHhEf4x93USD3SZ/CmYgCePZVgD7YKGGREdqD1ViZnvESAmpc=
=CNp2
-----END PGP SIGNATURE-----

--wWFYW5Jz+rDTjnpL--

--===============4068040559837528553==
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".

--===============4068040559837528553==--