FFmpeg
Data Structures | Macros | Functions
swscale.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <stdarg.h>
#include "libavutil/cpu.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/avutil.h"
#include "libavutil/crc.h"
#include "libavutil/pixdesc.h"
#include "libavutil/lfg.h"
#include "libswscale/swscale.h"

Go to the source code of this file.

Data Structures

struct  Results
 

Macros

#define isGray(x)
 
#define hasChroma(x)
 
#define isALPHA(x)
 
#define W   96
 
#define H   96
 

Functions

static uint64_t getSSD (const uint8_t *src1, const uint8_t *src2, int stride1, int stride2, int w, int h)
 
static int doTest (const uint8_t *const ref[4], int refStride[4], int w, int h, enum AVPixelFormat srcFormat, enum AVPixelFormat dstFormat, int srcW, int srcH, int dstW, int dstH, int flags, struct Results *r)
 
static void selfTest (const uint8_t *const ref[4], int refStride[4], int w, int h, enum AVPixelFormat srcFormat_in, enum AVPixelFormat dstFormat_in)
 
static int fileTest (const uint8_t *const ref[4], int refStride[4], int w, int h, FILE *fp, enum AVPixelFormat srcFormat_in, enum AVPixelFormat dstFormat_in)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define isGray (   x)
Value:
((x) == AV_PIX_FMT_GRAY8 || \
(x) == AV_PIX_FMT_YA8 || \
(x) == AV_PIX_FMT_GRAY16BE || \
(x) == AV_PIX_FMT_GRAY16LE || \
(x) == AV_PIX_FMT_YA16BE || \
8 bits gray, 8 bits alpha
Definition: pixfmt.h:143
16 bits gray, 16 bits alpha (big-endian)
Definition: pixfmt.h:212
Y , 16bpp, big-endian.
Definition: pixfmt.h:97
Y , 8bpp.
Definition: pixfmt.h:74
Y , 16bpp, little-endian.
Definition: pixfmt.h:98
16 bits gray, 16 bits alpha (little-endian)
Definition: pixfmt.h:213

Definition at line 40 of file swscale.c.

Referenced by ff_init_filters(), ff_init_vscale(), ff_init_vscale_pfn(), ff_sws_alphablendaway(), sws_init_swscale(), and sws_setColorspaceDetails().

#define hasChroma (   x)
Value:
(!(isGray(x) || \
#define isGray(x)
Definition: swscale.c:40
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb...
Definition: pixfmt.h:76
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
Definition: pixfmt.h:75

Definition at line 47 of file swscale.c.

Referenced by doTest().

#define isALPHA (   x)
Value:
((x) == AV_PIX_FMT_BGR32 || \
(x) == AV_PIX_FMT_BGR32_1 || \
(x) == AV_PIX_FMT_RGB32 || \
(x) == AV_PIX_FMT_RGB32_1 || \
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:101
#define AV_PIX_FMT_BGR32_1
Definition: pixfmt.h:363
#define AV_PIX_FMT_BGR32
Definition: pixfmt.h:362
#define AV_PIX_FMT_RGB32
Definition: pixfmt.h:360
#define AV_PIX_FMT_RGB32_1
Definition: pixfmt.h:361

Definition at line 51 of file swscale.c.

Referenced by doTest(), ff_init_desc_chscale(), ff_init_desc_fmt_convert(), ff_init_desc_hscale(), ff_init_vscale(), ff_init_vscale_pfn(), ff_yuv2rgb_c_init_tables(), ff_yuv2rgb_get_func_ptr(), reset_ptr(), sws_init_context(), sws_scale(), sws_setColorspaceDetails(), and swscale().

#define W   96

Definition at line 358 of file swscale.c.

Referenced by main().

#define H   96

Definition at line 359 of file swscale.c.

Referenced by main().

Function Documentation

static uint64_t getSSD ( const uint8_t src1,
const uint8_t src2,
int  stride1,
int  stride2,
int  w,
int  h 
)
static

Definition at line 58 of file swscale.c.

Referenced by doTest().

static int doTest ( const uint8_t *const  ref[4],
int  refStride[4],
int  w,
int  h,
enum AVPixelFormat  srcFormat,
enum AVPixelFormat  dstFormat,
int  srcW,
int  srcH,
int  dstW,
int  dstH,
int  flags,
struct Results r 
)
static

Definition at line 83 of file swscale.c.

Referenced by fileTest(), and selfTest().

static void selfTest ( const uint8_t *const  ref[4],
int  refStride[4],
int  w,
int  h,
enum AVPixelFormat  srcFormat_in,
enum AVPixelFormat  dstFormat_in 
)
static

Definition at line 254 of file swscale.c.

Referenced by main().

static int fileTest ( const uint8_t *const  ref[4],
int  refStride[4],
int  w,
int  h,
FILE *  fp,
enum AVPixelFormat  srcFormat_in,
enum AVPixelFormat  dstFormat_in 
)
static

Definition at line 305 of file swscale.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 361 of file swscale.c.