platform/upstream/libvpx.git
11 years agoRemoved vp9_dequantize_b
Scott LaVarnway [Thu, 28 Feb 2013 19:05:00 +0000 (11:05 -0800)]
Removed vp9_dequantize_b

Change-Id: Ie89bd00d58e30bf4094cb748a282f1dfa81a31d8

11 years agoMerge "Dequantization code cleanup." into experimental
Dmitry Kovalev [Thu, 28 Feb 2013 21:46:43 +0000 (13:46 -0800)]
Merge "Dequantization code cleanup." into experimental

11 years agoDequantization code cleanup.
Dmitry Kovalev [Thu, 28 Feb 2013 21:28:05 +0000 (13:28 -0800)]
Dequantization code cleanup.

Removing redundant variables, using x *= y instead x = x * y, moving
variable declarations into inner blocks.

Change-Id: I884f95c755f55d51b7c1c6585f10296919063e41

11 years agoFix incorrect comparison of frame size
John Koleszar [Thu, 28 Feb 2013 18:52:04 +0000 (10:52 -0800)]
Fix incorrect comparison of frame size

The width and height stored in the reference frames are padded out to
a multiple of 16. The Width and Height variables in common are the
displayed size, which may be smaller. The incorrect comparison was
causing scaling related code to be called when it shouldn't have
been. A notable case where this happens is 1080p, since 1088 != 1080.

Change-Id: I55f743eeeeaefbf2e777e193bc9a77ff726e16b5

11 years agothis commit converts all sad ptrs to uint32
Jim Bankoski [Thu, 28 Feb 2013 16:32:14 +0000 (08:32 -0800)]
this commit converts all sad ptrs to uint32

sse4_1 code used uint16_t for returning sad, but that
won't work for 32x32 or 64x64.   This code fixes the
assembly for those and also reenables sse4_1 on linux

Change-Id: I5ce7288d581db870a148e5f7c5092826f59edd81

11 years agofix to parameters to match rtcd
Jim Bankoski [Thu, 28 Feb 2013 16:10:08 +0000 (08:10 -0800)]
fix to parameters to match rtcd

Change-Id: I919e2dd72292fe44f2e53ada56bd42287d50cdeb
Signed-off-by: Jim Bankoski <jimbankoski@google.com>
11 years agoMerge "Faster vp9_short_fdct8x8." into experimental
Christian Duvivier [Thu, 28 Feb 2013 01:50:27 +0000 (17:50 -0800)]
Merge "Faster vp9_short_fdct8x8." into experimental

11 years agoMerge "Fix rollover and pass 1 time estimate" into experimental
John Koleszar [Thu, 28 Feb 2013 01:43:03 +0000 (17:43 -0800)]
Merge "Fix rollover and pass 1 time estimate" into experimental

11 years agoFaster vp9_short_fdct8x8.
Christian Duvivier [Wed, 27 Feb 2013 20:29:06 +0000 (12:29 -0800)]
Faster vp9_short_fdct8x8.

Scalar path is about 1.4x faster (4% overall encoder speedup).
SSE2 path is about 7x faster (13% overall encoder speedup).

Change-Id: I7e85d8225a914a74c61ea370210414696560094d

11 years agoMerge "Code cleanup." into experimental
Dmitry Kovalev [Thu, 28 Feb 2013 00:43:04 +0000 (16:43 -0800)]
Merge "Code cleanup." into experimental

11 years agoCode cleanup.
Dmitry Kovalev [Wed, 27 Feb 2013 19:17:38 +0000 (11:17 -0800)]
Code cleanup.

Fixing code style, using array lookup instead of switch statements for
forward hybrid transforms (in the same way as for their inverses).
Consistent usage of ROUND_POWER_OF_TWO macro in appropriate places.

Change-Id: I0d3822ae11f928905fdbfbe4158f91d97c71015f

11 years agoMerge changes Idc1c490f,I6b5fe1a4 into experimental
John Koleszar [Wed, 27 Feb 2013 21:45:42 +0000 (13:45 -0800)]
Merge changes Idc1c490f,I6b5fe1a4 into experimental

* changes:
  convolve test: validate 1D filters are 1D
  Run all filters through convolve test

11 years agoMerge "Motion vectors code cleanup." into experimental
Dmitry Kovalev [Wed, 27 Feb 2013 21:34:56 +0000 (13:34 -0800)]
Merge "Motion vectors code cleanup." into experimental

11 years agoMerge "Remove unused file" into experimental
Yunqing Wang [Wed, 27 Feb 2013 21:00:10 +0000 (13:00 -0800)]
Merge "Remove unused file" into experimental

11 years agoFix rollover and pass 1 time estimate
John Koleszar [Wed, 27 Feb 2013 19:14:23 +0000 (11:14 -0800)]
Fix rollover and pass 1 time estimate

Fixes a rollover of the cx_time variable for encodes that take
over ~4200 seconds. Also enable the time estimate in first pass.

Change-Id: Ib5a98ee71bccd79a804d709cec7260651d0b7141

11 years agoMerge "Remove unused vp9_copy32xn" into experimental
John Koleszar [Wed, 27 Feb 2013 20:23:45 +0000 (12:23 -0800)]
Merge "Remove unused vp9_copy32xn" into experimental

11 years agoMerge "Remove unused file" into experimental
Yunqing Wang [Wed, 27 Feb 2013 19:58:28 +0000 (11:58 -0800)]
Merge "Remove unused file" into experimental

11 years agoMotion vectors code cleanup.
Dmitry Kovalev [Wed, 27 Feb 2013 19:48:13 +0000 (11:48 -0800)]
Motion vectors code cleanup.

Fixing indentation, removing redundant parenthesis, deciphering single
letter variable names, better spacing.

Change-Id: I1d447a7d69eddbf1e94e0820423615f40ea2d591

11 years agoMerge "Move eob from BLOCKD to MACROBLOCKD." into experimental
Ronald S. Bultje [Wed, 27 Feb 2013 19:39:16 +0000 (11:39 -0800)]
Merge "Move eob from BLOCKD to MACROBLOCKD." into experimental

11 years agoMerge "Optimize vp9_dc_only_idct_add_c function" into experimental
Yunqing Wang [Wed, 27 Feb 2013 19:38:45 +0000 (11:38 -0800)]
Merge "Optimize vp9_dc_only_idct_add_c function" into experimental

11 years agoconvolve test: validate 1D filters are 1D
John Koleszar [Thu, 21 Feb 2013 00:32:02 +0000 (16:32 -0800)]
convolve test: validate 1D filters are 1D

Since the 8-tap lowpass filter is non-interpolating, the results are
different between applying it at whole-pel values and not. This
means that 1D-only versions are requried to be implemented, as
opposed to being an optimization of the 2D case. Calling the 2D
filter instead of the horizontal-only filter is not equivalent
in this case. Update the test to pass invalid filters to the
unused stage of the 1D-only calls, to verify they're unused.

Change-Id: Idc1c490f059adadd4cc80dbe770c1ccefe628b0a

11 years agoRun all filters through convolve test
John Koleszar [Thu, 21 Feb 2013 00:13:01 +0000 (16:13 -0800)]
Run all filters through convolve test

Updates the convolve test to verify that all filters match the
reference implementation. This verifies commit 30f866f, which
fixed some problems with the SSE3 version of the filters for
the vp9_sub_pel_filters_8s and vp9_sub_pel_filters_8lp banks
due to overflow and order of operations.

Change-Id: I6b5fe1a41bc20062e2e64633b1355ae58c9c592c

11 years agoRemove unused file
Yunqing Wang [Wed, 27 Feb 2013 19:13:19 +0000 (11:13 -0800)]
Remove unused file

Removed vp9/decoder/x86/vp9_idct_blk_mmx.c

Change-Id: I07ab06382a394cf556fa5a8e3c98b91f6e4f9ce8

11 years agoMerge "vpxdec: support scaling output" into experimental
John Koleszar [Wed, 27 Feb 2013 19:09:56 +0000 (11:09 -0800)]
Merge "vpxdec: support scaling output" into experimental

11 years agoRemove unused file
Yunqing Wang [Wed, 27 Feb 2013 19:00:58 +0000 (11:00 -0800)]
Remove unused file

Removed vp9_idctllm_mmx.asm

Change-Id: I7152756f23a5a09ed69e8fb40edb2ab3237290fe

11 years agoMove eob from BLOCKD to MACROBLOCKD.
Ronald S. Bultje [Wed, 27 Feb 2013 18:00:24 +0000 (10:00 -0800)]
Move eob from BLOCKD to MACROBLOCKD.

Consistent with VP8.

Change-Id: I8c316ee49f072e15abbb033a80e9c36617891f07

11 years agoMerge "vpxenc: support scaling prior to encoding" into experimental
John Koleszar [Wed, 27 Feb 2013 18:59:21 +0000 (10:59 -0800)]
Merge "vpxenc: support scaling prior to encoding" into experimental

11 years agoMerge "Use ref_frame_map vice active_ref_idx on the encoder" into experimental
John Koleszar [Wed, 27 Feb 2013 18:59:08 +0000 (10:59 -0800)]
Merge "Use ref_frame_map vice active_ref_idx on the encoder" into experimental

11 years agoMerge "Test upscaling as well as downscaling" into experimental
John Koleszar [Wed, 27 Feb 2013 18:25:51 +0000 (10:25 -0800)]
Merge "Test upscaling as well as downscaling" into experimental

11 years agoRemove unused vp9_copy32xn
John Koleszar [Wed, 27 Feb 2013 18:23:06 +0000 (10:23 -0800)]
Remove unused vp9_copy32xn

This function was part of an optimization used in VP8 that required
caching two macroblocks. This is unused in VP9, and might not
survive refactoring to support superblocks, so removing it for now.

Change-Id: I744e585206ccc1ef9a402665c33863fc9fb46f0d

11 years agoMerge changes I922f8602,I0ac3343d into experimental
John Koleszar [Wed, 27 Feb 2013 18:08:53 +0000 (10:08 -0800)]
Merge changes I922f8602,I0ac3343d into experimental

* changes:
  Use 256-byte aligned filter tables
  Set scale factors consistently for SPLITMV

11 years agoMerge "Combined motion compensation with scaled predictors" into experimental
John Koleszar [Wed, 27 Feb 2013 17:46:12 +0000 (09:46 -0800)]
Merge "Combined motion compensation with scaled predictors" into experimental

11 years agovpxdec: support scaling output
John Koleszar [Tue, 26 Feb 2013 00:58:47 +0000 (16:58 -0800)]
vpxdec: support scaling output

Adds an option, --scale, that will rescale any frames produced by
the decoder that don't match the resolution of the first frame to
that resolution. This is useful for playback of files that use
spatial resampling.

Change-Id: I867adc650d535df7ec5b107549359712ea3aaaa0

11 years agovpxenc: support scaling prior to encoding
John Koleszar [Thu, 1 Mar 2012 20:50:40 +0000 (12:50 -0800)]
vpxenc: support scaling prior to encoding

Scales the input of the encoder using libyuv's "box filter". Each stream
may have a different width and height specified. If the width (or
height) parameter is missing (or is explicitly set to 0) then the value
will be calculated based on the specified height (or width) and the
input file's dimensions, preserving its aspect ratio. Leaving the height
unspecified behaves similarly.

Change-Id: Ic7026810b13be030826be80dc6f7fc4aaf0c35d0

11 years agoUse ref_frame_map vice active_ref_idx on the encoder
John Koleszar [Fri, 22 Feb 2013 19:22:03 +0000 (11:22 -0800)]
Use ref_frame_map vice active_ref_idx on the encoder

This patch makes the encoder's use of ref_frame_map and active_ref_idx
consistent with the decoder. ref_frame_map[] maps a reference buffer
index to its actual location in the yv12_fb array, since many
references may share an underlying buffer. active_ref_idx[] mirrors
cpi->{lst,gld,alt}_fb_idx, holding the active references in each
slot.

This also fixes a bug in setup_buffer_inter() where the incorrect
reference was used to populate the scaling factors.

Change-Id: Id3728f6d77cffcd27c248903bf51f9c3e594287e

11 years agoTest upscaling as well as downscaling
John Koleszar [Thu, 21 Feb 2013 18:38:27 +0000 (10:38 -0800)]
Test upscaling as well as downscaling

Fixes a bug in vp9_set_internal_size() that prevented returning to
the unscaled state. Updated the ResizeInternalTest to scale both
down and up. Added a check that all frames are within 2.5% of the
quality of the initial keyframe.

Change-Id: I3b7ef17cdac144ed05b9148dce6badfa75cff5c8

11 years agoUse 256-byte aligned filter tables
John Koleszar [Wed, 20 Feb 2013 23:59:20 +0000 (15:59 -0800)]
Use 256-byte aligned filter tables

This avoids duplicating all the filters twice. Includes fixups to the
convolve routines and associated tests to make this work.

Change-Id: I922f86021594e55072ddb63b42b2313605db6e00

11 years agoCombined motion compensation with scaled predictors
John Koleszar [Wed, 20 Feb 2013 20:34:31 +0000 (12:34 -0800)]
Combined motion compensation with scaled predictors

This patch extends the previous support for using references of a
different resolution in ZEROMV mode to all inter prediction modes.
Subpixel based best-mv scoring is disabled when the reference frame
differs in resolution from the current frame.

Change-Id: Id4dc3e5e6692de98d9857fd56bfad3ac57e944ac

11 years agoSet scale factors consistently for SPLITMV
John Koleszar [Wed, 20 Feb 2013 21:46:55 +0000 (13:46 -0800)]
Set scale factors consistently for SPLITMV

This commit updates the 4x4 prediction to consistently use the
build_2x1_inter_predictor() method. That function is updated to
calculate the scale offset, rather than relying on the caller
to calculate it. In the case that the 2x1 prediction can not
be used, the scale offset is recalculated for each 1x1 block.
The idea here is that the offsets are calculated before each
call to vp9_build_scaled_inter_predictor().

Change-Id: I0ac3343dd54e2846efa3c4195fcd328b709ca04d

11 years agoMerge "Enable 32x32 dct tests" into experimental
Yaowu Xu [Wed, 27 Feb 2013 15:57:07 +0000 (07:57 -0800)]
Merge "Enable 32x32 dct tests" into experimental

11 years agoMerge "Improve 32x32 forward dct" into experimental
Yaowu Xu [Wed, 27 Feb 2013 15:56:42 +0000 (07:56 -0800)]
Merge "Improve 32x32 forward dct" into experimental

11 years agoSpatial resamping of ZEROMV predictors
John Koleszar [Mon, 25 Feb 2013 04:55:14 +0000 (20:55 -0800)]
Spatial resamping of ZEROMV predictors

This patch allows coding frames using references of different
resolution, in ZEROMV mode. For compound prediction, either
reference may be scaled.

To test, I use the resize_test and enable WRITE_RECON_BUFFER
in vp9_onyxd_if.c. It's also useful to apply this patch to
test/i420_video_source.h:

  --- a/test/i420_video_source.h
  +++ b/test/i420_video_source.h
  @@ -93,6 +93,7 @@ class I420VideoSource : public VideoSource {

     virtual void FillFrame() {
       // Read a frame from input_file.
  +    if (frame_ != 3)
       if (fread(img_->img_data, raw_sz_, 1, input_file_) == 0) {
         limit_ = frame_;
       }

This forces the frame that the resolution changes on to be coded
with no motion, only scaling, and improves the quality of the
result.

Change-Id: I1ee75d19a437ff801192f767fd02a36bcbd1d496

11 years agoMerge "Removing redundant 'extern' keyword from function declarations." into experimental
Dmitry Kovalev [Wed, 27 Feb 2013 04:56:32 +0000 (20:56 -0800)]
Merge "Removing redundant 'extern' keyword from function declarations." into experimental

11 years agoMerge "Merge cnvcontext experiment." into experimental
Ronald S. Bultje [Wed, 27 Feb 2013 03:39:39 +0000 (19:39 -0800)]
Merge "Merge cnvcontext experiment." into experimental

11 years agoMerge "Fix modes.stt output printf format string." into experimental
Ronald S. Bultje [Wed, 27 Feb 2013 03:39:33 +0000 (19:39 -0800)]
Merge "Fix modes.stt output printf format string." into experimental

11 years agoMerge "Minor cosmetics in rdopt." into experimental
Ronald S. Bultje [Wed, 27 Feb 2013 03:39:28 +0000 (19:39 -0800)]
Merge "Minor cosmetics in rdopt." into experimental

11 years agoOptimize vp9_dc_only_idct_add_c function
Yunqing Wang [Wed, 27 Feb 2013 00:27:41 +0000 (16:27 -0800)]
Optimize vp9_dc_only_idct_add_c function

Wrote SSE2 version of vp9_dc_only_idct_add_c function. In order to
improve performance, clipped the absolute diff values to [0, 255].
This allowed us to keep the additions/subtractions in 8 bits.
Test showed an over 2% decoder performance increase.

Change-Id: Ie1a236d23d207e4ffcd1fc9f3d77462a9c7fe09d

11 years agoMerge "vp9: promote gf_group_bits calculation to 64-bit" into experimental
James Zern [Wed, 27 Feb 2013 00:27:45 +0000 (16:27 -0800)]
Merge "vp9: promote gf_group_bits calculation to 64-bit" into experimental

11 years agoRemoving redundant 'extern' keyword from function declarations.
Dmitry Kovalev [Tue, 26 Feb 2013 23:52:05 +0000 (15:52 -0800)]
Removing redundant 'extern' keyword from function declarations.

Change-Id: I893fa36297b9bd9cff93d082f1736f6860b15c0d

11 years agoMerge "Refactor inter recon functions to support scaling" into experimental
John Koleszar [Tue, 26 Feb 2013 19:45:28 +0000 (11:45 -0800)]
Merge "Refactor inter recon functions to support scaling" into experimental

11 years agoMerge "Changing pitch value meaning for fht and iht transforms." into experimental
Dmitry Kovalev [Tue, 26 Feb 2013 18:44:15 +0000 (10:44 -0800)]
Merge "Changing pitch value meaning for fht and iht transforms." into experimental

11 years agoMerge cnvcontext experiment.
Ronald S. Bultje [Tue, 26 Feb 2013 18:37:49 +0000 (10:37 -0800)]
Merge cnvcontext experiment.

Change-Id: I35e64998b25694a3bb4a62164bba3c03c1db4bc7

11 years agoFix modes.stt output printf format string.
Ronald S. Bultje [Tue, 26 Feb 2013 17:38:29 +0000 (09:38 -0800)]
Fix modes.stt output printf format string.

Change-Id: I17e2d2f6a4da86d9e4af7bebdea0bf5d154da084

11 years agoMinor cosmetics in rdopt.
Ronald S. Bultje [Tue, 26 Feb 2013 17:37:51 +0000 (09:37 -0800)]
Minor cosmetics in rdopt.

Change-Id: I62497dcf2074b4bb4787bf660e727e5cf1bf3472

11 years agoMerge "make cost_coeffs to use combined context" into experimental
Ronald S. Bultje [Tue, 26 Feb 2013 18:32:01 +0000 (10:32 -0800)]
Merge "make cost_coeffs to use combined context" into experimental

11 years agoRefactor inter recon functions to support scaling
John Koleszar [Sat, 9 Feb 2013 01:49:44 +0000 (17:49 -0800)]
Refactor inter recon functions to support scaling

Ensure that all inter prediction goes through a common code path
that takes scaling into account. Removes a bunch of duplicate
1st/2nd predictor code. Also introduces a 16x8 mode for 8x8
MVs, similar to the 8x4 trick we were doing before. This has an
unexpected effect with EIGHTTAP_SMOOTH, so it's disabled in that
case for now.

Change-Id: Ia053e823a8bc616a988a0af30452e1e75a739cba

11 years agoEnable 32x32 dct tests
Yaowu Xu [Tue, 26 Feb 2013 17:07:49 +0000 (09:07 -0800)]
Enable 32x32 dct tests

Also
1. Removed the test code for fDCT from the iDCT test.
2. changed the criteria of round trip error to be below 1/block, this
is quite strict comparing to smaller transforms when size differences
are accounted for.

Change-Id: Idb46a6380b04c93fc8e2845c75f5a850366b0090

11 years agoImprove 32x32 forward dct
Yaowu Xu [Mon, 25 Feb 2013 23:21:01 +0000 (15:21 -0800)]
Improve 32x32 forward dct

The commit improves the 32x32 forward dct implementation:
1. change to use same constants and rounding as other forward dcts
2. select rounding to specifically minimize the roundtrip error, which
improved average 19/block to .77/block using 100000 random input.

Test showed a small but consistent gain on all test sets, about .15%

Change-Id: If0afd6a71880a522f60c1c234be0462092c2eb53

11 years agoChanging pitch value meaning for fht and iht transforms.
Dmitry Kovalev [Tue, 26 Feb 2013 02:19:55 +0000 (18:19 -0800)]
Changing pitch value meaning for fht and iht transforms.

Pitch now means the number of elements, not the number of bytes.

Change-Id: Idb9f2f012e39b09d596a3cc1802305a80b7c13af

11 years agomake cost_coeffs to use combined context
Yaowu Xu [Tue, 26 Feb 2013 01:01:30 +0000 (17:01 -0800)]
make cost_coeffs to use combined context

Change-Id: Ia15f4244595fab49bffda0c651a750a8a9481d28

11 years agoCode cleanup.
Dmitry Kovalev [Mon, 25 Feb 2013 23:14:01 +0000 (15:14 -0800)]
Code cleanup.

Removing switch statements for inverse hybrid transforms. Making code style
consistent for all similar transform implementations. Renaming shortpitch
and short_pitch variables to half_pitch.

Change-Id: I875f7a82aae4e8063a58777bf1cc3f1e67b48582

11 years agoMerge "Code cleanup." into experimental
Dmitry Kovalev [Mon, 25 Feb 2013 22:14:22 +0000 (14:14 -0800)]
Merge "Code cleanup." into experimental

11 years agoMerge "Code cleanup." into experimental
Dmitry Kovalev [Mon, 25 Feb 2013 21:58:06 +0000 (13:58 -0800)]
Merge "Code cleanup." into experimental

11 years agoMerge "Improving the forward 16x16 ADST/DCT accuracy" into experimental
Jingning Han [Mon, 25 Feb 2013 21:38:33 +0000 (13:38 -0800)]
Merge "Improving the forward 16x16 ADST/DCT accuracy" into experimental

11 years agoCode cleanup.
Dmitry Kovalev [Mon, 25 Feb 2013 21:38:18 +0000 (13:38 -0800)]
Code cleanup.

Removing redundant parentheses, better code formatting, introducing
ROUND_POWER_OF_TWO macro to replace repeated expression.

Change-Id: I91aad7a53ed03482428b2419de4bb99fd92c6771

11 years agoCode cleanup.
Dmitry Kovalev [Sat, 23 Feb 2013 01:27:34 +0000 (17:27 -0800)]
Code cleanup.

Lower case names of variables. Removing redundant spaces, parentheses,
casts, and variables.

Change-Id: I55b80c55b7d5adca44c1e8adb40a124c0680f229

11 years agovp9: promote gf_group_bits calculation to 64-bit
James Zern [Mon, 25 Feb 2013 21:00:18 +0000 (13:00 -0800)]
vp9: promote gf_group_bits calculation to 64-bit

avoids signed integer overflow

Change-Id: I9ffcdba90b21edb324d1b173fd11d613e0592931

11 years agoMerge "Minor rate control refactoring and experiments." into experimental
Paul Wilkins [Mon, 25 Feb 2013 20:49:54 +0000 (12:49 -0800)]
Merge "Minor rate control refactoring and experiments." into experimental

11 years agoImproving the forward 16x16 ADST/DCT accuracy
Jingning Han [Mon, 25 Feb 2013 20:08:29 +0000 (12:08 -0800)]
Improving the forward 16x16 ADST/DCT accuracy

Increase the first stage dynamic range by 4 times, and reduce it
back with proper rounding before applying the second stage. Hence
it still fits in the given dynamic range and slightly improves
the key frame coding performance.

Change-Id: Ia4c5907446f20a95dc3de079c314b3ad1221d8aa

11 years agoclean up forward and inverse hybrid transform
Jingning Han [Sat, 23 Feb 2013 00:29:28 +0000 (16:29 -0800)]
clean up forward and inverse hybrid transform

Rebased.

Remove the old matrix multiplication transform computation. The 16x16
ADST/DCT can be switched on/off and evaluated by setting ACTIVE_HT16
300/0 in vp9/common/vp9_blockd.h.

Change-Id: Icab2dbd18538987e1dc4e88c45abfc4cfc6e133f

11 years agoMinor rate control refactoring and experiments.
Paul Wilkins [Mon, 25 Feb 2013 12:36:38 +0000 (12:36 +0000)]
Minor rate control refactoring and experiments.

Some minor refactoring code relating to estimates of
bits per MB at a given Q and estimating the allowed Q range.

Most of the changes here were included in a previous commit.
This commit seeks to separate out the refactoring from more
the material changes.

Two #define control flags have been added for experimentation.

ONE_SHOT_Q_ESTIMATE force the two pass encoder to
use its initial Q range estimate for the whole clip even if this results
in a miss on the target data rate. In effect this tightens the Q range
seen at the expense of rate control accuracy.

DISABLE_RC_LONG_TERM_MEM is a related flag that disables the
long term memory in the rate control. Local adjustments are still
made to try and better hit the rate target on a per frame basis but
the impact of rate control misses is not propagated to the remainder
of the clip. This means that for example an overshoot early on will not
cause frames later in the clip to be starved of bits. Again the result
of this relaxation amy be less rate control accuracy especially on short
clips.

The flags are disabled by default for now.

Change-Id: I7482f980146d8ea033b5d50cc689f772e4bd119e

11 years agooptimize forward 16x16 DCT for accuracy
Yaowu Xu [Sat, 23 Feb 2013 00:18:08 +0000 (16:18 -0800)]
optimize forward 16x16 DCT for accuracy

This commit added pre/post scaling for first half of fDCT16x16 to
reduce error, by simulation of 100,000 blocks for random inputs,
the average sse reduced from 2.1/block to 0.0498/block.

also enabled tests for 16x16 fDCT and iDCT

Change-Id: Id2a95f0464c6dd4118797d456237ae90274c0f02

11 years agoSplit coefficient token tables intra vs. inter.
Ronald S. Bultje [Tue, 19 Feb 2013 21:36:38 +0000 (13:36 -0800)]
Split coefficient token tables intra vs. inter.

Change-Id: I5416455f8f129ca0f450d00e48358d2012605072

11 years agoFurther changes to coefficient contexts.
Paul Wilkins [Tue, 19 Feb 2013 18:12:00 +0000 (10:12 -0800)]
Further changes to coefficient contexts.

This patch alters the balance of context between the
coefficient bands (reflecting the position of coefficients
within a transform blocks) and the energy of the previous
token (or tokens) within a block.

In this case the number of coefficient bands is reduced
but more previous token energy bands are supported.

Some initial rebalancing of the default tables has been
by running multiple derf clips at multiple data rates using
the ENTOPY_STATS macro. Further balancing needs to be
done using larger image formatsd especially in regard to
the bigger transform sizes which are not as well represented
in encodings of smaller image formats.

Change-Id: If9736e95c391e711b04aef6393d26f60f36e1f8a

11 years agoMerge "optimize 8x8 fdct rounding for accuracy" into experimental
Yaowu Xu [Sat, 23 Feb 2013 06:20:57 +0000 (22:20 -0800)]
Merge "optimize 8x8 fdct rounding for accuracy" into experimental

11 years agoMerge "changes related fdct/idct tests" into experimental
Yaowu Xu [Sat, 23 Feb 2013 06:20:44 +0000 (22:20 -0800)]
Merge "changes related fdct/idct tests" into experimental

11 years agooptimize 8x8 fdct rounding for accuracy
Yaowu Xu [Fri, 22 Feb 2013 19:14:04 +0000 (11:14 -0800)]
optimize 8x8 fdct rounding for accuracy

The commit added a final rounding choice for 8x8 forward dct to get
rid of a sign bias at DC position and improve the accuracry in term
of round trip error for 8x8 fDCT/iDCT.

This commit also enabled forward 8x8 dct test.

Change-Id: Ib67f99b0a24d513e230c7812bc04569d472fdc50

11 years agoMerge "Code cleanup." into experimental
John Koleszar [Fri, 22 Feb 2013 19:20:20 +0000 (11:20 -0800)]
Merge "Code cleanup." into experimental

11 years agoCode cleanup.
Dmitry Kovalev [Fri, 22 Feb 2013 19:03:14 +0000 (11:03 -0800)]
Code cleanup.

Removing redundant 'extern' keywords and parentheses, fixing indentation,
making variable names lower case, using short expressions x *= c
instead of x = x * c, minor code simplifications.

Change-Id: If6a25fcf306d1db26e90d27e3c24a32735c607de

11 years agochanges related fdct/idct tests
Yaowu Xu [Fri, 22 Feb 2013 18:09:40 +0000 (10:09 -0800)]
changes related fdct/idct tests

1. changed 4x4 test name to Vp9Fdct4x4Test to be consistent
2. remove forward 8x8 dct test code from idct8x8_test.cc
3. temporarily disable other forward dct tests to allow fdct work in
progress

Change-Id: I566aeed9c7c34da5a206190aa7d0e847a4008b36

11 years agoMerge "Forward butterfly hybrid transform" into experimental
Jingning Han [Fri, 22 Feb 2013 17:20:26 +0000 (09:20 -0800)]
Merge "Forward butterfly hybrid transform" into experimental

11 years agoMerge "Experimental removal of over quant code" into experimental
Paul Wilkins [Fri, 22 Feb 2013 16:44:40 +0000 (08:44 -0800)]
Merge "Experimental removal of over quant code" into experimental

11 years agoExperimental removal of over quant code
Paul Wilkins [Thu, 21 Feb 2013 10:00:36 +0000 (10:00 +0000)]
Experimental removal of over quant code

The over quant code was added in VP8 post
bitstream freeze to allow compression to lower
data rates

In VP9 the real qualtizer range has been greatly
extended anyway.

Change-Id: I5d384fa5e9a83ef75a3df34ee30627bd21901526

11 years agoForward butterfly hybrid transform
Jingning Han [Wed, 13 Feb 2013 17:03:21 +0000 (09:03 -0800)]
Forward butterfly hybrid transform

This patch includes 4x4, 8x8, and 16x16 forward butterfly ADST/DCT
hybrid transform. The kernel of 4x4 ADST is sin((2k+1)*(n+1)/(2N+1)).
The kernel of 8x8/16x16 ADST is of the form sin((2k+1)*(2n+1)/4N).

Change-Id: I8f1ab3843ce32eb287ab766f92e0611e1c5cb4c1

11 years agoCode cleanup.
Dmitry Kovalev [Thu, 21 Feb 2013 21:50:15 +0000 (13:50 -0800)]
Code cleanup.

Removing redundant 'extern' keywords. Moving VP9DX_BOOL_DECODER from .h
to .c file.

Change-Id: I5a3056cb3d33db7ed3c3f4629675aa8e21014e66

11 years agoDon't exit on decode errors in vpxenc.
Ronald S. Bultje [Sat, 16 Feb 2013 00:31:02 +0000 (16:31 -0800)]
Don't exit on decode errors in vpxenc.

Allows the user to specify whether decode errors should be fatal or not.
Also makes mismatches optionally fatal.

Change-Id: I58cff4a82f3d42f5653b91cf348a7f669377e632

11 years agoMerge "Remove "eobs" array in MACROBLOCKD." into experimental
Ronald S. Bultje [Thu, 21 Feb 2013 19:30:29 +0000 (11:30 -0800)]
Merge "Remove "eobs" array in MACROBLOCKD." into experimental

11 years agoMerge "Code cleanup." into experimental
John Koleszar [Thu, 21 Feb 2013 18:56:17 +0000 (10:56 -0800)]
Merge "Code cleanup." into experimental

11 years agoCode cleanup.
Dmitry Kovalev [Thu, 21 Feb 2013 18:34:33 +0000 (10:34 -0800)]
Code cleanup.

Removing redundant 'extern' keyword from function declarations and making
function arguments lower case.

Change-Id: Idae9a2183b067f2b6c85ad84738d275e8bbff9d9

11 years agoRemove "eobs" array in MACROBLOCKD.
Ronald S. Bultje [Thu, 21 Feb 2013 18:04:40 +0000 (10:04 -0800)]
Remove "eobs" array in MACROBLOCKD.

The information is a duplicate of "eob" in BLOCKD.

Change-Id: Ia6416273bd004611da801e4bfa6e2d328d6f02a3

11 years agoMerge "Refactoring of switchable filter search for speed" into experimental
Deb Mukherjee [Thu, 21 Feb 2013 17:23:49 +0000 (09:23 -0800)]
Merge "Refactoring of switchable filter search for speed" into experimental

11 years agoMerge "Avoid division in intra prediction" into experimental
John Koleszar [Thu, 21 Feb 2013 16:33:17 +0000 (08:33 -0800)]
Merge "Avoid division in intra prediction" into experimental

11 years agoRefactoring of switchable filter search for speed
Deb Mukherjee [Tue, 12 Feb 2013 01:08:52 +0000 (17:08 -0800)]
Refactoring of switchable filter search for speed

Refactors the switchable filter search in the rd loop to
improve encode speed.

Uses a piecewise approximation to a closed form expression to estimate
rd cost for a Laplacian source with a given variance and quantization
step-size.

About 40% encode time reduction is achieved.

Results (on a feb 12 baseline) show a slight drop:

derf: -0.019%
yt: +0.010%
std-hd: -0.162%
hd: -0.050%

Change-Id: Ie861badf5bba1e3b1052e29a0ef1b7e256edbcd0

11 years agoMerge "Fixed the buffer overflow issue" into experimental
Jingning Han [Thu, 21 Feb 2013 00:27:27 +0000 (16:27 -0800)]
Merge "Fixed the buffer overflow issue" into experimental

11 years agoFixed the buffer overflow issue
Jingning Han [Wed, 20 Feb 2013 23:32:17 +0000 (15:32 -0800)]
Fixed the buffer overflow issue

The issue that potentially broke the encoding process was due to the fact
that the length of token link is calculated from the total number of tokens
coded, while it is possible, in high bit-rate setting, this length is
greater than the buffer length initially assigned to the cpi->tok.

This patch increases the initially allocated buffer length assigned to
cpi->tok from
(mb_rows * mb_cols * 24 * 16) to (mb_rows * mb_cols * (1 + 24 * 16)).

It resolves the buffer overflow problem.

Change-Id: I8661a8d39ea0a3c24303e3f71a170787a1d5b1df

11 years agoMerge "Code cleanup." into experimental
Dmitry Kovalev [Wed, 20 Feb 2013 20:47:54 +0000 (12:47 -0800)]
Merge "Code cleanup." into experimental

11 years agoMerge "Merge lossless experiment" into experimental
Yaowu Xu [Wed, 20 Feb 2013 20:27:26 +0000 (12:27 -0800)]
Merge "Merge lossless experiment" into experimental

11 years agoCode cleanup.
Dmitry Kovalev [Wed, 20 Feb 2013 19:36:31 +0000 (11:36 -0800)]
Code cleanup.

Change-Id: I7c6e3bebd94856b24dbe2aded7f9e04ef8bb8c08

11 years agoMerge lossless experiment
Yaowu Xu [Wed, 20 Feb 2013 15:27:35 +0000 (07:27 -0800)]
Merge lossless experiment

Change-Id: I7b7b8d4fda3a23699e0c920d727f8c15d37d43aa

11 years agoEntropy stats output code.
Paul Wilkins [Fri, 15 Feb 2013 11:34:25 +0000 (11:34 +0000)]
Entropy stats output code.

Fixes to make Entropy stats code work again

Change-Id: I62e380481a4eb4c170076ac6ab36f0c2b203e914