FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
asm.h File Reference
#include <inttypes.h>
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct  unaligned_long
 

Macros

#define likely(x)   __builtin_expect((x) != 0, 1)
 
#define unlikely(x)   __builtin_expect((x) != 0, 0)
 
#define AMASK_BWX   (1 << 0)
 
#define AMASK_FIX   (1 << 1)
 
#define AMASK_CIX   (1 << 2)
 
#define AMASK_MVI   (1 << 8)
 
#define sextw(x)   ((int16_t) (x))
 
#define ldq(p)
 
#define ldl(p)
 
#define stq(l, p)
 
#define stl(l, p)
 
#define ldq_u(p)   (*(const uint64_t *) (((uint64_t) (p)) & ~7ul))
 
#define uldq(a)   (((const struct unaligned_long *) (a))->l)
 
#define prefetch(p)   __builtin_prefetch((p), 0, 1)
 
#define prefetch_en(p)   __builtin_prefetch((p), 0, 0)
 
#define prefetch_m(p)   __builtin_prefetch((p), 1, 1)
 
#define prefetch_men(p)   __builtin_prefetch((p), 1, 0)
 
#define cmpbge   __builtin_alpha_cmpbge
 
#define extql(a, b)   __builtin_alpha_extql(a, (uint64_t) (b))
 
#define extwl(a, b)   __builtin_alpha_extwl(a, (uint64_t) (b))
 
#define extqh(a, b)   __builtin_alpha_extqh(a, (uint64_t) (b))
 
#define zap   __builtin_alpha_zap
 
#define zapnot   __builtin_alpha_zapnot
 
#define amask   __builtin_alpha_amask
 
#define implver   __builtin_alpha_implver
 
#define rpcc   __builtin_alpha_rpcc
 
#define wh64(p)   __asm__ volatile("wh64 (%0)" : : "r"(p) : "memory")
 
#define minub8(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; minub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define minsb8(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; minsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define minuw4(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; minuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define minsw4(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; minsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define maxub8(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; maxub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define maxsb8(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; maxsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define maxuw4(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; maxuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define maxsw4(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; maxsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
 
#define perr(a, b)   ({ uint64_t __r; __asm__ (".arch ev6; perr %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; })
 
#define pklb(a)   ({ uint64_t __r; __asm__ (".arch ev6; pklb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
 
#define pkwb(a)   ({ uint64_t __r; __asm__ (".arch ev6; pkwb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
 
#define unpkbl(a)   ({ uint64_t __r; __asm__ (".arch ev6; unpkbl %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
 
#define unpkbw(a)   ({ uint64_t __r; __asm__ (".arch ev6; unpkbw %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
 

Functions

static uint64_t BYTE_VEC (uint64_t x)
 
static uint64_t WORD_VEC (uint64_t x)
 

Macro Definition Documentation

#define likely (   x)    __builtin_expect((x) != 0, 1)

Definition at line 30 of file asm.h.

#define unlikely (   x)    __builtin_expect((x) != 0, 0)

Definition at line 31 of file asm.h.

#define AMASK_BWX   (1 << 0)

Definition at line 37 of file asm.h.

#define AMASK_FIX   (1 << 1)

Definition at line 38 of file asm.h.

#define AMASK_CIX   (1 << 2)

Definition at line 39 of file asm.h.

#define AMASK_MVI   (1 << 8)

Definition at line 40 of file asm.h.

Referenced by ff_idctdsp_init_alpha(), ff_me_cmp_init_alpha(), and ff_pixblockdsp_init_alpha().

#define sextw (   x)    ((int16_t) (x))

Definition at line 56 of file asm.h.

Referenced by idct_row().

#define ldq (   p)
Value:
(((const union { \
uint64_t __l; \
__typeof__(*(p)) __s[sizeof (uint64_t) / sizeof *(p)]; \
} *) (p))->__l)

Definition at line 59 of file asm.h.

Referenced by dct_unquantize_h263_axp(), diff_pixels_mvi(), get_pixels_mvi(), idct_col2(), idct_row(), pix_abs16x16_x2_mvi(), pix_abs16x16_xy2_mvi(), pix_abs16x16_y2_mvi(), and pix_abs8x8_mvi().

#define ldl (   p)
Value:
(((const union { \
int32_t __l; \
__typeof__(*(p)) __s[sizeof (int32_t) / sizeof *(p)]; \
} *) (p))->__l)
int32_t

Definition at line 64 of file asm.h.

#define stq (   l,
 
)
Value:
do { \
(((union { \
uint64_t __l; \
__typeof__(*(p)) __s[sizeof (uint64_t) / sizeof *(p)]; \
} *) (p))->__l) = l; \
} while (0)

Definition at line 69 of file asm.h.

Referenced by dct_unquantize_h263_axp(), diff_pixels_mvi(), ff_simple_idct_axp(), get_pixels_mvi(), idct_col2(), and idct_row().

#define stl (   l,
 
)
Value:
do { \
(((union { \
int32_t __l; \
__typeof__(*(p)) __s[sizeof (int32_t) / sizeof *(p)]; \
} *) (p))->__l) = l; \
} while (0)
int32_t

Definition at line 76 of file asm.h.

Referenced by register_all(), stl_read_close(), stl_read_header(), stl_read_packet(), and stl_read_seek().

#define ldq_u (   p)    (*(const uint64_t *) (((uint64_t) (p)) & ~7ul))

Definition at line 84 of file asm.h.

Referenced by pix_abs16x16_x2_mvi(), and pix_abs16x16_y2_mvi().

#define uldq (   a)    (((const struct unaligned_long *) (a))->l)

Definition at line 85 of file asm.h.

Referenced by pix_abs16x16_xy2_mvi(), and pix_abs8x8_mvi().

#define prefetch (   p)    __builtin_prefetch((p), 0, 1)

Definition at line 88 of file asm.h.

#define prefetch_en (   p)    __builtin_prefetch((p), 0, 0)

Definition at line 89 of file asm.h.

#define prefetch_m (   p)    __builtin_prefetch((p), 1, 1)

Definition at line 90 of file asm.h.

#define prefetch_men (   p)    __builtin_prefetch((p), 1, 0)

Definition at line 91 of file asm.h.

#define cmpbge   __builtin_alpha_cmpbge

Definition at line 92 of file asm.h.

Referenced by dct_unquantize_h263_axp(), and diff_pixels_mvi().

#define extql (   a,
  b 
)    __builtin_alpha_extql(a, (uint64_t) (b))

Definition at line 94 of file asm.h.

Referenced by pix_abs16x16_x2_mvi(), and pix_abs16x16_y2_mvi().

#define extwl (   a,
  b 
)    __builtin_alpha_extwl(a, (uint64_t) (b))

Definition at line 95 of file asm.h.

Referenced by idct_row().

#define extqh (   a,
  b 
)    __builtin_alpha_extqh(a, (uint64_t) (b))

Definition at line 96 of file asm.h.

Referenced by pix_abs16x16_x2_mvi(), and pix_abs16x16_y2_mvi().

#define zap   __builtin_alpha_zap

Definition at line 97 of file asm.h.

Referenced by dct_unquantize_h263_axp(), and diff_pixels_mvi().

#define zapnot   __builtin_alpha_zapnot

Definition at line 98 of file asm.h.

#define amask   __builtin_alpha_amask

Definition at line 99 of file asm.h.

Referenced by ff_idctdsp_init_alpha(), ff_me_cmp_init_alpha(), and ff_pixblockdsp_init_alpha().

#define implver   __builtin_alpha_implver

Definition at line 100 of file asm.h.

#define rpcc   __builtin_alpha_rpcc

Definition at line 101 of file asm.h.

#define wh64 (   p)    __asm__ volatile("wh64 (%0)" : : "r"(p) : "memory")

Definition at line 117 of file asm.h.

#define minub8 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; minub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 134 of file asm.h.

#define minsb8 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; minsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 135 of file asm.h.

#define minuw4 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; minuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 136 of file asm.h.

#define minsw4 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; minsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 137 of file asm.h.

Referenced by dct_unquantize_h263_axp().

#define maxub8 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; maxub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 138 of file asm.h.

#define maxsb8 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; maxsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 139 of file asm.h.

#define maxuw4 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; maxuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 140 of file asm.h.

#define maxsw4 (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; maxsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })

Definition at line 141 of file asm.h.

Referenced by dct_unquantize_h263_axp().

#define perr (   a,
  b 
)    ({ uint64_t __r; __asm__ (".arch ev6; perr %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; })
#define pklb (   a)    ({ uint64_t __r; __asm__ (".arch ev6; pklb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })

Definition at line 143 of file asm.h.

#define pkwb (   a)    ({ uint64_t __r; __asm__ (".arch ev6; pkwb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })

Definition at line 144 of file asm.h.

#define unpkbl (   a)    ({ uint64_t __r; __asm__ (".arch ev6; unpkbl %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })

Definition at line 145 of file asm.h.

#define unpkbw (   a)    ({ uint64_t __r; __asm__ (".arch ev6; unpkbw %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })

Definition at line 146 of file asm.h.

Referenced by diff_pixels_mvi(), and get_pixels_mvi().

Function Documentation

static uint64_t BYTE_VEC ( uint64_t  x)
inlinestatic

Definition at line 42 of file asm.h.

Referenced by avg2(), avg2_no_rnd(), and avg4().

static uint64_t WORD_VEC ( uint64_t  x)
inlinestatic

Definition at line 49 of file asm.h.

Referenced by dct_unquantize_h263_axp().