Skip to content

Commit

Permalink
pixconv_fmt.c: Fix another typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiatka committed Jul 2, 2024
1 parent bee8b92 commit 6618547
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pixfmt_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,25 +777,25 @@ static void vc_copylineRGBAtoRGBwithShift(unsigned char * __restrict dst2, const
* @see vc_copylineRGBAtoRGBwithShift
* @see vc_copylineRGBAtoRGB
*/
void vc_copylineABGRtoRGB(unsigned char * __restrict dst, const unsigned char * __restrict src2, int dst_len, int rshift, int gshift, int bshift)
void vc_copylineABGRtoRGB(unsigned char * __restrict dst, const unsigned char * __restrict src, int dst_len, int rshift, int gshift, int bshift)
{
#ifdef __SSSE3__
__m128i shuf = _mm_setr_epi8(3, 2, 1, 7, 6, 5, 11, 10, 9, 15, 14, 13, 0xff, 0xff, 0xff, 0xff);
__m128i loaded;
int x;
for (x = 0; x <= dst_len - 12; x += 12) {
loaded = _mm_lddqu_si128((const __m128i_u *) src2);
loaded = _mm_lddqu_si128((const __m128i_u *) src);
loaded = _mm_shuffle_epi8(loaded, shuf);
_mm_storeu_si128((__m128i_u *)dst, loaded);

src2 += 16;
src += 16;
dst += 12;
}

rshift = 16; gshift = 8; bshift = 0;
uint8_t *dst_c = (uint8_t *) dst;
for (; x <= dst_len - 3; x += 3) {
register uint32_t in = *src2++;
register uint32_t in = *src++;
*dst_c++ = (in >> rshift) & 0xff;
*dst_c++ = (in >> gshift) & 0xff;
*dst_c++ = (in >> bshift) & 0xff;
Expand Down

0 comments on commit 6618547

Please sign in to comment.