Home
last modified time | relevance | path

Searched refs:alignment (Results 1 – 14 of 14) sorted by relevance

/drivers/hdf_core/adapter/khdf/uniproton/osal/src/
Dosal_mem.c69 static int OsalMemLog2(int alignment) in OsalMemLog2() argument
72 int temp = alignment; in OsalMemLog2()
74 …if ((alignment == 0) || !MEM_IS_POW_TWO(alignment) || !MEM_IS_ALIGNED(alignment, sizeof(void *))) { in OsalMemLog2()
85 void *OsalMemAllocAlign(size_t alignment, size_t size) in OsalMemAllocAlign() argument
92 … return PRT_MemAllocAlign(OS_MEM_DEFAULT_PT0, OS_MEM_DEFAULT_FSC_PT, size, OsalMemLog2(alignment)); in OsalMemAllocAlign()
/drivers/hdf_core/adapter/khdf/linux/osal/src/
Dosal_mem.c112 void *OsalMemAllocAlign(size_t alignment, size_t size) in OsalMemAllocAlign() argument
122 if (size == 0 || (alignment == 0) || ((alignment & (alignment - 1)) != 0) || in OsalMemAllocAlign()
123 ((alignment % sizeof(void *)) != 0) || size > (SIZE_MAX - alignment)) { in OsalMemAllocAlign()
124 HDF_LOGE("%s invalid param align:%zu,size:%zu", __func__, alignment, size); in OsalMemAllocAlign()
128 base = osal_mem_alloc(size + alignment, &type); in OsalMemAllocAlign()
135 aligned_ptr = (char *)(uintptr_t)(((size_t)(uintptr_t)buf + alignment - 1) & ~(alignment - 1)); in OsalMemAllocAlign()
/drivers/hdf_core/adapter/khdf/liteos/osal/src/
Dosal_mem.c69 void *OsalMemAllocAlign(size_t alignment, size_t size) in OsalMemAllocAlign() argument
78 buf = LOS_MemAllocAlign((VOID *)OS_SYS_MEM_ADDR, size, alignment); in OsalMemAllocAlign()
/drivers/hdf_core/adapter/khdf/liteos_m/osal/src/
Dosal_mem.c69 void *OsalMemAllocAlign(size_t alignment, size_t size) in OsalMemAllocAlign() argument
78 buf = LOS_MemAllocAlign((VOID *)OS_SYS_MEM_ADDR, size, alignment); in OsalMemAllocAlign()
/drivers/hdf_core/framework/support/posix/src/
Dosal_mem.c47 void *OsalMemAllocAlign(size_t alignment, size_t size) in OsalMemAllocAlign() argument
57 ret = posix_memalign(&buf, alignment, size); in OsalMemAllocAlign()
/drivers/hdf_core/interfaces/inner_api/osal/shared/
Dosal_mem.h72 void *OsalMemAllocAlign(size_t alignment, size_t size);
/drivers/peripheral/codec/hdi_service/codec_service_stub/
Dstub_msgproc.c22 int32_t CodecSerPackAlignment(struct HdfSBuf *reply, Alignment *alignment) in CodecSerPackAlignment() argument
24 if (reply == NULL || alignment == NULL) { in CodecSerPackAlignment()
28 if (!HdfSbufWriteInt32(reply, alignment->widthAlignment)) { in CodecSerPackAlignment()
32 if (!HdfSbufWriteInt32(reply, alignment->heightAlignment)) { in CodecSerPackAlignment()
/drivers/peripheral/codec/test/demo/v1.0/
Dcodec_encode_test_async.c61 static uint32_t inline AlignUp(uint32_t width, uint32_t alignment) in AlignUp() argument
63 if (alignment < 1) { in AlignUp()
66 return (((width) + alignment - 1) & (~(alignment - 1))); in AlignUp()
Dcodec_encode_test_ipc.c59 static uint32_t inline AlignUp(uint32_t width, uint32_t alignment) in AlignUp() argument
61 if (alignment < 1) { in AlignUp()
64 return (((width) + alignment - 1) & (~(alignment - 1))); in AlignUp()
Dcodec_decode_test_async.c67 static uint32_t inline AlignUp(uint32_t width, uint32_t alignment) in AlignUp() argument
69 if (alignment < 1) { in AlignUp()
72 return (((width) + alignment - 1) & (~(alignment - 1))); in AlignUp()
Dcodec_decode_test_ipc.c66 static uint32_t inline AlignUp(uint32_t width, uint32_t alignment) in AlignUp() argument
68 if (alignment < 1) { in AlignUp()
71 return (((width) + alignment - 1) & (~(alignment - 1))); in AlignUp()
/drivers/interface/camera/metadata/include/
Dcamera_metadata_operator.h150 uint32_t AlignTo(uint32_t val, uint32_t alignment);
/drivers/interface/camera/metadata/src/
Dcamera_metadata_operator.cpp170 uint32_t AlignTo(uint32_t val, uint32_t alignment) in AlignTo() argument
172 …return static_cast<uint32_t>((static_cast<uintptr_t>(val) + ((alignment) - 1)) & ~((alignment) - 1… in AlignTo()
/drivers/interface/codec/v1_0/
DCodecTypes.idl249 * @brief Defines the alignment structure.