summaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3dsp.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-02-13 14:49:50 -0500
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-13 16:49:39 -0500
commitfbb6b49dabc3398440c6dfa838aa090a7a6ebc0d (patch)
tree050f0baf5915823f816682340bde83417541854c /libavcodec/ac3dsp.h
parent1a973feb45826a1998b4286ecfe1fa7a602b8780 (diff)
downloadffmpeg-streaming-fbb6b49dabc3398440c6dfa838aa090a7a6ebc0d.zip
ffmpeg-streaming-fbb6b49dabc3398440c6dfa838aa090a7a6ebc0d.tar.gz
ac3enc: Add x86-optimized function to speed up log2_tab().
AC3DSPContext.ac3_max_msb_abs_int16() finds the maximum MSB of the absolute value of each element in an array of int16_t. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/ac3dsp.h')
-rw-r--r--libavcodec/ac3dsp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
index 7f13b11..a4f141f 100644
--- a/libavcodec/ac3dsp.h
+++ b/libavcodec/ac3dsp.h
@@ -35,6 +35,17 @@ typedef struct AC3DSPContext {
* @param nb_coefs number of frequency coefficients.
*/
void (*ac3_exponent_min)(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
+
+ /**
+ * Calculate the maximum MSB of the absolute value of each element in an
+ * array of int16_t.
+ * @param src input array
+ * constraints: align 16. values must be in range [-32767,32767]
+ * @param len number of values in the array
+ * constraints: multiple of 16 greater than 0
+ * @return a value with the same MSB as max(abs(src[]))
+ */
+ int (*ac3_max_msb_abs_int16)(const int16_t *src, int len);
} AC3DSPContext;
void ff_ac3dsp_init (AC3DSPContext *c);
OpenPOWER on IntegriCloud