#include <assert.h>
#include <limits.h>
#include "./vpx_config.h"
#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_mem/vpx_mem.h"
#include "vpx_util/vpx_pthread.h"
#include "vp9/common/vp9_entropymode.h"
#include "vp9/common/vp9_thread_common.h"
#include "vp9/common/vp9_reconinter.h"
#include "vp9/common/vp9_loopfilter.h"
#if CONFIG_MULTITHREAD
static INLINE void mutex_lock(pthread_mutex_t *const mutex) { … }
#endif
static INLINE void sync_read(VP9LfSync *const lf_sync, int r, int c) { … }
static INLINE void sync_write(VP9LfSync *const lf_sync, int r, int c,
const int sb_cols) { … }
static INLINE void thread_loop_filter_rows(
const YV12_BUFFER_CONFIG *const frame_buffer, VP9_COMMON *const cm,
struct macroblockd_plane planes[MAX_MB_PLANE], int start, int stop,
int y_only, VP9LfSync *const lf_sync) { … }
static int loop_filter_row_worker(void *arg1, void *arg2) { … }
static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, VP9_COMMON *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int y_only,
VPxWorker *workers, int nworkers,
VP9LfSync *lf_sync) { … }
void vp9_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame, VP9_COMMON *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int frame_filter_level, int y_only,
int partial_frame, VPxWorker *workers,
int num_workers, VP9LfSync *lf_sync) { … }
void vp9_lpf_mt_init(VP9LfSync *lf_sync, VP9_COMMON *cm, int frame_filter_level,
int num_workers) { … }
static INLINE int get_sync_range(int width) { … }
void vp9_loop_filter_alloc(VP9LfSync *lf_sync, VP9_COMMON *cm, int rows,
int width, int num_workers) { … }
void vp9_loop_filter_dealloc(VP9LfSync *lf_sync) { … }
static int get_next_row(VP9_COMMON *cm, VP9LfSync *lf_sync) { … }
void vp9_loopfilter_rows(LFWorkerData *lf_data, VP9LfSync *lf_sync) { … }
void vp9_set_row(VP9LfSync *lf_sync, int num_tiles, int row, int is_last_row,
int corrupted) { … }
void vp9_loopfilter_job(LFWorkerData *lf_data, VP9LfSync *lf_sync) { … }
void vp9_accumulate_frame_counts(FRAME_COUNTS *accum,
const FRAME_COUNTS *counts, int is_dec) { … }