The open imaging DSP library
Loading...
Searching...
No Matches
Functions
mpix/port.h

Functions to implement to port libmpix. More...

Functions

uint32_t mpix_port_get_uptime_us (void)
 Get the uptime in microsecond, used to compute performance statistics.
 
void * mpix_port_alloc (size_t size)
 Allocate a buffer to use with libmpix.
 
void mpix_port_free (void *mem)
 Free a buffer allocated with mpix_port_alloc().
 
void mpix_port_printf (char *fmt,...)
 Print debug information to the console.
 

Detailed Description

Functions to implement to port libmpix.

SPDX-License-Identifier: Apache-2.0

Function Documentation

◆ mpix_port_alloc()

void * mpix_port_alloc ( size_t  size)

Allocate a buffer to use with libmpix.

This will be used to allocate the small intermediate buffers present between the operations.

Parameters
sizeNumber of bytes available in the buffer
Returns
The pointer to the new buffer or NULL if allocation failed.

◆ mpix_port_free()

void mpix_port_free ( void *  mem)

Free a buffer allocated with mpix_port_alloc().

This will be used to free the buffers that were allocated after all processing.

Parameters
memPointer to the buffer to free.

◆ mpix_port_get_uptime_us()

uint32_t mpix_port_get_uptime_us ( void  )

Get the uptime in microsecond, used to compute performance statistics.

Counter overflows are not fatal to the system as this is only for benchmarking purpose.

Returns
The 32-bit counter of microsecond since boot

◆ mpix_port_printf()

void mpix_port_printf ( char *  fmt,
  ... 
)

Print debug information to the console.

This will be used to log debug messages according to the log level, as well as print image previews in the terminal.

Parameters
memPointer to the buffer to free.