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 2142547039 for ; Fri, 25 Aug 2023 17:04:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4143968C626; Fri, 25 Aug 2023 20:04:10 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A3A3968C5D1 for ; Fri, 25 Aug 2023 20:04:03 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E62591BF204 for ; Fri, 25 Aug 2023 17:04:02 +0000 (UTC) Date: Fri, 25 Aug 2023 19:04:02 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230825170402.GR7802@pb2> References: <20230825151328.25567-1-michael@niedermayer.cc> <20230825151328.25567-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 2/2] avcodec/apedec: Fix 48khz 24bit below insane level 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="===============1095062475647812190==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1095062475647812190== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s4YMk4FeS3JYeZOc" Content-Disposition: inline --s4YMk4FeS3JYeZOc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 25, 2023 at 05:27:14PM +0200, Paul B Mahol wrote: > On Fri, Aug 25, 2023 at 5:13=E2=80=AFPM Michael Niedermayer > wrote: >=20 > > Fixes: Ticket9816 > > Fixes: vlc.ape and APE_48K_24bit_2CH_02_01.ape > > > > Regression since: ed0001482a74b60f3d5bc5cd7e304c9d65b2fcd5. > > > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/apedec.c | 15 +++++++++++---- > > 1 file changed, 11 insertions(+), 4 deletions(-) > > > > diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c > > index 7bad8500e1..b1cceb9395 100644 > > --- a/libavcodec/apedec.c > > +++ b/libavcodec/apedec.c > > @@ -1184,7 +1184,9 @@ static void predictor_decode_mono_3930(APEContext > > *ctx, int count) > > static av_always_inline int predictor_update_filter(APEPredictor64 *p, > > const int decoded, > > const int filter, > > const int delayA, > > const int delayB, > > - const int adaptA, > > const int adaptB) > > + const int adaptA, > > const int adaptB, > > + int compression_le= vel > > + ) > > >=20 > Why on ')' separate line? I asked the ')' but it doesnt seem to remember fixed >=20 >=20 > > { > > int64_t predictionA, predictionB; > > int32_t sign; > > @@ -1212,7 +1214,12 @@ static av_always_inline int > > predictor_update_filter(APEPredictor64 *p, > > p->buf[delayB - 3] * p->coeffsB[filter][3] + > > p->buf[delayB - 4] * p->coeffsB[filter][4]; > > > > - p->lastA[filter] =3D decoded + ((int64_t)((uint64_t)predictionA + > > (predictionB >> 1)) >> 10); > > + if (compression_level < COMPRESSION_LEVEL_INSANE) { > > + predictionA =3D (int32_t)predictionA; > > + predictionB =3D (int32_t)predictionB; > > + p->lastA[filter] =3D decoded + ((int32_t)(predictionA + > > (predictionB >> 1)) >> 10); > > + } else > > + p->lastA[filter] =3D decoded + ((int64_t)((uint64_t)prediction= A + > > (predictionB >> 1)) >> 10); > > >=20 > Please make {} block. ok >=20 >=20 > > p->filterA[filter] =3D p->lastA[filter] + ((int64_t)(p->filterA[fi= lter] > > * 31ULL) >> 5); > > > > sign =3D APESIGN(decoded); > > @@ -1240,10 +1247,10 @@ static void > > predictor_decode_stereo_3950(APEContext *ctx, int count) > > while (count--) { > > /* Predictor Y */ > > *decoded0 =3D predictor_update_filter(p, *decoded0, 0, YDELAYA, > > YDELAYB, > > - YADAPTCOEFFSA, YADAPTCOEFF= SB); > > + YADAPTCOEFFSA, YADAPTCOEFF= SB, > > ctx->compression_level); > > decoded0++; > > *decoded1 =3D predictor_update_filter(p, *decoded1, 1, XDELAYA, > > XDELAYB, > > - XADAPTCOEFFSA, XADAPTCOEFF= SB); > > + XADAPTCOEFFSA, XADAPTCOEFF= SB, > > ctx->compression_level); > > decoded1++; > > > > /* Combined */ > > -- > > 2.17.1 > > > > > OK with that style fixed, assuming it fixes that ticket and is still > bitexact with both files. ive fixed the style issues i found, i hope i found all CRC tests pass on the 3 files i have will apply with my next git push thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates --s4YMk4FeS3JYeZOc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZOje/gAKCRBhHseHBAsP q3GhAJ9oDOO+1xCGsEBO9EXRLGGjEuB1YwCfcXrR40mlq6yVaRB/enusF3Gnt0Q= =x2e/ -----END PGP SIGNATURE----- --s4YMk4FeS3JYeZOc-- --===============1095062475647812190== 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". --===============1095062475647812190==--