swscale: add P210/P410/P216/P416 input

pull/375/head
rcombs 3 years ago
parent b2cd1fb2ec
commit f0204de47d
  1. 16
      libswscale/input.c
  2. 8
      libswscale/utils.c
  3. 2
      libswscale/version.h

@ -1238,15 +1238,23 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c->chrToYV12 = read_ayuv64le_UV_c;
break;
case AV_PIX_FMT_P010LE:
case AV_PIX_FMT_P210LE:
case AV_PIX_FMT_P410LE:
c->chrToYV12 = p010LEToUV_c;
break;
case AV_PIX_FMT_P010BE:
case AV_PIX_FMT_P210BE:
case AV_PIX_FMT_P410BE:
c->chrToYV12 = p010BEToUV_c;
break;
case AV_PIX_FMT_P016LE:
case AV_PIX_FMT_P216LE:
case AV_PIX_FMT_P416LE:
c->chrToYV12 = p016LEToUV_c;
break;
case AV_PIX_FMT_P016BE:
case AV_PIX_FMT_P216BE:
case AV_PIX_FMT_P416BE:
c->chrToYV12 = p016BEToUV_c;
break;
case AV_PIX_FMT_Y210LE:
@ -1519,6 +1527,8 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case AV_PIX_FMT_GRAY16LE:
case AV_PIX_FMT_P016LE:
case AV_PIX_FMT_P216LE:
case AV_PIX_FMT_P416LE:
c->lumToYV12 = bswap16Y_c;
break;
case AV_PIX_FMT_YUVA420P9LE:
@ -1561,6 +1571,8 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case AV_PIX_FMT_GRAY16BE:
case AV_PIX_FMT_P016BE:
case AV_PIX_FMT_P216BE:
case AV_PIX_FMT_P416BE:
c->lumToYV12 = bswap16Y_c;
break;
case AV_PIX_FMT_YUVA420P9BE:
@ -1687,9 +1699,13 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
c->lumToYV12 = bgr64LEToY_c;
break;
case AV_PIX_FMT_P010LE:
case AV_PIX_FMT_P210LE:
case AV_PIX_FMT_P410LE:
c->lumToYV12 = p010LEToY_c;
break;
case AV_PIX_FMT_P010BE:
case AV_PIX_FMT_P210BE:
case AV_PIX_FMT_P410BE:
c->lumToYV12 = p010BEToY_c;
break;
case AV_PIX_FMT_GRAYF32LE:

@ -268,6 +268,14 @@ static const FormatEntry format_entries[] = {
[AV_PIX_FMT_Y210LE] = { 1, 0 },
[AV_PIX_FMT_X2RGB10LE] = { 1, 1 },
[AV_PIX_FMT_X2BGR10LE] = { 1, 1 },
[AV_PIX_FMT_P210BE] = { 1, 0 },
[AV_PIX_FMT_P210LE] = { 1, 0 },
[AV_PIX_FMT_P410BE] = { 1, 0 },
[AV_PIX_FMT_P410LE] = { 1, 0 },
[AV_PIX_FMT_P216BE] = { 1, 0 },
[AV_PIX_FMT_P216LE] = { 1, 0 },
[AV_PIX_FMT_P416BE] = { 1, 0 },
[AV_PIX_FMT_P416LE] = { 1, 0 },
};
int sws_isSupportedInput(enum AVPixelFormat pix_fmt)

@ -28,7 +28,7 @@
#define LIBSWSCALE_VERSION_MAJOR 6
#define LIBSWSCALE_VERSION_MINOR 1
#define LIBSWSCALE_VERSION_MICRO 100
#define LIBSWSCALE_VERSION_MICRO 101
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
LIBSWSCALE_VERSION_MINOR, \

Loading…
Cancel
Save