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

Go to the source code of this file.

Macros

#define WIDTH   240
 
#define HEIGHT   120
 
#define WIDTH_PADDED   (WIDTH + 16) /* padded to 32 */
 
#define BUFFER_SIZE   (WIDTH_PADDED * HEIGHT)
 
#define randomize_plane(buf, type)
 
#define cmp_plane(buf0, buf1, s)
 
#define CHECK_RESTORE(type)
 

Functions

static void check_restore_rgb_planes (void)
 
static void check_restore_rgb_planes10 (void)
 
void checkasm_check_utvideodsp (void)
 

Macro Definition Documentation

◆ WIDTH

#define WIDTH   240

Definition at line 29 of file utvideodsp.c.

◆ HEIGHT

#define HEIGHT   120

Definition at line 30 of file utvideodsp.c.

◆ WIDTH_PADDED

#define WIDTH_PADDED   (WIDTH + 16) /* padded to 32 */

Definition at line 31 of file utvideodsp.c.

◆ BUFFER_SIZE

#define BUFFER_SIZE   (WIDTH_PADDED * HEIGHT)

Definition at line 32 of file utvideodsp.c.

◆ randomize_plane

#define randomize_plane (   buf,
  type 
)
Value:
do { \
int w, h; \
type * tmp = buf; \
for (h = 0; h < HEIGHT; h++) { \
for (w = 0; w < WIDTH; w++) \
tmp[w] = rnd() & 0xFF; \
tmp += WIDTH_PADDED; \
} \
} while (0)

Definition at line 35 of file utvideodsp.c.

◆ cmp_plane

#define cmp_plane (   buf0,
  buf1,
  s 
)
Value:
do { \
int h; \
for (h = 0; h < HEIGHT; h++) { \
if (memcmp(buf0 + h*WIDTH_PADDED, \
buf1 + h*WIDTH_PADDED, WIDTH *s)) \
fail();\
} \
} while (0)

Definition at line 46 of file utvideodsp.c.

◆ CHECK_RESTORE

#define CHECK_RESTORE (   type)
Value:
LOCAL_ALIGNED_32(type, src_g0, [BUFFER_SIZE]); \
LOCAL_ALIGNED_32(type, src_b0, [BUFFER_SIZE]); \
LOCAL_ALIGNED_32(type, src_r1, [BUFFER_SIZE]); \
LOCAL_ALIGNED_32(type, src_g1, [BUFFER_SIZE]); \
LOCAL_ALIGNED_32(type, src_b1, [BUFFER_SIZE]); \
declare_func(void, type *src_r, type *src_g, type *src_b, \
ptrdiff_t linesize_r, ptrdiff_t linesize_g, \
ptrdiff_t linesize_b, int width, int height); \
memset(src_r0, 0, BUFFER_SIZE * sizeof(type)); \
memset(src_g0, 0, BUFFER_SIZE * sizeof(type)); \
memset(src_b0, 0, BUFFER_SIZE * sizeof(type)); \
randomize_plane(src_r0, type); \
randomize_plane(src_g0, type); \
randomize_plane(src_b0, type); \
memcpy(src_r1, src_r0, BUFFER_SIZE * sizeof(type)); \
memcpy(src_g1, src_g0, BUFFER_SIZE * sizeof(type)); \
memcpy(src_b1, src_b0, BUFFER_SIZE * sizeof(type)); \
call_ref(src_r0, src_g0, src_b0, WIDTH_PADDED, WIDTH_PADDED, WIDTH_PADDED, WIDTH, HEIGHT);\
call_new(src_r1, src_g1, src_b1, WIDTH_PADDED, WIDTH_PADDED, WIDTH_PADDED, WIDTH, HEIGHT);\
cmp_plane(src_r0, src_r1, sizeof(type)); \
cmp_plane(src_g0, src_g1, sizeof(type)); \
cmp_plane(src_b0, src_b1, sizeof(type)); \
bench_new(src_r1, src_g1, src_b1, WIDTH_PADDED, WIDTH_PADDED, WIDTH_PADDED, WIDTH, HEIGHT)

Definition at line 57 of file utvideodsp.c.

Function Documentation

◆ check_restore_rgb_planes()

static void check_restore_rgb_planes ( void  )
static

Definition at line 83 of file utvideodsp.c.

Referenced by checkasm_check_utvideodsp().

◆ check_restore_rgb_planes10()

static void check_restore_rgb_planes10 ( void  )
static

Definition at line 87 of file utvideodsp.c.

Referenced by checkasm_check_utvideodsp().

◆ checkasm_check_utvideodsp()

void checkasm_check_utvideodsp ( void  )

Definition at line 91 of file utvideodsp.c.

HEIGHT
#define HEIGHT
Definition: utvideodsp.c:30
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:27
w
uint8_t w
Definition: llviddspenc.c:39
WIDTH_PADDED
#define WIDTH_PADDED
Definition: utvideodsp.c:31
BUFFER_SIZE
#define BUFFER_SIZE
Definition: utvideodsp.c:32
type
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 type
Definition: writing_filters.txt:86
rnd
#define rnd()
Definition: checkasm.h:118
width
#define width
s
#define s(width, name)
Definition: cbs_vp9.c:257
LOCAL_ALIGNED_32
#define LOCAL_ALIGNED_32(t, v,...)
Definition: mem_internal.h:136
WIDTH
#define WIDTH
Definition: utvideodsp.c:29
height
#define height
h
h
Definition: vp9dsp_template.c:2038