diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-03-27 01:40:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-27 01:40:18 +0100 |
commit | 3c8493074bc43aced247a34d6b981e6f9acde0f1 (patch) | |
tree | 99b7984ed8e49d397c4cb3dab184454e26e122f1 /libavcodec | |
parent | b0efaee6c1a07b4e7575bf523542ce846202b6e2 (diff) | |
parent | 1500be13f204acb7e74dac4325ef0052576fa2a9 (diff) | |
download | ffmpeg-3c8493074bc43aced247a34d6b981e6f9acde0f1.tar.gz |
Merge remote-tracking branch 'newdev/master'
* newdev/master:
dsputil: allow to skip drawing of top/bottom edges.
Split fate-psx-str-v3 into a video-only and audio-only test.
Conflicts:
libavcodec/dsputil.c
libavcodec/mpegvideo.c
libavcodec/snow.c
libavcodec/x86/dsputil_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dsputil.c | 26 | ||||
-rw-r--r-- | libavcodec/mpegvideo.c | 6 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 10 |
3 files changed, 18 insertions, 24 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 951236c8c3..036f9f7bf4 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -303,12 +303,6 @@ static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w, i uint8_t *ptr, *last_line; int i; - last_line = buf + (height - 1) * wrap; - for(i=0;i<w;i++) { - /* top and bottom */ - if (sides&EDGE_TOP) memcpy(buf - (i + 1) * wrap, buf, width); - if (sides&EDGE_BOTTOM) memcpy(last_line + (i + 1) * wrap, last_line, width); - } /* left and right */ ptr = buf; for(i=0;i<height;i++) { @@ -316,18 +310,16 @@ static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w, i memset(ptr + width, ptr[width-1], w); ptr += wrap; } - /* corners */ - for(i=0;i<w;i++) { - if (sides&EDGE_TOP) { - memset(buf - (i + 1) * wrap - w, buf[0], w); /* top left */ - memset(buf - (i + 1) * wrap + width, buf[width-1], w); /* top right */ - } - if (sides&EDGE_BOTTOM) { - memset(last_line + (i + 1) * wrap - w, last_line[0], w); /* top left */ - memset(last_line + (i + 1) * wrap + width, last_line[width-1], w); /* top right */ - } - } + /* top and bottom + corners */ + buf -= w; + last_line = buf + (height - 1) * wrap; + if (sides & EDGE_TOP) + for(i = 0; i < w; i++) + memcpy(buf - (i + 1) * wrap, buf, width + w + w); // top + if (sides & EDGE_BOTTOM) + for (i = 0; i < w; i++) + memcpy(last_line + (i + 1) * wrap, last_line, width + w + w); // bottom } /** diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index aa5378b542..dd003b48c3 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1165,9 +1165,9 @@ void MPV_frame_end(MpegEncContext *s) && !(s->flags&CODEC_FLAG_EMU_EDGE)) { int edges = EDGE_BOTTOM | EDGE_TOP, h = s->v_edge_pos; - s->dsp.draw_edges(s->current_picture_ptr->data[0], s->linesize , s->h_edge_pos , h , EDGE_WIDTH , edges); - s->dsp.draw_edges(s->current_picture_ptr->data[1], s->uvlinesize, s->h_edge_pos>>1, h>>1, EDGE_WIDTH/2, edges); - s->dsp.draw_edges(s->current_picture_ptr->data[2], s->uvlinesize, s->h_edge_pos>>1, h>>1, EDGE_WIDTH/2, edges); + s->dsp.draw_edges(s->current_picture.data[0], s->linesize , s->h_edge_pos , h , EDGE_WIDTH , edges); + s->dsp.draw_edges(s->current_picture.data[1], s->uvlinesize, s->h_edge_pos>>1, h>>1, EDGE_WIDTH/2, edges); + s->dsp.draw_edges(s->current_picture.data[2], s->uvlinesize, s->h_edge_pos>>1, h>>1, EDGE_WIDTH/2, edges); } diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index c163a16848..d06ad6309d 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -836,9 +836,9 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, int w, ); } - for(i=0;i<w;i+=4) { - /* top and bottom (and hopefully also the corners) */ - if (sides&EDGE_TOP) { + /* top and bottom (and hopefully also the corners) */ + if (sides&EDGE_TOP) { + for(i = 0; i < w; i += 4) { ptr= buf - (i + 1) * wrap - w; __asm__ volatile( "1: \n\t" @@ -854,8 +854,10 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, int w, : "r" ((x86_reg)buf - (x86_reg)ptr - w), "r" ((x86_reg)-wrap), "r" ((x86_reg)-wrap*3), "r" (ptr+width+2*w) ); } + } - if (sides&EDGE_BOTTOM) { + if (sides&EDGE_BOTTOM) { + for(i = 0; i < w; i += 4) { ptr= last_line + (i + 1) * wrap - w; __asm__ volatile( "1: \n\t" |