Lines Matching full:run
62 __kernel_size_t buflen, struct visl_run *run) in visl_get_ref_frames() argument
80 vb2_buf = vb2_find_buffer(cap_q, run->fwht.params->backward_ref_ts); in visl_get_ref_frames()
83 run->fwht.params->backward_ref_ts, vb2_buf); in visl_get_ref_frames()
92 b_ref = vb2_find_buffer(cap_q, run->mpeg2.pic->backward_ref_ts); in visl_get_ref_frames()
93 f_ref = vb2_find_buffer(cap_q, run->mpeg2.pic->forward_ref_ts); in visl_get_ref_frames()
96 run->mpeg2.pic->backward_ref_ts, b_ref); in visl_get_ref_frames()
98 run->mpeg2.pic->forward_ref_ts, f_ref); in visl_get_ref_frames()
108 last = vb2_find_buffer(cap_q, run->vp8.frame->last_frame_ts); in visl_get_ref_frames()
109 golden = vb2_find_buffer(cap_q, run->vp8.frame->golden_frame_ts); in visl_get_ref_frames()
110 alt = vb2_find_buffer(cap_q, run->vp8.frame->alt_frame_ts); in visl_get_ref_frames()
113 run->vp8.frame->last_frame_ts, last); in visl_get_ref_frames()
115 run->vp8.frame->golden_frame_ts, golden); in visl_get_ref_frames()
117 run->vp8.frame->alt_frame_ts, alt); in visl_get_ref_frames()
127 last = vb2_find_buffer(cap_q, run->vp9.frame->last_frame_ts); in visl_get_ref_frames()
128 golden = vb2_find_buffer(cap_q, run->vp9.frame->golden_frame_ts); in visl_get_ref_frames()
129 alt = vb2_find_buffer(cap_q, run->vp9.frame->alt_frame_ts); in visl_get_ref_frames()
132 run->vp9.frame->last_frame_ts, last); in visl_get_ref_frames()
134 run->vp9.frame->golden_frame_ts, golden); in visl_get_ref_frames()
136 run->vp9.frame->alt_frame_ts, alt); in visl_get_ref_frames()
146 for (i = 0; i < ARRAY_SIZE(run->h264.dpram->dpb); i++) { in visl_get_ref_frames()
148 run->h264.dpram->dpb[i].reference_ts); in visl_get_ref_frames()
151 run->h264.dpram->dpb[i].reference_ts, in visl_get_ref_frames()
155 run->h264.dpram->dpb[i].reference_ts); in visl_get_ref_frames()
169 for (i = 0; i < ARRAY_SIZE(run->hevc.dpram->dpb); i++) { in visl_get_ref_frames()
170 vb2_buf = vb2_find_buffer(cap_q, run->hevc.dpram->dpb[i].timestamp); in visl_get_ref_frames()
173 run->hevc.dpram->dpb[i].timestamp, in visl_get_ref_frames()
177 run->hevc.dpram->dpb[i].timestamp); in visl_get_ref_frames()
188 int idx_last = run->av1.frame->ref_frame_idx[LAST_BUF_IDX]; in visl_get_ref_frames()
189 int idx_last2 = run->av1.frame->ref_frame_idx[LAST2_BUF_IDX]; in visl_get_ref_frames()
190 int idx_last3 = run->av1.frame->ref_frame_idx[LAST3_BUF_IDX]; in visl_get_ref_frames()
191 int idx_golden = run->av1.frame->ref_frame_idx[GOLDEN_BUF_IDX]; in visl_get_ref_frames()
192 int idx_bwd = run->av1.frame->ref_frame_idx[BWD_BUF_IDX]; in visl_get_ref_frames()
193 int idx_alt2 = run->av1.frame->ref_frame_idx[ALT2_BUF_IDX]; in visl_get_ref_frames()
194 int idx_alt = run->av1.frame->ref_frame_idx[ALT_BUF_IDX]; in visl_get_ref_frames()
196 const u64 *reference_frame_ts = run->av1.frame->reference_frame_ts; in visl_get_ref_frames()
271 struct visl_run *run, char buf[], size_t bufsz) in visl_tpg_fill_sequence() argument
291 run->dst->sequence, in visl_tpg_fill_sequence()
292 run->dst->vb2_buf.timestamp, in visl_tpg_fill_sequence()
293 (run->dst->field == V4L2_FIELD_ALTERNATE) ? in visl_tpg_fill_sequence()
294 (run->dst->field == V4L2_FIELD_TOP ? in visl_tpg_fill_sequence()
299 struct visl_run *run, in visl_tpg_fill_codec_specific() argument
314 "H264: %u", run->h264.dpram->pic_order_cnt_lsb); in visl_tpg_fill_codec_specific()
318 "HEVC: %d", run->hevc.dpram->pic_order_cnt_val); in visl_tpg_fill_codec_specific()
327 static void visl_tpg_fill(struct visl_ctx *ctx, struct visl_run *run) in visl_tpg_fill() argument
345 &run->dst->vb2_buf, p, in visl_tpg_fill()
353 visl_tpg_fill_sequence(ctx, run, buf, TPG_STR_BUF_SZ); in visl_tpg_fill()
355 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
356 frame_dprintk(ctx->dev, run->dst->sequence, ""); in visl_tpg_fill()
359 if (visl_tpg_fill_codec_specific(ctx, run, buf, TPG_STR_BUF_SZ)) { in visl_tpg_fill()
361 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
362 frame_dprintk(ctx->dev, run->dst->sequence, ""); in visl_tpg_fill()
366 visl_get_ref_frames(ctx, buf, TPG_STR_BUF_SZ, run); in visl_tpg_fill()
370 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", line_str); in visl_tpg_fill()
373 frame_dprintk(ctx->dev, run->dst->sequence, ""); in visl_tpg_fill()
388 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
399 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
404 frame_dprintk(ctx->dev, run->dst->sequence, ""); in visl_tpg_fill()
407 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
431 frame_dprintk(ctx->dev, run->dst->sequence, "%s", &buf[old_len]); in visl_tpg_fill()
436 frame_dprintk(ctx->dev, run->dst->sequence, ""); in visl_tpg_fill()
450 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
461 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
466 frame_dprintk(ctx->dev, run->dst->sequence, ""); in visl_tpg_fill()
469 frame_dprintk(ctx->dev, run->dst->sequence, "%s\n", buf); in visl_tpg_fill()
490 frame_dprintk(ctx->dev, run->dst->sequence, "%s", &buf[old_len]); in visl_tpg_fill()
495 static void visl_trace_ctrls(struct visl_ctx *ctx, struct visl_run *run) in visl_trace_ctrls() argument
504 trace_v4l2_ctrl_fwht_params(run->fwht.params); in visl_trace_ctrls()
507 trace_v4l2_ctrl_mpeg2_sequence(run->mpeg2.seq); in visl_trace_ctrls()
508 trace_v4l2_ctrl_mpeg2_picture(run->mpeg2.pic); in visl_trace_ctrls()
509 trace_v4l2_ctrl_mpeg2_quantisation(run->mpeg2.quant); in visl_trace_ctrls()
512 trace_v4l2_ctrl_vp8_frame(run->vp8.frame); in visl_trace_ctrls()
513 trace_v4l2_ctrl_vp8_entropy(run->vp8.frame); in visl_trace_ctrls()
516 trace_v4l2_ctrl_vp9_frame(run->vp9.frame); in visl_trace_ctrls()
517 trace_v4l2_ctrl_vp9_compressed_hdr(run->vp9.probs); in visl_trace_ctrls()
518 trace_v4l2_ctrl_vp9_compressed_coeff(run->vp9.probs); in visl_trace_ctrls()
519 trace_v4l2_vp9_mv_probs(&run->vp9.probs->mv); in visl_trace_ctrls()
522 trace_v4l2_ctrl_h264_sps(run->h264.sps); in visl_trace_ctrls()
523 trace_v4l2_ctrl_h264_pps(run->h264.pps); in visl_trace_ctrls()
524 trace_v4l2_ctrl_h264_scaling_matrix(run->h264.sm); in visl_trace_ctrls()
525 trace_v4l2_ctrl_h264_slice_params(run->h264.spram); in visl_trace_ctrls()
527 for (i = 0; i < ARRAY_SIZE(run->h264.spram->ref_pic_list0); i++) in visl_trace_ctrls()
528 trace_v4l2_h264_ref_pic_list0(&run->h264.spram->ref_pic_list0[i], i); in visl_trace_ctrls()
529 for (i = 0; i < ARRAY_SIZE(run->h264.spram->ref_pic_list0); i++) in visl_trace_ctrls()
530 trace_v4l2_h264_ref_pic_list1(&run->h264.spram->ref_pic_list1[i], i); in visl_trace_ctrls()
532 trace_v4l2_ctrl_h264_decode_params(run->h264.dpram); in visl_trace_ctrls()
534 for (i = 0; i < ARRAY_SIZE(run->h264.dpram->dpb); i++) in visl_trace_ctrls()
535 trace_v4l2_h264_dpb_entry(&run->h264.dpram->dpb[i], i); in visl_trace_ctrls()
537 trace_v4l2_ctrl_h264_pred_weights(run->h264.pwht); in visl_trace_ctrls()
540 trace_v4l2_ctrl_hevc_sps(run->hevc.sps); in visl_trace_ctrls()
541 trace_v4l2_ctrl_hevc_pps(run->hevc.pps); in visl_trace_ctrls()
542 trace_v4l2_ctrl_hevc_slice_params(run->hevc.spram); in visl_trace_ctrls()
543 trace_v4l2_ctrl_hevc_scaling_matrix(run->hevc.sm); in visl_trace_ctrls()
544 trace_v4l2_ctrl_hevc_decode_params(run->hevc.dpram); in visl_trace_ctrls()
546 for (i = 0; i < ARRAY_SIZE(run->hevc.dpram->dpb); i++) in visl_trace_ctrls()
547 trace_v4l2_hevc_dpb_entry(&run->hevc.dpram->dpb[i]); in visl_trace_ctrls()
549 trace_v4l2_hevc_pred_weight_table(&run->hevc.spram->pred_weight_table); in visl_trace_ctrls()
552 trace_v4l2_ctrl_av1_sequence(run->av1.seq); in visl_trace_ctrls()
553 trace_v4l2_ctrl_av1_frame(run->av1.frame); in visl_trace_ctrls()
554 trace_v4l2_ctrl_av1_film_grain(run->av1.grain); in visl_trace_ctrls()
555 trace_v4l2_ctrl_av1_tile_group_entry(run->av1.tge); in visl_trace_ctrls()
563 struct visl_run run = {}; in visl_device_run() local
566 run.src = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); in visl_device_run()
567 run.dst = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx); in visl_device_run()
570 src_req = run.src->vb2_buf.req_obj.req; in visl_device_run()
575 v4l2_m2m_buf_copy_metadata(run.src, run.dst, true); in visl_device_run()
576 run.dst->sequence = ctx->q_data[V4L2_M2M_DST].sequence++; in visl_device_run()
577 run.src->sequence = ctx->q_data[V4L2_M2M_SRC].sequence++; in visl_device_run()
578 run.dst->field = ctx->decoded_fmt.fmt.pix.field; in visl_device_run()
585 run.fwht.params = visl_find_control_data(ctx, V4L2_CID_STATELESS_FWHT_PARAMS); in visl_device_run()
588 run.mpeg2.seq = visl_find_control_data(ctx, V4L2_CID_STATELESS_MPEG2_SEQUENCE); in visl_device_run()
589 run.mpeg2.pic = visl_find_control_data(ctx, V4L2_CID_STATELESS_MPEG2_PICTURE); in visl_device_run()
590 run.mpeg2.quant = visl_find_control_data(ctx, in visl_device_run()
594 run.vp8.frame = visl_find_control_data(ctx, V4L2_CID_STATELESS_VP8_FRAME); in visl_device_run()
597 run.vp9.frame = visl_find_control_data(ctx, V4L2_CID_STATELESS_VP9_FRAME); in visl_device_run()
598 run.vp9.probs = visl_find_control_data(ctx, V4L2_CID_STATELESS_VP9_COMPRESSED_HDR); in visl_device_run()
601 run.h264.sps = visl_find_control_data(ctx, V4L2_CID_STATELESS_H264_SPS); in visl_device_run()
602 run.h264.pps = visl_find_control_data(ctx, V4L2_CID_STATELESS_H264_PPS); in visl_device_run()
603 run.h264.sm = visl_find_control_data(ctx, V4L2_CID_STATELESS_H264_SCALING_MATRIX); in visl_device_run()
604 run.h264.spram = visl_find_control_data(ctx, V4L2_CID_STATELESS_H264_SLICE_PARAMS); in visl_device_run()
605 run.h264.dpram = visl_find_control_data(ctx, V4L2_CID_STATELESS_H264_DECODE_PARAMS); in visl_device_run()
606 run.h264.pwht = visl_find_control_data(ctx, V4L2_CID_STATELESS_H264_PRED_WEIGHTS); in visl_device_run()
609 run.hevc.sps = visl_find_control_data(ctx, V4L2_CID_STATELESS_HEVC_SPS); in visl_device_run()
610 run.hevc.pps = visl_find_control_data(ctx, V4L2_CID_STATELESS_HEVC_PPS); in visl_device_run()
611 run.hevc.spram = visl_find_control_data(ctx, V4L2_CID_STATELESS_HEVC_SLICE_PARAMS); in visl_device_run()
612 run.hevc.sm = visl_find_control_data(ctx, V4L2_CID_STATELESS_HEVC_SCALING_MATRIX); in visl_device_run()
613 run.hevc.dpram = visl_find_control_data(ctx, V4L2_CID_STATELESS_HEVC_DECODE_PARAMS); in visl_device_run()
616 run.av1.seq = visl_find_control_data(ctx, V4L2_CID_STATELESS_AV1_SEQUENCE); in visl_device_run()
617 run.av1.frame = visl_find_control_data(ctx, V4L2_CID_STATELESS_AV1_FRAME); in visl_device_run()
618 run.av1.tge = visl_find_control_data(ctx, V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY); in visl_device_run()
619 run.av1.grain = visl_find_control_data(ctx, V4L2_CID_STATELESS_AV1_FILM_GRAIN); in visl_device_run()
623 frame_dprintk(ctx->dev, run.dst->sequence, in visl_device_run()
625 run.src->sequence, run.src->vb2_buf.timestamp); in visl_device_run()
627 frame_dprintk(ctx->dev, run.dst->sequence, in visl_device_run()
629 run.dst->sequence, run.dst->vb2_buf.timestamp); in visl_device_run()
631 visl_tpg_fill(ctx, &run); in visl_device_run()
632 visl_trace_ctrls(ctx, &run); in visl_device_run()
635 run.dst->sequence >= bitstream_trace_frame_start && in visl_device_run()
636 run.dst->sequence < bitstream_trace_frame_start + bitstream_trace_nframes) in visl_device_run()
637 visl_trace_bitstream(ctx, &run); in visl_device_run()