FFmpeg
Macros | Functions
swscale_unscaled.c File Reference
#include "config.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 YUV_TO_RGB_TABLE
 
#define DECLARE_FF_YUVX_TO_RGBX_FUNCS(ifmt, ofmt)
 
#define DECLARE_FF_YUVX_TO_GBRP_FUNCS(ifmt, ofmt)
 
#define DECLARE_FF_YUVX_TO_ALL_RGBX_FUNCS(yuvx)
 
#define DECLARE_FF_NVX_TO_RGBX_FUNCS(ifmt, ofmt)
 
#define DECLARE_FF_NVX_TO_GBRP_FUNCS(ifmt, ofmt)
 
#define DECLARE_FF_NVX_TO_ALL_RGBX_FUNCS(nvx)
 
#define SET_FF_NVX_TO_RGBX_FUNC(ifmt, IFMT, ofmt, OFMT, accurate_rnd)
 
#define SET_FF_NVX_TO_ALL_RGBX_FUNC(nvx, NVX, accurate_rnd)
 

Functions

void ff_nv24_to_yuv420p_chroma_neon (uint8_t *dst1, int dstStride1, uint8_t *dst2, int dstStride2, const uint8_t *src, int srcStride, int w, int h)
 
static int nv24_to_yuv420p_neon_wrapper (SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
 
static void get_unscaled_swscale_neon (SwsInternal *c)
 
void ff_get_unscaled_swscale_aarch64 (SwsInternal *c)
 

Macro Definition Documentation

◆ YUV_TO_RGB_TABLE

#define YUV_TO_RGB_TABLE
Value:
c->yuv2rgb_v2r_coeff, \
c->yuv2rgb_u2g_coeff, \
c->yuv2rgb_v2g_coeff, \
c->yuv2rgb_u2b_coeff, \

Definition at line 24 of file swscale_unscaled.c.

◆ DECLARE_FF_YUVX_TO_RGBX_FUNCS

#define DECLARE_FF_YUVX_TO_RGBX_FUNCS (   ifmt,
  ofmt 
)
Value:
int ff_##ifmt##_to_##ofmt##_neon(int w, int h, \
uint8_t *dst, int linesize, \
const uint8_t *srcY, int linesizeY, \
const uint8_t *srcU, int linesizeU, \
const uint8_t *srcV, int linesizeV, \
const int16_t *table, \
int y_offset, \
int y_coeff); \
\
static int ifmt##_to_##ofmt##_neon_wrapper(SwsInternal *c, const uint8_t *const src[], \
const int srcStride[], int srcSliceY, \
int srcSliceH, uint8_t *const dst[], \
const int dstStride[]) { \
const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \
\
return ff_##ifmt##_to_##ofmt##_neon(c->opts.src_w, srcSliceH, \
dst[0] + srcSliceY * dstStride[0], dstStride[0], \
src[0], srcStride[0], \
src[1], srcStride[1], \
src[2], srcStride[2], \
yuv2rgb_table, \
c->yuv2rgb_y_offset >> 6, \
c->yuv2rgb_y_coeff); \
} \

Definition at line 30 of file swscale_unscaled.c.

◆ DECLARE_FF_YUVX_TO_GBRP_FUNCS

#define DECLARE_FF_YUVX_TO_GBRP_FUNCS (   ifmt,
  ofmt 
)
Value:
int ff_##ifmt##_to_##ofmt##_neon(int w, int h, \
uint8_t *dst, int linesize, \
const uint8_t *srcY, int linesizeY, \
const uint8_t *srcU, int linesizeU, \
const uint8_t *srcV, int linesizeV, \
const int16_t *table, \
int y_offset, \
int y_coeff, \
uint8_t *dst1, int linesize1, \
uint8_t *dst2, int linesize2); \
\
static int ifmt##_to_##ofmt##_neon_wrapper(SwsInternal *c, const uint8_t *const src[], \
const int srcStride[], int srcSliceY, \
int srcSliceH, uint8_t *const dst[], \
const int dstStride[]) { \
const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \
\
return ff_##ifmt##_to_##ofmt##_neon(c->opts.src_w, srcSliceH, \
dst[0] + srcSliceY * dstStride[0], dstStride[0], \
src[0], srcStride[0], \
src[1], srcStride[1], \
src[2], srcStride[2], \
yuv2rgb_table, \
c->yuv2rgb_y_offset >> 6, \
c->yuv2rgb_y_coeff, \
dst[1] + srcSliceY * dstStride[1], dstStride[1], \
dst[2] + srcSliceY * dstStride[2], dstStride[2]); \
} \

Definition at line 56 of file swscale_unscaled.c.

◆ DECLARE_FF_YUVX_TO_ALL_RGBX_FUNCS

#define DECLARE_FF_YUVX_TO_ALL_RGBX_FUNCS (   yuvx)
Value:
DECLARE_FF_YUVX_TO_RGBX_FUNCS(yuvx, rgba) \
DECLARE_FF_YUVX_TO_RGBX_FUNCS(yuvx, abgr) \
DECLARE_FF_YUVX_TO_RGBX_FUNCS(yuvx, bgra) \
DECLARE_FF_YUVX_TO_GBRP_FUNCS(yuvx, gbrp) \

Definition at line 86 of file swscale_unscaled.c.

◆ DECLARE_FF_NVX_TO_RGBX_FUNCS

#define DECLARE_FF_NVX_TO_RGBX_FUNCS (   ifmt,
  ofmt 
)
Value:
int ff_##ifmt##_to_##ofmt##_neon(int w, int h, \
uint8_t *dst, int linesize, \
const uint8_t *srcY, int linesizeY, \
const uint8_t *srcC, int linesizeC, \
const int16_t *table, \
int y_offset, \
int y_coeff); \
\
static int ifmt##_to_##ofmt##_neon_wrapper(SwsInternal *c, const uint8_t *const src[], \
const int srcStride[], int srcSliceY, \
int srcSliceH, uint8_t *const dst[], \
const int dstStride[]) { \
const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \
\
return ff_##ifmt##_to_##ofmt##_neon(c->opts.src_w, srcSliceH, \
dst[0] + srcSliceY * dstStride[0], dstStride[0], \
src[0], srcStride[0], src[1], srcStride[1], \
yuv2rgb_table, \
c->yuv2rgb_y_offset >> 6, \
c->yuv2rgb_y_coeff); \
} \

Definition at line 96 of file swscale_unscaled.c.

◆ DECLARE_FF_NVX_TO_GBRP_FUNCS

#define DECLARE_FF_NVX_TO_GBRP_FUNCS (   ifmt,
  ofmt 
)
Value:
int ff_##ifmt##_to_##ofmt##_neon(int w, int h, \
uint8_t *dst, int linesize, \
const uint8_t *srcY, int linesizeY, \
const uint8_t *srcC, int linesizeC, \
const int16_t *table, \
int y_offset, \
int y_coeff, \
uint8_t *dst1, int linesize1, \
uint8_t *dst2, int linesize2); \
\
static int ifmt##_to_##ofmt##_neon_wrapper(SwsInternal *c, const uint8_t *const src[], \
const int srcStride[], int srcSliceY, \
int srcSliceH, uint8_t *const dst[], \
const int dstStride[]) { \
const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \
\
return ff_##ifmt##_to_##ofmt##_neon(c->opts.src_w, srcSliceH, \
dst[0] + srcSliceY * dstStride[0], dstStride[0], \
src[0], srcStride[0], src[1], srcStride[1], \
yuv2rgb_table, \
c->yuv2rgb_y_offset >> 6, \
c->yuv2rgb_y_coeff, \
dst[1] + srcSliceY * dstStride[1], dstStride[1], \
dst[2] + srcSliceY * dstStride[2], dstStride[2]); \
} \

Definition at line 119 of file swscale_unscaled.c.

◆ DECLARE_FF_NVX_TO_ALL_RGBX_FUNCS

#define DECLARE_FF_NVX_TO_ALL_RGBX_FUNCS (   nvx)
Value:
DECLARE_FF_NVX_TO_RGBX_FUNCS(nvx, rgba) \
DECLARE_FF_NVX_TO_RGBX_FUNCS(nvx, abgr) \
DECLARE_FF_NVX_TO_RGBX_FUNCS(nvx, bgra) \
DECLARE_FF_NVX_TO_GBRP_FUNCS(nvx, gbrp) \

Definition at line 173 of file swscale_unscaled.c.

◆ SET_FF_NVX_TO_RGBX_FUNC

#define SET_FF_NVX_TO_RGBX_FUNC (   ifmt,
  IFMT,
  ofmt,
  OFMT,
  accurate_rnd 
)
Value:
do { \
if (c->opts.src_format == AV_PIX_FMT_##IFMT \
&& c->opts.dst_format == AV_PIX_FMT_##OFMT \
&& !(c->opts.src_h & 1) \
&& !(c->opts.src_w & 15) \
&& !accurate_rnd) \
c->convert_unscaled = ifmt##_to_##ofmt##_neon_wrapper; \
} while (0)

Definition at line 187 of file swscale_unscaled.c.

◆ SET_FF_NVX_TO_ALL_RGBX_FUNC

#define SET_FF_NVX_TO_ALL_RGBX_FUNC (   nvx,
  NVX,
  accurate_rnd 
)
Value:
do { \
SET_FF_NVX_TO_RGBX_FUNC(nvx, NVX, argb, ARGB, accurate_rnd); \
SET_FF_NVX_TO_RGBX_FUNC(nvx, NVX, rgba, RGBA, accurate_rnd); \
SET_FF_NVX_TO_RGBX_FUNC(nvx, NVX, abgr, ABGR, accurate_rnd); \
SET_FF_NVX_TO_RGBX_FUNC(nvx, NVX, bgra, BGRA, accurate_rnd); \
SET_FF_NVX_TO_RGBX_FUNC(nvx, NVX, gbrp, GBRP, accurate_rnd); \
} while (0)

Definition at line 196 of file swscale_unscaled.c.

Function Documentation

◆ ff_nv24_to_yuv420p_chroma_neon()

void ff_nv24_to_yuv420p_chroma_neon ( uint8_t *  dst1,
int  dstStride1,
uint8_t *  dst2,
int  dstStride2,
const uint8_t *  src,
int  srcStride,
int  w,
int  h 
)

◆ nv24_to_yuv420p_neon_wrapper()

static int nv24_to_yuv420p_neon_wrapper ( SwsInternal c,
const uint8_t *const  src[],
const int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *const  dst[],
const int  dstStride[] 
)
static

Definition at line 151 of file swscale_unscaled.c.

Referenced by get_unscaled_swscale_neon().

◆ get_unscaled_swscale_neon()

static void get_unscaled_swscale_neon ( SwsInternal c)
static

Definition at line 204 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale_aarch64().

◆ ff_get_unscaled_swscale_aarch64()

void ff_get_unscaled_swscale_aarch64 ( SwsInternal c)

Definition at line 218 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

w
uint8_t w
Definition: llviddspenc.c:38
table
static const uint16_t table[]
Definition: prosumer.c:203
DECLARE_FF_NVX_TO_RGBX_FUNCS
#define DECLARE_FF_NVX_TO_RGBX_FUNCS(ifmt, ofmt)
Definition: swscale_unscaled.c:96
YUV_TO_RGB_TABLE
#define YUV_TO_RGB_TABLE
Definition: swscale_unscaled.c:24
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
DECLARE_FF_YUVX_TO_RGBX_FUNCS
#define DECLARE_FF_YUVX_TO_RGBX_FUNCS(ifmt, ofmt)
Definition: swscale_unscaled.c:30
RGBA
#define RGBA(r, g, b, a)
Definition: dvbsubdec.c:42
h
h
Definition: vp9dsp_template.c:2070
src
#define src
Definition: vp8dsp.c:248