hui su [Mon, 30 Mar 2015 23:36:15 +0000 (16:36 -0700)]
tx-skip experiment: improve entropy coding of coeff tokens
This patch allows the prediction residues of tx-skipped blocks
to use probs that are different from regular transfrom
coefficients for token entropy coding. Prediction residues are
assumed as in band 6.
The initial value of probs is obtained with stats from limited
tests. The statistic model for constrained token nodes has not
been optimized. The probs for token extra bits have not been
optimized. These can be future work.
Certain coding improvment is observed:
derflr with all experiments: +6.26% (+0.10%)
screen_content with palette: +22.48% (+1.28%)
Zoe Liu [Tue, 17 Mar 2015 23:48:48 +0000 (16:48 -0700)]
Add a new PREDICTION mode using NEARMV as ref mv
This experiment, referred as NEWMVREF, also merged with NEWMVREF_SUB8X8
and the latter one has been removed. Runborgs results show that:
(1) Turning on this experiment only, compared against the base:
derflf: Average PSNR 0.40%; Overall PSNR 0.40%; SSIM 0.35%
(2) Turning on all the experiments including this feature, compared against
that without this feature, on the highbitdepth case using 12-bit:
derflf: Average PSNR 0.33%; Overall PSNR 0.32%; SSIM 0.30%.
Now for highbitdepth using 12-bit, compared against base:
derflf: Average PSNR 11.12%; Overall PSNR 11.07%; SSIM 20.27%.
hui su [Thu, 19 Mar 2015 22:55:29 +0000 (15:55 -0700)]
Palette experiment: encode color indices based on context
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%
hui su [Wed, 25 Feb 2015 18:00:40 +0000 (10:00 -0800)]
Add palette coding mode for inter frames
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)
Deb Mukherjee [Wed, 4 Mar 2015 22:04:11 +0000 (14:04 -0800)]
Non-uniform quantization experiment
This framework allows lower quantization bins to be shrunk down or
expanded to match closer the source distribution (assuming a generalized
gaussian-like central peaky model for the coefficients) in an
entropy-constrained sense. Specifically, the width of the bins 0-4 are
modified as a factor of the nominal quantization step size and from 5
onwards all bins become the same as the nominal quantization step size.
Further, different bin width profiles as well as reconstruction values
can be used based on the coefficient band as well as the quantization step
size divided into 5 ranges.
A small gain currently on derflr of about 0.16% is observed with the
same paraemters for all q values.
Optimizing the parameters based on qstep value is left as a TODO for now.
Results on derflr with all expts on is +6.08% (up from 5.88%).
Experiments are in progress to tune the parameters for different
coefficient bands and quantization step ranges.
Yaowu Xu [Tue, 13 Jan 2015 18:07:20 +0000 (10:07 -0800)]
Add encoder control for setting color space
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.
Yaowu Xu [Fri, 9 Jan 2015 21:04:48 +0000 (13:04 -0800)]
Enable decoder to pass through color space info
This commit added a field to vpx_image_t for indicating color space,
the field is also added to YUV_BUFFER_CONFIG. This allows the color
space information pass through the decoder from input stream to the
output buffer.
The commit also updates compare_img() function with added verification
of matching color space to ensure the color space information to be
correctly passed from encode to decoder in compressed vp9 streams.
Yaowu Xu [Fri, 6 Feb 2015 20:19:32 +0000 (12:19 -0800)]
Correct the miscalculation in uv dimensions
The calculation of required extension used in HBD case was wrong due
to rounding for UV when y dimension is odd. This commit replace the
computation with correct version.
This fixes a crash caused by writting beyond buffer boundary.
Zoe Liu [Mon, 9 Feb 2015 23:54:56 +0000 (15:54 -0800)]
Changed mv ref to nearestmv always for sub8x8
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.
hui su [Wed, 21 Jan 2015 00:17:18 +0000 (16:17 -0800)]
Palette-based coding experiment
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%)
Deb Mukherjee [Sat, 7 Feb 2015 01:44:49 +0000 (17:44 -0800)]
Adds code for corner detection and ransac
This code is to start experiments with global motion models.
The corner detection can be either fast_9 or Harris.
Corner matching is currently based on normalized correlation.
Three flavors of ransac are used to estimate either a
homography (8-param), or an affine model (6-param) or a
rotation-zoom only affine model (4-param).
The highest level API for the library is in vp9_global_motion.h,
where there are two functions - one for computing a single model
and another for computing multiple models up to a maximum number
provided or until a desired inlier probability is achieved.
Spencer Egart [Fri, 14 Nov 2014 19:55:58 +0000 (11:55 -0800)]
Created COMPOUND_MODES experiment.
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
Zoe Liu [Mon, 12 Jan 2015 20:11:37 +0000 (12:11 -0800)]
Cleaned up the code a little for the CONFIG_EXT_TX experiment on the
16x16 and 8x8 transform sizes, both for the regular case and the high
bit depth (CONFIG_VP9_HIGHBITDEPTH) case.
Deb Mukherjee [Thu, 8 Jan 2015 08:24:37 +0000 (00:24 -0800)]
Adds an inter-intra combination mode
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
punksu [Sat, 20 Dec 2014 06:49:44 +0000 (14:49 +0800)]
Allow large tx_size in lossless coding with transform skipping
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.
hui su [Sun, 23 Nov 2014 19:35:54 +0000 (11:35 -0800)]
tx_skip mode for lossy coding
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.