mirror of
https://github.com/openharmony/multimedia_video_processing_engine.git
synced 2026-07-19 19:13:31 -04:00
@@ -47,6 +47,11 @@ const std::unordered_map<int, std::function<std::shared_ptr<IImageProcessingNati
|
||||
|
||||
bool ImageProcessingFactory::IsValid(int type)
|
||||
{
|
||||
if (access("/system/lib64/libvideoprocessingengine_ext.z.so", 0)) {
|
||||
if (type != IMAGE_PROCESSING_TYPE_DETAIL_ENHANCER) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return CREATORS.find(type) != CREATORS.end();
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ ImageProcessing_ErrorCode ImageProcessingNativeBase::ConvertColorSpace(
|
||||
[[maybe_unused]] const std::shared_ptr<OHOS::Media::PixelMap>& sourceImage,
|
||||
[[maybe_unused]] std::shared_ptr<OHOS::Media::PixelMap>& destinationImage)
|
||||
{
|
||||
return IMAGE_PROCESSING_SUCCESS;
|
||||
return IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING;
|
||||
}
|
||||
|
||||
ImageProcessing_ErrorCode ImageProcessingNativeBase::Compose(
|
||||
@@ -157,7 +157,7 @@ ImageProcessing_ErrorCode ImageProcessingNativeBase::Compose(
|
||||
[[maybe_unused]] const std::shared_ptr<OHOS::Media::PixelMap>& sourceGainmap,
|
||||
[[maybe_unused]] std::shared_ptr<OHOS::Media::PixelMap>& destinationImage)
|
||||
{
|
||||
return IMAGE_PROCESSING_SUCCESS;
|
||||
return IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING;
|
||||
}
|
||||
|
||||
ImageProcessing_ErrorCode ImageProcessingNativeBase::Decompose(
|
||||
@@ -165,18 +165,18 @@ ImageProcessing_ErrorCode ImageProcessingNativeBase::Decompose(
|
||||
[[maybe_unused]] std::shared_ptr<OHOS::Media::PixelMap>& destinationImage,
|
||||
[[maybe_unused]] std::shared_ptr<OHOS::Media::PixelMap>& destinationGainmap)
|
||||
{
|
||||
return IMAGE_PROCESSING_SUCCESS;
|
||||
return IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING;
|
||||
}
|
||||
|
||||
ImageProcessing_ErrorCode ImageProcessingNativeBase::GenerateMetadata(
|
||||
[[maybe_unused]] const std::shared_ptr<OHOS::Media::PixelMap>& sourceImage)
|
||||
{
|
||||
return IMAGE_PROCESSING_SUCCESS;
|
||||
return IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING;
|
||||
}
|
||||
|
||||
ImageProcessing_ErrorCode ImageProcessingNativeBase::EnhanceDetail(
|
||||
[[maybe_unused]] const std::shared_ptr<OHOS::Media::PixelMap>& sourceImage,
|
||||
[[maybe_unused]] std::shared_ptr<OHOS::Media::PixelMap>& destinationImage)
|
||||
{
|
||||
return IMAGE_PROCESSING_SUCCESS;
|
||||
return IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING;
|
||||
}
|
||||
|
||||
@@ -301,6 +301,9 @@ bool VideoProcessingCapiCapability::IsColorSpaceConversionSupported(
|
||||
const VideoProcessing_ColorSpaceInfo* sourceVideoInfo,
|
||||
const VideoProcessing_ColorSpaceInfo* destinationVideoInfo)
|
||||
{
|
||||
if (access("/system/lib64/libvideoprocessingengine_ext.z.so", 0)) {
|
||||
return false;
|
||||
}
|
||||
CHECK_AND_RETURN_RET_LOG(sourceVideoInfo != nullptr, false, "sourceVideoInfo is null!");
|
||||
CHECK_AND_RETURN_RET_LOG(destinationVideoInfo != nullptr, false, "destinationVideoInfo is null!");
|
||||
CscvSupportKey keySource = VideoColorSpaceInfoToCscvKey(sourceVideoInfo, destinationVideoInfo);
|
||||
@@ -349,6 +352,9 @@ MetaSupportKey VideoColorSpaceInfoToMetaKey(const VideoProcessing_ColorSpaceInfo
|
||||
bool VideoProcessingCapiCapability::IsMetadataGenerationSupported(
|
||||
const VideoProcessing_ColorSpaceInfo* sourceVideoInfo)
|
||||
{
|
||||
if (access("/system/lib64/libvideoprocessingengine_ext.z.so", 0)) {
|
||||
return false;
|
||||
}
|
||||
CHECK_AND_RETURN_RET_LOG(sourceVideoInfo != nullptr, false, "sourceVideoInfo is null!");
|
||||
MetaSupportKey keySource = VideoColorSpaceInfoToMetaKey(sourceVideoInfo);
|
||||
auto it = VIDEO_META_SUPPORT_MAP.find(keySource);
|
||||
|
||||
@@ -48,6 +48,11 @@ const std::unordered_map<int, std::function<std::shared_ptr<IVideoProcessingNati
|
||||
|
||||
bool VideoProcessingFactory::IsValid(int type)
|
||||
{
|
||||
if (access("/system/lib64/libvideoprocessingengine_ext.z.so", 0)) {
|
||||
if (type != VIDEO_PROCESSING_TYPE_DETAIL_ENHANCER) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return CREATORS.find(type) != CREATORS.end();
|
||||
}
|
||||
|
||||
|
||||
+25
-3
@@ -31,6 +31,25 @@ declare_args() {
|
||||
aihdr_enhancer_unit_test = true
|
||||
}
|
||||
|
||||
if (defined(global_parts_info) &&
|
||||
defined(global_parts_info.multimedia_video_processing_engine_ext)) {
|
||||
vpe_support_demo_test = false
|
||||
vpe_support_unit_test = false
|
||||
vpe_support_module_test = false
|
||||
cscv_support_demo_test = false
|
||||
cscv_support_unit_test = false
|
||||
video_support_demo_test = false
|
||||
image_processing_unit_test = false
|
||||
detail_enhancer_video_unit_test = false
|
||||
detail_enhancer_unit_test = false
|
||||
detail_enhancer_video_ndk_unit_test = false
|
||||
colorSpace_converter_video_ndk_unit_test = false
|
||||
metadata_gen_video_ndk_unit_test = false
|
||||
video_variable_refreshrate_unit_test = false
|
||||
aihdr_enhancer_video_unit_test = false
|
||||
aihdr_enhancer_unit_test = false
|
||||
}
|
||||
|
||||
group("demo_test") {
|
||||
testonly = true
|
||||
deps = []
|
||||
@@ -55,7 +74,9 @@ group("unit_test") {
|
||||
deps += [ "unittest/detail_enhancer_video:detail_enhancer_video_unit_test" ]
|
||||
}
|
||||
if (detail_enhancer_video_ndk_unit_test) {
|
||||
deps += [ "unittest/detail_enhancer_video_ndk:detail_enhancer_video_ndk_unit_test" ]
|
||||
deps += [
|
||||
"unittest/detail_enhancer_video_ndk:detail_enhancer_video_ndk_unit_test",
|
||||
]
|
||||
}
|
||||
if (cscv_support_unit_test) {
|
||||
deps += [ "unittest/colorspace_converter_video:colorspace_converter_video_unit_test" ]
|
||||
@@ -64,7 +85,8 @@ group("unit_test") {
|
||||
deps += [ "unittest/colorSpace_converter_video_ndk:colorSpace_converter_video_ndk_unit_test" ]
|
||||
}
|
||||
if (metadata_gen_video_ndk_unit_test) {
|
||||
deps += [ "unittest/metadata_gen_video_ndk:metadata_gen_video_ndk_unit_test" ]
|
||||
deps +=
|
||||
[ "unittest/metadata_gen_video_ndk:metadata_gen_video_ndk_unit_test" ]
|
||||
}
|
||||
if (video_variable_refreshrate_unit_test) {
|
||||
deps += [ "unittest/video_variable_refreshrate_test:video_variable_refreshrate_unit_test" ]
|
||||
@@ -83,8 +105,8 @@ group("module_test") {
|
||||
if (vpe_support_module_test) {
|
||||
deps += [
|
||||
"moduletest/colorspace_converter:colorspace_converter_module_test",
|
||||
"moduletest/metadata_generator:metadata_generator_module_test",
|
||||
"moduletest/colorspace_converter_video:colorspace_converter_video_module_test",
|
||||
"moduletest/metadata_generator:metadata_generator_module_test",
|
||||
"moduletest/metadata_generator_video:metadata_generator_video_module_test",
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user