Commit 1dbe92d6 authored by Pavel Frolov's avatar Pavel Frolov Committed by Yaowu Xu

Fix delta_qindex and delta_lflevel signaling

BUG=aomedia:992

Change-Id: Ifcaedaf312f056fcc29e6a8e020aac0ddc52affd
parent 7f8f1a92
......@@ -42,8 +42,8 @@ static int read_delta_qindex(AV1_COMMON *cm, MACROBLOCKD *xd, aom_reader *r,
FRAME_COUNTS *counts = xd->counts;
int sign, abs, reduced_delta_qindex = 0;
BLOCK_SIZE bsize = mbmi->sb_type;
const int b_col = mi_col & MAX_MIB_MASK;
const int b_row = mi_row & MAX_MIB_MASK;
const int b_col = mi_col & (cm->mib_size - 1);
const int b_row = mi_row & (cm->mib_size - 1);
const int read_delta_q_flag = (b_col == 0 && b_row == 0);
int rem_bits, thr;
int i, smallval;
......@@ -84,8 +84,8 @@ static int read_delta_lflevel(AV1_COMMON *cm, MACROBLOCKD *xd, aom_reader *r,
FRAME_COUNTS *counts = xd->counts;
int sign, abs, reduced_delta_lflevel = 0;
BLOCK_SIZE bsize = mbmi->sb_type;
const int b_col = mi_col & MAX_MIB_MASK;
const int b_row = mi_row & MAX_MIB_MASK;
const int b_col = mi_col & (cm->mib_size - 1);
const int b_row = mi_row & (cm->mib_size - 1);
const int read_delta_lf_flag = (b_col == 0 && b_row == 0);
int rem_bits, thr;
int i, smallval;
......
......@@ -1487,8 +1487,8 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
skip = write_skip(cm, xd, segment_id, mi, w);
if (cm->delta_q_present_flag) {
int super_block_upper_left =
((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0);
int super_block_upper_left = ((mi_row & (cm->mib_size - 1)) == 0) &&
((mi_col & (cm->mib_size - 1)) == 0);
if ((bsize != cm->sb_size || skip == 0) && super_block_upper_left) {
assert(mbmi->current_q_index > 0);
int reduced_delta_qindex =
......@@ -1815,8 +1815,8 @@ static void write_mb_modes_kf(AV1_COMMON *cm, MACROBLOCKD *xd,
const int skip = write_skip(cm, xd, mbmi->segment_id, mi, w);
if (cm->delta_q_present_flag) {
int super_block_upper_left =
((mi_row & MAX_MIB_MASK) == 0) && ((mi_col & MAX_MIB_MASK) == 0);
int super_block_upper_left = ((mi_row & (cm->mib_size - 1)) == 0) &&
((mi_col & (cm->mib_size - 1)) == 0);
if ((bsize != cm->sb_size || skip == 0) && super_block_upper_left) {
assert(mbmi->current_q_index > 0);
int reduced_delta_qindex =
......
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