A call to kvz_threadqueue_waitfor caused the tqj_bitstream_written field
of the previous encoder state to become a dangling pointer, subsequently
causing an assertion to fail. This would only occur when the encoder
state used for a new frame was not the last finished one.
Fixed by setting tqj_bitstream_written to NULL after the job is done and
removing unnecessary calls to kvz_threadqueue_waitfor.
- Removes all bitstream types.
- Changes encoder_encode to return the encoded data as list of chunks.
- Moves writing of the encoded data to the main function.
- Replaces read_one_frame by encoder_feed_frame.
- Adds field "prepared" to encoderstate_t to indicate that
encoder_next_frame has been called.
- Input frames are read in the main function and passed to
encoder_encode.
Adds function image_copy_ref to image module for getting a new reference
to an image. It can be used instead of image_make_subimage when the
sizes of the original and the subimage are same.
- Make sure that everything which is allocated gets deallocated.
- Move finalization of encoder states to kvazaar.c.
- Remove empty strategyselector_free function.
- Remove unused variable curpos.
- Fix includes.
- Use the existing bitstream_t type to give access to the bitstream.
We can extend it later to make it a linked list like I was planning
to do with the payload type.
- The main encoder now also stores the bitstream in memory.