Replacing CHECK_BOUNDS macro with inline check_bounds function.

Change-Id: I8437113da256088576bf66401186e35125089c03
Moving hev mask calculation into filter4() function.

Change-Id: Ieccf2070b2b01b4135f4c5f9857667eb7825c761
Using VP9_FRAME_MARKER instead of raw number.

Change-Id: I3addbf6d89a86a707c8df1a463da3e9e367910df
Removing CONFIG_MD5.

We don't need compile time md5 configuration because --md5 is a runtime
option.

Change-Id: Ic0a2427ae5de5a18f31e5ee60c3732481b377ca1
Reusing vp9_get_skip_context() function in encoder.

Change-Id: Ic0345622115941f49b6a568c7b8154ba892cbf0d
Modified Handling of min and max vbr rates.

In two pass encodes bits are allocated to each frame
according to a modified error score for the frame as a
fraction of the modified error score for the clip or section.

Previously a minimum rate per frame was reserved and
subtracted from the bits allocatable by the two pass code.
The vbr max section rate was enforced by clipping the
actual number of bits allocated.

In this patch the min and max vbr rates are enforced
instead by clipping the modified error scores for each frame
rather than the number of bits allocated.

Small gains for all test sets (psnr and SSIM) ranging from
~ +0.05 for YT psnr up to ~ +0.25 for Std-hd SSIM.

Change-Id: Iae27d70bdd3944e3f0cceaf225bad2e8802833de
Merging best_ref_mv and second_best_ref_mv into best_ref_mv[2].

Change-Id: If04b57828847cee09a79c94e1098d1aa4990ea0d
Merge changes Ic0a2427a,I3addbf6d

* changes:
  Removing CONFIG_MD5.
  Using VP9_FRAME_MARKER instead of raw number.
Replacing int_mv with MV.

Change-Id: Ifd432fa3741ba47102d298e0b348eb00f5a9ce53
Rework idct8x8_10 SSE2 implementation

This commit optimizes the SSE2 implmentation of idct8x8_10. It exploits
the fact that only top-left 4x4 block contains non-zero coefficients,
and hence reduces the instructions needed.

The runtime of idct8x8_10_sse2 goes down from 216 to 198 CPU cycles,
estimated by averaging over 100000 runs. For pedestrian_area_1080p 300
frames coded at 4000kbps, the average decoding speed goes up from
79.3 fps to 79.7 fps.

Change-Id: I6d277bbaa3ec9e1562667906975bae06904cb180
Cleaning up get_prediction_decay_rate() function.

Change-Id: Ie8fcee21f41f91f94b4fa02f2a55691dea1734e3
Reduce num of buffer swap calls in idct8_1d_sse2

This commit merges the initial buffer swap operations in idct8_1d_sse2
into the array transpose step, hence reducing number of instructions
therein.

Change-Id: I219f6f50813390d2ec3ee37eecf2a4a2b44ae479
Merge "Merging best_ref_mv and second_best_ref_mv into best_ref_mv[2]."
Pre planes configuration cleanup.

Change-Id: I1d50f8701d9c9dedb84387a773a3e9b4daaad720
Merge "Rework idct8x8_10 SSE2 implementation"
Merge "Reduce num of buffer swap calls in idct8_1d_sse2"
Merge "Pre planes configuration cleanup."
Merge "Cleaning up get_prediction_decay_rate() function."
Adding RefBuffer struct.

Adding RefBuffer to simplify reference buffer management. The struct has a
pointer to image data and scale factors relative to the current frame.

Change-Id: If38eb1491ff687cc11428aee339f3e052e2c5d9e
Tune IDCT8_1D macro function interface

This commit adds input/output ports for IDCT8_1D macro function to
provide more flexibility in variable use. It allows to skip several
buffer swap operations.

Change-Id: I21f3450509537322293043b3281bfd3949868677