Joose Sainio
951a845f08
Remove consts and fix wrong types
2022-03-18 08:28:27 +02:00
Joose Sainio
64b2806cc8
Add couple of missing bits to the calculation and get intra neighbours from lcu rather than cu_array
2022-03-18 08:28:27 +02:00
Joose Sainio
aea1133e6a
Function for mock coding a CU and counting the bits
2022-03-18 08:27:22 +02:00
Joose Sainio
4b8d217f2d
Add new macro for potentially updating cabac context when obtaining the bit cost
2022-03-18 08:19:57 +02:00
Joose Sainio
d8648fe1de
Preparation for accurately counting inter bits
2022-03-18 08:19:57 +02:00
Joose Sainio
311fceade7
Force use inter
2022-03-18 08:19:56 +02:00
Joose Sainio
1fb69d5e22
Correct tr depth bit calculation
2022-03-18 08:18:04 +02:00
Joose Sainio
de3a76d874
Correctly calculate bits for transform split, however updating is done incorrectly, but cannot be fixed easily unfortunately
2022-03-18 08:18:04 +02:00
Joose Sainio
dacc15f33b
Count pred mode bit
2022-03-18 08:18:03 +02:00
Joose Sainio
d2299adb1c
Disable bit debug code when VERBOSE is not defined and count bits when combining the intra cus
2022-03-18 08:18:03 +02:00
Joose Sainio
9ed8d0a7d9
count all non-tr-depth related bits correctly
2022-03-18 08:17:41 +02:00
Joose Sainio
53264bc764
Update cabac context during search
...
Create a separate cabac that is only used during the search. It should hold
the state that the actual cabac end after encoding said CU. Only implemented
for intra so far.
TODO: 4×4 PUs probably still have some problems
2022-03-18 08:17:41 +02:00
Joose Sainio
d5e4e831f4
Preliminary code for outputting bit costs during the search
2022-03-18 08:17:41 +02:00
Joose Sainio
8ff1c51835
Merge branch 'combine-intra-option'
2022-03-18 07:59:39 +02:00
Joose Sainio
85d1a54adc
Add cli option for forcing inter
2022-03-17 14:48:08 +02:00
Joose Sainio
763ad3f8f5
Merge remote-tracking branch 'remotes/origin/unify-roi-features'
2022-03-12 08:48:09 +02:00
Ari Lemmetti
917d26f1bf
Unify delta QP / ROI map functionality.
2022-02-08 20:15:27 +02:00
Ari Lemmetti
96b00ff528
Merge branch 'rework-inter-search'
2021-12-15 17:16:10 +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
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
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
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