summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2016-09-29 11:15:26 -0700
committerMarco <marpan@google.com>2016-09-29 13:03:26 -0700
commite765435293a4aa88fe28fa67b17c581f385475a6 (patch)
tree1e1e7e24ac82fede38a25f97dbfe5207667d2890
parente094e151de32659fae15b3567e5dead4a5ba310d (diff)
downloadlibvpx-e765435293a4aa88fe28fa67b17c581f385475a6.tar
libvpx-e765435293a4aa88fe28fa67b17c581f385475a6.tar.gz
libvpx-e765435293a4aa88fe28fa67b17c581f385475a6.tar.bz2
libvpx-e765435293a4aa88fe28fa67b17c581f385475a6.zip
vp9: On change_config() only call update_frame_size if needed.
change_config() may be called often in real-time application, to update bitrate/framerate or qp-max/min. No need to do update_frame_size() unless frame size has changed. Change-Id: I23a51deade1e03adc91c468f9ffde3235298770c
-rw-r--r--vp9/encoder/vp9_encoder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index e8f5ec55a..12f02e7c5 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -1481,7 +1481,9 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
}
}
- update_frame_size(cpi);
+ if (cm->current_video_frame == 0 || last_w != cpi->oxcf.width ||
+ last_h != cpi->oxcf.height)
+ update_frame_size(cpi);
if (last_w != cpi->oxcf.width || last_h != cpi->oxcf.height) {
memset(cpi->consec_zero_mv, 0,