summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeb Mukherjee <debargha@google.com>2014-04-03 10:22:58 -0700
committerDeb Mukherjee <debargha@google.com>2014-04-03 10:22:58 -0700
commitbe8d2b054e81e10c944efa2040fc2a13dce2b070 (patch)
treeeb4af05033c678474fcba5c3ed3adfa621148351
parent97f4fb7b5f1eb76d879601f469057f52a87b9f9c (diff)
downloadlibvpx-be8d2b054e81e10c944efa2040fc2a13dce2b070.tar
libvpx-be8d2b054e81e10c944efa2040fc2a13dce2b070.tar.gz
libvpx-be8d2b054e81e10c944efa2040fc2a13dce2b070.tar.bz2
libvpx-be8d2b054e81e10c944efa2040fc2a13dce2b070.zip
Reinstating the DISABLE_RC_LONG_TERM_MEM macro
Reinstates this macro and truns it on in order to avoid issues due to some frames at the end starving in harder videos. A more acceptable solution is in the works. Change-Id: I3c46148e86fa6114e3fed245246fb3686a9e6700
-rw-r--r--vp9/encoder/vp9_firstpass.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 7ec52556e..26fc28004 100644
--- 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_rc_get_second_pass_params(VP9_COMP *cpi) {
}
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