Commit Graph

9732 Commits

Author SHA1 Message Date
Scott LaVarnway
e702b68b6c vp9: strip mb graph code
when CONFIG_REALTIME_ONLY is enabled.

BUG=webm:1446

Change-Id: I4b1b8e9a456830ba1b1bd3a8882e038d37ee7903
2017-08-11 12:59:40 -07:00
Jerome Jiang
d48be6ad73 Merge "vp9 SVC: Fix the denoiser frame buffer management." 2017-08-11 00:54:35 +00:00
Jerome Jiang
0f8ebddec4 vp9 SVC: Fix the denoiser frame buffer management.
Change the denoiser frame buffer management for SVC to more generally
handle the layer patterns in SVC (where last is not always refreshed).

This change is only for SVC with denoising and is bitexact.

Change-Id: Ic2b146a924cdf6e7114609158afa3d4880fe3fae
2017-08-10 16:56:46 -07:00
paulwilkins
db8fa86a6c Patch relating to Issue 1456.
Testing of 4k videos encoded with a fixed arbitrary chunking interval
uncovered a bug where by if a chunk ends 1 frame before a real scene cut,
the next chunk may be encoded with two consecutive key frames at the start
with the first being assigned 0 bits.

This fix insures that where there is a key frame group of length 1 it is
at least assigned 1 frames worth of bits not 0.

See also patch Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a
which by virtue of allowing fast adaptation  of Q made this bug more visible.

BUG=webm:1456

Change-Id: Ic9e016cb66d489b829412052273238975dc6f6ab
2017-08-09 16:34:43 +01:00
Marco
427de67e63 vp9: Partition logic adjustment for speed 6 feature.
When adapt_partition_source_sad is enabled (currently only at
speed 6 for resoln <= 360p): use lower subsize (8x8 instead of 16x16)
for nonrd_select_partition on 32X32 blocks.

And force avoiding rectangular partition checks in
nonrd_pick_partition for speed >= 6.

Small increase ~0.5 in metrics for speed 6 on rtc_derf,
no change in speed.

Change-Id: Id751bc8f7573634571b2d6f5e29627cd5cebccae
2017-08-08 11:31:27 -07:00
paulwilkins
76d77aa013 Enable emergency fast Q adaptation for VBR test case.
Enable fast adaptation of Q when there is a large overshoot
for the  #ifdef AGGRESSIVE_VBR test case.

AGGRESSIVE_VBR  is not currently enabled by default.

Change-Id: I7240bb6589795964b6b0b66df4468e4f21504e0f
2017-08-03 12:06:07 +01:00
Yunqing Wang
bfd0f41f9b Force the bit exactness in the first pass
Originally, for the purpose of keeping a fast first pass, the first-pass
stats between row_mt_mode = 0 and row_mt_mode = 1 are not bit exact, but
that difference is very small that doesn't cause a mismatch between the
final bitstreams. However, if the encoder changes, this minor difference
may cause a mismatch. Thus, this patch always forces the first pass to
be bit exact.

BUG=webm:1453

Change-Id: I2b67cf529dee81f660f9d9e7fe9a60ea3c7b12b8
2017-08-02 15:58:39 -07:00
Paul Wilkins
3be14200fc Merge "Respond more rapidly to excessive local overshoot." 2017-08-01 08:58:36 +00:00
Marco
5d6c1c2d8f vp9: Adjust noise estimation for 360p.
Change-Id: Ib76875232491b14f7114061e8e913e87004427a0
2017-07-31 17:12:58 -07:00
Marco Paniconi
ebb023deb6 Merge "Revert "Revert "vp9: Speed feature to adapt partition based on source_sad.""" 2017-07-31 14:58:15 +00:00
Marco
999bd6ea84 vp9: Fix denoising condition when pickmode partition is used.
When the superblock partition is based on the nonrd-pickmode,
we need to avoid the denoising. Current condition was based on
the speed level. This change is to make the condition at the
superblock level, as the switch in partitioning may be done at
sb level based on source_sad (e.g., in speed 6).

Change-Id: I12ece4f60b93ed34ee65ff2d6cdce1213c36de04
2017-07-30 23:16:38 -07:00
Jerome Jiang
f027908ad0 Revert "Revert "vp9: Speed feature to adapt partition based on source_sad.""
This reverts commit c9266b8547.

Disable source_sad when resolution > 1080P. The test should
pass now.

BUG=webm:1452

Change-Id: I72dde88e66590ff9e41da5e5dd83f5550a83f082
2017-07-30 19:49:31 -07:00
James Zern
c9266b8547 Revert "vp9: Speed feature to adapt partition based on source_sad."
This reverts commit 064fc570ff.

This causes an assertion failure in vp9_mcomp.c when running
gtest_filter=VP9/MotionVectorTestLarge.OverallTest/41:
`mv->col >= -((1 << (11 + 1 + 2)) - 1) && mv->col < ((1 << (11 + 1 + 2))
- 1)'

Change-Id: I449e777bf18b661cb3f1d82253610c55c51687f6
2017-07-29 11:36:58 -07:00
Marco Paniconi
5d0bef4763 Merge "vp9: Adjust logic in source sad for screen content." 2017-07-29 01:46:58 +00:00
Marco Paniconi
e48dfcead1 Merge "vp9: Speed feature to adapt partition based on source_sad." 2017-07-29 01:45:19 +00:00
Jerome Jiang
ac211fe23e vp9: Adjust logic in source sad for screen content.
Change-Id: I917d106f4c95ea44e413e23881f6303982e1a6a3
2017-07-28 17:25:41 -07:00
Marco
064fc570ff vp9: Speed feature to adapt partition based on source_sad.
Move the source_sad feature to speed 6 (from speed 7), and
add speed feature to switch from the variance-based partition
to reference_partition (which uses nonrd-pickmode for bsize selection)
if source_sad is high.

Currently used only for speed 6 for resoln <= 360p.
About 4-5% improvement on 360p in RTC set.
Some speed slowdown, but still ~30% faster than speed 5.

Change-Id: Ib0330ee5fe9fdd2608aed91359a2a339d967491c
2017-07-29 00:20:26 +00:00
Urvang Joshi
7105e66d19 Remove the DP version of vp9_optimize_b().
The greedy version was already enabled by default here:
https://chromium-review.googlesource.com/c/546848/

And the speed+compression gains from greedy version were already
mentioned here:
https://chromium-review.googlesource.com/c/531675/

Change-Id: Iad9f7d03490c845ad1e230af028c9d39edddca97
2017-07-28 23:12:57 +00:00
James Zern
8836e46ffd set_var_thresh_from_histogram: prevent negative variance
For 8-bit the subtrahend is small enough to fit into uint32_t.

For 10/12-bit apply:
63a37d16f Prevent negative variance

previously:
47b9a0912 Resolve -Wshorten-64-to-32 in highbd variance.
c0241664a Resolve -Wshorten-64-to-32 in variance.

Change-Id: I181c85f0b9a03da37c2e8b89482d48aa3dbc0aee
2017-07-22 13:27:32 -07:00
Jerome Jiang
4526644615 vp9: Removed unused skin detection function.
Change-Id: I6702b7b11aa4ac9aac5fd54deef4377cdcb29c64
2017-07-18 14:52:04 -07:00
Jerome Jiang
59e461db1f Merge "vp9: Allocate alt-ref in denoiser for SVC." 2017-07-18 21:30:04 +00:00
Jerome Jiang
babef23a5f Merge "vp9: Remove isolated skin & non-skin blocks." 2017-07-18 20:48:32 +00:00
Jerome Jiang
fd216268ad vp9: Allocate alt-ref in denoiser for SVC.
When SVC is used, allocate alt-ref in denoiser.

Change-Id: I1b17221b55b9444cd23b97d481b54ff8d296d857
2017-07-18 13:22:47 -07:00
Jerome Jiang
adbfc4308a vp9: Remove isolated skin & non-skin blocks.
0.007% regression on rtc and 0.004% gain on rtc_derf.
1 thread on QVGA,VGA and HD has ~0.2% speed regression while 2 threads has
~0.2% speed gain on Google Pixel.

Change-Id: Ia4a6ec904df670d7001e35e070b01e34149d23dc
2017-07-18 11:29:14 -07:00
Marco
817f68cdcf vp9: Disable usage of sb_use_mv_part for SVC.
To fix valgrind issueis with SVC tests.
SVC encoding uses prune_evenmore which is causing uinit value.

Will re-enable later when issue is resolved.

Change-Id: I257ff878cf78197ddd813db056582a4d5fe94f44
2017-07-18 09:28:56 -07:00
Marco
ad56371343 vp9: Fix to setting content_state for real-time mode.
When content_state_sb is set to LowVarHighSumdiff, don't reset
it to VeryHighSad. Visually better on clips with strong lighting changes.

Small/negligible change in RTC metrics and speed.

Change-Id: I20c383e3c4cf8d1149de5f9260449c0b7cf7c6aa
2017-07-17 16:21:25 -07:00
Marco
0c9e2f4c15 vp9: Reuse motion from choose_partitioning in NEWMV search.
When int_pro_motion_estimation is done for superblock in
choose_partitioning, use it to avoid the full_pixel_search
for NEWMV mode, if bsize is >= 32X32.

For speed > 7.
Small/neutral change on RTC metrics.
~1-2% speedup on arm on high motion clip.

Change-Id: I3cfe6833ff4bf75d4afa83eaf058ad45729de85b
2017-07-17 13:15:48 -07:00
Jerome Jiang
682135fa60 vp9: Compute skin only for blocks eligible for noise estimation.
Change-Id: Iddcb83a5968db57cfd312c5bc44b2a226a2a3264
2017-07-14 15:14:30 -07:00
Marco
666e394d41 vp9: Adjust minmax threshold for variance partitioning.
Only affects speed 7. Improvement on high motion clips.

Change-Id: Ibddb68fed9c63207df29ffd790f9205b1cecf687
2017-07-13 21:19:37 -07:00
James Zern
b578d59623 Merge "remove vp9_firstpass.c w/CONFIG_REALTIME_ONLY" 2017-07-12 23:30:04 +00:00
Marco Paniconi
f6586b8bf8 Merge "vp9: Fix to SVC and denoising for fixed pattern case." 2017-07-12 19:13:05 +00:00
Urvang Joshi
1dee320446 Merge "Remove the token state array from greedy optimize_b." 2017-07-12 00:08:56 +00:00
James Zern
df18412f32 remove vp9_firstpass.c w/CONFIG_REALTIME_ONLY
BUG=webm:1446

Change-Id: I6e0ea9342c715d354c641109737172afa649b85b
2017-07-11 13:10:16 -07:00
Urvang Joshi
5322a31b18 Remove the token state array from greedy optimize_b.
Reduces memory usage, and speeds up encoding for some difficult clips.
No impact on output or metrics.

Ported from aomedia patch:
https://aomedia-review.googlesource.com/c/14501

Change-Id: I26ec69af8336f9e80da486a1cfbfc89a3596954d
2017-07-11 13:05:29 -07:00
James Bankoski
7d5afa227a Merge "Reintroduce fix for max qindex calculation of a gf interval" 2017-07-11 19:47:16 +00:00
Jerome Jiang
1a4d8f2033 Merge "vp9: Move skinmap computation into multithreading loop." 2017-07-11 19:44:22 +00:00
Jim Bankoski
689ad89e86 Reintroduce fix for max qindex calculation of a gf interval
This reintroduces the fix:
  https://chromium-review.googlesource.com/c/422807/
and later reverted here:
  https://chromium-review.googlesource.com/c/447843/

BUG=webm:1355

This time behind a compile time flag :

configure --disable-always_adjust_bpm
configure --enable-always_adjust_bpm

This should make side by side testing easier and let users of the
lib pick which way they want to go.

Change-Id: I7d7b37b83015dc001810af84c132cbc1e71ba8d6
2017-07-11 18:40:26 +00:00
Marco
3818a3723b vp9: Fix to SVC and denoising for fixed pattern case.
For fixed pattern SVC: keep track of denoised last_frame buffer
for base temporal layer, and if alt_ref is updated on middle/upper
temporal layers, force an update to denoised last_frame buffer.
This allows for improved denoising on top temporal layers.

Change-Id: Icbd08566027d4d2eabc024d3b7a0d959d2f8c18b
2017-07-11 11:27:04 -07:00
Jerome Jiang
3d6b0cb825 vp9: Move skinmap computation into multithreading loop.
Change-Id: Iebc9dd293d8b1449c0674c0295349297e9b90646
2017-07-10 17:18:15 -07:00
Johann Koenig
4b78c6e6f7 Merge "remove vp9_full_sad_search" 2017-07-10 20:42:40 +00:00
Jerome Jiang
125a532b34 Merge "vp9: Remove alt-ref from denoiser." 2017-07-10 20:03:51 +00:00
Johann
109faffe9b remove vp9_full_sad_search
This code is unused in vp9. Only vp8 still contains references to
vpx_sad_NxMx[3|8] and only for sizes 16x16, 16x8, 8x16, 8x8 and 4x4.

Remove the remaining sizes and all the highbitdepth versions.

BUG=webm:1425

Change-Id: If6a253977c8e0c04599e25cbeb45f71a94f563e8
2017-07-10 11:20:35 -07:00
Jerome Jiang
2ac7c549e9 vp9: Remove alt-ref from denoiser.
Denoiser is used in real-time mode which does not use alt-ref.
Reduce memory usage when denoiser is enabled.

Change-Id: I54ba3bcaeeb1818bbdf718ef90e97d4897ff793d
2017-07-10 10:56:03 -07:00
James Zern
5d6060b62f Merge "cosmetics,vp9/: normalize inv/fwd_txfm naming" 2017-07-07 19:15:02 +00:00
Marco Paniconi
2075af4b16 Merge "vp9: Nonrd mode: use content_state_sb for high motion." 2017-07-07 03:00:59 +00:00
James Zern
80b83c73ba cosmetics,vp9/: normalize inv/fwd_txfm naming
+ vpx_dsp/, test/

itxfm -> inv_txfm, ftxfm -> fwd_txfm

Change-Id: I3aacdb65143576d64cfe5c9b14dd358c17c1fe7e
2017-07-06 18:35:44 -07:00
Marco
8c3f18efa1 vp9: Nonrd mode: use content_state_sb for high motion.
In the content_state for a superblock is set to HighSad,
use that to bias some decisions in variance partition and
nonrd pickmde: use int_pro_motion for sad computation in
choose_partitioning, and set large_block in pickmode based
on the content_state_sb.

Only affects speed >= 7.

Immprovement for high motion content.
Small gain (~1%) in RTC metrics.
Speedup of ~5 for high motion clip on android (speed 8, 1 thread).

Change-Id: I5774c4854f012b89c8e969f6129b60988c2ce11c
2017-07-06 15:05:19 -07:00
James Zern
5227b8200b vp9: remove FrameWorkerData & vp9_dthread.h
the file was empty after the struct removal. the only remaining use was
within vp9_dx_iface, but the wrapper became unnecessary after the
removal of frame_parallel_decode.

BUG=webm:1395

Change-Id: I515ab585d701e77d388d12b2802d844c424f9bcd
2017-07-05 22:32:00 -07:00
James Zern
48c4a038eb vp9: remove (un)lock_buffer_pool
there is no threaded access to this pool after the removal of
frame_parallel_decode

BUG=webm:1395

Change-Id: I710769b87102edc898c59eb9a2e7a91d8c49107f
2017-07-05 21:07:00 -07:00
James Zern
af3cab7b24 Merge changes from topic 'rm-dec-frame-parallel'
* changes:
  vp9_onyxc_int,RefCntBuffer: rm unused members
  remove vp9_dthread.c
  vp9: reduce FRAME_BUFFERS by 3
2017-07-06 04:06:30 +00:00
James Zern
4ffd8350be Merge changes from topic 'rm-dec-frame-parallel'
* changes:
  VP9_COMMON: rm frame_parallel_decode
  VP9Decoder: rm frame_parallel_decode
  vp9_dx: rm worker thread creation
2017-07-05 23:53:22 +00:00
Yaowu Xu
f2b1dc529f Merge "Further refactoring of mod error calculation." 2017-07-05 21:43:50 +00:00
paulwilkins
5b44ef0c50 Respond more rapidly to excessive local overshoot.
This patch attempts to address a bug reported for 4K video.
https://b.corp.google.com/issues/62215394

In this instance a perfect storm of a moderate complexity section
followed by a much easier section where a CGI overlay helped to
suppress film grain noise, followed by a much harder and very grainy
section at the end, cause a massive local rate spike that pushed a chunk
over the upper allowed rate limit.

This patch detects cases where the rate for a frame is much higher than
expected and allows, in this special case, for rapid adjustment of the active
Q range.

For the example chunk in the bug report the target rate was 18Mb/s and the
observed rate was over 37 Mb/s with a surge for the last few frames to over
100Mb/s. This patch brings the overall chunk rate right back down to ~18.2 Mbit/s
and  almost completely eliminates the rate spike at the end. (See graphs appended
to bug report)

Also see  I108da7ca42f3bc95c5825dd33c9d84583227dac1 which fixes a bug
unearthed during testing of this patch and also has a bearing on high rate
encodes such as 4K.

This patch does have a negative impact on some metrics. Most notably there are
clips in our standard test set where it hurts global psnr (though in many cases it
conversely helps SSIM, FAST SSIM and PSNR-HVS). It is also worth noting that
the clips (and data rates) where there is a big metric impact, are almost all cases
where there is currently a significant overshoot vs the target rate and overall rate
accuracy is greatly improved.

Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a
2017-07-05 16:51:52 +01:00
paulwilkins
a1af335f44 Further refactoring of mod error calculation.
Further refactoring to support alternative error distributions.

Change-Id: I0f7fa3fd6f3baa4b0a1e53c6aa3be63966e97b82
2017-07-05 16:49:37 +01:00
paulwilkins
b0459ec8ea Fix incorrect index test in GF group rate assignment.
Correct test for middle frame in the group.

Change-Id: I1ee49fa33968eb3c4a01d6a27a60bb1409e3e68c
2017-07-05 16:45:36 +01:00
James Zern
37e03b1d13 Merge "cosmetics,vp9/encoder: s/txm/txfm/" 2017-06-30 21:57:16 +00:00
Jerome Jiang
f781cc8a46 Merge "vp9: Adjust condition for checking intra mode." 2017-06-30 21:55:00 +00:00
Marco
2290898ac7 vp9: Adjust condition for checking intra mode.
For nonrd_pickmode: add condition for checking
intra mode if the sb content state is VeryHighSad.

Reduces artifacts when sudden change in content.

Metrics on RTC/RTC_derf neutral (small gain).
No speed loss observed.

Change-Id: I07006d28fd2dc06c1d06b07630102b0fece50c40
2017-06-30 14:52:00 -07:00
James Zern
303cb3106b vp9_onyxc_int,RefCntBuffer: rm unused members
the last frame_worker_owner, row and col references were removed in:
131bd06e6 remove vp9_dthread.c

BUG=webm:1395

Change-Id: Ia7fb2e8782b12a58d2a2263849d20a8abf06aef6
2017-06-30 12:03:07 -07:00
James Zern
bc837b223b VP9_COMMON: rm frame_parallel_decode
this has been 0 since the removal of frame_parallel_decode in
vp9_dx_iface.

BUG=webm:1395

Change-Id: I3a562b2c6b82050064d2b2ccb18a3e77c700b2da
2017-06-30 12:03:07 -07:00
James Zern
78fe5ca360 remove vp9_dthread.c
and the related prototypes in vp9_dthread.h. the last references were
removed in:
09dabc58d VP9_COMMON: rm frame_parallel_decode

vp9_dx_iface.c still uses FrameWorkerData

BUG=webm:1395

Change-Id: Ica8e98ae776fc0105f1fbbed9e0a729808980810
2017-06-30 12:03:07 -07:00
James Zern
ba76b662af VP9Decoder: rm frame_parallel_decode
this has been 0 since the removal of frame_parallel_decode in
vp9_dx_iface.

BUG=webm:1395

Change-Id: I3f579766ecfa4777395b99686738e1c5610f86ef
2017-06-30 12:03:07 -07:00
James Zern
fb134e759a vp9: reduce FRAME_BUFFERS by 3
the additional buffers are unneeded with the removal of
frame_parallel_decode

BUG=webm:1395

Change-Id: Id9ec4cb6462af5d07a0d3cf939bd216db27d9d9e
2017-06-30 12:03:07 -07:00
James Zern
86d51dfbf5 vp9_dx: rm worker thread creation
creating a thread associated with the sole worker isn't necessary when
only execute() is being used after the removal of frame_parallel_decode.

BUG=webm:1395

Change-Id: I2255ce72607321e5708bc82a632dc6825d4eff5c
2017-06-30 12:03:07 -07:00
James Zern
469986f963 Merge changes from topic 'rm-dec-frame-parallel'
* changes:
  vp9_dx,vpx_codec_alg_priv: rm *worker_id*
  vp9_dx,vpx_codec_alg_priv: rm *cache*
  vp9_dx,vpx_codec_alg_priv: rm frame_parallel_decode
2017-06-30 19:02:05 +00:00
James Zern
e3c8f2f152 vp9_dx,vpx_codec_alg_priv: rm *worker_id*
+ available_threads

these are unused with the removal of frame_parallel_decode

BUG=webm:1395

Change-Id: I59c5075542a5a74d4a539c213682f566b005f5a6
2017-06-29 16:21:50 -07:00
James Zern
dcdb013b55 vp9_dx,vpx_codec_alg_priv: rm *cache*
these fields are unused with the removal of frame_parallel_decode

BUG=webm:1395

Change-Id: Ia3821f7fb81d17b20033b094e5265b1030ee4030
2017-06-29 16:21:50 -07:00
James Zern
ab76f1f224 vp9_dx,vpx_codec_alg_priv: rm frame_parallel_decode
this field has been 0 since:
01d23109a vp9: make VPX_CODEC_USE_FRAME_THREADING a no-op

BUG=webm:1395

Change-Id: I15448e9401e15329b54c6878dda033b17be5ec6b
2017-06-29 16:21:50 -07:00
James Zern
8d1bda93f4 cosmetics,vp9/encoder: s/txm/txfm/
txfm is more commonly used as an abbreviation through the codebase

Change-Id: I86fd90ef132468f9da270091c05daa1f5a49ece2
2017-06-29 15:08:47 -07:00
Jerome Jiang
74dc640565 vp9: Remove avg2x2 in skin detection and clean up.
Change-Id: I6510e36866138f8ac4cb82c207e58e0b9522e499
2017-06-29 03:06:23 +00:00
Jerome Jiang
8582d33a0d Merge "vp9: compute skinmap only once before encoding." 2017-06-28 18:01:46 +00:00
Marco
88d11f473c vp9: Speed >= 8: Remove logic on reducing subpel.
Existing logic was only affecting resolutions above 720p.
Needs more testing for reducing subpel for speed >= 8.

No change on RTC metrics.

Change-Id: I2f4bf9f25891614aafa9a86aa5a5063a3ccfce4d
2017-06-27 20:27:02 -07:00
James Zern
515fed8f38 Merge "highbd_quantize_fp_32x32: normalize abs_qcoeff type" 2017-06-27 23:30:17 +00:00
Jerome Jiang
a220b931f5 vp9: compute skinmap only once before encoding.
This could save some cycles since skin detection is used in multiple
places in vp9.

1~2% speed up on ARM.

Change-Id: I86b731945f85215bbb0976021cd0f2040ff2687c
2017-06-27 16:16:02 -07:00
Linfeng Zhang
a76b6b232c Update load_input_data() in x86
Split to load_input_data4() and load_input_data8().
Use pack with signed saturation instruction for high bitdepth.

Change-Id: Icda3e0129a6fdb4a51d1cafbdc652ae3a65f4e06
2017-06-26 13:38:33 -07:00
Urvang Joshi
4bb99ee27e Enable greedy version of optimize_b() in VP9 by default.
Improvements were already mentioned in the previous patch:
https://chromium-review.googlesource.com/#/c/531675/

Change-Id: I4906ab1c61c25a815bdeb986016fad6dcb69eb71
2017-06-23 17:04:58 -07:00
Marco
18805eee6c vp9: Use scene detection for CBR mode.
Use the scene detection for CBR mode, and use it to reset the
rate control if large source sad is detected and rate
correctioni fact/QP is at minimum state.

Avoids large frame sizes after big content change following
low content period.

Only affects CBR mode for 1 pass at speeds 5, 6, 7.
Change-Id: I56dd853478cd5849b32db776e9221e258998d874
2017-06-23 11:44:50 -07:00
James Zern
88a302e743 Merge changes from topic 'missing-proto'
* changes:
  onyxd_int.h: add missing prototypes
  onyxd.h: add vp8dx_references_buffer prototype
  vp[89],vpx_dsp: add missing includes
  vp8,encodeframe.h: correct prototypes
  vp8: add temporal_filter.h
  add picklpf.h
  add ethreading.h
  vp8,bitstream.h: add missing prototypes
  vp8: remove vp8_fast_quantize_b_mmx
  vp8,loopfilter_filters: make some functions static
  vp9_ratectrl: make adjust_gf_boost_lag_one_pass_vbr static
  vp9_encodeframe: make scale_part_thresh_sumdiff static
  vp9_alt_ref_aq: correct vp9_alt_ref_aq_create proto
  tiny_ssim: make some functions static
2017-06-23 05:44:24 +00:00
Marco Paniconi
4f917912b9 Merge "vp9: Add high source sad to content state." 2017-06-22 22:18:48 +00:00
Paul Wilkins
92145006c3 Merge "Fix int overflow in rate control for high bit rates." 2017-06-22 16:30:40 +00:00
paulwilkins
efe1982e63 Fix int overflow in rate control for high bit rates.
Fix misplaced cast that caused an overflow and incorrect rate adaptation
behavior for high data rates. This in particular will have affected 4k encodes
but could also have come into play for some higher rate 1080p cases.

In our standard test sets the quality impact is small though several high rate
clips show improved rate accuracy. This can also impact the number of recode
loop hits and on one problem 4k  clip the encode time for speeds 0 and 1 was
reduced by >25%

Change-Id: I108da7ca42f3bc95c5825dd33c9d84583227dac1
2017-06-22 10:34:21 +01:00
Marco
d7515b1187 vp9: Add high source sad to content state.
Use it to limit NEWMV early exit in nonrd pickmode

Small change in RTC metrics, has some improvement
for high motion clips.
Change-Id: I1d89fd955e1b3486d5fb07f4472eeeecd553f67f
2017-06-21 20:57:17 -07:00
Marco Paniconi
33a9394eb1 Merge "vp9: Adjustments for aq-mode and pickmode for speed >= 8." 2017-06-22 03:27:47 +00:00
James Zern
44418c659f vp[89],vpx_dsp: add missing includes
quiets -Wmissing-prototypes

Change-Id: I841cfc019d592f2bc6b3fec5818051a31f4c53b5
2017-06-21 19:00:15 -07:00
James Zern
07f847873b vp9_ratectrl: make adjust_gf_boost_lag_one_pass_vbr static
quiets -Wmissing-prototypes

Change-Id: I72d899c2d8de1ddc52d90ac081f2629374b3a6e9
2017-06-21 19:00:14 -07:00
James Zern
9a329b5285 vp9_encodeframe: make scale_part_thresh_sumdiff static
quiets -Wmissing-prototypes

Change-Id: I696223d75860edba13c6b6f38c1f8db353a6f812
2017-06-21 19:00:14 -07:00
James Zern
3f296533f6 vp9_alt_ref_aq: correct vp9_alt_ref_aq_create proto
quiets -Wmissing-prototypes

Change-Id: Ib2d4f294f1982739bb2ac98155e789e040d309a1
2017-06-21 19:00:04 -07:00
James Zern
9e1d2de67c highbd_quantize_fp_32x32: normalize abs_qcoeff type
use an int to quiet an unsigned rollover warning similar to:
25110f283 Fix an ubsan warning: vp9_quantizer.c

Change-Id: Iedecb79a17249bc18f10c0920f88cf704920f12b
2017-06-21 18:56:10 -07:00
Marco
21afafa31a vp9: Put skin detection usage around cpi flag.
Skin detection usage in choose_partitioning should be
around the cpi->use_skin_detection.

Change-Id: I6986179af9ce94c60c0974d66c311fc07cc04cfe
2017-06-21 17:32:56 -07:00
Marco
8cf6f78fce vp9: Adjustments for aq-mode and pickmode for speed >= 8.
Adjust the threshold for turning off cyclic refresh for high motion,
and avoid testing golden in nonrd pickmode for speed >= 8 if
golden refresh was long ago.

No change/neutral on RTC metrics.
Change-Id: I40959b8d9637f3553e7458bbabd8c6024c2c09c0
2017-06-21 16:01:24 -07:00
hui su
d96ed96c0f VP9 level targeting: properly handle max_gf_interval
Don't overide max_gf_interval if it's not specified. It will
be assigned with a default value in vp9_rc_set_gf_interval_range().

BUG=b/62803416

Change-Id: Ide46ce00279ed076865fc54ce98c55a994f0c798
2017-06-20 16:29:04 -07:00
Marco Paniconi
737aa5c9e4 Merge "vp9: SVC: Rework the usage of base_mv for SVC." 2017-06-20 03:08:32 +00:00
Marco
ff7fb4b280 vp9: Speed >= 8: Adjust resolution threshold for subpel.
Get some quality gain on RTC metrics (~7%), with
~5-8% speed slowdown.

Change-Id: I0d02942a77074424ee0326b6e110ddff09f2df5e
2017-06-19 13:58:08 -07:00
Marco
112cd95507 vp9: SVC: Rework the usage of base_mv for SVC.
Set the base_mv_aggressive for temporal enhancement layers (TL > 0).
Under the aggressive mode, skip the NEWMV depending on the
SSE of the base_mv. Also reduce the subpel motion to 1/2 under
aggressive mode if base_mv is good.

Speedup ~3% with small/negligible loss in quality on RTC.
Affects speed >= 6.

Change-Id: I89341b279cad6da2a04b76d5e726016191dacdb8
2017-06-18 22:35:46 -07:00
Urvang Joshi
a4ea7e131b VP9: Add greedy version of av1_optimize_b().
This was ported from the greedy version in AV1, written by Dake He
(dkhe@google.com).
See:
https://aomedia.googlesource.com/aom/+/master/av1/encoder/encodemb.c#137

Greedy version is disabled by default, but can be picked by setting
USE_GREEDY_OPTIMIZE_B to 1.
To be enabled by default later.

This is both faster and better in terms of compression.

Compression Improvement:
------------------------
lowres: -0.119
midres: -0.064
hdres:  -0.405

Speed Improvement:
------------------
(Based on encode time of 3 videos of different difficulties at
3 different target bitrates)
With --cpu-used=0: 0.38% to 5.55% faster
With --cpu-used=1: 0.24% to 2.79% faster
With --cpu-used=2: 0.29% to 1.46% faster

Change-Id: Ia7a23b3b244ad8eb253ac9e43cd03c5e021d2635
2017-06-15 11:19:08 -07:00
Linfeng Zhang
d6eeef9ee6 Clean array_transpose_{4X8,16x16,16x16_2) in x86
Change-Id: I341399ecbde37065375ea7e63511a26bfc285ea0
2017-06-13 16:50:44 -07:00
Linfeng Zhang
9c72e85e4c Remove array_transpose_8x8() in x86
Duplicate of transpose_16bit_8x8()

Change-Id: Iaa5dd63b5cccb044974a65af22c90e13418e311f
2017-06-13 16:50:44 -07:00
Linfeng Zhang
cbb991b6b8 Convert 8x8 idct x86 macros to inline functions
Change-Id: Id59865fd6c453a24121ce7160048d67875fc67ce
2017-06-13 16:50:43 -07:00
Hui Su
21e1661b54 Merge "vp9 level targeting: more strict constraint on min_gf_interval" 2017-06-12 16:38:02 +00:00
Jerome Jiang
a46bc0268b Merge "Remove duplication on vp8/9_write_yuv_frame." 2017-06-10 04:50:19 +00:00