13082 Commits

Author SHA1 Message Date
Jingning Han
ac50b75e50 Use balanced model for intra prediction mode coding
This commit replaces the previous table based intra mode model
coding with a more balanced entropy coding system. It reduces the
decoder lookup table size by 1K bytes. The key frame compression
performance is about even on average. There are a few points where
the compression performance is improved by over 5%. Most test
points are fairly close to the lookup table approach.

Change-Id: I47154276c0a6a22ae87de8845bc2d494681b95f6
2015-06-23 16:42:56 -07:00
Jingning Han
81c389e790 Make tx partition entropy coder account for block size
This commit allows the entropy coder for transform block partition
to account for its relative position with respect to the block size.

Change-Id: I2b5019c378bfb58c11b926fa50c0db1933f35852
2015-06-18 21:56:30 +00:00
Jingning Han
0a42a1efd4 Add max_tx_size to MB_MODE_INFO
Refactor the recursive transform block partition to reduce repeated
computation maximum transform block size per block.

Change-Id: Ib408c78dc6923fe7d337dc937e74f2701ac63859
2015-06-18 14:54:49 -07:00
Jingning Han
2aa2ef4094 Make loop filter support variable transform block size
This commit refactors the loop filter implementation to make it
support recursive transform block partition.

Change-Id: Ica2daa9cb54730cff7770ee2c2d7ffdb240ff418
2015-06-16 18:56:47 -07:00
Jingning Han
85c220b2c4 Turn on loop filter
Temporarily use univariate transform size for loop filter.
As compared to VP9 master branch with loop filter turned on, the
compression gains are:

derf  0.671%
mr    0.749%
stdhd 0.886%
hr    1.394%

The encoding speed currently is about 1.3X that of speed 0.

Change-Id: I64788f894e70fde14c5be3159501bedf836e5998
2015-06-16 08:49:13 -07:00
Jingning Han
7cbea06386 Update transform block partition information for intra blocks
If a block is coded in the intra modes, update the transform block
partition information as maximum block size.

Change-Id: I5ea440c700fc887ff2fe84fabde77a9d896d16f4
2015-06-15 15:53:19 -07:00
Jingning Han
a4fd58a761 Refactor tx_block_rd_b() to compute per block rd cost
This commit makes the tx_block_rd_b() compute the rate and
distortion cost per transform block, instead of accumulating these
costs.

Change-Id: Iff5adc4c27cc54f8e6eb3abd95f8d88ba00f462c
2015-06-15 09:08:00 -07:00
Jingning Han
e272e5b8fb Skip redundant flag reset
If the skip flag is already on, there is no need to further check
the all zero block case. This improves encoding speed at no coding
statistics change.

Change-Id: Icab997ca2977e650351a47ff1314def5ac4ecb1d
2015-06-12 11:44:01 -07:00
Jingning Han
5180368403 Allow encoder to force all zero coefficient block
This commit allows the encoder to force all zero quantized
coefficient block per transform block, if that provides better
rate-distortion trade-off.

Change-Id: I5b57b28cccd257ebfaf7c1749dda7be482abc834
2015-06-12 09:18:10 -07:00
Jingning Han
63c0d8df9f Assign largest transform block size to skip block
If a block has all coefficients quantized to zero, the codec will
assume that it uses largest transform block size.

Change-Id: I1a32527e50026e8e4759ad8de474189cd20e89c8
2015-06-11 11:01:44 -07:00
Jingning Han
9ce132ac37 Refactor transform block partition entropy coding
This commit refactors the transform block partition entropy
coding process to improve the encoding speed. There is no change
in the compression statistics.

Change-Id: I237466fd95c1b888df432babfa36e01f74240eef
2015-06-11 09:41:20 -07:00
Jingning Han
9692042493 Refactor transform block partition update process
Unify transform block partition update process used in rate
distortion optimization and encoding stage.

Change-Id: I4e5f2b6d2482c53ceadb7c8743435158f229a82c
2015-06-10 10:01:31 -07:00
Jingning Han
87a0d5436b Account for context information for partition rate estimate
This commit allows the encoder to account for the boundary block
information to estimate the transform block partitiion rate cost
in the rate-distortion optimization scheme.

Change-Id: Idb79cf936d96cdd15bcba27e47318295413a5f5d
2015-06-09 15:53:55 -07:00
Jingning Han
948c6d882e Enable transform block partition entropy coding
Select the probability model for transform block partition coding
conditioned on the neighbor transform block sizes.

Change-Id: Ib701296e59009bad97dbd21d8dcd58bc5e552f39
2015-06-09 12:30:52 -07:00
Jingning Han
79d6b8fc85 Properly handle boundary block rate distortion computation
This commit makes the encoder to properly compute the rate
distortion cost for blocks that partially cover extend pixels.

Change-Id: I44529af6f76925cdc0f6b24a5d190b51b0813983
2015-06-09 11:14:24 -07:00
Jingning Han
b54dd00f53 Align the intra and inter mode cost measurement
This commit aligns the measurement method used to evaluate both
intra and inter modes.

Change-Id: I8071584ce87fa3c5401800363daa0e670de29af5
2015-06-05 11:37:21 -07:00
Jingning Han
3239e22a42 Conditionally use recursive transform block partition search
If the frame header sets to use fixed transform block size, use
the univariate transform block partition search flow.

Change-Id: Ic422ecb6565642cd8ddb96dc67a37109ef3ce90f
2015-06-03 11:14:26 -07:00
Jingning Han
a96f2ca319 Rework the rate and distortion computation pipeline
This allows the encoder to use more precise rate and distortion
costs for mode decision.

Change-Id: I7cfd676a88531a194b9a509375feea8365e5ef12
2015-06-02 23:15:09 -07:00
Jingning Han
0207dcde4a Fix rate estimate issue in transform block partition coding
This commit fixes the over count issue in the recursive transform
block partition rate cost estimation. It improves the compression
performance by about 0.45%.

Change-Id: I01ccda954ed0e120263977472c1c759c3c67170c
2015-06-02 18:51:03 -07:00
Jingning Han
33f05e90fe Enable rate-distortion optimization for transform partition
This commit enables the rate-distortion optimization for recursive
transform block partition for inter mode blocks based on luma
component. The chroma component infers the transform block size
decision from those of luma component.

Change-Id: I907cc52af888a606b718e087e717b189fa505748
2015-06-01 16:50:36 -07:00
Jingning Han
0451c6b6dd Refactor per block rate distortion estimate
Move the rate-distortion estimate function outside the recursion
as an individual operating module.

Change-Id: I662199223c256664bcd312084b3aebffb8a8034b
2015-06-01 12:41:45 -07:00
Jingning Han
d4b8dd76c4 Make chroma component RD estimate support transform partition
This commit makes the rate-distortion estimation of the chroma
components support the recursive transform block partition
inferred from the luma component mode decisions.

Change-Id: I2e038bebf558da406e966015952ad1058bdf4766
2015-06-01 11:15:15 -07:00
Jingning Han
cd4aca5959 Add decoder support to recursive transform block partition
It allows the decoder to recursively parse and use the transform
block size for inter coded blocks.

Change-Id: I12ceea48ab35501ac1a3447142deb2a334eff3b8
2015-05-22 16:45:34 -07:00
Jingning Han
64f3820f80 Refactor bit-stream syntax support to transform partition
Make the bit-stream syntax elelment coding ready to support
variable transform coding block sizes.

Change-Id: I07ae4ab62d1ecd46c4a5ae45702fc14bd1d4b07d
2015-05-22 12:13:29 -07:00
Jingning Han
6fc13b5cc2 Inter block transform coding partition syntax elements
Allocate memory buffer to store the transform coding partition
information of inter prediction mode blocks.

Change-Id: I428b1dd0b26e8eaf24030a833554ceb4479c5551
2015-05-22 10:57:36 -07:00
Jingning Han
df2042dc1e Synchronize encoding process and tokenization handle
The encoding and tokenization process support the recursive
transform block partition coding scheme.

Change-Id: I47283cc6ee9c383059950623ece60a0fcce82e00
2015-05-21 18:51:27 -07:00
Jingning Han
a15cf9a5b7 Synchronize tokenization and detokenization process
Make the encoder and decoder synchronized for recursive
tokenization coding.

Change-Id: I84c5f3dfc3ee9982ab57e658ffe6cb17a949eda2
2015-05-22 01:45:31 +00:00
Jingning Han
bf99a00340 Arrange tokenization order to support recursive txfm block coding
Make the encoder packetize transform block in a recursive order.
Note that the block index with respect to the coding block remains
identical.

Change-Id: I07c6d2017f4f150274aff46c05388a7fd47cd920
2015-05-21 18:43:37 -07:00
Jingning Han
5f6fe83ac5 Syntax coding support for transform block coding
This commit re-designs the bitstream syntax to support recursive
transform block partition. It disables the decoder vector unit
tests.

Change-Id: I6cac24c4f1e44f29ffcc9b87ba1167eeb32d1b69
2015-05-18 15:43:02 -07:00
Jingning Han
208aa6158b Remove get_nonrd_var_based_fixed_partition function
This function has been replaced by other approaches and is not
in use now.

Change-Id: I387f45b5607d202539e482468ccc70e6c0f9341f
2015-04-09 09:49:55 -07:00
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
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
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
Jingning Han
657cabe0f7 Tune SSSE3 assembly implementation to improve quantization speed
Change-Id: If0ca8b25b4800d4336e6cbc97194cd9b01c5b5a3
2015-04-01 15:28:01 -07:00
Yaowu Xu
fff4654d36 Merge "Simplify bsize calculation" 2015-04-01 15:06:55 -07:00
Jingning Han
cf4447339e Merge "Optimize quantization simd implementation" 2015-04-01 14:55:18 -07:00
Jingning Han
a4364e5146 Merge "Simplify effective src_diff address computation" 2015-04-01 14:55:03 -07:00
Jingning Han
7acb2a8795 Merge "Refactor block_yrd function for RTC coding mode" 2015-04-01 14:54:24 -07:00
Yaowu Xu
ba91b54d7c Simplify bsize calculation
Change-Id: Ibc514684def9914c66f04cb7931f773e2b79c168
2015-04-01 12:15:06 -07:00
Jingning Han
19da916716 Simplify effective src_diff address computation
Remove redundant offset calculation for effective src_diff address.

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

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

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

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

Change-Id: I8d8ebec0cb305f1de016516400bf007c3042666e
2015-04-01 09:43:40 -07:00
Yunqing Wang
fc98114761 Merge "Rename vbp thresholds" 2015-03-31 16:33:30 -07:00
Vignesh Venkatasubramanian
639955f66e Merge "webmdec: Fix read_frame return value for calls after EOS" 2015-03-31 16:11:56 -07:00
Marco
c2b8218eba Merge "Set postproc flags in decoder_get_frame." 2015-03-31 15:22:14 -07:00
Yunqing Wang
c28ff1a9de Rename vbp thresholds
Code refactoring

Change-Id: I410fcce1bc6d95c62c474445f4c97ea8469f1e79
2015-03-31 15:14:44 -07:00
Jingning Han
502ac72233 Merge "Tuning SATD rate calculation for speed" 2015-03-31 14:24:26 -07:00
Jingning Han
1c39c5b96f Merge "Use aligned copy in 8x8 Hadamard transform SSE2" 2015-03-31 12:16:47 -07:00
Jingning Han
fa4289522e Merge "Allow block skip coding option in RTC mode" 2015-03-31 12:16:36 -07:00