}
}
+static void read_ya16le_gray_c(uint8_t *dst, const uint8_t *src, int width,
+ uint32_t *unused)
+{
+ int i;
+ for (i = 0; i < width; i++)
+ AV_WN16(dst + i * 2, AV_RL16(src + i * 4));
+}
+
+static void read_ya16le_alpha_c(uint8_t *dst, const uint8_t *src, int width,
+ uint32_t *unused)
+{
+ int i;
+ for (i = 0; i < width; i++)
+ AV_WN16(dst + i * 2, AV_RL16(src + i * 4 + 2));
+}
+
+static void read_ya16be_gray_c(uint8_t *dst, const uint8_t *src, int width,
+ uint32_t *unused)
+{
+ int i;
+ for (i = 0; i < width; i++)
+ AV_WN16(dst + i * 2, AV_RB16(src + i * 4));
+}
+
+static void read_ya16be_alpha_c(uint8_t *dst, const uint8_t *src, int width,
+ uint32_t *unused)
+{
+ int i;
+ for (i = 0; i < width; i++)
+ AV_WN16(dst + i * 2, AV_RB16(src + i * 4 + 2));
+}
+
/* This is almost identical to the previous, end exists only because
* yuy2ToY/UV)(dst, src + 1, ...) would have 100% unaligned accesses. */
static void uyvyToY_c(uint8_t *dst, const uint8_t *src, int width,
}
}
+static void planar_rgb_to_a(uint8_t *dst, const uint8_t *src[4], int width)
+{
+ int i;
+ for (i = 0; i < width; i++)
+ dst[i] = src[3][i];
+}
+
static void planar_rgb_to_uv(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width)
{
int i;
case AV_PIX_FMT_GBRP10LE:
c->readChrPlanar = planar_rgb10le_to_uv;
break;
+ case AV_PIX_FMT_GBRAP16LE:
case AV_PIX_FMT_GBRP16LE:
c->readChrPlanar = planar_rgb16le_to_uv;
break;
case AV_PIX_FMT_GBRP10BE:
c->readChrPlanar = planar_rgb10be_to_uv;
break;
+ case AV_PIX_FMT_GBRAP16BE:
case AV_PIX_FMT_GBRP16BE:
c->readChrPlanar = planar_rgb16be_to_uv;
break;
+ case AV_PIX_FMT_GBRAP:
case AV_PIX_FMT_GBRP:
c->readChrPlanar = planar_rgb_to_uv;
break;
case AV_PIX_FMT_GBRP10LE:
c->readLumPlanar = planar_rgb10le_to_y;
break;
+ case AV_PIX_FMT_GBRAP16LE:
case AV_PIX_FMT_GBRP16LE:
c->readLumPlanar = planar_rgb16le_to_y;
break;
case AV_PIX_FMT_GBRP10BE:
c->readLumPlanar = planar_rgb10be_to_y;
break;
+ case AV_PIX_FMT_GBRAP16BE:
case AV_PIX_FMT_GBRP16BE:
c->readLumPlanar = planar_rgb16be_to_y;
break;
+ case AV_PIX_FMT_GBRAP:
+ c->readAlpPlanar = planar_rgb_to_a;
case AV_PIX_FMT_GBRP:
c->readLumPlanar = planar_rgb_to_y;
break;
c->alpToYV12 = bswap16Y_c;
break;
#endif
+ case AV_PIX_FMT_YA16LE:
+ c->lumToYV12 = read_ya16le_gray_c;
+ c->alpToYV12 = read_ya16le_alpha_c;
+ break;
+ case AV_PIX_FMT_YA16BE:
+ c->lumToYV12 = read_ya16be_gray_c;
+ c->alpToYV12 = read_ya16be_alpha_c;
+ break;
case AV_PIX_FMT_YUYV422:
case AV_PIX_FMT_YVYU422:
- case AV_PIX_FMT_Y400A:
+ case AV_PIX_FMT_YA8:
c->lumToYV12 = yuy2ToY_c;
break;
case AV_PIX_FMT_UYVY422:
case AV_PIX_FMT_ARGB:
c->alpToYV12 = abgrToA_c;
break;
- case AV_PIX_FMT_Y400A:
+ case AV_PIX_FMT_YA8:
c->alpToYV12 = uyvyToY_c;
break;
}