Go to the documentation of this file.
118 static const uint32_t
pixel_mask[3] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff };
120 #define SIZEOF_PIXEL ((bit_depth + 7) / 8)
121 #define BUF_SIZE (3 * 16 * 17)
123 #define check_pred_func(func, name, mode_name) \
124 (mode_name && ((codec_ids[codec] == AV_CODEC_ID_H264) ? \
125 check_func(func, "pred%s_%s_%d", name, mode_name, bit_depth) : \
126 check_func(func, "pred%s_%s", name, mode_name)))
128 #define randomize_buffers() \
130 uint32_t mask = pixel_mask[bit_depth - 8]; \
132 for (i = 0; i < BUF_SIZE; i += 4) { \
133 uint32_t r = rnd() & mask; \
134 AV_WN32A(buf0 + i, r); \
135 AV_WN32A(buf1 + i, r); \
139 #define src0 (buf0 + 4 * 16)
140 #define src1 (buf1 + 4 * 16)
143 int codec,
int chroma_format,
int bit_depth)
145 if (chroma_format == 1) {
146 uint8_t *topright = buf0 + 2*16;
150 for (pred_mode = 0; pred_mode < 15; pred_mode++) {
164 int codec,
int chroma_format,
int bit_depth)
169 for (pred_mode = 0; pred_mode < 11; pred_mode++) {
170 if (
check_pred_func(
h->pred8x8[pred_mode], (chroma_format == 2) ?
"8x16" :
"8x8",
183 int codec,
int chroma_format,
int bit_depth)
185 if (chroma_format == 1) {
189 for (pred_mode = 0; pred_mode < 9; pred_mode++) {
203 int codec,
int chroma_format,
int bit_depth)
209 for (pred_mode = 0; pred_mode < 12; pred_mode++) {
212 for (neighbors = 0; neighbors <= 0xc000; neighbors += 0x4000) {
213 int has_topleft = neighbors & 0x8000;
214 int has_topright = neighbors & 0x4000;
235 static const struct {
251 for (codec = 0; codec < 4; codec++) {
int(* func)(AVBPrint *dst, const char *in, const char *arg)
#define declare_func_emms(cpu_flags, ret,...)
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
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
static const char *const pred16x16_modes[4][9]
static const char *const pred4x4_modes[4][15]
#define FF_ARRAY_ELEMS(a)
static const uint32_t pixel_mask[3]
static const char *const pred8x8_modes[4][11]
#define VERT_LEFT_PRED_RV40_NODOWN
#define LOCAL_ALIGNED_16(t, v,...)
static void check_pred8x8(H264PredContext *h, uint8_t *buf0, uint8_t *buf1, int codec, int chroma_format, int bit_depth)
static void check_pred4x4(H264PredContext *h, uint8_t *buf0, uint8_t *buf1, int codec, int chroma_format, int bit_depth)
static const int codec_ids[4]
#define check_pred_func(func, name, mode_name)
void checkasm_check_h264pred(void)
#define DIAG_DOWN_LEFT_PRED_RV40_NODOWN
static void check_pred16x16(H264PredContext *h, uint8_t *buf0, uint8_t *buf1, int codec, int chroma_format, int bit_depth)
static void check_pred8x8l(H264PredContext *h, uint8_t *buf0, uint8_t *buf1, int codec, int chroma_format, int bit_depth)
#define HOR_UP_PRED_RV40_NODOWN
#define ALZHEIMER_DC_L00_PRED8x8
#define randomize_buffers()
#define AV_CPU_FLAG_MMX
standard MMX
av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, int chroma_format_idc)
Set the intra prediction function pointers.
#define AV_CPU_FLAG_MMXEXT
SSE integer functions or AMD MMX ext.
#define ALZHEIMER_DC_0L0_PRED8x8
Context for storing H.264 prediction functions.
#define ALZHEIMER_DC_L0T_PRED8x8
#define ALZHEIMER_DC_0LT_PRED8x8