Commit Graph

37 Commits

Author SHA1 Message Date
Jim Bankoski
532179e845 faster accounting of inc_mv
Moves counting of mv branches to where we have a new mv, instead of after
the whole frame is summed.

Change-Id: I945d9f6d9199ba2443fe816c92d5849340d17bbd
2013-09-04 09:47:57 -07:00
Jim Bankoski
5dda1d2394 speed up inc_mv_component
Convert mv_class if statements to look up.  re order to avoid ifs...

Change-Id: I76966a21bf517bb1f9a7957c08c476c7bb3e9a63
2013-09-04 07:11:30 -07:00
Dmitry Kovalev
86053d3ae2 Cleanups around allow_high_precision_mv flag.
Change-Id: Ic07f5f8ffeaedd5b7513b464871f83afc82dcd5c
2013-08-02 11:21:16 -07:00
Dmitry Kovalev
7131cb0e3d General cleanups.
Removing unused constants, macros, and function declarations. Using
ROUND_POWER_OF_TWO macro, vp9_zero, vp9_copy where possible. Moving
#include from *.h to *.c. Merging for loops for motion vectors.

Change-Id: Ic3bf841764a2bb177128bb3a6d7aa8f68229cd13
2013-07-25 14:13:48 -07:00
Dmitry Kovalev
be00d3970d Merge "Removing duplicated code for merging two probabilities." 2013-07-25 12:52:26 -07:00
Dmitry Kovalev
40358dc406 Removing duplicated code for merging two probabilities.
Adding common merge_probs and merge_probs2 functions. Changing ints to
usigned ints in some places.

Change-Id: Icf088ffdea7cf5b95284a128916409bdd53506b0
2013-07-24 17:44:04 -07:00
Dmitry Kovalev
0064958c71 Inlining inc_mv_component_count function.
Change-Id: Ic99d07a56b1752ec49fc5074b1dd6804b17609a0
2013-07-24 15:03:00 -07:00
Dmitry Kovalev
1099a436d3 Moving counts from FRAME_CONTEXT to new struct FRAME_COUNTS.
Counts are separate from frame context. We have several frame contexts but
need only one copy of all counts.

Change-Id: I5279b0321cb450bbea7049adaa9275306a7cef7d
2013-07-23 17:02:08 -07:00
Dmitry Kovalev
7e703de729 Removing pre probabilities from FRAME_CONTEXT.
Using cm->frame_contexts[cm->frame_context_idx] as source of previous
probabilities.

Change-Id: Ie03778acf0e7bebdc3a1f6a51854d4a0712f24a1
2013-07-19 17:33:10 -07:00
Dmitry Kovalev
a7a1e96136 Merge changes Ieffea49e,Idf610746
* changes:
  Removing two unused arguments from vp9_inc_mv signature.
  Changing signature of vp9_get_pred_probs_tx_size.
2013-07-17 14:44:20 -07:00
Dmitry Kovalev
8452c34551 Removing experimental code from vp9_entropymv.c.
Change-Id: I340d06e3bc32c78358654496503cccd4196cbe2e
2013-07-17 10:25:09 -07:00
Dmitry Kovalev
41ae3d02d4 Removing two unused arguments from vp9_inc_mv signature.
Change-Id: Ieffea49eb7a5e5092f21f8694c546aff69b07c6d
2013-07-16 17:01:08 -07:00
Dmitry Kovalev
ac72ad071d Making vp9_default_nmv_context static.
Change-Id: Ia3d5bd45adf288de11ab59c4728266c93c17e275
2013-07-10 17:44:45 -07:00
Jim Bankoski
6591cf2f7e remove warnings when NDEBUG is set
Change-Id: Ie0cb732fdcb98616a422c4463bff80642248d136
2013-07-10 14:27:20 -07:00
Ronald S. Bultje
bd867f1619 Inline vp9_get_mv_joint().
Encode time for first 50 frames of bus (speed 0) @ 1500kbps goes from
2min10.9 to 2min10.5, i.e. 0.3% faster overall, basically because we
prevent the call overhead.

Change-Id: I1eab1a95dd3eae282f9b866f1f0b3dcadff073d5
2013-07-08 16:22:39 -07:00
John Koleszar
8137e24f3d Merge "Move vp9_counts_to_nmv_context to encoder" 2013-06-25 22:44:21 -07:00
Dmitry Kovalev
6fb10f2de4 Renaming "nmv" to "mv".
Change-Id: I8299f55c3b930221e52c2237f2ddea65b94fd33b
2013-06-25 15:19:18 -07:00
John Koleszar
4ecd6dbead Move vp9_counts_to_nmv_context to encoder
This function only used from within vp9_encodemv.c.

Change-Id: Ib3fc7c30b1e2d27321397ac474cbc8976bc1f4b1
2013-06-24 15:58:18 -07:00
Dmitry Kovalev
87e1fa7627 Renaming 'nmv' to 'mv' for several functions.
Change-Id: I183a38997a9d01e4a1b869e92509f6915216fa09
2013-06-18 18:28:10 -07:00
Deb Mukherjee
a43ff15399 New probs for filters/tx_size and a few others
* New probs for subpel filters/tx_count
* Makes a change to not reset to defaults for the tx_size
probs if an intermediate frame reverts to using a fixed tx_size.
* A few updates to the parameters for backward adaptation for mode/mv
* some cosmetic cleanups

derf300: +0.06%

Change-Id: I22994d659bc31ca7a4fc8820fde24001e64a2920
2013-06-10 16:38:47 -07:00
Paul Wilkins
aa76bf3d28 Removal of CONFIG_NEW_MVREF experiment.
This experiment has failed to give much benefit but
does add complexity so deprecated.

Change-Id: Ic7b929ba706390b9907ef0b4f965bd401ca799a4
2013-04-19 11:54:02 +01:00
Dmitry Kovalev
0db175ffed Changing argument type of vp9_get_mv_joint from MV to MV*.
Change-Id: I28c3026946fc1bde7074e6e0198da93bb0d75dfe
2013-04-17 11:21:28 -07:00
Dmitry Kovalev
fd61b7ea10 Adding mv_joint_vertical and mv_joint_horizontal functions.
Change-Id: Ieaec2c48f3752b8558ba051caaf4ba2ab0e9e84d
2013-04-15 12:07:26 -07:00
Dmitry Kovalev
24f18e1c34 Renaming vp9_token_struct to vp9_token and removing previous typedef.
Change-Id: If69c3d795f87af5cc7bfdfe70ef733c41b4d55c8
2013-04-11 13:01:52 -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
Dmitry Kovalev
180cd5faa5 General code cleanup.
Removing redundant code, lower case variable names, better indentation,
better parameter names, adding const to readonly parameters.

Change-Id: Ibfdee00f60316fdc5b3f024028c7aaa76a627483
2013-03-27 14:22:30 -07:00
Jingning Han
76c12ab9c9 Support +/-2048 motion vector coding
Enable entropy coding of motion vectors up to +/-2048. Also
extend the motion search range accordingly.

Change-Id: Iac2bb015e8934521cef83a19edbe967d9f097436
2013-03-13 14:08:27 -07:00
John Koleszar
52fc4f8a78 Merge "Simplify vp9_adapt_nmv_probs" into experimental 2013-03-11 09:57:53 -07:00
John Koleszar
ee4649ded2 Simplify vp9_adapt_nmv_probs
Remove the temporary branch count arrays and build the adapted probabilities
while walking the tree. Gives an additional 1.5% or so on CIF.

Change-Id: I875d61e5e0ec778e5d2f7f9d0837b989a91cf3a3
2013-03-11 09:44:22 -07:00
Deb Mukherjee
fad43d4249 Merge "Minor optimization in mv entropy adaptation" into experimental 2013-03-11 09:43:54 -07:00
John Koleszar
e6257342b1 Merge "Optimize vp9_tree_probs_from_distribution" into experimental 2013-03-11 09:32:11 -07:00
Deb Mukherjee
f74c55eb03 Minor optimization in mv entropy adaptation
Adds a check to exit from the increment_nmv_count function when the
increment is 0.

Change-Id: I99c1e342d351f7800e23590f9c2419881bf1d708
2013-03-11 08:49:14 -07:00
John Koleszar
bd84685f78 Optimize vp9_tree_probs_from_distribution
The previous implementation visited each node in the tree multiple times
because it used each symbol's encoding to revisit the branches taken and
increment its count. Instead, we can traverse the tree depth first and
calculate the probabilities and branch counts as we walk back up. The
complexity goes from somewhere between O(nlogn) and O(n^2) (depending on
how balanced the tree is) to O(n).

Only tested one clip (256kbps, CIF), saw 13% decoding perf improvement.

Note that this optimization should port trivially to VP8 as well. In VP8,
the decoder doesn't use this function, but it does routinely show up
on the profile for realtime encoding.

Change-Id: I4f2848e4f41dc9a7694f73f3e75034bce08d1b12
2013-03-10 13:39:30 -07:00
Jingning Han
2a5278bdbd Extend diff MV limit from +/-256 to +/-1024
Increase the motion search range by 4x. Change MV_CLASS tree of the
entropy coding to allow two additional mv classes to cover the
extended motion vector limit. The codec determines the effective
motion search range conditioned on the actual frame dimension.

It provides coding gains:

stdhd 0.39%
yt    0.56%
hd    0.47%

Major coding performance gains are packed in several sequences with
intense motion activities, e.g., ped_1080p gains 7% at high bit-rates,
and on average 3%.

TODO: Need to further tune the rate control and motion search units.

Change-Id: Ib842540a6796fbee5a797809433ef6a477c6d78d
2013-03-08 10:04:36 -08:00
Ronald S. Bultje
4d0ec7aacd Consistently use get_prob(), clip_prob() and newly added clip_pixel().
Add a function clip_pixel() to clip a pixel value to the [0,255] range
of allowed values, and use this where-ever appropriate (e.g. prediction,
reconstruction). Likewise, consistently use the recently added function
clip_prob(), which calculates a binary probability in the [1,255] range.
If possible, try to use get_prob() or its sister get_binary_prob() to
calculate binary probabilities, for consistency.

Since in some places, this means that binary probability calculations
are changed (we use {255,256}*count0/(total) in a range of places,
and all of these are now changed to use 256*count0+(total>>1)/total),
this changes the encoding result, so this patch warrants some extensive
testing.

Change-Id: Ibeeff8d886496839b8e0c0ace9ccc552351f7628
2012-12-12 10:01:19 -08:00
Jim Bankoski
c67873989f fixed includes to be fully specified
Change-Id: Ia1cce221f8511561b9cbd8edb7726fbc286ff243
2012-11-28 10:53:17 -08:00
John Koleszar
fcccbcbb39 Add vp9_ prefix to all vp9 files
Support for gyp which doesn't support multiple objects in the same
static library having the same basename.

Change-Id: Ib947eefbaf68f8b177a796d23f875ccdfa6bc9dc
2012-11-27 14:12:30 -08:00