From patchwork Thu Feb 2 02:47:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 2411 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp2729817vsb; Wed, 1 Feb 2017 18:48:13 -0800 (PST) X-Received: by 10.28.206.199 with SMTP id e190mr5653210wmg.98.1486003693663; Wed, 01 Feb 2017 18:48:13 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 28si26834569wru.213.2017.02.01.18.48.12; Wed, 01 Feb 2017 18:48:13 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64DD9689730; Thu, 2 Feb 2017 04:48:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ACF17680A24 for ; Thu, 2 Feb 2017 04:48:03 +0200 (EET) Received: from domain ([213.47.41.20]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MaE4a-1csyfy41xQ-00JnuB for ; Thu, 02 Feb 2017 03:48:03 +0100 Date: Thu, 2 Feb 2017 03:47:36 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20170202024736.GR4698@nb4> References: <20170201031309.99552-1-atomnuker@gmail.com> <20170201031309.99552-6-atomnuker@gmail.com> <20170201115122.GN4698@nb4> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V03:K0:W1ogsaac5JMHMjgV5SaU6BhXA9M6DFGBJXLU7yCROXWp1pe8DhS lM8F8tlFMx5g1Oa3sVUB4n1KsqDGmXL6chu+QpEq34o90odz/iSgdvVx3WxMlqF5OV7/Zt4 GdesucUCli+C1i5A6MxK47IcL+sd77GIJUdTLk9nSUs76pVaYKPTacyWCk7cdsVzoTdi918 FsEIJ41J8I4QekfdBB00w== X-UI-Out-Filterresults: notjunk:1; V01:K0:XSvUa9qDs3c=:eOMrAtGZ/BzkDdX+DSPhEm zz6r5s1Ho77xv5BGGdDUT8fXsbK7/rlyNjlQANYrhw+d6IHoIefB1n3WqrFv40B1F+VMHaqM0 EYR6n5UgkcASGJc6b+BRVy7jFC75LeBY19iKBKcACnYDqf0VAepvo/zGq0HRvne50il9LWyAz LYCotQB9x1xT31g5BC99Sx7K4dDUB47h2dnT6kcrIWfj9EhFRcwgJHrd7NgX3Gk7L03LVLAjI jLmZxPVChd9qGhigtAjLgivDOO/Lle5G94lhxikGKoi7qNBh61ET8Grojuo+2hzzGJiiJrHqi Ax5xWjMbBNDP7c7adwSgciadOaN36jJ3I4NzGVoDxBp2GaZo6nae16jZ5NkJ6Y2gz+5qg/9i/ WKqFilajOV0LFQB1iz7wRH16T/ot8zULF8K//6SSBPfPkOAE6zSH8m0ZvAdXA7r2nT4/yiXfd A98BtOZih6vIiV9oEIr5pg/lwz/RYGX6qwf0XWnzESTOD7c7PIC28bWwWNW584iv77OoQzgcS e/Z5+Dt+fu+72l7th04c8vLMfIBh2qLqMyIqxK9pNp35W9QR+Giq/8G+jKJqR7vzRkfLjos18 Iw8VytP0C9UFpT3y08oCMeui3ONrSNia31pug9J1RCidtjo1TvCqQEjKdESwzLXVIppJ1aWRa DaQ7G0Px2pZQT8Ch1hYXDFC9UUuCFb/DrvGNr6XyCzMCpFELk5REwJ6zJ2/ZgasKqJVheFFf0 JDQrUKoAnhBEmb5nM/a151w+rwdMsaf9kjFcPlljBUR9Ho9V1U1VZQ8Y5VY= Subject: Re: [FFmpeg-devel] [PATCH 5/6] opus_celt: rename structures to better names and reorganize them X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Wed, Feb 01, 2017 at 01:03:23PM +0000, Rostislav Pehlivanov wrote: > On 1 February 2017 at 11:51, Michael Niedermayer wrote: > > > On Wed, Feb 01, 2017 at 03:13:08AM +0000, Rostislav Pehlivanov wrote: > > > This is meant to be applied on top of my previous patch which > > > split PVQ into celt_pvq.c and made opus_celt.h > > > > > > Essentially nothing has been changed other than renaming CeltFrame > > > to CeltBlock (CeltFrame had absolutely nothing at all to do with > > > a frame) and CeltContext to CeltFrame. > > > 3 variables have been put in CeltFrame as they make more sense > > > there rather than being passed around as arguments. > > > The coefficients have been moved to the CeltBlock structure > > > (why the hell were they in CeltContext and not in CeltFrame??). > > > > > > Now the encoder would be able to use the exact context the decoder > > > uses (plus a couple of extra fields in there). > > > > > > FATE passes, no slowdowns, etc. > > > > This doesnt build on arm-linux-gnueabi-gcc-4.5 > > (i think arm is unrelated here) > > > > In file included from src/libavcodec/opus_celt.c:28:0: > > src/libavcodec/opus_celt.h:134:3: error: redefinition of typedef > > ‘CeltFrame’ > > src/libavcodec/opus.h:82:26: note: previous declaration of ‘CeltFrame’ was > > here > > make: *** [libavcodec/opus_celt.o] Error 1 > > > > > > [...] > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > No great genius has ever existed without some touch of madness. -- > > Aristotle > > > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > Seems older GCC versions are unhappy. > Removed the typedef from the struct definition in opus_celt.h and attached > new patch this fixes it: [...] diff --git a/libavcodec/opus_celt.h b/libavcodec/opus_celt.h index 9d144f2f52..681b028d9c 100644 --- a/libavcodec/opus_celt.h +++ b/libavcodec/opus_celt.h @@ -59,7 +59,7 @@ enum CeltBlockSize { CELT_BLOCK_NB }; -struct CeltBlock { +typedef struct CeltBlock { float energy[CELT_MAX_BANDS]; float lin_energy[CELT_MAX_BANDS]; float error_energy[CELT_MAX_BANDS]; @@ -87,9 +87,9 @@ struct CeltBlock { float pf_gains_old[3]; float emph_coeff; -}; +} CeltBlock; -typedef struct CeltFrame { +struct CeltFrame { // constant values that do not change during context lifetime AVCodecContext *avctx; MDCT15Context *imdct[4]; @@ -131,7 +131,7 @@ typedef struct CeltFrame { int tf_change [CELT_MAX_BANDS]; DECLARE_ALIGNED(32, float, scratch)[22 * 8]; // MAX(ff_celt_freq_range) * 1<