Commit ab77e73b authored by Jingning Han's avatar Jingning Han

Fix compiling warnings in var-tx and pvq

Change-Id: Ie836a113978028f3bde2acd31061d9a663547087
parent 919caadb
......@@ -195,7 +195,7 @@ void av1_foreach_8x8_transformed_block_in_plane(
}
#endif
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
void av1_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
int plane, TX_SIZE tx_size, int has_eob, int aoff,
int loff) {
......
......@@ -19,7 +19,7 @@
#endif // CONFIG_ANS
#include "av1/common/blockd.h"
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
#include "av1/common/common.h"
#include "av1/common/entropy.h"
#include "av1/common/idct.h"
......@@ -546,7 +546,7 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane,
#endif // CONFIG_PALETTE_THROUGHPUT
#endif // CONFIG_PALETTE
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
int av1_decode_block_tokens(MACROBLOCKD *const xd, int plane,
const SCAN_ORDER *sc, int x, int y, TX_SIZE tx_size,
TX_TYPE tx_type, int16_t *max_scan_line,
......
......@@ -12,7 +12,7 @@
#ifndef AV1_DECODER_DETOKENIZE_H_
#define AV1_DECODER_DETOKENIZE_H_
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
#include "av1/decoder/decoder.h"
#if CONFIG_ANS
#include "aom_dsp/ans.h"
......@@ -34,7 +34,7 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane, aom_reader *r);
#endif // CONFIG_PALETTE_THROUGHPUT
#endif // CONFIG_PALETTE
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
int av1_decode_block_tokens(MACROBLOCKD *const xd, int plane,
const SCAN_ORDER *sc, int x, int y, TX_SIZE tx_size,
TX_TYPE tx_type, int16_t *max_scan_line,
......
......@@ -961,7 +961,7 @@ static void pack_mb_tokens(aom_writer *w, const TOKENEXTRA **tp,
}
#endif
#endif // !CONFIG_PVG
#if CONFIG_VAR_TX && !CONFIG_COEF_INTERLEAVE
#if CONFIG_VAR_TX && !CONFIG_COEF_INTERLEAVE && !CONFIG_PVQ
static void pack_txb_tokens(aom_writer *w, const TOKENEXTRA **tp,
const TOKENEXTRA *const tok_end, MACROBLOCKD *xd,
MB_MODE_INFO *mbmi, int plane,
......
......@@ -665,10 +665,9 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
const int block_raster_idx = av1_block_index_to_raster_order(tx_size, block);
#if CONFIG_PVQ
int tx_width_pixels, tx_height_pixels;
int i, j;
int j;
#endif
#if CONFIG_VAR_TX
int i;
int bw = block_size_wide[plane_bsize] >> tx_size_wide_log2[0];
#endif
dst = &pd->dst
......@@ -710,6 +709,7 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
}
#if CONFIG_VAR_TX
int i;
for (i = 0; i < tx_size_wide_unit[tx_size]; ++i) a[i] = a[0];
for (i = 0; i < tx_size_high_unit[tx_size]; ++i) l[i] = l[0];
......@@ -734,8 +734,10 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
// but av1_inv_txfm_add_*x*() also does addition of predicted image to
// inverse transformed image,
// pass blank dummy image to av1_inv_txfm_add_*x*(), i.e. set dst as zeros
for (j = 0; j < tx_height_pixels; j++)
for (j = 0; j < tx_height_pixels; j++) {
int i;
for (i = 0; i < tx_width_pixels; i++) dst[j * pd->dst.stride + i] = 0;
}
#endif
// inverse transform parameters
......
......@@ -1088,7 +1088,7 @@ int64_t av1_highbd_block_error_c(const tran_low_t *coeff,
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
/* The trailing '0' is a terminator which is used inside av1_cost_coeffs() to
* decide whether to include cost of a trailing EOB node or not (i.e. we
* can skip this if the last coefficient in this transform block, e.g. the
......
......@@ -127,7 +127,7 @@ static INLINE void av1_merge_rd_stats(RD_STATS *rd_stats_dst,
}
#endif
}
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
int av1_cost_coeffs(const AV1_COMMON *const cm, MACROBLOCK *x, int plane,
int block, int coeff_ctx, TX_SIZE tx_size,
const int16_t *scan, const int16_t *nb,
......
......@@ -320,7 +320,7 @@ struct tokenize_b_args {
int this_rate;
};
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
static void cost_coeffs_b(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg) {
struct tokenize_b_args *const args = arg;
......@@ -441,7 +441,7 @@ void av1_tokenize_palette_sb(const AV1_COMP *cpi,
}
#endif // CONFIG_PALETTE
#if !CONFIG_PVQ
#if !CONFIG_PVQ || CONFIG_VAR_TX
#if CONFIG_PALETTE && CONFIG_PALETTE_THROUGHPUT
void tokenize_palette_b(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg) {
......
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