Commit Graph

1291 Commits

Author SHA1 Message Date
Dmitry Kovalev
4345d12d28 Replacing txfm_size with tx_size.
Change-Id: Ifa6374e9db5919322733b656e0865f5f19ee6f2c
2014-06-12 11:57:26 -07:00
Alex Converse
b0a8057f67 Fix SEG_LVL_SKIP in RD inter mode selection.
* Only use ZEROMV, disalowing the intra modes that were previously
  tested.
* Score rate and distortion as zero.

Change-Id: Ifcf99e272095725f11da1dcd26bd0f850683e680
2014-06-11 17:52:15 -07:00
Dmitry Kovalev
bc93f425d0 Removing two unused TX_SIZE_SEARCH_METHOD members.
Change-Id: I33a38bb9f46e7ef509bbbf0cfd7bc3ea5072d022
2014-06-10 11:08:30 -07:00
Deb Mukherjee
81c2fcccbc Merge "Remove Wextra warnings from vp9_sad.c" 2014-06-02 22:39:17 -07:00
Alex Converse
04a8980c65 Merge "Remove an attempt to handle SEG_LVL_SKIP sub8x8." 2014-06-02 18:50:40 -07:00
Deb Mukherjee
fc88292ef2 Remove Wextra warnings from vp9_sad.c
As a side-effect, the sad unit tests for VP8 and VP9
had to be separated.

Fixes a bug in original patch:
(https://gerrit.chromium.org/gerrit/#/c/70163/8)
that was reverted due to a nightly test failure.

Change-Id: Ia2a4e9e278fd3c89d6c3c82fcc6381320ec2a8a6
2014-06-02 13:50:20 -07:00
Frank Galligan
c40a968e13 Merge "Revert "Remove Wextra warnings from vp9_sad.c"" 2014-06-01 16:58:11 -07:00
Frank Galligan
0b44988952 Revert "Remove Wextra warnings from vp9_sad.c"
This reverts commit 916550428d

Change-Id: I500822b03f09c64ff6ec5396c68edee9ca3b75cb
2014-06-01 16:20:26 -07:00
Dmitry Kovalev
5132e6da1a Merge "Converting disable_inter_mode_mask to inter_mode_mask." 2014-05-31 00:08:45 -07:00
Dmitry Kovalev
eccae1de19 Removing unused ref_frame_mask local var.
Change-Id: Ie11558c076a0161cc9608788e050b1b16e31c490
2014-05-29 15:03:02 -07:00
Dmitry Kovalev
403719963e Converting disable_inter_mode_mask to inter_mode_mask.
Making this consistent with intra mode masks: you need to specify
allowed inter/intra modes to use.

Change-Id: Iaecd28bf79047259707d8e7a59a57bb7b856383e
2014-05-29 12:25:41 -07:00
Alex Converse
2a89983999 Remove an attempt to handle SEG_LVL_SKIP sub8x8.
SEG_LEVEL_SKIP requires the block size to be at least 8x8. Attempting to
use it on smaller partitions causes the decoder to reject the bitstream.

Change-Id: Ia7188cdf8ae5ac1df6bd29f3f80dbb0610e1f7b1
2014-05-29 12:04:09 -07:00
Alex Converse
6fbbb33aaf Always allow ZEROMV when SEG_LVL_SKIP is on.
Change-Id: I6db1dc82f66438ac48f571d2f1a2ac7c39a97a1a
2014-05-27 18:17:17 -07:00
Alex Converse
75d77e36db Fix the all intra modes mask constant.
The new constant expands to 0x3fc00808.

Change-Id: Ib5109e4faf035fe0402b59f8a8d2e412628b9276
2014-05-27 18:17:17 -07:00
Yaowu Xu
4c9843cbef vp9_rdopt.c: Removed 2 unused parameters
Change-Id: I935ec0e78570ce3d3585f972350e39043eefa30a
2014-05-27 14:45:19 -07:00
Deb Mukherjee
444f93945b Merge "Remove Wextra warnings from vp9_sad.c" 2014-05-27 11:54:05 -07:00
Dmitry Kovalev
bf503e5236 Merge "Reusing rd_less_than_thresh() function." 2014-05-27 10:50:55 -07:00
Deb Mukherjee
916550428d Remove Wextra warnings from vp9_sad.c
As a side-effect, the sad unit tests for VP8 and VP9
had to be separated.

Change-Id: I068cc2391eed51e9b140ea6aba78338c5fec8d71
2014-05-22 22:21:16 -07:00
Dmitry Kovalev
72ab966d5e Removing vp9_pragmas.h.
Change-Id: I9120a87e27e73e496932d11716937e2fad246521
2014-05-22 13:46:31 -07:00
Dmitry Kovalev
508cd5a6bf Reusing rd_less_than_thresh() function.
Change-Id: I29df10fde86128467f5e99fc373ac04f004257e1
2014-05-21 12:20:07 -07:00
Dmitry Kovalev
81e03394d6 Replacing int_mv with MV.
Change-Id: Icd7eea20e944e3e28e5eb20cdc088866a54d53b4
2014-05-19 11:43:07 -07:00
Dmitry Kovalev
f80bd43bf8 Removing unused members from PICK_MODE_CONTEXT struct.
Change-Id: Ieb3bc037a2ae7791323a0f9cec04381ba9b0c795
2014-05-19 10:41:58 -07:00
Dmitry Kovalev
05d55026f7 Merge "Reusing swap_block_ptr() function." 2014-05-19 10:28:51 -07:00
Dmitry Kovalev
51545f5753 Moving PC_TREE from MACROBLOCK to VP9_COMP.
Because PC_TREE is encoder-level data, not MACROBLOCK-level data.

Change-Id: I4f620c0781acd3a2744860610117e74948e0b2b5
2014-05-16 10:17:13 -07:00
Yaowu Xu
8ea9f1dad7 Merge "vp9_rdopt.c: cleanup -wextra warnings" 2014-05-15 17:44:54 -07:00
Jim Bankoski
ec82d2dfec Merge "Revert "Remove Wextra warnings from vp9_sad.c"" 2014-05-15 11:54:23 -07:00
Yaowu Xu
d7227958a7 vp9_rdopt.c: cleanup -wextra warnings
Change-Id: I1f87c689cad2224181d40a7d00f5c1064ceefa4b
2014-05-15 11:28:38 -07:00
Dmitry Kovalev
073fbdf7f5 Reusing swap_block_ptr() function.
Change-Id: I51ae33fcaaa7330b68493a782ec6ef02539fda71
2014-05-15 11:19:43 -07:00
Jim Bankoski
a16794dd31 Revert "Remove Wextra warnings from vp9_sad.c"
This reverts commit 7ab9a9587b

Nightly test http://build.webmproject.org/jenkins/view/libvpx-nightly-tests/job/libvpx%20unit%20tests%20(valgrind-2)/arch=x86_64-linux-gcc,filter=-*VP8*:*Large.*/276/console

Failed 

This patch did not address all the assembly issues 
some of the vp8 assembly counts on 5 arguments being passed in to this function:   

one example : vp8_sad8x16_wmt

Please address or split this into vp9 and vp8 patches.

Change-Id: I78afcc171649894f887bb8ee3c66de24aaddc7ca
2014-05-15 08:31:20 -07:00
Deb Mukherjee
9687c057f8 Merge "Remove Wextra warnings from vp9_sad.c" 2014-05-14 10:01:50 -07:00
Paul Wilkins
200f9aed4f Silence unused parameter warnings.
Remove two unused parameters in the function
vp9_refining_search_8p_c().

Change-Id: Ic192734586291cf5400926eeb8e720e69d40835c
2014-05-14 14:06:16 +01:00
Deb Mukherjee
7ab9a9587b Remove Wextra warnings from vp9_sad.c
As a side-effect, the max_sad check is removed from the
C-implementation of VP8, for consistency with VP9, and to
ensure that the SAD tests common to VP8/VP9 pass.
That will make the VP8 C implementation of sad a little slower
but given that is rarely used in practice, the impact will be
minimal.

Change-Id: I7f43089fdea047fbf1862e40c21e4715c30f07ca
2014-05-14 03:17:31 -07:00
Yaowu Xu
26cb7bee7d Change to use proper type
Change-Id: If1afb9f3eaec88079d1d97907870409bce691c2a
2014-05-12 11:56:17 -07:00
Alex Converse
4bb70ea136 Skip testing large tx sizes when encoding lossless.
Change-Id: Ib7a17893f6dc0f501b1252ae32804ede144dde37
2014-05-08 18:07:14 -07:00
Dmitry Kovalev
e91616a5d4 Merge "Using SPEED_FEATURES instead of VP9_COMP in vp9_init_search_range()." 2014-05-07 14:07:33 -07:00
Dmitry Kovalev
cc5eee12bf Merge "Removing MODE_TEST_HIT_STATS." 2014-05-07 10:40:31 -07:00
Yunqing Wang
fffeaa395c Merge "Clean up full-pixel search calling code" 2014-05-07 08:33:03 -07:00
Dmitry Kovalev
ec234eb5e1 Merge "Moving costs from MACROBLOCK to VP9_COMP." 2014-05-05 19:10:25 -07:00
Yunqing Wang
a3c5a79426 Clean up full-pixel search calling code
Removed repetitive code.

Change-Id: Ib6adb6eaf7d4e3feeabb71651f4cc447974a925d
2014-05-05 17:44:13 -07:00
Adrian Grange
a481fcc3e0 Merge "Fix mode selection bug when ARNR filtering disabled" 2014-05-02 08:12:00 -07:00
Dmitry Kovalev
7d9d5df263 Using SPEED_FEATURES instead of VP9_COMP in vp9_init_search_range().
Change-Id: I961d50d6fafdd37ef7f23f0a871d28e28d2084ca
2014-05-01 16:36:51 -07:00
Dmitry Kovalev
66307bf2c8 Moving costs from MACROBLOCK to VP9_COMP.
Change-Id: I61471dd0f77d1547abec13cbf9670e1c4eb9131a
2014-05-01 16:12:23 -07:00
Adrian Grange
0423a96469 Fix mode selection bug when ARNR filtering disabled
When ARNR filtering is disabled, by setting
arnr_max_frames=0, mode_skip_mask was being set to
-1 for the ARF frame resulting in no mode being
selected for the block.

The intent is to restrict the reference frame to the
previous ARF frame and the mode to one of ZEROMV,
NEARMV or NEARESTMV.

Change-Id: Ifc3920b153142cd01d422910c94d2f20ffb6f129
2014-05-01 14:38:58 -07:00
Dmitry Kovalev
dd1a393624 Replacing int_mv with MV.
Change-Id: Idccb530c814cb8a2fb9f7d0c11eaef25044efe5e
2014-04-30 15:50:13 -07:00
Dmitry Kovalev
4788d4534c Removing MODE_TEST_HIT_STATS.
It seems nobody uses it now.

Change-Id: Ided479cb7f5023559efc8f102ecead43884f4441
2014-04-30 14:17:05 -07:00
Dmitry Kovalev
e608418899 Renaming MB_PREDICTION_MODE to PREDICTION_MODE.
Actually, it would be great to have two separate enums INTRA_MODES and
INTER_MODES in future.

Change-Id: I6c4147cf0002853da9c1e03fe9514eab876f01c8
2014-04-22 17:48:31 -07:00
Dmitry Kovalev
ef003078e8 Renaming "onyx" to "encoder".
Actual renames:
  vp9_onyx_if.c -> vp9_encoder.c
  vp9_onyx_int.h -> vp9_encoder.h

Change-Id: I80532a80b118d0060518e6c6a0d640e3f411783c
2014-04-22 14:57:05 -07:00
Dmitry Kovalev
ece689650a Merge "Cleaning up vp9_rdopt.c." 2014-04-21 10:41:04 -07:00
Dmitry Kovalev
d5d26f7692 Cleaning up vp9_rdopt.c.
Change-Id: Ifd008968326e61ab492162351e358bf0ac0dac0a
2014-04-18 16:56:43 -07:00
Dmitry Kovalev
76d58ba414 Moving set_rd_speed_thresholds{,_sub8x8} to vp9_rdopt.{h, c}.
Change-Id: I983364b33e8f103b43a0448821e890989176f1cc
2014-04-18 16:34:01 -07:00
Dmitry Kovalev
69b88df206 Merge "Adding is_best_mode() function." 2014-04-17 18:26:54 -07:00
Jim Bankoski
1355af5c42 Merge "rename labels2mode because it was a terrible name." 2014-04-17 15:42:41 -07:00
Jim Bankoski
209d348c92 Merge "renamed pick_best_mbsegmentation and remove rd_check_segment_txsize" 2014-04-17 15:42:36 -07:00
Jim Bankoski
d9db2aa12a Merge "rename mode_index to ref index in vp9_rd_pick_inter_mode_sub_8x8" 2014-04-17 15:42:27 -07:00
Dmitry Kovalev
52549b4e78 Adding is_best_mode() function.
Change-Id: Idca7c1cd8a12df465c58b6ba064a99404b3b4bce
2014-04-17 15:09:55 -07:00
Jim Bankoski
d3ccf55674 rename labels2mode because it was a terrible name.
Change-Id: I2d577d11966fcc5ffaaf0896bf51d18078ad1e9c
2014-04-17 13:48:54 -07:00
Jim Bankoski
fba9b09f7e renamed pick_best_mbsegmentation and remove rd_check_segment_txsize
Change-Id: Ia7d33bc3eb595965bccf4b2231df1e3b2a0243c6
2014-04-17 09:11:23 -07:00
Jim Bankoski
5c28d1a1f0 rename mode_index to ref index in vp9_rd_pick_inter_mode_sub_8x8
Change-Id: I00bceb9de2009963c91e5102564c05c31ac1ad78
2014-04-17 08:40:47 -07:00
Dmitry Kovalev
2c8c1f5370 Replacing cpu_used with speed in VP9_CONFIG.
Change-Id: I86b85b5c11388e84a48f8936330c0d920df5d1f0
2014-04-16 18:31:42 -07:00
Alex Converse
0d8e4f91a2 Unfork rd_thresh sub8x8.
Remove duplicate rd_thresh code introduced when vp9_rd_pick_inter_mode_sub8x8()
was forked from vp9_rd_pick_inter_mode_sb().

Change-Id: I3c9b7143d182e1f28b29c16518eaca81dc2ecfed
2014-04-16 10:23:37 -07:00
Dmitry Kovalev
f3739f9052 Consistent mode names.
Change-Id: Icb4851d98c951506fe5d73d8d5a8ac7e53fecfd0
2014-04-14 14:09:39 -07:00
Dmitry Kovalev
07dddfa3fd Merge "Cleaning up check_best_zero_mv()." 2014-04-14 10:33:43 -07:00
Dmitry Kovalev
1f58f9d092 Fixing error found by ioc.
vp9/encoder/vp9_rdopt.c:3913:44: runtime error: index -1 out of bounds for
type 'RefBuffer [3]'.

Change-Id: Ic0ec755328853b359e3a1ee84d319589183e38b7
2014-04-11 17:14:15 -07:00
Dmitry Kovalev
35a63b7c0f Cleaning up check_best_zero_mv().
Change-Id: I5c450a4932fb4f20449487596932458ee3b48ae0
2014-04-11 14:32:07 -07:00
Dmitry Kovalev
6653bf7178 Merge "Adding RD_OPT struct." 2014-04-11 14:08:16 -07:00
Dmitry Kovalev
1ff4aa33de Adding RD_OPT struct.
Change-Id: I2d1b5c1481aefe226082e1f096ca9edd340d4d31
2014-04-11 10:58:37 -07:00
Dmitry Kovalev
63fa722179 Removing unused cost arguments from mcomp functions.
Change-Id: Id81a76d18be6b2de69f81bb563d74c3bb356d434
2014-04-11 10:24:36 -07:00
Dmitry Kovalev
73aa5b7656 Replacing int_mv with MV.
Change-Id: I1020dec1ac2e9404a8efcc04681a050417b8b065
2014-04-10 23:48:09 -07:00
Alex Converse
67affd9ec9 Merge "Remove vestiges of large tx sizes in sub8x8 code." 2014-04-10 11:13:50 -07:00
Alex Converse
6a9b44c281 Merge "Cleanup table declarations in vp9_rdopt." 2014-04-10 11:13:44 -07:00
Yaowu Xu
675d95f9d9 Merge "Prevent the usage of invalid best_mode_index" 2014-04-10 09:04:10 -07:00
Alex Converse
dad9e4abaa Remove vestiges of large tx sizes in sub8x8 code.
Change-Id: I27015ed57b4c4390cfde3d0eecd82c3e76fd3786
2014-04-09 18:43:29 -07:00
Yaowu Xu
1dcc1aa942 Prevent the usage of invalid best_mode_index
This commit changed the initialization of best_mode_index to -1 to make
sure it is not mistakenly used for mode masking.

Change-Id: I75b05db51466070dd23c4ee57a4d4b40764dc019
2014-04-09 17:56:06 -07:00
Alex Converse
71ffc7d7ff Merge "Remove unused tile arguments from vp_rdopt." 2014-04-09 16:45:46 -07:00
Alex Converse
1eee13c0ab Merge "Cleanup vp9_rd_pick_inter_mode_sub8x8()." 2014-04-09 16:45:41 -07:00
Yaowu Xu
2dc92482d0 Merge "Fix the setting of mode_skip_mask" 2014-04-09 14:29:23 -07:00
Alex Converse
666ecf21df Cleanup table declarations in vp9_rdopt.
Change-Id: Ia4bef41a6b0252593ad84612a2a143c724fd03ea
2014-04-09 14:22:39 -07:00
Alex Converse
3ab4d57196 Remove unused tile arguments from vp_rdopt.
Change-Id: I721ff26e3d5dbef80b8cd2dd562adae3748f6687
2014-04-09 11:48:30 -07:00
Alex Converse
dcb5157608 Cleanup vp9_rd_pick_inter_mode_sub8x8().
Change-Id: I9be2e4e9aeda0fae6dc946deae2999be51daebe0
2014-04-09 11:48:24 -07:00
Yaowu Xu
4f95a7fe3e Fix the setting of mode_skip_mask
In mode selection loop, once mode_index pass mode_skip_start, all
modes with a different reference frame from current best mode are
masked out using mode_skip_mask.

However, the setting of mode_skip_mask may use an invalid mode if
there is no mode tested yet. This commit fixes the issue by making
sure a mode has been tested and selected. Otherwise, no mode will be
masked out because of their reference frame.

Change-Id: Ib0009e8a96836a65cf5347440fff8a2e1a67f29f
2014-04-09 11:42:28 -07:00
Jingning Han
06ec873f2c Select prediction filter type in non-RD mode decision
This commit allows the non-RD mode decision flow to  select
prediction filter type in NEWMV mode. It provides 8.14% compression
performance gains in both settings of AQ=0 and 3. The current speed
impact is about 5% to 10% slower.

Change-Id: Id66ecebf77abd8f90fb3f6a066c0e8dfb4bf1c42
2014-04-08 16:47:42 -07:00
Dmitry Kovalev
a9f324fa7f Removing interp_kernel from MACROBLOCKD.
Now interp_kernel is obtained when it is really required (based on
mbmi->interp_filter value).

Change-Id: I4c7a93c179d1045eba16e7526c293d02c9b8b47e
2014-04-03 15:28:42 -07:00
Dmitry Kovalev
86f44a91f4 Renaming two members in MACROBLOCKD struct.
Renames:
  mi_8x8 -> mi
  mode_info_stride -> mi_stride

Change-Id: I66f3e5fd1e7b7f46f108af5bb711c5fd9493c1be
2014-04-01 17:46:40 -07:00
Alex Converse
79e68bce8a Remove a duplicate block_size variable.
Change-Id: Ia6b1e3c5a8ac21219bbfe9eecdb4801f3eaa10e5
2014-03-27 14:01:11 -07:00
Dmitry Kovalev
0abe813c0e Moving thresh_mult{,_sub8x8} from SPEED_FEATURES to VP9_COMP.
SPEED_FEATURES should contain only configuration parameters.

Change-Id: I7d6d0636879c3e87dad09bc9455c1cf1dc039da8
2014-03-26 11:29:10 -07:00
Alex Converse
9fe1450da3 Refactor out zero motion vector equivalence.
Change-Id: I6b20248b6f76545356f910ca6386f5466e287b6e
2014-03-25 14:17:55 -07:00
Alex Converse
de3fc51712 Add consts to cost_mv_ref.
Change-Id: Ie5dadb5c2bcfe80a703edb58a71dc453644c9ade
2014-03-25 14:17:55 -07:00
Dmitry Kovalev
6b32e5f04a Using local variable for token_cache.
We use local variable for token_cache in the decoder.

Change-Id: I032763fa7894313cffe73e3f14863ae1d0527665
2014-03-21 12:14:05 -07:00
Yunqing Wang
cf07d3e332 Remove unused mode_sad
Removed mode_sad.

Change-Id: I230b42ac9b617ae2c375e297057aa0756bd355fe
2014-03-20 09:28:16 -07:00
Dmitry Kovalev
66bf94965e Rearranging and removing unused defines.
Change-Id: I03049f89565ce19a297e65e2d53db127dc6f77d9
2014-03-18 11:20:06 -07:00
Dmitry Kovalev
fec0d4bc7d Merge "Removing last_mi from MACROBLOCKD struct." 2014-03-12 12:19:43 -07:00
Alex Converse
59853f8fdf Fix some active_map corner cases.
These were discovered by ActiveMapTest.

Change-Id: Ifcd305ae2d954b6ec7edcaed0f80baf18c769e01
2014-03-11 16:39:42 -07:00
Alex Converse
75272c97cb Merge "Add a conservative RD based active map in vp9." 2014-03-11 13:39:33 -07:00
Dmitry Kovalev
ff935ff781 Removing last_mi from MACROBLOCKD struct.
Change-Id: Ied12b39c55667b26fd3bf90eb331e601c53a10f6
2014-03-10 16:02:03 -07:00
Alex Converse
29a487c77f Add a conservative RD based active map in vp9.
Change-Id: I47b3c38aadfd8f3ea08515a18a5948aa1375c650
2014-03-10 15:48:43 -07:00
Dmitry Kovalev
bbfa9f6959 Cleaning up vp9_rdopt.c.
Change-Id: I8f06d03689ee90a19c9067840b24748bfe2d741f
2014-03-10 15:21:30 -07:00
Deb Mukherjee
44a203f5cd Merge "Support for a fast diamond search" 2014-03-10 09:53:21 -07:00
Jim Bankoski
622f06eb59 Merge "vp9_reconinter.h static functions in header converted to global" 2014-03-10 07:36:05 -07:00
Deb Mukherjee
bead2e8fb4 Support for a fast diamond search
Adds a fast diamond search which is about 5% faster than FAST_HEX
with only a 0.1% drop in psnr when turned on for both speeds 5 and 7.
This search is turned on for speed 7.

Change-Id: I497630aa88a5148926086bb3038e7975e5f4eb98
2014-03-07 17:15:09 -08:00
Jingning Han
6849cde893 Merge "Use modeled rate distortion costs for non-RD mode" 2014-03-07 09:06:24 -08:00
Jingning Han
539c961ed4 Use modeled rate distortion costs for non-RD mode
This commit replaces SAD cost with modeled rate-distortion cost
for non-RD mode decision. It translates the prediction residual
SSE into estimate rate and reconstruction distorion costs, hence
capturing the quantization setting effect. The compression
performance of speed -7 for rtc set is improved by 14.79%.

Change-Id: Ifda014eb0501d13109fe7f92680bf1410b463632
2014-03-06 23:00:48 -08:00
Dmitry Kovalev
daf18d6d6c Cleaning up labels2mode() function.
Change-Id: I76e39f7c5545ba4e0cd537f530c574531356e94a
2014-03-06 11:43:53 -08:00
Dmitry Kovalev
7a7db0f060 Merge "Combining mode_mv[] and second_mode_mv[]." 2014-03-05 22:29:56 -08:00
Dmitry Kovalev
eb63569d5e Merge "Cleaning up mode cost manipulations." 2014-03-05 22:28:05 -08:00
Dmitry Kovalev
bd1d7c9c81 Merge "Adding vp9_cost.{h, c} files." 2014-03-05 22:26:28 -08:00
Dmitry Kovalev
89c3da568f Merge "Inlining and removing vp9_set_mbmode_and_mvs()." 2014-03-05 21:45:48 -08:00
Jingning Han
3dfa93b058 Merge "Move set_speed_feature out of frame encoding" 2014-03-05 16:00:50 -08:00
Dmitry Kovalev
c9f79ca85c Inlining and removing vp9_set_mbmode_and_mvs().
Change-Id: I9717ef611ef9c39b109b2358c9771bf7fae2dd50
2014-03-05 14:22:31 -08:00
Dmitry Kovalev
627720fa81 Cleaning up mode cost manipulations.
Change-Id: If175d97990454b171b6abeddb76d142497484487
2014-03-05 12:29:44 -08:00
Dmitry Kovalev
021073fd5f Adding vp9_cost.{h, c} files.
Change-Id: If90c1bc822873156d4e38fca1938e4907f6c95f0
2014-03-05 11:57:57 -08:00
Dmitry Kovalev
a16f1a9bb4 Combining mode_mv[] and second_mode_mv[].
Change-Id: Ie5f69d39b49a4169cc731d4487e4668fb5af4b4f
2014-03-05 11:12:00 -08:00
Jingning Han
a57cff2132 Move set_speed_feature out of frame encoding
Set speed features before running frame encoding. This avoids
redundant RD threshold calculation in key frame coding.

Change-Id: If8e3cf2c02976baa59b310c1c23af9eea0c46e36
2014-03-04 18:49:56 -08:00
Alex Converse
bbc8c9d29a Prune RT mode decisions for BLOCK_32x32 and up
* Remove all non-DC intra modes for BLOCK_32x32 and up
* Remove all intra modes for blocks bigger than BLOCK_32x32
* Remove ZEROMV for BLOCK_32x32 and up
* Only consider NEARESTMV for blocks bigger than BLOCK_32x32

Change-Id: Ia18351a238213e2f072f9e481d622949346a245f
2014-03-04 09:48:31 -08:00
Deb Mukherjee
b80020d4db Refactoring motion search libs
The core motion estimation fucntions all return sad now consistently.
The only exception is vp9_full_pixel_diamond(), however the core diamond
and refining search routines called from vp9_full_pixel_diamond() also
return SAD. If variance of pred error + mv cost is desired it must be
calculated explicitly outside these functions. For very fast encoding,
hopefully this will eliminate some redundant computations.

Also suggests reimplementing FAST_HEX with the vp9_pattern_search
framework. It is not exactly the same as the existing FAST_HEX, but
performance is slightly better and speed is very similar. Enables
removing a lot of duplicate code.

Change-Id: I152736393438c25bdf7e96b37cbb8ce330f4f94a
2014-03-03 15:13:59 -08:00
Jim Bankoski
e5e9b05d68 vp9_reconinter.h static functions in header converted to global
Change-Id: I916944950deb22f4c2301d83a803b732bf3ecd77
2014-03-03 14:58:43 -08:00
Dmitry Kovalev
f084af5ca7 Merge "Adding consts and cleaning up vp9_rdopt." 2014-03-03 14:17:31 -08:00
Jim Bankoski
b247c14c07 Merge "cost_coefs approximation speed up" 2014-03-03 14:08:24 -08:00
Alex Converse
0873dc3ab4 Merge "Enforce intra_y_mode_mask for inter rd." 2014-03-03 12:55:25 -08:00
Dmitry Kovalev
c288367678 Adding consts and cleaning up vp9_rdopt.
Change-Id: I9423b543e1be414e5c9e10480b813f06e6b88f8a
2014-03-03 12:19:51 -08:00
Jim Bankoski
9c63e887e6 cost_coefs approximation speed up
This patch adds a new speed feature which doesn't do the rather
expensive entropy context lookup or save to the table,  while
doing costing.

The speed up on desktop36p.y4m is around 10% other clips much less.

On the RTC test set this was + 1% in overall datarate.

Change-Id: Ia5144bbf45270671e7be9c8e4055369909e2f738
2014-03-03 11:49:13 -08:00
Alex Converse
f466fc8bfa Refactor ZEROMV equivalence
This gets more accurate mode hit stats. It's also the first step to
handling ZEROMV not being allowed more intelligently.

Change-Id: I5de6734507b5177bf73e9ddbad923f218c39f3e4
2014-03-03 11:32:24 -08:00
Alex Converse
0fa1e7ee09 Enforce intra_y_mode_mask for inter rd.
intra_y_mode_mask is already enforced for the sub8x8 case.
intra_uv_mode_mask is already enforced for all sizes.

Change-Id: Ia9dd14701cb49873c2e8f24eb5f8b255eaf76a1f
2014-03-03 10:50:17 -08:00
Alex Converse
07c4d2252b Merge "Cleanup conditions in vp9_rd_pick_inter_mode_sb()." 2014-03-03 10:23:51 -08:00
Dmitry Kovalev
f97afbc8ea Merge "Using ref_mv[2] instead of two separate variables." 2014-02-28 16:07:45 -08:00
Dmitry Kovalev
3557dfc20f Merge "Sorting includes in vp9_rdopt.c." 2014-02-28 15:37:51 -08:00
Dmitry Kovalev
aed826b065 Using ref_mv[2] instead of two separate variables.
Change-Id: I909a81991aa0cc18afe6526542c7513837445213
2014-02-28 14:10:51 -08:00
Dmitry Kovalev
d89bdd3674 Sorting includes in vp9_rdopt.c.
Change-Id: I7e2591b4b54e0eac8521e128c7d97f62d2057ed8
2014-02-28 14:00:15 -08:00
Deb Mukherjee
f872a98b1b Adds speed 8 to vp9 as reference
Adds a speed 8 to VP9 where only the nearestmv (0 mv) is searched.
This seems to be about the same speed as vp8 speed 5.

Adds a new speed feature to disable inter modes based on a mask for
each blocksize.

Adds code for having lower complexity motion search methods
in nonrd pick mode function, even though speed 7 still uses DIAMOND
search for now.

Also uses HEX search for speed 6 rather than FAST_HEX which improves
psnr by 0.56% without any noticeable speed drop (tested on gipsmotion).

Change-Id: Ic13176572dbd3aed5884a26786940a4b1bbd8a75
2014-02-28 12:29:23 -08:00
Dmitry Kovalev
28bd1dd15e Merge "Adding consts to arguments of vp9_block_error()." 2014-02-28 10:51:43 -08:00
Dmitry Kovalev
0429c08823 Merge "Removing unnecessary clamp() call." 2014-02-28 10:49:35 -08:00
Dmitry Kovalev
9d0d6d1945 Merge "Explicit lossless handling in rd_pick_intra4x4block()." 2014-02-28 10:49:11 -08:00
Alex Converse
4c8d70d771 Cleanup conditions in vp9_rd_pick_inter_mode_sb().
Change-Id: I4e5ca10f7aef2d37fda835b369828d0bbff7c8a0
2014-02-27 19:16:50 -08:00
Dmitry Kovalev
9004091e8c Removing unnecessary clamp() call.
Change-Id: Iaaa16b4b2c581eaeb9e4ecfcfe60f98b8a0fa40b
2014-02-27 18:48:29 -08:00
Dmitry Kovalev
791e9bdac9 Adding consts to arguments of vp9_block_error().
Change-Id: Id145da99259866109cfee8b47a1d8f309944b937
2014-02-27 18:17:08 -08:00
Alex Converse
a70ae5d9ed Precompute vp9_rd_pick_inter_mode_sb loop escape conditions.
All escape conditions that remain require knowledge of best_rd or
best_mode_index.

Change-Id: I6f77e4e629cacd54c8149ad0a98d54c8ee4ae249
2014-02-27 17:05:52 -08:00
Jingning Han
2c6ddcc606 Cosmetic change mbmi->ref_frame to refs
In handle_inter_mode, the reference frames are set in refs buffer.
One can use refs buffer directly to avoid redundant fetch.

Change-Id: I811d408cae52dcd5e053dd4bfe69550eb6a2ff56
2014-02-27 11:43:03 -08:00
Dmitry Kovalev
f81822a568 Merge "Moving common code into vp9_get_entropy_contexts()." 2014-02-27 09:55:46 -08:00
Dmitry Kovalev
129c994f3a Merge "Replacing int_mv with MV in single_motion_search()." 2014-02-27 09:55:18 -08:00
Dmitry Kovalev
a05faf74d4 Replacing int_mv with MV in single_motion_search().
Change-Id: I527c42fa776c772c26c027a47f3dada129f5c33e
2014-02-26 17:07:06 -08:00
Dmitry Kovalev
9349b82bd2 Moving common code into vp9_get_entropy_contexts().
Change-Id: I197670a405f7c2e7796424faa187a61081db8567
2014-02-26 16:20:17 -08:00
Dmitry Kovalev
c313c54835 Cleaning up cost_coeffs().
Change-Id: I02f097fd7c4c787035f03114ddde5b04b2640b39
2014-02-26 14:56:00 -08:00
Dmitry Kovalev
40a65cd1e5 Explicit lossless handling in rd_pick_intra4x4block().
Change-Id: I86cb0be468ade9d891ffd3ed47eceaefac8dd0c4
2014-02-26 13:43:46 -08:00
Dmitry Kovalev
28cd972810 Merge "Cleaning up vp9_rdopt.c." 2014-02-26 13:25:10 -08:00
Yaowu Xu
d66ecf0dc1 Separate super_block_yrd() into two functions
for inter and intra respectively

Change-Id: I7764d3af780072f7bd7bde201f454dcdd2816e76
2014-02-26 09:52:05 -08:00
Dmitry Kovalev
55a1269bd9 Merge "Removing redundant vp9_clear_system_state() call." 2014-02-26 09:19:54 -08:00
Dmitry Kovalev
abe21e42e7 Removing redundant vp9_clear_system_state() call.
This function is already called in vp9_initialize_rd_consts().

Change-Id: I88c0484a7274660287fa25fdf5cdb721d3284e01
2014-02-25 18:11:42 -08:00
Dmitry Kovalev
7d121ea86e Cleaning up vp9_rdopt.c.
Change-Id: Ic7553a037493107c33cfb9815178a54095a289ec
2014-02-25 17:46:27 -08:00
Deb Mukherjee
276e568997 Merge "Adds variance based fixed size partitioning" 2014-02-25 13:46:21 -08:00
Deb Mukherjee
10bae82510 Adds variance based fixed size partitioning
Adds a method for determining a fixed size partition based on
variance of a 64x64 SB. This method is added to rtc speed 6.
Also fixes a bug in rtc_use_partition() and includes some
refactoring related to partitioning search, and some cosmetics.

Currently compared to speed 5, the coding efficiency of speed 6
is -19% and that of speed 7 is -55%, in cbr mode.

Change-Id: I057e04125a8b765906bb7d4bf7a36d1e575de7c6
2014-02-25 12:20:59 -08:00
Dmitry Kovalev
4632a96d97 Merge "Using vp9_subtract_plane instead of vp9_subtract_{sb, sby, sbuv}." 2014-02-25 11:06:05 -08:00
Dmitry Kovalev
7bca32a6a3 Merge "Changing vp9_full_search_sad{, x3, x8} signatures." 2014-02-25 10:51:17 -08:00
Yaowu Xu
b67bd637e0 Merge changes I7e96d619,I9a7631d5
* changes:
  normalize int64_t high value to INT64_MAX
  resolve issue with arm code failing unit test
2014-02-25 08:22:49 -08:00
Jim Bankoski
ec55dd1007 normalize int64_t high value to INT64_MAX
Change-Id: I7e96d6199f882d35357f6a9a08c04ad0af5dc26e
2014-02-25 07:29:48 -08:00
Jingning Han
4b3e44f91d Merge "Periodically update mode and mv costs" 2014-02-22 11:54:20 -08:00
Jingning Han
836252bfa6 Periodically update mode and mv costs
Skip coefficient cost update in non-RD mode decision setting. Allow
periodical mode and motion vector cost update. Currently every other
8 frames. The increment runtime is a constant number. Hence more
visible for CIF resolution, while negligible for 1080p.

Speed -6 compression performance for rtc set is improved by 4.5%.

Change-Id: I27e0ad7c521fcc2af1d825582cbdd1a27ac4c323
2014-02-21 18:25:43 -08:00
Alex Converse
463ba70581 vp9_rd_pick_inter_mode_sb() reorganization
* Reduce the number of short cirtcuit checks by pre-computing and combining like checks.
* Postpone non-trivial initializations until after the shortcircuits are evaluated.
* Add some consts and const pointers.

No change to the actual results of the call or output of the encoder.

Change-Id: Ie44c4702aec6e08cfe0b8b0ba3cd6b57206478d1
2014-02-20 18:06:25 -08:00
Yunqing Wang
cde6b50cb1 Merge "Use fast HEX search in real time mode" 2014-02-20 12:07:10 -08:00
Paul Wilkins
bb61327b98 Merge "vp9_rdopt.c: Use int64_t for dist_sum and rate_sum in model_rd_for_sb()." 2014-02-20 02:03:49 -08:00
Alex Converse
43b7959dbc Merge "Do not use the value of 'rate_mv' if uninitialized." 2014-02-19 12:41:14 -08:00
Tom Finegan
a0e495579e vp9_rdopt.c: Use int64_t for dist_sum and rate_sum in model_rd_for_sb().
Removes unnecessary casts and silences warnings.

Change-Id: Ic516a909a2b3748831be6717f02d86ca60190af3
2014-02-18 22:31:11 -08:00
Alex Converse
2ceaf10e07 Do not use the value of 'rate_mv' if uninitialized.
This happens when exiting single_motion_search() early due to adaptive_motion_search.

Change-Id: Ic396e7e31e59ff219bb66a459c873c9e5b17400d
2014-02-18 17:04:42 -08:00
Adrian Grange
9b9c33a2b8 Remove comment from calls to vp9_clear_system_state.
Removed the comment "// __asm emms;" from all calls
to vp9_clear_system_state.

Change-Id: Ib4dae69c1cdf3f185b04184a870cd70c4d703f10
2014-02-18 15:43:42 -08:00
Yunqing Wang
360c80cfb9 Use fast HEX search in real time mode
In good quality mode motion search, the best matches are normally
found after searching in a large area. In real time mode, to make
encoding fast, a center-biased fast HEX search is used, which
converges quickly most of the time. A 4-point diamond search is
also carried out as the following refining search, which gives more
precise results, and maintains good motion search quality.

At speed 5, the borg test on rtc set showed an overall PSNR loss of
0.936%. The encoding speed gain is 4% - 5%.

Change-Id: I42cd68bb56a09ca1b86293c99d5f7312225ca7ae
2014-02-18 14:35:16 -08:00
Dmitry Kovalev
36420009ea Changing vp9_full_search_sad{, x3, x8} signatures.
Passing block MV pointer instead of block index into
vp9_full_search_sad{, x3, x8} functions.

Change-Id: Ica07356633471c2c8f81b583a7aeba85a436bafb
2014-02-17 14:24:57 +01:00
Dmitry Kovalev
f6fd5b2704 Using vp9_subtract_plane instead of vp9_subtract_{sb, sby, sbuv}.
Change-Id: I67a82a347245076b6c3b0bc41b587f9961a29943
2014-02-17 13:57:40 +01:00
Deb Mukherjee
56835f1bdd Make cpi->speed always positive
Minor fix to ensure that positive and negative cpu_used
values produce the same output.

Change-Id: I9157d05cb9a7c0bd57a4d8a9f268205a825b9b0b
2014-02-14 14:28:58 -08:00
Jim Bankoski
323a7120b9 Merge "vp9_rdopt.c : Silence more V.S. compiler warnings." 2014-02-14 14:23:51 -08:00
Paul Wilkins
40e374bbae vp9_rdopt.c : Silence more V.S. compiler warnings.
Change-Id: I151c6c9396b8ea1ce2e05b80359f60f0d38af138
2014-02-14 11:28:37 -08:00
Alex Converse
bb07de7cce Remove some unused and non-persistant variables from VP9_COMP.
Change-Id: I4deb1b97eec6b1244e3460a1162b41fa5312654a
2014-02-14 10:17:31 -08:00
Jim Bankoski
5750f78d61 Merge "fast approximate model_rd_from_var_lapndz" 2014-02-14 09:08:52 -08:00
Dmitry Kovalev
fde1b6d7f2 Using MV instead of int_mv inside vp9_full_pixel_diamond().
Change-Id: If33a5a12c4025d9b5ec863dfccea7ee70f800665
2014-02-13 11:23:05 -08:00
Dmitry Kovalev
df6c523fed Merge "Renaming skip_coeff to skip for consistency." 2014-02-13 11:04:34 -08:00
Jim Bankoski
d7be0fd5ea Merge "vp9_rdopt.c static analysis issues resolved" 2014-02-13 06:22:08 -08:00
Dmitry Kovalev
c00d88cdae Merge "Removing init_rdcost_stack() + cleanup." 2014-02-12 18:24:03 -08:00
Dmitry Kovalev
8c3ca45dfb Merge "Converting int_mv to MV." 2014-02-12 17:53:50 -08:00
Dmitry Kovalev
004c8c636e Renaming skip_coeff to skip for consistency.
Change-Id: I036e815ca63d00cba71202ae09ba0f6ef745dcb8
2014-02-12 17:44:12 -08:00
Jim Bankoski
bb2d683c26 vp9_rdopt.c static analysis issues resolved
Change-Id: Id53b574a4ecb5c8749383b3758c46b6bc1b275d5
2014-02-12 17:00:57 -08:00
Dmitry Kovalev
733a17d253 Converting int_mv to MV.
Change-Id: Id15285aa48ac6d8fec19a1946e6391412d84f5be
2014-02-12 15:40:43 -08:00
Jim Bankoski
9e190dfbfe fast approximate model_rd_from_var_lapndz
Change-Id: Ieceaa16312941992d4a57455e336d625dfe4e094
2014-02-12 14:16:55 -08:00
Jingning Han
0eecccc51e Remove inactive control parameters
Change-Id: Ic5692af975fe6bd2d8ec82bbae103c6f7c2fc13e
2014-02-12 12:48:15 -08:00
Yunqing Wang
356a7e9642 Merge "Enable encode_breakout in real time encoding" 2014-02-11 21:07:24 -08:00
Dmitry Kovalev
eff5b79260 Removing init_rdcost_stack() + cleanup.
Change-Id: I6fcbc833063c658749b2d43bb9968a5762647061
2014-02-11 18:08:06 -08:00
Dmitry Kovalev
9453c64726 Merge "Hiding encode_b_args struct inside vp9_encodemb.c." 2014-02-11 17:36:05 -08:00
Yunqing Wang
507fd5220b Enable encode_breakout in real time encoding
In real time encoding, we enable encode_breakout to make encoding
fast. A speed feature "use_encode_breakout" is defined to set
encode_breakout thresholds for different speeds.

However, currently, static_thresh is an encoder option. The encode_
breakout can be turned off if user sets static_thresh=0 specifically.

The rtc set borg test result: (need to set --static_thresh=1)
speed -5, psnr loss -3.543%;
speed -4, psnr loss -2.358%;
speed -3, psnr loss -0.771%.

Encoding speed test:
speed -5, 11% - 60% speedup;
speed -4, 5.5% - 28% speedup;
speed -3, 0.8% - 7% speedup.

Change-Id: Icde592ffbe77eac7446f872a2e9eb2051733677b
2014-02-11 15:30:54 -08:00
Dmitry Kovalev
28f46aa633 Merge "Fixing errorperbit calculation." 2014-02-11 10:19:59 -08:00
Jingning Han
734938dc6b Use more meaningful names for speed features
Use frame_parameter_update to precisely describe the functionality.

Change-Id: Ia9a55ba8efef7b987e30d949dd00ac716189bdb9
2014-02-10 15:20:11 -08:00
Dmitry Kovalev
71b7cb2006 Fixing errorperbit calculation.
Change-Id: I06e082a18dbcc6e126cf288ee769c1480e3f2f4d
2014-02-10 11:06:42 -08:00
Dmitry Kovalev
398f2f6298 Cleaning up rd_check_segment_txsize() function.
Change-Id: I7c09f84b26eb499daafd1393b48f12abb8a6fb8f
2014-02-08 20:18:37 -08:00
Dmitry Kovalev
441b990017 Hiding encode_b_args struct inside vp9_encodemb.c.
Change-Id: I5bcd32874f8a8a693e3eb68ef6728dfbf5475bda
2014-02-08 19:30:45 -08:00
Dmitry Kovalev
005fc6970b Finally removing "short" from transform names.
Change-Id: I5259b68dc1bcceb153e3ffe638a79a59a3019e9d
2014-02-06 11:54:15 -08:00
Jim Bankoski
9dec7712ab static function convert to inline or global vp9_blockd.h
Change-Id: Ifdd951f24932839f06d1c700371662511dde6ebe
2014-01-31 19:50:40 -08:00
Dmitry Kovalev
88340b173b Merge "Combining fb_idx_ref_cnt[] and yv12_fb[] arrays." 2014-01-31 15:55:04 -08:00
Yaowu Xu
6a4e2ddabc Properly merge two different real time modes
--rt --cpu-used=-5 uses the progressive rtc mode
--rt --cpu-used=-6 uses the new super fast rtc mode

Change-Id: Id6469ca996100cdf794a0e42d76430161f22f976
2014-01-31 15:07:51 -08:00
Alex Converse
e78c174e54 Cleanup block_rd_txfm.
* Avoid unnecessary type erasure
* Prune unused/duplicate fields from struct rdcost_block_args
* Make struct rdcost_block_args a local

Change-Id: I4f1fd4837ccd028bbfe727191ee8d69f0463b7e5
2014-01-31 12:13:18 -08:00
Jim Bankoski
da6b18622f remove confusing compressor_speed
use mode instead

Change-Id: I419d7a2dc4b0714ca6ff723c5e824521c150c460
2014-01-31 07:55:19 -08:00
Yaowu Xu
96dc80da61 Merge "create super fast rtc mode" 2014-01-29 16:36:20 -08:00
Dmitry Kovalev
6332063475 Combining fb_idx_ref_cnt[] and yv12_fb[] arrays.
Adding new RefCntBuffer struct which contains reference counter and image
buffer.

Change-Id: I71c1f532faa13442c32c43fc03ec45b6f88fb844
2014-01-29 12:48:01 -08:00
Dmitry Kovalev
b00eb5c464 Finally removing vp9_setup_interp_filters() function.
Change-Id: If446225afbb49f6033c2a4516a37c377de6f70f7
2014-01-29 11:29:34 -08:00
Jim Bankoski
ea8aaf15b5 create super fast rtc mode
This patch only works if the video is a width and height that are both
a multiple of 32..   It sets every partition to 16x16, and does INTRADC
only on the first frame and ZEROMV on every other frame.   It always does
does the largest possible transform, and loop filter level is set to 4.

Was ~20% faster than speed -5 of vp8

Now 20% slower but adds motion search ( every block ), nearest, near
and zeromv

The SVC test was changed because - while this realtime mode produces
bad quality albeit quickly, it isn't obeying all the rules it should
about which frames are available.

Change-Id: I235c0b22573957986d41497dfb84568ec1dec8c7
2014-01-29 08:39:39 -08:00
Jim Bankoski
d9201cb109 Merge "Reintroduce modelling for some speeds" 2014-01-28 15:12:03 -08:00
Jim Bankoski
79af185891 Reintroduce modelling for some speeds
Change-Id: Ia8fa3961eec34545465018281dc022bc6f73869a
2014-01-28 13:51:06 -08:00
Dmitry Kovalev
b098c04290 Merge "Decoupling set_ref_ptrs() and vp9_setup_interp_filters()." 2014-01-28 10:37:58 -08:00
Yaowu Xu
1fecc5bd2e Merge "Added a speed feature" 2014-01-28 10:28:54 -08:00
Dmitry Kovalev
e5b31a1d8c Decoupling set_ref_ptrs() and vp9_setup_interp_filters().
Change-Id: I8d17867a4772554cbba2bd113cc5b4c99d50146d
2014-01-27 16:00:20 -08:00
Dmitry Kovalev
8691565441 Removing subpix_fn_table struct.
We don't use different filter kernels for x and y, it is always one kernel
for both directions.

Change-Id: Iefcbb02ec74bf46ea20d9dca672a3efd5d631517
2014-01-24 17:06:26 -08:00
Dmitry Kovalev
f9f936b82f Merge "Renaming INTERPOLATION_TYPE to INTERP_FILTER." 2014-01-24 16:52:10 -08:00
Yaowu Xu
a0b9b050b8 Added a speed feature
That force the stop of subpel search possibly at full/half/quater pel
stages

Change-Id: Ie50c500417bd78e1a53e6620bd4c2b85f63d9c67
2014-01-24 16:40:36 -08:00
Dmitry Kovalev
4264c93844 Renaming INTERPOLATION_TYPE to INTERP_FILTER.
Corresponding renames:
  subpel_kernel              => interp_kernel
  vp9_get_filter_kernel()    => vp9_get_interp_kernel()
  pred_filter_type           => pred_interp_filter
  adaptive_pred_filter_type  => adaptive_pred_interp_filter
  mcomp_filter_type          => interp_filter
  read_interp_filter_type()  => read_interp_filter()
  write_interp_filter_type() => write_interp_filter()
  fix_mcomp_filter_type()    => fix_interp_filter()

Change-Id: I1fa61fa1dc81ebbf043457c3ee2d8d4515bee6d3
2014-01-24 15:57:28 -08:00
Yaowu Xu
8971338c6b change to avoid IOC
SSE for a 64x64 block with 3 planes can go as high as 3*2^28. So left
shift by 4 may overflow 32 bit int.

Change-Id: I63c84aa56894788bb987299badabbd7cc6fd0be6
2014-01-24 12:49:44 -08:00
Adrian Grange
8b0537f631 Merge changes I24ad1f0f,I33be1366
* changes:
  Reorder functions to avoid forward declaration
  Rename set_scale_factors as set_ref_ptrs
2014-01-24 08:38:52 -08:00
Dmitry Kovalev
e4755db40b Removing get_scale_ref_frame_idx() function + cleanup.
Change-Id: Ic9472f361f8749a165aa464c2fa859681b66381b
2014-01-22 17:10:37 -08:00
Adrian Grange
e37eb0ade7 Rename set_scale_factors as set_ref_ptrs
New name better describes what the function does.

Change-Id: I33be1366a81f058a9854b804bcde211061187dc7
2014-01-22 13:04:30 -08:00
Adrian Grange
82f6af6009 Tidy up comments & remove commented out code.
Change-Id: I46dd5ce06f36362c6274511cd1531d93926aa9bc
2014-01-22 09:59:01 -08:00
Dmitry Kovalev
ef9f7446be Cleaning up vp9_setup_buffer_inter() function.
Change-Id: Ia63e2d05fa5dca3fb67788b0f1f28e9802ef27dd
2014-01-21 19:46:07 -08:00
Jim Bankoski
3fa1356994 remove complex rd modeling.
The affect on quality was minimal.  Less than .1%, various sets
yt ( +.15%), derf (-.1%), hd ( -.1% ), std hd(-.15%)...

The affect on speed of encode at speed -5 was substantial ( ~3% ).

Change-Id: I8903346fbae0c35f5b9ea20f81fdd239ae81247d
2014-01-21 09:59:49 -08:00
Jingning Han
2f52decd22 Inter-frame non-RD mode decision
This commit setups a test framework for real-time coding. It enables
a light motion search for non-RD mode decision purpose.

Change-Id: I8bec656331539e963c2b685a70e43e0ae32a6e9d
2014-01-16 12:35:04 -08:00
Jim Bankoski
ae5b96d355 Merge "As you go mbmi->skip_coeff" 2014-01-15 12:20:14 -08:00
Dmitry Kovalev
69b684279c Merge "Cleaning up vp9_rdopt.c." 2014-01-15 00:00:33 -08:00
Jim Bankoski
73cd22f8d4 As you go mbmi->skip_coeff
Calculate the skip_coeff as part of the encode process, rather than
checking the eobs after the fact with another pass.

Change-Id: Ib41b139e96a97dee30e4b993b4cc53d86337128d
2014-01-14 17:58:25 -08:00
Dmitry Kovalev
433e5ea0e8 Fixing invalid block width/height calculation.
Change-Id: Ieaeb53902ce0ffd5b1b27a92583e98abfa791433
2014-01-14 17:53:32 -08:00
Dmitry Kovalev
70fe826d26 Cleaning up vp9_rdopt.c.
Change-Id: I5200bf68b43578eaadc4ea47b37f2633fa96d7bd
2014-01-14 17:46:14 -08:00
Dmitry Kovalev
518a934f43 Merge "Converting int_mv to MV." 2014-01-14 14:11:49 -08:00
Dmitry Kovalev
dd31f2e4ae Merge "Adding mv_has_subpel() function." 2014-01-13 12:00:51 -08:00
Dmitry Kovalev
2033ac49b4 Converting int_mv to MV.
Change-Id: Id31c0e100d275bd3650eaf5e4b8fe5ce648dbfaf
2014-01-13 11:21:07 -08:00
Dmitry Kovalev
b02c72b5d9 Adding mv_has_subpel() function.
Change-Id: I50922bb1a689f8515debaa018f850b231c21189f
2014-01-13 10:57:56 -08:00
Jingning Han
29736b889b Merge "Declare setup_buffer_inter in vp9_rdopt.h" 2014-01-10 16:01:07 -08:00
Jingning Han
4f969ccc1b Merge "Enable skipping reference frame check in rd loop" 2014-01-10 16:00:56 -08:00
Jingning Han
db2b350d33 Declare setup_buffer_inter in vp9_rdopt.h
This funtion initializes buffer pointers and first stage motion vector
prediction. It will be needed by both regular rate-distortion
optimization loop and the non-RD mode decision. Hence move its
declaration in vp9_rdopt.h

Change-Id: I64e8b6316c9d05f20756a62721533a2e4d158235
2014-01-10 13:52:40 -08:00
Jingning Han
d66c748635 Enable skipping reference frame check in rd loop
This commit allows encoder to compare the SAD cost associated with
the best motion vector predictor, per frame. If one reference frame
has this cost more than 4 times of the best SAD cost given by other
reference frames, skip NEARESTMV, NEARMV, ZEROMV mode check of this
reference frame.

This setting is turned on in speed 2 and above. Compression quality
change in speed 2:
derf  -0.014%
yt    -0.097%
hd    -0.023%
stdhd  0.046%

It reduces the speed 2 runtime of test sequences:
pedestrian_area_1080p 4000 kbps 310763 ms -> 303595 ms
bluesky_1080p 6000 kbps         259852 ms -> 251920 ms

Change-Id: I7f59cf79503d51836d61d56d50dc5bdf0e502e22
2014-01-09 18:25:53 -08:00
Johann
719dadf3ef Use the correct member for initialization
On Windows this fails with:
error C2440: 'initializing': cannot convert from int_mv to uint32_t

Change-Id: I51630efd0e83a0ce620c91aa7859dd6fc1572e99
2014-01-08 19:31:24 -08:00
Alex Converse
22d83a0ab7 Merge "Replace RD modeling with a fixed point approximation." 2014-01-08 11:06:54 -08:00
Alex Converse
f2ca665f1c Replace RD modeling with a fixed point approximation.
Change-Id: I44eb44eb3f36c05d916ef140ef42cc84f72f99ec
2014-01-08 10:37:24 -08:00
Jingning Han
06e4f825af Fix an issue in motion vector prediction stage
The previous implementation stops motion vector prediction test when
the zero motion vector appears for the second time. This commit fixes
it by simply skipping the second time check on zero mv and continuing
on to next mv candidate.

It slightly improves stdhd in speed 2 by 0.06% on average. Most static
sequences are not affected. A few hard ones, like jet, ped, and riverbed
were improved by 0.1 - 0.2%.

Change-Id: Ia8d4e2ffb7136669e8ad1fb24ea6e8fdd6b9a3c1
2014-01-07 10:18:04 -08:00
Dmitry Kovalev
16f5607dfe Merge "Adding new_mv local variable." 2014-01-07 09:56:41 -08:00
Dmitry Kovalev
7b496783c2 Merge "Adding get_ref_frame_buffer() function." 2014-01-07 09:56:06 -08:00
Dmitry Kovalev
b3af2f87b0 Merge "Removing unused mvp_fill manipulation code." 2014-01-07 09:54:05 -08:00
Jingning Han
656166ea81 Merge "Remove avoid_frame_with_high_error from RD loop" 2014-01-07 09:31:17 -08:00
Dmitry Kovalev
6a7a7341ee Removing unused mvp_fill manipulation code.
The code can be removed because mvp_full will be overridden after that.

Change-Id: I89559b1b6914c86bcd02b7359d37241948ac11d3
2014-01-06 18:07:12 -08:00
Dmitry Kovalev
c015ba5f6e Adding new_mv local variable.
Change-Id: I9631b35810c232c134f39dc0edadb1b3860a45ae
2014-01-06 17:58:01 -08:00
Dmitry Kovalev
abe4940d64 Replacing &cpi->common with cm.
Change-Id: Ic5bf5682ccdb8d2fbad6bba0d7db19a4f47b62a1
2014-01-06 17:29:16 -08:00
Dmitry Kovalev
a224b0dded Merge "Combining ref_frame and second_ref_frame into ref_frames[2]." 2014-01-06 15:02:31 -08:00
Dmitry Kovalev
7919bf6afd Adding get_ref_frame_buffer() function.
Encapsulating direct references to lst_fb_idx, gld_fb_idx, alt_fb_idx.

Change-Id: I7e65ba3f131286e433e6651970c5647311fa4687
2014-01-06 14:50:54 -08:00
Dmitry Kovalev
bbb25e6a39 Merge "Adding RefBuffer struct." 2014-01-06 14:19:44 -08:00
Jingning Han
393a8ccef9 Remove avoid_frame_with_high_error from RD loop
The feature undergoes prior assumption that the recursive partition
size search from 4x4 to 64x64, hence utilizing information from small
blocks to determine early termination in large block rate-distortion
optimization search. The current codebase is now going from top down.
The previous function might go with not properly initialized values,
hence removed.

Tested on pedestrian_area_1080p at 4000 kbps running under speed 2.
No visible difference in runtime observed.

Change-Id: I553df415c6191413762db7ae34e8790c71d8118e
2014-01-06 13:34:07 -08:00
Dmitry Kovalev
6b150c2884 Combining ref_frame and second_ref_frame into ref_frames[2].
Change-Id: I007d66a1cb1b44751dcceafbaa64649ed9a34562
2014-01-06 12:24:37 -08:00
Dmitry Kovalev
6e8c103620 Merge "Replacing int_mv with MV." 2014-01-03 17:38:28 -08:00
Dmitry Kovalev
ba41e9d459 Adding RefBuffer struct.
Adding RefBuffer to simplify reference buffer management. The struct has a
pointer to image data and scale factors relative to the current frame.

Change-Id: If38eb1491ff687cc11428aee339f3e052e2c5d9e
2014-01-03 15:21:55 -08:00
Dmitry Kovalev
672c355a26 Replacing int_mv with MV.
Change-Id: Ifd432fa3741ba47102d298e0b348eb00f5a9ce53
2014-01-03 11:48:07 -08:00
Dmitry Kovalev
5b04962cf4 Merging best_ref_mv and second_best_ref_mv into best_ref_mv[2].
Change-Id: If04b57828847cee09a79c94e1098d1aa4990ea0d
2014-01-03 11:31:00 -08:00
Jingning Han
cdc933ca00 Merge "Adaptive motion control on ref and search range" 2013-12-27 15:04:16 -08:00
Jingning Han
a4ce53f14d Adaptive motion control on ref and search range
This commit takes a preliminary attempt to refine the motion search
control. It detects the SAD associated with mv predictor per reference
frame, and based on which to determine whether the encoder wants to
reduce the motion search range (if the predicted mv provides fairly
small SAD), or to skip the current reference frame (if there exists
another ref frame that gives much smaller SAD cost).

This feature is turned on in the settings of speed 1 and above.

In speed 1, compression performance changed
derf  -0.018%
yt    -0.043%
hd    -0.045%
stdhd -0.281%

speed-up
pedestrian_area_1080p at 4000 kbps 100 frames
199651ms -> 188846ms (5.5% speed-up)
blue_sky_1080p at 6000 kbps
443531ms -> 415239ms (6.3% speed-up)

In speed 2, compression performance changed
derf  -0.026%
yt    -0.090%
hd    -0.055%
stdhd -0.210%

speed-up
pedstrian 113949ms -> 108855ms (4.5% speed-up)
blue_sky  271057ms -> 257322ms (5% speed-up)

Change-Id: I1b74ea28278c94fea329d971d706d573983d810d
2013-12-27 12:43:06 -08:00
Dmitry Kovalev
1e8b5bf4ac Merge "Removing vp9_findnearmv.{h, c} files." 2013-12-26 13:38:38 -08:00
Dmitry Kovalev
b3b9f4a4d0 Merge "Using single struct to represent scale factors." 2013-12-20 11:22:02 -08:00
Jingning Han
243327f43c Store the SSE of prediction residuals
Buffer the SSE of prediction residuals in the rate-distortion
optimization loop of a given block. This information would be used
for later encoding control.

Change-Id: If4e63f3462490513c48be9407d3327c8dd438367
2013-12-19 18:45:28 -08:00
Dmitry Kovalev
987810ad95 Removing vp9_findnearmv.{h, c} files.
Moving all code from that files to vp9_mvref_common.{h, c}.

Change-Id: Ibc4afcb8cea6847166ff411130e93611ebe63b20
2013-12-19 17:39:57 -08:00
Dmitry Kovalev
a3fbcc88bb Using single struct to represent scale factors.
Moving back to scale_factors struct. We don't need anymore x_offset_q4 and
y_offset_q4 because both values are calculated locally inside vp9_scale_mv
function.

Change-Id: I78a2122ba253c428a14558bda0e78ece738d2b5b
2013-12-19 16:06:33 -08:00
Dmitry Kovalev
c872d2be65 Call set_scaled_offsets() just before scale_mv() call.
Before mv scaling it is required to calculate x_offset_q4/y_offset_q4
by calling set_scaled_offsets(). Now offset configuration can not be
missed because it happens just before scale_mv().

Change-Id: I7dd1a85b85811a6cc67c46c9b01e6ccbbb06ce3a
2013-12-19 14:55:13 -08:00
Jingning Han
d8557a052c Make rd_pred_filter update consistent in all bsizes
This commit reworks the prediction filter rate-distortion cost update
process consistent for all block sizes.

Change-Id: I5874349ab38df380240f96c2d4ef924072bab68d
2013-12-18 11:54:31 -08:00
Jingning Han
07a28c77e3 Merge "Fix rd_filter_cache update in sub8x8 RD loop" 2013-12-16 17:57:02 -08:00
Jingning Han
ef838c349c Merge "Remove redefinition in handle_inter_mode" 2013-12-16 17:56:41 -08:00
Deb Mukherjee
1e59cbf23b Rate control changes on active_worst_quality
Various cleanups and refactoring.
Removes feedback of active worst qaulity and uses last_q
instead to make the interface cleaner. Active worst quality
is now decided only once for a frame being coded in the
beginning based on last_q and other stats. Also, adds other
cleaups on last_q to store also the last_q for altref frames,
and reduces the altref interval a little.

The output does change a little.
derfraw300: +0.224% (global psnr)
stdhdraw250: +0.442% (global psnr)

Change-Id: Ie634cdc032697044c472dd0fe79c109b3e7f9767
2013-12-16 17:08:16 -08:00
Dmitry Kovalev
3755be94ed Merge "Using MV struct instead of int_mv union in encoder (2)." 2013-12-16 16:56:07 -08:00
Jingning Han
75cfadbd1f Fix rd_filter_cache update in sub8x8 RD loop
Properly handle the rd_filter_cache update, when early termination
or skip prediction filter type check is triggered.

Change-Id: Ie7b9a75fed3358f45ffd15817f2b36670c14eb2d
2013-12-16 14:52:20 -08:00
hkuang
fb53409d2a Merge "Remove border extension in intra frame prediction." 2013-12-16 14:48:54 -08:00
hkuang
25e5552630 Remove border extension in intra frame prediction.
Change-Id: Id677df4d3dbbed6fdf7319ca6464f19cf32c8176
2013-12-16 14:05:58 -08:00
Dmitry Kovalev
095b03231c Using MV struct instead of int_mv union in encoder (2).
Change-Id: I068345f722a7116e3119927295ad23a28d3066a0
2013-12-13 17:20:40 -08:00
Dmitry Kovalev
64cf398713 Merge "Using MV struct instead of int_mv union in encoder." 2013-12-13 16:42:54 -08:00
Dmitry Kovalev
f54b515797 Merge "Cleaning up vp9_append_sub8x8_mvs_for_idx()." 2013-12-13 15:38:53 -08:00
Dmitry Kovalev
25da21b14e Using MV struct instead of int_mv union in encoder.
Change-Id: I8b81a3e4b4fa530a654c28d9c136afa0c1d379fd
2013-12-13 15:24:48 -08:00
Jingning Han
84acc988eb Remove redefinition in handle_inter_mode
Change-Id: I44513b9db6d42e2c52723e1a429f06a93d300c8b
2013-12-13 13:38:05 -08:00
James Zern
3aa75bcef6 Merge "vp9 asserts: fix compile warning" 2013-12-13 12:41:31 -08:00
Jingning Han
2f9d118f21 Merge "Remove some dead code" 2013-12-13 11:10:39 -08:00
James Zern
178db94cd6 vp9 asserts: fix compile warning
string literal to int within an assert

Change-Id: I0c889256b67a078e6e2a79577f0b7ae084243258
2013-12-12 19:49:19 -08:00
Jingning Han
3b5a90bd86 Enable adaptive pred filter type for sub8x8
This commit enables an adaptive prediction filter type selection
for sub8x8 block sizes. In speed 1, it re-uses the filter type of
collocated 8x8 block if it is tested in the rate-distortion optimization
loop, for the sub8x8 blocks. Otherwise, it runs the normal test
over all the three filter types. In speed 2, it re-uses the 8x8
block's prediction filter type, if available. Otherwise, force it
to be EIGHTTAP.

Compression and speed performance wise:
speed 1
derf -0.266%
yt   -0.138%

bus at 2000 kbps: 33766ms -> 30451ms (10% speed-up)
football at 600 kbps: 48173ms -> 43786ms (9% speed-up)

speed 2
derf -0.026%
yt   +0.134%

bus at 2000 kbps: 18973ms -> 17698ms (6% speed-up)
football at 600 kbps: 26748ms -> 25096ms (6% speed-up)

Change-Id: I77e097533b969fd3472147225fa79fc98095d342
2013-12-12 17:54:34 -08:00
Jingning Han
9d6e7ce12d Rename clamp_mv_min_max to set_mv_search_range
This function sets the motion search range limit. Rename it to be
more informative.

Change-Id: I2e8e01073dcb99c9bea9c9acd0a61d672d615444
2013-12-11 14:00:08 -08:00
Jingning Han
cf83dfb283 Merge "Enforce motion search range clamp for sub8x8" 2013-12-11 13:51:32 -08:00
Jingning Han
a67e654b6c Enforce motion search range clamp for sub8x8
This commit constrains the maximal motion search range for sub8x8
blocks to be [-1023, 1023], in the unit of full pixel.

Change-Id: I955b60649364ab410f2453cafd46a496f2fcb43e
2013-12-11 10:59:27 -08:00
Dmitry Kovalev
098d13ba10 Cleaning up vp9_append_sub8x8_mvs_for_idx().
Replacing if-else with switch statement, reordering function arguments.

Change-Id: I4825d2ef311ba8999b6d4ceb0eef003587a13434
2013-12-10 17:56:53 -08:00
Dmitry Kovalev
2dd20e468a Cleaning up skip context calculation.
Renames:
  vp9_get_pred_context_mbskip => vp9_get_skip_context
  vp9_get_pred_prob_mbskip    => vp9_get_skip_prob

Change-Id: I2af499848ef73f3f5cd8cdb27852d0bcdfe31d09
2013-12-10 14:11:26 -08:00
Dmitry Kovalev
e18eb7721e Merge "Renaming comp_pred_mode to reference_mode." 2013-12-10 10:52:34 -08:00
Dmitry Kovalev
08c48ddc01 Renaming comp_pred_mode to reference_mode.
Change-Id: I83ffed2b1878a35ac35f07f9ee74309adc9c7b11
2013-12-09 15:13:34 -08:00
Dmitry Kovalev
2c3120274a Removing max_uv_txsize_lookup lookup table.
Adding get_uv_tx_size_impl() with tx size selection logic, rewriting
get_uv_tx_size().

Change-Id: I3ecb108059a41be227a8c89a0710bd174f508951
2013-12-09 14:03:23 -08:00
Dmitry Kovalev
a19d694f09 Merge "Removing BLOCK_TYPES and adding PLANE_TYPES constant instead." 2013-12-07 02:20:41 -08:00
Alex Converse
1c3e04bb94 Remove some dead code
Change-Id: I0953a3b28758811f9d6a85787850e77592bd7670
2013-12-06 21:21:04 -08:00
Dmitry Kovalev
b6e5bb27c9 Merge "Renaming reference mode context calculation function." 2013-12-06 14:22:47 -08:00
Dmitry Kovalev
52618d28e1 Replacing b_width_log2 with num_4x4_blocks_wide_lookup.
Change-Id: I8ab9bbe2595ed1743f35223b6a6ce6d023b9a20e
2013-12-06 12:04:06 -08:00
Dmitry Kovalev
63963f51ef Renaming reference mode context calculation function.
Renames:
  vp9_get_pred_context_comp_inter_inter => vp9_get_reference_mode_context
  vp9_get_pred_prob_comp_inter_inter    => vp9_get_reference_mode_prob

Change-Id: I3bbb69481e6b0c848028667c9269f567f293d3bd
2013-12-06 11:23:01 -08:00
Dmitry Kovalev
d6b159d4a6 Removing BLOCK_TYPES and adding PLANE_TYPES constant instead.
Change-Id: Ic3bb862e93aedf6a489a33ea6f7e5097d96855ee
2013-12-06 10:54:00 -08:00
Dmitry Kovalev
5be34ba80f Merge "vp9_get_pred_context_intra_inter() clean up." 2013-12-06 09:14:36 -08:00
Jingning Han
ee02f3fbed Merge "Remove redundant bsize mapping in motion search" 2013-12-06 08:57:58 -08:00
Dmitry Kovalev
377fa8aff8 Renaming PREV_COEF_CONTEXTS to COEFF_CONTEXTS.
Also adding BAND_COEFF_CONTEXTS macro to simplify for loop logic.

Change-Id: I12a78a49cf1addf81e6b3fe2a3736ec2b79bd79e
2013-12-05 17:08:06 -08:00
Dmitry Kovalev
6fd71e1b09 vp9_get_pred_context_intra_inter() clean up.
Renaming:
 vp9_get_pred_context_intra_inter => vp9_get_intra_inter_context
 vp9_get_pred_prob_intra_inter    => vp9_get_intra_inter_prob

Change-Id: I2c1affea2e84f4e616137c6df82adb11c7845781
2013-12-05 17:01:03 -08:00
Jingning Han
45aa6f15b0 Remove redundant bsize mapping in motion search
Both single frame and compound inter motion search run with luma
component only. Hence removing the block size mapping therein.

Change-Id: I217488e702432ae9fa0e95bf6f516ebb36b5c79b
2013-12-04 17:25:06 -08:00
Dmitry Kovalev
3712b58c2f Merge "Cleaning up vp9_entropy.h file." 2013-12-04 16:46:41 -08:00
Dmitry Kovalev
f00d157c12 Moving eob array to the encoder.
In the decoder we don't need to save eobs, we can pass eob as an argument.
That's why removing eob arrays from VP9Decompressor and TileWorkerData,
and moving eob pointer from macroblockd_plane to macroblock_plane.

Change-Id: I8eb919acc837acfb3abdd8319af63d1bbca8217a
2013-12-03 17:59:32 -08:00
Dmitry Kovalev
8e89e2f2e0 Cleaning up vp9_entropy.h file.
Renaming constants for consistency:
  DCT_VAL_CATEGORY1 => CATEGORY1_TOKEN
  DCT_VAL_CATEGORY2 => CATEGORY2_TOKEN
  DCT_VAL_CATEGORY3 => CATEGORY3_TOKEN
  DCT_VAL_CATEGORY4 => CATEGORY4_TOKEN
  DCT_VAL_CATEGORY5 => CATEGORY5_TOKEN
  DCT_VAL_CATEGORY6 => CATEGORY6_TOKEN
  DCT_EOB_TOKEN     => EOB_TOKEN
  DCT_EOB_MODEL_TOKEN => EOB_MODEL_TOKEN
  MAX_ENTROPY_TOKENS => ENTROPY_TOKENS

Moving constants:
  INTER_MODE_CONTEXTS from vp9_entropy.h to vp9_blockd.h.
  EOSB_TOKEN from vp9_entropy.h to vp9_tokenize.h

Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
2013-12-03 17:23:03 -08:00
Alex Converse
f63c75de84 Merge "Remove plane_block_idx." 2013-12-03 10:51:13 -08:00
Paul Wilkins
8a4310b160 Merge "Fix use_uv_intra_estimate in rd loop" 2013-12-03 04:30:50 -08:00
Alex Converse
2360a5f093 Remove plane_block_idx.
Its last remaining caller can be passed its results directly without any
additional work. Also, it's not non-4:2:0 safe.

Change-Id: Ia5089ba5f7f66c7617270483c619c9271aefd868
2013-12-02 18:33:50 -08:00
Jingning Han
9f81a50c85 Fix use_uv_intra_estimate in rd loop
This commit fixes the use of uv_intra_estimate by properly restoring
the mode_info struct required by rd_pick_intra_sbuv_mode.

Change-Id: I6a156d79533c4e2e60dfd3b8c5bb0a42a8eca280
2013-12-02 17:30:41 -08:00