libswscale/swscale_internal.h File Reference

#include "config.h"
#include "libavutil/avutil.h"

Go to the source code of this file.

Data Structures

struct  SwsContext

Defines

#define STR(s)   AV_TOSTRING(s)
#define FAST_BGR2YV12
#define MAX_FILTER_SIZE   256
#define DITHER1XBPP
#define ALT32_CORR   1
#define APCK_PTR2   4
#define APCK_COEF   8
#define APCK_SIZE   16
#define RED_DITHER   "0*8"
#define GREEN_DITHER   "1*8"
#define BLUE_DITHER   "2*8"
#define Y_COEFF   "3*8"
#define VR_COEFF   "4*8"
#define UB_COEFF   "5*8"
#define VG_COEFF   "6*8"
#define UG_COEFF   "7*8"
#define Y_OFFSET   "8*8"
#define U_OFFSET   "9*8"
#define V_OFFSET   "10*8"
#define LUM_MMX_FILTER_OFFSET   "11*8"
#define CHR_MMX_FILTER_OFFSET   "11*8+4*4*256"
#define DSTW_OFFSET   "11*8+4*4*256*2"
#define ESP_OFFSET   "11*8+4*4*256*2+8"
#define VROUNDER_OFFSET   "11*8+4*4*256*2+16"
#define U_TEMP   "11*8+4*4*256*2+24"
#define V_TEMP   "11*8+4*4*256*2+32"
#define Y_TEMP   "11*8+4*4*256*2+40"
#define ALP_MMX_FILTER_OFFSET   "11*8+4*4*256*2+48"
#define UV_OFF   "11*8+4*4*256*3+48"
#define UV_OFFx2   "11*8+4*4*256*3+56"
#define DITHER16   "11*8+4*4*256*3+64"
#define DITHER32   "11*8+4*4*256*3+64+16"
#define is16BPS(x)
#define isNBPS(x)
#define is9_OR_10BPS   isNBPS
#define isBE(x)   ((x)&1)
#define isPlanar8YUV(x)
#define isPlanarYUV(x)
#define isYUV(x)
#define isGray(x)
#define isGray16(x)
#define isRGBinInt(x)
#define isBGRinInt(x)
#define isRGBinBytes(x)
#define isBGRinBytes(x)
#define isAnyRGB(x)
#define isALPHA(x)
#define isPacked(x)
#define usePal(x)   ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_GRAY8A)

Typedefs

typedef int(* SwsFunc )(struct SwsContext *context, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
typedef void(* yuv2planar1_fn )(struct SwsContext *c, const int16_t *lumSrc, const int16_t *chrUSrc, const int16_t *chrVSrc, const int16_t *alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW, const uint8_t *lumDither, const uint8_t *chrDither)
typedef void(* yuv2planarX_fn )(struct SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW, const uint8_t *lumDither, const uint8_t *chrDither)
typedef void(* yuv2packed1_fn )(struct SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int dstFormat, int flags, int y)
typedef void(* yuv2packed2_fn )(struct SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
typedef void(* yuv2packedX_fn )(struct SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)

Functions

SwsFunc ff_yuv2rgb_get_func_ptr (SwsContext *c)
int ff_yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation)
void ff_yuv2rgb_init_tables_altivec (SwsContext *c, const int inv_table[4], int brightness, int contrast, int saturation)
void updateMMXDitherTables (SwsContext *c, int dstY, int lumBufIndex, int chrBufIndex, int lastInLumBuf, int lastInChrBuf)
SwsFunc ff_yuv2rgb_init_mmx (SwsContext *c)
SwsFunc ff_yuv2rgb_init_vis (SwsContext *c)
SwsFunc ff_yuv2rgb_init_mlib (SwsContext *c)
SwsFunc ff_yuv2rgb_init_altivec (SwsContext *c)
SwsFunc ff_yuv2rgb_get_func_ptr_bfin (SwsContext *c)
void ff_bfin_get_unscaled_swscale (SwsContext *c)
void ff_get_unscaled_swscale (SwsContext *c)
 Sets c->swScale to an unscaled converter if one exists for the specific source and destination formats, bit depths, flags, etc.
void ff_swscale_get_unscaled_altivec (SwsContext *c)
SwsFunc ff_getSwsFunc (SwsContext *c)
 Returns function pointer to fastest main scaler path function depending on architecture and available optimizations.
void ff_sws_init_swScale_altivec (SwsContext *c)
void ff_sws_init_swScale_mmx (SwsContext *c)

Variables

const uint64_t ff_dither4 [2]
const uint64_t ff_dither8 [2]
const uint8_t dithers [8][8][8]
const uint16_t dither_scale [15][16]
const AVClass sws_context_class


Define Documentation

#define ALP_MMX_FILTER_OFFSET   "11*8+4*4*256*2+48"

#define ALT32_CORR   1

Definition at line 43 of file swscale_internal.h.

Referenced by rgbToRgbWrapper().

#define APCK_COEF   8

Definition at line 52 of file swscale_internal.h.

Referenced by DECLARE_ASM_CONST().

#define APCK_PTR2   4

Definition at line 51 of file swscale_internal.h.

Referenced by DECLARE_ASM_CONST().

#define APCK_SIZE   16

Definition at line 53 of file swscale_internal.h.

Referenced by DECLARE_ASM_CONST(), and initFilter().

#define BLUE_DITHER   "2*8"

#define CHR_MMX_FILTER_OFFSET   "11*8+4*4*256"

Definition at line 225 of file swscale_internal.h.

Referenced by yuv2yuvX_ar_TMPL(), and yuv2yuvX_TMPL().

#define DITHER16   "11*8+4*4*256*3+64"

Definition at line 235 of file swscale_internal.h.

#define DITHER1XBPP

Definition at line 38 of file swscale_internal.h.

Referenced by sws_init_context().

#define DITHER32   "11*8+4*4*256*3+64+16"

Definition at line 236 of file swscale_internal.h.

#define DSTW_OFFSET   "11*8+4*4*256*2"

Definition at line 226 of file swscale_internal.h.

#define ESP_OFFSET   "11*8+4*4*256*2+8"

#define FAST_BGR2YV12

Definition at line 34 of file swscale_internal.h.

#define GREEN_DITHER   "1*8"

#define is16BPS (  ) 

#define is9_OR_10BPS   isNBPS

#define isALPHA (  ) 

Value:

(           \
           (x)==PIX_FMT_BGR32       \
        || (x)==PIX_FMT_BGR32_1     \
        || (x)==PIX_FMT_RGB32       \
        || (x)==PIX_FMT_RGB32_1     \
        || (x)==PIX_FMT_PAL8        \
        || (x)==PIX_FMT_GRAY8A      \
        || (x)==PIX_FMT_YUVA420P    \
    )

Definition at line 488 of file swscale_internal.h.

#define isAnyRGB (  ) 

Value:

(           \
            isRGBinInt(x)           \
        ||  isBGRinInt(x)           \
    )

Definition at line 484 of file swscale_internal.h.

Referenced by ff_get_unscaled_swscale(), hcscale(), hyscale(), sws_init_context(), and sws_init_swScale_c().

#define isBE (  )     ((x)&1)

Definition at line 386 of file swscale_internal.h.

Referenced by find_c_packed_planar_out_funcs(), and planarCopyWrapper().

#define isBGRinBytes (  ) 

Value:

(           \
           (x)==PIX_FMT_BGR48BE     \
        || (x)==PIX_FMT_BGR48LE     \
        || (x)==PIX_FMT_BGRA        \
        || (x)==PIX_FMT_ABGR        \
        || (x)==PIX_FMT_BGR24       \
    )

Definition at line 477 of file swscale_internal.h.

#define isBGRinInt (  ) 

Value:

(           \
           (x)==PIX_FMT_BGR48BE     \
        || (x)==PIX_FMT_BGR48LE     \
        || (x)==PIX_FMT_BGR32       \
        || (x)==PIX_FMT_BGR32_1     \
        || (x)==PIX_FMT_BGR24       \
        || (x)==PIX_FMT_BGR565BE    \
        || (x)==PIX_FMT_BGR565LE    \
        || (x)==PIX_FMT_BGR555BE    \
        || (x)==PIX_FMT_BGR555LE    \
        || (x)==PIX_FMT_BGR444BE    \
        || (x)==PIX_FMT_BGR444LE    \
        || (x)==PIX_FMT_BGR8        \
        || (x)==PIX_FMT_BGR4        \
        || (x)==PIX_FMT_BGR4_BYTE   \
        || (x)==PIX_FMT_MONOBLACK   \
        || (x)==PIX_FMT_MONOWHITE   \
    )

Definition at line 452 of file swscale_internal.h.

Referenced by rgbToRgbWrapper().

#define isGray (  ) 

Value:

(           \
           (x)==PIX_FMT_GRAY8       \
        || (x)==PIX_FMT_GRAY8A      \
        || (x)==PIX_FMT_GRAY16BE    \
        || (x)==PIX_FMT_GRAY16LE    \
    )

Definition at line 424 of file swscale_internal.h.

#define isGray16 (  ) 

Value:

(           \
           (x)==PIX_FMT_GRAY16BE    \
        || (x)==PIX_FMT_GRAY16LE    \
    )

Definition at line 430 of file swscale_internal.h.

#define isNBPS (  ) 

#define isPacked (  ) 

Value:

(       \
           (x)==PIX_FMT_PAL8        \
        || (x)==PIX_FMT_YUYV422     \
        || (x)==PIX_FMT_UYVY422     \
        || (x)==PIX_FMT_Y400A       \
        || isAnyRGB(x)              \
    )

Definition at line 497 of file swscale_internal.h.

Referenced by ff_get_unscaled_swscale(), swScale(), and swScale_c().

#define isPlanar8YUV (  ) 

Value:

(           \
           (x)==PIX_FMT_YUV410P     \
        || (x)==PIX_FMT_YUV420P     \
        || (x)==PIX_FMT_YUVA420P    \
        || (x)==PIX_FMT_YUV411P     \
        || (x)==PIX_FMT_YUV422P     \
        || (x)==PIX_FMT_YUV444P     \
        || (x)==PIX_FMT_YUV440P     \
        || (x)==PIX_FMT_NV12        \
        || (x)==PIX_FMT_NV21        \
    )

Definition at line 387 of file swscale_internal.h.

#define isPlanarYUV (  ) 

#define isRGBinBytes (  ) 

Value:

(           \
           (x)==PIX_FMT_RGB48BE     \
        || (x)==PIX_FMT_RGB48LE     \
        || (x)==PIX_FMT_RGBA        \
        || (x)==PIX_FMT_ARGB        \
        || (x)==PIX_FMT_RGB24       \
    )

Definition at line 470 of file swscale_internal.h.

#define isRGBinInt (  ) 

Value:

(           \
           (x)==PIX_FMT_RGB48BE     \
        || (x)==PIX_FMT_RGB48LE     \
        || (x)==PIX_FMT_RGB32       \
        || (x)==PIX_FMT_RGB32_1     \
        || (x)==PIX_FMT_RGB24       \
        || (x)==PIX_FMT_RGB565BE    \
        || (x)==PIX_FMT_RGB565LE    \
        || (x)==PIX_FMT_RGB555BE    \
        || (x)==PIX_FMT_RGB555LE    \
        || (x)==PIX_FMT_RGB444BE    \
        || (x)==PIX_FMT_RGB444LE    \
        || (x)==PIX_FMT_RGB8        \
        || (x)==PIX_FMT_RGB4        \
        || (x)==PIX_FMT_RGB4_BYTE   \
        || (x)==PIX_FMT_MONOBLACK   \
        || (x)==PIX_FMT_MONOWHITE   \
    )

Definition at line 434 of file swscale_internal.h.

Referenced by rgbToRgbWrapper().

#define isYUV (  ) 

Value:

(           \
           (x)==PIX_FMT_UYVY422     \
        || (x)==PIX_FMT_YUYV422     \
        || isPlanarYUV(x)           \
    )

Definition at line 419 of file swscale_internal.h.

Referenced by sws_getColorspaceDetails(), and sws_setColorspaceDetails().

#define LUM_MMX_FILTER_OFFSET   "11*8"

Definition at line 224 of file swscale_internal.h.

Referenced by yuv2yuvX_ar_TMPL(), and yuv2yuvX_TMPL().

#define MAX_FILTER_SIZE   256

Definition at line 36 of file swscale_internal.h.

Referenced by initFilter().

#define RED_DITHER   "0*8"

#define STR (  )     AV_TOSTRING(s)

Definition at line 32 of file swscale_internal.h.

Referenced by av_register_all().

#define U_OFFSET   "9*8"

Definition at line 222 of file swscale_internal.h.

#define U_TEMP   "11*8+4*4*256*2+24"

Definition at line 229 of file swscale_internal.h.

Referenced by yuv2rgb32_2_TMPL(), and yuv2rgb32_X_ar_TMPL().

#define UB_COEFF   "5*8"

Definition at line 218 of file swscale_internal.h.

#define UG_COEFF   "7*8"

Definition at line 220 of file swscale_internal.h.

#define usePal (  )     ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_GRAY8A)

Definition at line 504 of file swscale_internal.h.

Referenced by ff_get_unscaled_swscale(), palToRgbWrapper(), reset_ptr(), and sws_scale().

#define UV_OFF   "11*8+4*4*256*3+48"

Definition at line 233 of file swscale_internal.h.

#define UV_OFFx2   "11*8+4*4*256*3+56"

Definition at line 234 of file swscale_internal.h.

#define V_OFFSET   "10*8"

Definition at line 223 of file swscale_internal.h.

#define V_TEMP   "11*8+4*4*256*2+32"

Definition at line 230 of file swscale_internal.h.

Referenced by yuv2rgb32_2_TMPL(), and yuv2rgb32_X_ar_TMPL().

#define VG_COEFF   "6*8"

Definition at line 219 of file swscale_internal.h.

#define VR_COEFF   "4*8"

Definition at line 217 of file swscale_internal.h.

#define VROUNDER_OFFSET   "11*8+4*4*256*2+16"

Definition at line 228 of file swscale_internal.h.

#define Y_COEFF   "3*8"

Definition at line 216 of file swscale_internal.h.

#define Y_OFFSET   "8*8"

Definition at line 221 of file swscale_internal.h.

#define Y_TEMP   "11*8+4*4*256*2+40"

Definition at line 231 of file swscale_internal.h.

Referenced by yuv2rgb32_X_ar_TMPL().


Typedef Documentation

typedef int(* SwsFunc)(struct SwsContext *context, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])

Definition at line 58 of file swscale_internal.h.

typedef void(* yuv2packed1_fn)(struct SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int dstFormat, int flags, int y)

Definition at line 76 of file swscale_internal.h.

typedef void(* yuv2packed2_fn)(struct SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)

Definition at line 83 of file swscale_internal.h.

typedef void(* yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int dstY)

Definition at line 90 of file swscale_internal.h.

typedef void(* yuv2planar1_fn)(struct SwsContext *c, const int16_t *lumSrc, const int16_t *chrUSrc, const int16_t *chrVSrc, const int16_t *alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW, const uint8_t *lumDither, const uint8_t *chrDither)

Definition at line 62 of file swscale_internal.h.

typedef void(* yuv2planarX_fn)(struct SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW, const uint8_t *lumDither, const uint8_t *chrDither)

Definition at line 68 of file swscale_internal.h.


Function Documentation

void ff_bfin_get_unscaled_swscale ( SwsContext c  ) 

Definition at line 79 of file swscale_bfin.c.

Referenced by ff_get_unscaled_swscale().

void ff_get_unscaled_swscale ( SwsContext c  ) 

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

Definition at line 550 of file swscale_unscaled.c.

Referenced by sws_init_context().

SwsFunc ff_getSwsFunc ( SwsContext c  ) 

Returns function pointer to fastest main scaler path function depending on architecture and available optimizations.

Definition at line 2598 of file swscale.c.

Referenced by sws_init_context().

void ff_sws_init_swScale_altivec ( SwsContext c  ) 

Definition at line 404 of file swscale_altivec.c.

Referenced by ff_getSwsFunc().

void ff_sws_init_swScale_mmx ( SwsContext c  ) 

Definition at line 217 of file swscale_mmx.c.

Referenced by ff_getSwsFunc().

void ff_swscale_get_unscaled_altivec ( SwsContext c  ) 

Definition at line 179 of file yuv2yuv_altivec.c.

Referenced by ff_get_unscaled_swscale().

int ff_yuv2rgb_c_init_tables ( SwsContext c,
const int  inv_table[4],
int  fullRange,
int  brightness,
int  contrast,
int  saturation 
)

Definition at line 592 of file yuv2rgb.c.

Referenced by sws_setColorspaceDetails().

SwsFunc ff_yuv2rgb_get_func_ptr ( SwsContext c  ) 

Definition at line 506 of file yuv2rgb.c.

Referenced by ff_get_unscaled_swscale().

SwsFunc ff_yuv2rgb_get_func_ptr_bfin ( SwsContext c  ) 

Definition at line 185 of file yuv2rgb_bfin.c.

Referenced by ff_yuv2rgb_get_func_ptr().

SwsFunc ff_yuv2rgb_init_altivec ( SwsContext c  ) 

Definition at line 544 of file yuv2rgb_altivec.c.

Referenced by ff_yuv2rgb_get_func_ptr().

SwsFunc ff_yuv2rgb_init_mlib ( SwsContext c  ) 

Definition at line 80 of file yuv2rgb_mlib.c.

Referenced by ff_yuv2rgb_get_func_ptr().

SwsFunc ff_yuv2rgb_init_mmx ( SwsContext c  ) 

Referenced by ff_yuv2rgb_get_func_ptr().

void ff_yuv2rgb_init_tables_altivec ( SwsContext c,
const int  inv_table[4],
int  brightness,
int  contrast,
int  saturation 
)

Definition at line 604 of file yuv2rgb_altivec.c.

Referenced by sws_setColorspaceDetails().

SwsFunc ff_yuv2rgb_init_vis ( SwsContext c  ) 

Definition at line 189 of file yuv2rgb_vis.c.

Referenced by ff_yuv2rgb_get_func_ptr().

void updateMMXDitherTables ( SwsContext c,
int  dstY,
int  lumBufIndex,
int  chrBufIndex,
int  lastInLumBuf,
int  lastInChrBuf 
)

Referenced by swScale(), and swScale_c().


Variable Documentation

const uint16_t dither_scale[15][16]

Definition at line 274 of file swscale.c.

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

Definition at line 197 of file swscale.c.

Referenced by swScale(), and swScale_c().

const uint64_t ff_dither4[2]

const uint64_t ff_dither8[2]

Definition at line 43 of file swscale_mmx.c.

Referenced by DECLARE_ASM_CONST(), yuv420_rgb15_TMPL(), and yuv420_rgb16_TMPL().

Definition at line 69 of file options.c.

Referenced by sws_alloc_context().


Generated on Fri Oct 26 02:38:22 2012 for FFmpeg by  doxygen 1.5.8