!2534 arkui-x update master OH to weekly_20240909 and OH fix build bug

Merge pull request !2534 from mufeng521/mufeng_master_oh_weekly_20240909
This commit is contained in:
oh_ci 2024-09-14 03:56:12 +00:00 committed by Gitee
commit af149820fb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -532,6 +532,7 @@ bool PixelMap::CheckParams(const uint32_t *colors, uint32_t colorLength, int32_t
return true;
}
#if !defined(IOS_PLATFORM) && !defined(ANDROID_PLATFORM)
bool InitYuvDataOutInfo(SurfaceBuffer* surfaceBuffer, const ImageInfo &info, YUVDataInfo &yuvInfo)
{
if (surfaceBuffer == nullptr) {
@ -557,6 +558,7 @@ bool InitYuvDataOutInfo(SurfaceBuffer* surfaceBuffer, const ImageInfo &info, YUV
yuvInfo.uvOffset = planes->planes[uvPlaneOffset].offset;
return true;
}
#endif
static bool CheckPixelMap(unique_ptr<PixelMap>& dstPixelMap, const InitializationOptions &opts)
{
@ -612,10 +614,12 @@ unique_ptr<PixelMap> PixelMap::Create(const InitializationOptions &opts)
if (IsYUV(opts.pixelFormat)) {
if (dstPixelFormat == PixelFormat::YCRCB_P010 || dstPixelFormat == PixelFormat::YCBCR_P010) {
YUVDataInfo yuvDatainfo;
#if !defined(IOS_PLATFORM) && !defined(ANDROID_PLATFORM)
if (!InitYuvDataOutInfo(reinterpret_cast<SurfaceBuffer*>(dstMemory->extend.data),
dstImageInfo, yuvDatainfo)) {
return nullptr;
}
#endif
dstPixelMap->SetImageYUVInfo(yuvDatainfo);
} else {
SetYUVDataInfoToPixelMap(dstPixelMap);