datarate_test: fix some type conversions

Change-Id: I9840dfab644b0c75ff667174f8005dece005e700
cosmetics: vp9_reconinter.h: make some variables const

Change-Id: If5cd0a1487e97c8e9d13dc2e078c6dceaf79de4f
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
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
Moving get_scan() call out of decode_coeffs() function.

Change-Id: I5db2e5a6c36e6c503dea2e07d9d2e0daf4ac9d89
Merge "Modified Handling of min and max vbr rates."
Clean up:  unused function and variables

Remove adjust_maxq_qrange() and related variables.

Change-Id: I50d065f4619c499283e2680e31d0d99c22439dec
Merge "Tune IDCT8_1D macro function interface"
Corerctly sets frame type in the 2 pass case

This patch sets frame types correctly in the new
vp9_get_second_pass_params() function called prior
to encode_frame_to_data_rate() function, so that the
latter function can just work with what is passed to
it. This will allow multiple vp9_get_second_pass_params()
to be created for various encode strategies without
messing with the core encode function.

There is no difference in derf and yt. stdhd/hd are pending.

Change-Id: I70dfb97e9f497e9cee04052e0e8e0c2892eab0c3
Merge "Moving get_scan() call out of decode_coeffs() function."
Moving reset_segment_features() to encoder/vp9_segmentation.h.

Change-Id: I0db4b31cb2382d4f6249eae0a8f42d227ad0ac57
Added placeholder for real time mode

Change-Id: I203d10f76c7ca78d875eaae15557cd765c6240d1
Merge "Corerctly sets frame type in the 2 pass case"
Combining ref_frame and second_ref_frame into ref_frames[2].

Change-Id: I007d66a1cb1b44751dcceafbaa64649ed9a34562
Using struct twopass_rc* instead of VP9_COMP*.

Change-Id: Id9ff7772aa3a3fb5d6cf94aff7dc9489bd964340
Remove avoid_frame_with_high_error from RD loop

The feature undergoes prior assumption that the recursive partition
size search from 4x4 to 64x64, hence utilizing information from small
blocks to determine early termination in large block rate-distortion
optimization search. The current codebase is now going from top down.
The previous function might go with not properly initialized values,
hence removed.

Tested on pedestrian_area_1080p at 4000 kbps running under speed 2.
No visible difference in runtime observed.

Change-Id: I553df415c6191413762db7ae34e8790c71d8118e
Write correct resolution to the IVF file header (b/11270652)

also:
 o remove dead code, create_dummy_frame
 o Fix a bug in command line handling that caused a segfault if wrong
   number of arguments were given.

Change-Id: I78f026aee4e363967b750e6cde0982659c558a1f
Merge "Adding RefBuffer struct."
Adding get_ref_frame_buffer() function.

Encapsulating direct references to lst_fb_idx, gld_fb_idx, alt_fb_idx.

Change-Id: I7e65ba3f131286e433e6651970c5647311fa4687