mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
swscale/input: add X36VBE input support
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
2137346324
commit
e012a7a24a
@ -822,6 +822,25 @@ static void read_xv36le_UV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused
|
||||
}
|
||||
}
|
||||
|
||||
static void read_xv36be_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_RB16(src + i * 8 + 2) >> 4);
|
||||
}
|
||||
|
||||
|
||||
static void read_xv36be_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_RB16(src + i * 8 + 0) >> 4);
|
||||
AV_WN16(dstV + i * 2, AV_RB16(src + i * 8 + 4) >> 4);
|
||||
}
|
||||
}
|
||||
|
||||
/* 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, const uint8_t *unused1, const uint8_t *unused2, int width,
|
||||
@ -1671,6 +1690,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c,
|
||||
case AV_PIX_FMT_XV36LE:
|
||||
*chrToYV12 = read_xv36le_UV_c;
|
||||
break;
|
||||
case AV_PIX_FMT_XV36BE:
|
||||
*chrToYV12 = read_xv36be_UV_c;
|
||||
break;
|
||||
case AV_PIX_FMT_P010LE:
|
||||
case AV_PIX_FMT_P210LE:
|
||||
case AV_PIX_FMT_P410LE:
|
||||
@ -2097,6 +2119,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c,
|
||||
case AV_PIX_FMT_XV36LE:
|
||||
*lumToYV12 = read_xv36le_Y_c;
|
||||
break;
|
||||
case AV_PIX_FMT_XV36BE:
|
||||
*lumToYV12 = read_xv36be_Y_c;
|
||||
break;
|
||||
case AV_PIX_FMT_YUYV422:
|
||||
case AV_PIX_FMT_YVYU422:
|
||||
case AV_PIX_FMT_YA8:
|
||||
|
@ -272,6 +272,7 @@ static const FormatEntry format_entries[] = {
|
||||
[AV_PIX_FMT_RGBF32LE] = { 1, 0 },
|
||||
[AV_PIX_FMT_XV30LE] = { 1, 1 },
|
||||
[AV_PIX_FMT_XV36LE] = { 1, 1 },
|
||||
[AV_PIX_FMT_XV36BE] = { 1, 0 },
|
||||
[AV_PIX_FMT_AYUV] = { 1, 1 },
|
||||
[AV_PIX_FMT_UYVA] = { 1, 1 },
|
||||
[AV_PIX_FMT_VYU444] = { 1, 1 },
|
||||
|
Loading…
x
Reference in New Issue
Block a user