FFmpeg
Data Structures | Macros | Functions | Variables
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/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/lfg.h"
#include "libavutil/sfc64.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 W   96
 
#define H   96
 

Functions

static av_always_inline int isALPHA (enum AVPixelFormat pix_fmt)
 
static uint64_t getSSD (const uint8_t *src1, const uint8_t *src2, int stride1, int stride2, int w, int h)
 
static uint64_t getSSD0 (int ref, const uint8_t *src1, int stride1, 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)
 

Variables

static double prob = 1
 
FFSFC64 prng_state
 

Macro Definition Documentation

◆ isGray

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

Definition at line 42 of file swscale.c.

◆ hasChroma

#define hasChroma (   x)
Value:
(!(isGray(x) || \

Definition at line 49 of file swscale.c.

◆ W

#define W   96

Definition at line 416 of file swscale.c.

◆ H

#define H   96

Definition at line 417 of file swscale.c.

Function Documentation

◆ isALPHA()

static av_always_inline int isALPHA ( enum AVPixelFormat  pix_fmt)
static

Definition at line 54 of file swscale.c.

Referenced by doTest(), reset_ptr(), scale_internal(), and swscale().

◆ getSSD()

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

Definition at line 63 of file swscale.c.

Referenced by doTest().

◆ getSSD0()

static uint64_t getSSD0 ( int  ref,
const uint8_t *  src1,
int  stride1,
int  w,
int  h 
)
static

Definition at line 78 of file swscale.c.

Referenced by doTest().

◆ 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 103 of file swscale.c.

Referenced by fileTest(), and selfTest().

◆ 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 310 of file swscale.c.

Referenced by main().

◆ fileTest()

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 363 of file swscale.c.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 419 of file swscale.c.

Variable Documentation

◆ prob

double prob = 1
static

Definition at line 60 of file swscale.c.

Referenced by doTest(), and main().

◆ prng_state

FFSFC64 prng_state

Definition at line 61 of file swscale.c.

Referenced by doTest(), and main().

AV_PIX_FMT_YA8
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
Definition: pixfmt.h:140
AV_PIX_FMT_MONOWHITE
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:82
isGray
#define isGray(x)
Definition: swscale.c:42
AV_PIX_FMT_GRAY16BE
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
Definition: pixfmt.h:104
AV_PIX_FMT_YA16LE
@ AV_PIX_FMT_YA16LE
16 bits gray, 16 bits alpha (little-endian)
Definition: pixfmt.h:210
AV_PIX_FMT_MONOBLACK
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:83
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
AV_PIX_FMT_YA16BE
@ AV_PIX_FMT_YA16BE
16 bits gray, 16 bits alpha (big-endian)
Definition: pixfmt.h:209
AV_PIX_FMT_GRAY16LE
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
Definition: pixfmt.h:105