Revision b538791b

View differences:

libavcodec/snow.c
393 393

  
394 394
#define LOG2_MB_SIZE 4
395 395
#define MB_SIZE (1<<LOG2_MB_SIZE)
396
#define ENCODER_EXTRA_BITS 4
396 397

  
397 398
typedef struct x_and_coeff{
398 399
    int16_t x;
......
3402 3403
    const int w= b->width;
3403 3404
    const int h= b->height;
3404 3405
    const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16);
3405
    const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
3406
    const int qmul= qexp[qlog&(QROOT-1)]<<((qlog>>QSHIFT) + ENCODER_EXTRA_BITS);
3406 3407
    int x,y, thres1, thres2;
3407 3408
//    START_TIMER
3408 3409

  
......
4194 4195
                    s->spatial_dwt_buffer[y*w + x]= (s->spatial_dwt_buffer[y*w + x] + (1<<(FRAC_BITS-1))-1)>>FRAC_BITS;
4195 4196
                }
4196 4197
            }
4198
        }else{
4199
            for(y=0; y<h; y++){
4200
                for(x=0; x<w; x++){
4201
                    s->spatial_dwt_buffer[y*w + x]<<=ENCODER_EXTRA_BITS;
4202
                }
4203
            }
4197 4204
        }
4198 4205

  
4199 4206
        ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count);
tests/ffmpeg.regression.ref
141 141
2654678 ./tests/data/a-ffv1.avi
142 142
799d3db687f6cdd7a837ec156efc171f *./tests/data/out.yuv
143 143
stddev:  0.00 PSNR:99.99 bytes:7602176
144
958d649d09b7361d5f00b5b3fcccbcd2 *./tests/data/a-snow.avi
145
156606 ./tests/data/a-snow.avi
146
b19cb7f9134f922326028c6bb44e96de *./tests/data/out.yuv
144
19c377580ec83d0c5fc4da0740dec278 *./tests/data/a-snow.avi
145
156532 ./tests/data/a-snow.avi
146
64282679f712a2b09cde43edb18a6fb0 *./tests/data/out.yuv
147 147
stddev: 23.14 PSNR:20.83 bytes:7602176
148 148
ba999e86070aa971376e7f317a022c37 *./tests/data/a-snow53.avi
149 149
3519486 ./tests/data/a-snow53.avi
tests/rotozoom.regression.ref
141 141
3525804 ./tests/data/a-ffv1.avi
142 142
dde5895817ad9d219f79a52d0bdfb001 *./tests/data/out.yuv
143 143
stddev:  0.00 PSNR:99.99 bytes:7602176
144
2cfa1bdb443d04a890208a83fd239461 *./tests/data/a-snow.avi
145
68872 ./tests/data/a-snow.avi
146
64a0495b7ab53509d3b791465262795c *./tests/data/out.yuv
144
213abed95d2e43cf7d2c9e1921779e6d *./tests/data/a-snow.avi
145
68852 ./tests/data/a-snow.avi
146
f3ab734e188a8e2af7b89e0f101bd7a1 *./tests/data/out.yuv
147 147
stddev: 10.86 PSNR:27.40 bytes:7602176
148 148
3d0da6aeec9b80c6ee0ff4b747bdd0f0 *./tests/data/a-snow53.avi
149 149
2721980 ./tests/data/a-snow53.avi
tests/seek.regression.ref
2050 2050
ret: 0 st:-1 ts:-1.000000 flags:0
2051 2051
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:5660 size:2987 flags:1
2052 2052
ret: 0 st:-1 ts:1.894167 flags:1
2053
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46908 size:3663 flags:1
2053
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46872 size:3663 flags:1
2054 2054
ret: 0 st: 0 ts:0.800000 flags:0
2055
ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:31690 size:3478 flags:1
2055
ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:31656 size:3478 flags:1
2056 2056
ret:-1 st: 0 ts:-0.320000 flags:1
2057 2057
ret:-1 st:-1 ts:2.576668 flags:0
2058 2058
ret: 0 st:-1 ts:1.470835 flags:1
2059
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46908 size:3663 flags:1
2059
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46872 size:3663 flags:1
2060 2060
ret: 0 st: 0 ts:0.360000 flags:0
2061
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:17990 size:3229 flags:1
2061
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:17968 size:3228 flags:1
2062 2062
ret:-1 st: 0 ts:-0.760000 flags:1
2063 2063
ret:-1 st:-1 ts:2.153336 flags:0
2064 2064
ret: 0 st:-1 ts:1.047503 flags:1
2065
ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:31690 size:3478 flags:1
2065
ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:31656 size:3478 flags:1
2066 2066
ret: 0 st: 0 ts:-0.040000 flags:0
2067 2067
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:5660 size:2987 flags:1
2068 2068
ret: 0 st: 0 ts:2.840000 flags:1
2069
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63350 size:3635 flags:1
2069
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63328 size:3635 flags:1
2070 2070
ret: 0 st:-1 ts:1.730004 flags:0
2071
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63350 size:3635 flags:1
2071
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63328 size:3635 flags:1
2072 2072
ret: 0 st:-1 ts:0.624171 flags:1
2073
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:17990 size:3229 flags:1
2073
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:17968 size:3228 flags:1
2074 2074
ret: 0 st: 0 ts:-0.480000 flags:0
2075 2075
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:5660 size:2987 flags:1
2076 2076
ret: 0 st: 0 ts:2.400000 flags:1
2077
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63350 size:3635 flags:1
2077
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63328 size:3635 flags:1
2078 2078
ret: 0 st:-1 ts:1.306672 flags:0
2079
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46908 size:3663 flags:1
2079
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46872 size:3663 flags:1
2080 2080
ret: 0 st:-1 ts:0.200839 flags:1
2081 2081
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:5660 size:2987 flags:1
2082 2082
ret: 0 st: 0 ts:-0.920000 flags:0
2083 2083
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:5660 size:2987 flags:1
2084 2084
ret: 0 st: 0 ts:2.000000 flags:1
2085
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63350 size:3635 flags:1
2085
ret: 0 st: 0 dts:1.920000 pts:1.920000 pos:63328 size:3635 flags:1
2086 2086
ret: 0 st:-1 ts:0.883340 flags:0
2087
ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:31690 size:3478 flags:1
2087
ret: 0 st: 0 dts:0.960000 pts:0.960000 pos:31656 size:3478 flags:1
2088 2088
ret:-1 st:-1 ts:-0.222493 flags:1
2089 2089
ret:-1 st: 0 ts:2.680000 flags:0
2090 2090
ret: 0 st: 0 ts:1.560000 flags:1
2091
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46908 size:3663 flags:1
2091
ret: 0 st: 0 dts:1.440000 pts:1.440000 pos:46872 size:3663 flags:1
2092 2092
ret: 0 st:-1 ts:0.460008 flags:0
2093
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:17990 size:3229 flags:1
2093
ret: 0 st: 0 dts:0.480000 pts:0.480000 pos:17968 size:3228 flags:1
2094 2094
ret:-1 st:-1 ts:-0.645825 flags:1
2095 2095
----------------
2096 2096
tests/data/a-snow53.avi

Also available in: Unified diff