1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_VISL_TRACE_VP8_H_) || defined(TRACE_HEADER_MULTI_READ)
3 #define _VISL_TRACE_VP8_H_
5 #include <linux/tracepoint.h>
9 #define TRACE_SYSTEM visl_vp8_controls
11 DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_entropy_tmpl
,
12 TP_PROTO(const struct v4l2_ctrl_vp8_frame
*f
),
14 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame
, f
)),
15 TP_fast_assign(__entry
->f
= *f
;),
16 TP_printk("\nentropy.coeff_probs {%s}\n"
17 "entropy.y_mode_probs %s\n"
18 "entropy.uv_mode_probs %s\n"
19 "entropy.mv_probs {%s}",
20 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
21 __entry
->f
.entropy
.coeff_probs
,
22 sizeof(__entry
->f
.entropy
.coeff_probs
),
24 __print_array(__entry
->f
.entropy
.y_mode_probs
,
25 ARRAY_SIZE(__entry
->f
.entropy
.y_mode_probs
),
26 sizeof(__entry
->f
.entropy
.y_mode_probs
[0])),
27 __print_array(__entry
->f
.entropy
.uv_mode_probs
,
28 ARRAY_SIZE(__entry
->f
.entropy
.uv_mode_probs
),
29 sizeof(__entry
->f
.entropy
.uv_mode_probs
[0])),
30 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
31 __entry
->f
.entropy
.mv_probs
,
32 sizeof(__entry
->f
.entropy
.mv_probs
),
37 DECLARE_EVENT_CLASS(v4l2_ctrl_vp8_frame_tmpl
,
38 TP_PROTO(const struct v4l2_ctrl_vp8_frame
*f
),
40 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp8_frame
, f
)),
41 TP_fast_assign(__entry
->f
= *f
;),
42 TP_printk("\nsegment.quant_update %s\n"
43 "segment.lf_update %s\n"
44 "segment.segment_probs %s\n"
46 "lf.ref_frm_delta %s\n"
47 "lf.mb_mode_delta %s\n"
48 "lf.sharpness_level %u\n"
52 "quant.y_dc_delta %d\n"
53 "quant.y2_dc_delta %d\n"
54 "quant.y2_ac_delta %d\n"
55 "quant.uv_dc_delta %d\n"
56 "quant.uv_ac_delta %d\n"
57 "coder_state.range %u\n"
58 "coder_state.value %u\n"
59 "coder_state.bit_count %u\n"
62 "horizontal_scale %u\n"
65 "prob_skip_false %u\n"
70 "first_part_size %u\n"
71 "first_part_header_bits %u\n"
73 "last_frame_ts %llu\n"
74 "golden_frame_ts %llu\n"
77 __print_array(__entry
->f
.segment
.quant_update
,
78 ARRAY_SIZE(__entry
->f
.segment
.quant_update
),
79 sizeof(__entry
->f
.segment
.quant_update
[0])),
80 __print_array(__entry
->f
.segment
.lf_update
,
81 ARRAY_SIZE(__entry
->f
.segment
.lf_update
),
82 sizeof(__entry
->f
.segment
.lf_update
[0])),
83 __print_array(__entry
->f
.segment
.segment_probs
,
84 ARRAY_SIZE(__entry
->f
.segment
.segment_probs
),
85 sizeof(__entry
->f
.segment
.segment_probs
[0])),
86 __print_flags(__entry
->f
.segment
.flags
, "|",
87 {V4L2_VP8_SEGMENT_FLAG_ENABLED
, "SEGMENT_ENABLED"},
88 {V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP
, "SEGMENT_UPDATE_MAP"},
89 {V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA
, "SEGMENT_UPDATE_FEATURE_DATA"},
90 {V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE
, "SEGMENT_DELTA_VALUE_MODE"}),
91 __print_array(__entry
->f
.lf
.ref_frm_delta
,
92 ARRAY_SIZE(__entry
->f
.lf
.ref_frm_delta
),
93 sizeof(__entry
->f
.lf
.ref_frm_delta
[0])),
94 __print_array(__entry
->f
.lf
.mb_mode_delta
,
95 ARRAY_SIZE(__entry
->f
.lf
.mb_mode_delta
),
96 sizeof(__entry
->f
.lf
.mb_mode_delta
[0])),
97 __entry
->f
.lf
.sharpness_level
,
99 __print_flags(__entry
->f
.lf
.flags
, "|",
100 {V4L2_VP8_LF_ADJ_ENABLE
, "LF_ADJ_ENABLED"},
101 {V4L2_VP8_LF_DELTA_UPDATE
, "LF_DELTA_UPDATE"},
102 {V4L2_VP8_LF_FILTER_TYPE_SIMPLE
, "LF_FILTER_TYPE_SIMPLE"}),
103 __entry
->f
.quant
.y_ac_qi
,
104 __entry
->f
.quant
.y_dc_delta
,
105 __entry
->f
.quant
.y2_dc_delta
,
106 __entry
->f
.quant
.y2_ac_delta
,
107 __entry
->f
.quant
.uv_dc_delta
,
108 __entry
->f
.quant
.uv_ac_delta
,
109 __entry
->f
.coder_state
.range
,
110 __entry
->f
.coder_state
.value
,
111 __entry
->f
.coder_state
.bit_count
,
114 __entry
->f
.horizontal_scale
,
115 __entry
->f
.vertical_scale
,
117 __entry
->f
.prob_skip_false
,
118 __entry
->f
.prob_intra
,
119 __entry
->f
.prob_last
,
121 __entry
->f
.num_dct_parts
,
122 __entry
->f
.first_part_size
,
123 __entry
->f
.first_part_header_bits
,
124 __print_array(__entry
->f
.dct_part_sizes
,
125 ARRAY_SIZE(__entry
->f
.dct_part_sizes
),
126 sizeof(__entry
->f
.dct_part_sizes
[0])),
127 __entry
->f
.last_frame_ts
,
128 __entry
->f
.golden_frame_ts
,
129 __entry
->f
.alt_frame_ts
,
130 __print_flags(__entry
->f
.flags
, "|",
131 {V4L2_VP8_FRAME_FLAG_KEY_FRAME
, "KEY_FRAME"},
132 {V4L2_VP8_FRAME_FLAG_EXPERIMENTAL
, "EXPERIMENTAL"},
133 {V4L2_VP8_FRAME_FLAG_SHOW_FRAME
, "SHOW_FRAME"},
134 {V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF
, "MB_NO_SKIP_COEFF"},
135 {V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN
, "SIGN_BIAS_GOLDEN"},
136 {V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT
, "SIGN_BIAS_ALT"})
140 DEFINE_EVENT(v4l2_ctrl_vp8_frame_tmpl
, v4l2_ctrl_vp8_frame
,
141 TP_PROTO(const struct v4l2_ctrl_vp8_frame
*f
),
145 DEFINE_EVENT(v4l2_ctrl_vp8_entropy_tmpl
, v4l2_ctrl_vp8_entropy
,
146 TP_PROTO(const struct v4l2_ctrl_vp8_frame
*f
),
152 #undef TRACE_INCLUDE_PATH
153 #undef TRACE_INCLUDE_FILE
154 #define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
155 #define TRACE_INCLUDE_FILE visl-trace-vp8
156 #include <trace/define_trace.h>