FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
Alignment Macros

Helper macros for declaring aligned variables. More...

Macros

#define DECLARE_ALIGNED(n, t, v)   t __attribute__ ((aligned (n))) v
 Declare a variable that is aligned in memory. More...
 
#define DECLARE_ASM_CONST(n, t, v)   static const t av_used __attribute__ ((aligned (n))) v
 Declare a static constant aligned variable appropriate for use in inline assembly code. More...
 

Detailed Description

Helper macros for declaring aligned variables.

Macro Definition Documentation

#define DECLARE_ALIGNED (   n,
  t,
 
)    t __attribute__ ((aligned (n))) v

Declare a variable that is aligned in memory.

DECLARE_ALIGNED(16, uint16_t, aligned_int) = 42;
DECLARE_ALIGNED(32, uint8_t, aligned_array)[128];
// The default-alignment equivalent would be
uint16_t aligned_int = 42;
uint8_t aligned_array[128];
Parameters
nMinimum alignment in bytes
tType of the variable (or array element)
vName of the variable

Definition at line 101 of file mem.h.

Referenced by deblock_v8_luma_intra_8_mmi(), dering_altivec(), dering_TMPL(), doVertDefFilter_altivec(), doVertDefFilter_TMPL(), doVertLowPass_altivec(), ff_atrac3p_generate_tones(), ff_deblock_h_luma_8_mmi(), ff_deblock_h_luma_intra_8_mmi(), ff_simple_idct_mmi(), ff_yuv2rgb_init_tables_ppc(), filter(), postProcess_TMPL(), pred_pskip_motion(), and vertClassify_altivec().

#define DECLARE_ASM_CONST (   n,
  t,
 
)    static const t av_used __attribute__ ((aligned (n))) v

Declare a static constant aligned variable appropriate for use in inline assembly code.

DECLARE_ASM_CONST(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
Parameters
nMinimum alignment in bytes
tType of the variable (or array element)
vName of the variable

Definition at line 102 of file mem.h.