Commit 0cfcbf21 authored by David Conrad's avatar David Conrad Committed by Michael Niedermayer

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 a89f4ca0)
parent 695f39c8
...@@ -1459,8 +1459,7 @@ static void render_slice(Vp3DecodeContext *s, int slice) ...@@ -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){ if(src_x<0 || src_y<0 || src_x + 9 >= plane_width || src_y + 9 >= plane_height){
uint8_t *temp= s->edge_emu_buffer; uint8_t *temp= s->edge_emu_buffer;
if(stride<0) temp -= 9*stride; if(stride<0) temp -= 8*stride;
else temp += 9*stride;
s->dsp.emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height); s->dsp.emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height);
motion_source= temp; motion_source= temp;
......
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