xine-lib: xine-lib-1.2.13/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h File Reference

xine-lib 1.2.13-20230125hg15249

Macros
tomsmocompmacros.h File Reference
`#include <string.h>`
`#include <math.h>`
`#include <stdlib.h>`
`#include "mangle.h"`

Go to the source code of this file.

## Macros
#define | USE_FOR_DSCALER
#define | MyMemCopy xine_fast_memcpy
#define | V_PAVGB_MMX(mmr1, mmr2, mmrw, smask)
#define | V_PAVGB_SSE(mmr1, mmr2, mmrw, smask) "pavgb "mmr2", "mmr1"\n\t"
#define | V_PAVGB_3DNOW(mmr1, mmr2, mmrw, smask) "pavgusb "mmr2", "mmr1"\n\t"
#define | V_PAVGB(mmr1, mmr2, mmrw, smask) V_PAVGB2(mmr1, mmr2, mmrw, smask, SSE_TYPE)
#define | V_PAVGB2(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp)
#define | V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB_##ssetyp(mmr1, mmr2, mmrw, smask)
#define | V_PMAXUB_MMX(mmr1, mmr2)
#define | V_PMAXUB_SSE(mmr1, mmr2) "pmaxub "mmr2", "mmr1"\n\t"
#define | V_PMAXUB_3DNOW(mmr1, mmr2) V_PMAXUB_MMX(mmr1, mmr2)
#define | V_PMAXUB(mmr1, mmr2) V_PMAXUB2(mmr1, mmr2, SSE_TYPE)
#define | V_PMAXUB2(mmr1, mmr2, ssetyp) V_PMAXUB3(mmr1, mmr2, ssetyp)
#define | V_PMAXUB3(mmr1, mmr2, ssetyp) V_PMAXUB_##ssetyp(mmr1, mmr2)
#define | V_PMINUB_MMX(mmr1, mmr2, mmrw)
#define | V_PMINUB_SSE(mmr1, mmr2, mmrw) "pminub "mmr2", "mmr1"\n\t"
#define | V_PMINUB_3DNOW(mmr1, mmr2, mmrw) V_PMINUB_MMX(mmr1, mmr2, mmrw)
#define | V_PMINUB(mmr1, mmr2, mmrw) V_PMINUB2(mmr1, mmr2, mmrw, SSE_TYPE)
#define | V_PMINUB2(mmr1, mmr2, mmrw, ssetyp) V_PMINUB3(mmr1, mmr2, mmrw, ssetyp)
#define | V_PMINUB3(mmr1, mmr2, mmrw, ssetyp) V_PMINUB_##ssetyp(mmr1, mmr2, mmrw)
#define | V_MOVNTQ_MMX(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t"
#define | V_MOVNTQ_3DNOW(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t"
#define | V_MOVNTQ_SSE(mmr1, mmr2) "movntq "mmr2", "mmr1"\n\t"
#define | V_MOVNTQ(mmr1, mmr2) V_MOVNTQ2(mmr1, mmr2, SSE_TYPE)
#define | V_MOVNTQ2(mmr1, mmr2, ssetyp) V_MOVNTQ3(mmr1, mmr2, ssetyp)
#define | V_MOVNTQ3(mmr1, mmr2, ssetyp) V_MOVNTQ_##ssetyp(mmr1, mmr2)
#define | MERGE4PIXavg(PADDR1, PADDR2)
#define | MERGE4PIXavgH(PADDR1A, PADDR1B, PADDR2A, PADDR2B)
#define | RESET_CHROMA "por "_UVMask", %%mm7\n\t"

## Macro Definition Documentation

## ◆ MERGE4PIXavg

#define MERGE4PIXavg | ( |  | PADDR1,
|  |  | PADDR2 )

Value:
"movq "PADDR1", %%mm0\n\t" /* our 4 pixels */ \
"movq "PADDR2", %%mm1\n\t" /* our pixel2 value */ \
"movq %%mm0, %%mm2\n\t" /* another copy of our pixel1 value */ \
"movq %%mm1, %%mm3\n\t" /* another copy of our pixel1 value */ \
"psubusb %%mm1, %%mm2\n\t" \
"psubusb %%mm0, %%mm3\n\t" \
"por %%mm3, %%mm2\n\t" \
V_PAVGB ("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \
"movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \
"pxor %%mm1, %%mm1\n\t" \
"psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \
"pcmpeqb %%mm1, %%mm3\n\t" /* now ff where new better, else 00 */ \
"pcmpeqb %%mm3, %%mm1\n\t" /* here ff where old better, else 00 */ \
"pand %%mm3, %%mm0\n\t" /* keep only better new pixels */ \
"pand %%mm3, %%mm2\n\t" /* and weights */ \
"pand %%mm1, %%mm5\n\t" /* keep only better old pixels */ \
"pand %%mm1, %%mm7\n\t" \
"por %%mm0, %%mm5\n\t" /* and merge new & old vals */ \
"por %%mm2, %%mm7\n\t"

## ◆ MERGE4PIXavgH

#define MERGE4PIXavgH | ( |  | PADDR1A,
|  |  | PADDR1B,
|  |  | PADDR2A,
|  |  | PADDR2B )

Value:
"movq "PADDR1A", %%mm0\n\t" /* our 4 pixels */ \
"movq "PADDR2A", %%mm1\n\t" /* our pixel2 value */ \
"movq "PADDR1B", %%mm2\n\t" /* our 4 pixels */ \
"movq "PADDR2B", %%mm3\n\t" /* our pixel2 value */ \
V_PAVGB("%%mm0", "%%mm2", "%%mm2", _ShiftMask) \
V_PAVGB("%%mm1", "%%mm3", "%%mm3", _ShiftMask) \
"movq %%mm0, %%mm2\n\t" /* another copy of our pixel1 value */ \
"movq %%mm1, %%mm3\n\t" /* another copy of our pixel1 value */ \
"psubusb %%mm1, %%mm2\n\t" \
"psubusb %%mm0, %%mm3\n\t" \
"por %%mm3, %%mm2\n\t" \
V_PAVGB("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \
"movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \
"pxor %%mm1, %%mm1\n\t" \
"psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \
"pcmpeqb %%mm1, %%mm3\n\t" /* now ff where new better, else 00 */ \
"pcmpeqb %%mm3, %%mm1\n\t" /* here ff where old better, else 00 */ \
"pand %%mm3, %%mm0\n\t" /* keep only better new pixels */ \
"pand %%mm3, %%mm2\n\t" /* and weights */ \
"pand %%mm1, %%mm5\n\t" /* keep only better old pixels */ \
"pand %%mm1, %%mm7\n\t" \
"por %%mm0, %%mm5\n\t" /* and merge new & old vals */ \
"por %%mm2, %%mm7\n\t"

## ◆ MyMemCopy

#define MyMemCopy xine_fast_memcpy

## ◆ RESET_CHROMA

#define RESET_CHROMA "por "_UVMask", %%mm7\n\t"

## ◆ USE_FOR_DSCALER

#define USE_FOR_DSCALER

## ◆ V_MOVNTQ

#define V_MOVNTQ | ( |  | mmr1,
|  |  | mmr2 ) V_MOVNTQ2(mmr1, mmr2, SSE_TYPE)

## ◆ V_MOVNTQ2

#define V_MOVNTQ2 | ( |  | mmr1,
|  |  | mmr2,
|  |  | ssetyp ) V_MOVNTQ3(mmr1, mmr2, ssetyp)

## ◆ V_MOVNTQ3

#define V_MOVNTQ3 | ( |  | mmr1,
|  |  | mmr2,
|  |  | ssetyp ) V_MOVNTQ_##ssetyp(mmr1, mmr2)

## ◆ V_MOVNTQ_3DNOW

#define V_MOVNTQ_3DNOW | ( |  | mmr1,
|  |  | mmr2 ) "movq "mmr2", "mmr1"\n\t"

## ◆ V_MOVNTQ_MMX

#define V_MOVNTQ_MMX | ( |  | mmr1,
|  |  | mmr2 ) "movq "mmr2", "mmr1"\n\t"

## ◆ V_MOVNTQ_SSE

#define V_MOVNTQ_SSE | ( |  | mmr1,
|  |  | mmr2 ) "movntq "mmr2", "mmr1"\n\t"

## ◆ V_PAVGB

#define V_PAVGB | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | smask ) V_PAVGB2(mmr1, mmr2, mmrw, smask, SSE_TYPE)

## ◆ V_PAVGB2

#define V_PAVGB2 | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | smask,
|  |  | ssetyp ) V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp)

## ◆ V_PAVGB3

#define V_PAVGB3 | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | smask,
|  |  | ssetyp ) V_PAVGB_##ssetyp(mmr1, mmr2, mmrw, smask)

## ◆ V_PAVGB_3DNOW

#define V_PAVGB_3DNOW | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | smask ) "pavgusb "mmr2", "mmr1"\n\t"

## ◆ V_PAVGB_MMX

#define V_PAVGB_MMX | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | smask )

Value:
"movq "mmr2", "mmrw"\n\t" \
"pand "smask", "mmrw"\n\t" \
"psrlw $1, "mmrw"\n\t" \
"pand "smask", "mmr1"\n\t" \
"psrlw $1, "mmr1"\n\t" \
"paddusb "mmrw", "mmr1"\n\t"

## ◆ V_PAVGB_SSE

#define V_PAVGB_SSE | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | smask ) "pavgb "mmr2", "mmr1"\n\t"

## ◆ V_PMAXUB

#define V_PMAXUB | ( |  | mmr1,
|  |  | mmr2 ) V_PMAXUB2(mmr1, mmr2, SSE_TYPE)

## ◆ V_PMAXUB2

#define V_PMAXUB2 | ( |  | mmr1,
|  |  | mmr2,
|  |  | ssetyp ) V_PMAXUB3(mmr1, mmr2, ssetyp)

## ◆ V_PMAXUB3

#define V_PMAXUB3 | ( |  | mmr1,
|  |  | mmr2,
|  |  | ssetyp ) V_PMAXUB_##ssetyp(mmr1, mmr2)

## ◆ V_PMAXUB_3DNOW

#define V_PMAXUB_3DNOW | ( |  | mmr1,
|  |  | mmr2 ) V_PMAXUB_MMX(mmr1, mmr2)

## ◆ V_PMAXUB_MMX

#define V_PMAXUB_MMX | ( |  | mmr1,
|  |  | mmr2 )

Value:
"psubusb "mmr2", "mmr1"\n\t" \
"paddusb "mmr2", "mmr1"\n\t"

## ◆ V_PMAXUB_SSE

#define V_PMAXUB_SSE | ( |  | mmr1,
|  |  | mmr2 ) "pmaxub "mmr2", "mmr1"\n\t"

## ◆ V_PMINUB

#define V_PMINUB | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw ) V_PMINUB2(mmr1, mmr2, mmrw, SSE_TYPE)

## ◆ V_PMINUB2

#define V_PMINUB2 | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | ssetyp ) V_PMINUB3(mmr1, mmr2, mmrw, ssetyp)

## ◆ V_PMINUB3

#define V_PMINUB3 | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw,
|  |  | ssetyp ) V_PMINUB_##ssetyp(mmr1, mmr2, mmrw)

## ◆ V_PMINUB_3DNOW

#define V_PMINUB_3DNOW | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw ) V_PMINUB_MMX(mmr1, mmr2, mmrw)

## ◆ V_PMINUB_MMX

#define V_PMINUB_MMX | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw )

Value:
"pcmpeqb "mmrw", "mmrw"\n\t" \
"psubusb "mmr2", "mmrw"\n\t" \
"paddusb "mmrw", "mmr1"\n\t" \
"psubusb "mmrw", "mmr1"\n\t"

## ◆ V_PMINUB_SSE

#define V_PMINUB_SSE | ( |  | mmr1,
|  |  | mmr2,
|  |  | mmrw ) "pminub "mmr2", "mmr1"\n\t"