Граф коммитов

85 Коммитов

Автор SHA1 Сообщение Дата
Ronald S. Bultje 213fe85da3 Remove BLOCK_SIZE_LG2.
It is unused.

Change-Id: Ied3269ffacf9b6303bc9d85f996384c3575ef812
2013-04-17 11:00:30 -07:00
Ronald S. Bultje e693472236 Fairly basic integration of rectangular blocks in encoding RD loop.
Adds RD integration for 32x16, 16x32, 64x32 and 32x64 rectangular blocks.
Derf almost +0.6%, HD a little over +1.0%, STDHD +1.3%.

Change-Id: Id651fdb6a655fdbb5c47009757e63317acfb88a5
2013-04-17 09:25:06 -07:00
Jingning Han 90a91cc683 Recursive partition syntax coding
Enable recursive partition information coding from SB64X64 down to
MB16X16. The bit-stream syntax is now supporting rectangular block
sizes. It starts from SB64X64 and recursively describes the partition
type of the current block. If the partition type is PARTITION_NONE,
the block is coded as a single unit; if it is PARTITION_HORZ or
PARTITION_VERT, the block is segmented into two independently coded
rectangular units, with no further partition needed; otherwise, the
block is segmented into 4 square blocks. i.e., PARTITION_SPLIT case,
each can be potentially further partitioned.

Forward adaptive probability modeling is used for the partition
information coding, conditioned on the current block size.

Change-Id: I499365fb547839d555498e3bcc0387d8a3587d87
2013-04-16 18:41:26 -07:00
Yunqing Wang e87c7f0930 Merge "Optimize the scaling calculation" into experimental 2013-04-16 09:14:22 -07:00
Yunqing Wang 148eb803bb Optimize the scaling calculation
In decoder, the scaling calculation, such as (mv * x_num / x_den),
is fairly time-consuming. In this patch, we check if the scaling
happens or not at frame level, and then decide which function to
call to skip scaling calculation when no scaling is needed. Tests
showed a 3% decoder performance gain.

Change-Id: I270901dd0331048e50368cfd51ce273dd82b8733
2013-04-16 08:52:40 -07:00
John Koleszar 4054ff5da5 Merge "Removing TRUE and FALSE macro definitions." into experimental 2013-04-16 06:55:13 -07:00
Scott LaVarnway 5393379c84 Merge "Removing extra params in dequant functions" into experimental 2013-04-16 06:37:00 -07:00
Dmitry Kovalev a0d9309eab Removing TRUE and FALSE macro definitions.
Using regular 0 and 1 constants now.

Change-Id: Ie763503cbb727847cc8f1d6506cd6f2ee607f056
2013-04-15 15:24:39 -07:00
Scott LaVarnway 74610b1ae4 Removing extra params in dequant functions
Now that the predictor is the dest, we do not need the
extra parameters.

Change-Id: I78db73d39b5aff62f15303f3d51ad2797eae74b6
2013-04-15 13:43:11 -04:00
Yaowu Xu c2ad69bcf4 Reorder enum i4X4 predcition modes
To match the order of  directional intra prediction modes for larger
blocks, also renamed the i4x4 prediction modes to mirror the larger
variants.

Change-Id: I77cea4d0add6c7758460bf9c7a2fe59aca601f0b
2013-04-12 10:13:23 -07:00
Yaowu Xu 7de5edd14a Rename B_PRED to I4X4_PRED
So it is consistent with I8x8_PRED.

Change-Id: Iefa65124b2419690d83e526c611129c0ede29d11
2013-04-12 09:23:58 -07:00
Jingning Han 815e95fbeb Make intra predictor support rectangular blocks
The intra predictor supports configurable block sizes. It can handle
intra prediction down to 4x4 sizes, when enabled in BLOCK_SIZE_TYPE.

Change-Id: I7399ec2512393aa98aadda9813ca0c83e19af854
2013-04-11 16:45:57 -07:00
Scott LaVarnway 6189f2bcb1 WIP: removing predictor buffer usage from decoder
This patch will use the dest buffer instead of the
predictor buffer.  This will allow us in future commits
to remove the extra mem copy that occurs in the dequant
functions when eob == 0.  We should also be able to remove
extra params that are passed into the dequant functions.

Change-Id: I7241bc1ab797a430418b1f3a95b5476db7455f6a
2013-04-11 13:55:18 -07:00
John Koleszar c2bd46bf45 tokenize: convert skippable functions
Use the common block walker to calculate skippability.

Change-Id: I6721e42f065df237426c91c1d871ec226ba7cdcb
2013-04-11 12:27:37 -07:00
John Koleszar 42471f6b72 Add foreach_transformed_block
Adds a framework for doing arbitrary functions on each transform-
sized block in the mb/sb.

Change-Id: Iaffb1ae8db5ff2abfa8720c608c78376b42f2096
2013-04-11 11:42:19 -07:00
Ronald S. Bultje 1932828d19 Merge "Make SB coding size-independent." into experimental 2013-04-10 08:51:58 -07:00
Ronald S. Bultje a3874850dd Make SB coding size-independent.
Merge sb32x32 and sb64x64 functions; allow for rectangular sizes. Code
gives identical encoder results before and after. There are a few
macros for rectangular block sizes under the sbsegment experiment; this
experiment is not yet functional and should not yet be used.

Change-Id: I71f93b5d2a1596e99a6f01f29c3f0a456694d728
2013-04-09 21:28:27 -07:00
John Koleszar a3ec4cbd33 Merge "detokenize: use consistent structure for all block sizes" into experimental 2013-04-09 14:18:59 -07:00
John Koleszar e6deea4e60 detokenize: use consistent structure for all block sizes
Restructure the code to avoid the majority of per-block-size
switches, code duplication, etc. All block types (mb/sb32/sb64)
can be handled by the same code.

Change-Id: I4022718d66e31a15a7074e43f3b98cd0a5124ea7
2013-04-08 13:11:40 -07:00
John Koleszar fa135d7b9e Merge changes Ibbfa68d6,Idb76a0e2 into experimental
* changes:
  Move EOB to per-plane data
  Move qcoeff, dqcoeff from BLOCKD to per-plane data
2013-04-05 15:56:50 -07:00
Ronald S. Bultje 36c3a67c20 Remove full-pixel-related code.
This is a VP8-only feature (part of profile 3) that is unsupported in
VP9.

Change-Id: I78016eede8d9c834d44d4c517f3e8b8fc2a378b1
2013-04-05 12:50:19 -07:00
Ronald S. Bultje 61834f7325 Remove some unused macros.
Change-Id: Ic219e7878428128e4bb1b3995e8151f92b6bd9c3
2013-04-05 12:40:56 -07:00
Ronald S. Bultje 0732a61c37 Remove struct POS.
It is never used.

Change-Id: If7462357c0498ed05af2645f0c272124381d3aab
2013-04-05 12:38:40 -07:00
Ronald S. Bultje 1cb34c32ed Remove unused vpx_log() function prototype.
Change-Id: Icd6b4322841fefcc86f06645e6aaf1ea42fdfabd
2013-04-05 12:37:45 -07:00
Ronald S. Bultje 5cd235c6cd Remove "tx_type" member from union b_mode_info.
It is never used.

Change-Id: Ibae898c52c766aabf65868611060f9c38fb85b35
2013-04-05 12:36:15 -07:00
John Koleszar 05a79f2fbf Move EOB to per-plane data
Continue migrating data from BLOCKD/MACROBLOCKD to the per-plane
structures.

Change-Id: Ibbfa68d6da438d32dcbe8df68245ee28b0a2fa2c
2013-04-04 21:30:23 -07:00
John Koleszar 4c05a051ab Move qcoeff, dqcoeff from BLOCKD to per-plane data
Start grouping data per-plane, as part of refactoring to support
additional planes, and chroma planes with other-than 4:2:0
subsampling.

Change-Id: Idb76a0e23ab239180c818025bae1f36f1608bb23
2013-04-04 16:30:57 -07:00
Dmitry Kovalev 50e54c112d Code cleanup.
Adding multiple16 function, removing redundant code, better formatting.

Change-Id: I50195b78ac8ab803e3d05c8fb05a7ca134fab386
2013-04-01 18:23:04 -07:00
Deb Mukherjee fe9b5143ba Framework changes in nzc to allow more flexibility
The patch adds the flexibility to use standard EOB based coding
on smaller block sizes and nzc based coding on larger blocksizes.
The tx-sizes that use nzc based coding and those that use EOB based
coding are controlled by a function get_nzc_used().
By default, this function uses nzc based coding for 16x16 and 32x32
transform blocks, which seem to bridge the performance gap
substantially.

All sets are now lower by 0.5% to 0.7%, as opposed to ~1.8% before.

Change-Id: I06abed3df57b52d241ea1f51b0d571c71e38fd0b
2013-03-28 09:33:50 -07:00
Deb Mukherjee 23144d2345 Implicit weighted prediction experiment
Adds an experiment to use a weighted prediction of two INTER
predictors, where the weight is one of (1/4, 3/4), (3/8, 5/8),
(1/2, 1/2), (5/8, 3/8) or (3/4, 1/4), and is chosen implicitly
based on consistency of the predictors to the already
reconstructed pixels to the top and left of the current macroblock
or superblock.

Currently the weighting is not applied to SPLITMV modes, which
default to the usual (1/2, 1/2) weighting. However the code is in
place controlled by a macro. The same weighting is used for Y and
UV components, where the weight is derived from analyzing the Y
component only.

Results (over compound inter-intra experiment)
derf: +0.18%
yt: +0.34%
hd: +0.49%
stdhd: +0.23%

The experiment suggests bigger benefit for explicitly signaled weights.

Change-Id: I5438539ff4485c5752874cd1eb078ff14bf5235a
2013-03-26 16:58:56 -07:00
Paul Wilkins 1c75e77b6d Remove TX size segment feature
Change-Id: I0d226e4cb240caced37230f46905bf69b46e0cce
2013-03-19 17:31:08 +00:00
Ronald S. Bultje 89e4ce20d0 Update ADST selection if tx_size < block_size.
Change-Id: Ic9b336486774c95ffbb92adcb110cc0fc2a83cc5
2013-03-07 11:19:15 -08:00
Ronald S. Bultje d3724abe9f Re-add support for ADST in superblocks.
This also changes the RD search to take account of the correct block
index when searching (this is required for ADST positioning to work
correctly in combination with tx_select).

Change-Id: Ie50d05b3a024a64ecd0b376887aa38ac5f7b6af6
2013-03-07 11:19:10 -08:00
Deb Mukherjee eb6ef2417f Coding con-zero count rather than EOB for coeffs
This patch revamps the entropy coding of coefficients to code first
a non-zero count per coded block and correspondingly remove the EOB
token from the token set.

STATUS:
Main encode/decode code achieving encode/decode sync - done.
Forward and backward probability updates to the nzcs - done.
Rd costing updates for nzcs - done.
Note: The dynamic progrmaming apporach used in trellis quantization
is not exactly compatible with nzcs. A suboptimal approach has been
used instead where branch costs are updated to account for changes
in the nzcs.

TODO:
Training the default probs/counts for nzcs

Change-Id: I951bc1e22f47885077a7453a09b0493daa77883d
2013-03-07 07:20:30 -08:00
Ronald S. Bultje 111ca42133 Make superblocks independent of macroblock code and data.
Split macroblock and superblock tokenization and detokenization
functions and coefficient-related data structs so that the bitstream
layout and related code of superblock coefficients looks less like it's
a hack to fit macroblocks in superblocks.

In addition, unify chroma transform size selection from luma transform
size (i.e. always use the same size, as long as it fits the predictor);
in practice, this means 32x32 and 64x64 superblocks using the 16x16 luma
transform will now use the 16x16 (instead of the 8x8) chroma transform,
and 64x64 superblocks using the 32x32 luma transform will now use the
32x32 (instead of the 16x16) chroma transform.

Lastly, add a trellis optimize function for 32x32 transform blocks.

HD gains about 0.3%, STDHD about 0.15% and derf about 0.1%. There's
a few negative points here and there that I might want to analyze
a little closer.

Change-Id: Ibad7c3ddfe1acfc52771dfc27c03e9783e054430
2013-03-04 16:34:36 -08:00
Yunqing Wang 6193bc3ba8 Refactor vp9_dequant_idct_add function
Provided a wrapper and removed duplicate code.

Change-Id: Iaef842226ec348422e459202793b001d0983ea30
2013-02-28 14:18:46 -08:00
Dmitry Kovalev 347f3a0aa8 Code cleanup.
Fixing code style, using array lookup instead of switch statements for
forward hybrid transforms (in the same way as for their inverses).
Consistent usage of ROUND_POWER_OF_TWO macro in appropriate places.

Change-Id: I0d3822ae11f928905fdbfbe4158f91d97c71015f
2013-02-27 13:51:04 -08:00
Ronald S. Bultje e8c74e2b70 Move eob from BLOCKD to MACROBLOCKD.
Consistent with VP8.

Change-Id: I8c316ee49f072e15abbb033a80e9c36617891f07
2013-02-27 11:00:55 -08:00
John Koleszar eb939f45b8 Spatial resamping of ZEROMV predictors
This patch allows coding frames using references of different
resolution, in ZEROMV mode. For compound prediction, either
reference may be scaled.

To test, I use the resize_test and enable WRITE_RECON_BUFFER
in vp9_onyxd_if.c. It's also useful to apply this patch to
test/i420_video_source.h:

  --- a/test/i420_video_source.h
  +++ b/test/i420_video_source.h
  @@ -93,6 +93,7 @@ class I420VideoSource : public VideoSource {

     virtual void FillFrame() {
       // Read a frame from input_file.
  +    if (frame_ != 3)
       if (fread(img_->img_data, raw_sz_, 1, input_file_) == 0) {
         limit_ = frame_;
       }

This forces the frame that the resolution changes on to be coded
with no motion, only scaling, and improves the quality of the
result.

Change-Id: I1ee75d19a437ff801192f767fd02a36bcbd1d496
2013-02-26 23:54:23 -08:00
John Koleszar 6a4f708c25 Refactor inter recon functions to support scaling
Ensure that all inter prediction goes through a common code path
that takes scaling into account. Removes a bunch of duplicate
1st/2nd predictor code. Also introduces a 16x8 mode for 8x8
MVs, similar to the 8x4 trick we were doing before. This has an
unexpected effect with EIGHTTAP_SMOOTH, so it's disabled in that
case for now.

Change-Id: Ia053e823a8bc616a988a0af30452e1e75a739cba
2013-02-26 10:03:29 -08:00
Ronald S. Bultje 35524e2231 Remove "eobs" array in MACROBLOCKD.
The information is a duplicate of "eob" in BLOCKD.

Change-Id: Ia6416273bd004611da801e4bfa6e2d328d6f02a3
2013-02-21 10:07:36 -08:00
Dmitry Kovalev e6c89a1f9b Merge "Code cleanup." into experimental 2013-02-20 12:47:54 -08:00
Dmitry Kovalev eb6aee50a4 Code cleanup.
Change-Id: I7c6e3bebd94856b24dbe2aded7f9e04ef8bb8c08
2013-02-20 11:36:31 -08:00
Yaowu Xu d262e26cc7 Merge lossless experiment
Change-Id: I7b7b8d4fda3a23699e0c920d727f8c15d37d43aa
2013-02-20 07:54:28 -08:00
Jingning Han cd907b1601 16x16 butterfly inverse ADST/DCT hybrid transform
rebased.

This patch includes 16x16 butterfly inverse ADST/DCT hybrid
transform. It uses the variant ADST of kernel
    sin((2k+1)*(2n+1)/4N),
which allows a butterfly implementation.

The coding gains as compared to DCT 16x16 are about 0.1% for
both derf and std-hd. It is noteworthy that for std-hd sets
many sequences gains about 0.5%, some 0.2%. There are also few
points that provides -1% to -3% performance. Hence the average
goes to about 0.1%.

Change-Id: Ie80ac84cf403390f6e5d282caa58723739e5ec17
2013-02-19 09:07:00 -08:00
Yaowu Xu 93d6b86cfd Use lossless for Q0
The commit changes the coding mode to lossless whenever the lowest
quantizer is choosen.

As expected, test results showed no difference for cif and std-hd
set where Q0 is rarely used. For yt and yt-hd set, Q0 is used for
a number of clips, where this commit helped a lot in the high end.

Average over all clips in the sets:
yt: 2.391% 1.017% 1.066%
hd: 1.937%  .764%  .787%

Change-Id: I9fa9df8646fd70cb09ffe9e4202b86b67da16765
2013-02-19 06:18:42 -08:00
Ronald S. Bultje 3af36ea8cc Remove Y2 and Y-no-DC token types from the bitstream.
Change-Id: I7a5314daca993d46b8666ba1ec2ff3766c1e5042
2013-02-15 14:06:30 -08:00
Ronald S. Bultje 46dff5d233 Remove some Y2-related code.
Change-Id: I4f46d142c2a8d1e8a880cfac63702dcbfb999b78
2013-02-15 14:06:25 -08:00
Ronald S. Bultje 51afedbe28 Merge "Remove 2nd-order transform for first-order DC coefficients." into experimental 2013-02-13 13:58:02 -08:00
Ronald S. Bultje 42d6be8080 Remove 2nd-order transform for first-order DC coefficients.
Since addition of the larger-scale transforms (16x16, 32x32), these
don't give a benefit at macroblock-sizes anymore. At superblock-sizes,
2nd-order transform was never used over the larger transforms. Future
work should test whether there is a benefit for that use case.

Change-Id: I90cadfc42befaf201de3eb0c4f7330c56e33330a
2013-02-13 12:28:19 -08:00