FFmpeg
Macros | Functions
h264chroma.c File Reference
#include <string.h>
#include <stdint.h>
#include "checkasm.h"
#include "libavcodec/h264chroma.h"
#include "libavutil/mem_internal.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Macros

#define SIZEOF_PIXEL   ((bit_depth + 7) / 8)
 
#define randomize_buffers(bit_depth)
 
#define CHECK_CHROMA_MC(name)
 

Functions

static void check_chroma_mc (void)
 
void checkasm_check_h264chroma (void)
 

Macro Definition Documentation

◆ SIZEOF_PIXEL

#define SIZEOF_PIXEL   ((bit_depth + 7) / 8)

Definition at line 28 of file h264chroma.c.

◆ randomize_buffers

#define randomize_buffers (   bit_depth)
Value:
do { \
if (bit_depth == 8) { \
for (int i = 0; i < 16*18*2; i++) \
src[i] = rnd() & 0x3; \
} else { \
for (int i = 0; i < 16*18; i += 2) \
AV_WN16(&src[i], rnd() & 0xFF); \
} \
} while (0)

Definition at line 30 of file h264chroma.c.

◆ CHECK_CHROMA_MC

#define CHECK_CHROMA_MC (   name)
Value:
do { \
if (check_func(h.name## _pixels_tab[size], #name "_mc%d_%d", 1 << size, bit_depth)) { \
for (int x = 0; x < 2; x++) { \
for (int y = 0; y < 2; y++) { \
memcpy(dst0, src, 16 * 18 * SIZEOF_PIXEL); \
memcpy(dst1, src, 16 * 18 * SIZEOF_PIXEL); \
call_ref(dst0, src, 16 * SIZEOF_PIXEL, 16, x, y); \
call_new(dst1, src, 16 * SIZEOF_PIXEL, 16, x, y); \
if (memcmp(dst0, dst1, 16 * 16 * SIZEOF_PIXEL)) { \
fprintf(stderr, #name ": x:%i, y:%i\n", x, y); \
fail(); \
} \
bench_new(dst1, src, 16 * SIZEOF_PIXEL, 16, x, y); \
} \
} \
} \
} while (0)

Function Documentation

◆ check_chroma_mc()

static void check_chroma_mc ( void  )
static

Definition at line 41 of file h264chroma.c.

Referenced by checkasm_check_h264chroma().

◆ checkasm_check_h264chroma()

void checkasm_check_h264chroma ( void  )

Definition at line 81 of file h264chroma.c.

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
check_func
#define check_func(func,...)
Definition: checkasm.h:170
bit_depth
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition: af_astats.c:245
SIZEOF_PIXEL
#define SIZEOF_PIXEL
Definition: h264chroma.c:28
rnd
#define rnd()
Definition: checkasm.h:163
size
int size
Definition: twinvq_data.h:10344
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
h
h
Definition: vp9dsp_template.c:2038
AV_WN16
#define AV_WN16(p, v)
Definition: intreadwrite.h:370