Compute token_stats in aom_write_bit_record() function.
The RD_DEBUG experiment computes stats in the _record() functions which
then proxy calls through to the actual bit writer.
The aom_write_bit_record() should proxy calls through to aom_write_bit()
instead of aom_write() with probability 128.
Change-Id: I7617fad0f2c25dc05cf111c660a90068c3f4c513
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index 78ddc08..18af099 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -116,7 +116,12 @@
static INLINE void aom_write_bit_record(aom_writer *w, int bit,
TOKEN_STATS *token_stats) {
- aom_write_record(w, bit, 128, token_stats); // aom_prob_half
+ aom_write_bit(w, bit);
+#if CONFIG_RD_DEBUG
+ token_stats->cost += av1_cost_bit(128, bit); // aom_prob_half
+#else
+ (void)token_stats;
+#endif
}
static INLINE void aom_write_literal(aom_writer *w, int data, int bits) {