aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flacenc.c
diff options
context:
space:
mode:
authorJames Darnley <james.darnley@gmail.com>2014-08-12 23:22:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-13 03:09:26 +0200
commit54a51d384055a771ba1eeef3c2f399bd03fa2663 (patch)
tree2d7e770fb0fcfebaba0b4ef02f9714e07109f4c2 /libavcodec/flacenc.c
parenta8592db9bb787e6cd3aece69ce211cb97bd718cd (diff)
downloadffmpeg-54a51d384055a771ba1eeef3c2f399bd03fa2663.tar.gz
lavc/flacenc: partially unroll loop in flac_enc_lpc_16
It now does 12 samples per iteration, up from 4. From 1.8 to 3.2 times faster again. 3.6 to 5.7 times faster overall. Runtime is reduced by a further 2 to 18%. Overall runtime reduced by 4 to 50%. Same conditions as before apply. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r--libavcodec/flacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index f37bab8f3e..3b72888966 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -80,7 +80,7 @@ typedef struct FlacSubframe {
int shift;
RiceContext rc;
int32_t samples[FLAC_MAX_BLOCKSIZE];
- int32_t residual[FLAC_MAX_BLOCKSIZE+3];
+ int32_t residual[FLAC_MAX_BLOCKSIZE+11];
} FlacSubframe;
typedef struct FlacFrame {