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"
#include "libavutil/mem_internal.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 29 of file vf_colorspace.c.

◆ H

#define H   64

Definition at line 30 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 185 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 185 of file vf_colorspace.c.

Function Documentation

◆ check_yuv2yuv()

static void check_yuv2yuv ( void  )
static

Definition at line 54 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ check_yuv2rgb()

static void check_yuv2rgb ( void  )
static

Definition at line 122 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ check_rgb2yuv()

static void check_rgb2yuv ( void  )
static

Definition at line 199 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ check_multiply3x3()

static void check_multiply3x3 ( void  )
static

Definition at line 263 of file vf_colorspace.c.

Referenced by checkasm_check_colorspace().

◆ checkasm_check_colorspace()

void checkasm_check_colorspace ( void  )

Definition at line 309 of file vf_colorspace.c.

Variable Documentation

◆ format_string

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

Definition at line 48 of file vf_colorspace.c.

◆ bpp_mask

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

Definition at line 52 of file vf_colorspace.c.

r
const char * r
Definition: vf_curves.c:116
W
#define W
Definition: vf_colorspace.c:29
H
#define H
Definition: vf_colorspace.c:30
ss
#define ss(width, name, subs,...)
Definition: cbs_vp9.c:261
rnd
#define rnd()
Definition: checkasm.h:111
mask
static const uint16_t mask[17]
Definition: lzw.c:38
src
#define src
Definition: vp8dsp.c:255
bpp_mask
static const unsigned bpp_mask[]
Definition: vf_colorspace.c:52