From 5799ace237e78dfb564b8ecfea71769cd9dcc660 Mon Sep 17 00:00:00 2001 From: lin_c <1946558487@qq.com> Date: Tue, 12 Aug 2025 11:25:41 +0000 Subject: [PATCH 1/4] update services/engine/codec/video/hcodec/hcodec.cpp. Signed-off-by: lin_c <1946558487@qq.com> --- services/engine/codec/video/hcodec/hcodec.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/services/engine/codec/video/hcodec/hcodec.cpp b/services/engine/codec/video/hcodec/hcodec.cpp index 1749cd27f..810569ecb 100644 --- a/services/engine/codec/video/hcodec/hcodec.cpp +++ b/services/engine/codec/video/hcodec/hcodec.cpp @@ -482,10 +482,6 @@ int32_t HCodec::SetLowLatency(const Format &format) if (!format.GetIntValue(OHOS::Media::Tag::VIDEO_ENABLE_LOW_LATENCY, enableLowLatency)) { return AVCS_ERR_OK; } - if (!HCodecList::FindFeature(caps_.port.video.features, VIDEO_FEATURE_LOW_LATENCY).support) { - HLOGW("platform not support LowLatency"); - return AVCS_ERR_OK; - } OMX_CONFIG_BOOLEANTYPE param {}; InitOMXParam(param); -- Gitee From 3d538e189919a1993ec9225b485293beb3be2ddd Mon Sep 17 00:00:00 2001 From: lin_c <1946558487@qq.com> Date: Tue, 12 Aug 2025 11:35:15 +0000 Subject: [PATCH 2/4] update services/engine/codec/video/hcodec/hcodec_list.cpp. Signed-off-by: lin_c <1946558487@qq.com> --- services/engine/codec/video/hcodec/hcodec_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/engine/codec/video/hcodec/hcodec_list.cpp b/services/engine/codec/video/hcodec/hcodec_list.cpp index 7da452b42..d7f6923ef 100644 --- a/services/engine/codec/video/hcodec/hcodec_list.cpp +++ b/services/engine/codec/video/hcodec/hcodec_list.cpp @@ -49,7 +49,7 @@ public: static bool DecideMode(bool supportPassthrough, bool isSecure) { #ifdef BUILD_ENG_VERSION - string mode = OHOS::system::GetParameter("persist.hcodec.usePassthrough", ""); + string mode = OHOS::system::GetParameter("hcodec.usePassthrough", ""); if (mode == "1") { LOGI("force passthrough"); return true; -- Gitee From 51dd00f25aef805c0f61805fec947ce65fef6208 Mon Sep 17 00:00:00 2001 From: lin_c <1946558487@qq.com> Date: Tue, 12 Aug 2025 11:36:52 +0000 Subject: [PATCH 3/4] update services/engine/codec/video/hcodec/hcodec_dfx.cpp. Signed-off-by: lin_c <1946558487@qq.com> --- services/engine/codec/video/hcodec/hcodec_dfx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/engine/codec/video/hcodec/hcodec_dfx.cpp b/services/engine/codec/video/hcodec/hcodec_dfx.cpp index 1ad28f836..5161c1504 100644 --- a/services/engine/codec/video/hcodec/hcodec_dfx.cpp +++ b/services/engine/codec/video/hcodec/hcodec_dfx.cpp @@ -206,7 +206,8 @@ void HCodec::UpdateHoldCnt(const TimePoint& now, OMX_DIRTYPE port, BufferOwner o } TotalEvent& holdCnt = record.holdCntInterval_[owner]; holdCnt.eventCnt += static_cast(holdUs); - holdCnt.eventSum += (static_cast(holdUs) * record.currOwner_[owner]); + holdCnt.eventSum += (static_cast(holdUs) * + static_cast(record.currOwner_[owner])); } // now, this buffer is gonna change to new owner -- Gitee From 277b9ca6dc4a82623f8d65fd69db85b7b7821a0d Mon Sep 17 00:00:00 2001 From: lin_c <1946558487@qq.com> Date: Tue, 12 Aug 2025 11:39:56 +0000 Subject: [PATCH 4/4] update services/engine/codec/video/hcodec/hencoder.cpp. Signed-off-by: lin_c <1946558487@qq.com> --- services/engine/codec/video/hcodec/hencoder.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/services/engine/codec/video/hcodec/hencoder.cpp b/services/engine/codec/video/hcodec/hencoder.cpp index d8b05b437..126b87f08 100644 --- a/services/engine/codec/video/hcodec/hencoder.cpp +++ b/services/engine/codec/video/hcodec/hencoder.cpp @@ -157,10 +157,6 @@ int32_t HEncoder::SetLTRParam(const Format &format) } CodecHDI::VideoFeature ltrFeature = HCodecList::FindFeature(caps_.port.video.features, CodecHDI::VIDEO_FEATURE_LTR); - if (!ltrFeature.support || ltrFeature.extendInfo.empty()) { - HLOGW("platform not support LTR"); - return AVCS_ERR_OK; - } int32_t maxLtrNum = ltrFeature.extendInfo[0]; if (ltrFrameNum <= 0 || ltrFrameNum > maxLtrNum) { HLOGE("invalid ltrFrameNum %d", ltrFrameNum); @@ -286,10 +282,6 @@ int32_t HEncoder::SetTemperalLayer(const Format &format) (enableTemporalScale == 0)) { return AVCS_ERR_OK; } - if (!HCodecList::FindFeature(caps_.port.video.features, CodecHDI::VIDEO_FEATURE_TSVC).support) { - HLOGW("platform not support temporal scale"); - return AVCS_ERR_OK; - } Media::Plugins::TemporalGopReferenceMode GopReferenceMode{}; if (!format.GetIntValue(OHOS::Media::Tag::VIDEO_ENCODER_TEMPORAL_GOP_REFERENCE_MODE, *reinterpret_cast(&GopReferenceMode)) || -- Gitee