summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure3
-rw-r--r--vp8/common/treecoder.c12
-rw-r--r--vp8/decoder/decodemv.c3
-rw-r--r--vp8/encoder/bitstream.c4
-rw-r--r--vp8/encoder/firstpass.c2
-rw-r--r--vp8/encoder/onyx_int.h4
-rw-r--r--vpx_dsp/deblock.c10
-rw-r--r--vpx_ports/mem.h4
8 files changed, 8 insertions, 34 deletions
diff --git a/configure b/configure
index e88e5698c..638e19750 100755
--- a/configure
+++ b/configure
@@ -574,6 +574,9 @@ process_toolchain() {
check_add_cflags -Wimplicit-function-declaration
check_add_cflags -Wuninitialized
check_add_cflags -Wunused
+ # check_add_cflags also adds to cxxflags. gtest does not do well with
+ # -Wundef so add it explicitly to CFLAGS only.
+ check_cflags -Wundef && add_cflags_only -Wundef
case ${CC} in
*clang*)
# libvpx and/or clang have issues with aliasing:
diff --git a/vp8/common/treecoder.c b/vp8/common/treecoder.c
index d04af0b79..9feb40a5a 100644
--- a/vp8/common/treecoder.c
+++ b/vp8/common/treecoder.c
@@ -8,12 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#if CONFIG_DEBUG
#include <assert.h>
-#endif
#include <stdio.h>
-#include "treecoder.h"
+#include "vp8/common/treecoder.h"
static void tree2tok(struct vp8_token_struct *const p, vp8_tree t, int i, int v,
int L) {
@@ -48,9 +46,7 @@ static void branch_counts(int n, /* n = size of alphabet */
const int tree_len = n - 1;
int t = 0;
-#if CONFIG_DEBUG
assert(tree_len);
-#endif
do {
branch_ct[t][0] = branch_ct[t][1] = 0;
@@ -68,17 +64,13 @@ static void branch_counts(int n, /* n = size of alphabet */
do {
const int b = (enc >> --L) & 1;
const int j = i >> 1;
-#if CONFIG_DEBUG
assert(j < tree_len && 0 <= L);
-#endif
branch_ct[j][b] += ct;
i = tree[i + b];
} while (i > 0);
-#if CONFIG_DEBUG
assert(!L);
-#endif
} while (++t < n);
}
@@ -97,9 +89,7 @@ void vp8_tree_probs_from_distribution(int n, /* n = size of alphabet */
const unsigned int *const c = branch_ct[t];
const unsigned int tot = c[0] + c[1];
-#if CONFIG_DEBUG
assert(tot < (1 << 24)); /* no overflow below */
-#endif
if (tot) {
const unsigned int p = ((c[0] * Pfac) + (rd ? tot >> 1 : 0)) / tot;
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c
index 0acba1a36..b946ab73d 100644
--- a/vp8/decoder/decodemv.c
+++ b/vp8/decoder/decodemv.c
@@ -14,9 +14,6 @@
#include "onyxd_int.h"
#include "vp8/common/findnearmv.h"
-#if CONFIG_DEBUG
-#include <assert.h>
-#endif
static B_PREDICTION_MODE read_bmode(vp8_reader *bc, const vp8_prob *p) {
const int i = vp8_treed_read(bc, vp8_bmode_tree, p);
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c
index d10b7cbe4..06c2f624f 100644
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -338,18 +338,14 @@ static void pack_mb_row_tokens(VP8_COMP *cpi, vp8_writer *w) {
static void write_mv_ref(vp8_writer *w, MB_PREDICTION_MODE m,
const vp8_prob *p) {
-#if CONFIG_DEBUG
assert(NEARESTMV <= m && m <= SPLITMV);
-#endif
vp8_write_token(w, vp8_mv_ref_tree, p,
vp8_mv_ref_encoding_array + (m - NEARESTMV));
}
static void write_sub_mv_ref(vp8_writer *w, B_PREDICTION_MODE m,
const vp8_prob *p) {
-#if CONFIG_DEBUG
assert(LEFT4X4 <= m && m <= NEW4X4);
-#endif
vp8_write_token(w, vp8_sub_mv_ref_tree, p,
vp8_sub_mv_ref_encoding_array + (m - LEFT4X4));
}
diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c
index 8439660aa..a175d1a23 100644
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -33,7 +33,7 @@
#include "encodemv.h"
#include "encodeframe.h"
-/* #define OUTPUT_FPF 1 */
+#define OUTPUT_FPF 0
extern void vp8cx_frame_init_quantizer(VP8_COMP *cpi);
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h
index b07494b62..6df8f81c4 100644
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -55,9 +55,7 @@ extern "C" {
#define MV_ZBIN_BOOST 4
#define ZBIN_OQ_MAX 192
-#if !(CONFIG_REALTIME_ONLY)
-#define VP8_TEMPORAL_ALT_REF 1
-#endif
+#define VP8_TEMPORAL_ALT_REF !CONFIG_REALTIME_ONLY
typedef struct {
int kf_indicated;
diff --git a/vpx_dsp/deblock.c b/vpx_dsp/deblock.c
index d3e047221..589b124e2 100644
--- a/vpx_dsp/deblock.c
+++ b/vpx_dsp/deblock.c
@@ -190,13 +190,3 @@ void vpx_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,
}
}
}
-
-#if CONFIG_POSTPROC
-static void vpx_de_mblock(YV12_BUFFER_CONFIG *post, int q) {
- vpx_mbpost_proc_across_ip(post->y_buffer, post->y_stride, post->y_height,
- post->y_width, q2mbl(q));
- vpx_mbpost_proc_down(post->y_buffer, post->y_stride, post->y_height,
- post->y_width, q2mbl(q));
-}
-
-#endif
diff --git a/vpx_ports/mem.h b/vpx_ports/mem.h
index 23e015191..2d49b7a06 100644
--- a/vpx_ports/mem.h
+++ b/vpx_ports/mem.h
@@ -53,10 +53,10 @@
#define __has_feature(x) 0
#endif // !defined(__has_feature)
-#if __has_feature(address_sanitizer) || __SANITIZE_ADDRESS__
+#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
#define VPX_WITH_ASAN 1
#else
#define VPX_WITH_ASAN 0
-#endif // __has_feature(address_sanitizer) || __SANITIZE_ADDRESS
+#endif // __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
#endif // VPX_PORTS_MEM_H_