FFmpeg
Macros | Functions | Variables
hevc_pel.c File Reference
#include <string.h>
#include "checkasm.h"
#include "libavcodec/hevcdsp.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Macros

#define SIZEOF_PIXEL   ((bit_depth + 7) / 8)
 
#define BUF_SIZE   (2 * MAX_PB_SIZE * (2 * 4 + MAX_PB_SIZE))
 
#define checkasm_check_pixel(buf1, stride1, buf2, stride2, ...)
 
#define randomize_buffers()
 
#define randomize_buffers_ref()
 
#define src0   (buf0 + 2 * 4 * MAX_PB_SIZE) /* hevc qpel functions read data from negative src pointer offsets */
 
#define src1   (buf1 + 2 * 4 * MAX_PB_SIZE)
 
#define SRC_EXTRA   8
 
#define SRC_EXTRA   0
 

Functions

static void checkasm_check_hevc_qpel (void)
 
static void checkasm_check_hevc_qpel_uni (void)
 
static void checkasm_check_hevc_qpel_uni_w (void)
 
static void checkasm_check_hevc_qpel_bi (void)
 
static void checkasm_check_hevc_qpel_bi_w (void)
 
static void checkasm_check_hevc_epel (void)
 
static void checkasm_check_hevc_epel_uni (void)
 
static void checkasm_check_hevc_epel_uni_w (void)
 
static void checkasm_check_hevc_epel_bi (void)
 
static void checkasm_check_hevc_epel_bi_w (void)
 
void checkasm_check_hevc_pel (void)
 

Variables

static const uint32_t pixel_mask [] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff, 0x07ff07ff, 0x0fff0fff }
 
static const uint32_t pixel_mask16 [] = { 0x00ff00ff, 0x01ff01ff, 0x03ff03ff, 0x07ff07ff, 0x0fff0fff }
 
static const int sizes [] = { -1, 4, 6, 8, 12, 16, 24, 32, 48, 64 }
 
static const int weights [] = { 0, 128, 255, -1 }
 
static const int denoms [] = {0, 7, 12, -1 }
 
static const int offsets [] = {0, 255, -1 }
 

Macro Definition Documentation

◆ SIZEOF_PIXEL

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

Definition at line 36 of file hevc_pel.c.

◆ BUF_SIZE

#define BUF_SIZE   (2 * MAX_PB_SIZE * (2 * 4 + MAX_PB_SIZE))

Definition at line 37 of file hevc_pel.c.

◆ checkasm_check_pixel

#define checkasm_check_pixel (   buf1,
  stride1,
  buf2,
  stride2,
  ... 
)
Value:
((bit_depth > 8) ? \
checkasm_check(uint16_t, (const uint16_t*)buf1, stride1, \
(const uint16_t*)buf2, stride2, \
__VA_ARGS__) : \
checkasm_check(uint8_t, (const uint8_t*) buf1, stride1, \
(const uint8_t*) buf2, stride2, \
__VA_ARGS__))

Definition at line 39 of file hevc_pel.c.

◆ randomize_buffers

#define randomize_buffers ( )
Value:
do { \
uint32_t mask = pixel_mask[bit_depth - 8]; \
int k; \
for (k = 0; k < BUF_SIZE + SRC_EXTRA; k += 4) { \
uint32_t r = rnd() & mask; \
AV_WN32A(buf0 + k, r); \
AV_WN32A(buf1 + k, r); \
if (k >= BUF_SIZE) \
continue; \
r = rnd(); \
AV_WN32A(dst0 + k, r); \
AV_WN32A(dst1 + k, r); \
} \
} while (0)

Definition at line 48 of file hevc_pel.c.

◆ randomize_buffers_ref

#define randomize_buffers_ref ( )
Value:
do { \
uint32_t mask = pixel_mask16[bit_depth - 8]; \
int k; \
for (k = 0; k < BUF_SIZE; k += 2) { \
uint32_t r = rnd() & mask; \
AV_WN32A(ref0 + k, r); \
AV_WN32A(ref1 + k, r); \
} \
} while (0)

Definition at line 64 of file hevc_pel.c.

◆ src0

#define src0   (buf0 + 2 * 4 * MAX_PB_SIZE) /* hevc qpel functions read data from negative src pointer offsets */

Definition at line 76 of file hevc_pel.c.

◆ src1

#define src1   (buf1 + 2 * 4 * MAX_PB_SIZE)

Definition at line 77 of file hevc_pel.c.

◆ SRC_EXTRA [1/2]

#define SRC_EXTRA   8

Definition at line 344 of file hevc_pel.c.

◆ SRC_EXTRA [2/2]

#define SRC_EXTRA   0

Definition at line 344 of file hevc_pel.c.

Function Documentation

◆ checkasm_check_hevc_qpel()

static void checkasm_check_hevc_qpel ( void  )
static

Definition at line 82 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_qpel_uni()

static void checkasm_check_hevc_qpel_uni ( void  )
static

Definition at line 126 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_qpel_uni_w()

static void checkasm_check_hevc_qpel_uni_w ( void  )
static

Definition at line 175 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_qpel_bi()

static void checkasm_check_hevc_qpel_bi ( void  )
static

Definition at line 231 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_qpel_bi_w()

static void checkasm_check_hevc_qpel_bi_w ( void  )
static

Definition at line 283 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_epel()

static void checkasm_check_hevc_epel ( void  )
static

Definition at line 346 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_epel_uni()

static void checkasm_check_hevc_epel_uni ( void  )
static

Definition at line 390 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_epel_uni_w()

static void checkasm_check_hevc_epel_uni_w ( void  )
static

Definition at line 439 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_epel_bi()

static void checkasm_check_hevc_epel_bi ( void  )
static

Definition at line 495 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_epel_bi_w()

static void checkasm_check_hevc_epel_bi_w ( void  )
static

Definition at line 547 of file hevc_pel.c.

Referenced by checkasm_check_hevc_pel().

◆ checkasm_check_hevc_pel()

void checkasm_check_hevc_pel ( void  )

Definition at line 607 of file hevc_pel.c.

Variable Documentation

◆ pixel_mask

const uint32_t pixel_mask[] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff, 0x07ff07ff, 0x0fff0fff }
static

Definition at line 29 of file hevc_pel.c.

◆ pixel_mask16

const uint32_t pixel_mask16[] = { 0x00ff00ff, 0x01ff01ff, 0x03ff03ff, 0x07ff07ff, 0x0fff0fff }
static

Definition at line 30 of file hevc_pel.c.

◆ sizes

const int sizes[] = { -1, 4, 6, 8, 12, 16, 24, 32, 48, 64 }
static

◆ weights

const int weights[] = { 0, 128, 255, -1 }
static

◆ denoms

const int denoms[] = {0, 7, 12, -1 }
static

◆ offsets

const int offsets[] = {0, 255, -1 }
static
r
const char * r
Definition: vf_curves.c:127
pixel_mask16
static const uint32_t pixel_mask16[]
Definition: hevc_pel.c:30
bit_depth
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition: af_astats.c:246
SRC_EXTRA
#define SRC_EXTRA
Definition: hevc_pel.c:344
rnd
#define rnd()
Definition: checkasm.h:163
mask
static const uint16_t mask[17]
Definition: lzw.c:38
pixel_mask
static const uint32_t pixel_mask[]
Definition: hevc_pel.c:29
BUF_SIZE
#define BUF_SIZE
Definition: hevc_pel.c:37
checkasm_check
#define checkasm_check(prefix,...)
Definition: checkasm.h:378
randomize_buffers
#define randomize_buffers()
Definition: hevc_pel.c:48