[FFmpeg-devel] [PATCH 02/14] libavutil: Add new fixed dsp functions.

Michael Niedermayer michaelni at gmx.at
Mon Jun 1 16:25:11 CEST 2015


On Mon, Jun 01, 2015 at 01:23:53PM +0000, Nedeljko Babic wrote:
> > Added functions needed for implementation of fixed point aac dec.
[...]
> >> +
> >>  AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
> >>  {
> >>      AVFixedDSPContext * fdsp = av_malloc(sizeof(AVFixedDSPContext));
> >> @@ -97,6 +152,11 @@ AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
> >>  
> >>      fdsp->vector_fmul_window_scaled = vector_fmul_window_scaled_c;
> >>      fdsp->vector_fmul_window = vector_fmul_window_c;
> >> +    fdsp->vector_fmul = vector_fmul_c;
> >> +    fdsp->vector_fmul_add = vector_fmul_add_c;
> >> +    fdsp->vector_fmul_reverse = vector_fmul_reverse_c;
> >> +    fdsp->butterflies_fixed = butterflies_fixed_c;
> >> +    fdsp->scalarproduct_fixed = ff_scalarproduct_fixed_c;
> >>  
> >>      return fdsp;
> >>  }
> >> diff --git a/libavutil/fixed_dsp.h b/libavutil/fixed_dsp.h
> >> index ff6f365..73859c0 100644
> >> --- a/libavutil/fixed_dsp.h
> >> +++ b/libavutil/fixed_dsp.h
> >> @@ -54,6 +54,8 @@
> >>  #include "libavcodec/mathops.h"
> >>  
> >>  typedef struct AVFixedDSPContext {
> >> +    /* assume len is a multiple of 16, and arrays are 32-byte aligned */
> >> +
> >>      /**
> >>       * Overlap/add with window function.
> >>       * Used primarily by MDCT-based audio codecs.
> >> @@ -92,6 +94,57 @@ typedef struct AVFixedDSPContext {
> >>       */
> >>      void (*vector_fmul_window)(int32_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len);
> >>  
> >> +    /**
> >
> >> +     * Fixed-point multiplication that calculates the product of two vectors of
> >> +     * integers and stores the result in a vector of integers.
> >
> >"the product of 2 vectors" is not a clearly defined operation
> >there are many products, the dot product is the most commonly used
> >possibly but thats not what this function does, what you mean is the
> >element or component wise multiplication
> >
> 
> The definition for this function (as for most of the other functions) is
> basically the same as the definition for the similar function given in the
> float_dsp.h adjusted for the fixed point version.

uhm, i did not realize this, ill fix the wording in float_dsp.h in a
moment.

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

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150601/61b25b91/attachment.asc>


More information about the ffmpeg-devel mailing list