Commit Graph

18 Commits

Author SHA1 Message Date
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
James Zern
59b560acef vp9_aq_complexity.c: remove unused macros
DEFAULT_COMPLEXITY
VAR_STRENGTH_STEP

unused since first commit

Change-Id: I4a47544098caf0d72e571633b7776146be88237c
2016-02-02 18:01:30 -08:00
Yaowu Xu
0dfe9618c3 Properly set segmentation for error-resilient mode
Change-Id: I0c85b637e51dc949a4e919f10a78870f23c2ca6a
2016-01-13 17:27:17 -08:00
Johann
c5f11912ae Include vpx_dsp_common.h when using VPXMIN/MAX
Change-Id: I2e387a06484a06301f3cd6600c4ba2f4335b61ee
2015-08-31 14:36:35 -07:00
James Zern
5e16d397bd vpx_dsp_common: add VPX prefix to MIN/MAX
prevents redeclaration warnings;
vp8 has its own define which will be resolved in a future commit

Change-Id: Ic941fef3dd4262fcdce48b73075fe6b375f11c9c
2015-08-26 20:11:32 -07: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
James Zern
97db651ce0 vp9: add some missing includes
mostly: <file>.c should include <file>.h
silences missing prototype warnings

Change-Id: Ic05ec32c6f7b2224b78825904d96d73aacad6000
2015-05-15 10:43:47 -07:00
James Zern
f58011ada5 vpx_mem: remove vpx_memset
vestigial. replace instances with memset() which they already were being
defined to.

Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28 20:00:59 -07:00
Paul Wilkins
e68c8dcfd2 Substantial restructuring of AQ mode 2.
The restructure moves the decision into the rd pick
modes loop and makes a decision based at the 16x16
block level instead of only the 64x64 level.

This gives finer granularity and better visual results
on the clips I have tested. Metrics results are worse
than the old AQ2 especially for PSNR and this mode
now falls between AQ0 and AQ1 in terms of visual
impact and metrics results.

Further tuning of this to follow.

It should be noted that if there are multiple iterations
of the recode loop the segment for a MB could change
in each loop if the previous loop causes a change in the
complexity / variance bin of the block. Also where a block
gets a delta Q this will alter the rd multiplier for this block
in subsequent recode iterations and frames where the
segmentation is applied.

Change-Id: I20256c125daa14734c16f7cc9aefab656ab808f7
2014-12-09 15:10:52 +00:00
Paul Wilkins
00e3626e13 Use average mb energy from first pass in AQ2 test.
AQ2 modified to use mb_av_energy in defining variance
thresholds used alongside complexity when defining the
segment to be used for an SB64.

Slight improvements in metrics (ssim and PSNR).

Change-Id: Idb9cb73f7d9c4f7118cd7e84ac77b0f25cacbf81
2014-12-02 16:07:30 +00:00
Yunqing Wang
edbd61e136 vp9_ethread: modify VP9_COMP structure
This patch modified struct VP9_COMP. Created a struct ThreadData
to include data that need to be copied for each thread. In
multiple thread case, one thread processes one tile. all threads
share one copy of VP9_COMP,
(refer to VP9_COMP *cpi in the code)
but each thread has its own copy of ThreadData,
(refer to ThreadData *td in the code).
Therefore, within the scope of encode_tiles(), both cpi and td
need to be passed as function parameters.

In single thread case, the FRAME_COUNTS pointer in ThreadData
points to "counts" in VP9_COMMON.

Change-Id: Ib37908b2d8e2c0f4f9c18f38017df5ce60e8b13e
2014-11-24 17:57:38 -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
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
Paul Wilkins
adf4293e4e Adapt strength of AQ2.
Adapt the use of segmentation in AQ mode 2 based on
the ambient kf/arf/gf Q.

Disable segmentation where the rate per SB is very
low and overheads are likely to outweigh the benefits.

This patch reduces the -ve average metrics impact
of AQ mode 2 while allowing stronger 3 segment AQ
in some cases. Average improvement ~0.5-1.0%.

Change-Id: I5892dfcc7507c5cc6444531cc7fe17554cf8d0c7
2014-07-02 16:34:26 +01:00
Paul Wilkins
090d07984f Fix AQ mode 2 bug where delta causes Q 0.
In Aq mode 2 for kf/arf/gf the segment q delta
is calculated and then applied by re-quantization without
going through the rd loop again. If the base Q != 0
but the segment Q == 0 (lossless) this can could give rise
to a situation where we have an illegal combination of
transform size and Q. (Q == 0 requires that all blocks
are coded 4x4 WHT).

Change-Id: I241a58c6494ed442e9e4630070b0cde0fb99ae45
2014-06-03 13:31:32 +01: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
2b06bf20ce Move aq_mode=2 (complexity_aq) to separate file.
Change-Id: Iffa45b9b04196c1ded6037622a8644a2500a62de
2014-03-26 18:01:59 -07:00