Mercurial > libavcodec.hg
comparison snow.c @ 3056:17494903551b libavcodec
revert 1.83 because it's not needed
author | lorenm |
---|---|
date | Sat, 21 Jan 2006 02:33:01 +0000 |
parents | 2991dc513726 |
children | 8f78b00d1252 |
comparison
equal
deleted
inserted
replaced
3055:c892b3b6bfbf | 3056:17494903551b |
---|---|
22 | 22 |
23 #include "rangecoder.h" | 23 #include "rangecoder.h" |
24 #define MID_STATE 128 | 24 #define MID_STATE 128 |
25 | 25 |
26 #include "mpegvideo.h" | 26 #include "mpegvideo.h" |
27 | |
28 #include <zlib.h> | |
29 | 27 |
30 #undef NDEBUG | 28 #undef NDEBUG |
31 #include <assert.h> | 29 #include <assert.h> |
32 | 30 |
33 #define MAX_DECOMPOSITIONS 8 | 31 #define MAX_DECOMPOSITIONS 8 |
3301 int pass, mb_x, mb_y; | 3299 int pass, mb_x, mb_y; |
3302 const int b_width = s->b_width << s->block_max_depth; | 3300 const int b_width = s->b_width << s->block_max_depth; |
3303 const int b_height= s->b_height << s->block_max_depth; | 3301 const int b_height= s->b_height << s->block_max_depth; |
3304 const int b_stride= b_width; | 3302 const int b_stride= b_width; |
3305 int color[3]; | 3303 int color[3]; |
3306 const int first_crc_pass= 12; | |
3307 uint32_t crcs[50]; | |
3308 | 3304 |
3309 for(pass=0; pass<50; pass++){ | 3305 for(pass=0; pass<50; pass++){ |
3310 int change= 0; | 3306 int change= 0; |
3311 | 3307 |
3312 for(mb_y= 0; mb_y<b_height; mb_y++){ | 3308 for(mb_y= 0; mb_y<b_height; mb_y++){ |
3437 change ++; | 3433 change ++; |
3438 } | 3434 } |
3439 } | 3435 } |
3440 } | 3436 } |
3441 av_log(NULL, AV_LOG_ERROR, "pass:%d changed:%d\n", pass, change); | 3437 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 } | |
3454 if(!change) | 3438 if(!change) |
3455 break; | 3439 break; |
3456 } | 3440 } |
3457 | 3441 |
3458 if(s->block_max_depth == 1){ | 3442 if(s->block_max_depth == 1){ |