FFmpeg
Loading...
Searching...
No Matches
sw_scale.c File Reference
#include <string.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "libswscale/swscale.h"
#include "libswscale/swscale_internal.h"
#include "checkasm.h"

Go to the source code of this file.

Macros

#define randomize_buffers(buf, size)
 
#define CMP_FUNC(bits)
 
#define SHOW_DIFF_FUNC(bits)
 
#define LARGEST_INPUT_SIZE   512
 
#define LARGEST_FILTER   16
 
#define LARGEST_INPUT_SIZE   512
 
#define LARGEST_FILTER   16
 
#define LARGEST_INPUT_SIZE   512
 
#define SRC_PIXELS   512
 
#define MAX_FILTER_WIDTH   40
 
#define FILTER_SIZES   6
 
#define HSCALE_PAIRS   2
 
#define LARGEST_INPUT_SIZE   512
 

Functions

static void yuv2planeX_8_ref (const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
 
static void check_yuv2yuv1 (int accurate)
 
static void check_yuv2yuvX (int accurate, int bit_depth, int dst_pix_format)
 
static void check_yuv2nv12cX (int accurate)
 
static void check_hscale (void)
 
void checkasm_check_sw_scale (void)
 

Macro Definition Documentation

◆ randomize_buffers

#define randomize_buffers ( buf,
size )
Value:
do { \
int j; \
for (j = 0; j < size; j+=4) \
AV_WN32(buf + j, rnd()); \
} while (0)
#define rnd
Definition checkasm.h:136
#define AV_WN32(p, v)
int size

Definition at line 32 of file sw_scale.c.

Referenced by check_hscale(), check_yuv2nv12cX(), check_yuv2yuv1(), and check_yuv2yuvX().

◆ CMP_FUNC

#define CMP_FUNC ( bits)
Value:
static int cmp_off_by_n_##bits(const uint##bits##_t *ref, const uint##bits##_t *test, \
size_t n, int accuracy) \
{ \
for (size_t i = 0; i < n; i++) { \
if (abs((int)ref[i] - (int)test[i]) > accuracy) \
return 1; \
} \
return 0; \
}
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define abs(x)
static const uint8_t bits[8]
Definition fastaudio.c:100
Definition idctdsp.c:35
static int ref[MAX_W *MAX_W]

Definition at line 55 of file sw_scale.c.

◆ SHOW_DIFF_FUNC

#define SHOW_DIFF_FUNC ( bits)

Definition at line 69 of file sw_scale.c.

◆ LARGEST_INPUT_SIZE [1/4]

#define LARGEST_INPUT_SIZE   512

◆ LARGEST_FILTER [1/2]

#define LARGEST_FILTER   16

◆ LARGEST_INPUT_SIZE [2/4]

#define LARGEST_INPUT_SIZE   512

◆ LARGEST_FILTER [2/2]

#define LARGEST_FILTER   16

◆ LARGEST_INPUT_SIZE [3/4]

#define LARGEST_INPUT_SIZE   512

◆ SRC_PIXELS

#define SRC_PIXELS   512

Definition at line 354 of file sw_scale.c.

Referenced by check_hscale().

◆ MAX_FILTER_WIDTH

#define MAX_FILTER_WIDTH   40

Referenced by check_hscale().

◆ FILTER_SIZES

#define FILTER_SIZES   6

◆ HSCALE_PAIRS

#define HSCALE_PAIRS   2

Referenced by check_hscale().

◆ LARGEST_INPUT_SIZE [4/4]

#define LARGEST_INPUT_SIZE   512

Function Documentation

◆ yuv2planeX_8_ref()

static void yuv2planeX_8_ref ( const int16_t * filter,
int filterSize,
const int16_t ** src,
uint8_t * dest,
int dstW,
const uint8_t * dither,
int offset )
static

Definition at line 39 of file sw_scale.c.

Referenced by check_yuv2yuvX().

◆ check_yuv2yuv1()

static void check_yuv2yuv1 ( int accurate)
static

Definition at line 109 of file sw_scale.c.

Referenced by check_yuv2yuv1(), and checkasm_check_sw_scale().

◆ check_yuv2yuvX()

static void check_yuv2yuvX ( int accurate,
int bit_depth,
int dst_pix_format )
static

Definition at line 170 of file sw_scale.c.

Referenced by checkasm_check_sw_scale().

◆ check_yuv2nv12cX()

static void check_yuv2nv12cX ( int accurate)
static

Definition at line 282 of file sw_scale.c.

Referenced by checkasm_check_sw_scale().

◆ check_hscale()

static void check_hscale ( void )
static

Definition at line 356 of file sw_scale.c.

Referenced by checkasm_check_sw_scale().

◆ checkasm_check_sw_scale()

void checkasm_check_sw_scale ( void )

Definition at line 460 of file sw_scale.c.