Commit graph

1638 commits

Author SHA1 Message Date
Arttu Ylä-Outinen eb6fa3d980 Fix exporting functions in library.
Rewrites definition of macro KVZ_PUBLIC in kvazaar.h so that
KVZ_STATIC_LIB need not be defined when building a static library.
2015-12-21 14:38:59 +02:00
darealshinji 8427a85d36 Add tests 2015-12-19 08:24:35 +01:00
darealshinji fe2ff12244 fix building with autotools 2015-12-03 22:41:24 +01:00
darealshinji b6d3510c2e pkg-config: move -lm to Libs.private 2015-12-03 22:39:27 +01: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
Ari Lemmetti ee8c2d0218 Add 4x4 dual SATD for AVX2 2015-12-03 17:13:11 +02:00
Ari Lemmetti 00736fa708 Generate larger than 8x8 dual satd functions with macro 2015-12-03 17:13:11 +02:00
Ari Lemmetti bd3e1922cd Add AVX2 8x8 dual hadamard transform 2015-12-03 17:13:11 +02:00
Ari Lemmetti d575b94357 Implement generic functions for dual sad / satd 2015-12-03 17:13:11 +02:00
Ari Lemmetti 183ee53f47 Add alternative version of rough intra search.
Calculate two costs simultaneously to exploit larger SIMD registers.
Implementation for dual functions missing currently.
2015-12-03 17:12:38 +02:00
darealshinji 8ff28ec974 Make dynamic linking easier 2015-12-01 14:34:08 +01:00
Arttu Ylä-Outinen 21e19067fe Extract inter search in a single ref frame.
Moves code for doing inter search in a single reference frame from
function kvz_search_cu_inter to a new function search_cu_inter_ref.
2015-11-18 11:16:27 +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 33208ac9fb Add a comment explaining the cu array in lcu_t. 2015-11-18 11:16:25 +02:00
Arttu Ylä-Outinen e0b02599a5 Refactor filter_deblock_edge_ functions.
Replaces repetitive calls to kvz_filter_deblock_luma and
kvz_filter_deblock_chroma with loops in functions
filter_deblock_edge_luma and filter_deblock_edge_chroma.
2015-11-18 11:12:32 +02:00
Arttu Ylä-Outinen 43fc6ac419 Mark deblock functions static.
Marks the following functions static and removes them from filter.h
since they are not used outside the filter module.
- kvz_filter_deblock_luma
- kvz_filter_deblock_chroma
- kvz_filter_deblock_edge_luma
- kvz_filter_deblock_edge_chroma
- kvz_filter_deblock_cu
2015-11-18 11:12:31 +02:00
Arttu Ylä-Outinen c93a190940 Refactor deblocking filter functions.
- Replace parameter depth in kvz_filter_deblock_edge_{luma,chroma} with
  length.
- Move checking whether an edge needs to be filtered from functions
  kvz_filter_deblock_edge_{luma,chroma} to functions
  kvz_filter_deblock_{cu,lcu}.
- Use pixel coordinates instead of 8-pixel block coordinates in
  kvz_filter_deblock_cu.
- Add comments.

These changes should make it easier to modify the deblocking filter to
handle SMP and AMP blocks.
2015-11-18 11:12:31 +02:00
Arttu Ylä-Outinen 863bd1c55d Replace EDGE_ macros with an enum in filter.
Replaces macros EDGE_HOR and EDGE_VER with enum edge_dir.
2015-11-18 11:12:30 +02:00
Ari Koivula b6e443f3ce Fix bug in lp-gop parsing
Unnecessary mod operation resulted in 0 as the reference delta.
2015-11-16 11:58:57 +02:00
Ari Koivula cfe834bb53 Merge branch 'lowdelay_GOP'
Conflicts:
	README.md
2015-11-14 00:05:13 +02:00
Ari Koivula 5ae97b46c6 Remove redundant LP-GOP structures
These structures can now be defined with the LP-GOP syntax.
The syntax for lb is g4d3r4t1 and for ultralow it is g8d3r1t1.
2015-11-14 00:01:29 +02:00
Ari Koivula d2de2aa6aa Add "lp-g8d4r2t2" style GOP selection
This is my own syntax that I've been using when testing this feature.
It allows for defining some simple type of hierarchical GOP structures.
2015-11-14 00:01:28 +02:00
Ari Koivula b10866cb1e Fix SPS ref pic counts for lowdelay GOP 2015-11-13 23:11:11 +02:00
Ari Koivula a6a713ac02 Use P-slices for lowdelay GOPs 2015-11-13 23:11:11 +02:00
Ari Koivula 0722f461c5 Fix compiling tests on mac
The mac version of KVZ_GET_TIME macro has many statements, which
prevented it being used inside a for loop statement. Added brackets
to all versions to prevent this issue arising in the future.

Fixes #115.
2015-11-13 22:57:29 +02:00
Ari Koivula 93637f4683 Move macros in threads.h to KVZ_ namespace 2015-11-13 22:46:32 +02:00
Arttu Ylä-Outinen 95fb2ed9ed Fix unexpected behavior of --deblock option.
Giving a single number as an argument to --deblock option would enable
deblocking and set both beta and tc to that value. This commit changes
a single number argument to be interpreted as a boolean specifying
whether to enable deblocking or not. As a result, "--deblock 0" can be
now used to disable deblocking.

This fixes deblocking being enabled in all presets.
2015-11-13 14:22:42 +02:00
Arttu Ylä-Outinen 60ad19d0c8 Fix --deblock option.
Fixes --deblock option so that it takes a "beta:tc" argument as
advertised in the README and command line help.
2015-11-13 14:22:42 +02:00
Arttu Ylä-Outinen 8960ce369e Reject extra command line arguments.
Changes the command line program to print an error and exit instead of
silently ignoring non-option arguments.
2015-11-13 13:57:00 +02:00
Arttu Ylä-Outinen e42f1351f9 Call config_parse through the api struct in cli.
Replaces a call to kvz_config_parse with api->config_parse.
2015-11-09 14:31:04 +02:00
Arttu Ylä-Outinen 87ca9e1856 Drop an unnecessary call to kvz_threadqueue_flush.
Removes threadqueue dependency from the command line program.
2015-11-09 14:31:04 +02:00
Arttu Ylä-Outinen b1abe65e83 Move kvz_get_padding to encmain. 2015-11-09 14:31:03 +02:00
Arttu Ylä-Outinen 0eb1e710e6 Move PSNR computation from videoframe to encmain.
Moves function kvz_videoframe_compute_psnr to encmain and renames it to
compute_psnr. Removes videoframe dependency from the command line
program.
2015-11-09 13:50:43 +02:00
Arttu Ylä-Outinen 940ada4c0d Mark AVX2 intra filter functions as static.
Marks functions filter_4x4_avx2, filter_16x16_avx2 and filter_NxN_avx2
static as they are not used outside strategies/avx2/intra-avx2.
2015-11-09 12:48:20 +02:00
darealshinji f51e3847b6 Fix cross-building on Linux 2015-11-06 21:53:44 +01:00
Marko Viitanen 94bec1b444 Cleanup of mv-rdo, removed unused functions 2015-11-05 14:40:06 +02:00
Marko Viitanen 0cb57961b0 Use dynamically selected get_mvd_cost function for MV candidate selection 2015-11-05 14:31:37 +02:00
Marko Viitanen bb4f50aded Added mv-rdo commandline parameter and use it in presets 2015-11-05 13:59:30 +02:00
Marko Viitanen 4e7e9eefbf Enable usage of MV RDO with a config parameter (in hexbs, tz, frac, bipred) 2015-11-05 12:24:03 +02:00
Marko Viitanen 9a535e1c56 Added missing kvz_ prefixes and fixed some warnings 2015-11-05 09:07:59 +02:00
Marko Viitanen 822c174377 Set cabac to only count bits 2015-11-05 09:07:59 +02:00
Marko Viitanen 1ed0d85020 Added a function for cabac mvd coding cost get_mvd_coding_cost_cabac()
Conflicts:
	src/rdo.c
2015-11-05 09:07:59 +02:00
Marko Viitanen 6a2658cc74 Added calc_mvd_cost_cabac() to calculate real bits used for motion vectors
Conflicts:
	src/rdo.h
	src/search_inter.c

Conflicts:
	src/rdo.c
2015-11-05 09:07:59 +02:00
Ari Lemmetti fbd0596114 Merge branch 'avx2-pixels-blit' 2015-11-04 11:06:10 +02:00
Ari Lemmetti 57ea7d223b Pass SIMD registers to functions as pointers to fix 32-bit compilation in visual studio 2015-11-04 10:51:26 +02:00
Ari Lemmetti a3855652e9 Add AVX2 version with separate handling of basic blocks and strideless copy. 2015-11-04 10:07:25 +02:00