platform/upstream/libvpx.git
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

11 years agoAvoid division in intra prediction
Tero Rintaluoma [Wed, 13 Feb 2013 13:18:41 +0000 (15:18 +0200)]
Avoid division in intra prediction

- Using multiplication and shifting instead of division in
  intra prediction.
- Maximum absolute difference is 1 for division statements
  in d45, d27, d63 prediction modes. However, errors can
  cumulate for large block sizes when using already predicted
  values.
- Maximum number of non-matching result values in loops using
  division are:
  4x4        0/16
  8x8        0/64
  16x16     10/256
  32x32     13/1024
  64x64    122/4096

  Overall PSNR
  derf:     0.005
  yt:      -0.022
  std-hd:   0.021
  hd:      -0.006

Change-Id: I3979a02eb6351636442c1af1e23d6c4e6ec1d01d

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