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

21244 Коммитов

Автор SHA1 Сообщение Дата
Yushin Cho 1c602b381d Fix to use correct tx w/h sizes with daala-dist
In function av1_xform_quant().

For subset1, high delay mode:
   PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
-0.0565 | -0.0975 |  0.0317 |  -0.0937 | -0.0930 | -0.1261 |    -0.0994

Change-Id: I638c2a4c2ad359709069c1587b677a813fb589c2
2017-06-13 20:46:47 +00:00
Lester Lu 46fd1a05d2 Add experimental flag for line graph transforms
Change-Id: Iba98b07d2f19fd98be07d0c2c80c855661df778d
2017-06-13 11:59:01 -07:00
Fergus Simpson 9cd57cf878 Make loop-restoration compatible w/ frame_superres
There were several places where loop_restoration used the encoded width
and height while superres was active. This patch changes it to use the
upscaled width and height, since loop_restoration is supposed to occur
after superres has done its upscaling.

Change-Id: I2b9bbb06b5370618758bf81d8eb63f2eef26af80
2017-06-13 17:36:09 +00:00
David Barker 26762357b9 Replace '#ifdef CONFIG_...' with '#if CONFIG_...'
This affects two places:
* Fixes a compile error with frame-superres when
  highbitdepth is disabled.
* Avoids including some supertx-related code when supertx
  is disabled

BUG=aomedia:602

Change-Id: Idfc478fd88ade91d48c93cfd8abdd2bea86de898
2017-06-13 16:53:53 +00:00
David Barker 846f10862a Remove unused 'inter_mode_probs/cdf'
Change-Id: I4ac551f52f9a5f589d58b643a9849ec17e3c11e8
2017-06-13 15:49:06 +00:00
Sebastien Alaiwan 57c1b8c967 Remove dead member
Change-Id: I58644fe61a1893d96958722d6044486f924ef2e9
2017-06-13 15:45:44 +00:00
Tom Finegan 9e57db29e1 Add README.md.
And mark README as deprecated.

Change-Id: I9b353f70de9261a1877e520928df30b42226c02f
2017-06-13 15:14:39 +00:00
Yushin Cho 09b01a243f Fix a bug in daala-dist
Fix the bug that height of a partition is used as a stride mistakenly.
This fixes the regression caused by sub8x8 tx size rd search
for a partition >= 8x8.

Change-Id: I6114814dcec70fd5198f681c0a861bc9849286fd
2017-06-13 15:12:26 +00:00
Thomas Davies be44e512ea AOM_QM: Fix bug with applying QMs to 1D and identity transforms.
Only apply quantisation matrices when the transform is 2D.

Change-Id: Iae9ac910c11199f7944a80d10d334db3b711059d
2017-06-13 10:32:04 +01:00
Zoe Liu 85b66463a2 Add encoder/decoder pipeline to support single ref comp modes
Now the single ref comp mode should work with WEDGE and
COMPOUND_SEGMENT. For motion_var, the OBMC_CAUSAL mode uses the 2nd
predictor if the neighboring block is single ref comp mode predicted.

This patch removes the mode of SR_NEAREST_NEWMV and leaves four
single ref comp modes in total:

SR_NEAREST_NEARMV
SR_NEAR_NEWMV
SR_ZERO_NEWMV
SR_NEW_NEWMV

Change-Id: If6140455771f0f1a3b947766eccf82f23cc6b67a
2017-06-13 04:18:25 +00:00
Yushin Cho c0f6bf257e Another fix of daala-dist for cb4x4
Daala-dist replaces the luma distortion of sub8x8 partitions with
its own distortion thus requires to split the luma distortion only.
Doing so, there has been a bug that INT_MAX64 value comes
when the sub8x8 parition is skipped. This happened because the existing
code does not initialize the rd_stats_y or tmp_rd_stats_y, i.e. rd_stat struct
for luma only in several places.

Change-Id: If229b53bb7a6cff0b8751138a32b1dcf02665624
2017-06-13 03:31:45 +00:00
Fergus Simpson abd4343afd frame_superres: Fix bad assert
Commit 12311 had a misplaced assert set that was causing superres debug
runs to fail. The asserts just needed to be moved to where they were
relevant to fix the issue.

Change-Id: Ic370686c7156fcaf9380d8d8fd9d35b892d77e46
2017-06-12 23:54:56 +00:00
Yue Chen 536e5520a4 Add a new experimental flag SBL_SYMBOL
A new experiment SBL_SYMBOL, meaning superblock-level symbols, will
be explored. It allows some symbols being coded at superblock level
(64x64) by checking whether a symbol(e.g. motion_mode, tx depth,
and interpolation filter) is identical across macroblocks in a
superblock.

Change-Id: I38408325c9b7a4b94c11c400a5060036ce36405e
2017-06-12 23:01:24 +00:00
Sarah Parker 30dfa88331 Clean up hbd transform code
Responding to some left over cosmetic comments from
2b5cdb1cf87c933331a16cc0221455d0a8c255e1

Change-Id: I42e126593526cedd6675adf35b9c1df78e1ddf54
2017-06-12 21:56:22 +00:00
Yushin Cho c9751c599a Fix a compile warning with global-motion off
Change-Id: I8379e4055e9c2737f1ad310095d7a318e6e74b2f
2017-06-12 21:39:56 +00:00
Yushin Cho 60baa35995 Fix a compile warning with dual-filter off
Change-Id: I68bb6ea8e26efe44bbbfb0f1a956620578578d55
2017-06-12 21:39:50 +00:00
Fergus Simpson d2bcbb5604 frame_superres: Post encode/decode upscaling
This patch implements the post-encode and post-decode upscaling for the
frame superresolution experiment to work.

Upscaling happens after cdef and before loop restoration.

For now, this patch forces on random-superres.

The patch also cleans up some broken rate control hooks from VP9
days, to be brought back later when the resize and superres tools
are stable.

Change-Id: If0a8f69224dfaa0f4ae7703bd429ea2af953c7a6
2017-06-12 12:32:43 -07:00
Yue Chen 8e689e4b3d supertx: code refactoring + resolve conflicts with baseline
Refactoring: split prediction+extension for each plane, so we can
handle luma/chroma supertx pred in different ways.
Compatibility fix: fix conflicts with cb4x4 and chroma_sub8x8, now
for chroma sub8x8 supertx, only the top-left(basic cb4x4) or the
the bottom-right(cb4x4 + chroma_sub8x8) predictor will be used
without any blending within a 8x8 unit.

Change-Id: I6cf7b12768a82d3c7e01811ada02de84af9bd8ac
2017-06-12 17:12:00 +00:00
David Barker 67e15578be Fix bug in loop-restoration unit tests
The values 'offset_r' and 'offset_c', representing a random
offset into a large pre-generated block, were calculated the
wrong way around. This could cause problems when testing
rectangular convolutions.

Change-Id: Ide830f275c83492abe83b61216da0fbce669fb7e
2017-06-12 17:08:27 +00:00
Zoe Liu b2c62bc7b6 Remove the extra cost threshold modes
Change-Id: Id55bb8421edc0ccdf87db46f7b9b36b0a93a4efa
2017-06-12 16:39:17 +00:00
Zoe Liu 7b1ec7a918 Add encoder/decoder support for var-refs
Check the availability of the reference frames at the frame level at
both encoder and decoder, and if a reference frame is not available
for a specific video frame, remove the signaling of such reference
frame info at the block level.

This patch adds the consideration of the bit saving inside the RD
optimization loop.

Change-Id: I4c22f1b843b21c7d2b47e118c99c3ad615a3d4e4
2017-06-12 12:45:33 +00:00
Steinar Midtskogen b1555c937b Speed up CDEF parameter selection for cpu-used > 0
High delay cpu-used=4
   PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
 0.0579 |  0.1380 | -0.1975 |   0.0361 |  0.0226 |  0.0072 |     0.0470

Low delay cpu-used=4
   PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
-0.1016 | -0.0695 |  0.1013 |  -0.1324 | -0.0903 | -0.1260 |    -0.1710

Change-Id: I5a66a1ffc2d1fb2a203065b7fbb2fd2bd2b281ad
2017-06-12 07:19:40 +00:00
Jingning Han 6ae7b3d9fb Fix high bit-depth quantization process
Scale the rounding factor according to the scaling factor applied
to the quantization step size. This resolves a compression
performance regression in 32x32 and above transform size.

BUG=aomedia:599

Change-Id: Id3fc9a46c4a8843ff5d77ccaa59ee3112b12d7f4
2017-06-12 05:35:59 +00:00
Jingning Han 32d26bc0af Avoid right shift negative numbers
This avoids the rounding errors due to the right shift of the
negative numbers that cause the reconstruction coefficient has
higher distortion than the source coefficient.

BUG=aomedia:599

Change-Id: I11ed86bf1d41164dda4398545334a7b4e8e10513
2017-06-11 07:50:39 -07:00
Debargha Mukherjee 3599435aed Fix compile error with global and warped disabled
Change-Id: Iab2f7ca3c66f8f62b66100e61ff0f6e7376670ae
2017-06-11 05:59:11 +00:00
Jingning Han 105eecf4c6 Resolve compiler warning when highbd is off
The highbd_clip_pixel_add() function is generalized to be used in
the regular 8 bit path. Move its defintions outside the highbd
experimental flag.

This resolves the comiler warning in unit tests when high bit-depth
is turned off.

Change-Id: I90a744adb2381c9bf8476aa2a2bd0c87d9afdf57
2017-06-11 05:22:58 +00:00
Timothy B. Terriberry ab14111536 var_tx: Fix distortion calc. in av1_tx_block_rd_b
This was hard-coding the assumption that the block size for the
smallest TX size was also the smallest block size. This is no
longer true since fe67ed6af2 landed.

As a result, for TX blocks that overlapped the frame edge, it was
only measuring distortion on the upper-left 2x2 part of each 4x4
sub-block, causing the encoder to prefer larger transforms which
cause such overlap and avoid transforms which do not, causing a
regression.

This patch uses the appropriate conversion table, which fixes the
regression.

BUG=aomedia:593

Change-Id: Id253cf0f3a5252378e3f340b8350120639ff5c88
2017-06-10 12:45:57 -07:00
Yue Chen 1ce569d70e Fix compile error of convolve_round and compound_round
BUG=aomedia:597
Change-Id: I6ff109fac8351a98a672259532520e062c1e6497
2017-06-09 16:23:06 -07:00
David Barker dab3e99b27 Fix Windows x86 build with --enable-ext-inter
The Windows calling convention pushes any __m128i type arguments
after the 3rd (4th on x86-64) onto the stack. But on x86,
stack-allocated arguments are not guaranteed to be aligned to
a multiple of their natural alignment, leading to compile errors.

We fix this by making the functions which take >3 __m128i arguments
instead take pointers. Since the functions are marked INLINE, the
extra memory operations should optimize out.

BUG=aomedia:587

Change-Id: I0cb2831fd12aded6f2821c037365386e6183ba5c
2017-06-09 18:31:47 +00:00
David Barker 8295c7c713 Vectorize av1_convolve_2d()
Includes a test case based on the warp filter tests

Change-Id: I9abea53a088f68bb8a928ebd7cb96b3266a63c13
2017-06-09 18:20:14 +00:00
Jonathan Matthews 284f9d0643 Avoid integer overflow in inv_txfm2d_add_facade()
Bug introduced in change: I34cdeaed2461ed7942364147cef10d7d21e3779c

BUG=aomedia:591

Change-Id: I49b9edd2bf5a482b5afea5d83d56e04a0086f797
2017-06-09 18:19:53 +00:00
David Barker 726a953c08 Unify high-precision convolve filters: convolve-round
* Reduce bit widths of intermediate values where possible
* Change ROUND_POWER_OF_TWO_SIGNED to ROUND_POWER_OF_TWO
  in av1(_highbd)_convolve_2d
* Apply offsetting and bounds checking, to match the intended
  hardware implementation
* Separate the implementations of av1(_highbd)_convolve_2d
  into compound-round and non-compound-round cases. This is because
  there are now a significant number of differences between the
  functions.

Overall, this is expected to affect the bitstream and encoder output
when convolve-round alone is enabled, but *not* when compound-round
is enabled.

Change-Id: I8c21e0645fd11f64c59552885f87f4a5dd40ccf7
2017-06-09 18:19:04 +00:00
David Barker e64d51a962 Add 'do_average' to ConvolveParams structure
The 'ref' member of ConvolveParams currently serves two purposes:
* To indicate which component of a compound we're currently predicting,
  eg. for fetching interpolation filters with dual-filter enabled.
* To determine whether we should average into the destination buffer.

But there are two cases where we want to separate these out:
* In joint_motion_search, we want to try combining a fixed second
  prediction with various first predictions.
* When searching masked interinter compounds, we want to predict
  each component separately then try different combinations.

In these cases, we set 'ref' to 0 and use temporary variables to
make sure we use the correct interpolation filters. But this is
quite fragile.

This patch separates out the two uses into separate members.
This allows us to remove some temporary variables, but more
importantly gives easy fixes to two bugs in
build_inter_predictors_single_buf (used by rdopt):

* We previously set ref=0 but didn't fix up the interpolation filters
* For ZERO_ZEROMV modes, the second component would accidentally
  average into the (uninitialized!) second prediction buffer

BUG=aomedia:577
BUG=aomedia:584
BUG=aomedia:595

Change-Id: Ibc31d1ac701a029ea5efaa1197dd402bc4b7af1e
2017-06-09 18:01:53 +00:00
Urvang Joshi 09302f5a7d Enable greedy version of av1_optimize_b().
This has been found to be better than the original version in both ways:
(1) Better compression: lowres -0.229, midres -0.147
(2) Faster too in my quick test over 5 different clips with 30
frames: 2.7% to 10.5% faster.

Change-Id: I4d46e0915d6e4b8e7bfc03d0c8b88cbe3351ca20
2017-06-09 16:58:42 +00:00
Thomas Davies 92aa22a8a3 AOM_QM: Use 8-bit matrices and fix 2x2 transform sizes.
2x2 transforms are now hidden behind the CHROMA_2X2 macro,
not the CB4X4 macro.

Change-Id: I5d73c679fba486ccda98fa8dbb804a3902df6c8d
2017-06-09 16:43:52 +00:00
Tom Finegan 747cf98548 Fix example test incompatibilites with CMake build.
Minor updates in test/tools_common.sh to enable use of
test/examples.sh with CMake make builds while continuing
to support configure builds.

BUG=aomedia:76,aomedia:589

Change-Id: I841aef3b61a0c9baa8ad7356fc5b51ffb0902907
2017-06-09 16:40:50 +00:00
Sebastien Alaiwan fadc7cbc23 Avoid #if inside macro arguments
Visual Studio doesn't support it.

Change-Id: Ie7bd21e6d9a8a30b7b89e9fca6b82dd2aa406a89
2017-06-08 23:08:05 +00:00
Alex Converse cc54efdde8 intrabc: Use max mesh range (256) at speed zero
BD-RATE PSNR twitch-1 1st KF: -0.1334
BD-RATE PSNR wikipedia 1st KF: -8.8791

Change-Id: I882af1d317ebdd3017c23fb884fc624282a2a55f
2017-06-08 22:36:32 +00:00
Sebastien Alaiwan 0b2e403997 Remove --test-16bit-internal option
This option is obsolete and confusing now that the LBD coding path
can be disabled at build time (--disable-lowbitdepth).
Removing it makes the encoder/decoder behaviours symmetric, and
prevents the "--test-16bit-internal --test-decode=fatal" mismatch.

BUG=aomedia:528

Change-Id: Ia2d9857629b789b11d37fc75433b2cecc27d6642
2017-06-08 22:27:34 +00:00
Angie Chiang fb42c7fa94 Copy ctx in get_entropy_contexts_plane for lv_map
This will fix Assertion in get_txb_ctx() for invalid sign value

After fixing this bug, we have around 0.2% gain on lowres.

With cb4x4 on only, lv_map provides 1.538% gain on lowres.

With cb4x4 + chroma_sub8x8, lv_map provides 1.468% gain on lowres.

Change-Id: I06f996ec5af0d5e79e377a3dc8c012862fc4b9c7
2017-06-08 19:28:07 +00:00
Yushin Cho 30a2c5f245 Refactor sub8x8 tx size RD for daala-dist
For a tx size RD search with partition size >= 8x8 and tx size < 8x8,
daala-dist function is applied to the whole partition after all tx blocks are encoded
instead of each 8x8 sub block of the partition.

Change-Id: I27d9e2960aa641f550096e32ebcdf8dfb4de79a6
2017-06-08 17:03:37 +00:00
Sebastien Alaiwan 2751192a2b In verbose mode, display the coding path in use
Change-Id: Id926529b11f859aebed43fdcfcdedba9ce26b1a7
2017-06-08 16:57:55 +00:00
Frederic Barbier d405f8a627 Cleanup dead fwd transform functions
Cleanup related wrappers and unit-tests.

Change-Id: I2d37a8c80de63dbeaef584e3d5fa842c0b2ee6db
2017-06-08 16:56:59 +00:00
Sebastien Alaiwan 8e3da0973f Revert "Enable one_sided_compound by default"
This reverts commit bf3813a166.

Reason for revert: feature not ready.
Incompatible with lossless under some circumstances,
causes the following assertion failure:
Assertion `(!is_compound) == (cm->reference_mode == SINGLE_REFERENCE)' failed

BUG=aomedia:575

Change-Id: I63a2b38ce3b7cb50108ac559cca0768b4579c9ae
2017-06-08 14:38:32 +00:00
Nathan E. Egge 50484232e8 Remove unused av1_inter_mode_tree ind/inv arrays.
Change-Id: If00a0bdf239b2c9e355cffd2e472708acb189f16
2017-06-08 08:57:02 +00:00
Sarah Parker 31c66502fa Remove deprecated high-bitdepth functions
This unifies the codepath for high-bitdepth transforms and deletes
all calls to the old deprecated versions. This required reworking
the way 1d configurations are combined in order to support rectangular
transforms.

There is one remaining codepath that calls the deprecated 4x4 hbd
transform from encoder/encodemb.c. I need to take a closer look
at what is happening there and will leave that for a followup
since this change has already gotten so large.

lowres 10 bit: -0.035%
lowres 12 bit: 0.021%

BUG=aomedia:524

Change-Id: I34cdeaed2461ed7942364147cef10d7d21e3779c
2017-06-08 01:26:44 +00:00
Angie Chiang ee4a34c2f5 Fix conflict between lv_map and cb4x4
Change-Id: I0512000554ef74d397332e5ed135fe20e2c4a37e
2017-06-08 00:35:16 +00:00
Yi Luo d61e608d7a Add HBD data path for av1_block_error_avx2
- Add unit test for av1_block_error.
- Fix av1_dist_block logic for calling av1_block_error.

Change-Id: Id8a47ee113417360a29fc2334d9ca72b5793e2d7
2017-06-07 23:46:30 +00:00
Sebastien Alaiwan b91155a9c1 Deduplicate code between HBD and LBD
Change-Id: I2e83419aecf6464fa76f091015597207a12bd478
2017-06-07 19:59:30 +00:00
Alex Converse f71808c7fa intrabc: Elide tx size for intrabc skip
Saves some bits here and there, no effect on reconstruction.
-0.13 BD-RATE PSNR on wikipedia_420

Change-Id: Idfa137fe61b828fd99eaecda84afa2eaaf893d71
2017-06-07 18:32:59 +00:00