Geza Lore [Mon, 9 May 2016 15:09:41 +0000 (16:09 +0100)]
Fix interintra predictor buffer overflow.
When constructing the intra predictor for rectangular interintra blocks,
the last row/column of the first square is copied back into the source
image (which is the current reconstructed image buffer) before
predicting the second square. The code used to use the height instead
of width for vertical rectangles, and vice versa for horizontal
rectangles, leading to overwriting the block on the right/below. This
leads to an encode/decode mismatch if the right/below block is in a
different tile and is encoded before the current block, which did happen
with multi-threaded encoding tests. This is now fixed.
Zoe Liu [Mon, 9 May 2016 18:16:28 +0000 (11:16 -0700)]
Turn on the use of upsampled refs for ext-refs
Without this patch, the experiment of ext-refs showed almost no coding
gains compared to the baseline. This is because when ext-refs is on, the
use of upsampled reference is off.
With this patch, the ext-refs experiment works with the upsampled
references and shows coding gains in Overall PSNR as follows, with ~5%
slow down for encoding time:
Note that the previous patch a912c6ec314d816767a4c3eb4e5e1bddcc4c1186
that "Make LAST_FRAME always point to the newly coded frame in ext-refs"
made ext-refs work with the upsampled refereces.
Yi Luo [Mon, 9 May 2016 17:36:40 +0000 (10:36 -0700)]
HBD hybrid transform 16x16 SSE4.1 optimization
- Tx_type: DCT_DCT, DCT_ADST, ADST_DCT, ADST_ADST.
- Update vp10_fht16x16_test.cc to do bit-exact test against
latest C version.
- HBD encoder speed improves ~1.8%.
Zoe Liu [Fri, 6 May 2016 00:32:51 +0000 (17:32 -0700)]
Make LAST_FRAME always point to the newly coded frame in ext-refs
This patch changes the encoder only for the ext-refs experiment. For
each newly coded frame to refresh the LAST_FRAME, the decoder is
notified that the LAST4_FRAME is to be refreshed, and read out the
updated reference frame buffer vitural indexes for the next coded
frame in a way that:
LAST4_FRAME => LAST_FRAME,
LAST_FRAME => LAST2_FRAME,
LAST2_FRAME => LAST3_FRAME, and
LAST3_FRAME => LAST4_FRAME.
Compared against the original ext-refs experiment in TOT, a small gain
is achieved in overall PSNR:
lowres Avg: -0.154
lowres BDRate: -0.044
Yi Luo [Thu, 5 May 2016 23:32:12 +0000 (16:32 -0700)]
Normalize naming/testing convention in vp10_fht8x8_test.cc
Use clear and correct type/function names.
Add ASM_REGISTER_STATE_CHECK wrapper for SSE4.1 function.
Conform macro EXPECT_EQ(expected, actual) convention.
Alex Converse [Wed, 4 May 2016 20:08:20 +0000 (13:08 -0700)]
Rename pick_filter_intra.
The word 'pick' is usually used in functions that make decisions where
the bitstream allows multiple legal choices, and not to limit the
bitstream format itself.
Zoe Liu [Thu, 5 May 2016 21:32:48 +0000 (14:32 -0700)]
Add the experiment of bidir-pred
This experiment will implement the use of a backward prediction
reference without temporal filtering. No overlay frame will be
transmitted, instead, the flag of show_existing_frame will be turned
on.
Geza Lore [Thu, 5 May 2016 17:06:21 +0000 (18:06 +0100)]
Fix mismatch with ext-interp.
The encoder signals the interp filter type in the frame header if all
blocks use the same filter (see bitstream.c:fix_interp_filter). This
decision is made based on the counts, but with ext-interp, the counts
are actually only incremented for blocks that fail vp10_is_interp_needed
(see for example encodeframe.c:update_state), otherwise a default value
is used (EIGHTTAP_REGULAR). The decoder however first checks if the
interp filter is signaled at the frame level, and uses that filter type
for all blocks, even if the default value should have been used.
This patch makes the decoder first check with vp10_is_interp_needed
to see if the default value should be used and then checks the frame
level signaling, which reconciles the difference between encoder and
decoder.
Geza Lore [Wed, 4 May 2016 10:25:01 +0000 (11:25 +0100)]
Improve multi-threaded encode/decode test.
The test used to test that multi-threaded encode/decode resulted in
the same reconstructed image as single-threaded encode/decode. This
however did not mean that the multi-threaded encoder produced the same
bitstream as the single-threaded encoder, as the multi-threaded encoder
could use different forward probability updates and still produce a
bitstream that is sub optimal but yields the same reconstructed image.
The test now asserts that the bitstream is the same as well as the
reconstructed image. Also added more cpu-use values for testing VP10.
Jingning Han [Wed, 4 May 2016 19:37:39 +0000 (12:37 -0700)]
Refactor intra filter type context fetch function
Factor out common codes from vp10_get_pred_context_intra_interp().
This prevents a potential invalid access of pointers xd->left_mbmi
and xd->above_mbmi.
Yaowu Xu [Wed, 4 May 2016 18:59:10 +0000 (11:59 -0700)]
Change to use proper type in vp10_token_state
"qc" in vp10_token_state is used to save quantized coefficients, this
commit changes the type from short to tran_low_t to properly reflect
the value range for highbitdepth build.
This fixes an out-of-range bug when optimize_b is used in highbitdepth
build.
Geza Lore [Tue, 3 May 2016 12:55:25 +0000 (13:55 +0100)]
Test tile row independence.
Tile rows should now be independent, so make pbi->inv_tile_order
invert the decoding order of tile rows as well as tile columns.
This should improve test coverage. Also added more tile configurations
to the tile_independence_tests.
Geza Lore [Tue, 3 May 2016 10:53:55 +0000 (11:53 +0100)]
Configure tiles in tests when using ext-tile.
With ext-tile enabled, the encoder test driver needs to configure the
tile sizes wit different values to encode using a single tile, and to
decode all tiles. This should fix most unit test failures.
Fix 1: in ext-inter + obmc config, properly identify if the left
predictor used for obmc is a compound one in the case that the
neighbor uses wedgeinterinter pred and we will dump the ALTREF part.
This will fix the seg fault in unit test:
VP10/AltRefForcedKeyTestLarge.Frame1IsKey/0
Fix 2: in ext-tile + obmc experiment, handle the case that the
above block does not fit in the same row tile with the current one,
so as to prevent potential crashes.
Removes integer divides from backward updates for VP10.
Currently this is put in as part of the entropy experiment.
Coding efficiency change is in the noise level.
With ext interp, write_switchable_interp_filter calls
vp10_is_interp_needed, which needs access to the reference frame
buffers to check if they are scaled, the ref frame buffer pointer
at this point used to be uninitialized in the encoder resulting in
bitstream syntax mismatch when the encoder/decoder did not read/write
the interp filter element consistently.