Commit Graph

23 Commits

Author SHA1 Message Date
paulwilkins
3e9e77008c Casts to remove some warnings.
Added casts to remove warnings:
BUG=webm:1274

In regards to the safety of these casts they are of two types:-

- Normalized bits per (16x16) MB stored in a 32 bit int (This is safe as bits
per MB even with << 9 normalization cant overflow 32 bits. Even raw 12
bits hdr source even would only be  29 bits :- (4+4+12+9) and the encoder
imposes much stricter limits than this on max bit rate.

- Cast as part of variance calculations.  There is an internal cast up to 64 bit
for the Sum X Sum calculation, but after normalization dividing by the number
of points the result will always be <= the SSE value.

Change-Id: I4e700236ed83d6b2b1955e92e84c3b1978b9eaa0
2016-09-01 16:10:12 +01:00
Yury Gitman
7a730d5901 Add cpi parameter for forcing segmentation update
Change-Id: I1b0bcb1ffe7604117bfaa0b9989d0e25ff04d28c
2016-08-08 13:20:42 -07:00
clang-format
e0cc52db3f vp9/encoder: apply clang-format
Change-Id: I45d9fb4013f50766b24363a86365e8063e8954c2
2016-08-02 16:47:11 -07:00
Alex Converse
8620dea882 variance aq: Fix a variance calculation overflow bug.
This is an actual overflow where the result of the calculation is
materially changed, not just a negative value that is stored in an
unsigned.

Caught with fsanitize=integer on the VP9/AqSegmentTest.TestNoMisMatchAQ2/1 test.

Change-Id: I514b0ef4ae7ad50e3e08c0079aa204d59fa679aa
2016-05-04 11:40:55 -07:00
Yaowu Xu
0dfe9618c3 Properly set segmentation for error-resilient mode
Change-Id: I0c85b637e51dc949a4e919f10a78870f23c2ca6a
2016-01-13 17:27:17 -08:00
Alex Converse
a8a08ce57e Move vp9_systemdependent.h to vpx_ports bitops.h and system_state.h
Use system_state.h in vpx_dsp and remove unneeded includes of
vp9_systemdependent.h.

Change-Id: I92557ec6dd5aa790160b4f31fe7967db0d7ec3c4
2015-08-10 15:37:14 -07:00
Johann
ce2ca9f777 Duplicate reference variance code
Some places are using the unoptimized variance function. This was never
intended and does not fit into the optimization framework.

Change-Id: Id96238407aad03b0ffd4a46cd183555a026daedc
2015-06-03 13:28:59 -07:00
Johann
c3bdffb0a5 Move variance functions to vpx_dsp
subpel functions will be moved in another patch.

Change-Id: Idb2e049bad0b9b32ac42cc7731cd6903de2826ce
2015-05-26 12:01:52 -07:00
Johann
1d7ccd5325 Relocate memory operations for common code
With the sad functions, and hopefully the variance functions soon,
moving to the vpx_dsp location, place the defines used in the
reference C code in a common location.

Change-Id: I4c8ce7778eb38a0a3ee674d2f1c488eda01cfeca
2015-05-13 11:41:15 -07:00
Paul Wilkins
0d3d6e0e31 Increase strength of AQ1.
This patch greatly increase the strength of AQ1.

Visual tests show strong gains on many clips but their is a big
hit on psnr.

SSIM is more mixed with some winners and losers.

Change-Id: Idaa5d3b41d8576096bfa000b62bc531c3d8bf6a1
2014-11-27 10:53:37 +00:00
Paul Wilkins
ea494c0e76 Fix some minor nits.
Change-Id: Ib8810d431fa20a2c78e0caaa28eb2c99903e60fb
2014-11-21 14:13:59 -08:00
Paul Wilkins
1663eff7f8 Switch AQ1 segment basis from q ratio to rate ratio.
In defining the Q deltas for segments in AQ1 use a rate
ratio rather than a q ratio.

Change-Id: Id31a74fcf2b7e55437e42a51c21b3cbcb57028d4
2014-11-21 08:50:57 -08:00
Paul Wilkins
fc47c5d653 Add adaptive midpoint for AQ1.
Make the midpoint variance used in AQ mode 1 segmentation
depend on the overall complexity of the frame in two pass.

Change-Id: I452814ec57f7a32352e41bb250e78066abe952dd
2014-11-20 18:37:34 -08:00
Paul Wilkins
d031237999 Add variance restriction to AQ2.
Add an additional restriction to bit/complexity based
segmentation based on spatial variance.

Only lower Q when both the number of bits spent
in the initial encoding pass and the spatial complexity are
below a threshold. This will prevent the low Q segments
being used just because there is a surfeit of bits.

Small metrics gains especially opsnr.
derf ~0.2% std-hd ~0.3%

Change-Id: I6a8496d466d673f9b0e2b2ca6304ea7b6d8e1cce
2014-11-20 16:23:35 -08:00
Paul Wilkins
3d1e8c9a85 Further AQ1 clean up.
Further patch to restructure AQ mode 1.

Change-Id: I566452a033d047a49a40441a7be24690ea69412d
2014-11-20 16:00:51 -08:00
Paul Wilkins
6a760d483d Initial AQ1 restructuring.
This is the first of a series of patches to restructure and
improve AQ mode 1 (variance based AQ).

Change-Id: Idcf693131a3ea2459dcfd957a54a65b971fa4a2a
2014-11-20 15:50:15 -08:00
Paul Wilkins
31b6d7c1eb AQ1 - remove first pass weights.
Removed redundant weighting function tied for AQ1 from first
pass code.

Improvment in baseline AQ1 results:-
Derf  opsnr +0.142% SSIm +0.258%
YT  opsnr +0.173% SSIm +0.3%

Change-Id: I16ef91caf2d7f302cd5940cc5e2626d48ebcb212
2014-11-07 14:11:29 +00:00
Deb Mukherjee
1929c9b391 Rename highbitdepth functions to use highbd prefix
Uses highbd_ prefix convention consistently.

Change-Id: I58f7f799a7ff8e32701bcd71c955bcf1cdd4581e
2014-10-09 14:40:40 -07:00
Deb Mukherjee
993d10a217 Adds various high bit-depth encode functions
Change-Id: I6f67b171022bbc8199c6d674190b57f6bab1b62f
2014-09-25 01:50:36 -07:00
Deb Mukherjee
5cd0aab81a Adds high bitdepth quantization functions
Adds various high bitdepth quantization functions.

Change-Id: I36fc0bf75a1bd15128ed271df8723de0ac134b0c
2014-09-16 14:55:37 -07:00
Alex Converse
03c276ea17 Split vp9_rdopt into vp9_rdopt and vp9_rd.
vp9_rdopt is for making rd optimal mode decisions. vp9_rd is for all
other rd related routines. Anything used outside of making an rd optimal
decision belongs in rd.

Change-Id: I772a3073f7588bdf139f551fb9810b6864d8e64b
2014-07-02 15:33:33 -07:00
Dmitry Kovalev
91dbac178f Moving compute_qdelta functions into vp9_ratectrl.{h, c}.
Change-Id: I512f2a287dd8765879a2d1144e2f028dc65f71ff
2014-04-07 16:57:53 -07:00
Marco Paniconi
03a9e5edb6 Rename the aq_mode files.
Change-Id: Id76a628495c822e23825b66a7589b4a3279680e2
2014-03-21 15:20:59 -07:00