FFmpeg
Loading...
Searching...
No Matches
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

◆ randomize_buffers

#define randomize_buffers ( bit_depth)
Value:
do { \
if (bit_depth == 8) { \
for (int i = 0; i < 16*18; i++) \
src[i] = rnd(); \
} else { \
unsigned mask = (1 << bit_depth) - 1;\
for (int i = 0; i < 16*18*2; i += 2) \
AV_WN16A(&src[i], rnd() & mask); \
} \
} while (0)
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition af_astats.c:246
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define rnd
Definition checkasm.h:136
#define AV_WN16A(p, v)
static const uint16_t mask[17]
Definition lzw.c:38
#define src
Definition vp8dsp.c:248

Definition at line 30 of file h264chroma.c.

Referenced by check_chroma_mc().

◆ CHECK_CHROMA_MC

#define CHECK_CHROMA_MC ( name)
Value:
do { \
if (check_func(h.name## _pixels_tab[size], #name "_mc%d_%d", 1 << (3-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, block_size, x, y); \
call_new(dst1, src, 16 * SIZEOF_PIXEL, block_size, x, y); \
if (memcmp(dst0, dst1, 16 * 16 * SIZEOF_PIXEL)) { \
fprintf(stderr, #name "_%d: x:%i, y:%i\n", bit_depth, x, y); \
fail(); \
} \
bench_new(dst1, src, 16 * SIZEOF_PIXEL, block_size, x, y); \
} \
} \
} \
} while (0)
#define check_func
Definition test.h:481
const char * name
Definition qsvenc.c:142
#define SIZEOF_PIXEL
Definition h264chroma.c:28
int size

Referenced by check_chroma_mc().

Function Documentation

◆ check_chroma_mc()

static void check_chroma_mc ( void )
static

Definition at line 42 of file h264chroma.c.

Referenced by checkasm_check_h264chroma().

◆ checkasm_check_h264chroma()

void checkasm_check_h264chroma ( void )

Definition at line 83 of file h264chroma.c.