Граф коммитов

179 Коммитов

Автор SHA1 Сообщение Дата
Debargha Mukherjee 11f0e40d74 A few fixes for global motion
Handles a rare divisin by 0 case.
Also adds a check on global motion parameters to disable
if the parameters obtained are outside the range that the
shear supports. This fixes a rare assert failure.
Also changes the recode loop threshold somewhat.

Change-Id: I4c6e74b914ac653cd9caa0563d78b0a19a2a8627
2017-03-30 16:50:58 +00:00
Debargha Mukherjee 265db6d0a1 Improves/refactors rd costing for global motion
Improves and simplifies costing for global motion to use the
actual bits used to communicate the global motion parameters.
Removes some of the old hacks.
This patch also includes necessary refactoring to incorporate
reference based coding of the motion parameters to follow.

lowres results: -1.489% (up from -1.333%)

Change-Id: I994dc97046011de4261633ccb0c9d71e374f2c5a
2017-03-29 05:40:21 +00:00
Yaowu Xu 481af67044 fix calls to av1_tx_block_rd_b()
Fix the calls to be compatible with the new interface introduced in a
previous commit#77368af.

Change-Id: I6944c189d2d53978250df9dee460a2ba9b8ccc83
2017-03-28 17:48:00 +00:00
Angie Chiang 74e2307bdc Use txb_entropy_ctx to store entropy ctx of lv_map
1) Add txb_entropy_ctx into MACROBLOCK_PLANE and PICK_MODE_CONTEXT

2) Add av1_get_txb_entropy_context() to compute the entropy context

3) Compute and sore the entropy context before av1_xform_quant()
return

Change-Id: Ia2170523af3163b9456f7c6a305c1e77ad2b23be
2017-03-27 14:30:58 -07:00
emilkeyder@google.com f3477635d3 Compute multiple global motions and pick best by error adv.
Modify ransac to keep the N best global motions by num_inliers and
variance rather than a single one. Compute the error advantage for
each in encode_frame_internal(), and use the best as the global motion
for that pair of <target, reference> frames.

Improvements for different values of N:

N                     %PSNR gain on lowres
1 (current impl)      1.287
2                     1.328
4                     1.370
8                     1.419
16                    1.427
32                    1.439

Change-Id: Ic0c9066a3f175a5ea0a78828cd244104e70144ba
2017-03-25 23:25:13 +00:00
David Barker 9620bcd565 Re-enable av1_nmv_ctx() when ext-inter is enabled
Currently, mbmi->ref_mv_idx can be set to a nonzero value
on the encoder side if mbmi->mode is one of NEARMV, NEWMV,
NEAR_NEARMV, or NEW_NEWMV. But it can only be nonzero on the
decoder side if the mode is NEARMV or NEWMV. Hence av1_nmv_ctx
has previously been disabled when ext-inter is enabled, to
prevent a mismatch due to this.

This patch changes the encoder behaviour to match the decoder
behaviour.

Change-Id: Icfe41fb72e76731ae373fe8c6065f5e003f6414f
2017-03-23 23:41:37 +00:00
Arild Fuldseth (arilfuld) 54de7d60d6 Disallow cm->delta_q_present_flag=1 when cm->base_qindex=0.
Delta quant doesn't make sense if the intent is to encode
the frame in lossless mode.

BUG=aomedia:393

Change-Id: Ic26e30267dd3a061d7ee5e980b6950366f06b32f
2017-03-22 07:25:18 +00:00
Thomas Daede 6ff6af6194 Add PVQ high bit depth support.
Change-Id: I4d43d33725a5a0e6fdfa1168d1397cb122366b19
2017-03-22 04:42:42 +00:00
Angie Chiang 1dca126ca7 Turn off token related check for lv_map experiment
lv_map is not using token list anymore

Change-Id: Ief4f743975815c889d83703cc42b019fce517a69
2017-03-20 18:16:51 +00:00
Sarah Parker 19234cc2b3 Macro to disable warped/obmc_causal with global motion
Enabling SEPARATE_GLOBAL_MOTION will remove the ability for
a block that uses zeromv with global motion to pick warped_causal
or obmc_causal as the motion mode. When this is enabled there is:

0.05% drop on lowres for global + warped enabled
0.15% drop on midres for global + warped enabled

0.12% drop on lowres with global + motion var enabled
0.07% drop on midres with global + motion var enabled
No performance change for global, warped, or motion var individually.

Change-Id: Idbfb8dd7a93da14902438504b06a08e5212e48cb
2017-03-17 23:24:39 +00:00
Debargha Mukherjee 428bbb2b11 Fix config flags among var-tx/ext-tx/rect-tx
BUG=aomedia:396

Change-Id: I1b7f6dddb06eac9e341518a95a0d71465e613e9e
2017-03-17 21:26:12 +00:00
Angie Chiang 0397eda0d1 Draft of av1_update_txb_context
This draft version only pass compiling check, it's not working yet.

The following goal is to use new coding system when doing bitstream
packing but keep old coding system in RD loop.

Change-Id: I224a1581d1cc5c67d73e71558fb77d9faf9c2470
2017-03-16 16:15:15 -07:00
Fergus Simpson f80a05812b hbd: remove unused variable "use_hbd"
The variable "use_hbd" was defined but not used in four places in the
codebase. The warning that it wasn't used was missed by Jenkins
because it only tries one experimental flag at a time, but these
definitions were inside nested experimental flag conditions. Both
CONFIG_WARPED_MOTION and CONFIG_AOM_HIGHBITDEPTH had to be set for the
variables to be defined.

This patch deletes the unused definitions to remove the unused variable
warnings when the AV1 encoder and/or decoder are built with warped
motion and high bitdepth configured.

Change-Id: I9e80523db05a7a19cebe3ec8085a4a1e4b198c52
2017-03-08 22:50:36 +00:00
Fangwen Fu b3be926a86 Remove palette interleave
* Run 45 degree wavefront coding for palette index
with palette_throughput experiment.
* Remove palette index interleave.

Change-Id: Ibb57004401f817dec8b00bc2a941d70a26783ff9
2017-03-08 21:13:20 +00:00
Fangwen Fu 73126c08c7 dependent tiles togeter with tile groups
Change-Id: I378eb5b2c03a4c30d261128bcf9ef00ea987ed40
2017-03-07 20:08:28 +00:00
hui su 0d103578b8 Fork the entropy experiment
Split it into two experiments:
q_adapt_probs: multiple initial coeff prob tables based on q-index
subframe_prob_update: multiple backward prob updates within frame

Change-Id: I78041ebd4ba34afc9152f6861225f63c2e8eb686
2017-03-07 01:29:20 +00:00
Jingning Han 4470af1913 Properly force the transform size in aq-mode
Make the transform size conform to the segment and frame level
constraints. This fixes encoder and decoder mismatch issue in
aq-mode 1 and 2.

BUG=aomedia:131

Change-Id: I0784aa12aa49541085ce17ca82e77dcff151fd24
2017-03-07 00:42:58 +00:00
Jingning Han 5d2ed97a33 Skip tx_size count in lossless mode
Resolve an enc/dec mismatch issue when segmentation is in use.

BUG=aomedia:131

Change-Id: Id93dfc1b0d99a1cccc8c8408f9fb0dfcf83f0a7c
2017-03-06 21:04:07 +00:00
Jingning Han c41a549a01 Disable compound mode in sub8x8 coding blocks
Disable the support of compound prediction modes for sub8x8 codking
blocks. Make the rate-distortion optimizations process account for
such constraints.

With the use 2x2 chroma prediction block, this makes the wrost case
number of inter predictors same as vp9. It affects the coding
gains by 0.35% for lowres, 0.17% for midres, and 0.08% for hdres.

The encoding speed is up by 10%.

Change-Id: Ieb2a83030676911baa403e586f1f800cbf485d81
2017-02-28 07:04:12 +00:00
Yaowu Xu 7640f5f396 Remove const from int ext_tx_set
The variable was later assigned value in the function.

Change-Id: I93f283a134499a050b46d9dcd6f0c0b4e8d54049
2017-02-27 18:39:32 +00:00
Fangwen Fu 33bcd117ec improving palette throughput
* code the palette color index using 45 wavefront
* interleave the coeff and palette color index in
  transform block level
* the above change does not change code efficiency

Details: 
The 45 wavefront scan allows to compute the ctx of
the diagonal samples' indices  at the same time. 
Interleaving palette indices and palette residual
on a transform block basis means that the entropy
 decoding and further processing of the palette 
residual is not delayed by the entropy decoding 
of all the color indices of the palette encoded 
block.
Change-Id: Ie9f576002a9a68394b99c23b01e9730df06df070
2017-02-24 18:23:58 +00:00
David Barker 45390c18ee Change gm_get_motion_vector
Since gm_get_motion_vector is trying to give a motion vector for
"the frame as a whole", it makes more sense for it to calculate
the motion of the *center* of the block rather than the top-left
corner of the frame.

In theory, this change should also help the encoder make better
decisions on when to use global motion. It avoids an issue
where, early in the frame, NEARESTMV looks like a good way to use
the global motion vector *without* paying the rate cost applied
to the first few global motion blocks in each frame. This seems
to lead to a better overall result.

Change-Id: Ia5c6259ceb8b4ff3d00a5d553e1d18bdb802da59
2017-02-23 17:52:07 +00:00
Jingning Han 36fe3200c6 Skip non-reference position chroma uv intra mode coding
Skip coding the intra mode for chroma component for sub8x8 blocks
that are not in the reference position.

Change-Id: Ic3daab2668ab41c3b743664faf195e34124ead33
2017-02-22 19:24:59 +00:00
Jingning Han 8efdbc8bce Skip 2x2 uv block in the rd search loop
Skip the 2x2 uv block rate-distortion optimization process in the
non-reference positions in key frame encoding.

Change-Id: I51112492fd79f9a1c205fba151f8658cea9ee85f
2017-02-22 19:24:59 +00:00
Angie Chiang db4e499881 Remove av1_is_interp_needed from update_state##
The full-pixel checking is conducted in update_filter_type_count
Change-Id: I583ec4b1f3ac29d124098819aee257a8f1007ed4
2017-02-22 01:22:34 +00:00
Yushin Cho b39378e7da Fix the bug that prevents both pvq and ec_adapt work together
Change-Id: Ie7edfbcdd7f5f2cc3aa3aa6c2575d081616da6b6
2017-02-22 00:24:02 +00:00
Sarah Parker e68a3e4f48 Add default reduced set for ext-tx
Here we create a default set for the ext-tx experiment which
includes:

Intra: {DCT, ADST} X {DCT, ADST} + IDTX (identity in both directions)
Inter: DCT_DCT + IDTX

This set is used if indicated in the uncompressed header.

Change-Id: Ic907ada12b4e0c98cabb7c9650ab99942d0c0859
2017-02-22 00:18:07 +00:00
Jingning Han 18c53c818b Re-schedule sub8x8 chroma component encoding process
Use the top-left 4x4 luma block's coding information for chroma
component encoding at size 4x4.

Change-Id: I4bcfbc2bf8b71f7fc30094553503468460a56f9b
2017-02-18 22:14:37 +00:00
Yaowu Xu 7a08fe59d0 unify the way to count tx_size in encode&decode
This fixes a enc/dec mismatch.
BUG=aomedia:354

Change-Id: I727c27a412c21695eb3c084f8dd688163615efe3
2017-02-16 17:40:49 +00:00
clang-format 55ce9e0f35 apply clang-format
Change-Id: Ib1b5dde5d4c6479c968cd7d7a4a1d01abae1fcf6
2017-02-15 22:27:12 -08:00
Jingning Han cb51228307 Separate intra tx_size logic between var-tx and rect-tx
Skip rectangular transform block size coding for intra coded block
in var-tx mode, when the rect-tx is disabled.

Change-Id: If3a091d25f19bf4a67485b5d235bb3d7d0c2cd03
2017-02-12 20:08:51 +00:00
Zoe Liu b05e5d10ce Add a new experiment of REF_ADAPT
Noticed that some ALTREF_FRAMEs could have used compound modes for its
prediction but have been labeled as SINGLE_REFERENCE mode in the frame
header. This experiment is to remove the COMPOUND_REFERENCE mode from
the frame-level reference mode choices and only leave SINGLE_REFERENCE
and REFERENCE_MODE_SELECT the two choices in the frame header.

When turning on both ext-refs and ref-adapt, compared against ext-refs
itself, a small gain is achieved. In PSNR, the bitrate saving gains are
as follows:

lowres: Avg -0.120%; BDRate -0.128%
midres: Avg -0.155%; BDRate -0.128%

Change-Id: I2cfff8a6b7eaa65ef863dbdbc4dd086d3b586f8c
2017-02-11 04:48:24 +00:00
Fangwen Fu 7b9f2b3b0d add horizontal tile dependence support
Change-Id: I1050b69045407381d4626b65a0bf6f35957a66f4
2017-02-04 00:45:16 +00:00
Yue Chen 19e7aa82bd Remove interp filter for non-translation global mv
BDRATE results:
lowres: -0.880% (up from -0.844%)

Change-Id: I017c0beddcc687148fed33c1e9963e05f1eaf6ea
2017-02-03 21:10:00 +00:00
Ryan Lei 9b02b0e6cd deblocking_across_tiles->loopfilter_across_tiles
This commit renames deblocking_across_tiles to loopfilter_across_tiles, 
to get ready for dering and clpf integration.

Change-Id: Id25b051da9b1e5cb92f35a9619662597462d9537
2017-02-03 01:25:52 +00:00
Sarah Parker c2d3871501 Make global_motion work with ext_inter
Change-Id: I2a490e144099d7692296992528192c1f11d2c06f
2017-01-31 17:59:51 +00:00
hui su 0161a93266 Cleanup for the entropy experiment
Minor performance changes
0.03% better on lowres
0.01% better on midres

Change-Id: I7a7168f3a2a4d17a03353841a416eff6edf1e241
2017-01-25 22:45:22 +00:00
Fangwen Fu 8d164de25c enable explicit temp mv prediction signaling
Change-Id: Ieb2922c3df4ef4f8514b8a6df6f9a8fc45ef3cf4
2017-01-23 14:22:45 -08:00
Yaowu Xu 6b763c9c9e Fix issues in --enable-entropy and --enable-cb4x4
Change-Id: I148d60d56599a238c60c429572a25cbddbe5191d
2017-01-23 21:50:06 +00:00
Emil Keyder 01770b3e20 Rename NONE to NONE_FRAME.
This follows the naming for the other frame types, and allows libaom
to be compiled against other libraries that also #define NONE.

Change-Id: Ic2e2814587bbc5ea67385a9af775396d29b7dde0
2017-01-23 21:12:35 +00:00
Jingning Han 3daa4fda6c Support rectangular tx size in cb4x4 mode
This commit makes ext-tx and rect-tx experiments supported in the
cb4x4 mode. It resolves an enc/dec mismatch issue when all the
transform experiments are enabled.

The coding gains are
        ext-tx + rect-tx   cb4x4    vartx     total
lowres      4.0%           2.3%      0.5%     6.9%

The encoding speed is about the same when cb4x4 and vartx are
further enabled.

BUG=aomedia:139

Change-Id: I3fdabc6d5de23ceb78ac0751a9bf7332ebc0a3ac
2017-01-21 21:04:27 +00:00
Thomas Davies f77d4ad3c7 EC_ADAPT: add per tile contexts.
This will support adapting in each tile.

(https://bugs.chromium.org/p/aomedia/issues/detail?id=71)

Change-Id: I3eced47715749a48f78c4ccf151c4d0b58f36c0d
2017-01-19 14:24:56 +00:00
Jingning Han 91f01fdf9b Support non-causal obmc in the cb4x4 mode
Make non-causal obmc option works in the cb4x4 mode.

Change-Id: If470ab61166752efc72719f9cd3e440560de1d51
2017-01-19 05:31:32 +00:00
Yue Chen eeacc4c07a Bug fix: determine tx_mode based on lossless mode of all segments
When segment feature is on, frame level cm->tx_mode can be set to
ONLY_4X4 only if all segments are lossless. Otherwise will cause
bugs when xd->lossless[i] is 0 and xd->lossless[0] is 1.
Also fix the condition of coding tx_type, which should be on when
the qindex of current segment is > 0.

BUG=aomedia:106
BUG=aomedia:104

Change-Id: Ic076083bb78b3b99a6f7d17ec82ee402c64bcc52
2017-01-19 01:16:54 +00:00
Yue Chen f27b16053e Add rd loop of NCOBMC
At the final round of encoding of each superblock, will go through
each prediction block to check if ncobmc mode is better than non-
overlapped prediction. Note that causal obmc mode is dumped here.

PSNR gain (MOTION_VAR + NCOBMC): -2.845% lowres

Change-Id: Ibe504f7f1882446a08ba426e1e9824bca73bf655
2017-01-18 22:50:47 +00:00
Urvang Joshi feb925fe84 Enable rectangular transforms for Intra also.
These are under EXT_TX + RECT_TX experiment combo.

Results
=======

Derf Set:
--------
All Intra frames: 1.8% avg improvement (and 1.78% BD-rate improvement)
Video: 0.230% avg improvement (and 0.262% BD-rate improvement)

Objective-1-fast set
--------------------
Video: 0.52 PSNR improvement

Change-Id: I1893465929858e38419f327752dc61c19b96b997
2017-01-18 19:04:40 +00:00
Alex Converse 55c6bdeb27 Add unpoison_partition_ctx experiment
At the edges of the picture only a subset of partitions are legal. Add
new contexts for these borders so they don't distort the probabilities of
the interior of the image where all partitions are legal.

Only include one context for each block size of each border direction
because so few blocks fall into these contexts to begin with.

objective-1-fast:
   PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
-0.0294 | -0.0911 | -0.2382 |  -0.0481 | -0.0441 | -0.0450 |    -0.0454

derf144: -0.135
lowres: -0.124
midres: -0.076
hdres: -0.078

Change-Id: I909b98eebb7e49273cde90154c8408febe334158
2017-01-18 01:27:55 +00:00
Angie Chiang 1733f6b77b Merge ext_interp and dual_filter
Change-Id: I0ebd6951d2b42869ae872b33f63a07db03e99c62
2017-01-07 00:50:23 +00:00
Jingning Han 581d1697e7 Rework the txfm partition context to support cb4x4 mode
This commit reworks the transform block partition context update
to support cb4x4 mode in the recursive transform block partition.
It resolves the remaining enc/dec mismatch issue when both cb4x4
and var-tx are turned on.

Change-Id: I850d121204fe4c68e81488f1d2848c570d9d08b9
2017-01-06 18:08:08 +00:00
Jingning Han 9ca05b7e3d Refactor var-tx pipeline to support cb4x4 mode
Replace hard coded 4x4 transform block step size assumption with
scalable table access.

Change-Id: Ib1cc555c2641e5634acdd91ca33217f00aeb0b89
2017-01-06 18:08:08 +00:00