Commit Graph

124 Commits

Author SHA1 Message Date
Dmitry Kovalev
421baef49e Small cleanup inside setup_loopfilter function.
Change-Id: If7fa8aea02f26c2c2bb5daf4e65c3e661d7031ca
2013-04-05 12:48:48 -07:00
John Koleszar
98466e8962 Merge "Simplifying get_delta_q function." into experimental 2013-04-05 09:16:15 -07:00
Deb Mukherjee
ffc92da4c2 Fixing the newbintramodes experiment
Adds back special casing B_PRED mode decoding but protected
within the experimental macro.

Change-Id: If98dc8e56b0ecfb1202540c2b7dfdd070cb81ca0
2013-04-04 12:40:55 -07:00
Dmitry Kovalev
52128c5894 Simplifying get_delta_q function.
Change-Id: I3a1e9cc5c3ed5be01ff75a84a6c82ec02c75af9c
2013-04-04 12:10:39 -07:00
Dmitry Kovalev
f857e074d7 Fixing bug introduced by previous commit.
Inside decode_sb_4x4 it should be
"get_tx_type_4x4(mb, y_idx * y_size + x_idx)"
but it was
"get_tx_type_4x4(mb, y_idx * (2 * y_size) + x_idx)".
Also making code of decode_sb_4x4, decode_sb_8x8, and decode_sb_16x16
formatted in the same way.

Change-Id: I15c7bef4fb575f7e9da19f953912324cb35d24dd
2013-04-04 10:49:17 -07:00
John Koleszar
ccc0577ab2 Merge "Remove special case vp9_decode_coefs_4x4" into experimental 2013-04-04 07:11:31 -07:00
John Koleszar
74e8bd11c2 Merge "Adding decode_sb_16x16 function." into experimental 2013-04-03 21:07:53 -07:00
John Koleszar
4d9dbb2ae8 Merge "Reimplementation of setup_frame_size." into experimental 2013-04-03 21:04:29 -07:00
John Koleszar
0520833591 Merge "Adding setup_pred_probs and read_txfm_mode functions." into experimental 2013-04-03 21:02:59 -07:00
Dmitry Kovalev
d5a017300c General code cleanup.
Making code more readable in different places.

Change-Id: Iea92c9a35e64d257ee358879fc04fc926843d52e
2013-04-03 18:40:17 -07:00
Dmitry Kovalev
50e02b947a Adding decode_sb_16x16 function.
Moving command code from decode_sb32 and decode_sb64 into new
decode_sb_16x16 function.

Change-Id: I57a161300af085557adec2fe600f3c10a145faf2
2013-04-03 18:37:28 -07:00
John Koleszar
1e5f25ecc8 Remove special case vp9_decode_coefs_4x4
This code was only called in the BPRED case, but had no real special
case associated with it. Made BPRED behave like all other modes. No
bitstream change.

Change-Id: I87ba11fe723928b6314d094979011228d5ba006f
2013-04-03 16:12:51 -07:00
Yunqing Wang
4ca882f32f Modify vp9_setup_interp_filters function
Took vp9_setup_scale_factors_for_frame() out from
vp9_setup_interp_filters(), so that it is only called once per
frame instead of per macroblock. Decoder tests showed a 1.5%
performance gain.

Change-Id: I770cb09eb2140ab85132f82aed388ac0bdd3a0aa
2013-04-03 13:49:55 -07:00
Dmitry Kovalev
da0232fd59 Reimplementation of setup_frame_size.
General code cleanup in loopfilter code. Modification of setup_frame_size,
so now VP9_COMMON is modified in one place after all width/height checks
passed.

Change-Id: Iedf32df43a912d7aae788ed276ac6c429973f6fe
2013-04-03 12:21:47 -07:00
Dmitry Kovalev
59b2928d40 Adding setup_pred_probs and read_txfm_mode functions.
Decomposition vp9_decode_frame function, moving code into read_txfm_mode
and setup_pred_probs functions.

Change-Id: I90970dea43cbcef4d6d61fdef267c2094ddee65d
2013-04-03 12:18:15 -07:00
John Koleszar
8b71b8a6de Merge "Renaming sb32_coded and sb64_coded fields." into experimental 2013-04-02 21:49:03 -07:00
John Koleszar
dc12e6c0dc Merge "Lower case names for struct members." into experimental 2013-04-02 21:27:32 -07:00
Dmitry Kovalev
dca8ad178c Renaming sb32_coded and sb64_coded fields.
Renaming sb32_coded to prob_sb32_coded and sb64_coded to prob_sb64_coded.

Change-Id: I6de5cad00a57c3e066d53467f8c38cb6073dce11
2013-04-02 18:21:55 -07:00
Dmitry Kovalev
626635c271 Lower case names for struct members.
Lower case member names inside VP9D_CONFIG and VP9D_COMP structs.

Change-Id: I75af9ad2d929a35c357207a3fd9ebedddabf79c3
2013-04-02 13:34:20 -07:00
Dmitry Kovalev
9738e2dbd8 Adding functions with common code for superblock decoding.
Adding decode_sb_8x8 and decode_sb_4x4 with common code for superblock
decoding. Renaming decode_superblock32 to decode_sb32 and
decode_superblock64 to decode_sb64.

Change-Id: Id006d7e398b9bfa3acec4326e1e0c537ebfefdd3
2013-04-02 10:42:22 -07:00
John Koleszar
49bc402a94 Merge "Code cleanup." into experimental 2013-04-01 21:12:56 -07:00
John Koleszar
a417a6e32c Merge "Removing redundant function arguments." into experimental 2013-04-01 21:09:48 -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
e3955007df Merge "Framework changes in nzc to allow more flexibility" into experimental 2013-03-29 15:57:27 -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
Dmitry Kovalev
72f9f10cf5 Extracting decode_tiles function.
Extracting decode_tiles function from vp9_decode_frame.

Change-Id: I02a465eeaf76138ef3559e1d46deb452c10e1219
2013-03-27 16:23:12 -07:00
Dmitry Kovalev
17cddb4e26 Removing redundant function arguments.
Almost all arguments for vp9_build_inter32x32_predictors_sb and
vp9_build_inter64x64_predictors_sb can be deduced from the first macroblock
argument.

Change-Id: I5d477a607586d05698d5b3b9b9bc03891dd3fe83
2013-03-27 16:19:27 -07:00
Dmitry Kovalev
8c69c193b5 Extract setup_frame_size and update_frame_context functions.
Extracting setup_frame_size and update_frame_context functions. Introducing
vp9_read_prob function as shortcut for (vp9_prob)vp9_read_literal(r, 8).

Change-Id: Ia5c68fd725b2d1b9c5eb20f69cacb62361b5a3dd
2013-03-27 14:04:35 -07:00
Ronald S. Bultje
c6efbbcfe4 Merge "Use above/left (instead of previous in scan-order) as token context." into experimental 2013-03-26 19:16:24 -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
Ronald S. Bultje
790fb13215 Use above/left (instead of previous in scan-order) as token context.
Pearson correlation for above or left is significantly higher than for
previous-in-scan-order (absolute values depend on position in scan, but
in general, we gain about 0.1-0.2 by using either above or left; using
both basically just makes this even better). For eob branch skipping,
we continue to use the previous token in scan order.

This helps about 0.9% on derf after re-training on a limited data set.
Full re-training and results on larger-resolution clips are pending.

Note that this commit breaks trellis, so we can probably get further
gains out of it by fixing trellis at some later point.

Change-Id: Iead68e296fc3a105cca746b5e3da9555d6010cfe
2013-03-26 16:46:09 -07:00
Dmitry Kovalev
4a3d786019 Decomposition of vp9_decode_frame function.
Moving code from vp9_decode_frame function into setup_loopfilter and
setup_segmentation functions. A little bit of cleanup.

Change-Id: I2cce1813e4d7aeec701ccf752bf57e3bdd41b51c
2013-03-26 11:04:25 -07:00
John Koleszar
8e1c368486 Merge "Add an in-loop deringing experiment" into experimental 2013-03-26 08:36:55 -07:00
John Koleszar
f0923f3b01 Merge "Code cleanup." into experimental 2013-03-26 08:30:46 -07:00
John Koleszar
441e2eab1b Add an in-loop deringing experiment
Adds a per-frame, strength adjustable, in loop deringing filter. Uses
the existing vp9_post_proc_down_and_across 5 tap thresholded blur
code, with a brute force search for the threshold.

Results almost strictly positive on the YT HD set, either having no
effect or helping PSNR in the range of 1-3% (overall average 0.8%).
Results more mixed for the CIF set, (-0.5 min, 1.4 max, 0.1 avg).
This has an almost strictly negative impact to SSIM, so examining a
different filter or a more balanced search heuristic is in order.

Other test set results pending.

Change-Id: I5ca6ee8fe292dfa3f2eab7f65332423fa1710b58
2013-03-26 08:23:24 -07:00
Deb Mukherjee
d14c7265f1 Bugfix in model coef prob experiment
Fixes an issue with model based update that got into
the original patch that was merged.

Change-Id: Ie42d3d0aff2e48cd187d96664dbd3e9d6d3ac22f
2013-03-26 07:30:42 -07:00
Deb Mukherjee
49dcc71493 Merge "Modeling default coef probs with distribution" into experimental 2013-03-26 07:13:13 -07:00
Deb Mukherjee
fd18d5dffe Modeling default coef probs with distribution
Replaces the default tables for single coefficient magnitudes with
those obtained from an appropriate distribution. The EOB node
is left unchanged. The model is represeted as a 256-size codebook
where the index corresponds to the probability of the Zero or the
One node. Two variations are implemented corresponding to whether
the Zero node or the One-node is used as the peg. The main advantage
is that the default prob tables will become considerably smaller and
manageable. Besides there is substantially less risk of over-fitting
for a training set.

Various distributions are tried and the one that gives the best
results is the family of Generalized Gaussian distributions with
shape parameter 0.75. The results are within about 0.2% of fully
trained tables for the Zero peg variant, and within 0.1% of the
One peg variant.

The forward updates are optionally (controlled by a macro)
model-based, i.e. restricted to only convey probabilities from the
codebook. Backward updates can also be optionally (controlled by
another macro) model-based, but is turned off by default. Currently
model-based forward updates work about the same as unconstrained
updates, but there is a drop in performance with backward-updates
being model based.

The model based approach also allows the probabilities for the key
frames to be adjusted from the defaults based on the base_qindex of
the frame. Currently the adjustment function is a placeholder that
adjusts the prob of EOB and Zero node from the nominal one at higher
quality (lower qindex) or lower quality (higher qindex) ends of the
range. The rest of the probabilities are then derived based on the
model from the adjusted prob of zero.

Change-Id: Iae050f3cbcc6d8b3f204e8dc395ae47b3b2192c9
2013-03-25 23:43:38 -07:00
Dmitry Kovalev
7cc14e598e Code cleanup.
Lower case variable names, code simplification by using already defined
clamp and read_le16 functions.

Change-Id: I8fd544365bd8d1daed86d7b2ae0843e4ef80df08
2013-03-25 14:24:26 -07:00
Dmitry Kovalev
56f3a2c663 Code cleanup: lower case variable names.
Renaming Width to width, Height to height and Version to version in
several structs and function signatures.

Change-Id: I084c3f7e747cb2ce3345aff27a3dff9b13a87543
2013-03-20 16:41:30 -07:00
John Koleszar
8a3f55f2d4 Replace scaling byte with explicit display size
If the intended display size is different than the size the frame is
coded at, then send that size explicitly in the bitstream. Adds a new
bit to the frame header to indicate whether the extra size fields
are present.

Change-Id: I525c66f22d207efaf1e5f903c6a2a91b80245854
2013-03-18 12:02:20 -07:00
John Koleszar
c5b317057b Merge "Fix pulsing issue with scaling" into experimental 2013-03-18 11:57:36 -07:00
Yaowu Xu
12ade55719 Merge "removed reference to "LLM" and "x8"" into experimental 2013-03-18 08:51:19 -07:00
Deb Mukherjee
bf7387f6b7 Merge "Context-pred fix to not use top/left on edges" into experimental 2013-03-16 19:09:25 -07:00
Deb Mukherjee
b1921b2f08 Context-pred fix to not use top/left on edges
This fix resolves some of the mismatch issues being seen
recently. While this is the right thing to do when tiling
is used for this experiment, it is not the underlying cause
of the the mismatches.
Something else is causing writing outside of the allowable
frame area in the encoder leading to this mismatch.

Change-Id: If52c6f67555aa18ab8762865384e323b47237277
2013-03-16 09:26:52 -07:00
Dmitry Kovalev
9285703e86 Cleaning up frame decoding functionality.
Change-Id: I25424904fb8541fc19d00d9fbc592379374b98c0
2013-03-14 12:31:54 -07:00
John Koleszar
9b7be88883 Fix pulsing issue with scaling
Updates the YV12_BUFFER_CONFIG structure to be crop-aware. The
exiting width/height parameters are left unchanged, storing the
width and height algined to a 16 byte boundary. The cropped
dimensions are added as new fields.

This fixes a nasty visual pulse when switching between scaled and
unscaled frame dimensions due to a mismatch between the scaling
ratio and the 16-byte aligned sizes.

Change-Id: Id4a3f6aea6b9b9ae38bdfa1b87b7eb2cfcdd57b6
2013-03-13 19:10:10 -07:00
Yaowu Xu
005552639b removed reference to "LLM" and "x8"
The commit changed the name of files and function to remove obselete
reference to LLM and x8.

Change-Id: I973b20fc1a55149ed68b5408b3874768e6f88516
2013-03-13 08:35:46 -07:00
Dmitry Kovalev
2891d70b23 Code cleanup.
Removing redundant code, introducing new functions for better
decomposition, adding 'clamp' function to vp9_common.h.

Change-Id: Ic3b8ca13bbc38f60f0c9c43910b5802005e31aaf
2013-03-11 17:02:27 -07:00
Deb Mukherjee
a28139c849 Continued experiment with nonzero count
Adds probability updates for extra bits for the nzcs, code for
getting nzc stats, plus some minor cleanups and fixes.

Change-Id: If2814e7f04fb52f5025ad9f400f3e6c50a00b543
2013-03-08 16:37:08 -08:00