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
Ari Lemmetti
1940f0880f
Add amvp unipredictions to both lists if reference picture is present
2021-12-08 15:33:57 +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
Marko Viitanen
3fda2dd6c8
[cleanup] Fix some warnings
2021-11-29 16:31:09 +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
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
Marko Viitanen
348f54f5bb
[tmvp] Change maximum MV in scaled mv clipping
2021-11-24 15:18:11 +02:00
Marko Viitanen
12e38684ff
[inter] Change mvd coding cost to use cabac contexts
2021-11-23 16:25:31 +02:00
Marko Viitanen
b644e85c1a
[bipred] Fix bipred candidate selection
2021-11-23 10:58:47 +02:00
Marko Viitanen
54eaba3dee
Fix merge issues and license texts
2021-11-23 08:46:06 +02:00
Marko Viitanen
885570e181
Merge branch 'master' of https://github.com/ultravideo/kvazaar
2021-11-22 22:11:32 +02:00
Marko Viitanen
1b86533b00
[inter] Scale MV's to qpel for cost calculation
2021-11-22 21:50:40 +02:00
Marko Viitanen
64705a27ee
[fme] Enable 1/16th luma pixel fme
2021-11-22 20:31:30 +02:00
Marko Viitanen
33fc02d879
[me] Fix MV scaling in TZ search
2021-11-22 13:35:52 +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
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
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
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
7a5eb7712b
Fix merge candidate derivation order
2021-10-08 16:34:02 +03:00
Marko Viitanen
99a2b0384d
[cleanup] remove some warnings
2021-07-26 11:42:19 +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
Ari Lemmetti
b72ab583b4
Handle "don't care" rows in the end separately
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
d8e7aac380
Do not use nonstandard extension for struct initialization.
2021-03-08 22:36:07 +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
Arttu Makinen
ebb99a7223
Changed 'width's to 'stride's, because added more pixels to 'fulldata'.
...
Also some small fixes and changes.
Checksum correct in luma.
WIP
2020-12-30 14:30:47 +02:00
Ari Lemmetti
d1abf85229
Add MV constraint check to motion estimation start point
2020-06-01 23:51:38 +03:00
Ari Lemmetti
f31dddc019
Bypass inverse quantization and inverse transform when trying early skip
2020-04-10 16:02:09 +03:00
RLamm
27fe716654
Fixed reference POC indexing
2020-03-11 15:33:37 +02:00
RLamm
bf24831780
Attempt to fix random crashes
2020-03-11 15:31:47 +02:00
RLamm
887659db1f
Attempted to scale the extra_mvs
2020-03-11 15:31:46 +02:00
Ari Lemmetti
1dfc69b42e
Consider merge index bits in merge analysis and early skip
2020-02-20 09:43:58 +02:00
Ari Lemmetti
71d9327f62
Further improve fast bipred
2020-02-17 20:32:52 +02:00
Ari Lemmetti
886ff36d12
Initial implementation of fast bipred.
2020-02-04 15:46:23 +02:00
Ari Lemmetti
147378e1f9
Prevent 8x4 and 4x8 bipred in merge analysis
2019-09-03 16:32:50 +03:00
Ari Lemmetti
ef1fdbf259
Separate prediction of single PU/PB from CU/CB
2019-09-03 16:32:50 +03:00
Ari Lemmetti
3bc510712f
Enable merge analysis for smp and amp
2019-09-02 17:31:51 +03:00
Ari Lemmetti
557bcbc6aa
Make luma or chroma only inter "recon" or predict possible
2019-09-02 17:15:28 +03:00
Ari Lemmetti
aa8ab195d1
Compare rough cost of the best merge mode against AMVP to make mode decision
2019-08-26 22:49:09 +03:00
Ari Lemmetti
8f866ff83a
Use correct index
2019-08-26 20:10:10 +03:00
Ari Lemmetti
a80de22bc7
Add only different candidates to the list
2019-08-24 21:49:33 +03:00
Ari Lemmetti
45c7961412
Remove tr depth fill. It should not be needed.
2019-08-24 21:49:32 +03:00
Ari Lemmetti
ff8711aaab
Add missing logic to add valid indices to list
2019-08-24 21:49:29 +03:00
Ari Lemmetti
b20992a9f3
Rename functions more descriptive
2019-07-09 20:20:11 +03:00
Ari Lemmetti
a348a0ec23
Fix transform depth in early skip
2019-07-09 20:05:48 +03:00
Ari Lemmetti
4097331fd6
Early skip
2019-07-09 15:59:31 +03:00
Pauli Oikkonen
45f36645a6
Move choosing of tailored SAD function higher up the calling chain
2019-02-04 20:41:40 +02:00
Pauli Oikkonen
91cb0fbd45
Create strategy for directly obtaining pointer to constant-width SAD function
2019-02-04 20:41:40 +02:00
Ari Lemmetti
cd818db724
Add missing quantization and residual in cost calculation (inter rd=2).
2018-12-21 15:55:29 +02:00
Ari Lemmetti
b234897e8a
Fix smp and amp blocks in fme and revert previous change.
...
Filter 8x8 (sub)blocks even with 8x4, 4x8, 16x4, 4x16 etc.
Calculate SATD on the 8x4, ... part
2018-12-19 21:30:53 +02:00
Marko Viitanen
1ef851ab4b
Disable FME on amp/smp blocks with width or height not divisible by 8
2018-12-18 10:28:21 +02:00
Reima Hyvönen
1fcc5c6a8d
Merge branch 'bipred_recon'
2018-12-11 09:59:35 +02:00
Ari Lemmetti
ac943147e3
Calculate satd cost for whole non-square blocks as well.
2018-12-10 17:04:29 +02:00
Sami Ahovainio
8f98d4aac7
Added square search
2018-11-14 14:50:31 +02:00
Marko Viitanen
6871490dd5
Simplify get_mvd_coding_cost(), only include golomb coding
2018-11-14 14:33:31 +02:00
Ari Lemmetti
5c774c4105
Rewrite most of FME and interpolation filters
...
Changes had to break a lot of stuff and were just squashed into this horrible code dump
2018-11-08 20:21:16 +02:00
Reima Hyvönen
896034b7cf
Some renamed functions back
2018-08-28 15:31:10 +03:00
Reima Hyvönen
e8b5e6db4c
Did some merging
2018-08-28 15:26:27 +03:00
Reima Hyvönen
47b357cca2
Comment one test
2018-08-27 18:52:14 +03:00
Reima Hyvönen
9a339eef89
Merge branch 'bipred_recon' of https://gitlab.tut.fi/TIE/ultravideo/kvazaar into HEAD
...
# Conflicts:
# build/kvazaar_lib/kvazaar_lib.vcxproj
2018-07-10 16:21:04 +03:00