Commit graph

2031 commits

Author SHA1 Message Date
Arttu Ylä-Outinen 461ecc426b Merge branch 'smp-amp-blocks' 2015-12-15 11:37:13 +02:00
Arttu Ylä-Outinen bbaaf3c3e1 Add SMP and AMP tests on Travis. 2015-12-15 11:21:46 +02:00
Arttu Ylä-Outinen dbb9b0df85 Enable search for AMP blocks. 2015-12-15 11:21:46 +02:00
Arttu Ylä-Outinen 7e4f4538a4 Implement encoding AMP part modes.
Also adds parameter --amp for enabling AMP blocks.
2015-12-15 11:21:45 +02:00
Arttu Ylä-Outinen c3716f7803 Add --smp option for enabling SMP blocks. 2015-12-15 11:21:45 +02:00
Arttu Ylä-Outinen 38b881c36f Implement search_frac for rectangular blocks.
Replaces parameter depth of function search_frac with parameters width
and height.
2015-12-15 11:21:45 +02:00
Arttu Ylä-Outinen 864c77f6eb Use kvz_satd_any_size in inter search.
Changes search_frac and kvz_search_cu_iter to use kvz_satd_any_size for
computing the SATDs instead of getting the SATD function with
kvz_pixels_get_satd_func.
2015-12-15 11:21:45 +02:00
Arttu Ylä-Outinen 056fa09ba5 Add arbitrary-sized SATD functions.
Adds strategy satd_any_size for generic and AVX2. The satd_any_size
functions are implemented with macro SATD_ANY_SIZE defined in
strategies-picture.h.
2015-12-15 11:21:45 +02:00
Arttu Ylä-Outinen 6bdc08b6eb Drop unused function declaration.
Removes declaration of non-existent function satd_8bit_8x8_generic in
strategyselector.h.
2015-12-15 11:21:44 +02:00
Arttu Ylä-Outinen 728a6abecc Extract macro SATD_NxN.
Combines definitions of macros SATD_NXN and SATD_NXN_AVX2 to macro
SATD_NxN and moves it to strategies-picture.h.
2015-12-15 11:21:44 +02:00
Arttu Ylä-Outinen 1eebfde0c5 Make tz search work with non-square blocks.
Replaces parameter depth with parameters width and height.
2015-12-15 11:21:44 +02:00
Arttu Ylä-Outinen e203883f3d Refactor kvz_filter_deblock_lcu.
Moves code for filtering the rightmost 4 pixels of an LCU to a separate
function filter_deblock_lcu_rightmost.
2015-12-15 11:21:44 +02:00
Arttu Ylä-Outinen 21ca74fe86 Replace deblock filter with a simple loop.
- Adds function is_pu_boundary.
- Moves code for filtering an edge of a single PU or TU to a new
  function filter_deblock_unit.
- Replaces recursive CU tree traversal in filter_deblock_cu with
  a simple loop and renames it to filter_deblock_lcu_inside.
2015-12-15 11:21:43 +02:00
Arttu Ylä-Outinen 7516fda970 Make fractional recon work with non-square blocks.
Adds parameter block_height to functions inter_recon_frac_luma,
inter_recon_14bit_frac_luma and inter_recon_14bit_frac_chroma so that
they can handle SMP blocks.
2015-12-15 11:21:43 +02:00
Arttu Ylä-Outinen 591a1ce6db Turn some inter recon functions static.
Makes the following functions static since they are not used outside
inter.c:
- kvz_inter_recon_frac_luma
- kvz_inter_recon_14bit_frac_luma
- kvz_inter_recon_frac_chroma
- kvz_inter_recon_14bit_frac_chroma
2015-12-15 11:21:43 +02:00
Arttu Ylä-Outinen 0f531362bf Enable Nx2N partitions. 2015-12-15 11:21:43 +02:00
Arttu Ylä-Outinen 4402e251ae Fix kvz_get_extended_block functions.
The buffers allocated in functions kvz_get_extended_block_avx2 and
kvz_get_extended_block_generic were too small when the width of the
block was less than its height. Fixed to allocate correctly sized
buffers.
2015-12-15 11:21:43 +02:00
Arttu Ylä-Outinen bdd8b1c0aa Implement 2NxN partitions in inter search.
- Try using 2NxN partitions after the usual 2Nx2N.
- Adds function kvz_search_cu_smp to search_inter module.
2015-12-15 11:21:42 +02:00
Arttu Ylä-Outinen 410064e880 Split lcu_set_inter into two functions.
Moves code for setting the inter modes for a single PU to a new function
lcu_set_inter_pu.
2015-12-15 11:21:42 +02:00
Arttu Ylä-Outinen 3236428e4d Make hexbs search work with non-square blocks.
Replaces parameter depth with parameters width and height.
2015-12-15 11:21:42 +02:00
Arttu Ylä-Outinen 31ba8d61c3 Implement fractional chroma recon for SMP blocks.
Adds parameter block_height to function kvz_inter_recon_frac_chroma.
2015-12-15 11:21:42 +02:00
Arttu Ylä-Outinen 0b6cef7be5 Remove unused function kvz_inter_set_block. 2015-12-15 11:21:42 +02:00
Arttu Ylä-Outinen e63486b23f Make lcu_set_inter work with SMP blocks. 2015-12-15 11:21:41 +02:00
Arttu Ylä-Outinen 7b99eb2970 Call recon functions correctly for SMP blocks.
Makes calls to kvz_inter_recon_lcu and kvz_inter_recon_lcu_bipred in
function search_cu work correctly when using SMP blocks.
2015-12-15 11:21:41 +02:00
Arttu Ylä-Outinen dc4525c0e3 Implement inter recon for non-square blocks.
Adds parameter height to functions kvz_inter_recon_lcu and
kvz_inter_recon_lcu_bipred and makes them work on non-square sizes.
Fractional reconstruction functions do not handle non-square blocks yet.
2015-12-15 11:21:41 +02:00
Arttu Ylä-Outinen f874c8614e Add part_mode binarization table comment. 2015-12-15 11:21:41 +02:00
Arttu Ylä-Outinen c77074a7ff Implement encoding SMP blocks. 2015-12-15 11:21:41 +02:00
Arttu Ylä-Outinen 98707a1288 Move encoding intra CU to a separate function.
Moves code for encoding a single intra coding unit from function
kvz_encode_coding_tree to a new function encode_intra_coding_unit.
2015-12-15 11:21:40 +02:00
Arttu Ylä-Outinen c336674da3 Move encoding part mode to a separate function.
Moves code for encoding the part mode from function
kvz_encode_coding_tree to a new function encode_part_mode.
2015-12-15 11:21:40 +02:00
Arttu Ylä-Outinen ac952cbb44 Move encoding inter PUs to a separate function.
Moves code for encoding a single inter prediction unit from function
kvz_encode_coding_tree to function encode_inter_prediction_unit.
2015-12-15 11:21:40 +02:00
Arttu Ylä-Outinen 5ee9f164e8 Add macros for getting PU location and size.
- Moves SIZE_* definitions to cu.h.
- Adds constant arrays kvz_part_mode_num_parts, kvz_part_mode_offsets
  and kvz_part_mode_sizes for storing the number of PUs, PU offsets and
  PU sizes.
- Adds macros PU_GET_X, PU_GET_Y, PU_GET_W and PU_GET_H for getting the
  location and size of a PU.
2015-12-15 11:21:40 +02:00
Arttu Ylä-Outinen a3df13fb99 Make kvz_inter_get_merge_cand work with SMP blocks.
- Replaces parameter depth with parameters width and height.
- Adds parameters use_a1 and use_b1 for disabling the use of merge
  candidates A1 and B1.
2015-12-15 11:21:40 +02:00
Arttu Ylä-Outinen 1cd149fb97 Check merge/mv candidate types earlier.
Moves checks for motion vector prediction and merge candidate block
types (inter/intra) from functions kvz_inter_get_mv_cand and
kvz_inter_get_merge_cand to kvz_inter_get_spatial_merge_candidates.
2015-12-15 11:21:39 +02:00
Arttu Ylä-Outinen 969c91d7c4 Add a test for kvz_inter_get_spatial_merge_candidates. 2015-12-15 11:21:39 +02:00
Arttu Ylä-Outinen 02375bf7e5 Make kvz_inter_get_mv_cand work with SMP blocks.
Replaces the depth parameter of kvz_inter_get_mv_cand with parameters
width and height.
2015-12-15 11:21:39 +02:00
Ari Koivula 3a80c7de74 Further optimize coefficient coding
Remove the need to count the coefficients by populating the significant
coefficient group map first and finding the last coefficient from the
last group afterward. The speedup is about 2% on ultrafast.

The previous version of this patch was reverted due to a bug, which
has now been fixed.
2015-12-11 16:47:55 +02:00
Ari Lemmetti b78460b02c Optimize another loop 2015-12-11 11:21:43 +02:00
Ari Koivula 234d3fc6e0 Add picture of the module hierarchy
Included a png for embedding into the wiki.
2015-12-10 18:03:32 +02:00
Ari Koivula b32965925e Revert "Further optimize coefficient coding"
This reverts commit 25462124f8.

That commit broke the bitstream. If it's not good enough to push on Friday
night, it's probably not good enough on Monday morning either.
2015-12-07 15:12:04 +02:00
Ari Koivula 865c86fef2 Remove unused variable 2015-12-07 10:32:18 +02:00
Ari Koivula 91631a1c36 Merge branch 'coeff-optimization' 2015-12-07 10:25:46 +02:00
Ari Koivula 25462124f8 Further optimize coefficient coding
Remove the need to count the coefficients by populating the significant
coefficient group map first and finding the last coefficient from the
last group afterward.
2015-12-07 10:23:01 +02:00
Ari Koivula c94707e6e8 Fix bug with OWF+FME+deblocking
Increases the MV safety margin of OWF from 2 to 3 when deblocking
is used and 4 when both deblocking and FME are used.

Fractional pixel motion estimation can move the vector one more pixel
down causing checksum error. This fixes that error by increasing the
OWF safety margin and changes the interface, so that different margin
can be used when FME or deblocking are not in use.
2015-12-04 15:26:56 +02:00
darealshinji c18d85fb6a use library version for sonames 2015-12-04 11:36:51 +01:00
darealshinji fe2ff12244 fix building with autotools 2015-12-03 22:41:24 +01:00
darealshinji 8104196da6 GNU autotools build system 2015-12-03 22:40:19 +01:00
darealshinji b6d3510c2e pkg-config: move -lm to Libs.private 2015-12-03 22:39:27 +01:00
Ari Lemmetti 6fe223c4dc Nonzero calculation magic 2015-12-03 18:29:44 +02:00
Ari Lemmetti f2d8cd4d64 Merge branch 'intra-search-multi' 2015-12-03 17:25:52 +02:00
Ari Lemmetti c4e1552ef6 Replace original rough intra search 2015-12-03 17:13:11 +02:00