H.264 Codec for ESP32-S3
Loading...
Searching...
No Matches
Functions
esp_h264_alloc.c File Reference
#include "esp_h264_alloc.h"
#include "esp_h264_cache.h"
#include "esp_private/esp_cache_private.h"
Include dependency graph for esp_h264_alloc.c:

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.
 

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