Commit graph

3374 commits

Author SHA1 Message Date
Marko Viitanen 64705a27ee [fme] Enable 1/16th luma pixel fme 2021-11-22 20:31:30 +02:00
Ari Lemmetti 9e40f435cb Fix array sizes to prevent ASAN errors (large block interpolation). 2021-11-22 17:44:00 +02:00
Ari Lemmetti 054dfdb51b Fix array sizes to prevent ASAN errors (large block interpolation). 2021-11-22 17:38:03 +02:00
Marko Viitanen 33fc02d879 [me] Fix MV scaling in TZ search 2021-11-22 13:35:52 +02:00
Marko Viitanen 25fb0dd3d9 [fme] Disable kvz_sample_quarterpel_luma_avx2() for now since it's causing asan problems 2021-11-22 13:17:49 +02:00
Marko Viitanen 867304970e [fme] Enable avx2 interpolation and fix some warning about shifting mv's
* Also switch mv int16_t to mv_t in many places
2021-11-22 10:38:18 +02:00
Marko Viitanen d183c78fad [fme] Change fracmv_within_tile() to use internal MV resolution 2021-11-22 10:06:38 +02:00
Ari Lemmetti 2bdfb3b536 Rename variables to be less misleading 2021-11-21 02:20:42 +02:00
Ari Lemmetti eb0f42aa96 Update comment 2021-11-21 02:11:50 +02:00
Ari Lemmetti 86b37a8e02 Minor formatting 2021-11-21 02:06:49 +02:00
Ari Lemmetti fd20462202 Fix more newlines... 2021-11-21 02:01:57 +02:00
Ari Lemmetti 40ca21d221 Consistent naming part 3 2021-11-21 01:04:14 +02:00
Ari Lemmetti 6c0bdb45b9 Consistent naming part 2 2021-11-21 00:58:52 +02:00
Ari Lemmetti a68d73674b Consistent naming part 1 2021-11-21 00:32:01 +02:00
Ari Lemmetti 8f0e96162a Formatting 2021-11-20 23:33:57 +02:00
Ari Lemmetti a236b32c52 Fix newlines 2021-11-20 23:14:31 +02:00
Ari Lemmetti 5225dcea3c Implement missing block sizes. Fix types and conditions. 2021-11-20 22:53:37 +02:00
Marko Viitanen ad8bad3f94 [inter] Scale x and y correctly in fracmv_within_tile() 2021-11-19 17:51:46 +02:00
Marko Viitanen 8841ed9c21 [inter] Fix fracmv_within_tile() assert to use correct mv resolution 2021-11-19 17:37:11 +02:00
Marko Viitanen 4d20461410 [inter] Limit merge search of some blocks with sub 1/4 pixel mv's 2021-11-19 17:28:13 +02:00
Marko Viitanen fa9a1db498 [inter] Fix mv precision in many places and add more mv_t usage and new vector2d_t rounding function 2021-11-19 16:20:49 +02:00
Marko Viitanen 5020f5f742 [inter] Fix incorrect mv scaling in unipred and change more mv types to mv_t 2021-11-18 11:49:08 +02:00
Marko Viitanen 21d7d2e4ed [inter] Remove MV rounding from kvz_inter_get_merge_cand() and add it to where merge cand are used
* Should be adapted to AMVR later
 * merge candidates match VTM at full precision
2021-11-18 11:09:26 +02:00
Marko Viitanen bf06538f33 [inter] Change internal MV precision to "INTERNAL_MV_PREC" and add new type mv_t 2021-11-18 09:49:12 +02:00
Ari Lemmetti 5389842675 Add missing SIMD bipred functions for AMP blocks with size of 12 or larger 2021-11-17 21:33:13 +02:00
Marko Viitanen c4a9d3dc83 [amvr] Add cmd line parameter for amvr and a field to the cu_array_t for setting it
* Still hardcoded too QPEL
2021-11-17 14:53:30 +02:00
Marko Viitanen 757772e8c4 [inter] Disable AMVR by default
* Can be used to reduce cost on signalling motion vectors later
2021-11-16 17:38:38 +02:00
Marko Viitanen d4902cc840 [inter] Implement Adaptive Motion Vector Resolution bits, the resolution still in fullpel 2021-11-16 17:18:29 +02:00
Ari Lemmetti e3aadd4272 Add missing things after rebase 2021-11-15 21:48:43 +02:00
Marko Viitanen a91c9bd095 Fix sse41 ver_sad_arbitrary() reading over the boundary and disable ver_sad_w12(), since it always reads 16 bytes
* This fixes valgrind complaining about using uninitialised values
2021-11-15 12:42:29 +02:00
Marko Viitanen 9e0491ee79 [inter] Remove the deprecated B-priority list merge candidate selection 2021-11-10 15:56:54 +02:00
Marko Viitanen f6011cf850 [inter] Fix inter_pred_idc signalling 2021-11-10 12:54:33 +02:00
Marko Viitanen 1656202dbc [inter] Fix ref pic list signalling with GOP 2021-11-10 12:54:04 +02:00
Marko Viitanen 901bf561ff [inter] Fix HMVP mv candidate derivation for more than one reference frame 2021-11-10 09:33:12 +02:00
Marko Viitanen 907fa6a36a [inter] Fix how references are signalled for PU 2021-11-09 09:05:45 +02:00
Ari Lemmetti 146298a0df New AVX2 block averaging *WIP* missing small chroma block and SMP/AMP 2021-11-08 23:01:13 +02:00
Ari Lemmetti ef69c65c58 New bipred average functions 2021-11-08 23:01:12 +02:00
Ari Lemmetti f47bd5d86f Rename some bipred functions 2021-11-08 23:01:12 +02:00
Ari Lemmetti b52a930bed About working with generics 2021-11-08 23:01:12 +02:00
Ari Lemmetti e7857cbb24 Remove avx2 blending 2021-11-08 22:45:45 +02:00
Marko Viitanen 4a42b5cbc4 [cleanup] Remove HMVP debug code and extra arrays in intra coding 2021-11-08 10:11:17 +02:00
Marko Viitanen c9d8412682 [inter] use Merge regions to limit the merge candidates 2021-11-08 09:51:23 +02:00
Marko Viitanen 6944437e98 Disable top-right CU copy to LCU when WPP is used, since it's not available 2021-11-08 09:43:53 +02:00
Marko Viitanen aea4e349f5 [inter] Implement HMVP LUT updates during the search 2021-11-05 13:13:11 +02:00
Marko Viitanen 30d97d9af6 [inter] Implement pairwise-average candidates for merge candidates
- Half-pel candidates are skipped for now because it needs some special handling
2021-11-01 13:24:23 +02:00
Marko Viitanen 4a7e4e3e20 [inter] Add HMVP to merge candidate list 2021-10-29 14:19:20 +03:00
Marko Viitanen 41c1b6172c [inter] Fix picture headers for P/B slices and disable some features in tests 2021-10-29 10:30:12 +03:00
Marko Viitanen 73c4128100 [quant] Map scalinglistType correctly 2021-10-29 09:10:15 +03:00
Marko Viitanen 492d22e8be Disable interpolation AVX2 optimizations for now 2021-10-29 08:43:52 +03:00
Marko Viitanen 852da3c4f0 [inter] Fix overflow in HMVP shifting 2021-10-29 08:36:34 +03:00
Marko Viitanen e2bdf02acc [inter] fix merge_candidates_t initialization 2021-10-26 11:50:32 +03:00
Marko Viitanen b0e6ab9f96 [inter] MVP candidate order fix and limit b0 with wpp 2021-10-25 22:57:58 +03:00
Marko Viitanen 112ce66259 [inter] Disable merge and skip modes -> inter working 2021-10-25 11:26:07 +03:00
Marko Viitanen 08766c0bb3 [inter] Fix max-merge usage 2021-10-25 11:25:23 +03:00
Marko Viitanen 899c672ed1 Make sure the dpb is more than max_num_reorder_pics 2021-10-19 10:16:04 +03:00
Ari Lemmetti d4880be6f2 Compute proper count of buffered frames for vps and sps. Use common function. 2021-10-19 02:34:32 +03:00
Marko Viitanen cc22233117 Change version to v2.1.0 2021-10-13 15:24:01 +03:00
Marko Viitanen 57883369ca Change all the license texts in source headers and LICENSE file to 3-clause BSD, closes #302
* All now have the same exact text string
2021-10-13 15:22:46 +03:00
Marko Viitanen b68625b869 Add correct reorder and buffering values to VPS, as they were only in SPS 2021-10-13 10:54:35 +03:00
Marko Viitanen 7918628b8e Offset output dts by -1 when num_out >= gop_len, otherwise there will be a gap of 2 dts. Fixes #310 2021-10-11 11:18:58 +03:00
Marko Viitanen 7a5eb7712b Fix merge candidate derivation order 2021-10-08 16:34:02 +03:00
Marko Viitanen a39bc69482 Move HMVP arrays to more suitable place 2021-10-08 16:33:32 +03:00
Marko Viitanen f68ba68fb2 Push HMVP item also when coding a skipped cu 2021-10-08 16:29:15 +03:00
Marko Viitanen b8ba814909 Fix mv cand selection from HMVP -> working if no merging 2021-10-08 16:29:15 +03:00
Marko Viitanen 76a7294e35 Implement HMVP look-up-table functions 2021-10-08 16:29:14 +03:00
Marko Viitanen c4dcabe95b Add config parameter "parallel_merge_level" and array for hmvp 2021-10-08 16:28:54 +03:00
Marko Viitanen cb9f9381c3 [inter] Fix inter reconstruction, correct function was in wrong branch 2021-10-08 14:48:49 +03:00
Marko Viitanen 78363ccab0 Replace bitstream->simulation with cabac->only_count 2021-09-14 17:44:56 +03:00
Marko Viitanen 19ff5a21ca [alf] Fix a problem with alf and not updating the cabac contexts
* Added a bitstream coding simulation after LCU search
2021-09-14 10:03:23 +03:00
Marko Viitanen 3bbb3b7e36 [thread] Add correct wavefront dependencies when ALF is used 2021-09-13 21:34:14 +03:00
Marko Viitanen aa36c1e86b [thread] change wavefront dependencies to depend on bitstream writing instead of recon
* Possible fix for non-deterministic behaviour
2021-09-13 20:37:31 +03:00
Marko Viitanen 5271659f76 [inter] write ref pic list to the bitstream 2021-09-08 13:50:35 +03:00
Ari Lemmetti 171b9c60b3 [SIMD] Convert planar and DC mode PDPC loops to AVX2 2021-09-08 03:40:38 +03:00
Ari Lemmetti ad35d4a4c8 [SIMD] Loop transformation, prepare data for latter loop 2021-09-06 22:38:37 +03:00
Ari Lemmetti 22da8cfe65 [SIMD] Loop transformations for SIMD processing 2021-09-06 22:30:36 +03:00
Ari Lemmetti c195d906d3 [SIMD] Copy generic implementation of planar/DC PDPC as a skeleton 2021-09-06 21:20:51 +03:00
Ari Lemmetti c6b33c7b92 [SIMD] Move PDPC condition out of strategy 2021-09-06 21:20:51 +03:00
Ari Lemmetti 46cf9b6871 [SIMD] Make strategy out of PDPC for planar and DC 2021-09-06 21:20:51 +03:00
Ari Lemmetti 816e7a5a91 [SIMD] Replace PDPC remainder loop with masking operations 2021-09-06 21:20:51 +03:00
Ari Lemmetti 1926b4cc27 [SIMD] Initial AVX2 code for transpose in angular prediction 2021-09-06 21:20:50 +03:00
Ari Lemmetti 913573baca [SIMD] Initial AVX2 code for PDPC in angular prediction 2021-09-06 21:20:50 +03:00
Ari Lemmetti 7ccd1a571c [SIMD] Initial AVX2 code for 4-tap filtering in angular prediction. 2021-09-06 21:20:50 +03:00
Ari Lemmetti 20f0ff976d [SIMD] Transform angular pred loops for SIMD processing. 2021-09-06 21:20:49 +03:00
Ari Lemmetti 3dfe09e850 [SIMD] Copy generic implementation of angular prediction as a skeleton. 2021-09-06 21:20:46 +03:00
Joose Sainio 450cbd356c Merge branch 'joint_cbcr' into 'master'
[jccr] Add joint coding of chroma residual

See merge request cs/ultravideo/vvc/uvg266!6
2021-09-06 11:43:06 +03:00
Joose Sainio 91374e95a9 [MTS] Move chroma outside of mts search 2021-09-06 11:28:33 +03:00
Joose Sainio 276f0bf006 [jccr] fix undefined behaviour that did not really affect anything 2021-09-06 11:28:33 +03:00
Joose Sainio 3a73abd264 [jccr] disable jccr for blocks when tr-depth != depth, i.e. 64×64 2021-09-06 11:28:32 +03:00
Joose Sainio 0592cc65a0 [jccr] enable rdoq with jccr 2021-09-06 11:28:20 +03:00
Joose Sainio 072b84711a [jccr] fix 64×64 CUs 2021-09-06 11:28:20 +03:00
Joose Sainio 29d86aea84 [jccr] cmdline option 2021-09-06 11:28:08 +03:00
Joose Sainio 042b5078d8 [jccr] WIP initial implementation
Add somekind of search for joint chroma residual coding.
Bitstream is currently correct but prediction is incorrect because the jccr
is actually not used in the search.

Hard coded to be enabled
2021-09-06 11:28:08 +03:00
Marko Viitanen 839b9527af Fix nal unit debug printing when VERBOSE is used 2021-09-01 14:28:07 +03:00
Marko Viitanen 26f18865f7 [alf] Change the processing in alf_get_blk_stats_avx2() to allow utilizing the whole 256bit register 2021-08-27 13:40:28 +03:00
Marko Viitanen fdf125f406 [alf] Fix incorrect conversion in alf_get_blk_stats_avx2 2021-08-27 10:25:20 +03:00
Marko Viitanen 6714973264 [alf] Change _mm_store_si128 to _mm_storeu_si128 in alf_get_blk_stats_avx2() 2021-08-26 18:05:06 +03:00
Marko Viitanen 5df8add046 [alf] Change order of alf_covariance.y array for better AVX2 optimization in alf_get_blk_stats_avx2() 2021-08-26 15:37:01 +03:00
Marko Viitanen be9527cf1d [alf] Change the order of alf_covariance.ee values to get better optimized solution for alf_get_blk_stats_avx2() 2021-08-26 11:07:13 +03:00
Marko Viitanen f4de5cfd0f [alf] Cleanup alf_calc_covariance_avx2() and use integers in alf_get_blk_stats_avx2() 2021-08-26 10:20:57 +03:00
Marko Viitanen 915bf3ca24 [alf] Fix AVX2 priority 2021-08-25 20:29:58 +03:00
Marko Viitanen 8ef3e6a126 [alf] Add strategy for alf_get_blk_stats() and an initial AVX2 version 2021-08-25 20:22:24 +03:00
Marko Viitanen f61b9138cd [alf] Import SSE4.1 optimized 5x5 and 7x7 filters from VTM13
* Modified to work with 8-bit pixels
2021-08-25 11:50:37 +03:00
Marko Viitanen dc6a29b0d8 [alf] Initial generic strategies for 5x5 and 7x7 filtering 2021-08-25 10:50:00 +03:00
Marko Viitanen c3c96d69c2 [alf] Add modified alf_derive_classification_blk_sse41() from VTM 13.0
* Modified to work with bitdepth 8
2021-08-20 11:45:02 +03:00
Marko Viitanen b158d05bca [alf] rename strategy function to include prefix 2021-08-19 17:19:17 +03:00
Marko Viitanen 3efaeede76 [alf] Define the strategy for alf_derive_classification_blk() 2021-08-19 17:04:35 +03:00
Marko Viitanen dee8a167e4 Clean up entropy tables and some unused code / comments 2021-08-17 10:31:14 +03:00
Marko Viitanen 9e9a8058c5 [alf] Allocate alf covariance and classifier memory only when needed 2021-08-15 10:44:05 +03:00
Marko Viitanen 2007132937 [alf] Make the alf structs a bit more memory efficient 2021-08-15 10:44:04 +03:00
Marko Viitanen d742f57779 Remove angular_pred_avx2 so we don't need extra parameter 2021-08-15 10:43:48 +03:00
Marko Viitanen ef287ee00c [alf] Add math.h header to alf.c for sqrt() 2021-08-15 10:41:55 +03:00
Marko Viitanen b5bc981d2a Add entropy bits back to intra luma mode cost
* Makes things better after the entropies were fixed
2021-08-15 08:10:45 +03:00
Marko Viitanen 1e925ec980 [rdoq] fix kvz_ts_rdoq error scale 2021-08-14 22:52:32 +03:00
Marko Viitanen 8fcf5cf55c [rdoq] Fix a lot of things
* Fix entropy table
* fix float entropy
* use dest_coeff instead of coef in ctx_idx_abs calculation
* Calculate new ctx_sig in correct place
2021-08-14 22:12:08 +03:00
Marko Viitanen b412a96820 [cleanup] Change mentions of Kvazaar to uvg266 in README.md and remove crypto parameters 2021-07-27 10:18:45 +03:00
Marko Viitanen 5604b6f946 [cleanup] remove all crypto related stuff, fix warnings, move estimate.m to tools/ 2021-07-27 09:27:51 +03:00
Marko Viitanen 99a2b0384d [cleanup] remove some warnings 2021-07-26 11:42:19 +03:00
Marko Viitanen 226d7a9f53 [alf] remove alf clipping functions and free tqj_alf_process also when new job is allocated 2021-07-26 11:21:57 +03:00
Marko Viitanen eb491ecea2 [alf] free state->tqj_alf_process to not leak memory 2021-07-26 10:26:50 +03:00
Marko Viitanen 0f8f422ad6 [alf] use correct lcu index with wpp and use proper cabac context for alf search 2021-07-25 20:19:17 +03:00
Marko Viitanen 90ed51a6ad [alf] remove encoder_state_worker_encode_lcu since it is not used 2021-07-23 21:58:36 +03:00
Marko Viitanen 070dcc1924 [alf] fix alf_info passing to sub_states 2021-07-23 21:54:52 +03:00
Marko Viitanen dc6862051e [alf] Initialize all the alf tables in one place 2021-07-23 21:44:09 +03:00
Marko Viitanen 9e70707fba [alf] Add new wf_recon_jobs and change search/bitstream writing to use local coeff instead of state->coeff 2021-07-23 10:40:19 +03:00
Marko Viitanen b538f33838 [alf] add new thread queue job alf_process ran before the final bitstream writing 2021-07-22 23:21:00 +03:00
Marko Viitanen 20041740f2 [alf] move parameters to state and fix some static variables causing problems in multithreading 2021-07-22 23:18:56 +03:00
Marko Viitanen 3146f2d17f [alf] Add job for ALF processing just before writing the bitstream out 2021-07-22 18:46:53 +03:00
Marko Viitanen c188b1fdf9 [alf] Use correct LCU count 2021-07-22 18:45:33 +03:00
Marko Viitanen 0cad1ac3c9 [mts] Add a comment about idct8/idst7 16x16 being unoptimized 2021-07-21 14:02:23 +03:00
Marko Viitanen d5ef036d35 [mts] change mts_subset tables back to static 2021-07-21 13:54:59 +03:00
Marko Viitanen 60caf2c378 [mts] fix 32x32 idst/idct 2021-07-21 13:44:25 +03:00
Marko Viitanen c2cd5fb98e [mts] replace AVX2 DST7/DCT8 16x16 with unoptimized for now 2021-07-21 13:38:17 +03:00
Marko Viitanen 7e089f518d [mts] add optimized versions of DCT8 and DST7, inverse not yet working properly
* Includes new unit tests for the mts
2021-07-21 11:53:15 +03:00
Marko Viitanen 7f67009511 Fix MD5 calculations from HEVC to VVC way 2021-06-24 15:03:29 +03:00
Marko Viitanen c9e48f253d Fix hash message with monochrome 2021-06-24 14:48:48 +03:00
Marko Viitanen 1d436844da Remove duplicated code from kvz_rdoq 2021-06-24 13:20:02 +03:00
Marko Viitanen ca0c357268 [rdoq] Fix chroma bit calculations to include >>3 for width and height 2021-06-24 13:19:20 +03:00
Marko Viitanen c004735821 [LMCS] Fix casting of the chroma scaled residual 2021-06-18 09:35:06 +03:00
Marko Viitanen b22fd61c7f [intrapred] Change kvz_luma_mode_bits to make it return more correct costs 2021-06-18 09:35:06 +03:00
Joose Sainio cfffd7166c Use correct context for calculating coeff costs for transform skip 2021-06-07 13:06:03 +03:00
Marko Viitanen 4594bf0ca8 Merge branch 'lmcs_chroma' 2021-06-02 15:05:04 +03:00
Marko Viitanen cc6ff368df [LMCS] Store calculated chroma scaling values for speedup 2021-06-02 09:33:45 +03:00
Marko Viitanen 5babb14ee7 [LMCS] Use chroma scaling 2021-06-01 12:17:03 +03:00
Marko Viitanen fad11a5c92 [LMCS] Import LMCS chroma functions from VTM13.0 2021-06-01 09:01:55 +03:00
Joose Sainio f9de8ebc4f Merge branch 'master' into '4x4-rd'
# Conflicts:
#   src/encoder.c
#   tests/test_intra.sh
2021-05-28 11:43:55 +00:00
Marko Viitanen ddea6d73c9 [LMCS] Fix blank references in some cases by selecting between source_lmcs and source in init_lcu_t() 2021-05-28 10:57:25 +03:00
Marko Viitanen 96a12d9830 Disable SPS extension writing if they are not used -> compatible with VTM 11 and 13 2021-05-28 10:17:19 +03:00
Marko Viitanen 1bbe1204e4 [LMCS] set ph_lmcs_enabled_flag according to the sliceReshaperEnableFlag 2021-05-27 16:09:34 +03:00
Marko Viitanen 4ea9bee0b6 Add rrc_rice extension flags to make bitstream correct with VTM 13.0 and update the CI VTM binary 2021-05-27 11:37:07 +03:00
Marko Viitanen 5aa04035d8 [LMCS] Fix a bug where floor_log2 function is used with 0 value 2021-05-27 08:39:58 +03:00