FFmpeg
Data Structures | 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/pixdesc.h"
#include "libavutil/lfg.h"
#include "libavutil/sfc64.h"
#include "libavutil/frame.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavutil/pixfmt.h"
#include "libavutil/avassert.h"
#include "libavutil/macros.h"
#include "libswscale/swscale.h"

Go to the source code of this file.

Data Structures

struct  options
 
struct  mode
 

Functions

static int fmt_comps (enum AVPixelFormat fmt)
 
static void get_mse (int mse[4], const AVFrame *a, const AVFrame *b, int comps)
 
static int scale_legacy (AVFrame *dst, const AVFrame *src, struct mode mode, struct options opts)
 
static int run_test (enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt, int dst_w, int dst_h, struct mode mode, struct options opts, const AVFrame *ref, const int mse_ref[4])
 
static int run_self_tests (const AVFrame *ref, struct options opts)
 
static int run_file_tests (const AVFrame *ref, FILE *fp, struct options opts)
 
int main (int argc, char **argv)
 

Variables

const struct mode modes []
 
static FFSFC64 prng_state
 
static SwsContextsws [3]
 

Function Documentation

◆ fmt_comps()

static int fmt_comps ( enum AVPixelFormat  fmt)
static

Definition at line 71 of file swscale.c.

Referenced by run_test().

◆ get_mse()

static void get_mse ( int  mse[4],
const AVFrame a,
const AVFrame b,
int  comps 
)
static

Definition at line 80 of file swscale.c.

Referenced by run_test().

◆ scale_legacy()

static int scale_legacy ( AVFrame dst,
const AVFrame src,
struct mode  mode,
struct options  opts 
)
static

Definition at line 115 of file swscale.c.

Referenced by run_test().

◆ run_test()

static int run_test ( enum AVPixelFormat  src_fmt,
enum AVPixelFormat  dst_fmt,
int  dst_w,
int  dst_h,
struct mode  mode,
struct options  opts,
const AVFrame ref,
const int  mse_ref[4] 
)
static

Definition at line 147 of file swscale.c.

Referenced by run_file_tests(), and run_self_tests().

◆ run_self_tests()

static int run_self_tests ( const AVFrame ref,
struct options  opts 
)
static

Definition at line 256 of file swscale.c.

Referenced by main().

◆ run_file_tests()

static int run_file_tests ( const AVFrame ref,
FILE *  fp,
struct options  opts 
)
static

Definition at line 294 of file swscale.c.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 337 of file swscale.c.

Variable Documentation

◆ modes

const struct mode modes[]

◆ prng_state

FFSFC64 prng_state
static

Definition at line 68 of file swscale.c.

Referenced by main(), and run_self_tests().

◆ sws

SwsContext* sws[3]
static
SWS_BILINEAR
@ SWS_BILINEAR
bilinear filtering
Definition: swscale.h:99
SWS_BITEXACT
@ SWS_BITEXACT
Definition: swscale.h:156
SWS_FAST_BILINEAR
@ SWS_FAST_BILINEAR
Scaler selection options.
Definition: swscale.h:98
SWS_FULL_CHR_H_INP
@ SWS_FULL_CHR_H_INP
Perform full chroma interpolation when downscaling RGB sources.
Definition: swscale.h:145
SWS_AREA
@ SWS_AREA
area averaging
Definition: swscale.h:103
SWS_BICUBIC
@ SWS_BICUBIC
2-tap cubic B-spline
Definition: swscale.h:100
SWS_POINT
@ SWS_POINT
nearest neighbor
Definition: swscale.h:102
SWS_X
@ SWS_X
experimental
Definition: swscale.h:101
SWS_FULL_CHR_H_INT
@ SWS_FULL_CHR_H_INT
Perform full chroma upsampling when upscaling to RGB.
Definition: swscale.h:132
SWS_ACCURATE_RND
@ SWS_ACCURATE_RND
Force bit-exact output.
Definition: swscale.h:155