Commit Graph

102 Commits

Author SHA1 Message Date
Adrian Grange
9daf3154db Superblock encoding order
This is the first patch to add superblock (32x32) coding
order capabilities. It does not yet do any mode selection
at the SB level, that will follow in a further patch.

This patch encodes rows of SBs rather than
MBs, each SB contains 2x2 MBs.

Two intra prediction modes have been disabled since they
require reconstructed data for the above-right MB which
may not have been encoded yet (e.g. for the bottom right
MB in each SB).

Results on the one test clip I have tried (720p GIPS clip)
suggest that it is somewhere around 0.2dB worse than the
baseline version, so there may be bugs.

It has been tested with no experiments enabled and with
the following 3 experiments enabled:
  --enable-enhanced_interp
  --enable-high_precision_mv
  --enable-sixteenth_subpel_uv
in each case the decode buffer matches the recon buffer
(using "cmp" to compare the dumped/decoded frames).
Note: Testing these experiments individually created
errors.

Some problems were found with other experiments but it
is unclear what state these experiments are in:
  --enable-comp_intra_pred
  --enable-newentropy
  --enable-uvintra

This code has not been extensively tested yet, so there
is every likelihood that further bugs remain. I also
intend to do some code cleanup & refactoring in tandem
with the next patch that adds the 32x32 modes.

Change-Id: I1eba7f740a70b3510df58db53464535ef881b4d9
2012-04-11 10:40:57 +01:00
Deb Mukherjee
57d953479b Adding contextual coding of mb_skip_coeff flag.
Using contextual coding of the mkb_skip_coeff flag using the
values of this flag from the left and above. There is a small
improvement of about 0.15% on Derf:
http://www.corp.google.com/~debargha/vp8_results/mbskipcontext.html

Refactored to use pred_common.c by adding a new context type.

Results on HD set (about 0.66% improvement):
http://www.corp.google.com/~debargha/vp8_results/mbskipcontext_hd.html

Incliding missing refactoring to use the pred_common utilities.

Change-Id: I95373382d429b5a59610d77f69a0fea2be628278
2012-03-21 03:55:44 -07:00
Paul Wilkins
68033ca472 Snapshot candidate
Pulled out super block code for the snapshot as this
is not quite ready and will need an extensive re-merge.

Change-Id: I436369b511257447a7b0ea064016cb63f5011849
2012-03-07 11:24:33 +00:00
Ronald S. Bultje
d476165107 Compound intra prediction (b_pred/4x4 only, for now),
Also remove duplicate build_intra_predictors_mby/uv().

Change-Id: I78607e7304952a9b962a5b25af9bb9c48692187b
2012-02-28 17:41:03 -08:00
Paul Wilkins
19b9d28f70 Merge new loop filter.
Merge of the NEWLPF configuration experiment so it is always on.

Change-Id: I7054772b6eab28bad1ff807bfa54d98f83de9308
2012-02-28 20:58:52 +00:00
Deb Mukherjee
18e90d744e Supporting high precision 1/8-pel motion vectors
This is the initial patch for supporting 1/8th pel
motion. Currently if we configure with enable-high-precision-mv,
all motion vectors would default to 1/8 pel. Encode and
decode syncs fine with the current code. In the next phase
the code will be refactored so that we can choose the 1/8
pel mode adaptively at a frame/segment/mb level.

Derf results:
http://www.corp.google.com/~debargha/vp8_results/enhinterp_hpmv.html
(about 0.83% better than 8-tap interpoaltion)

Patch 3: Rebased. Also adding 1/16th pel interpolation for U and V

Patch 4: HD results.
http://www.corp.google.com/~debargha/vp8_results/enhinterp_hd_hpmv.html
Seems impressive (unless I am doing something wrong).

Patch 5: Added mmx/sse for bilateral filtering, as well as enforced
use of c-versions of subpel filters with 8-taps and 1/16th pel;
Also redesigned the 8-tap filters to reduce the cut-off in order to
introduce a denoising effect. There is a new configure option
sixteenth-subpel-uv which will use 1/16 th pel interpolation for
uv, if the motion vectors have 1/8 pel accuracy.

With the fixes the results are promising on the derf set. The enhanced
interpolation option with 8-taps alone gives 3% improvement over thei
derf set:
http://www.corp.google.com/~debargha/vp8_results/enhinterpn.html

Results on high precision mv and on the hd set are to follow.

Patch 6: Adding a missing condition for CONFIG_SIXTEENTH_SUBPEL_UV in
vp8/common/x86/x86_systemdependent.c

Patch 7: Cleaning up various debug messages.

Patch 8: Merge conflict

Change-Id: I5b1d844457aefd7414a9e4e0e06c6ed38fd8cc04
2012-02-23 09:25:21 -08:00
Paul Wilkins
46f9ad2ca5 Experimental code base simplification.
Remove error concealment code.

Change-Id: I882705174fbfea212e96f7f684e47a671dbe5c67
2012-02-15 16:08:47 +00:00
Yaowu Xu
d327dcf3aa moved segment based LPF level selection under CONFIG_FEATUREUPDATES
This commit moved segment based loop filter level selection into
the experiment of CONFIG_FEATUREUPDATES. As previous commit noted,
the segment based loop filter selection helps the compression by
~0.1% on cif set, the ongoing experiment CONFIG_FEATUREUPDATES
made encoding updates of the segment based LPF level more efficient,
hence, another .04% gain on cif set. The commit also fixed an issue
previously where encoder/decoder may use different loop filter level
for one of the segments.

Change-Id: Ia978b14aae95bb107d561ba53a7a2bb6ff01faf3
2012-02-15 07:18:05 -08:00
Paul Wilkins
9a8204d6ee Simplification of experimental code base.
Removed ~CONFIG_REALTIME_ONLY code.

Change-Id: I5fafff29a08acd8928699f9ddce8744787024d8c
2012-02-14 09:03:56 +00:00
Jim Bankoski
af8f1928d1 vp8 - config_featureupdates
Added a bit to signify that the feature changed since
the last time we sent it, or not so that we don't need
to send all the databits for every feature change.

added config

Change-Id: I8d3064ce90d4500bf0d5c6b87c664e46138dfcac
2012-02-13 12:31:12 -08:00
Paul Wilkins
2615ca5d41 Removal of threading code.
For the experimental branch we are trying to slim the codebase
down removing features such as threading for now which complicate
the process of development and testing.

Change-Id: I657c0246aef4d1fa8c8ffc6a1adfeee45bce8e24
2012-02-10 16:23:59 +00:00
Ronald S. Bultje
29e4d7e861 Merge dualpred (compound prediction) experiment.
Change-Id: Ieaaa07c50eae41118596197f6a4d848135946e41
2012-02-09 16:29:18 -08:00
Adrian Grange
5d0b5a17d9 Added encoding in Superblock Order
As a precursor to encoding 32x32 blocks this cl adds the
ability to encode the frame superblock (=32x32 block) at
a time. Within a SB the 4 indiviual MBs are encoded in
raster-order (NW,NE,SW,SE).

This functionality is added as an experiment which can be
enabled by ispecifying --enable-superblocks in the
command line specified to configure (CONFIG_SUPERBLOCKS
macro in the code).

To make this work I had to disable the two intra
prediction modes that use data from the top-right of the
MB.

On the tests that I have run the results produce
almost exactly the same PSNRs & SSIMs with a very
slightly higher average data rate (and slightly higher
data rate than just disabling the two intra modes in
the original code).

NOTE: This will also break the multi-threaded code.

This replaces the abandoned change:
Iebebe0d1a50ce8c15c79862c537b765a2f67e162

Change-Id: I1bc1a00f236abc1a373c7210d756e25f970fcad8
2012-02-02 10:30:57 -08:00
Paul Wilkins
b2f64dff7d Added common prediction modules.
This function adds the common prediction modules,  some data structures
and a config option but does not use them.

It also corrects a bug in clearing down  the MODE_INFO border and introduces
a new element that indicates if an entry corresponds to an "in image" macro block
or is part of the border.

Change-Id: Ib69eec0876173ebe9d1de9df9537d0b2447702e0
2012-01-31 12:53:36 +00:00
Deb Mukherjee
6fa47a5f16 Adds support for enhanced interpolation for subpel motion
using an 8-tap filter.

The results with 3 different 8-tap filters on the derf set are in:
http://www.corp.google.com/~debargha/vp8_results/enhinterp.html
The one that gives the most gain achieves an overall gain of about
0.6%. The results for a set of 12 hd (720p) videos are in:
http://www.corp.google.com/~debargha/vp8_results/enhinterp_hd.html
with max gain of 0.55% with the same filter. The best filter apparently
achieves the best trade-off between pass band ripple and stop band
attenuation.

Change-Id: I919e28ae245c0493147fa0864f8c9d048a9dd530
2012-01-26 10:24:47 -08:00
Yaowu Xu
5e7d7d3d95 new loop filter functions for macroblock boundaries
The commit adds a new set of loop filter for macroblock edge filtering.
The new loop filter has a mask to detect so-called "flat" regions. The
detection checks 5 pixels of each side of an edge. If the all pixels
have value with +/-1 from the edge pixel on the same side, the region
is treated as a "flat" region. For such case, a 7 tap filter is used
to change 3 pixel values on each side. The 7 taps are:
               [1, 1, 1, 2, 1, 1, 1]/8
The furthest away pixels used as input are +/-5 away from edge. For
non-flat region, we fall back to old filtering. It should be noted
here that the thresholds and filter taps may require more optimization
for best possible results.

Tests on a set of hd clips showed consistent gains:
http://www.corp.google.com/~yaowu/no_crawl/mblpf_hd.html
(avg psnr: .83% glb psnr: .77% ssim: .82%)

Tests on derf set also showed consistent gains:
http://www.corp.google.com/~yaowu/no_crawl/mblpf_derf.html
(avg psnr: .24% glb psnr: .22% ssim: .48%)

Change-Id: I0855b1ff48e79e1175c20b81967137e18b2af352
2012-01-18 09:51:29 -08:00
Yaowu Xu
b70f23caec Removed #if CONFIG_MULCONTEXT
This commit removed the macro CONFIG_MULCONTEXT, which was used to
indicate the experiment code for using separate context for altref
and normal frames. This commit made the change fully merged in.

Change-Id: I525f927f68e2365d37b340ef23b836a136a4f70b
2011-12-07 14:01:07 -08:00
Yaowu Xu
d37cd97682 Removed #if CONFIG_I8X8
This commit removed the macro CONFIG_I8X8, which was used to indicate
the 8x8 intra prediction experiment, made the change fully merged in.

Change-Id: Iafa4443781ce6e83f5591c12ba615a0e92ce0ea0
2011-12-07 13:48:53 -08:00
Ronald S. Bultje
60cb39da86 Dual 16x16 inter prediction.
This patch introduces the concept of dual inter16x16 prediction. A
16x16 inter-predicted macroblock can use 2 references instead of 1,
where both references use the same mvmode (new, near/est, zero). In the
case of newmv, this means that two MVs are coded instead of one. The
frame can be encoded in 3 ways: all MBs single-prediction, all MBs dual
prediction, or per-MB single/dual prediction selection ("hybrid"), in
which case a single bit is coded per-MB to indicate whether the MB uses
single or dual inter prediction.

In the future, we can (maybe?) get further gains by mixing this with
Adrian's 32x32 work, per-segment dual prediction settings, or adding
support for dual splitmv/8x8mv inter prediction.

Gain (on derf-set, CQ mode) is ~2.8% (SSIM) or ~3.6% (glb PSNR). Most
gain is at medium/high bitrates, but there's minor gains at low bitrates
also. Output was confirmed to match between encoder and decoder.

Note for optimization people: this patch introduces a 2nd version of
16x16/8x8 sixtap/bilin functions, which does an avg instead of a
store. They may want to look and make sure this is implemented to
their satisfaction so we can optimize it best in the future.

Change-ID: I59dc84b07cbb3ccf073ac0f756d03d294cb19281
2011-12-06 11:53:02 -08:00
Yaowu Xu
8a40d2f5e6 changed configure script to enable new experimental options
Added two experimental options to the configure script:
1. newnear:
   new scheme of doing mv encoding that include a motion vector from
   last frame in nearest and near mv search
2. mulcontext:
   tracks entropy context separately for regular frames and alt ref
   frames.

Change-Id: If6e0d5d593351707b497a26eb6a763e080f77e6f
2011-12-02 15:32:46 -08:00
Yaowu Xu
2bbde25003 make uv intra mode coding adaptive to Y mode
This commit tries to do UV intra mode coding adaptive to Y intra mode.
Entropy context is defined as conditional PDF of uv intra mode given
the Y mode. All constants are normalized with 256 to be fit in 8 bits.

This provides further coding efficiency beyond the quantizer adaptive
y intra mode coding. Consistent gains were observed on all clips and
all bit rates for HD all key encoding tests.

To test, configure with
--enable-experimental --enable-uvintra

Change-Id: I2d78d73f143127f063e19bd0bac3b68c418d756a
2011-11-03 21:48:08 -07:00
Paul Wilkins
45e49e6e19 Experimental: segfeature added.
New setting added to configure script
2011-09-30 16:08:37 +01:00
Yaowu Xu
aac2c12663 add quantizer adaptive intra mb mode encoding
make intra mode coding entropy distribution adaptive to baseQindex, an
encoding test on hd clips with all key frame shows universal gain on
all clips in both .2%(psnr) and (ssim).3%.

To build and test, configure with
--enable-experimental --enable-qimode

Change-Id: Iaa69241b984d4fdd8baa6d77ee78c0140f5ac00a
2011-09-16 16:26:35 -07:00
Yaowu Xu
ca6b85aa4e add 8x8 intra prediction modes
Patch 1 to Patch 3 is an initial implementation of 8x8 intra prediction
modes, here are with the following assumptions:
a. 8x8 has 4 prediction modes DC, H, V and TM
b. UV 4x4 block use the same mode as corresponding 8x8 area
c. i8x8 modes are enabled for key frame only for now
Patch 4:
d. removed debug code from previous patches
Patch 5:
e. added stats code to collect entropy stats and further cleaned up
Patch 6:
f. changed mode stats code to collect finer stats of modes
Patch 7:
g. normalized i8x8 modes distribution to total at 256 (8bits).
Patch 8:
h. fixed a bug in decoder and removed debug printf output.
Patch 9:
i. more cleanups to address paul's comment
Patch 10:
j. messy rebase/merges to bring the commit up to date.

Tests on HD clips encoded with all key frame showing consistent gain
on all clips and all metrics:~0.5%(psnr) and 0.6%(ssim):
http://www.corp.google.com/~yaowu/no_crawl/i8x8hd_allkey_fixedq.html

To build and test, configure with:
--enable-experimental --enable-i8x8

Change-Id: I9813fe07ae48cab5fdb5d904bca022514ad01e7f
2011-09-16 15:55:19 -07:00
John Koleszar
a16cd74ba1 Merge remote branch 'internal/upstream-experimental' into HEAD
Conflicts:
	vp8/decoder/detokenize.c
	vp8/decoder/onyxd_if.c
	vp8/vp8_common.mk

Change-Id: Ifca1108186a8bc715da86a44021ee2fa5550b5b8
2011-08-11 13:01:45 -04:00
John Koleszar
c521abeb49 Merge remote branch 'origin/master' into experimental
Change-Id: I690f30f8f9b9fd369f08c35c4dccdd15eed18cd0
2011-07-29 00:05:12 -04:00
James Zern
495b241fa6 configure: add --enable-static option
Fixes issue #62.

Change-Id: I0567cf7897c0942666c19b3231c8c3b8e9c3e7cc
2011-07-25 15:40:36 -07:00
Deb Mukherjee
08f6471890 Add 8x8 transform to experimental branch
Please refer to previous commit messages for detailed info:
https://on2-git.corp.google.com/g/#change,5940
https://on2-git.corp.google.com/g/#change,6045

Change-Id: I8b16992f2f69c5a808ad40a3e32ef589cce7c59d
2011-07-20 09:49:22 -07:00
John Koleszar
d7c6c9472f Merge remote branch 'internal/upstream-experimental' into HEAD 2011-06-28 00:05:04 -04:00
Yaowu Xu
7793b386a7 fix build issues for experimental branch
experimental branch build was broken from some merge artifacts, this
commit fixes those issues to enable the experimental branch to build.

Change-Id: Ic52b2d2f1d1b80abb7ecaa4c0927bcf887ac0c2a
2011-06-23 09:19:44 -07:00
John Koleszar
54bc4fde77 Merge remote branch 'origin/master' into experimental
Conflicts:
	configure

Change-Id: I91b9059e5b724a96368c7765c147fdf5a5ce03f2
2011-05-20 08:33:51 -04:00
John Koleszar
27331e1377 Merge remote branch 'internal/upstream' into HEAD 2011-05-20 00:05:16 -04:00
John Koleszar
c684d5e5f2 Merge "changed configure option name to reduce confusion" 2011-05-19 11:17:08 -07:00
Stefan Holmer
d04f852368 Adding error-concealment to the decoder.
The error-concealer is plugged in after any motion vectors have been
decoded. It tries to estimate any missing motion vectors from the
motion vectors of the previous frame. Intra blocks with missing
residual are replaced with inter blocks with estimated motion vectors.

This feature was developed in a separate sandbox
(sandbox/holmer/error-concealment).

Change-Id: I5c8917b031078d79dbafd90f6006680e84a23412
2011-05-19 13:46:33 -04:00
John Koleszar
e965d8f6f3 Merge remote branch 'origin/master' into experimental
Change-Id: Ib6c8596030140ed2b5e1dea76de024d27ad8ed86
2011-05-06 00:05:11 -04:00
John Koleszar
39e36f8604 Merge remote branch 'internal/upstream' into HEAD 2011-05-06 00:05:10 -04:00
Yunqing Wang
aeb86d615c Merge "Runtime detection of available processor cores." 2011-05-05 04:59:54 -07:00
Yaowu Xu
57ad189129 changed configure option name to reduce confusion
Renamed configure option "enable-psnr" to "enable-internal-stats" to
better reflect the purpose of the option and eliminate the confusion
reported in http://code.google.com/p/webm/issues/detail?id=35

Change-Id: If72df6fdb9f1e33dab1329240ba4d8911d2f1f7a
2011-04-29 09:39:05 -07:00
John Koleszar
e8901972de Merge remote branch 'internal/upstream-experimental' into HEAD 2011-04-12 00:05:08 -04:00
Ralph Giles
c9f8aefe26 Remove duplicate ';;' from the configure script.
This gave a syntax error, preventing configure from completing.

Change-Id: I3df765f93c26e5bb3b2aab939d1cd01d6c57d450
2011-04-10 09:30:36 -07:00
John Koleszar
305c9b57b2 Merge remote branch 'internal/upstream' into HEAD 2011-04-01 00:05:12 -04:00
John Koleszar
88ed17298f Merge remote branch 'origin/master' into experimental
Change-Id: Ie59ab2f2e93464df0f484bd73d2394d05640536d
2011-04-01 00:05:12 -04:00
Attila Nagy
297b27655e Runtime detection of available processor cores.
Detect the number of available cores and limit the thread allocation
accordingly. On decoder side limit the number of threads to the max
number of token partition.

Core detetction works on Windows and
Posix platforms, which define _SC_NPROCESSORS_ONLN or _SC_NPROC_ONLN.

Change-Id: I76cbe37c18d3b8035e508b7a1795577674efc078
2011-03-31 10:23:01 +03:00
Ralph Giles
607f8420f3 Generate a vpx.pc file for pkg-config.
Rules are added to libs.mk to generate a vpx.pc, which is
installed as pkgconfig/vpx.pc under the target library directory.
This also requires the install path prefix be exported directly
in config.mk.

Some systems use a tool called pkg-config to query information
about intalled libraries or other resources, based on database
files provided by the packages themselves at install time.

Providing such a file for libvpx simplifies integration with
other build systems, and provides an easy avenue for developers
to test against their own builds of the library.

Change-Id: I4e32a8fbb53fc331aa95eb207c63dd70a76d18ed
2011-03-30 20:56:16 -07:00
Ralph Giles
53e9987b4d Export the version string as a makefile variable.
The configure script exports the major/minor/patch version
numbers, but didn't make the full version string available
to Makefile recipes and rules, the way it is available to
C code from vpx_version.h.

Change-Id: Ic6a9d4c574a6ea66a50c928f4eedeb91d7668eb5
2011-03-30 20:53:43 -07:00
John Koleszar
23afb5810e Merge remote branch 'origin/master' into experimental
Change-Id: Ie86a006320f3cea6a068a6b235267e19c3a19c4e
2011-03-30 00:05:07 -04:00
John Koleszar
9a82cc7455 Merge remote branch 'internal/upstream' into HEAD 2011-03-30 00:05:06 -04:00
John Koleszar
49c31dc2b4 Merge "configure: enable unused variable warnings" 2011-03-29 07:38:04 -07:00
John Koleszar
f8d4a81af2 Merge remote branch 'origin/master' into experimental
Change-Id: I6db3ac0d75a7d5077f14c759591b9e514279a548
2011-02-24 00:05:11 -05:00
John Koleszar
c23096e4a5 Merge remote branch 'internal/upstream' into HEAD 2011-02-24 00:05:08 -05:00