summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-10-24 12:31:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-10-24 12:31:12 +0000
commit98d2f7a47f1ecc0d0025ac601e47f38f7706409f (patch)
treee4cfef861aed1230a2a5ad97a43dfa61af7b5bc6 /libavcodec/ffv1.c
parentbc29ae4a7752285ae4de2709c91d7a93a608ce62 (diff)
Optimize state transition table sorting in ffv1
Originally committed as revision 25561 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index e502e5099a..eddac74cb6 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -885,7 +885,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
do{
changed=0;
for(i=12; i<244; i++){
- for(i2=i+1; i2<245; i2++){
+ for(i2=i+1; i2<245 && i2<i+4; i2++){
#define COST(old, new) \
s->rc_stat[old][0]*-log2((256-(new))/256.0)\
+s->rc_stat[old][1]*-log2( (new) /256.0)