aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/hantro/hantro_hw.h
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2022-05-13 22:29:21 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-05-17 10:10:46 +0200
commit11442b7c937544dcb2e3525b17dc8f3425e8d9a2 (patch)
treedd0777d4ee81df926155bdcca2bf4c2c481a291d /drivers/staging/media/hantro/hantro_hw.h
parentmedia: hantro: h264: Make dpb entry management more robust (diff)
downloadlinux-dev-11442b7c937544dcb2e3525b17dc8f3425e8d9a2.tar.xz
linux-dev-11442b7c937544dcb2e3525b17dc8f3425e8d9a2.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/staging/media/hantro/hantro_hw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h
index 0b5b9da86c43..52a960f6fa4a 100644
--- a/drivers/staging/media/hantro/hantro_hw.h
+++ b/drivers/staging/media/hantro/hantro_hw.h
@@ -83,6 +83,7 @@ struct hantro_h264_dec_reflists {
* @ctrls: V4L2 controls attached to a run
* @dpb_longterm: DPB long-term
* @dpb_valid: DPB valid
+ * @cur_poc: Current picture order count
*/
struct hantro_h264_dec_hw_ctx {
struct hantro_aux_buf priv;
@@ -91,6 +92,7 @@ struct hantro_h264_dec_hw_ctx {
struct hantro_h264_dec_ctrls ctrls;
u32 dpb_longterm;
u32 dpb_valid;
+ s32 cur_poc;
};
/**