diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-03-15 22:29:04 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-03-17 16:46:48 -0400 |
commit | 0f999cfddb0746602288eabddf38679fd25a2ff7 (patch) | |
tree | 055b877b24d0d1df4ff4feca6d0922174c51938f /libavcodec/ac3dsp.h | |
parent | 487fef2dcc24d7b4051b4402acf5c619fb082351 (diff) | |
download | ffmpeg-0f999cfddb0746602288eabddf38679fd25a2ff7.tar.gz |
ac3enc: add float_to_fixed24() with x86-optimized versions to AC3DSPContext
and use in scale_coefficients() for the floating-point AC-3 encoder.
Diffstat (limited to 'libavcodec/ac3dsp.h')
-rw-r--r-- | libavcodec/ac3dsp.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h index 31a0af375d..0a2dedf478 100644 --- a/libavcodec/ac3dsp.h +++ b/libavcodec/ac3dsp.h @@ -68,9 +68,22 @@ typedef struct AC3DSPContext { * constraints: range [0,31] */ void (*ac3_rshift_int32)(int32_t *src, unsigned int len, unsigned int shift); + + /** + * Convert an array of float in range [-1.0,1.0] to int32_t with range + * [-(1<<24),(1<<24)] + * + * @param dst destination array of int32_t. + * constraints: 16-byte aligned + * @param src source array of float. + * constraints: 16-byte aligned + * @param len number of elements to convert. + * constraints: multiple of 32 greater than zero + */ + void (*float_to_fixed24)(int32_t *dst, const float *src, unsigned int len); } AC3DSPContext; -void ff_ac3dsp_init (AC3DSPContext *c); -void ff_ac3dsp_init_x86(AC3DSPContext *c); +void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact); +void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact); #endif /* AVCODEC_AC3DSP_H */ |