ref: 1259cd7bcecc21e1db065f76383e44781051bc84
parent: 3b39d7503f4ce75dce962445dddfbfb18f6babf0
parent: be8d2b054e81e10c944efa2040fc2a13dce2b070
author: Paul Wilkins <[email protected]>
date: Fri Apr 4 02:30:40 EDT 2014
Merge "Reinstating the DISABLE_RC_LONG_TERM_MEM macro"
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -61,6 +61,8 @@
#define MIN_GF_INTERVAL 4
#endif
+#define DISABLE_RC_LONG_TERM_MEM
+
static void swap_yv12(YV12_BUFFER_CONFIG *a, YV12_BUFFER_CONFIG *b) {
YV12_BUFFER_CONFIG temp = *a;
*a = *b;
@@ -2330,7 +2332,11 @@
}
void vp9_twopass_postencode_update(VP9_COMP *cpi) {
+#ifdef DISABLE_RC_LONG_TERM_MEM
+ const uint64_t bits_used = cpi->rc.this_frame_target;
+#else
const uint64_t bits_used = cpi->rc.projected_frame_size;
+#endif
cpi->twopass.bits_left -= bits_used;
cpi->twopass.bits_left = MAX(cpi->twopass.bits_left, 0);
// Update bits left to the kf and gf groups to account for overshoot or