Home
last modified time | relevance | path

Searched refs:byteCount (Results 1 – 25 of 34) sorted by relevance

12

/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libbmpplugin/src/
H A Dbmp_decoder.cpp118 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 Dsvg_decoder.cpp65 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 Dheif_decoder.cpp135 … 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 Dwebp_decoder.cpp402 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 Dext_pixel_convert.cpp65 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 Dext_decoder.cpp654 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 Dpixel_convert_adapter.cpp82 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 Dpng_decoder.cpp219 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 Dbmp_decoder_test.cpp518 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 Dext_decoder_test.cpp276 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 Dmock_pixel_map.cpp36 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 Dble_properties.cpp74 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 Dark_interop_bigint.cpp101 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 Dfile_ex.cpp196 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 Dbmp_decoder.h61 … 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 Djpeg_decoder.cpp367 …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 Dfile_ex.cpp273 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 Dext_decoder.h87 uint64_t byteCount; member
112 uint32_t SetContextPixelsBuffer(uint64_t byteCount, DecodeContext &context);
122 uint64_t byteCount, OHOS::Media::PixelFormat format);
H A Dext_pixel_convert.h28 size_t byteCount; member
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/utils/include/
H A Dimage_utils.h51 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 Dimage_utils.cpp414 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 Dimage_utils_test.cpp460 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 Dheif_decoder.h42 bool AllocShareMem(DecodeContext &context, uint64_t byteCount);
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/common/
H A Dace_view.h115 … 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 Dpost_proc.cpp941 … 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()

12