提交 83368599 编写于 作者: D Dave Stevenson 提交者: Zheng Zengkai

staging/bcm2835-codec: Ensure OUTPUT timestamps are always forwarded

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

The firmware by default tries to ensure that decoded frame
timestamps always increment. This is counter to the V4L2 API
which wants exactly the OUTPUT queue timestamps passed to the
CAPTURE queue buffers.

Disable the firmware option.
Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 8829ce60
...@@ -2001,6 +2001,19 @@ static int bcm2835_codec_create_component(struct bcm2835_codec_ctx *ctx) ...@@ -2001,6 +2001,19 @@ static int bcm2835_codec_create_component(struct bcm2835_codec_ctx *ctx)
MMAL_PARAMETER_ZERO_COPY, &enable, MMAL_PARAMETER_ZERO_COPY, &enable,
sizeof(enable)); sizeof(enable));
if (dev->role == DECODE) {
/*
* Disable firmware option that ensures decoded timestamps
* always increase.
*/
enable = 0;
vchiq_mmal_port_parameter_set(dev->instance,
&ctx->component->output[0],
MMAL_PARAMETER_VIDEO_VALIDATE_TIMESTAMPS,
&enable,
sizeof(enable));
}
setup_mmal_port_format(ctx, &ctx->q_data[V4L2_M2M_SRC], setup_mmal_port_format(ctx, &ctx->q_data[V4L2_M2M_SRC],
&ctx->component->input[0]); &ctx->component->input[0]);
......
...@@ -674,6 +674,9 @@ enum mmal_parameter_video_type { ...@@ -674,6 +674,9 @@ enum mmal_parameter_video_type {
/**< Take a @ref MMAL_PARAMETER_BOOLEAN_T */ /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T */
MMAL_PARAMETER_VIDEO_ENCODE_HEADERS_WITH_FRAME, MMAL_PARAMETER_VIDEO_ENCODE_HEADERS_WITH_FRAME,
/**< Take a @ref MMAL_PARAMETER_BOOLEAN_T */
MMAL_PARAMETER_VIDEO_VALIDATE_TIMESTAMPS,
}; };
/** Valid mirror modes */ /** Valid mirror modes */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册