FFmpeg
Loading...
Searching...
No Matches
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_PACKED_RGB_FUNCS(ifmt, ofmt)
 
#define DECLARE_FF_YUVX_TO_PLANAR_RGB_FUNCS(ifmt, ofmt)
 
#define DECLARE_FF_YUVX_TO_ALL_RGBX_FUNCS(yuvx)
 
#define DECLARE_FF_YUVX_TO_ALL_RGB16_FUNCS(yuvx)
 
#define SET_FF_YUVX_TO_RGBX_FUNC(ifmt, IFMT, ofmt, OFMT, accurate_rnd)
 
#define SET_FF_YUVX_TO_ALL_RGBX_FUNC(yuvx, YUVX, accurate_rnd)
 
#define SET_FF_YUVX_TO_ALL_RGB16_FUNC(yuvx, YUVX, 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)
 
av_cold SwsFunc ff_yuv2rgb_init_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, \
static double c[64]

Definition at line 24 of file swscale_unscaled.c.

◆ DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS

#define DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS ( ifmt,
ofmt )
Value:
int ff_##ifmt##_to_##ofmt##_neon(int w, int h, \
int y_offset, \
int y_coeff, \
const int16_t *table, \
const uint8_t *const src[], const int srcStride[], \
uint8_t *dst, int linesize); \
\
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, \
c->yuv2rgb_y_offset >> 6, \
c->yuv2rgb_y_coeff, \
yuv2rgb_table, \
src, srcStride, \
dst[0] + srcSliceY * dstStride[0], \
dstStride[0]); \
} \
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
#define YUV_TO_RGB_TABLE
uint8_t w
Definition llvidencdsp.c:39
static const uint16_t table[]
Definition prosumer.c:203
#define src
Definition vp8dsp.c:248

Definition at line 30 of file swscale_unscaled.c.

◆ DECLARE_FF_YUVX_TO_PLANAR_RGB_FUNCS

#define DECLARE_FF_YUVX_TO_PLANAR_RGB_FUNCS ( ifmt,
ofmt )
Value:
int ff_##ifmt##_to_##ofmt##_neon(int w, int h, \
int y_offset, \
int y_coeff, \
const int16_t *table, \
const uint8_t *const src[], const int srcStride[], \
uint8_t *dst0, int linesize0, \
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, \
c->yuv2rgb_y_offset >> 6, \
c->yuv2rgb_y_coeff, \
yuv2rgb_table, \
src, srcStride, \
dst[0] + srcSliceY * dstStride[0], dstStride[0], \
dst[1] + srcSliceY * dstStride[1], dstStride[1], \
dst[2] + srcSliceY * dstStride[2], dstStride[2]); \
} \

Definition at line 53 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_PACKED_RGB_FUNCS(yuvx, rgba) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, abgr) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, bgra) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, rgb24) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, bgr24) \
DECLARE_FF_YUVX_TO_PLANAR_RGB_FUNCS(yuvx, gbrp) \
#define DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(ifmt, ofmt)

Definition at line 79 of file swscale_unscaled.c.

◆ DECLARE_FF_YUVX_TO_ALL_RGB16_FUNCS

#define DECLARE_FF_YUVX_TO_ALL_RGB16_FUNCS ( yuvx)
Value:
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, bgr565le) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, rgb555le) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, bgr555le) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, rgb565be) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, bgr565be) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, rgb555be) \
DECLARE_FF_YUVX_TO_PACKED_RGB_FUNCS(yuvx, bgr555be) \

Definition at line 93 of file swscale_unscaled.c.

◆ SET_FF_YUVX_TO_RGBX_FUNC

#define SET_FF_YUVX_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 144 of file swscale_unscaled.c.

Referenced by get_unscaled_swscale_neon().

◆ SET_FF_YUVX_TO_ALL_RGBX_FUNC

#define SET_FF_YUVX_TO_ALL_RGBX_FUNC ( yuvx,
YUVX,
accurate_rnd )
Value:
do { \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, argb, ARGB, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, rgba, RGBA, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, abgr, ABGR, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, bgra, BGRA, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, gbrp, GBRP, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, rgb24, RGB24, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, bgr24, BGR24, accurate_rnd); \
} while (0)
#define RGBA(r, g, b, a)
Definition dvbsubdec.c:42

Definition at line 153 of file swscale_unscaled.c.

Referenced by get_unscaled_swscale_neon().

◆ SET_FF_YUVX_TO_ALL_RGB16_FUNC

#define SET_FF_YUVX_TO_ALL_RGB16_FUNC ( yuvx,
YUVX,
accurate_rnd )
Value:
do { \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, rgb565le, RGB565LE, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, bgr565le, BGR565LE, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, rgb555le, RGB555LE, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, bgr555le, BGR555LE, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, rgb565be, RGB565BE, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, bgr565be, BGR565BE, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, rgb555be, RGB555BE, accurate_rnd); \
SET_FF_YUVX_TO_RGBX_FUNC(yuvx, YUVX, bgr555be, BGR555BE, accurate_rnd); \
} while (0)

Definition at line 163 of file swscale_unscaled.c.

Referenced by get_unscaled_swscale_neon().

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 118 of file swscale_unscaled.c.

Referenced by get_unscaled_swscale_neon(), and nv24_to_yuv420p_neon_wrapper().

◆ get_unscaled_swscale_neon()

static void get_unscaled_swscale_neon ( SwsInternal * c)
static

Definition at line 174 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 208 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ ff_yuv2rgb_init_aarch64()

av_cold SwsFunc ff_yuv2rgb_init_aarch64 ( SwsInternal * c)

Definition at line 215 of file swscale_unscaled.c.

Referenced by if().