diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-03-04 00:07:41 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-03-04 00:07:41 +0000 |
commit | 5a6a9e78ab332bb54bf36761c85609881561149a (patch) | |
tree | d1def9e91601b87d3bead012e48319f9f2a91f1a /libavcodec/mpegvideo.c | |
parent | ce7f71a2ddf795f451e5acd79fd81f5149e8e87b (diff) | |
download | ffmpeg-5a6a9e78ab332bb54bf36761c85609881561149a.tar.gz |
move draw_edges() into dsputil
Originally committed as revision 12309 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 76a17d56d5..18b4a57dc2 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -53,14 +53,11 @@ static void dct_unquantize_h263_intra_c(MpegEncContext *s, DCTELEM *block, int n, int qscale); static void dct_unquantize_h263_inter_c(MpegEncContext *s, DCTELEM *block, int n, int qscale); -static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w); extern int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx); extern void XVMC_field_end(MpegEncContext *s); extern void XVMC_decode_mb(MpegEncContext *s); -void (*draw_edges)(uint8_t *buf, int wrap, int width, int height, int w)= draw_edges_c; - /* enable all paranoid tests for rounding, overflows, etc... */ //#define PARANOID @@ -793,35 +790,6 @@ void init_vlc_rl(RLTable *rl, int use_static) } } -/* draw the edges of width 'w' of an image of size width, height */ -//FIXME check that this is ok for mpeg4 interlaced -static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w) -{ - uint8_t *ptr, *last_line; - int i; - - last_line = buf + (height - 1) * wrap; - for(i=0;i<w;i++) { - /* top and bottom */ - memcpy(buf - (i + 1) * wrap, buf, width); - memcpy(last_line + (i + 1) * wrap, last_line, width); - } - /* left and right */ - ptr = buf; - for(i=0;i<height;i++) { - memset(ptr - w, ptr[0], w); - memset(ptr + width, ptr[width-1], w); - ptr += wrap; - } - /* corners */ - for(i=0;i<w;i++) { - memset(buf - (i + 1) * wrap - w, buf[0], w); /* top left */ - memset(buf - (i + 1) * wrap + width, buf[width-1], w); /* top right */ - 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 */ - } -} - int ff_find_unused_picture(MpegEncContext *s, int shared){ int i; @@ -1015,9 +983,9 @@ void MPV_frame_end(MpegEncContext *s) }else #endif if(s->unrestricted_mv && s->current_picture.reference && !s->intra_only && !(s->flags&CODEC_FLAG_EMU_EDGE)) { - draw_edges(s->current_picture.data[0], s->linesize , s->h_edge_pos , s->v_edge_pos , EDGE_WIDTH ); - draw_edges(s->current_picture.data[1], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2); - draw_edges(s->current_picture.data[2], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2); + s->dsp.draw_edges(s->current_picture.data[0], s->linesize , s->h_edge_pos , s->v_edge_pos , EDGE_WIDTH ); + s->dsp.draw_edges(s->current_picture.data[1], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2); + s->dsp.draw_edges(s->current_picture.data[2], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2); } emms_c(); |