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 }; 41 42 enum class Category : uint32_t { 43 DEFAULT = 0, 44 COLOR_ADJUST, 45 SHAPE_ADJUST, 46 LAYER_BLEND, 47 OTHER, 48 }; 49 50 enum class EffectColorSpace : uint32_t { 51 DEFAULT = 0, 52 SRGB, 53 DISPLAY_P3, 54 BT2020_HLG, 55 BT2020_PQ, 56 ADOBE_RGB, 57 SRGB_LIMIT, 58 DISPLAY_P3_LIMIT, 59 BT2020_HLG_LIMIT, 60 BT2020_PQ_LIMIT, 61 }; 62 63 class EffectInfo { 64 public: 65 std::map<IEffectFormat, std::vector<IPType>> formats_; 66 std::vector<EffectColorSpace> colorSpaces_; 67 Category category_; 68 }; 69 } // namespace Effect 70 } // namespace Media 71 } // namespace OHOS 72 #endif // IMAGE_EFFECT_EFFECT_INFO_H 73