Commit 953f086c authored by Urvang Joshi's avatar Urvang Joshi

Add complier warning -wunused and related fixes.

In particular, match use of -Wno-unused-function to that in libvpx
master branch.

Change-Id: I027a4f2a540af5a304b358ddbf293965b4211b9e
parent d847070b
......@@ -452,8 +452,8 @@ static INLINE int calc_mi_size(int len) {
return len + MAX_MIB_SIZE;
}
static void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh, int bwl,
int bhl) {
static INLINE void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh, int bwl,
int bhl) {
int i;
for (i = 0; i < MAX_MB_PLANE; i++) {
xd->plane[i].n4_w = (bw << 1) >> xd->plane[i].subsampling_x;
......
......@@ -1755,20 +1755,6 @@ static int64_t rd_pick_intra_sbuv_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
return best_rd;
}
static int64_t rd_sbuv_dcpred(const AV1_COMP *cpi, MACROBLOCK *x, int *rate,
int *rate_tokenonly, int64_t *distortion,
int *skippable, BLOCK_SIZE bsize) {
int64_t unused;
x->e_mbd.mi[0]->mbmi.uv_mode = DC_PRED;
memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
super_block_uvrd(cpi, x, rate_tokenonly, distortion, skippable, &unused,
bsize, INT64_MAX);
*rate = *rate_tokenonly +
cpi->intra_uv_mode_cost[x->e_mbd.mi[0]->mbmi.mode][DC_PRED];
return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
}
static void choose_intra_uv_mode(const AV1_COMP *const cpi, MACROBLOCK *const x,
PICK_MODE_CONTEXT *ctx, BLOCK_SIZE bsize,
TX_SIZE max_tx_size, int *rate_uv,
......
......@@ -574,7 +574,7 @@ process_toolchain() {
check_add_cflags -Wvla
check_add_cflags -Wimplicit-function-declaration
check_add_cflags -Wuninitialized
check_add_cflags -Wunused-variable
check_add_cflags -Wunused
check_add_cflags -Wsign-compare
# Enabling the following warning for C++ generates some useless warnings
# about some function parameters shadowing class member function names.
......@@ -587,9 +587,10 @@ process_toolchain() {
# work around them until they are fixed
check_add_cflags -fno-strict-aliasing
;;
*) check_add_cflags -Wunused-but-set-variable ;;
esac
enabled extra_warnings || check_add_cflags -Wno-unused-function
if enabled mips || [ -z "${INLINE}" ]; then
enabled extra_warnings || check_add_cflags -Wno-unused-function
fi
fi
if enabled icc; then
......
......@@ -289,6 +289,8 @@ void iht16x16_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
av1_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 12);
}
#if HAVE_SSE2
void idct16x16_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct16x16_10_add_c(in, out, stride, 10);
}
......@@ -297,7 +299,6 @@ void idct16x16_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct16x16_10_add_c(in, out, stride, 12);
}
#if HAVE_SSE2
void idct16x16_256_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct16x16_256_add_sse2(in, out, stride, 10);
}
......
......@@ -77,10 +77,6 @@ typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, aom_bit_depth_t>
Trans32x32Param;
#if CONFIG_AOM_HIGHBITDEPTH
void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct32x32_1024_add_c(in, out, stride, 8);
}
void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct32x32_1024_add_c(in, out, stride, 10);
}
......
......@@ -102,6 +102,7 @@ void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
av1_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12);
}
#if HAVE_SSE2
void idct8x8_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct8x8_10_add_c(in, out, stride, 10);
}
......@@ -110,7 +111,6 @@ void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct8x8_10_add_c(in, out, stride, 12);
}
#if HAVE_SSE2
void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
aom_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
}
......
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