Commit 98d2f7a4 authored by Michael Niedermayer's avatar Michael Niedermayer

Optimize state transition table sorting in ffv1

Originally committed as revision 25561 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent bc29ae4a
...@@ -885,7 +885,7 @@ static av_cold int encode_init(AVCodecContext *avctx) ...@@ -885,7 +885,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
do{ do{
changed=0; changed=0;
for(i=12; i<244; i++){ 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) \ #define COST(old, new) \
s->rc_stat[old][0]*-log2((256-(new))/256.0)\ s->rc_stat[old][0]*-log2((256-(new))/256.0)\
+s->rc_stat[old][1]*-log2( (new) /256.0) +s->rc_stat[old][1]*-log2( (new) /256.0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment