Commit 89ff793b authored by Luc Trudeau's avatar Luc Trudeau

[CFL] Refactor includes

The cfl_init function is moved out of cfl.h simplifying the includes and
removing the need for forward declarations.

Change-Id: I47312b25410b718a830b001391e386647005d57e
parent 5ab47f63
......@@ -13,8 +13,6 @@
#include "av1/common/common_data.h"
#include "av1/common/onyxc_int.h"
#include "aom/internal/aom_codec_internal.h"
void cfl_init(CFL_CTX *cfl, AV1_COMMON *cm) {
if (!((cm->subsampling_x == 0 && cm->subsampling_y == 0) ||
(cm->subsampling_x == 1 && cm->subsampling_y == 1))) {
......
......@@ -12,24 +12,13 @@
#ifndef AV1_COMMON_CFL_H_
#define AV1_COMMON_CFL_H_
#include <assert.h>
#include <string.h>
#include "av1/common/common.h"
#include "av1/common/blockd.h"
#include "av1/common/enums.h"
static INLINE int get_scaled_luma_q0(int alpha_q3, int y_pix, int avg_q3) {
int scaled_luma_q6 = alpha_q3 * ((y_pix << 3) - avg_q3);
return ROUND_POWER_OF_TWO_SIGNED(scaled_luma_q6, 6);
}
#if CONFIG_CHROMA_SUB8X8 && CONFIG_DEBUG
static INLINE void cfl_clear_sub8x8_val(CFL_CTX *cfl) {
memset(cfl->sub8x8_val, 0, sizeof(cfl->sub8x8_val));
}
#endif // CONFIG_CHROMA_SUB8X8 && CONFIG_DEBUG
void cfl_predict_block(MACROBLOCKD *const xd, uint8_t *dst, int dst_stride,
int row, int col, TX_SIZE tx_size, int plane);
......
......@@ -35,6 +35,9 @@
#if CONFIG_PVQ
#include "av1/common/pvq.h"
#endif
#if CONFIG_CFL
#include "av1/common/cfl.h"
#endif
#if CONFIG_HASH_ME
// TODO(youzhou@microsoft.com): Encoder only. Move it out of common
#include "av1/encoder/hash_motion.h"
......@@ -638,8 +641,13 @@ static INLINE int frame_is_intra_only(const AV1_COMMON *const cm) {
}
#if CONFIG_CFL
#if CONFIG_CHROMA_SUB8X8 && CONFIG_DEBUG
static INLINE void cfl_clear_sub8x8_val(CFL_CTX *cfl) {
memset(cfl->sub8x8_val, 0, sizeof(cfl->sub8x8_val));
}
#endif // CONFIG_CHROMA_SUB8X8 && CONFIG_DEBUG
void cfl_init(CFL_CTX *cfl, AV1_COMMON *cm);
#endif
#endif // CONFIG_CFL
static INLINE void av1_init_macroblockd(AV1_COMMON *cm, MACROBLOCKD *xd,
#if CONFIG_PVQ
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment