libswscale/swscale.h File Reference

external api for the swscale stuff More...

#include "avutil.h"

Go to the source code of this file.

Data Structures

struct  SwsVector
struct  SwsFilter

Defines

#define AV_STRINGIFY(s)   AV_TOSTRING(s)
#define AV_TOSTRING(s)   #s
#define LIBSWSCALE_VERSION_INT   ((0<<16)+(5<<8)+0)
#define LIBSWSCALE_VERSION   0.5.0
#define LIBSWSCALE_BUILD   LIBSWSCALE_VERSION_INT
#define LIBSWSCALE_IDENT   "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
#define SWS_FAST_BILINEAR   1
#define SWS_BILINEAR   2
#define SWS_BICUBIC   4
#define SWS_X   8
#define SWS_POINT   0x10
#define SWS_AREA   0x20
#define SWS_BICUBLIN   0x40
#define SWS_GAUSS   0x80
#define SWS_SINC   0x100
#define SWS_LANCZOS   0x200
#define SWS_SPLINE   0x400
#define SWS_SRC_V_CHR_DROP_MASK   0x30000
#define SWS_SRC_V_CHR_DROP_SHIFT   16
#define SWS_PARAM_DEFAULT   123456
#define SWS_PRINT_INFO   0x1000
#define SWS_FULL_CHR_H_INT   0x2000
#define SWS_FULL_CHR_H_INP   0x4000
#define SWS_DIRECT_BGR   0x8000
#define SWS_ACCURATE_RND   0x40000
#define SWS_CPU_CAPS_MMX   0x80000000
#define SWS_CPU_CAPS_MMX2   0x20000000
#define SWS_CPU_CAPS_3DNOW   0x40000000
#define SWS_CPU_CAPS_ALTIVEC   0x10000000
#define SWS_CPU_CAPS_BFIN   0x01000000
#define SWS_MAX_REDUCE_CUTOFF   0.002
#define SWS_CS_ITU709   1
#define SWS_CS_FCC   4
#define SWS_CS_ITU601   5
#define SWS_CS_ITU624   5
#define SWS_CS_SMPTE170M   5
#define SWS_CS_SMPTE240M   7
#define SWS_CS_DEFAULT   5

Functions

void sws_freeContext (struct SwsContext *swsContext)
struct SwsContextsws_getContext (int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param)
int sws_scale (struct SwsContext *context, uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
 swscale wrapper, so we don't need to export the SwsContext.
int sws_scale_ordered (struct SwsContext *context, uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]) attribute_deprecated
 swscale wrapper, so we don't need to export the SwsContext
int sws_setColorspaceDetails (struct SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation)
int sws_getColorspaceDetails (struct SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation)
SwsVectorsws_getGaussianVec (double variance, double quality)
 returns a normalized gaussian curve used to filter stuff quality=3 is high quality, lowwer is lowwer quality
SwsVectorsws_getConstVec (double c, int length)
SwsVectorsws_getIdentityVec (void)
void sws_scaleVec (SwsVector *a, double scalar)
void sws_normalizeVec (SwsVector *a, double height)
void sws_convVec (SwsVector *a, SwsVector *b)
void sws_addVec (SwsVector *a, SwsVector *b)
void sws_subVec (SwsVector *a, SwsVector *b)
void sws_shiftVec (SwsVector *a, int shift)
SwsVectorsws_cloneVec (SwsVector *a)
void sws_printVec (SwsVector *a)
void sws_freeVec (SwsVector *a)
SwsFiltersws_getDefaultFilter (float lumaGBlur, float chromaGBlur, float lumaSarpen, float chromaSharpen, float chromaHShift, float chromaVShift, int verbose)
void sws_freeFilter (SwsFilter *filter)
struct SwsContextsws_getCachedContext (struct SwsContext *context, int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param)
 Checks if context is valid or reallocs a new one instead.


Detailed Description

external api for the swscale stuff

Definition in file swscale.h.


Define Documentation

#define AV_STRINGIFY (  )     AV_TOSTRING(s)

Definition at line 32 of file swscale.h.

#define AV_TOSTRING (  )     #s

Definition at line 33 of file swscale.h.

#define LIBSWSCALE_BUILD   LIBSWSCALE_VERSION_INT

Definition at line 37 of file swscale.h.

#define LIBSWSCALE_IDENT   "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)

Definition at line 39 of file swscale.h.

#define LIBSWSCALE_VERSION   0.5.0

Definition at line 36 of file swscale.h.

#define LIBSWSCALE_VERSION_INT   ((0<<16)+(5<<8)+0)

Definition at line 35 of file swscale.h.

#define SWS_ACCURATE_RND   0x40000

Definition at line 67 of file swscale.h.

Referenced by swScale_TMPL(), yuv2packedX_TMPL(), and yuv2yuvX_TMPL().

#define SWS_AREA   0x20

Definition at line 47 of file swscale.h.

#define SWS_BICUBIC   4

Definition at line 44 of file swscale.h.

#define SWS_BICUBLIN   0x40

Definition at line 48 of file swscale.h.

#define SWS_BILINEAR   2

Definition at line 43 of file swscale.h.

#define SWS_CPU_CAPS_3DNOW   0x40000000

Definition at line 71 of file swscale.h.

Referenced by args_parse(), and sws_rgb2rgb_init().

#define SWS_CPU_CAPS_ALTIVEC   0x10000000

Definition at line 72 of file swscale.h.

Referenced by yuv2rgb_get_func_ptr(), and yuv2rgb_init_altivec().

#define SWS_CPU_CAPS_BFIN   0x01000000

Definition at line 73 of file swscale.h.

Referenced by ff_bfin_get_unscaled_swscale(), and yuv2rgb_get_func_ptr().

#define SWS_CPU_CAPS_MMX   0x80000000

Definition at line 69 of file swscale.h.

Referenced by args_parse(), main(), sws_rgb2rgb_init(), and yuv2rgb_get_func_ptr().

#define SWS_CPU_CAPS_MMX2   0x20000000

Definition at line 70 of file swscale.h.

Referenced by args_parse(), sws_rgb2rgb_init(), and yuv2rgb_get_func_ptr().

#define SWS_CS_DEFAULT   5

Definition at line 83 of file swscale.h.

#define SWS_CS_FCC   4

Definition at line 78 of file swscale.h.

#define SWS_CS_ITU601   5

Definition at line 79 of file swscale.h.

#define SWS_CS_ITU624   5

Definition at line 80 of file swscale.h.

#define SWS_CS_ITU709   1

Definition at line 77 of file swscale.h.

#define SWS_CS_SMPTE170M   5

Definition at line 81 of file swscale.h.

#define SWS_CS_SMPTE240M   7

Definition at line 82 of file swscale.h.

#define SWS_DIRECT_BGR   0x8000

Definition at line 66 of file swscale.h.

#define SWS_FAST_BILINEAR   1

Definition at line 42 of file swscale.h.

Referenced by hcscale_TMPL(), and hyscale_TMPL().

#define SWS_FULL_CHR_H_INP   0x4000

Definition at line 65 of file swscale.h.

#define SWS_FULL_CHR_H_INT   0x2000

Definition at line 63 of file swscale.h.

Referenced by yuv2packed2_TMPL().

#define SWS_GAUSS   0x80

Definition at line 49 of file swscale.h.

#define SWS_LANCZOS   0x200

Definition at line 51 of file swscale.h.

#define SWS_MAX_REDUCE_CUTOFF   0.002

Definition at line 75 of file swscale.h.

#define SWS_PARAM_DEFAULT   123456

Definition at line 57 of file swscale.h.

#define SWS_POINT   0x10

Definition at line 46 of file swscale.h.

#define SWS_PRINT_INFO   0x1000

Definition at line 59 of file swscale.h.

Referenced by swScale_TMPL().

#define SWS_SINC   0x100

Definition at line 50 of file swscale.h.

#define SWS_SPLINE   0x400

Definition at line 52 of file swscale.h.

#define SWS_SRC_V_CHR_DROP_MASK   0x30000

Definition at line 54 of file swscale.h.

#define SWS_SRC_V_CHR_DROP_SHIFT   16

Definition at line 55 of file swscale.h.

#define SWS_X   8

Definition at line 45 of file swscale.h.


Function Documentation

void sws_addVec ( SwsVector a,
SwsVector b 
)

Definition at line 2749 of file swscale.c.

SwsVector* sws_cloneVec ( SwsVector a  ) 

Definition at line 2773 of file swscale.c.

void sws_convVec ( SwsVector a,
SwsVector b 
)

Definition at line 2765 of file swscale.c.

void sws_freeContext ( struct SwsContext swsContext  ) 

Definition at line 2828 of file swscale.c.

Referenced by av_encode(), doTest(), and Release().

void sws_freeFilter ( SwsFilter filter  ) 

Definition at line 2817 of file swscale.c.

void sws_freeVec ( SwsVector a  ) 

Definition at line 2809 of file swscale.c.

struct SwsContext* sws_getCachedContext ( struct SwsContext context,
int  srcW,
int  srcH,
int  srcFormat,
int  dstW,
int  dstH,
int  dstFormat,
int  flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
double *  param 
) [read]

Checks if context is valid or reallocs a new one instead.

If context is NULL, just calls sws_getContext() to get a new one. Otherwise, checks if the parameters are the same already saved in context. If that is the case, returns the current context. Otherwise, frees context and gets a new one.

Be warned that srcFilter, dstFilter are not checked, they are asumed to remain valid.

Definition at line 2914 of file swscale.c.

Referenced by get_watermark_picture(), Process(), Process0(), Process1(), and queue_picture().

int sws_getColorspaceDetails ( SwsContext c,
int **  inv_table,
int *  srcRange,
int **  table,
int *  dstRange,
int *  brightness,
int *  contrast,
int *  saturation 
)

Returns:
-1 if not supported

Definition at line 1947 of file swscale.c.

SwsVector* sws_getConstVec ( double  c,
int  length 
)

Definition at line 2625 of file swscale.c.

struct SwsContext* sws_getContext ( int  srcW,
int  srcH,
int  srcFormat,
int  dstW,
int  dstH,
int  dstFormat,
int  flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
double *  param 
) [read]

Definition at line 1981 of file swscale.c.

Referenced by av_encode(), doTest(), main(), and write_video_frame().

SwsFilter* sws_getDefaultFilter ( float  lumaGBlur,
float  chromaGBlur,
float  lumaSarpen,
float  chromaSharpen,
float  chromaHShift,
float  chromaVShift,
int  verbose 
)

Definition at line 2542 of file swscale.c.

SwsVector* sws_getGaussianVec ( double  variance,
double  quality 
)

returns a normalized gaussian curve used to filter stuff quality=3 is high quality, lowwer is lowwer quality

Definition at line 2604 of file swscale.c.

SwsVector* sws_getIdentityVec ( void   ) 

Definition at line 2640 of file swscale.c.

void sws_normalizeVec ( SwsVector a,
double  height 
)

Definition at line 2661 of file swscale.c.

void sws_printVec ( SwsVector a  ) 

Definition at line 2786 of file swscale.c.

int sws_scale ( SwsContext c,
uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)

swscale wrapper, so we don't need to export the SwsContext.

assumes planar YUV to be in YUV order instead of YVU

Definition at line 2484 of file swscale.c.

Referenced by do_video_out(), doTest(), get_watermark_picture(), main(), Process(), Process0(), Process1(), queue_picture(), and write_video_frame().

int sws_scale_ordered ( struct SwsContext context,
uint8_t src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t dst[],
int  dstStride[] 
)

swscale wrapper, so we don't need to export the SwsContext

Definition at line 2537 of file swscale.c.

void sws_scaleVec ( SwsVector a,
double  scalar 
)

Definition at line 2654 of file swscale.c.

Referenced by sws_diffVec().

int sws_setColorspaceDetails ( SwsContext c,
const int  inv_table[4],
int  srcRange,
const int  table[4],
int  dstRange,
int  brightness,
int  contrast,
int  saturation 
)

Parameters:
inv_table the yuv2rgb coeffs, normally Inverse_Table_6_9[x]
fullRange if 1 then the luma range is 0..255 if 0 it is 16..235
Returns:
-1 if not supported

Definition at line 1888 of file swscale.c.

void sws_shiftVec ( SwsVector a,
int  shift 
)

Definition at line 2741 of file swscale.c.

void sws_subVec ( SwsVector a,
SwsVector b 
)

Definition at line 2757 of file swscale.c.


Generated on Thu Apr 2 07:16:14 2009 for ffmpeg by  doxygen 1.5.6