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

v4l2_codec2 encoder: Improve extraction of SPS/PPS from H.264 streams.

The V4L2 encoder tries to extract SPS and PPS NAL units from H.264
video streams, as this information needs to be provided to the
mediacodec framework.

This CL makes a number of improvements to the extraction code:
- Upon extraction a temporary buffer is allocated using the full size
  of the encoded frame. This is adjusted to only allocate enough data
  to hold the SPS and PPS NAL units.
- The NAL parser currently parses the complete encoded frame data. The
  code is adjusted to stop parsing after both the SPS and PPS NAL units
  are found (which are typicaly located at the start of the frame).

BUG: 161495502
Test: arc.VideoEncodeAccel.h264_192p_i420_vm
Change-Id: I89267727029b1317057d5475e41d7126c705c2c1
parent 74044d94
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