Commit graph

409 commits

Author SHA1 Message Date
Laurent Fasnacht 8ff9ea0eee Wavefront works with parallelism + deblock (still no SAO) 2014-05-14 14:01:26 +02:00
Laurent Fasnacht 38444a81a6 Threads should be put in queue in wait state if we want to add dependencies later 2014-05-14 14:01:25 +02:00
Laurent Fasnacht e72408249b Add encoder_state pointer to lcu_order_element, new worker_encoder_state_search_lcu function to run the search stuff on one LCU 2014-05-14 14:01:24 +02:00
Laurent Fasnacht eb62696461 Fix problems when image dimensions is not a multiple of LCU 2014-05-14 13:27:14 +02:00
Laurent Fasnacht 1ba1683c05 search buffer has to be allocated tile-wise to avoid problems with wavefronts 2014-05-14 13:27:13 +02: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 1680273e80 Store search borders in a buffer for the whole picture 2014-05-14 13:27:11 +02:00
Laurent Fasnacht 0ceb1469a2 Improve decision about when to split into threads 2014-05-14 13:27:11 +02:00
Laurent Fasnacht 63adb54a3d Add --threads <int> command line parameter 2014-05-14 13:27:09 +02:00
Laurent Fasnacht e772799d5e encoder_state_encode uses now the threadqueue 2014-05-14 13:27:08 +02:00
Laurent Fasnacht baede7f6c4 threadqueue 2014-05-14 13:27:08 +02:00
Laurent Fasnacht bc3ca90bdf Fix tiles when SAO or deblock is enabled.
Was broken by previous commit.
2014-05-14 13:27:07 +02:00
Laurent Fasnacht 4815a0604b Entropy coding sync works without parallelism, without SAO and without deblocking 2014-05-14 13:27:06 +02:00
Laurent Fasnacht 2c2a2528f3 Remove openmp stuff 2014-05-14 13:27:06 +02:00
Ari Koivula fb763f7940 Move coefficient generation functions from encoder.c to transform.c.
- These functions probably should have been there to begin with.
2014-05-12 11:37:39 +03:00
Ari Koivula a3478ecd20 Move transform skip decision to it's own function. 2014-05-12 11:18:27 +03:00
Ari Koivula d9b890de6e Remove redundant variables.
- Redefine LCU_WIDTH to be 64. Stuff will break horribly if it's
  anything else anyway.

- Add LCU_WIDTH_C for chroma LCU width. It should be more readable than the
  constant (LCU_WIDTH >> 1).
2014-05-12 10:58:07 +03:00
Ari Koivula 59e0e98523 Separate luma and chroma coefficient generation variables. 2014-05-12 10:38:24 +03:00
Ari Koivula 0ca65e7606 Move chroma coefficient generation to it's own function.
- It's time to chop up this monster that is encode_transform_tree.
2014-05-12 10:24:06 +03:00
Ari Koivula 3c3c9a26c6 Move scan order selection to a function. 2014-05-12 08:47:16 +03:00
Ari Koivula 623d9001a8 Reorder chroma coefficient generation. 2014-05-12 08:47:16 +03:00
Ari Koivula 93141c7d2e Avoid unnecessary copying of predicted pixels when there are no coeffs.
- These are probably from a time when reconstruction happened in this
  function.
2014-05-09 16:39:58 +03:00
Ari Koivula 27ab882c25 Clean up coefficient generation. 2014-05-09 16:33:10 +03:00
Ari Koivula ce945ab4ef Handle coefficient initialization better.
- Coefficients are no longer required to be pre-zeroed. The resulting zeroes
  are copied in even in the case where we already know they are all zeroes.

- Move cbf clearing code to only happen at the leaves of the recursion.
2014-05-09 16:30:28 +03:00
Laurent Fasnacht b274558139 Refactor and fix entry_points functions.
Seems to be OK with HM now
2014-05-09 12:42:37 +02:00
Ari Koivula cb5d7e6541 Fix compilation for VS2010. 2014-05-08 17:28:12 +03:00
Laurent Fasnacht 0452806ec4 Entry points 2014-05-08 15:04:56 +02:00
Laurent Fasnacht da588af2ba Partial support for wavefront 2014-05-08 15:04:55 +02:00
Laurent Fasnacht 4de5660254 Fix missing offset in LCU range computation for wavefronts 2014-05-08 15:04:55 +02:00
Laurent Fasnacht dc34a5eac6 LCU borders 2014-05-08 15:04:54 +02:00
Laurent Fasnacht 24f4a8cad1 Wavefront also needs entrypoints 2014-05-08 15:04:53 +02:00
Laurent Fasnacht d05f8b52aa Rewrite of encoder_state_write_bitstream_leaf: handle slice + tiles + wavefronts correctly 2014-05-08 15:04:53 +02:00
Laurent Fasnacht 27f694e3e8 Some initial code to support wpp and slices 2014-05-08 15:04:52 +02:00
Laurent Fasnacht 163189c3c7 Bitstream for leaves can be computed in parallel 2014-05-08 15:04:51 +02:00
Laurent Fasnacht be9882f5b2 Leaf bitstream write 2014-05-08 15:04:50 +02:00
Laurent Fasnacht ae6a7a9c4b Leaf encoder uses encoder_state->lcu_order 2014-05-08 15:04:49 +02:00
Laurent Fasnacht b740142325 Add is_leaf to encoder_state 2014-05-08 15:04:48 +02:00
Laurent Fasnacht 8451d5b100 Move some init code to encoder_state_new_frame 2014-05-08 15:04:48 +02:00
Laurent Fasnacht 1cb3f14dfe lcu_order_count in (leaves) encoder 2014-05-08 15:04:47 +02:00
Laurent Fasnacht ef6ae3e723 Remove dead code 2014-05-08 15:04:46 +02:00
Ari Koivula 535b42bc9b Fix compilation for VS2010. 2014-05-07 15:26:44 +03:00
Laurent Fasnacht 05eef82896 Remove extra [ from graphviz dump 2014-05-07 13:40:29 +02:00
Laurent Fasnacht 84e5dbee39 Remove quote from graphviz dump 2014-05-07 13:33:02 +02:00
Laurent Fasnacht b48a687d3c Restored parallelism, but it will be done in another way... OpenMP is not very efficient in these kind of dynamic situation 2014-05-07 11:55:56 +02: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 39d96e0546 Fix bug with cabac stream pointing to bad data 2014-05-07 11:55:41 +02:00
Laurent Fasnacht e144f817ef Works when not using tiles 2014-05-07 11:55:16 +02:00
Laurent Fasnacht 24c2bd70ca Fix small bugs with compilation 2014-05-07 11:54:35 +02:00
Laurent Fasnacht a03f0cba19 encoder_control_input_init near the other encoder_control_* functions 2014-05-07 11:53:21 +02:00