Commit Graph

935 Commits

Author SHA1 Message Date
Yunqing Wang
807885b5e0 Merge "vp9_ethread: modify the cyclic refresh struct" 2014-11-13 18:35:01 -08:00
Yunqing Wang
8ee605f188 vp9_ethread: modify the cyclic refresh struct
Two members in struct CYCLIC_REFRESH
  int64_t projected_rate_sb;
  int64_t projected_dist_sb;
are updated at the superblock level, which makes them shared data
in the multi-thread situation, and requires extra work to handle
them. However, those values are updated and used immediately, and
therefore can be removed. This patch cleaned up the code and
removed the two members.

Change-Id: I2c6ee4552bf49fb63ce590cdb47f9723974fffb1
2014-11-13 15:05:46 -08:00
Jingning Han
6efafda738 Merge "Refactor nonrd_use_partition coding process" 2014-11-13 13:58:21 -08:00
Jingning Han
754b05a4de Refactor nonrd_use_partition coding process
This commit integrates the non-RD mode decision process and the
encoding process into a single recursion scheme.

Change-Id: I6a7e72a0b84d567554801ebbe01ec75d54c1f77d
2014-11-06 17:00:48 -08:00
Jingning Han
10da059b52 Remove unused is_background function
Change-Id: Ia540eac5f066ae95280c2f898370eddf0110c279
2014-11-05 21:19:23 -08:00
Jingning Han
caaf63b2c4 Rework cut-off decisions in cyclic refresh aq mode
This commit removes the cyclic aq mode dependency on
in_static_area and reworks the corresponding cut-off thresholds.
It improves the compression performance of speed -5 by 1.47% in
PSNR and 2.07% in SSIM, and the compression performance of speed
-6 by 3.10% in PSNR and 5.25% in SSIM. Speed wise, about 1% faster
in both settings at high bit-rates.

Change-Id: I1ffc775afdc047964448d9dff5751491ba4ff4a9
2014-11-05 21:17:09 -08:00
hkuang
55577431ae Bind motion vectors with frame buffer structure.
This will save a lot of memory for decoder due to removing of prev_mi,
but prev_mi is still needed in encoder. So this will increase a little bit
memory for encoder.

Change-Id: I24b2f1a423ebffa55a9bd2fcee1077dac995b2ed
2014-10-31 17:01:08 -07:00
Jingning Han
1cffea9fb7 Merge "Rework pred pixel buffer system in non-RD coding mode" 2014-10-31 08:55:24 -07:00
Jingning Han
7bea8c59f9 Rework pred pixel buffer system in non-RD coding mode
This commit makes the inter prediction buffer system to support
hybrid partition search. It reduces the runtime of speed -5 by
about 3%. No compression performance change.

vidyo1 720p 1000 kbps
11831 ms -> 11497 ms

nik 720p 1000 kbps
10919 ms -> 10645 ms

Change-Id: I5b2da747c6395c253cd074d3907f5402e1840c36
2014-10-30 11:08:35 -07:00
Jingning Han
07436abb86 Use zero motion vector in choose_partitioning
The zero motion vector was effectively used in the subsampled pixel
based variance calculation. This commit makes it directly use zero
mv to generate prediction.

Change-Id: Ica83dc843e9f8da2f89c3ef451e50f16214c0def
2014-10-27 19:38:43 -07:00
Jingning Han
d56b3eb0cf Refactor encoder tile data structure
Make the common tile info as one element in the encoder tile data
struct.

Change-Id: I8c474b4ba67ee3e2c86ab164f353ff71ea9992be
2014-10-27 19:37:13 -07:00
Jingning Han
192010d218 Refactor rtc coding mode to support tile encoding
Use per tile threshold in the prediction mode search process.

Change-Id: I6c74ee5a3b069bb4281002dfe51310911a0756c0
2014-10-27 09:53:46 -07:00
Jingning Han
eee201c221 Tile based adaptive mode search in RD loop
Make the spatially adaptive mode search in rate-distortion
optimization loop inter tile independent. Experiments suggest that
this does not significantly change the coding staticstics.

Single tile, speed 3:
pedestrian_area 1080p 1500 kbps
59192 b/f, 40.611 dB, 101689 ms

blue_sky 1080p 1500 kbps
58505 b/f, 36.347 dB, 62458 ms

mobile_cal 720p 1000 kbps
13335 b/f, 35.646 dB, 45655 ms

as compared to 4 column tiles, speed 3:
pedestrian_area 1080p 1500 kbps
59329 b/f, 40.597 dB, 101917 ms

blue_sky 1080p 1500 kbps
58712 b/f, 36.320 dB, 62693 ms

mobile_cal 720p 1000 kbps
13191 b/f, 35.485 dB, 45319 ms

Change-Id: I35c6e1e0a859fece8f4145dec28623cbc6a12325
2014-10-24 10:00:27 -07:00
Jingning Han
be212d4db3 Refactor rate distortion cost structure in non-RD coding mode
This commit refactors the rate distortion structure used in the
non-RD coding mode and saves a few RDCOST calculations.

Change-Id: I62c3416c300d2c5372f21b96d93a6b633a34ab3a
2014-10-21 17:17:11 -07:00
Jingning Han
1ed1dde06d Remove unused copy_partitioning
Change-Id: I75a2a3772ed17e73180eb4f263cc838cae4927b0
2014-10-21 09:47:58 -07:00
Jingning Han
f2c21cfa1e Merge "Remove deprecated constrain_copy_partitioning function" 2014-10-21 09:44:11 -07:00
Jingning Han
55ec7ebca7 Merge "Remove unused sb_has_motion function in vp9_encodeframe.c" 2014-10-21 09:43:55 -07:00
Jingning Han
072d844aff Merge "Remove deprecated use_lastframe_partitioning feature" 2014-10-21 09:43:45 -07:00
Jingning Han
61ff08ef61 Merge "Hybrid partition search for rtc coding mode" 2014-10-21 09:43:35 -07:00
Paul Wilkins
889c53a507 Merge "Resolve compiler warning." 2014-10-21 07:02:13 -07:00
Jingning Han
abb2fbb10e Remove deprecated constrain_copy_partitioning function
Its functionality has been replaced with choose_partitioning and
threshold based control on split mode check.

Change-Id: Ic9bb321df06b524f5c38ea5874dc6f6a8f93c5e3
2014-10-20 17:08:21 -07:00
Jingning Han
ef53898c48 Remove unused sb_has_motion function in vp9_encodeframe.c
Change-Id: I035fb6aa5c10741b065e27befb097d8087e3c62f
2014-10-20 17:08:11 -07:00
Jingning Han
e62ce79e1a Remove deprecated use_lastframe_partitioning feature
This speed feature has been deprecated in both yt and rtc coding
modes. This commit removes the related operations.

Change-Id: I079c79c6adafe45581af2ebf8b98faebcface1ce
2014-10-20 17:03:38 -07:00
Jingning Han
9f128b3ed9 Hybrid partition search for rtc coding mode
This commit re-designs the recursive partition search scheme in
rtc speed -5. It first checks if the current block is under cyclic
refresh mode. If so, apply recursive partition search. Otherwise,
perform sub-sampled pixel based partition selection. When the
pre-selection finds the partition size should be 32x32 or above,
use the partition size directly. Otherwise, apply partition search
at nearby levels around the preset partition size.

It is enabled in speed -5. The compression performance of rtc
speed -5 is improved by 9.4%. Speed wise, the run-time goes slower
from 1% to 10%.

nik_720p, 1000 kbps
33220 b/f, 38.977 dB, 10109 ms -> 33200 b/f, 39.119 dB, 10210 ms

vidyo1_720p, 1000 kbps
16536 b/f, 40.495 dB, 10119 ms -> 16536 b/f, 40.827 dB, 11287 ms

Change-Id: I65adba352e3adc03bae50854ddaea1b421653c6c
2014-10-20 13:02:12 -07:00
Yunqing Wang
67c866750c Merge "Remove the dependency in token storing locations" 2014-10-20 08:26:46 -07:00
Paul Wilkins
9626a0cb62 Resolve compiler warning.
conversion from 'const int64_t' to 'int', possible loss of data.

Change-Id: I471a73bba5d448d9be0ef9cbf1590fa73aa74be1
2014-10-20 12:08:33 +01:00
Debargha Mukherjee
6202c75f84 Merge "Add highbitdepth function for vp9_avg_8x8" 2014-10-18 14:37:10 -07:00
Yaowu Xu
06e65269c7 Merge "Remove unused VAR_BASED_FIXED_PARTITION flag" 2014-10-18 13:31:47 -07:00
Yaowu Xu
7bf475926b Merge "Use rate/distortion thresholds to control non-RD partition search" 2014-10-18 13:31:41 -07:00
Peter de Rivaz
73ae6e495c Add highbitdepth function for vp9_avg_8x8
Cherry-picked from https://gerrit.chromium.org/gerrit/#/c/71914/
(a92f987a6b) on highbitdepth branch.

Change-Id: I6903e4e4cb57d90590725c8a1c64c23da7ae65e8
2014-10-17 17:04:37 -07:00
Yunqing Wang
7c4992c466 Remove the dependency in token storing locations
Currently, the tokens for a tile are stored immediately after its
preceding tile, which causes a dependency. This is unnecessary
since we always allocate enough memory for tokens. Removing
the dependency allows token writing done in parallel. This patch
doesn't change encoding result.

Change-Id: I7365a6e5e2c2833eb14377c37e1503c9d0f26543
2014-10-17 14:25:33 -07:00
Jingning Han
3bc94cd2eb Merge "Add init and reset functions for RD_COST struct" 2014-10-17 11:15:19 -07:00
Jingning Han
e1111fba7e Remove unused VAR_BASED_FIXED_PARTITION flag
Change-Id: I4ce19b7cb1c45fed86e81ee785e787630020fb4f
2014-10-17 09:02:25 -07:00
Marco
48ea5b7190 Merge "Some updates for Speed 6/VAR_BASED_PARTITION." 2014-10-15 15:57:21 -07:00
Jingning Han
e2612fbd70 Add init and reset functions for RD_COST struct
Change-Id: I2902de7051a883fd22e27a655209233733969cfd
2014-10-15 15:02:06 -07:00
Jingning Han
5e766ccee0 Use rate/distortion thresholds to control non-RD partition search
Compare the estimated rate and distortion to the thresholds scaled
according to the operating block size and determine if further
split partition search will be run. The compression performance of
speed -5 is changed by -0.074%. The encoding speed is 10% - 15%
faster.

vidyo1 720p
16545 b/f, 40.492 dB, 11475 ms -> 16535 b/f, 40.486 dB, 10100 ms

nik720p
16624 b/f, 36.310 dB, 10071 ms -> 16617 b/f, 36.313 dB, 8346 ms

Change-Id: Ic9197ab5761279ae55d2fb7813b2af0e0db497b8
2014-10-15 13:40:33 -07:00
Marco
09ea74f194 Some updates for Speed 6/VAR_BASED_PARTITION.
Reduce the intra_cost_penalty for non-rd mode,
and some updates to VAR_BASED_PARTITION.

Visual tests show some improvement at Speed 6, for RTC clips.

Change-Id: If9090daf7aed14906a32d931a538ab544bbca606
2014-10-15 12:06:48 -07:00
Jingning Han
89b8c7a513 Replace copy_partitioning use case with choose_partitioning
This commit replaces the use of copy_partitioning with
choose_partitioning based on the sse of subsamped pixels, which
provides significantly better coding performance and runs at
similar speed, as compared to copy_partitioning. It improves rtc
speed 5 coding performance by 3%.

Change-Id: I52d3682a12dce0147f5e52383a594fc242ca3228
2014-10-15 11:37:20 -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
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
Deb Mukherjee
9a29fdbae7 Merge "Rename highbitdepth functions to use highbd prefix" 2014-10-09 15:39:56 -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
Jingning Han
112789d4f2 Merge "Remove sub8x8 block index from rd_pick_partition argument" 2014-10-09 11:16:11 -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
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
Jim Bankoski
20254d1daa Merge "experimental : partition using 1/8 x 1/8 image" 2014-10-08 09:04:26 -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
Jingning Han
7ee58985bd Replace mi_width_log2() with mi_width_log2_lookup table
Change-Id: If0ea98aa139d14d40cd924114e18396aff36b5a5
2014-10-07 12:45:25 -07:00
Jingning Han
b66f7016c1 Take out repeated block width/height lookup functions
The functions b_width_log2 and b_height_log2 only do direct
table fetch. This commit unifies such use cases by using the
table directly and removes these functions.

Change-Id: I3103fc6ba959c1182886a2799d21b8b77c8a7b6b
2014-10-07 12:33:07 -07:00