Revision d3ac6ed6

View differences:

libavcodec/snow.c
25 25

  
26 26
#include "mpegvideo.h"
27 27

  
28
#include <zlib.h>
29

  
28 30
#undef NDEBUG
29 31
#include <assert.h>
30 32

  
......
3301 3303
    const int b_height= s->b_height << s->block_max_depth;
3302 3304
    const int b_stride= b_width;
3303 3305
    int color[3];
3306
    const int first_crc_pass= 12;
3307
    uint32_t crcs[50];
3304 3308

  
3305 3309
    for(pass=0; pass<50; pass++){
3306 3310
        int change= 0;
......
3435 3439
            }
3436 3440
        }
3437 3441
        av_log(NULL, AV_LOG_ERROR, "pass:%d changed:%d\n", pass, change);
3442

  
3443
        if(pass >= first_crc_pass){
3444
            int i;
3445
            //FIXME can we hash just the blocks that were analysed?
3446
            crcs[pass]= crc32(crc32(0,NULL,0), (void*)s->block, b_stride*b_height*sizeof(BlockNode));
3447
            for(i=pass-1; i>=first_crc_pass; i--){
3448
                if(crcs[i] == crcs[pass]){
3449
                    change= 0;
3450
                    break;
3451
                }
3452
            }
3453
        }
3438 3454
        if(!change)
3439 3455
            break;
3440 3456
    }
tests/ffmpeg.regression.ref
119 119
2653642 ./data/a-ffv1.avi
120 120
799d3db687f6cdd7a837ec156efc171f *./data/out.yuv
121 121
stddev:  0.00 PSNR:99.99 bytes:7602176
122
97c7066617d9e6c86a43a2736b3e9f16 *./data/a-snow.avi
123
1190760 ./data/a-snow.avi
124
7e4d9c61252ff22b1a0d4e892cc1d957 *./data/out.yuv
125
stddev:  2.89 PSNR:38.87 bytes:7602176
122
b7e88c743458e60d59d83554d1e1ace5 *./data/a-snow.avi
123
1191118 ./data/a-snow.avi
124
2e0cda9acd71d339d72372a22591500a *./data/out.yuv
125
stddev:  2.90 PSNR:38.87 bytes:7602176
126 126
11fd61ee7e67ef7a7b2a3df973691305 *./data/a-snow53.avi
127 127
3533710 ./data/a-snow53.avi
128 128
799d3db687f6cdd7a837ec156efc171f *./data/out.yuv

Also available in: Unified diff