aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-18 22:54:02 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-18 22:54:02 +0000
commit5e7c25f0d16c06e15f8da47fd7d0f05915cc8aac (patch)
tree1be6b8fd3b322919a76735a1d4e5cffedc12e91b
parent9ab2717a9d28ff5d059902aada996f039d1fc3d2 (diff)
downloadffmpeg-5e7c25f0d16c06e15f8da47fd7d0f05915cc8aac.tar.gz
simplify
Originally committed as revision 2801 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegvideo.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 1f8455a47c..e92022b0cc 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -3445,9 +3445,12 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
ptr_cr = s->new_picture.data[2] + (mb_y * 8 * wrap_c) + mb_x * 8;
if(mb_x*16+16 > s->width || mb_y*16+16 > s->height){
- ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, wrap_y, 16, 16, mb_x*16, mb_y*16, s->width, s->height);
+ ff_emulated_edge_mc(s->edge_emu_buffer , ptr_y , wrap_y,16,16,mb_x*16,mb_y*16, s->width , s->height);
ptr_y= s->edge_emu_buffer;
- emu=1;
+ ff_emulated_edge_mc(s->edge_emu_buffer+16*wrap_y , ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
+ ptr_cb= s->edge_emu_buffer+16*wrap_y;
+ ff_emulated_edge_mc(s->edge_emu_buffer+16*wrap_y+8, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
+ ptr_cr= s->edge_emu_buffer+16*wrap_y+8;
}
if (s->mb_intra) {
@@ -3479,12 +3482,6 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
skip_dct[4]= 1;
skip_dct[5]= 1;
}else{
- if(emu){ //FIXME move out of loop and fix edge_emu_buffer mess
- ff_emulated_edge_mc(s->edge_emu_buffer, ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
- ptr_cb= s->edge_emu_buffer;
- ff_emulated_edge_mc(s->edge_emu_buffer+8, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
- ptr_cr= s->edge_emu_buffer+8;
- }
s->dsp.get_pixels(s->block[4], ptr_cb, wrap_c);
s->dsp.get_pixels(s->block[5], ptr_cr, wrap_c);
}
@@ -3545,12 +3542,6 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
skip_dct[4]= 1;
skip_dct[5]= 1;
}else{
- if(emu){
- ff_emulated_edge_mc(s->edge_emu_buffer, ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
- ptr_cb= s->edge_emu_buffer;
- ff_emulated_edge_mc(s->edge_emu_buffer+8, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
- ptr_cr= s->edge_emu_buffer+8;
- }
s->dsp.diff_pixels(s->block[4], ptr_cb, dest_cb, wrap_c);
s->dsp.diff_pixels(s->block[5], ptr_cr, dest_cr, wrap_c);
}