Revert "Clamp inverse transform coefficients"
This reverts commit 79b78b7d470576e2ea073de18675d418874b0f01.
The transform coefficient range needs some more tuning.
Before we finalize on that front, directly applying clamping
would cause multiple unit test failure issues. Hence revert
this Cl temporarily.
BUG=aomedia:612
Change-Id: I1dd8680dee17289801c4a209275f05a498355c8e
diff --git a/av1/common/scan.c b/av1/common/scan.c
index f01221e..a0881a9 100644
--- a/av1/common/scan.c
+++ b/av1/common/scan.c
@@ -6600,6 +6600,10 @@
}
}
+static INLINE int clamp_64(int64_t value, int low, int high) {
+ return value < low ? low : (value > high ? high : (int)value);
+}
+
static void update_scan_prob(AV1_COMMON *cm, TX_SIZE tx_size, TX_TYPE tx_type,
int rate_16) {
FRAME_CONTEXT *pre_fc = cm->pre_fc;
@@ -6617,7 +6621,7 @@
(curr_prob * rate_16 + prev_prob * ((1 << 16) - rate_16)) >> 16;
// TODO(angiebird): reduce the bit usage of probabilities and remove
// clamp_64()
- non_zero_prob[i] = (int32_t)clamp_64(pred_prob, 0, UINT16_MAX);
+ non_zero_prob[i] = clamp_64(pred_prob, 0, UINT16_MAX);
}
}