|
|
|
@ -685,6 +685,25 @@ static void read_vuya_A_c(uint8_t *dst, const uint8_t *src, const uint8_t *unuse |
|
|
|
|
dst[i] = src[i * 4 + 3]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void read_xv30le_Y_c(uint8_t *dst, const uint8_t *src, const uint8_t *unused0, const uint8_t *unused1, int width, |
|
|
|
|
uint32_t *unused2, void *opq) |
|
|
|
|
{ |
|
|
|
|
int i; |
|
|
|
|
for (i = 0; i < width; i++) |
|
|
|
|
AV_WN16(dst + i * 2, (AV_RL32(src + i * 4) >> 10) & 0x3FFu); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void read_xv30le_UV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src, |
|
|
|
|
const uint8_t *unused1, int width, uint32_t *unused2, void *opq) |
|
|
|
|
{ |
|
|
|
|
int i; |
|
|
|
|
for (i = 0; i < width; i++) { |
|
|
|
|
AV_WN16(dstU + i * 2, AV_RL32(src + i * 4) & 0x3FFu); |
|
|
|
|
AV_WN16(dstV + i * 2, (AV_RL32(src + i * 4) >> 20) & 0x3FFu); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void read_xv36le_Y_c(uint8_t *dst, const uint8_t *src, const uint8_t *unused0, const uint8_t *unused1, int width, |
|
|
|
|
uint32_t *unused2, void *opq) |
|
|
|
|
{ |
|
|
|
@ -1390,6 +1409,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) |
|
|
|
|
case AV_PIX_FMT_VUYX: |
|
|
|
|
c->chrToYV12 = read_vuyx_UV_c; |
|
|
|
|
break; |
|
|
|
|
case AV_PIX_FMT_XV30LE: |
|
|
|
|
c->chrToYV12 = read_xv30le_UV_c; |
|
|
|
|
break; |
|
|
|
|
case AV_PIX_FMT_AYUV64LE: |
|
|
|
|
c->chrToYV12 = read_ayuv64le_UV_c; |
|
|
|
|
break; |
|
|
|
@ -1777,6 +1799,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) |
|
|
|
|
case AV_PIX_FMT_VUYX: |
|
|
|
|
c->lumToYV12 = read_vuyx_Y_c; |
|
|
|
|
break; |
|
|
|
|
case AV_PIX_FMT_XV30LE: |
|
|
|
|
c->lumToYV12 = read_xv30le_Y_c; |
|
|
|
|
break; |
|
|
|
|
case AV_PIX_FMT_AYUV64LE: |
|
|
|
|
c->lumToYV12 = read_ayuv64le_Y_c; |
|
|
|
|
break; |
|
|
|
|