siivonek
59a86f339e
[mip] Implement MIP search.
2022-02-09 12:55:16 +02:00
siivonek
e672f9b24a
[mip] Implement MIP functions.
2022-02-09 12:55:15 +02:00
siivonek
0b9568b466
Re-add debug files to project file filters. Makefile spaces to tabs.
2022-02-09 12:55:15 +02:00
siivonek
cb2ccce753
[mip] WIP Implement mip functions.
2022-02-09 12:55:15 +02:00
siivonek
3bbef3dff6
[mip] Add mip weight matrices.
2022-02-09 12:55:15 +02:00
siivonek
746ae8ab85
[mip] WIP Implement mip functions.
2022-02-09 12:55:15 +02:00
siivonek
07d78e07a6
[mip] Add defines.
2022-02-09 12:55:15 +02:00
siivonek
e7da0712e5
[mip] Add commandline option for MIP.
2022-02-09 12:55:15 +02:00
Ari Lemmetti
917d26f1bf
Unify delta QP / ROI map functionality.
2022-02-08 20:15:27 +02:00
Jaakko Laitinen
25a8a40de0
Merge branch 'deblock_fix' into 'master'
...
[Deblock] Fix deblock when using inter
See merge request cs/ultravideo/vvc/uvg266!8
2021-12-31 14:41:06 +02:00
Jaakko Laitinen
57d8623931
[Deblock] Fix B-frame detection
2021-12-30 16:18:43 +02:00
Jaakko Laitinen
fe9d673b2a
[Deblock] Fix Luma issue
...
mvdThreashold set incorrectly
2021-12-29 17:26:00 +02:00
siivonek
4ffef711d7
Merge branch 'intra_mrl_cost'
2021-12-15 15:51:19 +02:00
Marko Viitanen
2545081be5
[threading] Added more margin to fracmv_within_tile() because of nondeterministic behaviour
2021-12-14 11:16:43 +02:00
Marko Viitanen
2cdeff75cb
[debug] Add debug.c/.h to visual studio project and some debugging options
2021-12-14 11:15:35 +02:00
Joose Sainio
6c50939af3
Different roi-matrix for each frame
...
Implement reading the roi-matrix for each frame from binary file. Extremely simple and breaks on any unhappy paths.
# Conflicts:
# src/cfg.c
# src/cli.c
# src/encoder.c
# src/image.c
# src/rate_control.c
2021-12-12 22:13:05 +02:00
Jaakko Laitinen
77457391b4
[Deblock] Refactor deblock pixel gather
...
Refactor deblock pixel gather for large blocks to be less confusing.
2021-12-10 19:05:43 +02:00
Marko Viitanen
dce5c2b293
[threading] Add dependency to one more CTU to the right
...
* in VVC the conditions for limiting motion vectors might not have been correct
* x + 1 and y + 1 CTU dependency did not mean that x + 2 would be available, as in HEVC
2021-12-10 16:07:34 +02:00
Jaakko Laitinen
9e95b16368
[Deblock] Fix chroma deblocking issues when inter is enabled
...
Added cbf_copy() calls for chroma components in the lcu_fill_cbf() function since deblocking now uses that information for chroma as well.
2021-12-10 15:30:47 +02:00
Ari Lemmetti
51dd942778
Fix uninitialized fields of CU/PU infos.
2021-12-10 00:32:08 +02:00
Ari Lemmetti
2424a976a4
Prevent using uninitialized memory
2021-12-10 00:21:58 +02:00
Ari Lemmetti
e45c6a9c68
Fix too few added keys in inter search stats.
...
The function search_pu_inter_bipred may add more PUs than there are reference pictures.
2021-12-10 00:03:37 +02:00
siivonek
236265a1f4
[mrl] Implement MRL bitcost calculation.
2021-12-09 16:43:25 +02:00
Ari Lemmetti
a1a7036445
Fix indexing. Get rid of warning about jump depending on uninitialized value.
2021-12-08 23:06:39 +02:00
Ari Lemmetti
bb1f2a0895
Reorder condition to prevent indexing past the array
2021-12-08 21:13:25 +02:00
Ari Lemmetti
e87b12dec1
Move mv_cand initialization to better place
2021-12-08 21:09:16 +02:00
Ari Lemmetti
f17a500b77
Get rid of warnings. (Unused variables, suggested parentheses)
2021-12-08 21:06:12 +02:00
Ari Lemmetti
c411e65977
Prevent FME and bipred from the same reference picture if present in L0 and L1
2021-12-08 20:35:03 +02:00
Ari Lemmetti
49935710a8
Only one ME per reference picture (same ref in L0 and L1)
2021-12-08 16:35:47 +02:00
Ari Lemmetti
ae498553c0
Add define MAX_UNIT_STATS_MAP_SIZE. Add assertions to inter search.
2021-12-08 15:53:31 +02:00
siivonek
dea3ca12aa
Merge branch 'intra_mrl'
2021-12-08 15:51:50 +02:00
Ari Lemmetti
1af90b194e
Add missing bits to RD costs.
2021-12-08 15:34:05 +02:00
Ari Lemmetti
706d718d5d
Perform FME for n best PUs from L0 and L1.
2021-12-08 15:34:05 +02:00
Ari Lemmetti
7f7112cc57
Use up-to-date value of mv dir for bit cost calculations
2021-12-08 15:34:04 +02:00
Ari Lemmetti
4e19f7b71e
Move mode decision logic and current PU setting to higher-level functions
2021-12-08 15:34:04 +02:00
Ari Lemmetti
3e967c0077
Add missing assertion and set cu before
2021-12-08 15:34:04 +02:00
Ari Lemmetti
bdece66dc4
Compare the final costs only once and then set the current CU
2021-12-08 15:34:04 +02:00
Ari Lemmetti
0b223b24f2
Fix comment
2021-12-08 15:34:03 +02:00
Ari Lemmetti
4d02b69c4e
Set CU type in inter search functions
2021-12-08 15:34:03 +02:00
Ari Lemmetti
2b9b398524
Remove now unnecessary state store/restore
2021-12-08 15:34:03 +02:00
Ari Lemmetti
3a219146ed
Rename some variables
2021-12-08 15:34:03 +02:00
Ari Lemmetti
dc4676eef1
Remove merge attempts from bipred functions
2021-12-08 15:34:03 +02:00
Ari Lemmetti
adb31ce959
Use the new struct for bipred refinement as well
2021-12-08 15:34:02 +02:00
Ari Lemmetti
70a393a3dc
Set mv candidates before cost calculations for bipred. Use the new struct for bipred.
2021-12-08 15:34:02 +02:00
Ari Lemmetti
574d6c4593
Eliminate copy-paste logic from different ME algorithms.
2021-12-08 15:34:02 +02:00
Ari Lemmetti
d28c2295dc
The best_* fields are no longer used to track anything. Convert costs to double.
2021-12-08 15:34:02 +02:00
Ari Lemmetti
9905cd42d6
Rename "indx" to "keys". There are too many "indices" already.
2021-12-08 15:34:01 +02:00
Ari Lemmetti
5edb82648a
More intuitive logic for computing RD costs and bit costs for SMP
2021-12-08 15:34:01 +02:00
Ari Lemmetti
aca9192054
Move cu_info_t initializations to search_pu_inter. Rename cur_cu cur_pu.
2021-12-08 15:34:01 +02:00
Ari Lemmetti
8406942d06
Improve the new data structure a bit. Use also for merge candidates.
2021-12-08 15:34:01 +02:00
Ari Lemmetti
94096dd175
Ignore merge candidates when computing AMVP motion vector costs.
2021-12-08 15:34:00 +02:00
Ari Lemmetti
48773b0d25
Replace and relocate deprecated cost and mode parameter tracking.
2021-12-08 15:34:00 +02:00
Ari Lemmetti
1940f0880f
Add amvp unipredictions to both lists if reference picture is present
2021-12-08 15:33:57 +02:00
siivonek
64e6eb1f28
[mrl] Clean old commented mrl code.
2021-12-08 15:21:43 +02:00
Marko Viitanen
c6b9e19b2f
[mrl] Fix kvz_intra_build_reference_inner() top reference building for mrl
2021-12-08 15:00:27 +02:00
Marko Viitanen
0dcd6dbec0
[mrl] Fix kvz_angular_pred_avx2() for mrl and enable cpuid in CI
2021-12-08 14:48:44 +02:00
Marko Viitanen
05e55f7fea
[mrl] Simplify and fix kvz_intra_build_reference_inner() for mrl cases
2021-12-08 14:39:47 +02:00
Marko Viitanen
04cb32be91
[mrl] Use kvz_intra_build_reference_inner() with MRL since WPP fixes have been made there
2021-12-08 11:39:20 +02:00
siivonek
3a81a389c3
[mrl] Fix issues transmitting multi ref idx during search. Change multi ref idx type to uint.
2021-12-06 19:23:57 +02:00
Marko Viitanen
f501465e8d
[debug] Add yuview debug output for transform skip
2021-12-03 19:38:50 +02:00
Marko Viitanen
545fc305e7
[cleanup] Remove unused variables in trskip coding functions
2021-12-03 17:23:19 +02:00
Marko Viitanen
46af1536ee
[trskip] Signal sig coeff group correctly for the transform skip when blocksize > 4x4
2021-12-03 17:17:06 +02:00
Marko Viitanen
fe7aff90b7
[mts] Signal MTS with inter blocks
2021-12-03 11:00:07 +02:00
Marko Viitanen
1dd378e851
[cleanup] Remove deprecated width and height parameters and other small changes
...
* change some mentions of Kvazaar to uvg266
* remove cfg.framerate
2021-12-02 23:09:40 +02:00
Marko Viitanen
3a447e09c2
[trskip] Allow changing the max tr-skip size
2021-12-02 22:56:07 +02:00
Ari Lemmetti
2ed434e57b
Remove now deprecated array
2021-12-02 20:00:19 +02:00
Ari Lemmetti
90c0a708a7
Add new structs for storing statistics during the search. Use in AMVP search.
2021-12-02 20:00:19 +02:00
Ari Lemmetti
936fb76685
Remove merge candidate stuff from search_pu_inter_ref
...
There is a separate merge analysis now
2021-12-02 20:00:19 +02:00
Ari Lemmetti
3265d45a4e
Temporarily remove FME threshold for verification purposes
2021-12-02 20:00:18 +02:00
Ari Lemmetti
e000c7229f
Fix bit costs in search_pu_inter_ref a bit
2021-12-02 20:00:18 +02:00
Ari Lemmetti
ec2f4e0bac
Use double for RD costs in most places
2021-12-02 20:00:15 +02:00
Joose Sainio
f1f0033bf5
Add a cli option to control whether intra cus are tried to combine on the lower depth when search for said depth is disabled
2021-12-02 10:52:29 +02:00
Marko Viitanen
1c7c14d544
[debug] Add MV debugging tool enabled with KVZ_DEBUG_PRINT_MV_INFO
2021-12-01 15:51:25 +02:00
Marko Viitanen
09d2881ca9
[debug] Handle tiles with the yuview data
2021-12-01 15:36:29 +02:00
Marko Viitanen
6a89817adb
[debug] Arrange the yuview CSV data by POC and type, add data for CU type
2021-12-01 14:43:34 +02:00
Marko Viitanen
03013f571d
[tmvp] Fix a bug with selecting tmvp reflist and negate the MVs according to POC
2021-12-01 12:42:04 +02:00
Marko Viitanen
4f42c9c22c
[debug] Fix problems in YUView CSV format
2021-12-01 08:55:21 +02:00
Marko Viitanen
c4aa579911
[debug] Change tabs to semicolons
2021-11-30 22:15:14 +02:00
Marko Viitanen
5cbc655954
[debug] Add debug.c/.h and initial version of YUView CSV format printers
2021-11-30 22:11:20 +02:00
siivonek
54505e0250
[mrl] Fix warnings.
2021-11-29 20:55:39 +02:00
siivonek
675e8b2d83
[mrl] Fix extra reference length in LCU bottom edge. Disable trace origins in valgrind test.
2021-11-29 17:11:41 +02:00
siivonek
a01734375b
[mrl] Fix reference builder call in CCLM code.
2021-11-29 17:11:40 +02:00
siivonek
a0cfb625be
[mrl] Fix extra ref line length. Fix error where un-initialized ref line index was passed.
2021-11-29 17:11:40 +02:00
siivonek
b83d7687dc
Fix assert.
2021-11-29 17:11:40 +02:00
siivonek
65cf515070
Fix MRL to work when inter coding is enabled.
2021-11-29 17:11:40 +02:00
siivonek
0dc25b86e2
Fix invalid memory read.
2021-11-29 17:11:40 +02:00
siivonek
9cce86ff61
Fix MRL behaviour on left LCU edge. Pass additional left edge reference buffers to reference building for MRL.
2021-11-29 17:11:39 +02:00
siivonek
ddd0474c21
Fix filter error in block reconstruction when MRL is used. Disable PDPC during block reconstruction if MRL is used. Fix error in reference building.
2021-11-29 17:11:39 +02:00
siivonek
e41067220c
Fix error in block reconstruction when MRL is used.
2021-11-29 17:11:39 +02:00
siivonek
231c6f3e72
Fix top left reference building.
2021-11-29 17:11:39 +02:00
siivonek
54646e7be7
Disable intra reference filtering if MRL is used.
2021-11-29 17:11:39 +02:00
siivonek
eb32f40bd9
Another fix for reference building.
2021-11-29 17:11:39 +02:00
siivonek
b0a4f3345a
Fix top left reference building when MRL enabled. Fix reference line extension when MRL enabled.
2021-11-29 17:11:38 +02:00
siivonek
c616d3bf8a
Fix the inner case of reference building when MRL is used.
2021-11-29 17:11:38 +02:00
siivonek
a2a1a2a1a8
Fix mistakes in MRL related reference building.
2021-11-29 17:11:38 +02:00
siivonek
54e5a2181d
[mrl] Fix rebase mistake. Disable use of PDPC if MRL is used.
2021-11-29 17:11:28 +02:00
siivonek
511ce4991b
[mrl] Pass multi_ref_idx to generic angular and DC prediction funcs. Fix some outdated comments.
2021-11-29 17:02:27 +02:00
siivonek
a5dc2a3ce1
Disable MRL when copying best mode from top left CU.
2021-11-29 17:02:26 +02:00
siivonek
55a3274de8
Skip searching planar mode in RDO search if MRL is in use.
2021-11-29 17:02:26 +02:00
siivonek
1064603164
Limit MRL search to only MPM modes.
2021-11-29 17:02:26 +02:00
siivonek
bbf0f02f3c
Fix mistake in MRL commandline value parsing.
2021-11-29 17:02:26 +02:00
siivonek
f0a412e202
Fix errors in MRL implementation in intra rdo search.
2021-11-29 17:02:26 +02:00
siivonek
9396940900
Implement writing MRL bits to cabac.
2021-11-29 17:02:25 +02:00
siivonek
8fb5220b17
[mrl] Implement MRL into cabac coding.
2021-11-29 17:02:15 +02:00
siivonek
81ddf2f83a
[mrl] Add MRL support to intra rdo search.
2021-11-29 16:59:56 +02:00
siivonek
c3860f1cbc
Move max reference line idx define to proper place.
2021-11-29 16:59:56 +02:00
siivonek
cdb64f5e86
Change MRL variable name to snake_case.
2021-11-29 16:59:55 +02:00
siivonek
ea04feaaca
Add MRL handling to reference building.
2021-11-29 16:59:55 +02:00
siivonek
f22af05dd6
Extend the reference arrays for MRL.
2021-11-29 16:59:55 +02:00
siivonek
3462ac7219
Add multiRefIndex to reference handling.
2021-11-29 16:59:55 +02:00
siivonek
b8d4af3660
Extend reference arrays for use with MRL.
2021-11-29 16:59:55 +02:00
siivonek
b0f5b93c6d
Add commandline option for multiple reference line (MRL) intra prediction.
2021-11-29 16:59:55 +02:00
Marko Viitanen
3fda2dd6c8
[cleanup] Fix some warnings
2021-11-29 16:31:09 +02:00
Marko Viitanen
810270907b
Fix log2_max_pic_order_cnt_lsb_minus4 by using the poc_lsb_bits variable, fixes gop=16
2021-11-26 20:31:12 +02:00
Ari Lemmetti
d6b2ec5814
Only check used reference picture lists when validating merge candidates.
...
Merge candidate struct should be initialized to zero, so this should not have any effect. The conditions are added in case someone decides to copy the code as an example.
2021-11-26 18:47:14 +02:00
Marko Viitanen
44f4ce7063
[bipred] Fix reference list writing with low-delay gop with bipred use-case
2021-11-26 17:16:32 +02:00
Marko Viitanen
f0f77b9bfa
[bipred] Fix sh_num_ref_idx_active_minus1 flag when gop==0 and bipred are used
2021-11-26 17:12:59 +02:00
Marko Viitanen
36d302ba38
[bipred] Fix reference list writing when gop==0 and bipred are used, add to CI also
2021-11-26 17:04:30 +02:00
Marko Viitanen
e662a2747b
Merge branch 'tile_fixes'
2021-11-26 14:30:05 +02:00
Marko Viitanen
b648bb1cd1
[tiles] Clear HMVP size properly before each leaf encoder
2021-11-26 14:00:39 +02:00
Marko Viitanen
056ed3f979
[tiles] Init HMVP for each tile
2021-11-26 10:26:43 +02:00
Joose Sainio
385e91399a
[intra rdo] Raise maximum rd level to 4
...
Separate the rd option for chroma intra mode search from the full intra
mode search, i.e., rd=3 enables chroma mode search and rd=4 enables full
intra mode search.
2021-11-26 08:12:37 +02:00
Joose Sainio
ce175c503f
[cclm] remove unnecessary calculation of the downsample luma reference
2021-11-26 08:12:37 +02:00
Joose Sainio
697d4c0652
[cclm] Add bits to RD calculation
2021-11-26 08:12:31 +02:00
Joose Sainio
85ff5f23b1
[cclm] Fix accessing elements beyond the CU array
...
# Conflicts:
# src/intra.c
2021-11-26 08:12:25 +02:00
Joose Sainio
80ddb60ccf
[cclm] fix cclm when deblocking is enabled
2021-11-26 08:12:25 +02:00
Joose Sainio
f030158703
[cclm] Fix search and parameter generation for CCLM
2021-11-26 08:12:17 +02:00
Joose Sainio
d9875a3d92
[cclm] fix trying cclm on the upper level
2021-11-26 08:11:54 +02:00
Joose Sainio
c16ce9a82b
[cclm] fix bin type for the second cclm mode bit
2021-11-26 08:11:53 +02:00
Joose Sainio
87a458dc85
[cclm] fix incorrect log_width for chroma ref generation
2021-11-26 08:11:53 +02:00
Joose Sainio
7187678526
[cclm] Only do cclm search when it is enabled and add test for cclm
2021-11-26 08:11:53 +02:00
Joose Sainio
754607dae4
[cclm] bitstream writing + cabac
2021-11-26 08:11:53 +02:00
Joose Sainio
1c431d8f88
[cclm] Add commandline argument
2021-11-26 08:11:39 +02:00
Joose Sainio
70f6afff4f
[cclm] Search should be working
...
still has duplicate code and inefficiencies, but the actual search *should*
be working.
2021-11-26 08:09:54 +02:00
Joose Sainio
91877ef2c4
[cclm] fix condition for selecting the data from frame buffer and not ctu
2021-11-26 08:09:54 +02:00
Joose Sainio
ecc55c9edf
[cclm] align ref pixel generation code and add comments
2021-11-26 08:09:53 +02:00
Joose Sainio
677bf1edcb
[cclm] linear transform
2021-11-26 08:09:53 +02:00
Joose Sainio
4e8c9043a1
[cclm] CCLM parameter calculation *should* work correctly
2021-11-26 08:09:53 +02:00
Joose Sainio
93c02644c8
[cclm] WIP fix parameter calculation and add calling to the functions
2021-11-26 08:09:53 +02:00
Joose Sainio
ef5a205faa
[cclm] WIP: initial implementation of the cclm parameter calculation function
2021-11-26 08:09:52 +02:00
Marko Viitanen
62250a692d
[tiles] Move HMVP from state->frame to state->tile->frame, so each tile has own lut
2021-11-25 20:21:13 +02:00
Marko Viitanen
d8a8f02471
[tiles] Set rectangular slices flag -> I-frames working with tiles
2021-11-25 16:24:51 +02:00
Marko Viitanen
4c578d9cad
[tiles] Write correct headers when tiles are enabled
2021-11-25 15:36:28 +02:00
Marko Viitanen
47108a9bb6
[tmvp] Change some variables to unsigned for ubsan error fix
2021-11-25 12:07:02 +02:00
Marko Viitanen
f3d27b0a4b
[tmvp] Select correct reflist and reverse the MVs when selecting for L1, add tmvp to tests
2021-11-25 11:51:39 +02:00
Marko Viitanen
83430a49f2
[tmvp] Round TMVP colocated MVs using float conversion from VTM
2021-11-24 21:57:46 +02:00
Marko Viitanen
37405ffdee
[tmvp] Remove check for duplicate candidates since it's not used in VVC
2021-11-24 19:57:46 +02:00
Marko Viitanen
cfd9b46328
[tmvp] Write sh_collocated_ref_idx when more than one picture in L0 list
2021-11-24 15:23:29 +02:00
Marko Viitanen
8dc2cc32f7
[tmvp] Replace C3 and H with C0 and C1 in get_temporal_merge_candidates()
2021-11-24 15:19:01 +02:00
Marko Viitanen
348f54f5bb
[tmvp] Change maximum MV in scaled mv clipping
2021-11-24 15:18:11 +02:00