Commit Graph

163 Commits

Author SHA1 Message Date
Deb Mukherjee
14a38a8735 A bug fix related to switchable filters
The switchable count update was mistakenly inside a macro.

Change-Id: Iec04c52ad57034b88312dbaf05eee1f47ce265b3
2012-12-10 12:10: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
Jim Bankoski
26a4918282 Merge "Fix meaninglesss if." into vp9-preview 2012-12-07 17:15:52 -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
1c0ee77589 Fix meaninglesss if.
Change-Id: I0cb06d77805246fe39d39ad3bc5df3c3f52c7050
2012-12-07 15:44:39 -08:00
Frank Galligan
8d449ce0a9 Remove unused symbols from vp9 asm offsets C files.
Change-Id: I366e6d175da3012f1c8607fd7fad99fbbb616091
2012-12-07 15:38:40 -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
John Koleszar
4a4d2aa55c vp9_bilinear_filters_mmx: add missing extern specifiers
Change-Id: Ibabf18947f90cb4f45052763ebf44cfb8209bd8b
2012-12-05 08:27:48 -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
Frank Galligan
48556db7b2 Merge "vp9: Fix assert check." into vp9-preview 2012-12-03 17:29:46 -08:00
Yaowu Xu
806d05e1a8 merged optimiz_b_16x16() into optmize_b()
The commit changed the trellis quantization function optimize_b() to
work for MBs using all transform sizes, and eliminated the function
for MB using 16x16 transform only, optimize_b_16x16.

Change-Id: I3fa650587ab5198ed16315b38754783a72b33ba2
2012-12-03 14:53:45 -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
Frank Galligan
0d687ed22b vp9: Fix assert check.
Change-Id: If0cc1ab60dff6abd67dae7c7b3dc83a1afd7fe65
2012-12-03 12:18:59 -08:00
Frank Galligan
3e0ea7f6e1 vp9: Remove superfluous command.
- vpx_calloc is called on arf_not_zz above.
- Note The removed vpx_memset call had an issue with sizeof.

Change-Id: I86fd7a167d0a042e581e613e2a6c0b5e63073fc6
2012-12-03 10:26:15 -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
Jim Bankoski
d0a20fd22c last remaining warning
Change-Id: I1f49d96cdb5e342041c9a72ef31df361a1b609eb
2012-11-29 14:07:21 -08:00
Jim Bankoski
ef3c01ed67 Additional warning message cleanup.
Change-Id: I429a97ac57db3de0bf67ce3f3fe0c6b409f77a9e
2012-11-29 10:10:51 -08:00
Yaowu Xu
ff2f9de828 Merge changes Iaa67bcf1,Ibea3bc80 into experimental
* changes:
  more warning cleanup
  unused variables & warnings
2012-11-29 09:34:10 -08:00
Yaowu Xu
b3055ec020 Merge "more unused variables." into experimental 2012-11-29 09:33:59 -08:00
Yaowu Xu
8422ef772d Merge "unused variable" into experimental 2012-11-29 09:33:52 -08:00
Yaowu Xu
e007eb89cf Merge "unused var removed" into experimental 2012-11-29 09:33:41 -08:00
Yaowu Xu
6431007df3 Merge "minor fix to eob check for setting CONTEXT" into experimental 2012-11-29 09:27:00 -08:00
Yaowu Xu
7ab1d3e49f minor fix to eob check for setting CONTEXT
Previously, the "!=" check is logically incorrect when eob is at 0 and
effective coefficient starting position is 1. This commit should have
no effect on bitstream.

Change-Id: I6ce3a847c7e72bfbe4f7c74f88e3310c6b9b6d30
2012-11-29 09:10:15 -08:00
Jim Bankoski
00b27a3647 more warning cleanup
Change-Id: Iaa67bcf1e866dfe255c4e458d4e51e9c708ffcf4
2012-11-29 09:07:12 -08:00
Jim Bankoski
a802f5e783 unused variables & warnings
Change-Id: Ibea3bc80eb26a975faaa60268bbc93237f82bc57
2012-11-29 09:02:47 -08:00
Jim Bankoski
cf671e2756 more unused variables.
Change-Id: Ibe11e9275949b26a77fa9c8ac2e7c356ae533d5d
2012-11-29 08:54:59 -08:00
Jim Bankoski
6e02947e29 unused variable
Change-Id: I1302a6eaa840d419e8bb9ad0673e42ef139d3fee
2012-11-29 08:51:19 -08:00
Jim Bankoski
705220ee71 unused var removed
Change-Id: I9d0efdff0c79ea4bdd660098106b64776bdd4483
2012-11-29 08:50:20 -08:00
Jim Bankoski
245fba74b7 signed mismatch mvrefcount
Change-Id: Ie34820c1b6eaba9cf9316415a46f48af79c41646
2012-11-29 08:13:18 -08:00
Jim Bankoski
abd74ed594 warning error missing void
Change-Id: I914bcc669297d3414261486bf1bfb716c2ecc804
2012-11-29 07:47:50 -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
Yaowu Xu
3e976bba21 Localize Y2 entropy coding context
This commit makes sure Y2 entropy coding context is always updated on
every macroblock even there is no Y2 block.

Change-Id: Ie307cfc46526efe55613be39f9f178d2531b56ba
2012-11-28 09:27:36 -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
Paul Wilkins
fbc8e8f9ae Merge "Modified mv prediction." into experimental 2012-11-26 09:59:24 -08:00
Paul Wilkins
d22f3d9f42 Modified mv prediction.
Modified the  mv_pred() fuunction that chooses a centre
point from which to start step searches to use the top
candidate vectors chosen previously.

Some gains (mainly on HD and tested with SB off).
Std_hd 0.874%, YT-hd 0.174%, YT 0.05%, Derf 0.036%

Change-Id: Ie232284f561838b8ecee0e28dcbb07a9cd46cf56
2012-11-26 17:55:19 +00:00
Jim Bankoski
f42e41f2ef Merge "removed the idct rtcd idct calls" into experimental 2012-11-24 21:38:36 -08:00
Ronald S. Bultje
9dc7d4fb97 Fix crash in pick_inter_mode_sb().
It didn't handle rd_thresh == INT_MAX, which means the reference is
unavailable.

Change-Id: Ie6fa8b2577437411db81a8c24e8dcdfd856a0e8d
2012-11-24 21:20:32 -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
e25bd474ad fixed const problem
NEEDED FOR BUILD

Change-Id: I56a3e68f15dff480b34de048e30231ba821b1ee2
2012-11-21 06:46:25 -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
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
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
John Koleszar
a9c7597adc support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-15 10:46:17 -08: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
120690989b Merge "fix costing bug in pick_uv_sb_mode." into experimental 2012-11-14 17:05:46 -08:00
Ronald S. Bultje
d7290d4974 Merge "Merge a few mostly-duplicate code fragments in SB/MB encoding." into experimental 2012-11-14 17:05:40 -08:00
Ronald S. Bultje
a77df0c473 Merge "Prevent overflow in variance32x32." into experimental 2012-11-14 15:43:19 -08:00
Ronald S. Bultje
a653c9d286 fix costing bug in pick_uv_sb_mode.
Change-Id: Ia24e0fddcca9125f8e41e95dbb22444dc51767c7
2012-11-14 15:19:45 -08:00
Ronald S. Bultje
fa1b356e4e Merge a few mostly-duplicate code fragments in SB/MB encoding.
Change-Id: I8e12fbab7ec4732b6400ae3a6964749d818c90c9
2012-11-14 15:19:45 -08:00
Ronald S. Bultje
a099370370 Prevent overflow in variance32x32.
Change-Id: I478878c78ef8a770186622d987d318176827ef5f
2012-11-14 15:18:21 -08: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
John Koleszar
6d482706ef SEG_LVL_MODE: don't code ref_frame if it's implicit
If the SEG_LVL_MODE is an intra mode, then the reference frame must be
INTRA_FRAME.

Change-Id: I2cdeeac3780c077c74b39ce89a528bc280674231
2012-11-13 15:22:09 -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
Ronald S. Bultje
722972454c Fix edge MV handling in SBs.
Change-Id: Ia1eddb108ec463835e9de8769572d698e21bca49
2012-11-12 17:06:52 -08:00
Paul Wilkins
5d65614fdd Merge "New inter mode context" into experimental 2012-11-12 09:24:14 -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
Ronald S. Bultje
dd9d4f9e1a Fix data type for eobs[] array in SB 4x4 IDCT code.
This fixes encoder/decoder mismatches with the superblock experiment
turned on whenever a superblock is encoded using the 4x4 transform.

Change-Id: Iefec7055e8d25f8efdbba66c4261bbd322d335a3
2012-11-10 12:08:27 -08:00
Ronald S. Bultje
73987d140a Remove 'thismb' data pointer when superblock experiment is on.
This should prevent inconsistent results between identical encodes with
the superblock experiment turned on.

Change-Id: I41a005fae53f2eb59736cc70041185fb7d63cfca
2012-11-10 08:39:51 -08: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
Jim Bankoski
a186eb7f1b Merge "remove macros obfuscating mv costing" into experimental 2012-11-08 15:51:21 -08:00
Jim Bankoski
c72be96b0a remove macros obfuscating mv costing
cleanup

Change-Id: I565eee40d900e0441ad211b65ac829fc5b93d94a
2012-11-08 15:44:39 -08:00
Ronald S. Bultje
1d4fbeb32a Implement tx_select for superblock encoding.
Also split superblock handling code out of decode_macroblock() into
a new function decode_superblock(), for easier readability.

Derf +0.05%, HD +0.2%, STDHD +0.1%. We can likely get further gains
by allowing to select mb_skip_coeff for a subset of the complete SB
or something along those lines, because although this change allows
coding smaller transforms for bigger predictors, it increases the
overhead of coding EOBs to skip the parts where the residual is
near-zero, and thus the overall gain is not as high as we'd expect.

Change-Id: I552ce1286487267f504e3090b683e15515791efa
2012-11-08 11:03:00 -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