#include "libavutil/cpu.h"
#include "libavutil/x86_cpu.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegvideo.h"
#include "libavcodec/mathops.h"
#include "dsputil_mmx.h"
#include "dsputil_mmx_qns_template.c"
Go to the source code of this file.
Defines | |
#define | SUM(in0, in1, out0, out1) |
#define | SUM(in0, in1, out0, out1) |
#define | SUM(in0, in1, out0, out1) |
#define | SUM(in0, in1, out0, out1) |
#define | MMABS_MMX(a, z) |
#define | MMABS_MMX2(a, z) |
#define | MMABS_SSSE3(a, z) "pabsw " #a ", " #a " \n\t" |
#define | MMABS_SUM(a, z, sum) |
#define | HSUM_MMX(a, t, dst) |
#define | HSUM_MMX2(a, t, dst) |
#define | HSUM_SSE2(a, t, dst) |
#define | hadamard_func(cpu) |
#define | DCT_SAD4(m, mm, o) |
#define | DCT_SAD_MMX |
#define | DCT_SAD_SSE2 |
#define | DCT_SAD_FUNC(cpu) |
#define | DCT_SAD DCT_SAD_MMX |
#define | HSUM(a, t, dst) HSUM_MMX(a,t,dst) |
#define | MMABS(a, z) MMABS_MMX(a,z) |
#define | HSUM(a, t, dst) HSUM_MMX2(a,t,dst) |
#define | MMABS(a, z) MMABS_MMX2(a,z) |
#define | DCT_SAD DCT_SAD_SSE2 |
#define | HSUM(a, t, dst) HSUM_SSE2(a,t,dst) |
#define | PHADDD(a, t) |
#define | PMULHRW(x, y, s, o) |
#define | DEF(x) x ## _mmx |
#define | SET_RND MOVQ_WONE |
#define | SCALE_OFFSET 1 |
#define | DEF(x) x ## _3dnow |
#define | SET_RND(x) |
#define | SCALE_OFFSET 0 |
#define | PMULHRW(x, y, s, o) |
Functions | |
static void | get_pixels_mmx (DCTELEM *block, const uint8_t *pixels, int line_size) |
static void | get_pixels_sse2 (DCTELEM *block, const uint8_t *pixels, int line_size) |
static void | diff_pixels_mmx (DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride) |
static int | pix_sum16_mmx (uint8_t *pix, int line_size) |
static int | pix_norm1_mmx (uint8_t *pix, int line_size) |
static int | sse8_mmx (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
static int | sse16_mmx (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
int | ff_sse16_sse2 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
static int | hf_noise8_mmx (uint8_t *pix1, int line_size, int h) |
static int | hf_noise16_mmx (uint8_t *pix1, int line_size, int h) |
static int | nsse16_mmx (void *p, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
static int | nsse8_mmx (void *p, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
static int | vsad_intra16_mmx (void *v, uint8_t *pix, uint8_t *dummy, int line_size, int h) |
static int | vsad_intra16_mmx2 (void *v, uint8_t *pix, uint8_t *dummy, int line_size, int h) |
static int | vsad16_mmx (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
static int | vsad16_mmx2 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) |
static void | diff_bytes_mmx (uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w) |
static void | sub_hfyu_median_prediction_mmx2 (uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w, int *left, int *left_top) |
hadamard_func (mmx) | |
void | ff_dsputilenc_init_mmx (DSPContext *c, AVCodecContext *avctx) |
#define DCT_SAD DCT_SAD_SSE2 |
#define DCT_SAD DCT_SAD_MMX |
#define DCT_SAD4 | ( | m, | |||
mm, | |||||
o | ) |
#define DCT_SAD_FUNC | ( | cpu | ) |
Value:
static int sum_abs_dctelem_##cpu(DCTELEM *block){\ int sum;\ __asm__ volatile(\ DCT_SAD\ :"=r"(sum)\ :"r"(block)\ );\ return sum&0xFFFF;\ }
Referenced by hadamard_func().
#define DCT_SAD_MMX |
#define DCT_SAD_SSE2 |
#define DEF | ( | x | ) | x ## _3dnow |
Definition at line 1063 of file dsputilenc_mmx.c.
#define DEF | ( | x | ) | x ## _mmx |
Definition at line 1063 of file dsputilenc_mmx.c.
#define hadamard_func | ( | cpu | ) |
#define MMABS | ( | a, | |||
z | ) | MMABS_MMX2(a,z) |
#define MMABS | ( | a, | |||
z | ) | MMABS_MMX(a,z) |
#define MMABS_MMX | ( | a, | |||
z | ) |
Value:
"pxor " #z ", " #z " \n\t"\ "pcmpgtw " #a ", " #z " \n\t"\ "pxor " #z ", " #a " \n\t"\ "psubw " #z ", " #a " \n\t"
Definition at line 883 of file dsputilenc_mmx.c.
#define MMABS_MMX2 | ( | a, | |||
z | ) |
Value:
"pxor " #z ", " #z " \n\t"\ "psubw " #a ", " #z " \n\t"\ "pmaxsw " #z ", " #a " \n\t"
Definition at line 889 of file dsputilenc_mmx.c.
#define MMABS_SSSE3 | ( | a, | |||
z | ) | "pabsw " #a ", " #a " \n\t" |
Definition at line 894 of file dsputilenc_mmx.c.
#define MMABS_SUM | ( | a, | |||
z, | |||||
sum | ) |
#define PHADDD | ( | a, | |||
t | ) |
#define PMULHRW | ( | x, | |||
y, | |||||
s, | |||||
o | ) |
Value:
"pmulhrw " #s ", "#x " \n\t"\ "pmulhrw " #s ", "#y " \n\t"
Definition at line 1066 of file dsputilenc_mmx.c.
#define PMULHRW | ( | x, | |||
y, | |||||
s, | |||||
o | ) |
Value:
"pmulhw " #s ", "#x " \n\t"\ "pmulhw " #s ", "#y " \n\t"\ "paddw " #o ", "#x " \n\t"\ "paddw " #o ", "#y " \n\t"\ "psraw $1, "#x " \n\t"\ "psraw $1, "#y " \n\t"
Definition at line 1066 of file dsputilenc_mmx.c.
Referenced by add_8x8basis_TMPL(), and try_8x8basis_TMPL().
#define SCALE_OFFSET 0 |
Definition at line 1065 of file dsputilenc_mmx.c.
#define SCALE_OFFSET 1 |
Definition at line 1065 of file dsputilenc_mmx.c.
Referenced by add_8x8basis_TMPL(), and try_8x8basis_TMPL().
#define SET_RND | ( | x | ) |
Definition at line 1064 of file dsputilenc_mmx.c.
#define SET_RND MOVQ_WONE |
Definition at line 1064 of file dsputilenc_mmx.c.
#define SUM | ( | in0, | |||
in1, | |||||
out0, | |||||
out1 | ) |
Value:
"movq (%0)," #out0 "\n"\ "movq (%1),%%mm2\n"\ "movq 8(%0)," #out1 "\n"\ "movq 8(%1),%%mm3\n"\ "add %3,%0\n"\ "add %3,%1\n"\ "psubb %%mm2, " #out0 "\n"\ "psubb %%mm3, " #out1 "\n"\ "pxor %%mm7, " #out0 "\n"\ "pxor %%mm7, " #out1 "\n"\ "psadbw " #out0 ", " #in0 "\n"\ "psadbw " #out1 ", " #in1 "\n"\ "paddw " #in1 ", " #in0 "\n"\ "paddw " #in0 ", %%mm6\n"
#define SUM | ( | in0, | |||
in1, | |||||
out0, | |||||
out1 | ) |
Value:
"movq (%0),%%mm2\n"\ "movq (%1)," #out0 "\n"\ "movq 8(%0),%%mm3\n"\ "movq 8(%1)," #out1 "\n"\ "add %3,%0\n"\ "add %3,%1\n"\ "psubb " #out0 ", %%mm2\n"\ "psubb " #out1 ", %%mm3\n"\ "pxor %%mm7, %%mm2\n"\ "pxor %%mm7, %%mm3\n"\ "movq %%mm2, " #out0 "\n"\ "movq %%mm3, " #out1 "\n"\ "psubusb " #in0 ", %%mm2\n"\ "psubusb " #in1 ", %%mm3\n"\ "psubusb " #out0 ", " #in0 "\n"\ "psubusb " #out1 ", " #in1 "\n"\ "por %%mm2, " #in0 "\n"\ "por %%mm3, " #in1 "\n"\ "movq " #in0 ", %%mm2\n"\ "movq " #in1 ", %%mm3\n"\ "punpcklbw %%mm7, " #in0 "\n"\ "punpcklbw %%mm7, " #in1 "\n"\ "punpckhbw %%mm7, %%mm2\n"\ "punpckhbw %%mm7, %%mm3\n"\ "paddw " #in1 ", " #in0 "\n"\ "paddw %%mm3, %%mm2\n"\ "paddw %%mm2, " #in0 "\n"\ "paddw " #in0 ", %%mm6\n"
#define SUM | ( | in0, | |||
in1, | |||||
out0, | |||||
out1 | ) |
Value:
"movq (%0), " #out0 "\n"\ "movq 8(%0), " #out1 "\n"\ "add %2,%0\n"\ "psadbw " #out0 ", " #in0 "\n"\ "psadbw " #out1 ", " #in1 "\n"\ "paddw " #in1 ", " #in0 "\n"\ "paddw " #in0 ", %%mm6\n"
#define SUM | ( | in0, | |||
in1, | |||||
out0, | |||||
out1 | ) |
Value:
"movq (%0), %%mm2\n"\ "movq 8(%0), %%mm3\n"\ "add %2,%0\n"\ "movq %%mm2, " #out0 "\n"\ "movq %%mm3, " #out1 "\n"\ "psubusb " #in0 ", %%mm2\n"\ "psubusb " #in1 ", %%mm3\n"\ "psubusb " #out0 ", " #in0 "\n"\ "psubusb " #out1 ", " #in1 "\n"\ "por %%mm2, " #in0 "\n"\ "por %%mm3, " #in1 "\n"\ "movq " #in0 ", %%mm2\n"\ "movq " #in1 ", %%mm3\n"\ "punpcklbw %%mm7, " #in0 "\n"\ "punpcklbw %%mm7, " #in1 "\n"\ "punpckhbw %%mm7, %%mm2\n"\ "punpckhbw %%mm7, %%mm3\n"\ "paddw " #in1 ", " #in0 "\n"\ "paddw %%mm3, %%mm2\n"\ "paddw %%mm2, " #in0 "\n"\ "paddw " #in0 ", %%mm6\n"
Referenced by vsad16_mmx(), vsad16_mmx2(), vsad_intra16_mmx(), and vsad_intra16_mmx2().
void ff_dsputilenc_init_mmx | ( | DSPContext * | c, | |
AVCodecContext * | avctx | |||
) |
Referenced by ff_dsputilenc_init_mmx().
hadamard_func | ( | mmx | ) |
Definition at line 935 of file dsputilenc_mmx.c.
static int hf_noise16_mmx | ( | uint8_t * | pix1, | |
int | line_size, | |||
int | h | |||
) | [static] |
static int hf_noise8_mmx | ( | uint8_t * | pix1, | |
int | line_size, | |||
int | h | |||
) | [static] |
static int pix_norm1_mmx | ( | uint8_t * | pix, | |
int | line_size | |||
) | [static] |
static int pix_sum16_mmx | ( | uint8_t * | pix, | |
int | line_size | |||
) | [static] |
Definition at line 266 of file dsputilenc_mmx.c.
Referenced by ff_dsputilenc_init_mmx(), and nsse16_mmx().
Definition at line 205 of file dsputilenc_mmx.c.
Referenced by ff_dsputilenc_init_mmx(), and nsse8_mmx().