Skip to content

remove dst_buf_count and src_buf_count

Deborah Brouwer requested to merge dbrouwer/rm_src_and_dst_buf_count into wave5-dev

apply on top of !84 (merged)

v12 Review

In the create_bufs case, *num_buffers is the number of buffers you are adding to the already existing buffers. Frankly, the logic here is dubious. I'm not sure what the intent is. Why do you need to keep track of the buf count at all when the vb2_queue already does that?

This needs to be cleaned up. CREATE_BUFS case is not supported for capture, and so there is no such weirdo case second calls for that queue at least. Meanwhile, inst->dst_buf_count is used a MIN_BUFFERS_FOR_CAPTURE initially, and the number of allocated buffer later. I think it would be better to simply store the min, and use the queue to track the number of allocated buffers.

In this diver, the reference frame are stored separately, and compressed. The capture queue contains the display frame. There is a gap when comes time to transfer timestamp, and for this reason we had to keep the two fbc_count equal. We classified this as hardware issue and moved on.

I think the dst_buf_count can be dropped now and the "*num_buffers > inst->dst_buf_count" not longer make any sense.

Same issue as with the decoder. Why is src_buf_count needed at all?

Edited by Deborah Brouwer

Merge request reports