Commit Graph

7760 Commits

Author SHA1 Message Date
Minghai Shang
29b5cf6a9d Merge "[svc] Fix syntax error when encoding multiple tiles." 2015-04-16 13:43:44 -07:00
Minghai Shang
4aa9255efa [svc] Fix syntax error when encoding multiple tiles.
Change-Id: Ia77b551415f3b3386e22a6c805f244f2d13fe3e3
2015-04-16 12:56:30 -07:00
paulwilkins
effd974b16 Limit arf interval for low fpf clips.
This patch limits  the maximum arf interval length to
approximately half a second. In some low fps animations in
particular the existing code was selecting an overly long interval
which was hurting visual quality. For a sample problem test clip
(360P animation , 15fps, ~200Kbit/s) this change also improved
metrics by >0.5 db.

There may be some clips where this hurts metrics a little, but the
worst case impact visually is likely to be less than having an
interval that is much too long. On more normal material at 24
fps or higher, the impact is likely to be nil/minimal.

Change-Id: Id8b57413931a670c861213ea91d7cc596375a297
2015-04-16 11:50:37 +01:00
Yunqing Wang
14e7203e7b Merge "Fix Tsan errors" 2015-04-15 15:34:03 -07:00
Yunqing Wang
63c5bf2b9c Fix Tsan errors
This patch fixed 2 reported Tsan errors while running VP9 real-time
encoder.

Change-Id: Ib0278fe802852862c3ce87c4a500e544d7089f67
2015-04-15 12:33:39 -07:00
Johann
14ef4aeafb Reorganize *_rtcd() calling conventions
Change-Id: Ib1e17d8aae9b713b87f560ab5e49952ee2bfdcc2
2015-04-15 11:12:05 -04:00
Yunqing Wang
004b9d83e3 Revert "Force_split on 16x16 blocks in variance partition."
This reverts commit eb8c667570.
The patch caused mismatch while using multi-threads.

Change-Id: Icd646340af25b5d91e32f03ed3ea212e00e3e0be
2015-04-14 15:19:31 -07:00
Marco
2baa3debd5 Merge "Force_split on 16x16 blocks in variance partition." 2015-04-14 09:44:58 -07:00
hkuang
3b2510374a Merge "Remove unnecessary set postproc flags." 2015-04-13 14:33:43 -07:00
Marco
eb8c667570 Force_split on 16x16 blocks in variance partition.
Force split on 16x16 block (to 8x8) based on the minmax over the 8x8 sub-blocks.

Also increase variance threshold for 32x32, and add exit condiiton in choose_partition
(with very safe threshold) based on sad used to select reference frame.

Some visual improvement near moving boundaries.
Average gain in psnr/ssim: ~0.6%, some clips go up ~1 or 2%.
Encoding time increase (due to more 8x8 blocks) from ~1-4%, depending on clip.

Change-Id: I4759bb181251ac41517cd45e326ce2997dadb577
2015-04-13 12:05:07 -07:00
Parag Salasakar
2f693be8f8 Merge "mips msa vp9 common headers added" 2015-04-09 21:50:15 -07:00
Jingning Han
2404332c1b Merge "Remove get_nonrd_var_based_fixed_partition function" 2015-04-09 14:45:19 -07:00
Jingning Han
4565812032 Merge "Compute prediction filter type cost only when needed" 2015-04-09 14:45:11 -07:00
Jingning Han
93d9c50419 Merge "SSSE3 assembly implementation of 8x8 Hadamard transform" 2015-04-09 11:16:11 -07:00
Jingning Han
208aa6158b Remove get_nonrd_var_based_fixed_partition function
This function has been replaced by other approaches and is not
in use now.

Change-Id: I387f45b5607d202539e482468ccc70e6c0f9341f
2015-04-09 09:49:55 -07:00
Parag Salasakar
481fb7640c mips msa vp9 common headers added
Change-Id: Ia31ada59172eb1818e1eb91009f83cbb1f581223
2015-04-09 15:35:12 +05:30
hkuang
7e8e507bfb Remove unnecessary mv clamp with on demand border extension.
Change-Id: Ia2956f06f409b9b0ca8320ca4c1ea5680e938402
2015-04-08 17:16:52 -07:00
Frank Galligan
5668dcc7b9 Refactor dec_build_inter_predictors
Refactor the loops in dec_build_inter_predictors to try and decrease
the number of instructions. Limited testing saw about 1% perf
increase on x86 and about 0.67 % perf increase on Arm.

Change-Id: I69cfe6335bb562fbaaebf43fb3f5c5a2a28882a2
2015-04-08 15:00:29 -07:00
Debargha Mukherjee
59681be0a0 Merge "Improve accuracy of rate control in CQ mode" 2015-04-08 10:48:17 -07:00
James Zern
2ed0cf06f9 Merge "vp9_full_search_sadx[38]: align sad arrays" 2015-04-07 20:57:21 -07:00
Yaowu Xu
c88ce84bb5 Merge "Optimize the checking for transform skipping" 2015-04-07 16:29:51 -07:00
Yaowu Xu
90517b5e85 Merge "move ref_frame_cost computations into a function" 2015-04-07 16:29:45 -07:00
Debargha Mukherjee
60bd744c88 Improve accuracy of rate control in CQ mode
Modifies a special handling that improves rate control accuracy in
the constrained quality mode, when the undershoot and overshoot
limits are set tighter.

Change-Id: If62103f0ef3ed1cac92807400678c93da50cf046
2015-04-07 16:29:21 -07:00
James Zern
e1ff83f4b0 vp9_full_search_sadx[38]: align sad arrays
the sse4 code expects 16-byte aligned arrays; vp8 already had a similar
change applied:
b2aa401 Align SAD output array to be 16-byte aligned

Change-Id: I5e902035e5a87e23309e151113f3c0d4a8372226
2015-04-07 14:34:06 -07:00
Jingning Han
927693a991 Merge "Enable Hadamard transform based cost estimate for all block sizes" 2015-04-07 12:51:27 -07:00
Jingning Han
6de407b638 Merge "Account for eob cost in the RTC mode decision process" 2015-04-07 12:50:30 -07:00
Jingning Han
25206e7b7f Compute prediction filter type cost only when needed
Skip redundant prediction filter type cost in filter search loop,
if the rate value will be reset in Hadamard transform based rate
distortion estimate.

Change-Id: Ie5221f4bc8da9461c449df367251aeeac52c6e5d
2015-04-07 12:41:46 -07:00
Yaowu Xu
0bb897211d Optimize the checking for transform skipping
If U is not skippable, then do not perform the check on V.

Change-Id: Iba5e8362bd42390197f373c44388a426a4404549
2015-04-06 17:54:05 -07:00
Jingning Han
7f629dfca4 SSSE3 assembly implementation of 8x8 Hadamard transform
It uses about 10% less CPU cycles than the SSE2 intrinsic
implementation.

Change-Id: I91017c0c068679a214b98cdd4cff3a6facfb7499
2015-04-04 09:59:37 -07:00
Jingning Han
9922e4344a Enable Hadamard transform based cost estimate for all block sizes
This commit turns on the Hadamard transform based rate distortion
estimate for all block sizes in RTC coding mode. It conditionally
skips the rate distortion estimation if all zero block flag is set
on. No significant encoding speed change is observed. The
compression performance of speed -6 is improved by 1.7% over using
it only for block sizes of 32x32 and below.

Change-Id: I768145e6f05c737b05b5b5f1ee674e929532cafb
2015-04-04 09:58:45 -07:00
Yunqing Wang
b2baaa215b Merge "Fix the scaling factor in UV skipping test" 2015-04-03 17:09:59 -07:00
Yunqing Wang
1a1114d21c Fix the scaling factor in UV skipping test
The threshold scaling factor was calculated wrong using partition
size "bsize". Thank Yaowu for pointing it out. It was fixed and no
speed change was seen.

Change-Id: If7a5564456f0f68d6957df3bd2d1876bbb8dfd27
2015-04-03 16:07:43 -07:00
James Zern
44e3640923 Merge "vp9: enable sse4 sad functions" 2015-04-03 14:57:52 -07:00
Jingning Han
30e9c091c0 Merge "Tune SSSE3 assembly implementation to improve quantization speed" 2015-04-03 11:24:28 -07:00
Jingning Han
60e01c6530 Account for eob cost in the RTC mode decision process
This commit accounts for the transform block end of coefficient flag
cost in the RTC mode decision process. This allows a more precise
rate estimate. It also turns on the model to block sizes up to 32x32.
The test sequences shows about 3% - 5% speed penalty for speed -6.
The average compression performance improvement for speed -6 is
1.58% in PSNR. The compression gains for hard clips like jimredvga,
mmmoving, and tacomascmv at low bit-rate range are 1.8%, 2.1%, and
3.2%, respectively.

Change-Id: Ic2ae211888e25a93979eac56b274c6e5ebcc21fb
2015-04-03 10:31:51 -07:00
hkuang
d72ed35374 Merge "Fix error of "Left shift of negative value -1"." 2015-04-02 21:35:12 -07:00
Yunqing Wang
12cb30d4bd Merge "Set vbp thresholds for aq3 boosted blocks" 2015-04-02 18:22:08 -07:00
Yaowu Xu
718feb0f69 move ref_frame_cost computations into a function
Change-Id: Iebf2ad2b1db7e2874788fda8d55e67f4cb1149f1
2015-04-02 18:10:55 -07:00
hkuang
73c8fe5deb Fix error of "Left shift of negative value -1".
Change-Id: Ia4f3feb20df0e89cc51b02def858e12e927312cc
2015-04-02 17:35:33 -07:00
Marco
f85f79f630 Merge "Code cleanup: put (8x8/4x4)fill_variance into separate function." 2015-04-02 17:33:01 -07:00
Yunqing Wang
cae03a7ef5 Set vbp thresholds for aq3 boosted blocks
The vbp thresholds are set seperately for boosted/non-boosted
superblocks according to their segment_id. This way we don't
have to force the boosted blocks to split to 32x32.

Speed 6 RTC set borg test result showed some quality gains.
Overall PSNR: +0.199%; Avg PSNR: +0.245%; SSIM: +0.802%.
No speed change was observed.

Change-Id: I37c6643a3e2da59c4b7dc10ebe05abc8abf4026a
2015-04-02 15:48:32 -07:00
Marco
77ea408983 Code cleanup: put (8x8/4x4)fill_variance into separate function.
Code cleanup, no change in behavior.

Change-Id: I043b889f8f0b3afb49de0da00873bc3499ebda24
2015-04-02 13:37:35 -07:00
Marco
6eb05c9ed0 Small fix to segment check in pickmode.
Change-Id: Id5fd82a504def2523292466fbaad5dade9424c72
2015-04-02 09:55:13 -07:00
James Zern
b8a1de86fd Merge "vp9/neon: skip some files in high-bitdepth build" 2015-04-01 23:36:56 -07:00
James Zern
b644384bb5 Merge "vp9: fix high-bitdepth NEON build" 2015-04-01 23:36:17 -07:00
Yaowu Xu
54210f706c Merge "use MAX_MB_PLANE consistently" 2015-04-01 18:24:39 -07:00
hkuang
f3bea3de5b Remove unnecessary set postproc flags.
Change-Id: Iaf136969bc368a890f9671647576ee9d54eef03b
2015-04-01 17:11:35 -07:00
hkuang
4cf68be17a Merge "Fix 10-bit video decode failure with --frame-parallel mode." 2015-04-01 17:07:58 -07:00
Jingning Han
2149f214d5 Merge "Reduce required xmm number by one in block_error_fp" 2015-04-01 15:46:22 -07:00
Jingning Han
657cabe0f7 Tune SSSE3 assembly implementation to improve quantization speed
Change-Id: If0ca8b25b4800d4336e6cbc97194cd9b01c5b5a3
2015-04-01 15:28:01 -07:00
Yaowu Xu
f26b8c84f8 use MAX_MB_PLANE consistently
Change-Id: Ic416a7f145001a88f5a7f70dde9b1edbc1b69381
2015-04-01 15:21:20 -07:00
Yaowu Xu
fff4654d36 Merge "Simplify bsize calculation" 2015-04-01 15:06:55 -07:00
Jingning Han
cf4447339e Merge "Optimize quantization simd implementation" 2015-04-01 14:55:18 -07:00
Jingning Han
a4364e5146 Merge "Simplify effective src_diff address computation" 2015-04-01 14:55:03 -07:00
Jingning Han
7acb2a8795 Merge "Refactor block_yrd function for RTC coding mode" 2015-04-01 14:54:24 -07:00
Yaowu Xu
ba91b54d7c Simplify bsize calculation
Change-Id: Ibc514684def9914c66f04cb7931f773e2b79c168
2015-04-01 12:15:06 -07:00
Jingning Han
19da916716 Simplify effective src_diff address computation
Remove redundant offset calculation for effective src_diff address.

Change-Id: I4aab241a36abcef7fd8adf74aed5e12b8b88e0ef
2015-04-01 12:07:47 -07:00
Jingning Han
f2cf3c06a0 Reduce required xmm number by one in block_error_fp
Use 6 xmms instead of 8.

Change-Id: If976ad85d09191d2fb0565399d690f2869dbbcc7
2015-04-01 12:07:35 -07:00
Jingning Han
1470529f62 Refactor block_yrd function for RTC coding mode
This commit separates Hadamard transform/quantization operations
from rate and distortion computation in block_yrd. This allows one
to skip SATD computation when all transform blocks are quantized
to zero. It also uses a new block error function that skips
repeated computation of sum of squared residuals. It reduces the
CPU cycles spent on block error calculation in block_yrd by 40%.

Change-Id: I726acb2454b44af1c3bd95385abecac209959b10
2015-04-01 12:00:43 -07:00
Jingning Han
eed1badedd Optimize quantization simd implementation
This commit allows the quantizer to compare the AC coefficients to
the quantization step size to determine if further multiplication
operations are needed. It makes the quantization process 20% faster
without coding statistics change.

Change-Id: I735aaf6a9c0874c82175bb565b20e131464db64a
2015-04-01 11:47:09 -07:00
Yunqing Wang
a0043c6d30 Enhance the transform skipping decision-making in non-rd mode
For large partition blocks(block_size > 32x32), the variance
calculation is modified so that every 8x8 block's variance
is stored during the calculation, which is used in the
following transform skipping test. Also, the variance for
every tx block is calculated. The skipping test checks all tx
blocks in the partition, and sets the skip flag only if all tx
blocks are skippable. If the skip flag of Y plane is 1, a
quick evaluation is done on UV planes. If the current partition
block is skippable in YUV planes, the mode search checks fewer
inter modes and doesn't check intra modes.

The rtc set borg test(at speed 6) showed that:
Overall psnr: -0.527%; Avg psnr: -0.510%; ssim: -0.573%.
Average single-thread speedup on rtc set was 3.5%.
For 720p clips, more speedups were seen.
gipsrecmotion: 13%
gipsrestat: 12%
vidyo: 5 - 9%
dark: 15%
niklas: 6%

Change-Id: I8d8ebec0cb305f1de016516400bf007c3042666e
2015-04-01 09:43:40 -07:00
hkuang
1582ac851f Fix 10-bit video decode failure with --frame-parallel mode.
Also add unit test to avoid same error in the future.

Issue:981

Change-Id: Iaf9889d8d5514cfdff1ea098e6ae133be56d501f
2015-04-01 09:19:35 -07:00
James Zern
14e24a1297 vp9: enable sse4 sad functions
sse4 isn't set by configure or used in rtcd, correct the sad entries to
use sse4_1 without changing the signatures for now.
this was done in vp8 post-vp9 branch.

Change-Id: Ia9f1fff9f2476fdfa53ed022778dd2f708caa271
2015-03-31 21:00:55 -07:00
James Zern
a98f6c0254 vp9/neon: skip some files in high-bitdepth build
exclude files that only contain functions for non-high-bitdepth builds.
this removes some warnings related to missing prototypes

Change-Id: Ic6642998c46a7b808c6c53b2f9c34bcd4d037abe
2015-03-31 18:06:21 -07:00
James Zern
8845334097 vp9: fix high-bitdepth NEON build
remove incorrect specializations in rtcd and update a configuration
check in partial_idct_test.cc

Change-Id: I20f551f38ce502092b476fb16d3ca0969dba56f0
2015-03-31 17:45:25 -07:00
Yunqing Wang
fc98114761 Merge "Rename vbp thresholds" 2015-03-31 16:33:30 -07:00
Marco
c2b8218eba Merge "Set postproc flags in decoder_get_frame." 2015-03-31 15:22:14 -07:00
Yunqing Wang
c28ff1a9de Rename vbp thresholds
Code refactoring

Change-Id: I410fcce1bc6d95c62c474445f4c97ea8469f1e79
2015-03-31 15:14:44 -07:00
Jingning Han
502ac72233 Merge "Tuning SATD rate calculation for speed" 2015-03-31 14:24:26 -07:00
Jingning Han
1c39c5b96f Merge "Use aligned copy in 8x8 Hadamard transform SSE2" 2015-03-31 12:16:47 -07:00
Jingning Han
fa4289522e Merge "Allow block skip coding option in RTC mode" 2015-03-31 12:16:36 -07:00
Jingning Han
1638d7dc96 Merge "Fix 8x8 Hadamard SSE2 implementation" 2015-03-31 12:16:27 -07:00
Alex Converse
9670d766ab Merge "VP9E_GET_ACTIVE_MAP API function." 2015-03-31 11:52:56 -07:00
Jingning Han
531468a07a Tuning SATD rate calculation for speed
This commit allows the encoder to check the eob per transform
block to decide how to compute the SATD rate cost. If the entire
block is quantized to zero, there is no need to add anything; if
only the DC coefficient is non-zero, add its absolute value;
otherwise, sum over the block. This reduces the CPU cycles spent
on vp9_satd_sse2 to one third.

Change-Id: I0d56044b793b286efc0875fafc0b8bf2d2047e32
2015-03-31 11:02:20 -07:00
hui su
d4f2f1dd5b Merge "Move vp9_coef_con_tree to common/" 2015-03-31 10:51:10 -07:00
Jingning Han
014fa45298 Use aligned copy in 8x8 Hadamard transform SSE2
This reduces the 8x8 Hadamard transform cycles by 20%.

Change-Id: If34c5e02f3afa42244c6efabe121f7cf5d2df41b
2015-03-31 10:21:52 -07:00
Jingning Han
db5ec37edc Merge "Enable 16x16 Hadamard transform in SATD based mode decision" 2015-03-31 09:55:41 -07:00
Jingning Han
8c5670bb6f Merge "Use SATD based mode decision for block sizes below 16x16" 2015-03-31 09:47:47 -07:00
Jingning Han
ebe1be9186 Allow block skip coding option in RTC mode
When the estimated rate-distortion cost of skip coding mode is
lower than that of sending quantized coefficients, allow the
encoder to drop these coefficients. This improves the compression
performance of speed -6 by 0.268% and makes the encoding speed
slightly faster.

Change-Id: Idff2d7ba59f27ead33dd5a0e9f68746ed3c2ab68
2015-03-31 09:32:53 -07:00
hui su
302e24cb3e Move vp9_coef_con_tree to common/
This tree should be defined in common/, as it is needed for
both encoder and decoder.

Change-Id: I4f5cbc80025cf2ced14182c98f7c82dc7d0f87db
2015-03-31 09:20:46 -07:00
Marco
385ca8f741 Set postproc flags in decoder_get_frame.
The postproc settings were not set in decoder_get_frame().

Change-Id: I20d23de3ea18f6df061a53d691d4095d5c62532a
2015-03-30 16:15:57 -07:00
Jingning Han
9b99eb2e12 Merge "Reuse inter prediction pixel block for Hadamard transform" 2015-03-30 16:09:38 -07:00
Jingning Han
34a996ac1e Fix 8x8 Hadamard SSE2 implementation
This commit fixes the SSE2 version 8x8 Hadamard transform
alignment and makes it consistent with the C version.

Change-Id: I1304e5f97e0e5ef2d798fe38081609c39f5bfe74
2015-03-30 15:54:08 -07:00
Jingning Han
26d3d3af6a Enable 16x16 Hadamard transform in SATD based mode decision
This commit replaces the 16x16 2D-DCT transform with Hadamard
transform for RTC coding mode. It reduces the CPU cycles cost
on 16x16 transform by 5X. Overall it makes the speed -6 encoding
speed 1.5% faster without compromise on compression performance.

Change-Id: If6c993831dc4c678d841edc804ff395ed37f2a1b
2015-03-30 15:43:31 -07:00
Jingning Han
f0ac5aaa08 Merge "Hadamard transform based coding mode decision process" 2015-03-30 15:43:15 -07:00
Jingning Han
b4b5af6acd Use SATD based mode decision for block sizes below 16x16
This commit makes the encoder to select between SATD/variance as
metric for mode decision. It also allows to account chroma
component costs for mode decision as well. The overall encoding
time increase as compared to variance based mode selection is about
15% for speed -6. The compression performance is on average 2.2%
better than variance based approach, with about 5% compression
performance gains for hard clips (e.g., jimredvga, nikas720p, and
mmmoving) at lower bit-rate range.

Change-Id: I4d04a31d36f4fcb3f5f491dacd6e7fe44cb9d815
2015-03-30 15:20:07 -07:00
Jingning Han
8a927a1b7a Reuse inter prediction pixel block for Hadamard transform
It saves one unnecessary motion compensated prediction constructed
by using 8-tap filter.

Change-Id: I101215131e6f38621d5935885f94cc74de6a5377
2015-03-30 15:04:33 -07:00
Jingning Han
8c411f74e0 Hadamard transform based coding mode decision process
This commit uses Hadamard transform based rate-distortion cost
estimate for rtc coding mode decision. It improves the compression
performance of speed -6 for many hard clips at lower bit-rates.
For example, 5.5% for jimredvga, 6.7% for mmmoving, 6.1% for
niklas720p. This will introduce extra encoding cycle costs at
this point.

Change-Id: Iaf70634fa2417a705ee29f2456175b981db3d375
2015-03-30 14:46:05 -07:00
Alex Converse
bf7def9a43 Merge "Simplify skip check." 2015-03-30 11:31:45 -07:00
jackychen
b38b32a794 Merge "vp9_postproc.c: eliminate -Wshadow build warnings." 2015-03-30 10:29:39 -07:00
jackychen
68610ae568 vp9_postproc.c: eliminate -Wshadow build warnings.
Change-Id: I6df525a9ad1ae3cfbba8710d21db8fee76e64dbb
2015-03-27 20:27:30 -07:00
Marco
fa20a60f0d Speed 5: use non-rd mode for key frame coding.
Metrics on RTC set go down by ~1.5% on average.
Key frame encoding time goes down by factor of ~5.

Change-Id: Ia83acc55848613870e5ac6efe7f3d904d877febb
2015-03-27 16:19:26 -07:00
Adrian Grange
ad18b2b641 Remove 8-bit array in HBD
Creating both 8- and 16-bit arrays and then only using one
of them is wasteful.

Change-Id: Ic5b397c283efaff7bcfff2d2413838ba3e065561
2015-03-25 15:37:03 -07:00
Adrian Grange
65df3d138a Replace heap with stack memory allocation
Replaced the dynamic memory allocation of the
second_pred buffer with an allocation on the stack.

Change-Id: I2716c46b71e8587714ca5733a99eca2c68419b23
2015-03-25 15:36:43 -07:00
Adrian Grange
8d8d7bfde5 Fix use of scaling in joint motion search
To enable us to the scale-invariant motion estimation
code during mode selection, each of the reference
buffers is scaled to match the size of the frame
being encoded.

This fix ensures that a unit scaling factor is used in
this case rather than the one calculated assuming that
the reference frame is not scaled.

Change-Id: Id9a5c85dad402f3a7cc7ea9f30f204edad080ebf
2015-03-25 15:35:29 -07:00
paulwilkins
ab788c5380 Merge "Enable group adaptive max q by default." 2015-03-24 15:00:12 -07:00
Alex Converse
4dcb839607 VP9E_GET_ACTIVE_MAP API function.
This is useful when aq mode 3 (cyclic refresh) reactivates segments for refresh.

Change-Id: I3ad1d9410b899ede393d82bb8db14e2da4d84eca
2015-03-24 11:19:47 -07:00
Alex Converse
a1e20ec58f Refactor fast loop filter code to handle 444.
Change-Id: I921b1ebabdf617049f8fa26fbe462c3ff115c1ce
2015-03-24 11:17:50 -07:00
Yaowu Xu
c77d4dcb35 Merge "vp9_pred_mv(): misc fixes and optimizations" 2015-03-24 10:36:51 -07:00
Alex Converse
02697e35dc Merge "A tiny cyclic refresh / active map fix." 2015-03-24 09:43:24 -07:00
paulwilkins
8ea7bafdaa Merge "Revised rd adjustment for variance." 2015-03-24 03:12:56 -07:00
paulwilkins
c0b71cf82f Merge "Experimental rd bias based on source vs recon variance." 2015-03-24 03:12:41 -07:00
Alex Converse
31f1563a92 A tiny cyclic refresh / active map fix.
Change-Id: I198727461455c8c198a0c892d02ed3cb1673aa50
2015-03-23 18:51:00 -07:00
hkuang
9f4f98fdbd Merge "Optimize the intra frame decode to skip some unnecessary copy." 2015-03-23 16:50:37 -07:00
hkuang
cd1d40ff5d Merge "Safely free all the frame buffers after all the workers finish the work." 2015-03-23 16:50:15 -07:00
Alex Converse
b7605a9d70 Simplify skip check.
SEG_LVL_SKIP implies skip. This is enforced by skip = write_skip().

Change-Id: I61c79581c9c53deae36685c2bcf388cb4d8827d3
2015-03-23 10:53:31 -07:00
hkuang
85107641a4 Optimize the intra frame decode to skip some unnecessary copy.
This speeds up a normal YT style 1080P clip decode by ~1% on nexus 7.

Change-Id: Ied7fa0d8bc941b2adb4db9382f549ee4d5654f3a
2015-03-23 10:11:49 -07:00
Alex Converse
f7bcce91af Merge "Don't apply active map on key frames." 2015-03-23 10:04:39 -07:00
Alex Converse
03177cb7fa Merge "Set loop filter level to zero on inactive segment." 2015-03-23 10:04:29 -07:00
paulwilkins
691ec45b4e Enable group adaptive max q by default.
Set the GF group adaptive max Q compile flag to 1 by default.

This change has a quite big visual impact in some clips and also
contributes to tighter rate control.

For short test clips that have consistent content the impact is
quite small on metrics but for more varied long form clips there is
a drop in overal psnr but a sharp rise in average psnr caused by
greater expenditure on some easier sections and tighter rate clipping
in hard sections.

In chunck'ed encodes some of the effect will already be present due
to the independent rate control in each chunk but this change takes
the control down to a smaller scale.

yt hd +10.67%, - 3.77%, -1.56%
yt +9.654%, - 3.6%, - 1.82%
std hd +0.25%, -0.85%, -0.42%
derf +0.25%, - 1.1%. - 0.87%

Change-Id: Ibbc39b800d99d053939f4c6712d715124082843e
2015-03-23 15:57:09 +00:00
Yaowu Xu
9fd8abc541 vp9_pred_mv(): misc fixes and optimizations
1. skip near if it is same as nearest
2. correct rounding for converting mv to fullpel position
3. update pred_mv_sad after new mv search.

Overall .1%~.25% compression gains on rtc set for speed 5, 6, 7, 8.

Change-Id: Ic300ca53f7da18073771f1bb993c58cde9deee89
2015-03-20 17:17:04 -07:00
Alex Converse
6d6ef8eb3c Don't apply active map on key frames.
This allows applciations to be KF oblivious.

Change-Id: Ic02712eae6ad8d6b3eaec26548299d24ca0d5cc0
2015-03-20 14:57:24 -07:00
James Zern
fef91c9040 vp[89]_cx_iface.c: remove obsolete ABI checks
Change-Id: I49a7017e8adc18ff03d748cb328814a8a3e1bcf6
2015-03-20 14:50:14 -07:00
Alex Converse
e032fc7b9e Set loop filter level to zero on inactive segment.
Change-Id: I6022a79351882a72a219aee13563bf21bcd70383
2015-03-20 14:43:06 -07:00
Adrian Grange
fc05897619 Merge "Restore first ref frame pointer to the correct value" 2015-03-20 07:49:54 -07:00
paulwilkins
7e234b9228 Revised rd adjustment for variance.
Revised adjustment for rd based on source complexity.
Two cases:

1) Bias against low variance intra predictors
when the actual source variance is higher.

2) When the source variance is very low to give a slight
bias against predictors that might introduce false texture
or features.

The impact on metrics of this change across the test sets is
small and mixed.

derf -0.073%, -0.049%, -0.291%
std hd -0.093%, -0.1%, -0.557%
yt  +0.186%, +0.04%, - 0.074%
ythd +0.625%, + 0.563%, +0.584%

Medium to strong psycho-visual improvements in some
problem clips.

This feature and intra weight on GF group length now
turned on by default.

Change-Id: Idefc8b633a7b7bc56c42dbe19f6b2f872d73851e
2015-03-20 11:59:39 +00:00
paulwilkins
9a1ce7be7d Experimental rd bias based on source vs recon variance.
This experiment biases the rd decision based on the impact
a mode decision has on the relative spatial complexity of the
reconstruction vs the source.

The aim is to better retain a semblance of texture even if it
is slightly misaligned / wrong, rather than use a simple rd
measure that tends to favor use of a flat predictor if a perfect
match can't be found.

This improves the appearance of texture and visual quality
on specific test clips but is hidden under a flag and currently
off by default pending visual quality testing on a wider Yt set.

Change-Id: Idf6e754a8949bf39ed9d314c6f2daaa20c888aad
2015-03-20 11:57:36 +00:00
James Zern
933fe4e397 Merge "put spatial svc behind an ABI check" 2015-03-19 23:36:40 -07:00
Adrian Grange
12d946df89 Restore first ref frame pointer to the correct value
The joint_motion_search function alternates prediction
between two reference frames. In order to reuse existing
code, a pointer to the appropriate reference frame is
written into xd->plane[0].pre[0], that the motion
estimation code assumes points to the reference frame.

If this first reference frame was scaled then the
pointer was incorrectly being reset to point to the
unscaled reference frame rather than the scaled
version.

Change-Id: I76f73a8d8f4f15c1f3a5e7e08a35140cdb7886ab
2015-03-19 16:17:31 -07:00
Adrian Grange
53c9ebe609 Move joint_motion_search & delete function prototype
Change-Id: I7fb3a78ed0e0bc940d8b4a57c470302f8369782f
2015-03-19 14:28:52 -07:00
James Zern
18613408a3 put spatial svc behind an ABI check
this removes the CONFIG_* checks from public headers, but means
'--enable-experimental --enable-spatial-svc' builds will fail without a
local change to the ABI in vpx_encoder.h. this should be all right for
testing this experiment.

Change-Id: Ief55e7b9d1e8332cfce990275e04c29b30af0c4a
2015-03-19 12:29:16 -07:00
hkuang
b88dac8938 Safely free all the frame buffers after all the workers finish the work.
Issue: 978

Change-Id: Ia7aa809095008f6819a44d7ecb0329def79b1117
2015-03-19 12:21:00 -07:00
Jingning Han
067fc49996 Merge "Speed up non-rd mode decision search" 2015-03-19 09:18:10 -07:00
Jingning Han
411bbce470 Merge "Fix an ioc warning in vp9_pick_inter_mode" 2015-03-19 09:17:25 -07:00
Marco
fc2da4c5ba Merge "Adjustments to aq-mode=3." 2015-03-19 09:01:17 -07:00
James Zern
6f23d40582 Merge "vp9_resize_plane: quiet some static analysis warnings" 2015-03-18 19:39:48 -07:00
James Zern
c664f16182 Merge changes Ie5a24275,Ib72946a8,I532b882b
* changes:
  vp9_fdct8x8_quant_ssse3: quiet a static analysis warning
  vp9_fdct8x8_quant_sse2: quiet a static analysis warning
  vp9_mv_pred: quiet a static analysis warning
2015-03-18 19:38:49 -07:00
Alex Converse
748843712f Merge "Fix external resize memory issues." 2015-03-18 16:04:30 -07:00
James Zern
c4367b9b51 vp9_resize_plane: quiet some static analysis warnings
document resolution assumptions with a few asserts

Change-Id: Ia4ab738fd3e0a1ba0ed30a57facd2658c2c1fd60
2015-03-18 14:34:30 -07:00
James Zern
388add965f vp9_fdct8x8_quant_ssse3: quiet a static analysis warning
add an assert to validate 'in' array size

Change-Id: Ie5a24275c066d9dd59714f6104510abbd4850dc5
2015-03-18 14:33:43 -07:00
James Zern
198b039e2a vp9_fdct8x8_quant_sse2: quiet a static analysis warning
add an assert to validate 'in' array size

Change-Id: Ib72946a86f34e1ce8a69954e8e3e4fe1a0f18a91
2015-03-18 14:33:04 -07:00
James Zern
428369293d vp9_mv_pred: quiet a static analysis warning
add an assert to validate pred_mv array size

Change-Id: I532b882b71e2baff3ac76e07ed133ec5a11bd0fc
2015-03-18 14:31:58 -07:00
Marco
71e6ed7bd1 Adjustments to aq-mode=3.
Factor in segment#2 and skip blocks into the postencode estimated bits,
and increase somewhat the aggressiveness of the refresh.

PSNR/SSIM Metrics on RTC set go up by ~0.8/0.5%.

Change-Id: I5d4e7cb00a3aefb25d18c88b6b24118b72dc5d51
2015-03-18 12:06:16 -07:00
Jingning Han
83cbe22623 Speed up non-rd mode decision search
This commit makes the encoder to explicitly calculate the SAD
associated with the LAST_FRAME motion vector and compare it to
that of the GOLDEN_FRAME given by integral projection motion
estimation. It skips the expensive sub-pixel motion search over
GOLDEN_FRAME when the LAST_FRAME can provide fairly good motion
compensated prediction quality.

For dark720p speed -6 single thread goes from
33304 b/f, 40.070 dB, 18156 ms ->
33319 b/f, 40.061 dB, 17611 ms

Change-Id: I01bc94b9b598075567a392111046b97a9bc30efe
2015-03-18 12:04:58 -07:00
Adrian Grange
83288c7af8 Order header files alphabetically
Change-Id: I3e275544bff478849c1b5f3dcd5de950ee330d14
2015-03-18 11:18:08 -07:00
Jingning Han
4640a0c480 Merge "Fix the C version of column vector projection" 2015-03-17 22:53:49 -07:00
Jingning Han
c932584f0f Fix the C version of column vector projection
Make the C and SSE2 versions consistent.

Change-Id: I03c405d22a36bd1a97480efb96dc5af230667424
2015-03-17 18:50:53 -07:00
Marco
e52109158a Update to variance partition.
Use force_split to constrain the partition selection.
This is used because in the top-down approach to variance partition,
a block size may be selected even though one of its subblocks may have
high variance.

In this patch the selection of the 64x64 block size will only
be allowed if the variance of all the 32x32 subblocks are also below the threshold.

Stil testing, but some visual improvement for areas near slow moving boundary
can be seen. Metrics for RTC set increase by about ~0.5%.

Change-Id: Iab3e7b19bf70f534236f7a43fd873895a2bb261d
2015-03-17 17:02:47 -07:00
Yunqing Wang
45e8e4a01f Merge "Refactor set vbp thresholds function" 2015-03-17 16:05:53 -07:00
Yunqing Wang
c0423abf00 Refactor set vbp thresholds function
Code refactoring.

Change-Id: I73b6fcc0444155ee46c1efa5253c1d608c6439cb
2015-03-17 12:23:32 -07:00
Adrian Grange
ed6824e449 Remove unused ZBIN_BOOST macros
Change-Id: I5169155b20ea3676a6ce58ec77d6aeba07db29d9
2015-03-17 11:53:58 -07:00
Jingning Han
ee41141466 Fix an ioc warning in vp9_pick_inter_mode
Shut off all the metric checks for golden reference frame, if we
decide that it is unlikely to be selected for reference.

Change-Id: Ie457cc1fd43935584403b4982659aed80fb9909c
2015-03-17 10:13:44 -07:00
Yaowu Xu
de3097aa23 Merge "Remove duplicate clamping" 2015-03-16 16:56:10 -07:00
Jingning Han
adaffcc010 Merge "Remove ineffective newmv skip checking from vp9_pick_inter_mode" 2015-03-16 16:43:43 -07:00
Jingning Han
4e8daaf960 Merge "Simplify prediction filter search in rtc coding mode" 2015-03-16 16:43:26 -07:00
Jingning Han
82231beced Merge "Refactor column integral projection computation" 2015-03-16 16:43:11 -07:00
Yaowu Xu
3119c24658 Merge "change the order of inter modes evaluated" 2015-03-16 16:14:34 -07:00
Alex Converse
6126afe62e Fix external resize memory issues.
These were uncovered by the chromoting perftest.

Change-Id: Ia5a90fd1718ff757c1484decf3861295260e6722
2015-03-16 15:56:26 -07:00
Yaowu Xu
4611f24797 Remove duplicate clamping
The mvs are clamped in the vp9_find_best_ref_mvs() already.

Change-Id: I9bea5e35aef6007466fe7fca4bc2dc5c17e74222
2015-03-16 15:19:37 -07:00
Jingning Han
c852200f51 Remove ineffective newmv skip checking from vp9_pick_inter_mode
Change-Id: I41ee684cf113a7b5edf280183e51cb08b2e93cc4
2015-03-16 15:06:27 -07:00
Jingning Han
981bb84882 Simplify prediction filter search in rtc coding mode
Reduce unnecessary fetch from MB_MODE_INFO.

Change-Id: Iff89b76d5e2774c00a564e902913a633fa2e1ea9
2015-03-16 14:54:00 -07:00
Yaowu Xu
f2d682fc10 change the order of inter modes evaluated
Change-Id: I10c1ad23b110cf92cb026e895039c215c47abfd0
2015-03-16 12:49:30 -07:00
Jingning Han
2cfddec332 Refactor column integral projection computation
Move the scaling factor outside column projection. This avoids
repeated calculation of the same scaling factor. Profiling shows
that the percentage of vp9_int_pro_col_sse2 of overall cycles
goes from 2.29% down to 1.88%.

Change-Id: I5ac4e324ab2d7f33ba2de66dd2a12e04e04dfd66
2015-03-16 12:07:15 -07:00
Jingning Han
09e0b38a86 Merge "Fix indent in choose_partitioning" 2015-03-16 11:52:12 -07:00
Jingning Han
7cf383d17f Fix indent in choose_partitioning
Change-Id: I4039f8ac75a9cfcc4d07abd0619d1379bb10fe51
2015-03-16 11:01:00 -07:00
Yaowu Xu
51d529a578 vp9_pick_inter_mode(): minor optimizations
1. remove duplicate initialization to mbmi->interp_filter.
2. move mv clamping into ref_frame loop instead of mode checking loop.
3. move the check if last frame is same as golden frame earlier to
avoid initialization of Golden reference related variables.

Change-Id: Idf2d05e19e94a24f69cc289687869fc71d2ff289
2015-03-16 10:08:02 -07:00
Jingning Han
1f9b2b77ad Merge "Fix choose_partitioning threshold setup for speed -5" 2015-03-15 09:04:07 -07:00
Jingning Han
b03cf9317a Fix 1-step refinement search table
Change-Id: I32f0bcb40c6e7ba63bfae487739ededd0b6b2dde
2015-03-14 10:52:11 -07:00
Jingning Han
1f00a9b9d5 Fix choose_partitioning threshold setup for speed -5
The compression performance of speed -5 is on average 12.6% better
than speed -6. At lower bit-rates, the gains are typically 20% or
more. For 2-thread encoding, the speed -5 takes about 1.6x time of
speed -6.

Change-Id: If7a73464a24d33e8f49b9533b51ec51c8da7fc80
2015-03-13 17:01:56 -07:00
Yaowu Xu
98c58e24f7 Merge "Provide information on codec controls" 2015-03-13 15:39:07 -07:00
Marco
87999b1c2e Merge "Fix crash with vp9 denoiser on." 2015-03-13 14:31:40 -07:00
Jingning Han
6cceed09cf Merge "Use sdx4df to do 1-step refinement" 2015-03-13 12:57:49 -07:00
Yaowu Xu
268f10669a Provide information on codec controls
The commit updates the comments in vp8cx.h to make it clear which
codec support each of codec control functions.

Change-Id: Ibf876e289d4325bbb61ce19311da60d384624c2f
2015-03-13 11:56:35 -07:00
Marco
e38066a74d Fix crash with vp9 denoiser on.
Crash occured on very first key frame, because denoiser
temporal function was beng entered.

Updated denoiser unittest to set cpu_used from first frame,
and verified fix fixes the crash.

Change-Id: I3be1124b52846fbbe7248d2c3d6136e086c80bc1
2015-03-13 11:10:02 -07:00
Marco
deaf661f45 Merge "Lower bitrate threshold below which cyclic refresh is turned off." 2015-03-13 10:31:35 -07:00
Alex Converse
f8df916931 Merge "Reconcile active_map and cyclic refresh" 2015-03-13 10:20:15 -07:00
Jingning Han
688c99a706 Merge "Reset src buffer only once in vp9_int_pro_motion_estimation" 2015-03-13 09:56:00 -07:00
Jingning Han
1b3499ae8b Merge "Reduce the number of full block SAD calls" 2015-03-13 09:55:52 -07:00
Jingning Han
cce7020f2c Use sdx4df to do 1-step refinement
Change-Id: Ie0c3ef3ae3aedf049b1a296de607730b79c12672
2015-03-13 09:53:15 -07:00
Marco
62a3f53997 Lower bitrate threshold below which cyclic refresh is turned off.
Change-Id: Ib54ab11adf8178eec74f65388a89c8f912c7869a
2015-03-13 09:42:45 -07:00
paulwilkins
b6749aa3a7 Merge "Shorten GF/arf interval in hard scenes." 2015-03-13 08:45:52 -07:00
Yaowu Xu
5784b9074a Merge changes Ic54c88ec,I6f120b65
* changes:
  Added comment for vp9 only codec controls
  Rename a vp9 only control with vp9e prefix
2015-03-12 21:27:04 -07:00
Jingning Han
ba29125f7b Reset src buffer only once in vp9_int_pro_motion_estimation
Change-Id: I5c96b6a25f9df60da65b7af7c92a921b611746e3
2015-03-12 18:50:53 -07:00
Yaowu Xu
1aa75c65cc Merge "vp9_pick_inter_mode(): Use single loop to evaluate inter modes" 2015-03-12 18:43:23 -07:00
Yaowu Xu
416529069b Rename a vp9 only control with vp9e prefix
Also updated comments and doc to make it clear that the control is
supported in VP9 only.

Change-Id: I6f120b65135fc1185695e9e3dc29fbe0d430824b
2015-03-12 18:33:47 -07:00
Jingning Han
427cdf0a41 Reduce the number of full block SAD calls
This commit uses a 6-point 1-step refine motion search in the
integral projection based full pixel motion estimation, to replace
the current 9-point search.

It reduces runtime cost of speed -6 on some noisy clips, e.g.,
dark720p single thread
33314 b/f, 40.076 dB, 18231 ms ->
33307 b/f, 40.067 dB, 17768 ms

The compression performance for rtc set remains unchanged.

Change-Id: I194ea5a9ce52e5a10baeee36338633adc22f764c
2015-03-12 18:30:57 -07:00
Yunqing Wang
769e6567e9 Merge "Minorly modify model_rd_for_sb_y function" 2015-03-12 17:16:48 -07:00
Jingning Han
7a9d8f1efe Merge "Fix fdct8x8_quant ssse3 overflow issue" 2015-03-12 16:43:09 -07:00
Alex Converse
1bfacd3529 Reconcile active_map and cyclic refresh
Change-Id: Id7f8654aeeb20caa402bc822521b1d72c658f4f9
2015-03-12 16:19:49 -07:00
Yaowu Xu
2b368097c8 vp9_pick_inter_mode(): Use single loop to evaluate inter modes
This commit changes to use single loop to evaluate all inter modes.
There is no impact on compression quality and speed, but allow future
experiment with the order of modes evaluated.

Change-Id: I71696ce1014cbe127e25e98710d835987f5ecc09
2015-03-12 16:14:29 -07:00
Yunqing Wang
5d677c97eb Minorly modify model_rd_for_sb_y function
Added a skip_dc check. If skip_dc = 1, we could eliminate calling
of vp9_model_rd_from_var_lapndz(). This gave slight PSNR & SSIM
gain(<0.1%), and no speed change.

Change-Id: If5ca733366148c86b98e196a00cc890f50e9a3e5
2015-03-12 14:04:14 -07:00
Jingning Han
fcb96b3afd Fix fdct8x8_quant ssse3 overflow issue
This resolves webm issue 968.

Change-Id: Ieb363129b1e135a561141c68211d413226aba754
2015-03-12 12:43:19 -07:00
Deb Mukherjee
791bf5657f Merge "Some rate control adjustments to control overshoot" 2015-03-12 11:10:59 -07:00
Jingning Han
1ff15fbffe Merge "Prevent integer overflow in choose_partitioning" 2015-03-12 09:24:02 -07:00
Jingning Han
90ea10ec91 Merge "Remove unnecessary speed feature checking" 2015-03-12 09:23:51 -07:00
Jingning Han
594890a534 Merge "Apply fast motion search to golden reference frame" 2015-03-12 09:23:41 -07:00
Jingning Han
8fdddd5c01 Merge "Refactor to remove GLOBAL_MOTION" 2015-03-12 09:23:31 -07:00
Yaowu Xu
73508be364 Fix a typo introduced in #94401aff
This fixes all test vector failures

Change-Id: Ie1a9fe0f023f7a0c7e89eb55df1b40ff65302adc
2015-03-12 08:01:08 -07:00
Marco
0adc58037a Merge "Fix visual studio build failure." 2015-03-11 17:19:47 -07:00
Jingning Han
238b6be24b Prevent integer overflow in choose_partitioning
Re-arrange the multiplication and right shift operations to avoid
integer overflow in choose_partitioning.

Change-Id: Ib4005cafb410a67c1960486471d75b6ebe38c4e0
2015-03-11 16:31:42 -07:00
hkuang
4a691aa209 Merge "Refactor the block decode code to make it simpler." 2015-03-11 16:19:14 -07:00
Marco
a291b0b4a3 Fix visual studio build failure.
Change-Id: Ifeb14f945d0f0300eb7b21b38e5720ac1c11a6cf
2015-03-11 16:12:39 -07:00
Jingning Han
313c28f8b8 Remove unnecessary speed feature checking
This commit removes the pred_mv_sad comparison from rtc motion
search, given that a stronger comparison has been done at the
mode search level to eliminate unlikely selected reference frames.

Change-Id: I49b8d24b2174303066fd8eff2102c0648f2869df
2015-03-11 16:11:40 -07:00
Adrian Grange
39d20c6ac3 Merge "Clamp rate correction factor after scaling it" 2015-03-11 16:09:49 -07:00
Jingning Han
54eda13f8d Apply fast motion search to golden reference frame
This commit enables the rtc coding mode to run integral projection
based motion search for golden reference frame. It improves the
speed -6 compression performance by 1.1% on average, 3.46% for
jimred_vga, 6.46% for tacomascmvvga, and 0.5% for vidyo clips. The
speed -6 is about 6% slower.

Change-Id: I0fe402ad2edf0149d0349ad304ab9b2abdf0c804
2015-03-11 16:03:49 -07:00
Jingning Han
1ca4d51b2e Refactor to remove GLOBAL_MOTION
Make the vp9_int_pro_motion_estimation() function return zero
motion vector if high bit depth is turned on, instead of removing
it from compiled codes.

Change-Id: Ia48f010eb590b2d517d5678c394110b326a1a95e
2015-03-11 15:53:15 -07:00
hkuang
94401aff5c Refactor the block decode code to make it simpler.
Change-Id: I0f983cb821ad7ec6fbefe7895cb8124a8fa39df6
2015-03-11 11:37:16 -07:00
Yaowu Xu
dc902fedb2 Merge "Separate rd_thresh adaption by ref_frame" 2015-03-11 10:41:20 -07:00
Adrian Grange
42a89eb8cc Clamp rate correction factor after scaling it
Added clamp on the rate correction factor after
it has been scaled.

Change-Id: I5d4b46a101987b43c5bcfd7e0bd1b7b4d53640a4
2015-03-11 09:08:15 -07:00
paulwilkins
b29c48b03c Shorten GF/arf interval in hard scenes.
This patch accounts in the first pass stats for blocks that
while not coded as intra, are complex and have an intra error /
best error ratio below a threshold.

The modification shortens the GF arf interval for a particular
class of content that contains a lot of blocks matching the
above criteria. (In one short problem test sequence the average
interval dropped from about 14-15 to 10-11)

The change results in small net gains in metrics results for the
Yt(~0.2%) and yt-hd (~0.5%) sets and is approximately neutral
for the other test sets.

The change is currently shielded by a flag and off by default
pending verification that it does not cause other regressions
in tests on a wider YT test set.

Change-Id: I6b803daa6a4ac09a6f428fb3a18be1ecedd974b7
2015-03-11 14:15:23 +00:00