OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f473666
)
remove a branch from an inner loop.
author
Loren Merritt
<lorenm@u.washington.edu>
Sat, 27 Oct 2007 13:39:19 +0000
(13:39 +0000)
committer
Loren Merritt
<lorenm@u.washington.edu>
Sat, 27 Oct 2007 13:39:19 +0000
(13:39 +0000)
1% faster flac encoding.
Originally committed as revision 10865 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/flacenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/flacenc.c
b/libavcodec/flacenc.c
index
c0bd830
..
3e92c06
100644
(file)
--- a/
libavcodec/flacenc.c
+++ b/
libavcodec/flacenc.c
@@
-474,16
+474,15
@@
static uint32_t calc_optimal_rice_params(RiceContext *rc, int porder,
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;