XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
h264bsd_util.h File Reference
#include <stdint.h>
#include "basetype.h"
#include "h264bsd_cfg.h"
#include "h264bsd_stream.h"
#include "h264bsd_image.h"
#include <string.h>
#include <stdlib.h>
Include dependency graph for h264bsd_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HANTRO_OK   0
 
#define HANTRO_NOK   1
 
#define HANTRO_TRUE   (1)
 
#define HANTRO_FALSE   (0)
 
#define MEMORY_ALLOCATION_ERROR   0xFFFF
 
#define PARAM_SET_ERROR   0xFFF0
 
#define END_OF_STREAM   0xFFFFFFFFU
 
#define EMPTY_RESIDUAL_INDICATOR   0xFFFFFF
 
#define MARK_RESIDUAL_EMPTY(residual)   ((residual)[0] = EMPTY_RESIDUAL_INDICATOR)
 
#define IS_RESIDUAL_EMPTY(residual)   ((residual)[0] == EMPTY_RESIDUAL_INDICATOR)
 
#define ASSERT(expr)
 
#define RANGE_CHECK(value, minBound, maxBound)
 
#define RANGE_CHECK_ARRAY(array, minBound, maxBound, length)
 
#define DEBUG(args)
 
#define EPRINT(msg)
 
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
 
#define ABS(a)   (((a) < 0) ? -(a) : (a))
 
#define CLIP3(x, y, z)   (((z) < (x)) ? (x) : (((z) > (y)) ? (y) : (z)))
 
#define CLIP1(z)   (((z) < 0) ? 0 : (((z) > 255) ? 255 : (z)))
 
#define ALLOCATE(ptr, count, type)
 
#define FREE(ptr)
 
#define ALIGN(ptr, bytePos)    (ptr + ( ((bytePos - (uintptr_t)ptr) & (bytePos - 1)) / sizeof(*ptr) ))
 

Functions

u32 h264bsdCountLeadingZeros (u32 value, u32 length)
 
u32 h264bsdRbspTrailingBits (strmData_t *strmData)
 
u32 h264bsdMoreRbspData (strmData_t *strmData)
 
u32 h264bsdNextMbAddress (u32 *pSliceGroupMap, u32 picSizeInMbs, u32 currMbAddr)
 
void h264bsdSetCurrImageMbPointers (image_t *image, u32 mbNum)
 
i32 abs (i32 a)
 
i32 clip (i32 x, i32 y, i32 z)
 

Variables

const u32 h264bsdQpC [52]
 

Macro Definition Documentation

◆ ABS

#define ABS (   a)    (((a) < 0) ? -(a) : (a))

◆ ALIGN

#define ALIGN (   ptr,
  bytePos 
)     (ptr + ( ((bytePos - (uintptr_t)ptr) & (bytePos - 1)) / sizeof(*ptr) ))

◆ ALLOCATE

#define ALLOCATE (   ptr,
  count,
  type 
)
Value:
{ \
(ptr) = malloc((count) * sizeof(type)); \
}
#define malloc(s)
Definition quickjs.c:2290

◆ ASSERT

#define ASSERT (   expr)

◆ CLIP1

#define CLIP1 (   z)    (((z) < 0) ? 0 : (((z) > 255) ? 255 : (z)))

◆ CLIP3

#define CLIP3 (   x,
  y,
  z 
)    (((z) < (x)) ? (x) : (((z) > (y)) ? (y) : (z)))

◆ DEBUG

#define DEBUG (   args)

◆ EMPTY_RESIDUAL_INDICATOR

#define EMPTY_RESIDUAL_INDICATOR   0xFFFFFF

◆ END_OF_STREAM

#define END_OF_STREAM   0xFFFFFFFFU

◆ EPRINT

#define EPRINT (   msg)

◆ FREE

#define FREE (   ptr)
Value:
{ \
free((ptr)); (ptr) = NULL; \
}
#define NULL
Definition actypes.h:561

◆ HANTRO_FALSE

#define HANTRO_FALSE   (0)

◆ HANTRO_NOK

#define HANTRO_NOK   1

◆ HANTRO_OK

#define HANTRO_OK   0

◆ HANTRO_TRUE

#define HANTRO_TRUE   (1)

◆ IS_RESIDUAL_EMPTY

#define IS_RESIDUAL_EMPTY (   residual)    ((residual)[0] == EMPTY_RESIDUAL_INDICATOR)

◆ MARK_RESIDUAL_EMPTY

#define MARK_RESIDUAL_EMPTY (   residual)    ((residual)[0] = EMPTY_RESIDUAL_INDICATOR)

◆ MAX

#define MAX (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

◆ MEMORY_ALLOCATION_ERROR

#define MEMORY_ALLOCATION_ERROR   0xFFFF

◆ MIN

#define MIN (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

◆ PARAM_SET_ERROR

#define PARAM_SET_ERROR   0xFFF0

◆ RANGE_CHECK

#define RANGE_CHECK (   value,
  minBound,
  maxBound 
)

◆ RANGE_CHECK_ARRAY

#define RANGE_CHECK_ARRAY (   array,
  minBound,
  maxBound,
  length 
)

Function Documentation

◆ abs()

i32 abs ( i32  a)

◆ clip()

i32 clip ( i32  x,
i32  y,
i32  z 
)

◆ h264bsdCountLeadingZeros()

u32 h264bsdCountLeadingZeros ( u32  value,
u32  length 
)

◆ h264bsdMoreRbspData()

u32 h264bsdMoreRbspData ( strmData_t *  strmData)

◆ h264bsdNextMbAddress()

u32 h264bsdNextMbAddress ( u32 *  pSliceGroupMap,
u32  picSizeInMbs,
u32  currMbAddr 
)

◆ h264bsdRbspTrailingBits()

u32 h264bsdRbspTrailingBits ( strmData_t *  strmData)

◆ h264bsdSetCurrImageMbPointers()

void h264bsdSetCurrImageMbPointers ( image_t *  image,
u32  mbNum 
)

Variable Documentation

◆ h264bsdQpC

const u32 h264bsdQpC[52]
extern