mirror of
https://gitee.com/openharmony/multimedia_image_framework
synced 2024-11-23 06:59:52 +00:00
!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:
commit
af149820fb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user