]> git.baikalelectronics.ru Git - kernel.git/commit
media: hantro: Add H.264 field decoding support
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 13 May 2022 20:29:21 +0000 (22:29 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 17 May 2022 08:10:46 +0000 (10:10 +0200)
commit0647e9133054a275d8146eab01ee31e010f5dd83
treedd0777d4ee81df926155bdcca2bf4c2c481a291d
parentecf6cc7a694ef99193b4f189a7090e8922f69b3d
media: hantro: Add H.264 field decoding support

This adds the required code to support field decoding. While most of
the code is derived from Rockchip and VSI reference code, the
reduction of the reference list to 16 entries was found by
trial and errors. The list consists of all the references with the
opposite field parity.

The strategy is to deduplicate the reference picture that points
to the same storage (same index). The choice of opposite parity has
been made to keep the other field of the current field pair in the
list. This method may not be robust if a field was lost.

[hverkuil: fix typos in the comment before deduplicate_reflist()]
[hverkuil: document new cur_poc field]

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/hantro_h264.c
drivers/staging/media/hantro/hantro_hw.h