summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-06-29 19:12:24 +0200
committerPaul B Mahol <onemda@gmail.com>2022-07-07 17:52:32 +0200
commit6ed9eaf664a220812abe75057e3319745a98f4b8 (patch)
tree96f2034192876c00bbca66c33dea2307aa90c86b /libavutil
parent03d81a044ad587ea83567f75dc36bc3d64278199 (diff)
avfilter: add remap opencl filter
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/hwcontext_opencl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
index 4f4bd13405..32aec7d228 100644
--- a/libavutil/hwcontext_opencl.c
+++ b/libavutil/hwcontext_opencl.c
@@ -1411,7 +1411,8 @@ static int opencl_get_plane_format(enum AVPixelFormat pixfmt,
// The bits in each component must be packed in the
// most-significant-bits of the relevant bytes.
if (comp->shift + comp->depth != 8 &&
- comp->shift + comp->depth != 16)
+ comp->shift + comp->depth != 16 &&
+ comp->shift + comp->depth != 32)
return AVERROR(EINVAL);
// The depth must not vary between components.
if (depth && comp->depth != depth)
@@ -1455,6 +1456,8 @@ static int opencl_get_plane_format(enum AVPixelFormat pixfmt,
} else {
if (depth <= 16)
image_format->image_channel_data_type = CL_UNORM_INT16;
+ else if (depth == 32)
+ image_format->image_channel_data_type = CL_FLOAT;
else
return AVERROR(EINVAL);
}