FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
vf_colorspace.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavfilter/colorspacedsp.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Macros

#define W   64
 
#define H   64
 
#define randomize_buffers()
 
#define randomize_buffers()
 

Functions

static void check_yuv2yuv (void)
 
static void check_yuv2rgb (void)
 
static void check_rgb2yuv (void)
 
static void check_multiply3x3 (void)
 
void checkasm_check_colorspace (void)
 

Variables

static const char * format_string []
 
static const unsigned bpp_mask [] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff }
 

Macro Definition Documentation

#define W   64

Definition at line 28 of file vf_colorspace.c.

Referenced by check_multiply3x3(), check_rgb2yuv(), check_yuv2rgb(), and check_yuv2yuv().

#define H   64

Definition at line 29 of file vf_colorspace.c.

Referenced by check_multiply3x3(), check_rgb2yuv(), check_yuv2rgb(), and check_yuv2yuv().

#define randomize_buffers ( )
Value:
do { \
unsigned mask = bpp_mask[idepth]; \
int n, m; \
int bpp = 1 + (!!idepth); \
int buf_size = W * H * bpp; \
for (m = 0; m < 3; m++) { \
int ss = m ? ss_w + ss_h : 0; \
int plane_sz = buf_size >> ss; \
for (n = 0; n < plane_sz; n += 4) { \
unsigned r = rnd() & mask; \
AV_WN32A(&src[m][n], r); \
} \
} \
} while (0)
#define W
Definition: vf_colorspace.c:28
#define AV_WN32A(p, v)
Definition: intreadwrite.h:538
#define H
Definition: vf_colorspace.c:29
static const uint16_t mask[17]
Definition: lzw.c:38
const char * r
Definition: vf_curves.c:111
int n
Definition: avisynth_c.h:684
#define src
Definition: vp9dsp.c:530
#define ss
static const unsigned bpp_mask[]
Definition: vf_colorspace.c:51
#define rnd()
Definition: checkasm.h:68
for(j=16;j >0;--j)

Definition at line 184 of file vf_colorspace.c.

Referenced by check_multiply3x3(), check_rgb2yuv(), check_yuv2rgb(), and check_yuv2yuv().

#define randomize_buffers ( )
Value:
do { \
int y, x, p; \
for (p = 0; p < 3; p++) { \
for (y = 0; y < H; y++) { \
for (x = 0; x < W; x++) { \
int r = rnd() & 0x7fff; \
r -= (32768 - 28672) >> 1; \
src[p][y * W + x] = r; \
} \
} \
} \
} while (0)
#define W
Definition: vf_colorspace.c:28
#define H
Definition: vf_colorspace.c:29
const char * r
Definition: vf_curves.c:111
#define src
Definition: vp9dsp.c:530
#define rnd()
Definition: checkasm.h:68
for(j=16;j >0;--j)

Definition at line 184 of file vf_colorspace.c.

Function Documentation

static void check_yuv2yuv ( void  )
static

Definition at line 53 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

static void check_yuv2rgb ( void  )
static

Definition at line 121 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

static void check_rgb2yuv ( void  )
static

Definition at line 198 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

static void check_multiply3x3 ( void  )
static

Definition at line 262 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

void checkasm_check_colorspace ( void  )

Definition at line 308 of file vf_colorspace.c.

Variable Documentation

const char* format_string[]
static
Initial value:
= {
"444", "422", "420"
}

Definition at line 47 of file vf_colorspace.c.

Referenced by check_rgb2yuv(), check_yuv2rgb(), and check_yuv2yuv().

const unsigned bpp_mask[] = { 0xffffffff, 0x03ff03ff, 0x0fff0fff }
static

Definition at line 51 of file vf_colorspace.c.