Commit Graph

71 Commits

Author SHA1 Message Date
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
Deb Mukherjee
d7489ea45e Merge "Minor refactoring of superblock decoding" into experimental 2012-11-29 15:33:42 -08:00
Deb Mukherjee
be08b5af1a Minor refactoring of superblock decoding
Refactoring for improved readability - no bitstream or
performance change.

Change-Id: I4488ed4715f8dbe38c66431106478669041b8b33
2012-11-29 15:26:56 -08:00
Jim Bankoski
51e770deb1 fix implicit warnings idct etc
Change-Id: I54a122cc8c0b6ed2dbc3c6ecfcd44736cd40b687
2012-11-29 11:23:02 -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
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
030e268a90 ihtllm moves to rtcd
clears up some warnings

Change-Id: I9899637497c6ad7519f098e055ab98580ae6d688
2012-11-29 07:19:38 -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
John Koleszar
00e2c6bf7a Merge "Clamp decoded feature data" into experimental 2012-11-28 10:08:37 -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
Jim Bankoski
f42e41f2ef Merge "removed the idct rtcd idct calls" into experimental 2012-11-24 21:38:36 -08:00
Ronald S. Bultje
25b609b62b Move switch(tx_size) around txsize to detokenize.c.
Add a new function vp9_decode_mb_tokens() that handles the switch
between different per-tx-size detokenize functions. Make actual
implementations (vp9_decode_mb_tokens_NxN()) static.

Change-Id: I9e0c4ef410bfa90128a02b472c079a955776816d
2012-11-24 21:22:42 -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
Ronald S. Bultje
9970d8b662 Restructure vp9_decode_mb_tokens_8x8() a bit.
Don't declare variables if they only ever have a single value and are
used only as argument to another function call; instead, just hardcode
the value in the function call directly. Split out UV and Y coefficient
loops for clarity. Use xd->block[].qcoeff instead of xd->qcoeff + magic
to remove use of magic offset variables.

Change-Id: I5b17eda1bb666c69c2b7ea957d5525cd78192e33
2012-11-23 09:43:13 -08:00
Ronald S. Bultje
f090b6b47b Restructure vp9_decode_mb_tokens_16x16() a bit.
Don't declare variables if they only ever have a single value and are
used only as argument to another function call; instead, just hardcode
the value in the function call directly. Also remove unneeded brackets
around a code block, and remove the magic offsets 64 and 256 for chroma
values in the coefficient memory block.

Change-Id: I14fc14120a81ea1d6fb862674e8bf8cf6ba3d114
2012-11-23 09:11:12 -08:00
Ronald S. Bultje
0312c3d6d9 Make get_eob() function static.
Change-Id: Idde3ab97960eda7022367c1f91a873a479bc9d7b
2012-11-23 08:17:06 -08:00
Ronald S. Bultje
4422847143 Rename "block_type" function argument to "txfm_size".
Also fix the type (TX_SIZE instead of int).

Change-Id: Ib9b3f33835e58a6e758ed5f37bb64543e62b6a86
2012-11-23 08:15:00 -08:00
Ronald S. Bultje
a5e542e74b Fix enc/dec mismatch with b_context_pred experiment enabled.
Change-Id: I1272ae3f0fdfb7ed8eb364ef0c6dd1818d3179d7
2012-11-21 12:39:55 -08:00
John Koleszar
414f68d266 Merge "Pack invisible frames without lengths" into experimental 2012-11-20 17:22:50 -08:00
Ronald S. Bultje
5d7cb59035 Assign above/left context in decode_coefs() instead of in caller.
this prevents duplicating the same line of code in each caller of
decode_coefs().

Change-Id: Id7996ad394828bf77ef3d5e03002f577c9f79609
2012-11-17 11:22:38 -08:00
Ronald S. Bultje
3bdf302ce7 Remove unused argument from decode_coefs() function prototype.
Change-Id: I8d2539ba1046012c948520ac23a1f1978be921c5
2012-11-17 11:11:06 -08:00
Ronald S. Bultje
a253b3791b Remove coef_bands_x[] array and related machinery in decode_coefs().
Change-Id: I0a36d1efb3bb81a54005b10316550ec67100559e
2012-11-17 11:07:23 -08:00
Ronald S. Bultje
511ef2072c Inline count_tokens() in decode_coefs().
This prevents the relatively expensive token-from-coefficient lookup
function get_token(), plus a duplicate loop..

Change-Id: Ibecd407b2a91d3593d439ec4646e43fa26d2ff91
2012-11-17 10:35:47 -08:00
Ronald S. Bultje
56352f189d Merge various count_token() functions into a single one.
Change-Id: I1970f43e2cb5f7d9744c7249099eed226f16f162
2012-11-17 10:18:41 -08:00
Ronald S. Bultje
166d24d07e Remove unused function count_tokens() in detokenize.c.
Change-Id: I178f250b1a4d41d5a9c1619091f5ae51cebffb10
2012-11-17 07:45:46 -08:00
Ronald S. Bultje
f19a1cafed Remove special-case inline detokenization in b_pred reconstruction.
Just like for all other block modes, b_pred tokens can be read together
before starting macroblock reconstruction. This removes special cases
for b_pred in decode_macroblock() and allows to make decode_coefs_4x4()
static in detokenize.c.

While at it, remove the redundant handling and checking of plane_type
and block_index (i) in decode_coefs_4x4(). Since the function is static,
and is called only from decode_mb_tokens_4x4(), we don't need to worry
that the arguments ever go out of sync.

Change-Id: I2d415da0b51b89d0490a6b9e24cc86363c2090f7
2012-11-16 22:26:12 -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
John Koleszar
6bca6decbf Merge "Don't write recon.yuv by default" into experimental 2012-11-16 08:41:40 -08: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
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
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