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

1839 Коммитов

Автор SHA1 Сообщение Дата
Jingning Han a2495c263c Refactor tx_size use case in the RD loop
Use table access to replace the enum arithmetic computations.

Change-Id: I573c301b16f30eb9fa147b3b3ec02af5cdad7444
2016-09-02 17:50:57 +00:00
Yaowu Xu 0764955002 Merge "Change to use aom copyright notice" into nextgenv2 2016-09-02 17:41:21 +00:00
Angie Chiang 0bfe491967 Merge "Add frame info in bitstream debug tool" into nextgenv2 2016-09-02 17:05:48 +00:00
Yaowu Xu 9c01aa1b0c Change to use aom copyright notice
This minimize code differences between AOM master and nextgenv2

Change-Id: If144865bdf3ef0818e7aac11018b9e786444c550
2016-09-02 08:22:07 -07:00
Geza Lore a1ddae59eb Minor transform code cleanup
- Localize static lookup tables in the sole functions that use them.
- Remove dead high bit-depth IDST functions.
- Apply clang-format

Change-Id: Ibbd7db4259f9ea64d695b2f13f5c118aac8f1cf9
2016-09-02 09:58:09 +01:00
Debargha Mukherjee a782a3b68f Merge "Some cleanups for unnecessary macros" into nextgenv2 2016-09-02 08:37:36 +00:00
Sarah Parker e529986568 Add global motion experiment to rdopt
This patch completes the global motion experiment
implementation. It modifies the format of the motion
parameters to use the mv union to facilitate faster
copying and checks for parameters equal to 0 that occur
frequently in rdopt. The rd decisions for the global motion experiment
have also been added to rdopt.
Change-Id: Idfb9f0c6d23e538221763881099c5a2a3891f5a9
2016-09-01 19:51:11 -07:00
Yaowu Xu 9c323bc272 Port two daala_dering changes from AOMedia
03394bd Remove dead code from av1_dering_search.
337b23a Changing the weights of the first CRF filter in deringing

Change-Id: I1216c146dc3f72f24ceec3d3c65c4dd6cd73623e
2016-09-02 00:39:52 +00:00
Yaowu Xu 3b95d59a1b rename two mk files to make naming consistent
av1cx.mk -> av1_cx.mk
av1dx.mk -> av1_dx.mk

Change-Id: I698bd65b933c433066d5dfeb94cee680095508e4
2016-09-02 00:39:32 +00:00
Yaowu Xu 14292bbb10 Merge "Add explict conversion from int64_t to int" into nextgenv2 2016-09-02 00:39:19 +00:00
Jingning Han 7332ae06f7 Refactor tx_size use cases in blockd.c
Use table to replace the arithmetic computation for mapping between
transform block and pixel number.

Change-Id: Ica71af9891bb9ab8f0bab30794e1021066d57d64
2016-09-01 16:40:45 -07:00
Angie Chiang cb9a9ebd81 Add frame info in bitstream debug tool
Change-Id: Iead3edd8563d7900481eb199e8b003d2d3df075b
2016-09-01 16:24:49 -07:00
Yaowu Xu 2e3fedd7f4 Fix a number of typos and improve formatting
Change-Id: I79c1b3171823376c4f6dcc72fe829e00b7bd46b4
2016-09-01 23:15:09 +00:00
Jingning Han 5167323257 Simplify variable defs in av1_predict_intra_block
Remove redundant variable definition.

Change-Id: Ie368c9157a3d28847b8bb5f49c6901d5d84450e8
2016-09-01 23:13:49 +00:00
Jingning Han bfd8d3078e Refactor tx_size to pixel number mapping in reconintra.c
Change-Id: Ib763971bf59859ffc457690b2f084880dc42943f
2016-09-01 23:13:31 +00:00
Yaowu Xu 9702fcbb16 Add explict conversion from int64_t to int
The values after right shifts should fit into 32bit int. The commit
fixes MSVC build warning when new-quant is enabled.

Change-Id: Ic89dd86fb981a1206653943658af2b6b2925a676
2016-09-01 22:33:56 +00:00
Urvang Joshi 0d515b29b1 Merge "Add ALT_INTRA experiment." into nextgenv2 2016-09-01 21:45:32 +00:00
Jingning Han 9662fde980 Refactor tx_size step use cases in decoder
Use lookup table to replace the arithmetic computation for transform
block step.

Change-Id: Ie7cb33e75e3b90aa9e9b46f8d11fa1d03e1ebe85
2016-09-01 14:35:55 -07:00
Jingning Han c9f1073623 Add tx_size_1d_in_unit table
Change-Id: I096d3f1310116ab87eaa769cdcedf400f6d62dbb
2016-09-01 14:35:51 -07:00
Yaowu Xu a55444cbf0 Fix msvc build warnings:
1. aom_mem.c: inline->INLINE
2. rd.c: make function declaration consistent.

Change-Id: I91ce13216e6ae7a82417a290b0575e83045f5dd2
2016-09-01 19:35:41 +00:00
Urvang Joshi 340593e530 Add ALT_INTRA experiment.
When the experiment is ON, we use Paeth predictor instead of TM
predictor.

For derf set, this gives about 0.09% improvement overall, and 0.55%
improvement if all frames are forced to be intra-only.

Also, if the EXT_INTRA experiment is also on, the improvement overall
is 0.056%, and improvement if all frames are forced to be intra-only is
0.465%.

Change-Id: Id74e107ede70a8d2107fa14fcb3f44b23a437274
2016-09-01 12:03:20 -07:00
Steinar Midtskogen b87cc923ac Added generic SIMD support for CLPF.
Change-Id: Ie03f9a5b0a4c708a586532198d755a1e7509f149
2016-09-01 17:12:42 +00:00
Jingning Han 220c645ab2 Fix gcc compiler warnings in ref-mv
Change-Id: I129476e2b8294e660c64723cbc74eb055458c19c
2016-09-01 16:49:23 +00:00
Yaowu Xu f7ae12d7fd add an explicit conversion from size_t to int
Function ans_read_int() takes int as parameter, this commit uses an
explicit conversion to avoid MSVC building warning.

Change-Id: Ia405e1d5a86c0f42932fa1da29417ccbf2dd58e7
2016-09-01 08:59:46 -07:00
Yaowu Xu 958303c4c6 Replace inline with INLINE
This fixes msvc build errors.

Change-Id: I1344685e891db61ba569d818e0f2167b2978c299
2016-09-01 08:45:22 -07:00
Debargha Mukherjee 3b52b3ac27 Some cleanups for unnecessary macros
Remove some macros that are no longer necessary for experimentation.

Change-Id: I959bf441c8333607df4aa1ee18841f189ade8112
2016-09-01 00:30:32 -07:00
Jingning Han 02b3af046e Refactor tx_size to pixel number in decodeframe.c
Use the table access to retrieve pixel numbers from tx_size.

Change-Id: Ibf392dcfdf80606b6ab972d60550ed75cbe652db
2016-08-31 18:27:45 -07:00
Yaowu Xu f883b42cab Port renaming changes from AOMedia
Cherry-Picked the following commits:
0defd8f Changed "WebM" to "AOMedia" & "webm" to "aomedia"
54e6676 Replace "VPx" by "AVx"
5082a36 Change "Vpx" to "Avx"
7df44f1 Replace "Vp9" w/ "Av1"
967f722 Remove kVp9CodecId
828f30c Change "Vp8" to "AOM"
030b5ff AUTHORS regenerated
2524cae Add ref-mv experimental flag
016762b Change copyright notice to AOMedia form
81e5526 Replace vp9 w/ av1
9b94565 Add missing files
fa8ca9f Change "vp9" to "av1"
ec838b7  Convert "vp8" to "aom"
80edfa0 Change "VP9" to "AV1"
d1a11fb Change "vp8" to "aom"
7b58251 Point to WebM test data
dd1a5c8 Replace "VP8" with "AOM"
ff00fc0 Change "VPX" to "AOM"
01dee0b Change "vp10" to "av1" in source code
cebe6f0 Convert "vpx" to "aom"
17b0567 rename vp10*.mk to av1_*.mk
fe5f8a8 rename files vp10_* to av1_*

Change-Id: I6fc3d18eb11fc171e46140c836ad5339cf6c9419
2016-08-31 18:19:03 -07:00
Yaowu Xu c27fc14b02 Port folder renaming changes from AOM
Manually cherry-picked commits:
ceef058 libvpx->libaom part2
3d26d91 libvpx -> libaom
cfea7dd vp10/ -> av1/
3a8eff7 Fix a build issue for a test
bf4202e Rename vpx to aom

Change-Id: I1b0eb5a40796e3aaf41c58984b4229a439a597dc
2016-08-31 17:26:24 -07:00
Jingning Han 8876a3acba Add tx_size to pixel number map
Change-Id: I37008c93c8a5c27ab59fc03955c9989ee481ba36
2016-08-31 17:24:51 -07:00
Yunqing Wang ab2889d925 Fix a bug in high-bit-depth encoding
This patch fixed issue 47: "Segfault when encoding 10bit video".
The incorrect setting of use_highbitdepth caused a crash.

Change-Id: I5657342f57d57dd08598bb25cbe7f8fcee809bd7
2016-08-29 12:51:06 -07:00
Urvang Joshi 6796e7f134 Remove some useless casts
Change-Id: I8af087d97cadb0c2a9e37a4e4723246cdd397995
2016-08-27 01:08:08 +00:00
Urvang Joshi 764d1266a6 Move palette code from libvpx/nextgenv2 to aomedia.
Palette code originally by huisu@. Gives 11.68% BDRate improvement on
screen content set.

Last 7 small speedup patches from me, giving 10% speedup overall for
screen content set.

From aomedia/master:
Revert 57fa626 : Remove color_index_map

From libvpx/nextgenv2:
c93e5cc : Bring palette back to nextgenv2
827e1b3 : Add test for screen content coding tools in end to end test
78b0bd0 : Complete (mostly) migration of palette mode
8a128c2 : Fixes for Palette mode
4ab0091 : Palette mode: record selected transform type
cbb8be7 : Set block size upper bound for Palette mode
bb0e692 : Convert palette from double to float.
a0a23b7 : faster code: replace nested for loops by memcpy().
016a5da : Palette code: simpler and faster duplicate removal
d000020 : Palette code cleanup
6dde801 : Use built-in qsort(); create remove_dup() method.
f746c10 : Handle centroid rounding inside palette.c itself.
d68c7b6 : Palette: count Y colors only for screen content.
f1906e9 : Palette code: remove the use of same if condition twice.

Locally made sure all combinations of "--enable-ext-intra" and/or
"--enable-palette" and/or "--enable-aom-highbitdepth" build OK.

P.S. Note for future reference:
EXT_INTRA experiment has only been moved *partially* to aomedia at this
point. If and when the rest is moved to aomedia, EXT_INTRA + PALETTE
combo needs to be moved to aomedia as well.

Change-Id: I8826780014ec8a88281e56c8258b7c966121b46f
2016-08-26 14:45:53 -07:00
Yunqing Wang bae8c51005 Fix motion vector out of range bugs
2 bugs were fixed in VP9.
https://chromium-review.googlesource.com/#/c/366873/
https://chromium-review.googlesource.com/#/c/368440/
Fixed them in AV1 as well.

Change-Id: I88367f630b2d6fef1ca5369fc0f0f3fffe2bdbdd
2016-08-26 11:55:52 -07:00
Brennan Shacklett 52861adc39 Consolidate counts into update_stats
Count updates were previously in 3 different places in the codebase,
and only updated when output_enabled was true. This patch moves them
all into update_stats and does some related cleanup.

Change-Id: I004774c1ffa2f1f0038e27bd04736d1e31701031
2016-08-23 20:30:32 +00:00
Jean-Marc Valin 0883bc13ef Removing Daala-specific deringing code
No point in keeping them in sync now that all the code is reformatted

Change-Id: I8a062253ed6a5f86028cd5a2a922b3c760def6fb
2016-08-23 17:36:49 +00:00
Jean-Marc Valin 5030fa5863 Use a quantizer-based threshold rather than full search for deringing
objective-1-short results (with deringing enabled):
PSNR YCbCr:      0.08%      0.03%      0.11%
   PSNRHVS:      0.06%
      SSIM:      0.12%
    MSSSIM:      0.08%
 CIEDE2000:      0.05%

Change-Id: Ifcfc42c14c33650dcf879c4d0ddd8688d4d07da1
2016-08-23 15:02:51 +00:00
Jean-Marc Valin 3161af6810 Deringing cleanup: remove DERING_REFINEMENT (always on now)
Change-Id: Ic3a6855799be010e69aeab924b013679282ab191
2016-08-23 15:02:29 +00:00
Brennan Shacklett 57fa626795 Remove color_index_map
Dead code.

Change-Id: I13ed4007865e45e41fc79dfb63cbd01500a1d3ae
2016-08-23 01:38:19 +00:00
Nathan E. Egge b9a564a7f6 Only send segment probabilities when updated.
Cherry-pick vp10 fd96aec9: Don't send segment probability updates when
 the map isn't updated.
This patch only effects --enable-misc-fixes.

Change-Id: Ia1acfc59e4f2e5383a26c786bdd90c02ac49df9f
2016-08-22 23:54:21 +00:00
Brennan Shacklett 45592a39d3 Remove multiple coefficient buffers from PICK_MODE_CONTEXT
The swap_block_ptr functionality was removed by
0d6980d7a1 in nextgenv2.

This patch removes all the code removed in nextgenv2 and deletes
some now unnecessary left over struct members as well.

Change-Id: I1e22514c6fe5af556710254278f2f8a5805db999
2016-08-22 14:53:10 -07:00
Brennan Shacklett 180acb91b6 Remove x->zcoeff_blk
This was removed in nextgenv2 and doesn't seem to have a noticeable
effect on speed anymore.

These AWCY results show a slight rate reduction on most clips by
removing it:
https://arewecompressedyet.com/?r%5B%5D=master2016-08-19T23-38-10.258Z&r%5B%5D=nozcoeff2016-08-19T23-33-12.919Z&s=objective-1-fast

Change-Id: I8f4bba091b8807a8a0828a07a4f609ec9c569508
2016-08-22 12:57:51 -07:00
Guillaume Martres 8e67697f84 Avoid unnecessary reencode in choose_largest_tx_size
This change is similar to the one done for choose_tx_size_from_rd in
daf841b4a1

It gives a 4% speed-up on bus_cif.y4m with the following settings:
--cpu-used=4 -p 1 --end-usage=q --cq-level=40 --tile-columns=0 --tile-rows=0

Change-Id: Ic54fe4a066a2c0b5f6349d80cd13de8bb8ddcabc
2016-08-22 19:47:22 +00:00
Nathan E. Egge a5c4469dd8 Create aom_cdf_prob type for 16-bit probabilities.
Change-Id: I33899eca44300037816c9f20c965aa8311a1ef52
2016-08-22 18:56:30 +00:00
Urvang Joshi 40810138a3 Declare some array sizes to be constants (known at compile time).
This reduces some memcpys and callocs.

Change-Id: If04580af4c63892c8af8ac5b405c7d6aabe5af89
2016-08-22 10:17:37 -07:00
Urvang Joshi 49e1aaaca9 EXT_INTRA experiment: fix shadowed declarations.
Change-Id: Ie3a29e9b23ebf5d658fad2b797d34208890f4e2a
2016-08-22 17:01:32 +00:00
Brennan Shacklett 6391fd670a Remove encode_breakout and related speed features
Seems to be dead code

Change-Id: I17b3edc9e82d6a1da172a686522358a6b1a630e9
2016-08-19 17:34:11 -07:00
Alex Converse ba72ccde0e Refactor extrabits packing
- Eliminate the awkward _av1 suffix/infix in local variable names.
- Lift bitdepth selection out of the token loop.

Change-Id: I26d3397464f7808e0481a804033a93ca4f01f5d5
2016-08-19 16:56:09 +00:00
Nathan E. Egge 21f7e0dcee Fix shadowed variable declaration with misc fixes.
Change-Id: I73f61d65297009ffdba7a3c0685a06a5ae559ccb
2016-08-19 16:36:16 +00:00
Nathan E. Egge 9ac7a9dc8c Rename aom_read_tree_cdf() to aom_read_symbol().
Change-Id: Ifc065eb3eee0960be2e085e7e18478bf91bf56dd
2016-08-18 20:23:34 +00:00
Alex Converse 1abb1df1b7 clang-format clpf.c
Change-Id: I10d21c216698918dd423b1f7256d76bf8512139c
2016-08-17 11:38:58 -07:00
Urvang Joshi 953f086c33 Add complier warning -wunused and related fixes.
In particular, match use of -Wno-unused-function to that in libvpx
master branch.

Change-Id: I027a4f2a540af5a304b358ddbf293965b4211b9e
2016-08-16 17:17:47 -07:00
Yushin Cho d847070b2b Remove unused PICK_MODE_CONTEXT::is_coded.
Change-Id: Ibc73b4066dcdee45d32355144124762d26a16a28
2016-08-16 15:47:52 +00:00
Yaowu Xu de9089f5a5 Rename MI_BLOCK_SIZE and MI_MASK macros
Cherry picked from libvpx: 511da8cb

Change-Id: I4f4132235495adcd445690d8f060f607b755cacd
2016-08-16 13:42:44 +00:00
clang-format 6885324b5c apply clang-format
post DerivePointerAlignment change

Change-Id: Ibdabea5710ea364f45d70fff018d260355124817
2016-08-16 01:21:43 +00:00
Brennan Shacklett 05a62c0a0d Fix eobs buffer overflow caused by SSSE3 quantize_fp
The SSSE3 version of av1_quantize_fp stored the new value of eob
with a 32bit mov instruction, but the eob values are stored in an
array of uint16_t. This caused the last eob store to write 2 extra
bytes off the end of the eob array.

This doesn't seem to currently be a problem on master, but it
causes errors for my RDO refactoring under certain conditions.

Change-Id: I9f7e9c4e40b37b8a2c232b87d170d24593c1066c
2016-08-12 16:54:57 +00:00
Urvang Joshi de2ba4f658 Remove unused array 'last_frame_seg_map_copy'.
This array was allocated and used to save and restore segmentation map,
however the original segmentation map was never modified between the
calls to save and restore.

Change-Id: Iaf0fbfed733c097e84cf44d2aa6b8f35d2fb456b
2016-08-11 09:00:23 -07:00
Brennan Shacklett f975ac57b0 Temporary fix for 4X8 block intra prediction.
Currently the RD loop traverses 4X8 blocks in inverted N order while
the bitstream stores blocks smaller than 8x8 in Z order. This causes a
discrepancy where the RD loop reads uninitialized data while
performing intra prediction.  As a temporary fix simply disable the
use of the extended right edge for 4X8 blocks, until the bitstream can
be changed to match the logical structure of the blocks.

Change-Id: I44a9e4fc1a15cd551a7b38c3c1227bc5dac77e9a
2016-08-04 18:01:36 +00:00
Alex Converse 521653d573 Linearize extrabits writing.
The decoder is already linear so changing these tables would just create
a mismatch.

Change-Id: Ib888c0dc273e089c38298f569bb35b6e4c32dd60
2016-08-02 15:46:24 +00:00
Yue Chen 72d3ba8a4c Add weighted motion search for obmc predictor
Also port SIMD optimization of weighted sad/variance functions to
av1.
Coding gain improvement: 0.339/0.413/0.328 (lowres/midres/hdres)
Current coding gain: 2.437/2.428/2.294
Encoding time overhead: 17% (soccer_cif), 30% (ped_1080p25), was
12% and 18% without motion search

Change-Id: I101d6ce729f769853756edc8ced6f3a2b8d8f824
2016-08-01 21:39:42 +00:00
Brennan Shacklett dd8b91407f Fix misc clang-format errors
Change-Id: I84ff252eb813ce935ad6e17162f4f6fab701dcc7
2016-08-01 11:38:16 -07:00
Jingning Han bb46b3115b Prevent potential token buffer overflow in format 444
For a 16x16 pixel block, one needs to allocate 16x16 coefficient
tokens, plus up to 16 eob tokens, per plane. This commit increases
the token allocation size to cover the case where all the transform
blocks are of size 4x4 in format 444.

Change-Id: I5755e6a53771053d51163d01ec1d62e670c5009e
2016-08-01 08:39:39 -07:00
Jean-Marc Valin 2dff042a15 Don't run the deringing filter on skipped blocks within a superblock
No change in metrics

Change-Id: Ib1dbe41a9e1a564dd9a63a33e2a5315ad6bca70c
2016-07-29 18:15:32 -04:00
Jean-Marc Valin f7d75ceb70 Don't dering skipped superblocks
No change in metrics

Change-Id: I0da09270d78c3caf78a32a3157f02c87f2232e3e
2016-07-29 18:12:13 -04:00
Nathan E. Egge 1904379544 Rename aom_write_tree_cdf() to aom_write_symbol().
Change-Id: I7c088c55f1c461063976d5bd84ff2026c4f3bc69
2016-07-29 06:56:52 -04:00
Nathan E. Egge de89c69dbf Update partition_cdf per frame.
Move computing the partition_cdf tables per symbol to
 computing them only when the probabilities are updated.

Change-Id: I442f9230ba00be7f5d0558d7c38d7324ad009ee8
2016-07-28 20:52:32 +00:00
Nathan E. Egge 7384573145 Update inter_ext_tx_cdf per frame.
Move computing the inter_ext_tx_cdf tables per symbol to
 computing them only when the probabilities are updated.

Change-Id: I5e1e62f8eae8f6b2edbbd378beeb786649502c10
2016-07-28 20:51:44 +00:00
Nathan E. Egge 785e975ae2 Update intra_ext_tx_cdf per frame.
Move computing the intra_ext_tx_cdf tables per symbol to
 computing them only when the probabilities are updated.

Change-Id: I26d5e419e103093e98a7d896c196176305b50fc9
2016-07-28 20:51:22 +00:00
Jingning Han c5d255df65 Change enum names of frame context index
Change-Id: Iae2366380a8c24e4cde79b6a699b4073b4b7d488
2016-07-27 23:04:32 +00:00
hui su c0386e8674 ext-intra: squeeze the derivative table
Reduce its size from 270x2 to 90.

Change-Id: Ib6ea59344d7df4cefd2631aa73a1d5e599c212cc
2016-07-27 21:42:31 +00:00
Jingning Han 7c1c078daf Separate frame context index for different frame types
This commit makes the encoder to use different frame context index
for different frame types. In the baseline setting, it sets the
frame context index of the overlay frame to be different from other
regular inter frames. In the ext-refs setting, it further allows
the backward reference frame to use a different index.

It improves the compression performance for both settings.

Baseline
lowres  0.1%
midres  0.15%

ext-refs
lowres  0.42%
midres  0.35%

Change-Id: Ie033fcc16af20dace9a70386dc35dad6c5744f09
2016-07-27 19:33:03 +00:00
Yue Chen 2478bed556 Port SIMD optimization for obmc blending functions to av1
SIMD optimization for 1d blending functions in obmc mode, and some
code refactoring and cleanup.

(ped_1080p25.y4m, 150 frame, 2000 tb)
Encoding time overhead: +18.8% -> +18.1%
Decoding time overhead: +21.3% -> +8.7%
Change-Id: I9d856c32136e7e0e6e24ab5520ef901d7b1ee9c8
2016-07-26 20:01:00 +00:00
Urvang Joshi 863b04994b Fix warnings reported by -Wshadow: Part2: av1 directory
While we are at it:
- Rename some variables to more meaningful names
- Reuse some common consts from a header instead of redefining them.

Change-Id: I110491c071ae6f68378030493679d49fe670129a
2016-07-25 14:24:51 -07:00
Urvang Joshi 378c6187f7 Fix clang-format warning for bitstream.c
Change-Id: Ibf6985e7b140dc280a74f02084db428a2a85b990
2016-07-25 13:51:12 -07:00
Angie Chiang 8cf6f15645 Move simd optimization of 10/12 taps convolve function to AOM
By turning on ext_interp experiment
Encoder time is reduced for 26.7%
Decoder time is reduced for 15.4%

Change-Id: I14e197dd7ed3261339b0643fa4ed0947f74274fc
2016-07-22 10:36:13 -07:00
Urvang Joshi 30abc08211 Fix warnings reported by -Wshadow: Part1b: scan_order struct and variable
- Change struct name to all caps SCAN_ORDER to be locally consistent.
- Rename struct pointers to 'scan_order' instead of hard to read short
  names 'so' and 'sc'.

Change-Id: Ia131f14320c1a18aa12654cdb87bf8008878950a
2016-07-20 15:27:29 -07:00
Nathan E. Egge 0d22b52a50 Update switchable_interp_cdf once per frame.
Move from computing the switchable_interp_cdf per symbol to
 computing once per frame when the probabilities are adapted.

Change-Id: I6571126239f0327e22bb09ee8bad94114291683e
2016-07-20 13:16:48 -04:00
Nathan E. Egge 42792f3508 Move av1_indices_from_tree() to common code space.
Move the av1_indices_from_tree() function from av1/encoder/treewriter.c
 to aom_dsp/prob.c so that it can be used by both the encoder and
 the decoder.

Change-Id: Ie43c599f425c3503b1ff93f0c77b5033a05b1bb4
2016-07-20 13:12:45 -04:00
Nathan E. Egge 4531b85a25 Add code to compute in-order mappings for tokens.
Add av1_indices_from_tree() function that computes a forward and inverse
 mapping of the tree leaf-node symbols to their in-order traversal.
This is necessary because many of the aom_tree binary trees have their
 leaf nodes out of order (e.g., an in-order traversal of a tree with n
 nodes does not start at symbol 0 and go to symbol n - 1), but the CDFs
 created by tree_to_cdf() are indexed in-order.

Change-Id: Icd0dbed4c171a67c9e84a634106c4fdb5b1b3488
2016-07-19 10:24:21 -04:00
Alex Converse 362888b911 Use rANS to code constrained token set.
For now this is in its own experiment for benchmarking purposes, but it
will eventually be folded into the main ANS experiment.

Change-Id: Icdb54b6ca3c0191ba717d6d10aaaffb11e2bebea
2016-07-18 11:49:58 -07:00
Jingning Han baa6815e53 Add const qualifier in rd_pick_intra_angle_sbuv()
Change-Id: I96bd5d1fd4d9c3cf9f76fa8d2b0762a7cdc878fd
2016-07-18 10:25:28 -07:00
Jingning Han 4491a86f5a Fix format in set_offsets()
Change-Id: I371297e6ee000e6dc01ba1544763cbed429b0e5a
2016-07-18 16:11:44 +00:00
Jingning Han b92bd69049 Unify set_contexts() function for encoder and decoder
Remove the separate implementations of set_contexts() in encoder
and decoder.

Change-Id: I9f6e9b075532faae0f74f885d9443589254258a7
2016-07-18 15:41:17 +00:00
Zoe Liu cbbcd7950d Add the dumping of encoder side recon videos for debug
Change-Id: I5feee1b56159e15c5eb55b7e4e50694207b2e19c
2016-07-15 16:38:46 -07:00
Steinar Midtskogen 7560123c06 New CLPF: New kernel and RDO for strength and block size
Change-Id: I61eb08862a101df74a6b65ece459833401e81117
2016-07-15 15:28:17 +00:00
Zoe Liu 9c1e2f92e5 Add the use of new reference frames at encoder in EXT_REFS
In the experiment of EXT_REFS, add the use of the 3 extra reference
frames, including the 2 forward reference frames LAST2 and LAST3, and
the one backward reference frame BWDREF, for the encoding.

For lowres, EXT_REFS achieves following bitrate saving on overall PSNR
compared against baseline:
Avg: -4.581  BDRate: -4.358

Change-Id: Ib15b65681c39892ddfce5e4107598c0a22317ccd
2016-07-13 17:35:37 -07:00
Urvang Joshi c27fccccdf Code cleanup: mainly rd_pick_partition and methods called from there.
- Const correctness
- Refactoring
- Make variables local when possible
etc
- Remove -Wcast-qual to allow explicitly casting away const.

Change-Id: I6ecb7d345162dc08ccdd17095b0800fb3a00cf2f
2016-07-13 08:42:29 -07:00
Yushin Cho b910c0bd73 Bug fix in super_block_uvrd().
In super_block_uvrd(),if is_cost_valid == 0, all return parameters,
i.e. rate, distortion, skippable, and sse, are reset.
So, should not call txfm_rd_in_plane() if is_cost_valid == 0.
Also, the bug causes av1_xform_quant() to see invalid diff signal
since av1_subtract_plane() is not called in super_block_uvrd().

Change-Id: Iaa06061e2e9aa8876b4611a54f4ae6b8d499332b
2016-07-13 06:28:03 +00:00
Yaowu Xu 7c0f641059 Clang-foramt: av1/av1_cx_iface.c
Change-Id: Ia149f7cc1d9a8a2289bdb65040992a9b4c234c73
2016-07-12 18:33:19 -07:00
Yaowu Xu 8a8b770790 Correct data size estimation for odd size video
Given the largest transform size is 32x32, this commmit changes size
estiiation based on the size rounding up to 32 multiples to avoid
insufficient buffer allocations.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=36

Change-Id: I6eab09dc6acdc0f5a6bcadb918d62c4852aae21f
2016-07-12 12:00:16 -07:00
hui su dbcdeeb4b0 Fix bugs in av1_has_right() and av1_has_bottom()
BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=29

Change-Id: Iac2822a7c5c64de1ad7fc6ee0efb4fcca3aacbc1
2016-07-12 16:57:24 +00:00
Yaowu Xu d23559f29c Increase min size of compressed data
This commit increases the minimum size for allocated buffer for
compressed data. The old size underestimated the size needed for
small images with width or height less than 64 pixels.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=31

Change-Id: Ia12507edc2be1e737ec49c32f64fd2ebf1eab41f
2016-07-11 22:08:58 +00:00
Jingning Han daf841b4a1 Remove redundant transform size selection stage
This improves the encoding speed. For bus at CIF 1000 kbps, the
encoding time (speed 0) goes down from 248000 ms to 231000 ms,
i.e., 7% speed-up.

Change-Id: Ic59b39b7eb1b6e72fdb646e22bfeddd3eff1cb71
2016-07-11 11:28:24 -07:00
Jingning Han 5027415dd7 Avoid the use of uninitialized value in ActiveMap encoding route
This commit resets the transform size to be the maximum possible
value. It avoids out-of-boundary writing when the ActiveMap is
turned on.

Change-Id: I8302dd9a5c9fffaea3edf9ad33f72aa111999737
2016-07-11 11:28:20 -07:00
Urvang Joshi bf6c636f96 Bugfix: fix the build for CONFIG_FP_MB_STATS
Change-Id: I1898f1a90fe38c9abd7fcfa819e2d28a0da1d44b
2016-07-08 10:55:35 -07:00
Urvang Joshi 407c1d8acf Bugfix: rename a leftover CONFIG_VP9_HIGHBITDEPTH
Change-Id: I14e66bb18959a3d78d8befb9858c192901e0406b
2016-07-08 10:45:34 -07:00
Yaowu Xu 2cdb1ac464 clang-format: av1/common/thread_common.c
Change-Id: I77acd96bf3115275c433a9b0810d9037e29548a2
2016-07-08 10:13:19 -07:00
Yaowu Xu 2e109d8bea Clear segment counter at beginning
This fixes an encoder/decoder mismatch for aq-mode when configure with
--enable-misc-fixes.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=24

Change-Id: I96d77d6556930837adf8f3f21cfa4d80f2ddfd15
2016-07-08 10:04:24 -07:00
Yaowu Xu 30ed2ac204 Fix crashes when configured with --enable-misc-fixes
1. fix a missing tx_type initialization
2. Correct total size computation

BUG=aomedia:25

Change-Id: Ia5919c328ce92c1aacca6e5564ec5187ef189107
2016-07-07 14:11:30 -07:00
Ryan Lei 42ff3881ac check in the final code implementation for parallel deblocking proposal from Intel. code changes have been reviewed and approved.
Change-Id: I4a3cdb939b7b96a3aa27f6a00da7a0e73222f3f3
2016-07-06 18:02:07 -07:00
Jingning Han 8234d97a40 Use the actual inter prediction filter buffer in DRL
This avoids an encoding segmentation fault in speed 5, due to the
use of uninitialized dummy inter prediction filter buffer in the
dynamic motion vector referencing scheme.

Change-Id: Icd888d46623e8abf34267838135eed8656d552e4
2016-07-05 17:45:50 +00:00
Jingning Han 5addbe72e2 Regulate effective motion vector in DRL mode search
This resolves unit test failure at speed 2, where the compound
motion search is short-cut.

Change-Id: I0b4d8e4eca4c1e76bab54cc0c106b64425712989
2016-07-05 17:24:23 +00:00
James Zern 33901417f1 av1/convolve.[hc],av1_convolve_test: add missing copyright
Change-Id: I4f9aaff7d52dfd8654ed04e0a0709c383140c372
2016-06-30 19:28:25 -07:00
Alex Converse 31c483fb67 Remove dead function: av1_write_yuv_frame_420()
It was used by skin detection and the denoiser both of which were
removed. The similar av1_write_yuv_rec_frame() remains for your frame
dumping needs.

Change-Id: I2d4e25367c4c3381c98134408aa5d77a52e38c1d
2016-06-30 16:21:07 +00:00
Sarah Parker 215c164966 Refactor fwd txfm functions into their own file
Similar to the refactoring that was found in
commit 96baa73ed9

Change-Id: I9191299c0055fcdc46e5de85a5de387862b070da
2016-06-29 16:30:21 -07:00
Angie Chiang 80347995e9 Avoid transfer interp_filter type when there is no sub-pixel
PSNR improvement:
lowres: 0.112% on top of ext_interp experiment

Change-Id: I86e5a942c22bb0cdca6e86523f95b196ee85ca46
2016-06-27 19:04:26 -07:00
Jingning Han cf3eb03e75 Construct ref mv candidate list selectively
This commit makes the decoder to construct the reference motion
vector candidate list only for the selected reference frames. This
improves the decoder speed. For the test clip pedestrian_area at
1080p, coded at 3000 kbps, the decoding speed goes up from 58.4 fps
to 72 fps.

Change-Id: I257c521f46221936028ae01f205520d94ba7f16e
2016-06-28 00:51:27 +00:00
Yue Chen d3b596a7f7 Fix a few compiling errors in MOTION_VAR and EXT_REFS
Due to
(1) refactoring for write_compressed_header()
    https://aomedia-review.googlesource.com/#/c/1740/7
(2) refactoring for handle_inter_mode()
    https://aomedia-review.googlesource.com/#/c/1654/

Change-Id: I2dada5c2845bff23437c7e621ed1c7e633d87a04
2016-06-27 15:42:21 -07:00
Yaowu Xu fadc98020d encoder/temporal_filter.c: fix ubsan warnings
Change-Id: I30fa12202f29524984647d97ca363cb40bc68208
2016-06-27 21:45:46 +00:00
Sarah Parker 61e7c57160 Add IDTX and FLIPADST tx functions for EXT_TX
Adds ext-tx transforms to enums.h and adds implementations
for idtx and flip functions for FLIPADST. Note that 32x32 transforms
are now included for ext-tx only.

Change-Id: I8bc98ee63f35688064a64e51eb0873c2a31f8cac
2016-06-27 10:49:09 -07:00
Alex Converse 6b7ef9e9b1 Use uABS instead of duck bool in the ANS experiment.
Change-Id: I3ba5f7061f7a76a76e5c906132f33d4110a0dd87
2016-06-24 23:08:14 +00:00
Alex Converse 642f193f91 Refactor write_compressed_header in preparation for ans.
The ans writer is currently allocated in the encoder context to prevent
per frame reallocation of the reversal buffer. 

Change-Id: I22602fa0890d9aad6de389a7f5eec7121a6a1f1a
2016-06-24 23:08:07 +00:00
Zoe Liu ad70cc5717 Remove hard-coded number for EXT_REFS
In the experiment of EXT_REFS, MAX_REF_FRAMES has increased from 4
to 7, as 3 more reference frames have been added.

Change-Id: I3fec2c2078f925afe518b454e3f71afbd7379d06
2016-06-24 14:12:46 -07:00
Zoe Liu 0dbac9fcb0 Add encoder support to new references in EXT_REFS
For the experiment of EXT_REFS, add following functionalities to
support new references, in particular, to support the bi-directional
prediction:
(1) Add support to handle reference frame update; and
(2) And support to handle show_existing_frame == 1.

Change-Id: I74f88c098f1b8d07a63fcd53aa5ed51a8926d513
2016-06-24 17:34:37 +00:00
Brennan Shacklett 0a9b36b9d7 Remove unused APIs and skin_detection dead code
This removes the unused spatial scalability, temporal layers, and svc
parameters from the aom API. There is no code implementing these APIs,
and if it they are needed in the future, just resurrect them from this
commit. The skin_detection code is unused and won't be used.

Change-Id: I3185bad6ec58c55426953b658a12a06ed041d7cd
2016-06-24 09:26:00 -07:00
Brennan Shacklett 19402574a0 Fix upsampling buffer management to work with --auto-alt-ref=2
Change-Id: If1700f2fd7215a7ac487695ca3a911a9ac0469ac
2016-06-24 01:06:15 +00:00
Jingning Han be3290332f Sub8x8 block chroma component inter prediction
Handle the sub8x8 chroma component at the unit of 2x2/4x2/2x4 level
and use the motion vector inherited from the luma component. This
improves the coding performance:

lowres 0.4%
midres 0.25%
hdres  0.15%

Change-Id: I34dff4218cfa3e5d55e7ed0341f36f4719389f7e
2016-06-24 00:16:54 +00:00
Zoe Liu e9147214e5 Add decoder support for bi-direct prediction in EXT_REFS
Following supports are added in the decoder:
(1) Decoder support to show_existing_frame == 1;
(2) Decoder support to avoid the referring to non-reference frames;
(3) Decoder support to handle the case when cm->prev_frame gets retired
    in the reference buffer.

Change-Id: Ibe8590da8db26e18bcf149b9f155db71636ba890
2016-06-23 21:24:58 +00:00
hui su afb2fb54c2 ext-intra: add support for high-bitdepth
lowres 0.6%

Change-Id: Id77b1822ef44362235efd1df77413abba6311d92
2016-06-23 00:53:06 +00:00
hui su f85676adb2 Remove a duplicated line
Change-Id: Ie136621f273dab9000abc686598b1b3fd0eea631
2016-06-22 14:57:49 -07:00
Yushin Cho 5365e6e622 Remove macroblock::skip_optimize.
This is not used since the commint 00cd5de536,
"Remove skip_recode speed feature".

Change-Id: Ic03da6c0095f6285a3889d5d22e8aaa2e6cbfd79
2016-06-22 17:08:05 +00:00
Jingning Han 205a239c73 Make dynamic motion vector referencing support multiple bwd refs
This commit makes the dynamic motion vector referencing system
support multiple backward reference frames, hence making the
two experiments work properly.

Change-Id: I7b9812a29d9e634ca4817d5d1116cd093fa74e68
2016-06-22 09:34:14 -07:00
Zoe Liu f91498c0a8 Add pred prob handling for new references in EXT_REFS
For the experiment of EXT_REFS, add the handling of the context
probabilities for both forward reference frames (namely
LAST/LAST2/LAST3/GOLDEN) and backward reference frames
(namely BWDREF/ALTREF).

Change-Id: Ibd991673acf6ff2fc9a56b8805eca9173cbf5fdc
2016-06-22 00:03:39 +00:00
Angie Chiang a97f8e208f Simplify filter search in handle_inter_mode
lowres: 0.001%

Change-Id: I902997bd212f578130a133a94c6d12a73481146a
2016-06-21 16:54:20 -07:00
Zoe Liu 7809528e72 Add encoder first pass support to bi-prediction in EXT_REFS
For the experiment of EXT_REFS, 3 new frame update types are added,
namely
(1) BRF_UPDATE: The frame served as BWDREF_FRAME;
(2) LAST_BIPRED_UPDATE: The last frame within the BWDREF_FRAME group
    that is being bi-directionally predicted using BWDREF_FRAME; and
(3) BIPRED_UPDATE: The frame, except the last one, within the
    BWDREF_FRAME group that is being bi-directionally predicted using
    BWDREF_FRAME.

Change-Id: I64f6ba3f45d6a3dcd1ee97567c6f904ad4e7bad3
2016-06-21 15:19:00 -07:00
Alex Converse 5a18d726f8 Remove PICK_MODE_CONTEXT::skip_txfm.
It is currently unused.

Change-Id: Iba52a4926e83411f3c454ed83a615652be709157
2016-06-21 21:07:07 +00:00
Yushin Cho fea475b78b Removed dead codes and variable allow_skip_recode.
The skip_recode speed feature is removed by commmit 00cd5de536,
so delete related codes in speed_feature.c.

Change-Id: Ica25bbd22504ff91be186402a5a6e07da616a7ee
2016-06-21 20:11:34 +00:00
Yunqing Wang e02752b05c Do sub-pixel motion search in up-sampled reference frames
Up-sampled the reference frames to 8 times in each dimension using the
8-tap interpolation filter. In sub-pixel motion search, use the up-sampled
reference frames to find the best matching blocks to increase the motion
search precision. This is enabled as a speed feature for speed 0 and
speed 1, and this is encoder-only improvement.

Overall PSNR: -1.456%(lowres); -0.430(hdres)
SSIM: -1.687(lowres); -0.551(hdres)

Change-Id: I2085d87e41f6b91d0221dc11dc7ffd003075ba2e
2016-06-21 11:44:54 -07:00
Nathan E. Egge 4ffaaa987b Use Daala entropy coder to code trees.
When building with --enable-daala_ec, calls to aom_write_tree() and
 aom_read_tree() will convert a aom_tree_index structure with associated
 aom_prob probabilities into a CDF on the fly for use with the
 od_ec_encode_cdf_q15().
The number of symbols in the CDF is capped at 16, and trees that contain
 more than 16 leaf nodes are handled by splitting the most likely, e.g.,
 highest probability symbols, first and coding multiple symbols if
 necessary.

ntt-short-1:

         MEDIUM (%) HIGH (%)
    PSNR 0.000227   0.000213
 PSNRHVS 0.000215   0.000205
    SSIM 0.000229   0.000209
FASTSSIM 0.000229   0.000214

subset1:

          RATE (%)  DSNR (dB)
    PSNR -0.00026   0.00002
 PSNRHVS -0.00026   0.00002
    SSIM -0.00026   0.00001
FASTSSIM -0.00026   0.00001

Change-Id: Icb1a8cb854fd81fdd88fbe4bc6761c7eb4757dfe
2016-06-21 13:11:32 -04:00
Thomas Daede d75b2b6944 Remove unused color_sensitivity member from MACROBLOCK.
Change-Id: I95fe4401291a90520f9c76e673fa0eff5f71047d
2016-06-21 01:39:41 +00:00
Jingning Han bf2ad75a17 Use derived variable size for memcpy
Change-Id: I032fb9b56ed9c9b0abf0910225151a6c8b9aa8e4
2016-06-20 23:53:54 +00:00
Jingning Han f4b2926d01 Clear existing format issue in the codebase
Fix the clang-format warnings on the existing codes.

Change-Id: I8e9e781b6f68f41a7fbd0a2116f6b35290d73dc8
2016-06-20 16:51:10 -07:00
Zoe Liu 00b46f7e02 Add 3 more reference frames for experiment of ext-refs
Namely, LAST2_FRAME, LAST3_FRAME, and BWDREF_FRAME.

Change-Id: I7b2fd42d2bb453425686583c28a92071eeb00f4e
2016-06-20 20:40:42 +00:00
Nathan E. Egge 59f7dd6494 Add Daala entropy coder.
Change-Id: I2849a50163268d58cc5d80aacfec1fd02299ca43
2016-06-20 15:21:19 -04:00
Nathan E. Egge 33a143fa7a Move tree writing code into bitwriter.h.
Rename av1_write_tree() to aom_write_tree() and move it into bitwriter.h
 to match aom_read_tree() in bitreader.h.

Change-Id: I49a2e418a4bb8d724cb033b787b650da0bc28833
2016-06-20 13:51:43 -04:00
Angie Chiang 2c38748d98 Refactor: remove filter_cache
lowres: 0.043%
highres: 0.044%

Change-Id: Ic1a153bd39605cb141329499a4031ff7fa33f1a5
2016-06-17 15:54:56 -07:00
Zoe Liu 0e27d549c5 Replace hard-coded numbers with pre-defined values
Change-Id: I415a8d332ca88f0328dfd03c78ef9626f50b84dc
2016-06-17 13:22:54 +00:00
Alex Converse 27914b7bd9 Run clang-format on rdopt.c
Change-Id: I6dc9d746a64b81fbe4e0a194e4fd570d50619206
2016-06-16 17:34:40 -07:00
Yue Chen 04812eb38a Add RDO and recon of MOTION_VAR experiment
The decision framework in enc (without obmc mv refinement) and
reconstruction at both sides is implemented.

Performance gain: 2.229/2.000/1.915% lowres/midres/hdres
Encodinig time: +13%

Change-Id: I5ab634c17d7050f15ecf5d4145626d0eaa425058
2016-06-16 15:35:39 -07:00
hui su de383d081b Add ext-intra experiment
compression improvement:
lowres  0.54%
midres  1.00%

Average encoding time increase is about 5%.

Change-Id: I397afcb59d56e39efe4262b444205ed53f53b518
2016-06-15 16:57:59 -07:00
Yue Chen 2a764519b2 Add overlapped block prediction functions
Including functions that generates predictions using neighbor
predictors, and the function that combines them with the base
prediction.

Change-Id: Iec6a2fbd6494a5bb335a7b36ec31a66799499b6f
2016-06-15 21:53:09 +00:00
Yue Chen 131bbed13d Add bitstream syntax and entropy coding of motion mode
Change-Id: I5d30e8f07373482d7d7a4aff5a2026e4314e32b1
2016-06-15 17:07:44 +00:00
Jingning Han b68f5375cd Use non-local mean filter to generate alternate reference frame
This commit uses a non-local mean filter as temporal filter to
produce the original alternate reference frame. It improves the
compression performance:

lowres  1.0%
midres  1.1%
hdres   2.1%

Change-Id: Iecae01a1e9398d870f13bf060d214cfb40a9a26e
2016-06-14 21:48:18 +00:00
hui su 378cef14f5 Merge part of misc-fixes experiment
Merge the part for intra prediction reference data. It makes the
codebase easier to read, and also improves coding performance
slightly.

Change-Id: I15fa7bd43fb1bae596c43e88327abb37bc6145f7
2016-06-13 10:33:08 -07:00
Alex Converse d69161f8f1 Use the aom_writer type rather than the tag in calling code.
This makes room for typedefing some other struct to aom_writer.

Change-Id: I1e82de1320da00b3e41c90b14f2df45e7628aa89
2016-06-13 16:49:53 +00:00
Angie Chiang 95aff94a3b Add sharp2 and smooth2 interpolation filter
PSNR gain
hbd lowres dataset: 0.811%
lbd lowres dataset: 0.895%

Change-Id: Id6cc426883de725adf1a630f4151d5018c4b819b
2016-06-13 09:41:08 -07:00
hui su 25d9f4cc34 Skip 4x4 transform if maximum possible transform is 32x32
On average no compression performance changes. Encoding speed is
increased by 10~20% on some test clips in the derf set.

Change-Id: I9856caaa260303f6f6259686671bed7d51012277
2016-06-09 17:03:17 -07:00
Angie Chiang f16387bc83 Add av1_convolve for adjustable tap size
Change-Id: I2aa0b1741a6b652d0b0269223ebca6b82bb90b05
2016-06-09 11:47:05 -07:00
Angie Chiang 35e21505dc Add 10/12sharp and 8smooth2 interpolation filters
Change-Id: I5ab179e5f3c5fb1fbe95ff019e8a9e23bc149777
2016-06-09 11:47:05 -07:00
Angie Chiang b54eaceea6 Change interface of inter_predictor
This is for facilatating ext_interp experiment

Change-Id: I22aebfd4a80c7033c38f00b7c71e33a13450633a
2016-06-09 11:47:05 -07:00
Alex Converse 400c606a0e Move CHECK_MEM_ERROR implementation to aom/internal.
Allow using it in aom_dsp.

Change-Id: Ide7d58b6d11f8a45d473fc13bf730ba5bccb5516
2016-06-09 00:17:08 +00:00
Linfeng Zhang 9bf896894b Upgrade fwht4x4_mmx() to fwht4x4_sse2() (from libvpx)
Cherry-pick af7fb17 Upgrade fwht4x4_mmx() to fwht4x4_sse2() for vp9 and
vp10.

Function level timing test shows about 27% time saving on
a Xeon E5-2680 v2 desktop.

Rename dct_sse2.c to dct_intrin_sse2.c to avoid duplicate basenames.

Change-Id: I2c504130099af8f0ccc07da0dacef2464197b0ac
2016-06-08 22:12:18 +00:00
Jingning Han 00cd5de536 Remove skip_recode speed feature
The inter modes now support and test multiple transform types. The
assumption of skip_recode mode no longer exist. Remove this speed
feature.

Change-Id: I2e6798fc841d8ca3838dabed7741950552961a13
2016-06-08 17:32:41 +00:00
Jingning Han b619ba3641 Take out some early termination speed features
Drop some speed features used in speed 2 and above, during the
algorithm development process. This helps simplify the codebase.

Change-Id: I3b2f5560d90b00d2d8fd57c2cb36f6ddd3f228e4
2016-06-08 03:22:20 +00:00
Jingning Han e2721a65cb Rename AOM_ENC/DEC_BORDER_IN_PIXELS to AOM_BORDER_IN_PIXELS
Change-Id: I5d36aba6870f0783577b80d46defda7604029382
2016-06-08 00:59:23 +00:00
Jingning Han 947c7f0ce2 Unify inter prediction operation at enc/dec
This commit makes the encoder and decoder use the same motion
compensated prediction functions to simplify the codebase.

Change-Id: Ic492700bd003aec658e95cb39bcc2ba60bc6e2e4
2016-06-06 17:31:21 +00:00
Jingning Han 1167fd9e77 Fix ActiveMap failure in ref-mv scheme
Reset the ref_mv_idx and predicted motion vector when the coding
block belongs to skip segment.

Change-Id: I416545f1648fef5b537afa25de469f54c49a86ed
2016-06-06 16:44:16 +00:00
Jingning Han ecd0747366 Sort header files
Change-Id: Id8f45d9c11406fc301b39801c5228ccd6aa2d5d6
2016-06-04 00:16:10 +00:00
Jingning Han 4ceb066d98 Account DRL in the motion vector coding
This commit makes the motion vector coding context account for the
dynamic motion vector predictor index.

Change-Id: I86fc98668130140118458c773b3dd6d3ed4bc448
2016-06-03 09:47:58 -07:00
Alex Converse ac8cdc8c1f misc_fixes: Don't use uninitialized probability data.
(cherry picked from commit 7a6cb59dbb)

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=2

Change-Id: I17b76fcf0d8c191850350d5aa50dcc007b8b0cdc
2016-06-01 11:31:01 -07:00
Nathan E. Egge 22adf9b25e Compute all token encodings from symbol trees.
The av1_token encodings must match the contents of the aom_tree_index
 structures so generate all encodings from the symbol trees.

Change-Id: I37be9f12c86a02693ae3c3c1d24b00f2abb29bfb
2016-05-20 22:26:21 +00:00
Yaowu Xu c48106da6e Convert to int before adding negative numbers
This is avoid that -1 overflows uint32_t.

Change-Id: Ic3d99b1985cdb0a28cc83f8291422f5aba5a5a6d
2016-05-20 18:54:46 +00:00
Yaowu Xu 000098a02c Convert "var" to uint64_t
This is to avoid overflow at uint32_t.

Change-Id: I549d2d13d0577fd05d57303a438fbc8034755e45
2016-05-20 18:54:35 +00:00
clang-format 4367c55582 av1_cx_iface.c: apply clang-format
missed in:
02ae3dd Make deadline mode not depend on frame duration.

Change-Id: Ie954a029e53b6b960a6a6ebf047e79793ea1901e
2016-05-19 18:53:51 -07:00
Yaowu Xu a3028ddf55 change to use correct type
This commit changes to use uint32_t for cost (always non-negative),
and promote to int64_t before calculation of the savings.

This fixes an integer overflow.

Change-Id: I71c2580d188cc79d2d8069241d0353cf331b5c83
2016-05-19 08:19:50 -07:00
Thomas Daede 02ae3dd336 Make deadline mode not depend on frame duration.
Backwards compatible with old API.

Change-Id: I65aa43f84bb9491e8cca73fe444094c2622b0187
2016-05-19 15:12:02 +00:00
Thomas Daede 14ed7a6110 Fix decoding Daala deringing and CLPF filters with tiling.
Change-Id: I077b0e97186bdd292f925e08966a2ca3cf8c250d
2016-05-19 15:11:29 +00:00
James Zern d54236a935 s/INTERP_FILTER/InterpFilter/
this matches style guidelines and stabilizes successive runs of
clang-format across the tree. remaining types should be address in
successive commits.

Change-Id: I6ad3f69cf0a22cb9a9b895b272195f891f71170f
2016-05-19 15:10:38 +00:00
clang-format 17b6b0ee8f apply clang-format
this was missed in the resurrected examples/aom_cx_set_ref.c and the
accompanying fix in av1/decoder/decoder.c as well as in:
2a10c91 rdopt,rd_pick_intra4x4block: port tsan fix from libvpx

Change-Id: Ie47eabf7869f629ffb82257f09665165083aef96
2016-05-19 15:09:54 +00:00
Thomas Daede 85d0e1dae4 Set frame_parallel to 0 by default.
Change-Id: I3689d71b12c1e7f40b28cb480aa5b983f7abc696
2016-05-19 14:59:55 +00:00
Yaowu Xu 1fc992d54c Change to use correct type
This commit changes to use int instead of unsigned for a variable used in
inverse quantization.

Ported from libvpx/master: d3fe3b2abb

Change-Id: I8f0ff5f80c9e68d52425265ef177357c65ead1e2
2016-05-19 07:40:47 -07:00
Jim Bankoski 16944e5925 aom_cx_set_ref: Example showing setting a reference frame.
This code was pulled over from libvpx (89a8174 and 9aaa3c9
Make set_reference control API work in VP9 and VP10). The testing
script was added to insure it's working properly.

Change-Id: Ica311c169a1e51718503e23756c4c394818217dd
2016-05-17 13:16:00 -07:00
James Zern 2a10c91b3a rdopt,rd_pick_intra4x4block: port tsan fix from libvpx
minus the non-existent nonrd portion. original change:

commit d642294b1c
Author: Jingning Han <jingning@google.com>
Date:   Thu Feb 11 12:36:49 2016 -0800

    Fix tsan error in VP9 sub8x8 intra mode search

    This commit fixes issue 1141. The issue was triggered in multi-tile
    encoding. The change properly saves and restores the block context
    information in the real-time mode selection process. It removes
    several redundant memcpy operations in sub8x8 intra block mode
    search.

    Change-Id: I35c9ad197f4bd500ec39b5fc833f052f19eee010

Change-Id: If0c11092450ede0450fc9bcf5db2f7349ac2860c
2016-05-11 20:11:25 -07:00
James Zern 4f6c4aede9 fix 'dist' & other decode-only builds
common/av1_fwd_txfm.[hc] are encode-only; add a TODO to relocate them

Change-Id: I28cf8d0b22632b04066bcb72f3d2252ee7eb153e
2016-05-10 19:56:16 -07:00
James Zern 9f6009906b fix 'dist' build w/CONFIG_DERING disabled
calls into pickdering.c are protected by CONFIG_DERING as are its common
headers. fixes missing dering.h when trying to build in a 'make dist'
directory

Change-Id: I6089f48eecfe82e98b316bef12c2bf045d226f3c
2016-05-10 18:35:09 -07:00
clang-format a2dc61c7a6 apply clang-format
.c files were missed in the previous change

Change-Id: I9d22cd83e1f87472bfb09e6a38284396b2fcd860
2016-05-10 12:13:58 -07:00
Nathan E. Egge 0625958178 Remove unused keyframe constant tables.
The tables av1_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] and
 av1_kf_partition_probs[PARTITION_CONTEXTS][PARTITION_TYPES - 1] are not
 referenced anywhere in vp10 or av1 and can be removed.

Change-Id: Ibaf8d8de125fc2341beaf14733200d792d8d583c
2016-05-10 10:55:14 -04:00
clang-format 54c8e5daff Apply Clang-format
Change-Id: Iaa3ca871a8106a8e57bbc40f4743cf934c98dcbf
2016-05-02 18:08:03 -07:00
Yaowu Xu 606f01d48b Extend aomssim to handle more bitdepth combinations
ported from libvpx/nextgenv2: eeaf8e6

Change-Id: I9b86264674369cbd4d7bf6d0fd7ac5b5c616d2df
2016-05-02 14:53:28 -07:00
Yaowu Xu 5e540ea394 Add aom_ prefix to psnr functions
ported from libvpx/nextgenv2: 38cfc45

Change-Id: Ie13ba93289db13137aca8a0acd515e962671f18b
2016-05-02 14:50:53 -07:00
Yaowu Xu 59f707666b Add shift stage in FASTSSIM computation
Ported from libvpx/nextgenv2: d1c5cd4

Change-Id: If6cb82d38d2bc63fc61d577f81de939c11f73c5a
2016-05-02 14:49:58 -07:00
Yaowu Xu b398b72c45 Move PSNRHVS function declaration to psnr.h
ported from libvpx/nextgenv2: 6e695da

Change-Id: I53e60e4b7a59ba61d59634a87663c0311452fbf4
2016-05-02 14:48:18 -07:00
Yaowu Xu 35afeab306 Move PSNR related functions to aom_dsp/psnr.c
Ported from libvpx/nextgenv2: 7538501

Change-Id: Idbab2d08af06d3a9eedeb56c7ac1ba8151b7c7bd
2016-05-02 14:45:08 -07:00
Yaowu Xu 14066c2a88 Refactor internal stats code
Ported from libvpx/nextgenv2: 1a69cb2

Change-Id: Icec13798d8cf2f00b78de16c642dd2aa754ba826
2016-05-02 14:44:45 -07:00
Yaowu Xu bb72d63784 Enable computing PSNRHVS for highbitdepth build
Ported from libvpx/nextgenv2: bb8ca08

Change-Id: I911529bae9c125baf583e992453106190583fdc2
2016-05-02 14:44:15 -07:00
Yaowu Xu beb3ee3f5e Enable highbitdepth fastSSIM computation
ported from libvpx/nextgenv2: c0874f2

Change-Id: I626a42b5f4ed22f90f1f813b3223c51b8bce1da2
2016-05-02 14:40:36 -07:00
Jingning Han bfb0a26a7a Refactor collocated reference block checking process
Factor out common codes.

Change-Id: I9889422212daedfedf934067c4c4945a0c1de351
2016-04-12 18:08:34 -07:00
Jingning Han ee364ff9da Store predicted mv in the collocated reference block
This commit makes the codec to store the predicted motion vector
at 8x8 block level and assign them when the reference motion vector
is obtained from collocated blocks in the previous frame.

Change-Id: I7e0403dad1df012f3994846939bb799e2445736c
2016-04-12 18:08:31 -07:00
Jingning Han e9630de8f2 Unify the entropy coding system for dynamic motion vector referencing
This commit unifies the probability models for the dynamic motion
vector referencing system.

Change-Id: I2b8a5e3da9824b52779a6b8ef43b7a588eade93a
2016-04-12 18:08:31 -07:00
Jingning Han cbeab1c722 Dynamic motion vector referencing based motion estimation
This commit enables motion estimation process based on the dynamic
motion vector referencing system. It allows the codec to select
the optimal predicted motion vector for motion vector coding.

Change-Id: Ic2a4d16e17c3fc320b1435d9ff564d5902c89f16
2016-04-12 18:00:04 -07:00
Jingning Han 69b50d2828 Support context based entropy coding for compound mode syntax
This commit allows the compound mode to use entropy coding contexted
on the dynamic motion vector referencing system.

Change-Id: Ie6f3219183ac3fce322d340728af26c1c1dfa37f
2016-04-12 15:45:48 -07:00
Jingning Han 35488f67a9 Apply mv precision check to reference mv candidate
This allows the codec to use effective motion vector as the candidate
to produce the reference motion vector list.

Change-Id: I4e00719f059ad82e5e8a0c843f7f96f59135cefd
2016-04-12 15:45:48 -07:00
Yaowu Xu 7fed303fe5 Fix several MSVC compiler warnings
Change-Id: I958ce22857068fef37f1c8c3ee718894f2716f01
2016-04-08 18:39:46 -07:00
Michael Bebenita 03394bd8c4 Remove dead code from av1_dering_search.
Change-Id: I893914d4678372970680b514843da87a75c14889
2016-04-08 15:36:45 -07:00
Jean-Marc Valin 337b23a590 Changing the weights of the first CRF filter in deringing
The old taps were equivalent to [2 2 3 2 3 2 2], while the new taps are
equivalent to [1 2 3 4 3 2 1]. The new coefficients improve metrics
slightly (not clear why).

ntt-short1 results:
          LOW (%)  MEDIUM (%) HIGH (%)
    PSNR NaN -0.126426 -0.209062
 PSNRHVS NaN 0.043873 -0.038114
    SSIM NaN -0.054293 -0.138431
FASTSSIM NaN -0.143498 0.245350

Change-Id: Iecadda68a4e9b33a49a807faf0a7dee6c9a119cb
2016-04-08 13:37:04 -04:00
Jingning Han d2bfbb6f28 Reduce rate-distortion optimizations complexity
Skip the transform type search in the dynamic motion vector
referencing mode. Always fall back to 2D-DCT setting.

Change-Id: Ia483172e13ce0da313855106a194fee48fcc0514
2016-04-06 14:49:25 -07:00
Jingning Han 06795c59c4 Expand the motion vector context set
Increase the number of context from 2 to 3.

Change-Id: I2327c59da958e9376cd632ae390f0cc57979f000
2016-04-06 08:39:51 -07:00
Jingning Han 604a546255 Check the entire collocated block for zeromv context
Check through all the collcated blocks in the previous frame for
zeromv mode context.

Change-Id: I1a521d49573d3def125e1a09f22b8a34c661cebf
2016-04-05 10:32:09 -07:00
Jingning Han 4a1b6d8196 Account context based prob model for motion vector cost estimate
This commit accounts for the context based probability model for
motion vector cost estimate in rate-distortion optimization.

Change-Id: I18961b25ef356e4751407a178702e9a7a1213100
2016-04-05 09:28:04 -07:00
Jingning Han a8c1d85e5f Vectorize motion vector probability models
This commit converts the scalar motion vector probability model
into vector format for entropy coding contexted on the predicted
motion vector.

Change-Id: I09a17ed4d01efa49640c2882efbf78913b32556e
2016-04-04 17:30:28 -07:00
Jingning Han efc115f481 Store the predicted motion vectors
Change-Id: I860ebd612cac998e143ac5bcbf06e3954a62b047
2016-04-04 15:00:22 -07:00
Jingning Han 6a720986ac Add reference motion vectors from collocated reference blocks
This commit extends the search range to include the motion vectors
from collocated reference blocks.

Change-Id: I1c856ab42c78d7a92cdb8bc169713a9335b0e908
2016-04-04 14:49:00 -07:00
Jingning Han 79864820de Refactor vp10_drl_idx concept
Remove the implicit assumption on offsetting the index by 1.

Change-Id: I2d2b9848916e16723fddd58e7a15e4e7ac4963e3
2016-04-04 11:57:37 -07:00
Jingning Han 8a13bbe828 Enable entropy coding of the dynamic motion vector referencing syntax
This commit enables entropy coding of the syntax elements used in
the dynamic motion vector referencing system.

Change-Id: If876c7df6402caf4b6daa3d511328da522e95233
2016-04-04 10:35:08 -07:00
Jingning Han c443f820b7 Enable dynamic ref motion vector mode for compound inter block
This commit enables the dynamic reference motion vector coding mode
for the compound inter blocks.

Change-Id: I3d6edea7cf241cbb108709b57aeb54f811029237
2016-04-04 09:42:19 -07:00
Jingning Han 9fdd1124d0 Support multiple reference motion vector candidates
This commit generalizes dynamic reference motion vector coding mode
to support multiple candidate modes in the rate-distortion
optimization scheme and to support the selection in the bit-stream
syntax. The maximum number of modes allowed is currently limited to
4. The syntax elements for the dynamic reference motion vector
modes are using binary codes.

Change-Id: I63ada01c18d4aaa2e3770811130fa8a42a88ab62
2016-04-01 18:09:05 -07:00
Jingning Han 883f1df7c7 Enable dynamic motion vector referencing system
This commit enables the dynamice motion vector referencing system
for inter predicted modes with single reference frame.

Change-Id: Ib3502c746276a859a7b443ec2687b71d4c788dc0
2016-04-01 16:24:00 -07:00
Jingning Han 472615c342 Generate compound reference motion vector
Use and compare the reference frame vector to find the reference
motion vector candidates for compound mode.

Change-Id: Ie9d1006f5121593a2311fcaeac411a54a705d266
2016-04-01 11:12:37 -07:00
Jingning Han d53bc5f9f2 Properly reset ZEROMV mode context
When the current frame does not have its previous frame for
reference, reset the ZEROMV mode context.

Change-Id: I6018ede03adea76c4c5335e0eb34ab60df0576c7
2016-04-01 09:40:12 -07:00
Jingning Han 51c5b0d9c0 Fix use_prev_frame_mvs assignment
This commit synchronizes the value assigned to cm->use_prev_frame_mvs.
It resolves a potential mismatch between encoder and decoder.

Change-Id: I2208017db73f8a83cbb50027776db8dc67526b44
2016-04-01 09:11:58 -07:00
Jingning Han aeb60057e5 Refactor reference motion vector search process
Unify the reference motion vector candidate search for row, column,
and single block cases. Make it support later extended reference
frame contexts.

Change-Id: I1278a9f1ed8561eccc8460b4edff4b97d438ad9b
2016-03-31 16:51:03 -07:00
Jingning Han 3b4479eb82 Enable context analyzer for inter mode entropy coding
It allows the codec to account for certain corner cases when
processing inter prediction mode entropy coding.

Change-Id: I51a1adda0d9e27bd1e18d912fd56ca4422b607b4
2016-03-31 16:26:14 -07:00
Jingning Han de6741bfa3 Enable adaptive prediction mode coding
This commit allows the codec to analyze the reference motion vector
candidate list and adaptively reduce the size of inter prediction
mode set.

Change-Id: I98f25bbf17cc844a84cfc568be27912f31fbe478
2016-03-31 15:48:47 -07:00
Jingning Han 6e03ddffa8 Re-design motion compensated prediction mode entropy coding system
This commit re-works the entropy coding scheme of the motion
compensated prediction modes. It allows a more flexible hyperplane
partition for precise classification.

Change-Id: Id02d4015a053affea9c19b1188873fbd7b906e92
2016-03-31 15:48:44 -07:00
Jingning Han d7f1cb0082 Add top-right neighbor into candidate list
This commit allows the codec to check the top-right neighbor block
when available for reference motion vector candidates.

Change-Id: I94c19bdb5e2cb8c1f58bd39a3001873fcc55b08c
2016-03-30 17:45:18 -07:00
Jingning Han 793e2a1bd3 Make sub8x8 block ref mv search consistent to regular blocks
Check all motion vectors in the immediate above and left blocks if
the boundary condition matched with that of the reference block.

Change-Id: Ie1c263065eded01fbf735c1518de8162cc377e89
2016-03-30 15:59:08 -07:00
Jingning Han 98ee80185a Integrate motion vector into the coding pipeline
This commit ports the motion vector stack from motion field
analyzer to the encoding and decoding pipeline.

Change-Id: I9f265f198b3f7b52dad8948490959041159fd6b2
2016-03-30 15:53:08 -07:00
Jingning Han 1d1ede9431 Construct motion vector reference candidate list
The motion vectors are ranked according to their likelihood to be
chosen for the coding block.

Change-Id: Ib3bb40aa6794da015c4760b98f02334a396e6459
2016-03-30 15:46:51 -07:00
Adrian Grange 0defd8f261 Changed "WebM" to "AOMedia" & "webm" to "aomedia"
Change-Id: I5e1a9b79ecc50ea9e7eea2746f40ba872d7d80e4
2016-03-29 23:04:48 +00:00
Jingning Han 117c1e38a0 Add n8_h/w to macroblockd
This will simplify the block size update in many places.

Change-Id: I255093692315d81340900baea6ccee0c02b9abd4
2016-03-29 14:43:15 -07:00
Adrian Grange 54e6676757 Replace "VPx" by "AVx"
Change-Id: If363eccaa8be7fb9f8cf41488bf3f5e6d4c00645
2016-03-29 21:35:38 +00:00
Adrian Grange 00ce1fb2b3 Set project to AOMedia & version number to 0.1.0
Change-Id: I04a2a732274f7773a9a1991591d881ea4d4874e8
2016-03-29 10:15:34 -07:00
Adrian Grange dfdf944dea Add copyright notice to all .asm files
Change-Id: I4696600fff3df51f0206c559bb1a30d0b53815e1
2016-03-29 09:41:56 -07:00
Adrian Grange e106d434b0 Add copyright notice to .mk files
Change-Id: Ie4cc33c4be4768f8b51dc3160ccfe90ebb34886d
2016-03-29 09:36:13 -07:00
Adrian Grange fa8ca9f2c2 Change "vp9" to "av1"
Change-Id: I5942c24dec6fdcfe7e27518c8049b59e6f99a1aa
2016-03-28 12:56:02 -07:00
Adrian Grange ec838b76b6 Convert "vp8" to "aom"
Change-Id: I0d57cf019d5715d3360736763be0c5afe0bd0de4
2016-03-28 12:18:16 -07:00
Adrian Grange 80edfa0132 Change "VP9" to "AV1"
Change-Id: I6f40ab4725f59bee3d05e3989c1510dfd847b7f9
2016-03-28 12:13:50 -07:00
Adrian Grange d1a11fb9dd Change "vp8" to "aom"
Change-Id: I7fce5490afdc78ac62dafc4616b617d251487979
2016-03-25 16:04:42 -07:00
Adrian Grange dd1a5c8db5 Replace "VP8" with "AOM"
Note: Check AOMD_SET_DESCRIPTOR; there was a VPX & VP8 version
that when renamed become the same.

Change-Id: I022a71c0dfcd77948dda35ec754167e03bca616d
2016-03-25 14:24:04 -07:00
Adrian Grange ff00fc0f24 Change "VPX" to "AOM"
Change-Id: I6593a44de3b571193c2a4c8787ddf3b2fc24a268
2016-03-25 12:57:08 -07:00
Yaowu Xu 01dee0bba5 Change "vp10" to "av1" in source code
Change-Id: Ifd0d08b97538dcc04227eceb6fb087224c760c59
2016-03-25 12:43:01 -07:00
Adrian Grange cebe6f0cf5 Convert "vpx" to "aom"
Change the name of source files to replace "vpx" with "aom".
Change occurences of "vpx" in the code to "aom".

Change-Id: I002c0eaa2c350cf1a895bf01bea5788c61328027
2016-03-25 12:25:01 -07:00
Yaowu Xu 17b0567940 rename vp10*.mk to av1_*.mk
Change-Id: I88f59b030f61d3db473f434b8ce5fd96f6597e35
2016-03-25 09:47:05 -07:00
Yaowu Xu fe5f8a8a47 rename files vp10_* to av1_*
Change-Id: I017e3b64d5074ad47fed8cd642fdf366bd475b1b
2016-03-25 09:16:38 -07:00
Adrian Grange ee9843dfa3 Add AOM copyright notice to all .h files
Change-Id: I5629de7726c65fb1463dff5fc5c1c82a3862a8f9
2016-03-24 12:28:27 -07:00
Adrian Grange a872b06380 Add AOM copyright header to all .c files
Change-Id: I79d52362aec9565cc4b6fe7a1c1c08dcfb726465
2016-03-24 11:43:07 -07:00
Adrian Grange 73efc7a01b Remove unused local variable "lossless"
Change-Id: Ia7305f269dcf1242e38adc39f0372f4bc8b78394
2016-03-23 12:47:49 -07:00
Yaowu Xu 3d26d91670 libvpx -> libaom
Change-Id: I820483aefdc14f2ae946e08fe10fa01f3e845767
2016-03-22 12:33:42 -07:00
Yaowu Xu cfea7dd766 vp10/ -> av1/
Change-Id: Ia055d03656ad1580447eced8687949583fdf4089
2016-03-22 09:53:27 -07:00