FFmpeg
Macros | Functions
swscale_template.c File Reference
#include <stdint.h>
#include "libavutil/x86/asm.h"
#include "libswscale/swscale_internal.h"

Go to the source code of this file.

Macros

#define REAL_MOVNTQ(a, b)   "movntq " #a ", " #b " \n\t"
 
#define MOVNTQ2   "movntq "
 
#define MOVNTQ(a, b)   REAL_MOVNTQ(a,b)
 
#define YSCALEYUV2PACKEDX_UV
 
#define YSCALEYUV2PACKEDX_YA(offset, coeff, src1, src2, dst1, dst2)
 
#define YSCALEYUV2PACKEDX
 
#define YSCALEYUV2PACKEDX_END
 
#define YSCALEYUV2PACKEDX_ACCURATE_UV
 
#define YSCALEYUV2PACKEDX_ACCURATE_YA(offset)
 
#define YSCALEYUV2PACKEDX_ACCURATE
 
#define YSCALEYUV2RGBX
 
#define REAL_WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t)
 
#define WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t)   REAL_WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t)
 
#define REAL_WRITERGB16(dst, dstw, index)
 
#define WRITERGB16(dst, dstw, index)   REAL_WRITERGB16(dst, dstw, index)
 
#define REAL_WRITERGB15(dst, dstw, index)
 
#define WRITERGB15(dst, dstw, index)   REAL_WRITERGB15(dst, dstw, index)
 
#define WRITEBGR24MMX(dst, dstw, index)
 
#define WRITEBGR24MMXEXT(dst, dstw, index)
 
#define WRITEBGR24(dst, dstw, index)   WRITEBGR24MMXEXT(dst, dstw, index)
 
#define REAL_WRITEYUY2(dst, dstw, index)
 
#define WRITEYUY2(dst, dstw, index)   REAL_WRITEYUY2(dst, dstw, index)
 
#define REAL_YSCALEYUV2RGB_UV(index, c)
 
#define REAL_YSCALEYUV2RGB_YA(index, c, b1, b2)
 
#define REAL_YSCALEYUV2RGB_COEFF(c)
 
#define YSCALEYUV2RGB_YA(index, c, b1, b2)   REAL_YSCALEYUV2RGB_YA(index, c, b1, b2)
 
#define YSCALEYUV2RGB(index, c)
 
#define REAL_YSCALEYUV2PACKED(index, c)
 
#define YSCALEYUV2PACKED(index, c)   REAL_YSCALEYUV2PACKED(index, c)
 
#define REAL_YSCALEYUV2RGB1(index, c)
 
#define YSCALEYUV2RGB1(index, c)   REAL_YSCALEYUV2RGB1(index, c)
 
#define REAL_YSCALEYUV2RGB1b(index, c)
 
#define YSCALEYUV2RGB1b(index, c)   REAL_YSCALEYUV2RGB1b(index, c)
 
#define REAL_YSCALEYUV2RGB1_ALPHA(index)
 
#define YSCALEYUV2RGB1_ALPHA(index)   REAL_YSCALEYUV2RGB1_ALPHA(index)
 
#define REAL_YSCALEYUV2PACKED1(index, c)
 
#define YSCALEYUV2PACKED1(index, c)   REAL_YSCALEYUV2PACKED1(index, c)
 
#define REAL_YSCALEYUV2PACKED1b(index, c)
 
#define YSCALEYUV2PACKED1b(index, c)   REAL_YSCALEYUV2PACKED1b(index, c)
 

Functions

static void yuv2rgb32_X_ar_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2rgb32_X_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2bgr32_X_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2rgb565_X_ar_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2rgb565_X_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2rgb555_X_ar_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2rgb555_X_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2yuyv422_X_ar_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2yuyv422_X_TMPL (SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)
 
static void yuv2rgb32_2_TMPL (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
 vertical bilinear scale YV12 to RGB More...
 
static void yuv2bgr24_2_TMPL (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
 
static void yuv2rgb555_2_TMPL (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
 
static void yuv2rgb565_2_TMPL (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
 
static void yuv2yuyv422_2_TMPL (SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
 
static void yuv2rgb32_1_TMPL (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y)
 YV12 to RGB without scaling or interpolating. More...
 
static void yuv2bgr24_1_TMPL (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y)
 
static void yuv2rgb555_1_TMPL (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y)
 
static void yuv2rgb565_1_TMPL (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y)
 
static void yuv2yuyv422_1_TMPL (SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y)
 
static av_cold void sws_init_swscale_TMPL (SwsContext *c)
 

Macro Definition Documentation

◆ REAL_MOVNTQ

#define REAL_MOVNTQ (   a,
  b 
)    "movntq " #a ", " #b " \n\t"

Definition at line 32 of file swscale_template.c.

◆ MOVNTQ2

#define MOVNTQ2   "movntq "

Definition at line 33 of file swscale_template.c.

◆ MOVNTQ

#define MOVNTQ (   a,
  b 
)    REAL_MOVNTQ(a,b)

Definition at line 34 of file swscale_template.c.

◆ YSCALEYUV2PACKEDX_UV

#define YSCALEYUV2PACKEDX_UV
Value:
__asm__ volatile(\
"xor %%"FF_REG_a", %%"FF_REG_a" \n\t"\
".p2align 4 \n\t"\
"nop \n\t"\
"1: \n\t"\
"lea "CHR_MMX_FILTER_OFFSET"(%0), %%"FF_REG_d" \n\t"\
"mov (%%"FF_REG_d"), %%"FF_REG_S" \n\t"\
"movq "VROUNDER_OFFSET"(%0), %%mm3 \n\t"\
"movq %%mm3, %%mm4 \n\t"\
".p2align 4 \n\t"\
"2: \n\t"\
"movq 8(%%"FF_REG_d"), %%mm0 \n\t" /* filterCoeff */\
"movq (%%"FF_REG_S", %%"FF_REG_a"), %%mm2 \n\t" /* UsrcData */\
"add %6, %%"FF_REG_S" \n\t" \
"movq (%%"FF_REG_S", %%"FF_REG_a"), %%mm5 \n\t" /* VsrcData */\
"add $16, %%"FF_REG_d" \n\t"\
"mov (%%"FF_REG_d"), %%"FF_REG_S" \n\t"\
"pmulhw %%mm0, %%mm2 \n\t"\
"pmulhw %%mm0, %%mm5 \n\t"\
"paddw %%mm2, %%mm3 \n\t"\
"paddw %%mm5, %%mm4 \n\t"\
"test %%"FF_REG_S", %%"FF_REG_S" \n\t"\
" jnz 2b \n\t"\

Definition at line 36 of file swscale_template.c.

◆ YSCALEYUV2PACKEDX_YA

#define YSCALEYUV2PACKEDX_YA (   offset,
  coeff,
  src1,
  src2,
  dst1,
  dst2 
)
Value:
"lea "offset"(%0), %%"FF_REG_d" \n\t"\
"mov (%%"FF_REG_d"), %%"FF_REG_S" \n\t"\
"movq "VROUNDER_OFFSET"(%0), "#dst1" \n\t"\
"movq "#dst1", "#dst2" \n\t"\
".p2align 4 \n\t"\
"2: \n\t"\
"movq 8(%%"FF_REG_d"), "#coeff" \n\t" /* filterCoeff */\
"movq (%%"FF_REG_S", %%"FF_REG_a", 2), "#src1" \n\t" /* Y1srcData */\
"movq 8(%%"FF_REG_S", %%"FF_REG_a", 2), "#src2" \n\t" /* Y2srcData */\
"add $16, %%"FF_REG_d" \n\t"\
"mov (%%"FF_REG_d"), %%"FF_REG_S" \n\t"\
"pmulhw "#coeff", "#src1" \n\t"\
"pmulhw "#coeff", "#src2" \n\t"\
"paddw "#src1", "#dst1" \n\t"\
"paddw "#src2", "#dst2" \n\t"\
"test %%"FF_REG_S", %%"FF_REG_S" \n\t"\
" jnz 2b \n\t"\

Definition at line 61 of file swscale_template.c.

◆ YSCALEYUV2PACKEDX

#define YSCALEYUV2PACKEDX
Value:

Definition at line 80 of file swscale_template.c.

◆ YSCALEYUV2PACKEDX_END

#define YSCALEYUV2PACKEDX_END
Value:
:: "r" (&c->redDither), \
"m" (dummy), "m" (dummy), "m" (dummy),\
"r" (dest), "m" (dstW_reg), "m"(uv_off) \
: "%"FF_REG_a, "%"FF_REG_d, "%"FF_REG_S \
);

Definition at line 84 of file swscale_template.c.

◆ YSCALEYUV2PACKEDX_ACCURATE_UV

#define YSCALEYUV2PACKEDX_ACCURATE_UV

Definition at line 92 of file swscale_template.c.

◆ YSCALEYUV2PACKEDX_ACCURATE_YA

#define YSCALEYUV2PACKEDX_ACCURATE_YA (   offset)

Definition at line 144 of file swscale_template.c.

◆ YSCALEYUV2PACKEDX_ACCURATE

#define YSCALEYUV2PACKEDX_ACCURATE

◆ YSCALEYUV2RGBX

#define YSCALEYUV2RGBX

Definition at line 193 of file swscale_template.c.

◆ REAL_WRITEBGR32

#define REAL_WRITEBGR32 (   dst,
  dstw,
  index,
  b,
  g,
  r,
  a,
  q0,
  q2,
  q3,
 
)
Value:
"movq "#b", "#q2" \n\t" /* B */\
"movq "#r", "#t" \n\t" /* R */\
"punpcklbw "#g", "#b" \n\t" /* GBGBGBGB 0 */\
"punpcklbw "#a", "#r" \n\t" /* ARARARAR 0 */\
"punpckhbw "#g", "#q2" \n\t" /* GBGBGBGB 2 */\
"punpckhbw "#a", "#t" \n\t" /* ARARARAR 2 */\
"movq "#b", "#q0" \n\t" /* GBGBGBGB 0 */\
"movq "#q2", "#q3" \n\t" /* GBGBGBGB 2 */\
"punpcklwd "#r", "#q0" \n\t" /* ARGBARGB 0 */\
"punpckhwd "#r", "#b" \n\t" /* ARGBARGB 1 */\
"punpcklwd "#t", "#q2" \n\t" /* ARGBARGB 2 */\
"punpckhwd "#t", "#q3" \n\t" /* ARGBARGB 3 */\
MOVNTQ( q0, (dst, index, 4))\
MOVNTQ( b, 8(dst, index, 4))\
MOVNTQ( q2, 16(dst, index, 4))\
MOVNTQ( q3, 24(dst, index, 4))\
\
"add $8, "#index" \n\t"\
"cmp "dstw", "#index" \n\t"\
" jb 1b \n\t"

Definition at line 229 of file swscale_template.c.

◆ WRITEBGR32

#define WRITEBGR32 (   dst,
  dstw,
  index,
  b,
  g,
  r,
  a,
  q0,
  q2,
  q3,
 
)    REAL_WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t)

Definition at line 251 of file swscale_template.c.

◆ REAL_WRITERGB16

#define REAL_WRITERGB16 (   dst,
  dstw,
  index 
)
Value:
"pand "MANGLE(bF8)", %%mm2 \n\t" /* B */\
"pand "MANGLE(bFC)", %%mm4 \n\t" /* G */\
"pand "MANGLE(bF8)", %%mm5 \n\t" /* R */\
"psrlq $3, %%mm2 \n\t"\
\
"movq %%mm2, %%mm1 \n\t"\
"movq %%mm4, %%mm3 \n\t"\
\
"punpcklbw %%mm7, %%mm3 \n\t"\
"punpcklbw %%mm5, %%mm2 \n\t"\
"punpckhbw %%mm7, %%mm4 \n\t"\
"punpckhbw %%mm5, %%mm1 \n\t"\
\
"psllq $3, %%mm3 \n\t"\
"psllq $3, %%mm4 \n\t"\
\
"por %%mm3, %%mm2 \n\t"\
"por %%mm4, %%mm1 \n\t"\
MOVNTQ(%%mm2, (dst, index, 2))\
MOVNTQ(%%mm1, 8(dst, index, 2))\
\
"add $8, "#index" \n\t"\
"cmp "dstw", "#index" \n\t"\
" jb 1b \n\t"

Definition at line 344 of file swscale_template.c.

◆ WRITERGB16

#define WRITERGB16 (   dst,
  dstw,
  index 
)    REAL_WRITERGB16(dst, dstw, index)

Definition at line 370 of file swscale_template.c.

◆ REAL_WRITERGB15

#define REAL_WRITERGB15 (   dst,
  dstw,
  index 
)
Value:
"pand "MANGLE(bF8)", %%mm2 \n\t" /* B */\
"pand "MANGLE(bF8)", %%mm4 \n\t" /* G */\
"pand "MANGLE(bF8)", %%mm5 \n\t" /* R */\
"psrlq $3, %%mm2 \n\t"\
"psrlq $1, %%mm5 \n\t"\
\
"movq %%mm2, %%mm1 \n\t"\
"movq %%mm4, %%mm3 \n\t"\
\
"punpcklbw %%mm7, %%mm3 \n\t"\
"punpcklbw %%mm5, %%mm2 \n\t"\
"punpckhbw %%mm7, %%mm4 \n\t"\
"punpckhbw %%mm5, %%mm1 \n\t"\
\
"psllq $2, %%mm3 \n\t"\
"psllq $2, %%mm4 \n\t"\
\
"por %%mm3, %%mm2 \n\t"\
"por %%mm4, %%mm1 \n\t"\
MOVNTQ(%%mm2, (dst, index, 2))\
MOVNTQ(%%mm1, 8(dst, index, 2))\
\
"add $8, "#index" \n\t"\
"cmp "dstw", "#index" \n\t"\
" jb 1b \n\t"

Definition at line 420 of file swscale_template.c.

◆ WRITERGB15

#define WRITERGB15 (   dst,
  dstw,
  index 
)    REAL_WRITERGB15(dst, dstw, index)

Definition at line 447 of file swscale_template.c.

◆ WRITEBGR24MMX

#define WRITEBGR24MMX (   dst,
  dstw,
  index 
)

Definition at line 497 of file swscale_template.c.

◆ WRITEBGR24MMXEXT

#define WRITEBGR24MMXEXT (   dst,
  dstw,
  index 
)

Definition at line 550 of file swscale_template.c.

◆ WRITEBGR24

#define WRITEBGR24 (   dst,
  dstw,
  index 
)    WRITEBGR24MMXEXT(dst, dstw, index)

Definition at line 599 of file swscale_template.c.

◆ REAL_WRITEYUY2

#define REAL_WRITEYUY2 (   dst,
  dstw,
  index 
)
Value:
"packuswb %%mm3, %%mm3 \n\t"\
"packuswb %%mm4, %%mm4 \n\t"\
"packuswb %%mm7, %%mm1 \n\t"\
"punpcklbw %%mm4, %%mm3 \n\t"\
"movq %%mm1, %%mm7 \n\t"\
"punpcklbw %%mm3, %%mm1 \n\t"\
"punpckhbw %%mm3, %%mm7 \n\t"\
MOVNTQ(%%mm1, (dst, index, 2))\
MOVNTQ(%%mm7, 8(dst, index, 2))\
\
"add $8, "#index" \n\t"\
"cmp "dstw", "#index" \n\t"\
" jb 1b \n\t"

Definition at line 653 of file swscale_template.c.

◆ WRITEYUY2

#define WRITEYUY2 (   dst,
  dstw,
  index 
)    REAL_WRITEYUY2(dst, dstw, index)

Definition at line 668 of file swscale_template.c.

◆ REAL_YSCALEYUV2RGB_UV

#define REAL_YSCALEYUV2RGB_UV (   index,
  c 
)
Value:
"xor "#index", "#index" \n\t"\
".p2align 4 \n\t"\
"1: \n\t"\
"movq (%2, "#index"), %%mm2 \n\t" /* uvbuf0[eax]*/\
"movq (%3, "#index"), %%mm3 \n\t" /* uvbuf1[eax]*/\
"add "UV_OFF_BYTE"("#c"), "#index" \n\t" \
"movq (%2, "#index"), %%mm5 \n\t" /* uvbuf0[eax+2048]*/\
"movq (%3, "#index"), %%mm4 \n\t" /* uvbuf1[eax+2048]*/\
"sub "UV_OFF_BYTE"("#c"), "#index" \n\t" \
"psubw %%mm3, %%mm2 \n\t" /* uvbuf0[eax] - uvbuf1[eax]*/\
"psubw %%mm4, %%mm5 \n\t" /* uvbuf0[eax+2048] - uvbuf1[eax+2048]*/\
"movq "CHR_MMX_FILTER_OFFSET"+8("#c"), %%mm0 \n\t"\
"pmulhw %%mm0, %%mm2 \n\t" /* (uvbuf0[eax] - uvbuf1[eax])uvalpha1>>16*/\
"pmulhw %%mm0, %%mm5 \n\t" /* (uvbuf0[eax+2048] - uvbuf1[eax+2048])uvalpha1>>16*/\
"psraw $4, %%mm3 \n\t" /* uvbuf0[eax] - uvbuf1[eax] >>4*/\
"psraw $4, %%mm4 \n\t" /* uvbuf0[eax+2048] - uvbuf1[eax+2048] >>4*/\
"paddw %%mm2, %%mm3 \n\t" /* uvbuf0[eax]uvalpha1 - uvbuf1[eax](1-uvalpha1)*/\
"paddw %%mm5, %%mm4 \n\t" /* uvbuf0[eax+2048]uvalpha1 - uvbuf1[eax+2048](1-uvalpha1)*/\
"psubw "U_OFFSET"("#c"), %%mm3 \n\t" /* (U-128)8*/\
"psubw "V_OFFSET"("#c"), %%mm4 \n\t" /* (V-128)8*/\
"movq %%mm3, %%mm2 \n\t" /* (U-128)8*/\
"movq %%mm4, %%mm5 \n\t" /* (V-128)8*/\
"pmulhw "UG_COEFF"("#c"), %%mm3 \n\t"\
"pmulhw "VG_COEFF"("#c"), %%mm4 \n\t"\
/* mm2=(U-128)8, mm3=ug, mm4=vg mm5=(V-128)8 */\

Definition at line 712 of file swscale_template.c.

◆ REAL_YSCALEYUV2RGB_YA

#define REAL_YSCALEYUV2RGB_YA (   index,
  c,
  b1,
  b2 
)
Value:
"movq ("#b1", "#index", 2), %%mm0 \n\t" /*buf0[eax]*/\
"movq ("#b2", "#index", 2), %%mm1 \n\t" /*buf1[eax]*/\
"movq 8("#b1", "#index", 2), %%mm6 \n\t" /*buf0[eax]*/\
"movq 8("#b2", "#index", 2), %%mm7 \n\t" /*buf1[eax]*/\
"psubw %%mm1, %%mm0 \n\t" /* buf0[eax] - buf1[eax]*/\
"psubw %%mm7, %%mm6 \n\t" /* buf0[eax] - buf1[eax]*/\
"pmulhw "LUM_MMX_FILTER_OFFSET"+8("#c"), %%mm0 \n\t" /* (buf0[eax] - buf1[eax])yalpha1>>16*/\
"pmulhw "LUM_MMX_FILTER_OFFSET"+8("#c"), %%mm6 \n\t" /* (buf0[eax] - buf1[eax])yalpha1>>16*/\
"psraw $4, %%mm1 \n\t" /* buf0[eax] - buf1[eax] >>4*/\
"psraw $4, %%mm7 \n\t" /* buf0[eax] - buf1[eax] >>4*/\
"paddw %%mm0, %%mm1 \n\t" /* buf0[eax]yalpha1 + buf1[eax](1-yalpha1) >>16*/\
"paddw %%mm6, %%mm7 \n\t" /* buf0[eax]yalpha1 + buf1[eax](1-yalpha1) >>16*/\

Definition at line 739 of file swscale_template.c.

◆ REAL_YSCALEYUV2RGB_COEFF

#define REAL_YSCALEYUV2RGB_COEFF (   c)
Value:
"pmulhw "UB_COEFF"("#c"), %%mm2 \n\t"\
"pmulhw "VR_COEFF"("#c"), %%mm5 \n\t"\
"psubw "Y_OFFSET"("#c"), %%mm1 \n\t" /* 8(Y-16)*/\
"psubw "Y_OFFSET"("#c"), %%mm7 \n\t" /* 8(Y-16)*/\
"pmulhw "Y_COEFF"("#c"), %%mm1 \n\t"\
"pmulhw "Y_COEFF"("#c"), %%mm7 \n\t"\
/* mm1= Y1, mm2=ub, mm3=ug, mm4=vg mm5=vr, mm7=Y2 */\
"paddw %%mm3, %%mm4 \n\t"\
"movq %%mm2, %%mm0 \n\t"\
"movq %%mm5, %%mm6 \n\t"\
"movq %%mm4, %%mm3 \n\t"\
"punpcklwd %%mm2, %%mm2 \n\t"\
"punpcklwd %%mm5, %%mm5 \n\t"\
"punpcklwd %%mm4, %%mm4 \n\t"\
"paddw %%mm1, %%mm2 \n\t"\
"paddw %%mm1, %%mm5 \n\t"\
"paddw %%mm1, %%mm4 \n\t"\
"punpckhwd %%mm0, %%mm0 \n\t"\
"punpckhwd %%mm6, %%mm6 \n\t"\
"punpckhwd %%mm3, %%mm3 \n\t"\
"paddw %%mm7, %%mm0 \n\t"\
"paddw %%mm7, %%mm6 \n\t"\
"paddw %%mm7, %%mm3 \n\t"\
/* mm0=B1, mm2=B2, mm3=G2, mm4=G1, mm5=R1, mm6=R2 */\
"packuswb %%mm0, %%mm2 \n\t"\
"packuswb %%mm6, %%mm5 \n\t"\
"packuswb %%mm3, %%mm4 \n\t"\

Definition at line 753 of file swscale_template.c.

◆ YSCALEYUV2RGB_YA

#define YSCALEYUV2RGB_YA (   index,
  c,
  b1,
  b2 
)    REAL_YSCALEYUV2RGB_YA(index, c, b1, b2)

Definition at line 782 of file swscale_template.c.

◆ YSCALEYUV2RGB

#define YSCALEYUV2RGB (   index,
  c 
)
Value:
REAL_YSCALEYUV2RGB_YA(index, c, %0, %1) \
REAL_YSCALEYUV2RGB_COEFF(c)

Definition at line 784 of file swscale_template.c.

◆ REAL_YSCALEYUV2PACKED

#define REAL_YSCALEYUV2PACKED (   index,
  c 
)

Definition at line 937 of file swscale_template.c.

◆ YSCALEYUV2PACKED

#define YSCALEYUV2PACKED (   index,
  c 
)    REAL_YSCALEYUV2PACKED(index, c)

Definition at line 975 of file swscale_template.c.

◆ REAL_YSCALEYUV2RGB1

#define REAL_YSCALEYUV2RGB1 (   index,
  c 
)

Definition at line 998 of file swscale_template.c.

◆ YSCALEYUV2RGB1

#define YSCALEYUV2RGB1 (   index,
  c 
)    REAL_YSCALEYUV2RGB1(index, c)

Definition at line 1047 of file swscale_template.c.

◆ REAL_YSCALEYUV2RGB1b

#define REAL_YSCALEYUV2RGB1b (   index,
  c 
)

Definition at line 1050 of file swscale_template.c.

◆ YSCALEYUV2RGB1b

#define YSCALEYUV2RGB1b (   index,
  c 
)    REAL_YSCALEYUV2RGB1b(index, c)

Definition at line 1103 of file swscale_template.c.

◆ REAL_YSCALEYUV2RGB1_ALPHA

#define REAL_YSCALEYUV2RGB1_ALPHA (   index)
Value:
"movq (%1, "#index", 2), %%mm7 \n\t" /* abuf0[index ] */\
"movq 8(%1, "#index", 2), %%mm1 \n\t" /* abuf0[index+4] */\
"psraw $7, %%mm7 \n\t" /* abuf0[index ] >>7 */\
"psraw $7, %%mm1 \n\t" /* abuf0[index+4] >>7 */\
"packuswb %%mm1, %%mm7 \n\t"

Definition at line 1105 of file swscale_template.c.

◆ YSCALEYUV2RGB1_ALPHA

#define YSCALEYUV2RGB1_ALPHA (   index)    REAL_YSCALEYUV2RGB1_ALPHA(index)

Definition at line 1111 of file swscale_template.c.

◆ REAL_YSCALEYUV2PACKED1

#define REAL_YSCALEYUV2PACKED1 (   index,
  c 
)
Value:
"xor "#index", "#index" \n\t"\
".p2align 4 \n\t"\
"1: \n\t"\
"movq (%2, "#index"), %%mm3 \n\t" /* uvbuf0[eax]*/\
"add "UV_OFF_BYTE"("#c"), "#index" \n\t" \
"movq (%2, "#index"), %%mm4 \n\t" /* uvbuf0[eax+2048]*/\
"sub "UV_OFF_BYTE"("#c"), "#index" \n\t" \
"psraw $7, %%mm3 \n\t" \
"psraw $7, %%mm4 \n\t" \
"movq (%0, "#index", 2), %%mm1 \n\t" /*buf0[eax]*/\
"movq 8(%0, "#index", 2), %%mm7 \n\t" /*buf0[eax]*/\
"psraw $7, %%mm1 \n\t" \
"psraw $7, %%mm7 \n\t" \

Definition at line 1332 of file swscale_template.c.

◆ YSCALEYUV2PACKED1

#define YSCALEYUV2PACKED1 (   index,
  c 
)    REAL_YSCALEYUV2PACKED1(index, c)

Definition at line 1347 of file swscale_template.c.

◆ REAL_YSCALEYUV2PACKED1b

#define REAL_YSCALEYUV2PACKED1b (   index,
  c 
)
Value:
"xor "#index", "#index" \n\t"\
".p2align 4 \n\t"\
"1: \n\t"\
"movq (%2, "#index"), %%mm2 \n\t" /* uvbuf0[eax]*/\
"movq (%3, "#index"), %%mm3 \n\t" /* uvbuf1[eax]*/\
"add "UV_OFF_BYTE"("#c"), "#index" \n\t" \
"movq (%2, "#index"), %%mm5 \n\t" /* uvbuf0[eax+2048]*/\
"movq (%3, "#index"), %%mm4 \n\t" /* uvbuf1[eax+2048]*/\
"sub "UV_OFF_BYTE"("#c"), "#index" \n\t" \
"paddw %%mm2, %%mm3 \n\t" /* uvbuf0[eax] + uvbuf1[eax]*/\
"paddw %%mm5, %%mm4 \n\t" /* uvbuf0[eax+2048] + uvbuf1[eax+2048]*/\
"psrlw $8, %%mm3 \n\t" \
"psrlw $8, %%mm4 \n\t" \
"movq (%0, "#index", 2), %%mm1 \n\t" /*buf0[eax]*/\
"movq 8(%0, "#index", 2), %%mm7 \n\t" /*buf0[eax]*/\
"psraw $7, %%mm1 \n\t" \
"psraw $7, %%mm7 \n\t"

Definition at line 1349 of file swscale_template.c.

◆ YSCALEYUV2PACKED1b

#define YSCALEYUV2PACKED1b (   index,
  c 
)    REAL_YSCALEYUV2PACKED1b(index, c)

Definition at line 1367 of file swscale_template.c.

Function Documentation

◆ yuv2rgb32_X_ar_TMPL()

static void yuv2rgb32_X_ar_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 253 of file swscale_template.c.

◆ yuv2rgb32_X_TMPL()

static void yuv2rgb32_X_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 286 of file swscale_template.c.

◆ yuv2bgr32_X_TMPL()

static void yuv2bgr32_X_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 315 of file swscale_template.c.

◆ yuv2rgb565_X_ar_TMPL()

static void yuv2rgb565_X_ar_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 372 of file swscale_template.c.

◆ yuv2rgb565_X_TMPL()

static void yuv2rgb565_X_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 396 of file swscale_template.c.

◆ yuv2rgb555_X_ar_TMPL()

static void yuv2rgb555_X_ar_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 449 of file swscale_template.c.

◆ yuv2rgb555_X_TMPL()

static void yuv2rgb555_X_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 473 of file swscale_template.c.

◆ yuv2yuyv422_X_ar_TMPL()

static void yuv2yuyv422_X_ar_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 670 of file swscale_template.c.

◆ yuv2yuyv422_X_TMPL()

static void yuv2yuyv422_X_TMPL ( SwsContext c,
const int16_t *  lumFilter,
const int16_t **  lumSrc,
int  lumFilterSize,
const int16_t *  chrFilter,
const int16_t **  chrUSrc,
const int16_t **  chrVSrc,
int  chrFilterSize,
const int16_t **  alpSrc,
uint8_t *  dest,
int  dstW,
int  dstY 
)
static

Definition at line 691 of file swscale_template.c.

◆ yuv2rgb32_2_TMPL()

static void yuv2rgb32_2_TMPL ( SwsContext c,
const int16_t *  buf[2],
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf[2],
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y 
)
static

vertical bilinear scale YV12 to RGB

Definition at line 792 of file swscale_template.c.

◆ yuv2bgr24_2_TMPL()

static void yuv2bgr24_2_TMPL ( SwsContext c,
const int16_t *  buf[2],
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf[2],
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y 
)
static

Definition at line 856 of file swscale_template.c.

◆ yuv2rgb555_2_TMPL()

static void yuv2rgb555_2_TMPL ( SwsContext c,
const int16_t *  buf[2],
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf[2],
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y 
)
static

Definition at line 879 of file swscale_template.c.

◆ yuv2rgb565_2_TMPL()

static void yuv2rgb565_2_TMPL ( SwsContext c,
const int16_t *  buf[2],
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf[2],
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y 
)
static

Definition at line 908 of file swscale_template.c.

◆ yuv2yuyv422_2_TMPL()

static void yuv2yuyv422_2_TMPL ( SwsContext c,
const int16_t *  buf[2],
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf[2],
uint8_t *  dest,
int  dstW,
int  yalpha,
int  uvalpha,
int  y 
)
static

Definition at line 977 of file swscale_template.c.

◆ yuv2rgb32_1_TMPL()

static void yuv2rgb32_1_TMPL ( SwsContext c,
const int16_t *  buf0,
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
int  y 
)
static

YV12 to RGB without scaling or interpolating.

Definition at line 1116 of file swscale_template.c.

◆ yuv2bgr24_1_TMPL()

static void yuv2bgr24_1_TMPL ( SwsContext c,
const int16_t *  buf0,
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
int  y 
)
static

Definition at line 1185 of file swscale_template.c.

◆ yuv2rgb555_1_TMPL()

static void yuv2rgb555_1_TMPL ( SwsContext c,
const int16_t *  buf0,
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
int  y 
)
static

Definition at line 1226 of file swscale_template.c.

◆ yuv2rgb565_1_TMPL()

static void yuv2rgb565_1_TMPL ( SwsContext c,
const int16_t *  buf0,
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
int  y 
)
static

Definition at line 1279 of file swscale_template.c.

◆ yuv2yuyv422_1_TMPL()

static void yuv2yuyv422_1_TMPL ( SwsContext c,
const int16_t *  buf0,
const int16_t *  ubuf[2],
const int16_t *  vbuf[2],
const int16_t *  abuf0,
uint8_t *  dest,
int  dstW,
int  uvalpha,
int  y 
)
static

Definition at line 1369 of file swscale_template.c.

◆ sws_init_swscale_TMPL()

static av_cold void sws_init_swscale_TMPL ( SwsContext c)
static

Definition at line 1405 of file swscale_template.c.

r
const char * r
Definition: vf_curves.c:116
YSCALEYUV2PACKEDX_YA
#define YSCALEYUV2PACKEDX_YA(offset, coeff, src1, src2, dst1, dst2)
Definition: swscale_template.c:61
src1
const pixel * src1
Definition: h264pred_template.c:421
REAL_YSCALEYUV2RGB_UV
#define REAL_YSCALEYUV2RGB_UV(index, c)
Definition: swscale_template.c:712
b
#define b
Definition: input.c:34
NAMED_CONSTRAINTS_ADD
#define NAMED_CONSTRAINTS_ADD(...)
Definition: asm.h:145
b1
static double b1(void *priv, double x, double y)
Definition: vf_xfade.c:1771
dummy
int dummy
Definition: motion.c:65
VG_COEFF
#define VG_COEFF
Definition: swscale_internal.h:479
CHR_MMX_FILTER_OFFSET
#define CHR_MMX_FILTER_OFFSET
Definition: swscale_internal.h:485
g
const char * g
Definition: vf_curves.c:117
UG_COEFF
#define UG_COEFF
Definition: swscale_internal.h:480
Y_OFFSET
#define Y_OFFSET
Definition: swscale_internal.h:481
UV_OFF_BYTE
#define UV_OFF_BYTE
Definition: swscale_internal.h:494
VROUNDER_OFFSET
#define VROUNDER_OFFSET
Definition: swscale_internal.h:488
q0
static const uint8_t q0[256]
Definition: twofish.c:81
VR_COEFF
#define VR_COEFF
Definition: swscale_internal.h:477
UB_COEFF
#define UB_COEFF
Definition: swscale_internal.h:478
U_OFFSET
#define U_OFFSET
Definition: swscale_internal.h:482
index
int index
Definition: gxfenc.c:89
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
b2
static double b2(void *priv, double x, double y)
Definition: vf_xfade.c:1772
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
src2
const pixel * src2
Definition: h264pred_template.c:422
__asm__
__asm__(".macro parse_r var r\n\t" "\\var = -1\n\t" _IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31) ".iflt \\var\n\t" ".error \"Unable to parse register name \\r\"\n\t" ".endif\n\t" ".endm")
MOVNTQ
#define MOVNTQ(a, b)
Definition: swscale_template.c:34
YSCALEYUV2PACKEDX_ACCURATE_YA
#define YSCALEYUV2PACKEDX_ACCURATE_YA(offset)
Definition: swscale_template.c:144
MANGLE
#define MANGLE(a)
Definition: asm.h:127
LUM_MMX_FILTER_OFFSET
#define LUM_MMX_FILTER_OFFSET
Definition: swscale_internal.h:484
V_OFFSET
#define V_OFFSET
Definition: swscale_internal.h:483
coeff
static const double coeff[2][5]
Definition: vf_owdenoise.c:78
Y_COEFF
#define Y_COEFF
Definition: swscale_internal.h:476