comparison h264.c @ 1317:26c44d2433c1 libavcodec

make ff_emulated_edge_mc() independant of MpegEncContext
author michaelni
date Wed, 18 Jun 2003 22:00:23 +0000
parents 8988af3ae1e8
children 449f6e32b425
comparison
equal deleted inserted replaced
1316:b1d624981afd 1317:26c44d2433c1
1893 1893
1894 if( full_mx < 0-extra_width 1894 if( full_mx < 0-extra_width
1895 || full_my < 0-extra_height 1895 || full_my < 0-extra_height
1896 || full_mx + 16/*FIXME*/ > s->width + extra_width 1896 || full_mx + 16/*FIXME*/ > s->width + extra_width
1897 || full_my + 16/*FIXME*/ > s->height + extra_height){ 1897 || full_my + 16/*FIXME*/ > s->height + extra_height){
1898 ff_emulated_edge_mc(s, src_y - 2 - 2*s->linesize, s->linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, s->width, s->height); 1898 ff_emulated_edge_mc(s->edge_emu_buffer, src_y - 2 - 2*s->linesize, s->linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, s->width, s->height);
1899 src_y= s->edge_emu_buffer + 2 + 2*s->linesize; 1899 src_y= s->edge_emu_buffer + 2 + 2*s->linesize;
1900 emu=1; 1900 emu=1;
1901 } 1901 }
1902 1902
1903 qpix_op[luma_xy](dest_y, src_y, s->linesize); //FIXME try variable height perhaps? 1903 qpix_op[luma_xy](dest_y, src_y, s->linesize); //FIXME try variable height perhaps?
1906 } 1906 }
1907 1907
1908 if(s->flags&CODEC_FLAG_GRAY) return; 1908 if(s->flags&CODEC_FLAG_GRAY) return;
1909 1909
1910 if(emu){ 1910 if(emu){
1911 ff_emulated_edge_mc(s, src_cb, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1); 1911 ff_emulated_edge_mc(s->edge_emu_buffer, src_cb, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
1912 src_cb= s->edge_emu_buffer; 1912 src_cb= s->edge_emu_buffer;
1913 } 1913 }
1914 chroma_op(dest_cb, src_cb, s->uvlinesize, chroma_height, mx&7, my&7); 1914 chroma_op(dest_cb, src_cb, s->uvlinesize, chroma_height, mx&7, my&7);
1915 1915
1916 if(emu){ 1916 if(emu){
1917 ff_emulated_edge_mc(s, src_cr, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1); 1917 ff_emulated_edge_mc(s->edge_emu_buffer, src_cr, s->uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), s->width>>1, s->height>>1);
1918 src_cr= s->edge_emu_buffer; 1918 src_cr= s->edge_emu_buffer;
1919 } 1919 }
1920 chroma_op(dest_cr, src_cr, s->uvlinesize, chroma_height, mx&7, my&7); 1920 chroma_op(dest_cr, src_cr, s->uvlinesize, chroma_height, mx&7, my&7);
1921 } 1921 }
1922 1922