Move input frame scaling into the recode loop

Move the point at which input frames are scaled
into the recode loop. This will allow us to change
the coded frame size dynamically in response
to previous attempts to encode the frame at a
higher resolution.

A following patch will implement a scheme for
resizing the frame in the recode loop.

Change-Id: I6a59c02d6ac1626512edad6de8b60063b79433e6
Add a 32-bit friendly sse2 quantizer.

This is based on the 64-bit ssse3 quantizer.

1.1x speedup for screen content at speed 7.

Change-Id: I57d15415ef97c49165954bbe3daaaf9318e37448
Remove an unneeded function call

set_tile_limits() is called in vp9_change_config() already.

Change-Id: I91c3a0df2c1c7fd7e71546d8f51fd5b65838a7da
Merge "Remove an unneeded function call"
Merge "Add a 32-bit friendly sse2 quantizer."
Merge "Move input frame scaling into the recode loop"
[spatial svc]Another workaround to avoid using prev_mi

We encode a empty invisible frame in front of the base layer frame to
avoid using prev_mi. Since there's a restriction for reference frame
scaling factor, we have to make it smaller and smaller gradually until
its size is 16x16.
Change-Id: I60b680314e33a60b4093cafc296465ee18169c19
fix CONFIG_SPATIAL_SVC warning

this change checks that CONFIG_SPATIAL_SVC is defined and adds a TODO to
ensure this is changed in the future as the release headers can't
depend on vpx_config.h.

vpx/vpx_encoder.h:164:5: warning: "CONFIG_SPATIAL_SVC" is not defined
[-Wundef]

Change-Id: I797a0150e5f56caf048e7ee00b282fbc9c5ede19
Fix in bit-shift operation for highbitdepth decode

Fixes a bug introduced in a previous refactoring patch.

Change-Id: I243e74637cfd7a997c7a1fef03b06c290dd0dee6
Replace copy_partitioning use case with choose_partitioning

This commit replaces the use of copy_partitioning with
choose_partitioning based on the sse of subsamped pixels, which
provides significantly better coding performance and runs at
similar speed, as compared to copy_partitioning. It improves rtc
speed 5 coding performance by 3%.

Change-Id: I52d3682a12dce0147f5e52383a594fc242ca3228
Some updates for Speed 6/VAR_BASED_PARTITION.

Reduce the intra_cost_penalty for non-rd mode,
and some updates to VAR_BASED_PARTITION.

Visual tests show some improvement at Speed 6, for RTC clips.

Change-Id: If9090daf7aed14906a32d931a538ab544bbca606
Use rate/distortion thresholds to control non-RD partition search

Compare the estimated rate and distortion to the thresholds scaled
according to the operating block size and determine if further
split partition search will be run. The compression performance of
speed -5 is changed by -0.074%. The encoding speed is 10% - 15%
faster.

vidyo1 720p
16545 b/f, 40.492 dB, 11475 ms -> 16535 b/f, 40.486 dB, 10100 ms

nik720p
16624 b/f, 36.310 dB, 10071 ms -> 16617 b/f, 36.313 dB, 8346 ms

Change-Id: Ic9197ab5761279ae55d2fb7813b2af0e0db497b8
Merge "Replace copy_partitioning use case with choose_partitioning"
Add init and reset functions for RD_COST struct

Change-Id: I2902de7051a883fd22e27a655209233733969cfd
Merge "Some updates for Speed 6/VAR_BASED_PARTITION."
Merge "fix CONFIG_SPATIAL_SVC warning"
Revert "[spatial svc]Another workaround to avoid using prev_mi"

This reverts commit c113457af9880b8e15a36cdaabfd414d1c245693.

Temporary revert to allow clean revert of another commit.

Change-Id: Ia9b7b755e6c48e1b6e383329f121fef175a24b27
Revert "Move input frame scaling into the recode loop"

This reverts commit 452dc21500a2339ee685cb28efbd2af1b856ea12.

This change has introduced a significant quality regression on content
with forced key frames. (e.g. the YT and yt-hd set). It is most
noticeable in static content where the kf bits dominate. Here, despite
key frames being apparently coded at the same Q, there is a drop in all
metrics of ~20% (e.g clXR and BFa0).

Change-Id: Iba14cc61778c0846fa0a59c33c55a9fc49512cb4
[spatial svc]Another workaround to avoid using prev_mi

We encode a empty invisible frame in front of the base layer frame to
avoid using prev_mi. Since there's a restriction for reference frame
scaling factor, we have to make it smaller and smaller gradually until
its size is 16x16.

Change remerged.

Change-Id: I9efab38bba7da86e056fbe8f663e711c5df38449
Change initialization of static_scene_max_gf_interval.

This removes an unnecessary restriction that causes
a problem (noticed by AWG) when the forced key frame
interval is set to a very small value, such as 10. In this case
we were being forced to code minimal length GF groups.

Change-Id: I76ef5861a09638ff51f61fea02359554184ada53