Revision 91aa4e33

View differences:

libavcodec/snow.c
3883 3883
    for(i=0; i<width*height; i++)
3884 3884
        buffer[0][i]= buffer[1][i]= random()%54321 - 12345;
3885 3885
    
3886
    ff_spatial_dwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
3887
    ff_spatial_idwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
3886
    ff_spatial_dwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
3887
    ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
3888 3888
    
3889 3889
    for(i=0; i<width*height; i++)
3890 3890
        if(buffer[0][i]!= buffer[1][i]) printf("fsck: %d %d %d\n",i, buffer[0][i], buffer[1][i]);
......
3894 3894
    for(i=0; i<width*height; i++)
3895 3895
        buffer[0][i]= buffer[1][i]= random()%54321 - 12345;
3896 3896
    
3897
    ff_spatial_dwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
3898
    ff_spatial_idwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
3897
    ff_spatial_dwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
3898
    ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
3899 3899
    
3900 3900
    for(i=0; i<width*height; i++)
3901
        if(buffer[0][i]!= buffer[1][i]) printf("fsck: %d %d %d\n",i, buffer[0][i], buffer[1][i]);
3901
        if(ABS(buffer[0][i] - buffer[1][i])>20) printf("fsck: %d %d %d\n",i, buffer[0][i], buffer[1][i]);
3902 3902
        
3903
#if 0
3903 3904
    printf("testing AC coder\n");
3904 3905
    memset(s.header_state, 0, sizeof(s.header_state));
3905 3906
    ff_init_range_encoder(&s.c, buffer[0], 256*256);
......
3923 3924
STOP_TIMER("get_symbol")
3924 3925
        if(j!=i*i*i/3*ABS(i)) printf("fsck: %d != %d\n", i, j);
3925 3926
    }
3927
#endif
3926 3928
{
3927 3929
int level, orientation, x, y;
3928 3930
int64_t errors[8][4];
......
3944 3946
            
3945 3947
            memset(buffer[0], 0, sizeof(int)*width*height);
3946 3948
            buf[w/2 + h/2*stride]= 256*256;
3947
            ff_spatial_idwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
3949
            ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
3948 3950
            for(y=0; y<height; y++){
3949 3951
                for(x=0; x<width; x++){
3950 3952
                    int64_t d= buffer[0][x + y*width];
......
3988 3990
                    buffer[0][x+width*y]= 256*256*tab[(x&1) + 2*(y&1)];
3989 3991
                }
3990 3992
            }
3991
            ff_spatial_dwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
3993
            ff_spatial_dwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
3992 3994
#else
3993 3995
            for(y=0; y<h; y++){
3994 3996
                for(x=0; x<w; x++){
......
3996 3998
                    buf[x + y*stride-w]=64;
3997 3999
                }
3998 4000
            }
3999
            ff_spatial_idwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);
4001
            ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count);
4000 4002
#endif
4001 4003
            for(y=0; y<height; y++){
4002 4004
                for(x=0; x<width; x++){

Also available in: Unified diff