/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libbmpplugin/src/ |
H A D | bmp_decoder.cpp | 118 int fd = AshmemCreate(name.c_str(), byteCount); in SetShareMemBuffer() 135 ::munmap(ptr, byteCount); in SetShareMemBuffer() 142 context.pixelsBuffer.bufferSize = byteCount; in SetShareMemBuffer() 189 if (byteCount == 0) { in SetBuffer() 193 void *outputBuffer = malloc(byteCount); in SetBuffer() 207 if (memset_s(outputBuffer, byteCount, 0, byteCount) != EOK) { in SetBuffer() 215 context.pixelsBuffer.bufferSize = byteCount; in SetBuffer() 226 if (byteCount == 0) { in SetBufferForPlatform() 230 void *outputBuffer = malloc(byteCount); in SetBufferForPlatform() 244 if (memset_s(outputBuffer, byteCount, 0, byteCount) != EOK) { in SetBufferForPlatform() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libsvgplugin/src/ |
H A D | svg_decoder.cpp | 65 int fd = AshmemCreate(name.c_str(), byteCount); in AllocShareBufferInner() 89 ::munmap(ptr, byteCount); in AllocShareBufferInner() 97 context.pixelsBuffer.bufferSize = byteCount; in AllocShareBufferInner() 109 static_cast<unsigned long long>(byteCount)); in AllocShareBuffer() 111 if (byteCount > PIXEL_MAP_MAX_RAM_SIZE) { in AllocShareBuffer() 130 if (byteCount > PIXEL_MAP_MAX_RAM_SIZE) { in AllocDmaBuffer() 161 context.pixelsBuffer.bufferSize = byteCount; in AllocDmaBuffer() 178 if (byteCount > PIXEL_MAP_MAX_RAM_SIZE) { in AllocHeapBuffer() 184 auto outputBuffer = malloc(byteCount); in AllocHeapBuffer() 191 if (memset_s(outputBuffer, byteCount, 0, byteCount) != EOK) { in AllocHeapBuffer() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libheifplugin/src/ |
H A D | heif_decoder.cpp | 135 … uint64_t byteCount = static_cast<uint64_t>(heifSize_.width) * heifSize_.height * bytesPerPixel_; in AllocHeapBuffer() local 137 return AllocShareMem(context, byteCount); in AllocHeapBuffer() 139 void *outputBuffer = malloc(byteCount); in AllocHeapBuffer() 142 static_cast<unsigned long long>(byteCount)); in AllocHeapBuffer() 145 if (memset_s(outputBuffer, byteCount, 0, byteCount) != EOK) { in AllocHeapBuffer() 152 context.pixelsBuffer.bufferSize = byteCount; in AllocHeapBuffer() 161 bool HeifDecoder::AllocShareMem(DecodeContext &context, uint64_t byteCount) in AllocShareMem() argument 165 int fd = AshmemCreate(name.c_str(), byteCount); in AllocShareMem() 174 void* ptr = ::mmap(nullptr, byteCount, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in AllocShareMem() 183 ::munmap(ptr, byteCount); in AllocShareMem() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libwebpplugin/src/ |
H A D | webp_decoder.cpp | 402 int fd = AshmemCreate(name.c_str(), byteCount); in SharedMemoryCreate() 420 ::munmap(ptr, byteCount); in SharedMemoryCreate() 427 context.pixelsBuffer.bufferSize = byteCount; in SharedMemoryCreate() 436 if (byteCount == 0 || byteCount > PIXEL_MAP_MAX_RAM_SIZE) { in HeapMemoryCreate() 440 void *outputBuffer = malloc(byteCount); in HeapMemoryCreate() 443 static_cast<unsigned long long>(byteCount)); in HeapMemoryCreate() 455 if (memset_s(outputBuffer, byteCount, 0, byteCount) != EOK) { in HeapMemoryCreate() 463 context.pixelsBuffer.bufferSize = byteCount; in HeapMemoryCreate() 501 context.pixelsBuffer.bufferSize = byteCount; in DmaMemoryCreate() 521 return HeapMemoryCreate(context, byteCount); in AllocOutputBuffer() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/src/ |
H A D | ext_pixel_convert.cpp | 65 if (src.byteCount % NUM_4 != NUM_0) { in RGBxToRGB() 68 size_t srcPixelCount = src.byteCount / NUM_4; in RGBxToRGB() 69 if (srcPixelCount * NUM_3 > dst.byteCount) { in RGBxToRGB() 82 if (src.byteCount % NUM_3 != NUM_0) { in RGBToRGBx() 85 size_t srcPixelCount = src.byteCount / NUM_3; in RGBToRGBx() 86 if (srcPixelCount * NUM_4 > dst.byteCount) { in RGBToRGBx()
|
H A D | ext_decoder.cpp | 654 if (byteCount == ZERO) { in HeapMemAlloc() 658 return ShareMemAlloc(context, byteCount); in HeapMemAlloc() 660 return DmaMemAlloc(context, byteCount, dstInfo_); in HeapMemAlloc() 662 return HeapMemAlloc(context, byteCount); in HeapMemAlloc() 734 uint64_t byteCount, PixelFormat format) in HeapMemAlloc() argument 738 srcDataInfo.bufferSize = byteCount; in HeapMemAlloc() 900 uint64_t byteCount = tempByteCount; in HeapMemAlloc() local 904 tmpBuffer = make_unique<uint8_t[]>(byteCount); in HeapMemAlloc() 906 byteCount = byteCount / NUM_4 * NUM_3; in HeapMemAlloc() 1316 return (src.byteCount == dst.byteCount) && (src.rowStride == dst.rowStride) && in HeapMemAlloc() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/pixelconverter/src/ |
H A D | pixel_convert_adapter.cpp | 82 static void ARGBToRGBA(uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount) in ARGBToRGBA() argument 84 if (byteCount % NUM_4 != NUM_0) { in ARGBToRGBA() 90 for (uint32_t i = NUM_0 ; i < byteCount; i += NUM_4) { in ARGBToRGBA() 101 static void RGBAToARGB(uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount) in RGBAToARGB() argument 103 if (byteCount % NUM_4 != NUM_0) { in RGBAToARGB() 109 for (uint32_t i = NUM_0 ; i < byteCount; i += NUM_4) { in RGBAToARGB() 120 static void RGBxToRGB(const uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount) in RGBxToRGB() argument 122 if (byteCount % NUM_4 != NUM_0) { in RGBxToRGB() 128 for (uint32_t i = NUM_0 ; i < byteCount; i += NUM_4) { in RGBxToRGB() 140 if (byteCount % NUM_3 != NUM_0) { in RGBToRGBx() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libpngplugin/src/ |
H A D | png_decoder.cpp | 219 if (byteCount == 0) { in AllocBufferForShareType() 243 ::munmap(ptr, byteCount); in AllocBufferForShareType() 250 context.pixelsBuffer.bufferSize = byteCount; in AllocBufferForShareType() 283 context.pixelsBuffer.bufferSize = byteCount; in AllocBufferForDmaType() 291 if (byteCount == 0) { in AllocOutBuffer() 295 void *outputBuffer = malloc(byteCount); in AllocOutBuffer() 309 if (memset_s(outputBuffer, byteCount, 0, byteCount) != EOK) { in AllocOutBuffer() 317 context.pixelsBuffer.bufferSize = byteCount; in AllocOutBuffer() 327 if (byteCount == 0) { in AllocBufferForPlatform() 331 void *outputBuffer = malloc(byteCount); in AllocBufferForPlatform() [all …]
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/plugin_test/ |
H A D | bmp_decoder_test.cpp | 518 uint64_t byteCount = 0; variable 520 uint32_t result = bmpDecoder->SetShareMemBuffer(byteCount, context); 522 byteCount = 4; 523 result = bmpDecoder->SetShareMemBuffer(byteCount, context); 537 uint64_t byteCount = 0; variable 543 result = bmpDecoder->SetContextPixelsBuffer(byteCount, context, dstInfo); 546 result = bmpDecoder->SetContextPixelsBuffer(byteCount, context, dstInfo); 560 uint64_t byteCount = 0; variable 578 uint64_t byteCount = 0; variable 584 byteCount = -1; [all …]
|
H A D | ext_decoder_test.cpp | 276 uint64_t byteCount = ZERO; variable 280 byteCount = 128; 290 byteCount = 128; 655 src.byteCount = 5; 658 src.byteCount = 4; 659 dst.byteCount = 2; 662 dst.byteCount = 4; 682 src.byteCount = 4; 685 src.byteCount = 3; 686 dst.byteCount = 3; [all …]
|
/ohos5.0/foundation/multimedia/image_effect/test/unittest/mock/src/ |
H A D | mock_pixel_map.cpp | 36 int32_t byteCount = rowStride * height; in MockPixelMap() local 37 buffer = malloc(byteCount); in MockPixelMap() 43 ON_CALL(*this, GetByteCount()).WillByDefault(Return(byteCount)); in MockPixelMap() 44 ON_CALL(*this, GetCapacity()).WillByDefault(Return(byteCount)); in MockPixelMap()
|
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/service/src/ble/ |
H A D | ble_properties.cpp | 74 int byteCount = 0; in GetValidUTF8StringLength() local 77 if (byteCount + utf8Length > DEVICE_NAME_MAX_LEN) { in GetValidUTF8StringLength() 80 byteCount += utf8Length; in GetValidUTF8StringLength() 81 if (byteCount == DEVICE_NAME_MAX_LEN) { in GetValidUTF8StringLength() 82 return byteCount; in GetValidUTF8StringLength() 86 return byteCount; in GetValidUTF8StringLength()
|
/ohos5.0/foundation/arkui/napi/interfaces/inner_api/cjffi/ark_interop/ |
H A D | ark_interop_bigint.cpp | 101 void ARKTS_BigIntReadBytes(ARKTS_Env env, ARKTS_Value value, bool* isNegative, int64_t byteCount, u… in ARKTS_BigIntReadBytes() argument 109 ARKTS_ASSERT_V(byteCount >= u64cnt * WORD_BYTES, "byteCount not enough"); in ARKTS_BigIntReadBytes() 111 ARKTS_ASSERT_V(ReverseBytes(bytes, byteCount), "ReverseBytes failed"); in ARKTS_BigIntReadBytes()
|
/ohos5.0/foundation/ai/intelligent_voice_framework/llt/hdt/depend_libs/src/ |
H A D | file_ex.cpp | 196 int byteCount = 1; in LoadBufferFromNodeFile() local 198 if (byteCount > MAX_FILE_LENGTH) { in LoadBufferFromNodeFile() 199 UTILS_LOGE("LoadBufferFromNodeFile invalid file length(%{public}d)!", byteCount); in LoadBufferFromNodeFile() 207 byteCount++; in LoadBufferFromNodeFile()
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libbmpplugin/include/ |
H A D | bmp_decoder.h | 61 … uint32_t SetContextPixelsBuffer(uint64_t byteCount, DecodeContext &context, SkImageInfo &dstInfo); 62 uint32_t SetShareMemBuffer(uint64_t byteCount, DecodeContext &context);
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libjpegplugin/src/ |
H A D | jpeg_decoder.cpp | 367 …uint64_t byteCount = static_cast<uint64_t>(rowStride) * static_cast<uint64_t>(decodeInfo_.output_h… in DoSwDecode() local 372 int fd = AshmemCreate(name.c_str(), byteCount); in DoSwDecode() 381 void* ptr = ::mmap(nullptr, byteCount, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in DoSwDecode() 390 ::munmap(ptr, byteCount); in DoSwDecode() 397 context.pixelsBuffer.bufferSize = byteCount; in DoSwDecode() 426 context.pixelsBuffer.bufferSize = byteCount; in DoSwDecode() 430 void *outputBuffer = malloc(byteCount); in DoSwDecode() 433 static_cast<unsigned long long>(byteCount)); in DoSwDecode() 438 context.pixelsBuffer.bufferSize = byteCount; in DoSwDecode() 443 void *outputBuffer = malloc(byteCount); in DoSwDecode() [all …]
|
/ohos5.0/commonlibrary/c_utils/base/src/ |
H A D | file_ex.cpp | 273 int byteCount = 1; in LoadBufferFromNodeFile() local 275 if (byteCount > MAX_FILE_LENGTH) { in LoadBufferFromNodeFile() 276 UTILS_LOGE("LoadBufferFromNodeFile invalid file length(%{public}d)!", byteCount); in LoadBufferFromNodeFile() 285 byteCount++; in LoadBufferFromNodeFile()
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/include/ |
H A D | ext_decoder.h | 87 uint64_t byteCount; member 112 uint32_t SetContextPixelsBuffer(uint64_t byteCount, DecodeContext &context); 122 uint64_t byteCount, OHOS::Media::PixelFormat format);
|
H A D | ext_pixel_convert.h | 28 size_t byteCount; member
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/utils/include/ |
H A D | image_utils.h | 51 static void BGRAToARGB(uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount); 52 static void ARGBToBGRA(uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount);
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/utils/src/ |
H A D | image_utils.cpp | 414 static void ReversePixels(uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount) in ReversePixels() argument 416 if (byteCount % NUM_4 != NUM_0) { in ReversePixels() 422 for (uint32_t i = NUM_0 ; i < byteCount; i += NUM_4) { in ReversePixels() 433 void ImageUtils::BGRAToARGB(uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount) in BGRAToARGB() argument 436 ReversePixels(srcPixels, dstPixels, byteCount); in BGRAToARGB() 439 void ImageUtils::ARGBToBGRA(uint8_t* srcPixels, uint8_t* dstPixels, uint32_t byteCount) in ARGBToBGRA() argument 441 ReversePixels(srcPixels, dstPixels, byteCount); in ARGBToBGRA()
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/ |
H A D | image_utils_test.cpp | 460 uint32_t byteCount = 5; variable 461 ImageUtils::BGRAToARGB(srcPixels, destPixels, byteCount); 462 ASSERT_EQ(byteCount % NUM_4, 1); 463 ASSERT_NE(byteCount % NUM_4, NUM_0);
|
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libheifplugin/include/ |
H A D | heif_decoder.h | 42 bool AllocShareMem(DecodeContext &context, uint64_t byteCount);
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/common/ |
H A D | ace_view.h | 115 … virtual void StartSystemDrag(const std::string& str, void* pixelMapManager, int32_t byteCount) {} in StartSystemDrag() argument
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/converter/src/ |
H A D | post_proc.cpp | 941 … uint64_t byteCount = static_cast<uint64_t>(srcRowStride[0]) * static_cast<uint64_t>(srcHeight); in ScalePixelMapEx() local 944 …if (srcRowStride[0] <= 0 || byteCount > UINT_MAX || allocSize < byteCount || allocSize > UINT_MAX)… in ScalePixelMapEx() 951 errno_t errRet = memcpy_s(inBuf, allocSize, pixelMap.GetWritablePixels(), byteCount); in ScalePixelMapEx()
|