FFmpeg
Macros
mem_internal.h File Reference
#include "config.h"
#include <stdint.h>
#include "avassert.h"
#include "mem.h"
#include "version.h"

Go to the source code of this file.

Macros

#define E1(x)   x
 
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...)
 
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...)
 
#define LOCAL_ALIGNED(a, t, v, ...)   LOCAL_ALIGNED_##a(t, v, __VA_ARGS__)
 
#define LOCAL_ALIGNED_4(t, v, ...)   E1(LOCAL_ALIGNED_A(4, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_8(t, v, ...)   E1(LOCAL_ALIGNED_A(8, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_16(t, v, ...)   E1(LOCAL_ALIGNED_A(16, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_32(t, v, ...)   E1(LOCAL_ALIGNED_A(32, t, v, __VA_ARGS__,,))
 

Macro Definition Documentation

◆ E1

#define E1 (   x)    x

Definition at line 103 of file mem_internal.h.

◆ LOCAL_ALIGNED_A

#define LOCAL_ALIGNED_A (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)

Definition at line 105 of file mem_internal.h.

◆ LOCAL_ALIGNED_D

#define LOCAL_ALIGNED_D (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v

Definition at line 109 of file mem_internal.h.

◆ LOCAL_ALIGNED

#define LOCAL_ALIGNED (   a,
  t,
  v,
  ... 
)    LOCAL_ALIGNED_##a(t, v, __VA_ARGS__)

Definition at line 113 of file mem_internal.h.

◆ LOCAL_ALIGNED_4

#define LOCAL_ALIGNED_4 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(4, t, v, __VA_ARGS__,,))

Definition at line 118 of file mem_internal.h.

◆ LOCAL_ALIGNED_8

#define LOCAL_ALIGNED_8 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(8, t, v, __VA_ARGS__,,))

Definition at line 124 of file mem_internal.h.

◆ LOCAL_ALIGNED_16

#define LOCAL_ALIGNED_16 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(16, t, v, __VA_ARGS__,,))

Definition at line 130 of file mem_internal.h.

◆ LOCAL_ALIGNED_32

#define LOCAL_ALIGNED_32 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(32, t, v, __VA_ARGS__,,))

Definition at line 136 of file mem_internal.h.

s
#define s(width, name)
Definition: cbs_vp9.c:257
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition: mem.h:116
FFALIGN
#define FFALIGN(x, a)
Definition: macros.h:78