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"

Go to the source code of this file.

Macros

#define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt)
 
#define SCALE_FUNCS(filter_n, opt)
 
#define ALL_SCALE_FUNCS(opt)
 
#define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt)
 
#define ASSIGN_SCALE_FUNC(hscalefn, filtersize, opt)
 
#define ASSIGN_VSCALE_FUNC(vscalefn, opt)
 
#define NEON_INPUT(name)
 

Functions

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_8_neon (const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
 
void ff_yuv2plane1_8_neon (const int16_t *src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
 
 NEON_INPUT (abgr32)
 
 NEON_INPUT (argb32)
 
 NEON_INPUT (bgr24)
 
 NEON_INPUT (bgra32)
 
 NEON_INPUT (rgb24)
 
 NEON_INPUT (rgba32)
 
void ff_lumRangeFromJpeg_neon (int16_t *dst, int width)
 
void ff_chrRangeFromJpeg_neon (int16_t *dstU, int16_t *dstV, int width)
 
void ff_lumRangeToJpeg_neon (int16_t *dst, int width)
 
void ff_chrRangeToJpeg_neon (int16_t *dstU, int16_t *dstV, int width)
 
av_cold void ff_sws_init_range_convert_aarch64 (SwsInternal *c)
 
av_cold void ff_sws_init_swscale_aarch64 (SwsInternal *c)
 

Macro Definition Documentation

◆ 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 145 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 151 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 154 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 171 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 189 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 198 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 204 of file swscale.c.

Function Documentation

◆ 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 44 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 60 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 76 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 91 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 109 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 127 of file swscale.c.

◆ ALL_SCALE_FUNCS()

ALL_SCALE_FUNCS ( neon  )

◆ ff_yuv2planeX_8_neon()

void ff_yuv2planeX_8_neon ( const int16_t *  filter,
int  filterSize,
const int16_t **  src,
uint8_t *  dest,
int  dstW,
const uint8_t *  dither,
int  offset 
)

◆ ff_yuv2plane1_8_neon()

void ff_yuv2plane1_8_neon ( const int16_t *  src,
uint8_t *  dest,
int  dstW,
const uint8_t *  dither,
int  offset 
)

◆ 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  )

◆ ff_lumRangeFromJpeg_neon()

void ff_lumRangeFromJpeg_neon ( int16_t *  dst,
int  width 
)

◆ ff_chrRangeFromJpeg_neon()

void ff_chrRangeFromJpeg_neon ( int16_t *  dstU,
int16_t *  dstV,
int  width 
)

◆ ff_lumRangeToJpeg_neon()

void ff_lumRangeToJpeg_neon ( int16_t *  dst,
int  width 
)

◆ ff_chrRangeToJpeg_neon()

void ff_chrRangeToJpeg_neon ( int16_t *  dstU,
int16_t *  dstV,
int  width 
)

◆ ff_sws_init_range_convert_aarch64()

av_cold void ff_sws_init_range_convert_aarch64 ( SwsInternal c)

Definition at line 226 of file swscale.c.

Referenced by ff_sws_init_range_convert().

◆ ff_sws_init_swscale_aarch64()

av_cold void ff_sws_init_swscale_aarch64 ( SwsInternal c)

Definition at line 243 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:151
SCALE_FUNC
#define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt)
Definition: swscale.c:145
to
const char * to
Definition: webvttdec.c:35
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
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:83
SwsInternal
Definition: swscale_internal.h:317
_
#define _
int32_t
int32_t
Definition: audioconvert.c:56
src
#define src
Definition: vp8dsp.c:248