[FFmpeg-cvslog] avfilter/scale_cuda: add support for RGB formats

Timo Rothenpieler git at videolan.org
Wed Nov 4 21:06:02 EET 2020


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Wed Nov  4 19:53:41 2020 +0100| [94cb78ed94e6a0be41886feaf1037501505650b8] | committer: Timo Rothenpieler

avfilter/scale_cuda: add support for RGB formats

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94cb78ed94e6a0be41886feaf1037501505650b8
---

 libavfilter/vf_scale_cuda.c | 9 +++++++++
 1 file changed, 9 insertions(+)

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;
     }



More information about the ffmpeg-cvslog mailing list