[FFmpeg-devel] [PATCH 1/3] mips: optimization for float aac decoder (core module)

Michael Niedermayer michaelni at gmx.at
Wed Jan 16 13:02:46 CET 2013


On Wed, Jan 09, 2013 at 10:45:32AM +0100, Nedeljko Babic wrote:
> From: Mirjana Vulin <mirjana.vulin at rt-rk.com>
> 
> Change-Id: I20673f7528108d4b607a25194dc4c7cf490ff1e0
> Signed-off-by: Mirjana Vulin <mvulin at mips.com>
> ---
>  libavcodec/aac.h                |   18 +-
>  libavcodec/aacdec.c             |   39 ++-
>  libavcodec/mips/Makefile        |    1 +
>  libavcodec/mips/aacdec_mips.c   |  830 +++++++++++++++++++++++++++++++++++++++
>  libavcodec/mips/aacdec_mips.h   |  251 ++++++++++++
>  libavcodec/mips/dsputil_mips.c  |   84 ++++-
>  libavutil/mips/float_dsp_mips.c |   41 ++-
>  7 files changed, 1248 insertions(+), 16 deletions(-)
>  create mode 100644 libavcodec/mips/aacdec_mips.c
>  create mode 100644 libavcodec/mips/aacdec_mips.h
> 
> diff --git a/libavcodec/aac.h b/libavcodec/aac.h
> index 9e9fa0e..7b96e3b 100644
> --- a/libavcodec/aac.h
> +++ b/libavcodec/aac.h
> @@ -257,10 +257,12 @@ typedef struct ChannelElement {
>      SpectralBandReplication sbr;
>  } ChannelElement;
>  
> +typedef struct AACContext AACContext;
> +
>  /**
>   * main AAC context
>   */
> -typedef struct AACContext {
> +struct AACContext {
>      AVClass        *class;
>      AVCodecContext *avctx;
>      AVFrame frame;
> @@ -318,6 +320,18 @@ typedef struct AACContext {
>  
>      OutputConfiguration oc[2];
>      int warned_num_aac_frames;
> -} AACContext;
> +
> +    /* aacdec functions pointers */
> +    void (*imdct_and_windowing)(AACContext *ac, SingleChannelElement *sce);
> +    void (*apply_ltp)(AACContext *ac, SingleChannelElement *sce);
> +    void (*apply_tns)(float coef[1024], TemporalNoiseShaping *tns,
> +                      IndividualChannelStream *ics, int decode);
> +    void (*windowing_and_mdct_ltp)(AACContext *ac, float *out,
> +                                   float *in, IndividualChannelStream *ics);
> +    void (*update_ltp)(AACContext *ac, SingleChannelElement *sce);
> +
> +};
> +
> +extern VLC vlc_spectral[11];
>  
>  #endif /* AVCODEC_AAC_H */
> diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
> index 239153a..4beacc9 100644
> --- a/libavcodec/aacdec.c
> +++ b/libavcodec/aacdec.c
> @@ -108,10 +108,12 @@
>  
>  #if ARCH_ARM
>  #   include "arm/aac.h"
> +#elif ARCH_MIPS
> +#   include "mips/aacdec_mips.h"
>  #endif
>  

>  static VLC vlc_scalefactors;
> -static VLC vlc_spectral[11];
> +VLC vlc_spectral[11];

global variables need a ff_ prefix
but can you explain what needs this table to be global ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130116/ca55ed32/attachment.asc>


More information about the ffmpeg-devel mailing list