Commit Graph

68 Commits

Author SHA1 Message Date
John Koleszar
31cbe2ed9a Eliminate tautology
Unreachable code
  that does nothing anyway
      removed forever.

Change-Id: I14105d2dd9dbc9d558f36464055e350dbeb45488
2013-02-06 08:22:59 -08:00
Paul Wilkins
8b4e9c5925 Merge "Change definition of NearestMV." into experimental 2013-02-06 04:06:31 -08:00
Ronald S. Bultje
1407bdc243 [WIP] Add column-based tiling.
This patch adds column-based tiling. The idea is to make each tile
independently decodable (after reading the common frame header) and
also independendly encodable (minus within-frame cost adjustments in
the RD loop) to speed-up hardware & software en/decoders if they used
multi-threading. Column-based tiling has the added advantage (over
other tiling methods) that it minimizes realtime use-case latency,
since all threads can start encoding data as soon as the first SB-row
worth of data is available to the encoder.

There is some test code that does random tile ordering in the decoder,
to confirm that each tile is indeed independently decodable from other
tiles in the same frame. At tile edges, all contexts assume default
values (i.e. 0, 0 motion vector, no coefficients, DC intra4x4 mode),
and motion vector search and ordering do not cross tiles in the same
frame.
t log

Tile independence is not maintained between frames ATM, i.e. tile 0 of
frame 1 is free to use motion vectors that point into any tile of frame
0. We support 1 (i.e. no tiling), 2 or 4 column-tiles.

The loopfilter crosses tile boundaries. I discussed this briefly with Aki
and he says that's OK. An in-loop loopfilter would need to do some sync
between tile threads, but that shouldn't be a big issue.

Resuls: with tiling disabled, we go up slightly because of improved edge
use in the intra4x4 prediction. With 2 tiles, we lose about ~1% on derf,
~0.35% on HD and ~0.55% on STD/HD. With 4 tiles, we lose another ~1.5%
on derf ~0.77% on HD and ~0.85% on STD/HD. Most of this loss is
concentrated in the low-bitrate end of clips, and most of it is because
of the loss of edges at tile boundaries and the resulting loss of intra
predictors.

TODO:
- more tiles (perhaps allow row-based tiling also, and max. 8 tiles)?
- maybe optionally (for EC purposes), motion vectors themselves
  should not cross tile edges, or we should emulate such borders as
  if they were off-frame, to limit error propagation to within one
  tile only. This doesn't have to be the default behaviour but could
  be an optional bitstream flag.

Change-Id: I5951c3a0742a767b20bc9fb5af685d9892c2c96f
2013-02-05 15:43:03 -08:00
Paul Wilkins
81043e8d62 Change definition of NearestMV.
This commit makes the NearestMV match the chosen
best reference MV. It can be a 0,0 or non zero vector
which means the the compound nearest mv mode can
combine a 0,0 and a non zero vector.

Change-Id: I2213d09996ae2916e53e6458d7d110350dcffd7a
2013-02-05 17:03:25 +00:00
Deb Mukherjee
a53be60904 Merge "Adding a frame parallel decoding mode" into experimental 2013-01-30 12:03:45 -08:00
Ronald S. Bultje
3febf9707d Default superblock skip flag to 32x32 for skip-blocks.
This is identical to the later decisions made in encode_superblock().
This commit doesn't actually change anything, but makes the mbmi state
more consistent between the RD loop and the final encode result.

Change-Id: I9e735afb7c5a52e5b61728cb88c67ef9b9bf59be
2013-01-29 21:46:31 -08:00
Ronald S. Bultje
b90996c51b Reset skip flag in superblock RD loop.
This is the superblock equivalent of commit 290b83a.

Change-Id: Ib3945dd9e992fa9ec1fdea5a11e17a3cc0e37637
2013-01-29 21:42:56 -08:00
Ronald S. Bultje
5a9da2d906 Merge "Fix block pointer corruption in intra8x8 prediction with 4x4 transform." into experimental 2013-01-29 12:49:42 -08:00
Paul Wilkins
5d1c62c639 Merge "Segment Skip Flag" into experimental 2013-01-29 09:29:26 -08:00
Ronald S. Bultje
ffc2e4f4af Fix block pointer corruption in intra8x8 prediction with 4x4 transform.
The RD loop would change the pointer after the first mode (DC) was tested,
leading to corrupt block objects being provided for the others. This
would essentially render the i8x8 predictor useless.

Change-Id: I16c5906ca64fb34878ac32ce59af8974e4582bb8
2013-01-29 09:18:47 -08:00
Paul Wilkins
0ff9b033b0 Segment Skip Flag
First step in simplifying the segment mode and
segment EOB flags into a simpler segment skip
flag that implies 0,0 mv and EOB at position 0.

Change-Id: Ib750cac31a7a02dc21082580498efd9f7d8d72a5
2013-01-28 17:28:04 +00:00
Deb Mukherjee
dfd89f2eab Adding a frame parallel decoding mode
Adds a flag to disable features that would inhibit frame parallel
decoding. This includes backward adaptation and MV sorting based
on search in ref frame buffer.

Also includes some minor clean-ups.

Change-Id: I434846717a47b7bcb244b37ea670c5cdf776f14d
2013-01-25 17:16:19 -08:00
Ronald S. Bultje
3ca5b35ce5 Merge "Remove "update_context" variable from VP9_COMP context." into experimental 2013-01-25 09:43:42 -08:00
Ronald S. Bultje
0a7b3953f0 Remove "update_context" variable from VP9_COMP context.
The variable is always zero.

Change-Id: Id5cdbecad543bca465a5b1d471badaec7e112c8d
2013-01-24 16:28:53 -08:00
Deb Mukherjee
01cafaab1d Adds an error-resilient mode with test
Adds an error-resilient mode where frames can be continued
to be decoded even when there are errors (due to network losses)
on a prior frame. Specifically, backward updates are turned off
and probabilities of various symbols are reset to defaults at
the beginning of each frame. Further, the last frame's mvs are
not used for the mv reference list, and the sorting of the
initial list based on search on previous frames is turned off
as well.

Also adds a test where an arbitrary set of frames are skipped
from decoding to simulate errors. The test verifies (1) that if
the error frames are droppable - i.e. frame buffer updates have
been turned off - there are no mismatch errors for the remaining
frames after the error frames; and (2) if the error-frames are non
droppable, there are not only no decoding errors but the mismatch
PSNR between the decoder's version of the post-error frames and the
encoder's version is at least 20 dB.

Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
2013-01-23 21:56:15 -08:00
John Koleszar
da832a80e4 Start to anonymize reference frames
Remove lst_fb_idx, gld_fb_idx, alt_fb_idx, refresh_last_frame,
refresh_golden_frame, refresh_alt_ref_frame from common. Gold/Alt are
encode side conventions. From the decoder's perspective, we want to be
dealing with numbered references.

Updates to active_ref 2 signal mode context switches, vestigial from
refresh_alt_ref_frame. This needs some clean up to make sense with
increased numbers of reference frames, as well as reimplementing the
swapping of alt/golden which was previously done using the
buffer-to-buffer copy mechanism removed in an earlier commit.

Change-Id: I7334445158b7666f9295d2a2dd22aa03f4485f58
2013-01-16 14:06:23 -08:00
Yaowu Xu
9bf73f46f9 fix a number issues that cause failures
During master jenkins verification proces

Change-Id: I3722b8753eaf39f99b45979ce407a8ea0bea0b89
2013-01-14 18:32:32 -08:00
John Koleszar
24bc1a7189 Use INT64_MAX instead of LLONG_MAX
These variables have the type int64_t, not long long. long long could
be a larger type than 64 bits. Emulate INT64_MAX for older versions of
MSVC, and remove the unreferenced vpx_ports/vpxtypes.h

Change-Id: Ideaca71838fcd3849d816d5ab17aa347c97d03b0
2013-01-14 15:57:21 -08:00
Ronald S. Bultje
c9071601a2 Remove compound intra-intra experiment.
This experiment gives little gains and adds relatively much code
complexity (and it hinders other experiments), so let's get rid of
it.

Change-Id: Id25e79a137a1b8a01138aa27a1fa0ba4a2df274a
2013-01-14 15:47:25 -08:00
Paul Wilkins
e2c696a7aa Merge "Fix compiler warnings" into experimental 2013-01-14 14:20:57 -08:00
Yaowu Xu
113005b11d Fix compiler warnings
The warnings caused verify failure with gerrit for several  commits

Change-Id: I030df8638bd69b8783a3ac58e720ff9f0bfd546c
2013-01-14 13:56:52 -08:00
Ronald S. Bultje
290b83ab62 Reset x->skip for each iteration in the RD loop.
This prevents ill-defined behaviour, such as setting x->skip for a mode
that is excluded because of frame-level flags (e.g. filter selection,
compound prediction selection), then not breaking out of the RD loop
because the mode is not allowed, but keeping the flag on. Whatever mode
is iterated through next in the RD loop will then carry this flag, and
all sort of bad stuff happens, such as x->skip being set on intra pred
modes.

Change-Id: I5bec46b36e38292174acb1c564b3caf00a9b4b9a
2013-01-14 12:44:32 -08:00
Paul Wilkins
d27ae620bc Remove INT64_MAX references.
Replace INT64_MAX references with LLONG_MAX
for windows build.

Change-Id: Ib8b45c1e9c15c043b2f54c27ed83b8682b2be34f
2013-01-11 19:45:26 +00:00
Ronald S. Bultje
aa2effa954 Merge tx32x32 experiment.
Change-Id: I615651e4c7b09e576a341ad425cf80c393637833
2013-01-10 08:23:59 -08:00
Ronald S. Bultje
6884a83f06 Merge superblocks64 experiment.
Change-Id: If6c88752dffdb566f8d4322f135145270716fb8e
2013-01-09 17:21:40 -08:00
Adrian Grange
7d6b5425d7 New prediction filter
This patch removes the old pred-filter experiment and replaces it
with one that is implemented using the switchable filter framework.

If the pred-filter experiment is enabled, three interopolation
filters are tested during mode selection; the standard 8-tap
interpolation filter, a sharp 8-tap filter and a (new) 8-tap
smoothing filter.

The 6-tap filter code has been preserved for now and if the
enable-6tap experiment is enabled (in addition to the pred-filter
experiment) the original 6-tap filter replaces the new 8-tap smooth
filter in the switchable mode.

The new experiment applies the prediction filter in cases of a
fractional-pel motion vector. Future patches will apply the filter
where the mv is pel-aligned and also to intra predicted blocks.

Change-Id: I08e8cba978f2bbf3019f8413f376b8e2cd85eba4
2013-01-09 12:00:39 -08:00
Deb Mukherjee
4b7304ee68 Adds 64x64 hybrid dct/dwt transform
This is to add to the 64x64 transform experiment as an alternative to
a 64x64 DCT.
Two levels of wavelet decomposition is used on a 64x64 block, followed
by 16x16 DCT on the four lowest subbands. The highest three subbands
are left untransformed after the first level DWT.

Change-Id: I3d48d5800468d655191933894df6b46e15adca56
2013-01-08 14:05:58 -08:00
Ronald S. Bultje
4455036cfc Merge superblocks (32x32) experiment.
Change-Id: I0df99742029834a85c4933652b0587cf5b6b2587
2013-01-08 12:54:45 -08:00
John Koleszar
879cb7d962 Merge vp9-preview changes into experimental branch
Incorportate vp9-preview changes by merging master branch into experimental.

Conflicts:
	test/test.mk
	vp9/common/vp9_filter.c
	vp9/common/vp9_idctllm.c
	vp9/common/vp9_invtrans.h
	vp9/common/vp9_mbpitch.c
	vp9/common/vp9_rtcd_defs.sh
	vp9/common/vp9_systemdependent.h
	vp9/common/vp9_type_aliases.h
	vp9/common/x86/vp9_asm_stubs.c
	vp9/common/x86/vp9_subpixel_mmx.asm
	vp9/decoder/vp9_decodframe.c
	vp9/decoder/vp9_dequantize.c
	vp9/decoder/vp9_dequantize.h
	vp9/decoder/vp9_onyxd_int.h
	vp9/encoder/vp9_bitstream.c
	vp9/encoder/vp9_encodeframe.c
	vp9/encoder/vp9_rdopt.c

Change-Id: I17f51c3666d1b59cf1a699f87607cbc5d30a87c5
2013-01-08 10:19:59 -08:00
Ronald S. Bultje
c13d9fef42 Re-enable support for static_threshold (encode_breakout).
Change-Id: Ibd7380f478d3127f9db91d0a4fd2fd0dfde961ab
2013-01-07 11:02:14 -08:00
Ronald S. Bultje
e6216d163a Don't use tx32x32 for macroblocks.
Change-Id: Ib674e0153ca360867ab7a20ba291ac9171a01250
2013-01-07 09:40:19 -08:00
Ronald S. Bultje
c3941665e9 64x64 blocksize support.
3.2% gains on std/hd, 1.0% gains on hd.

Change-Id: I481d5df23d8a4fc650a5bcba956554490b2bd200
2013-01-05 18:20:25 -08:00
Adrian Grange
81d1171fd4 Fix mode selection infinite loop bug
Mode selection for SBs could enter an infinite loop because
the interpolation filter mode index was not being reset
correctly.

Change-Id: I4bbe726f29ef5b6836e94884067c46084713cc11
2013-01-04 09:00:47 -08:00
Yaowu Xu
df7ce5a711 Merge "make cost_coeffs() and tokenize_b() consistent" into experimental 2013-01-03 09:57:07 -08:00
Yaowu Xu
818f5698fb Merge "Merge cost_coeffs_2x2() into cost_coeffs()" into experimental 2013-01-03 09:33:21 -08:00
Yaowu Xu
83664f457b make cost_coeffs() and tokenize_b() consistent
Change-Id: I7cdb5c32a1400f88ec36d08ea982e38b77731602
2013-01-03 09:31:47 -08:00
Adrian Grange
259b800832 New interpolation filter selection algorithm
Old Scheme:
When SWITCHABLE filter selection is enabled the encoder
evaluates the use of each interpolation filter type and
selects the best one to use at the MB level. A frame-
level flag can be set to force the use of a particular
filter type for all MBs in a frame if it is more efficient
to encode that way. The logic here involved a Q dependent
threshold that assumed that the second 8-tap filter was
a high-pass filter. However, this requires a trip around
the recode loop. If the frame-level flag indicates use
of a particular filter, the other filters are not
evaluated in the pick_mode loop.

New Scheme:
Each filter type is evaluated at the MB level and a record
of the best filter is kept, irrespective of what filter
is signaled at the frame-level. Once all MBs have been
encoded, a decision is made as to what frame-level mode
to set for the *next* frame. If one filter is used by 80%
or more of the MBs, then this filter is forced since it
is assumed that this will be more efficient if the
next frame has similar characteristics. i.e. there is a
one-frame lag between measuring the filter selection and
setting the frame-level mode to use.

Change-Id: I6a7e7ced8f27e120fafb99db2dc9c6293f8d20f7
2013-01-03 08:12:43 -08:00
Yaowu Xu
bd28510ef9 Merge cost_coeffs_2x2() into cost_coeffs()
Remove special case function cost_coeffs_2x2() and change function
cost_coeffs() to handle 2nd order haar block as it is handle all
other block types already.

Change-Id: I2aac6f81ee0ae9e03d6a8da4f8681d69b79ce41f
2013-01-03 08:00:00 -08:00
Paul Wilkins
cad4a91429 Change INT64_MAX to LLONG_MAX
This is needed to make the windows build work after
the removal of vp9_type_alisases.h.

Change-Id: I8addf38e9f3c8b864e0e30a8916a26e0264dd02c
2013-01-02 18:06:00 +00:00
Paul Wilkins
313d1100af Added update-able mv-ref probabilities.
Part of NEW_MVREF experiment.
Added update-able probabilities.

Change-Id: I5a4fcf4aaed1d0d1dac980f69d535639a3d59401
2013-01-02 14:22:11 +00:00
John Koleszar
5ebe94f9f1 Build fixes to merge vp9-preview into master
Various fixups to resolve issues when building vp9-preview under the more stringent
checks placed on the experimental branch.

Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
2012-12-26 11:21:09 -08:00
Deb Mukherjee
08f0c7cc9c New previous coef context experiment
Adds an experiment to derive the previous context of a coefficient
not just from the previous coefficient in the scan order but from a
combination of several neighboring coefficients previously encountered
in scan order.  A precomputed table of neighbors for each location
for each scan type and block size is used. Currently 5 neighbors are
used.

Results are about 0.2% positive using a strategy where the max coef
magnitude from the 5 neigbors is used to derive the context.

Change-Id: Ie708b54d8e1898af742846ce2d1e2b0d89fd4ad5
2012-12-19 18:49:39 -08:00
Ronald S. Bultje
4cca47b538 Use standard integer types for pixel values and coefficients.
For coefficients, use int16_t (instead of short); for pixel values in
16-bit intermediates, use uint16_t (instead of unsigned short); for all
others, use uint8_t (instead of unsigned char).

Change-Id: I3619cd9abf106c3742eccc2e2f5e89a62774f7da
2012-12-18 15:31:19 -08:00
Ronald S. Bultje
5cab8b7a18 Merge "Give 4x4 scan and coef_band tables a _4x4 suffix." into experimental 2012-12-18 14:17:46 -08:00
Yunqing Wang
779c5f28a8 Fix uninitialized warning
Fixed uninitialized warning for txfm_size.

Change-Id: I42b7e802c3e84825d49f34e632361502641b7cbf
2012-12-18 13:19:04 -08:00
Ronald S. Bultje
8986eb5c26 Give 4x4 scan and coef_band tables a _4x4 suffix.
This matches the names of tables for all other transform sizes.

Change-Id: Ia7681b7f8d34c97c27b0eb0e34d490cd0f8d02c6
2012-12-18 10:49:10 -08:00
Paul Wilkins
d8f5d1b257 Problem of over smoothing with intra modes.
In some cases intra modes in inter frames give
an over smoothed appearance. Especially with
noisy but flat content.

Also in some cases there were problems with key
frame sizing again with very flat but noisy content.

These are temporary changes to help alleviate the
visual problems but will almost certainly hurt metric
results especially at the very low data rate end.

Change-Id: I11549179a19277ffc283d9788bc70168f2a8bdc9
2012-12-17 11:54:17 +00:00
Deb Mukherjee
7fa3deb1f5 Build fixes with teh super blcoks and 32x32 expts
Change-Id: I3c751f8d57ac7d3b754476dc6ce144d162534e6d
2012-12-13 12:18:38 -08:00
Scott LaVarnway
b575394e21 Improved vp9_ihtllm_c
As suggested by Yaowu, we can use eob to reduce the complexity
of the vp9_ihtllm_c function.  For the 1080p test clip used, the decoder
performance improved by 17%.

Change-Id: I32486f2f06f9b8f60467d2a574209aa3a3daa435
2012-12-12 15:49:39 -08:00
Ronald S. Bultje
39de1e14ed Merge "Consistently use get_prob(), clip_prob() and newly added clip_pixel()." into experimental 2012-12-12 10:34:14 -08:00