H.264 Codec for ESP32-S3
Loading...
Searching...
No Matches
Macros | Functions
esp_h264_alloc.h File Reference
#include "H264Config.h"
#include "esp_idf_version.h"
#include "esp_heap_caps.h"
Include dependency graph for esp_h264_alloc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ESP_H264_MEM_INTERNAL   MALLOC_CAP_INTERNAL
 
#define ESP_H264_MEM_SPIRAM   MALLOC_CAP_SPIRAM
 
#define ALIGN_UP(num, align)   (((num) + ((align) - 1)) & ~((align) - 1))
 
#define esp_h264_free   heap_caps_free
 Free memory previously allocated.
 

Functions

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.
 

Macro Definition Documentation

◆ 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

Function Documentation

◆ 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]alignmentHow 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]nNumber of continuing chunks of memory to allocate
[in]sizeSize, in bytes, of a chunk of memory to allocate
[in]capsESP_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]nNumber of continuing chunks of memory to allocate
[in]sizeSize, in bytes, of a chunk of memory to allocate
[in]caps1ESP_H264_MEM_INTERNAL or ESP_H264_MEM_SPIRAM
[in]caps2ESP_H264_MEM_INTERNAL or ESP_H264_MEM_SPIRAM
Returns
  • NULL Failure
  • others A pointer to the memory allocated on success