Commit graph

1992 commits

Author SHA1 Message Date
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
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
Arttu Ylä-Outinen 9870dd04bc Merge pull request #116 from darealshinji/shared-target
Make dynamic linking easier
2015-12-02 14:41:05 +02:00
darealshinji 8ff28ec974 Make dynamic linking easier 2015-12-01 14:34:08 +01:00
Arttu Ylä-Outinen ec7c84f7e0 Merge branch 'refactor-stuff' 2015-11-23 09:47:43 +02: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 3c0d72a549 Disable VS warnings in tests
Disable warnings about conditions being always true, as they come from the
framework.
2015-11-13 22:49:23 +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 bd57409f80 Merge branch 'prepare-to-link-with-shared-lib' 2015-11-10 16:38:57 +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 d68cec25df Merge branch 'external-symbols-check' 2015-11-09 12:49:24 +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
Arttu Ylä-Outinen 31f733964f Enable AVX2 in external symbols check on travis.
Some symbols do not get compiled into the library when AVX2 is disabled.
2015-11-09 12:48:19 +02:00
Arttu Ylä-Outinen aaacd9f868 Add a travis test for checking external symbols.
Adds a test which lists symbols in the static library and fails if any
global symbol does not have the kvz_ prefix.
2015-11-09 12:48:19 +02:00