summaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3dsp.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-03-11 16:45:01 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-03-14 08:45:31 -0400
commitf1efbca5e914b28cd37cb1ea82d371acf3b96f61 (patch)
treea1464d5951e558f17e941c9f13d3548b733e6c03 /libavcodec/ac3dsp.h
parent323e6fead07c75f418e4b60704a4f437bb3483b2 (diff)
downloadffmpeg-streaming-f1efbca5e914b28cd37cb1ea82d371acf3b96f61.zip
ffmpeg-streaming-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.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
index a4f141f..31a0af3 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);
OpenPOWER on IntegriCloud