summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/amphion
diff options
context:
space:
mode:
authorMing Qian <ming.qian@nxp.com>2023-04-14 03:55:43 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-05-25 16:21:20 +0200
commite1d2ccc2cdd6333584aa3d5386dc667d0837c48f (patch)
tree69b4b45857da12774a8de6c97fa535e8bc14fade /drivers/media/platform/amphion
parentmedia: amphion: drop repeated codec data for vc1l format (diff)
downloadlinux-e1d2ccc2cdd6333584aa3d5386dc667d0837c48f.tar.xz
linux-e1d2ccc2cdd6333584aa3d5386dc667d0837c48f.zip
media: amphion: drop repeated codec data for vc1g format
For format V4L2_PIX_FMT_VC1_ANNEX_G, the separate codec data is required only once. The repeated codec data may introduce some decoding error. so drop the repeated codec data. It's amphion vpu's limitation Fixes: e670f5d672ef ("media: amphion: only insert the first sequence startcode for vc1l format") Signed-off-by: Ming Qian <ming.qian@nxp.com> Tested-by: xiahong.bao <xiahong.bao@nxp.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/amphion')
-rw-r--r--drivers/media/platform/amphion/vpu_malone.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/platform/amphion/vpu_malone.c b/drivers/media/platform/amphion/vpu_malone.c
index e96994437429..c1d6606ad7e5 100644
--- a/drivers/media/platform/amphion/vpu_malone.c
+++ b/drivers/media/platform/amphion/vpu_malone.c
@@ -1313,6 +1313,15 @@ static int vpu_malone_insert_scode_pic(struct malone_scode_t *scode, u32 codec_i
return sizeof(hdr);
}
+static int vpu_malone_insert_scode_vc1_g_seq(struct malone_scode_t *scode)
+{
+ if (!scode->inst->total_input_count)
+ return 0;
+ if (vpu_vb_is_codecconfig(to_vb2_v4l2_buffer(scode->vb)))
+ scode->need_data = 0;
+ return 0;
+}
+
static int vpu_malone_insert_scode_vc1_g_pic(struct malone_scode_t *scode)
{
struct vb2_v4l2_buffer *vbuf;
@@ -1460,6 +1469,7 @@ static const struct malone_scode_handler scode_handlers[] = {
},
{
.pixelformat = V4L2_PIX_FMT_VC1_ANNEX_G,
+ .insert_scode_seq = vpu_malone_insert_scode_vc1_g_seq,
.insert_scode_pic = vpu_malone_insert_scode_vc1_g_pic,
},
{