diff options
author | Philip Langdale <philipl@overt.org> | 2019-05-13 20:00:12 -0700 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2019-05-15 11:40:50 -0700 |
commit | bfbde996cfa51a28359841369144ad075d603086 (patch) | |
tree | a2adc5889232b2b6c416c45b95a706cb6aab14fd | |
parent | 89bd7554b209a447062c306129d3f36d673cbd4d (diff) |
avfilter/vf_scale_cuda: Add support for YUV444P16
This format is interesting because it's what you get for decoded
10/12bit HEVC 4:4:4.
-rw-r--r-- | libavfilter/version.h | 2 | ||||
-rw-r--r-- | libavfilter/vf_scale_cuda.c | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/libavfilter/version.h b/libavfilter/version.h index 293af36f62..ed3fc7f108 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 7 #define LIBAVFILTER_VERSION_MINOR 53 -#define LIBAVFILTER_VERSION_MICRO 100 +#define LIBAVFILTER_VERSION_MICRO 101 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index ecfd6a1c92..a833dcd1a4 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -43,7 +43,8 @@ static const enum AVPixelFormat supported_formats[] = { AV_PIX_FMT_NV12, AV_PIX_FMT_YUV444P, AV_PIX_FMT_P010, - AV_PIX_FMT_P016 + AV_PIX_FMT_P016, + AV_PIX_FMT_YUV444P16, }; #define DIV_UP(a, b) ( ((a) + (b) - 1) / (b) ) @@ -411,6 +412,20 @@ static int scalecuda_resize(AVFilterContext *ctx, out->data[0]+out->linesize[0]*out->height*2, out->width, out->height, out->linesize[0], 1); break; + case AV_PIX_FMT_YUV444P16: + call_resize_kernel(ctx, s->cu_func_ushort, 1, + in->data[0], in->width, in->height, in->linesize[0] / 2, + out->data[0], out->width, out->height, out->linesize[0] / 2, + 2); + call_resize_kernel(ctx, s->cu_func_ushort, 1, + in->data[1], in->width, in->height, in->linesize[1] / 2, + out->data[1], out->width, out->height, out->linesize[1] / 2, + 2); + call_resize_kernel(ctx, s->cu_func_ushort, 1, + in->data[2], in->width, in->height, in->linesize[2] / 2, + out->data[2], out->width, out->height, out->linesize[2] / 2, + 2); + break; case AV_PIX_FMT_NV12: call_resize_kernel(ctx, s->cu_func_uchar, 1, in->data[0], in->width, in->height, in->linesize[0], |