Merge changes from topic 'Wundef'
* changes: Enable -Wundef by default Define VP8_TEMPORAL_ALT_REF to !CONFIG_REALTIME_ONLY Remove CONFIG_DEBUG guards from assert() Remove unused function vpx_de_mblock Fix -Wundef warning for OUTPUT_FPF Fix -Wundef warning for __SANITIZE_ADDRESS__
This commit is contained in:
3
configure
vendored
3
configure
vendored
@@ -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:
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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));
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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_
|
||||
|
Reference in New Issue
Block a user