Commit Graph

3959 Commits

Author SHA1 Message Date
Yaowu Xu
499fe05dc0 optimize forward 16x16 DCT for accuracy
This commit added pre/post scaling for first half of fDCT16x16 to
reduce error, by simulation of 100,000 blocks for random inputs,
the average sse reduced from 2.1/block to 0.0498/block.

also enabled tests for 16x16 fDCT and iDCT

Change-Id: Id2a95f0464c6dd4118797d456237ae90274c0f02
2013-02-25 07:47:27 -08:00
Ronald S. Bultje
0c9e2e9a1d Split coefficient token tables intra vs. inter.
Change-Id: I5416455f8f129ca0f450d00e48358d2012605072
2013-02-23 07:33:46 -08:00
Paul Wilkins
c17672a33d Further changes to coefficient contexts.
This patch alters the balance of context between the
coefficient bands (reflecting the position of coefficients
within a transform blocks) and the energy of the previous
token (or tokens) within a block.

In this case the number of coefficient bands is reduced
but more previous token energy bands are supported.

Some initial rebalancing of the default tables has been
by running multiple derf clips at multiple data rates using
the ENTOPY_STATS macro. Further balancing needs to be
done using larger image formatsd especially in regard to
the bigger transform sizes which are not as well represented
in encodings of smaller image formats.

Change-Id: If9736e95c391e711b04aef6393d26f60f36e1f8a
2013-02-23 07:29:09 -08:00
Yaowu Xu
bf0570a7e6 Merge "optimize 8x8 fdct rounding for accuracy" into experimental 2013-02-22 22:20:57 -08:00
Yaowu Xu
8bf1c4dde7 Merge "changes related fdct/idct tests" into experimental 2013-02-22 22:20:44 -08:00
Yaowu Xu
22012ee994 optimize 8x8 fdct rounding for accuracy
The commit added a final rounding choice for 8x8 forward dct to get
rid of a sign bias at DC position and improve the accuracry in term
of round trip error for 8x8 fDCT/iDCT.

This commit also enabled forward 8x8 dct test.

Change-Id: Ib67f99b0a24d513e230c7812bc04569d472fdc50
2013-02-22 16:55:30 -08:00
James Zern
1711cf2dbb add vp8 variance test
Change-Id: I4e94ee2c4e2360d6a11a454c323f2899c1bb6f72
2013-02-22 16:25:14 -08:00
James Zern
e5fb6321a1 give vp9 variance struct a unique name
variance_vtable clashed with vp8/common/variance.h

Change-Id: I09c1de44d5519f1bd13f58c01144c0de4706de6f
2013-02-22 16:25:13 -08:00
James Zern
50771d41f2 rtcd: make include guard unique
prior numbers were removed resulting in the same include guard for
vp[89]_rtcd

Change-Id: If2741e5b0cbdda7390c20e865e9f05992caff93e
2013-02-22 16:05:00 -08:00
James Zern
ca64f6c14f vp8/encoder/mcomp.c: remove an unused variable
Change-Id: I980da3c70f7cee1b723ede0ed2ae527ac7cd6a51
2013-02-22 15:38:45 -08:00
James Zern
e4ef850823 Merge "Fix variance (signed integer) overflow" 2013-02-22 15:33:20 -08:00
James Zern
c21226b638 Merge "vp8: make gf_group_bits 64-bit" 2013-02-22 15:31:28 -08:00
James Zern
5e0724abad Merge "vp8_first_pass(): avoid floating point div by 0" 2013-02-22 15:30:14 -08:00
James Zern
4e00060d29 vp8: make gf_group_bits 64-bit
avoids signed integer overflow; matches kf_group_bits

Change-Id: I193145cdc4fa53e70fba0a1731a03eb1a574931d
2013-02-22 12:45:28 -08:00
James Zern
fba9772dd2 vp8_first_pass(): avoid floating point div by 0
Change-Id: Id1e6a12db6b0c1d3f64ead8fd8834aadc30fbed2
2013-02-22 12:41:59 -08:00
James Zern
cc894a184f Fix variance (signed integer) overflow
based on change made in experimental:
  9847344 Fix variance (signed integer) overflow

Change-Id: I36f4ba5700f6f4615057daf7e70868f68a86669f
2013-02-22 12:40:08 -08:00
James Zern
6639b25782 Merge "Fixed the buffer overflow issue" 2013-02-22 12:36:32 -08:00
James Zern
27bce6c5dc Merge "sixtap_predict_test: fix sizes passed to memset" 2013-02-22 12:32:07 -08:00
Jingning Han
936aa281b5 Fixed the buffer overflow issue
The issue that potentially broke the encoding process was due to the fact
that the length of token link is calculated from the total number of tokens
coded, while it is possible, in high bit-rate setting, this length is
greater than the buffer length initially assigned to the cpi->tok.

This patch increases the initially allocated buffer length assigned to
cpi->tok from
(mb_rows * mb_cols * 24 * 16) to (mb_rows * mb_cols * (1 + 24 * 16)).

It resolves the buffer overflow problem.

Change-Id: I8661a8d39ea0a3c24303e3f71a170787a1d5b1df
2013-02-22 12:30:35 -08:00
James Zern
540997afba sixtap_predict_test: fix sizes passed to memset
src_/dst_/dst_c_ are heap allocated, use the allocation size rather than
sizeof(var)

Change-Id: I3335ad487dc9b154cdf212891d1d74c812eff060
2013-02-22 11:29:47 -08:00
John Koleszar
606a2561d6 Merge "Code cleanup." into experimental 2013-02-22 11:20:20 -08:00
Dmitry Kovalev
548b4dd5f2 Code cleanup.
Removing redundant 'extern' keywords and parentheses, fixing indentation,
making variable names lower case, using short expressions x *= c
instead of x = x * c, minor code simplifications.

Change-Id: If6a25fcf306d1db26e90d27e3c24a32735c607de
2013-02-22 11:03:14 -08:00
Yaowu Xu
4e2697f5cd changes related fdct/idct tests
1. changed 4x4 test name to Vp9Fdct4x4Test to be consistent
2. remove forward 8x8 dct test code from idct8x8_test.cc
3. temporarily disable other forward dct tests to allow fdct work in
progress

Change-Id: I566aeed9c7c34da5a206190aa7d0e847a4008b36
2013-02-22 10:39:31 -08:00
Jingning Han
c67a20994f Merge "Forward butterfly hybrid transform" into experimental 2013-02-22 09:20:26 -08:00
Paul Wilkins
b5f3cb6e37 Merge "Experimental removal of over quant code" into experimental 2013-02-22 08:44:40 -08:00
John Koleszar
f356b740ff Merge "Remove 'local' variables in rtcd.sh" 2013-02-22 08:22:33 -08:00
Paul Wilkins
dbf4942046 Experimental removal of over quant code
The over quant code was added in VP8 post
bitstream freeze to allow compression to lower
data rates

In VP9 the real qualtizer range has been greatly
extended anyway.

Change-Id: I5d384fa5e9a83ef75a3df34ee30627bd21901526
2013-02-22 14:00:51 +00:00
KO Myung-Hun
a344456cb4 Append .exe to the executable on OS/2
Change-Id: I1c3b17450b08d2fdfacb7b94055da29d4d20f9c8
2013-02-22 12:38:07 +09:00
Jingning Han
babbd5d170 Forward butterfly hybrid transform
This patch includes 4x4, 8x8, and 16x16 forward butterfly ADST/DCT
hybrid transform. The kernel of 4x4 ADST is sin((2k+1)*(n+1)/(2N+1)).
The kernel of 8x8/16x16 ADST is of the form sin((2k+1)*(2n+1)/4N).

Change-Id: I8f1ab3843ce32eb287ab766f92e0611e1c5cb4c1
2013-02-21 18:24:28 -08:00
Dmitry Kovalev
5a18106fb7 Code cleanup.
Removing redundant 'extern' keywords. Moving VP9DX_BOOL_DECODER from .h
to .c file.

Change-Id: I5a3056cb3d33db7ed3c3f4629675aa8e21014e66
2013-02-21 13:50:15 -08:00
Ronald S. Bultje
9837bf4d40 Don't exit on decode errors in vpxenc.
Allows the user to specify whether decode errors should be fatal or not.
Also makes mismatches optionally fatal.

Change-Id: I58cff4a82f3d42f5653b91cf348a7f669377e632
2013-02-21 12:27:00 -08:00
Ronald S. Bultje
8c16dee4f2 Merge "Remove "eobs" array in MACROBLOCKD." into experimental 2013-02-21 11:30:29 -08:00
John Koleszar
43cec44bbf Remove 'local' variables in rtcd.sh
These aren't required to be supported by sh.

Change-Id: I54d641a2377531e0b320676d29d4ecdeee82288a
2013-02-21 11:11:13 -08:00
John Koleszar
4674312382 Merge "Code cleanup." into experimental 2013-02-21 10:56:17 -08:00
Dmitry Kovalev
5da8534963 Code cleanup.
Removing redundant 'extern' keyword from function declarations and making
function arguments lower case.

Change-Id: Idae9a2183b067f2b6c85ad84738d275e8bbff9d9
2013-02-21 10:34:33 -08:00
Ronald S. Bultje
35524e2231 Remove "eobs" array in MACROBLOCKD.
The information is a duplicate of "eob" in BLOCKD.

Change-Id: Ia6416273bd004611da801e4bfa6e2d328d6f02a3
2013-02-21 10:07:36 -08:00
Deb Mukherjee
048f593703 Merge "Refactoring of switchable filter search for speed" into experimental 2013-02-21 09:23:50 -08:00
John Koleszar
138ffb6ea9 Merge "Avoid division in intra prediction" into experimental 2013-02-21 08:33:17 -08:00
Deb Mukherjee
28b1db9278 Refactoring of switchable filter search for speed
Refactors the switchable filter search in the rd loop to
improve encode speed.

Uses a piecewise approximation to a closed form expression to estimate
rd cost for a Laplacian source with a given variance and quantization
step-size.

About 40% encode time reduction is achieved.

Results (on a feb 12 baseline) show a slight drop:

derf: -0.019%
yt: +0.010%
std-hd: -0.162%
hd: -0.050%

Change-Id: Ie861badf5bba1e3b1052e29a0ef1b7e256edbcd0
2013-02-20 18:34:42 -08:00
Jingning Han
abfd2a4880 Merge "Fixed the buffer overflow issue" into experimental 2013-02-20 16:27:27 -08:00
Jingning Han
232ccc2fbe Fixed the buffer overflow issue
The issue that potentially broke the encoding process was due to the fact
that the length of token link is calculated from the total number of tokens
coded, while it is possible, in high bit-rate setting, this length is
greater than the buffer length initially assigned to the cpi->tok.

This patch increases the initially allocated buffer length assigned to
cpi->tok from
(mb_rows * mb_cols * 24 * 16) to (mb_rows * mb_cols * (1 + 24 * 16)).

It resolves the buffer overflow problem.

Change-Id: I8661a8d39ea0a3c24303e3f71a170787a1d5b1df
2013-02-20 15:41:48 -08:00
Dmitry Kovalev
e6c89a1f9b Merge "Code cleanup." into experimental 2013-02-20 12:47:54 -08:00
Yaowu Xu
441f24de3d Merge "Merge lossless experiment" into experimental 2013-02-20 12:27:26 -08:00
Dmitry Kovalev
eb6aee50a4 Code cleanup.
Change-Id: I7c6e3bebd94856b24dbe2aded7f9e04ef8bb8c08
2013-02-20 11:36:31 -08:00
Yaowu Xu
d262e26cc7 Merge lossless experiment
Change-Id: I7b7b8d4fda3a23699e0c920d727f8c15d37d43aa
2013-02-20 07:54:28 -08:00
Paul Wilkins
ef01b956d8 Entropy stats output code.
Fixes to make Entropy stats code work again

Change-Id: I62e380481a4eb4c170076ac6ab36f0c2b203e914
2013-02-20 14:33:19 +00:00
Tero Rintaluoma
56e6c66b49 Avoid division in intra prediction
- Using multiplication and shifting instead of division in
  intra prediction.
- Maximum absolute difference is 1 for division statements
  in d45, d27, d63 prediction modes. However, errors can
  cumulate for large block sizes when using already predicted
  values.
- Maximum number of non-matching result values in loops using
  division are:
  4x4        0/16
  8x8        0/64
  16x16     10/256
  32x32     13/1024
  64x64    122/4096

  Overall PSNR
  derf:     0.005
  yt:      -0.022
  std-hd:   0.021
  hd:      -0.006

Change-Id: I3979a02eb6351636442c1af1e23d6c4e6ec1d01d
2013-02-20 10:37:36 +02:00
Yaowu Xu
6b1b341774 Merge "fixed an enc/dec mis-match issue" into experimental 2013-02-19 16:53:30 -08:00
Yaowu Xu
b13f38d4b3 fixed an enc/dec mis-match issue
The issue was caused by a out-of-order merge, which leads to wrong
functions are called at lossless mode.

Change-Id: If157729abab62954c729e0377e7f53edb7db22ca
2013-02-19 16:26:27 -08:00
John Koleszar
34732576c1 Merge "Add estimated completion time to vpxenc" into experimental 2013-02-19 10:51:42 -08:00