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_ALL_RGBX_FUNCS(yuvx)
 
#define DECLARE_FF_NVX_TO_RGBX_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

static void get_unscaled_swscale_neon (SwsContext *c)
 
void ff_get_unscaled_swscale_aarch64 (SwsContext *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(SwsContext *c, const uint8_t *src[], \
int srcStride[], int srcSliceY, int srcSliceH, \
uint8_t *dst[], int dstStride[]) { \
const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \
\
return ff_##ifmt##_to_##ofmt##_neon(c->srcW, 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_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) \

Definition at line 55 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(SwsContext *c, const uint8_t *src[], \
int srcStride[], int srcSliceY, int srcSliceH, \
uint8_t *dst[], int dstStride[]) { \
const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \
\
return ff_##ifmt##_to_##ofmt##_neon(c->srcW, 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 64 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) \

Definition at line 86 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->srcFormat == AV_PIX_FMT_##IFMT \
&& c->dstFormat == AV_PIX_FMT_##OFMT \
&& !(c->srcH & 1) \
&& !(c->srcW & 15) \
&& !accurate_rnd) \
c->swscale = ifmt##_to_##ofmt##_neon_wrapper; \
} while (0)

Definition at line 99 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); \
} while (0)

Definition at line 108 of file swscale_unscaled.c.

Function Documentation

◆ get_unscaled_swscale_neon()

static void get_unscaled_swscale_neon ( SwsContext c)
static

Definition at line 115 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale_aarch64().

◆ ff_get_unscaled_swscale_aarch64()

void ff_get_unscaled_swscale_aarch64 ( SwsContext c)

Definition at line 124 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

w
uint8_t w
Definition: llviddspenc.c:39
table
static const uint16_t table[]
Definition: prosumer.c:206
DECLARE_FF_NVX_TO_RGBX_FUNCS
#define DECLARE_FF_NVX_TO_RGBX_FUNCS(ifmt, ofmt)
Definition: swscale_unscaled.c:64
src
#define src
Definition: vp8dsp.c:255
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
srcSliceH
return srcSliceH
Definition: yuv2rgb_template.c:87
uint8_t
uint8_t
Definition: audio_convert.c:194
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:39
h
h
Definition: vp9dsp_template.c:2038
SwsContext
Definition: swscale_internal.h:283