diff options
author | David Conrad <davedc@kozue.local> | 2011-02-19 01:41:51 -0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-20 19:05:46 +0100 |
commit | 0cfcbf217f7db5156da0acfb114a98c135d9ebfd (patch) | |
tree | 4bf17cfa8021f5ffc7e997d7e452527f5139057d /libavcodec/vp3.c | |
parent | 695f39c80bf226c0e7db542933f8fef72737f605 (diff) | |
download | ffmpeg-streaming-0cfcbf217f7db5156da0acfb114a98c135d9ebfd.zip ffmpeg-streaming-0cfcbf217f7db5156da0acfb114a98c135d9ebfd.tar.gz |
Fix VP3 edge emulation
With negative stride, the start of the edge_emu buffer should be pointing to
the last line, not the end of the buffer.
With positive stride, pointing to the end of the buffer was completely wrong.
(cherry picked from commit a89f4ca005efa5ee82089583c7b8bc00bcee816a)
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 97051f7..3d4bfb4 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1459,8 +1459,7 @@ static void render_slice(Vp3DecodeContext *s, int slice) if(src_x<0 || src_y<0 || src_x + 9 >= plane_width || src_y + 9 >= plane_height){ uint8_t *temp= s->edge_emu_buffer; - if(stride<0) temp -= 9*stride; - else temp += 9*stride; + if(stride<0) temp -= 8*stride; s->dsp.emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height); motion_source= temp; |