FFmpeg
Loading...
Searching...
No Matches
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)
 
#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 )
Value:
sizeof(((type*)0)->member)
cl_device_type type

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)
#define _
int32_t
const char * to
Definition webvttdec.c:36
const char data[16]
Definition mxf.c:149
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
Definition h263dsp.c:29
#define src
Definition vp8dsp.c:248
static double c[64]

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);
#define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt)
Definition swscale.c:174

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)
#define SCALE_FUNCS(filter_n, opt)
Definition swscale.c:180

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); \
}
static const uint8_t bits[8]
Definition fastaudio.c:100
unsigned offset
Definition libaomenc.c:763
static const uint16_t dither[8][8]
Definition vf_gradfun.c:46

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.

Referenced by ff_sws_init_swscale_aarch64().

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

Referenced by ff_sws_init_swscale_aarch64(), and ff_sws_init_swscale_x86().

◆ 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 *)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
uint8_t w
Definition llvidencdsp.c:39
const char * name
Definition qsvenc.c:142

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().