Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2522:e25782262d7d libavcodec
kill warnings patch by (Mns Rullgrd <mru inprovide com>)
author | michael |
---|---|
date | Thu, 24 Feb 2005 19:08:50 +0000 |
parents | fc23a5a86d97 |
children | 673d048d48dc |
comparison
equal
deleted
inserted
replaced
2521:d3885f927bc7 | 2522:e25782262d7d |
---|---|
1818 if(IS_8X8(pict->mb_type[mb_index])){ | 1818 if(IS_8X8(pict->mb_type[mb_index])){ |
1819 int i; | 1819 int i; |
1820 for(i=0; i<4; i++){ | 1820 for(i=0; i<4; i++){ |
1821 int sx= mb_x*16 + 4 + 8*(i&1); | 1821 int sx= mb_x*16 + 4 + 8*(i&1); |
1822 int sy= mb_y*16 + 4 + 8*(i>>1); | 1822 int sy= mb_y*16 + 4 + 8*(i>>1); |
1823 int xy= (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << mv_sample_log2-1; | 1823 int xy= (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << (mv_sample_log2-1); |
1824 int mx= (pict->motion_val[direction][xy][0]>>shift) + sx; | 1824 int mx= (pict->motion_val[direction][xy][0]>>shift) + sx; |
1825 int my= (pict->motion_val[direction][xy][1]>>shift) + sy; | 1825 int my= (pict->motion_val[direction][xy][1]>>shift) + sy; |
1826 draw_arrow(ptr, sx, sy, mx, my, width, height, s->linesize, 100); | 1826 draw_arrow(ptr, sx, sy, mx, my, width, height, s->linesize, 100); |
1827 } | 1827 } |
1828 }else if(IS_16X8(pict->mb_type[mb_index])){ | 1828 }else if(IS_16X8(pict->mb_type[mb_index])){ |
1829 int i; | 1829 int i; |
1830 for(i=0; i<2; i++){ | 1830 for(i=0; i<2; i++){ |
1831 int sx=mb_x*16 + 8; | 1831 int sx=mb_x*16 + 8; |
1832 int sy=mb_y*16 + 4 + 8*i; | 1832 int sy=mb_y*16 + 4 + 8*i; |
1833 int xy= (mb_x*2 + (mb_y*2 + i)*mv_stride) << mv_sample_log2-1; | 1833 int xy= (mb_x*2 + (mb_y*2 + i)*mv_stride) << (mv_sample_log2-1); |
1834 int mx=(pict->motion_val[direction][xy][0]>>shift); | 1834 int mx=(pict->motion_val[direction][xy][0]>>shift); |
1835 int my=(pict->motion_val[direction][xy][1]>>shift); | 1835 int my=(pict->motion_val[direction][xy][1]>>shift); |
1836 | 1836 |
1837 if(IS_INTERLACED(pict->mb_type[mb_index])) | 1837 if(IS_INTERLACED(pict->mb_type[mb_index])) |
1838 my*=2; | 1838 my*=2; |
1842 }else if(IS_8X16(pict->mb_type[mb_index])){ | 1842 }else if(IS_8X16(pict->mb_type[mb_index])){ |
1843 int i; | 1843 int i; |
1844 for(i=0; i<2; i++){ | 1844 for(i=0; i<2; i++){ |
1845 int sx=mb_x*16 + 4 + 8*i; | 1845 int sx=mb_x*16 + 4 + 8*i; |
1846 int sy=mb_y*16 + 8; | 1846 int sy=mb_y*16 + 8; |
1847 int xy= (mb_x*2 + i + mb_y*2*mv_stride) << mv_sample_log2-1; | 1847 int xy= (mb_x*2 + i + mb_y*2*mv_stride) << (mv_sample_log2-1); |
1848 int mx=(pict->motion_val[direction][xy][0]>>shift); | 1848 int mx=(pict->motion_val[direction][xy][0]>>shift); |
1849 int my=(pict->motion_val[direction][xy][1]>>shift); | 1849 int my=(pict->motion_val[direction][xy][1]>>shift); |
1850 | 1850 |
1851 if(IS_INTERLACED(pict->mb_type[mb_index])) | 1851 if(IS_INTERLACED(pict->mb_type[mb_index])) |
1852 my*=2; | 1852 my*=2; |
2075 | 2075 |
2076 static int skip_check(MpegEncContext *s, Picture *p, Picture *ref){ | 2076 static int skip_check(MpegEncContext *s, Picture *p, Picture *ref){ |
2077 int x, y, plane; | 2077 int x, y, plane; |
2078 int score=0; | 2078 int score=0; |
2079 int64_t score64=0; | 2079 int64_t score64=0; |
2080 int64_t threshold; | |
2081 | 2080 |
2082 for(plane=0; plane<3; plane++){ | 2081 for(plane=0; plane<3; plane++){ |
2083 const int stride= p->linesize[plane]; | 2082 const int stride= p->linesize[plane]; |
2084 const int bw= plane ? 1 : 2; | 2083 const int bw= plane ? 1 : 2; |
2085 for(y=0; y<s->mb_height*bw; y++){ | 2084 for(y=0; y<s->mb_height*bw; y++){ |