Moving init_rate_control() to vp9_ratectrl.{c, h}.

Change-Id: Iab3effc39064f265426c82b455ef38d37dcce5a8
Cleaning up encode_frame_internal().

Change-Id: I9c5f7edc2d5d1ec5aee396b87bdfc99ee21c435a
Converting set_prev_mi() to get_prev_mi().

Change-Id: Iad4002d7aecaae0e25d88e286bacde7e6cd7264f
Cleaning up vp9_diamond_search_sad_c() function.

Change-Id: I0816ec12ec0a6f21d0f25f10c214b5fd327afc6c
Renaming VP9D_COMP & VP9Decompressor to VP9Decoder.

Change-Id: Ieb9b455b8aaef9884391021b7f640ef24c554687
Cleaning up vp9_ratectrl.c file.

Change-Id: If8044d9c71afe02ed1e6c94487344e143bdfcd74
Merge "Moving init_rate_control() to vp9_ratectrl.{c, h}."
Merge "Cleaning up vp9_diamond_search_sad_c() function."
Merge "Cleaning up vp9_ratectrl.c file."
Fix decoder resolution change with tiles

There was a bug with the decoder that if you started the decoder
with more threads than the first frame had tile columns. Afterwards
tried to decode a frame with more tile columns than the first frame,
the decoder would hang. E.g. run vpxdec --threads=4. The first frame
had two tile columns, then the next key frame had 4 tile columns, the
decoder would hang. If you started with 4 tiles and switched to 2
tiles the decoder would be fine. The issue is that the worker the thread
loop is using is stale.

I added a test vector "vp90-2-14-resize-848x480-1280x720.webm" that
exhibited the bug.

Change-Id: I7bdd47241a52ac0fe1c693a609bc779257e94229
Cleaning up vp9_firstpass.c

Change-Id: Ie5723690f7c0bfa29a7ccef5da0c6c6326600ee6
Adding vp9_ssim.h file.

Change-Id: Ib3b3864a6018c62ac1ea18e30795af74464596cd
High-level hooks for Profile 2 (10/12 bit)

Adds some high-level hooks for profile 2 before further
progress on the implementation.

According to the definitiion in this patch:
1. Profile 2 only supports 10 or 12 bit color but not 8
2. Profile 2 supports all color sampling modes: 444, 422 and 420,
and alpha plane.
3. Profile 3 is currently undefined.

Please consider the definition carefully and suggest modifications
to the definition as needed.

Change-Id: I5b284fc679e54ac5aee171af72fa7994cfd28995
third_party/libwebm: Pull from upstream

Pulling latest libwebm from upstream.

Change-Id: I62edafb0b0283160c9b4060fd5907e3aad6c7820
Select prediction filter type in non-RD mode decision

This commit allows the non-RD mode decision flow to  select
prediction filter type in NEWMV mode. It provides 8.14% compression
performance gains in both settings of AQ=0 and 3. The current speed
impact is about 5% to 10% slower.

Change-Id: Id66ecebf77abd8f90fb3f6a066c0e8dfb4bf1c42
Use source frame difference to make partition decision

Calculate the difference variance between last source frame and
current source frame. The variance is calculated at 16x16 block
level. The variances are compared to several thresholds to decide
final partition sizes.

An adaptive strategy is implemented to decide using
SOURCE_VAR_BASED_PARTITION or FIXED_PARTITION based on motions
in the video. The switching test is done once every
search_type_check_frequency frames.

The selection of source_var_thresh needs to be investigated
further later.

RTC set Borg test showed 0.424% overall psnr gain, and 0.357%
ssim gain. For clips with large enough static area, the
encoding speedup is around 2% to 15%.

Change-Id: Id7d268f1d8cbca7fb8026aa4a53b3c77459dc156
Merge "Fix decoder resolution change with tiles"
Merge "Adding vp9_ssim.h file."
Merge "Cleaning up vp9_firstpass.c"
Merge "Cleaning up encode_frame_internal()."