diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2020-11-04 19:53:41 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2020-11-04 19:53:41 +0100 |
commit | 94cb78ed94e6a0be41886feaf1037501505650b8 (patch) | |
tree | 3cb1a6b175072bc82b63525c8e638a7e5bf637b7 | |
parent | 9a0b70207889f4886055d22a046158af403d3a65 (diff) |
avfilter/scale_cuda: add support for RGB formats
-rw-r--r-- | libavfilter/vf_scale_cuda.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index 5405e6a4ed..fb585e5edc 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -48,6 +48,8 @@ static const enum AVPixelFormat supported_formats[] = { AV_PIX_FMT_P010, AV_PIX_FMT_P016, AV_PIX_FMT_YUV444P16, + AV_PIX_FMT_0RGB32, + AV_PIX_FMT_0BGR32, }; #define DIV_UP(a, b) ( ((a) + (b) - 1) / (b) ) @@ -517,6 +519,13 @@ static int scalecuda_resize(AVFilterContext *ctx, out->data[1], out->width / 2, out->height / 2, out->linesize[1] / 4, 2, 16); break; + case AV_PIX_FMT_0RGB32: + case AV_PIX_FMT_0BGR32: + call_resize_kernel(ctx, s->cu_func_uchar4, 4, + in->data[0], in->width, in->height, in->linesize[0], + out->data[0], out->width, out->height, out->linesize[0] / 4, + 1, 8); + break; default: return AVERROR_BUG; } |