1 /* 2 * Copyright (C) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef IMAGE_EFFECT_EFFECT_INFO_H 17 #define IMAGE_EFFECT_EFFECT_INFO_H 18 19 #include <cstdint> 20 #include <map> 21 #include <vector> 22 23 namespace OHOS { 24 namespace Media { 25 namespace Effect { 26 enum class IPType : uint32_t { 27 DEFAULT = 0, 28 GPU, 29 CPU, 30 }; 31 32 enum class IEffectFormat : uint32_t { 33 DEFAULT = 0, 34 RGBA8888, 35 YUVNV21, 36 YUVNV12, 37 RGBA_1010102, 38 YCBCR_P010, 39 YCRCB_P010, 40 RGBA_F16, 41 }; 42 43 enum class Category : uint32_t { 44 DEFAULT = 0, 45 COLOR_ADJUST, 46 SHAPE_ADJUST, 47 LAYER_BLEND, 48 OTHER, 49 }; 50 51 enum class EffectColorSpace : uint32_t { 52 NOT_SUPPORTED = UINT32_MAX, 53 DEFAULT = 0, 54 SRGB, 55 DISPLAY_P3, 56 BT2020_HLG, 57 BT2020_PQ, 58 ADOBE_RGB, 59 SRGB_LIMIT, 60 DISPLAY_P3_LIMIT, 61 BT2020_HLG_LIMIT, 62 BT2020_PQ_LIMIT, 63 }; 64 65 enum class HdrFormat : uint32_t { 66 DEFAULT = 0, 67 SDR, 68 HDR10, 69 HDR8_GAINMAP, 70 }; 71 72 enum class LOG_STRATEGY { 73 NORMAL = 0, 74 LIMITED 75 }; 76 77 class EffectInfo { 78 public: 79 std::map<IEffectFormat, std::vector<IPType>> formats_; 80 std::vector<EffectColorSpace> colorSpaces_; 81 std::vector<HdrFormat> hdrFormats_; 82 Category category_; 83 }; 84 } // namespace Effect 85 } // namespace Media 86 } // namespace OHOS 87 #endif // IMAGE_EFFECT_EFFECT_INFO_H 88