7698f822d31e99cc3abb0af8fd7bf6b58a1fcd92
[openwrt/openwrt.git] /
1 From 2822134c5f5c03893706df64625f3390792bb68a Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 15 May 2020 13:43:08 +0100
4 Subject: [PATCH] staging:vc04_services: bcm2835-codec: Request headers
5 with I-frame
6
7 V4L2 wishes to have the codec header bytes in the same buffer as the
8 first encoded frame, so it does become 1-in 1-out for encoding.
9 The firmware now has an option to do this, so enable it.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 .../staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 5 +++++
14 1 file changed, 5 insertions(+)
15
16 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
17 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
18 @@ -1967,6 +1967,11 @@ static int bcm2835_codec_create_componen
19 MMAL_PARAMETER_VIDEO_ENCODE_SPS_TIMING,
20 &param, sizeof(param));
21
22 + /* Enable inserting headers into the first frame */
23 + vchiq_mmal_port_parameter_set(ctx->dev->instance,
24 + &ctx->component->control,
25 + MMAL_PARAMETER_VIDEO_ENCODE_HEADERS_WITH_FRAME,
26 + &param, sizeof(param));
27 } else {
28 if (ctx->q_data[V4L2_M2M_DST].sizeimage <
29 ctx->component->output[0].minimum_buffer.size)