summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_onyx_if.c
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2014-04-09 14:51:29 -0700
committerAdrian Grange <agrange@google.com>2014-04-14 10:54:19 -0700
commitf7bd1274e38ae8ec631887841ea27a10ba366ba2 (patch)
tree4c68b0653c32e2a3b2245e4ebf2f506cb3acb5f8 /vp9/encoder/vp9_onyx_if.c
parent07dddfa3fdf11c08c8b91b96fe94907be228f2cc (diff)
downloadlibvpx-f7bd1274e38ae8ec631887841ea27a10ba366ba2.tar
libvpx-f7bd1274e38ae8ec631887841ea27a10ba366ba2.tar.gz
libvpx-f7bd1274e38ae8ec631887841ea27a10ba366ba2.tar.bz2
libvpx-f7bd1274e38ae8ec631887841ea27a10ba366ba2.zip
Enable vpxenc to specify internal coded frame size
Added command line flags "resize-width" & "resize-height" to allow the user to specify the frame size to encode at. These two flags are ignored if the "resize-allowed" switch is not set to 1. All frames in the clip are then encoded at this size, which must be smaller than the raw frame size. Change-Id: I3d64bd9303d5c0bd678461a866a1ea621700d744
Diffstat (limited to 'vp9/encoder/vp9_onyx_if.c')
-rw-r--r--vp9/encoder/vp9_onyx_if.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 1d70538c6..4b2aa8735 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2997,6 +2997,15 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
cm->frame_flags = *frame_flags;
+ if (cpi->pass == 2 &&
+ cm->current_video_frame == 0 &&
+ cpi->oxcf.allow_spatial_resampling &&
+ cpi->oxcf.end_usage == USAGE_LOCAL_FILE_PLAYBACK) {
+ // Internal scaling is triggered on the first frame.
+ vp9_set_size_literal(cpi, cpi->oxcf.scaled_frame_width,
+ cpi->oxcf.scaled_frame_height);
+ }
+
// Reset the frame pointers to the current frame size
vp9_realloc_frame_buffer(get_frame_new_buffer(cm),
cm->width, cm->height,