From f1efbca5e914b28cd37cb1ea82d371acf3b96f61 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Fri, 11 Mar 2011 16:45:01 -0500 Subject: ac3enc: add SIMD-optimized shifting functions for use with the fixed-point AC3 encoder. --- libavcodec/ac3dsp.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'libavcodec/ac3dsp.h') 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); -- cgit v1.2.3