From f4eb852b6d376afb827da4999cdfd5e0376b6a40 Mon Sep 17 00:00:00 2001 From: stoneforestwhu Date: Wed, 31 Aug 2022 00:47:15 +0800 Subject: [PATCH] support format CL_ABGR (#1474) * support format CL_ABGR add code to handle format CL_ABGR * Update imageHelpers.h * fix format --- test_common/harness/imageHelpers.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test_common/harness/imageHelpers.h b/test_common/harness/imageHelpers.h index 2cc8e68e..f8ae4fb9 100644 --- a/test_common/harness/imageHelpers.h +++ b/test_common/harness/imageHelpers.h @@ -482,6 +482,13 @@ void read_image_pixel(void *imageData, image_descriptor *imageInfo, int x, outData[2] = tempData[3]; outData[3] = tempData[0]; } + else if (format->image_channel_order == CL_ABGR) + { + outData[0] = tempData[3]; + outData[1] = tempData[2]; + outData[2] = tempData[1]; + outData[3] = tempData[0]; + } else if ((format->image_channel_order == CL_BGRA) || (format->image_channel_order == CL_sBGRA)) {