Libav
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 <assert.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"

Go to the source code of this file.

Macros

#define RGB2YUV_SHIFT   15
 
#define BY   ( (int) (0.114 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define BV   (-(int) (0.081 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define BU   ( (int) (0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define GY   ( (int) (0.587 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define GV   (-(int) (0.419 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define GU   (-(int) (0.331 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define RY   ( (int) (0.299 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define RV   ( (int) (0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define RU   (-(int) (0.169 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))
 
#define FILL8TO9_OR_10(wfunc)
 
#define isRGBA32(x)
 
#define IS_NOT_NE(bpp, desc)
 
#define CONV_IS(src, dst)   (srcFormat == AV_PIX_FMT_##src && dstFormat == AV_PIX_FMT_##dst)
 
#define clip9(x)   av_clip_uintp2(x, 9)
 
#define clip10(x)   av_clip_uintp2(x, 10)
 
#define DITHER_COPY(dst, dstStride, wfunc, src, srcStride, rfunc, dithers, shift, clip)
 
#define COPY9_OR_10TO16(rfunc, wfunc)
 
#define COPY9_OR_10TO9_OR_10(loop)
 
#define COPY9_OR_10TO9_OR_10_2(rfunc, wfunc)
 
#define W8(a, b)   { *(a) = (b); }
 
#define COPY9_OR_10TO8(rfunc)
 
#define COPY16TO9_OR_10(rfunc, wfunc)
 
#define COPY8TO9_OR_10(wfunc)
 
#define COPY16TO8(rfunc)
 
#define IS_DIFFERENT_ENDIANESS(src_fmt, dst_fmt, pix_fmt)
 
#define isByteRGB(f)
 

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 fill_plane9or10 (uint8_t *plane, int stride, int width, int height, int y, uint8_t val, const int dst_depth, const int big_endian)
 
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 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 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 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 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...
 
static void reset_ptr (const uint8_t *src[], int format)
 
static int check_image_pointers (uint8_t *data[4], enum AVPixelFormat pix_fmt, const int linesizes[4])
 
int attribute_align_arg sws_scale (struct SwsContext *c, const uint8_t *const srcSlice[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
 swscale wrapper, so we don't need to export the SwsContext. 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 dither_8x8_1 [8][8]
 
static const uint8_t dither_8x8_3 [8][8]
 
static const uint8_t dither_8x8_64 [8][8]
 
static const uint8_t dither_8x8_256 [8][8]
 

Macro Definition Documentation

#define RGB2YUV_SHIFT   15

Definition at line 78 of file swscale_unscaled.c.

Referenced by sws_scale().

#define BY   ( (int) (0.114 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 79 of file swscale_unscaled.c.

Referenced by sws_scale().

#define BV   (-(int) (0.081 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 80 of file swscale_unscaled.c.

Referenced by sws_scale().

#define BU   ( (int) (0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 81 of file swscale_unscaled.c.

Referenced by sws_scale().

#define GY   ( (int) (0.587 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 82 of file swscale_unscaled.c.

Referenced by sws_scale().

#define GV   (-(int) (0.419 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 83 of file swscale_unscaled.c.

Referenced by sws_scale().

#define GU   (-(int) (0.331 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 84 of file swscale_unscaled.c.

Referenced by sws_scale().

#define RY   ( (int) (0.299 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 85 of file swscale_unscaled.c.

Referenced by sws_scale().

#define RV   ( (int) (0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 86 of file swscale_unscaled.c.

Referenced by sws_scale().

#define RU   (-(int) (0.169 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5))

Definition at line 87 of file swscale_unscaled.c.

Referenced by sws_scale().

#define FILL8TO9_OR_10 (   wfunc)
Value:
for (i = 0; i < height; i++) { \
for (j = 0; j < width; j++) { \
wfunc(&dst[j], (val << (dst_depth - 8)) | \
(val >> (16 - dst_depth))); \
} \
dst += stride / 2; \
}
int stride
Definition: mace.c:144
static int width
Definition: utils.c:156
int height
Definition: gxfenc.c:72
for(j=16;j >0;--j)

Referenced by fill_plane9or10().

#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 ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:95
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:98
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:97
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:96

Definition at line 565 of file swscale_unscaled.c.

Referenced by findRgbConvFn(), and rgbToRgbWrapper().

#define IS_NOT_NE (   bpp,
  desc 
)
Value:
(((bpp + 7) >> 3) == 2 && \
(!(desc->flags & AV_PIX_FMT_FLAG_BE) != !HAVE_BIGENDIAN))
#define HAVE_BIGENDIAN
Definition: config.h:145
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
Definition: pixdesc.h:108

Referenced by findRgbConvFn().

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

Referenced by findRgbConvFn().

#define clip9 (   x)    av_clip_uintp2(x, 9)

Definition at line 755 of file swscale_unscaled.c.

#define clip10 (   x)    av_clip_uintp2(x, 10)

Definition at line 756 of file swscale_unscaled.c.

#define DITHER_COPY (   dst,
  dstStride,
  wfunc,
  src,
  srcStride,
  rfunc,
  dithers,
  shift,
  clip 
)
Value:
for (i = 0; i < height; i++) { \
const uint8_t *dither = dithers[i & 7]; \
for (j = 0; j < length - 7; j += 8) { \
wfunc(&dst[j + 0], clip((rfunc(&src[j + 0]) + dither[0]) >> shift)); \
wfunc(&dst[j + 1], clip((rfunc(&src[j + 1]) + dither[1]) >> shift)); \
wfunc(&dst[j + 2], clip((rfunc(&src[j + 2]) + dither[2]) >> shift)); \
wfunc(&dst[j + 3], clip((rfunc(&src[j + 3]) + dither[3]) >> shift)); \
wfunc(&dst[j + 4], clip((rfunc(&src[j + 4]) + dither[4]) >> shift)); \
wfunc(&dst[j + 5], clip((rfunc(&src[j + 5]) + dither[5]) >> shift)); \
wfunc(&dst[j + 6], clip((rfunc(&src[j + 6]) + dither[6]) >> shift)); \
wfunc(&dst[j + 7], clip((rfunc(&src[j + 7]) + dither[7]) >> shift)); \
} \
for (; j < length; j++) \
wfunc(&dst[j], (rfunc(&src[j]) + dither[j & 7]) >> shift); \
dst += dstStride; \
src += srcStride; \
}
uint8_t
static const uint16_t dither[8][8]
Definition: vf_gradfun.c:46
int height
Definition: gxfenc.c:72
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
Definition: vf_lut.c:162
for(j=16;j >0;--j)

Definition at line 757 of file swscale_unscaled.c.

#define COPY9_OR_10TO16 (   rfunc,
  wfunc 
)
Value:
for (i = 0; i < height; i++) { \
for (j = 0; j < length; j++) { \
int srcpx = rfunc(&srcPtr2[j]); \
wfunc(&dstPtr2[j], (srcpx << (16 - src_depth)) | (srcpx >> (2 * src_depth - 16))); \
} \
dstPtr2 += dstStride[plane] / 2; \
srcPtr2 += srcStride[plane] / 2; \
}
int height
Definition: gxfenc.c:72
for(j=16;j >0;--j)

Referenced by planarCopyWrapper().

#define COPY9_OR_10TO9_OR_10 (   loop)
Value:
for (i = 0; i < height; i++) { \
for (j = 0; j < length; j++) { \
} \
dstPtr2 += dstStride[plane] / 2; \
srcPtr2 += srcStride[plane] / 2; \
}
int height
Definition: gxfenc.c:72
static int loop
Definition: avplay.c:260
for(j=16;j >0;--j)
#define COPY9_OR_10TO9_OR_10_2 (   rfunc,
  wfunc 
)
Value:
if (dst_depth > src_depth) { \
COPY9_OR_10TO9_OR_10(int srcpx = rfunc(&srcPtr2[j]); \
wfunc(&dstPtr2[j], (srcpx << 1) | (srcpx >> 9))); \
} else if (dst_depth < src_depth) { \
DITHER_COPY(dstPtr2, dstStride[plane] / 2, wfunc, \
srcPtr2, srcStride[plane] / 2, rfunc, \
} else { \
COPY9_OR_10TO9_OR_10(wfunc(&dstPtr2[j], rfunc(&srcPtr2[j]))); \
}
static const uint8_t dither_8x8_1[8][8]
#define COPY9_OR_10TO9_OR_10(loop)
#define DITHER_COPY(dst, dstStride, wfunc, src, srcStride, rfunc, dithers, shift, clip)
#define clip9(x)

Referenced by planarCopyWrapper().

#define W8 (   a,
  b 
)    { *(a) = (b); }
#define COPY9_OR_10TO8 (   rfunc)
Value:
if (src_depth == 9) { \
DITHER_COPY(dstPtr, dstStride[plane], W8, \
srcPtr2, srcStride[plane] / 2, rfunc, \
dither_8x8_1, 1, av_clip_uint8); \
} else { \
DITHER_COPY(dstPtr, dstStride[plane], W8, \
srcPtr2, srcStride[plane] / 2, rfunc, \
dither_8x8_3, 2, av_clip_uint8); \
}
static const uint8_t dither_8x8_3[8][8]
static const uint8_t dither_8x8_1[8][8]
#define W8(a, b)
#define DITHER_COPY(dst, dstStride, wfunc, src, srcStride, rfunc, dithers, shift, clip)

Referenced by planarCopyWrapper().

#define COPY16TO9_OR_10 (   rfunc,
  wfunc 
)
Value:
if (dst_depth == 9) { \
DITHER_COPY(dstPtr2, dstStride[plane] / 2, wfunc, \
srcPtr2, srcStride[plane] / 2, rfunc, \
} else { \
DITHER_COPY(dstPtr2, dstStride[plane] / 2, wfunc, \
srcPtr2, srcStride[plane] / 2, rfunc, \
}
static const uint8_t dither_8x8_64[8][8]
const uint8_t ff_dither_8x8_128[8][8]
Definition: swscale.c:38
#define clip10(x)
#define DITHER_COPY(dst, dstStride, wfunc, src, srcStride, rfunc, dithers, shift, clip)
#define clip9(x)

Referenced by planarCopyWrapper().

#define COPY8TO9_OR_10 (   wfunc)
Value:
for (i = 0; i < height; i++) { \
for (j = 0; j < length; j++) { \
const int srcpx = srcPtr[j]; \
wfunc(&dstPtr2[j], (srcpx << (dst_depth - 8)) | (srcpx >> (16 - dst_depth))); \
} \
dstPtr2 += dstStride[plane] / 2; \
srcPtr += srcStride[plane]; \
}
int height
Definition: gxfenc.c:72
for(j=16;j >0;--j)

Referenced by planarCopyWrapper().

#define COPY16TO8 (   rfunc)
Value:
DITHER_COPY(dstPtr, dstStride[plane], W8, \
srcPtr2, srcStride[plane] / 2, rfunc, \
dither_8x8_256, 8, av_clip_uint8);
static const uint8_t dither_8x8_256[8][8]
#define W8(a, b)
#define DITHER_COPY(dst, dstStride, wfunc, src, srcStride, rfunc, dithers, shift, clip)

Referenced by planarCopyWrapper().

#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))
enum AVPixelFormat pix_fmt
Definition: movenc.c:843

Definition at line 983 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

#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:67
#define AV_PIX_FMT_BGR32_1
Definition: pixfmt.h:225
#define AV_PIX_FMT_BGR32
Definition: pixfmt.h:224
#define AV_PIX_FMT_RGB32_1
Definition: pixfmt.h:223
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:68
#define AV_PIX_FMT_RGB32
Definition: pixfmt.h:222

Referenced by ff_get_unscaled_swscale().

Typedef Documentation

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

Definition at line 573 of file swscale_unscaled.c.

Function Documentation

static void fillPlane ( uint8_t plane,
int  stride,
int  width,
int  height,
int  y,
uint8_t  val 
)
static
static void fill_plane9or10 ( uint8_t plane,
int  stride,
int  width,
int  height,
int  y,
uint8_t  val,
const int  dst_depth,
const int  big_endian 
)
static

Definition at line 100 of file swscale_unscaled.c.

Referenced by planarCopyWrapper().

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

Definition at line 121 of file swscale_unscaled.c.

Referenced by nv12ToPlanarWrapper(), planarToNv12Wrapper(), and yvu9ToYv12Wrapper().

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

Definition at line 138 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 158 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 179 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 191 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 203 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 215 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 227 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 244 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 258 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 275 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 289 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

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

Definition at line 297 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

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

Definition at line 306 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

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

Referenced by ff_get_unscaled_swscale().

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

Definition at line 342 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 388 of file swscale_unscaled.c.

Referenced by planarRgbToRgbWrapper().

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

Referenced by 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 435 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Referenced by 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 520 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

static rgbConvFn findRgbConvFn ( SwsContext c)
static

Definition at line 574 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale(), and 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 652 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 695 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 711 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 728 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 776 of file swscale_unscaled.c.

Referenced by 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 988 of file swscale_unscaled.c.

Referenced by sws_init_context().

static void reset_ptr ( const uint8_t src[],
int  format 
)
static

Definition at line 1125 of file swscale_unscaled.c.

Referenced by sws_scale().

static int check_image_pointers ( uint8_t data[4],
enum AVPixelFormat  pix_fmt,
const int  linesizes[4] 
)
static

Definition at line 1137 of file swscale_unscaled.c.

Referenced by sws_scale().

Variable Documentation

const uint8_t dither_8x8_1[8][8]
static
Initial value:
= {
{ 0, 1, 0, 1, 0, 1, 0, 1,},
{ 1, 0, 1, 0, 1, 0, 1, 0,},
{ 0, 1, 0, 1, 0, 1, 0, 1,},
{ 1, 0, 1, 0, 1, 0, 1, 0,},
{ 0, 1, 0, 1, 0, 1, 0, 1,},
{ 1, 0, 1, 0, 1, 0, 1, 0,},
{ 0, 1, 0, 1, 0, 1, 0, 1,},
{ 1, 0, 1, 0, 1, 0, 1, 0,},
}

Definition at line 37 of file swscale_unscaled.c.

const uint8_t dither_8x8_3[8][8]
static
Initial value:
= {
{ 1, 2, 1, 2, 1, 2, 1, 2,},
{ 3, 0, 3, 0, 3, 0, 3, 0,},
{ 1, 2, 1, 2, 1, 2, 1, 2,},
{ 3, 0, 3, 0, 3, 0, 3, 0,},
{ 1, 2, 1, 2, 1, 2, 1, 2,},
{ 3, 0, 3, 0, 3, 0, 3, 0,},
{ 1, 2, 1, 2, 1, 2, 1, 2,},
{ 3, 0, 3, 0, 3, 0, 3, 0,},
}

Definition at line 47 of file swscale_unscaled.c.

const uint8_t dither_8x8_64[8][8]
static
Initial value:
= {
{ 18, 34, 30, 46, 17, 33, 29, 45,},
{ 50, 2, 62, 14, 49, 1, 61, 13,},
{ 26, 42, 22, 38, 25, 41, 21, 37,},
{ 58, 10, 54, 6, 57, 9, 53, 5,},
{ 16, 32, 28, 44, 19, 35, 31, 47,},
{ 48, 0, 60, 12, 51, 3, 63, 15,},
{ 24, 40, 20, 36, 27, 43, 23, 39,},
{ 56, 8, 52, 4, 59, 11, 55, 7,},
}

Definition at line 57 of file swscale_unscaled.c.

const uint8_t dither_8x8_256[8][8]
static
Initial value:
= {
{ 72, 136, 120, 184, 68, 132, 116, 180,},
{ 200, 8, 248, 56, 196, 4, 244, 52,},
{ 104, 168, 88, 152, 100, 164, 84, 148,},
{ 232, 40, 216, 24, 228, 36, 212, 20,},
{ 64, 128, 102, 176, 76, 140, 124, 188,},
{ 192, 0, 240, 48, 204, 12, 252, 60,},
{ 96, 160, 80, 144, 108, 172, 92, 156,},
{ 224, 32, 208, 16, 236, 44, 220, 28,},
}

Definition at line 67 of file swscale_unscaled.c.