static void make_qmatrices(qm_val_t *wmatrix[NUM_QM_LEVELS][2][2][TX_SIZES],
qm_val_t *iwmatrix[NUM_QM_LEVELS][2][2][TX_SIZES]);
#endif
-#if CONFIG_NEW_QUANT
+#if CONFIG_NEW_QUANT
// Bin widths expressed as a fraction over 128 of the quant stepsize,
// for the quantization bins 0-4.
// So a value x indicates the bin is actually factor x/128 of the
static const qprofile_type nuq[QUANT_PROFILES][QUANT_RANGES][COEF_BANDS] = {
{ {
- { { 64, 128, 128 }, 0 }, // dc, band 0
- { { 64, 128, 128 }, 0 }, // band 1
- { { 64, 128, 128 }, 0 }, // band 2
- { { 64, 128, 128 }, 0 }, // band 3
- { { 64, 128, 128 }, 0 }, // band 4
- { { 64, 128, 128 }, 0 } // band 5
+ { { 64, 128, 128 }, 8 }, // dc, band 0
+ { { 64, 128, 128 }, 10 }, // band 1
+ { { 64, 128, 128 }, 12 }, // band 2
+ { { 72, 128, 128 }, 14 }, // band 3
+ { { 76, 128, 128 }, 16 }, // band 4
+ { { 80, 128, 128 }, 18 } // band 5
},
{
- { { 64, 128, 128 }, 0 }, // dc, band 0
- { { 64, 128, 128 }, 0 }, // band 1
- { { 64, 128, 128 }, 0 }, // band 2
- { { 64, 128, 128 }, 0 }, // band 3
- { { 64, 128, 128 }, 0 }, // band 4
- { { 64, 128, 128 }, 0 } // band 5
+ { { 64, 128, 128 }, 4 }, // dc, band 0
+ { { 64, 128, 128 }, 6 }, // band 1
+ { { 64, 128, 128 }, 8 }, // band 2
+ { { 64, 128, 128 }, 10 }, // band 3
+ { { 72, 128, 128 }, 12 }, // band 4
+ { { 80, 128, 128 }, 14 } // band 5
} },
#if QUANT_PROFILES > 1
{ {
- { { 64, 128, 128 }, 0 }, // dc, band 0
- { { 64, 128, 128 }, 0 }, // band 1
- { { 64, 128, 128 }, 0 }, // band 2
- { { 64, 128, 128 }, 0 }, // band 3
- { { 64, 128, 128 }, 0 }, // band 4
- { { 64, 128, 128 }, 0 } // band 5
+ { { 64, 128, 128 }, 6 }, // dc, band 0
+ { { 64, 128, 128 }, 8 }, // band 1
+ { { 64, 128, 128 }, 10 }, // band 2
+ { { 64, 128, 128 }, 12 }, // band 3
+ { { 72, 128, 128 }, 14 }, // band 4
+ { { 80, 128, 128 }, 16 } // band 5
},
{
- { { 64, 128, 128 }, 0 }, // dc, band 0
- { { 64, 128, 128 }, 0 }, // band 1
- { { 64, 128, 128 }, 0 }, // band 2
- { { 64, 128, 128 }, 0 }, // band 3
- { { 64, 128, 128 }, 0 }, // band 4
- { { 64, 128, 128 }, 0 } // band 5
+ { { 64, 128, 128 }, 4 }, // dc, band 0
+ { { 64, 128, 128 }, 6 }, // band 1
+ { { 64, 128, 128 }, 8 }, // band 2
+ { { 64, 128, 128 }, 10 }, // band 3
+ { { 72, 128, 128 }, 12 }, // band 4
+ { { 80, 128, 128 }, 14 } // band 5
} },
#if QUANT_PROFILES > 2
{ {
- { { 64, 128, 128 }, 0 }, // dc, band 0
- { { 64, 128, 128 }, 0 }, // band 1
- { { 64, 128, 128 }, 0 }, // band 2
- { { 64, 128, 128 }, 0 }, // band 3
- { { 64, 128, 128 }, 0 }, // band 4
- { { 64, 128, 128 }, 0 }, // band 5
+ { { 64, 128, 128 }, 6 }, // dc, band 0
+ { { 64, 128, 128 }, 8 }, // band 1
+ { { 64, 128, 128 }, 10 }, // band 2
+ { { 64, 128, 128 }, 12 }, // band 3
+ { { 72, 128, 128 }, 14 }, // band 4
+ { { 80, 128, 128 }, 16 } // band 5
},
{
- { { 64, 128, 128 }, 0 }, // dc, band 0
- { { 64, 128, 128 }, 0 }, // band 1
- { { 64, 128, 128 }, 0 }, // band 2
- { { 64, 128, 128 }, 0 }, // band 3
- { { 64, 128, 128 }, 0 }, // band 4
- { { 64, 128, 128 }, 0 }, // band 5
+ { { 64, 128, 128 }, 4 }, // dc, band 0
+ { { 64, 128, 128 }, 6 }, // band 1
+ { { 64, 128, 128 }, 8 }, // band 2
+ { { 64, 128, 128 }, 10 }, // band 3
+ { { 72, 128, 128 }, 12 }, // band 4
+ { { 80, 128, 128 }, 14 } // band 5
} }
#endif // QUANT_PROFILES > 2
#endif // QUANT_PROFILES > 1
#endif
const int shift = get_tx_scale(xd, tx_type, tx_size);
#if CONFIG_NEW_QUANT
- int dq = get_dq_profile_from_ctx(ctx);
+ int dq = get_dq_profile_from_ctx(ctx, ref, type);
const dequant_val_type_nuq *dequant_val = pd->dequant_val_nuq[dq];
#else
const int dq_step[2] = { dequant_ptr[0] >> shift, dequant_ptr[1] >> shift };
const struct macroblockd_plane *const pd = &xd->plane[plane];
PLANE_TYPE plane_type = (plane == 0) ? PLANE_TYPE_Y : PLANE_TYPE_UV;
TX_TYPE tx_type = get_tx_type(plane_type, xd, block, tx_size);
- const scan_order *const scan_order =
- get_scan(tx_size, tx_type, is_inter_block(&xd->mi[0]->mbmi));
+ const int is_inter = is_inter_block(&xd->mi[0]->mbmi);
+ const scan_order *const scan_order = get_scan(tx_size, tx_type, is_inter);
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
- int dq = get_dq_profile_from_ctx(ctx);
+ int dq = get_dq_profile_from_ctx(ctx, is_inter, plane_type);
uint16_t *const eob = &p->eobs[block];
const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
const int16_t *src_diff;
MACROBLOCKD *const xd = &x->e_mbd;
const struct macroblock_plane *const p = &x->plane[plane];
const struct macroblockd_plane *const pd = &xd->plane[plane];
- int dq = get_dq_profile_from_ctx(ctx);
+ const int is_inter = is_inter_block(&xd->mi[0]->mbmi);
PLANE_TYPE plane_type = (plane == 0) ? PLANE_TYPE_Y : PLANE_TYPE_UV;
TX_TYPE tx_type = get_tx_type(plane_type, xd, block, tx_size);
- const scan_order *const scan_order =
- get_scan(tx_size, tx_type, is_inter_block(&xd->mi[0]->mbmi));
+ const scan_order *const scan_order = get_scan(tx_size, tx_type, is_inter);
+ int dq = get_dq_profile_from_ctx(ctx, is_inter, plane_type);
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
uint16_t *const eob = &p->eobs[block];
const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
const int16_t *src_diff;
- int dq = get_dq_profile_from_ctx(ctx);
+ const int is_inter = is_inter_block(&xd->mi[0]->mbmi);
+ int dq = get_dq_profile_from_ctx(ctx, is_inter, plane_type);
FWD_TXFM_PARAM fwd_txfm_param;
uint16_t *const eob = &p->eobs[block];
const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
const int16_t *src_diff;
- int dq = get_dq_profile_from_ctx(ctx);
+ const int is_inter = is_inter_block(&xd->mi[0]->mbmi);
+ int dq = get_dq_profile_from_ctx(ctx, is_inter, plane_type);
FWD_TXFM_PARAM fwd_txfm_param;