2022-04-12 19:48:12

by Ming Qian

[permalink] [raw]
Subject: [PATCH v2] media: amphion: fix decoder's interlaced field

For interlaced frame, the amphion vpu will store the
two fields sequential into one buffer, top-bottom order
so the field should be set to V4L2_FIELD_SEQ_TB.
fix the previous bug that set it to V4L2_FIELD_SEQ_BT wrongly.

Signed-off-by: Ming Qian <[email protected]>
---
drivers/media/platform/amphion/vdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c
index 09628dd0c855..0a1976852b0d 100644
--- a/drivers/media/platform/amphion/vdec.c
+++ b/drivers/media/platform/amphion/vdec.c
@@ -804,7 +804,7 @@ static void vdec_init_fmt(struct vpu_inst *inst)
if (vdec->codec_info.progressive)
inst->cap_format.field = V4L2_FIELD_NONE;
else
- inst->cap_format.field = V4L2_FIELD_SEQ_BT;
+ inst->cap_format.field = V4L2_FIELD_SEQ_TB;
if (vdec->codec_info.color_primaries == V4L2_COLORSPACE_DEFAULT)
vdec->codec_info.color_primaries = V4L2_COLORSPACE_REC709;
if (vdec->codec_info.transfer_chars == V4L2_XFER_FUNC_DEFAULT)
--
2.35.1


2022-04-14 01:01:14

by Nicolas Dufresne

[permalink] [raw]
Subject: Re: [PATCH v2] media: amphion: fix decoder's interlaced field

Le mardi 12 avril 2022 à 19:01 +0800, Ming Qian a écrit :
> For interlaced frame, the amphion vpu will store the
> two fields sequential into one buffer, top-bottom order
> so the field should be set to V4L2_FIELD_SEQ_TB.
> fix the previous bug that set it to V4L2_FIELD_SEQ_BT wrongly.
>
> Signed-off-by: Ming Qian <[email protected]>

Reviewed-by: Nicolas Dufresne <[email protected]>

> ---
> drivers/media/platform/amphion/vdec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c
> index 09628dd0c855..0a1976852b0d 100644
> --- a/drivers/media/platform/amphion/vdec.c
> +++ b/drivers/media/platform/amphion/vdec.c
> @@ -804,7 +804,7 @@ static void vdec_init_fmt(struct vpu_inst *inst)
> if (vdec->codec_info.progressive)
> inst->cap_format.field = V4L2_FIELD_NONE;
> else
> - inst->cap_format.field = V4L2_FIELD_SEQ_BT;
> + inst->cap_format.field = V4L2_FIELD_SEQ_TB;
> if (vdec->codec_info.color_primaries == V4L2_COLORSPACE_DEFAULT)
> vdec->codec_info.color_primaries = V4L2_COLORSPACE_REC709;
> if (vdec->codec_info.transfer_chars == V4L2_XFER_FUNC_DEFAULT)

2022-04-16 02:38:04

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH v2] media: amphion: fix decoder's interlaced field

Hi Ming,

On Tue, Apr 12, 2022 at 8:02 AM Ming Qian <[email protected]> wrote:
>
> For interlaced frame, the amphion vpu will store the
> two fields sequential into one buffer, top-bottom order
> so the field should be set to V4L2_FIELD_SEQ_TB.
> fix the previous bug that set it to V4L2_FIELD_SEQ_BT wrongly.
>
> Signed-off-by: Ming Qian <[email protected]>

Missing Fixes tag?