/foundation/graphic/graphic_3d/lume/LumeBase/api/base/containers/ |
H A D | allocator.h | 34 inline bool CloneData(void* const dst, const size_t dstSize, const void* const src, const size_t srcSize) in CloneData() argument 36 if (dst && src && srcSize <= dstSize) { in CloneData() 38 auto status = memcpy_s(dst, dstSize, src, srcSize); in CloneData() 45 return (dst && src && srcSize <= dstSize); in CloneData() 48 inline bool MoveData(void* const dst, const size_t dstSize, const void* const src, const size_t srcSize) in MoveData() argument 50 if (dst && src && srcSize <= dstSize) { in MoveData() 52 auto status = memmove_s(dst, dstSize, src, srcSize); in MoveData() 59 return (dst && src && srcSize <= dstSize); in MoveData() 62 inline bool ClearToValue(void* dst, size_t dstSize, uint8_t val, size_t count) in ClearToValue() argument 67 } else if (count > dstSize) { in ClearToValue() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/render/ |
H A D | image_painter.cpp | 29 void ApplyContain(const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect) in ApplyContain() argument 35 dstRect.SetSize(rawPicSize * (dstSize.Width() / rawPicSize.Width())); in ApplyContain() 37 dstRect.SetSize(rawPicSize * (dstSize.Height() / rawPicSize.Height())); in ApplyContain() 39 dstRect.SetOffset(Alignment::GetAlignPosition(dstSize, dstRect.GetSize(), Alignment::CENTER)); in ApplyContain() 42 void ApplyCover(const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect) in ApplyCover() argument 45 srcRect.SetSize(dstSize * (rawPicSize.Height() / dstSize.Height())); in ApplyCover() 47 srcRect.SetSize(dstSize * (rawPicSize.Width() / dstSize.Width())); in ApplyCover() 52 void ApplyCoverTopLeft(const SizeF& rawPicSize, const SizeF& dstSize, Rect argument 57 ApplyFitWidth(const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect) ApplyFitWidth() argument 68 ApplyFitHeight(const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect) ApplyFitHeight() argument 79 ApplyNone(const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect) ApplyNone() argument 86 ApplyAlignment( const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect, const Alignment& alignMent) ApplyAlignment() argument 258 ApplyImageAlignmentFit( ImageFit imageFit, const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect) ApplyImageAlignmentFit() argument 269 ApplyImageFit( ImageFit imageFit, const SizeF& rawPicSize, const SizeF& dstSize, RectF& srcRect, RectF& dstRect) ApplyImageFit() argument [all...] |
/third_party/lz4/ossfuzz/ |
H A D | round_trip_fuzzer.c | 36 int const dstSize = LZ4_compress_default((const char*)data, dst, in LLVMFuzzerTestOneInput() local 38 FUZZ_ASSERT(dstSize > 0); in LLVMFuzzerTestOneInput() 40 int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); in LLVMFuzzerTestOneInput() 49 dst, partial, dstSize, partialCapacity, partialCapacity); in LLVMFuzzerTestOneInput() 60 dst, partial, dstSize, partialCapacity, partialCapacity, NULL, 0); in LLVMFuzzerTestOneInput() 71 dst, partial, dstSize, partialCapacity, partialCapacity, dstPlusSmallPrefix, smallSize); in LLVMFuzzerTestOneInput() 82 dst, partial, dstSize, partialCapacity, partialCapacity, dstPlusLargePrefix, largeSize); in LLVMFuzzerTestOneInput() 93 dst, partial, dstSize, partialCapacity, partialCapacity, smallDict, smallSize); in LLVMFuzzerTestOneInput() 104 dst, partial, dstSize, partialCapacity, partialCapacity, largeDict, largeSize); in LLVMFuzzerTestOneInput()
|
H A D | compress_hc_fuzzer.c | 35 int const dstSize = LZ4_compress_HC((const char*)data, dst, size, in LLVMFuzzerTestOneInput() local 37 if (dstSize > 0) { in LLVMFuzzerTestOneInput() 38 int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); in LLVMFuzzerTestOneInput() 49 int const dstSize = LZ4_compress_HC_destSize(state, (const char*)data, in LLVMFuzzerTestOneInput() local 52 FUZZ_ASSERT(dstSize > 0); in LLVMFuzzerTestOneInput() 53 int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); in LLVMFuzzerTestOneInput()
|
H A D | compress_fuzzer.c | 33 int const dstSize = LZ4_compress_default((const char*)data, dst, in LLVMFuzzerTestOneInput() local 35 if (dstSize > 0) { in LLVMFuzzerTestOneInput() 36 int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); in LLVMFuzzerTestOneInput() 45 int const dstSize = LZ4_compress_destSize((const char*)data, dst, in LLVMFuzzerTestOneInput() local 47 FUZZ_ASSERT(dstSize > 0); in LLVMFuzzerTestOneInput() 48 int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); in LLVMFuzzerTestOneInput()
|
H A D | compress_frame_fuzzer.c | 35 size_t const dstSize = in LLVMFuzzerTestOneInput() local 37 if (!LZ4F_isError(dstSize)) { in LLVMFuzzerTestOneInput() 38 size_t const rtSize = FUZZ_decompressFrame(rt, size, dst, dstSize); in LLVMFuzzerTestOneInput()
|
H A D | round_trip_frame_fuzzer.c | 31 size_t const dstSize = in LLVMFuzzerTestOneInput() local 33 FUZZ_ASSERT(!LZ4F_isError(dstSize)); in LLVMFuzzerTestOneInput() 34 size_t const rtSize = FUZZ_decompressFrame(rt, size, dst, dstSize); in LLVMFuzzerTestOneInput()
|
H A D | round_trip_hc_fuzzer.c | 31 int const dstSize = LZ4_compress_HC((const char*)data, dst, size, in LLVMFuzzerTestOneInput() local 33 FUZZ_ASSERT(dstSize > 0); in LLVMFuzzerTestOneInput() 35 int const rtSize = LZ4_decompress_safe(dst, rt, dstSize, size); in LLVMFuzzerTestOneInput()
|
H A D | lz4_helpers.c | 40 size_t dstSize = dstCapacity; in FUZZ_decompressFrame() local 43 LZ4F_decompress(dctx, dst, &dstSize, src, &srcConsumed, &opts); in FUZZ_decompressFrame() 50 return dstSize; in FUZZ_decompressFrame()
|
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/converter/src/ |
H A D | basic_transformer.cpp | 96 void BasicTransformer::GetDstDimension(const Size &srcSize, Size &dstSize) in GetDstDimension() argument 100 dstSize.width = static_cast<int32_t>(srcSize.width * fabs(matrix_.GetScaleX()) + FHALF); in GetDstDimension() 101 dstSize.height = static_cast<int32_t>(srcSize.height * fabs(matrix_.GetScaleY()) + FHALF); in GetDstDimension() 106 GetRotateDimension(fInvProc, srcSize, dstSize); in GetDstDimension() 111 dstSize.width = static_cast<int32_t>(srcSize.width + matrix_.GetTransX() + FHALF); in GetDstDimension() 114 dstSize.height = static_cast<int32_t>(srcSize.height + matrix_.GetTranY() + FHALF); in GetDstDimension() 120 int &fd, uint64_t &bufferSize, Size &dstSize) in CheckAllocateBuffer() 129 outPixmap.data = allocate(dstSize, bufferSize, fd, outPixmap.uniqueId); in CheckAllocateBuffer() 174 Size dstSize = inPixmap.imageInfo.size; in TransformPixmap() local 175 GetDstDimension(inPixmap.imageInfo.size, dstSize); in TransformPixmap() 119 CheckAllocateBuffer(PixmapInfo &outPixmap, AllocateMem allocate, int &fd, uint64_t &bufferSize, Size &dstSize) CheckAllocateBuffer() argument 256 GetRotateDimension(Matrix::CalcXYProc fInvProc, const Size &srcSize, Size &dstSize) GetRotateDimension() argument [all...] |
/third_party/vk-gl-cts/external/vulkancts/modules_no_buildgn/vulkan/api/ |
H A D | vktApiFillBufferTests.cpp | 63 VkDeviceSize dstSize; member 77 // dstSize will be used as the buffer size. 99 testParams.bufferAllocator->createTestBuffer(m_params.dstSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT, context, memAlloc, m_destination, MemoryRequirement::HostVisible, m_destinationBufferAlloc); in FillWholeBufferTestInstance() 109 DE_ASSERT(m_params.dstSize >= sizeof(deUint32)); in iterate() 110 DE_ASSERT(m_params.dstSize < static_cast<VkDeviceSize>(std::numeric_limits<size_t>::max())); in iterate() 111 DE_ASSERT(m_params.dstOffset < m_params.dstSize); in iterate() 115 deMemset(bytes, 0xff, static_cast<size_t>(m_params.dstSize)); in iterate() 141 const VkDeviceSize startOfExtra = (m_params.dstSize / sizeof(deUint32)) * sizeof(deUint32); in iterate() 142 for (VkDeviceSize i = 0; i < m_params.dstSize; ++i) in iterate() 229 testParams.bufferAllocator->createTestBuffer(m_params.dstSize, VK_BUFFER_USAGE_TRANSFER_DST_BI in FillBufferTestInstance() [all...] |
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/ |
H A D | pixel_yuv_ext_utils_test.cpp | 113 Size dstSize; in HWTEST_F() local 122 bool res = PixelYuvExtUtils::YuvRotate(srcPixels, pixelFormat, info, dstSize, dstPixels, dstStrides, rotateNum); in HWTEST_F() 192 Size dstSize; in HWTEST_F() local 201 bool res = PixelYuvExtUtils::YuvRotate(srcPixels, pixelFormat, info, dstSize, dstPixels, dstStrides, rotateNum); in HWTEST_F() 207 * @tc.desc: Test YuvRotate with invalid dstSize and dstStrides. 215 Size dstSize; in HWTEST_F() local 228 bool res = PixelYuvExtUtils::YuvRotate(srcPixels, pixelFormat, info, dstSize, dstPixels, dstStrides, rotateNum); in HWTEST_F() 242 Size dstSize; in HWTEST_F() local 243 dstSize.width = NUM_2; in HWTEST_F() 244 dstSize in HWTEST_F() [all...] |
/drivers/hdf_core/framework/utils/src/ |
H A D | hdf_cstring.c | 62 size_t dstSize; in HdfStringCopy() local 68 dstSize = srcSize + 1; in HdfStringCopy() 69 newStr = OsalMemAlloc(dstSize); in HdfStringCopy() 74 if (strncpy_s(newStr, dstSize, src, srcSize) != EOK) { in HdfStringCopy()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/image_provider/ |
H A D | image_loading_context.cpp | 103 SizeF ImageLoadingContext::CalculateTargetSize(const SizeF& srcSize, const SizeF& dstSize, const SizeF& rawImageSize) in CalculateTargetSize() argument 112 double widthScale = dstSize.Width() / srcSize.Width() * viewScale; in CalculateTargetSize() 113 double heightScale = dstSize.Height() / srcSize.Height() * viewScale; in CalculateTargetSize() 459 bool ImageLoadingContext::MakeCanvasImageIfNeed(const SizeF& dstSize, bool autoResize, ImageFit imageFit, in MakeCanvasImageIfNeed() argument 464 /* When function is called with a changed dstSize, assume the image will be resized frequently. To minimize in MakeCanvasImageIfNeed() 465 * MakeCanvasImage operations, map dstSize to size levels in log_2. Only Remake when the size level changes. in MakeCanvasImageIfNeed() 467 if (SizeChanging(dstSize)) { in MakeCanvasImageIfNeed() 468 res |= RoundUp(dstSize.Width()) != sizeLevel_; in MakeCanvasImageIfNeed() 470 res |= dstSize.IsPositive(); in MakeCanvasImageIfNeed() 473 dstSize_ = dstSize; in MakeCanvasImageIfNeed() 489 MakeCanvasImage( const SizeF& dstSize, bool autoResize, ImageFit imageFit, const std::optional<SizeF>& sourceSize) MakeCanvasImage() argument [all...] |
H A D | image_loading_context.h | 45 bool MakeCanvasImageIfNeed(const SizeF& dstSize, bool autoResize, ImageFit imageFit, 50 void MakeCanvasImage(const SizeF& dstSize, bool needResize, ImageFit imageFit = ImageFit::COVER, 187 static SizeF CalculateTargetSize(const SizeF& srcSize, const SizeF& dstSize, const SizeF& rawImageSize); 189 inline bool SizeChanging(const SizeF& dstSize) in SizeChanging() argument 191 return dstSize_.IsPositive() && dstSize != dstSize_; in SizeChanging()
|
/foundation/multimedia/av_codec/services/services/codec/ipc/ |
H A D | buffer_converter.cpp | 62 int32_t dstSize = (OFFSET_3 * dstRect.wStride * dstRect.hStride) >> 1; in ConvertYUV420SP() local 64 CHECK_AND_RETURN_RET_LOG(dstSize <= capacity, 0, "No memory. dstSize:%{public}d, capacity:%{public}d", dstSize, in ConvertYUV420SP() 84 return dstSize; in ConvertYUV420SP() 92 int32_t dstSize = (OFFSET_3 * dstRect.wStride * dstRect.hStride) >> 1; in ConvertYUV420P() local 94 CHECK_AND_RETURN_RET_LOG(dstSize <= capacity, 0, "No memory. dstSize:%{public}d, capacity:%{public}d", dstSize, in ConvertYUV420P() 129 return dstSize; in ConvertYUV420P() 137 int32_t dstSize = dstRect.wStride * dstRect.hStride; ConverteRGBA8888() local [all...] |
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/api/ |
H A D | vktApiFillBufferTests.cpp | 66 VkDeviceSize dstSize; member 167 // dstSize will be used as the buffer size. 210 testParams.bufferAllocator->createTestBuffer(vk, m_device, m_queueFamilyIndex, m_params.dstSize, VK_BUFFER_USAGE_TRANSFER_DST_BIT, context, *m_allocator, m_destination, MemoryRequirement::HostVisible, m_destinationBufferAlloc); in FillWholeBufferTestInstance() 222 DE_ASSERT(m_params.dstSize >= sizeof(deUint32)); in iterate() 223 DE_ASSERT(m_params.dstSize < static_cast<VkDeviceSize>(std::numeric_limits<size_t>::max())); in iterate() 224 DE_ASSERT(m_params.dstOffset < m_params.dstSize); in iterate() 228 deMemset(bytes, 0xff, static_cast<size_t>(m_params.dstSize)); in iterate() 310 const VkDeviceSize startOfExtra = (m_params.dstSize / sizeof(deUint32)) * sizeof(deUint32); in iterate() 311 for (VkDeviceSize i = 0; i < m_params.dstSize; ++i) in iterate() 418 testParams.bufferAllocator->createTestBuffer(vk, m_device, m_queueFamilyIndex, m_params.dstSize, VK_BUFFER_USAGE_TRANSFER_DST_BI in FillBufferTestInstance() [all...] |
/third_party/skia/src/gpu/geometry/ |
H A D | GrRect.h | 100 * Clips the srcRect and the dstPoint to the bounds of the srcSize and dstSize respectively. Returns 105 static inline bool GrClipSrcRectAndDstPoint(const SkISize& dstSize, in GrClipSrcRectAndDstPoint() argument 138 if (clippedDstPoint->fX + clippedSrcRect->width() > dstSize.width()) { in GrClipSrcRectAndDstPoint() 139 clippedSrcRect->fRight = clippedSrcRect->fLeft + dstSize.width() - clippedDstPoint->fX; in GrClipSrcRectAndDstPoint() 146 if (clippedDstPoint->fY + clippedSrcRect->height() > dstSize.height()) { in GrClipSrcRectAndDstPoint() 147 clippedSrcRect->fBottom = clippedSrcRect->fTop + dstSize.height() - clippedDstPoint->fY; in GrClipSrcRectAndDstPoint()
|
/foundation/arkui/ace_engine/test/mock/core/image_provider/ |
H A D | mock_image_loading_context.cpp | 29 SizeF ImageLoadingContext::CalculateTargetSize(const SizeF& srcSize, const SizeF& dstSize, const SizeF& rawImageSize) in CalculateTargetSize() argument 91 bool ImageLoadingContext::MakeCanvasImageIfNeed(const SizeF& dstSize, bool incomingNeedResize, in MakeCanvasImageIfNeed() argument 94 dstSize_ = dstSize; in MakeCanvasImageIfNeed() 101 const SizeF& dstSize, bool needResize, ImageFit imageFit, const std::optional<SizeF>& sourceSize) in MakeCanvasImage() 100 MakeCanvasImage( const SizeF& dstSize, bool needResize, ImageFit imageFit, const std::optional<SizeF>& sourceSize) MakeCanvasImage() argument
|
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/ycbcr/ |
H A D | vktYCbCrConversionTests.cpp | 122 const UVec2& dstSize) in genTexCoords() 124 for (deUint32 y = 0; y < dstSize.y(); y++) in genTexCoords() 125 for (deUint32 x = 0; x < dstSize.x(); x++) in genTexCoords() 191 , dstSize (dstSize_) in TestConfig() 213 const UVec2 dstSize; member 731 const UVec2 dstSize = config.dstSize; in textureConversionTest() local 834 if (dstSize.x() > srcSize.x() && dstSize.y() > srcSize.y()) in textureConversionTest() 835 genTexCoords(sts, srcSize, dstSize); in textureConversionTest() 120 genTexCoords(std::vector<Vec2>& coords, const UVec2& srcSize, const UVec2& dstSize) genTexCoords() argument [all...] |
/third_party/vk-gl-cts/external/vulkancts/modules_no_buildgn/vulkan/ycbcr/ |
H A D | vktYCbCrConversionTests.cpp | 122 const UVec2& dstSize) in genTexCoords() 124 for (deUint32 y = 0; y < dstSize.y(); y++) in genTexCoords() 125 for (deUint32 x = 0; x < dstSize.x(); x++) in genTexCoords() 191 , dstSize (dstSize_) in TestConfig() 213 const UVec2 dstSize; member 678 const UVec2 dstSize = config.dstSize; in textureConversionTest() local 761 if (dstSize.x() > srcSize.x() && dstSize.y() > srcSize.y()) in textureConversionTest() 762 genTexCoords(sts, srcSize, dstSize); in textureConversionTest() 120 genTexCoords(std::vector<Vec2>& coords, const UVec2& srcSize, const UVec2& dstSize) genTexCoords() argument [all...] |
/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/ |
H A D | camera_manager.cpp | 38 static int32_t SampleDealThumb(char* psrc, uint32_t srcSize, uint32_t* dstSize, uint16_t u16THMLen) in SampleDealThumb() argument 90 *dstSize = endpos - startpos; in SampleDealThumb() 95 static int32_t SampleGetThmFromJpg(const char* jpegPath, uint32_t* dstSize) in SampleGetThmFromJpg() argument 135 if (SampleDealThumb(pszFile, stStat.st_size, dstSize, u16THMLen) < 0) { in SampleGetThmFromJpg() 149 uint32_t dstSize = 0; in SampleGetdcfinfo() local 156 s32RtnVal = SampleGetThmFromJpg(static_cast<const char *>(jpegSrcPath), &dstSize); in SampleGetdcfinfo() 157 if ((s32RtnVal != 0) || (dstSize == 0)) { in SampleGetdcfinfo() 167 while (u32WritenSize < dstSize) { in SampleGetdcfinfo() 168 s32RtnVal = fwrite(g_dstBuf + u32WritenSize, 1, dstSize, fpTHM); in SampleGetdcfinfo()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_profiler/ |
H A D | rs_profiler_pixelmap.cpp | 112 static bool CopyImageData(const uint8_t* srcImage, size_t srcSize, uint8_t* dstImage, size_t dstSize) in CopyImageData() argument 114 if (!srcImage || !dstImage || (srcSize == 0) || (dstSize == 0) || (srcSize > dstSize)) { in CopyImageData() 118 if (dstSize == srcSize) { in CopyImageData() 119 return Rosen::Utils::Move(dstImage, dstSize, srcImage, srcSize); in CopyImageData() 122 for (size_t offset = 0; offset < dstSize;) { in CopyImageData() 123 const size_t size = std::min(dstSize - offset, srcSize); in CopyImageData() 133 static bool CopyImageData(const std::vector<uint8_t>& data, uint8_t* dstImage, size_t dstSize) in CopyImageData() argument 135 return CopyImageData(data.data(), data.size(), dstImage, dstSize); in CopyImageData() 138 static bool CopyImageData(const Rosen::Image* image, uint8_t* dstImage, size_t dstSize) in CopyImageData() argument [all...] |
/third_party/skia/third_party/externals/libjpeg-turbo/ |
H A D | tjunittest.c | 374 unsigned long *dstSize, int w, int h, int pf, in compTest() 388 if (*dstBuf && *dstSize > 0) memset(*dstBuf, 0, *dstSize); in compTest() 413 dstSize, jpegQual, flags)); in compTest() 417 TRY_TJ(tjCompress2(handle, srcBuf, w, 0, h, pf, dstBuf, dstSize, subsamp, in compTest() 423 writeJPEG(*dstBuf, *dstSize, tempStr); in compTest() 441 unsigned long dstSize = 0; in _decompTest() local 448 dstSize = scaledWidth * scaledHeight * tjPixelSize[pf]; in _decompTest() 449 if ((dstBuf = (unsigned char *)malloc(dstSize)) == NULL) in _decompTest() 451 memset(dstBuf, 0, dstSize); in _decompTest() 373 compTest(tjhandle handle, unsigned char **dstBuf, unsigned long *dstSize, int w, int h, int pf, char *basename, int subsamp, int jpegQual, int flags) compTest() argument 615 unsigned long dstSize = 0; bufSizeTest() local [all...] |
/third_party/icu/icu4c/source/common/ |
H A D | unistr_cnv.cpp | 124 uint32_t dstSize) const { in extract() 125 return extract(start, length, target, dstSize, 0); in extract() 135 uint32_t dstSize, in extract() 139 if(/*dstSize < 0 || */(dstSize > 0 && target == 0)) { in extract() 146 // We need to cast dstSize to int32_t for all subsequent code. in extract() 148 // Also, dstSize==0xffffffff means "unlimited" but if we use target+dstSize in extract() 152 if(dstSize < 0x7fffffff) { in extract() 154 capacity = (int32_t)dstSize; in extract() 132 extract(int32_t start, int32_t length, char *target, uint32_t dstSize, const char *codepage) const extract() argument [all...] |