#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 | MMABS(a, z) MMABS_SSSE3(a,z) |
| #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) |
| #define | DEF(x) x ## _ssse3 |
| #define | SET_RND(x) |
| #define | SCALE_OFFSET -1 |
| #define | PHADDD(a, t) |
| #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, uint8_t *src1, 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 | dsputilenc_init_mmx (DSPContext *c, AVCodecContext *avctx) |
| #define DCT_SAD DCT_SAD_MMX |
| #define DCT_SAD DCT_SAD_SSE2 |
| #define DCT_SAD4 | ( | m, | ||
| mm, | ||||
| o | ||||
| ) |
| #define DCT_SAD_FUNC | ( | cpu | ) |
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 ## _ssse3 |
Definition at line 1078 of file dsputilenc_mmx.c.
| #define DEF | ( | x | ) | x ## _mmx |
Definition at line 1078 of file dsputilenc_mmx.c.
| #define DEF | ( | x | ) | x ## _3dnow |
Definition at line 1078 of file dsputilenc_mmx.c.
| #define hadamard_func | ( | cpu | ) |
int ff_hadamard8_diff_##cpu (void *s, uint8_t *src1, uint8_t *src2, \ int stride, int h); \ int ff_hadamard8_diff16_##cpu(void *s, uint8_t *src1, uint8_t *src2, \ int stride, int h);
Definition at line 928 of file dsputilenc_mmx.c.
| #define HSUM_MMX | ( | a, | ||
| t, | ||||
| dst | ||||
| ) |
| #define HSUM_MMX2 | ( | a, | ||
| t, | ||||
| dst | ||||
| ) |
| #define HSUM_SSE2 | ( | a, | ||
| t, | ||||
| dst | ||||
| ) |
| #define MMABS | ( | a, | ||
| z | ||||
| ) | MMABS_MMX(a,z) |
| #define MMABS | ( | a, | ||
| z | ||||
| ) | MMABS_MMX2(a,z) |
| #define MMABS | ( | a, | ||
| z | ||||
| ) | MMABS_SSSE3(a,z) |
| #define MMABS_MMX | ( | a, | ||
| z | ||||
| ) |
"pxor " #z ", " #z " \n\t"\ "pcmpgtw " #a ", " #z " \n\t"\ "pxor " #z ", " #a " \n\t"\ "psubw " #z ", " #a " \n\t"
Definition at line 882 of file dsputilenc_mmx.c.
| #define MMABS_MMX2 | ( | a, | ||
| z | ||||
| ) |
"pxor " #z ", " #z " \n\t"\ "psubw " #a ", " #z " \n\t"\ "pmaxsw " #z ", " #a " \n\t"
Definition at line 888 of file dsputilenc_mmx.c.
| #define MMABS_SSSE3 | ( | a, | ||
| z | ||||
| ) | "pabsw " #a ", " #a " \n\t" |
Definition at line 893 of file dsputilenc_mmx.c.
| #define MMABS_SUM | ( | a, | ||
| z, | ||||
| sum | ||||
| ) |
MMABS(a,z)\ "paddusw " #a ", " #sum " \n\t"
Definition at line 896 of file dsputilenc_mmx.c.
| #define PHADDD | ( | a, | ||
| t | ||||
| ) |
Definition at line 1081 of file dsputilenc_mmx.c.
| #define PHADDD | ( | a, | ||
| t | ||||
| ) |
Definition at line 1081 of file dsputilenc_mmx.c.
Referenced by try_8x8basis().
| #define PMULHRW | ( | x, | ||
| y, | ||||
| s, | ||||
| o | ||||
| ) |
"pmulhrw " #s ", "#x " \n\t"\ "pmulhrw " #s ", "#y " \n\t"
Definition at line 1084 of file dsputilenc_mmx.c.
| #define PMULHRW | ( | x, | ||
| y, | ||||
| s, | ||||
| o | ||||
| ) |
"pmulhrsw " #s ", "#x " \n\t"\ "pmulhrsw " #s ", "#y " \n\t"
Definition at line 1084 of file dsputilenc_mmx.c.
| #define PMULHRW | ( | x, | ||
| y, | ||||
| s, | ||||
| o | ||||
| ) |
"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 1084 of file dsputilenc_mmx.c.
Referenced by add_8x8basis(), and try_8x8basis().
| #define SCALE_OFFSET 0 |
Definition at line 1080 of file dsputilenc_mmx.c.
| #define SCALE_OFFSET -1 |
Definition at line 1080 of file dsputilenc_mmx.c.
| #define SCALE_OFFSET 1 |
Definition at line 1080 of file dsputilenc_mmx.c.
Referenced by add_8x8basis(), and try_8x8basis().
| #define SET_RND | ( | x | ) |
Definition at line 1079 of file dsputilenc_mmx.c.
| #define SET_RND MOVQ_WONE |
Definition at line 1079 of file dsputilenc_mmx.c.
| #define SET_RND | ( | x | ) |
Definition at line 1079 of file dsputilenc_mmx.c.
| #define SUM | ( | in0, | ||
| in1, | ||||
| out0, | ||||
| out1 | ||||
| ) |
"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 | ||||
| ) |
"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().
| #define SUM | ( | in0, | ||
| in1, | ||||
| out0, | ||||
| out1 | ||||
| ) |
"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 | ||||
| ) |
"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"
| static void diff_bytes_mmx | ( | uint8_t * | dst, | |
| uint8_t * | src1, | |||
| uint8_t * | src2, | |||
| int | w | |||
| ) | [static] |
Definition at line 824 of file dsputilenc_mmx.c.
| static void diff_pixels_mmx | ( | DCTELEM * | block, | |
| const uint8_t * | s1, | |||
| const uint8_t * | s2, | |||
| int | stride | |||
| ) | [inline, static] |
Definition at line 95 of file dsputilenc_mmx.c.
| void dsputilenc_init_mmx | ( | DSPContext * | c, | |
| AVCodecContext * | avctx | |||
| ) |
Definition at line 1098 of file dsputilenc_mmx.c.
Referenced by dsputil_init_mmx().
| int ff_sse16_sse2 | ( | void * | v, | |
| uint8_t * | pix1, | |||
| uint8_t * | pix2, | |||
| int | line_size, | |||
| int | h | |||
| ) |
Referenced by dsputilenc_init_mmx().
| static void get_pixels_mmx | ( | DCTELEM * | block, | |
| const uint8_t * | pixels, | |||
| int | line_size | |||
| ) | [static] |
Definition at line 33 of file dsputilenc_mmx.c.
| static void get_pixels_sse2 | ( | DCTELEM * | block, | |
| const uint8_t * | pixels, | |||
| int | line_size | |||
| ) | [static] |
Definition at line 61 of file dsputilenc_mmx.c.
| hadamard_func | ( | mmx | ) |
Definition at line 934 of file dsputilenc_mmx.c.
| static int hf_noise16_mmx | ( | uint8_t * | pix1, | |
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 453 of file dsputilenc_mmx.c.
Referenced by nsse16_mmx().
| static int hf_noise8_mmx | ( | uint8_t * | pix1, | |
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 328 of file dsputilenc_mmx.c.
Referenced by hf_noise16_mmx(), and nsse8_mmx().
| static int nsse16_mmx | ( | void * | p, | |
| uint8_t * | pix1, | |||
| uint8_t * | pix2, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 567 of file dsputilenc_mmx.c.
| static int nsse8_mmx | ( | void * | p, | |
| uint8_t * | pix1, | |||
| uint8_t * | pix2, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 579 of file dsputilenc_mmx.c.
| static int pix_norm1_mmx | ( | uint8_t * | pix, | |
| int | line_size | |||
| ) | [static] |
Definition at line 162 of file dsputilenc_mmx.c.
| static int pix_sum16_mmx | ( | uint8_t * | pix, | |
| int | line_size | |||
| ) | [static] |
Definition at line 124 of file dsputilenc_mmx.c.
| static int sse16_mmx | ( | void * | v, | |
| uint8_t * | pix1, | |||
| uint8_t * | pix2, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 266 of file dsputilenc_mmx.c.
Referenced by dsputilenc_init_mmx(), and nsse16_mmx().
| static int sse8_mmx | ( | void * | v, | |
| uint8_t * | pix1, | |||
| uint8_t * | pix2, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 205 of file dsputilenc_mmx.c.
Referenced by nsse8_mmx().
| 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 | |||
| ) | [static] |
Definition at line 846 of file dsputilenc_mmx.c.
| static int vsad16_mmx | ( | void * | v, | |
| uint8_t * | pix1, | |||
| uint8_t * | pix2, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 689 of file dsputilenc_mmx.c.
| static int vsad16_mmx2 | ( | void * | v, | |
| uint8_t * | pix1, | |||
| uint8_t * | pix2, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 767 of file dsputilenc_mmx.c.
| static int vsad_intra16_mmx | ( | void * | v, | |
| uint8_t * | pix, | |||
| uint8_t * | dummy, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 588 of file dsputilenc_mmx.c.
| static int vsad_intra16_mmx2 | ( | void * | v, | |
| uint8_t * | pix, | |||
| uint8_t * | dummy, | |||
| int | line_size, | |||
| int | h | |||
| ) | [static] |
Definition at line 649 of file dsputilenc_mmx.c.