Commit Graph

6619 Commits

Author SHA1 Message Date
Jingning Han
790a96c94f Merge "Refactor rate distortion cost structure" 2014-10-14 08:58:55 -07:00
Adrian Grange
f7c336aa19 Merge "Remove mi_grid_base_array from VP9_COMMON (unused)" 2014-10-14 07:50:17 -07:00
Paul Wilkins
bd8a6a93aa Merge "Clamp rate error estimate." 2014-10-14 02:40:12 -07:00
hkuang
dd080e89a8 Merge "Use pre increment." 2014-10-13 15:24:57 -07:00
Jingning Han
811cef97c9 Refactor rate distortion cost structure
This commit makes a struct that contains rate value, distortion
value, and the rate-distortion cost. The goal is to provide a
better interface for rate-distortion related operation. It is
first used in rd_pick_partition and saves a few RDCOST calculations.

Change-Id: I1a6ab7b35282d3c80195af59b6810e577544691f
2014-10-13 14:27:16 -07:00
hkuang
c5fd035ce0 Use pre increment.
Change-Id: I016b4e77d8268e189473f4c382603afe1ae1750f
2014-10-13 14:07:03 -07:00
Adrian Grange
83b63d573a Remove mi_grid_base_array from VP9_COMMON (unused)
Change-Id: I4b4764463f5a7cdc01ec004b882c6237466c74b0
2014-10-13 11:54:05 -07:00
Paul Wilkins
6dbb9e4d44 Clamp rate error estimate.
Add back clamp which ensures that the Q adaptation
is turned off when the over_shoot_pct and under_shoot_pct
parameters are set to 100.

Change-Id: Id0161b114d39a3029cd3eb28020caab0c3914922
2014-10-13 18:07:58 +01:00
Paul Wilkins
f7f0eaa581 Add adaptation option for VBR.
Allow min and maxQ to creep when the undershoot
or overshoot exceeds thresholds controlled by the
command line under_shoot_pct and over_shoot_pct
values.

Default is 100%,100% which ~disables adaptation.

Derf results for example undershoot% / overshoot%:-

Head:- Mean abs (%rate error) = 14.4%

This check in:-
25%/25% - Mean abs (%rate error) = 6.7%
                  PSNR hit -1% SSIM -0.1%

5% / 5%  - Mean abs (%rate error) = 2.2%
                 PSNR hit -3.3% SSIM - 1.1%

Most of the remaining error and most of the quality hit is
at extreme data rates. The adaptation code still has an
exception for material that is in effect static so that we
don't over adjust and over spend on YT slide show type
content.

(Rebase of If25a2449a415449c150acff23df713e9598d64c9
to resolve a auto-merge error)

Change-Id: Iec4e1613ef0d067454751d8220edb7058dfbd816
2014-10-13 10:16:44 +01:00
Jingning Han
a62acf3c0a Fix ActiveMapTest valgrind warning
This fixes a valgrind warning in the ActiveMapTest unit test
reported in issue 870.

Change-Id: Idf172ab0244ebefe630c3577e649bc9ba7c43d10
2014-10-11 22:36:58 -07:00
Alex Converse
a90255c366 Revert "Add adaptation option for VBR."
This reverts commit 869d4ca519.

This breaks the build via conflict with
e18edd5eb6.

Change-Id: If544b99e367a449452834eb8cce600f58c34ec0d
2014-10-10 11:34:00 -07:00
hkuang
ab4c6efa48 Merge "Optimize the code to set the refernce frame right after reading the header." 2014-10-10 10:40:21 -07:00
hkuang
0d94f725e6 Merge "Correct the code format." 2014-10-10 10:01:05 -07:00
Paul Wilkins
169949dd74 Merge "Add adaptation option for VBR." 2014-10-10 09:22:58 -07:00
Yaowu Xu
bdea0055b2 Merge "vp9/choose_partitioning: add missing clear_system_state" 2014-10-10 09:16:19 -07:00
James Zern
a3e1a9291a vp9/choose_partitioning: add missing clear_system_state
set_vt_partitioning does double math

Change-Id: I8e9d73d5c89b937a5326abf04164d24d9d88c5ef
2014-10-10 08:14:46 -07:00
Paul Wilkins
869d4ca519 Add adaptation option for VBR.
Allow min and maxQ to creep when the undershoot
or overshoot exceeds thresholds controlled by the
command line under_shoot_pct and over_shoot_pct
values.

Default is 100%,100% which ~disables adaptation.

Derf results for example undershoot% / overshoot%:-

Head:- Mean abs (%rate error) = 14.4%

This check in:-
25%/25% - Mean abs (%rate error) = 6.7%
                  PSNR hit -1% SSIM -0.1%

5% / 5%  - Mean abs (%rate error) = 2.2%
                 PSNR hit -3.3% SSIM - 1.1%

Most of the remaining error and most of the quality hit is
at extreme data rates. The adaptation code still has an
exception for material that is in effect static so that we
don't over adjust and over spend on YT slide show type
content.

Change-Id: If25a2449a415449c150acff23df713e9598d64c9
2014-10-10 12:54:16 +01:00
James Zern
7c6fec672f vp9_avg_intrin_sse2: correct intrinsics include
immintrin.h -> emmintrin.h
fixes build where newer intrinsics are unavailable

Change-Id: I79311b39bfa782fc2abeb45884ecb417050cb9f8
2014-10-10 10:05:47 +02:00
hkuang
effc1a6f56 Correct the code format.
Change-Id: If2de420f8123a4e8bf635dd29205dd74ee174eee
2014-10-09 17:57:45 -07:00
hkuang
3304d4e6ca Optimize the code to set the refernce frame right after reading the header.
Change-Id: I495cf4a366e06e3220ed132500b1ba1c8448f708
2014-10-09 16:32:36 -07:00
hkuang
ca27459c1a Merge "Remove unnecessary code." 2014-10-09 15:44:08 -07:00
hkuang
336e255236 Merge "Remove unnecessary scale check in set_ref." 2014-10-09 15:43:31 -07:00
Deb Mukherjee
9a29fdbae7 Merge "Rename highbitdepth functions to use highbd prefix" 2014-10-09 15:39:56 -07:00
hkuang
0e06c8ff36 Remove unnecessary code.
Function will jump to error handler when ref buffer is corrupted.
So "xd->corrupted |= ref_buffer->buf->corrupted;" is useless.

Change-Id: I35353a0637ad0dbb682454e040ef69fa68280bfa
2014-10-09 15:12:12 -07:00
Deb Mukherjee
1929c9b391 Rename highbitdepth functions to use highbd prefix
Uses highbd_ prefix convention consistently.

Change-Id: I58f7f799a7ff8e32701bcd71c955bcf1cdd4581e
2014-10-09 14:40:40 -07:00
hkuang
15a3e5f742 Remove unnecessary scale check in set_ref.
Scale check has been done in read_inter_block_mode_info.

Change-Id: I6c86f93bd579109ed30ff13a04a30e35f5ae6fc5
2014-10-09 12:19:55 -07:00
Jingning Han
112789d4f2 Merge "Remove sub8x8 block index from rd_pick_partition argument" 2014-10-09 11:16:11 -07:00
Deb Mukherjee
3117830af3 Merge "Subpel search cleanups and enhancements" 2014-10-09 11:14:51 -07:00
Alex Converse
9ffbc31367 Merge "Move the high freq coeff check outside store_coding_context" 2014-10-09 11:12:02 -07:00
Jingning Han
6a0d291fce Remove sub8x8 block index from rd_pick_partition argument
This parameter is deprecated. Its function is replaced with
other explicit condition check.

Change-Id: I61337e350ba8ca9eb50382db8b4d4acbf45cb7eb
2014-10-09 09:20:16 -07:00
Yaowu Xu
3af39b9997 Merge "Fix src frame buffer copy and extend" 2014-10-09 07:08:48 -07:00
James Zern
924af1edd8 Merge "set_vt_partitioning: fix type conversion warning" 2014-10-09 03:53:01 -07:00
James Zern
cec763bd97 set_vt_partitioning: fix type conversion warning
double -> int64
+ make threshold_multiplier an int

Change-Id: I6d3607fdf13d670f57c9d9b04a80acb2be1346a0
2014-10-09 11:41:36 +02:00
James Zern
caa0f81914 vp9_rtcd_defs: fix vp9_avg_8x8 declaration
vp9_avg_8x8 does not depend on x86inc, fixes 32-bit OS X build

Change-Id: I709b874ea84bf57c8cdb5ac7d43eecc6b8c1a2dd
2014-10-09 10:44:42 +02:00
Deb Mukherjee
d78dbff09a Subpel search cleanups and enhancements
- Some fixes to surface fit.
- Returns variance function as cost rather than sad in the
  pattern search and diamond search functions. Only
  vp9_pattern_search_sad function used in bigdia search
  uses sad as integer 1-away costs.
- Deploys SUBPEL_TREE_PRUNED_MORE for speed 4+.

Results:
derf [Speed 3]: About +0.036% in coding efficiency without any
discernible speed loss.
derf [Speed 4]: About 2-3% faster at -0.199% loss in coding efficiency.
derf [Speed 5]: About 3-4% faster at -0.149% loss in coding efficiency.

Change-Id: I8462f94f6adb46966ca964f2bd0400977357fd63
2014-10-08 23:59:43 -07:00
Yunqing Wang
189566db58 Merge "Allow mode search breakout at very low prediction errors" 2014-10-08 19:58:18 -07:00
Yunqing Wang
e18edd5eb6 Allow mode search breakout at very low prediction errors
In model_rd_for_sb function, the spatial domain SSE and variance
are checked to see if transform coefficients are quantized to 0.
Besides that, this patch adds another set of thresholds that are
much more strict. These thresholds are used to conduct a partition
block level check to measure if all its TX blocks are skippable
for YUV planes. If it is true, x->skip is set for this partition
block, and thus its mode search is terminated.

This speeds up the encoding at very low prediction error case,
such as screen sharing application. This patch covers what
rd_encode_breakout_test() does, so that function is removed.

Borg test at speed 3 shows:
For stdhd set, psnr: +0.008%, ssim: +0.014%;
For derf set, psnr: +0.018%, ssim: +0.025%.
No noticeable speed change.

Change-Id: I4e5f15cf10016a282a68e35175ff854b28195944
2014-10-08 17:46:22 -07:00
Jingning Han
5fcbcf1b22 Move the high freq coeff check outside store_coding_context
This fixes valgrind message issue 870.

Change-Id: Ibbc2481923a2995029ab05de30c9e8a6e9f0f9a8
2014-10-08 16:10:32 -07:00
Jingning Han
41cea46154 Use local variable in vp9_rd_pick_inter_mode_sb
Change-Id: Ie35a965a6b8de536ccaf61ff61498620d22db205
2014-10-08 16:09:47 -07:00
Jingning Han
f6ff752c63 Merge "Clean up header files in vp9_blockd.h and related files" 2014-10-08 15:25:09 -07:00
Jingning Han
1c3398675f Merge "Use #define statement for MAX_MB_PLANE" 2014-10-08 15:24:56 -07:00
Yaowu Xu
d602500d4a Fix src frame buffer copy and extend
For input source with size that is not multiple of 8, the size is
rounded to 8 and saved in width or height, the original source sizes
are saved in crop_width and crop_height. This commit corrects the
computation of bottom and right extension amounts to use the orignal
sizes, hence crop_width and crop_height.

In addition, this commit also adds the missed initialization for
uv_crop_width and uv_crop_height.

This addresses issue #834

Change-Id: I084543ca7645a4964b88f7cf8ff668f517d3a39b
2014-10-08 11:07:04 -07:00
Jim Bankoski
20254d1daa Merge "experimental : partition using 1/8 x 1/8 image" 2014-10-08 09:04:26 -07:00
Jim Bankoski
4130e691bb Merge "Force better lower quantizer keyframe in case of high quantizer." 2014-10-08 09:04:01 -07:00
Paul Wilkins
2faff64866 Merge "Improve two pass VBR accuracy." 2014-10-08 04:23:30 -07:00
Paul Wilkins
679a1c2f5a Merge "Two pass rc changes." 2014-10-08 04:23:20 -07:00
Jim Bankoski
0ce51d823f experimental : partition using 1/8 x 1/8 image
The concept:

There's too much noise in source pixels for variance and at low bitrate
the reconstructed looks nothing like the source so we have problems
getting good partitionings with either.   This skirts the issue by using
a box blur scaled down version for variance calculations.  To compare
against source_var_ moved keyframe to be rd based like source_var.

Change-Id: Ie3babdbfadae324b7b5a76bea192893af27f0624
2014-10-07 16:36:14 -07:00
Jim Bankoski
dae97868da Force better lower quantizer keyframe in case of high quantizer.
Change-Id: Ie69a164bc166b6a8819777038d65a7d9f9c3361f
2014-10-07 15:40:02 -07:00
Jingning Han
608c4acc1f Merge "Remove vp9_blockd.h from vp9_common_data.c" 2014-10-07 15:34:07 -07:00
Jingning Han
3bbec7b422 Merge "Replace mi_width_log2() with mi_width_log2_lookup table" 2014-10-07 15:33:52 -07:00