Skip to content
Snippets Groups Projects
Commit 74044d94 authored by David Staessens's avatar David Staessens Committed by Chih-Yu Huang
Browse files

v4l2_codec2 encoder: Store C2 linear buffer inside bitstream.

Currently an FD is stored inside the BitstreamBuffer object. This CL
moves the C2 linear block buffer directly inside the BitstreamBuffer.
This makes management of output buffers in the encoder simpler as we
don't need to manually keep output buffers alive. This is also required
by subsequent CLs that introduce functionality to prepend H.264 SPS and
PPS NAL units to IDR frames in the video stream.

Since both the decoder and encoder make use of the BitstreamBuffer
class and both have different requirements some changes needed to be
made. The decoder uses a 'C2ConstLinearBlock' as bitstream buffers are
used as input and do not need to be modified. The encoder uses a
'std::shared_ptr<C2LinearBlock>' as the encoded output stream will be
written to a bitstream buffer object. To accommodate these requirements
the BitstreamBuffer object is split up into a 'BitstreamBuffer' and
'ConstBitstreamBuffer' object.

BUG: 161495502
Test: arc.VideoEncodeAccel.h264_192p_i420_vm
Change-Id: Icfd0a84ef09cf283510763c51f92fe83bc7166c2
parent fdd47a25
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment