@@ -75,12 +75,12 @@ v4l2_h264_init_reflist_builder(struct v4l2_h264_reflist_builder *b,
7575 pic_order_count = dpb [i ].top_field_order_cnt ;
7676
7777 b -> refs [i ].pic_order_count = pic_order_count ;
78- b -> unordered_reflist [b -> num_valid ] = i ;
78+ b -> unordered_reflist [b -> num_valid ]. index = i ;
7979 b -> num_valid ++ ;
8080 }
8181
8282 for (i = b -> num_valid ; i < ARRAY_SIZE (b -> unordered_reflist ); i ++ )
83- b -> unordered_reflist [i ] = i ;
83+ b -> unordered_reflist [i ]. index = i ;
8484}
8585EXPORT_SYMBOL_GPL (v4l2_h264_init_reflist_builder );
8686
@@ -90,8 +90,8 @@ static int v4l2_h264_p_ref_list_cmp(const void *ptra, const void *ptrb,
9090 const struct v4l2_h264_reflist_builder * builder = data ;
9191 u8 idxa , idxb ;
9292
93- idxa = * (( u8 * )ptra );
94- idxb = * (( u8 * )ptrb );
93+ idxa = (( struct v4l2_h264_reference * )ptra )-> index ;
94+ idxb = (( struct v4l2_h264_reference * )ptrb )-> index ;
9595
9696 if (WARN_ON (idxa >= V4L2_H264_NUM_DPB_ENTRIES ||
9797 idxb >= V4L2_H264_NUM_DPB_ENTRIES ))
@@ -125,8 +125,8 @@ static int v4l2_h264_b0_ref_list_cmp(const void *ptra, const void *ptrb,
125125 s32 poca , pocb ;
126126 u8 idxa , idxb ;
127127
128- idxa = * (( u8 * )ptra );
129- idxb = * (( u8 * )ptrb );
128+ idxa = (( struct v4l2_h264_reference * )ptra )-> index ;
129+ idxb = (( struct v4l2_h264_reference * )ptrb )-> index ;
130130
131131 if (WARN_ON (idxa >= V4L2_H264_NUM_DPB_ENTRIES ||
132132 idxb >= V4L2_H264_NUM_DPB_ENTRIES ))
@@ -170,8 +170,8 @@ static int v4l2_h264_b1_ref_list_cmp(const void *ptra, const void *ptrb,
170170 s32 poca , pocb ;
171171 u8 idxa , idxb ;
172172
173- idxa = * (( u8 * )ptra );
174- idxb = * (( u8 * )ptrb );
173+ idxa = (( struct v4l2_h264_reference * )ptra )-> index ;
174+ idxb = (( struct v4l2_h264_reference * )ptrb )-> index ;
175175
176176 if (WARN_ON (idxa >= V4L2_H264_NUM_DPB_ENTRIES ||
177177 idxb >= V4L2_H264_NUM_DPB_ENTRIES ))
@@ -212,8 +212,8 @@ 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-bytes array used to store the P reference list. Each entry
216- * is an index in the DPB
215+ * @reflist: 16 sized array used to store the P reference list. Each entry
216+ * is a v4l2_h264_reference structure
217217 *
218218 * This functions builds the P reference lists. This procedure is describe in
219219 * section '8.2.4 Decoding process for reference picture lists construction'
@@ -222,7 +222,7 @@ static int v4l2_h264_b1_ref_list_cmp(const void *ptra, const void *ptrb,
222222 */
223223void
224224v4l2_h264_build_p_ref_list (const struct v4l2_h264_reflist_builder * builder ,
225- u8 * reflist )
225+ struct v4l2_h264_reference * reflist )
226226{
227227 memcpy (reflist , builder -> unordered_reflist ,
228228 sizeof (builder -> unordered_reflist [0 ]) * builder -> num_valid );
@@ -235,10 +235,10 @@ 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-bytes array used to store the B0 reference list. Each entry
239- * is an index in the DPB
240- * @b1_reflist: 16-bytes array used to store the B1 reference list. Each entry
241- * is an index in the DPB
238+ * @b0_reflist: 16 sized array used to store the B0 reference list. Each entry
239+ * is a v4l2_h264_reference structure
240+ * @b1_reflist: 16 sized array used to store the B1 reference list. Each entry
241+ * is a v4l2_h264_reference structure
242242 *
243243 * This functions builds the B0/B1 reference lists. This procedure is described
244244 * in section '8.2.4 Decoding process for reference picture lists construction'
@@ -247,7 +247,8 @@ EXPORT_SYMBOL_GPL(v4l2_h264_build_p_ref_list);
247247 */
248248void
249249v4l2_h264_build_b_ref_lists (const struct v4l2_h264_reflist_builder * builder ,
250- u8 * b0_reflist , u8 * b1_reflist )
250+ struct v4l2_h264_reference * b0_reflist ,
251+ struct v4l2_h264_reference * b1_reflist )
251252{
252253 memcpy (b0_reflist , builder -> unordered_reflist ,
253254 sizeof (builder -> unordered_reflist [0 ]) * builder -> num_valid );
0 commit comments