[4/6] v4l2-tracer: add re/tracing for AV1 controls

Message ID 83f2b55175f869f1e992d01938c2bdd3b5385ab0.1701390439.git.deborah.brouwer@collabora.com (mailing list archive)
State Accepted
Delegated to: Hans Verkuil
Headers
Series v4l2-tracer: misc fixes and improvements |

Commit Message

Deborah Brouwer Dec. 1, 2023, 12:46 a.m. UTC
  Hook up the existing autogenerated AV1 tracing and retracing functions so
that they are called by the tracer and retracer.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
---
 utils/v4l2-tracer/retrace.cpp | 12 ++++++++++++
 utils/v4l2-tracer/trace.cpp   | 12 ++++++++++++
 2 files changed, 24 insertions(+)
  

Patch

diff --git a/utils/v4l2-tracer/retrace.cpp b/utils/v4l2-tracer/retrace.cpp
index 03fe13f8..b8a1c8fb 100644
--- a/utils/v4l2-tracer/retrace.cpp
+++ b/utils/v4l2-tracer/retrace.cpp
@@ -876,6 +876,18 @@  struct v4l2_ext_control *retrace_v4l2_ext_control(json_object *parent_obj, int c
 	case V4L2_CID_STATELESS_MPEG2_QUANTISATION:
 		p->ptr = retrace_v4l2_ctrl_mpeg2_quantisation_gen(v4l2_ext_control_obj);
 		break;
+	case V4L2_CID_STATELESS_AV1_SEQUENCE:
+		p->ptr = retrace_v4l2_ctrl_av1_sequence_gen(v4l2_ext_control_obj);
+		break;
+	case V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY:
+		p->ptr = retrace_v4l2_ctrl_av1_tile_group_entry_gen(v4l2_ext_control_obj);
+		break;
+	case V4L2_CID_STATELESS_AV1_FRAME:
+		p->ptr = retrace_v4l2_ctrl_av1_frame_gen(v4l2_ext_control_obj);
+		break;
+	case V4L2_CID_STATELESS_AV1_FILM_GRAIN:
+		p->ptr = retrace_v4l2_ctrl_av1_film_grain_gen(v4l2_ext_control_obj);
+		break;
 	default:
 		line_info("\n\tWarning: cannot retrace control: %s",
 		          val2s(p->id, control_val_def).c_str());
diff --git a/utils/v4l2-tracer/trace.cpp b/utils/v4l2-tracer/trace.cpp
index c4fc1584..996fb043 100644
--- a/utils/v4l2-tracer/trace.cpp
+++ b/utils/v4l2-tracer/trace.cpp
@@ -412,6 +412,18 @@  void trace_v4l2_ext_control(void *arg, json_object *parent_obj, std::string key_
 	case V4L2_CID_PIXEL_RATE:
 		json_object_object_add(v4l2_ext_control_obj, "value64", json_object_new_int64(p->value64));
 		break;
+	case V4L2_CID_STATELESS_AV1_SEQUENCE:
+		trace_v4l2_ctrl_av1_sequence_gen(p->p_av1_sequence, v4l2_ext_control_obj);
+		break;
+	case V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY:
+		trace_v4l2_ctrl_av1_tile_group_entry_gen(p->p_av1_tile_group_entry, v4l2_ext_control_obj);
+		break;
+	case V4L2_CID_STATELESS_AV1_FRAME:
+		trace_v4l2_ctrl_av1_frame_gen(p->p_av1_frame, v4l2_ext_control_obj);
+		break;
+	case V4L2_CID_STATELESS_AV1_FILM_GRAIN:
+		trace_v4l2_ctrl_av1_film_grain_gen(p->p_av1_film_grain, v4l2_ext_control_obj);
+		break;
 	default:
 		if (p->size)
 			line_info("\n\tWarning: cannot trace control: %s", val2s(p->id, control_val_def).c_str());