Fixed tr-skip cost calculation

This commit is contained in:
Marko Viitanen 2015-03-24 12:40:01 +02:00
parent eccf1c1a16
commit a7328ab008

View file

@ -459,6 +459,11 @@ int quantize_residual_trskip(
noskip.cost = pixels_calc_ssd(ref_in, noskip.rec, in_stride, 4, 4);
noskip.cost += get_coeff_cost(state, noskip.coeff, 4, 0, scan_order) * bit_cost;
skip.has_coeffs = quantize_residual(
state, cur_cu, width, color, scan_order,
1, in_stride, 4,
ref_in, pred_in, skip.rec, skip.coeff);
skip.cost = pixels_calc_ssd(ref_in, skip.rec, in_stride, 4, 4);
skip.cost += get_coeff_cost(state, skip.coeff, 4, 0, scan_order) * bit_cost;
if (noskip.cost <= skip.cost) {