11#ifndef AOM_AV1_COMMON_CDEF_H_
12#define AOM_AV1_COMMON_CDEF_H_
14#define CDEF_STRENGTH_BITS 6
16#define CDEF_PRI_STRENGTHS 16
17#define CDEF_SEC_STRENGTHS 4
19#include "config/aom_config.h"
21#include "aom/aom_integer.h"
22#include "aom_ports/mem.h"
23#include "av1/common/av1_common_int.h"
24#include "av1/common/cdef_block.h"
26static INLINE
int sign(
int i) {
return i < 0 ? -1 : 1; }
28static INLINE
int constrain(
int diff,
int threshold,
int damping) {
29 if (!threshold)
return 0;
31 const int shift = AOMMAX(0, damping - get_msb(threshold));
33 AOMMIN(abs(diff), AOMMAX(0, threshold - (abs(diff) >> shift)));
41 int mi_row,
int mi_col, cdef_list *dlist,
void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, MACROBLOCKD *xd)
Function for applying CDEF to a frame.
Top level common structure used by both encoder and decoder.
Definition: av1_common_int.h:725
Params related to MB_MODE_INFO arrays and related info.
Definition: av1_common_int.h:479
Variables related to current coding block.
Definition: blockd.h:568
YV12 frame buffer data structure.
Definition: yv12config.h:38