diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-03-11 16:45:01 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-03-14 08:45:31 -0400 |
commit | f1efbca5e914b28cd37cb1ea82d371acf3b96f61 (patch) | |
tree | a1464d5951e558f17e941c9f13d3548b733e6c03 /libavcodec/ac3dsp.h | |
parent | 323e6fead07c75f418e4b60704a4f437bb3483b2 (diff) | |
download | ffmpeg-f1efbca5e914b28cd37cb1ea82d371acf3b96f61.tar.gz |
ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder.
Diffstat (limited to 'libavcodec/ac3dsp.h')
-rw-r--r-- | libavcodec/ac3dsp.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h index a4f141f2f5..31a0af375d 100644 --- a/libavcodec/ac3dsp.h +++ b/libavcodec/ac3dsp.h @@ -46,6 +46,28 @@ typedef struct AC3DSPContext { * @return a value with the same MSB as max(abs(src[])) */ int (*ac3_max_msb_abs_int16)(const int16_t *src, int len); + + /** + * Left-shift each value in an array of int16_t by a specified amount. + * @param src input array + * constraints: align 16 + * @param len number of values in the array + * constraints: multiple of 32 greater than 0 + * @param shift left shift amount + * constraints: range [0,15] + */ + void (*ac3_lshift_int16)(int16_t *src, unsigned int len, unsigned int shift); + + /** + * Right-shift each value in an array of int32_t by a specified amount. + * @param src input array + * constraints: align 16 + * @param len number of values in the array + * constraints: multiple of 16 greater than 0 + * @param shift right shift amount + * constraints: range [0,31] + */ + void (*ac3_rshift_int32)(int32_t *src, unsigned int len, unsigned int shift); } AC3DSPContext; void ff_ac3dsp_init (AC3DSPContext *c); |