Commit Graph

394 Commits

Author SHA1 Message Date
James Zern
3e0138edb7 vp9_satd: return an int
the final sum may use up to 26 bits

+ add a unit test
+ disable the sse2 as the result will rollover; this will be fixed in a
future commit

Change-Id: I2a49811dfaa06abfd9fa1e1e65ed7cd68e4c97ce
2015-11-20 14:35:38 -08:00
Marco
bd6bf25969 Add bias to zero/small motion for noisy source.
Change is only for real-time mode, speed >= 5, and non-screen content mode.
Add bias to zero/low motion for big blocks, if noise estimation
is enabled and noise level is above threshold.

Change-Id: I3a0a4608ede6aa535bda6eca528d20f8aba738e7
2015-11-10 11:23:40 -08:00
Marco
718654848a Use same bias (against non-zero mv for big blocks) for speed 5.
Use same setting for speed 5 (as it is for speed > 5).
Change is only for real-time (non-rd) mode.

Change-Id: I830250eac654328373cb318baa89d4f0e63942e1
2015-11-09 10:09:51 -08:00
Marco Paniconi
c6641709a7 Merge "Bias against non-zero mv for large blocks." 2015-11-04 00:01:23 +00:00
Marco
04a99cb36b Bias against non-zero mv for large blocks.
Change is only for real-time mode, speed > 5, and non-screen content mode.
Bias is based on block size and motion vector level (motion above some threshold).

Helps to improves stability in background from lightning changes.
PSNR/SSIM metrics on RTC set almost no change/neutral (within +/- 0.1).

Change-Id: I7eac13c1ae10be4ab1f40acc7f9f1df5653ece9d
2015-11-03 14:51:56 -08:00
Marco
9a7785b9d6 Update to encoder_breakout_test, for non-rd mode.
Only use non-zero threshold(s) for breakout if
the motion level of the current tested mode is low.

Change-Id: I22aae961cc42371b49d3f648560181cc54708502
2015-11-03 11:49:44 -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
Marco
01860f6fe4 Non-rd mode: Limit transform size for intra to 16x16.
Limit transform size for intra to 16x16, for non-screen content mode.
Little/no change in speed or metrics.
32x32 intra block is rarley selected in RTC (non-screen content) case,
but some visual improvement can be seen in some example,
e.g., captured_video_dark_whd.yuv.

Change-Id: I68e2db87875343b3fb9bb407a7709f0088f84072
2015-09-23 10:59:24 -07:00
Marco
38ad2dcea6 Non-rd pickmode: Don't skip checking zeromv-last mode.
Reference frame masking logic may skip checking zeromv-last mode.
Fix to avoid this and make sure zero-last is always checked.

No noticeable change in speed, and PSNR/SSIM metrics on RTC set overall
neutral (very small gain ~0.02).
Small visual improvement on few RTC clips.

Change-Id: I26eacdc449126424001a4a64e5ac31949f064417
2015-09-21 10:32:23 -07:00
Alex Converse
d5c0e366d7 For screen content consider intra uv when color_sensitivity is set.
Change-Id: I99e330f8a779b4d564c19ef4639a881cb68910ae
2015-09-10 15:03:09 -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
0d8cb09058 Adjustments for VP9 temporal layers, for 1 pass CBR
Adjust logic for golden reference usage in non-rd pickmode,
under svc mode.

Change-Id: If012e21e8123a0684634af0ac7ed3da9c8c7d7cc
2015-08-10 13:21:42 -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
Zoe Liu
873a158f14 Merge "Code refactor on InterpKernel" 2015-07-31 18:20:14 +00:00
Zoe Liu
7186a2dd86 Code refactor on InterpKernel
It in essence refactors the code for both the interpolation
filtering and the convolution. This change includes the moving
of all the files as well as the changing of the code from vp9_
prefix to vpx_ prefix accordingly, for underneath architectures:
(1) x86;
(2) arm/neon; and
(3) mips/msa.
The work on mips/drsp2 will be done in a separate change list.

Change-Id: Ic3ce7fb7f81210db7628b373c73553db68793c46
2015-07-31 10:27:33 -07:00
Alex Converse
4ac5058afc Give skip_txfm constants names.
This is using a define instead of an enum to keep byte packing.

Change-Id: I3abb07c8bfe377e19be4531b624af7b7b4207792
2015-07-31 10:08:08 -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
Yaowu Xu
bf82514b54 vpx_dsp/bitreader.h: vp9_->vpx_
Replace vp9_ in names to vpx_ as they are not codec specific.

Change-Id: I2e583aa63dee769353ada4b42417aa15c4074ebb
2015-07-20 18:06:31 -07:00
Jingning Han
81452cf0b7 Refactor intra block prediction function
This commit simplifies the intra block boundary condition logic.
It removes the block index from the argument set.

Change-Id: If00142512eb88992613d6609356dfd73ba390138
2015-07-13 15:20:47 -07:00
James Zern
017253b7a3 remove vp9_get_interp_kernel()
expose filter_kernels[] and do the table lookup directly

Change-Id: I0b10bff0327c3e01a723736141a9ffd377cd3d20
2015-07-06 13:04:05 -07:00
Scott LaVarnway
c06d56cc7d VP9: Move ref_mvs[][] and mode_context[] from MB_MODE_INFO
to MB_MODE_INFO_EXT.  This saves 36 bytes per 8x8 area for
both the decoder and encoder. (encoder has two MODE_INFO
buffers)

Change-Id: If006abb2224acaf326df3c2be09e77e967662107
2015-06-29 12:46:47 -07:00
Scott LaVarnway
86f4a3d8af Remove tile param
and added to MACROBLOCKD.

Change-Id: I0e60aaa9f84bcc9f2376d71bd934f251baee38db
2015-06-22 06:09:38 -07:00
Jingning Han
7f6cddb58f Take out assertion for block_yrd in rtc coding flow
The internal behavior of block_yrd differs in high bit depth
settings from 8-bit one. This causes the assertion condition not
true for high bit depth.

Change-Id: I15dc02e7162d27cabe78c451941d769d488b1174
2015-06-17 08:51:16 -07:00
Jingning Han
bc7074508a Fix integer overflow issue in rtc coding flow intra mode search
The overflow issue affects a variable that is only used in inter
mode. This commit fixes the ioc warning triggered in the intra
mode. It does not affect the compression performance.

Change-Id: I593d1b5650599de07f3e68176dd1442c6cb7bdbc
2015-06-16 19:31:24 -07:00
Scott LaVarnway
cca866f578 inline vp9_get_segdata()
and change name.

Change-Id: I706645cf9d9dc04f1b3b6ac80df80edb7f101854
2015-06-11 09:52:00 -07:00
Scott LaVarnway
42c0b1b1f1 inline vp9_segfeature_active()
and changed name.

Change-Id: Ie023ca66cc2c823032f58d4faeb53fd1863c94f3
2015-06-11 04:20:55 -07:00
Scott LaVarnway
97880c3324 Merge "Reducing size of MODE_INFO struct" 2015-06-10 13:15:19 +00:00
Marco
8710cceb45 Fix to spatial svc: set reference_frame masking.
For real-time mode: keep reference_frame masking off
for spatial svc.

Change-Id: I15e123c06f67ea040172b8d4042a672f3525b9d8
2015-06-05 08:25:33 -07:00
Scott LaVarnway
baaaa57533 Reducing size of MODE_INFO struct
Reduced size from 124 bytes to 104 bytes.  For decode only builds,
it is reduced to 68 bytes.

Change-Id: If9e6b92285459425fa086ab5a743d0a598a69de3
2015-06-04 07:32:16 -07:00
Marco
26ab314176 For non-rd pickmode: remove VAR_PARTITION condition.
Keep the logic, transform size based on cyclic refresh and bsize,
(that was conditioned on VAR_PARTITION conditions) the same
for all speeds in non-rd mode (speeds >= 5).

No change to speeds >=6.
Small improvement for speed 5, ~0.5/1.5% gain for avg psnr/ssim.

Change-Id: If9c5657f3d30efd3c7f147166bba7cb69ea55114
2015-05-28 17:29:47 -07:00
Scott LaVarnway
bbea7c95d8 Merge "Re-worked header files" 2015-05-28 19:56:39 +00:00
Johann
dee70d355f Merge "Move variance functions to vpx_dsp" 2015-05-26 23:02:11 +00: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
Jingning Han
96dba4902c Fix integral projection motion search for frame resize
This commit fixes the integral projection motion search crash when
frame resize is used. It fixes issue 994.

Change-Id: Ieeb52619121d7444f7d6b3d0cf09415f990d1506
2015-05-22 15:40:45 -07:00
Scott LaVarnway
b962646fc5 Re-worked header files
Various header/test files had to be re-worked in order to
build "Remove cm parameter from vp9_decode_block_tokens()".

This patch reverts the "Remove cm" part and only contains
the re-worked header files.

Change-Id: I520958a88d1991fee988a3c784d0eac40e117a32
2015-05-22 11:19:51 -07:00
Johann
cafae5b544 Merge "Relocate memory operations for common code" 2015-05-13 19:47:24 +00: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
Yunqing Wang
8ba2d2d5a0 Remove unneeded variable declaration
This patch fixed the following warning:
src\third_party\libvpx\source\libvpx\vp9\encoder\vp9_pickmode.c(1607) :
warning C6246: Local declaration of 'this_mode' hides declaration of the
same name in outer scope.

Change-Id: I1d93c4a47a13cb13089fec5bd61e8b58e6cd8d58
2015-05-12 15:01:40 -07:00
James Zern
fd3658b0e4 replace DECLARE_ALIGNED_ARRAY w/DECLARE_ALIGNED
this macro was used inconsistently and only differs in behavior from
DECLARE_ALIGNED when an alignment attribute is unavailable. this macro
is used with calls to assembly, while generic c-code doesn't rely on it,
so in a c-only build without an alignment attribute the code will
function as expected.

Change-Id: Ie9d06d4028c0de17c63b3a27e6c1b0491cc4ea79
2015-05-07 11:55:08 -07:00
Marco
76fe5dfc67 Remvoe EIGHTTAP_SHARP filter check for non-rd mode.
Using EIGHTTAP and EIGHTTAP_SMOOTH seem sufficient.
Hard to see any visual gain from allowing EIGHTTAP_SHARP, and it is
rarely selected.

PSNR/SSIM metrics go up by ~0.18/0.14%.

Change-Id: I96fa0d98f9321b913e3ebcd464d4ff3c63018791
2015-05-06 17:08:34 -07:00
Yunqing Wang
36eabb1c3c Add intra mode early termination in non-rd mode
Added the intra mode early termination in order to
speed up the mode search in non-rd case since we
started to include more intra modes in the search
list. Borg tests(rtc set) showed a 0.048% PSNR gain
and 0.061 SSIM gain. No speed change.

Change-Id: I6f255fe534dc50b736e6a66a726ad458eb9b4443
2015-05-05 16:31:36 -07:00
Marco
b9a72d3c4d Allow for H and V intra modes for non-rd mode.
For non-rd mode (speed >=5): use mask based on prediction block size, and
(for non-screen content mode) allow for checking horiz and vert intra modes
for blocks sizes < 16x16.

Avg psnr/ssim metrics go up by about ~0.2%.

Only allowing H/V intra on block sizes below 16x16 for now, to keep
encoding time increase very small, and also when allowing H/V on 16x16 blocks,
metrics went down on a few clips which need to be further examined.

Change-Id: I8ae0bc8cb2a964f9709612c76c5661acaab1381e
2015-05-04 09:48:41 -07:00
Yunqing Wang
4907c29904 Reduce intra_cost_penalty for BLOCK_8X8
This patch reduced the BLOCK_8X8's intra_cost_penalty, which
allows 8x8 blocks to conduct intra mode search. Borg test
result(rtc set): 0.077% PSNR gain, 0.228% SSIM gain. No speed
changes.

Change-Id: Icfe90c4f6969de24bda8ecacbd3da50330bf22b2
2015-04-30 11:03:06 -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
James Zern
f274c2199b vpx_mem: remove vpx_memcpy
vestigial. replace instances with memcpy() which they already were being
defined to.

Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
2015-04-28 19:59:41 -07:00
Scott LaVarnway
8b17f7f4eb Revert "Remove mi_grid_* structures."
(see I3a05cf1610679fed26e0b2eadd315a9ae91afdd6)

For the test clip used, the decoder performance improved by ~2%.
This is also an intermediate step towards adding back the
mode_info streams.

Change-Id: Idddc4a3f46e4180fbebddc156c4bbf177d5c2e0d
2015-04-21 11:16:45 -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
Jingning Han
4565812032 Merge "Compute prediction filter type cost only when needed" 2015-04-09 14:45:11 -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
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
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
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
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
Yaowu Xu
718feb0f69 move ref_frame_cost computations into a function
Change-Id: Iebf2ad2b1db7e2874788fda8d55e67f4cb1149f1
2015-04-02 18:10:55 -07:00
Marco
6eb05c9ed0 Small fix to segment check in pickmode.
Change-Id: Id5fd82a504def2523292466fbaad5dade9424c72
2015-04-02 09:55:13 -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
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
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
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
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
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
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
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
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
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
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
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
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
Alex Converse
f8df916931 Merge "Reconcile active_map and cyclic refresh" 2015-03-13 10:20:15 -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
Yunqing Wang
769e6567e9 Merge "Minorly modify model_rd_for_sb_y function" 2015-03-12 17:16:48 -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
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
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
Yaowu Xu
d549aa3b17 Separate rd_thresh adaption by ref_frame
Only update the rd_thresh factors for modes sharing same reference
frame. This helps overall compression of 6 and 7 by .13% and .19%
respectively without any noticeable speed difference.

Change-Id: Idb3a3879512c5d7d0880034516079949290690c5
2015-03-10 19:06:52 -07:00
Jingning Han
9708f9d66a Merge "Skip golden ref frame check when it is same as last ref frame" 2015-03-09 12:27:19 -07:00
Jingning Han
6245a91e0b Skip golden ref frame check when it is same as last ref frame
When golden reference frame is refreshed, the next frame has both
its last and golden reference frames point to the same reference
frame in real-time coding mode. Experiments suggest that using
two separate reference frames for frames right after golden refresh
frame does not provide further compression performance advantage.
This commit hence retains the current encoder implementation and
shuts off the mode search over golden reference frame in this case.

It makes the encoder run slightly faster at no coding performance
change.

Change-Id: I1561f7799253a10e675d05c63c1749fe9e85b472
2015-03-09 11:14:55 -07:00
Yunqing Wang
268f260d64 Modify the setting of transform skip flags in non-rd mode
While searching for the best mode in non-rd case, SSE of
a partition block is calculated and the transform size is set.
This patch rewrites the skip checking conditions based on
transform size instead of partition size to be more precise.

Small gains were seen in rtc set borg test (speed 6).
AVG PSNR: 0.087%, overall PSNR: 0.073%, SSIM: 0.146%.
No noticeable speed change.

Change-Id: I5603ca5339c784dfa02263f4005988ccd8c32f6e
2015-03-06 09:22:00 -08:00
Adrian Grange
3807dd82ab Make encoder buffer allocation dynamic
Frame buffers are now allocated dynamically on-demand.

Entries in the reference frame map, cm->ref_frame_map,
may now be set to -1 (INVALID_IDX) to indicate that
there is not a valid reference buffer in that "slot".

All slots in the reference frame map are now initialized
to the empty state (-1) and each buffer is initialized
to have a reference count of 0.

Change-Id: Id1afe98de98db4ae8b2dfefed7889c3b28c68582
2015-03-04 07:58:32 -08:00
Jingning Han
1790d45252 Use variance metric for integral projection vector match
This commit replaces the SAD with variance as metric for the
integral projection vector match. It improves the search accuracy
in the presence of slight light change. The average speed -6
compression performance for rtc set is improved by 1.7%. No speed
changes are observed for the test clips.

Change-Id: I71c1d27e42de2aa429fb3564e6549bba1c7d6d4d
2015-03-01 10:42:56 -08:00
Marco
a1b402e71c Merge "Adjustments to cyclic refresh (aq-mode=3)." 2015-02-20 09:55:05 -08:00
Jingning Han
6728655422 Merge "Add high bit depth support to rtc sub8x8 block coding" 2015-02-20 09:35:18 -08:00
Marco
0187f4b411 Adjustments to cyclic refresh (aq-mode=3).
Target higher delta-qp for big blocks with zero motion,
and for segment#1: avoid 64x64 partition size and force 8x8 tx size.

Metrics on RTC set mostly positive: SSIM up by ~4%, PSRN by ~1.5%.
Doesn't seem to be any change in speed.

Change-Id: I1f68fa3c4f62dab3b90cc58041f05ebb048ae5ac
2015-02-20 08:47:59 -08:00