Lines Matching refs:builder

128 	const struct v4l2_h264_reflist_builder *builder = data;  in v4l2_h264_p_ref_list_cmp()  local
138 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_p_ref_list_cmp()
140 if (!builder->refs[idxa].longterm) in v4l2_h264_p_ref_list_cmp()
154 if (!builder->refs[idxa].longterm) in v4l2_h264_p_ref_list_cmp()
155 return builder->refs[idxb].frame_num < in v4l2_h264_p_ref_list_cmp()
156 builder->refs[idxa].frame_num ? in v4l2_h264_p_ref_list_cmp()
159 return builder->refs[idxa].frame_num < builder->refs[idxb].frame_num ? in v4l2_h264_p_ref_list_cmp()
166 const struct v4l2_h264_reflist_builder *builder = data; in v4l2_h264_b0_ref_list_cmp() local
177 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_b0_ref_list_cmp()
179 if (!builder->refs[idxa].longterm) in v4l2_h264_b0_ref_list_cmp()
186 if (builder->refs[idxa].longterm) in v4l2_h264_b0_ref_list_cmp()
187 return builder->refs[idxa].frame_num < in v4l2_h264_b0_ref_list_cmp()
188 builder->refs[idxb].frame_num ? in v4l2_h264_b0_ref_list_cmp()
191 poca = v4l2_h264_get_poc(builder, ptra); in v4l2_h264_b0_ref_list_cmp()
192 pocb = v4l2_h264_get_poc(builder, ptrb); in v4l2_h264_b0_ref_list_cmp()
199 if ((poca < builder->cur_pic_order_count) != in v4l2_h264_b0_ref_list_cmp()
200 (pocb < builder->cur_pic_order_count)) in v4l2_h264_b0_ref_list_cmp()
202 else if (poca < builder->cur_pic_order_count) in v4l2_h264_b0_ref_list_cmp()
211 const struct v4l2_h264_reflist_builder *builder = data; in v4l2_h264_b1_ref_list_cmp() local
222 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_b1_ref_list_cmp()
224 if (!builder->refs[idxa].longterm) in v4l2_h264_b1_ref_list_cmp()
231 if (builder->refs[idxa].longterm) in v4l2_h264_b1_ref_list_cmp()
232 return builder->refs[idxa].frame_num < in v4l2_h264_b1_ref_list_cmp()
233 builder->refs[idxb].frame_num ? in v4l2_h264_b1_ref_list_cmp()
236 poca = v4l2_h264_get_poc(builder, ptra); in v4l2_h264_b1_ref_list_cmp()
237 pocb = v4l2_h264_get_poc(builder, ptrb); in v4l2_h264_b1_ref_list_cmp()
244 if ((poca < builder->cur_pic_order_count) != in v4l2_h264_b1_ref_list_cmp()
245 (pocb < builder->cur_pic_order_count)) in v4l2_h264_b1_ref_list_cmp()
247 else if (poca < builder->cur_pic_order_count) in v4l2_h264_b1_ref_list_cmp()
301 static const char *format_ref_list_p(const struct v4l2_h264_reflist_builder *builder, in format_ref_list_p() argument
313 for (i = 0; i < builder->num_valid; i++) { in format_ref_list_p()
317 int frame_num = builder->refs[reflist[i].index].frame_num; in format_ref_list_p()
318 bool longterm = builder->refs[reflist[i].index].longterm; in format_ref_list_p()
328 static void print_ref_list_p(const struct v4l2_h264_reflist_builder *builder, in print_ref_list_p() argument
334 builder->cur_pic_order_count, in print_ref_list_p()
335 ref_type_to_char(builder->cur_pic_fields), in print_ref_list_p()
336 format_ref_list_p(builder, reflist, &buf)); in print_ref_list_p()
341 static const char *format_ref_list_b(const struct v4l2_h264_reflist_builder *builder, in format_ref_list_b() argument
353 for (i = 0; i < builder->num_valid; i++) { in format_ref_list_b()
354 int frame_num = builder->refs[reflist[i].index].frame_num; in format_ref_list_b()
355 u32 poc = v4l2_h264_get_poc(builder, reflist + i); in format_ref_list_b()
356 bool longterm = builder->refs[reflist[i].index].longterm; in format_ref_list_b()
367 static void print_ref_list_b(const struct v4l2_h264_reflist_builder *builder, in print_ref_list_b() argument
373 list_num, builder->cur_pic_order_count, in print_ref_list_b()
374 ref_type_to_char(builder->cur_pic_fields), in print_ref_list_b()
375 format_ref_list_b(builder, reflist, &buf)); in print_ref_list_b()
393 v4l2_h264_build_p_ref_list(const struct v4l2_h264_reflist_builder *builder, in v4l2_h264_build_p_ref_list() argument
396 memcpy(reflist, builder->unordered_reflist, in v4l2_h264_build_p_ref_list()
397 sizeof(builder->unordered_reflist[0]) * builder->num_valid); in v4l2_h264_build_p_ref_list()
398 sort_r(reflist, builder->num_valid, sizeof(*reflist), in v4l2_h264_build_p_ref_list()
399 v4l2_h264_p_ref_list_cmp, NULL, builder); in v4l2_h264_build_p_ref_list()
401 if (builder->cur_pic_fields != V4L2_H264_FRAME_REF) in v4l2_h264_build_p_ref_list()
402 reorder_field_reflist(builder, reflist); in v4l2_h264_build_p_ref_list()
404 print_ref_list_p(builder, reflist); in v4l2_h264_build_p_ref_list()
423 v4l2_h264_build_b_ref_lists(const struct v4l2_h264_reflist_builder *builder, in v4l2_h264_build_b_ref_lists() argument
427 memcpy(b0_reflist, builder->unordered_reflist, in v4l2_h264_build_b_ref_lists()
428 sizeof(builder->unordered_reflist[0]) * builder->num_valid); in v4l2_h264_build_b_ref_lists()
429 sort_r(b0_reflist, builder->num_valid, sizeof(*b0_reflist), in v4l2_h264_build_b_ref_lists()
430 v4l2_h264_b0_ref_list_cmp, NULL, builder); in v4l2_h264_build_b_ref_lists()
432 memcpy(b1_reflist, builder->unordered_reflist, in v4l2_h264_build_b_ref_lists()
433 sizeof(builder->unordered_reflist[0]) * builder->num_valid); in v4l2_h264_build_b_ref_lists()
434 sort_r(b1_reflist, builder->num_valid, sizeof(*b1_reflist), in v4l2_h264_build_b_ref_lists()
435 v4l2_h264_b1_ref_list_cmp, NULL, builder); in v4l2_h264_build_b_ref_lists()
437 if (builder->cur_pic_fields != V4L2_H264_FRAME_REF) { in v4l2_h264_build_b_ref_lists()
438 reorder_field_reflist(builder, b0_reflist); in v4l2_h264_build_b_ref_lists()
439 reorder_field_reflist(builder, b1_reflist); in v4l2_h264_build_b_ref_lists()
442 if (builder->num_valid > 1 && in v4l2_h264_build_b_ref_lists()
443 !memcmp(b1_reflist, b0_reflist, builder->num_valid)) in v4l2_h264_build_b_ref_lists()
446 print_ref_list_b(builder, b0_reflist, 0); in v4l2_h264_build_b_ref_lists()
447 print_ref_list_b(builder, b1_reflist, 1); in v4l2_h264_build_b_ref_lists()