Commit graph

227 commits

Author SHA1 Message Date
Ari Koivula e4d70ac1ab Use more starting points for smaller blocks in intra search. 2014-06-17 13:28:27 +03:00
Ari Koivula 9911c7553b Avoid unnecessary intra dir searching. 2014-06-17 13:11:35 +03:00
Ari Koivula bd16a55b9b Always check DC and planar intra modes.
- At least one of them is always in predicted modes, but to make sure they
  are both included add them explicitly.
2014-06-17 12:51:15 +03:00
Ari Koivula 70740da123 Add smarter rough intra search.
- Directional intra mode search is done using halving search from the best
  known mode. Starting modes are vertical, horizontal and the 3 diagonal
  modes.

Conflicts:
	src/search.c
2014-06-17 12:33:10 +03:00
Marko Viitanen 0e2fe9e7ff Changed intra search to skip some modes speeding it up 2014-06-17 12:32:29 +03:00
Marko Viitanen a1c3cfe944 Moved intra mode cost calculation to a function
Conflicts:
	src/search.c
2014-06-17 12:32:29 +03:00
Marko Viitanen eb7d46f9ef Modify CU split cost. 2014-06-17 12:30:32 +03:00
Ari Koivula b3c15b8f94 Merge branch 'owf' 2014-06-16 16:07:41 +03:00
Laurent Fasnacht 91de92134f Constrain the search not to go under the LCU below if OWF is enabled 2014-06-16 14:27:56 +02:00
Ari Koivula 1c97a10a6d Move intra SAD and SATD functions under strategies. 2014-06-16 12:13:41 +03:00
Laurent Fasnacht f4187dd10c cu_array data structure 2014-06-16 10:54:57 +02:00
Ari Koivula 87ca828a63 Correct intra sad function labels.
- These haven't been 16 bit for a long time.
2014-06-16 10:45:10 +03:00
Laurent Fasnacht 6b408b5904 No-copy works with --no-sao --no-deblock 2014-06-12 11:47:30 +02:00
Laurent Fasnacht 27a49d287d Big refactor to use videoframe, image_list, and image instead of picture* 2014-06-10 09:19:06 +02:00
Laurent Fasnacht 2456c65822 Replace accesses to picture->cu_array with picture_get_cu and picture_get_cu_const 2014-06-05 10:41:58 +02:00
Ari Koivula e585da37e5 Give correct transform depth to RDOQ.
Conflicts:
	src/search.c
2014-05-28 15:47:49 +03:00
Ari Koivula ddc02cc09e Avoid regenerating reference pixels for every rdo mode. 2014-05-22 13:18:28 +03:00
Ari Koivula dbe13d0cba Separate sad intra search from rdo search. 2014-05-22 12:47:45 +03:00
Ari Koivula 19ce21e07c Split final cost to luma and chroma functions. 2014-05-22 09:45:00 +03:00
Ari Koivula a6962e2974 Separate intra transform coding to luma and chroma functions. 2014-05-22 09:40:34 +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 656b0a321b Add chroma mode to lcu_set_intra_mode.
- This is needed for intra split.
2014-05-19 15:58:54 +03:00
Ari Koivula 921f58b249 Add tr_split to lcu_set_intra_mode. 2014-05-19 15:58:54 +03:00
Ari Koivula 846b608125 Add transform split recursion to intra reconstruction. 2014-05-19 15:58:54 +03:00
Ari Koivula c9a8756fbd Fix NxN scan mode for lcu_get_final_cost.
- Scan mode was always selected according to the first PU mode.
2014-05-15 16:20:35 +03:00
Marko Viitanen b08047cce9 Fixed intra chroma mode selection 2014-05-15 09:50:05 +03:00
Ari Koivula f0e990905e Remove chroma mode "36".
- It's an unnecessary chore to handle this special case everywhere (it means
  chroma_mode == intra_mode). Better just to use the actual mode.
2014-05-14 19:56:35 +03:00
Laurent Fasnacht bb86f24000 Take advantage of the new buffers to remove uneeded item assignment 2014-05-14 13:27:13 +02:00
Laurent Fasnacht 6607c9f563 Use new buffers for search 2014-05-14 13:27:12 +02:00
Laurent Fasnacht c257c4b863 Add const for the buffers 2014-05-14 13:27:12 +02:00
Ari Koivula 9147b7acbf Split residual quantization to separate luma and chroma function. 2014-05-14 11:19:48 +03:00
Ari Koivula 1c38209cab Add missing include. 2014-05-13 09:33:05 +03:00
Laurent Fasnacht 0e6f1c99fc Refactor picture to remove hidden dependency between slice and tiles
picture.type -> encoder_state->global->pictype
picture.slicetype -> encoder_state->global->slicetype
picture.slice_sao_luma_flag -> 1 (was constant)
picture.slice_sao_chroma_flag -> 1 (was constant)

This may be changed later. For now it's better to avoid having slice related stuff in picture.
2014-05-07 11:55:48 +02:00
Laurent Fasnacht 6c6adf18c7 Refactor encoder_state 2014-05-07 11:47:31 +02:00
Ari Koivula bdc16d2612 Improve cu_info coded block flag data structure a bit.
- It works just like the old structure except that the flags are checked with
  bitmasks instead of having the flag value be propagated upwards. There isn't
  really any benefit to this because the flags still have to be propagated to
  parent CUs.

- Wrapped them inside a struct to make copying them easier. (Just need to copy
  the struct instead of making individual copies)
2014-05-06 18:28:04 +03:00
Ari Koivula 4490e8afd6 Remove depth dimension from picture->cu_array.
- It isn't used for anything anymore.

- It was used in the past to hold information during search, but now that
  information is held in lcu_t structs.
2014-04-28 10:18:22 +03:00
Laurent Fasnacht 5e7945888a Inter-frame prediction with tiles works.
Many thanks to Jean-Hugues Recolin for the insightful comments about shifts!
2014-04-25 09:28:00 +02:00
Laurent Fasnacht 571a373f69 Use tile offset in search 2014-04-24 08:38:24 +02:00
Laurent Fasnacht 19b1642aa2 Removed all cabac parameters (cabac is part of encoder_state) 2014-04-22 11:46:53 +02:00
Laurent Fasnacht 5fea5875a5 Huge refactoring
Split some parts of encoder_control into encoder_state
(idea: encoder_control is immutable)

Goal is to allow multiple substreams in the future.
2014-04-22 10:39:12 +02:00
Laurent Fasnacht 3396264f3c Moved g_cur_lambda_cost into encoder_control.cur_lambda_cost 2014-04-17 12:00:21 +02:00
Laurent Fasnacht 534013be77 Remove g_lambda_cost 2014-04-17 11:49:27 +02:00
Laurent Fasnacht 4a9c239027 Remove g_bitdepth 2014-04-17 11:13:13 +02:00
Laurent Fasnacht 7a2b883059 Remove encoder_input width, height, height_in_lcu, and width_in_lcu 2014-04-17 11:13:12 +02:00
Laurent Fasnacht 9ac3b7bf2b encoder->in.cur_pic --> cur_pic 2014-04-17 11:13:10 +02:00
Laurent Fasnacht 52ae027b3a Avoid undefined behavior in memcpy calls
"The memcpy() function shall copy n bytes from the object pointed to by s2 into the object pointed to by s1. If copying takes place between objects that overlap, the behavior is undefined."
2014-04-15 06:30:21 +02:00
Laurent Fasnacht 78c579053a encoder_control should be const in nearly all the code 2014-04-14 10:56:06 +02:00
Ari Koivula 5fa5e01e05 Merge branch 'intra-cleanup'
Conflicts:
	src/intra.c
	src/intra.h
	src/search.c
2014-04-10 13:51:14 +03:00
Ari Koivula 088dd9ab96 Clean up intra mode search.
- This changes the bitstream a little bit, because it changes the order in
  which the modes are tried and when two modes have the same cost the first
  one is chosen.

- Dst buffer was removes as it was no longer used.
2014-04-10 10:25:57 +03:00
Marko Viitanen 43ae0a3b9a Implemented RDO cost calculation to Intra modes 2014-04-10 10:25:20 +03:00