Commit Graph

1145 Commits

Author SHA1 Message Date
Debargha Mukherjee
02345be986 Adding an aq mode for 360 videos
Different quality levels are used for different regions in
the frame depending on how far they are vertically from the
center. Specifically, three segments are used based on the
mi_row index with respect number to the number of mi_rows in
the frame.

Change-Id: Ifc8b777bc58ea8521dffc4640360c67d99f8d381
2016-01-13 16:17:37 -08:00
Marco
b121a3e7b8 aq-mode=3: Don't reset segment if block is determined to be skin.
For coding block sizes <=16X16, if the block is determined to be skin,
then always allow for that block to be candidate for refresh. So if that
block happens to be on the boost segment(s), segment won't get reset to 0
and delta-q will be applied.

PSNR/SSIM metrics neutral (little/no change) on RTC clips.
Speed increase small/negligible (< 1%).
Some visual improvement on faces in a few RTC clips.

Change-Id: I6bf0fce6f39d820b491ce05d7c017ad168fce7d6
2015-12-22 10:23:44 -08:00
Marco
f0961498a0 vp9-svc: Fix to allow for 4x4 variance for low resolutions.
Change-Id: I3ec08e10d9ebf6d8b8a03004a320523f926e5cc4
2015-12-16 13:38:41 -08:00
Marco
26fda00840 Non-rd variance partition: Lower the 64->32 force split threshold.
Change-Id: I837551bdf87197bee8a193353bb31f4cff794787
2015-12-15 17:29:01 -08:00
Marco Paniconi
12084f6d57 Merge "Revert "Add "unknown" status for noise estimation."" 2015-12-15 16:46:06 +00:00
Marco Paniconi
f3e7539c67 Revert "Add "unknown" status for noise estimation."
This reverts commit e15fedb925.

Change-Id: Ibf2bce008c727a9754f88814b7630095fa7b8253
2015-12-15 16:44:40 +00:00
James Zern
b81f04a0cc Merge "move vp9_avg to vpx_dsp" 2015-12-15 03:41:22 +00:00
Jacky Chen
b7654afb6b Merge "Add "unknown" status for noise estimation." 2015-12-15 00:41:23 +00:00
jackychen
e15fedb925 Add "unknown" status for noise estimation.
Change-Id: I0fe95332ccfa2e1ad2a01a8e7ddd631289e0f8eb
2015-12-14 15:38:20 -08:00
James Zern
d36659cec7 move vp9_avg to vpx_dsp
Change-Id: I7bc991abea383db1f86c1bb0f2e849837b54d90f
2015-12-14 14:42:12 -08:00
Marco
6f17954f85 Non-rd variance partition: Adjust logic for 32->16 force split.
Lower the threshold for splitting 32x32->16x16 based on average variance,
and add lower bound condition for this split to occur. This prevents
unneccassry splitting for areas with very low variance.

Change-Id: Ibeb33b3d993632c2019f296eb87ef3b7e3568189
2015-12-14 12:54:10 -08:00
Marco
d4440614ae Non-rd variance partition: Adjustments to reduce dragging artifact.
For non-rd variannce partition, speed >= 5:
Adjustments to reduce dragging artifcat of background area near
slow moving boundary.

-Decrease base threshold under low source noise conditions.
-Add condition to split 64x64/32x32 based on average variances
of lower level blocks.

PSNR/SSIM metrics go down ~0.7/0.9% on average on RTC set.
Visually helps to reduce dragging artifact on some rtc clips.

Change-Id: If1f0a1aef1ddacd67464520ca070e167abf82fac
2015-12-11 16:16:02 -08:00
Marco
d5b3f29f3c Adjust variance threshold based on source noise level.
For non-rd variance partition: Adjust variance threhsold based
on noise level estimate. This change allows the adjustment to be
updated more frequently.

Change-Id: Ie2abf63bf3f1ee54d0bc4ff497298801fdb92b0d
2015-12-04 14:43:39 -08:00
Marco
6490fc71a7 Non-rd partition: Use force split on 16x16 for low resolutions.
For low resolutions, whem 4x4downsample is used for variance,
use the same force split (that is used for 8x8downsample) for 16x16 blocks.

No change in metrics. Small improvement visually.

Change-Id: I915b9895902d0b9a41e75d37fee1bf3714d2366d
2015-12-04 09:24:28 -08:00
Debargha Mukherjee
01a2b40e95 Merge "Spatial SVC crash fix" 2015-12-01 21:24:46 +00:00
Marco
f78b7daec4 Condition use of minmax in variance partition on speed setting.
For non-rd variance partition: only allow minmax computation
(which currently has no arm-neon optimization) for speeds < 8.

Performance loss is small: On RTC set with speed 8, few clips lose ~2/3%,
average loss is < 1%.

Change-Id: Ia9414f4d0b77dc83c3e73ca8de5d903f64b425ce
2015-11-30 17:23:32 -08:00
Marco
5b0ddb931d vp9 denoiser: Re-evaluate ZEROMV after denoiser filtering.
For denoising, and for noise level above threshold, re-evaluate
ZEROMV for mode selection after denoising.
Current change only does this check if selected best mode (before denoising)
was intra.

Change-Id: I4b1435b68d26c78f7597b995ee7bff0ddd5f9511
2015-11-24 17:30:32 -08:00
Debargha Mukherjee
e807517a93 Spatial SVC crash fix
Fixes a spatial_svc breakage introduced in
https://chromium-review.googlesource.com/#/c/305228/3.

Change-Id: I7f2cecbdca980addb85d5e58b58b5454f4730ada
2015-11-24 16:40:27 -08:00
paulwilkins
0149fb3d6b Changes to exhaustive motion search.
This change alters the nature and use of exhaustive motion search.

Firstly any exhaustive search is preceded by a normal step search.
The exhaustive search is only carried out if the distortion resulting
from the step search is above a threshold value.

Secondly the simple +/- 64 exhaustive search is replaced by a
multi stage mesh based search where each stage has a range
and step/interval size. Subsequent stages use the best position from
the previous stage as the center of the search but use a reduced range
and interval size.

For example:
  stage 1: Range +/- 64 interval 4
  stage 2: Range +/- 32 interval 2
  stage 3: Range +/- 15 interval 1

This process, especially when it follows on from a normal step
search, has shown itself to be almost as effective as a full range
exhaustive search with step 1 but greatly lowers the computational
complexity such that it can be used in some cases for speeds 0-2.

This patch also removes a double exhaustive search for sub 8x8 blocks
which also contained  a bug (the two searches used different distortion
metrics).

For best quality in my test animation sequence this patch has almost
no impact on quality but improves encode speed by more than 5X.

Restricted use in good quality speeds 0-2 yields significant quality gains
on the animation test of 0.2 - 0.5 db with only a small impact on encode
speed. On most clips though the quality gain and speed impact are small.

Change-Id: Id22967a840e996e1db273f6ac4ff03f4f52d49aa
2015-11-13 10:16:31 +00:00
Marco
419da5c734 Adjust variance threshold for 16x16 split at low resolutions.
Change-Id: I635e37f81237e9703d7d9a11ed76a043f4ec6eb0
2015-11-12 17:58:31 -08:00
Marco Paniconi
1b63238b67 Merge "Non-rd partition: reduce variance threshold low resolutions." 2015-11-12 06:08:38 +00:00
Marco
1827764450 Adjust varianace threshold for high noise condition.
Change-Id: I91c722e480328ff95b8c57614d8176ccaceb2539
2015-11-11 18:06:21 -08:00
Marco
064a9eca49 Non-rd partition: reduce variance threshold low resolutions.
Change-Id: I06306905d187948a92f839357df5d21413823808
2015-11-10 15:42:58 -08:00
Marco
c7da053d4b Move noise level estimate outside denoiser.
Source noise level estimate is also useful for
setting variance encoder parameters (variance thresholds,
qp-delta, mode selection, etc), so allow it to be used also
if denoising is not on.

Change-Id: I4fe23d47607b4e17a35287057f489c29114beed1
2015-11-02 12:15:26 -08:00
Marco
8a2fc54508 Adjustments to vp9-denoising.
Adjust variance threshold, delta-qp, and intra penalty cost,
based on estimated noise level in source.

Replace denoising_on with a level value=L/M/H.

Change-Id: I0c017dae75a5d897367d2c42dec26f2f37e447c1
2015-10-27 10:44:19 -07:00
Yaowu Xu
1832ba7509 Restore partial changes from previous commit
This portion was tested to have no effect on asan test failures.

Change-Id: I3de1dab7479148bdffc24c4568cb2e7e9963f099
2015-10-16 00:28:37 +00:00
Yaowu Xu
4727fa2a75 Fix two asan failures
Change-Id: I57865e9604ac162ef0d97deb16e81ca436a98428
2015-10-14 18:03:31 -07:00
Yaowu Xu
c2b8b5bfe2 Merge "Changes to partition breakout rules." 2015-10-13 22:31:56 +00:00
paulwilkins
cdc359989a Changes to partition breakout rules.
Changes to the breakout behavior for partition selection.
The biggest impact is on speed 0 where encode speed in
some cases more than doubles with typically less than 1%
impact on quality.

Speed 0 encode speed impact examples
Animation test clip: +128%
Park Joy:  +59%
Old town Cross: + 109%

Change-Id: I222720657e56cede1b2a5539096f788ffb2df3a1
2015-10-13 14:19:06 -07:00
Marco
86ede50943 Fix to denoiser with dynamic resize.
Temporary fix to denoiser when dynamic resizing is on.
 -Reallocate denoiser buffers on resized frame.
 -Force golden update on resized frame.
 -Don't denoise resized frame, and copy source into denoised buffers.

Change-Id: Ife7638173b76a1c49eac7da4f2a30c9c1f4e2000
2015-10-02 11:50:57 -07:00
Marco
3f7656cc23 Limit cyclic refresh on steady background blocks.
Use the existing QP condition on limiting cyclic refresh, and add
addiitonal condition that block has been encoded with zero/small motion
x frames in row (where x is at least several times the refresh period).
Additional condition only affect non-screen content mode.

This helps to improve visual stability for noisy input, where on steady
background areas the application of delta_qp may lead to encoding the noise.

Also added a change to use the true skip (after encoding) to update the
last QP.

Change-Id: I234a1128d017d284cf767fdb58ef6c59d809f679
2015-09-25 10:40:35 -07: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
Marco
e18800443c Fix to non-rd variance partition selection.
Only test for using golden as reference for variance partition
selection if it is used as a reference for that frame.

For temporal layers, golden may not be a reference on a given frame,
even though it was for some previous frame. If it is not a reference
for current frame, don't check/use it for partition selection.

Change-Id: I6b0f2bd36aebbb5903077c9a0a66d80f1de9a7b1
2015-08-17 13:32:40 -07:00
hui su
cb79ea1c16 Call set_ref_ptrs only for inter blocks
In encode_superblock, call set_ref_ptrs only for inter blocks.

Change-Id: I27545c0e3e679e1838b78d7c9d01fe5a4d3cc0fb
2015-08-12 11:25:43 -07:00
hui su
088b05fd99 Use sizeof(variable) instead of sizeof(type)
Change-Id: Ia069da11eebb271063e9eb837bdb3e7175ecce13
2015-08-12 11:25:38 -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
Marco
f6255dbb53 Bugfix for svc.
Condition usage of rc.frames_since_golden to non-svc mode.

rc.frames_since_golden, which is used in non-svc mode to add second reference,
was causing, under certain condiiton, the turning off of golden reference
for svc case.

Change-Id: Icec644d235d0471e56d8ff73d6c37278bd6ecd3b
2015-08-05 13:59:52 -07:00
Yunqing Wang
3b2e73b9a4 Remove tx cache and speed up tx size selection
1. The RD scores obtained during the tx size selection were stored in the
tx cache, and used to help make the tx decision for the following frames.
This wasn't used anymore in VP9 encoder. Recovered the related decision
making code from 1.5+ years ago, and borg tests didn't show any quality
gain. This patch removed it to lower the complexity.

2. An optimization was done after the above refactoring. If the tx_mode
is not TX_MODE_SELECT, we only need to test the chosen tx size instead
of all posible tx sizes. This gave a 1.5% average speed gain at speed 2,
and a 1% average speed gain at speed 3.

Change-Id: Id8cd650e066a8cef33829d8c15388a8138adc78c
2015-07-30 18:53:40 -07:00
Jingning Han
4b5109cd73 Replace vp9_ prefix in 2D-DCT functions with vpx_
Clean up the forward 2D-DCT function names in vpx_dsp.

Change-Id: I3117978596d198b690036e7eb05fe429caf3bc25
2015-07-28 16:06:44 -07:00
Yunqing Wang
b2446fb6be Remove tx_select_threshes
Removed unused tx_select_threshes and tx_select_diff.

Change-Id: I5e9e7ad170056efe14b5f071e94d0c5a36e4a34c
2015-07-27 12:02:05 -07:00
paulwilkins
4b44e46de0 Merge "Changes to use of rectangular partitions." 2015-07-09 18:34:41 +00:00
paulwilkins
2d637ca36d Merge "Change speed and rd features for formatting bars." 2015-07-09 16:38:38 +00:00
Jingning Han
535cc6d87f Format fixes in vp9_encodeframe.c and vp9_encodemb.c
Change-Id: Ib1303dac9043ab1b1f8fce54611cf4ea8a208038
2015-07-09 00:04:28 +00:00
paulwilkins
8dd466edc8 Changes to use of rectangular partitions.
Changes to allow more use of rectangular partitions at
speeds 1 and 2 for content classed by the first pass as
animation and for blocks near the active image edge.

This has quite a big impact in quality for the animated
test sequence but also hurts encode speed for speed 2.

For other content types the impact on both speed and
quality is small.

Added some plumbing for detection of internal vertical
image edges.

Change-Id: I3fc48de2349f8cb87946caaf0b06dbb0ea261a9a
2015-07-08 18:14:12 +01:00
paulwilkins
a126b6ce7d Change speed and rd features for formatting bars.
Change speed features / behavior for split mode when there
is an internal active edge (e.g. formatting bars).

Remove some threshold constraints in rd code near the active
edge of the image.

Add some plumbing for left and right active edge detection.

Patch set 5. Limit rd pass through for sub 8x8 to internal active edges.
This takes away any speed penalty for most clips but keeps the enhanced
edge coding for the more critical case of internal image edges

Change-Id: If644e4762874de4fe9cbb0a66211953fa74c13a5
2015-07-08 17:51:42 +01:00
Marco
478fbc8f23 Update to speed 5 non-rd mode partition search.
If the pre-selected partition size (from variance partition) is
32x32, also apply nonrd partition search for 32x32 and 16x16 size.

Overall small positive gain in metrics, average ~1%.
Some visual improvement, for lower resolutions.

Change-Id: I69cb425bda94f7d13d34c451ab30e9276335a30e
2015-07-07 11:52:01 -07:00
paulwilkins
99f8bd72cb Alter partition search at image edge.
Added code to reduce the minimum partition size searched
for super blocks at or straddling the edge of the image.

If the first pass has detected formatting bars the "active" edge
may not be the real edge.

Change-Id: I9c4bdd1477e60f162a75fac95ba6be7c3521e05c
2015-07-02 16:25:25 +01:00
James Zern
e757808429 Merge "vp9_pred_common: inline vp9_get_tx_size_context" 2015-07-02 01:52:40 +00:00
James Zern
0ea304620c Merge "vp9_pred_common: inline vp9_get_segment_id" 2015-07-02 01:52:21 +00:00