mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
media: rkvdec: Enable capture buffer holding for H264
In order to support interlaced video decoding, the driver must allow holding the capture buffer so that the second field can be decoded into it. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
6f32ea37c1
commit
ed7bb87d3d
@@ -127,6 +127,7 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {
|
|||||||
.ops = &rkvdec_h264_fmt_ops,
|
.ops = &rkvdec_h264_fmt_ops,
|
||||||
.num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_vp9_decoded_fmts),
|
.num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_vp9_decoded_fmts),
|
||||||
.decoded_fmts = rkvdec_h264_vp9_decoded_fmts,
|
.decoded_fmts = rkvdec_h264_vp9_decoded_fmts,
|
||||||
|
.subsystem_flags = VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.fourcc = V4L2_PIX_FMT_VP9_FRAME,
|
.fourcc = V4L2_PIX_FMT_VP9_FRAME,
|
||||||
@@ -385,6 +386,9 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
|
|||||||
cap_fmt->fmt.pix_mp.ycbcr_enc = f->fmt.pix_mp.ycbcr_enc;
|
cap_fmt->fmt.pix_mp.ycbcr_enc = f->fmt.pix_mp.ycbcr_enc;
|
||||||
cap_fmt->fmt.pix_mp.quantization = f->fmt.pix_mp.quantization;
|
cap_fmt->fmt.pix_mp.quantization = f->fmt.pix_mp.quantization;
|
||||||
|
|
||||||
|
/* Enable format specific queue features */
|
||||||
|
vq->subsystem_flags |= desc->subsystem_flags;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ struct rkvdec_coded_fmt_desc {
|
|||||||
const struct rkvdec_coded_fmt_ops *ops;
|
const struct rkvdec_coded_fmt_ops *ops;
|
||||||
unsigned int num_decoded_fmts;
|
unsigned int num_decoded_fmts;
|
||||||
const u32 *decoded_fmts;
|
const u32 *decoded_fmts;
|
||||||
|
u32 subsystem_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rkvdec_dev {
|
struct rkvdec_dev {
|
||||||
|
|||||||
Reference in New Issue
Block a user