#include <assert.h>
#include <stddef.h>
#include <string.h>
#include "config/aom_scale_rtcd.h"
#include "aom/aom_integer.h"
#include "aom_util/aom_pthread.h"
#include "av1/common/av1_common_int.h"
#include "av1/common/cdef.h"
#include "av1/common/cdef_block.h"
#include "av1/common/common.h"
#include "av1/common/common_data.h"
#include "av1/common/enums.h"
#include "av1/common/reconinter.h"
#include "av1/common/thread_common.h"
static int is_8x8_block_skip(MB_MODE_INFO **grid, int mi_row, int mi_col,
int mi_stride) { … }
int av1_cdef_compute_sb_list(const CommonModeInfoParams *const mi_params,
int mi_row, int mi_col, cdef_list *dlist,
BLOCK_SIZE bs) { … }
void cdef_copy_rect8_8bit_to_16bit_c(uint16_t *dst, int dstride,
const uint8_t *src, int sstride, int width,
int height) { … }
#if CONFIG_AV1_HIGHBITDEPTH
void cdef_copy_rect8_16bit_to_16bit_c(uint16_t *dst, int dstride,
const uint16_t *src, int sstride,
int width, int height) {
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
dst[i * dstride + j] = src[i * sstride + j];
}
}
}
#endif
void av1_cdef_copy_sb8_16_lowbd(uint16_t *const dst, int dstride,
const uint8_t *src, int src_voffset,
int src_hoffset, int sstride, int vsize,
int hsize) { … }
#if CONFIG_AV1_HIGHBITDEPTH
void av1_cdef_copy_sb8_16_highbd(uint16_t *const dst, int dstride,
const uint8_t *src, int src_voffset,
int src_hoffset, int sstride, int vsize,
int hsize) {
const uint16_t *base =
&CONVERT_TO_SHORTPTR(src)[src_voffset * (ptrdiff_t)sstride + src_hoffset];
cdef_copy_rect8_16bit_to_16bit(dst, dstride, base, sstride, hsize, vsize);
}
#endif
void av1_cdef_copy_sb8_16(const AV1_COMMON *const cm, uint16_t *const dst,
int dstride, const uint8_t *src, int src_voffset,
int src_hoffset, int sstride, int vsize, int hsize) { … }
static inline void copy_rect(uint16_t *dst, int dstride, const uint16_t *src,
int sstride, int v, int h) { … }
static void cdef_prepare_fb(const AV1_COMMON *const cm, CdefBlockInfo *fb_info,
uint16_t **const colbuf, const int cdef_left,
int fbc, int fbr, int plane) { … }
static inline void cdef_filter_fb(CdefBlockInfo *const fb_info, int plane,
uint8_t use_highbitdepth) { … }
static inline void cdef_init_fb_col(const MACROBLOCKD *const xd,
CdefBlockInfo *const fb_info, int *level,
int *sec_strength, int fbc, int fbr,
int plane) { … }
static void cdef_fb_col(const AV1_COMMON *const cm, const MACROBLOCKD *const xd,
CdefBlockInfo *const fb_info, uint16_t **const colbuf,
int *cdef_left, int fbc, int fbr) { … }
void av1_cdef_init_fb_row(const AV1_COMMON *const cm,
const MACROBLOCKD *const xd,
CdefBlockInfo *const fb_info,
uint16_t **const linebuf, uint16_t *const src,
struct AV1CdefSyncData *const cdef_sync, int fbr) { … }
void av1_cdef_fb_row(const AV1_COMMON *const cm, MACROBLOCKD *xd,
uint16_t **const linebuf, uint16_t **const colbuf,
uint16_t *const src, int fbr,
cdef_init_fb_row_t cdef_init_fb_row_fn,
struct AV1CdefSyncData *const cdef_sync,
struct aom_internal_error_info *error_info) { … }
void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *const cm,
MACROBLOCKD *xd, cdef_init_fb_row_t cdef_init_fb_row_fn) { … }