Commit graph

139 commits

Author SHA1 Message Date
Marko Viitanen 5326519182 TMVP cleanup and const qualifier fixes 2016-08-10 14:10:43 +03:00
Marko Viitanen f40907260d Added config parameter for TMVP and cmdline option --no-tmvp
- Enabled by default
 - Cannot be used with GOP at the moment
2016-08-10 14:09:29 +03:00
Marko Viitanen fd52dac1f7 Fixed TMVP scaling 2016-08-10 14:09:28 +03:00
Marko Viitanen c5f2611a38 Fixes for TMVP to work with the new CU array 2016-08-10 14:09:28 +03:00
Marko Viitanen d85af5755b TMVP working when only 1 ref frame 2016-08-10 14:09:28 +03:00
Marko Viitanen adab8c327e Clean TMVP code 2016-08-10 14:09:20 +03:00
Marko Viitanen 5fa8226ac9 Temporal merge candidate selection 2016-08-10 14:09:20 +03:00
Marko Viitanen f83042f4a1 Temporal MV candidate selection 2016-08-10 14:09:19 +03:00
Marko Viitanen f8671581e3 Implemented function kvz_inter_get_temporal_merge_candidates() 2016-08-10 14:09:19 +03:00
Arttu Ylä-Outinen 2a946bd88e Rename encoder_state_t.global to frame
"Frame" is more accurate than "global" since when OWF is used, encoder
states for each frame have their own struct.
2016-08-10 13:22:36 +09:00
Arttu Ylä-Outinen 5fbb0a8c27 Fix includes 2016-08-10 13:05:40 +09:00
Arttu Ylä-Outinen 22cc97ffb1 Fix missing field initializers. 2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen d3c0e49286 Update comments. 2016-06-16 20:25:08 +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 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 98aa906f30 Drop field coded from cu_info_t
It can be inferred from the position and size of the CU.
2016-06-14 12:21:57 +09:00
Ari Lemmetti 10484bda9f Make strategies out of fractional pixel sample functions 2016-04-21 13:26:38 +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 Lemmetti f4538ab474 Copy pixels more efficiently in lcu recon. 2016-03-18 20:10:03 +02:00
Ari Koivula 1be877faf9 Fix chroma reconstruction with tiles
An incorrect frame boundary check caused a checksum error, because the
chroma reconstruction of the encoder was wrong. The encoder treated
horizontal tile boundaries as frame boundaries when the vertical
component of the movement vector was a multiple of 8.
2016-02-29 14:32:51 +02:00
Arttu Ylä-Outinen 49677810b5 Rename config module to cfg.
Prevents a conflict with config.h and src/config.h so that the config.h
generated by configure is included in global.h. Fixes problems with
large input files on 32-bit systems.
2016-01-25 12:26:46 +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 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 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 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 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 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
Arttu Ylä-Outinen f9f3d5929e Use macros for indexing cu_array in lcu_t.
Replaces accesses cu_array with macro calls and adds macros
LCU_GET_TOP_RIGHT_CU and CU_GET_CU.
2015-11-18 11:16:27 +02:00
Arttu Ylä-Outinen 8db8f3d523 Use macro SUB_SCU where possible.
Replaces expressions like (x & 0x3f) with SUB_SCU(x).
2015-11-18 11:16:26 +02:00
Arttu Ylä-Outinen 9532d79adb Add macros for indexing cu array in lcu_t.
- Adds macros LCU_GET_CU and LCU_GET_CU_AT_PX to cu.h.
- Replaces accesses to the cu array of lcu_t by calls to these macros.
2015-11-18 11:16:26 +02:00
Arttu Ylä-Outinen 39302b0328 Refactor inter_clear_cu_unused.
Replaces duplicated code with a for loop.
2015-11-18 11:16:26 +02:00
Arttu Ylä-Outinen 173b70b53f Rename SLICE_* enum constants to KVZ_SLICE_*. 2015-09-28 10:30:56 +03:00
Arttu Ylä-Outinen 3a10e9e3e0 Prefix all non-static symbols with "kvz_". 2015-08-26 13:02:28 +03:00
Ari Lemmetti febe66f148 Fix typo 2015-08-17 16:16:11 +03:00
Ari Lemmetti 6a5eaf08de Rename extend_borders to get_extended_block. Add kvz_ prefix to type definition. 2015-08-17 15:01:46 +03:00
Ari Lemmetti d82582c37c Changes to extend border function.
Now outputs a pointer to a block with guaranteed padding for filtering.
Only generate extra pixels if samples are needed out of bounds.
Use memcpy otherwise.
2015-08-17 15:01:46 +03:00
Ari Lemmetti 33b6481660 Remove unused variables. 2015-08-11 15:53:40 +03:00
Ari Lemmetti 5887c96991 Add and use 14bit reconstruction for fractional motion vectors with bipred 2015-08-10 18:45:29 +03:00
Ari Lemmetti 3e31ff2476 Use the function to sample half-pixels. 2015-08-10 18:30:41 +03:00
Ari Lemmetti 0a096c7040 Move qpel and octpel reconstruction in separate functions. 2015-08-10 18:25:52 +03:00
Ari Lemmetti fc00b4795c Preparations for more accurate reconstruction with bipred 2015-08-10 18:08:13 +03:00
Ari Lemmetti b30f17d4b8 Add fractional pixel sampling for chroma 2015-08-10 17:55:37 +03:00
Ari Lemmetti 01f40ec104 Add fractional pixel sampling for luma 2015-08-10 17:51:48 +03:00
Arttu Ylä-Outinen f7f17a060c Rename pixel_t to kvz_pixel. 2015-07-02 16:58:28 +03:00