Commit 96fa7575 authored by Yaowu Xu's avatar Yaowu Xu

Fix msvc compiling errors and warnings

Change-Id: I69916bb6390dd9275341d8cd3fae2d8961e1cae3
parent 4ab9a5dc
......@@ -1931,7 +1931,7 @@ int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
#endif // CONFIG_EXT_WARPED_MOTION
#if CONFIG_EXT_SKIP
void av1_setup_skip_mode_allowed(AV1_COMMON *const cm) {
void av1_setup_skip_mode_allowed(AV1_COMMON *cm) {
cm->is_skip_mode_allowed = 0;
cm->ref_frame_idx_0 = cm->ref_frame_idx_1 = INVALID_IDX;
......
......@@ -268,7 +268,7 @@ static void restore_boundary_column(uint8_t *dst8, int dst_stride,
dst16[i * dst_stride] = buf[i + RESTORATION_BORDER];
} else {
for (int i = -RESTORATION_BORDER; i < h + RESTORATION_BORDER; i++)
dst8[i * dst_stride] = buf[i + RESTORATION_BORDER];
dst8[i * dst_stride] = (uint8_t)(buf[i + RESTORATION_BORDER]);
}
}
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
......
......@@ -324,24 +324,15 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
ctx = get_br_ctx(levels, pos, bwl, level_counts[pos]);
#endif
for (idx = 0; idx < COEFF_BASE_RANGE / (BR_CDF_SIZE - 1); ++idx) {
int k = av1_read_record_symbol(counts, r,
#if 0
ec_ctx->coeff_br_cdf[AOMMIN(txs_ctx, TX_16X16)][plane_type][ctx],
#else
ec_ctx->coeff_br_cdf[AOMMIN(
txs_ctx, TX_32X32)][plane_type][ctx],
#endif
BR_CDF_SIZE, ACCT_STR);
int k = av1_read_record_symbol(
counts, r,
ec_ctx->coeff_br_cdf[AOMMIN(txs_ctx, TX_32X32)][plane_type][ctx],
BR_CDF_SIZE, ACCT_STR);
*level += k;
if (counts) {
for (int lps = 0; lps < BR_CDF_SIZE - 1; lps++) {
#if 0
++counts->coeff_lps[AOMMIN(txs_ctx, TX_16X16)][plane_type][lps][ctx]
[lps == k];
#else
++counts->coeff_lps[AOMMIN(txs_ctx, TX_32X32)][plane_type][lps][ctx]
[lps == k];
#endif
if (lps == k) break;
}
++counts->coeff_lps_multi[AOMMIN(txs_ctx, TX_32X32)][plane_type][ctx]
......@@ -421,7 +412,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
*level = COEFF_BASE_RANGE + 1 + NUM_BASE_LEVELS;
// Save golomb in tcoeffs because adding it to level may incur overflow
tran_high_t t = *level + read_golomb(xd, r, counts);
cul_level += t;
cul_level += (int)t;
#if CONFIG_NEW_QUANT
dqv_val = &dq_val[pos != 0][0];
t = av1_dequant_abscoeff_nuq(t, dequant[!!pos], dqv_val);
......
......@@ -186,12 +186,11 @@ void av1_decode_frame_from_obus(struct AV1Decoder *pbi, const uint8_t *data,
case OBU_FRAME_HEADER:
// Only decode first frame header received
if (!frame_header_received) {
frame_header_size = obu_payload_size =
frame_header_size =
read_frame_header_obu(pbi, data, data_end, p_data_end);
frame_header_received = 1;
} else {
obu_payload_size = frame_header_size;
}
obu_payload_size = frame_header_size;
if (cm->show_existing_frame) frame_decoding_finished = 1;
break;
case OBU_TILE_GROUP:
......
......@@ -87,8 +87,7 @@ int av1_get_txb_entropy_context(const tran_low_t *qcoeff,
const SCAN_ORDER *scan_order, int eob);
void av1_update_txb_context(const AV1_COMP *cpi, ThreadData *td,
RUN_TYPE dry_run, BLOCK_SIZE bsize, int *rate,
const int mi_row, const int mi_col,
uint8_t allow_update_cdf);
int mi_row, int mi_col, uint8_t allow_update_cdf);
void av1_update_txb_context_b(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
......
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