Commit 4c80deb9 authored by Yushin Cho's avatar Yushin Cho Committed by Yushin Cho

Pass prediction mode to coefficient coder

parent f187ea0c
......@@ -2960,10 +2960,10 @@ impl ContextWriter {
pub fn write_coeffs_lv_map(
&mut self, w: &mut dyn Writer, plane: usize, bo: &BlockOffset, coeffs_in: &[i32],
pred_mode: PredictionMode,
tx_size: TxSize, tx_type: TxType, plane_bsize: BlockSize, xdec: usize,
ydec: usize, use_reduced_tx_set: bool
) -> bool {
let pred_mode = self.bc.get_mode(bo);
let is_inter = pred_mode >= PredictionMode::NEARESTMV;
//assert!(!is_inter);
// Note: Both intra and inter mode uses inter scan order. Surprised?
......
......@@ -1222,7 +1222,7 @@ pub fn encode_tx_block(
forward_transform(&residual.array, coeffs, tx_size.width(), tx_size, tx_type, bit_depth);
fs.qc.quantize(coeffs);
let has_coeff = cw.write_coeffs_lv_map(w, p, bo, &coeffs, tx_size, tx_type, plane_bsize, xdec, ydec,
let has_coeff = cw.write_coeffs_lv_map(w, p, bo, &coeffs, mode, tx_size, tx_type, plane_bsize, xdec, ydec,
fi.use_reduced_tx_set);
// Reconstruct
......
......@@ -215,9 +215,6 @@ pub fn rdo_tx_size_type(seq: &Sequence, fi: &FrameInvariants,
let is_inter = !luma_mode.is_intra();
let tx_set = get_tx_set(tx_size, is_inter, fi.use_reduced_tx_set);
cw.bc.set_block_size(bo, bsize);
cw.bc.set_mode(bo, bsize, luma_mode);
let tx_type = if tx_set > TxSet::TX_SET_DCTONLY && fi.config.speed <= 3 && !skip {
// FIXME: there is one redundant transform type decision per encoded block
rdo_tx_type_decision(fi, fs, cw, luma_mode, ref_frame, mv, bsize, bo, tx_size, tx_set, seq.bit_depth)
......
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