Commit graph

221 commits

Author SHA1 Message Date
Marko Viitanen 5ae9a70e38 Disable usage of P-slices when GOP 2015-03-20 10:43:59 +02:00
Marko Viitanen 0c1aa6f73c Better reference picture removal function encoder_state_remove_refs() 2015-03-20 10:28:17 +02:00
Marko Viitanen d72c560880 Generate sorted reference list for L0 and L1 2015-03-19 12:26:59 +02:00
Ari Koivula 55ae02f367 Copy cu_info from tiles to main state.
- Main states cu_array can be accessed through state->global->ref, which
  allows the use of cu_info data from reference frames.
- This was already used by giving previous frames movement vector to next
  frame as a starting point candidate, but that functionality was broken at
  some point because the data wasn't being moved from child tiles cu_array
  to the main cu_array.
- Alternative would be to access the child tiles array directly, but
  currently there isn't a mechanism to preserve those arrays for reference
  frames.
2015-03-17 13:24:20 +02:00
Ari Koivula 4bec6cec93 Simplify wavefront handling.
- Move the reconstruction status assignment out of the main for job loop.
2015-03-17 13:23:27 +02:00
Ari Koivula 4a27f79f20 Update comments. 2015-03-17 13:23:16 +02:00
Marko Viitanen 1da1dc9578 Clean up reference index and mvd writing 2015-03-16 09:41:02 +02:00
Ari Koivula ca09e8bfe3 Fix WPP not working with threads=0.
- Apparently threadqueue_submit runs the job if there are no threads.
2015-03-13 17:15:05 +02:00
Ari Koivula d2bb71739f Clean up and comment WPP threading code.
- Remove WPP row reconstruction dependency to the row above current one in
  the previous frame. It's obviously unnecessary.
- Remove WPP row reconstruction dependency to the current row in the
  previous frame, unless the current row is the last row.
2015-03-11 18:30:37 +02:00
Marko Viitanen bc8ea9547e Use P-frames when last GOP picture 2015-03-11 15:23:16 +02:00
Marko Viitanen 1527822753 Fixed GOP POC order when not using threads 2015-03-10 14:12:51 +02:00
Marko Viitanen 1c38fbbd3b Fixed GOP when no threads are used 2015-03-10 10:45:05 +02:00
Marko Viitanen 66660516b7 Merge remote-tracking branch 'remotes/github/master' into GOP
Conflicts:
	src/cabac.h
	src/config.h
	src/cu.h
	src/encoder_state-bitstream.c
	src/encoderstate.c
2015-03-10 10:32:00 +02:00
Marko Viitanen ff41ef557d Fixed reference usage of top GOP layer pictures 2015-03-10 09:18:19 +02:00
Marko Viitanen eba298e635 Added cu->inter.mv_ref_coded variable 2015-03-10 09:17:25 +02:00
Marko Viitanen 42d3f2a8b0 Added B-frame encoding and reference list exceptions for top-layer GOP pictures 2015-03-06 16:32:50 +02:00
Marko Viitanen 1afba671e2 Added missing cabac bits to mv coding 2015-03-06 16:31:27 +02: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 14fe1b6648 Rename enum color_index to color_t. 2015-03-04 16:37:35 +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 fedd05465d Rename struct sao_info to sao_info_t. 2015-03-04 16:32:38 +02:00
Ari Koivula b7fcb800b2 Rename struct threadqueue_job to threadqueue_job_t. 2015-03-04 16:28:56 +02:00
Ari Koivula 5431d0ce19 Rename struct lcu_order_element to lcu_order_element_t. 2015-03-04 14:01:17 +02:00
Ari Koivula a0767a76d2 Rename struct vector2d to vector2d_t. 2015-03-04 14:01:16 +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 7ca688b376 Rename struct videoframe to videoframe_t. 2015-03-04 14:01:15 +02:00
Ari Koivula 63e224574e Rename struct cu_info to cu_info_t. 2015-03-04 14:01:15 +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
Marko Viitanen 890b4c1e20 Modified image handling and QP calculations to support GOP 2015-03-03 12:22:50 +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 d685ee86d6 Record total bitstream length correctly when using stdout.
- If the output is not a file, we can't check the size of the file.
2015-01-22 12:29:06 +02:00
Ari Koivula cbb2aa75b7 Add macros for adjusting weight of distortion between luma and chroma.
- Everything needs to have a short name because windows has a maximum path
  length limitation that is breaking my testing framework.
2014-10-08 10:31:54 +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 b339004c4c Rename cabac_state.ctx to cur_ctx. 2014-09-24 01:02:28 +03:00
Marko Viitanen 6f65a9cbbd Improved SAO merge decisions 2014-09-16 10:08:17 +03:00
Marko Viitanen 21df11ba4e Implemented SAO search for both chroma components 2014-09-15 16:07:31 +03:00
Marko Viitanen e8d1140a1a Check SAO band offset for both chroma components and better SAO chroma cabac costs 2014-09-15 16:07:31 +03:00
Ari Koivula 79b86ce6e1 Add --tr-depth-intra command line option.
Conflicts:
	src/encoder.c
2014-09-04 13:42:24 +03:00
Laurent Fasnacht 8502f3d850 Improve logging 2014-08-11 11:57:07 +02:00
Laurent Fasnacht 1a318c714d log poc with new_frame 2014-07-08 11:42:19 +02:00
Laurent Fasnacht f62e571c15 Add missing info to threadqueue.log 2014-07-07 10:49:40 +02:00
Ari Koivula 7ecf78bb70 Use sqrt lambda cost for searches not using SSD.
- Add encoder_state->global->cur_lambda_cost_sqrt.

- Use sqrt lambda for inter search and rough intra search.

- The effect on inter is around 10-20% bdrate. The effect on intra is smaller
  and non-existent when --rd=2 is enabled, as the intra search refinement was
  already done with SSD and correct lambda.
2014-06-26 13:56:38 +03:00
Laurent Fasnacht 9ab9defe67 Bitstream length per frame works again 2014-06-19 10:24:03 +02:00
Laurent Fasnacht 2347574a8e Fix problems revealed by valgrind 2014-06-16 11:10:09 +02:00
Laurent Fasnacht a96c742ad4 Fix depends for wpp+owf 2014-06-16 11:03:47 +02:00
Laurent Fasnacht 8a33c0a688 Fix recon job for wfrow 2014-06-16 10:55:01 +02:00
Laurent Fasnacht bf6024734a Fix statistics with OWF 2014-06-16 10:55:00 +02:00
Laurent Fasnacht 47d1ded7b0 Dependencies between frames 2014-06-16 10:54:59 +02:00
Laurent Fasnacht f4187dd10c cu_array data structure 2014-06-16 10:54:57 +02:00
Laurent Fasnacht c32943f78b OWF 2014-06-16 10:54:56 +02:00
Laurent Fasnacht 490dd15f3d Remove flush between frame 2014-06-16 10:51:33 +02:00
Laurent Fasnacht fddcbabe28 bitstream writing is now a "normal" job in a thread 2014-06-16 10:51:32 +02:00
Laurent Fasnacht ff7143cc24 Assign thread_queue_jobs and move image_free to a more suitable place 2014-06-16 10:51:32 +02:00
Laurent Fasnacht b765eca153 Remove unneeded encoder_state_blit_pixels 2014-06-12 11:47:46 +02:00
Laurent Fasnacht 6b408b5904 No-copy works with --no-sao --no-deblock 2014-06-12 11:47:30 +02:00
Laurent Fasnacht 0dbfa62698 Replace copy of images made for tiles by sub-images (no copy)
- replace width by stride where required in the source code
2014-06-12 11:47:30 +02:00
Laurent Fasnacht ae4dc4eb44 Fix uninitialized sao_info structure members, which was creating false positive when checkpointing SAO 2014-06-12 11:47:29 +02:00
Laurent Fasnacht f371bdafc3 sao_info checkpoints 2014-06-12 11:47:28 +02:00
Laurent Fasnacht 6ca30367f9 Fix POC bug 2014-06-11 10:29:05 +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
Laurent Fasnacht 7372f9244d Basic infrastructure for OWF 2014-06-05 09:09:25 +02:00
Ari Koivula bb47534b88 Make encoder_state .c files their own compilation units.
- It's good that this module has been chopped to smaller pieces, but lets
  avoid including .c files unless we really have to. These make pretty good
  submodules on their own so just make them their own compilation units.

- Move some stuff around to avoid having to forward declare them
  in encoderstate.c.
2014-06-04 17:45:18 +03:00
Laurent Fasnacht 961da05235 Split encoderstate.c in multiple files 2014-06-03 14:47:49 +02:00
Laurent Fasnacht 3d07f8cc84 encoderstate refactor 2014-06-03 14:25:16 +02:00
Laurent Fasnacht 2e821b79a9 encoder_state in now in encoder_state.[ch] 2014-06-03 13:51:30 +02:00