Geza Lore [Tue, 19 Jan 2016 18:15:40 +0000 (18:15 +0000)]
Update VAR_TX related context when using SUPERTX.
The encoder did not update left_txfm_context and above_txfm_context in
MACROBLOCKD (used for choosing the probability context for the vartx
split bits) when the supertx bit was set for a block. The deoder on the
other hand did update these for supertx blocks. The encoder used these
to compute the context counts, which the packer then uses to adapt it's
probabilities. This results in the packer and the decoder using
different probabilities.
This patch harmonizes the encoder and the decoder by making the encoder
update the mentioned context for supertx coded blocks.
Geza Lore [Mon, 25 Jan 2016 15:46:59 +0000 (15:46 +0000)]
Initalize mbmi->tx_size during rdopt.
This is necessary when using SUPERTX, as the bitstream packer relies on
tx_size being set correctly to decide whether to output the block using
supertx or not.
Geza Lore [Thu, 21 Jan 2016 10:46:33 +0000 (10:46 +0000)]
Set inter_tx_size for supertx coded blocks.
The loop filter relies on inter_tx_size in MB_MODE_INFO being set
properly when VAR_TX is enabled. Supertx coded blocks did not set this
previously at all, and the differing garbage values eventually resulted
in in a YUV mismatch between encoder and decoder after loop filtering.
This patch fixes this by setting inter_tx_size to the proper supertx
size in both the encoder and the decoder. This should also mean that
loop filtering is done at the proper transform boundaries, even when
supertx or vartx is being used.
Yue Chen [Wed, 20 Jan 2016 00:45:45 +0000 (16:45 -0800)]
Adding new compound modes to EXT_INTER experiment
Combinations of different mv modes for two reference frames
are allowed in compound inter modes. 9 options are enabled,
including NEAREST_NEARESTMV, NEAREST_NEARMV, NEAR_NEARESTMV,
NEAREST_NEWMV, NEW_NEARESTMV, NEAR_NEWMV, NEW_NEARMV, ZERO_ZEROMV,
and NEW_NEWMV.
This experiment is mostly deported from the nextgen branch.
It is made compatible with other experiments
Coding gain of EXT_INTER(derflr/hevcmr/hevchd): 0.533%/0.728%/0.639%
Julia Robson [Thu, 21 Jan 2016 17:14:29 +0000 (17:14 +0000)]
Fixes for var_tx when ext_tx is not enabled
This patch fixes a couple of issues caused by change-id:
I15d20ce5292b70f0c2b4ba55c1f1318181481596
Changes to the code for when the ext_tx experiment is not enabled
were merged from master but as var_tx does not exist on master
the changes had not been applied to the case when var_tx experiment
is enabled
Marco [Wed, 20 Jan 2016 21:51:12 +0000 (13:51 -0800)]
vp9-svc: Allow frame-dropping in svc datarate control tests.
Remove comment(s) and enable frame-dropper for tests.
Frame dropper for 1 pass svc was fixed a while ago:
https://chromium-review.googlesource.com/#/c/309230/
Julia Robson [Wed, 20 Jan 2016 12:03:16 +0000 (12:03 +0000)]
Making the forward transform consistent with high bit depth
This patch changes the code for 16bit buffers to use the same
optimisation as is used for 8bit buffers. (See change-Id:
I0452da1786d59bc8bcbe0a35fdae9f623d1d44e1 for more information
about the optimisation)
Yue Chen [Thu, 7 Jan 2016 23:13:52 +0000 (15:13 -0800)]
EXT_INTER experiment
NEW2MV is enabled, representing a new motion vector predicted from
NEARMV. It is mostly ported from nextgen, where it was named
NEW_INTER.
A few fixes are done for sub8x8 RDO to correct some misused
mv references in the original patch.
A 'bug-fix' for encoding complexity is done, reducing the additional
encoding time from 50% to 20%. In sub8x8 case, the old patch
did motion search for every interpolation filter (vp9 only
searches once). This fix also slightly improves the coding gain.
This experiment has been made compatible with REF_MV and EXT_REFS.
Coding gain (derflr/hevcmr/hevchd): 0.267%/0.542%/0.257%
ext-partition: to hold partition extensions (ex. ext-partition,
ext-coding-unit-size from nextgen)
loop-restore: to hold in-loop restoration filter (ex. loop-postfilter
from nextgen and other Wiener restoration filters)
Jingning Han [Wed, 13 Jan 2016 17:03:15 +0000 (09:03 -0800)]
Handle single ref mv pair in the candidate list for compound mode
This commit considers the case where a single reference motion
vector pair is found in the candidate list. It treats this pair
as the effective motion vector for nearestmv mode. This improves
the coding performance by 0.06% for stdhd sets.
Different quality levels are used for different regions in
the frame depending on how far they are vertically from the
center. Specifically, three segments are used based on the
mi_row index with respect number to the number of mi_rows in
the frame.
Yaowu Xu [Tue, 12 Jan 2016 17:47:07 +0000 (09:47 -0800)]
Fix encoder crashes and enc/dec mismatches
This commit adds the logic for segmentation map initialization and
disable temporal update of segmentation map when error-resilient
mode is on. It fixes the enc/dec mistmates (release build) and
assertions(debug) when both aq-mode and error-resilient are on.
Jingning Han [Tue, 12 Jan 2016 23:06:59 +0000 (15:06 -0800)]
Generate compound reference motion vector
This commit allows the codec to add motion vector pairs into
the candidate list. It further improves the compression performance
by 0.1% across derf, hevcmr, stdhd, and hevchr sets without adding
encode/decode time.
Alex Converse [Tue, 12 Jan 2016 00:16:19 +0000 (16:16 -0800)]
Compress the final ANS state.
The '110' prefix on a final byte indicates a superframe marker. Coded
data is not allowed to use this pattern on a final byte.
Code |state - l_base| little endian with the following prefix scheme:
Prefix '00': Single byte coded state.
Prefix '01': Two bytes le coded state.
Prefix '10': Three bytes le coded state.
Scott LaVarnway [Tue, 12 Jan 2016 13:09:06 +0000 (05:09 -0800)]
VP9: Eliminate unnecessary nearest/near searches
Prior to this patch, read_inter_block_mode_info() would
find the nearmv and nearestmv for all modes. Now it does not
search for ZEROMV modes and breaks out early for NEARMV and
NEWMV modes.
Jingning Han [Sat, 12 Dec 2015 06:39:40 +0000 (22:39 -0800)]
Refactor ref mv stack system
This commit re-works the reference motion vector stack process
and make it support extended context set. It unifies reference
motion vector checking process for row and column scan, as well as
for single block scan.
Yunqing Wang [Thu, 7 Jan 2016 02:27:37 +0000 (18:27 -0800)]
Amend and improve VP8 multithreading implementation
There are flaws in current implementation of VP8 multithreading encoder
and decoder as reported in the following issue:
https://code.google.com/p/chromium/issues/detail?id=158922
Although the data race warnings are harmless, and wouldn't cause real
problems while encoding and decoding videos, it is better to fix the
warnings so that VP8 code could pass the TSan test.
To synchronize the thread-shared data access and maintain the speed
(i.e. decoding speed), use multiple mutexes based on mb_rows to reduce
the number of synchronizations needed, make the reads and writes of
the shared data protected, and reduce the number of mb_col writes by
nsync times.
The decoder speed tests showed < 3% speed loss while using 2 ~ 4
threads.