The basic idea is to use a pixel’s neighboring colors as
context to predict its own color. Up to 4 neighbors are
considered here: left, left-above, above, right-above.
To reduce the number of contexts, the combination of any
4 (or less) colors are mapped to a reduced number of
patterns. For example, 1111, 2222, 3333, … , can be mapped
to the same pattern: AAAA. SImilarly, 1122, 1133, 2233, …,
can be mapped to the pattern AABB. In this way, the total
number of color contexts is reduced to 16.
This almost doubles the gain of palette coding on screen
content videos.
on screen_content
--enable-palette +14.2%
--enable-palette --enable-tx-skip +21.2%
on derflr
--enable-palette +0.12%
with all other experiments +6.16%
Change-Id: I560306dae216f2ac11a9214968c2ad2319fa1718
Also make changes to transmit palette-enabled flag using
neighbor blocks as context.
on screen_content
--enable-palette +7.35%
on derflr
with all other experiments +6.05%
Change-Id: Id6c2f726d21913d54a3f86ecfea474a4044c27f6
on screen_content
--enable-palette +6.74%
on derflr
with all other experiments +6.02%
(--enable-supertx --enable-copy-mode
--enable-ext-tx --enable-filterintra
--enable-tx64x64 --enable-tx-skip
--enable-interintra --enable-wedge-partition
--enable-compound-modes --enable-new-quant
--enable-palette)
Change-Id: Ib85049b4c3fcf52bf95efbc9d6aecf53d53ca1a3
For 444 videos, a single palette of 3-d colors is
generated for YUV. For 420 videos, there may be two
palettes, one for Y, and the other for UV.
Also fixed a bug when palette and tx-skip are both on.
on derflr
--enable-palette +0.00%
with all experiments +5.87% (was +5.93%)
on screen_content
--enable-palette +6.00%
--enable-palette --enable-tx_skip +15.3%
on screen_content 444 version
--enable-palette +6.76%
--enable-palette --enable-tx_skip +19.5%
Change-Id: I7287090aecc90eebcd4335d132a8c2c3895dfdd4
This commit adds encoder side control for vp9 to set color space info
in the output compressed bitstream.
It also amends the "vp9_encoder_params_get_to_decoder" test to verify
the correct color space information is passed from the encoder end to
decoder end.
Change-Id: Ibf5fba2edcb2a8dc37557f6fae5c7816efa52650
(cherry picked from commit e94b415c3479129944a69fafbeacf550fb9237b7)
For all sub8x8 partition, the mv ref has changed to its own nearest_mv
instead of the nearest_mv of the super 8x8 block:
--enable-newmvref-sub8x8: ~0.1% gain for derflr
Besides the above new experiment, code has been cleaned largely for the
sub8x8 motion search, such that the mv ref can be fairly easily changed to
use other options, e.g., the next step's global motion effort.
Change-Id: I8e3f4aaa8553ba8c445369692e079db5ce282593
Added palette coding option for Y channel only, key frame only.
Palette colors are obtained with k-means clustering algorithm.
Run-length coding is used to compress the color indices.
On screen_content:
--enable-palette + 5.75%
--enable-palette --enable-tx_skip +15.04% (was 13.3%)
On derflr:
--enable-palette - 0.03%
with all the other expriments + 5.95% (was 5.98%)
Change-Id: I6d1cf45c889be764d14083170fdf14a424bd31b5
Also fixes some build issues with certain experimental combinations.
Results on derflr with all experiments on: +5.516%
Change-Id: I9b492f3d3556bd1f057005571dc9bee63167dd95
COMPOUND_MODES experiment encodes separate MV modes for each frame in a compound
reference prediction. Added modes NEAREST_NEARESTMV, ZERO_ZEROMV,
NEW_NEWMV, NEAREST_NEARMV, NEAR_NEARESTMV, NEW_NEARESTMV, NEAR_NEWMV,
NEW_NEARMV, and NEAREST_NEWMV.
Also enhances the wedge-partition expt to work better with compound
modes.
Results:
derflr +0.227
All experiments on: derflr +5.218
Change-Id: I719e8a34826bf1f1fe3988dac5733a845a89ef2b
Implements vertical, horizontal, and tm dpcm intra prediction for
blocks in tx_skip mode. Typical coding gain on screen content video
is 2%~5%.
Change-Id: Idd5bd84ac59daa586ec0cd724680cef695981651
A smooth weighting scheme is used to put more weight
on the intra predictor samples near the left/top boundaries
and decaying it to favor the inter predictor samples more as
we move away from these boundaries in the direction of
prediction.
Results:
derflr: +0.609% with only this experiment
derflr: +3.901% with all experiments
Change-Id: Ic9dbe599ad6162fb05900059cbd6fc88b203a09c
Disable SUPERTX mode when lossless mode is enabled because the largest
lossless transform size is 4X4.
Change-Id: I4167959a282728d62354119ced99ca29febabfd1
In lossless coding, tx_size can be larger than 4x4 when transform
skipping is activated. Compared to regular vp9 lossless coding,
performance improvement for derf is about 5%; gain is larger
for screen content videos.
Change-Id: Ib20ece7e117f29fb91543612757302a2400110b4
This patch improves the non-transform coding mode. At this
point, the coding gain on screen content videos is about
12% for lossless, an 15% for lossy case.
1. Encode tx_skip flags with context. Y tx_skip flag context is
whether the prediction mode is inter or intra. UV flag context
is Y flag.
2. Transform skipping is less helpful when the Q-index is high.
So it is enabled only when the Q-index is smaller than a
threshold. Currently the threshold is set as 255 for intra blocks,
and 0 for inter blocks.
3. The shift of the prediction residue, when copying them to the
coeff buffer, is set as 3 when the Q-index is larger than a
threshold (currently set as 0), and 2 otherwise.
Change-Id: I372973c7518cf385f6e542b22d0f803016e693b0
Reimplements the supertx experiment from the playground branch.
Makes it work with other experiments.
Results:
With --enable-superttx
derflr: +0.958
With --enable-supertx --enable-ext-tx
derflr: +2.25%
With --enable-supertx --enable-ext-tx --enable-filterintra
derflr: +2.73%
Change-Id: I5012418ef2556bf2758146d90c4e2fb8a14610c7
Extends the ext-tx experiment to include regular and flipped
DST variants. A total of 9 transforms are thus possible for
each inter block with transform size <= 16x16.
In this patch currently only the four ADST_ADST variants
(flipped or non-flipped in both dimensions) are enabled
for inter blocks.
The gain with the ext-tx experiment grows to +1.12 on derflr.
Further experiments are underway.
Change-Id: Ia2ed19a334face6135b064748f727fdc9db278ec
Non-transform option is enabled in both intra and inter modes.
In lossless case, the average coding gain on screen content
clips is 11.3% in my test.
Change-Id: I2e8de515fb39e74c61bb86ce0f682d5f79e15188
Preliminary 64x64 transform implementation.
Includes all code changes.
All mismatches resolved.
Coding results for derf and stdhd are within noise. stdhd is slightly
higher, derf is slightly lower.
To be further refined.
Change-Id: I091c183f62b156d23ed6f648202eb96c82e69b4b
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
We encode a empty invisible frame in front of the base layer frame to
avoid using prev_mi. Since there's a restriction for reference frame
scaling factor, we have to make it smaller and smaller gradually until
its size is 16x16.
Change remerged.
Change-Id: I9efab38bba7da86e056fbe8f663e711c5df38449
This reverts commit c113457af9880b8e15a36cdaabfd414d1c245693.
Temporary revert to allow clean revert of another commit.
Change-Id: Ia9b7b755e6c48e1b6e383329f121fef175a24b27
We encode a empty invisible frame in front of the base layer frame to
avoid using prev_mi. Since there's a restriction for reference frame
scaling factor, we have to make it smaller and smaller gradually until
its size is 16x16.
Change-Id: I60b680314e33a60b4093cafc296465ee18169c19
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
mi_grid_* are arrays of pointer to pointer. They save the pointers that point
to the MIs in cm->mi. But they are unnecessary and complicated. The original
goal was to remove MODE_INFO_t copy. But with an extra MODE_INFO_t pointer
inside MODE_INFO_t, same goal could be achieved.
This commit totally removes the mi_grid_* structures. But there are still
many dummy MODE_INFO_t inside cm->mi which are a waste of memory. Next commit
will do on-demand MODE_INFO_t allocation in order to save these memories.
Change-Id: I3a05cf1610679fed26e0b2eadd315a9ae91afdd6
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.
Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
It's built based on current spatial svc code.
We only support one spatial two temporal layers at this time.
Change-Id: I1fdc8584354b910331e626bfae60473b3b701ba1
This commit addes a new strategy to reduce the search for optimal
interpolation filter type. The encoder counts and store how many each
filter type is selected and used for each of the reference frames.
A filter type that is rarely used for all three reference frames is
masked out to avoid computation.
The impact on compression is neglectible:
-0.02% on derf
+0.02% on stdhd
Encoding time is seen to reduce by 2~3%.
Change-Id: Ibafa92291b51185de40da513716222db4b230383
We can use one frame context for each layer so that we don't have
to reset the probs every frame. But we can't use prev_mi since we
may drop enhancement layers. So we have to generate a non vp9
compatible bitstream and modify it in the player.
1. We need to code all frames as invisible frame to let prev_mi
not to be used. But in the bitstream we need to code the
show_frame flag to 1 so that the publisher will know it's
supposed to be a visible frame.
2. In the player we need to change the show_frame flag to 0 for
all frames. Then add an one byte frame into the super frame
to tell the decoder which layer we want to show.
Change-Id: I75b7304cf31f0ab952f043e33c034495e88f01f3
The test to determine if the mode info buffers need
to be resized when the frame size changes was
incorrect, as per bug 837.
By storing the size of the allocated data structure,
a simple test determines whether to allocate more
memory when the frame size changes.
Change-Id: I1544698f2882cf958fc672485614f2f46e9719bd