Commit Graph

2029 Commits

Author SHA1 Message Date
Yunqing Wang
cc80247f16 Switch the order of calculating 2-D inverse transform
The 2-D inverse transform X = M1*Z*Transposed_M2 was calculated
in 2 steps from left to right:
1. Vertical transform: Y = M1*Z
2. Horizontal transform: X= Y*Transposed_M2
In SIMD, a transpose is needed in vertical transform.

Here, switched the calculation order to do it from right to left.
In this way, we could eliminate that transpose by writing the
intermediate results out to their transposed positions.

Change-Id: I34dfe5eb01292f6e363712420d99475e2e81e12c
2012-12-27 14:09:30 -08:00
John Koleszar
5ebe94f9f1 Build fixes to merge vp9-preview into master
Various fixups to resolve issues when building vp9-preview under the more stringent
checks placed on the experimental branch.

Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
2012-12-26 11:21:09 -08:00
Yunqing Wang
6ee08f3ccf Fix a warning
Fixed the warning: the size of array ‘intermediate_buffer’ can’t
be evaluated [-Wvla].

Change-Id: Ibcffd6969bd71cee0c10f7cf18960e58cd0bd915
2012-12-21 15:26:56 -08:00
Scott LaVarnway
89ac94f8fb Removed mmx versions of vp9_bilinear_predict filters
These filters will not work with VP9.

Change-Id: Ic26c77961084fcea6bfa97f4cd95afdea2282e85
2012-12-21 14:41:49 -08:00
John Koleszar
229273391f Merge "add emmintrin_compat.h for builds with gcc < 4" into vp9-preview 2012-12-21 14:21:50 -08:00
Jim Bankoski
ad64ca4494 fixed sizes of global arrays
Change-Id: Ibc077cf1c1da0c86063f88c6d3073c6876989119
2012-12-21 13:09:04 -08:00
James Zern
9dab3ce624 add emmintrin_compat.h for builds with gcc < 4
Change-Id: If7822e6fcd0d3568b934032322b19ba3e401df26
2012-12-20 14:56:13 -08:00
Jim Bankoski
1dffce7f96 add private to assembly files to insure proper chromebuild
Change-Id: I6e43ca73f35401a974ed8ee27738d4318f09fd37
2012-12-20 09:40:18 -08:00
Deb Mukherjee
08f0c7cc9c New previous coef context experiment
Adds an experiment to derive the previous context of a coefficient
not just from the previous coefficient in the scan order but from a
combination of several neighboring coefficients previously encountered
in scan order.  A precomputed table of neighbors for each location
for each scan type and block size is used. Currently 5 neighbors are
used.

Results are about 0.2% positive using a strategy where the max coef
magnitude from the 5 neigbors is used to derive the context.

Change-Id: Ie708b54d8e1898af742846ce2d1e2b0d89fd4ad5
2012-12-19 18:49:39 -08:00
Scott LaVarnway
08dabbcee1 Disabled x86inc style assembly functions
Temporary fix for 32-bit mac build errors.

Change-Id: I2038f033cac16ea796097d0edd0f1c3da03246d7
2012-12-19 11:53:43 -08:00
Ronald S. Bultje
4cca47b538 Use standard integer types for pixel values and coefficients.
For coefficients, use int16_t (instead of short); for pixel values in
16-bit intermediates, use uint16_t (instead of unsigned short); for all
others, use uint8_t (instead of unsigned char).

Change-Id: I3619cd9abf106c3742eccc2e2f5e89a62774f7da
2012-12-18 15:31:19 -08:00
Ronald S. Bultje
5cab8b7a18 Merge "Give 4x4 scan and coef_band tables a _4x4 suffix." into experimental 2012-12-18 14:17:46 -08:00
Ronald S. Bultje
58961c74ea Merge "Remove redundant "Prob" type (it's a duplicate of vp9_prob)." into experimental 2012-12-18 14:17:18 -08:00
Yunqing Wang
e8d610dda0 Fix a warning
Fixed the warning: the size of array ‘intermediate_buffer’ can’t
be evaluated [-Wvla].

Change-Id: Ibcffd6969bd71cee0c10f7cf18960e58cd0bd915
2012-12-18 12:09:46 -08:00
Ronald S. Bultje
8986eb5c26 Give 4x4 scan and coef_band tables a _4x4 suffix.
This matches the names of tables for all other transform sizes.

Change-Id: Ia7681b7f8d34c97c27b0eb0e34d490cd0f8d02c6
2012-12-18 10:49:10 -08:00
Ronald S. Bultje
ebb5f2f7bd Remove redundant "Prob" type (it's a duplicate of vp9_prob).
Change-Id: I9548891d7b8ff672a31579bcdce74e4cea529883
2012-12-18 10:38:12 -08:00
John Koleszar
1306ba7659 Remove vp9_type_aliases.h
Prefer the standard fixed-size integer typedefs.

Change-Id: Iad75582350669e49a8da3b7facb9c259e9514a5b
2012-12-17 11:32:37 -08:00
Yaowu Xu
0405cd8e9f fixed a warning
where variable is used without initialization

Change-Id: Ic6b52623802641060cad4a72271050aeaf20ad5c
2012-12-17 11:11:07 -08:00
Yaowu Xu
f8ff3e5d47 prevents redefine of INT64_MAX
MSVC 2012 (_MSC_VER=1600) introduced the definition, this commit
prevents the redefinition of the macro

Change-Id: I7de92e7e9e865a342f2bcc4b071f8d3c9b2a508c
2012-12-13 16:09:52 -08:00
Yaowu Xu
fd6f492604 remove floating point inverse transforms
Change-Id: I9c651bd7c161974bf5f929446361b00d85e57a3f
2012-12-13 16:02:25 -08:00
Yaowu Xu
c681887652 fixed build issue with round()
not defined in msvc

Change-Id: I8fe8462a0c2f636d8b43c0243832ca67578f3665
2012-12-13 15:15:56 -08:00
Deb Mukherjee
9c318ee371 Merge "Further improvements on the hybrid dwt/dct expt" into experimental 2012-12-13 11:04:56 -08:00
Deb Mukherjee
210dc5b2db Further improvements on the hybrid dwt/dct expt
Modifies the scanning pattern and uses a floating point 16x16
dct implementation for now to handle scaling better.
Also experiments are in progress with 2/6 and 9/7 wavelets.

Results have improved to within ~0.25% of 32x32 dct for std-hd
and about 0.03% for derf. This difference can probably be bridged by
re-optimizing the entropy stats for these transforms. Currently
the stats used are common between 32x32 dct and dwt/dct.

Experiments are in progress with various scan pattern - wavelet
combinations.

Ideally the subbands should be tokenized separately, and an
experiment will be condcuted next on that.

Change-Id: Ia9cbfc2d63cb7a47e562b2cd9341caf962bcc110
2012-12-13 10:37:49 -08:00
Ronald S. Bultje
f4608e3606 Merge "New default coefficient/band probabilities." into experimental 2012-12-13 09:56:50 -08:00
Ronald S. Bultje
5a5df19de3 New default coefficient/band probabilities.
Gives 0.5-0.6% improvement on derf and stdhd, and 1.1% on hd. The
old tables basically derive from times that we had only 4x4 or
only 4x4 and 8x8 DCTs.

Note that some values are filled with 128, because e.g. ADST ever
only occurs as Y-with-DC, as does 32x32; 16x16 ever only occurs
as Y-with-DC or as UV (as complement of 32x32 Y); and 8x8 Y2 ever
only has 4 coefficients max. If preferred, I can add values of
other tables in their place (e.g. use 4x4 2nd order high-frequency
probabilities for 8x8 2nd order), so that they make at least some
sense if we ever implement a larger 2nd order transform for the
8x8 DCT (etc.), please let me know

Change-Id: I917db356f2aff8865f528eb873c56ef43aa5ce22
2012-12-12 16:23:57 -08:00
Scott LaVarnway
b575394e21 Improved vp9_ihtllm_c
As suggested by Yaowu, we can use eob to reduce the complexity
of the vp9_ihtllm_c function.  For the 1080p test clip used, the decoder
performance improved by 17%.

Change-Id: I32486f2f06f9b8f60467d2a574209aa3a3daa435
2012-12-12 15:49:39 -08:00
Ronald S. Bultje
39de1e14ed Merge "Consistently use get_prob(), clip_prob() and newly added clip_pixel()." into experimental 2012-12-12 10:34:14 -08:00
Ronald S. Bultje
4d0ec7aacd Consistently use get_prob(), clip_prob() and newly added clip_pixel().
Add a function clip_pixel() to clip a pixel value to the [0,255] range
of allowed values, and use this where-ever appropriate (e.g. prediction,
reconstruction). Likewise, consistently use the recently added function
clip_prob(), which calculates a binary probability in the [1,255] range.
If possible, try to use get_prob() or its sister get_binary_prob() to
calculate binary probabilities, for consistency.

Since in some places, this means that binary probability calculations
are changed (we use {255,256}*count0/(total) in a range of places,
and all of these are now changed to use 256*count0+(total>>1)/total),
this changes the encoding result, so this patch warrants some extensive
testing.

Change-Id: Ibeeff8d886496839b8e0c0ace9ccc552351f7628
2012-12-12 10:01:19 -08:00
Yaowu Xu
0c35b27689 Merge "clean up tokenize_b() and stuff_b()" into experimental 2012-12-11 13:51:56 -08:00
Yaowu Xu
899f0fc126 clean up tokenize_b() and stuff_b()
Change-Id: I0c1be01aae933243311ad321b6c456adaec1a0f5
2012-12-11 13:32:16 -08:00
Yaowu Xu
6b380c0cfa Merge "experiment with CONTEXT conversion" into experimental 2012-12-11 09:46:36 -08:00
Paul Wilkins
d124465975 Further changes to mv reference code.
Some further changes and refactoring of mv
reference code and selection of center point for
searches. Mainly relates to not passing so many
different local copies of things around.

Some place holder comments.

Change-Id: I309f10ffe9a9cde7663e7eae19eb594371c8d055
2012-12-10 17:31:51 +00:00
John Koleszar
d1356faeb8 Merge remote-tracking branch 'origin/vp9-preview' into experimental 2012-12-07 17:26:31 -08:00
Yaowu Xu
ab480cede5 experiment with CONTEXT conversion
This commit changed the ENTROPY_CONTEXT conversion between MBs that
have different transform sizes.

In additioin, this commit also did a number of cleanup/bug fix:
1. removed duplicate function vp9_fix_contexts() and changed to use
vp8_reset_mb_token_contexts() for both encoder and decoder
2. fixed a bug in stuff_mb_16x16 where wrong context was used for
the UV.
3. changed reset all context to 0 if a MB is skipped to simplify the
logic.

Change-Id: I7bc57a5fb6dbf1f85eac1543daaeb3a61633275c
2012-12-07 17:25:45 -08:00
Ronald S. Bultje
885cf816eb Introduce vp9_coeff_probs/counts/stats/accum types.
Use these, instead of the 4/5-dimensional arrays, to hold statistics,
counts, accumulations and probabilities for coefficient tokens. This
commit also re-allows ENTROPY_STATS to compile.

Change-Id: If441ffac936f52a3af91d8f2922ea8a0ceabdaa5
2012-12-07 16:09:59 -08:00
Frank Galligan
eec0bc4f1e Fix implicit cast.
Change-Id: I1eb7433061a6c529471026e0ebdc6467942062eb
2012-12-07 15:25:44 -08:00
Ronald S. Bultje
c456b35fdf 32x32 transform for superblocks.
This adds Debargha's DCT/DWT hybrid and a regular 32x32 DCT, and adds
code all over the place to wrap that in the bitstream/encoder/decoder/RD.

Some implementation notes (these probably need careful review):
- token range is extended by 1 bit, since the value range out of this
  transform is [-16384,16383].
- the coefficients coming out of the FDCT are manually scaled back by
  1 bit, or else they won't fit in int16_t (they are 17 bits). Because
  of this, the RD error scoring does not right-shift the MSE score by
  two (unlike for 4x4/8x8/16x16).
- to compensate for this loss in precision, the quantizer is halved
  also. This is currently a little hacky.
- FDCT and IDCT is double-only right now. Needs a fixed-point impl.
- There are no default probabilities for the 32x32 transform yet; I'm
  simply using the 16x16 luma ones. A future commit will add newly
  generated probabilities for all transforms.
- No ADST version. I don't think we'll add one for this level; if an
  ADST is desired, transform-size selection can scale back to 16x16
  or lower, and use an ADST at that level.

Additional notes specific to Debargha's DWT/DCT hybrid:
- coefficient scale is different for the top/left 16x16 (DCT-over-DWT)
  block than for the rest (DWT pixel differences) of the block. Therefore,
  RD error scoring isn't easily scalable between coefficient and pixel
  domain. Thus, unfortunately, we need to compute the RD distortion in
  the pixel domain until we figure out how to scale these appropriately.

Change-Id: I00386f20f35d7fabb19aba94c8162f8aee64ef2b
2012-12-07 14:45:05 -08:00
Johann
1009f76566 Use 'vpx_scale' consistently
Change-Id: I178352813d2b8702d081caf405de9dbad9af2cc3
2012-12-05 16:05:44 -08:00
Paul Wilkins
7405040142 Merge "Change to MV reference search." into experimental 2012-12-05 09:14:46 -08:00
Johann
52d350febf Begin to refactor vpx_scale usage in VP9
Only declare the functions in vpx_scale RTCD and include the relevant
header.

Remove unused files and functions in vpx_scale to avoid wasting time
renaming. vpx_scale/win32/scaleopt.c contains functions which have not
been called in a long time but are potentially optimized.

The 'vp8' functions have not been renamed yet. That is for after the
cleanup.

Change-Id: I2c325a101d60fa9d27e7dfcd5b52a864b4a1e09c
2012-12-05 08:59:40 -08:00
Johann
a905672906 Remove ARM optimizations from VP9
Change-Id: I9f0ae635fb9a95c4aa1529c177ccb07e2b76970b
2012-12-05 08:59:25 -08:00
John Koleszar
5d91a1e0ae Merge remote-tracking branch 'origin/vp9-preview' into experimental 2012-12-05 08:41:35 -08:00
Paul Wilkins
4cc657ec6e Change to MV reference search.
This patch reduces the cpu cost of the MV ref
search by only allowing insert for candidates
that would be in the current top 4.

This could alter the outcome and slightly favors
near candidates which are tested first but also
limits the worst case loop count to 4 and means in
many cases it will drop out and not happen.

Change-Id: Idd795a825f9fd681f30f4fcd550c34c38939e113
2012-12-05 14:03:45 +00:00
Johann
d138262ac0 Merge "Begin to refactor vpx_scale usage in VP9" into experimental 2012-12-04 15:23:42 -08:00
Johann
57e72208b3 Merge "Remove ARM optimizations from VP9" into experimental 2012-12-03 13:54:38 -08:00
Johann
c6bd29e2f5 Begin to refactor vpx_scale usage in VP9
Only declare the functions in vpx_scale RTCD and include the relevant
header.

Remove unused files and functions in vpx_scale to avoid wasting time
renaming. vpx_scale/win32/scaleopt.c contains functions which have not
been called in a long time but are potentially optimized.

The 'vp8' functions have not been renamed yet. That is for after the
cleanup.

Change-Id: I2c325a101d60fa9d27e7dfcd5b52a864b4a1e09c
2012-12-03 12:51:56 -08:00
Johann
34591b54dd Remove ARM optimizations from VP9
Change-Id: I9f0ae635fb9a95c4aa1529c177ccb07e2b76970b
2012-12-03 12:50:15 -08:00
Jim Bankoski
b95338c7ab Merge "fixes --disable-vp9-encoder" into vp9-preview 2012-12-03 12:41:31 -08:00
Jim Bankoski
d9038b3c60 fixes --disable-vp9-encoder
Change-Id: I467bf0fdf3b35326bcce58d5459e6d2dbfd6c5e5
2012-12-03 12:21:16 -08:00
Deb Mukherjee
8b92f1e023 Supports inter-intra prediction with superblocks
Adds support for compound inter-intra prediction with superblocks.
Also, fixes a bug that disabled intra modes for superblocks.

Change-Id: I4d711317e1bc19df8c2f32dc645429f7fff31036
2012-12-01 15:19:55 -08:00
Deb Mukherjee
6632330702 Adds switchable filters with superblocks
Allows switchbale filters to be used without mismatch when the
superblock experiment is on.

Also removes a spurious clamping code in decodemv.c which causes
rare encode/decode mismatches.

Change-Id: I809d9ee0b2859552b613500b539a615515b863ae
2012-11-30 09:37:08 -08:00
Jim Bankoski
9f9370425b warnings in various experiments
Change-Id: Ib5106d4772450f8026f823dd743f162ab833b1d6
2012-11-30 07:31:37 -08:00
Jim Bankoski
2b8dc065d1 google style guide include guards
Change-Id: I2c252f3ddcc99e96c1f5d3dab8bcb25a2a3637ea
2012-11-30 07:30:59 -08:00
Yunqing Wang
eebc0b49f1 Merge "Further improve macroblock loop filters" into experimental 2012-11-29 16:07:14 -08:00
Jim Bankoski
245fba74b7 signed mismatch mvrefcount
Change-Id: Ie34820c1b6eaba9cf9316415a46f48af79c41646
2012-11-29 08:13:18 -08:00
Jim Bankoski
030e268a90 ihtllm moves to rtcd
clears up some warnings

Change-Id: I9899637497c6ad7519f098e055ab98580ae6d688
2012-11-29 07:19:38 -08:00
Jim Bankoski
e69b5258fd fix vp9_vp8 files renamed
Change-Id: I20c426e91ee49666db42e20eb074095ab6b8ec5d
2012-11-29 06:53:08 -08:00
Jim Bankoski
13dbf1fb17 more rtcd cleanup
Change-Id: Ieefd76e164ca4aa87597da0412977614ddfbacb7
2012-11-28 17:27:15 -08:00
Deb Mukherjee
0de214260b Merge "Fixing 8x8/4x4 ADST for intra modes with tx select" into experimental 2012-11-28 16:59:17 -08:00
Deb Mukherjee
0742b1e4ae Fixing 8x8/4x4 ADST for intra modes with tx select
This patch allows use of 8x8 and 4x4 ADST correctly for Intra
16x16 modes and Intra 8x8 modes when the block size selected
is smaller than the prediction mode. Also includes some cleanups
and refactoring.

Rebase.

Change-Id: Ie3257bdf07bdb9c6e9476915e3a80183c8fa005a
2012-11-28 16:21:12 -08:00
Yaowu Xu
b2f27d909a Merge "remove the vp9_default_mode_contexts_a" into experimental 2012-11-28 13:56:42 -08:00
Yaowu Xu
1cc5739669 remove the vp9_default_mode_contexts_a
Given the way mode_context is updated, the benefit of an additional
default is not signficant.

Change-Id: I67489453e8781340b18e26a1cc2f04e9221004a2
2012-11-28 11:14:30 -08:00
Jim Bankoski
c67873989f fixed includes to be fully specified
Change-Id: Ia1cce221f8511561b9cbd8edb7726fbc286ff243
2012-11-28 10:53:17 -08:00
Jim Bankoski
926d95cd84 Merge "remove postproc invokes" into experimental 2012-11-28 10:30:42 -08:00
John Koleszar
00e2c6bf7a Merge "Clamp decoded feature data" into experimental 2012-11-28 10:08:37 -08:00
Jim Bankoski
85cba19e16 remove postproc invokes
and some miscellaneous invoke left overs

Change-Id: I63191b1bfd3bea4ce30cceaeb686ec850570fc43
2012-11-28 10:00:25 -08:00
Yunqing Wang
d202138621 Further improve macroblock loop filters
This change included:
1. Aligned reads in vp9_mbloop_filter_vertical_edge function.
Since we actually read 16 bytes, we can align the reads to read
starting at (s - 8) instead of (s - 5).
2. Combined u, v loop filters.
3. Added 8x16 transpose.

This gave 2% decoder performance gain (tulip clip).

Change-Id: Ib14c2f1645c4a3436df17fe2f24789506bf0bb58
2012-11-28 09:27:07 -08:00
Yaowu Xu
12da793d00 removed redundant mode_context data structures
This commit removed a couple of redundant data structures in frame
coding contextsm, mode_context and mode_context_a, and changed to
use vp9_mode_contexts only. The switch of the context for different
frame type now relies on the switch of frame coding context between
lfc and lfc_a. This commit also removed a number of memcpy among
these redundant data structure.

Change-Id: I42e8174bd60f466b0860afc44c1263896471b0f3
2012-11-28 09:24:30 -08:00
John Koleszar
a1f15814be Clamp decoded feature data
Not all segment feature data elements are full-range powers of two, so
there are values that can be encoded that are invalid. Add a new function
to clamp values to the maximum allowed.

Change-Id: Ie47cb80ef2d54292e6b8db9f699c57214a915bc4
2012-11-27 16:38:31 -08:00
John Koleszar
fcccbcbb39 Add vp9_ prefix to all vp9 files
Support for gyp which doesn't support multiple objects in the same
static library having the same basename.

Change-Id: Ib947eefbaf68f8b177a796d23f875ccdfa6bc9dc
2012-11-27 14:12:30 -08:00
Yunqing Wang
e7cd80718b Improve sad3x16 SSE2 function
Vp9_sad3x16_sse2() is heavily called in decoder, in which the
unaligned reads consume lots of cpu cycles. When CONFIG_SUBPELREFMV
is off, the unaligned offset is 1. In this situation,
we can adjust the src_ptr to be 4-byte aligned, and then do the
aligned reads. This reduced the reading time significantly. Tests
on 1080p clip showed over 2% decoder performance gain with
CONFIG_SUBPELREFM off.

Change-Id: I953afe3ac5406107933ef49d0b695eafba9a6507
2012-11-26 09:53:50 -08:00
Jim Bankoski
510557e2eb removed the idct rtcd idct calls
More cleanup to do after this,  but this is a good chunk of removing rtcd.

Change-Id: I551db75e341a0a85c3ad650df1e9a60dc305681a
2012-11-24 19:33:58 -08:00
Jim Bankoski
3338af4109 remove subpixel invoke functions
Removed the rtcd subpixel invoke functions.

Change-Id: I8b7618bd5813333fac66b2817bdf807616e0fb33
2012-11-21 09:16:30 -08:00
Jim Bankoski
4ad2f08c72 Merge "clean out some of the rtcd code." into experimental 2012-11-21 06:41:37 -08:00
John Koleszar
414f68d266 Merge "Pack invisible frames without lengths" into experimental 2012-11-20 17:22:50 -08:00
Yunqing Wang
bbe5e032a4 Fix ref_stride in sad function
Used ref_stride.

Change-Id: I31f0a3bb935520f54d11a1d87315627f162ae845
2012-11-20 10:01:20 -08:00
Jim Bankoski
f4871b6a3f clean out some of the rtcd code.
This removes functions that are no longer needed and cleans up some warnings.

Change-Id: I292a4c3694e9c1d68ce99cea390905b198434719
2012-11-18 12:33:18 -08:00
Jim Bankoski
cb98b83239 removal of temporal invoke
Change-Id: I18ca713b02a5241bdb20dddcde0216467b55b596
2012-11-17 06:11:01 -08:00
Yunqing Wang
0eb5590425 Merge "Add const before the dequant(dq)" into experimental 2012-11-16 12:35:17 -08:00
Yunqing Wang
4c7c15ee69 Merge "Optimize 8x8 dequant and idct" into experimental 2012-11-16 12:23:06 -08:00
Yunqing Wang
47d9d48fa4 Add const before the dequant(dq)
Modified code to use const before dq.

Change-Id: I6fa59c2ed9743ded33ad08df70e15c2fe1ae7b99
2012-11-16 12:13:13 -08:00
Ronald S. Bultje
5b11052ac1 Support 32x32 intra modes in non-keyframe superblocks.
Change-Id: Icf8ad313c543462e523bff89690e5daa8d49bcc0
2012-11-16 09:54:43 -08:00
Paul Wilkins
a57dbd957b Further experimentation with the mode context
Experiments with a larger set of contexts and some
clean up to replace magic numbers regarding the
number of contexts.

The starting values and rate of backwards adaption
are still suspect and based on a small set of tests.
Added forwards adjustment of probabilities.

The net result of adding the new context and forward
update is small compared to the old context from the
legacy find_near function.  (down a little on derf but
up by a similar amount for HD)

HOWEVER.... with the new context and forward update
the impact of disabling the reverse update (which may be
necessary in some use cases to facilitate parallel decoding)
is hugely reduced.

For the old context without forward update, the impact of
turning off reverse update (Experiment was with SB off) was
Derf - 0.9, Yt -1.89, ythd -2.75 and sthd -8.35. The impact was
mainly at low data rates.

With the new context and forward update enabled the impact
for all the test sets was no more than 0.5-1% (again most at
the low end).

Change-Id: Ic751b414c8ce7f7f3ebc6f19a741d774d2b4b556
2012-11-16 16:58:00 +00:00
Deb Mukherjee
cb2d06ceac Merge "Compound inter-intra experiment" into experimental 2012-11-16 08:30:34 -08:00
Yaowu Xu
170305dcd3 Merge "changed mv candidate search for superblocks" into experimental 2012-11-16 07:21:55 -08:00
Yaowu Xu
415e6bff4d changed mv candidate search for superblocks
added additional motion vectors at close neighborhood of a superblock
to the list of candiate motion vectors, and removed a couple that are
further away.

The change helped std-hd set about .8% (all metrics) and smaller gain
for derf set.

Change-Id: Iaa69b98614db43420ed3fd4738d0ca5587b90045
2012-11-16 07:01:13 -08:00
Deb Mukherjee
0c917fc975 Compound inter-intra experiment
A patch on compound inter-intra prediction.

In compound inter-intra prediction, a new predictor for
16x16 inter coded MBs are obtained by combining a single
inter predictor with a 16x16 intra predictor, in a manner
that the weight varies with distance from the top/left
boundary. The current search strategy is to combine the best
inter mode with the best intra mode obtained independently.

Results so far:

derf +0.31%
yt +0.32%
std-hd +0.35%
hd +0.42%

It is conceivable that the results would improve somewhat
with a more thorough search strategy where all intra modes
are searched given the best mv, or even a joint search for
the best mv and the best intra mode.

Change-Id: I7951f1ed0d6eb31ca32ac24d120f1585bcd8d79b
2012-11-16 06:56:29 -08:00
Yaowu Xu
1c56946ec1 Merge "subpelrefmv for superblocks" into experimental 2012-11-16 05:49:32 -08:00
John Koleszar
64bcffc1ec Pack invisible frames without lengths
Modify the decoder to return the ending position of the bool decoder and
use that as the starting position for the next frame.

The constant-space algorithm for parsing the appended frame lengths is
O(n^2), which is a potential DoS concern if n is unbounded. Revisit
the appended lengths for use as partition lengths when multipartition
support is added.

In addition, this allows decoding of raw streams outside of a container
without additional framing information, though it's insufficient to
be able to remux said stream into a container.

Change-Id: I71e801a9c3e37abe559a56a597635b0cbae1934b
2012-11-15 15:48:07 -08:00
Yaowu Xu
61416aedc2 subpelrefmv for superblocks
duplicate code clean-up and variable name corrections

Change-Id: Ibc4703228e652ec425125de5e7bc038fa46595c5
2012-11-15 13:46:52 -08:00
John Koleszar
a9c7597adc support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-15 10:46:17 -08:00
John Koleszar
6becad426c detokenize: use SEG_LVL_EOB feature consistently
Update decode_coefs() to break when c >= eob, since it's possible that
c starts the loop from 1 and eob is 0. The loop won't terminate in that
case.

Add new get_eob() function to consistently clamp the eob based on the
segment level EOB and the block size. It's possible to code a segment
level EOB that's greater than the block size, and that leads to an
out of bounds access.

Change-Id: I859563b30414615cf1b30dcc2aef8a1de358c42d
2012-11-15 11:44:29 +00:00
pascal massimino
5a955973d9 Merge changes I63348ae3,I658ea409 into experimental
* changes:
  Segment mode coding bug.
  Silenced a few warnings.
2012-11-15 00:24:57 -08:00
Ronald S. Bultje
127836d11f Merge "Don't use hybrid transform (ADST) for superblocks." into experimental 2012-11-14 09:18:34 -08:00
Ronald S. Bultje
1e3dd49fe3 Don't use hybrid transform (ADST) for superblocks.
This is in line with other cases where we disable ADST if prediction
size and transform size don't match. Before this patch, the RD loop
will use ADST for superblocks, but frame encoding/decoding won't.

Change-Id: I700368c632eb72b5e089c22ef25649d99d7697d0
2012-11-14 08:58:24 -08:00
Paul Wilkins
b527c4dbb7 Segment mode coding bug.
There are now more than 16 possible modes so 5
bits required for segment mode feature.

Note that it is likely that the mode feature and how it is
coded will change but for now the 4 bits was a bug.

Change-Id: I63348ae3a9cc31566a656c2dc78f09f5e1a9dcc9
2012-11-14 14:38:03 +00:00
Paul Wilkins
19a1ba1e91 Silenced a few warnings.
Silenced a few VS compiler warnings.

Change-Id: I658ea409c36c05cd11042675e2e42ccde0ef2420
2012-11-14 14:27:37 +00:00
Yaowu Xu
3fa1348d5f fix a few typos
Change-Id: I7b6f27826052eb706fc6080d4e3a940dff7d3a58
2012-11-13 14:45:53 -08:00
Ronald S. Bultje
1761a6b55a Merge "Use full 32-pixel edge for superblock bestrefmv motion vector ordering." into experimental 2012-11-13 14:12:58 -08:00
Ronald S. Bultje
b147c64c16 Merge "Fix edge MV handling in SBs." into experimental 2012-11-13 14:12:48 -08:00
Deb Mukherjee
7de64f35d3 A fix in MV_REF experiment
This fix ensures that the forward prob update is not turned off for
motion vectors.

Change-Id: I0b63c9401155926763c6294df6cca68b32bac340
2012-11-13 08:27:04 -08:00
Yunqing Wang
e60478d46d Optimize 8x8 dequant and idct
Similar to 16x16 dequant and idct, based on the value of eobs, the
8x8 dequant and idct calculation was simplified to improve decorder
performance.

Combined vp9_dequant_idct_add_8x8 and vp9_dequant_dc_idct_add_8x8
to eliminate duplicate code.

Change-Id: Ia58e50ab27f7012b7379c495837c9c0b5ba9cf7f
2012-11-12 17:41:53 -08:00
Ronald S. Bultje
c79ae1713c Use full 32-pixel edge for superblock bestrefmv motion vector ordering.
Change-Id: I417e39867c020a17d85370972446a8ce2bbe9a6d
2012-11-12 17:06:56 -08:00
Ronald S. Bultje
722972454c Fix edge MV handling in SBs.
Change-Id: Ia1eddb108ec463835e9de8769572d698e21bca49
2012-11-12 17:06:52 -08:00
Paul Wilkins
2669f42b0d New inter mode context
This change is a fix / extension of the newbestrefmv
experiment. As such it is presented without IFDEF.

The change creates a new context for coding inter modes
in vp9_find_mv_refs(). This replaces the context that
was previously calculated in vp9_find_near_mvs().
The new context is unoptimized and not necessarily
any better at this stage (results pending), but eliminates
the need for a legacy call to vp9_find_near_mvs().
Based on numbers from Scott, this could help decode
speed by several %.

In a later patch I will add support for forward update of
context (assuming this helps) and refine the context as
necessary.

Change-Id: I1cd991b82c8df86cc02237a34185e6d67510698a
2012-11-12 15:50:02 +00:00
Paul Wilkins
6fb8953c19 Restrict ref mv search range.
Experiment to test speed trade off of reducing the
extent of the ref mv search.

Reducing the maximum number of tested candidates to 9 had
minimal net effect on quality in any of the tests sets.

Reduction to 7 has a small negative impact (worst was STD-HD
at about -0.2%).

This change is in response to the apparently high number of
decode cycles reported in regard to mv-ref selection.

Change-Id: I0e92e92e324337689358495a1ec9ccdeb23dc774
2012-11-12 11:31:12 +00:00
Deb Mukherjee
d01357bbad New b-intra mode where direction is contextual
Preliminary patch on a new 4x4 intra mode B_CONTEXT_PRED where the
dominant direction from the context is used to encode. Various decoder
changes are needed to support decoding of B_CONTEXT_PRED in conjunction
with hybrid transforms since the scan order and tokenization depends on
the actual direction of prediction obtained from the context. Currently
the traditional directional modes are used in conjunction with the
B_CONTEXT_PRED, which also seems to provide the best results.

The gains are small - in the 0.1% range.

Change-Id: I5a7ea80b5218f42a9c0dfb42d3f79a68c7f0cdc2
2012-11-10 07:12:30 -08:00
Yunqing Wang
71b1885403 Merge "Optimize 16x16 dequant and idct" into experimental 2012-11-09 08:30:53 -08:00
Yunqing Wang
6c17c9fae0 Optimize 16x16 dequant and idct
As suggested by Yaowu, simplified 16x16 dequant and idct. In decoder,
after detoken step, we know the number of non-zero dct coefficients
(eobs) in a macroblock. Idct calculation can be skipped or simplified
based on eobs, which improves the decoder performance.

Change-Id: I9ffa1cb134bcb5a7d64fcf90c81871a96d1b4018
2012-11-07 20:04:09 -08:00
John Koleszar
8959c8b11d Merge with upstream experimental changes (2)
Include upstream changes (variance fixes) into the merged code base.

Change-Id: I4182654c1411c1b15cd23235d3822702613abce1
2012-11-07 14:32:26 -08:00
James Zern
5338d983d6 Merge "Fix variance (signed integer) overflow" into experimental 2012-11-07 12:49:36 -08:00
John Koleszar
2c08c28191 Merge with upstream experimental changes
Include upstream changes (unit test fixes, in particular) into the
merged code base.

Change-Id: I096f8a9d09e2532fbec0c95d7a995ab22fa54b29
2012-11-07 11:46:23 -08:00
John Koleszar
7b8dfcb5a2 Rough merge of master into experimental
Creates a merge between the master and experimental branches. Fixes a
number of conflicts in the build system to allow *either* VP8 or VP9
to be built. Specifically either:

  $ configure --disable-vp9 $ configure --disable-vp8
  --disable-unit-tests

VP9 still exports its symbols and files as VP8, so that will be
resolved in the next commit.

Unit tests are broken in VP9, but this isn't a new issue. They are
fixed upstream on origin/experimental as of this writing, but rebasing
this merge proved difficult, so will tackle that in a second merge
commit.

Change-Id: I2b7d852c18efd58d1ebc621b8041fe0260442c21
2012-11-07 11:30:16 -08:00
Yaowu Xu
0cedaa3631 merge full pixel refmv experiment
Change-Id: Ib39ad47a7d188f3b45416937b7eeb28c3e79b74c
2012-11-07 10:52:45 -08:00
James Zern
984734436d Fix variance (signed integer) overflow
In the variance calculations the difference is summed and later squared.
When the sum exceeds sqrt(2^31) the value is treated as a negative when
it is shifted which gives incorrect results.

To fix this we force the multiplication to be unsigned.

The alternative fix is to shift sum down by 4 before multiplying.
However that will reduce precision.

For 16x16 blocks the maximum sum is 65280 and sqrt(2^31) is 46340 (and
change).

This change is based on:
1698234 Missed some variance casts
fea3556 Fix variance overflow

Change-Id: I2c61856cca9db54b9b81de83b4505ea81a050a0f
2012-11-06 23:06:44 -08:00
Yaowu Xu
a879b4e6d4 fixed function prototype
so they are consistent with actual definitions of the functions

Change-Id: Ie4b4e81b3da3e288fc2edbbd2b393a5c54d2556b
2012-11-06 15:55:11 -08:00
Yaowu Xu
acadcec5c5 group refmv experiment related functions
Change-Id: Iedaa108ddb65f54d768424f9c47ad4d069b656fd
2012-11-06 15:54:47 -08:00
James Zern
182f99f0c6 Merge "fix test builds" into experimental 2012-11-06 12:18:01 -08:00
James Zern
2e3e685799 fix test builds
s/([vV][pP])8/$19/
additionally dct.h was removed; declare the _c functions that are used
in the tests. the TODO for conversion to parameterized tests still
remains.

Change-Id: I73db9425a57075bbb78a92693ba6b320578981cd
2012-11-06 12:12:58 -08:00
Yunqing Wang
4626faf1e7 Convert 16x16 dct/idct to integer forms
Converted vp9_short_fdct16x16_c and vp9_short_idct16x16_c to
integer versions.

Change-Id: Ie3ec985a890ac0f4f4f5818e6f0122e00c8af69f
2012-11-06 11:25:25 -08:00
Yaowu Xu
55f2f14f10 Merge "silent a lot of MSVC compiler warnings" into experimental 2012-11-06 09:39:47 -08:00
Yaowu Xu
8a336b0d0d silent a lot of MSVC compiler warnings
there are still a couple type of warning left, which are related to
double constants assigned to float type. As those would be addressed
by the conversion of transforms into integer version. This commit
has left those un-dealt with.

Change-Id: I48fd9b489c0c27ad6b543f4177423419f929f2bb
2012-11-06 09:09:25 -08:00
Jim Bankoski
7849aa20ed remove invoke_search macro
Removed invoke search from encoder

Change-Id: I3d809b795abe6df0e71366edfe94026aaede14fb
2012-11-05 16:58:03 -08:00
James Zern
ee38c4184b loopfilter: prevent signed integer overflow
use unsigned ints to extended filter values in
vp9_mbloop_filter_horizontal_edge_c_sse2

Change-Id: I55ec3ac2bcb9baf55626b0384d151b07fc8e087d
2012-11-03 09:45:21 -07:00
Yunqing Wang
28826a913c Merge "Fix eobs data type" into experimental 2012-11-02 16:00:56 -07:00
Yunqing Wang
d41b0e6498 Fix eobs data type
The block sizes for decoding tokens are up to 16x16, which means
eobs is within [0, 256]. Using (signed) char is not enough. Changed
eobs data type to unsigned short to fix the problem.

Change-Id: I88a7d3098e1f1604c336d6adb88ffec971fb03a6
2012-11-02 13:22:29 -07:00
Ronald S. Bultje
3c4f47e843 Place non-static function prototypes in a header file.
Change-Id: I7cd21b9f1e69f4e0b3338bfe27b3c67e4b47de58
2012-11-02 11:22:57 -07:00
John Koleszar
06f3e51da6 vpx_scale: sync from master
Update vpx_scale from current code in master, run style transform, fix
lint warnings.

Change-Id: I47eadeb5b6881d448ea3728537f9b8a5b5aac78e
2012-11-02 08:44:54 -07:00
Ronald S. Bultje
4b2c2b9aa4 Rename vp8/ codec directory to vp9/.
Change-Id: Ic084c475844b24092a433ab88138cf58af3abbe4
2012-11-01 16:31:22 -07:00