Commit graph

2353 commits

Author SHA1 Message Date
Marko Viitanen 571a545416 Fix spatial merge candidate selection 2018-09-26 15:10:31 +03:00
Marko Viitanen 63760ca0cf Use kvz_cabac_bins_verbose flag to control cabac debug printing 2018-09-26 12:01:23 +03:00
Marko Viitanen 7c37f456f9 Fix implicit Qt split for p-frames 2018-09-26 12:00:18 +03:00
Marko Viitanen b6f2c66c73 Fixed intra Most Probable Mode (mpm) derivation to conform VTM 2.1 2018-09-21 10:33:54 +03:00
Sami Ahovainio a2b2275d87 Fixed array sizes in search_intra_rough from 35 to 67 2018-09-18 11:49:15 +03:00
Sami Ahovainio 82fb80ab6e Fixed couple of if-clauses which still used the old intra mode range. 2018-09-17 08:56:43 +03:00
Marko Viitanen a437d4c508 Fixed intra chroma mode bitstream writing (chroma search not used) 2018-09-13 15:05:00 +03:00
Marko Viitanen 389aeebe07 Added 2x2 transform functions 2018-09-13 14:51:07 +03:00
Marko Viitanen 445c059b4a Fix transforms for VTM 2.0, generated new transform matrices and added a shift by 2 for forward and inverse 2018-09-13 14:39:49 +03:00
Marko Viitanen 35fa8e9785 Fix kvz_intra_get_dir_luma_predictor -> Intra working 2018-09-13 12:32:17 +03:00
Marko Viitanen f75b0b11c3 Simplify intra filtered ref pixel selection 2018-09-13 10:09:52 +03:00
Sami Ahovainio 4bb484a86a Fixed if-clause at search_intra.c to use new wider range of intra modes 2018-09-13 09:58:48 +03:00
Marko Viitanen 82de0fbee7 Switch intra search to use the actual 67 modes 2018-09-13 09:43:45 +03:00
Marko Viitanen 382917bcd3 New table for choosing angular intra filtered references and a small bugfix on the end condition of angular intra 2018-09-13 09:35:55 +03:00
Marko Viitanen 4aad2fa383 Fix intra mode writing 2018-09-12 10:34:58 +03:00
Marko Viitanen d4ed0ee3ad Fixed some array offsets in intra angular prediction 2018-09-12 08:53:17 +03:00
Marko Viitanen 20c96366ed fix kvz_context_get_sig_ctx_idx_abs() parameter for "type" -> decoding with VVC 2018-09-10 12:51:02 +03:00
Marko Viitanen a7ca09108c Improve CABAC debugging by including similar info as in VTM 2018-09-10 11:00:00 +03:00
Sami Ahovainio ce84407c69 Fixed coeff_remain writing to use the correct rice_param instead of using 0 all the time. 2018-09-07 11:24:24 +03:00
Sami Ahovainio 78ea24bcf1 Fixed sig_coeff_flag writing condition. 2018-09-06 15:48:45 +03:00
Marko Viitanen 4bebb4bb2c Fix temp_diag and temp_sum initialization and coeff array usage in context derivation 2018-09-05 17:09:50 +03:00
Marko Viitanen f5b6c386bc Fix incorrect sig_flag implicity parameters and some temp variable initializations 2018-09-03 16:22:05 +03:00
Marko Viitanen 52be2f0bbe Fixed kvz_encode_coeff_nxn and renamed some variables to match VTM 2018-08-31 15:10:17 +03:00
Sami Ahovainio 787264f568 Fixed dst indexing in kvz_angular_pred_generic 2018-08-31 10:36:28 +03:00
Sami Ahovainio d2291fea83 Intra mode scaling moved from angular prediction to kvz_intra_predict. pdpc implemented in kvz_intra_predict. 2018-08-31 10:01:28 +03:00
Marko Viitanen 49a116ed3a Bugfix correct array sizes for cu_ctx_last_x/y 2018-08-30 16:14:08 +03:00
Sami Ahovainio 84cef127dc Fixed cu_gtx_flag_model_chroma initialization. 2018-08-30 15:21:16 +03:00
Marko Viitanen 7d491e639b Add new values to last_x/y coding 2018-08-30 15:04:04 +03:00
Marko Viitanen 809805b185 Bugfixes for kvz_encode_coeff_nxn() 2018-08-30 14:50:29 +03:00
Marko Viitanen 0680f240d7 Converted kvz_encode_coeff_nxn and related helper functions to VVC K0072 format 2018-08-30 14:24:03 +03:00
Marko Viitanen 84e78c6c50 Disable writing of cabac flags not currently available 2018-08-30 11:21:44 +03:00
Marko Viitanen e3dbaf99a9 Started implementing new coeff coding function
- added kvz_context_get_sig_ctx_idx_abs for abs sig context derivation
2018-08-30 11:09:42 +03:00
Marko Viitanen e00319b832 Fix cu_sig_coeff_group_model init and some instances of cu_sig_model usage 2018-08-30 09:08:08 +03:00
Marko Viitanen 4429e0b89d Expand cu_sig_coeff_group_model according to VVC 2018-08-29 16:20:34 +03:00
Sami Ahovainio 578122ed43 Context changes for chroma pred modes. BT flag init and chroma pred mode init moved inside a loop. 2018-08-29 16:00:08 +03:00
Sami Ahovainio 54ebadfc43 Clarifying comments and changes towards WAIP 2018-08-29 16:00:08 +03:00
Marko Viitanen 7f119e8bdd Added new ctx models for sig, parity and gtx, removed models for one and abs 2018-08-29 15:57:40 +03:00
Marko Viitanen 46d02c1734 Implemented JVET-K0072 based cbf context selections 2018-08-29 10:12:07 +03:00
Marko Viitanen bb9dc22336 Disable PCM 2018-08-29 09:59:53 +03:00
Marko Viitanen 23a1292f52 Added max_binary_tree_unit_size and more comments 2018-08-29 08:23:41 +03:00
Marko Viitanen 37caa451c6 Fix VVC split flag condition for hor and ver splits at the edges
- Split flag is no longer implicit when the block can be split with the BT after QT in horizontal or vertical way
2018-08-28 16:03:02 +03:00
Sami Ahovainio 42741a2c40 Some changes for PCM and Intra towards VTM 2.0 compatibility. 2018-08-27 09:18:15 +03:00
Marko Viitanen 3dc5f65fba Add an extra bit to intra mode and map 33 angular modes to 65 2018-08-17 15:09:48 +03:00
Marko Viitanen 9aaf53fcd7 Add dep_quant_enable_flag to slice header 2018-08-17 14:58:57 +03:00
Marko Viitanen dc92fa6fb3 Added missing ALF flag to SPS 2018-08-17 12:53:27 +03:00
Marko Viitanen dbc74c592d Add VTM 2.0 new flags to SPS 2018-08-17 12:47:29 +03:00
Marko Viitanen 17505c8306 Disable vertical and horizontal scan order with small blocks
- Intra now working down to 8x8 luma
2018-08-17 11:38:40 +03:00
Marko Viitanen 4f7da86285 Commented out sign hiding code, which is not used in VVC 2018-08-17 09:38:11 +03:00
Marko Viitanen c9cbdd5dc3 Added couple of ToDo comments for large CTU support 2018-08-17 09:37:14 +03:00
Marko Viitanen daf041406f Disable DST 2018-08-16 16:05:32 +03:00
Sami Ahovainio 5baab86597 Added BT split flags 2018-08-14 15:28:06 +03:00
Marko Viitanen b33aa37484 Enable max_trans_hier_depth values and disable DC and angular filtering 2018-08-14 15:24:21 +03:00
Marko Viitanen 00a827007a Use normal split flags 2018-08-14 10:57:32 +03:00
Marko Viitanen ffbc178cf9 An attempt to fix checksums 2018-07-27 14:38:05 +03:00
Marko Viitanen 84b6a61193 Hack to fix split flag model for PCM use -> valid VVC bitstream 2018-07-27 14:29:31 +03:00
Marko Viitanen 90174f1143 Add more values to cabac debugging 2018-07-27 13:59:54 +03:00
Marko Viitanen c6572d644f Updated split_flag initialization to support Large CTUs in VVC 2018-07-27 12:32:45 +03:00
Marko Viitanen 7abadaafe4 Disable CTU splitting and configure max CTU sizes to 64x64 2018-07-27 11:04:21 +03:00
Marko Viitanen 6921e31502 Fix debugging functions 2018-07-27 11:03:16 +03:00
Marko Viitanen 37b5ce3d33 Change configurations to ease VVC debugging, max-BT-depth = 0 2018-07-26 16:12:11 +03:00
Marko Viitanen 792da1b7e0 Force PCM coding and fix PCM sample output 2018-07-26 11:05:31 +03:00
Marko Viitanen 5d4a2a004f Remove depentent slice, wpp/tile and scaling list parameters from PPS 2018-07-26 10:43:21 +03:00
Marko Viitanen 31a6cbfe6d Disable sign bit hiding 2018-07-26 10:41:35 +03:00
Marko Viitanen 9f2b429c66 Disable some features not used in VVC
- Part mode coding not used
 - split transform flag not used
 - last significant coeff pos swapping not used
2018-07-26 10:33:27 +03:00
Marko Viitanen e84276f7f6 Fixed version string 2018-07-26 08:17:55 +03:00
Marko Viitanen e38109d102 Enable QTBT and set correct general_profile_idc for Next 2018-07-25 12:24:17 +03:00
Marko Viitanen 079ca9b8b2 Disable tile/wpp flags in slice header 2018-07-25 11:19:53 +03:00
Marko Viitanen b0ac7002e5 Disable VPS 2018-07-25 11:02:09 +03:00
Marko Viitanen c5bf6a3774 Bugfix: add missing parameters to WRITE_U 2018-07-25 10:18:48 +03:00
Marko Viitanen 9befe35961 Modify slice header to conform VVC 2018-07-25 10:17:42 +03:00
Marko Viitanen 95ce1e1a25 Modify parameter sets to conform VVC 2018-07-25 10:05:11 +03:00
Arttu Ylä-Outinen 83555c3d6d Enable --fast-residual-cost with fastest presets 2018-07-16 12:31:20 +03:00
Arttu Ylä-Outinen c438bb4a19 Add an option to skip CABAC for residual costs
Adds command line option --fast-residual-cost=<limit>. When QP is below
the limit, estimates the cost of coding the residual coefficients from
the sum of absolute coefficients. Skipping CABAC is not worth it with
high QPs because there are fewer coefficients so CABAC is not as slow.
2018-07-16 12:31:20 +03:00
Arttu Ylä-Outinen b7474eb532 Fix SAO buffer sizes
Increases sizes of buffers used for SAO reconstruction to avoid stack
buffer overflow in AVX2 SAO reconstruction.
2018-07-05 15:56:30 +03:00
Arttu Ylä-Outinen b37470e80f
Merge pull request #207 from jbeich/maltivec
Unbreak build on PowerPC if AltiVec isn't supported
2018-07-04 11:06:41 +03:00
Jan Beich 4f4bea7496 Check -maltivec is supported before using
PowerPC target may lack or have non-standard FPU:

$ cc -dumpmachine
powerpcspe-undermydesk-freebsd
$ cc -c -maltivec -Isrc src/strategies/altivec/picture-altivec.c
src/strategies/altivec/picture-altivec.c:1: error: AltiVec and E500 instructions cannot coexist
2018-07-02 23:25:23 +00:00
Jan Beich b892d820f8 Clean up macOS includes on powerpc* after 93e1c9f1c3
strategyselector.c:426:25: machine/cpu.h: No such file or directory
2018-07-02 21:52:45 +00:00
Arttu Ylä-Outinen 2f995f4325
Merge pull request #205 from jbeich/powerpc
Unbreak build on non-Linux powerpc*
2018-06-19 13:28:00 +03:00
Arttu Ylä-Outinen c1398ef818 Permit --period=1 with any GOP structure
All intra coding is a special case so it can be permitted even though
Kvazaar normally only supports intra periods that are divisible by the
GOP length.
2018-06-18 12:26:11 +03:00
Arttu Ylä-Outinen abdebe0bf9 Fix --owf help message
The number of parallel frames is --owf plus one, not --owf minus one.

Fixes #204.
2018-06-18 09:33:36 +03:00
Jan Beich 93e1c9f1c3 Add AltiVec detection for BSDs
strategyselector.c:377:26: linux/auxvec.h: No such file or directory
2018-06-17 15:38:24 +00:00
Miika Metsoila 98972d26c2 Document that the high tier requires level 4 or higher 2018-06-14 12:41:03 +03:00
Miika Metsoila 62b44efaa4 Write the encoding tier (main/high) into the bitstream 2018-06-14 12:41:03 +03:00
Arttu Ylä-Outinen a343f6d587 Prepare for delta QPs at CU-level
- Replaces lcu_dqp_enabled with max_qp_delta_depth in encoder_control_t.
- Fixes set_cu_qps so that it can handle quantization groups of
  arbitrary size.
- Fixes computation of QP predictors so that it works for quantization
  groups of arbitrary size.
2018-06-13 15:36:19 +03:00
Arttu Ylä-Outinen dc6b2024ea Modify reference count asserts to fix data races
Changes asserts on the reference count of objects to assert the value
after KVZ_ATOMIC_INC instead of directly checking the value. Fixes some
data races detected by TSan.
2018-06-12 09:35:07 +03:00
Ari Lemmetti 4fb1c16c61 Add early termination for intra rdo when a zero coefficient block is found. 2018-06-08 21:03:07 +03:00
Ari Lemmetti 492529fb7a Add the same comment to help message as well... 2018-05-30 14:13:15 +03:00
Ari Lemmetti 0d5972bf03 Add missing sort to intra transform split search so mode at 0 is the best 2018-05-21 13:10:38 +03:00
Sebastien Alaiwan 954bca7d6e Fix memset parameter 2018-05-17 11:24:49 +02:00
Jaakko Laitinen f9466efcbb Close file on error 2018-05-15 11:50:16 +03:00
Arttu Ylä-Outinen 5c585c4fbc Update help message
Updates the default option values to match the medium preset.
2018-04-03 10:40:37 +03:00
Arttu Ylä-Outinen 2b4e22111a Update presets
The new presets are slower but have better coding efficiency.
2018-04-03 10:37:30 +03:00
Arttu Ylä-Outinen 7185519a1b Update command line help
- Adds missing default values.
- Adds help for --crypto and --key.
- Adds help for --rd=3.
- Adds help for --sao options.
- Some changes to help wording.
2018-03-23 14:33:04 +02:00
Arttu Ylä-Outinen 3606860504 Add --no-cpuid option
Equivalent to --cpuid=0.
2018-03-23 12:32:27 +02:00
Arttu Ylä-Outinen fb462b25ef Fix transform skip for inter
The transform skip flag in cu_info_t was stored under the intra
substruct even though transform skip can be used for inter as well. This
caused bitstream errors. Fixed by moving the flag out of the substruct.
2018-03-20 11:01:33 +02:00
Arttu Ylä-Outinen b64e46707d Skip raster scan step in TZ search
Raster scan is very slow and the BD-rate improvement is marginal.
2018-03-01 14:04:03 +02:00
Arttu Ylä-Outinen 6877064230 Add zero neighborhood check to TZ search
Adds an additional grid search step that starts from the zero motion
vector after the normal grid search. The search range for this step is
half of the normal range.
2018-03-01 14:02:13 +02:00
Arttu Ylä-Outinen 74a413c46a Switch to star refinement in TZ search 2018-03-01 13:06:14 +02:00
Arttu Ylä-Outinen ebee428ee1 Add loop termination to TZ grid search
Terminates the grid search if no better motion vector was found in the
last three iterations.
2018-03-01 13:06:06 +02:00
Arttu Ylä-Outinen 4c175621dd Fix TZ grid search and star refinement
- Changes TZ grid search and star refinement to keep the origin constant
  instead of moving to the best position after each iteration.
- Changes star refinement to loop until there is no more improvement,
  instead of running the step only once.
2018-03-01 12:56:57 +02:00