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 isRGBA32(x)
#define IS_NOT_NE(bpp, fmt)
#define CONV_IS(src, dst)   (srcFormat == PIX_FMT_##src && dstFormat == 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)

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 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 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.
static void reset_ptr (const uint8_t *src[], int format)
static int check_image_pointers (uint8_t *data[4], enum PixelFormat 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.
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.
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.

Variables

const uint8_t dither_8x8_1 [8][8]
const uint8_t dither_8x8_3 [8][8]
const uint8_t dither_8x8_64 [8][8]
const uint8_t dither_8x8_128 [8][8]
const uint8_t dither_8x8_256 [8][8]

Macro Definition Documentation

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

Definition at line 82 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 81 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 80 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 536 of file swscale_unscaled.c.

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

Definition at line 535 of file swscale_unscaled.c.

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

Referenced by findRgbConvFn().

#define COPY16TO8 (   rfunc)
Value:
DITHER_COPY(dstPtr, dstStride[plane], W8, \
srcPtr2, srcStride[plane] / 2, rfunc, \
dither_8x8_256, 8, av_clip_uint8);

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, \
}

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]; \
}

Referenced by planarCopyWrapper().

#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; \
}

Referenced by planarCopyWrapper().

#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); \
}

Referenced by planarCopyWrapper().

#define COPY9_OR_10TO9_OR_10 (   loop)
Value:
for (i = 0; i < height; i++) { \
for (j = 0; j < length; j++) { \
loop; \
} \
dstPtr2 += dstStride[plane] / 2; \
srcPtr2 += srcStride[plane] / 2; \
}
#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]))); \
}

Referenced by planarCopyWrapper().

#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; \
}

Definition at line 537 of file swscale_unscaled.c.

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

Definition at line 85 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 84 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 83 of file swscale_unscaled.c.

Referenced by sws_scale().

#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))

Definition at line 754 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

#define IS_NOT_NE (   bpp,
  fmt 
)
Value:
(((bpp + 7) >> 3) == 2 && \

Referenced by findRgbConvFn().

#define isRGBA32 (   x)
Value:
( \
(x) == PIX_FMT_ARGB \
|| (x) == PIX_FMT_RGBA \
|| (x) == PIX_FMT_BGRA \
|| (x) == PIX_FMT_ABGR \
)

Definition at line 347 of file swscale_unscaled.c.

Referenced by findRgbConvFn(), and rgbToRgbWrapper().

#define RGB2YUV_SHIFT   15

Definition at line 79 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 88 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 87 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 86 of file swscale_unscaled.c.

Referenced by sws_scale().

#define W8 (   a,
  b 
)    { *(a) = (b); }

Typedef Documentation

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

Definition at line 355 of file swscale_unscaled.c.

Function Documentation

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

Definition at line 475 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 886 of file swscale_unscaled.c.

Referenced by sws_scale().

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

Definition at line 101 of file swscale_unscaled.c.

Referenced by planarToNv12Wrapper(), and yvu9ToYv12Wrapper().

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

Referenced by sws_init_context().

static void fillPlane ( uint8_t *  plane,
int  stride,
int  width,
int  height,
int  y,
uint8_t  val 
)
static
static rgbConvFn findRgbConvFn ( SwsContext c)
static

Definition at line 356 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale(), and rgbToRgbWrapper().

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

Definition at line 265 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

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

Definition at line 248 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 256 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 279 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 508 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 301 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 556 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 118 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 150 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 138 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

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

Definition at line 874 of file swscale_unscaled.c.

Referenced by sws_scale().

static int rgbToRgbWrapper ( 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().

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.

With the palette format "ABCD", the destination frame ends up with the format "ABC".

Parameters
srcsource frame buffer
dstdestination frame buffer
num_pixelsnumber of pixels to convert
palettearray with [256] entries, which must match color arrangement (RGB or BGR) of src

Definition at line 1056 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

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.

The output frame will have the same packed format as the palette.

Parameters
srcsource frame buffer
dstdestination frame buffer
num_pixelsnumber of pixels to convert
palettearray with [256] entries, which must match color arrangement (RGB or BGR) of src

Definition at line 1046 of file swscale_unscaled.c.

Referenced by palToRgbWrapper().

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.

Scale the image slice in srcSlice and put the resulting scaled slice in the image in dst.

Assumes planar YUV to be in YUV order instead of YVU.

Definition at line 905 of file swscale_unscaled.c.

Referenced by do_video_out(), do_video_resample(), doTest(), draw_slice(), main(), queue_picture(), and write_video_frame().

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

Definition at line 217 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 234 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 174 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 162 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 186 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 203 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 491 of file swscale_unscaled.c.

Referenced by ff_get_unscaled_swscale().

Variable Documentation

const uint8_t dither_8x8_1[8][8]
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_128[8][8]

Definition at line 152 of file swscale.c.

Referenced by swScale().

const uint8_t dither_8x8_256[8][8]
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 68 of file swscale_unscaled.c.

const uint8_t dither_8x8_3[8][8]
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]
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.