summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2017-03-23 14:32:43 -0700
committerMarco <marpan@google.com>2017-03-24 10:21:47 -0700
commit07ad5a15c2dc7828efa7a862342005984d87cc6a (patch)
treef1164ae08c1064b4dca3694323cc28faf74beff1 /vp9/encoder/vp9_ratectrl.c
parent10164407fbbb3b3d6ad33937f0b8218ceeaccb97 (diff)
downloadlibvpx-07ad5a15c2dc7828efa7a862342005984d87cc6a.tar
libvpx-07ad5a15c2dc7828efa7a862342005984d87cc6a.tar.gz
libvpx-07ad5a15c2dc7828efa7a862342005984d87cc6a.tar.bz2
libvpx-07ad5a15c2dc7828efa7a862342005984d87cc6a.zip
vp9: Fix to condition on using source_sad for 1 pass real-time.
Make the source_sad feature work properly for cases of VBR or screen_content with SVC. Added unittest for SVC with screen-content on. Change-Id: Iba5254fd8833fb11da521e00cc1317ec81d3f89b
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index fb41427ea..d7a0e1aa8 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -2303,7 +2303,7 @@ void vp9_avg_source_sad(VP9_COMP *cpi) {
(sbi_row % 2 != 0 && sbi_col % 2 != 0)))) {
tmp_sad = cpi->fn_ptr[bsize].sdf(src_y, src_ystride, last_src_y,
last_src_ystride);
- if (cpi->sf.use_source_sad) {
+ if (cpi->sf.use_source_sad && cpi->content_state_sb != NULL) {
unsigned int tmp_sse;
unsigned int tmp_variance = vpx_variance64x64(
src_y, src_ystride, last_src_y, last_src_ystride, &tmp_sse);