In the rd loop, check the perf of obmc, whose mv is copied from regular
inter predictor, when wedge interinter is better than regular inter
(previously it will force allow_obmc = 0). The condition of the early
termination before this step is relaxed to avoid skipping too many obmc
predictions. The rates of the overhead are properly calculated for these tools.
The logic of the bitstream syntax:
(a single ref) the interintra flag is sent first, only if it is 0, we
send the obmc flag;
(compound refs) the obmc flag is sent first, only if it is 0, we send
the wedge interinter flag
Coding gain
lowres: 0.428% (2.287%->2.715%)
Change-Id: I5f3a34640b398e313cbf84235c9fe2073eb2173f
This avoids repeatedly checking the candidate motion vector
precision level at the decoder end. The compression performance
varies at 0.01% level.
Change-Id: I4a88e95decd900d0cac9a0c2e70ba43ef7ecac38
* changes:
Branch dct to new implementation for bd12
Change dct32x32's range
Fit dct's stage range into 32-bit when bitdepth is 12
Pass tx_type into get_tx_scale
The VP8_EFLAG_NO_UPD_LAST and VP8_EFLAG_NO_REF_LAST flags can be
passed to the encoder to signal that it should not update/reference
the LAST ref frame when encoding the current frame. With
--enable-ext-refs turned on, the new LAST2 LAST3 and LAST4 ref frames
could still be used or updated, which causes the
VP10/ErrorResilienceTestLarge.DropFramesWithoutRecovery/{0,1,2}
tests to fail.
With this patch, if --enable-ext-refs is used, then
VP8_EFLAG_NO_UPD_LAST and VP8_EFLAG_NO_REF_LAST also applies to the
new LAST2 LAST3 and LAST4 ref frames, as well as the LAST ref frame.
Change-Id: If482b1c09bbaf914eca8e0348a2367bff261661d
Speed increase for ext-tx by 20% for a BDRATE drop of 0.26%.
The ext-tx expt becomes -2.66% BDRATE (reduced from -2.92%) for
the lowres set.
It turns out that reducing the set of transforms for intra from
12 to 5 makes very little difference in coding performance (~0.04%).
Most of the performance drop comes from the reduction is transform
set for inter. Currently there is a provision to control that with
a macro.
Change-Id: I7de05527bf72f96acc1e0ab8a74a849da0a141e5
-Fix some bugs in row_scan and col_scan. In some cases, the above
or left neighbor was not considered even though it is available.
-When above or left neighbor is not available, try using the
top-left, top-right or bottom-left neighbor.
Compression improvement:
lowres 0.20%
midres 0.16%
hdres 0.20%
Change-Id: If521665589c7f29277b8e9223f21f4a8bf3fef39
The uncompressed frame header contains a bit to signal whether the
frame is encoded using 64x64 or 128x128 superblocks. This can vary
between any 2 frames.
vpxenc gained the --sb-size={64,128,dynamic} option, which allows the
configuration of the superblock size used (default is dynamic). 64/128
will force the encoder to always use the specified superblock size.
Dynamic would enable the encoder to choose the sb size for each
frame, but this is not implemented yet (dynamic does the same as 128
for now).
Constraints on tile sizes depend on the superblock size, the following
is a summary of the current bitstream syntax and semantics:
If both --enable-ext-tile is OFF and --enable-ext-partition is OFF:
The tile coding in this case is the same as VP9. In particular,
tiles have a minimum width of 256 pixels and a maximum width of
4096 pixels. The tile width must be multiples of 64 pixels
(except for the rightmost tile column). There can be a maximum
of 64 tile columns and 4 tile rows.
If --enable-ext-tile is OFF and --enable-ext-partition is ON:
Same constraints as above, except that tile width must be
multiples of 128 pixels (except for the rightmost tile column).
There is no change in the bitstream syntax used for coding the tile
configuration if --enable-ext-tile is OFF.
If --enable-ext-tile is ON and --enable-ext-partition is ON:
This is the new large scale tile coding configuration. The
minimum/maximum tile width and height are 64/4096 pixels. Tile
width and height must be multiples of 64 pixels. The uncompressed
header contains two 6 bit fields that hold the tile width/heigh
in units of 64 pixels. The maximum number of tile rows/columns
is only limited by the maximum frame size of 65536x65536 pixels
that can be coded in the bitstream. This yields a maximum of
1024x1024 tile rows and columns (of 64x64 tiles in a 65536x65536
frame).
If both --enable-ext-tile is ON and --enable-ext-partition is ON:
Same applies as above, except that in the bitstream the 2 fields
containing the tile width/height are in units of the superblock
size, and the superblock size itself is also coded in the bitstream.
If the uncompressed header signals the use of 64x64 superblocks,
then the tile width/height fields are 6 bits wide and are in units
of 64 pixels. If the uncompressed header signals the use of 128x128
superblocks, then the tile width/height fields are 5 bits wide and
are in units of 128 pixels.
The above is a summary of the bitstream. The user interface to vpxenc
(and the equivalent encoder API) behaves a follows:
If --enable-ext-tile is OFF:
No change in the user interface. --tile-columns and --tile-rows
specify the base 2 logarithm of the desired number of tile columns
and tile rows. The actual number of tile rows and tile columns,
and the particular tile width and tile height are computed by the
codec ensuring all of the above constraints are respected.
If --enable-ext-tile is ON, but --enable-ext-partition is OFF:
No change in the user interface. --tile-columns and --tile-rows
specify the WIDTH and HEIGHT of the tiles in unit of 64 pixels.
The valid values are in the range [1, 64] (which corresponds to
[64, 4096] pixels in increments of 64.
If both --enable-ext-tile is ON and --enable-ext-partition is ON:
If --sb-size=64 (default):
The user interface is the same as in the previous point.
--tile-columns and --tile-rows specify tile WIDTH and HEIGHT,
in units of 64 pixels, in the range [1, 64] (which corresponds
to [64, 4096] pixels in increments of 64).
If --sb-size=128 or --sb-size=dynamic:
--tile-columns and --tile-rows specify tile WIDTH and HEIGHT,
in units of 128 pixels in the range [1, 32] (which corresponds
to [128, 4096] pixels in increments of 128).
Change-Id: Idc9beee1ad12ff1634e83671985d14c680f9179a
Bitdepth 10/12:
Fit coefficient range into 32 bits
Fit codfficient * const range into 32 bits
Bitdepth 8:
Fit coefficient range into 16 bits
Fit codfficient * constant range into 32 bits
Change-Id: I50b5a3132e8a9f5155c971ab0f6eb52876d2b5ca
Decouples interintra modes and probability models from regular
intra modes, to enable creating/optimizing new interintra modes.
Also, fixes interpolation values for 128x128 interintra and obmc.
Change-Id: I5c2016db49b8f029164e5fe84c6274d4e02ff90e
Rename MI_BLOCK_SIZE.* -> MAX_MIB_SIZE.* (MIB is for MI Block).
Rename MI_MASK.* -> MAX_MIB_MASK.*
There are no functional changes.
This is in preparation for coding the superblock size at the frame
level, which will require some of these constants to become variables.
The new names better reflect future semantics, and hence make the code
clearer.
Change-Id: Iee08d97554cf4cc16a5dc166a3ffd1ab91529992
Fixes an issue with rectangular inter-intra blocks.
Includes various other refactoring and cleanups to enable fast mixing
of inter and intra predictors.
Uses only the best single inter reference so far for the inter-intra
search.
About 30% speed-up with a 0.1% hit in performance.
This is part one of overhauling on the ext-inter experiment. To be
continued in subsequent patches.
Change-Id: Id10ee100c78c6e00009a3a4f930a4435ef403a95
If --enable-ext-partition is used at build time, the superblock size
(sometimes also referred to as coding unit (CU) size) is extended to
128x128 pixels.
Change-Id: Ie09cec6b7e8d765b7555ff5d80974aab60803f3a
Amends previous commit to also handle subsampling correctly.
Change ID of prev commit: I6b07e6cf9b287ba4b5bd6599af4a7412e50b3bdc
Was causing occassional failures for 422 streams due to accessing
elements beyond the extent of the bmi array.
Change-Id: I37ebabf4c01ca84bcd1851428172bdf753805d98
After porting tile coding from VP9 to VP10, some performance
degradation was seen because of the difference between VP9 and
Vp10 baseline. This patch disabled some features in VP10 while
tile coding is turned on. Also, an encoder control API was added
back for this use case.
Change-Id: I8f736db8388408a8cc35320a2f80abb02906571c
If configured with --enable-ext-tile, the codec uses an alternative
tile coding syntax in the bitstream. Changes include::
- The maximum number of tile rows and columns is extended to 1024
each.
- The minimum tile width/height is 64 pixels (1 superblock).
- A tile copy mode is added where a tile directly reuse the coded
data of a previous tile
- The meaning of the tile-columns and tile-rows codec parameters are
overloaded to mean tile-width and tile-height in units of 64
pixels.
- All tiles should now be independent, including rows within the
same columns, so large scale parallel, or independent decoding is
possible.
- vpxdec also gained the options to decode only a particular tile,
tile row, or tile column.
Changes without --enable-ext-tile:
- All tiles should now be independent, including rows within the
same columns, so large scale parallel, or independent decoding is
possible.
- vpxenc default tile configuration changed to use 1 tile column.
Change-Id: I0cd08ad550967ac18622dae5e98ad23d581cb33e
This commit separates the predicted motion vector from the nearestmv
motion vector in the coding process for both regular and sub8x8
block sizes.
Change-Id: I703490513b0194e6669ebf719352db015facb3e1
- Setup function vp10_highbd_fht4x4_sse4_1 for highbd SSE4.1
intrinsics optimization.
- Wrote SSE4.1 functions: load_buffer_4x4(), write_buffer_4x4(),
and fdct4x4_sse4_1().
- Used logic right shift to avoid coeff memory write/read.
- Turned on vp10_highbd_fht4x4_sse4_1 for DCT_DCT mode only.
- Improved overall encoding performance >2.3% for 50 frames
sequence, park_joy_1080p_12.y4m, in which, --input-bit-depth=12,
--bit-depth=12, 50 frames.
- Unit test passed.
Change-Id: Idd6dc6e472cbbf235f0ade4f66fbe859a860a004
This has been ported under ext_partition_types because it is due
to be combined with the coding_unit_size experiment which is
already being ported under ext_partition
Change-Id: I47af869ae123ddf0aa99160dac644059d14266ee
Merge the functions that generate prediction by above/left predictors
for the encoder and the decoder.
Change-Id: I57e53a8f2eb8d3028c4ed0c9abdcbf00503f95a0
Makes a set of 16 transforms total, adding all 1D
combinations of ADST and FlipADST, and removng all DST
transforms.
lowres, midres both improve by about 0.1% and hdres by
-0.378% in BDRATE but with fewer transforms that are also
simpler.
Further experiments to continue later.
Change-Id: I7348a4c0e12078fdea5ae3a2d36a89a319ffcc6e
Rework the interface to allow codec store the reference motion
vector list information for coding process.
Change-Id: I47e26587f6c0808655e4626f316ec7614a7ad8ed
This commit re-designs the probability model for the syntax elements
of the dynamic motion vector referencing system.
Change-Id: Icfb8203c7e8f64e10e99f5890e25e6f6b15fe5d1
This patch added two features to improve entropy coding efficiency
for coefficient tokens.
1. Choose 1 of 4 default probability tables based on q-index for
key-frames.
It is ported from nextgen branch:
https://chromium-review.googlesource.com/#/c/280586/
2. Do backward update after each superblock (64X64) row using
subframe token counts.
Coding gain: 0.1% on lowres; 0.42% on midres; 0.36% on hdres.
Much larger gain for key-frames: 2.6%, 2.3%, 1.7%.
Design doc: go/huisu-entropy
Change-Id: Ia3b6a615636be09247d70e4c520405637561532b
In preparation for adding more 1D variants with ADST/FlipADST/etc.
BDRATE actually improves by 0.21% on lowres.
Change-Id: I2fa4720c69fe001fa666119a284dfc6b17fffab2
Temporarily disable transform type selection for 32x32 transform
block size. This speeds up the encoding process. For bus at CIF
150 frames, the encoding time goes from 896s -> 762s (11% faster).
The compression performance for lowres set is improved by 0.15%,
and -0.029% for hdres.
Change-Id: If239b272970eb302150bec13b8cf192fbe045332
Coding gain on screen_content is 12.2% (was 6.6%).
Some features such as frame-level color buffer, adaptive
entropy coding, are coming in future patches.
Change-Id: I2658cf5ec0cbb02cff685475759f3b68c9807697
This commit enables the hybrid 1-D/2-D transform coding scheme for
high bit-depth setting. It improves the compression performance of
ext-tx experiment by 0.98% for lowres_all set.
Change-Id: Ic27f5037f2c36b095a93b9f15dbae34bdcdf00aa
This commit enables the 1-D transform to use Manhattan grid vertical
and horizontal scan order for transform coefficient entropy coding.
Enabled in inter prediction mode, the hybrid 1D/2D transform coding
scheme outperforms the 2D-DCT based coding system used in VP9 by
lowres_all 1.7%
hdres_all 1.4%
As one coding option, in addition to the existing 17 other transform
types in ext-tx experiment, the 1D/2D hybrid transform improves
the coding gains:
lowres_all 2.2% -> 3.0%
Change-Id: I9cefa9d9e38224546d0afd67feecd9f8d4a16ab0
- Implemented fdst16_sse2(), fdst16_8col() against C version: fdst16().
- Turned on 7 DST related hybrid txfm types in vp10_fht16x16_sse2().
- Replaced vp10_fht10x10_c() with vp10_fht16x16_sse2() in
fwd_txfm_16x16().
- Added vp10_fht16x16_sse2() unit test against C version:
vp10_fht16x16_c() (--gtest_filter=*VP10Trans16x16*).
- Unit test passed.
- Speed improvement: 2.4%, 3.2%, 3.2%, for city_cif.y4m, garden_sif.y4m,
and mobile_cif.y4m.
Change-Id: Ib30a67ce5d5964bef143d588d0f8fa438be8901f
This commit enables a hybrid 1-D/2-D transform coding scheme and
the accompany entropy coding system. It currently uses hybrid
1-D/2-D DCT transform coding. It provides coding performance gains:
lowres_all 0.55%
hdres_all 0.43%
Change-Id: I2b30dcafd21eb2bb3371f6e854cbab440a4dfa78
For left side obmc, the input of the mask function is corrected as
the column coordinate.
Also, minor fixes for a compiler warning.
Change-Id: Ia981ef443d5b0285a93d73e5c7ab83f8c3a23464
Make the RANS implementation operate on cumulative distribution
functions rather than individual probability distribution functions.
CDFs have shown themselves more flexible to work with.
Reduces decoding memory usage from scaling O(num_distributions *
symbol_resolution) to O(num_distributions).
No bitstream change. This is an purely implementation change.
Change-Id: I4e18d3a0a3d37a36a61487c3d778f9d088b0b374
This allows the codec to use effective motion vector as the candidate
to produce the reference motion vector list.
Change-Id: Ib90be705fe28200c13376d6d7741800a61f13043
The above-right and left-bottom pixels were sometimes not used even
though they are available. Results on lowres_all and hdres_all are
mostly neutral.
Change-Id: Ic13533dd498442ad5592b83bb5fabf053cc8e8f0
Fixes some issues introduced by a merge of two patches.
Also decouples the temporal interpolation filter from the switchable
filters for now for ease of experimentation with both separately.
Change-Id: If1c7c08adf00e0cf818fe8d0d3656c26ea65eb32
Includes various cosmetic changes and refactoring including
naming the sharp filters differently (since they are no longer
8-tap).
Change-Id: Ida5a19ca0daa9f6a64a6734394c685b2a4a2564a
This commit unifies the encoder and decoder border extension and
motion compensated prediction process. Remove the decoder specific
flow to simplify the development flow.
Change-Id: I9c43bbe6d7c017e6da2db6a62c5bf3d0af7ccfce
The interintra experiment, which combines an inter prediction and an
inter prediction have been ported from the nextgen branch. The
experiment is merged into ext_inter, so there is no separate configure
option to enable it.
Change-Id: I0cc20cefd29e9b77ab7bbbb709abc11512320325
This commit uses 12-tap sharp filter to generate alter reference
frame. It improves the compression performance by
derf 0.45%
hevcmr 0.35%
stdhd 0.79%
No encoding time change is observed.
Change-Id: Ia5dc26d5aae6b9b0cb782e5a28dc5066eeeb2ec8
Adds hooks to use 32x32 ext-tx. Also adds scan orders for the masked
transforms for 32x32.
Make macro USE_MSKTX_FOR_32X32 1 in blockd.h to support 32x32 masked
transforms for ext-tx.
Change-Id: Ie6564830266651fcafae2d536c274dafd664ce17
These variable names were legacy from a previous version of this
function and in the current version they were confusingly backwards.
Change-Id: I4f6c1628f296fd5b650fd9c5e2d56d7daf66a3f6
This commit enables a context based motion vector entropy coding
conditioned on dynamic reference motion vector list. This (along with
the previous CL) imporves the coding gains due to dynamic motion
vector referencing based entropy coding:
derf 0.1%
hevcmr 0.2%
stdhd 0.7%
hevchr 0.4%
No encoding time change was observed.
Change-Id: I179c723844079195f6952a12582996a3ca9e9914
Don't initialize first pass costs for a number of symbols where first
pass probabilities aren't initialized.
As a side effect, an illegal read in the ANS experiment is fixed.
https://bugs.chromium.org/p/webm/issues/detail?id=1089
Change-Id: I97438c357bd88f52f5a15c697031cf0c3cc8f510
Priviously, we do 12-tap interpolation even there is no sub pixel,
This could cause a bug becuase decoder doesn't extend border when there
is no sub pixel. In this situation, if we still do interpolation, we
will access the border extension which doesn't exist and cause a
memory error
Change-Id: I55b879722f0a10c5d13261bd9617a75c826a2418