DECLARE_ALIGNED(8, const uint8_t, ff_sws_pb_64)[8] =
{ 64, 64, 64, 64, 64, 64, 64, 64 };
-static av_always_inline void
-yuv2yuvX16_c_template(const int16_t *filter, int filterSize,
- const int32_t **src, uint16_t *dest, int dstW,
- int big_endian, int output_bits)
-{
-#define output_pixel(pos, val) \
+#define output_pixel(pos, val, bias, signedness) \
if (big_endian) { \
- AV_WB16(pos, 0x8000 + av_clip_int16(val >> shift)); \
+ AV_WB16(pos, bias + av_clip_ ## signedness ## 16(val >> shift)); \
} else { \
- AV_WL16(pos, 0x8000 + av_clip_int16(val >> shift)); \
+ AV_WL16(pos, bias + av_clip_ ## signedness ## 16(val >> shift)); \
}
+static av_always_inline void
+yuv2plane1_16_c_template(const int32_t *src, uint16_t *dest, int dstW,
+ int big_endian, int output_bits)
+{
+ int i;
+ int shift = 19 - output_bits;
+
+ for (i = 0; i < dstW; i++) {
+ int val = src[i] + (1 << (shift - 1));
+ output_pixel(&dest[i], val, 0, uint);
+ }
+}
+
+static av_always_inline void
+yuv2planeX_16_c_template(const int16_t *filter, int filterSize,
+ const int32_t **src, uint16_t *dest, int dstW,
+ int big_endian, int output_bits)
+{
int i;
int shift = 15 + 16 - output_bits;
for (j = 0; j < filterSize; j++)
val += src[j][i] * filter[j];
- output_pixel(&dest[i], val);
+ output_pixel(&dest[i], val, 0x8000, int);
}
-#undef output_pixel
}
+#undef output_pixel
+
#define output_pixel(pos, val) \
if (big_endian) { \
AV_WB16(pos, av_clip_uintp2(val >> shift, output_bits)); \
}
static av_always_inline void
-yuv2yuvX10_c_template(const int16_t *filter, int filterSize,
- const int16_t **src, uint16_t *dest, int dstW,
- int big_endian, int output_bits)
+yuv2plane1_10_c_template(const int16_t *src, uint16_t *dest, int dstW,
+ int big_endian, int output_bits)
+{
+ int i;
+ int shift = 15 - output_bits;
+
+ for (i = 0; i < dstW; i++) {
+ int val = src[i] + (1 << (shift - 1));
+ output_pixel(&dest[i], val);
+ }
+}
+
+static av_always_inline void
+yuv2planeX_10_c_template(const int16_t *filter, int filterSize,
+ const int16_t **src, uint16_t *dest, int dstW,
+ int big_endian, int output_bits)
{
int i;
int shift = 11 + 16 - output_bits;
#undef output_pixel
-#define yuv2NBPS(bits, BE_LE, is_be, yuv2yuvX_template_fn, typeX_t) \
-static void yuv2yuvX ## bits ## BE_LE ## _c(const int16_t *filter, int filterSize, \
- const int16_t **src, uint16_t *dest, int dstW, \
+#define yuv2NBPS(bits, BE_LE, is_be, template_size, typeX_t) \
+static void yuv2plane1_ ## bits ## BE_LE ## _c(const int16_t *src, \
+ uint8_t *dest, int dstW, \
const uint8_t *dither, int offset)\
{ \
- yuv2yuvX_template_fn(filter, filterSize, (const typeX_t **) src, \
- dest, dstW, is_be, bits); \
+ yuv2plane1_ ## template_size ## _c_template((const typeX_t *) src, \
+ (uint16_t *) dest, dstW, is_be, bits); \
+}\
+static void yuv2planeX_ ## bits ## BE_LE ## _c(const int16_t *filter, int filterSize, \
+ const int16_t **src, uint8_t *dest, int dstW, \
+ const uint8_t *dither, int offset)\
+{ \
+ yuv2planeX_## template_size ## _c_template(filter, \
+ filterSize, (const typeX_t **) src, \
+ (uint16_t *) dest, dstW, is_be, bits); \
}
-yuv2NBPS( 9, BE, 1, yuv2yuvX10_c_template, int16_t);
-yuv2NBPS( 9, LE, 0, yuv2yuvX10_c_template, int16_t);
-yuv2NBPS(10, BE, 1, yuv2yuvX10_c_template, int16_t);
-yuv2NBPS(10, LE, 0, yuv2yuvX10_c_template, int16_t);
-yuv2NBPS(16, BE, 1, yuv2yuvX16_c_template, int32_t);
-yuv2NBPS(16, LE, 0, yuv2yuvX16_c_template, int32_t);
+yuv2NBPS( 9, BE, 1, 10, int16_t);
+yuv2NBPS( 9, LE, 0, 10, int16_t);
+yuv2NBPS(10, BE, 1, 10, int16_t);
+yuv2NBPS(10, LE, 0, 10, int16_t);
+yuv2NBPS(16, BE, 1, 16, int32_t);
+yuv2NBPS(16, LE, 0, 16, int32_t);
-static void yuv2yuvX_c(const int16_t *filter, int filterSize,
- const int16_t **src, uint8_t *dest, int dstW,
- const uint8_t *dither, int offset)
+static void yuv2planeX_8_c(const int16_t *filter, int filterSize,
+ const int16_t **src, uint8_t *dest, int dstW,
+ const uint8_t *dither, int offset)
{
int i;
for (i=0; i<dstW; i++) {
}
}
-static void yuv2yuv1_c(const int16_t *src, uint8_t *dest, int dstW,
- const uint8_t *dither, int offset)
+static void yuv2plane1_8_c(const int16_t *src, uint8_t *dest, int dstW,
+ const uint8_t *dither, int offset)
{
int i;
for (i=0; i<dstW; i++) {
}
}
-static void yuv2nv12X_chroma_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize,
+static void yuv2nv12cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize,
const int16_t **chrUSrc, const int16_t **chrVSrc,
uint8_t *dest, int chrDstW)
{
}
}
+static void planar_rgb_to_y(uint8_t *dst, const uint8_t *src[4], int width)
+{
+ int i;
+ for (i = 0; i < width; i++) {
+ int g = src[0][i];
+ int b = src[1][i];
+ int r = src[2][i];
+
+ dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);
+ }
+}
+
+static void planar_rgb16le_to_y(uint8_t *_dst, const uint8_t *_src[4], int width)
+{
+ int i;
+ const uint16_t **src = (const uint16_t **) _src;
+ uint16_t *dst = (uint16_t *) _dst;
+ for (i = 0; i < width; i++) {
+ int g = AV_RL16(src[0] + i);
+ int b = AV_RL16(src[1] + i);
+ int r = AV_RL16(src[2] + i);
+
+ dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);
+ }
+}
+
+static void planar_rgb16be_to_y(uint8_t *_dst, const uint8_t *_src[4], int width)
+{
+ int i;
+ const uint16_t **src = (const uint16_t **) _src;
+ uint16_t *dst = (uint16_t *) _dst;
+ for (i = 0; i < width; i++) {
+ int g = AV_RB16(src[0] + i);
+ int b = AV_RB16(src[1] + i);
+ int r = AV_RB16(src[2] + i);
+
+ dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);
+ }
+}
+
+static void planar_rgb_to_uv(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width)
+{
+ int i;
+ for (i = 0; i < width; i++) {
+ int g = src[0][i];
+ int b = src[1][i];
+ int r = src[2][i];
+
+ dstU[i] = (RU * r + GU * g + BU * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1);
+ dstV[i] = (RV * r + GV * g + BV * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1);
+ }
+}
+
+static void planar_rgb16le_to_uv(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src[4], int width)
+{
+ int i;
+ const uint16_t **src = (const uint16_t **) _src;
+ uint16_t *dstU = (uint16_t *) _dstU;
+ uint16_t *dstV = (uint16_t *) _dstV;
+ for (i = 0; i < width; i++) {
+ int g = AV_RL16(src[0] + i);
+ int b = AV_RL16(src[1] + i);
+ int r = AV_RL16(src[2] + i);
+
+ dstU[i] = (RU * r + GU * g + BU * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1);
+ dstV[i] = (RV * r + GV * g + BV * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1);
+ }
+}
+
+static void planar_rgb16be_to_uv(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src[4], int width)
+{
+ int i;
+ const uint16_t **src = (const uint16_t **) _src;
+ uint16_t *dstU = (uint16_t *) _dstU;
+ uint16_t *dstV = (uint16_t *) _dstV;
+ for (i = 0; i < width; i++) {
+ int g = AV_RB16(src[0] + i);
+ int b = AV_RB16(src[1] + i);
+ int r = AV_RB16(src[2] + i);
+
+ dstU[i] = (RU * r + GU * g + BU * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1);
+ dstV[i] = (RV * r + GV * g + BV * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1);
+ }
+}
+
static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src,
const int16_t *filter,
const int16_t *filterPos, int filterSize)
// *** horizontal scale Y line to temp buffer
static av_always_inline void hyscale(SwsContext *c, int16_t *dst, int dstWidth,
- const uint8_t *src, int srcW, int xInc,
+ const uint8_t *src_in[4], int srcW, int xInc,
const int16_t *hLumFilter,
const int16_t *hLumFilterPos, int hLumFilterSize,
uint8_t *formatConvBuffer,
{
void (*toYV12)(uint8_t *, const uint8_t *, int, uint32_t *) = isAlpha ? c->alpToYV12 : c->lumToYV12;
void (*convertRange)(int16_t *, int) = isAlpha ? NULL : c->lumConvertRange;
+ const uint8_t *src = src_in[isAlpha ? 3 : 0];
if (toYV12) {
toYV12(formatConvBuffer, src, srcW, pal);
src= formatConvBuffer;
+ } else if (c->readLumPlanar && !isAlpha) {
+ c->readLumPlanar(formatConvBuffer, src_in, srcW);
+ src = formatConvBuffer;
}
if (!c->hyscale_fast) {
}
static av_always_inline void hcscale(SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth,
- const uint8_t *src1, const uint8_t *src2,
+ const uint8_t *src_in[4],
int srcW, int xInc, const int16_t *hChrFilter,
const int16_t *hChrFilterPos, int hChrFilterSize,
uint8_t *formatConvBuffer, uint32_t *pal)
{
+ const uint8_t *src1 = src_in[1], *src2 = src_in[2];
if (c->chrToYV12) {
uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW * FFALIGN(c->srcBpc, 8) >> 3, 16);
c->chrToYV12(formatConvBuffer, buf2, src1, src2, srcW, pal);
src1= formatConvBuffer;
src2= buf2;
+ } else if (c->readChrPlanar) {
+ uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW * FFALIGN(c->srcBpc, 8) >> 3, 16);
+ c->readChrPlanar(formatConvBuffer, buf2, src_in, srcW);
+ src1= formatConvBuffer;
+ src2= buf2;
}
if (!c->hcscale_fast) {
static av_always_inline void
find_c_packed_planar_out_funcs(SwsContext *c,
- yuv2planar1_fn *yuv2yuv1, yuv2planarX_fn *yuv2planeX_luma,
- yuv2planarX_fn *yuv2planeX_chroma, yuv2interleavedX_fn *yuv2nv12X_chroma,
+ yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX,
+ yuv2interleavedX_fn *yuv2nv12cX,
yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2,
yuv2packedX_fn *yuv2packedX)
{
enum PixelFormat dstFormat = c->dstFormat;
- if (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21) {
- *yuv2planeX_luma = yuv2yuvX_c;
- *yuv2nv12X_chroma = yuv2nv12X_chroma_c;
- } else if (is16BPS(dstFormat)) {
- *yuv2planeX_luma = *yuv2planeX_chroma = isBE(dstFormat) ? yuv2yuvX16BE_c : yuv2yuvX16LE_c;
+ if (is16BPS(dstFormat)) {
+ *yuv2planeX = isBE(dstFormat) ? yuv2planeX_16BE_c : yuv2planeX_16LE_c;
+ *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_16BE_c : yuv2plane1_16LE_c;
} else if (is9_OR_10BPS(dstFormat)) {
if (av_pix_fmt_descriptors[dstFormat].comp[0].depth_minus1 == 8) {
- *yuv2planeX_luma = *yuv2planeX_chroma = isBE(dstFormat) ? yuv2yuvX9BE_c : yuv2yuvX9LE_c;
+ *yuv2planeX = isBE(dstFormat) ? yuv2planeX_9BE_c : yuv2planeX_9LE_c;
+ *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_9BE_c : yuv2plane1_9LE_c;
} else {
- *yuv2planeX_luma = *yuv2planeX_chroma = isBE(dstFormat) ? yuv2yuvX10BE_c : yuv2yuvX10LE_c;
+ *yuv2planeX = isBE(dstFormat) ? yuv2planeX_10BE_c : yuv2planeX_10LE_c;
+ *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_10BE_c : yuv2plane1_10LE_c;
}
} else {
- *yuv2yuv1 = yuv2yuv1_c;
- *yuv2planeX_luma = *yuv2planeX_chroma = yuv2yuvX_c;
+ *yuv2plane1 = yuv2plane1_8_c;
+ *yuv2planeX = yuv2planeX_8_c;
+ if (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21)
+ *yuv2nv12cX = yuv2nv12cX_c;
}
if(c->flags & SWS_FULL_CHR_H_INT) {
const int chrSrcSliceH= -((-srcSliceH) >> c->chrSrcVSubSample);
int lastDstY;
uint32_t *pal=c->pal_yuv;
- yuv2planar1_fn yuv2yuv1 = c->yuv2yuv1;
- yuv2planarX_fn yuv2planeX_luma = c->yuv2planeX_luma;
- yuv2planarX_fn yuv2planeX_chroma = c->yuv2planeX_chroma;
- yuv2interleavedX_fn yuv2nv12X_chroma = c->yuv2nv12X_chroma;
+ yuv2planar1_fn yuv2plane1 = c->yuv2plane1;
+ yuv2planarX_fn yuv2planeX = c->yuv2planeX;
+ yuv2interleavedX_fn yuv2nv12cX = c->yuv2nv12cX;
yuv2packed1_fn yuv2packed1 = c->yuv2packed1;
yuv2packed2_fn yuv2packed2 = c->yuv2packed2;
yuv2packedX_fn yuv2packedX = c->yuv2packedX;
//Do horizontal scaling
while(lastInLumBuf < lastLumSrcY) {
- const uint8_t *src1= src[0]+(lastInLumBuf + 1 - srcSliceY)*srcStride[0];
- const uint8_t *src2= src[3]+(lastInLumBuf + 1 - srcSliceY)*srcStride[3];
+ const uint8_t *src1[4] = {
+ src[0] + (lastInLumBuf + 1 - srcSliceY) * srcStride[0],
+ src[1] + (lastInLumBuf + 1 - srcSliceY) * srcStride[1],
+ src[2] + (lastInLumBuf + 1 - srcSliceY) * srcStride[2],
+ src[3] + (lastInLumBuf + 1 - srcSliceY) * srcStride[3],
+ };
lumBufIndex++;
assert(lumBufIndex < 2*vLumBufSize);
assert(lastInLumBuf + 1 - srcSliceY < srcSliceH);
formatConvBuffer,
pal, 0);
if (CONFIG_SWSCALE_ALPHA && alpPixBuf)
- hyscale(c, alpPixBuf[ lumBufIndex ], dstW, src2, srcW,
+ hyscale(c, alpPixBuf[ lumBufIndex ], dstW, src1, srcW,
lumXInc, hLumFilter, hLumFilterPos, hLumFilterSize,
formatConvBuffer,
pal, 1);
lumBufIndex, lastInLumBuf);
}
while(lastInChrBuf < lastChrSrcY) {
- const uint8_t *src1= src[1]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[1];
- const uint8_t *src2= src[2]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[2];
+ const uint8_t *src1[4] = {
+ src[0] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[0],
+ src[1] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[1],
+ src[2] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[2],
+ src[3] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[3],
+ };
chrBufIndex++;
assert(chrBufIndex < 2*vChrBufSize);
assert(lastInChrBuf + 1 - chrSrcSliceY < (chrSrcSliceH));
if (c->needs_hcscale)
hcscale(c, chrUPixBuf[chrBufIndex], chrVPixBuf[chrBufIndex],
- chrDstW, src1, src2, chrSrcW, chrXInc,
+ chrDstW, src1, chrSrcW, chrXInc,
hChrFilter, hChrFilterPos, hChrFilterSize,
formatConvBuffer, pal);
lastInChrBuf++;
}
if (dstY >= dstH-2) {
// hmm looks like we can't use MMX here without overwriting this array's tail
- find_c_packed_planar_out_funcs(c, &yuv2yuv1, &yuv2planeX_luma, &yuv2planeX_chroma,
- &yuv2nv12X_chroma, &yuv2packed1, &yuv2packed2,
- &yuv2packedX);
+ find_c_packed_planar_out_funcs(c, &yuv2plane1, &yuv2planeX, &yuv2nv12cX,
+ &yuv2packed1, &yuv2packed2, &yuv2packedX);
}
{
const int16_t **alpSrcPtr= (CONFIG_SWSCALE_ALPHA && alpPixBuf) ? (const int16_t **) alpPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize : NULL;
if (isPlanarYUV(dstFormat) || dstFormat==PIX_FMT_GRAY8) { //YV12 like
const int chrSkipMask= (1<<c->chrDstVSubSample)-1;
- if ((dstY&chrSkipMask) || isGray(dstFormat))
- dest[1] = dest[2] = NULL; //FIXME split functions in lumi / chromi
- const int16_t *alpBuf= (CONFIG_SWSCALE_ALPHA && alpPixBuf) ? alpSrcPtr[0] : NULL;
-
- if (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21) {
- yuv2planeX_luma(vLumFilter + dstY * vLumFilterSize, vLumFilterSize, lumSrcPtr, dest[0], dstW, c->lumDither8, 0);
- if (dest[1]){
- yuv2nv12X_chroma(c, vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize, chrUSrcPtr, chrVSrcPtr, dest[1], chrDstW);
- }
- } else if (c->yuv2yuv1 && vLumFilterSize == 1 && vChrFilterSize == 1) { // unscaled YV12
- yuv2yuv1(lumSrcPtr[0], dest[0], dstW, c->lumDither8, 0);
+ if (vLumFilterSize == 1) {
+ yuv2plane1(lumSrcPtr[0], dest[0], dstW, c->lumDither8, 0);
+ } else {
+ yuv2planeX(vLumFilter + dstY * vLumFilterSize, vLumFilterSize,
+ lumSrcPtr, dest[0], dstW, c->lumDither8, 0);
+ }
- if (dest[1]){
- yuv2yuv1(chrUSrcPtr[0], dest[1], chrDstW, c->chrDither8, 0);
- yuv2yuv1(chrVSrcPtr[0], dest[2], chrDstW, c->chrDither8, 3);
+ if (!((dstY&chrSkipMask) || isGray(dstFormat))) {
+ if (yuv2nv12cX) {
+ yuv2nv12cX(c, vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize, chrUSrcPtr, chrVSrcPtr, dest[1], chrDstW);
+ } else if (vChrFilterSize == 1) {
+ yuv2plane1(chrUSrcPtr[0], dest[1], chrDstW, c->chrDither8, 0);
+ yuv2plane1(chrVSrcPtr[0], dest[2], chrDstW, c->chrDither8, 3);
+ } else {
+ yuv2planeX(vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize,
+ chrUSrcPtr, dest[1], chrDstW, c->chrDither8, 0);
+ yuv2planeX(vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize,
+ chrVSrcPtr, dest[2], chrDstW, c->chrDither8, 3);
}
+ }
- if (alpBuf && dest[3])
- yuv2yuv1(alpBuf, dest[3], dstW, c->lumDither8, 0);
- } else { //General YV12
- yuv2planeX_luma(vLumFilter + dstY * vLumFilterSize, vLumFilterSize, lumSrcPtr, dest[0], dstW, c->lumDither8, 0);
-
- if (dest[1]){
- yuv2planeX_chroma(vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize, chrUSrcPtr, dest[1], chrDstW, c->chrDither8, 0);
- yuv2planeX_chroma(vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize, chrVSrcPtr, dest[2], chrDstW, c->chrDither8, 3);
+ if (CONFIG_SWSCALE_ALPHA && alpPixBuf){
+ if (vLumFilterSize == 1) {
+ yuv2plane1(alpSrcPtr[0], dest[3], dstW, c->lumDither8, 0);
+ } else {
+ yuv2planeX(vLumFilter + dstY * vLumFilterSize, vLumFilterSize,
+ alpSrcPtr, dest[3], dstW, c->lumDither8, 0);
}
-
- if (alpBuf && dest[3])
- yuv2planeX_luma(vLumFilter + dstY * vLumFilterSize, vLumFilterSize, alpSrcPtr, dest[3], dstW, c->lumDither8, 0);
}
} else {
assert(lumSrcPtr + vLumFilterSize - 1 < lumPixBuf + vLumBufSize*2);
{
enum PixelFormat srcFormat = c->srcFormat;
- find_c_packed_planar_out_funcs(c, &c->yuv2yuv1, &c->yuv2planeX_luma, &c->yuv2planeX_chroma,
- &c->yuv2nv12X_chroma, &c->yuv2packed1, &c->yuv2packed2,
+ find_c_packed_planar_out_funcs(c, &c->yuv2plane1, &c->yuv2planeX,
+ &c->yuv2nv12cX, &c->yuv2packed1, &c->yuv2packed2,
&c->yuv2packedX);
c->chrToYV12 = NULL;
case PIX_FMT_PAL8 :
case PIX_FMT_BGR4_BYTE:
case PIX_FMT_RGB4_BYTE: c->chrToYV12 = palToUV_c; break;
+ case PIX_FMT_GBRP9LE:
+ case PIX_FMT_GBRP10LE:
+ case PIX_FMT_GBRP16LE: c->readChrPlanar = planar_rgb16le_to_uv; break;
+ case PIX_FMT_GBRP9BE:
+ case PIX_FMT_GBRP10BE:
+ case PIX_FMT_GBRP16BE: c->readChrPlanar = planar_rgb16be_to_uv; break;
+ case PIX_FMT_GBRP: c->readChrPlanar = planar_rgb_to_uv; break;
#if HAVE_BIGENDIAN
case PIX_FMT_YUV444P9LE:
case PIX_FMT_YUV422P9LE:
c->lumToYV12 = NULL;
c->alpToYV12 = NULL;
switch (srcFormat) {
+ case PIX_FMT_GBRP9LE:
+ case PIX_FMT_GBRP10LE:
+ case PIX_FMT_GBRP16LE: c->readLumPlanar = planar_rgb16le_to_y; break;
+ case PIX_FMT_GBRP9BE:
+ case PIX_FMT_GBRP10BE:
+ case PIX_FMT_GBRP16BE: c->readLumPlanar = planar_rgb16be_to_y; break;
+ case PIX_FMT_GBRP: c->readLumPlanar = planar_rgb_to_y; break;
#if HAVE_BIGENDIAN
case PIX_FMT_YUV444P9LE:
case PIX_FMT_YUV422P9LE: