Commit 685e6876 authored by Jonas Karlman's avatar Jonas Karlman Committed by Ezequiel Garcia

media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly

The FIELDPIC_FLAG_E bit should be set when field_pic_flag exists in stream,
it is currently set based on field_pic_flag of current frame.
The PIC_FIELDMODE_E bit is correctly set based on the field_pic_flag.

Fix this by setting the FIELDPIC_FLAG_E bit when frame_mbs_only is not set.

Fixes: dea0a82f ("media: hantro: Add support for H264 decoding on G1")
Signed-off-by: default avatarJonas Karlman <>
Reviewed-by: Boris Brezillon's avatarBoris Brezillon <>
Signed-off-by: default avatarHans Verkuil <>
Signed-off-by: default avatarMauro Carvalho Chehab <>
parent 37e1ead1
......@@ -63,7 +63,7 @@ static void set_params(struct hantro_ctx *ctx)
/* always use the matrix sent from userspace */
if (slices[0].flags & V4L2_H264_SLICE_FLAG_FIELD_PIC)
if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY))
vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL2);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment