Commit 5e4ff114 authored by Gwenole Beauchesne's avatar Gwenole Beauchesne Committed by Jean-Baptiste Kempf

copy: fix download from VA surface with odd sizes.

Fix download from Uncacheable Speculative Write Combining (USWC) memory,
e.g. VA surfaces, when the dimensions are odd. In particular, make sure
to get the very last chroma component for each row.
Signed-off-by: default avatarGwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9d567fd0
...@@ -325,7 +325,7 @@ static void SSE_CopyFromNv12(picture_t *dst, ...@@ -325,7 +325,7 @@ static void SSE_CopyFromNv12(picture_t *dst,
dst->p[1].p_pixels, dst->p[1].i_pitch, dst->p[1].p_pixels, dst->p[1].i_pitch,
src[1], src_pitch[1], src[1], src_pitch[1],
cache->buffer, cache->size, cache->buffer, cache->size,
width/2, height/2, cpu); (width+1)/2, (height+1)/2, cpu);
asm volatile ("emms"); asm volatile ("emms");
} }
...@@ -339,7 +339,7 @@ static void SSE_CopyFromYv12(picture_t *dst, ...@@ -339,7 +339,7 @@ static void SSE_CopyFromYv12(picture_t *dst,
SSE_CopyPlane(dst->p[n].p_pixels, dst->p[n].i_pitch, SSE_CopyPlane(dst->p[n].p_pixels, dst->p[n].i_pitch,
src[n], src_pitch[n], src[n], src_pitch[n],
cache->buffer, cache->size, cache->buffer, cache->size,
width/d, height/d, cpu); (width+d-1)/d, (height+d-1)/d, cpu);
} }
asm volatile ("emms"); asm volatile ("emms");
} }
......
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