From a7328ab008f0de0c9fe4c6ccff856b3ac777f7bb Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Tue, 24 Mar 2015 12:40:01 +0200 Subject: [PATCH] Fixed tr-skip cost calculation --- src/transform.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/transform.c b/src/transform.c index 4ebf44ed..b3a6cd13 100644 --- a/src/transform.c +++ b/src/transform.c @@ -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) {