Commit c89bcae5 authored by Yaowu Xu's avatar Yaowu Xu Committed by Gerrit Code Review
Browse files

Merge "Fixed warnings of unused functions" into nextgenv2

parents d2ef991f 4d90ae4b
...@@ -611,7 +611,7 @@ process_toolchain() { ...@@ -611,7 +611,7 @@ process_toolchain() {
;; ;;
*) check_add_cflags -Wunused-but-set-variable ;; *) check_add_cflags -Wunused-but-set-variable ;;
esac esac
if enabled mips || [ -z "${INLINE}" ] || enabled vp10; then if enabled mips || [ -z "${INLINE}" ]; then
enabled extra_warnings || check_add_cflags -Wno-unused-function enabled extra_warnings || check_add_cflags -Wno-unused-function
else else
check_add_cflags -Wunused-function check_add_cflags -Wunused-function
......
...@@ -59,8 +59,8 @@ static void reference_hybrid_1d(double* in, double* out, int size, int type) { ...@@ -59,8 +59,8 @@ static void reference_hybrid_1d(double* in, double* out, int size, int type) {
reference_adst_1d(in, out, size); reference_adst_1d(in, out, size);
} }
static void reference_hybrid_2d(double* in, double* out, int size, int type0, static INLINE void reference_hybrid_2d(double* in, double* out, int size,
int type1) { int type0, int type1) {
double* tempOut = new double[size * size]; double* tempOut = new double[size * size];
for (int r = 0; r < size; r++) { for (int r = 0; r < size; r++) {
......
...@@ -218,14 +218,15 @@ static INLINE void lower_mv_precision(MV *mv, int allow_hp) { ...@@ -218,14 +218,15 @@ static INLINE void lower_mv_precision(MV *mv, int allow_hp) {
} }
#if CONFIG_REF_MV #if CONFIG_REF_MV
static int8_t vp10_ref_frame_type(const MV_REFERENCE_FRAME *const rf) { static INLINE int8_t vp10_ref_frame_type(const MV_REFERENCE_FRAME *const rf) {
if (rf[1] > INTRA_FRAME) if (rf[1] > INTRA_FRAME)
return rf[0] + ALTREF_FRAME; return rf[0] + ALTREF_FRAME;
return rf[0]; return rf[0];
} }
static void vp10_set_ref_frame(MV_REFERENCE_FRAME *rf, int8_t ref_frame_type) { static INLINE void vp10_set_ref_frame(MV_REFERENCE_FRAME *rf,
int8_t ref_frame_type) {
if (ref_frame_type > ALTREF_FRAME) { if (ref_frame_type > ALTREF_FRAME) {
rf[0] = ref_frame_type - ALTREF_FRAME; rf[0] = ref_frame_type - ALTREF_FRAME;
rf[1] = ALTREF_FRAME; rf[1] = ALTREF_FRAME;
...@@ -236,8 +237,8 @@ static void vp10_set_ref_frame(MV_REFERENCE_FRAME *rf, int8_t ref_frame_type) { ...@@ -236,8 +237,8 @@ static void vp10_set_ref_frame(MV_REFERENCE_FRAME *rf, int8_t ref_frame_type) {
} }
} }
static int16_t vp10_mode_context_analyzer(const int16_t *const mode_context, static INLINE int16_t vp10_mode_context_analyzer(
const MV_REFERENCE_FRAME *const rf, const int16_t *const mode_context, const MV_REFERENCE_FRAME *const rf,
BLOCK_SIZE bsize, int block) { BLOCK_SIZE bsize, int block) {
int16_t mode_ctx = 0; int16_t mode_ctx = 0;
if (block >= 0) { if (block >= 0) {
......
...@@ -225,11 +225,6 @@ static void vp10_init_intra_predictors_internal(void) { ...@@ -225,11 +225,6 @@ static void vp10_init_intra_predictors_internal(void) {
#undef intra_pred_allsizes #undef intra_pred_allsizes
} }
static INLINE void memset16(uint16_t *dst, int val, int n) {
while (n--)
*dst++ = val;
}
#if CONFIG_EXT_INTRA #if CONFIG_EXT_INTRA
#define PI 3.14159265 #define PI 3.14159265
#define FILTER_INTRA_PREC_BITS 10 #define FILTER_INTRA_PREC_BITS 10
...@@ -946,9 +941,9 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd, ...@@ -946,9 +941,9 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd,
left_col[i] = ref[i * ref_stride - 1]; left_col[i] = ref[i * ref_stride - 1];
} }
if (i < (bs << need_bottom)) if (i < (bs << need_bottom))
memset16(&left_col[i], left_col[i - 1], (bs << need_bottom) - i); vpx_memset16(&left_col[i], left_col[i - 1], (bs << need_bottom) - i);
} else { } else {
memset16(left_col, base + 1, bs << need_bottom); vpx_memset16(left_col, base + 1, bs << need_bottom);
} }
} }
...@@ -976,9 +971,9 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd, ...@@ -976,9 +971,9 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd,
i += n_topright_px; i += n_topright_px;
} }
if (i < (bs << need_right)) if (i < (bs << need_right))
memset16(&above_row[i], above_row[i - 1], (bs << need_right) - i); vpx_memset16(&above_row[i], above_row[i - 1], (bs << need_right) - i);
} else { } else {
memset16(above_row, base - 1, bs << need_right); vpx_memset16(above_row, base - 1, bs << need_right);
} }
} }
......
...@@ -146,7 +146,7 @@ static void loop_restoration_filter(uint8_t *data, int width, int height, ...@@ -146,7 +146,7 @@ static void loop_restoration_filter(uint8_t *data, int width, int height,
width * sizeof(*data)); width * sizeof(*data));
} }
} }
#if 0 // TODO(yaowu): remove when the experiment is finalized
// Normalized non-separable filter where weights all sum to 1 // Normalized non-separable filter where weights all sum to 1
static void loop_restoration_filter_norm(uint8_t *data, int width, int height, static void loop_restoration_filter_norm(uint8_t *data, int width, int height,
int stride, restoration_info_n *rst, int stride, restoration_info_n *rst,
...@@ -176,6 +176,7 @@ static void loop_restoration_filter_norm(uint8_t *data, int width, int height, ...@@ -176,6 +176,7 @@ static void loop_restoration_filter_norm(uint8_t *data, int width, int height,
width * sizeof(*data)); width * sizeof(*data));
} }
} }
#endif
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
static void loop_restoration_filter_highbd( static void loop_restoration_filter_highbd(
...@@ -223,6 +224,7 @@ static void loop_restoration_filter_highbd( ...@@ -223,6 +224,7 @@ static void loop_restoration_filter_highbd(
} }
} }
#if 0 // TODO(yaowu): remove when the experiment is finalized
// Normalized non-separable filter where weights all sum to 1 // Normalized non-separable filter where weights all sum to 1
static void loop_restoration_filter_norm_highbd( static void loop_restoration_filter_norm_highbd(
uint8_t *data8, int width, int height, uint8_t *data8, int width, int height,
...@@ -255,6 +257,7 @@ static void loop_restoration_filter_norm_highbd( ...@@ -255,6 +257,7 @@ static void loop_restoration_filter_norm_highbd(
width * sizeof(*data)); width * sizeof(*data));
} }
} }
#endif
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VP9_HIGHBITDEPTH
void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame, void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
......
...@@ -118,16 +118,6 @@ void vp10_encode_token_init() { ...@@ -118,16 +118,6 @@ void vp10_encode_token_init() {
#endif // CONFIG_EXT_INTRA #endif // CONFIG_EXT_INTRA
} }
#if CONFIG_SUPERTX
static int vp10_check_supertx(VP10_COMMON *cm, int mi_row, int mi_col,
BLOCK_SIZE bsize) {
MODE_INFO *mi;
mi = cm->mi + (mi_row * cm->mi_stride + mi_col);
return mi[0].mbmi.tx_size == max_txsize_lookup[bsize] &&
mi[0].mbmi.sb_type < bsize;
}
#endif // CONFIG_SUPERTX
static void write_intra_mode(vpx_writer *w, PREDICTION_MODE mode, static void write_intra_mode(vpx_writer *w, PREDICTION_MODE mode,
const vpx_prob *probs) { const vpx_prob *probs) {
vp10_write_token(w, vp10_intra_mode_tree, probs, &intra_mode_encodings[mode]); vp10_write_token(w, vp10_intra_mode_tree, probs, &intra_mode_encodings[mode]);
......
...@@ -3755,6 +3755,7 @@ static int check_dual_ref_flags(VP10_COMP *cpi) { ...@@ -3755,6 +3755,7 @@ static int check_dual_ref_flags(VP10_COMP *cpi) {
} }
} }
#if !CONFIG_VAR_TX
static void reset_skip_tx_size(VP10_COMMON *cm, TX_SIZE max_tx_size) { static void reset_skip_tx_size(VP10_COMMON *cm, TX_SIZE max_tx_size) {
int mi_row, mi_col; int mi_row, mi_col;
const int mis = cm->mi_stride; const int mis = cm->mi_stride;
...@@ -3767,6 +3768,7 @@ static void reset_skip_tx_size(VP10_COMMON *cm, TX_SIZE max_tx_size) { ...@@ -3767,6 +3768,7 @@ static void reset_skip_tx_size(VP10_COMMON *cm, TX_SIZE max_tx_size) {
} }
} }
} }
#endif
static MV_REFERENCE_FRAME get_frame_type(const VP10_COMP *cpi) { static MV_REFERENCE_FRAME get_frame_type(const VP10_COMP *cpi) {
if (frame_is_intra_only(&cpi->common)) if (frame_is_intra_only(&cpi->common))
......
...@@ -34,7 +34,8 @@ static int get_max_filter_level(const VP10_COMP *cpi) { ...@@ -34,7 +34,8 @@ static int get_max_filter_level(const VP10_COMP *cpi) {
} }
} }
#if !CONFIG_LOOP_RESTORATION
#if !JOINT_FILTER_RESTORATION_SEARCH
static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd, static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd,
VP10_COMP *const cpi, VP10_COMP *const cpi,
int filt_level, int partial_frame) { int filt_level, int partial_frame) {
...@@ -70,6 +71,8 @@ static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd, ...@@ -70,6 +71,8 @@ static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd,
return filt_err; return filt_err;
} }
#endif
#endif
#if CONFIG_LOOP_RESTORATION #if CONFIG_LOOP_RESTORATION
#define JOINT_FILTER_RESTORATION_SEARCH #define JOINT_FILTER_RESTORATION_SEARCH
...@@ -242,6 +245,8 @@ static int search_filter_restoration_level(const YV12_BUFFER_CONFIG *sd, ...@@ -242,6 +245,8 @@ static int search_filter_restoration_level(const YV12_BUFFER_CONFIG *sd,
#endif // JOINT_FILTER_RESTORATION_SEARCH #endif // JOINT_FILTER_RESTORATION_SEARCH
#endif // CONFIG_LOOP_RESTORATION #endif // CONFIG_LOOP_RESTORATION
#if !CONFIG_LOOP_RESTORATION
#if !JOINT_FILTER_RESTORATION_SEARCH
static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi, static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi,
int partial_frame) { int partial_frame) {
const VP10_COMMON *const cm = &cpi->common; const VP10_COMMON *const cm = &cpi->common;
...@@ -323,6 +328,8 @@ static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi, ...@@ -323,6 +328,8 @@ static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi,
return filt_best; return filt_best;
} }
#endif
#endif
void vp10_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi, void vp10_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi,
LPF_PICK_METHOD method) { LPF_PICK_METHOD method) {
......
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