summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_opencl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/hwcontext_opencl.c')
-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);
}