已开启
update: 更新文件 video_processing.cpp #72
update: 更新文件 video_processing.cpp #72
已开启
gcw_4z3jiPvB创建于 21 天前
2 个文件变更+2-6
@@ -246,11 +246,7 @@ VideoProcessing_ErrorCode OH_VideoProcessing_SetAutoEffectParam(
246 }246 }
247 float strength = -1.0f;247 float strength = -1.0f;
248 bool hasStrength = OH_AVFormat_GetFloatValue(mutableParam, VIDEO_AUTOEFFECT_AISR_STRENGTH, &strength);248 bool hasStrength = OH_AVFormat_GetFloatValue(mutableParam, VIDEO_AUTOEFFECT_AISR_STRENGTH, &strength);
249- 249+ 
250- if (strength > 1.0f || strength < 0.0f) {
251- VPE_LOGE("SetAutoEffectParam: invalid strength %{public}f, must be in [0.0, 1.0]", strength);
252- return VIDEO_PROCESSING_ERROR_INVALID_VALUE;
253- }
254 return VideoProcessingUtils::InnerErrorToCAPI(250 return VideoProcessingUtils::InnerErrorToCAPI(
255 AutoEffectAisrVideo::SetAutoEffectEnabled(static_cast<bool>(enable), hasEnable, name, strength, hasStrength));251 AutoEffectAisrVideo::SetAutoEffectEnabled(static_cast<bool>(enable), hasEnable, name, strength, hasStrength));
256}252}
@@ -1,4 +1,4 @@
1-/*1+/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.4 * you may not use this file except in compliance with the License.