Revision af27aea9 libavcodec/mpegvideo.c

View differences:

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
            }

Also available in: Unified diff