Commit graph

3175 commits

Author SHA1 Message Date
Marko Viitanen 5aa04035d8 [LMCS] Fix a bug where floor_log2 function is used with 0 value 2021-05-27 08:39:58 +03:00
Joose Sainio 2df94f6a17 Fix rd=3 2021-05-27 08:39:41 +03:00
Marko Viitanen 9231ed4869 [LMCS] Update kvz_lmcs_preanalyzer inter side from VTM 2021-05-26 18:01:57 +03:00
Marko Viitanen d040a4238c [LMCS] Allocate LMCS images with the config flag since the actual enabled flag is checked later 2021-05-26 17:16:45 +03:00
Marko Viitanen bb12894575 [LMCS] Always allocate the LMCS APS struct to simplify things 2021-05-26 17:01:19 +03:00
Marko Viitanen a5ff9284a8 [LMCS] Enable LMCS per slice according to the pre-analyzer 2021-05-26 16:48:57 +03:00
Marko Viitanen be9776e40f Fix a bug causing tmvp related flag being written on intra frames 2021-05-26 14:31:34 +03:00
Marko Viitanen e9044bfbc5 [LMCS] free source_lmcs and rec_lmcs in encoder_state_encode (as done with normal source and rec) 2021-05-25 17:42:34 +03:00
Marko Viitanen 3dae3f072e [LMCS] Actually allocate the source_lmcs and rec_lmcs 2021-05-25 14:27:21 +03:00
Marko Viitanen e5684b0be1 [LMCS] Free rec_lmcs and source_lmcs in kvz_encoder_prepare 2021-05-25 14:04:06 +03:00
Marko Viitanen 252d5c7eaf [LMCS] Add top-level indicator for LMCS to know when we can free the images 2021-05-25 11:00:46 +03:00
Marko Viitanen c69d456040 [LMCS] Fix memory leak and remove debug printing 2021-05-24 22:23:45 +03:00
Marko Viitanen dbc7fd48bf [LMCS] Initialize some m_reshapeCW values to avoid division by zero 2021-05-24 18:57:37 +03:00
Marko Viitanen 73ac3b68bf [LMCS] add missing header in quant-avx2.c 2021-05-24 17:25:38 +03:00
Marko Viitanen 4cd5bc38a1 [LMCS] Luma mapping working after some rework, have to keep the reconstruction in the mapped domain 2021-05-24 17:23:17 +03:00
Marko Viitanen 88bec75306 [LMCS] keep the original reference data intact and keep lcu.rec in LMCS domain 2021-05-20 16:40:49 +03:00
Marko Viitanen 9b986c5359 [LMCS] fix division by zero 2021-05-20 16:38:46 +03:00
Marko Viitanen 3516972237 [LMCS] Move LMCS mapping / inverse to the source LCU data 2021-05-18 21:22:22 +03:00
Marko Viitanen c6746b709c [LMCS] Use calloc for lmcs_aps, makes it behave deterministic 2021-05-18 16:27:07 +03:00
Joose Sainio cfd7d2666b slightly optimize intra-generic.c 2021-05-14 10:23:37 +03:00
Marko Viitanen 178d62bde3 [LMCS] Move LMCS data structures under the frame 2021-05-12 11:42:34 +03:00
Joose Sainio 34fddeb85d Re-enable LUMA_MULT and CHROMA_MULT 2021-05-07 14:20:48 +03:00
Joose Sainio 132a8b3d96 Try to fix rd=0 for 4x4 blocks 2021-05-07 09:30:12 +03:00
Marko Viitanen f36c4e71ed [LMCS] Fix source_lmcs and rec_lmcs deallocation 2021-05-06 13:15:39 +03:00
Marko Viitanen d2670ccdc8 [LMCS] Create separate pictures for LMCS mapped pixels 2021-05-05 13:28:39 +03:00
Marko Viitanen 703cb155cb [LMCS] Disable aps_chroma_present_flag -> decoded with hash mismatch 2021-05-04 16:54:14 +03:00
Marko Viitanen e2ebfc946a [LMCS] Free lmcs_aps in correct place 2021-05-04 16:44:05 +03:00
Marko Viitanen 73908b5237 [LMCS] Run the reshaper contruction and fix an assert 2021-05-04 15:48:01 +03:00
Marko Viitanen d5abc3eb17 [LMCS] fix ReshapeCW.binCW array size 2021-05-04 12:17:59 +03:00
Marko Viitanen 19a3274770 [LMCS] Enable initial LMCS processing and APS writing 2021-05-04 12:04:22 +03:00
Joose Sainio 7674e94fd1 [rdoq] transform skip RDOQ
Copy the implementation from VTM
2021-05-03 12:52:10 +03:00
Marko Viitanen 69c1c3f4ea [LMCS] Add kvz_construct_reshaper_lmcs and related functions 2021-05-03 09:13:53 +03:00
Marko Viitanen 3fadd91fb5 [LMCS] Add an assert in deriveReshapeParametersSDR to remove static analyser warning 2021-04-30 16:41:06 +03:00
Marko Viitanen 915057c0c5 [LMCS] Replace some dynamic arrays with static 2021-04-30 16:37:00 +03:00
Marko Viitanen 81ec3c3a1a [LMCS] Converted kvz_lmcs_preanalyzer and related functions from VTM 2021-04-30 16:25:03 +03:00
Marko Viitanen 291ec70ccd [LMCS] Convert stats generation function kvz_calc_seq_stats from VTM 2021-04-30 11:38:15 +03:00
Joose Sainio d2b9893bb7 [transform skip] Fix misunderstanding that caused TS to use QP 52>= 2021-04-30 10:55:23 +03:00
Joose Sainio a998f3ed74 [transform-skip] Convert the HEVC transfrom skip to VVC
For some reason transform skip uses QP MAX(52, QP) and the coeffs are
no longer shifted
2021-04-30 10:55:23 +03:00
Joose Sainio 7ff904fd9d [transform-skip] Bitstream generation for transform-skip 2021-04-30 10:54:45 +03:00
Marko Viitanen 38eafbbf78 [LMCS] initial bitstream writing and LMCS structures 2021-04-30 10:04:41 +03:00
Marko Viitanen 3d9d1930d8 [LMCS] Add commandline option to enable LMCS 2021-04-30 09:51:41 +03:00
Joose Sainio 0cc1bf197f Add monochrome tests and fix monochrome 2021-04-23 13:50:09 +03:00
Joose Sainio 56f163357b Fix minor mistake in rewriting the history 2021-04-23 11:06:07 +03:00
Joose Sainio fda73ded4a Parameterize chroma qp scaling. 2021-04-23 10:57:30 +03:00
Joose Sainio 09b738061c Fix deblocking 2021-04-23 10:57:30 +03:00
Joose Sainio 4f0ce14e53 Make internal symbols static 2021-04-23 10:57:30 +03:00
Joose Sainio a12f99b7a3 Fix deblocking for luma 2021-04-23 10:57:29 +03:00
Joose Sainio 2ab005692d Enable 4x4 intra CUs 2021-04-23 10:57:29 +03:00
Joose Sainio d5a62c96b0 Properly implement chroma filtering 2021-04-23 10:57:29 +03:00
Joose Sainio e521a59cd5 Perform deblocking on 4x4 grid instead of 8x8 2021-04-23 10:57:29 +03:00
Joose Sainio 1aaa95601c Merge remote-tracking branch 'remotes/kvz_github/master' into Fix-monochrome
# Conflicts:
#	.gitlab-ci.yml
#	build/kvazaar_lib/kvazaar_lib.vcxproj.filters
#	src/cfg.c
#	src/encoder.h
#	src/kvazaar.h
#	src/rdo.c
2021-04-23 10:56:50 +03:00
Joose Sainio 764d23cdf5 Update entropy tables and correct order 2021-04-23 10:54:11 +03:00
Joose Sainio 119f80054a Update get_ic_rate 2021-04-23 10:53:20 +03:00
Joose Sainio 15b710f4f6 update calc_last_bits 2021-04-23 10:52:50 +03:00
Joose Sainio 27e46ab7f4 ctx_set was incorrect for second iteration of coefficient level estimation 2021-04-23 10:51:52 +03:00
Joose Sainio e8eab326fb Update context selection to match VVC 2021-04-23 10:51:01 +03:00
Joose Sainio 1fd583eae0 go_rice_param calculation fix 2021-04-23 10:49:31 +03:00
Joose Sainio 8049ebb597 Fix header writing for monochrome. WIP: checksum header still incorrect 2021-03-17 13:01:26 +02:00
Joose Sainio bdcf2210ed reverse 2021-03-17 08:23:07 +02:00
Joose Sainio 7929c4bfe5 Test c_lambda instead of CHROMA_MULT 2021-03-17 08:22:38 +02:00
Joose Sainio b2076d3b39 Enable chroma scaling
WIP: user defined scaling array
2021-03-16 10:31:26 +02:00
Joose Sainio 412781db41 [scalinglist] Fix quant-generic 2021-03-09 10:42:40 +02:00
Joose Sainio 21bc9aa3c2 [scalinglist] Fix memory leak 2021-03-09 10:04:11 +02:00
Joose Sainio 30e573c261 [scalinglist] WIP: Update scalinglist for VVC
Seems to work when rdoq is enabled but not when it is disabled
2021-03-09 09:51:49 +02:00
Ari Lemmetti dad3d6818e Only read left and right border pixels if necessary 2021-03-08 22:36:10 +02:00
Ari Lemmetti b72ab583b4 Handle "don't care" rows in the end separately 2021-03-08 22:36:09 +02:00
Ari Lemmetti 33295bf350 Use AVX2 luma interpolation for SMP and AMP as well 2021-03-08 22:36:09 +02:00
Ari Lemmetti 7ce68761c2 Add a reminder to fix a rare case for bipred 2021-03-08 22:36:09 +02:00
Ari Lemmetti 475f1d79d5 Add some defines for important interpolation related sizes 2021-03-08 22:36:09 +02:00
Ari Lemmetti 4314f3a9a7 Rename some interpolation functions and strategies for consistency 2021-03-08 22:36:08 +02:00
Ari Lemmetti 5a70b49f69 Require 64-bit build for AVX2 interpolation filter functions 2021-03-08 22:36:08 +02:00
Ari Lemmetti 5631651469 Remove unused functions and variables 2021-03-08 22:36:08 +02:00
Ari Lemmetti d8e7aac380 Do not use nonstandard extension for struct initialization. 2021-03-08 22:36:07 +02:00
Ari Lemmetti e38219e489 Fix epol_func signature and function definition 2021-03-08 22:36:07 +02:00
Ari Lemmetti 7e6ba9750f Add new AVX2 ip filters for chroma 2021-03-08 22:36:07 +02:00
Ari Lemmetti 3476fc62c7 Fix parameter to signed 2021-03-08 22:36:06 +02:00
Ari Lemmetti e572066e46 Add new AVX2 vertical ip filter for pixel precision 2021-03-08 22:36:06 +02:00
Ari Lemmetti 9e4b62a891 Use the new horizontal filter for pixel precision as well 2021-03-08 22:36:06 +02:00
Ari Lemmetti 2175023843 Relocate function 2021-03-08 22:36:06 +02:00
Ari Lemmetti f5b0e3c52b Add new AVX2 horizontal ip filter capable of every luma PB 2021-03-08 22:36:05 +02:00
Ari Lemmetti d9a3225ae5 Add new AVX2 vertical ip filter for high-precision 2021-03-08 22:36:05 +02:00
Ari Lemmetti 84222cf3e7 Replace old block extrapolation with more capable one.
Separate paddings for different directions can be now specified.
2021-03-08 22:36:04 +02:00
Jaakko Laitinen 845902062c Fix warning and limit intra qp offset to -3 2021-03-04 18:08:59 +02:00
Marko Viitanen 29dee4e32a [rdoq] implement more parts of rdoq like in VTM related to reg_bins value usage 2021-02-26 22:11:47 +02:00
Marko Viitanen 7dcf00d536 [rdoq] Change kvz_get_coeff_cost() to match current VTM 2021-02-26 20:43:33 +02:00
Marko Viitanen 467a3d97cc [rdoq] Update contexts to use correct chroma model 2021-02-26 20:26:08 +02:00
Marko Viitanen 6544c25daf [rdoq] improve the cost calculations and clean up unused code 2021-02-26 20:23:06 +02:00
Marko Viitanen d6379c02e0 [rdoq] implement kvz_get_ic_rate correct bit values 2021-02-26 20:23:06 +02:00
Marko Viitanen 3c75500cd4 Fix PSNR calculation, broken after the introduction of frame padding 2021-02-26 20:20:51 +02:00
Marko Viitanen c6baa8ad62 [rdoq] rename some contexts and add gt2 context template, change kvz_context_get_sig_coeff_group width -> cg_width
* RDOQ is not working as it should, but no longer tries to access incorrect memory locations
2021-02-25 13:41:47 +02:00
siivonek bf0bf73665 Fix mistake in define. 2021-02-16 20:21:33 +02:00
siivonek 6f455f29cc Add MINGW64 to define. Try to fix tsan test path error to suppressions.txt. 2021-02-16 15:44:18 +02:00
siivonek 9a65617a34 Disable thread exit call in encmain when MINGW is used. This should fix the issue with media auto-build suite. 2021-02-15 14:47:18 +02:00
Marko Viitanen e05dcdb193 Enable sign hiding in quant_avx2 and fix a bug in kvz_encode_coeff_nxn_generic() 2021-02-12 16:40:28 +02:00
Marko Viitanen 113b94f5e1 Add sh_sign_data_hiding_used_flag to slice header 2021-02-12 14:19:56 +02:00
Marko Viitanen 79c36f6aeb Enable RDOQ and sign hiding 2021-02-12 13:24:02 +02:00
Arttu Makinen 7098a94a6f Implemented implicit MTS.
Added selection of implicit MTS to command parameters.
Updated the transform selection to support implicit MTS.
2021-02-11 15:11:15 +02:00
Arttu Mäkinen 8f34685a8f Merge branch 'master' into 'mts'
# Conflicts:
#   src/cfg.c
#   src/kvazaar.h
2021-02-10 13:05:18 +02:00
Arttu Makinen c5570abe1b Removed 'emt' variable from cu_info_t and changed 'emt' globally to 'mts' for consistency. 2021-02-10 12:08:05 +02:00
Arttu Makinen d0b7dd95f7 MTS works on intra mode.
Fixed usage of MTS constraints.
Fixed DCT8 transforms.
Added sorting function of MTS modes with intra modes and costs to search.c.
2021-02-10 11:01:58 +02:00