platform/upstream/libvpx.git
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 agoMerge "fixed an enc/dec mis-match issue" into experimental
Yaowu Xu [Wed, 20 Feb 2013 00:53:30 +0000 (16:53 -0800)]
Merge "fixed an enc/dec mis-match issue" into experimental

11 years agofixed an enc/dec mis-match issue
Yaowu Xu [Wed, 20 Feb 2013 00:26:27 +0000 (16:26 -0800)]
fixed an enc/dec mis-match issue

The issue was caused by a out-of-order merge, which leads to wrong
functions are called at lossless mode.

Change-Id: If157729abab62954c729e0377e7f53edb7db22ca

11 years agoMerge "Add estimated completion time to vpxenc" into experimental
John Koleszar [Tue, 19 Feb 2013 18:51:42 +0000 (10:51 -0800)]
Merge "Add estimated completion time to vpxenc" into experimental

11 years ago16x16 butterfly inverse ADST/DCT hybrid transform
Jingning Han [Sat, 16 Feb 2013 22:08:36 +0000 (14:08 -0800)]
16x16 butterfly inverse ADST/DCT hybrid transform

rebased.

This patch includes 16x16 butterfly inverse ADST/DCT hybrid
transform. It uses the variant ADST of kernel
    sin((2k+1)*(2n+1)/4N),
which allows a butterfly implementation.

The coding gains as compared to DCT 16x16 are about 0.1% for
both derf and std-hd. It is noteworthy that for std-hd sets
many sequences gains about 0.5%, some 0.2%. There are also few
points that provides -1% to -3% performance. Hence the average
goes to about 0.1%.

Change-Id: Ie80ac84cf403390f6e5d282caa58723739e5ec17

11 years agoMerge "Minor cosmetic cleanups." into experimental
Ronald S. Bultje [Tue, 19 Feb 2013 16:54:44 +0000 (08:54 -0800)]
Merge "Minor cosmetic cleanups." into experimental

11 years agoMerge "Prevent filling transform size cache with uninitialized values." into experimental
Ronald S. Bultje [Tue, 19 Feb 2013 16:54:35 +0000 (08:54 -0800)]
Merge "Prevent filling transform size cache with uninitialized values." into experimental

11 years agoUse lossless for Q0
Yaowu Xu [Wed, 13 Feb 2013 22:22:15 +0000 (14:22 -0800)]
Use lossless for Q0

The commit changes the coding mode to lossless whenever the lowest
quantizer is choosen.

As expected, test results showed no difference for cif and std-hd
set where Q0 is rarely used. For yt and yt-hd set, Q0 is used for
a number of clips, where this commit helped a lot in the high end.

Average over all clips in the sets:
yt: 2.391% 1.017% 1.066%
hd: 1.937%  .764%  .787%

Change-Id: I9fa9df8646fd70cb09ffe9e4202b86b67da16765

11 years agoMinor cosmetic cleanups.
Ronald S. Bultje [Sat, 16 Feb 2013 00:39:22 +0000 (16:39 -0800)]
Minor cosmetic cleanups.

Change-Id: I13d8ae754827368755575dd699a087b3b11f5b16

11 years agoPrevent filling transform size cache with uninitialized values.
Ronald S. Bultje [Fri, 15 Feb 2013 23:55:31 +0000 (15:55 -0800)]
Prevent filling transform size cache with uninitialized values.

The 32x32 value in case of splitmv was uninitialized. this leads to
all kind of erratic behaviour down the line. Also fill in dummy values
for superblocks in keyframes (the values are currently unused, but we
run into integer overflows anyway, which makes detecting bad cases
harder). Lastly, in case we did not find any RD value at all, don't
set tx_diff to INT_MIN, but instead set it to zero (since if we couldn't
find a mode, it's unlikely that any particular transform would have made
that worse or better; rather, it's likely equally bad for all tx_sizes).

Change-Id: If236fd3aa2037e5b398d03f3b1978fbbc5ce740e

11 years agoMerge "Remove some unused structs and members from the decoder." into experimental
Ronald S. Bultje [Sat, 16 Feb 2013 01:11:38 +0000 (17:11 -0800)]
Merge "Remove some unused structs and members from the decoder." into experimental

11 years agoMerge "Remove Y2 and Y-no-DC token types from the bitstream." into experimental
Ronald S. Bultje [Sat, 16 Feb 2013 01:11:20 +0000 (17:11 -0800)]
Merge "Remove Y2 and Y-no-DC token types from the bitstream." into experimental

11 years agoFixed a subtle issue that breaks encoding process
Jingning Han [Fri, 15 Feb 2013 22:45:20 +0000 (14:45 -0800)]
Fixed a subtle issue that breaks encoding process

This issue breaks the encoding process of the codebase. The effect
emerges only in particular test sequence at certain bit-rates and
frame limits.

Change-Id: I02e080f2a49624eef9a21c424053dc2a1d902452

11 years agoRemove some unused structs and members from the decoder.
Ronald S. Bultje [Fri, 15 Feb 2013 20:09:18 +0000 (12:09 -0800)]
Remove some unused structs and members from the decoder.

Change-Id: Ie309cb1f683a51c5dfac405fb32e8e2d6ee143ed

11 years agoRemove Y2 and Y-no-DC token types from the bitstream.
Ronald S. Bultje [Fri, 15 Feb 2013 20:09:05 +0000 (12:09 -0800)]
Remove Y2 and Y-no-DC token types from the bitstream.

Change-Id: I7a5314daca993d46b8666ba1ec2ff3766c1e5042

11 years agoRemove y2dc/ac Q delta values from the bitstream.
Ronald S. Bultje [Fri, 15 Feb 2013 18:21:26 +0000 (10:21 -0800)]
Remove y2dc/ac Q delta values from the bitstream.

Since there is no Y2, these values are always zero. This changes the
bitstream results slightly, hence a separate commit.

Change-Id: I2f838f184341868f35113ec77ca89da53c4644e0

11 years agoRemove some Y2-related code.
Ronald S. Bultje [Fri, 15 Feb 2013 18:15:42 +0000 (10:15 -0800)]
Remove some Y2-related code.

Change-Id: I4f46d142c2a8d1e8a880cfac63702dcbfb999b78

11 years agoMerge "WIP: ssse3 version of convolve avg functions" into experimental
Scott LaVarnway [Fri, 15 Feb 2013 15:54:21 +0000 (07:54 -0800)]
Merge "WIP: ssse3 version of convolve avg functions" into experimental

11 years agoMerge "Moved vp9_get_coef_band to header file" into experimental
John Koleszar [Fri, 15 Feb 2013 02:02:55 +0000 (18:02 -0800)]
Merge "Moved vp9_get_coef_band to header file" into experimental

11 years agoMoved vp9_get_coef_band to header file
Scott LaVarnway [Thu, 14 Feb 2013 20:27:25 +0000 (12:27 -0800)]
Moved vp9_get_coef_band to header file

allowing the compiler to inline.

Change-Id: I66e5caf5e7fefa68a223ff0603aa3f9e11e35dbb

11 years agoMerge "Rewrote fdct16x16" into experimental
Yaowu Xu [Thu, 14 Feb 2013 17:06:37 +0000 (09:06 -0800)]
Merge "Rewrote fdct16x16" into experimental

11 years agoMerge "Abstract selection of coef band." into experimental
Paul Wilkins [Thu, 14 Feb 2013 11:23:31 +0000 (03:23 -0800)]
Merge "Abstract selection of coef band." into experimental

11 years agoRewrote fdct16x16
Yunqing Wang [Wed, 13 Feb 2013 08:19:32 +0000 (00:19 -0800)]
Rewrote fdct16x16

Used same algorithm as others.

Change-Id: Ifdac560762aec9735cb4bb6f1dbf549e415c38a0

11 years agoMerge "Remove 2nd-order transform for first-order DC coefficients." into experimental
Ronald S. Bultje [Wed, 13 Feb 2013 21:58:02 +0000 (13:58 -0800)]
Merge "Remove 2nd-order transform for first-order DC coefficients." into experimental

11 years agoAdd support for tile rows.
Ronald S. Bultje [Fri, 8 Feb 2013 19:33:11 +0000 (11:33 -0800)]
Add support for tile rows.

These allow sending partial bitstream packets over the network before
encoding a complete frame is completed, thus lowering end-to-end
latency. The tile-rows are not independent.

Change-Id: I99986595cbcbff9153e2a14f49b4aa7dee4768e2

11 years agoRemove 2nd-order transform for first-order DC coefficients.
Ronald S. Bultje [Wed, 13 Feb 2013 20:28:19 +0000 (12:28 -0800)]
Remove 2nd-order transform for first-order DC coefficients.

Since addition of the larger-scale transforms (16x16, 32x32), these
don't give a benefit at macroblock-sizes anymore. At superblock-sizes,
2nd-order transform was never used over the larger transforms. Future
work should test whether there is a benefit for that use case.

Change-Id: I90cadfc42befaf201de3eb0c4f7330c56e33330a

11 years agoAbstract selection of coef band.
Paul Wilkins [Mon, 11 Feb 2013 20:44:53 +0000 (20:44 +0000)]
Abstract selection of coef band.

This patch abstracts the selection of the coefficient band
context into a function as a precursor to further experiments
with the coefficient context.

It also removes the large per TX size coefficient band structures
and uses a single matrix for all block sizes within the test function.

This may have an impact on quality (results to follow) but is only an
intermediate step in the process of redefining the context. Also the
quality impact will be larger initially because the default tables will
be out of step with the new banding.

In particular the 4x4 will in this case only use 7 bands. If needed we
can add back block size dependency localized within the function, but
this can follow on after the other changes to the definition of the
context.

Change-Id: Id7009c2f4f9bb1d02b861af85fd8223d4285bde5

11 years agoFixed encoder decoder mismatch.
Paul Wilkins [Wed, 13 Feb 2013 18:49:55 +0000 (18:49 +0000)]
Fixed encoder decoder mismatch.

Reverted part of change
I19981d1ef0b33e4e5732739574f367fe82771a84

That gives rise to an enc/dec mismatch.
As things stand the memsets are still needed.

Change-Id: I9fa076a703909aa0c4da0059ac6ae19aa530db30

11 years agoAbstract the selection of coefficient context.
Paul Wilkins [Mon, 11 Feb 2013 19:19:21 +0000 (19:19 +0000)]
Abstract the selection of coefficient context.

This is an initial step to facilitate experimentation
with changes to the prior token context used to code
coefficients to take better account of the energy of
preceding tokens.

This patch merely abstracts the selection of context into
two functions and does not alter the output.

Change-Id: I117fff0b49c61da83aed641e36620442f86def86

11 years agoMerge "Remove NEWCOEFCONTEXT experiment." into experimental
Paul Wilkins [Wed, 13 Feb 2013 18:41:13 +0000 (10:41 -0800)]
Merge "Remove NEWCOEFCONTEXT experiment." into experimental

11 years agoMerge "enable bitstream lossless support" into experimental
Yaowu Xu [Wed, 13 Feb 2013 18:26:58 +0000 (10:26 -0800)]
Merge "enable bitstream lossless support" into experimental

11 years agoMerge "fix the lossless experiment" into experimental
Yaowu Xu [Wed, 13 Feb 2013 17:54:35 +0000 (09:54 -0800)]
Merge "fix the lossless experiment" into experimental

11 years agoenable bitstream lossless support
Yaowu Xu [Tue, 12 Feb 2013 05:14:46 +0000 (21:14 -0800)]
enable bitstream lossless support

1. Added a bit in frame header to  to indicate if a frame is encoded
in lossless mode, so decoder does not make the decision based on Q0
2. Minor changes to make sure that lossy coding works same as when
the lossless experiment is not enabled.
3. Renamed function pointers for transforms to be consistent, using
prefix fwd_txm and inv_txm for forward and inverse respectively

To encode in lossless mode, using "--lossless=1 --min-q=0 --max-q=0"
with vpxenc.

Change-Id: Ifae53b26d2ffbe378d707e29d96817b8a5e6c068

11 years agofix the lossless experiment
Yaowu Xu [Mon, 11 Feb 2013 23:58:22 +0000 (15:58 -0800)]
fix the lossless experiment

Change-Id: I95acfc1417634b52d344586ab97f0abaa9a4b256

11 years agoWIP: ssse3 version of convolve avg functions
Scott LaVarnway [Wed, 13 Feb 2013 17:15:38 +0000 (09:15 -0800)]
WIP: ssse3 version of convolve avg functions

Initial ssse3 convolve avg functions and is one step closer
to using x86inc.asm.  The decoder performance improved by 8% for
the test clip used.  This should be revisited later to see if
averaging outside the loop is better than having many similar
filter functions.

Change-Id: Ice3fafb423b02710b0448ffca18b296bcac649e9

11 years agoRemove NEWCOEFCONTEXT experiment.
Paul Wilkins [Mon, 11 Feb 2013 12:56:02 +0000 (12:56 +0000)]
Remove NEWCOEFCONTEXT experiment.

Removal of the  NEWCOEFCONTEXT experiment to
reduce code clutter and make it easier to experiment with
some other changes to the coefficient coding context.

Change-Id: Icd17b421384c354df6117cc714747647c5eb7e98

11 years agoRemoval of Hybrid DWT/DCT experiment.
Paul Wilkins [Mon, 11 Feb 2013 12:35:28 +0000 (12:35 +0000)]
Removal of Hybrid DWT/DCT experiment.

Removal of experiment to simplify code base for other
changes.

Change-Id: If0a33952504558511926ad212bc311fc2bffb19a

11 years agoAdd estimated completion time to vpxenc
John Koleszar [Wed, 13 Feb 2013 05:17:56 +0000 (21:17 -0800)]
Add estimated completion time to vpxenc

Make the progress line more useful by providing per-frame updates of
processing frame rate and estimated time remaining.

Fixes issue #534.

Change-Id: Ic91551878ff4b2f5db1cedaafb588add220cfa52

11 years agoMerge "Faster vp9_regular_quantize_b_8x8." into experimental
Christian Duvivier [Wed, 13 Feb 2013 01:08:00 +0000 (17:08 -0800)]
Merge "Faster vp9_regular_quantize_b_8x8." into experimental

11 years agoFaster vp9_regular_quantize_b_8x8.
Christian Duvivier [Tue, 12 Feb 2013 01:43:27 +0000 (17:43 -0800)]
Faster vp9_regular_quantize_b_8x8.

A couple of scalar optimizations speeding up quantization by about 1.6x. Overall encoder speedup is around 3%.

Change-Id: I19981d1ef0b33e4e5732739574f367fe82771a84

11 years agoMerge "Rewrote fdct8x8" into experimental
Yunqing Wang [Tue, 12 Feb 2013 23:52:31 +0000 (15:52 -0800)]
Merge "Rewrote fdct8x8" into experimental

11 years agoMerge "Replace as_mv struct with array" into experimental
John Koleszar [Tue, 12 Feb 2013 21:59:04 +0000 (13:59 -0800)]
Merge "Replace as_mv struct with array" into experimental

11 years agoAdd tile column size limits (256 pixels min, 4096 pixels max).
Ronald S. Bultje [Wed, 6 Feb 2013 23:30:21 +0000 (15:30 -0800)]
Add tile column size limits (256 pixels min, 4096 pixels max).

This is after discussion with the hardware team. Update the unit test
to take these sizes into account. Split out some duplicate code into
a separate file so it can be shared.

Change-Id: I8311d11b0191d8bb37e8eb4ac962beb217e1bff5

11 years agoMerge "Clean up detokenize contextualization to be like tokenizer." into experimental
Ronald S. Bultje [Tue, 12 Feb 2013 17:47:29 +0000 (09:47 -0800)]
Merge "Clean up detokenize contextualization to be like tokenizer." into experimental

11 years agoMerge "Bug fix: ssse3 version of subpixel did not match C code" into experimental
Scott LaVarnway [Tue, 12 Feb 2013 16:45:24 +0000 (08:45 -0800)]
Merge "Bug fix: ssse3 version of subpixel did not match C code" into experimental

11 years agoRewrote fdct8x8
Yunqing Wang [Tue, 12 Feb 2013 06:04:34 +0000 (22:04 -0800)]
Rewrote fdct8x8

Use consistent algorithm.

Change-Id: Ib8484821ebc454b9d3380a3d6571798decd037f3

11 years agoClean up detokenize contextualization to be like tokenizer.
Ronald S. Bultje [Tue, 12 Feb 2013 01:21:37 +0000 (17:21 -0800)]
Clean up detokenize contextualization to be like tokenizer.

Change-Id: I47174f797df2103da8913c6fb4f4e741817bae82

11 years agoFaster convolve8_avg.
Christian Duvivier [Mon, 11 Feb 2013 23:34:08 +0000 (15:34 -0800)]
Faster convolve8_avg.

Implement convolve8_avg using common functions which are already optimized
instead of using more obscure ones which have only C versions. Encoder
overall speed-up of about 12%.

Change-Id: I8c57aa76936c8a48f22b115f19f61d9f2ae1e4b6

11 years agoMerge "butterfly inverse 4x4 ADST" into experimental
Jingning Han [Mon, 11 Feb 2013 22:46:06 +0000 (14:46 -0800)]
Merge "butterfly inverse 4x4 ADST" into experimental

11 years agoMerge "Integerization of dct32x32" into experimental
Yunqing Wang [Mon, 11 Feb 2013 20:15:26 +0000 (12:15 -0800)]
Merge "Integerization of dct32x32" into experimental

11 years agobutterfly inverse 4x4 ADST
Jingning Han [Sat, 9 Feb 2013 00:19:42 +0000 (16:19 -0800)]
butterfly inverse 4x4 ADST

fixed format issues.

Implement the inverse 4x4 ADST using 9 multiplications. For this
particular dimension, the original ADST transform can be
factorized into simpler operations, hence is retained.

Change-Id: Ie5d9749942468df299ab74e90d92cd899569e960

11 years agoMerge "Port sadNxNx4d functions to x86inc.asm." into experimental
Ronald S. Bultje [Mon, 11 Feb 2013 16:20:12 +0000 (08:20 -0800)]
Merge "Port sadNxNx4d functions to x86inc.asm." into experimental

11 years agoChange rd thresholds and add speed trade off flags.
Paul Wilkins [Tue, 5 Feb 2013 10:13:25 +0000 (10:13 +0000)]
Change rd thresholds and add speed trade off flags.

Experimental tweaks to various thresholds to measure
quality / speed trade off.

Add flag that allows static segmentation to be turned off
and disables it unless in the second pass of a two pass
encode.

Change-Id: I219702ffe858412a83db801cbbbd869924b8c61b

11 years agoBug fix: ssse3 version of subpixel did not match C code
Scott LaVarnway [Sat, 9 Feb 2013 23:15:14 +0000 (15:15 -0800)]
Bug fix: ssse3 version of subpixel did not match C code

A 16 bit overflow condition occurs when using the EIGHTTAP_SMOOTH filters.
(vp9_sub_pel_filters_8lp)  Changed the order of the adds to fix this problem.
Also added ssse3 support for 4x4 subpixel filtering.

Change-Id: I475eaadae920794c2de5e01e9735c059a856518e

11 years agoMerge "Nearest / Zero Mv default entropy tweak." into experimental
Paul Wilkins [Sat, 9 Feb 2013 12:21:08 +0000 (04:21 -0800)]
Merge "Nearest / Zero Mv default entropy tweak." into experimental

11 years agoReplace as_mv struct with array
John Koleszar [Sat, 9 Feb 2013 03:46:36 +0000 (19:46 -0800)]
Replace as_mv struct with array

Replace as_mv.{first, second} with a two element array, so that they
can easily be processed with an index variable.

Change-Id: I1e429155544d2a94a5b72a5b467c53d8b8728190

11 years agoMerge "Pass macroblock index to pick inter functions" into experimental
John Koleszar [Sat, 9 Feb 2013 04:20:37 +0000 (20:20 -0800)]
Merge "Pass macroblock index to pick inter functions" into experimental

11 years agoPort sadNxNx4d functions to x86inc.asm.
Ronald S. Bultje [Fri, 8 Feb 2013 01:28:56 +0000 (17:28 -0800)]
Port sadNxNx4d functions to x86inc.asm.

Change-Id: Ic639f5742f7a007753d7a3fa5c66235172eb31d8

11 years agoAdd sad64x64 and sad32x32 SSE2 versions.
Ronald S. Bultje [Thu, 7 Feb 2013 18:24:46 +0000 (10:24 -0800)]
Add sad64x64 and sad32x32 SSE2 versions.

Also port the 4x4, 16x16, 8x16 and 16x8 versions to x86inc.asm; this
makes them all slightly faster, particularly on x86-64. Remove SSE3
sad16x16 version, since the SSE2 version is now faster.

About 1.5% overall encoding speedup.

Change-Id: Id4011a78cce7839f554b301d0800d5ca021af797

11 years agoMake cost_coeffs() more efficient.
Ronald S. Bultje [Thu, 7 Feb 2013 01:16:36 +0000 (17:16 -0800)]
Make cost_coeffs() more efficient.

Cache the constant offset in one variable to prevent re-loading that
in each loop iteration, and mark the function as inline so we can use
the fact that the transform size is always known in the caller.

Almost 1% faster encoding overall.

Change-Id: Id78325a60b025057d8f4ecd9003a74086ccbf85a

11 years agoPass macroblock index to pick inter functions
John Koleszar [Thu, 7 Feb 2013 18:09:05 +0000 (10:09 -0800)]
Pass macroblock index to pick inter functions

Pass the current mb row and column around rather than the
recon_yoffset and recon_uvoffset, since those offsets will
change from predictor to predictor, based on the reference
frame selection.

Change-Id: If3f9df059e00f5048ca729d3d083ff428e1859c1

11 years agoMerge changes Icd1a2a5a,I204d17a1,I3ed92117 into experimental
John Koleszar [Fri, 8 Feb 2013 22:20:05 +0000 (14:20 -0800)]
Merge changes Icd1a2a5a,I204d17a1,I3ed92117 into experimental

* changes:
  Initial support for resolution changes on P-frames
  Avoid allocating memory when resizing frames
  Adds a test for the VP8E_SET_SCALEMODE control

11 years agoMerge changes Ife0d8147,I7d469716,Ic9a5615f into experimental
John Koleszar [Fri, 8 Feb 2013 21:19:47 +0000 (13:19 -0800)]
Merge changes Ife0d8147,I7d469716,Ic9a5615f into experimental

* changes:
  Restore SSSE3 subpixel filters in new convolve framework
  Convert subpixel filters to use convolve framework
  Add 8-tap generic convolver

11 years agoInitial support for resolution changes on P-frames
John Koleszar [Wed, 6 Feb 2013 23:54:52 +0000 (15:54 -0800)]
Initial support for resolution changes on P-frames

Allows inter-frames to change resolution. Currently these are
almost equivalent to keyframes, as only intra prediction modes
are allowed, but without the other context resets that occur on
keyframes.

Change-Id: Icd1a2a5af0d9462cc792588427b0a1f5b12e40d3

11 years agoAvoid allocating memory when resizing frames
John Koleszar [Wed, 6 Feb 2013 22:22:17 +0000 (14:22 -0800)]
Avoid allocating memory when resizing frames

As long as the new frame is smaller than the size that was originally
allocated, we don't need to free and reallocate the memory allocated.
Instead, do the allocation on the size of the first frame. We could
make this passed in from the application instead, if we wanted to
support external upscaling.

Change-Id: I204d17a130728bbd91155bb4bd863a99bb99b038

11 years agoAdds a test for the VP8E_SET_SCALEMODE control
John Koleszar [Wed, 6 Feb 2013 20:44:20 +0000 (12:44 -0800)]
Adds a test for the VP8E_SET_SCALEMODE control

Tests that the external interface to set the internal codec scaling
works as expected. Also updates the test to pull the height from
the decoded frame size rather than parsing the keyframe header,
in anticipation of allowing resolution changes on non-keyframes.

Change-Id: I3ed92117d8e5288fbbd1e7b618f2f233d0fe2c17

11 years agoRestore SSSE3 subpixel filters in new convolve framework
John Koleszar [Fri, 8 Feb 2013 01:00:37 +0000 (17:00 -0800)]
Restore SSSE3 subpixel filters in new convolve framework

This commit adds the 8 tap SSSE3 subpixel filters back into the code
underneath the convolve API. The C code is still called for 4x4
blocks, as well as compound prediction modes. This restores the
encode performance to be within about 8% of the baseline.

Change-Id: Ife0d81477075ae33c05b53c65003951efdc8b09c

11 years agoIntegerization of dct32x32
Yunqing Wang [Sat, 19 Jan 2013 01:04:58 +0000 (17:04 -0800)]
Integerization of dct32x32

Test on derf set showed 0.047% overall psnr change.

Change-Id: Id16c276c251a3943850ac9b95e9b09a56cf42b19

11 years agoNearest / Zero Mv default entropy tweak.
Paul Wilkins [Wed, 6 Feb 2013 13:02:53 +0000 (13:02 +0000)]
Nearest / Zero Mv default entropy tweak.

Tweak to default mode context to account for the fact
that when there are no non zero motion candidates
Nearest is now the preferred mode for coding a 0,0
vector.

Also resolve duplicate function name and typos.

Change-Id: I76802788d46c84e3d1c771be216a537ab7b12817

11 years agomove dct/idct constants to a header file
Yaowu Xu [Thu, 7 Feb 2013 19:51:23 +0000 (11:51 -0800)]
move dct/idct constants to a header file

also removed some un-unsed functions.

Change-Id: Ie363bcc8d94441d054137d2ef7c4fe59f56027e5

11 years agoButterfly ADST based hybrid transform
Jingning Han [Tue, 5 Feb 2013 20:37:13 +0000 (12:37 -0800)]
Butterfly ADST based hybrid transform

Refactor the 8x8 inverse hybrid transform. It is now consistent
with the new inverse DCT. Overall performance loss (due to the
use of this variant ADST, and the rounding errors in the butterfly
implementation) for std-hd is -0.02.

Fixed BUILD warning.

Devise a variant of the original ADST, which allows butterfly
computation structure. This new transform has kernel of the
form: sin((2k+1)*(2n+1) / (4N)). One of its butterfly structures
using floating-point multiplications was reported in Z. Wang,
"Fast algorithms for the discrete W transform and for the discrete
Fourier transform", IEEE Trans. on ASSP, 1984.

This patch includes the butterfly implementation of the inverse
ADST/DCT hybrid transform of dimension 8x8.

Change-Id: I3533cb715f749343a80b9087ce34b3e776d1581d

11 years agoAdded skip switches for SB32 and SB64
Paul Wilkins [Tue, 5 Feb 2013 12:54:09 +0000 (12:54 +0000)]
Added skip switches for SB32 and SB64

Added switches and code to skip/breakout from
doing SB32 and SB64 tests based on whether
the 16x16 MB tests used split modes. Also to
optionally skip 64x64 if 16x16 was chosen over
32x32.

Impact varies depending on clip from a few %
up to almost 50% on encode speed. Only the
split mode breakout is currently enabled.

Change-Id: Ib5836140b064b350ffa3057778ed2cadcc495cf8

11 years agoUse fdct8x4 instead of fdct4x4 where the block size allows it.
Ronald S. Bultje [Wed, 6 Feb 2013 22:13:05 +0000 (14:13 -0800)]
Use fdct8x4 instead of fdct4x4 where the block size allows it.

This allows for faster SIMD implementations in the future (currently
there is no speed impact).

Change-Id: I732647e9148b5dcb44e6bc8728138f0141218329

11 years agoUse configure checks for various inline keywords.
Ronald S. Bultje [Wed, 6 Feb 2013 20:45:28 +0000 (12:45 -0800)]
Use configure checks for various inline keywords.

Change-Id: I8508f1a3d3430f998bb9295f849e88e626a52a24

11 years agoAdd sse2 versions of sub_pixel_variance{32x32,64x64}.
Ronald S. Bultje [Wed, 6 Feb 2013 19:20:59 +0000 (11:20 -0800)]
Add sse2 versions of sub_pixel_variance{32x32,64x64}.

7.5% faster overall encoding.

Change-Id: Ie9bb7f9fdf93659eda106404cb342525df1ba02f

11 years agoMerge "Reindent segmentation code." into experimental
Ronald S. Bultje [Wed, 6 Feb 2013 18:07:30 +0000 (10:07 -0800)]
Merge "Reindent segmentation code." into experimental

11 years agoReindent segmentation code.
Ronald S. Bultje [Wed, 6 Feb 2013 17:08:30 +0000 (09:08 -0800)]
Reindent segmentation code.

Indentation was off by 2 spaces for this particular block.

Change-Id: I1e587b7ad3eff77ade5521252d20c7bb2daa0f6d

11 years agoEliminate tautology
John Koleszar [Wed, 6 Feb 2013 16:22:48 +0000 (08:22 -0800)]
Eliminate tautology

      Unreachable code
  that does nothing anyway
      removed forever.

Change-Id: I14105d2dd9dbc9d558f36464055e350dbeb45488

11 years agoMerge "Change definition of NearestMV." into experimental
Paul Wilkins [Wed, 6 Feb 2013 12:06:31 +0000 (04:06 -0800)]
Merge "Change definition of NearestMV." into experimental

11 years agoFix mismatch after merge of the tiling patch.
Ronald S. Bultje [Wed, 6 Feb 2013 01:15:04 +0000 (17:15 -0800)]
Fix mismatch after merge of the tiling patch.

Change-Id: I8ecc178b4d4069e721c7fec6d7631c00e4a3e5d5

11 years ago[WIP] Add column-based tiling.
Ronald S. Bultje [Fri, 1 Feb 2013 17:35:28 +0000 (09:35 -0800)]
[WIP] Add column-based tiling.

This patch adds column-based tiling. The idea is to make each tile
independently decodable (after reading the common frame header) and
also independendly encodable (minus within-frame cost adjustments in
the RD loop) to speed-up hardware & software en/decoders if they used
multi-threading. Column-based tiling has the added advantage (over
other tiling methods) that it minimizes realtime use-case latency,
since all threads can start encoding data as soon as the first SB-row
worth of data is available to the encoder.

There is some test code that does random tile ordering in the decoder,
to confirm that each tile is indeed independently decodable from other
tiles in the same frame. At tile edges, all contexts assume default
values (i.e. 0, 0 motion vector, no coefficients, DC intra4x4 mode),
and motion vector search and ordering do not cross tiles in the same
frame.
t log

Tile independence is not maintained between frames ATM, i.e. tile 0 of
frame 1 is free to use motion vectors that point into any tile of frame
0. We support 1 (i.e. no tiling), 2 or 4 column-tiles.

The loopfilter crosses tile boundaries. I discussed this briefly with Aki
and he says that's OK. An in-loop loopfilter would need to do some sync
between tile threads, but that shouldn't be a big issue.

Resuls: with tiling disabled, we go up slightly because of improved edge
use in the intra4x4 prediction. With 2 tiles, we lose about ~1% on derf,
~0.35% on HD and ~0.55% on STD/HD. With 4 tiles, we lose another ~1.5%
on derf ~0.77% on HD and ~0.85% on STD/HD. Most of this loss is
concentrated in the low-bitrate end of clips, and most of it is because
of the loss of edges at tile boundaries and the resulting loss of intra
predictors.

TODO:
- more tiles (perhaps allow row-based tiling also, and max. 8 tiles)?
- maybe optionally (for EC purposes), motion vectors themselves
  should not cross tile edges, or we should emulate such borders as
  if they were off-frame, to limit error propagation to within one
  tile only. This doesn't have to be the default behaviour but could
  be an optional bitstream flag.

Change-Id: I5951c3a0742a767b20bc9fb5af685d9892c2c96f

11 years agoMerge "Add SSE3 versions for sad{32x32,64x64}x4d functions." into experimental
Ronald S. Bultje [Tue, 5 Feb 2013 23:40:46 +0000 (15:40 -0800)]
Merge "Add SSE3 versions for sad{32x32,64x64}x4d functions." into experimental

11 years agoMerge "fix a build issue with MSVC on windows" into experimental
Yaowu Xu [Tue, 5 Feb 2013 23:26:47 +0000 (15:26 -0800)]
Merge "fix a build issue with MSVC on windows" into experimental

11 years agoMerge "rewrite 4x4 idct and fdct" into experimental
Yaowu Xu [Tue, 5 Feb 2013 23:26:36 +0000 (15:26 -0800)]
Merge "rewrite 4x4 idct and fdct" into experimental

11 years agoAdd SSE3 versions for sad{32x32,64x64}x4d functions.
Ronald S. Bultje [Tue, 5 Feb 2013 23:21:47 +0000 (15:21 -0800)]
Add SSE3 versions for sad{32x32,64x64}x4d functions.

Overall encoding about 15% faster.

Change-Id: I176a775c704317509e32eee83739721804120ff2

11 years agoConvert subpixel filters to use convolve framework
John Koleszar [Tue, 29 Jan 2013 00:59:03 +0000 (16:59 -0800)]
Convert subpixel filters to use convolve framework

Update the code to call the new convolution functions to do subpixel
prediction rather than the existing functions. Remove the old C and
assembly code, since it is unused. This causes a 50% performance
reduction on the decoder, but that will be resolved when the asm for
the new functions is available.

There is no consensus for whether 6-tap or 2-tap predictors will be
supported in the final codec, so these filters are implemented in
terms of the 8-tap code, so that quality testing of these modes
can continue. Implementing the lower complexity algorithms is a
simple exercise, should it be necessary.

This code produces slightly better results in the EIGHTTAP_SMOOTH
case, since the filter is now applied in only one direction when
the subpel motion is only in one direction. Like the previous code,
the filtering is skipped entirely on full-pel MVs. This combination
seems to give the best quality gains, but this may be indicative of a
bug in the encoder's filter selection, since the encoder could
achieve the result of skipping the filtering on full-pel by selecting
one of the other filters. This should be revisited.

Quality gains on derf positive on almost all clips. The only clip
that seemed to be hurt at all datarates was football
(-0.115% PSNR average, -0.587% min). Overall averages 0.375% PSNR,
0.347% SSIM.

Change-Id: I7d469716091b1d89b4b08adde5863999319d69ff

11 years agoAdd 8-tap generic convolver
John Koleszar [Fri, 25 Jan 2013 17:47:09 +0000 (09:47 -0800)]
Add 8-tap generic convolver

This commit introduces a new convolution function which will be used to
replace the existing subpixel interpolation functions. It is much the
same as the existing functions, but allows for changing the filter
kernel on a per-pixel basis, and doesn't bake in knowledge of the
filter to be applied or the size of the resulting block into the
function name.

Replacing the existing subpel filters will come in a later commit.

Change-Id: Ic9a5615f2f456cb77f96741856fc650d6d78bb91

11 years agofix a build issue with MSVC on windows
Yaowu Xu [Mon, 4 Feb 2013 23:22:55 +0000 (15:22 -0800)]
fix a build issue with MSVC on windows

for idct 16x16 unit test

Change-Id: I51da9405c3a4d7bb3f4cdf062aaccaa90b33dca4

11 years agorewrite 4x4 idct and fdct
Yaowu Xu [Mon, 4 Feb 2013 23:22:32 +0000 (15:22 -0800)]
rewrite 4x4 idct and fdct

This commit changes the 4x4 iDCT to use same algorithm & constants as
other iDCTs. The 4x4 fDCT is also changed to be based on the new iDCT.

Change-Id: Ib1a902693228af903862e1f5a08078c36f2089b0

11 years agoChange definition of NearestMV.
Paul Wilkins [Tue, 5 Feb 2013 10:28:26 +0000 (10:28 +0000)]
Change definition of NearestMV.

This commit makes the NearestMV match the chosen
best reference MV. It can be a 0,0 or non zero vector
which means the the compound nearest mv mode can
combine a 0,0 and a non zero vector.

Change-Id: I2213d09996ae2916e53e6458d7d110350dcffd7a

11 years agoMerge "Added vp9_short_idct1_32x32_c" into experimental
Scott LaVarnway [Tue, 5 Feb 2013 16:56:05 +0000 (08:56 -0800)]
Merge "Added vp9_short_idct1_32x32_c" into experimental

11 years agoMerge "Re-factor code for rd thresholds." into experimental
Paul Wilkins [Tue, 5 Feb 2013 10:12:45 +0000 (02:12 -0800)]
Merge "Re-factor code for rd thresholds." into experimental

11 years agoAdded vp9_short_idct1_32x32_c
Scott LaVarnway [Tue, 5 Feb 2013 00:49:17 +0000 (16:49 -0800)]
Added vp9_short_idct1_32x32_c

and called this function in vp9_dequant_idct_add_32x32_c when
eob == 1.  For the test clip used, the decoder performance improved
by 21+%.  Based on Yaowu's 16 point idct work.

Change-Id: Ib579a90fed531d45777980e04bf0c9b23c093c43

11 years agoRe-factor code for rd thresholds.
Paul Wilkins [Mon, 4 Feb 2013 17:43:02 +0000 (17:43 +0000)]
Re-factor code for rd thresholds.

Separate out code to set the main encode speed
related rd thresholds. Some values changed from
the initial defaults for various new modes.

Quality test results pending but even the addition
of some further non-zero defaults helps encode speed
somewhat in limited testing on derf clips.

Adjustment of thresholds for quality / speed tradeoff
to follow.

Change-Id: I117ee473157e151a1b93193d5f393449328de20d

11 years agoAdded INT16_MIN and INT16_MAX for MSVC builds
Yaowu Xu [Mon, 4 Feb 2013 18:16:59 +0000 (10:16 -0800)]
Added INT16_MIN and INT16_MAX for MSVC builds

These macros were not defined in earlier version of MSVC

Change-Id: I8270a3abb7c6e9ead1931a653d7e41f877a1017b

11 years agoenable 16x16 iDCT unit test
Yaowu Xu [Fri, 1 Feb 2013 19:02:42 +0000 (11:02 -0800)]
enable 16x16 iDCT unit test

test for forward transform will be enabled later after re-do forward
transform

Change-Id: Ie7c7cf88baf7ecbebbe52fe027e1c3b33d3b9d49

11 years agore-write 8 point idct
Yaowu Xu [Fri, 1 Feb 2013 23:34:28 +0000 (15:34 -0800)]
re-write 8 point idct

to be consistent with idct16 and idct32.

Change-Id: Ie89dbd32b65c33274b7fecb4b41160fcf1962204

11 years agoa couple of minor fixes
Yaowu Xu [Sat, 2 Feb 2013 00:45:54 +0000 (16:45 -0800)]
a couple of minor fixes

fixed a function prototypes to prevent compiler warnings;
removed a function not in use;
un-capitialize "Refstride" to ref_stride

Change-Id: Ib4472b6084f357d96328c6a06e795b6813a9edba

11 years agoMerge "Changes 16 point idct" into experimental
Yaowu Xu [Fri, 1 Feb 2013 16:22:20 +0000 (08:22 -0800)]
Merge "Changes 16 point idct" into experimental

11 years agoMerge "fix a small bug in 16 point forward dct" into experimental
Yaowu Xu [Fri, 1 Feb 2013 13:57:41 +0000 (05:57 -0800)]
Merge "fix a small bug in 16 point forward dct" into experimental