swscale-test.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <stdarg.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 "swscale.h"
Include dependency graph for swscale-test.c:

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 (uint8_t *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 (uint8_t *ref[4], int refStride[4], int w, int h, enum AVPixelFormat srcFormat_in, enum AVPixelFormat dstFormat_in)
 
static int fileTest (uint8_t *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 H   96

Definition at line 342 of file swscale-test.c.

Referenced by for(), idct(), initPv(), and main().

#define hasChroma (   x)
Value:
(!(isGray(x) || \
Discrete Time axis x
#define isGray(x)
Definition: swscale-test.c:38
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb...
Definition: pixfmt.h:78
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
Definition: pixfmt.h:77

Definition at line 43 of file swscale-test.c.

Referenced by doTest().

#define isALPHA (   x)
Value:
((x) == AV_PIX_FMT_BGR32 || \
(x) == AV_PIX_FMT_RGB32 || \
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:105
Discrete Time axis x
#define AV_PIX_FMT_BGR32_1
Definition: pixfmt.h:262
#define AV_PIX_FMT_BGR32
Definition: pixfmt.h:261
#define AV_PIX_FMT_RGB32
Definition: pixfmt.h:259
#define AV_PIX_FMT_RGB32_1
Definition: pixfmt.h:260

Definition at line 47 of file swscale-test.c.

Referenced by doTest(), ff_yuv2rgb_c_init_tables(), ff_yuv2rgb_get_func_ptr(), reset_ptr(), sws_init_context(), sws_scale(), and swScale().

#define isGray (   x)
Value:
((x) == AV_PIX_FMT_GRAY8 || \
(x) == AV_PIX_FMT_Y400A || \
Discrete Time axis x
Y , 16bpp, big-endian.
Definition: pixfmt.h:101
#define AV_PIX_FMT_Y400A
Definition: pixfmt.h:250
Y , 8bpp.
Definition: pixfmt.h:76
Y , 16bpp, little-endian.
Definition: pixfmt.h:102

Definition at line 38 of file swscale-test.c.

Referenced by sws_getColorspaceDetails(), sws_init_swScale_c(), sws_setColorspaceDetails(), and swScale().

#define W   96

Definition at line 341 of file swscale-test.c.

Referenced by main().

Function Documentation

static int doTest ( uint8_t 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 79 of file swscale-test.c.

Referenced by fileTest(), and selfTest().

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

Definition at line 289 of file swscale-test.c.

Referenced by main().

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

Definition at line 54 of file swscale-test.c.

Referenced by doTest().

int main ( int  argc,
char **  argv 
)

Definition at line 344 of file swscale-test.c.

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

Definition at line 239 of file swscale-test.c.

Referenced by main().