diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2006-09-13 20:16:33 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2006-09-13 20:16:33 +0000 |
commit | a8678a3a7a31c5b076cb3e20ef16b13120e19dd5 (patch) | |
tree | 1cc7eb9326637a995fe8a4c36da7bcefbdd29b83 /libavcodec | |
parent | 7facadb0bbfaf296164859cd5c70c8ed3a562451 (diff) | |
download | ffmpeg-a8678a3a7a31c5b076cb3e20ef16b13120e19dd5.tar.gz |
replaces back some C code by dsp.put_pixels_tab[0][0] (revert r6231)
but this time ensure proper alignment using av_malloc instead of av_realloc
Originally committed as revision 6245 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vp56.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index c69b1201d1..e5e0bb1494 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -358,14 +358,11 @@ static void vp56_mc(vp56_context_t *s, int b, uint8_t *src, src_block = s->edge_emu_buffer; src_offset = 2 + 2*stride; } else if (deblock_filtering) { - int i; - src_block = s->edge_emu_buffer; - src += s->block_offset[b] + (dy-2)*stride + (dx-2); - for (i=0; i<12; i++) { - memcpy(src_block, src, 12); - src_block += stride; - src += stride; - } + /* only need a 12x12 block, but there is no such dsp function, */ + /* so copy a 16x12 block */ + s->dsp.put_pixels_tab[0][0](s->edge_emu_buffer, + src + s->block_offset[b] + (dy-2)*stride + (dx-2), + stride, 12); src_block = s->edge_emu_buffer; src_offset = 2 + 2*stride; } else { @@ -483,7 +480,8 @@ static int vp56_size_changed(AVCodecContext *avctx, vp56_context_t *s) (4*s->mb_width+6) * sizeof(*s->above_blocks)); s->macroblocks = av_realloc(s->macroblocks, s->mb_width*s->mb_height*sizeof(*s->macroblocks)); - s->edge_emu_buffer_alloc = av_realloc(s->edge_emu_buffer_alloc, 16*stride); + av_free(s->edge_emu_buffer_alloc); + s->edge_emu_buffer_alloc = av_malloc(16*stride); s->edge_emu_buffer = s->edge_emu_buffer_alloc; if (s->flip < 0) s->edge_emu_buffer += 15 * stride; |