Commit e5d66497 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: fix unaligned USWC copy (fixes #6333)

(cherry picked from commit 39dc439cf5e3fe83b87078bcf93c13d07fd02dac)
parent 931b79ae
...@@ -70,10 +70,10 @@ static void CopyFromUswc(uint8_t *dst, size_t dst_pitch, ...@@ -70,10 +70,10 @@ static void CopyFromUswc(uint8_t *dst, size_t dst_pitch,
ASM_SSE2(cpu, "mfence"); ASM_SSE2(cpu, "mfence");
for (unsigned y = 0; y < height; y++) { for (unsigned y = 0; y < height; y++) {
const unsigned unaligned = (intptr_t)src & 0x0f; const unsigned unaligned = (-(uintptr_t)src) & 0x0f;
unsigned x; unsigned x = 0;
for (x = 0; x < unaligned; x++) for (; x < unaligned; x++)
dst[x] = src[x]; dst[x] = src[x];
#ifdef CAN_COMPILE_SSE4_1 #ifdef CAN_COMPILE_SSE4_1
......
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