platform/upstream/libvpx.git
11 years agoSave nzcstats.
Ronald S. Bultje [Mon, 25 Mar 2013 23:29:45 +0000 (16:29 -0700)]
Save nzcstats.

Change-Id: I4a3a9eb9f9d17218a0f0d7e148123d34dae879c2

11 years agoScatter-based scantables.
Ronald S. Bultje [Mon, 25 Mar 2013 19:14:01 +0000 (12:14 -0700)]
Scatter-based scantables.

This gains about 0.2% on derf, 0.1% on hd and 0.4% on stdhd. I can put
this under an experimental flag if wanted, just trying to get my patch
queue in shape.

Change-Id: Ibe1a30fe0e0b07bec4802e0f3ff0ba22e505f576

11 years agoMerge "ENTROPY_STATS -> VP8_ENTROPY_STATS in vp8/." into experimental
Ronald S. Bultje [Wed, 27 Mar 2013 02:18:02 +0000 (19:18 -0700)]
Merge "ENTROPY_STATS -> VP8_ENTROPY_STATS in vp8/." into experimental

11 years agoMerge "Add col/row-based coefficient scanning patterns for 1D 8x8/16x16 ADSTs." into...
Ronald S. Bultje [Wed, 27 Mar 2013 02:17:08 +0000 (19:17 -0700)]
Merge "Add col/row-based coefficient scanning patterns for 1D 8x8/16x16 ADSTs." into experimental

11 years agoMerge "Redo banding for all transforms." into experimental
Ronald S. Bultje [Wed, 27 Mar 2013 02:16:44 +0000 (19:16 -0700)]
Merge "Redo banding for all transforms." into experimental

11 years agoMerge "Use above/left (instead of previous in scan-order) as token context." into...
Ronald S. Bultje [Wed, 27 Mar 2013 02:16:24 +0000 (19:16 -0700)]
Merge "Use above/left (instead of previous in scan-order) as token context." into experimental

11 years agoImplicit weighted prediction experiment
Deb Mukherjee [Tue, 12 Mar 2013 21:21:08 +0000 (14:21 -0700)]
Implicit weighted prediction experiment

Adds an experiment to use a weighted prediction of two INTER
predictors, where the weight is one of (1/4, 3/4), (3/8, 5/8),
(1/2, 1/2), (5/8, 3/8) or (3/4, 1/4), and is chosen implicitly
based on consistency of the predictors to the already
reconstructed pixels to the top and left of the current macroblock
or superblock.

Currently the weighting is not applied to SPLITMV modes, which
default to the usual (1/2, 1/2) weighting. However the code is in
place controlled by a macro. The same weighting is used for Y and
UV components, where the weight is derived from analyzing the Y
component only.

Results (over compound inter-intra experiment)
derf: +0.18%
yt: +0.34%
hd: +0.49%
stdhd: +0.23%

The experiment suggests bigger benefit for explicitly signaled weights.

Change-Id: I5438539ff4485c5752874cd1eb078ff14bf5235a

11 years agoAdd col/row-based coefficient scanning patterns for 1D 8x8/16x16 ADSTs.
Ronald S. Bultje [Mon, 25 Mar 2013 19:30:00 +0000 (12:30 -0700)]
Add col/row-based coefficient scanning patterns for 1D 8x8/16x16 ADSTs.

These are mostly just for experimental purposes. I saw small gains (in
the 0.1% range) when playing with this on derf.

Change-Id: Ib21eed477bbb46bddcd73b21c5c708a5b46abedc

11 years agoRedo banding for all transforms.
Ronald S. Bultje [Mon, 25 Mar 2013 19:28:24 +0000 (12:28 -0700)]
Redo banding for all transforms.

Now that the first AC coefficient in both directions use the same DC
as their context, there no longer is a purpose in letting both have
their own band. Merging these two bands allows us to split bands for
some of the very high-frequency AC bands.

In addition, I'm redoing the banding for the 1D-ADST col/row scans. I
don't think the old banding made any sense at all (it merged the last
coefficient of the first row/col in the same band as the first two of
the second row/col), which was clearly an oversight from the band being
applied in scan-order (rather than in their actual position). Now,
coefficients at the same position will be in the same band, regardless
what scan order is used. I think this makes most sense for the purpose
of banding, which is basically "predict energy for this coefficient
depending on the energy of context coefficients" (i.e. pt).

After full re-training, together with previous patch, derf gains about
1.2-1.3%, and hd/stdhd gain about 0.9-1.0%.

Change-Id: I7a0cc12ba724e88b278034113cb4adaaebf87e0c

11 years agoUse above/left (instead of previous in scan-order) as token context.
Ronald S. Bultje [Tue, 26 Mar 2013 23:46:09 +0000 (16:46 -0700)]
Use above/left (instead of previous in scan-order) as token context.

Pearson correlation for above or left is significantly higher than for
previous-in-scan-order (absolute values depend on position in scan, but
in general, we gain about 0.1-0.2 by using either above or left; using
both basically just makes this even better). For eob branch skipping,
we continue to use the previous token in scan order.

This helps about 0.9% on derf after re-training on a limited data set.
Full re-training and results on larger-resolution clips are pending.

Note that this commit breaks trellis, so we can probably get further
gains out of it by fixing trellis at some later point.

Change-Id: Iead68e296fc3a105cca746b5e3da9555d6010cfe

11 years agoMerge "Cleaning up loopfilter code." into experimental
John Koleszar [Tue, 26 Mar 2013 19:40:37 +0000 (12:40 -0700)]
Merge "Cleaning up loopfilter code." into experimental

11 years agoCleaning up loopfilter code.
Dmitry Kovalev [Tue, 26 Mar 2013 18:08:34 +0000 (11:08 -0700)]
Cleaning up loopfilter code.

Lower case variable names, removing redundant variables, declaration and
initialization on the same line.

Change-Id: Ie0c6c95b14103990eb6a9d7784f8259c662e1251

11 years agoDecomposition of vp9_decode_frame function.
Dmitry Kovalev [Tue, 26 Mar 2013 18:04:25 +0000 (11:04 -0700)]
Decomposition of vp9_decode_frame function.

Moving code from vp9_decode_frame function into setup_loopfilter and
setup_segmentation functions. A little bit of cleanup.

Change-Id: I2cce1813e4d7aeec701ccf752bf57e3bdd41b51c

11 years agoMerge "Add an in-loop deringing experiment" into experimental
John Koleszar [Tue, 26 Mar 2013 15:36:55 +0000 (08:36 -0700)]
Merge "Add an in-loop deringing experiment" into experimental

11 years agoMerge "Code cleanup." into experimental
John Koleszar [Tue, 26 Mar 2013 15:34:06 +0000 (08:34 -0700)]
Merge "Code cleanup." into experimental

11 years agoMerge "Code cleanup." into experimental
John Koleszar [Tue, 26 Mar 2013 15:30:46 +0000 (08:30 -0700)]
Merge "Code cleanup." into experimental

11 years agoMerge "Changing initialization order of mb_to_top_edge & mb_to_bottom_edge" into...
John Koleszar [Tue, 26 Mar 2013 15:25:45 +0000 (08:25 -0700)]
Merge "Changing initialization order of mb_to_top_edge & mb_to_bottom_edge" into experimental

11 years agoAdd an in-loop deringing experiment
John Koleszar [Wed, 20 Mar 2013 17:22:20 +0000 (10:22 -0700)]
Add an in-loop deringing experiment

Adds a per-frame, strength adjustable, in loop deringing filter. Uses
the existing vp9_post_proc_down_and_across 5 tap thresholded blur
code, with a brute force search for the threshold.

Results almost strictly positive on the YT HD set, either having no
effect or helping PSNR in the range of 1-3% (overall average 0.8%).
Results more mixed for the CIF set, (-0.5 min, 1.4 max, 0.1 avg).
This has an almost strictly negative impact to SSIM, so examining a
different filter or a more balanced search heuristic is in order.

Other test set results pending.

Change-Id: I5ca6ee8fe292dfa3f2eab7f65332423fa1710b58

11 years agoBugfix in model coef prob experiment
Deb Mukherjee [Tue, 26 Mar 2013 14:29:24 +0000 (07:29 -0700)]
Bugfix in model coef prob experiment

Fixes an issue with model based update that got into
the original patch that was merged.

Change-Id: Ie42d3d0aff2e48cd187d96664dbd3e9d6d3ac22f

11 years agoMerge "Modeling default coef probs with distribution" into experimental
Deb Mukherjee [Tue, 26 Mar 2013 14:13:13 +0000 (07:13 -0700)]
Merge "Modeling default coef probs with distribution" into experimental

11 years agoModeling default coef probs with distribution
Deb Mukherjee [Wed, 13 Mar 2013 18:03:17 +0000 (11:03 -0700)]
Modeling default coef probs with distribution

Replaces the default tables for single coefficient magnitudes with
those obtained from an appropriate distribution. The EOB node
is left unchanged. The model is represeted as a 256-size codebook
where the index corresponds to the probability of the Zero or the
One node. Two variations are implemented corresponding to whether
the Zero node or the One-node is used as the peg. The main advantage
is that the default prob tables will become considerably smaller and
manageable. Besides there is substantially less risk of over-fitting
for a training set.

Various distributions are tried and the one that gives the best
results is the family of Generalized Gaussian distributions with
shape parameter 0.75. The results are within about 0.2% of fully
trained tables for the Zero peg variant, and within 0.1% of the
One peg variant.

The forward updates are optionally (controlled by a macro)
model-based, i.e. restricted to only convey probabilities from the
codebook. Backward updates can also be optionally (controlled by
another macro) model-based, but is turned off by default. Currently
model-based forward updates work about the same as unconstrained
updates, but there is a drop in performance with backward-updates
being model based.

The model based approach also allows the probabilities for the key
frames to be adjusted from the defaults based on the base_qindex of
the frame. Currently the adjustment function is a placeholder that
adjusts the prob of EOB and Zero node from the nominal one at higher
quality (lower qindex) or lower quality (higher qindex) ends of the
range. The rest of the probabilities are then derived based on the
model from the adjusted prob of zero.

Change-Id: Iae050f3cbcc6d8b3f204e8dc395ae47b3b2192c9

11 years agoCode cleanup.
Dmitry Kovalev [Mon, 25 Mar 2013 22:16:14 +0000 (15:16 -0700)]
Code cleanup.

Fixing function arguments alignment, reusing MIN/MAX and clamp functions.

Change-Id: I87dd5a40ffb65b521b8abbf0fccf2f50552c5309

11 years agoCode cleanup.
Dmitry Kovalev [Mon, 25 Mar 2013 21:24:26 +0000 (14:24 -0700)]
Code cleanup.

Lower case variable names, code simplification by using already defined
clamp and read_le16 functions.

Change-Id: I8fd544365bd8d1daed86d7b2ae0843e4ef80df08

11 years agoMerge "Optimize 16x16 idct10 function" into experimental
Yunqing Wang [Fri, 22 Mar 2013 18:17:32 +0000 (11:17 -0700)]
Merge "Optimize 16x16 idct10 function" into experimental

11 years agoMerge "Disable zero bin mode boost." into experimental
Paul Wilkins [Fri, 22 Mar 2013 17:59:43 +0000 (10:59 -0700)]
Merge "Disable zero bin mode boost." into experimental

11 years agoMerge "Minor code clean up" into experimental
Paul Wilkins [Fri, 22 Mar 2013 17:53:12 +0000 (10:53 -0700)]
Merge "Minor code clean up" into experimental

11 years agoDisable zero bin mode boost.
Paul Wilkins [Fri, 22 Mar 2013 15:47:17 +0000 (15:47 +0000)]
Disable zero bin mode boost.

As things stand the zero bin mode boost is hurting somewhat.
In part this seems to be because the boost applied as is
interferes with the rd mode selection loop.

Average gains (derf 0.072, yt 0.243, ythd 0.179 std-hd 0.212%)

Change-Id: Icaecea3908d9a7352370e49b8fa822f2c2c49dc1

11 years agoMinor code clean up
Paul Wilkins [Thu, 21 Mar 2013 18:37:48 +0000 (18:37 +0000)]
Minor code clean up

Change-Id: Ifa864e0acb253b238b03cdeed0fe5d6ee30a45d8

11 years agoMerge "Remove TX size segment feature" into experimental
Paul Wilkins [Fri, 22 Mar 2013 17:39:22 +0000 (10:39 -0700)]
Merge "Remove TX size segment feature" into experimental

11 years agoOptimize 16x16 idct10 function
Yunqing Wang [Thu, 21 Mar 2013 23:29:36 +0000 (16:29 -0700)]
Optimize 16x16 idct10 function

Wrote sse2 version of vp9_short_idct10_16x16 function. Compared
to c version, the sse2 version is 2.3X faster.

Change-Id: I314c4f09369648721798321eeed6f58e38857f26

11 years agoChanging initialization order of mb_to_top_edge & mb_to_bottom_edge
Dmitry Kovalev [Thu, 21 Mar 2013 19:51:57 +0000 (12:51 -0700)]
Changing initialization order of mb_to_top_edge & mb_to_bottom_edge

Making consistent initialization of mb_to_{top,botton,left,right}_edge
variables after set_mb_row & set_mb_col calls. A little bit of code cleanup
additionally.

Change-Id: I245bfe32c5701e9836956dc25cf8c770d109cbc1

11 years agoMerge "Optimize 16x16 idct function" into experimental
Yunqing Wang [Thu, 21 Mar 2013 18:54:20 +0000 (11:54 -0700)]
Merge "Optimize 16x16 idct function" into experimental

11 years agoOptimize 16x16 idct function
Yunqing Wang [Thu, 21 Mar 2013 16:22:22 +0000 (09:22 -0700)]
Optimize 16x16 idct function

Wrote sse2 version of vp9_short_idct16x16 function. Compared to c
version, the sse2 version is over 2.5X faster.

Change-Id: I38536e2b846427a2cc5c5423aaf305fd0e605d61

11 years agoCode cleanup: lower case variable names.
Dmitry Kovalev [Wed, 20 Mar 2013 23:41:30 +0000 (16:41 -0700)]
Code cleanup: lower case variable names.

Renaming Width to width, Height to height and Version to version in
several structs and function signatures.

Change-Id: I084c3f7e747cb2ce3345aff27a3dff9b13a87543

11 years agoMerge "Motion vector code cleanup." into experimental
Dmitry Kovalev [Tue, 19 Mar 2013 18:17:22 +0000 (11:17 -0700)]
Merge "Motion vector code cleanup." into experimental

11 years agoRemove TX size segment feature
Paul Wilkins [Tue, 19 Mar 2013 02:53:02 +0000 (02:53 +0000)]
Remove TX size segment feature

Change-Id: I0d226e4cb240caced37230f46905bf69b46e0cce

11 years agoChanges to rd error_per_bit calculation.
Paul Wilkins [Thu, 7 Mar 2013 15:02:57 +0000 (15:02 +0000)]
Changes to rd error_per_bit calculation.

Specifically changes to retain more precision
especially at low Q through to the point of use.

Change-Id: Ief5f010f2ca4daaabef49520e7edb46c35daf397

11 years agoMerge "Fix ENTROPY_STATS code in vp9_tokenize.c." into experimental
Ronald S. Bultje [Mon, 18 Mar 2013 22:58:33 +0000 (15:58 -0700)]
Merge "Fix ENTROPY_STATS code in vp9_tokenize.c." into experimental

11 years agoENTROPY_STATS -> VP8_ENTROPY_STATS in vp8/.
Ronald S. Bultje [Mon, 18 Mar 2013 22:28:51 +0000 (15:28 -0700)]
ENTROPY_STATS -> VP8_ENTROPY_STATS in vp8/.

Change-Id: I0027483e47900de84394de47c3273cc8292e6119

11 years agoFix ENTROPY_STATS code in vp9_tokenize.c.
Ronald S. Bultje [Mon, 18 Mar 2013 21:39:36 +0000 (14:39 -0700)]
Fix ENTROPY_STATS code in vp9_tokenize.c.

Change-Id: I9b4cb1e2ce6c6a99cffd473ff2fa7579bd318fcd

11 years agoOptimize 8x8 idct function
Yunqing Wang [Fri, 15 Mar 2013 18:33:10 +0000 (11:33 -0700)]
Optimize 8x8 idct function

Wrote sse2 functions of vp9_short_idct8x8 and vp9_short_idct10_8x8.
Compared to c version, the sse2 version is 2X faster. The decoder
test didn't show noticeable gain since 8x8 idct doesn't take much
of decoding time (less than 1% in my test).

Change-Id: I56313e18cd481700b3b52c4eda5ca204ca6365f3

11 years agoVP9/ResizeInternalTest: adjust passing threshold
John Koleszar [Mon, 18 Mar 2013 22:17:45 +0000 (15:17 -0700)]
VP9/ResizeInternalTest: adjust passing threshold

Update to +/- 1dB.

Change-Id: Idada001f261b36945c9334e288a415ee2c79c415

11 years agoMerge "Replace scaling byte with explicit display size" into experimental
John Koleszar [Mon, 18 Mar 2013 20:02:07 +0000 (13:02 -0700)]
Merge "Replace scaling byte with explicit display size" into experimental

11 years agoReplace scaling byte with explicit display size
John Koleszar [Thu, 14 Mar 2013 21:36:08 +0000 (14:36 -0700)]
Replace scaling byte with explicit display size

If the intended display size is different than the size the frame is
coded at, then send that size explicitly in the bitstream. Adds a new
bit to the frame header to indicate whether the extra size fields
are present.

Change-Id: I525c66f22d207efaf1e5f903c6a2a91b80245854

11 years agoMerge "Adapt ARNR filter length and strength." into experimental
Paul Wilkins [Mon, 18 Mar 2013 19:00:39 +0000 (12:00 -0700)]
Merge "Adapt ARNR filter length and strength." into experimental

11 years agoMerge "Fix pulsing issue with scaling" into experimental
John Koleszar [Mon, 18 Mar 2013 18:57:36 +0000 (11:57 -0700)]
Merge "Fix pulsing issue with scaling" into experimental

11 years agoMerge "Add VP9_GET_REFERENCE control" into experimental
John Koleszar [Mon, 18 Mar 2013 18:57:31 +0000 (11:57 -0700)]
Merge "Add VP9_GET_REFERENCE control" into experimental

11 years agoAdapt ARNR filter length and strength.
Paul Wilkins [Mon, 18 Mar 2013 16:17:04 +0000 (16:17 +0000)]
Adapt ARNR filter length and strength.

Adjust the filter length and strength for each
ARF group based on a measure of difficulty (the boost)
and the active q range.

Remove lower limit on RDMULT value.

Average gains on the different sets in range 0.4%-0.9%.
However the ARNR changes give a very big boost on a
few clips.

Eg. Soccer ~5%, in derf set and Cyclist ~ 10% in the std-hd set

Change-Id: I2078d78798e27ad2bcc2b32d703ea37b67412ec4

11 years agoMerge "put refmvselection under experiment" into experimental
Yaowu Xu [Mon, 18 Mar 2013 15:51:33 +0000 (08:51 -0700)]
Merge "put refmvselection under experiment" into experimental

11 years agoMerge "removed reference to "LLM" and "x8"" into experimental
Yaowu Xu [Mon, 18 Mar 2013 15:51:19 +0000 (08:51 -0700)]
Merge "removed reference to "LLM" and "x8"" into experimental

11 years agoMerge "Remove some unused rate control variables" into experimental
John Koleszar [Mon, 18 Mar 2013 15:36:23 +0000 (08:36 -0700)]
Merge "Remove some unused rate control variables" into experimental

11 years agoMerge "Fix use of NaN in firstpass" into experimental
John Koleszar [Mon, 18 Mar 2013 15:36:18 +0000 (08:36 -0700)]
Merge "Fix use of NaN in firstpass" into experimental

11 years agoMerge "Context-pred fix to not use top/left on edges" into experimental
Deb Mukherjee [Sun, 17 Mar 2013 02:09:25 +0000 (19:09 -0700)]
Merge "Context-pred fix to not use top/left on edges" into experimental

11 years agoContext-pred fix to not use top/left on edges
Deb Mukherjee [Sat, 16 Mar 2013 16:26:52 +0000 (09:26 -0700)]
Context-pred fix to not use top/left on edges

This fix resolves some of the mismatch issues being seen
recently. While this is the right thing to do when tiling
is used for this experiment, it is not the underlying cause
of the the mismatches.
Something else is causing writing outside of the allowable
frame area in the encoder leading to this mismatch.

Change-Id: If52c6f67555aa18ab8762865384e323b47237277

11 years agoRemove some unused rate control variables
John Koleszar [Sat, 16 Mar 2013 00:37:01 +0000 (17:37 -0700)]
Remove some unused rate control variables

These variables are unused, and are subject to overflowing, causing
assertions when built with -ftrapv.

Change-Id: Ia00a3201af309906c05bcd4b23a643925ed6ea86

11 years agoFix use of NaN in firstpass
John Koleszar [Sat, 16 Mar 2013 00:26:24 +0000 (17:26 -0700)]
Fix use of NaN in firstpass

If the second reference is better than the first in the long term,
it was possible to try to take the fractional exponent of a
negative number, giving an undefined result.

Change-Id: I1dd08286747ceae960eb03bb5d98a383cc9d253b

11 years agoMerge "Cleaning up frame decoding functionality." into experimental
John Koleszar [Sat, 16 Mar 2013 00:44:32 +0000 (17:44 -0700)]
Merge "Cleaning up frame decoding functionality." into experimental

11 years agoFaster vp9_short_fdct16x16.
Christian Duvivier [Fri, 15 Mar 2013 22:50:55 +0000 (15:50 -0700)]
Faster vp9_short_fdct16x16.

Scalar path is about 1.5x faster (3.1% overall encoder speedup).
SSE2 path is about 7.2x faster (7.8% overall encoder speedup).

Change-Id: I06da5ad0cdae2488431eabf002b0d898d66d8289

11 years agoMotion vector code cleanup.
Dmitry Kovalev [Fri, 15 Mar 2013 20:16:58 +0000 (13:16 -0700)]
Motion vector code cleanup.

Moving identical code to separate functions, variable declaration and
initialization on the same line.

Change-Id: Ifa6474a64189f9d8051e88e19850453b0227752c

11 years agoMerge "force lossless coding at very high quality end" into experimental
Yaowu Xu [Fri, 15 Mar 2013 02:05:17 +0000 (19:05 -0700)]
Merge "force lossless coding at very high quality end" into experimental

11 years agoMerge "Remove leftover reference to 2nd order dc/ac quant" into experimental
Yaowu Xu [Fri, 15 Mar 2013 02:05:11 +0000 (19:05 -0700)]
Merge "Remove leftover reference to 2nd order dc/ac quant" into experimental

11 years agoCleaning up frame decoding functionality.
Dmitry Kovalev [Thu, 14 Mar 2013 19:31:54 +0000 (12:31 -0700)]
Cleaning up frame decoding functionality.

Change-Id: I25424904fb8541fc19d00d9fbc592379374b98c0

11 years agoforce lossless coding at very high quality end
Yaowu Xu [Thu, 14 Mar 2013 19:31:27 +0000 (12:31 -0700)]
force lossless coding at very high quality end

Change-Id: I75fc4eee10bee9efd419d248827290cce8e6d637

11 years agoRemove leftover reference to 2nd order dc/ac quant
Yaowu Xu [Thu, 14 Mar 2013 17:46:15 +0000 (10:46 -0700)]
Remove leftover reference to 2nd order dc/ac quant

Change-Id: Ib8dacf1d2797743569771b8f699e40e1aeb085cb

11 years agoFix pulsing issue with scaling
John Koleszar [Thu, 14 Mar 2013 00:09:05 +0000 (17:09 -0700)]
Fix pulsing issue with scaling

Updates the YV12_BUFFER_CONFIG structure to be crop-aware. The
exiting width/height parameters are left unchanged, storing the
width and height algined to a 16 byte boundary. The cropped
dimensions are added as new fields.

This fixes a nasty visual pulse when switching between scaled and
unscaled frame dimensions due to a mismatch between the scaling
ratio and the 16-byte aligned sizes.

Change-Id: Id4a3f6aea6b9b9ae38bdfa1b87b7eb2cfcdd57b6

11 years agoAdd VP9_GET_REFERENCE control
John Koleszar [Wed, 13 Mar 2013 19:15:43 +0000 (12:15 -0700)]
Add VP9_GET_REFERENCE control

This is like VP8_COPY_REFERENCE, but returns a pointer to the reference
frame rather than a copy of it. This is useful when the application
doesn't know what the size of the reference is, as is the case when
scaling is in effect.

Change-Id: I63667109f65510364d0e397ebe56217140772085

11 years agoSupport +/-2048 motion vector coding
Jingning Han [Tue, 12 Mar 2013 04:51:00 +0000 (21:51 -0700)]
Support +/-2048 motion vector coding

Enable entropy coding of motion vectors up to +/-2048. Also
extend the motion search range accordingly.

Change-Id: Iac2bb015e8934521cef83a19edbe967d9f097436

11 years agoput refmvselection under experiment
Yaowu Xu [Tue, 12 Mar 2013 23:49:15 +0000 (16:49 -0700)]
put refmvselection under experiment

and turn the experiment off by default.

Change-Id: If9e684aa6cc49eacd39f36645a110a447e38d2de

11 years agoremoved reference to "LLM" and "x8"
Yaowu Xu [Tue, 12 Mar 2013 18:24:04 +0000 (11:24 -0700)]
removed reference to "LLM" and "x8"

The commit changed the name of files and function to remove obselete
reference to LLM and x8.

Change-Id: I973b20fc1a55149ed68b5408b3874768e6f88516

11 years agofix superframe index marker masks
John Koleszar [Wed, 13 Mar 2013 02:03:05 +0000 (19:03 -0700)]
fix superframe index marker masks

The superframe index marker byte carries data in the lower 5 bits. Only the
upper 3 should be used as part of the mask to detect it. By masking with
0xf0, the previous code was incorrect for frames over 65k bytes.

Change-Id: I6248889f5af227457f359a56b2348ef6db87a3b4

11 years agofix superframe index with lagged encoding
John Koleszar [Tue, 12 Mar 2013 23:33:38 +0000 (16:33 -0700)]
fix superframe index with lagged encoding

If a superframe (ARF) is generated while flushing the lagged frames
at the end of the clip, the buffer pointer wasn't being properly
updated to account for the size of the index, causing the next
frame to overwrite the index on the previous frame.

Change-Id: Ib158cc8e4183d663bdfb9ba002dd4c98916abdc9

11 years agoMerge "disambiguate superframe index in vp9_stop_encode()" into experimental
Paul Wilkins [Tue, 12 Mar 2013 23:00:30 +0000 (16:00 -0700)]
Merge "disambiguate superframe index in vp9_stop_encode()" into experimental

11 years agodisambiguate superframe index in vp9_stop_encode()
John Koleszar [Tue, 12 Mar 2013 21:30:18 +0000 (14:30 -0700)]
disambiguate superframe index in vp9_stop_encode()

If the bool-coded partition naturally ends in a byte that matches the
superframe index marker, it could lead to a parse error. This commit
ensures that if such a marker is seen, it is padded out with an
additional zero byte to disambiguate it.

Change-Id: Id977de05745b6fa9ef08afb71e210a2a3ecca02e

11 years agoMerge "Change buffer update rules on ARF overlay." into experimental
Paul Wilkins [Tue, 12 Mar 2013 18:07:20 +0000 (11:07 -0700)]
Merge "Change buffer update rules on ARF overlay." into experimental

11 years agoMerge "Fix typo in comment for number of extra bits for cat6 tokens." into experimental
Ronald S. Bultje [Tue, 12 Mar 2013 17:45:12 +0000 (10:45 -0700)]
Merge "Fix typo in comment for number of extra bits for cat6 tokens." into experimental

11 years agoMerge "fix an assumption about uv_stride" into experimental
John Koleszar [Tue, 12 Mar 2013 17:44:31 +0000 (10:44 -0700)]
Merge "fix an assumption about uv_stride" into experimental

11 years agoFix typo in comment for number of extra bits for cat6 tokens.
Ronald S. Bultje [Mon, 11 Mar 2013 16:20:57 +0000 (09:20 -0700)]
Fix typo in comment for number of extra bits for cat6 tokens.

Change-Id: I07ddf3be8bc5d6c2eb561d4241879777c315b183

11 years agoMerge "Changes to maximum gf/arf interval." into experimental
Paul Wilkins [Tue, 12 Mar 2013 16:59:43 +0000 (09:59 -0700)]
Merge "Changes to maximum gf/arf interval." into experimental

11 years agoChange buffer update rules on ARF overlay.
Paul Wilkins [Tue, 12 Mar 2013 15:33:40 +0000 (15:33 +0000)]
Change buffer update rules on ARF overlay.

When coding the frame that corresponds to the midpoint frame
defining an ARF, do not update the last reference frame buffer.
Previously this buffer was updated meaning that when coding the next
ARF all the reference buffers were the same (or nearly so).
Turning the update off means that the frame before is still available
as an alternative predictor and for use in compound prediction.

Also fixed inconsistency in test for mismatch (patch from JK).

Net average gains (derf 0.049, yt 0.163, yt-hd 0.207, std-hd 0.286)

Change-Id: Ifee21da21ccbb1648ac2eafe890d3ce60562c7bc

11 years agofix an assumption about uv_stride
John Koleszar [Tue, 12 Mar 2013 15:44:53 +0000 (08:44 -0700)]
fix an assumption about uv_stride

Use the uv_stride from the framebuffer rather than deriving it from the
y_stride.

Change-Id: I94581cb741539d094ff062b3d008235556903b8c

11 years agoMerge "Code cleanup." into experimental
Dmitry Kovalev [Tue, 12 Mar 2013 00:22:21 +0000 (17:22 -0700)]
Merge "Code cleanup." into experimental

11 years agoCode cleanup.
Dmitry Kovalev [Tue, 12 Mar 2013 00:02:27 +0000 (17:02 -0700)]
Code cleanup.

Removing redundant code, introducing new functions for better
decomposition, adding 'clamp' function to vp9_common.h.

Change-Id: Ic3b8ca13bbc38f60f0c9c43910b5802005e31aaf

11 years agoMerge "Reinitialize motion search tables on frame size change" into experimental
John Koleszar [Mon, 11 Mar 2013 23:32:03 +0000 (16:32 -0700)]
Merge "Reinitialize motion search tables on frame size change" into experimental

11 years agoMerge "Add 'superframe' index" into experimental
John Koleszar [Mon, 11 Mar 2013 23:31:48 +0000 (16:31 -0700)]
Merge "Add 'superframe' index" into experimental

11 years agoMerge "Update ResizeInternalTest threshold" into experimental
John Koleszar [Mon, 11 Mar 2013 23:18:36 +0000 (16:18 -0700)]
Merge "Update ResizeInternalTest threshold" into experimental

11 years agoChanges to maximum gf/arf interval.
Paul Wilkins [Wed, 6 Mar 2013 11:33:43 +0000 (11:33 +0000)]
Changes to maximum gf/arf interval.

This patch puts in an adjustment to the maximum gf/arf
interval based on the active q range.  It sets a fixed
baseline maximum of 16 but can drop this down to 12 at
lower q. This required some re-ordering in the first pass
code to insure we have a Q range estimate before defining
the first gf sequence.

The main gains seed are int he STD hd set on 50fps clips
where previously the interval could rise as high as 25.
On the std hd clip the gains are around 2.8% with limit set
to 300 frames.

When combined with the one shot rate control flags we get
combined of:

derf 1.55% (limit300), yt 7.25%, hd 5.17% std-hd 5.84% (limit300)

Change-Id: Ib380d51354511f2ff0f171a8df4e74291c0421f9

11 years agoFix vp9_tree_probs_from_distribution with CONFIG_CODE_NONZEROCOUNT
John Koleszar [Mon, 11 Mar 2013 18:03:36 +0000 (11:03 -0700)]
Fix vp9_tree_probs_from_distribution with CONFIG_CODE_NONZEROCOUNT

The automatic merge result was incomplete.

Change-Id: I8976318bfc346d867660a013a302c80edb25fc29

11 years agoMerge "Simplify vp9_adapt_nmv_probs" into experimental
John Koleszar [Mon, 11 Mar 2013 16:57:53 +0000 (09:57 -0700)]
Merge "Simplify vp9_adapt_nmv_probs" into experimental

11 years agoSimplify vp9_adapt_nmv_probs
John Koleszar [Mon, 11 Mar 2013 16:34:05 +0000 (09:34 -0700)]
Simplify vp9_adapt_nmv_probs

Remove the temporary branch count arrays and build the adapted probabilities
while walking the tree. Gives an additional 1.5% or so on CIF.

Change-Id: I875d61e5e0ec778e5d2f7f9d0837b989a91cf3a3

11 years agoMerge "Minor optimization in mv entropy adaptation" into experimental
Deb Mukherjee [Mon, 11 Mar 2013 16:43:54 +0000 (09:43 -0700)]
Merge "Minor optimization in mv entropy adaptation" into experimental

11 years agoMerge "Optimize vp9_tree_probs_from_distribution" into experimental
John Koleszar [Mon, 11 Mar 2013 16:32:11 +0000 (09:32 -0700)]
Merge "Optimize vp9_tree_probs_from_distribution" into experimental

11 years agoMinor optimization in mv entropy adaptation
Deb Mukherjee [Mon, 11 Mar 2013 15:49:14 +0000 (08:49 -0700)]
Minor optimization in mv entropy adaptation

Adds a check to exit from the increment_nmv_count function when the
increment is 0.

Change-Id: I99c1e342d351f7800e23590f9c2419881bf1d708

11 years agoOptimize vp9_tree_probs_from_distribution
John Koleszar [Sun, 10 Mar 2013 20:39:30 +0000 (13:39 -0700)]
Optimize vp9_tree_probs_from_distribution

The previous implementation visited each node in the tree multiple times
because it used each symbol's encoding to revisit the branches taken and
increment its count. Instead, we can traverse the tree depth first and
calculate the probabilities and branch counts as we walk back up. The
complexity goes from somewhere between O(nlogn) and O(n^2) (depending on
how balanced the tree is) to O(n).

Only tested one clip (256kbps, CIF), saw 13% decoding perf improvement.

Note that this optimization should port trivially to VP8 as well. In VP8,
the decoder doesn't use this function, but it does routinely show up
on the profile for realtime encoding.

Change-Id: I4f2848e4f41dc9a7694f73f3e75034bce08d1b12

11 years agoContinued experiment with nonzero count
Deb Mukherjee [Fri, 8 Mar 2013 04:56:34 +0000 (20:56 -0800)]
Continued experiment with nonzero count

Adds probability updates for extra bits for the nzcs, code for
getting nzc stats, plus some minor cleanups and fixes.

Change-Id: If2814e7f04fb52f5025ad9f400f3e6c50a00b543

11 years agoMerge "Add support for tx_select in i8x8 encoding in keyframes." into experimental
Ronald S. Bultje [Sat, 9 Mar 2013 00:25:27 +0000 (16:25 -0800)]
Merge "Add support for tx_select in i8x8 encoding in keyframes." into experimental

11 years agoMerge "Add vp9_idct4_1d_sse2" into experimental
Yunqing Wang [Fri, 8 Mar 2013 23:14:02 +0000 (15:14 -0800)]
Merge "Add vp9_idct4_1d_sse2" into experimental

11 years agoAdd vp9_idct4_1d_sse2
Yunqing Wang [Fri, 8 Mar 2013 18:54:30 +0000 (10:54 -0800)]
Add vp9_idct4_1d_sse2

Added SSE2 idct4_1d which is called by vp9_short_iht4x4. Also,
modified the parameter type passed to vp9_short_iht functions to
make it work with rtcd prototype.

Change-Id: I81ba7cb4db6738f1923383b52a06deb760923ffe

11 years agoMerge "Consistent usage of ROUND_POWER_OF_TWO macro." into experimental
Dmitry Kovalev [Fri, 8 Mar 2013 19:35:22 +0000 (11:35 -0800)]
Merge "Consistent usage of ROUND_POWER_OF_TWO macro." into experimental

11 years agoMerge "Optimize add_constant_residual function" into experimental
Yunqing Wang [Fri, 8 Mar 2013 18:18:52 +0000 (10:18 -0800)]
Merge "Optimize add_constant_residual function" into experimental

11 years agoExtend diff MV limit from +/-256 to +/-1024
Jingning Han [Wed, 6 Mar 2013 20:02:15 +0000 (12:02 -0800)]
Extend diff MV limit from +/-256 to +/-1024

Increase the motion search range by 4x. Change MV_CLASS tree of the
entropy coding to allow two additional mv classes to cover the
extended motion vector limit. The codec determines the effective
motion search range conditioned on the actual frame dimension.

It provides coding gains:

stdhd 0.39%
yt    0.56%
hd    0.47%

Major coding performance gains are packed in several sequences with
intense motion activities, e.g., ped_1080p gains 7% at high bit-rates,
and on average 3%.

TODO: Need to further tune the rate control and motion search units.

Change-Id: Ib842540a6796fbee5a797809433ef6a477c6d78d