[FFmpeg-cvslog] r10865 - trunk/libavcodec/flacenc.c
lorenm
subversion
Sat Oct 27 15:39:19 CEST 2007
Author: lorenm
Date: Sat Oct 27 15:39:19 2007
New Revision: 10865
Log:
remove a branch from an inner loop.
1% faster flac encoding.
Modified:
trunk/libavcodec/flacenc.c
Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c (original)
+++ trunk/libavcodec/flacenc.c Sat Oct 27 15:39:19 2007
@@ -474,16 +474,15 @@ static uint32_t calc_optimal_rice_params
uint32_t all_bits;
part = (1 << porder);
- all_bits = 0;
+ all_bits = 4 * part;
cnt = (n >> porder) - pred_order;
for(i=0; i<part; i++) {
- if(i == 1) cnt = (n >> porder);
k = find_optimal_param(sums[i], cnt);
rc->params[i] = k;
all_bits += rice_encode_count(sums[i], cnt, k);
+ cnt = n >> porder;
}
- all_bits += (4 * part);
rc->porder = porder;
More information about the ffmpeg-cvslog
mailing list