From 624a940ae9443fc02ed4b1a5552fef412f1664a8 Mon Sep 17 00:00:00 2001 From: zhjs Date: Sat, 7 Jun 2025 14:52:05 +0800 Subject: [PATCH 1/2] add interface for video aihdr Signed-off-by: zhjs --- display/bundle.json | 19 +++++++- display/graphic/common/v2_1/CMColorSpace.idl | 2 +- display/graphic/common/v2_2/BUILD.gn | 31 +++++++++++++ .../common/v2_2/BufferHandleMetaKeyType.idl | 32 ++++++++++++++ display/graphic/common/v2_2/CMColorSpace.idl | 43 +++++++++++++++++++ 5 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 display/graphic/common/v2_2/BUILD.gn create mode 100644 display/graphic/common/v2_2/BufferHandleMetaKeyType.idl create mode 100644 display/graphic/common/v2_2/CMColorSpace.idl diff --git a/display/bundle.json b/display/bundle.json index 714d2ba7..f2392dcb 100644 --- a/display/bundle.json +++ b/display/bundle.json @@ -55,7 +55,8 @@ "//drivers/interface/display/graphic/common/v1_0:display_commontype_idl_target", "//drivers/interface/display/graphic/common/v1_1:display_commontype_idl_target", "//drivers/interface/display/graphic/common/v2_0:display_commontype_idl_target", - "//drivers/interface/display/graphic/common/v2_1:display_commontype_idl_target" + "//drivers/interface/display/graphic/common/v2_1:display_commontype_idl_target", + "//drivers/interface/display/graphic/common/v2_2:display_commontype_idl_target" ], "inner_kits": [ { @@ -330,6 +331,14 @@ "header_base": "//drivers/interface/display/graphic/common" } }, + { + "name": "//drivers/interface/display/graphic/common/v2_2:libdisplay_commontype_proxy_2.2", + "header": { + "header_files": [ + ], + "header_base": "//drivers/interface/display/graphic/common" + } + }, { "name": "//drivers/interface/display/graphic/common/v2_1:display_commontype_idl_headers_2.1", "header": { @@ -338,6 +347,14 @@ "header_base": "//drivers/interface/display/graphic/common" } }, + { + "name": "//drivers/interface/display/graphic/common/v2_2:display_commontype_idl_headers_2.2", + "header": { + "header_files": [ + ], + "header_base": "//drivers/interface/display/graphic/common" + } + }, { "name": "//drivers/interface/display/v1_0:libdisplay_gralloc", "header": { diff --git a/display/graphic/common/v2_1/CMColorSpace.idl b/display/graphic/common/v2_1/CMColorSpace.idl index 7692c2ca..90af307a 100644 --- a/display/graphic/common/v2_1/CMColorSpace.idl +++ b/display/graphic/common/v2_1/CMColorSpace.idl @@ -39,5 +39,5 @@ import ohos.hdi.display.graphic.common.v2_0.CMColorSpace; */ enum CM_HDR_Metadata_Type : ohos.hdi.display.graphic.common.v2_0.CM_HDR_Metadata_Type { /* Video AIHDR metadata type */ - CM_VIDEO_AI_HDR = 60, // video AIHDR + CM_VIDEO_AI_HDR = 60, // video aihdr type for global tonemapping }; \ No newline at end of file diff --git a/display/graphic/common/v2_2/BUILD.gn b/display/graphic/common/v2_2/BUILD.gn new file mode 100644 index 00000000..672b7e72 --- /dev/null +++ b/display/graphic/common/v2_2/BUILD.gn @@ -0,0 +1,31 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/hdi/hdi.gni") + +hdi("display_commontype") { + module_name = "display_commontype" + + proxy_deps = [ "../v2_1:libdisplay_commontype_proxy_2.1" ] + + stub_deps = [ "../v2_1:libdisplay_commontype_stub_2.1" ] + + sources = [ + "BufferHandleMetaKeyType.idl", + "CMColorSpace.idl", + ] + + language = "cpp" + subsystem_name = "hdf" + part_name = "drivers_interface_display" +} diff --git a/display/graphic/common/v2_2/BufferHandleMetaKeyType.idl b/display/graphic/common/v2_2/BufferHandleMetaKeyType.idl new file mode 100644 index 00000000..148811fa --- /dev/null +++ b/display/graphic/common/v2_2/BufferHandleMetaKeyType.idl @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup HdiDisplay + * + * @since 5.1 + * @version 2.2 + */ + +package ohos.hdi.display.graphic.common.v2_2; +import ohos.hdi.display.graphic.common.v2_1.BufferHandleMetaKeyType; + +/** + * @ brief Enumerates buffer handle attribution keys. + * + */ +enum BufferHandleAttrKey : ohos.hdi.display.graphic.common.v2_1.BufferHandleAttrKey { + ATTRKEY_VIDEO_AI_HDR_LUT = 4099, // value: grid lut for video aihdr +}; \ No newline at end of file diff --git a/display/graphic/common/v2_2/CMColorSpace.idl b/display/graphic/common/v2_2/CMColorSpace.idl new file mode 100644 index 00000000..27d1b466 --- /dev/null +++ b/display/graphic/common/v2_2/CMColorSpace.idl @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup HdiDisplay + * + * @brief Define the clolor space Key interface of the display module. + * + * This module provides the clolor space types used by the driver interface for the upper-level graphics service. + * + * @since 5.1 + * @version 2.2 + */ + +/** + * @file CMColorSpace.idl + * @brief Declares the clolor space types used by the interfaces related to clolor space Meta Key operations. + * + */ + +package ohos.hdi.display.graphic.common.v2_2; +import ohos.hdi.display.graphic.common.v2_1.CMColorSpace; + +/** + * @brief Enumerates the HDR metadata Attr Key types. + * + */ +enum CM_HDR_Metadata_Type : ohos.hdi.display.graphic.common.v2_1.CM_HDR_Metadata_Type { + CM_VIDEO_AI_HDR_HIGH_LIGHT = 61, // video aihdr type for high light + CM_VIDEO_AI_HDR_COLOR_ENHANCE = 62, // video aihdr type for color enhance +}; \ No newline at end of file -- Gitee From 59639bb7e74d59ac0305dab345162b51bb6a5eba Mon Sep 17 00:00:00 2001 From: zhjs Date: Tue, 17 Jun 2025 20:40:02 +0800 Subject: [PATCH 2/2] add interface for video aihdr Signed-off-by: zhjs --- display/graphic/common/v2_1/CMColorSpace.idl | 2 +- display/graphic/common/v2_2/BufferHandleMetaKeyType.idl | 2 +- display/graphic/common/v2_2/CMColorSpace.idl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/display/graphic/common/v2_1/CMColorSpace.idl b/display/graphic/common/v2_1/CMColorSpace.idl index 90af307a..7692c2ca 100644 --- a/display/graphic/common/v2_1/CMColorSpace.idl +++ b/display/graphic/common/v2_1/CMColorSpace.idl @@ -39,5 +39,5 @@ import ohos.hdi.display.graphic.common.v2_0.CMColorSpace; */ enum CM_HDR_Metadata_Type : ohos.hdi.display.graphic.common.v2_0.CM_HDR_Metadata_Type { /* Video AIHDR metadata type */ - CM_VIDEO_AI_HDR = 60, // video aihdr type for global tonemapping + CM_VIDEO_AI_HDR = 60, // video AIHDR }; \ No newline at end of file diff --git a/display/graphic/common/v2_2/BufferHandleMetaKeyType.idl b/display/graphic/common/v2_2/BufferHandleMetaKeyType.idl index 148811fa..b3d8175d 100644 --- a/display/graphic/common/v2_2/BufferHandleMetaKeyType.idl +++ b/display/graphic/common/v2_2/BufferHandleMetaKeyType.idl @@ -16,7 +16,7 @@ /** * @addtogroup HdiDisplay * - * @since 5.1 + * @since 6.0 * @version 2.2 */ diff --git a/display/graphic/common/v2_2/CMColorSpace.idl b/display/graphic/common/v2_2/CMColorSpace.idl index 27d1b466..9f6fdead 100644 --- a/display/graphic/common/v2_2/CMColorSpace.idl +++ b/display/graphic/common/v2_2/CMColorSpace.idl @@ -20,7 +20,7 @@ * * This module provides the clolor space types used by the driver interface for the upper-level graphics service. * - * @since 5.1 + * @since 6.0 * @version 2.2 */ -- Gitee