Commit Graph

194 Commits

Author SHA1 Message Date
Ronald S. Bultje
d115dbc24c Adjust style to match Google Coding Style a little more closely.
Most of these were picked up in the previous commit (prefix change from
vp8_ to vp9_), but I'm pushing this separately so that it's easier to
review.

Change-Id: I91e959895778b8632d7d33375523df8a7568a490
2012-10-30 22:07:13 -07:00
Ronald S. Bultje
f88558fb1d Change encoder vp8_ and vp8cx_ public symbol prefixes to vp9_.
Change-Id: Ie2e3652591b010ded10c216501ce24fd95d0aec5
2012-10-30 22:07:07 -07:00
Paul Wilkins
e05e6e107e Remove old experiment.
Delete code relating to featureupdates experiment.

Change-Id: If218762c658bb8cbb3007cf2069123b3e05adcbc
2012-10-30 17:36:09 +00:00
Ronald S. Bultje
b066bb4306 seg_common: give all exported symbols a vp9_ prefix.
Change-Id: Ie8ba934a757acec1c80ac37ab9307c9a2783254e
2012-10-29 22:15:27 -07:00
Ronald S. Bultje
d36cc98ee3 boolhuff/dboolhuff: give exported symbols a vp9_ prefix.
Change-Id: I2f1781c70b14bf1d7b6da75d1501718445552af0
2012-10-29 21:42:10 -07:00
Ronald S. Bultje
7f6f07035e segmentation: make local symbols static.
Change-Id: Ia30924dc095663b04794902522308d822c1a5ad0
2012-10-29 21:39:44 -07:00
Ronald S. Bultje
8ce9fb8d21 bitstream: give exported symbols a vp9_ prefix; make local symbols static.
Change-Id: I3aa5b515c1eae19ae40ba9808d133590c95f7d13
2012-10-29 21:25:22 -07:00
Ronald S. Bultje
7944b4f239 Fix superblock experiment.
Also merge some duplicate code related to the superblock experiment
in the RD loop.

Change-Id: Ic93f1d4d1ed81220fd7ecf6e65da2821a215b2de
2012-10-29 17:58:18 -07:00
Paul Wilkins
a99a2c3667 Name space clean up.
Preparation for project restructuring.
Added vp9_ prefix on some function names that have global scope.
Added static declaration on some that dont.

Change-Id: If072f78b4300e8c17cfeed82c5d17b59946dcc5e
2012-10-29 14:44:10 +00:00
Paul Wilkins
ba30e7746e Explicit MV reference experiment.
Coding and costing of mv reference signal.

Issues in updating MV ref with COMPANDED_MVREF_THRESH
to be resolved. Ideally the MV precision should be defined based
on absolute MV magnitude not as now the MV ref magnitude.

Update to mv counts moved into bitstream.c because otherwise
if the motion reference is changed at the last minute the encoder
and decoder get out of step in terms of the counts used to update
entropy probs.

Code working on a few test clips but no results yet re benefit vs
signaling cost and no tuning of red loop to test lower cost alternatives
based on the available reference values.

Patch 3. Added check to make sure we don't pick a reference
that would give rise to an uncodeable / out of range residual.

Patch 6-7: Attempt to rebase. OK to submit but best to leave flag off for now.

Patch 9. Remove print no longer needed.

Change-Id: I1938c2ffe41afe6d3cf6ccc0cb2c5d404809a712
2012-10-26 13:35:02 +01:00
John Koleszar
226e55c17d coef_probs: remove duplicate read/update code
Refactor per-transform copy & paste into a common function
update_coef_probs_common() and read_coef_probs_common(). The dry-run and
bit-writing loops in the encoder are still obvious candidates to be made
common, but they start to diverge a bit in the next commit, so are left
as-is for now.

Change-Id: I896bd3f4a073a6296eab7e92463fef79d8c6c08c
2012-10-24 09:41:04 -07:00
Deb Mukherjee
5373119713 Merging in the Switchable interp experiment
There is a macro DEFAULT_INTERP_FILTER defined in encoder/onyx_if.c that
is set as EIGHTTAP for now - so SWITCHABLE is not really used. Ideally,
this should be SWITCHABLE but that would make the encoder quite a bit slower.
We will change the default filter to SWITCHABLE once we find a faster way to
search for switchable filters.

Change-Id: Iee91832cdc07e6e14108d9b543130fdd12fc9874
2012-10-23 08:50:52 -07:00
Deb Mukherjee
04d62a989b Merging in the TX_SELECT experiment
Change-Id: I0d306b0062be59bc785b65882691c956c8b5e7c8
2012-10-22 16:58:57 -07:00
Deb Mukherjee
78808ad9fb Merge of the newmventropy experiment
Removes the old mv encoding code.

Change-Id: I1026d48cc5ac15ccb776f98463e929254c3dc7da
2012-10-22 15:23:41 -07:00
Ronald S. Bultje
97096f5fa3 Merge changes I02e7f64a,Ide954b00,Idc8b5977 into experimental
* changes:
  Fix another typo in 4x4-transform-for-i8x8-intra-pred coeff contexts.
  8x8 transform support in splitmv.
  Use SPLITMV_PARTITIONING instead of a plain integer type.
2012-10-22 12:54:39 -07:00
Deb Mukherjee
7906ed091a Merge "Merging the hybrid transform experiments" into experimental 2012-10-22 12:18:46 -07:00
Deb Mukherjee
f10465634b Merging the hybrid transform experiments
Change-Id: I99f1982b30a630a9a070a8326d83b34a33cba14c
2012-10-22 11:55:29 -07:00
Ronald S. Bultje
84ea002eb1 8x8 transform support in splitmv.
For splitmv, where partitioning is 8x16, 16x8 or 8x8, this patch
uses the 8x8 transform (instead of the 4x4) if txfm_mode is
ALLOW_8X8 or ALLOW_16X16. For TX_MODE_SELECT, splitmv can indicate
which of the 2 transform sizes (4x4 or 8x8) it wants to use.

Gains (with hybridtx4x4/8x8/16x16 and tx_select experiments
enabled) on derf: +0.9%, HD: +0.4%, STD/HD: +0.8% (SSIM or overall
PSNR, both metrics show similar improvements).

Change-Id: Ide954b000b415548ed92a7ac78e24f36e60fcf06
2012-10-22 11:49:00 -07:00
Ronald S. Bultje
ef50e48323 Invert SB probability.
It currently counts the probability that the branch is true, but it
should count the probability that the branch is false.

Change-Id: I963825da2e7a7ed3a613eb23ffd085e427dc36e5
2012-10-22 11:05:56 -07:00
John Koleszar
91dc8ce70d calculate probs consistently
There were several different methods for calculating bitstream
probabilities in use. Consolodate these into a pair of functions,
get_prob() and get_binary_prob().

Change-Id: I5534f517f74027fee16d89c9baefaafea8156b2f
2012-10-19 12:31:16 -07:00
John Koleszar
e9fd1eace1 Remove bc, bc2 from pbi,cpi,xd
Pass the bool coder to be used explicitly. This avoids cases where two
different bool coders can be addressed from the same function. Also be
more consistent with bool coder variable naming, start to standardize
on 'bc'.

Change-Id: I1c95e2fdbe24ebe8c0f84924daa1728e3b054a31
2012-10-19 12:31:15 -07:00
Deb Mukherjee
f3208f362b Some cleanups and fixes.
Separates the logic on transform type selection previously spread out
over a number of files into a separate function. Currently the tx_type
field in b_mode_info is not used, but still left in there to eventually
use for signaling the transform type in the bitstream.

Also, now for tx_type = DCT_DCT, the regular integer DCT is used, as
opposed to the floating point DCT used in conjuction with hybrid
transform.

Results change somewhat due to the transform change, but are within
reasonable limits. The hd/std-hd sets are slightly up, while derf/yt
are slightly down.

Change-Id: I5776840c2239ca2da31ca6cfd7fd1148dc5f9e0f
2012-10-19 06:58:15 -07:00
pascal massimino
07c03b3f23 Merge "cosmetic: fix '= & ' construct" into experimental 2012-10-17 15:17:21 -07:00
John Koleszar
cdd0ed1352 Merge "consolidate update_mb_segmentation_map data" into experimental 2012-10-17 15:15:59 -07:00
John Koleszar
3883dab0a2 cosmetic: fix '= & ' construct
remove useless space after address-of operator.

Change-Id: I1fb9e82e8d6cf87558fbd454fb5c0f87599ca2ab
2012-10-17 14:51:27 -07:00
John Koleszar
47a2154c0e Move remaining per-frame data into partition 0
This commit moves a bit of data that ended up packed with the
modes/mv/residual partition during the change to interleaved encoding
into partition 0 where it belongs.

Change-Id: Ic711a378c58d9d6a17254384f492c213a15bad92
2012-10-17 14:48:13 -07:00
John Koleszar
6ef5a00538 Interleave modes/residual per macroblock
Packs the bitstream with each mb's residual following its mode/mv
information.

TODO: There are still a few fields that should be packed into partition
0 but are included in partition 1, due to them being serialized from
write_kfmodes/pack_inter_mode_mvs, which execute after the first
partition is finalized. These need to be separated out into a separate
function, similar to mb_mode_mv_init() in decodemv.c.

Change-Id: I43a46c363601ab36954d07ebe498760e1e2e3af4
2012-10-17 13:19:41 -07:00
John Koleszar
17fd972aea consolidate update_mb_segmentation_map data
The update_mb_segmentation_map flag was being signalled earlier than
other data dependent on that flag. Consolidate this data so it's
parsed within the same if-scope as the flag is originally parsed in.

Change-Id: I10e90b4f511856445ef75a85a44ff441e1e5e672
2012-10-12 07:12:59 -07:00
Ronald S. Bultje
f39b0f192f Use transform-size selection for i8x8_pred also.
Change-Id: Iecb282fc89f9b5145ef31c5eda294ad42bc32a5d
2012-10-11 09:26:00 -07:00
Deb Mukherjee
a7333b0a5b Merge of the TX_16X16 experiment
Change-Id: I22aa803ffff330622cdb77277e7b196a9766f882
2012-10-10 17:05:54 -07:00
John Koleszar
9581bf46dc Merge "write_kfmodes: use update_skip_probs()" into experimental 2012-10-10 08:49:50 -07:00
John Koleszar
d94d2b75ea write_kfmodes: use update_skip_probs()
Use the common update_skip_probs() function rather than duplicating its
logic in write_kf_modes().

Change-Id: I2890a28f6907cb79ffe0fb21d20f0ef98b85cdd9
2012-10-09 15:36:00 -07:00
Ronald S. Bultje
9ca3c8b2c4 Selectable transform size try 2.
Results: derf (vanilla or +hybridtx) +0.2% and (+hybrid16x16
or +tx16x16) +0.7%-0.8%; HD (vanilla or +hybridtx) +0.1-0.2%
and (+hybrid16x16 or +tx16x16) +1.4%, STD/HD (vanilla or +hybridtx)
about even, and (+hybrid16x16 or +tx16x16) +0.8-1.0%.

Change-Id: I03899e2f7a64e725a863f32e55366035ba77aa62
2012-10-09 09:18:21 -07:00
Deb Mukherjee
3f5d60b384 Entropy coding for hybrid transform
Separates the entropy coding context models for 4x4, 8x8 and 16x16
ADST variants.

There is a small improvement for HD (hd/std-hd) by about 0.1-0.2%.
Results on derf/yt are about the same, probably because there is not
enough statistics.

Results may improve somewhat once the initial probability tables are
updated for the hybrid transforms which is coming soon.

Change-Id: Ic7c0c62dacc68ef551054fdb575be8b8507d32a8
2012-09-27 11:21:39 -07:00
Paul Wilkins
778ec421e7 Partial merge of NEWBESTREFMV and NEW_MVREF.
This commit merges those parts of the CONFIG_NEW_MVREF
that specifically relate to choosing a better set of candidate
MV references into the NEWBESTREFMV experiment.

CONFIG_NEW_MVREF will then be used for changes relating
to the explicit coding of a cost optimized MV reference in the
bitstream as part of MV coding.

Change-Id: Ied982c0ad72093eab29e38b8cd74d5c3d7458b10
2012-09-07 14:21:22 +01:00
Paul Wilkins
38e1c79185 MV reference changes
Extend experiment to use both vectors from MBs
coded using compound prediction as candidates.

In final sort only consider best 4 candidates
for now but make sure 0,0 is always one of them.

Other minor changes to new MV reference code.
Pass in Mv list to vp8_find_best_ref_mvs().

Change-Id: Ib96220c33c6b80bd1d5e0fbe8b68121be7997095
2012-09-07 12:46:41 +01:00
Deb Mukherjee
00f9eb6590 New motion vector entropy coding
Adds a new experiment with redesigned/refactored motion vector entropy
coding. The patch also takes a first step towards separating the
integer and fractional pel components of a MV. However the fractional
pel encoding still depends on the integer pel part and so they are
not fully independent. Further experiments are in progress to see
how much they can be decoupled without affecting performance.
All components including entropy coding/decoding, costing for MV
search, forward updates and backward updates to probability tables,
have been implemented.

Results so far:
derf: +0.19%
std-hd: +0.28%
yt: +0.80%
hd: +1.15%

Patch: Simplifies the fractional pel models:
derf: +0.284%
std-hd: +0.289%
yt: +0.849%
hd: +1.254%

Patch: Some changes in the models, rebased.
derf: +0.330%
std-hd: +0.306%
yt: +0.816%
hd: +1.225%

Change-Id: I646b3c48f3587f4cc909639b78c3798da6402678
2012-09-06 08:28:21 -07:00
Jingning Han
de6dfa6bb0 hybrid transform of 16x16 dimension
Enable ADST/DCT of dimension 16x16 for I16X16 modes. This change provides
benefits mostly for hd sequences.

Set up the framework for selectable transform dimension.

Also allowing quantization parameter threshold to control the use
of hybrid transform (This is currently disabled by setting threshold
always above the quantization parameter. Adaptive thresholding can
be built upon this, which will further improve the coding performance.)

The coding performance gains (with respect to the codec that has all
other configuration settings turned on) are

derf:   0.013
yt:     0.086
hd:     0.198
std-hd: 0.501

Change-Id: Ibb4263a61fc74e0b3c345f54d73e8c73552bf926
2012-08-30 16:52:25 -07:00
Paul Wilkins
2d60bee1fb New Motion Reference Search
Alternative strategy for finding a list of candidate motion
vectors to use as reference values in mv coding and as
nearest and near.

Sort by sad in vp8_find_best_ref_mvs() rather than just
pick the best. Allow 0,0 as a best ref option but not a
nearest or near unless there are no alternatives.

Encode/Decode verified on at least some clips.

Some commented out experimental and stats code still in place.

Gain over existing code averages about 1% on derf (alll metrics)
with improvement on all clips. Other test results pending.

The entropy coding of the mode (nearest/near etc) still
depends upon and requires the old "findnear" code so
this needs looking at and may provide room for further gains.

Change-Id: I871d7cba1d1c379c4bad9bcccce1fb19c46b8247
2012-08-24 18:08:21 +01:00
Ronald S. Bultje
5d4cffb35f Superblock coding.
This commit adds a pick_sb_mode() function which selects the best 32x32
superblock coding mode. Then it selects the best per-MB modes, compares
the two and encodes that in the bitstream.

The bitstream coding is rather simplistic right now. At the SB level,
we code a bit to indicate whether this block uses SB-coding (32x32
prediction) or MB-coding (anything else), and then we follow with the
actual modes. This could and should be modified in the future, but is
omitted from this commit because it will likely involve reorganizing
much more code rather than just adding SB coding, so it's better to let
that be judged on its own merits.

Gains on derf: about even, YT/HD: +0.75%, STD/HD: +1.5%.

Change-Id: Iae313a7cbd8f75b3c66d04a68b991cb096eaaba6
2012-08-20 14:43:34 -07:00
Paul Wilkins
77dc5c65f2 Code clean up.
Further cases of inconsistent naming convention.

Change-Id: Id3411ecec6f01a4c889268a00f0c9fd5a92ea143
2012-08-15 11:00:53 +01:00
Daniel Kang
4d5b81a80f Refactor RD to take same codepath for single and comp pred
Change-Id: Id38baf1b89648ef534e28be72f583137871f920c
2012-08-10 09:40:10 -07:00
Yaowu Xu
8b2f57d0b8 a new way of determining reference motion vector
Using surrounding reconstructed pixels from left and above to select
best matching mv to use as reference motion vector for mv encoding.

Test results:
       AVGPSNR  GLBPSNR VPXSSIM
Derf:  1.107%   1.062%  0.992%
Std-hd:1.209%   1.176%  1.029%

Change-Id: I8f10e09ee6538c05df2fb9f069abcaf1edb3fca6
2012-08-07 11:25:57 -07:00
Christian Duvivier
82edabce75 Add x86_64-darwin11-gcc target.
This allows building on MountainLion as the 10.6 SDK has been
removed from the latest Xcode version (4.4 4F250). Also fix
all warnings for that build.

Change-Id: Ib70bca4a25295f13595f0d10ea9f0229631de5a4
2012-08-06 15:26:58 -07:00
Deb Mukherjee
2af5473a90 Merging in high_precision_mv experiment
Merged in the high_precision_mv experiment to make it easier
to work on new mv encoding strategies. Also removed
coef_update_probs3().

Change-Id: I82d3b0bb642419fe05dba82528bc9ba010e90924
2012-08-03 13:38:49 -07:00
Daniel Kang
e6de9c2e5d Merge "16x16 DCT blocks." into experimental 2012-08-03 10:22:04 -07:00
Daniel Kang
fed8a1837f 16x16 DCT blocks.
Set on all 16x16 intra/inter modes

Features:
- Butterfly fDCT/iDCT
- Loop filter does not filter internal edges with 16x16
- Optimize coefficient function
- Update coefficient probability function
- RD
- Entropy stats
- 16x16 is a config option

Have not tested with experiments.

hd:     2.60%
std-hd: 2.43%
yt:     1.32%
derf:   0.60%

Change-Id: I96fb090517c30c5da84bad4fae602c3ec0c58b1c
2012-08-02 17:33:10 -07:00
Deb Mukherjee
0ebf548c75 Merging and bug-fix in enhanced_interp experiment
Merged the enhanced_interp experiment.
Found and fixed a bug in the include files framework, whereby
certain encoder files were still using the old INTERP_EXTEND
value of 3 instead of 4. The thresholds for mv range mcomp.c
need a small adjustment to prevent crashes.

The results are more or less unchanged.

Change-Id: Iac5008390f1efc97ce1102fbb5f8989c847fb579
2012-07-31 11:45:31 -07:00
Deb Mukherjee
5259744145 Adds support for switchable interpolation filters.
Allows for swtiching/setting interpolation filters at the MB
level. A frame level flag indicates whether to use a specifc
filter for the entire frame or to signal the interpolation
filter for each MB. When switchable filters are used, the
encoder chooses between 8-tap and 8-tap sharp filters. The
code currently has options to explore other variations as well,
which will be cleaned up subsequently.

One issue with the framework is that encoding is slow. I
tried to do some tricks to speed things up but it is still slow.
Decoding speed should not be affected since the number of
filter taps remain unchanged.

With the current version, we are up 0.5% on derf on average but
some videos city/mobile improve by close to 4 and 2% respectively.
If we did a full-search by turning the SEARCH_BEST_FILTER flag
on, the results are somewhat better.

The framework can be combined with filtered prediction, and I
seek feedback regarding that.

Rebased.

Change-Id: I8f632cb2c111e76284140a2bd480945d6d42b77a
2012-07-30 11:33:43 -07:00
Deb Mukherjee
9984a155d6 Merges several experiments
The following five experiments are merged:

newentropy
newupdate
adaptive_entropy (also includes a couple of parameter changes
                  that improves results a little
                  in common/entropymode.c and encoder/modecosts.c
                  that were not merged from the internal branch)
newintramodes
expanded_coef_context

Change-Id: I8a142a831786ee9dc936f22be1d42a8bced7d270
2012-07-27 12:12:39 -07:00