Commit graph

74 commits

Author SHA1 Message Date
Ari Lemmetti 7f71cb423a Check 4 fractional pixel positions simultaneously 2016-07-14 12:52:24 +03:00
Ari Lemmetti ad445ab8a1 Transition to kvz_filter_frac_blocks_luma 2016-07-14 12:51:02 +03:00
Ari Lemmetti e9c3074d32 Add buffers and definitions for upcoming filtering
Samples are to be filtered in separate blocks instead of
making one big picture with interpolated pixels
2016-07-14 12:51:02 +03:00
Ari Lemmetti 7afe7e963b Use fme_level to control the search accuracy. 2016-07-14 12:51:01 +03:00
Ari Lemmetti 5fa323bf25 Skip searching best hpel twice. Make hpel and qpel loops similar. 2016-07-14 12:51:01 +03:00
Ari Lemmetti bc98a9affa Change the search order to suit lighter fme search 2016-07-14 12:51:01 +03:00
Arttu Ylä-Outinen 433e528af7 Drop unused variable in search_pu_inter.
Removes unused variable max_px_below_lcu.
2016-06-22 13:35:16 +09:00
Arttu Ylä-Outinen 097bf8f3c0 Add a typedef for mvd coding cost functions. 2016-06-20 13:56:10 +09:00
Arttu Ylä-Outinen cad2d496b8 Enable 4x8 and 4x16 partition modes
Enables search for 2NxN and Nx2N partition modes for 8x8 CUs and 2NxnU,
2NxnD, nLx2N and nRx2N partition modes for 16x16 CUs.

Changes the loop for copying reconstructed luma pixels in
kvz_inter_recon_lcu to use 4 byte chunks instead of 8 byte chunks since
it is now possible to have 4 pixel wide blocks.
2016-06-16 20:23:16 +09:00
Arttu Ylä-Outinen 360f5bb8da Always use pixel coordinates for indexing lcu_t.
Removes macro LCU_GET_CU and uses LCU_GET_CU_AT_PX in its place.
2016-06-16 18:53:17 +09:00
Arttu Ylä-Outinen 46e8122d27 Add functions for indexing cu_array_t structures.
Replaces macro CU_ARRAY_AT with functions kvz_cu_array_at and
kvz_cu_array_at_const.
2016-06-16 18:52:19 +09:00
Arttu Ylä-Outinen b276a347c0 Add a macro for indexing cu_array_t.
Adds macro CU_ARRAY_AT(cu_array, x, y) to cu.h.
2016-06-15 12:25:11 +09:00
Arttu Ylä-Outinen 41e75daed7 Fix overlapping memcpy in kvz_search_cu_smp.
The destination and source pointers might be equal. Fixed by replacing
the memcpy call with a simple assignment.
2016-06-15 12:25:11 +09:00
Ari Lemmetti 29af8bcd21 Remove const to match function signature 2016-06-14 18:19:40 +03:00
Eemeli Kallio 5af6ab320c Merge branch 'me_early_terminate'
Conflicts:
	configure.ac
	src/cfg.c
	src/cli.c
	src/kvazaar.h
	src/search_inter.c
2016-06-14 15:03:35 +03:00
Arttu Ylä-Outinen 23fdeeaf10 Move mv_cand and mv_dir into a bitfield in cu_info_t.
Reduces size of cu_info_t.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen b6d793ef33 Drop field inter.mvd from cu_info_t
Instead of storing the mv differences in cu_info_t, they are computed
from the mv candidates and the motion vector. Reduces the size of
cu_info_t.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen ebb10763f1 Drop field inter.mv_ref_coded from cu_info_t.
Storing inter.mv_ref_coded in cu_info_t is unnecessary since it can be
computed from refmap and inter.mv_ref.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen 30e9ee988d Move bitcost field out of cu_info_t.inter.
The bitcost is only needed for the currently searched CU.

Fixes bitcost of the second PU being ignored when using SMP or AMP.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen 16d13ed046 Move cost field out of cu_info_t.inter
The cost is only needed for the currently searched CU.
2016-06-14 12:20:05 +09:00
Eemeli Kallio e4f1a74512 Added early termination option for motion estimation.
Conflicts:
	src/search_inter.c
2016-06-13 16:20:35 +03:00
Wassim Hamidouche 02308d1ba6 add MVs encryption 2016-06-07 10:28:30 +02:00
Eemeli Kallio 8f182ac6de Added functions select_starting_point and mv_in_merge to search_inter.c 2016-06-06 17:16:04 +03:00
Eemeli Kallio 836a3b1daa Added functions select_starting_point and mv_in_merge. 2016-06-06 12:18:33 +03:00
Ari Koivula f51a68b6fa Add different sizes of search window for full search 2016-04-21 15:11:35 +03:00
Ari Koivula 28e7548387 Fix bug in full mv search
This optimization led to some points not being searched.
2016-04-21 12:03:57 +03:00
Ari Koivula 2576aeee0b Use merge candidates in full mv search
Perform a full search window around every mv candidate and the
0-vector.
2016-04-20 20:47:11 +03:00
Ari Koivula 61fc3e87ba Run include-what-you-use fix_includes.py fix_includes.py
The includes should make more sense now and not just happen to compile
due to headers included from other headers.

Used a modified version of IWYU. Modifications were to attribute int8_t
and so on to stdint.h instead of sys/types.h and immintrin.h instead of
more specific headers.

include-what-you-use 0.7 (git:b70df35)
based on clang version 3.9.0 (trunk 264728)
2016-04-01 17:46:55 +03:00
Ari Koivula e23ed231fb Fix race condition with owf and non-square motion partitions
The OWF wpp limit code assumed square blocks, and as such did not work
correctly when height != width. This changes the relevant code to consider
both height and width.
2016-03-22 16:46:38 +02:00
Arttu Ylä-Outinen d6a3e02f16 Fix calculating reference CU index in inter search
Fixes a possible segfault when SMP or AMP blocks are used.
2016-03-22 12:55:58 +02:00
Ari Koivula 1165ae2e1f Increase --mv-constraint=frametimemargin margin
Increase the margin to be 4 luma pixels to every direction.
2016-03-14 16:02:54 +02:00
Ari Koivula f8edf28161 Fix const qualifier warning
Also set the warning to an error in VS.
2016-03-09 14:16:15 +02:00
Ari Koivula b0c3ece31e Fix race condition when deblocking is on but SAO is off
Already suspected this yesterday, but didn't want to add the code to
handle it before confirming that it's actually a problem. It is.
2016-03-09 14:02:46 +02:00
Ari Koivula 1671725c72 Fix non-determinism issue with OWF WPP margin
The previous reasoning used deblocking and fractional motion estimation
together to arrive at a margin of 4 pixels. This was wrong, and with
either of these off, half pixel chroma interpolation could use pixels
outside the intended region.

Deblocking does not currently affect the margin needed.
2016-03-08 20:18:38 +02:00
Ari Koivula aec152c953 Fix OWF mv restriction limit
The check was done in regard to the wrong dimension, allowing the
access to unfinished parts of the frame when coding multiple frames
at the same time.
2016-03-08 17:12:43 +02:00
Ari Koivula 49ea2d7b7f Fix --mv-constraint=frametile
Option --mv-constraint=frametilemargin was being used instead of
frametile.
2016-03-07 16:41:00 +02:00
Ari Koivula 81b439f4da Optimize starting point selection in tz
Avoid checking zero motion vectors multiple times. The merge candidate
list often has only one or two candidates, the other being zeroes.
2016-03-04 16:48:46 +02:00
Ari Koivula 2436702c27 Optimize starting point selection in hexbs
Avoid checking zero motion vectors multiple times. The merge candidate
list often has only one or two candidates, the other being zeroes.
2016-03-04 16:48:12 +02:00
Ari Koivula 5327b59b45 Remove KVZ_PERF_SEARCHPX
It's too invasive and we don't really need it.
2016-03-04 16:48:12 +02:00
Ari Koivula 86219aa0fc Fix non-determinism with tiles
Earlier fix that fixed the supply side of the cu_array to take tile
coordinates into account should have been accompanied with this one
that does the same thing to demand side.
2016-03-03 17:39:20 +02:00
Ari Koivula 3dcc0957f8 Deal with impossible mv constraints
If 0,0 vector is illegal, it's possible that no legal movement vector,
is found, in which case a large cost is returned instead. The cost
overflowed and there is all sorts of silliness with converting from
double to int, but I'm not going to fix all of it because when we
remove the doubles it will all get fixed.
2016-02-29 19:18:14 +02:00
Ari Koivula b1adf1576a Add --mv-constraint=frametilemargin
Add an even stricter motion vector constraint to prevent motion vectors
to fractional pixel positions that would need pixels outside the tile.
2016-02-29 19:18:14 +02:00
Ari Koivula f4ebff12b0 Combine tile mv constraint with OWF mv constraint
This also fixes movement vectors in tiles when OWF is on. The OWF mv
constraint assumed WPP, so it didn't work with tiles.
2016-02-29 14:33:06 +02:00
Ari Koivula 7981609cd0 Add --mv-constraint=frametile 2016-02-29 14:33:06 +02:00
Ari Koivula 947bae24f9 Update Doxygen documentation
Add module information to all header files.

Update all header file documentations to briefly say what they are, and
to use the javadoc format so the brief actually gets included into the
doxygen documentation.

Remove \file from implementation files, in order to not repeat the info
from the header files.

Add files under strategies and tools to Doxygen and update the Doxygen
settings to be just plain better.

Make README be the main page of Doxygen documentation.
2015-12-17 14:05:50 +02:00
Arttu Ylä-Outinen 0e33049d9e Enable full mv search once again.
- Updates function search_mv_full so that it compiles and handles
  non-square blocks.
- Enables compilation of search_mv_full.
- Sets full search radius to 32.
- Enables selecting full mv search with "--me full".
2015-12-15 12:26:26 +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 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 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