Commit 4405639f authored by aurel's avatar aurel

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6245 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1312f931
...@@ -358,14 +358,11 @@ static void vp56_mc(vp56_context_t *s, int b, uint8_t *src, ...@@ -358,14 +358,11 @@ static void vp56_mc(vp56_context_t *s, int b, uint8_t *src,
src_block = s->edge_emu_buffer; src_block = s->edge_emu_buffer;
src_offset = 2 + 2*stride; src_offset = 2 + 2*stride;
} else if (deblock_filtering) { } else if (deblock_filtering) {
int i; /* only need a 12x12 block, but there is no such dsp function, */
src_block = s->edge_emu_buffer; /* so copy a 16x12 block */
src += s->block_offset[b] + (dy-2)*stride + (dx-2); s->dsp.put_pixels_tab[0][0](s->edge_emu_buffer,
for (i=0; i<12; i++) { src + s->block_offset[b] + (dy-2)*stride + (dx-2),
memcpy(src_block, src, 12); stride, 12);
src_block += stride;
src += stride;
}
src_block = s->edge_emu_buffer; src_block = s->edge_emu_buffer;
src_offset = 2 + 2*stride; src_offset = 2 + 2*stride;
} else { } else {
...@@ -483,7 +480,8 @@ static int vp56_size_changed(AVCodecContext *avctx, vp56_context_t *s) ...@@ -483,7 +480,8 @@ static int vp56_size_changed(AVCodecContext *avctx, vp56_context_t *s)
(4*s->mb_width+6) * sizeof(*s->above_blocks)); (4*s->mb_width+6) * sizeof(*s->above_blocks));
s->macroblocks = av_realloc(s->macroblocks, s->macroblocks = av_realloc(s->macroblocks,
s->mb_width*s->mb_height*sizeof(*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; s->edge_emu_buffer = s->edge_emu_buffer_alloc;
if (s->flip < 0) if (s->flip < 0)
s->edge_emu_buffer += 15 * stride; s->edge_emu_buffer += 15 * stride;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment