#include "H264Config.h"
#include "esp_idf_version.h"
#include "esp_heap_caps.h"
Go to the source code of this file.
|
| void * | esp_h264_aligned_calloc (uint32_t alignment, uint32_t n, uint32_t size, uint32_t *actual_size, uint32_t caps) |
| | Allocate an aligned chunk of memory which has the given capabilities.
|
| |
| void * | esp_h264_calloc_prefer (uint32_t n, uint32_t size, uint32_t *actual_size, uint32_t caps1, uint32_t caps2) |
| | Allocate a chunk of memory as preference in decreasing order. And helper function for calloc a cache aligned data memory buffer.
|
| |
◆ ALIGN_UP
| #define ALIGN_UP |
( |
|
num, |
|
|
|
align |
|
) |
| (((num) + ((align) - 1)) & ~((align) - 1)) |
◆ esp_h264_free
| #define esp_h264_free heap_caps_free |
Free memory previously allocated.
◆ ESP_H264_MEM_INTERNAL
| #define ESP_H264_MEM_INTERNAL MALLOC_CAP_INTERNAL |
◆ ESP_H264_MEM_SPIRAM
| #define ESP_H264_MEM_SPIRAM MALLOC_CAP_SPIRAM |
◆ esp_h264_aligned_calloc()
| void * esp_h264_aligned_calloc |
( |
uint32_t |
alignment, |
|
|
uint32_t |
n, |
|
|
uint32_t |
size, |
|
|
uint32_t * |
actual_size, |
|
|
uint32_t |
caps |
|
) |
| |
Allocate an aligned chunk of memory which has the given capabilities.
- Parameters
-
| [in] | alignment | How the pointer received needs to be aligned must be a power of two. If the value is less than cache line size, the value will be forced cache line size. |
| [in] | n | Number of continuing chunks of memory to allocate |
| [in] | size | Size, in bytes, of a chunk of memory to allocate |
| [in] | caps | ESP_H264_MEM_INTERNAL or ESP_H264_MEM_SPIRAM |
- Returns
- NULL Failure
- others A pointer to the memory allocated on success
◆ esp_h264_calloc_prefer()
| void * esp_h264_calloc_prefer |
( |
uint32_t |
n, |
|
|
uint32_t |
size, |
|
|
uint32_t * |
actual_size, |
|
|
uint32_t |
caps1, |
|
|
uint32_t |
caps2 |
|
) |
| |
Allocate a chunk of memory as preference in decreasing order. And helper function for calloc a cache aligned data memory buffer.
- Parameters
-
| [in] | n | Number of continuing chunks of memory to allocate |
| [in] | size | Size, in bytes, of a chunk of memory to allocate |
| [in] | caps1 | ESP_H264_MEM_INTERNAL or ESP_H264_MEM_SPIRAM |
| [in] | caps2 | ESP_H264_MEM_INTERNAL or ESP_H264_MEM_SPIRAM |
- Returns
- NULL Failure
- others A pointer to the memory allocated on success