Revision af27aea9

View differences:

libavcodec/motion_est.c
1135 1135
    
1136 1136
    sum = pix_sum(pix, s->linesize);
1137 1137
    
1138
    sum= (sum+8)>>4;
1139
    varc = (pix_norm1(pix, s->linesize) - sum*sum + 500 + 128)>>8;
1138
    varc = (pix_norm1(pix, s->linesize) - (((unsigned)(sum*sum))>>8) + 500 + 128)>>8;
1140 1139
    vard = (pix_norm(pix, ppix, s->linesize)+128)>>8;
1141 1140

  
1142 1141
//printf("%d %d %d %X %X %X\n", s->mb_width, mb_x, mb_y,(int)s, (int)s->mb_var, (int)s->mc_mb_var); fflush(stdout);
1143 1142
    s->mb_var   [s->mb_width * mb_y + mb_x] = varc;
1144 1143
    s->mc_mb_var[s->mb_width * mb_y + mb_x] = vard;
1145
    s->mb_mean  [s->mb_width * mb_y + mb_x] = (sum+7)>>4;
1144
    s->mb_mean  [s->mb_width * mb_y + mb_x] = (sum+128)>>8;
1146 1145
    s->mb_var_sum    += varc;
1147 1146
    s->mc_mb_var_sum += vard;
1148 1147
//printf("E%d %d %d %X %X %X\n", s->mb_width, mb_x, mb_y,(int)s, (int)s->mb_var, (int)s->mc_mb_var); fflush(stdout);
libavcodec/mpegvideo.c
2590 2590
                    int varc;
2591 2591
                    int sum = pix_sum(pix, s->linesize);
2592 2592
    
2593
                    sum= (sum+8)>>4;
2594
                    varc = (pix_norm1(pix, s->linesize) - sum*sum + 500 + 128)>>8;
2593
                    varc = (pix_norm1(pix, s->linesize) - (((unsigned)(sum*sum))>>8) + 500 + 128)>>8;
2595 2594

  
2596 2595
                    s->mb_var [s->mb_width * mb_y + mb_x] = varc;
2597
                    s->mb_mean[s->mb_width * mb_y + mb_x] = (sum+7)>>4;
2596
                    s->mb_mean[s->mb_width * mb_y + mb_x] = (sum+128)>>8;
2598 2597
                    s->mb_var_sum    += varc;
2599 2598
                }
2600 2599
            }
tests/ffmpeg.regression.ref
1 1
ffmpeg regression test
2
67be2deabb210740966ca5fda9a64bca *./data/a-mpeg1.mpg
3
59a66b108e8bbd3867c4ee27f4bbe2ca *./data/out.yuv
4
20f237122350f1248d9d51489bb79092 *./data/a-msmpeg4v2.avi
5
74675eb582376359fbcf76ff2fb034b6 *./data/out.yuv
6
d6367d6abb406b438cb57a7ebc4b927d *./data/a-msmpeg4.avi
7
951aa2df4ef4c1eeee3ccc8904de8e48 *./data/out.yuv
8
50b4590a3615a556361d75db8c6d43b3 *./data/a-wmv1.avi
9
3ed8e11a8a8147c3e7d736593fccae79 *./data/out.yuv
10
abe11239875a32f00fa2910828bba4fb *./data/a-h263.avi
11
c1f6c8ee7a24d8345deddf1a24ca3756 *./data/out.yuv
12
f022e9efcc88abcce80cc25232bc1cb1 *./data/a-h263p.avi
13
d53012811b639e12a88476f2c82de0ca *./data/out.yuv
14
8e41ac530894eaf3ecdb583d6d66c392 *./data/a-odivx.avi
15
bf3be8fb78a9ca91dd6b252d48ce59bb *./data/out.yuv
16
850ba6da4c9dad60b6719b0b06b204de *./data/a-mpeg4-rc.avi
17
0ab0a58082e485478f9feab5ccc6fc42 *./data/out.yuv
2
68c8a6bd81f69764063eabc2a66c9a59 *./data/a-mpeg1.mpg
3
4971324b08d4bf0a98a708d3b1a0799b *./data/out.yuv
4
01410257b88ee5d1c390737d4274bd3f *./data/a-msmpeg4v2.avi
5
a1d54e9d006cc31a5b71dabadbb4df53 *./data/out.yuv
6
6a9d8f162eb59b8bbf7c737ede86ef8b *./data/a-msmpeg4.avi
7
bdd8dc1182fa731f54c3b5ebf9002e40 *./data/out.yuv
8
8c242521ffa3854c774b3ac49c85aff4 *./data/a-wmv1.avi
9
aeb7bc27b29d894e2dc558e9e2dce089 *./data/out.yuv
10
30abed5bc6a127b04b73bb436ad3b55a *./data/a-h263.avi
11
0059bed3addc017d9f089f3256769a51 *./data/out.yuv
12
78b315bb537cc6e04bdd2a8843a4a7d8 *./data/a-h263p.avi
13
1077099de78ec2b3a573c2ee0fd0303a *./data/out.yuv
14
5b1886c7f754244126cb007b12db6fca *./data/a-odivx.avi
15
46795a8e36efb498801a8edba6c76425 *./data/out.yuv
16
1e5c838d1645e8a43f1323d615a5afce *./data/a-mpeg4-rc.avi
17
e8166d2605192eebafa54d702d4691da *./data/out.yuv
18 18
685812396445ac5c79f345965dca6b09 *./data/a-mpeg4-adv.avi
19 19
1d6c3ba2b096ac6df63f1dcabe3ed603 *./data/out.yuv
20 20
2846c8e3d97d7395eb746bfce44e0443 *./data/a-mjpeg.avi
21 21
278033451d7a6bfeb8339abbe4228499 *./data/out.yuv
22
ccbf683d781fa3cdfa18b618731fc74b *./data/a-rv10.rm
23
c1f6c8ee7a24d8345deddf1a24ca3756 *./data/out.yuv
22
bbb398b23e7e69bebf584e6697e3360c *./data/a-rv10.rm
23
0059bed3addc017d9f089f3256769a51 *./data/out.yuv
24 24
21f8ff9f1daacd9133683bb4ea0f50a4 *./data/a-mp2.mp2
25 25
116d1290ba1b4eb98fdee52e423417b1 *./data/out.wav
26 26
048b9c3444c788bac6ce5cc3a8f4db00 *./data/a-ac3.rm

Also available in: Unified diff