diff --git a/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp b/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp index 6e4c1f975d8a0c902df20e6fd2e39921a623d223..e1b6efba4472551091bf0eaa18e8fd57906692b4 100644 --- a/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp +++ b/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp @@ -2166,14 +2166,17 @@ HWTEST_F(ExtDecoderTest, EncodePixelMapTest001, TestSize.Level3) sourceOpts, errorCode); ASSERT_NE(imageSource, nullptr); DecodeOptions opts; - opts.desiredPixelFormat = PixelFormat::YCRCB_P010; + opts.photoDesiredPixelFormat = PixelFormat::YCBCR_P010; + opts.desiredDynamicRange = DecodeDynamicRange::HDR; std::shared_ptr pixelmap = imageSource->CreatePixelMap(opts, errorCode); ASSERT_EQ(errorCode, OHOS::Media::SUCCESS); ASSERT_NE(pixelmap, nullptr); + EXPECT_EQ(pixelmap->GetPixelFormat(), PixelFormat::YCBCR_P010); ImagePacker packer; PackOption option; option.format = "image/heif"; option.needsPackProperties = true; + option.desiredDynamicRange = EncodeDynamicRange::AUTO; uint32_t startpc = packer.StartPacking(IMAGE_DEST, option); ASSERT_EQ(startpc, OHOS::Media::SUCCESS); uint32_t retAddImage = packer.AddImage(*pixelmap);