Marko Viitanen
c5f2611a38
Fixes for TMVP to work with the new CU array
2016-08-10 14:09:28 +03:00
Marko Viitanen
d85af5755b
TMVP working when only 1 ref frame
2016-08-10 14:09:28 +03:00
Marko Viitanen
39f0165efe
Fix a bug in TMVP, the reference cu_array was being overwritten
2016-08-10 14:09:27 +03:00
Marko Viitanen
adab8c327e
Clean TMVP code
2016-08-10 14:09:20 +03:00
Marko Viitanen
5fa8226ac9
Temporal merge candidate selection
2016-08-10 14:09:20 +03:00
Marko Viitanen
f83042f4a1
Temporal MV candidate selection
2016-08-10 14:09:19 +03:00
Marko Viitanen
f8671581e3
Implemented function kvz_inter_get_temporal_merge_candidates()
2016-08-10 14:09:19 +03:00
Marko Viitanen
2956bdb379
Added flag slice_temporal_mvp_enabled_flag
2016-08-10 14:09:19 +03:00
Arttu Ylä-Outinen
2a946bd88e
Rename encoder_state_t.global to frame
...
"Frame" is more accurate than "global" since when OWF is used, encoder
states for each frame have their own struct.
2016-08-10 13:22:36 +09:00
Arttu Ylä-Outinen
5fbb0a8c27
Fix includes
2016-08-10 13:05:40 +09:00
Arttu Ylä-Outinen
aabf6ca3ee
Extract encoding code from encoderstate.c
...
Moves functions kvz_encode_coding_tree and kvz_encode_coeff_nxn from
encoderstate.c to encode_coding_tree.c.
2016-08-09 22:16:50 +09:00
Arttu Ylä-Outinen
803f29be8f
Remove reconstructed picture allocation in lossless.
...
Changes encoder_set_source_picture to set the reconstructed picture to
a copy of the source picture instead of allocating a new picture when
lossless coding is used.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
aaec473a19
Refactor encoder state initialization.
...
- Moves allocation of the reconstructed picture after the source picture
is set.
- Extracts main state initialization to a separate function from
encoder_state_new_frame.
- Changes kvz_encoder_feed_frame to return the frame.
- Renames some functions to better match their purpose.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
cd7024b3a5
Skip computing SSD when using lossless coding.
...
The SSD is always zero since it is lossless.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
fbbe5d1844
Use kvz_pixels_calc_ssd for SSD in search.c.
...
Replaces loops for computing SSDs by calling kvz_pixels_calc_ssd in
search.c.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
22cc97ffb1
Fix missing field initializers.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
06b82bf888
Disable filters, trskip and signhide in lossless.
...
When lossless coding is used, deblock and SAO are skipped, transform
skip flag is not written and sign hiding is not used.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
97451ec401
Align assignments in encoder.c.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
1dc94663c3
Bypass transform and quantization with --lossless.
...
When --lossless is given, set cu_transquant_bypass_flag for every CU and
bypass transform and quantization by directly copying reference pixels
to reconstruction and the residual to coefficients.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
2113b0182d
Enable PPS-level tq bypass flag with --lossless.
...
Sets transquant_bypass_enable_flag to true in PPS when --lossless is
given.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
a5897bbece
Make cabac context initialization tables static.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
23e7d9bb37
Add --lossless command line parameter.
2016-08-03 14:25:08 +09:00
Arttu Ylä-Outinen
5372ea432f
Update README and manpage.
2016-08-03 14:25:08 +09:00
Ari Lemmetti
6bcba004ff
Comment out to fix unused code error on clang.
2016-07-14 14:12:16 +03:00
Ari Lemmetti
c0979ebdcb
Implement AVX2 luma sampling
2016-07-14 12:53:02 +03:00
Ari Lemmetti
6244560426
Add avx2 strategy for kvz_filter_frac_blocks_luma.
2016-07-14 12:53:02 +03:00
Ari Lemmetti
9c4e9e049b
Load only what is needed. Eliminate latency from hadds.
2016-07-14 12:53:01 +03:00
Ari Lemmetti
7f71cb423a
Check 4 fractional pixel positions simultaneously
2016-07-14 12:52:24 +03:00
Ari Lemmetti
ad445ab8a1
Transition to kvz_filter_frac_blocks_luma
2016-07-14 12:51:02 +03:00
Ari Lemmetti
fccfbd2f28
Add strategy for kvz_filter_frac_blocks_luma
2016-07-14 12:51:02 +03:00
Ari Lemmetti
e9c3074d32
Add buffers and definitions for upcoming filtering
...
Samples are to be filtered in separate blocks instead of
making one big picture with interpolated pixels
2016-07-14 12:51:02 +03:00
Ari Lemmetti
7afe7e963b
Use fme_level to control the search accuracy.
2016-07-14 12:51:01 +03:00
Ari Lemmetti
5fa323bf25
Skip searching best hpel twice. Make hpel and qpel loops similar.
2016-07-14 12:51:01 +03:00
Ari Lemmetti
bc98a9affa
Change the search order to suit lighter fme search
2016-07-14 12:51:01 +03:00
Ari Lemmetti
2b0c8db349
Add quad satd for avx2
2016-07-14 12:50:24 +03:00
Ari Lemmetti
0ff69fd6f8
Add any size multi satd
2016-07-14 12:48:37 +03:00
Ari Lemmetti
d17b9e7d6e
Allow subme parameters 0-4
...
Update usage, presets,defaults,lib version
2016-07-12 19:49:38 +03:00
Arttu Ylä-Outinen
62ad57d0bf
Fix kvz_image_list_add for zero-sized lists.
...
When a list does not have space for the new element, its size is
doubled. If the size of the list is zero, it would not be resized. Fixed
to always resize the list so that the new element can be added.
2016-06-22 13:35:16 +09:00
Arttu Ylä-Outinen
433e528af7
Drop unused variable in search_pu_inter.
...
Removes unused variable max_px_below_lcu.
2016-06-22 13:35:16 +09:00
Arttu Ylä-Outinen
7836ff6ec9
Drop unused functions.
...
Removes functions kvz_coefficients_calc_abs, kvz_intra_rdo_cost_compare
and kvz_rdo_cost_intra which are no longer used.
2016-06-22 13:35:15 +09:00
Arttu Ylä-Outinen
e4b5840f56
Add parentheses around macro arguments in cabac.h.
2016-06-22 13:35:15 +09:00
Arttu Ylä-Outinen
a387b74e51
Fix resolution auto-detection.
...
Only try to guess the resolution from filename when neither width nor
height is given.
2016-06-22 13:35:15 +09:00
Arttu Ylä-Outinen
097bf8f3c0
Add a typedef for mvd coding cost functions.
2016-06-20 13:56:10 +09:00
Arttu Ylä-Outinen
d3c0e49286
Update comments.
2016-06-16 20:25:08 +09:00
Arttu Ylä-Outinen
ae832cda8c
Pack cbf flags in cu_info_t to two bytes.
...
Reduces size of cu_info_t.
2016-06-16 20:24:19 +09:00
Arttu Ylä-Outinen
cad2d496b8
Enable 4x8 and 4x16 partition modes
...
Enables search for 2NxN and Nx2N partition modes for 8x8 CUs and 2NxnU,
2NxnD, nLx2N and nRx2N partition modes for 16x16 CUs.
Changes the loop for copying reconstructed luma pixels in
kvz_inter_recon_lcu to use 4 byte chunks instead of 8 byte chunks since
it is now possible to have 4 pixel wide blocks.
2016-06-16 20:23:16 +09:00
Arttu Ylä-Outinen
90df7350f0
Make deblocking work with 4 pixel wide blocks.
2016-06-16 20:21:50 +09:00
Arttu Ylä-Outinen
bf26661782
Add support for 4x4 blocks to SATD_ANY_SIZE.
...
Makes functions satd_any_size_generic and satd_any_size_8bit_avx2 work
on blocks whose width and/or height are not multiples of 8.
2016-06-16 18:53:17 +09:00
Arttu Ylä-Outinen
2ae260e422
Change width of cells in lcu_t to 4 pixels.
...
Intra mode info for NxN partition units is now stored in the
corresponding 4x4 cell in lcu_t.cu array.
2016-06-16 18:53:17 +09:00
Arttu Ylä-Outinen
360f5bb8da
Always use pixel coordinates for indexing lcu_t.
...
Removes macro LCU_GET_CU and uses LCU_GET_CU_AT_PX in its place.
2016-06-16 18:53:17 +09:00
Arttu Ylä-Outinen
46e8122d27
Add functions for indexing cu_array_t structures.
...
Replaces macro CU_ARRAY_AT with functions kvz_cu_array_at and
kvz_cu_array_at_const.
2016-06-16 18:52:19 +09:00
Arttu Ylä-Outinen
c5afabdd3b
Change width of cells in cu_array_t to 4 pixels.
2016-06-15 12:25:11 +09:00
Arttu Ylä-Outinen
57a3d9b4b9
Add a function for copying CU data from LCUs.
...
Adds function kvz_cu_array_copy_from_lcu which CU info data from an
lcu_t structure to a cu_array_t structure.
2016-06-15 12:25:11 +09:00
Arttu Ylä-Outinen
2c85a00a55
Change kvz_cu_array_alloc to use pixel dimensions.
...
Changes function kvz_cu_array_alloc to take width and height parameters
in pixels instead of SCUs.
2016-06-15 12:25:11 +09:00
Arttu Ylä-Outinen
b276a347c0
Add a macro for indexing cu_array_t.
...
Adds macro CU_ARRAY_AT(cu_array, x, y) to cu.h.
2016-06-15 12:25:11 +09:00
Arttu Ylä-Outinen
8ac1f1986e
Move CU array copy to a separate function.
...
Moves code for copying parts of cu_array_t to a new function
kvz_cu_array_copy in cu module.
2016-06-15 12:25:11 +09:00
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