FFmpeg  3.3.9
Macros | Typedefs | Functions | Variables
swscale_unscaled.c File Reference
#include <inttypes.h>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include "config.h"
#include "swscale.h"
#include "swscale_internal.h"
#include "rgb2rgb.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/cpu.h"
#include "libavutil/avutil.h"
#include "libavutil/mathematics.h"
#include "libavutil/bswap.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avassert.h"
#include "libavutil/avconfig.h"
#include "bayer_template.c"

Go to the source code of this file.

Macros

#define output_pixel(p, v)   (*p) = (v)
 
#define BAYER_GBRG
 
#define BAYER_8
 
#define BAYER_RENAME(x)   bayer_gbrg8_to_##x
 
#define BAYER_GBRG
 
#define BAYER_16LE
 
#define BAYER_RENAME(x)   bayer_gbrg16le_to_##x
 
#define BAYER_GBRG
 
#define BAYER_16BE
 
#define BAYER_RENAME(x)   bayer_gbrg16be_to_##x
 
#define BAYER_GRBG
 
#define BAYER_8
 
#define BAYER_RENAME(x)   bayer_grbg8_to_##x
 
#define BAYER_GRBG
 
#define BAYER_16LE
 
#define BAYER_RENAME(x)   bayer_grbg16le_to_##x
 
#define BAYER_GRBG
 
#define BAYER_16BE
 
#define BAYER_RENAME(x)   bayer_grbg16be_to_##x
 
#define BAYER_BGGR
 
#define BAYER_8
 
#define BAYER_RENAME(x)   bayer_bggr8_to_##x
 
#define BAYER_BGGR
 
#define BAYER_16LE
 
#define BAYER_RENAME(x)   bayer_bggr16le_to_##x
 
#define BAYER_BGGR
 
#define BAYER_16BE
 
#define BAYER_RENAME(x)   bayer_bggr16be_to_##x
 
#define BAYER_RGGB
 
#define BAYER_8
 
#define BAYER_RENAME(x)   bayer_rggb8_to_##x
 
#define BAYER_RGGB
 
#define BAYER_16LE
 
#define BAYER_RENAME(x)   bayer_rggb16le_to_##x
 
#define BAYER_RGGB
 
#define BAYER_16BE
 
#define BAYER_RENAME(x)   bayer_rggb16be_to_##x
 
#define CASE(pixfmt, prefix)
 
#define CASE(pixfmt, prefix)
 
#define isRGBA32(x)
 
#define isRGBA64(x)
 
#define isRGB48(x)
 
#define IS_NOT_NE(bpp, desc)
 
#define CONV_IS(src, dst)   (srcFormat == AV_PIX_FMT_##src && dstFormat == AV_PIX_FMT_##dst)
 
#define DITHER_COPY(dst, dstStride, src, srcStride, bswap, dbswap)
 
#define COPY816(w)
 
#define FAST_COPY_UP(shift)
 
#define COPY_UP(r, w)
 
#define IS_DIFFERENT_ENDIANESS(src_fmt, dst_fmt, pix_fmt)
 
#define isByteRGB(f)
 
#define isPlanarGray(x)   (isGray(x) && (x) != AV_PIX_FMT_YA8 && (x) != AV_PIX_FMT_YA16LE && (x) != AV_PIX_FMT_YA16BE)
 

Typedefs

typedef void(* rgbConvFn) (const uint8_t *, uint8_t *, int)
 

Functions

static void fillPlane (uint8_t *plane, int stride, int width, int height, int y, uint8_t val)
 
static void copyPlane (const uint8_t *src, int srcStride, int srcSliceY, int srcSliceH, int width, uint8_t *dst, int dstStride)
 
static int planarToNv12Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int nv12ToPlanarWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int planarToP010Wrapper (SwsContext *c, const uint8_t *src8[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam8[], int dstStride[])
 
static int planar8ToP01xleWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam8[], int dstStride[])
 
static int planarToYuy2Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int planarToUyvyWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int yuv422pToYuy2Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int yuv422pToUyvyWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int yuyvToYuv420Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int yuyvToYuv422Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int uyvyToYuv420Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static int uyvyToYuv422Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dstParam[], int dstStride[])
 
static void gray8aToPacked32 (const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
 
static void gray8aToPacked32_1 (const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
 
static void gray8aToPacked24 (const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
 
static int packed_16bpc_bswap (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int palToRgbWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static void packed16togbra16 (const uint8_t *src, int srcStride, uint16_t *dst[], int dstStride[], int srcSliceH, int src_alpha, int swap, int shift, int width)
 
static int Rgb16ToPlanarRgb16Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static void gbr16ptopacked16 (const uint16_t *src[], int srcStride[], uint8_t *dst, int dstStride, int srcSliceH, int alpha, int swap, int bpp, int width)
 
static int planarRgb16ToRgb16Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static void gbr24ptopacked24 (const uint8_t *src[], int srcStride[], uint8_t *dst, int dstStride, int srcSliceH, int width)
 
static void gbr24ptopacked32 (const uint8_t *src[], int srcStride[], uint8_t *dst, int dstStride, int srcSliceH, int alpha_first, int width)
 
static int planarRgbToRgbWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int planarRgbToplanarRgbWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static void packedtogbr24p (const uint8_t *src, int srcStride, uint8_t *dst[], int dstStride[], int srcSliceH, int alpha_first, int inc_size, int width)
 
static int rgbToPlanarRgbWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int bayer_to_rgb24_wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int bayer_to_yv12_wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static rgbConvFn findRgbConvFn (SwsContext *c)
 
static int rgbToRgbWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int bgr24ToYv12Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int yvu9ToYv12Wrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int packedCopyWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
static int planarCopyWrapper (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 
void ff_get_unscaled_swscale (SwsContext *c)
 Set c->swscale to an unscaled converter if one exists for the specific source and destination formats, bit depths, flags, etc. More...
 
void sws_convertPalette8ToPacked32 (const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
 Convert an 8-bit paletted frame into a frame with a color depth of 32 bits. More...
 
void sws_convertPalette8ToPacked24 (const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette)
 Convert an 8-bit paletted frame into a frame with a color depth of 24 bits. More...
 

Variables

static const uint8_t dithers [8][8][8]
 
static const uint16_t dither_scale [15][16]
 

Macro Definition Documentation

◆ output_pixel

#define output_pixel (   p,
 
)    (*p) = (v)

Definition at line 246 of file swscale_unscaled.c.

Referenced by planar8ToP01xleWrapper().

◆ BAYER_GBRG [1/3]

#define BAYER_GBRG

Definition at line 1082 of file swscale_unscaled.c.

◆ BAYER_8 [1/4]

#define BAYER_8

Definition at line 1118 of file swscale_unscaled.c.

◆ BAYER_RENAME [1/12]

#define BAYER_RENAME (   x)    bayer_gbrg8_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_GBRG [2/3]

#define BAYER_GBRG

Definition at line 1082 of file swscale_unscaled.c.

◆ BAYER_16LE [1/4]

#define BAYER_16LE

Definition at line 1123 of file swscale_unscaled.c.

◆ BAYER_RENAME [2/12]

#define BAYER_RENAME (   x)    bayer_gbrg16le_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_GBRG [3/3]

#define BAYER_GBRG

Definition at line 1082 of file swscale_unscaled.c.

◆ BAYER_16BE [1/4]

#define BAYER_16BE

Definition at line 1128 of file swscale_unscaled.c.

◆ BAYER_RENAME [3/12]

#define BAYER_RENAME (   x)    bayer_gbrg16be_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_GRBG [1/3]

#define BAYER_GRBG

Definition at line 1097 of file swscale_unscaled.c.

◆ BAYER_8 [2/4]

#define BAYER_8

Definition at line 1118 of file swscale_unscaled.c.

◆ BAYER_RENAME [4/12]

#define BAYER_RENAME (   x)    bayer_grbg8_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_GRBG [2/3]

#define BAYER_GRBG

Definition at line 1097 of file swscale_unscaled.c.

◆ BAYER_16LE [2/4]

#define BAYER_16LE

Definition at line 1123 of file swscale_unscaled.c.

◆ BAYER_RENAME [5/12]

#define BAYER_RENAME (   x)    bayer_grbg16le_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_GRBG [3/3]

#define BAYER_GRBG

Definition at line 1097 of file swscale_unscaled.c.

◆ BAYER_16BE [2/4]

#define BAYER_16BE

Definition at line 1128 of file swscale_unscaled.c.

◆ BAYER_RENAME [6/12]

#define BAYER_RENAME (   x)    bayer_grbg16be_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_BGGR [1/3]

#define BAYER_BGGR

Definition at line 1112 of file swscale_unscaled.c.

◆ BAYER_8 [3/4]

#define BAYER_8

Definition at line 1118 of file swscale_unscaled.c.

◆ BAYER_RENAME [7/12]

#define BAYER_RENAME (   x)    bayer_bggr8_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_BGGR [2/3]

#define BAYER_BGGR

Definition at line 1112 of file swscale_unscaled.c.

◆ BAYER_16LE [3/4]

#define BAYER_16LE

Definition at line 1123 of file swscale_unscaled.c.

◆ BAYER_RENAME [8/12]

#define BAYER_RENAME (   x)    bayer_bggr16le_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_BGGR [3/3]

#define BAYER_BGGR

Definition at line 1112 of file swscale_unscaled.c.

◆ BAYER_16BE [3/4]

#define BAYER_16BE

Definition at line 1128 of file swscale_unscaled.c.

◆ BAYER_RENAME [9/12]

#define BAYER_RENAME (   x)    bayer_bggr16be_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_RGGB [1/3]

#define BAYER_RGGB

Definition at line 1127 of file swscale_unscaled.c.

◆ BAYER_8 [4/4]

#define BAYER_8

Definition at line 1118 of file swscale_unscaled.c.

◆ BAYER_RENAME [10/12]

#define BAYER_RENAME (   x)    bayer_rggb8_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_RGGB [2/3]

#define BAYER_RGGB

Definition at line 1127 of file swscale_unscaled.c.

◆ BAYER_16LE [4/4]

#define BAYER_16LE

Definition at line 1123 of file swscale_unscaled.c.

◆ BAYER_RENAME [11/12]

#define BAYER_RENAME (   x)    bayer_rggb16le_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ BAYER_RGGB [3/3]

#define BAYER_RGGB

Definition at line 1127 of file swscale_unscaled.c.

◆ BAYER_16BE [4/4]

#define BAYER_16BE

Definition at line 1128 of file swscale_unscaled.c.

◆ BAYER_RENAME [12/12]

#define BAYER_RENAME (   x)    bayer_rggb16be_to_##x

Definition at line 1129 of file swscale_unscaled.c.

◆ CASE [1/2]

#define CASE (   pixfmt,
  prefix 
)
Value:
case pixfmt: copy = bayer_##prefix##_to_rgb24_copy; \
interpolate = bayer_##prefix##_to_rgb24_interpolate; \
break;
static void copy(const float *p1, float *p2, const int length)

Referenced by bayer_to_rgb24_wrapper(), and bayer_to_yv12_wrapper().

◆ CASE [2/2]

#define CASE (   pixfmt,
  prefix 
)
Value:
case pixfmt: copy = bayer_##prefix##_to_yv12_copy; \
interpolate = bayer_##prefix##_to_yv12_interpolate; \
break;
static void copy(const float *p1, float *p2, const int length)

◆ isRGBA32

#define isRGBA32 (   x)
Value:
( \
(x) == AV_PIX_FMT_ARGB \
|| (x) == AV_PIX_FMT_RGBA \
|| (x) == AV_PIX_FMT_BGRA \
|| (x) == AV_PIX_FMT_ABGR \
)
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:99
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:100
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:97
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:98

Definition at line 1236 of file swscale_unscaled.c.

Referenced by findRgbConvFn(), and rgbToRgbWrapper().

◆ isRGBA64

#define isRGBA64 (   x)
Value:
( \
|| (x) == AV_PIX_FMT_RGBA64BE \
|| (x) == AV_PIX_FMT_BGRA64LE \
|| (x) == AV_PIX_FMT_BGRA64BE \
)
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:224
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:223
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:221
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:222

Definition at line 1243 of file swscale_unscaled.c.

Referenced by findRgbConvFn().

◆ isRGB48

#define isRGB48 (   x)
Value:
( \
|| (x) == AV_PIX_FMT_RGB48BE \
|| (x) == AV_PIX_FMT_BGR48LE \
|| (x) == AV_PIX_FMT_BGR48BE \
)
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:115
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:164
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:163
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:114

Definition at line 1250 of file swscale_unscaled.c.

Referenced by findRgbConvFn().

◆ IS_NOT_NE

#define IS_NOT_NE (   bpp,
  desc 
)
Value:
(((bpp + 7) >> 3) == 2 && \
const char * desc
Definition: nvenc.c:60
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
Definition: pixdesc.h:128
#define HAVE_BIGENDIAN
Definition: config.h:198

Referenced by rgbToRgbWrapper().

◆ CONV_IS

#define CONV_IS (   src,
  dst 
)    (srcFormat == AV_PIX_FMT_##src && dstFormat == AV_PIX_FMT_##dst)

Referenced by findRgbConvFn().

◆ DITHER_COPY

#define DITHER_COPY (   dst,
  dstStride,
  src,
  srcStride,
  bswap,
  dbswap 
)
Value:
uint16_t scale= dither_scale[dst_depth-1][src_depth-1];\
int shift= src_depth-dst_depth + dither_scale[src_depth-2][dst_depth-1];\
for (i = 0; i < height; i++) {\
const uint8_t *dither= dithers[src_depth-9][i&7];\
for (j = 0; j < length-7; j+=8){\
dst[j+0] = dbswap((bswap(src[j+0]) + dither[0])*scale>>shift);\
dst[j+1] = dbswap((bswap(src[j+1]) + dither[1])*scale>>shift);\
dst[j+2] = dbswap((bswap(src[j+2]) + dither[2])*scale>>shift);\
dst[j+3] = dbswap((bswap(src[j+3]) + dither[3])*scale>>shift);\
dst[j+4] = dbswap((bswap(src[j+4]) + dither[4])*scale>>shift);\
dst[j+5] = dbswap((bswap(src[j+5]) + dither[5])*scale>>shift);\
dst[j+6] = dbswap((bswap(src[j+6]) + dither[6])*scale>>shift);\
dst[j+7] = dbswap((bswap(src[j+7]) + dither[7])*scale>>shift);\
}\
for (; j < length; j++)\
dst[j] = dbswap((bswap(src[j]) + dither[j&7])*scale>>shift);\
dst += dstStride;\
src += srcStride;\
}
static const uint16_t dither_scale[15][16]
static int shift(int a, int b)
Definition: sonic.c:82
#define src
Definition: vp8dsp.c:254
uint8_t
#define height
static const uint8_t dither[8][8]
Definition: vf_fspp.c:57
static const uint8_t dithers[8][8][8]
const char int length
Definition: avisynth_c.h:768

Definition at line 1487 of file swscale_unscaled.c.

Referenced by planarCopyWrapper().

◆ COPY816

#define COPY816 (   w)
Value:
if (shiftonly) {\
for (j = 0; j < length; j++)\
w(&dstPtr2[j], srcPtr[j]<<(dst_depth-8));\
} else {\
for (j = 0; j < length; j++)\
w(&dstPtr2[j], (srcPtr[j]<<(dst_depth-8)) |\
(srcPtr[j]>>(2*8-dst_depth)));\
}
const char int length
Definition: avisynth_c.h:768

Referenced by planarCopyWrapper().

◆ FAST_COPY_UP

#define FAST_COPY_UP (   shift)
Value:
for (; j < length - 1; j += 2) { \
uint32_t v = AV_RN32A(srcPtr2 + j); \
AV_WN32A(dstPtr2 + j, v << shift); \
}
static int shift(int a, int b)
Definition: sonic.c:82
#define AV_RN32A(p)
Definition: intreadwrite.h:531
const char int length
Definition: avisynth_c.h:768

Referenced by planarCopyWrapper().

◆ COPY_UP

#define COPY_UP (   r,
 
)
Value:
if(shiftonly){\
for (; j < length; j++){ \
unsigned int v= r(&srcPtr2[j]);\
w(&dstPtr2[j], v<<(dst_depth-src_depth));\
}\
}else{\
for (; j < length; j++){ \
unsigned int v= r(&srcPtr2[j]);\
w(&dstPtr2[j], (v<<(dst_depth-src_depth)) | \
(v>>(2*src_depth-dst_depth)));\
}\
}
const char * r
Definition: vf_curves.c:111
const char int length
Definition: avisynth_c.h:768

Referenced by planarCopyWrapper().

◆ IS_DIFFERENT_ENDIANESS

#define IS_DIFFERENT_ENDIANESS (   src_fmt,
  dst_fmt,
  pix_fmt 
)
Value:
((src_fmt == pix_fmt ## BE && dst_fmt == pix_fmt ## LE) || \
(src_fmt == pix_fmt ## LE && dst_fmt == pix_fmt ## BE))
static enum AVPixelFormat pix_fmt

Definition at line 1670 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ isByteRGB

#define isByteRGB (   f)
Value:
( \
f == AV_PIX_FMT_RGB32 || \
f == AV_PIX_FMT_RGB24 || \
f == AV_PIX_FMT_BGR32 || \
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
#define AV_PIX_FMT_BGR32_1
Definition: pixfmt.h:333
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:69
#define AV_PIX_FMT_BGR32
Definition: pixfmt.h:332
#define AV_PIX_FMT_RGB32
Definition: pixfmt.h:330
#define AV_PIX_FMT_RGB32_1
Definition: pixfmt.h:331

Referenced by ff_get_unscaled_swscale().

◆ isPlanarGray

#define isPlanarGray (   x)    (isGray(x) && (x) != AV_PIX_FMT_YA8 && (x) != AV_PIX_FMT_YA16LE && (x) != AV_PIX_FMT_YA16BE)

Referenced by ff_get_unscaled_swscale().

Typedef Documentation

◆ rgbConvFn

typedef void(* rgbConvFn) (const uint8_t *, uint8_t *, int)

Definition at line 1258 of file swscale_unscaled.c.

Function Documentation

◆ fillPlane()

static void fillPlane ( uint8_t plane,
int  stride,
int  width,
int  height,
int  y,
uint8_t  val 
)
static

◆ copyPlane()

static void copyPlane ( const uint8_t src,
int  srcStride,
int  srcSliceY,
int  srcSliceH,
int  width,
uint8_t dst,
int  dstStride 
)
static

◆ planarToNv12Wrapper()

static int planarToNv12Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 160 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ nv12ToPlanarWrapper()

static int nv12ToPlanarWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 180 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ planarToP010Wrapper()

static int planarToP010Wrapper ( SwsContext c,
const uint8_t src8[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam8[],
int  dstStride[] 
)
static

Definition at line 201 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ planar8ToP01xleWrapper()

static int planar8ToP01xleWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam8[],
int  dstStride[] 
)
static

Definition at line 249 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ planarToYuy2Wrapper()

static int planarToYuy2Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 291 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ planarToUyvyWrapper()

static int planarToUyvyWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 303 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ yuv422pToYuy2Wrapper()

static int yuv422pToYuy2Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 315 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ yuv422pToUyvyWrapper()

static int yuv422pToUyvyWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 327 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ yuyvToYuv420Wrapper()

static int yuyvToYuv420Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 339 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ yuyvToYuv422Wrapper()

static int yuyvToYuv422Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 356 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ uyvyToYuv420Wrapper()

static int uyvyToYuv420Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 370 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ uyvyToYuv422Wrapper()

static int uyvyToYuv422Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dstParam[],
int  dstStride[] 
)
static

Definition at line 387 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ gray8aToPacked32()

static void gray8aToPacked32 ( const uint8_t src,
uint8_t dst,
int  num_pixels,
const uint8_t palette 
)
static

Definition at line 401 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

◆ gray8aToPacked32_1()

static void gray8aToPacked32_1 ( const uint8_t src,
uint8_t dst,
int  num_pixels,
const uint8_t palette 
)
static

Definition at line 409 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

◆ gray8aToPacked24()

static void gray8aToPacked24 ( const uint8_t src,
uint8_t dst,
int  num_pixels,
const uint8_t palette 
)
static

Definition at line 418 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

◆ packed_16bpc_bswap()

static int packed_16bpc_bswap ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 432 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ palToRgbWrapper()

static int palToRgbWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 459 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ packed16togbra16()

static void packed16togbra16 ( const uint8_t src,
int  srcStride,
uint16_t *  dst[],
int  dstStride[],
int  srcSliceH,
int  src_alpha,
int  swap,
int  shift,
int  width 
)
static

Definition at line 505 of file swscale_unscaled.c.

Referenced by Rgb16ToPlanarRgb16Wrapper().

◆ Rgb16ToPlanarRgb16Wrapper()

static int Rgb16ToPlanarRgb16Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 639 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ gbr16ptopacked16()

static void gbr16ptopacked16 ( const uint16_t *  src[],
int  srcStride[],
uint8_t dst,
int  dstStride,
int  srcSliceH,
int  alpha,
int  swap,
int  bpp,
int  width 
)
static

Definition at line 699 of file swscale_unscaled.c.

Referenced by planarRgb16ToRgb16Wrapper().

◆ planarRgb16ToRgb16Wrapper()

static int planarRgb16ToRgb16Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 818 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ gbr24ptopacked24()

static void gbr24ptopacked24 ( const uint8_t src[],
int  srcStride[],
uint8_t dst,
int  dstStride,
int  srcSliceH,
int  width 
)
static

Definition at line 878 of file swscale_unscaled.c.

Referenced by planarRgbToRgbWrapper().

◆ gbr24ptopacked32()

static void gbr24ptopacked32 ( const uint8_t src[],
int  srcStride[],
uint8_t dst,
int  dstStride,
int  srcSliceH,
int  alpha_first,
int  width 
)
static

Definition at line 896 of file swscale_unscaled.c.

Referenced by planarRgbToRgbWrapper().

◆ planarRgbToRgbWrapper()

static int planarRgbToRgbWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 925 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ planarRgbToplanarRgbWrapper()

static int planarRgbToplanarRgbWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 981 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ packedtogbr24p()

static void packedtogbr24p ( const uint8_t src,
int  srcStride,
uint8_t dst[],
int  dstStride[],
int  srcSliceH,
int  alpha_first,
int  inc_size,
int  width 
)
static

Definition at line 998 of file swscale_unscaled.c.

Referenced by rgbToPlanarRgbWrapper().

◆ rgbToPlanarRgbWrapper()

static int rgbToPlanarRgbWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1027 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ bayer_to_rgb24_wrapper()

static int bayer_to_rgb24_wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1132 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ bayer_to_yv12_wrapper()

static int bayer_to_yv12_wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1181 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ findRgbConvFn()

static rgbConvFn findRgbConvFn ( SwsContext c)
static

Definition at line 1259 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale(), and rgbToRgbWrapper().

◆ rgbToRgbWrapper()

static int rgbToRgbWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1365 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ bgr24ToYv12Wrapper()

static int bgr24ToYv12Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1426 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ yvu9ToYv12Wrapper()

static int yvu9ToYv12Wrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1443 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ packedCopyWrapper()

static int packedCopyWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1460 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ planarCopyWrapper()

static int planarCopyWrapper ( SwsContext c,
const uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)
static

Definition at line 1508 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

◆ ff_get_unscaled_swscale()

void ff_get_unscaled_swscale ( SwsContext c)

Set c->swscale to an unscaled converter if one exists for the specific source and destination formats, bit depths, flags, etc.

Definition at line 1675 of file swscale_unscaled.c.

Referenced by sws_init_context(), and usePal().

Variable Documentation

◆ dithers

const uint8_t dithers[8][8][8]
static

Definition at line 38 of file swscale_unscaled.c.

◆ dither_scale

const uint16_t dither_scale[15][16]
static
Initial value:
={
{ 2, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,},
{ 2, 3, 7, 7, 13, 13, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,},
{ 3, 3, 4, 15, 15, 29, 57, 57, 57, 113, 113, 113, 113, 113, 113, 113,},
{ 3, 4, 4, 5, 31, 31, 61, 121, 241, 241, 241, 241, 481, 481, 481, 481,},
{ 3, 4, 5, 5, 6, 63, 63, 125, 249, 497, 993, 993, 993, 993, 993, 1985,},
{ 3, 5, 6, 6, 6, 7, 127, 127, 253, 505, 1009, 2017, 4033, 4033, 4033, 4033,},
{ 3, 5, 6, 7, 7, 7, 8, 255, 255, 509, 1017, 2033, 4065, 8129,16257,16257,},
{ 3, 5, 6, 8, 8, 8, 8, 9, 511, 511, 1021, 2041, 4081, 8161,16321,32641,},
{ 3, 5, 7, 8, 9, 9, 9, 9, 10, 1023, 1023, 2045, 4089, 8177,16353,32705,},
{ 3, 5, 7, 8, 10, 10, 10, 10, 10, 11, 2047, 2047, 4093, 8185,16369,32737,},
{ 3, 5, 7, 8, 10, 11, 11, 11, 11, 11, 12, 4095, 4095, 8189,16377,32753,},
{ 3, 5, 7, 9, 10, 12, 12, 12, 12, 12, 12, 13, 8191, 8191,16381,32761,},
{ 3, 5, 7, 9, 10, 12, 13, 13, 13, 13, 13, 13, 14,16383,16383,32765,},
{ 3, 5, 7, 9, 10, 12, 14, 14, 14, 14, 14, 14, 14, 15,32767,32767,},
{ 3, 5, 7, 9, 11, 12, 14, 15, 15, 15, 15, 15, 15, 15, 16,65535,},
}

Definition at line 113 of file swscale_unscaled.c.