Skip to content

Commit 26e4520

Browse files
ndufresnemchehab
authored andcommitted
media: h264: Increase reference lists size to 32
This is to accommodate support for field decoding, which splits the top and the bottom references into the reference list. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
1 parent 2e2c3d6 commit 26e4520

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

drivers/media/v4l2-core/v4l2-h264.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static int v4l2_h264_b1_ref_list_cmp(const void *ptra, const void *ptrb,
212212
* v4l2_h264_build_p_ref_list() - Build the P reference list
213213
*
214214
* @builder: reference list builder context
215-
* @reflist: 16 sized array used to store the P reference list. Each entry
215+
* @reflist: 32 sized array used to store the P reference list. Each entry
216216
* is a v4l2_h264_reference structure
217217
*
218218
* This functions builds the P reference lists. This procedure is describe in
@@ -235,9 +235,9 @@ EXPORT_SYMBOL_GPL(v4l2_h264_build_p_ref_list);
235235
* v4l2_h264_build_b_ref_lists() - Build the B0/B1 reference lists
236236
*
237237
* @builder: reference list builder context
238-
* @b0_reflist: 16 sized array used to store the B0 reference list. Each entry
238+
* @b0_reflist: 32 sized array used to store the B0 reference list. Each entry
239239
* is a v4l2_h264_reference structure
240-
* @b1_reflist: 16 sized array used to store the B1 reference list. Each entry
240+
* @b1_reflist: 32 sized array used to store the B1 reference list. Each entry
241241
* is a v4l2_h264_reference structure
242242
*
243243
* This functions builds the B0/B1 reference lists. This procedure is described

drivers/staging/media/hantro/hantro_hw.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ struct hantro_h264_dec_ctrls {
6969
* @b1: B1 reflist
7070
*/
7171
struct hantro_h264_dec_reflists {
72-
struct v4l2_h264_reference p[HANTRO_H264_DPB_SIZE];
73-
struct v4l2_h264_reference b0[HANTRO_H264_DPB_SIZE];
74-
struct v4l2_h264_reference b1[HANTRO_H264_DPB_SIZE];
72+
struct v4l2_h264_reference p[V4L2_H264_REF_LIST_LEN];
73+
struct v4l2_h264_reference b0[V4L2_H264_REF_LIST_LEN];
74+
struct v4l2_h264_reference b1[V4L2_H264_REF_LIST_LEN];
7575
};
7676

7777
/**

drivers/staging/media/rkvdec/rkvdec-h264.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ struct rkvdec_h264_priv_tbl {
100100
#define RKVDEC_H264_DPB_SIZE 16
101101

102102
struct rkvdec_h264_reflists {
103-
struct v4l2_h264_reference p[RKVDEC_H264_DPB_SIZE];
104-
struct v4l2_h264_reference b0[RKVDEC_H264_DPB_SIZE];
105-
struct v4l2_h264_reference b1[RKVDEC_H264_DPB_SIZE];
103+
struct v4l2_h264_reference p[V4L2_H264_REF_LIST_LEN];
104+
struct v4l2_h264_reference b0[V4L2_H264_REF_LIST_LEN];
105+
struct v4l2_h264_reference b1[V4L2_H264_REF_LIST_LEN];
106106
u8 num_valid;
107107
};
108108

include/media/v4l2-h264.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct v4l2_h264_reflist_builder {
3737
u16 longterm : 1;
3838
} refs[V4L2_H264_NUM_DPB_ENTRIES];
3939
s32 cur_pic_order_count;
40-
struct v4l2_h264_reference unordered_reflist[V4L2_H264_NUM_DPB_ENTRIES];
40+
struct v4l2_h264_reference unordered_reflist[V4L2_H264_REF_LIST_LEN];
4141
u8 num_valid;
4242
};
4343

@@ -51,9 +51,9 @@ v4l2_h264_init_reflist_builder(struct v4l2_h264_reflist_builder *b,
5151
* v4l2_h264_build_b_ref_lists() - Build the B0/B1 reference lists
5252
*
5353
* @builder: reference list builder context
54-
* @b0_reflist: 16 sized array used to store the B0 reference list. Each entry
54+
* @b0_reflist: 32 sized array used to store the B0 reference list. Each entry
5555
* is a v4l2_h264_reference structure
56-
* @b1_reflist: 16 sized array used to store the B1 reference list. Each entry
56+
* @b1_reflist: 32 sized array used to store the B1 reference list. Each entry
5757
* is a v4l2_h264_reference structure
5858
*
5959
* This functions builds the B0/B1 reference lists. This procedure is described
@@ -70,7 +70,7 @@ v4l2_h264_build_b_ref_lists(const struct v4l2_h264_reflist_builder *builder,
7070
* v4l2_h264_build_p_ref_list() - Build the P reference list
7171
*
7272
* @builder: reference list builder context
73-
* @reflist: 16 sized array used to store the P reference list. Each entry
73+
* @reflist: 32 sized array used to store the P reference list. Each entry
7474
* is a v4l2_h264_reference structure
7575
*
7676
* This functions builds the P reference lists. This procedure is describe in

0 commit comments

Comments
 (0)