[media] coda: disable reordering for baseline profile h.264 streams

With reordering enabled, the sequence init in CODA960 firmware requests an
unreasonable number of internal frames for some baseline profile streams.
Disabling the reordering feature manually if baseline streams are detected
fixes this problem.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Philipp Zabel
2017-03-03 09:12:50 -03:00
committed by Mauro Carvalho Chehab
parent 0eef89403e
commit 691222713d
4 changed files with 122 additions and 2 deletions

View File

@@ -1374,6 +1374,18 @@ static void coda_buf_queue(struct vb2_buffer *vb)
*/
if (vb2_get_plane_payload(vb, 0) == 0)
coda_bit_stream_end_flag(ctx);
if (q_data->fourcc == V4L2_PIX_FMT_H264) {
/*
* Unless already done, try to obtain profile_idc and
* level_idc from the SPS header. This allows to decide
* whether to enable reordering during sequence
* initialization.
*/
if (!ctx->params.h264_profile_idc)
coda_sps_parse_profile(ctx, vb);
}
mutex_lock(&ctx->bitstream_mutex);
v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf);
if (vb2_is_streaming(vb->vb2_queue))