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 ESMTPS id EAED24CBCC for ; Tue, 11 Feb 2025 22:55:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BA97C68BE24; Wed, 12 Feb 2025 00:55:34 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B293068BDA2 for ; Wed, 12 Feb 2025 00:55:28 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id D502E43284 for ; Tue, 11 Feb 2025 22:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1739314528; 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=2YXaw+Y60KQb8V80pGx01iFrVs9xhQYzuaFVvEyb0D4=; b=FFQM6FHAYZeGOnE9rZuFAZGspGmn6RWJXeSFy0TJ2o8vmJL1SryMacyzwjNNRN0lUwxkpn mX/TY64PsRwk3uBAfuiXrrAatQqfTmRQzisYgRB05xPgqjjCJ7G7ExKWq0Augsxc1+5R5S xSMbQAYNz2DaJn+W7F+GtRaKBxIULSYyulpQRSmzCogxWHLx5arTiyE4fgU8Ph21xO6qb1 Yjhr4UWWMJCv7aeFWul8ATIwtDKt4JY2tUVDfWx+/EQETwlB72E7U4fKX1Js3pJHANIWPr XopEIObZCZP0emq+SFiN/0i5QGvZKAIanSwsNuzxOJMOORdDfyzu6wfCa4uDKw== Date: Tue, 11 Feb 2025 23:55:27 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250211225527.GI4991@pb2> References: <20250206160517.9746-1-jamrial@gmail.com> <20250206191747.12860-1-jamrial@gmail.com> MIME-Version: 1.0 In-Reply-To: <20250206191747.12860-1-jamrial@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegvddviecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/ac3dec: add a flush callback for the ac3 and eac3 decoders 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="===============1438235624240792335==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1438235624240792335== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X3YR2Fhp0sY1f2yQ" Content-Disposition: inline --X3YR2Fhp0sY1f2yQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi James On Thu, Feb 06, 2025 at 04:17:47PM -0300, James Almer wrote: > Fixes ticket #10732 >=20 > Signed-off-by: James Almer > --- > libavcodec/ac3dec.c | 10 ++++++++++ > libavcodec/ac3dec.h | 40 ++++++++++++++++++++++----------------- > libavcodec/ac3dec_fixed.c | 1 + > libavcodec/ac3dec_float.c | 2 ++ > 4 files changed, 36 insertions(+), 17 deletions(-) >=20 > diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c > index ff8cbfb0b4..2cf82abc19 100644 > --- a/libavcodec/ac3dec.c > +++ b/libavcodec/ac3dec.c [...] > /** > * Parse the 'sync info' and 'bit stream info' from the AC-3 bitstream. > * GetBitContext within AC3DecodeContext must point to > diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h > index 98de7b5abf..cc6d1a118e 100644 > --- a/libavcodec/ac3dec.h > +++ b/libavcodec/ac3dec.h > @@ -75,8 +75,30 @@ typedef struct AC3DecodeContext { > AVCodecContext *avctx; ///< parent context > GetBitContext gbc; ///< bitstream reader > =20 > + AVTXContext *tx_128, *tx_256; > + av_tx_fn tx_fn_128, tx_fn_256; > + > +///@name Optimization > + BswapDSPContext bdsp; > +#if USE_FIXED > + AVFixedDSPContext *fdsp; > +#else > + AVFloatDSPContext *fdsp; > +#endif > + AC3DSPContext ac3dsp; > + FmtConvertContext fmt_conv; ///< optimized conversion fu= nctions > +///@} > + > + INTFLOAT *xcfptr[AC3_MAX_CHANNELS]; > + INTFLOAT *dlyptr[AC3_MAX_CHANNELS]; > + > + AVChannelLayout downmix_layout; > + SHORTFLOAT *downmix_coeffs[2]; ///< stereo downmix coef= ficients > + > +// Start of flushable fields > ///@name Bit stream information > ///@{ > + // frame_type must be first > int frame_type; ///< frame type = (strmtyp) > int substreamid; ///< substream identification > int superframe_size; ///< current superframe size= , in bytes > @@ -164,7 +186,6 @@ typedef struct AC3DecodeContext { > int fbw_channels; ///< number of full-band= width channels > int channels; ///< number of total cha= nnels > int lfe_ch; ///< index of LFE channel > - SHORTFLOAT *downmix_coeffs[2]; ///< stereo downmix coef= ficients > int downmixed; ///< indicates if coeffs= are currently downmixed > int output_mode; ///< output channel conf= iguration > int prev_output_mode; ///< output channel conf= iguration for previous frame > @@ -222,24 +243,9 @@ typedef struct AC3DecodeContext { > =20 > ///@name IMDCT > int block_switch[AC3_MAX_CHANNELS]; ///< block switch flags = (blksw) > - AVTXContext *tx_128, *tx_256; > - av_tx_fn tx_fn_128, tx_fn_256; > -///@} > - > -///@name Optimization > - BswapDSPContext bdsp; > -#if USE_FIXED > - AVFixedDSPContext *fdsp; > -#else > - AVFloatDSPContext *fdsp; > -#endif > - AC3DSPContext ac3dsp; > - FmtConvertContext fmt_conv; ///< optimized conversion fu= nctions > ///@} > =20 > SHORTFLOAT *outptr[AC3_MAX_CHANNELS]; > - INTFLOAT *xcfptr[AC3_MAX_CHANNELS]; > - INTFLOAT *dlyptr[AC3_MAX_CHANNELS]; > =20 > ///@name Aligned arrays > DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_C= OEFS]; ///< fixed-point transform coefficients > @@ -252,7 +258,7 @@ typedef struct AC3DecodeContext { > DECLARE_ALIGNED(32, SHORTFLOAT, output_buffer)[EAC3_MAX_CHANNELS][AC= 3_BLOCK_SIZE * 6]; ///< final output buffer > ///@} > =20 > - AVChannelLayout downmix_layout; > +// End of flushable fields > } AC3DecodeContext; This seems moving fields around, if so, maybe this should be in a seperate patch thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Breaking DRM is a little like attempting to break through a door even though the window is wide open and the only thing in the house is a bunch of things you dont want and which you would get tomorrow for free anyway --X3YR2Fhp0sY1f2yQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ6vVWgAKCRBhHseHBAsP q33oAJ9kXdc7G80CulEEqxEo+zVDObUqoACbBwxbKyqK5jngF6+DrwJR5FZOtyg= =L18D -----END PGP SIGNATURE----- --X3YR2Fhp0sY1f2yQ-- --===============1438235624240792335== 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". --===============1438235624240792335==--