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 A3A1E49AF2 for ; Tue, 2 Apr 2024 07:22:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E578568D131; Tue, 2 Apr 2024 10:22:21 +0300 (EEST) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ACE6868CDB0 for ; Tue, 2 Apr 2024 10:22:14 +0300 (EEST) Received: from a5376560c12b271e484bce3a31b3134b ([1.145.146.234]) (authenticated (0 bits)) by mx.sdf.org (8.16.1/8.14.3) with ESMTPSA id 4327M0Nb015170 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Tue, 2 Apr 2024 07:22:04 GMT Date: Tue, 2 Apr 2024 18:21:54 +1100 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 5/7] avcodec/dsddec: Fix decoding LSBF samples 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="===============5449874719317778114==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5449874719317778114== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3+R0XIJCtwu3E7TN" Content-Disposition: inline --3+R0XIJCtwu3E7TN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 02, 2024 at 03:37:06AM +0200, Andreas Rheinhardt wrote: > ff_dsd2pcm_translate() works internally by converting LSBF input > to MSBF upon reading; its buffer is therefore always MSBF > and should therefore be initialized with MSBF silence; > but this is not true since e3d8963c3cb5b8cd31460dd9b3b9dba2a2343bf5 > which this patch effectively reverts. >=20 > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/dsddec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/libavcodec/dsddec.c b/libavcodec/dsddec.c > index 22009c70ef..2bb2e73b75 100644 > --- a/libavcodec/dsddec.c > +++ b/libavcodec/dsddec.c > @@ -56,7 +56,7 @@ static av_cold int decode_init(AVCodecContext *avctx) > if (!s) > return AVERROR(ENOMEM); > =20 > - silence =3D avctx->codec_id =3D=3D AV_CODEC_ID_DSD_LSBF || avctx->co= dec_id =3D=3D AV_CODEC_ID_DSD_LSBF_PLANAR ? DSD_SILENCE_REVERSED : DSD_SILE= NCE; > + silence =3D DSD_SILENCE; > for (i =3D 0; i < avctx->ch_layout.nb_channels; i++) { > s[i].pos =3D 0; > memset(s[i].buf, silence, sizeof(s[i].buf)); > --=20 ok. with this patch, DSD_SILENCE, DSD_SILENCE_REVERSED macros and even the sile= nce var are no longer neccessary. i suggest reverting the memset line and attached comment back to way it was= in the initial commit (5f4f9ee99f4e9ab980bb18475009c701ba47a74f). -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --3+R0XIJCtwu3E7TN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCZguyDgAKCRBnYHnFrEDd a9hvAJoD6WfsH0+KlYnVPWR7BFN1JZXHnwCgzluY9bq+IX38rJzU6VaAuuxNKMs= =up1S -----END PGP SIGNATURE----- --3+R0XIJCtwu3E7TN-- --===============5449874719317778114== 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". --===============5449874719317778114==--