Arttu Ylä-Outinen
41e75daed7
Fix overlapping memcpy in kvz_search_cu_smp.
...
The destination and source pointers might be equal. Fixed by replacing
the memcpy call with a simple assignment.
2016-06-15 12:25:11 +09:00
Ari Lemmetti
29af8bcd21
Remove const to match function signature
2016-06-14 18:19:40 +03:00
Eemeli Kallio
5af6ab320c
Merge branch 'me_early_terminate'
...
Conflicts:
configure.ac
src/cfg.c
src/cli.c
src/kvazaar.h
src/search_inter.c
2016-06-14 15:03:35 +03:00
Eemeli Kallio
43c7778b82
Updated version number.
2016-06-14 10:53:04 +03:00
Arttu Ylä-Outinen
23fdeeaf10
Move mv_cand and mv_dir into a bitfield in cu_info_t.
...
Reduces size of cu_info_t.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
35aadf6776
Reduce size of type in cu_info_t to two bits.
...
Reduces size of cu_info_t.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
1cbe844f79
Move inter and intra into an union in cu_info_t.
...
Reduces size of cu_info_t.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
b6d793ef33
Drop field inter.mvd from cu_info_t
...
Instead of storing the mv differences in cu_info_t, they are computed
from the mv candidates and the motion vector. Reduces the size of
cu_info_t.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
98aa906f30
Drop field coded from cu_info_t
...
It can be inferred from the position and size of the CU.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
ebb10763f1
Drop field inter.mv_ref_coded from cu_info_t.
...
Storing inter.mv_ref_coded in cu_info_t is unnecessary since it can be
computed from refmap and inter.mv_ref.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
4be5c8f349
Move flags into a bitfield in cu_info_t.
...
Reduces the size of cu_info_t.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
30e9ee988d
Move bitcost field out of cu_info_t.inter.
...
The bitcost is only needed for the currently searched CU.
Fixes bitcost of the second PU being ignored when using SMP or AMP.
2016-06-14 12:21:57 +09:00
Arttu Ylä-Outinen
16d13ed046
Move cost field out of cu_info_t.inter
...
The cost is only needed for the currently searched CU.
2016-06-14 12:20:05 +09:00
Arttu Ylä-Outinen
c5c2c182d9
Drop unused field mode from cu_info_t.inter.
2016-06-14 12:18:17 +09:00
Eemeli Kallio
e4f1a74512
Added early termination option for motion estimation.
...
Conflicts:
src/search_inter.c
2016-06-13 16:20:35 +03:00
Wassim Hamidouche
5bc7287c67
add fix for crypro
2016-06-09 10:49:31 +03:00
Wassim Hamidouche
35634b5596
correct MV sign encryption
2016-06-09 10:49:31 +03:00
Wassim Hamidouche
15abdc6e81
correct sign encryption
2016-06-09 10:49:31 +03:00
Wassim Hamidouche
73c3203a26
encry coef transfs
2016-06-09 10:49:31 +03:00
Wassim Hamidouche
7ad5f8bbe5
encry coef transf sign
2016-06-09 10:49:31 +03:00
Wassim Hamidouche
02b0712973
fix g++ compilation
2016-06-09 10:48:44 +03:00
Ari Koivula
a2170f0763
Compile the cryptopp wrapper only when used
...
This should allow us to avoid an unnecessary dependancy to a C++
compiler.
Conflicts:
configure.ac
2016-06-07 17:11:12 +03:00
Ari Koivula
182038c743
Don't allow enabling encryption when it's not compiled in
2016-06-07 16:58:09 +03:00
Ari Koivula
8eb087120e
Make VisualStudio ignore the crypto stuff
...
Add stubs for the crypto functions so we can refer to them, even if we
never use them.
2016-06-07 16:58:09 +03:00
Wassim Hamidouche
76cb6dc6c2
add check flags
2016-06-07 10:54:26 +02:00
Ari Koivula
60ea8a359f
Add --crypto parameter
2016-06-07 10:31:40 +02:00
Wassim Hamidouche
02308d1ba6
add MVs encryption
2016-06-07 10:28:30 +02:00
Wassim Hamidouche
4637c8a828
compile Kvazaar encoder with ITpp library
2016-06-07 08:33:04 +02:00
Eemeli Kallio
8f182ac6de
Added functions select_starting_point and mv_in_merge to search_inter.c
2016-06-06 17:16:04 +03:00
Ari Koivula
fe71638a96
Fix problem with ASM compilation
...
When compiling C++ files along with C, libtool would complain about
the --tag missing, even though CC should be the default.
2016-06-06 15:47:56 +03:00
Eemeli Kallio
836a3b1daa
Added functions select_starting_point and mv_in_merge.
2016-06-06 12:18:33 +03:00
Ari Koivula
4eaacbe23e
Fix bug with lp-gop and ratecontrol
...
The first frame was always qp51 due to gop_offset being -1 for the
first frame. This fix makes it so that bits are allocated as if it was
the last (high quality) frame from the previous GOP.
2016-05-27 15:53:55 +03:00
Ari Koivula
3fbd7ed97f
Add GOP layer weights for lowdelay-P
...
When using ratecontrol with lowdelay-P, this improves BDRate by 1-25%.
Strongest effect is when using 4 layers and multiple references.
Also allow using 1 or 2 layers with ratecontrol.
2016-05-27 13:46:26 +03:00
Ari Koivula
67acead4bc
Fix referring over IDR boundary when using --gop
...
This problem resulted in an illegal bitstream with --gop=lp, because it
uses IDR's. The --gop=8 would not code IDR pictures, even when told to
with -p, which masked this problem.
This fix solves the problem with --gop=lp and also prevents references
across the intra picture in --gop=8. The intra pictures should be set
to IDR in a later fix, or an alternate method of differentiating
between IDR and non-IDR intra should be made.
2016-05-27 13:20:53 +03:00
Ari Koivula
a77dc1610e
Refactor encoder_state_remove_refs
...
I needed to debug this, so I rewrote it to make sense. There is an
obvious bug with the IDR handling that I left in place to fix in a
separate commit.
2016-05-27 13:20:45 +03:00
Eemeli Kallio
b5c05e58e0
Fixed typo in strategyselector.c
2016-05-24 11:04:29 +03:00
Ari Lemmetti
68c6f0f7b8
Enable deblocking for every preset
...
Deblocking adds very little complexity
while giving massive coding performance boost
2016-05-17 18:50:31 +03:00
Ari Lemmetti
6a07761b46
Add smp and amp options to presets
2016-05-17 14:26:58 +03:00
Ari Lemmetti
3107a93eaf
Fix avx2 chroma sampling for amp
2016-05-17 14:09:57 +03:00
Ari Koivula
24d0f9f685
Fix usage message for --hash
2016-05-11 15:03:43 +03:00
Ari Koivula
a1c772b696
Merge pull request #136 from MrAsura/cu-split-termination
...
Cu split termination
Closes #133 .
2016-05-10 17:22:08 +03:00
Jaakko Laitinen
7010526b1d
Removed tabs.
2016-05-10 15:52:44 +03:00
Jaakko Laitinen
a77eb5c874
Fixed type conversion error when parsing cu split termination.
2016-05-10 14:34:46 +03:00
Jaakko Laitinen
0d361d5bc7
Moved cu split termination from a pre-processor to a input parameter.
2016-05-10 14:15:41 +03:00
Ari Koivula
1dbe4eb852
Merge branch 'mv-full'
2016-05-10 13:28:07 +03:00
Ari Koivula
f6a9d237a3
Merge pull request #134 from miimiz/testink_eemeli
...
Strategyselector prints
2016-05-10 13:27:23 +03:00
Eemeli Kallio
8cfeed852c
Added print about SIMD optimizations available and in use to strategyselector.
2016-05-10 12:59:15 +03:00
Ari Koivula
f51a68b6fa
Add different sizes of search window for full search
2016-04-21 15:11:35 +03:00
Ari Lemmetti
efbdc5dade
Utilize registers more efficiently for 8x8 and larger blocks
2016-04-21 13:26:38 +03:00
Ari Lemmetti
192cee95b2
Vectorize vertical filtering
2016-04-21 13:26:38 +03:00
Ari Lemmetti
0be35f72b8
Filter 4 pixels simultaneously in x direction
2016-04-21 13:26:38 +03:00
Ari Lemmetti
10484bda9f
Make strategies out of fractional pixel sample functions
2016-04-21 13:26:38 +03:00
Ari Koivula
28e7548387
Fix bug in full mv search
...
This optimization led to some points not being searched.
2016-04-21 12:03:57 +03:00
Ari Koivula
2576aeee0b
Use merge candidates in full mv search
...
Perform a full search window around every mv candidate and the
0-vector.
2016-04-20 20:47:11 +03:00
Ari Lemmetti
8247faf8e0
Remove 64-bit only instruction to fix 32-bit compilation.
2016-04-19 18:05:11 +03:00
Ari Lemmetti
eb55d6b6b9
Fix writing over boundary.
2016-04-19 16:03:43 +03:00
Ari Lemmetti
bcabc6fadd
Remove pixel blit from strategies. Use memcpy instead.
2016-04-06 18:44:04 +03:00
Ari Lemmetti
2140197ccc
Tidy up coeff blit function and use memcpy again.
...
Give memcpy constants for fixed sizes to enable copying many bytes simultaneously.
2016-04-06 18:03:00 +03:00
Ari Koivula
08b4480d94
Re-add time.h include
...
Include-what-you-use wants to include sys/time.h instead, or if I
override it to include time.h it will remove the include completely.
2016-04-02 19:05:16 +03:00
Ari Koivula
61fc3e87ba
Run include-what-you-use fix_includes.py fix_includes.py
...
The includes should make more sense now and not just happen to compile
due to headers included from other headers.
Used a modified version of IWYU. Modifications were to attribute int8_t
and so on to stdint.h instead of sys/types.h and immintrin.h instead of
more specific headers.
include-what-you-use 0.7 (git:b70df35)
based on clang version 3.9.0 (trunk 264728)
2016-04-01 17:46:55 +03:00
Ari Koivula
016810d982
Move COMPILE_ macro to global.h
...
While these are only used for strategies, it's non-intuitive to have
to include strategyselector.h in every file under strategies before
including anything else.
2016-04-01 17:46:55 +03:00
Ari Koivula
8908d85d66
Change all relative includes to absolute
2016-04-01 17:46:44 +03:00
Ari Koivula
4876879b82
Add IWYU pragmas
2016-03-31 12:33:34 +03:00
Marko Viitanen
41a5f9bbbe
Fix filetime conversion to timespec
2016-03-24 10:08:11 +02:00
Ari Koivula
9139e169fe
Fix unnecessary waiting in main thread
...
The main thread has to wait for the worker threads to finish. The
pthread_cond_timedwait call used to accomplish this was given
a relative instead of absolute time, which resulted in the call
returning immediately, because the time had already passed.
This removes the now unnecessary sleeps and fixes the time given to
the pthread_cond_timedwait such that it now waits until a job finishes
or 100ms have passed.
2016-03-23 22:23:04 +02:00
Ari Koivula
e23ed231fb
Fix race condition with owf and non-square motion partitions
...
The OWF wpp limit code assumed square blocks, and as such did not work
correctly when height != width. This changes the relevant code to consider
both height and width.
2016-03-22 16:46:38 +02:00
Arttu Ylä-Outinen
d6a3e02f16
Fix calculating reference CU index in inter search
...
Fixes a possible segfault when SMP or AMP blocks are used.
2016-03-22 12:55:58 +02:00
Ari Lemmetti
f4538ab474
Copy pixels more efficiently in lcu recon.
2016-03-18 20:10:03 +02:00
Ari Koivula
5b66578f71
Add kvz_ prefix to md5 functions
...
The non kvz_ symbols were being exported in the static lib, which got caught
by Travis tests.
2016-03-18 13:13:35 +02:00
Ari Koivula
4125218cfa
Add --hash=md5
...
Add md5 through extras/libmd5 taken from HM with BSD license. It's
implemented as a generic strategy using the same interface as checksum,
so we can write a SIMD version if it seems necessary.
2016-03-18 05:23:57 +02:00
Ari Koivula
883448b8fb
Add --hash parameter
...
Allows decoded picture hash to be selected among none and checksum.
2016-03-18 05:20:15 +02:00
Ari Lemmetti
6d5f8e3aec
Define KVZ_COMPILE_ASM for the correct files.
...
Enables asm strategies again.
2016-03-17 16:21:31 +02:00
Ari Lemmetti
e502292ba8
Remove old function
2016-03-16 20:18:55 +02:00
Ari Lemmetti
c6cc96f5ec
Optimize sao band ddistortion
2016-03-16 20:16:00 +02:00
Ari Lemmetti
ab577f476f
Optimize sao reconstruct color
2016-03-16 20:15:32 +02:00
Ari Lemmetti
48bfddf4ec
Optimize calc sao edge dir
2016-03-16 20:14:50 +02:00
Ari Lemmetti
ba69992941
Optimize sao edge ddistortion
2016-03-16 20:14:19 +02:00
Ari Lemmetti
941b6b3e27
Optimize calc eo cat
2016-03-16 20:13:30 +02:00
Ari Lemmetti
04fbb48a09
Add strategy for avx2. Copy generic functions there.
2016-03-16 20:13:15 +02:00
Ari Lemmetti
4e30a215d8
Create generic strategy for sao.
2016-03-16 20:11:15 +02:00
Ari Koivula
6f431e510c
Comment and tidy threadqueue_worker
...
Carefully avoided making any changes to the logic.
2016-03-14 20:08:04 +02:00
Ari Koivula
1165ae2e1f
Increase --mv-constraint=frametimemargin margin
...
Increase the margin to be 4 luma pixels to every direction.
2016-03-14 16:02:54 +02:00
Arttu Ylä-Outinen
0eda28ced6
Fix Visual Studio warnings
...
Initialization of a struct with addresses of local variables generated
warning C4221 in encmain.
2016-03-14 14:12:21 +02:00
Ari Koivula
e91ca74733
Refactor kvz_encode_last_significant_xy
2016-03-10 18:47:16 +02:00
Ari Koivula
1fc0e8076c
Format kvz_encode_last_significant_xy whitespace
2016-03-10 18:17:45 +02:00
Ari Koivula
df9a958ef2
Merge branch 'log2'
2016-03-10 18:16:41 +02:00
Ari Koivula
4112a4364d
Remove g_to_bits table
2016-03-10 15:59:51 +02:00
Ari Koivula
9fcfba637f
Remove duplicated inline functions
2016-03-10 15:28:31 +02:00
Ari Koivula
e27ec2cc53
Add kvz_math.h for common inline math functions
...
Calling it just math.h would have prevented including system math.h.
2016-03-10 15:26:18 +02:00
Ricardo Constantino
c515796a21
Only use version prefix in kvazaar binary
...
Fixes regression since 54f08f2
causing libkvazaar version checks to not
work (i.e. pkg-config)
2016-03-09 16:13:59 +00:00
Arttu Ylä-Outinen
54f08f2bdb
Use output of git describe as version.
2016-03-09 15:04:29 +02:00
Ari Koivula
f8edf28161
Fix const qualifier warning
...
Also set the warning to an error in VS.
2016-03-09 14:16:15 +02:00
Ari Koivula
b0c3ece31e
Fix race condition when deblocking is on but SAO is off
...
Already suspected this yesterday, but didn't want to add the code to
handle it before confirming that it's actually a problem. It is.
2016-03-09 14:02:46 +02:00
Ari Koivula
1671725c72
Fix non-determinism issue with OWF WPP margin
...
The previous reasoning used deblocking and fractional motion estimation
together to arrive at a margin of 4 pixels. This was wrong, and with
either of these off, half pixel chroma interpolation could use pixels
outside the intended region.
Deblocking does not currently affect the margin needed.
2016-03-08 20:18:38 +02:00
Ari Koivula
674bfa14ce
Comment WPP deblocking and SAO
...
I was a bit unclear about exactly what happens and when regarding SAO
and deblocking when we do frame-parallel WPP parallelism, so I checked
and commented the bits that were unclear to me.
2016-03-08 19:39:04 +02:00
Ari Koivula
aec152c953
Fix OWF mv restriction limit
...
The check was done in regard to the wrong dimension, allowing the
access to unfinished parts of the frame when coding multiple frames
at the same time.
2016-03-08 17:12:43 +02:00
Ari Koivula
fda103aa7c
Refactor cfg->tiles_width_count and cfg->tiles_height_count
...
Change code everywere so these actually mean "width count" and not
"width count minus one".
2016-03-07 17:29:15 +02:00
Ari Koivula
a350eb3a1e
Fix --tiles to have the correct number of tiles.
...
The tiles_width_count etc. actually mean "count minus one".
2016-03-07 17:24:31 +02:00
Ari Koivula
49ea2d7b7f
Fix --mv-constraint=frametile
...
Option --mv-constraint=frametilemargin was being used instead of
frametile.
2016-03-07 16:41:00 +02:00
Ari Koivula
95b8dd99f6
Add --tiles parameter
...
Add new parameter --tiles that accept only uniform split. I considered
supporting the syntax of --tiles-width-split for this, but writing
--tiles=u2xu2 is just not as intuitive as --tiles=2x2, and there is
hardly ever any reason to use anything but uniform split. The more
cumbersome --tiles-width-split and --tiles-height-split parameters
are still there to allow finer control.
2016-03-07 16:33:51 +02:00