FFmpeg
Macros | Functions
swscale.c File Reference
#include "config.h"
#include "libavutil/attributes.h"
#include "libswscale/swscale.h"
#include "libswscale/swscale_internal.h"
#include "libavutil/aarch64/cpu.h"
#include "asm-offsets.h"

Go to the source code of this file.

Macros

#define SIZEOF_MEMBER(type, member)   sizeof(((type*)0)->member)
 
#define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt)
 
#define SCALE_FUNCS(filter_n, opt)
 
#define ALL_SCALE_FUNCS(opt)
 
#define yuv2NBPS(bits, BE_LE, is_be, template_size, typeX_t)
 
#define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt)
 
#define ASSIGN_SCALE_FUNC(hscalefn, filtersize, opt)
 
#define ASSIGN_VSCALE_FUNC(vscalefn, opt)
 
#define NEON_INPUT(name)
 
#define NEON_INPUT_DOTPROD(name)
 

Functions

void ff_xyz12Torgb48le_neon_asm (const SwsColorXform *c, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
 
static void xyz12Torgb48le_neon (const SwsInternal *c, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
 
void ff_hscale16to15_4_neon_asm (int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
void ff_hscale16to15_X8_neon_asm (int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
void ff_hscale16to15_X4_neon_asm (int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
void ff_hscale16to19_4_neon_asm (int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
void ff_hscale16to19_X8_neon_asm (int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
void ff_hscale16to19_X4_neon_asm (int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
static void ff_hscale16to15_4_neon (SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
static void ff_hscale16to15_X8_neon (SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
static void ff_hscale16to15_X4_neon (SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
static void ff_hscale16to19_4_neon (SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
static void ff_hscale16to19_X8_neon (SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
static void ff_hscale16to19_X4_neon (SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
 
 ALL_SCALE_FUNCS (neon)
 
void ff_yuv2planeX_10_neon (const int16_t *filter, int filterSize, const int16_t **src, uint16_t *dest, int dstW, int big_endian, int output_bits)
 
 yuv2NBPS (yuv2NBPS(9, yuv2NBPS(BE, yuv2NBPS(1, yuv2NBPS(10, int16_t)
 
 NEON_INPUT (abgr32)
 
 NEON_INPUT (argb32)
 
 NEON_INPUT (bgr24)
 
 NEON_INPUT (bgra32)
 
 NEON_INPUT (rgb24)
 
 NEON_INPUT (rgba32)
 
 NEON_INPUT_DOTPROD (bgra32)
 
 NEON_INPUT_DOTPROD (rgba32)
 
void ff_lumRangeFromJpeg8_neon (int16_t *dst, int width, uint32_t coeff, int64_t offset)
 
void ff_chrRangeFromJpeg8_neon (int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
 
void ff_lumRangeToJpeg8_neon (int16_t *dst, int width, uint32_t coeff, int64_t offset)
 
void ff_chrRangeToJpeg8_neon (int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
 
void ff_lumRangeFromJpeg16_neon (int16_t *dst, int width, uint32_t coeff, int64_t offset)
 
void ff_chrRangeFromJpeg16_neon (int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
 
void ff_lumRangeToJpeg16_neon (int16_t *dst, int width, uint32_t coeff, int64_t offset)
 
void ff_chrRangeToJpeg16_neon (int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
 
av_cold void ff_sws_init_range_convert_aarch64 (SwsInternal *c)
 
av_cold void ff_sws_init_xyzdsp_aarch64 (SwsInternal *c)
 
av_cold void ff_sws_init_swscale_aarch64 (SwsInternal *c)
 

Macro Definition Documentation

◆ SIZEOF_MEMBER

#define SIZEOF_MEMBER (   type,
  member 
)    sizeof(((type*)0)->member)

Definition at line 26 of file swscale.c.

◆ SCALE_FUNC

#define SCALE_FUNC (   filter_n,
  from_bpc,
  to_bpc,
  opt 
)
Value:
void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \
SwsInternal *c, int16_t *data, \
int dstW, const uint8_t *src, \
const int16_t *filter, \
const int32_t *filterPos, int filterSize)

Definition at line 174 of file swscale.c.

◆ SCALE_FUNCS

#define SCALE_FUNCS (   filter_n,
  opt 
)
Value:
SCALE_FUNC(filter_n, 8, 15, opt); \
SCALE_FUNC(filter_n, 8, 19, opt);

Definition at line 180 of file swscale.c.

◆ ALL_SCALE_FUNCS

#define ALL_SCALE_FUNCS (   opt)
Value:
SCALE_FUNCS(4, opt); \
SCALE_FUNCS(X8, opt); \
SCALE_FUNCS(X4, opt)

Definition at line 183 of file swscale.c.

◆ yuv2NBPS

#define yuv2NBPS (   bits,
  BE_LE,
  is_be,
  template_size,
  typeX_t 
)
Value:
static void yuv2planeX_ ## bits ## BE_LE ## _neon(const int16_t *filter, int filterSize, \
const int16_t **src, uint8_t *dest, int dstW, \
const uint8_t *dither, int offset) \
{ \
ff_yuv2planeX_## template_size ## _neon(filter, \
filterSize, (const typeX_t **) src, \
(uint16_t *) dest, dstW, is_be, bits); \
}

Definition at line 194 of file swscale.c.

◆ ASSIGN_SCALE_FUNC2

#define ASSIGN_SCALE_FUNC2 (   hscalefn,
  filtersize,
  opt 
)
Value:
do { \
if (c->srcBpc == 8) { \
if(c->dstBpc <= 14) { \
hscalefn = \
ff_hscale8to15_ ## filtersize ## _ ## opt; \
} else \
hscalefn = \
ff_hscale8to19_ ## filtersize ## _ ## opt; \
} else { \
if (c->dstBpc <= 14) \
hscalefn = \
ff_hscale16to15_ ## filtersize ## _ ## opt; \
else \
hscalefn = \
ff_hscale16to19_ ## filtersize ## _ ## opt; \
} \
} while (0)

Definition at line 242 of file swscale.c.

◆ ASSIGN_SCALE_FUNC

#define ASSIGN_SCALE_FUNC (   hscalefn,
  filtersize,
  opt 
)
Value:
do { \
if (filtersize == 4) \
ASSIGN_SCALE_FUNC2(hscalefn, 4, opt); \
else if (filtersize % 8 == 0) \
ASSIGN_SCALE_FUNC2(hscalefn, X8, opt); \
else if (filtersize % 4 == 0 && filtersize % 8 != 0) \
ASSIGN_SCALE_FUNC2(hscalefn, X4, opt); \
} while (0)

Definition at line 260 of file swscale.c.

◆ ASSIGN_VSCALE_FUNC

#define ASSIGN_VSCALE_FUNC (   vscalefn,
  opt 
)
Value:
switch (c->dstBpc) { \
case 8: vscalefn = ff_yuv2plane1_8_ ## opt; break; \
default: break; \
}

Definition at line 269 of file swscale.c.

◆ NEON_INPUT

#define NEON_INPUT (   name)
Value:
void ff_##name##ToY_neon(uint8_t *dst, const uint8_t *src, const uint8_t *, \
const uint8_t *, int w, uint32_t *coeffs, void *); \
void ff_##name##ToUV_neon(uint8_t *, uint8_t *, const uint8_t *, \
const uint8_t *, const uint8_t *, int w, \
uint32_t *coeffs, void *); \
void ff_##name##ToUV_half_neon(uint8_t *, uint8_t *, const uint8_t *, \
const uint8_t *, const uint8_t *, int w, \
uint32_t *coeffs, void *)

Definition at line 275 of file swscale.c.

◆ NEON_INPUT_DOTPROD

#define NEON_INPUT_DOTPROD (   name)
Value:
void ff_##name##ToY_neon_dotprod(uint8_t *dst, const uint8_t *src, const uint8_t *, \
const uint8_t *, int w, uint32_t *coeffs, void *);

Definition at line 284 of file swscale.c.

Function Documentation

◆ ff_xyz12Torgb48le_neon_asm()

void ff_xyz12Torgb48le_neon_asm ( const SwsColorXform c,
uint8_t *  dst,
int  dst_stride,
const uint8_t *  src,
int  src_stride,
int  w,
int  h 
)

Referenced by xyz12Torgb48le_neon().

◆ xyz12Torgb48le_neon()

static void xyz12Torgb48le_neon ( const SwsInternal c,
uint8_t *  dst,
int  dst_stride,
const uint8_t *  src,
int  src_stride,
int  w,
int  h 
)
static

Definition at line 46 of file swscale.c.

Referenced by ff_sws_init_xyzdsp_aarch64().

◆ ff_hscale16to15_4_neon_asm()

void ff_hscale16to15_4_neon_asm ( int  shift,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)

Referenced by ff_hscale16to15_4_neon().

◆ ff_hscale16to15_X8_neon_asm()

void ff_hscale16to15_X8_neon_asm ( int  shift,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)

Referenced by ff_hscale16to15_X8_neon().

◆ ff_hscale16to15_X4_neon_asm()

void ff_hscale16to15_X4_neon_asm ( int  shift,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)

Referenced by ff_hscale16to15_X4_neon().

◆ ff_hscale16to19_4_neon_asm()

void ff_hscale16to19_4_neon_asm ( int  shift,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)

Referenced by ff_hscale16to19_4_neon().

◆ ff_hscale16to19_X8_neon_asm()

void ff_hscale16to19_X8_neon_asm ( int  shift,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)

Referenced by ff_hscale16to19_X8_neon().

◆ ff_hscale16to19_X4_neon_asm()

void ff_hscale16to19_X4_neon_asm ( int  shift,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)

Referenced by ff_hscale16to19_X4_neon().

◆ ff_hscale16to15_4_neon()

static void ff_hscale16to15_4_neon ( SwsInternal c,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)
static

Definition at line 73 of file swscale.c.

◆ ff_hscale16to15_X8_neon()

static void ff_hscale16to15_X8_neon ( SwsInternal c,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)
static

Definition at line 89 of file swscale.c.

◆ ff_hscale16to15_X4_neon()

static void ff_hscale16to15_X4_neon ( SwsInternal c,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)
static

Definition at line 105 of file swscale.c.

◆ ff_hscale16to19_4_neon()

static void ff_hscale16to19_4_neon ( SwsInternal c,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)
static

Definition at line 120 of file swscale.c.

◆ ff_hscale16to19_X8_neon()

static void ff_hscale16to19_X8_neon ( SwsInternal c,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)
static

Definition at line 138 of file swscale.c.

◆ ff_hscale16to19_X4_neon()

static void ff_hscale16to19_X4_neon ( SwsInternal c,
int16_t *  _dst,
int  dstW,
const uint8_t *  _src,
const int16_t *  filter,
const int32_t filterPos,
int  filterSize 
)
static

Definition at line 156 of file swscale.c.

◆ ALL_SCALE_FUNCS()

ALL_SCALE_FUNCS ( neon  )

◆ ff_yuv2planeX_10_neon()

void ff_yuv2planeX_10_neon ( const int16_t *  filter,
int  filterSize,
const int16_t **  src,
uint16_t *  dest,
int  dstW,
int  big_endian,
int  output_bits 
)

◆ yuv2NBPS()

yuv2NBPS ( yuv2NBPS(  9,
yuv2NBPS(  BE,
yuv2NBPS(  1,
yuv2NBPS(  10,
int16_t   
)

Definition at line 204 of file swscale.c.

◆ NEON_INPUT() [1/6]

NEON_INPUT ( abgr32  )

◆ NEON_INPUT() [2/6]

NEON_INPUT ( argb32  )

◆ NEON_INPUT() [3/6]

NEON_INPUT ( bgr24  )

◆ NEON_INPUT() [4/6]

NEON_INPUT ( bgra32  )

◆ NEON_INPUT() [5/6]

NEON_INPUT ( rgb24  )

◆ NEON_INPUT() [6/6]

NEON_INPUT ( rgba32  )

◆ NEON_INPUT_DOTPROD() [1/2]

NEON_INPUT_DOTPROD ( bgra32  )

◆ NEON_INPUT_DOTPROD() [2/2]

NEON_INPUT_DOTPROD ( rgba32  )

◆ ff_lumRangeFromJpeg8_neon()

void ff_lumRangeFromJpeg8_neon ( int16_t *  dst,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_chrRangeFromJpeg8_neon()

void ff_chrRangeFromJpeg8_neon ( int16_t *  dstU,
int16_t *  dstV,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_lumRangeToJpeg8_neon()

void ff_lumRangeToJpeg8_neon ( int16_t *  dst,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_chrRangeToJpeg8_neon()

void ff_chrRangeToJpeg8_neon ( int16_t *  dstU,
int16_t *  dstV,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_lumRangeFromJpeg16_neon()

void ff_lumRangeFromJpeg16_neon ( int16_t *  dst,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_chrRangeFromJpeg16_neon()

void ff_chrRangeFromJpeg16_neon ( int16_t *  dstU,
int16_t *  dstV,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_lumRangeToJpeg16_neon()

void ff_lumRangeToJpeg16_neon ( int16_t *  dst,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_chrRangeToJpeg16_neon()

void ff_chrRangeToJpeg16_neon ( int16_t *  dstU,
int16_t *  dstV,
int  width,
uint32_t  coeff,
int64_t  offset 
)

◆ ff_sws_init_range_convert_aarch64()

av_cold void ff_sws_init_range_convert_aarch64 ( SwsInternal c)

Definition at line 314 of file swscale.c.

Referenced by ff_sws_init_range_convert().

◆ ff_sws_init_xyzdsp_aarch64()

av_cold void ff_sws_init_xyzdsp_aarch64 ( SwsInternal c)

Definition at line 339 of file swscale.c.

Referenced by ff_sws_init_xyzdsp().

◆ ff_sws_init_swscale_aarch64()

av_cold void ff_sws_init_swscale_aarch64 ( SwsInternal c)

Definition at line 350 of file swscale.c.

Referenced by ff_sws_init_scale().

name
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 default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
w
uint8_t w
Definition: llviddspenc.c:38
data
const char data[16]
Definition: mxf.c:149
filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
SCALE_FUNCS
#define SCALE_FUNCS(filter_n, opt)
Definition: swscale.c:180
dither
static const uint16_t dither[8][8]
Definition: vf_gradfun.c:46
SCALE_FUNC
#define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt)
Definition: swscale.c:174
bits
uint8_t bits
Definition: vp3data.h:128
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
to
const char * to
Definition: webvttdec.c:35
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:87
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
SwsInternal
Definition: swscale_internal.h:330
_
#define _
int32_t
int32_t
Definition: audioconvert.c:56
src
#define src
Definition: vp8dsp.c:248