This commit is contained in:
veejay
2023-09-16 23:20:13 +02:00
parent c91f89de48
commit dc9bf43e26

View File

@@ -988,19 +988,19 @@ static void tr_422_to_444( uint8_t *buffer, int width, int height)
#ifdef HAVE_ARM #ifdef HAVE_ARM
int optimized_pixels = width - (width & 15); int optimized_pixels = width - (width & 15);
for (y = height - 1; y > 0; y--) { for (y = height - 1; y >= 0; y--) {
uint8_t *dst = buffer + (y * width); uint8_t *dst = buffer + (y * width);
uint8_t *src = buffer + (y * width / 2); uint8_t *src = buffer + (y * width / 2);
for (x = 0; x < optimized_pixels; x += 16) {
uint8x8_t vin = vld1_u8(src); uint8x8_t vin = vld1_u8(src);
uint8x8_t vout = vcombine_u8(vin, vin); uint8x16_t vout = vcombine_u8(vin, vin);
vst1q_u8(dst, vout);
vst1_u8(dst, vout);
src += 8; src += 8;
dst += 8; dst += 16;
}
for (x = optimized_pixels; x < width; x += 2) { for (; x < width; x += 2) {
dst[0] = src[x]; dst[0] = src[x];
dst[1] = src[x]; dst[1] = src[x];
dst += 2; dst += 2;