diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-07-11 00:17:07 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-07-11 00:17:07 +0400 |
commit | 3debe016437fcf3a68e9e995dd1dc7cbd5312be0 (patch) | |
tree | 6494daab721ecb9e03c68933a8ee1429ae00af43 /decoder/LAVVideo/pixconv | |
parent | fc7ae01c070fd499ce44c3f35e33fdb57cb5074f (diff) |
pixconv: fix chroma handling for YCgCo
Diffstat (limited to 'decoder/LAVVideo/pixconv')
-rw-r--r-- | decoder/LAVVideo/pixconv/yuv2rgb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/decoder/LAVVideo/pixconv/yuv2rgb.cpp b/decoder/LAVVideo/pixconv/yuv2rgb.cpp index 4c62bd84..610c5dad 100644 --- a/decoder/LAVVideo/pixconv/yuv2rgb.cpp +++ b/decoder/LAVVideo/pixconv/yuv2rgb.cpp @@ -288,13 +288,13 @@ static int yuv2rgb_convert_pixels(const uint8_t* &srcY, const uint8_t* &srcU, co xmm4 = xmm3; xmm1 = _mm_and_si128(xmm1, xmm7); /* null out the high-order bytes to get the Cg values */ - xmm2 = _mm_and_si128(xmm2, xmm7); + xmm4 = _mm_and_si128(xmm4, xmm7); xmm3 = _mm_srli_epi32(xmm3, 16); /* right shift the Co values */ - xmm4 = _mm_srli_epi32(xmm4, 16); + xmm2 = _mm_srli_epi32(xmm2, 16); - xmm1 = _mm_packs_epi32(xmm1, xmm2); /* Pack Cg into xmm1 */ - xmm3 = _mm_packs_epi32(xmm3, xmm4); /* Pack Co into xmm3 */ + xmm1 = _mm_packs_epi32(xmm4, xmm1); /* Pack Cg into xmm1 */ + xmm3 = _mm_packs_epi32(xmm3, xmm2); /* Pack Co into xmm3 */ xmm2 = coeffs->CbCr_center; /* move CgCo to proper range */ xmm1 = _mm_subs_epi16(xmm1, xmm2); |