1 /* 2 * Copyright (c) 2025 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 INTERFACES_INNER_API_VPE_DETAIL_ENHANCER_VIDEO_H 17 #define INTERFACES_INNER_API_VPE_DETAIL_ENHANCER_VIDEO_H 18 19 #include <memory> 20 21 #include "algorithm_errors.h" 22 #include "algorithm_video.h" 23 #include "detail_enhancer_common.h" 24 #include "detail_enhancer_video_common.h" 25 26 namespace OHOS { 27 namespace Media { 28 namespace VideoProcessingEngine { 29 class __attribute__((visibility("default"))) DetailEnhancerVideo : public VpeVideo { 30 public: 31 using VpeVideo::SetParameter; 32 33 /** 34 * @brief Create a DetailEnhancerVideo object. 35 * @syscap 36 * @return pointer of the DetailEnhancerVideo object. 37 * @since 12 38 */ 39 static std::shared_ptr<DetailEnhancerVideo> Create(); 40 41 /** 42 * @brief 设置计算画质参数。可被多次调用,但只有最接近Process的一次调用设置的参数 43 * 会在Process时生效。 44 * @syscap 45 * @param parameter 转换参数 46 * @return 返回错误码VPEAlgoErrCode 47 * @since 12 48 */ 49 virtual VPEAlgoErrCode SetParameter(const DetailEnhancerParameters& parameter, SourceType type) = 0; 50 51 /** 52 * @brief 渲染输出buffer. 53 * @syscap 54 * @param input 索引 55 * @return 返回错误码VPEAlgoErrCode 56 * @since 12 57 */ 58 virtual VPEAlgoErrCode RenderOutputBuffer(uint32_t index) = 0; 59 60 protected: 61 DetailEnhancerVideo() = default; 62 virtual ~DetailEnhancerVideo() = default; 63 DetailEnhancerVideo(const DetailEnhancerVideo&) = delete; 64 DetailEnhancerVideo& operator=(const DetailEnhancerVideo&) = delete; 65 DetailEnhancerVideo(DetailEnhancerVideo&&) = delete; 66 DetailEnhancerVideo& operator=(DetailEnhancerVideo&&) = delete; 67 }; 68 } // namespace VideoProcessingEngine 69 } // namespace Media 70 } // namespace OHOS 71 72 #endif // INTERFACES_INNER_API_VPE_DETAIL_ENHANCER_VIDEO_H 73