提交 73bc0b0c 编写于 作者: J Jernej Skrabec 提交者: Mauro Carvalho Chehab

media: cedrus: Fix H264 decoding

During H264 API overhaul subtle bug was introduced Cedrus driver.
Progressive references have both, top and bottom reference flags set.
Cedrus reference list expects only bottom reference flag and only when
interlaced frames are decoded. However, due to a bug in Cedrus check,
exclusivity is not tested and that flag is set also for progressive
references. That causes "jumpy" background with many videos.

Fix that by checking that only bottom reference flag is set in control
and nothing else.
Tested-by: NAndre Heider <a.heider@gmail.com>
Fixes: cfc8c3ed ("media: cedrus: h264: Properly configure reference field")
Signed-off-by: NJernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
上级 a53e3c18
...@@ -203,7 +203,7 @@ static void _cedrus_write_ref_list(struct cedrus_ctx *ctx, ...@@ -203,7 +203,7 @@ static void _cedrus_write_ref_list(struct cedrus_ctx *ctx,
position = cedrus_buf->codec.h264.position; position = cedrus_buf->codec.h264.position;
sram_array[i] |= position << 1; sram_array[i] |= position << 1;
if (ref_list[i].fields & V4L2_H264_BOTTOM_FIELD_REF) if (ref_list[i].fields == V4L2_H264_BOTTOM_FIELD_REF)
sram_array[i] |= BIT(0); sram_array[i] |= BIT(0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册