Commit graph

80 commits

Author SHA1 Message Date
Arttu Ylä-Outinen 640ff94ecd Use separate lambda and QP for each LCU
Adds fields lambda, lambda_sqrt and qp to encoder_state_t. Drops field
cur_lambda_cost_sqrt from encoder_state_config_frame_t and renames
cur_lambda_cost to lambda.
2017-01-09 01:24:23 +09:00
Eemeli Kallio f41e428e5f Removed kvz_skip_unnecessary_rdoq and reworked --rdoq-skip to skip 4x4 blocks when it is on. 2016-09-09 10:26:07 +03:00
Eemeli Kallio ed9c0b0416 RDOQ reworked in rdo.c. rdoq_signhide now skips coeffs that are after best_last_idx. 2016-09-09 10:16:51 +03:00
Ari Koivula d0512d25c6 Use fixed point in get_mvd_coding_cost 2016-08-30 21:37:12 +03:00
Ari Koivula d31be8eb27 Make mvd_coding_cost functions take const cabac 2016-08-30 04:46:46 +03:00
Eemeli Kallio 99d8b9abeb Changed skip_rdoq name to kvz_skip_unnecessary_rdoq. Changed the order it uses when it goes through CGs and tuned its sum calculation. 2016-08-18 14:02:56 +03:00
Eemeli Kallio d20ac03ca2 Added --rdoq-skip option 2016-08-18 12:17:53 +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 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
Wassim Hamidouche 02308d1ba6 add MVs encryption 2016-06-07 10:28:30 +02: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 947bae24f9 Update Doxygen documentation
Add module information to all header files.

Update all header file documentations to briefly say what they are, and
to use the javadoc format so the brief actually gets included into the
doxygen documentation.

Remove \file from implementation files, in order to not repeat the info
from the header files.

Add files under strategies and tools to Doxygen and update the Doxygen
settings to be just plain better.

Make README be the main page of Doxygen documentation.
2015-12-17 14:05:50 +02:00
Marko Viitanen 94bec1b444 Cleanup of mv-rdo, removed unused functions 2015-11-05 14:40:06 +02:00
Marko Viitanen 9a535e1c56 Added missing kvz_ prefixes and fixed some warnings 2015-11-05 09:07:59 +02:00
Marko Viitanen 822c174377 Set cabac to only count bits 2015-11-05 09:07:59 +02:00
Marko Viitanen 1ed0d85020 Added a function for cabac mvd coding cost get_mvd_coding_cost_cabac()
Conflicts:
	src/rdo.c
2015-11-05 09:07:59 +02:00
Marko Viitanen 6a2658cc74 Added calc_mvd_cost_cabac() to calculate real bits used for motion vectors
Conflicts:
	src/rdo.h
	src/search_inter.c

Conflicts:
	src/rdo.c
2015-11-05 09:07:59 +02:00
Ari Lemmetti ef0ad292ef Add quantization strategy. 2015-10-02 16:17:02 +03:00
Arttu Ylä-Outinen 3a10e9e3e0 Prefix all non-static symbols with "kvz_". 2015-08-26 13:02:28 +03:00
Marko Viitanen 191d3e4d87 Fixed RDOQ on 10bit encoding 2015-08-11 08:14:35 +03:00
Marko Viitanen 57ab46f110 Small fixes all around to enable 10bit encoding
Conflicts:
	src/encmain.c
	src/encoder.c
	src/encoderstate.c
	src/global.h
2015-08-11 07:59:20 +03:00
Arttu Ylä-Outinen f7f17a060c Rename pixel_t to kvz_pixel. 2015-07-02 16:58:28 +03:00
Ari Koivula 2f79bfebf7 Rename parameter encoder_state to state in all functions.
- It's so widely used that there isn't really need to emphasize that
  it's the encoders state. Also, it isn't really the encoders state,
  but encoding jobs state.
2015-03-04 17:31:07 +02:00
Ari Koivula ded6fd9ee8 Renamed typedef pixel to pixel_t. 2015-03-04 16:35:53 +02:00
Ari Koivula 1f42adb1ea Renamed typedef coefficient to coeff_t. 2015-03-04 16:33:47 +02:00
Ari Koivula 7bafd34cfa Remove struct rd_stats. 2015-03-04 14:01:17 +02:00
Ari Koivula 1a62fee300 Rename struct cabac_data to cabac_data_t. 2015-03-04 14:01:16 +02:00
Ari Koivula 727fefacc4 Rename struct cabac_ctx to cabac_ctx_t. 2015-03-04 14:01:16 +02:00
Ari Koivula f6147b410a Rename struct encoder_control to encoder_control_t.
Conflicts:
	src/encoder_state-geometry.h
	src/encoderstate.h
2015-03-04 14:01:14 +02:00
Ari Koivula b14f89c88f Rename struct encoder_state to encoder_state_t. 2015-03-04 14:00:46 +02:00
Ari Koivula d7383ccb25 Change license to LGPL.
- Everyone who has contributed code to the project has been asked to license
  their contributions under LPGL and they have agreed.

- COPYING file changed to say LGPLv2.1 instead of GPLv2.

- GPL changed to LGPL in the header of every single file that a header and
  header added to the few that were missing one.

- Also.. Happy new year!
2015-02-25 15:19:05 +02:00
Ari Koivula 5fa6438b25 Clean up calls to memset.
- Replaces all calls to memset with new FILL and FILL_ARRAY macros. The use
  of memset was inconsistent and we never use it for anything complicated.
2015-02-19 16:25:28 +02:00
Ari Koivula 1ccb3bd324 Move sign hiding stuff in rdoq to its own function.
- There is some stuff from sign hiding left intermingled with rdoq code,
  but I don't want to change the code too before testing that I didn't
  break anything.
2015-01-24 21:27:20 +02:00
Ari Koivula 81ad583e08 Use the same coeff cost calculation for all rd modes.
- It's not worth it to have these faster approximations for coefficient cost.
2015-01-20 17:34:59 +02:00
Ari Koivula 8a407b0313 Estimate luma and chroma intra mode bits separately.
- Remove cu_info.intra[].cost and bitcost as unnecessary.
- Add luma_mode_bits to complement chroma_mode_bits and remove
  intra_pred_ratecost as unneccessary. Difference is that intra_pred_ratecost
  was more coarse and included chroma mode with the assumption that it would
  be the same as chroma.
2014-10-16 03:08:11 +03:00
Ari Koivula 51662e1081 Fix differences between cu_rd_cost_luma and rdo_cost_intra. 2014-10-03 11:36:57 +03:00
Ari Koivula 549ac96438 Change costs to doubles to avoid rounding intermediate results.
- Helps with debugging.
2014-10-03 11:36:56 +03:00
Ari Koivula 4e052d3f0f Wrap contexts of cabac_data inside cabac_data.ctx struct. 2014-09-24 01:02:37 +03:00
Ari Koivula 5f732126c3 Add cabac bit costs float table. 2014-09-15 15:45:43 +03:00
Ari Koivula 46b6b1243b Add --rd=3 mode and enable searching of intra depth 0.
- intra_build_reference_border was overflowing at depth 0 because it uses
  arrays just large enough to accommodate 32x32 transforms, which is the
  biggest transform.
- For similar reasons search_intra_rough doesn't work at depth 0.
- The --rd=3 mode tries all modes with transform search. It also works without
  rough search so it was used to test depth 0 search. If --rd=3 is not on intra
  split at depth 0 is not searched for.

Conflicts:
	src/search.c
2014-09-11 10:54:41 +03:00
Marko Viitanen dbcc8d65aa Removed duplicate function from RDOQ 2014-08-28 08:50:01 +03:00
Ari Koivula e585da37e5 Give correct transform depth to RDOQ.
Conflicts:
	src/search.c
2014-05-28 15:47:49 +03:00
Ari Koivula dceb3da9b8 Fix bug in search relating to transform with no non-zero coefficients.
- Because cost was calculated even though there were no coefficients, these
  very good modes were less likely to be selected.

- Added assert to encode_coeff_nxn to avoid these problems in the future.
2014-05-28 15:22:18 +03:00
Ari Koivula f9a603e4ea Move intra mode search form intra module to search module.
- Make the actual intra prediction function global.

- Move the rdo stuff to rdo module.
2014-05-19 16:12:02 +03:00
Ari Koivula 2ff713ccb2 Add new implementation for trskip decision. 2014-05-13 21:57:45 +03:00
Ari Koivula 0c65a9b658 Remove abs_sum from coeff quantization.
- It's meant for checking if there are any coefficients, but we don't use it
  and it's annoying to remember to initialize it and pass it around. The
  benefit should be quite small anyway.
2014-05-13 21:54:34 +03:00
Laurent Fasnacht 6c6adf18c7 Refactor encoder_state 2014-05-07 11:47:31 +02:00
Laurent Fasnacht 19b1642aa2 Removed all cabac parameters (cabac is part of encoder_state) 2014-04-22 11:46:53 +02:00