diff --git a/test/fuzztest/videohdrvividtohdr_fuzzer/video_sample.h b/test/fuzztest/videohdrvividtohdr_fuzzer/video_sample.h index bed94fe..6a87031 100644 --- a/test/fuzztest/videohdrvividtohdr_fuzzer/video_sample.h +++ b/test/fuzztest/videohdrvividtohdr_fuzzer/video_sample.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef VIDEO_SAMPLE_H -#define VIDEO_SAMPLE_H +#ifndef VIDEO_HDRVIVID_TO_HDR_FUZZER_H +#define VIDEO_HDRVIVID_TO_HDR_FUZZER_H #include #include diff --git a/test/ndk/moduletest/image/api_test.cpp b/test/ndk/moduletest/image/api_test.cpp index 562b31f..cb10832 100644 --- a/test/ndk/moduletest/image/api_test.cpp +++ b/test/ndk/moduletest/image/api_test.cpp @@ -36,7 +36,7 @@ OH_Pixelmap_InitializationOptions *g_createOpts_RGBA = nullptr; OH_Pixelmap_InitializationOptions *g_createOpts_BGRA = nullptr; OH_PixelmapNative *pixelMap_RGBA = nullptr; OH_PixelmapNative *pixelMap_BGRA = nullptr; -void InitCreatePixelmapParam_RGBA() +void InitCreatePixelmapParamRGBA() { if (g_createOpts_RGBA == nullptr) { OH_PixelmapInitializationOptions_Create(&g_createOpts_RGBA); @@ -45,7 +45,7 @@ void InitCreatePixelmapParam_RGBA() OH_PixelmapInitializationOptions_SetPixelFormat(g_createOpts_RGBA, NATIVEBUFFER_PIXEL_FMT_RGBA_8888); } } -void InitCreatePixelmapParam_BGRA() +void InitCreatePixelmapParamBGRA() { if (g_createOpts_BGRA == nullptr) { OH_PixelmapInitializationOptions_Create(&g_createOpts_BGRA); @@ -72,8 +72,8 @@ public: void VpeImageApiTest::SetUpTestCase() { g_pixData = new uint8_t[PIX_SIZE]; - InitCreatePixelmapParam_RGBA(); - InitCreatePixelmapParam_BGRA(); + InitCreatePixelmapParamRGBA(); + InitCreatePixelmapParamBGRA(); OH_PixelmapNative_CreatePixelmap(g_pixData, PIX_SIZE, g_createOpts_RGBA, &pixelMap_RGBA); OH_PixelmapNative_CreatePixelmap(g_pixData, PIX_SIZE, g_createOpts_BGRA, &pixelMap_BGRA); } @@ -81,6 +81,7 @@ void VpeImageApiTest::TearDownTestCase() { if (g_pixData) { delete[] g_pixData; + g_pixData = nullptr; } if (g_createOpts_RGBA) { OH_PixelmapInitializationOptions_Release(g_createOpts_RGBA); diff --git a/test/ndk/moduletest/image/capability_test.cpp b/test/ndk/moduletest/image/capability_test.cpp index 1e8802b..0599dae 100644 --- a/test/ndk/moduletest/image/capability_test.cpp +++ b/test/ndk/moduletest/image/capability_test.cpp @@ -467,7 +467,7 @@ HWTEST_F(VpeVideoCapTest, METADATAGENERATE_SUPPORT_001, TestSize.Level2) inputFormat.colorSpace = BT2020_HLG; inputFormat.pixelFormat = PIXEL_FORMAT_RGBA_1010102; if (!access("/system/lib64/media/", 0)) { - // ASSERT_EQ(true, OH_ImageProcessing_IsMetadataGenerationSupported(&inputFormat)); + ASSERT_EQ(true, OH_ImageProcessing_IsMetadataGenerationSupported(&inputFormat)); } else { ASSERT_EQ(false, OH_ImageProcessing_IsMetadataGenerationSupported(&inputFormat)); } diff --git a/test/ndk/moduletest/video/reli_test.cpp b/test/ndk/moduletest/video/reli_test.cpp index 2b33660..80edd7e 100644 --- a/test/ndk/moduletest/video/reli_test.cpp +++ b/test/ndk/moduletest/video/reli_test.cpp @@ -136,7 +136,7 @@ HWTEST_F(VpeVideoReliTest, METADATASUPPORT_001, TestSize.Level2) void CheckCapability(VideoProcessing_ColorSpaceInfo inputFormat) { - if (IsSRGBColorSpace(formatImage)) { + if (IsSRGBColorSpace()) { if (ValidatePixelFormat(formatImage)) { if (!access("/system/lib64/ndk/libvideo_processing_capi_impl.so", F_OK)) { if (!access("/system/lib64/media/", 0)) { @@ -201,7 +201,12 @@ HWTEST_F(VpeVideoReliTest, METADATASUPPORT_003, TestSize.Level2) cout<<"--metadataType--" << i << "--colorSpace--" << j << "--pixelFormat--" << k << endl; } } - if (IsSRGBColorSpace(formatImage)) { + if (formatImage.colorSpace == OH_COLORSPACE_SRGB_FULL || + formatImage.colorSpace == OH_COLORSPACE_SRGB_LIMIT || + formatImage.colorSpace == OH_COLORSPACE_LINEAR_SRGB || + formatImage.colorSpace == OH_COLORSPACE_DISPLAY_SRGB || + formatImage.colorSpace == OH_COLORSPACE_DISPLAY_P3_SRGB || + formatImage.colorSpace == OH_COLORSPACE_DISPLAY_BT2020_SRGB) { if (ValidatePixelFormat(formatImage)){ if (!access("/system/lib64/ndk/libvideo_processing_capi_impl.so", F_OK)) { if (!access("/system/lib64/media/", 0)) {