FFmpeg
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

◆ W

#define W   64

Definition at line 28 of file vf_colorspace.c.

◆ H

#define H   64

Definition at line 29 of file vf_colorspace.c.

◆ randomize_buffers [1/2]

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

Definition at line 184 of file vf_colorspace.c.

◆ randomize_buffers [2/2]

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

Definition at line 184 of file vf_colorspace.c.

Function Documentation

◆ check_yuv2yuv()

static void check_yuv2yuv ( void  )
static

Definition at line 53 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ check_yuv2rgb()

static void check_yuv2rgb ( void  )
static

Definition at line 121 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ check_rgb2yuv()

static void check_rgb2yuv ( void  )
static

Definition at line 198 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ check_multiply3x3()

static void check_multiply3x3 ( void  )
static

Definition at line 262 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ checkasm_check_colorspace()

void checkasm_check_colorspace ( void  )

Definition at line 308 of file vf_colorspace.c.

Variable Documentation

◆ format_string

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

Definition at line 47 of file vf_colorspace.c.

◆ bpp_mask

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

Definition at line 51 of file vf_colorspace.c.

r
const char * r
Definition: vf_curves.c:114
n
int n
Definition: avisynth_c.h:760
W
#define W
Definition: vf_colorspace.c:28
H
#define H
Definition: vf_colorspace.c:29
ss
#define ss(width, name, subs,...)
Definition: cbs_vp9.c:261
src
#define src
Definition: vp8dsp.c:254
rnd
#define rnd()
Definition: checkasm.h:104
mask
static const uint16_t mask[17]
Definition: lzw.c:38
bpp_mask
static const unsigned bpp_mask[]
Definition: vf_colorspace.c:51
thread_data::p
int p
Definition: vf_nlmeans.c:340