[PATCH v3 2/4] v4l2-tracer: add auto-generated files to git repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add previously untracked files that are generated by v4l2-tracer-gen.pl.
The version history makes it easy to spot errors that arise when the
repository is synced with the latest kernel headers.

Signed-off-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>
---
 utils/v4l2-tracer/retrace-gen.cpp        | 5664 ++++++++++++++++++++++
 utils/v4l2-tracer/retrace-gen.h          |  144 +
 utils/v4l2-tracer/trace-gen.cpp          | 3225 ++++++++++++
 utils/v4l2-tracer/trace-gen.h            |  144 +
 utils/v4l2-tracer/v4l2-tracer-info-gen.h | 2419 +++++++++
 5 files changed, 11596 insertions(+)
 create mode 100644 utils/v4l2-tracer/retrace-gen.cpp
 create mode 100644 utils/v4l2-tracer/retrace-gen.h
 create mode 100644 utils/v4l2-tracer/trace-gen.cpp
 create mode 100644 utils/v4l2-tracer/trace-gen.h
 create mode 100644 utils/v4l2-tracer/v4l2-tracer-info-gen.h

diff --git a/utils/v4l2-tracer/retrace-gen.cpp b/utils/v4l2-tracer/retrace-gen.cpp
new file mode 100644
index 00000000..593d180a
--- /dev/null
+++ b/utils/v4l2-tracer/retrace-gen.cpp
@@ -0,0 +1,5664 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright 2022 Collabora Ltd.
+ *
+ * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT
+ */
+
+#include "v4l2-tracer-common.h"
+
+struct v4l2_ctrl_h264_sps *retrace_v4l2_ctrl_h264_sps_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_h264_sps *p = (struct v4l2_ctrl_h264_sps *) calloc(1, sizeof(v4l2_ctrl_h264_sps));
+	json_object *v4l2_ctrl_h264_sps_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_h264_sps", &v4l2_ctrl_h264_sps_obj))
+		v4l2_ctrl_h264_sps_obj = ctrl_obj;
+
+	json_object *profile_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "profile_idc", &profile_idc_obj))
+		p->profile_idc = (__u8) json_object_get_int(profile_idc_obj);
+
+	json_object *constraint_set_flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "constraint_set_flags", &constraint_set_flags_obj))
+		p->constraint_set_flags = (__u8) s2flags(json_object_get_string(constraint_set_flags_obj), v4l2_h264_sps_flag_def);
+
+	json_object *level_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "level_idc", &level_idc_obj))
+		p->level_idc = (__u8) json_object_get_int(level_idc_obj);
+
+	json_object *seq_parameter_set_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "seq_parameter_set_id", &seq_parameter_set_id_obj))
+		p->seq_parameter_set_id = (__u8) json_object_get_int(seq_parameter_set_id_obj);
+
+	json_object *chroma_format_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "chroma_format_idc", &chroma_format_idc_obj))
+		p->chroma_format_idc = (__u8) json_object_get_int(chroma_format_idc_obj);
+
+	json_object *bit_depth_luma_minus8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "bit_depth_luma_minus8", &bit_depth_luma_minus8_obj))
+		p->bit_depth_luma_minus8 = (__u8) json_object_get_int(bit_depth_luma_minus8_obj);
+
+	json_object *bit_depth_chroma_minus8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "bit_depth_chroma_minus8", &bit_depth_chroma_minus8_obj))
+		p->bit_depth_chroma_minus8 = (__u8) json_object_get_int(bit_depth_chroma_minus8_obj);
+
+	json_object *log2_max_frame_num_minus4_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "log2_max_frame_num_minus4", &log2_max_frame_num_minus4_obj))
+		p->log2_max_frame_num_minus4 = (__u8) json_object_get_int(log2_max_frame_num_minus4_obj);
+
+	json_object *pic_order_cnt_type_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "pic_order_cnt_type", &pic_order_cnt_type_obj))
+		p->pic_order_cnt_type = (__u8) json_object_get_int(pic_order_cnt_type_obj);
+
+	json_object *log2_max_pic_order_cnt_lsb_minus4_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "log2_max_pic_order_cnt_lsb_minus4", &log2_max_pic_order_cnt_lsb_minus4_obj))
+		p->log2_max_pic_order_cnt_lsb_minus4 = (__u8) json_object_get_int(log2_max_pic_order_cnt_lsb_minus4_obj);
+
+	json_object *max_num_ref_frames_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "max_num_ref_frames", &max_num_ref_frames_obj))
+		p->max_num_ref_frames = (__u8) json_object_get_int(max_num_ref_frames_obj);
+
+	json_object *num_ref_frames_in_pic_order_cnt_cycle_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "num_ref_frames_in_pic_order_cnt_cycle", &num_ref_frames_in_pic_order_cnt_cycle_obj))
+		p->num_ref_frames_in_pic_order_cnt_cycle = (__u8) json_object_get_int(num_ref_frames_in_pic_order_cnt_cycle_obj);
+
+	/* __s32 offset_for_ref_frame[255] */
+	json_object *offset_for_ref_frame_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "offset_for_ref_frame", &offset_for_ref_frame_obj)) {
+		for (size_t i = 0; i < 255; i++) {
+			if (json_object_array_get_idx(offset_for_ref_frame_obj, i))
+				p->offset_for_ref_frame[i] = (__s32) json_object_get_int(json_object_array_get_idx(offset_for_ref_frame_obj, i));
+		}
+	}
+
+	json_object *offset_for_non_ref_pic_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "offset_for_non_ref_pic", &offset_for_non_ref_pic_obj))
+		p->offset_for_non_ref_pic = (__s32) json_object_get_int(offset_for_non_ref_pic_obj);
+
+	json_object *offset_for_top_to_bottom_field_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "offset_for_top_to_bottom_field", &offset_for_top_to_bottom_field_obj))
+		p->offset_for_top_to_bottom_field = (__s32) json_object_get_int(offset_for_top_to_bottom_field_obj);
+
+	json_object *pic_width_in_mbs_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "pic_width_in_mbs_minus1", &pic_width_in_mbs_minus1_obj))
+		p->pic_width_in_mbs_minus1 = (__u16) json_object_get_int(pic_width_in_mbs_minus1_obj);
+
+	json_object *pic_height_in_map_units_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "pic_height_in_map_units_minus1", &pic_height_in_map_units_minus1_obj))
+		p->pic_height_in_map_units_minus1 = (__u16) json_object_get_int(pic_height_in_map_units_minus1_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_sps_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_h264_sps_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_h264_pps *retrace_v4l2_ctrl_h264_pps_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_h264_pps *p = (struct v4l2_ctrl_h264_pps *) calloc(1, sizeof(v4l2_ctrl_h264_pps));
+	json_object *v4l2_ctrl_h264_pps_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_h264_pps", &v4l2_ctrl_h264_pps_obj))
+		v4l2_ctrl_h264_pps_obj = ctrl_obj;
+
+	json_object *pic_parameter_set_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "pic_parameter_set_id", &pic_parameter_set_id_obj))
+		p->pic_parameter_set_id = (__u8) json_object_get_int(pic_parameter_set_id_obj);
+
+	json_object *seq_parameter_set_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "seq_parameter_set_id", &seq_parameter_set_id_obj))
+		p->seq_parameter_set_id = (__u8) json_object_get_int(seq_parameter_set_id_obj);
+
+	json_object *num_slice_groups_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "num_slice_groups_minus1", &num_slice_groups_minus1_obj))
+		p->num_slice_groups_minus1 = (__u8) json_object_get_int(num_slice_groups_minus1_obj);
+
+	json_object *num_ref_idx_l0_default_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "num_ref_idx_l0_default_active_minus1", &num_ref_idx_l0_default_active_minus1_obj))
+		p->num_ref_idx_l0_default_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l0_default_active_minus1_obj);
+
+	json_object *num_ref_idx_l1_default_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "num_ref_idx_l1_default_active_minus1", &num_ref_idx_l1_default_active_minus1_obj))
+		p->num_ref_idx_l1_default_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l1_default_active_minus1_obj);
+
+	json_object *weighted_bipred_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "weighted_bipred_idc", &weighted_bipred_idc_obj))
+		p->weighted_bipred_idc = (__u8) json_object_get_int(weighted_bipred_idc_obj);
+
+	json_object *pic_init_qp_minus26_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "pic_init_qp_minus26", &pic_init_qp_minus26_obj))
+		p->pic_init_qp_minus26 = (__s8) json_object_get_int(pic_init_qp_minus26_obj);
+
+	json_object *pic_init_qs_minus26_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "pic_init_qs_minus26", &pic_init_qs_minus26_obj))
+		p->pic_init_qs_minus26 = (__s8) json_object_get_int(pic_init_qs_minus26_obj);
+
+	json_object *chroma_qp_index_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "chroma_qp_index_offset", &chroma_qp_index_offset_obj))
+		p->chroma_qp_index_offset = (__s8) json_object_get_int(chroma_qp_index_offset_obj);
+
+	json_object *second_chroma_qp_index_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "second_chroma_qp_index_offset", &second_chroma_qp_index_offset_obj))
+		p->second_chroma_qp_index_offset = (__s8) json_object_get_int(second_chroma_qp_index_offset_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pps_obj, "flags", &flags_obj))
+		p->flags = (__u16) s2flags(json_object_get_string(flags_obj), v4l2_h264_pps_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_h264_scaling_matrix *retrace_v4l2_ctrl_h264_scaling_matrix_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_h264_scaling_matrix *p = (struct v4l2_ctrl_h264_scaling_matrix *) calloc(1, sizeof(v4l2_ctrl_h264_scaling_matrix));
+	json_object *v4l2_ctrl_h264_scaling_matrix_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_h264_scaling_matrix", &v4l2_ctrl_h264_scaling_matrix_obj))
+		v4l2_ctrl_h264_scaling_matrix_obj = ctrl_obj;
+
+	/* __u8 scaling_list_4x4[6][16] */
+	int count_scaling_list_4x4 = 0;
+	json_object *scaling_list_4x4_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_scaling_matrix_obj, "scaling_list_4x4", &scaling_list_4x4_obj)) {
+		for (size_t i = 0; i < 6; i++) {
+			for (size_t j = 0; j < 16; j++) {
+				if (json_object_array_get_idx(scaling_list_4x4_obj, count_scaling_list_4x4))
+					p->scaling_list_4x4[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_4x4_obj, count_scaling_list_4x4++));
+			}
+		}
+	}
+
+	/* __u8 scaling_list_8x8[6][64] */
+	int count_scaling_list_8x8 = 0;
+	json_object *scaling_list_8x8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_scaling_matrix_obj, "scaling_list_8x8", &scaling_list_8x8_obj)) {
+		for (size_t i = 0; i < 6; i++) {
+			for (size_t j = 0; j < 64; j++) {
+				if (json_object_array_get_idx(scaling_list_8x8_obj, count_scaling_list_8x8))
+					p->scaling_list_8x8[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_8x8_obj, count_scaling_list_8x8++));
+			}
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_h264_weight_factors *retrace_v4l2_h264_weight_factors_gen(json_object *ctrl_obj)
+{
+	struct v4l2_h264_weight_factors *p = (struct v4l2_h264_weight_factors *) calloc(1, sizeof(v4l2_h264_weight_factors));
+	json_object *v4l2_h264_weight_factors_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_h264_weight_factors", &v4l2_h264_weight_factors_obj))
+		v4l2_h264_weight_factors_obj = ctrl_obj;
+
+	/* __s16 luma_weight[32] */
+	json_object *luma_weight_obj;
+	if (json_object_object_get_ex(v4l2_h264_weight_factors_obj, "luma_weight", &luma_weight_obj)) {
+		for (size_t i = 0; i < 32; i++) {
+			if (json_object_array_get_idx(luma_weight_obj, i))
+				p->luma_weight[i] = (__s16) json_object_get_int(json_object_array_get_idx(luma_weight_obj, i));
+		}
+	}
+
+	/* __s16 luma_offset[32] */
+	json_object *luma_offset_obj;
+	if (json_object_object_get_ex(v4l2_h264_weight_factors_obj, "luma_offset", &luma_offset_obj)) {
+		for (size_t i = 0; i < 32; i++) {
+			if (json_object_array_get_idx(luma_offset_obj, i))
+				p->luma_offset[i] = (__s16) json_object_get_int(json_object_array_get_idx(luma_offset_obj, i));
+		}
+	}
+
+	/* __s16 chroma_weight[32][2] */
+	int count_chroma_weight = 0;
+	json_object *chroma_weight_obj;
+	if (json_object_object_get_ex(v4l2_h264_weight_factors_obj, "chroma_weight", &chroma_weight_obj)) {
+		for (size_t i = 0; i < 32; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(chroma_weight_obj, count_chroma_weight))
+					p->chroma_weight[i][j] = (__s16) json_object_get_int(json_object_array_get_idx(chroma_weight_obj, count_chroma_weight++));
+			}
+		}
+	}
+
+	/* __s16 chroma_offset[32][2] */
+	int count_chroma_offset = 0;
+	json_object *chroma_offset_obj;
+	if (json_object_object_get_ex(v4l2_h264_weight_factors_obj, "chroma_offset", &chroma_offset_obj)) {
+		for (size_t i = 0; i < 32; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(chroma_offset_obj, count_chroma_offset))
+					p->chroma_offset[i][j] = (__s16) json_object_get_int(json_object_array_get_idx(chroma_offset_obj, count_chroma_offset++));
+			}
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_ctrl_h264_pred_weights *retrace_v4l2_ctrl_h264_pred_weights_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_h264_pred_weights *p = (struct v4l2_ctrl_h264_pred_weights *) calloc(1, sizeof(v4l2_ctrl_h264_pred_weights));
+	json_object *v4l2_ctrl_h264_pred_weights_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_h264_pred_weights", &v4l2_ctrl_h264_pred_weights_obj))
+		v4l2_ctrl_h264_pred_weights_obj = ctrl_obj;
+
+	json_object *luma_log2_weight_denom_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pred_weights_obj, "luma_log2_weight_denom", &luma_log2_weight_denom_obj))
+		p->luma_log2_weight_denom = (__u16) json_object_get_int(luma_log2_weight_denom_obj);
+
+	json_object *chroma_log2_weight_denom_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pred_weights_obj, "chroma_log2_weight_denom", &chroma_log2_weight_denom_obj))
+		p->chroma_log2_weight_denom = (__u16) json_object_get_int(chroma_log2_weight_denom_obj);
+
+	/* struct v4l2_h264_weight_factors weight_factors[2] */
+	json_object *weight_factors_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_pred_weights_obj, "weight_factors", &weight_factors_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			void *weight_factors_ptr = (void *) retrace_v4l2_h264_weight_factors_gen(json_object_array_get_idx(weight_factors_obj, i));
+			p->weight_factors[i] = *static_cast<struct v4l2_h264_weight_factors*>(weight_factors_ptr);
+			free(weight_factors_ptr);
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_h264_reference *retrace_v4l2_h264_reference_gen(json_object *ctrl_obj)
+{
+	struct v4l2_h264_reference *p = (struct v4l2_h264_reference *) calloc(1, sizeof(v4l2_h264_reference));
+	json_object *v4l2_h264_reference_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_h264_reference", &v4l2_h264_reference_obj))
+		v4l2_h264_reference_obj = ctrl_obj;
+
+	json_object *fields_obj;
+	if (json_object_object_get_ex(v4l2_h264_reference_obj, "fields", &fields_obj))
+		p->fields = (__u8) json_object_get_int(fields_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_h264_reference_obj, "index", &index_obj))
+		p->index = (__u8) json_object_get_int(index_obj);
+
+	return p;
+}
+
+struct v4l2_ctrl_h264_slice_params *retrace_v4l2_ctrl_h264_slice_params_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_h264_slice_params *p = (struct v4l2_ctrl_h264_slice_params *) calloc(1, sizeof(v4l2_ctrl_h264_slice_params));
+	json_object *v4l2_ctrl_h264_slice_params_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_h264_slice_params", &v4l2_ctrl_h264_slice_params_obj))
+		v4l2_ctrl_h264_slice_params_obj = ctrl_obj;
+
+	json_object *header_bit_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "header_bit_size", &header_bit_size_obj))
+		p->header_bit_size = (__u32) json_object_get_int64(header_bit_size_obj);
+
+	json_object *first_mb_in_slice_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "first_mb_in_slice", &first_mb_in_slice_obj))
+		p->first_mb_in_slice = (__u32) json_object_get_int64(first_mb_in_slice_obj);
+
+	json_object *slice_type_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "slice_type", &slice_type_obj))
+		p->slice_type = (__u8) json_object_get_int(slice_type_obj);
+
+	json_object *colour_plane_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "colour_plane_id", &colour_plane_id_obj))
+		p->colour_plane_id = (__u8) json_object_get_int(colour_plane_id_obj);
+
+	json_object *redundant_pic_cnt_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "redundant_pic_cnt", &redundant_pic_cnt_obj))
+		p->redundant_pic_cnt = (__u8) json_object_get_int(redundant_pic_cnt_obj);
+
+	json_object *cabac_init_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "cabac_init_idc", &cabac_init_idc_obj))
+		p->cabac_init_idc = (__u8) json_object_get_int(cabac_init_idc_obj);
+
+	json_object *slice_qp_delta_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "slice_qp_delta", &slice_qp_delta_obj))
+		p->slice_qp_delta = (__s8) json_object_get_int(slice_qp_delta_obj);
+
+	json_object *slice_qs_delta_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "slice_qs_delta", &slice_qs_delta_obj))
+		p->slice_qs_delta = (__s8) json_object_get_int(slice_qs_delta_obj);
+
+	json_object *disable_deblocking_filter_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "disable_deblocking_filter_idc", &disable_deblocking_filter_idc_obj))
+		p->disable_deblocking_filter_idc = (__u8) json_object_get_int(disable_deblocking_filter_idc_obj);
+
+	json_object *slice_alpha_c0_offset_div2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "slice_alpha_c0_offset_div2", &slice_alpha_c0_offset_div2_obj))
+		p->slice_alpha_c0_offset_div2 = (__s8) json_object_get_int(slice_alpha_c0_offset_div2_obj);
+
+	json_object *slice_beta_offset_div2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "slice_beta_offset_div2", &slice_beta_offset_div2_obj))
+		p->slice_beta_offset_div2 = (__s8) json_object_get_int(slice_beta_offset_div2_obj);
+
+	json_object *num_ref_idx_l0_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "num_ref_idx_l0_active_minus1", &num_ref_idx_l0_active_minus1_obj))
+		p->num_ref_idx_l0_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l0_active_minus1_obj);
+
+	json_object *num_ref_idx_l1_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "num_ref_idx_l1_active_minus1", &num_ref_idx_l1_active_minus1_obj))
+		p->num_ref_idx_l1_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l1_active_minus1_obj);
+
+	/* struct v4l2_h264_reference ref_pic_list0[V4L2_H264_REF_LIST_LEN] */
+	json_object *ref_pic_list0_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "ref_pic_list0", &ref_pic_list0_obj)) {
+		for (size_t i = 0; i < V4L2_H264_REF_LIST_LEN; i++) {
+			void *ref_pic_list0_ptr = (void *) retrace_v4l2_h264_reference_gen(json_object_array_get_idx(ref_pic_list0_obj, i));
+			p->ref_pic_list0[i] = *static_cast<struct v4l2_h264_reference*>(ref_pic_list0_ptr);
+			free(ref_pic_list0_ptr);
+		}
+	}
+
+	/* struct v4l2_h264_reference ref_pic_list1[V4L2_H264_REF_LIST_LEN] */
+	json_object *ref_pic_list1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "ref_pic_list1", &ref_pic_list1_obj)) {
+		for (size_t i = 0; i < V4L2_H264_REF_LIST_LEN; i++) {
+			void *ref_pic_list1_ptr = (void *) retrace_v4l2_h264_reference_gen(json_object_array_get_idx(ref_pic_list1_obj, i));
+			p->ref_pic_list1[i] = *static_cast<struct v4l2_h264_reference*>(ref_pic_list1_ptr);
+			free(ref_pic_list1_ptr);
+		}
+	}
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_slice_params_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_h264_slice_flag_def);
+
+	return p;
+}
+
+struct v4l2_h264_dpb_entry *retrace_v4l2_h264_dpb_entry_gen(json_object *ctrl_obj)
+{
+	struct v4l2_h264_dpb_entry *p = (struct v4l2_h264_dpb_entry *) calloc(1, sizeof(v4l2_h264_dpb_entry));
+	json_object *v4l2_h264_dpb_entry_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_h264_dpb_entry", &v4l2_h264_dpb_entry_obj))
+		v4l2_h264_dpb_entry_obj = ctrl_obj;
+
+	json_object *reference_ts_obj;
+	if (json_object_object_get_ex(v4l2_h264_dpb_entry_obj, "reference_ts", &reference_ts_obj))
+		p->reference_ts = (__u64) json_object_get_uint64(reference_ts_obj);
+
+	json_object *pic_num_obj;
+	if (json_object_object_get_ex(v4l2_h264_dpb_entry_obj, "pic_num", &pic_num_obj))
+		p->pic_num = (__u32) json_object_get_int64(pic_num_obj);
+
+	json_object *frame_num_obj;
+	if (json_object_object_get_ex(v4l2_h264_dpb_entry_obj, "frame_num", &frame_num_obj))
+		p->frame_num = (__u16) json_object_get_int(frame_num_obj);
+
+	json_object *fields_obj;
+	if (json_object_object_get_ex(v4l2_h264_dpb_entry_obj, "fields", &fields_obj))
+		p->fields = (__u8) json_object_get_int(fields_obj);
+
+	json_object *top_field_order_cnt_obj;
+	if (json_object_object_get_ex(v4l2_h264_dpb_entry_obj, "top_field_order_cnt", &top_field_order_cnt_obj))
+		p->top_field_order_cnt = (__s32) json_object_get_int(top_field_order_cnt_obj);
+
+	json_object *bottom_field_order_cnt_obj;
+	if (json_object_object_get_ex(v4l2_h264_dpb_entry_obj, "bottom_field_order_cnt", &bottom_field_order_cnt_obj))
+		p->bottom_field_order_cnt = (__s32) json_object_get_int(bottom_field_order_cnt_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_h264_dpb_entry_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_h264_dpb_entry_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_h264_decode_params *retrace_v4l2_ctrl_h264_decode_params_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_h264_decode_params *p = (struct v4l2_ctrl_h264_decode_params *) calloc(1, sizeof(v4l2_ctrl_h264_decode_params));
+	json_object *v4l2_ctrl_h264_decode_params_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_h264_decode_params", &v4l2_ctrl_h264_decode_params_obj))
+		v4l2_ctrl_h264_decode_params_obj = ctrl_obj;
+
+	/* struct v4l2_h264_dpb_entry dpb[V4L2_H264_NUM_DPB_ENTRIES] */
+	json_object *dpb_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "dpb", &dpb_obj)) {
+		for (size_t i = 0; i < V4L2_H264_NUM_DPB_ENTRIES; i++) {
+			void *dpb_ptr = (void *) retrace_v4l2_h264_dpb_entry_gen(json_object_array_get_idx(dpb_obj, i));
+			p->dpb[i] = *static_cast<struct v4l2_h264_dpb_entry*>(dpb_ptr);
+			free(dpb_ptr);
+		}
+	}
+
+	json_object *nal_ref_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "nal_ref_idc", &nal_ref_idc_obj))
+		p->nal_ref_idc = (__u16) json_object_get_int(nal_ref_idc_obj);
+
+	json_object *frame_num_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "frame_num", &frame_num_obj))
+		p->frame_num = (__u16) json_object_get_int(frame_num_obj);
+
+	json_object *top_field_order_cnt_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "top_field_order_cnt", &top_field_order_cnt_obj))
+		p->top_field_order_cnt = (__s32) json_object_get_int(top_field_order_cnt_obj);
+
+	json_object *bottom_field_order_cnt_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "bottom_field_order_cnt", &bottom_field_order_cnt_obj))
+		p->bottom_field_order_cnt = (__s32) json_object_get_int(bottom_field_order_cnt_obj);
+
+	json_object *idr_pic_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "idr_pic_id", &idr_pic_id_obj))
+		p->idr_pic_id = (__u16) json_object_get_int(idr_pic_id_obj);
+
+	json_object *pic_order_cnt_lsb_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "pic_order_cnt_lsb", &pic_order_cnt_lsb_obj))
+		p->pic_order_cnt_lsb = (__u16) json_object_get_int(pic_order_cnt_lsb_obj);
+
+	json_object *delta_pic_order_cnt_bottom_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "delta_pic_order_cnt_bottom", &delta_pic_order_cnt_bottom_obj))
+		p->delta_pic_order_cnt_bottom = (__s32) json_object_get_int(delta_pic_order_cnt_bottom_obj);
+
+	json_object *delta_pic_order_cnt0_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "delta_pic_order_cnt0", &delta_pic_order_cnt0_obj))
+		p->delta_pic_order_cnt0 = (__s32) json_object_get_int(delta_pic_order_cnt0_obj);
+
+	json_object *delta_pic_order_cnt1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "delta_pic_order_cnt1", &delta_pic_order_cnt1_obj))
+		p->delta_pic_order_cnt1 = (__s32) json_object_get_int(delta_pic_order_cnt1_obj);
+
+	json_object *dec_ref_pic_marking_bit_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "dec_ref_pic_marking_bit_size", &dec_ref_pic_marking_bit_size_obj))
+		p->dec_ref_pic_marking_bit_size = (__u32) json_object_get_int64(dec_ref_pic_marking_bit_size_obj);
+
+	json_object *pic_order_cnt_bit_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "pic_order_cnt_bit_size", &pic_order_cnt_bit_size_obj))
+		p->pic_order_cnt_bit_size = (__u32) json_object_get_int64(pic_order_cnt_bit_size_obj);
+
+	json_object *slice_group_change_cycle_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "slice_group_change_cycle", &slice_group_change_cycle_obj))
+		p->slice_group_change_cycle = (__u32) json_object_get_int64(slice_group_change_cycle_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_h264_decode_params_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_h264_decode_param_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_fwht_params *retrace_v4l2_ctrl_fwht_params_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_fwht_params *p = (struct v4l2_ctrl_fwht_params *) calloc(1, sizeof(v4l2_ctrl_fwht_params));
+	json_object *v4l2_ctrl_fwht_params_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_fwht_params", &v4l2_ctrl_fwht_params_obj))
+		v4l2_ctrl_fwht_params_obj = ctrl_obj;
+
+	json_object *backward_ref_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "backward_ref_ts", &backward_ref_ts_obj))
+		p->backward_ref_ts = (__u64) json_object_get_uint64(backward_ref_ts_obj);
+
+	json_object *version_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "version", &version_obj))
+		p->version = (__u32) json_object_get_int64(version_obj);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags_fwht(json_object_get_string(flags_obj));
+
+	json_object *colorspace_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "colorspace", &colorspace_obj))
+		p->colorspace = (__u32) s2val(json_object_get_string(colorspace_obj), v4l2_colorspace_val_def);
+
+	json_object *xfer_func_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "xfer_func", &xfer_func_obj))
+		p->xfer_func = (__u32) s2val(json_object_get_string(xfer_func_obj), v4l2_xfer_func_val_def);
+
+	json_object *ycbcr_enc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "ycbcr_enc", &ycbcr_enc_obj))
+		p->ycbcr_enc = (__u32) s2val(json_object_get_string(ycbcr_enc_obj), v4l2_ycbcr_encoding_val_def);
+
+	json_object *quantization_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_fwht_params_obj, "quantization", &quantization_obj))
+		p->quantization = (__u32) s2val(json_object_get_string(quantization_obj), v4l2_quantization_val_def);
+
+	return p;
+}
+
+struct v4l2_vp8_segment *retrace_v4l2_vp8_segment_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp8_segment *p = (struct v4l2_vp8_segment *) calloc(1, sizeof(v4l2_vp8_segment));
+	json_object *v4l2_vp8_segment_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp8_segment", &v4l2_vp8_segment_obj))
+		v4l2_vp8_segment_obj = ctrl_obj;
+
+	/* __s8 quant_update[4] */
+	json_object *quant_update_obj;
+	if (json_object_object_get_ex(v4l2_vp8_segment_obj, "quant_update", &quant_update_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(quant_update_obj, i))
+				p->quant_update[i] = (__s8) json_object_get_int(json_object_array_get_idx(quant_update_obj, i));
+		}
+	}
+
+	/* __s8 lf_update[4] */
+	json_object *lf_update_obj;
+	if (json_object_object_get_ex(v4l2_vp8_segment_obj, "lf_update", &lf_update_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(lf_update_obj, i))
+				p->lf_update[i] = (__s8) json_object_get_int(json_object_array_get_idx(lf_update_obj, i));
+		}
+	}
+
+	/* __u8 segment_probs[3] */
+	json_object *segment_probs_obj;
+	if (json_object_object_get_ex(v4l2_vp8_segment_obj, "segment_probs", &segment_probs_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(segment_probs_obj, i))
+				p->segment_probs[i] = (__u8) json_object_get_int(json_object_array_get_idx(segment_probs_obj, i));
+		}
+	}
+
+	json_object *padding_obj;
+	if (json_object_object_get_ex(v4l2_vp8_segment_obj, "padding", &padding_obj))
+		p->padding = (__u8) json_object_get_int(padding_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_vp8_segment_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_vp8_segment_flag_def);
+
+	return p;
+}
+
+struct v4l2_vp8_loop_filter *retrace_v4l2_vp8_loop_filter_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp8_loop_filter *p = (struct v4l2_vp8_loop_filter *) calloc(1, sizeof(v4l2_vp8_loop_filter));
+	json_object *v4l2_vp8_loop_filter_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp8_loop_filter", &v4l2_vp8_loop_filter_obj))
+		v4l2_vp8_loop_filter_obj = ctrl_obj;
+
+	/* __s8 ref_frm_delta[4] */
+	json_object *ref_frm_delta_obj;
+	if (json_object_object_get_ex(v4l2_vp8_loop_filter_obj, "ref_frm_delta", &ref_frm_delta_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(ref_frm_delta_obj, i))
+				p->ref_frm_delta[i] = (__s8) json_object_get_int(json_object_array_get_idx(ref_frm_delta_obj, i));
+		}
+	}
+
+	/* __s8 mb_mode_delta[4] */
+	json_object *mb_mode_delta_obj;
+	if (json_object_object_get_ex(v4l2_vp8_loop_filter_obj, "mb_mode_delta", &mb_mode_delta_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(mb_mode_delta_obj, i))
+				p->mb_mode_delta[i] = (__s8) json_object_get_int(json_object_array_get_idx(mb_mode_delta_obj, i));
+		}
+	}
+
+	json_object *sharpness_level_obj;
+	if (json_object_object_get_ex(v4l2_vp8_loop_filter_obj, "sharpness_level", &sharpness_level_obj))
+		p->sharpness_level = (__u8) json_object_get_int(sharpness_level_obj);
+
+	json_object *level_obj;
+	if (json_object_object_get_ex(v4l2_vp8_loop_filter_obj, "level", &level_obj))
+		p->level = (__u8) json_object_get_int(level_obj);
+
+	json_object *padding_obj;
+	if (json_object_object_get_ex(v4l2_vp8_loop_filter_obj, "padding", &padding_obj))
+		p->padding = (__u16) json_object_get_int(padding_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_vp8_loop_filter_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_vp8_loop_filter_flag_def);
+
+	return p;
+}
+
+struct v4l2_vp8_quantization *retrace_v4l2_vp8_quantization_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp8_quantization *p = (struct v4l2_vp8_quantization *) calloc(1, sizeof(v4l2_vp8_quantization));
+	json_object *v4l2_vp8_quantization_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp8_quantization", &v4l2_vp8_quantization_obj))
+		v4l2_vp8_quantization_obj = ctrl_obj;
+
+	json_object *y_ac_qi_obj;
+	if (json_object_object_get_ex(v4l2_vp8_quantization_obj, "y_ac_qi", &y_ac_qi_obj))
+		p->y_ac_qi = (__u8) json_object_get_int(y_ac_qi_obj);
+
+	json_object *y_dc_delta_obj;
+	if (json_object_object_get_ex(v4l2_vp8_quantization_obj, "y_dc_delta", &y_dc_delta_obj))
+		p->y_dc_delta = (__s8) json_object_get_int(y_dc_delta_obj);
+
+	json_object *y2_dc_delta_obj;
+	if (json_object_object_get_ex(v4l2_vp8_quantization_obj, "y2_dc_delta", &y2_dc_delta_obj))
+		p->y2_dc_delta = (__s8) json_object_get_int(y2_dc_delta_obj);
+
+	json_object *y2_ac_delta_obj;
+	if (json_object_object_get_ex(v4l2_vp8_quantization_obj, "y2_ac_delta", &y2_ac_delta_obj))
+		p->y2_ac_delta = (__s8) json_object_get_int(y2_ac_delta_obj);
+
+	json_object *uv_dc_delta_obj;
+	if (json_object_object_get_ex(v4l2_vp8_quantization_obj, "uv_dc_delta", &uv_dc_delta_obj))
+		p->uv_dc_delta = (__s8) json_object_get_int(uv_dc_delta_obj);
+
+	json_object *uv_ac_delta_obj;
+	if (json_object_object_get_ex(v4l2_vp8_quantization_obj, "uv_ac_delta", &uv_ac_delta_obj))
+		p->uv_ac_delta = (__s8) json_object_get_int(uv_ac_delta_obj);
+
+	json_object *padding_obj;
+	if (json_object_object_get_ex(v4l2_vp8_quantization_obj, "padding", &padding_obj))
+		p->padding = (__u16) json_object_get_int(padding_obj);
+
+	return p;
+}
+
+struct v4l2_vp8_entropy *retrace_v4l2_vp8_entropy_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp8_entropy *p = (struct v4l2_vp8_entropy *) calloc(1, sizeof(v4l2_vp8_entropy));
+	json_object *v4l2_vp8_entropy_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp8_entropy", &v4l2_vp8_entropy_obj))
+		v4l2_vp8_entropy_obj = ctrl_obj;
+
+	/* __u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT] */
+	int count_coeff_probs = 0;
+	json_object *coeff_probs_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_obj, "coeff_probs", &coeff_probs_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			for (size_t j = 0; j < 8; j++) {
+				for (size_t k = 0; k < 3; k++) {
+					for (size_t l = 0; l < V4L2_VP8_COEFF_PROB_CNT; l++) {
+						if (json_object_array_get_idx(coeff_probs_obj, count_coeff_probs))
+							p->coeff_probs[i][j][k][l] = (__u8) json_object_get_int(json_object_array_get_idx(coeff_probs_obj, count_coeff_probs++));
+					}
+				}
+			}
+		}
+	}
+
+	/* __u8 y_mode_probs[4] */
+	json_object *y_mode_probs_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_obj, "y_mode_probs", &y_mode_probs_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(y_mode_probs_obj, i))
+				p->y_mode_probs[i] = (__u8) json_object_get_int(json_object_array_get_idx(y_mode_probs_obj, i));
+		}
+	}
+
+	/* __u8 uv_mode_probs[3] */
+	json_object *uv_mode_probs_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_obj, "uv_mode_probs", &uv_mode_probs_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(uv_mode_probs_obj, i))
+				p->uv_mode_probs[i] = (__u8) json_object_get_int(json_object_array_get_idx(uv_mode_probs_obj, i));
+		}
+	}
+
+	/* __u8 mv_probs[2][V4L2_VP8_MV_PROB_CNT] */
+	int count_mv_probs = 0;
+	json_object *mv_probs_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_obj, "mv_probs", &mv_probs_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < V4L2_VP8_MV_PROB_CNT; j++) {
+				if (json_object_array_get_idx(mv_probs_obj, count_mv_probs))
+					p->mv_probs[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(mv_probs_obj, count_mv_probs++));
+			}
+		}
+	}
+
+	/* __u8 padding[3] */
+	json_object *padding_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_obj, "padding", &padding_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(padding_obj, i))
+				p->padding[i] = (__u8) json_object_get_int(json_object_array_get_idx(padding_obj, i));
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_vp8_entropy_coder_state *retrace_v4l2_vp8_entropy_coder_state_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp8_entropy_coder_state *p = (struct v4l2_vp8_entropy_coder_state *) calloc(1, sizeof(v4l2_vp8_entropy_coder_state));
+	json_object *v4l2_vp8_entropy_coder_state_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp8_entropy_coder_state", &v4l2_vp8_entropy_coder_state_obj))
+		v4l2_vp8_entropy_coder_state_obj = ctrl_obj;
+
+	json_object *range_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_coder_state_obj, "range", &range_obj))
+		p->range = (__u8) json_object_get_int(range_obj);
+
+	json_object *value_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_coder_state_obj, "value", &value_obj))
+		p->value = (__u8) json_object_get_int(value_obj);
+
+	json_object *bit_count_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_coder_state_obj, "bit_count", &bit_count_obj))
+		p->bit_count = (__u8) json_object_get_int(bit_count_obj);
+
+	json_object *padding_obj;
+	if (json_object_object_get_ex(v4l2_vp8_entropy_coder_state_obj, "padding", &padding_obj))
+		p->padding = (__u8) json_object_get_int(padding_obj);
+
+	return p;
+}
+
+struct v4l2_ctrl_vp8_frame *retrace_v4l2_ctrl_vp8_frame_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_vp8_frame *p = (struct v4l2_ctrl_vp8_frame *) calloc(1, sizeof(v4l2_ctrl_vp8_frame));
+	json_object *v4l2_ctrl_vp8_frame_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_vp8_frame", &v4l2_ctrl_vp8_frame_obj))
+		v4l2_ctrl_vp8_frame_obj = ctrl_obj;
+
+	/* struct v4l2_vp8_segment segment */
+	json_object *segment_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "v4l2_vp8_segment", &segment_obj))
+		return p;
+	void *segment_ptr = (void *) retrace_v4l2_vp8_segment_gen(segment_obj);
+	p->segment = *static_cast<struct v4l2_vp8_segment*>(segment_ptr);
+	free(segment_ptr);
+
+	/* struct v4l2_vp8_loop_filter lf */
+	json_object *lf_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "v4l2_vp8_loop_filter", &lf_obj))
+		return p;
+	void *lf_ptr = (void *) retrace_v4l2_vp8_loop_filter_gen(lf_obj);
+	p->lf = *static_cast<struct v4l2_vp8_loop_filter*>(lf_ptr);
+	free(lf_ptr);
+
+	/* struct v4l2_vp8_quantization quant */
+	json_object *quant_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "v4l2_vp8_quantization", &quant_obj))
+		return p;
+	void *quant_ptr = (void *) retrace_v4l2_vp8_quantization_gen(quant_obj);
+	p->quant = *static_cast<struct v4l2_vp8_quantization*>(quant_ptr);
+	free(quant_ptr);
+
+	/* struct v4l2_vp8_entropy entropy */
+	json_object *entropy_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "v4l2_vp8_entropy", &entropy_obj))
+		return p;
+	void *entropy_ptr = (void *) retrace_v4l2_vp8_entropy_gen(entropy_obj);
+	p->entropy = *static_cast<struct v4l2_vp8_entropy*>(entropy_ptr);
+	free(entropy_ptr);
+
+	/* struct v4l2_vp8_entropy_coder_state coder_state */
+	json_object *coder_state_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "v4l2_vp8_entropy_coder_state", &coder_state_obj))
+		return p;
+	void *coder_state_ptr = (void *) retrace_v4l2_vp8_entropy_coder_state_gen(coder_state_obj);
+	p->coder_state = *static_cast<struct v4l2_vp8_entropy_coder_state*>(coder_state_ptr);
+	free(coder_state_ptr);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "width", &width_obj))
+		p->width = (__u16) json_object_get_int(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "height", &height_obj))
+		p->height = (__u16) json_object_get_int(height_obj);
+
+	json_object *horizontal_scale_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "horizontal_scale", &horizontal_scale_obj))
+		p->horizontal_scale = (__u8) json_object_get_int(horizontal_scale_obj);
+
+	json_object *vertical_scale_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "vertical_scale", &vertical_scale_obj))
+		p->vertical_scale = (__u8) json_object_get_int(vertical_scale_obj);
+
+	json_object *version_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "version", &version_obj))
+		p->version = (__u8) json_object_get_int(version_obj);
+
+	json_object *prob_skip_false_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "prob_skip_false", &prob_skip_false_obj))
+		p->prob_skip_false = (__u8) json_object_get_int(prob_skip_false_obj);
+
+	json_object *prob_intra_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "prob_intra", &prob_intra_obj))
+		p->prob_intra = (__u8) json_object_get_int(prob_intra_obj);
+
+	json_object *prob_last_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "prob_last", &prob_last_obj))
+		p->prob_last = (__u8) json_object_get_int(prob_last_obj);
+
+	json_object *prob_gf_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "prob_gf", &prob_gf_obj))
+		p->prob_gf = (__u8) json_object_get_int(prob_gf_obj);
+
+	json_object *num_dct_parts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "num_dct_parts", &num_dct_parts_obj))
+		p->num_dct_parts = (__u8) json_object_get_int(num_dct_parts_obj);
+
+	json_object *first_part_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "first_part_size", &first_part_size_obj))
+		p->first_part_size = (__u32) json_object_get_int64(first_part_size_obj);
+
+	json_object *first_part_header_bits_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "first_part_header_bits", &first_part_header_bits_obj))
+		p->first_part_header_bits = (__u32) json_object_get_int64(first_part_header_bits_obj);
+
+	/* __u32 dct_part_sizes[8] */
+	json_object *dct_part_sizes_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "dct_part_sizes", &dct_part_sizes_obj)) {
+		for (size_t i = 0; i < 8; i++) {
+			if (json_object_array_get_idx(dct_part_sizes_obj, i))
+				p->dct_part_sizes[i] = (__u32) json_object_get_int64(json_object_array_get_idx(dct_part_sizes_obj, i));
+		}
+	}
+
+	json_object *last_frame_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "last_frame_ts", &last_frame_ts_obj))
+		p->last_frame_ts = (__u64) json_object_get_uint64(last_frame_ts_obj);
+
+	json_object *golden_frame_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "golden_frame_ts", &golden_frame_ts_obj))
+		p->golden_frame_ts = (__u64) json_object_get_uint64(golden_frame_ts_obj);
+
+	json_object *alt_frame_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "alt_frame_ts", &alt_frame_ts_obj))
+		p->alt_frame_ts = (__u64) json_object_get_uint64(alt_frame_ts_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp8_frame_obj, "flags", &flags_obj))
+		p->flags = (__u64) s2flags(json_object_get_string(flags_obj), v4l2_vp8_frame_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_mpeg2_sequence *retrace_v4l2_ctrl_mpeg2_sequence_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_mpeg2_sequence *p = (struct v4l2_ctrl_mpeg2_sequence *) calloc(1, sizeof(v4l2_ctrl_mpeg2_sequence));
+	json_object *v4l2_ctrl_mpeg2_sequence_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_mpeg2_sequence", &v4l2_ctrl_mpeg2_sequence_obj))
+		v4l2_ctrl_mpeg2_sequence_obj = ctrl_obj;
+
+	json_object *horizontal_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_sequence_obj, "horizontal_size", &horizontal_size_obj))
+		p->horizontal_size = (__u16) json_object_get_int(horizontal_size_obj);
+
+	json_object *vertical_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_sequence_obj, "vertical_size", &vertical_size_obj))
+		p->vertical_size = (__u16) json_object_get_int(vertical_size_obj);
+
+	json_object *vbv_buffer_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_sequence_obj, "vbv_buffer_size", &vbv_buffer_size_obj))
+		p->vbv_buffer_size = (__u32) json_object_get_int64(vbv_buffer_size_obj);
+
+	json_object *profile_and_level_indication_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_sequence_obj, "profile_and_level_indication", &profile_and_level_indication_obj))
+		p->profile_and_level_indication = (__u16) json_object_get_int(profile_and_level_indication_obj);
+
+	json_object *chroma_format_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_sequence_obj, "chroma_format", &chroma_format_obj))
+		p->chroma_format = (__u8) json_object_get_int(chroma_format_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_sequence_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_mpeg2_seq_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_mpeg2_picture *retrace_v4l2_ctrl_mpeg2_picture_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_mpeg2_picture *p = (struct v4l2_ctrl_mpeg2_picture *) calloc(1, sizeof(v4l2_ctrl_mpeg2_picture));
+	json_object *v4l2_ctrl_mpeg2_picture_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_mpeg2_picture", &v4l2_ctrl_mpeg2_picture_obj))
+		v4l2_ctrl_mpeg2_picture_obj = ctrl_obj;
+
+	json_object *backward_ref_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_picture_obj, "backward_ref_ts", &backward_ref_ts_obj))
+		p->backward_ref_ts = (__u64) json_object_get_uint64(backward_ref_ts_obj);
+
+	json_object *forward_ref_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_picture_obj, "forward_ref_ts", &forward_ref_ts_obj))
+		p->forward_ref_ts = (__u64) json_object_get_uint64(forward_ref_ts_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_picture_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_mpeg2_pic_flag_def);
+
+	/* __u8	f_code[2][2] */
+	int count_f_code = 0;
+	json_object *f_code_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_picture_obj, "f_code", &f_code_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(f_code_obj, count_f_code))
+					p->f_code[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(f_code_obj, count_f_code++));
+			}
+		}
+	}
+
+	json_object *picture_coding_type_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_picture_obj, "picture_coding_type", &picture_coding_type_obj))
+		p->picture_coding_type = (__u8) json_object_get_int(picture_coding_type_obj);
+
+	json_object *picture_structure_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_picture_obj, "picture_structure", &picture_structure_obj))
+		p->picture_structure = (__u8) json_object_get_int(picture_structure_obj);
+
+	json_object *intra_dc_precision_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_picture_obj, "intra_dc_precision", &intra_dc_precision_obj))
+		p->intra_dc_precision = (__u8) json_object_get_int(intra_dc_precision_obj);
+
+	return p;
+}
+
+struct v4l2_ctrl_mpeg2_quantisation *retrace_v4l2_ctrl_mpeg2_quantisation_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_mpeg2_quantisation *p = (struct v4l2_ctrl_mpeg2_quantisation *) calloc(1, sizeof(v4l2_ctrl_mpeg2_quantisation));
+	json_object *v4l2_ctrl_mpeg2_quantisation_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_mpeg2_quantisation", &v4l2_ctrl_mpeg2_quantisation_obj))
+		v4l2_ctrl_mpeg2_quantisation_obj = ctrl_obj;
+
+	/* __u8	intra_quantiser_matrix[64] */
+	json_object *intra_quantiser_matrix_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_quantisation_obj, "intra_quantiser_matrix", &intra_quantiser_matrix_obj)) {
+		for (size_t i = 0; i < 64; i++) {
+			if (json_object_array_get_idx(intra_quantiser_matrix_obj, i))
+				p->intra_quantiser_matrix[i] = (__u8) json_object_get_int(json_object_array_get_idx(intra_quantiser_matrix_obj, i));
+		}
+	}
+
+	/* __u8	non_intra_quantiser_matrix[64] */
+	json_object *non_intra_quantiser_matrix_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_quantisation_obj, "non_intra_quantiser_matrix", &non_intra_quantiser_matrix_obj)) {
+		for (size_t i = 0; i < 64; i++) {
+			if (json_object_array_get_idx(non_intra_quantiser_matrix_obj, i))
+				p->non_intra_quantiser_matrix[i] = (__u8) json_object_get_int(json_object_array_get_idx(non_intra_quantiser_matrix_obj, i));
+		}
+	}
+
+	/* __u8	chroma_intra_quantiser_matrix[64] */
+	json_object *chroma_intra_quantiser_matrix_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_quantisation_obj, "chroma_intra_quantiser_matrix", &chroma_intra_quantiser_matrix_obj)) {
+		for (size_t i = 0; i < 64; i++) {
+			if (json_object_array_get_idx(chroma_intra_quantiser_matrix_obj, i))
+				p->chroma_intra_quantiser_matrix[i] = (__u8) json_object_get_int(json_object_array_get_idx(chroma_intra_quantiser_matrix_obj, i));
+		}
+	}
+
+	/* __u8	chroma_non_intra_quantiser_matrix[64] */
+	json_object *chroma_non_intra_quantiser_matrix_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_mpeg2_quantisation_obj, "chroma_non_intra_quantiser_matrix", &chroma_non_intra_quantiser_matrix_obj)) {
+		for (size_t i = 0; i < 64; i++) {
+			if (json_object_array_get_idx(chroma_non_intra_quantiser_matrix_obj, i))
+				p->chroma_non_intra_quantiser_matrix[i] = (__u8) json_object_get_int(json_object_array_get_idx(chroma_non_intra_quantiser_matrix_obj, i));
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_ctrl_hevc_sps *retrace_v4l2_ctrl_hevc_sps_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_hevc_sps *p = (struct v4l2_ctrl_hevc_sps *) calloc(1, sizeof(v4l2_ctrl_hevc_sps));
+	json_object *v4l2_ctrl_hevc_sps_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hevc_sps", &v4l2_ctrl_hevc_sps_obj))
+		v4l2_ctrl_hevc_sps_obj = ctrl_obj;
+
+	json_object *video_parameter_set_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "video_parameter_set_id", &video_parameter_set_id_obj))
+		p->video_parameter_set_id = (__u8) json_object_get_int(video_parameter_set_id_obj);
+
+	json_object *seq_parameter_set_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "seq_parameter_set_id", &seq_parameter_set_id_obj))
+		p->seq_parameter_set_id = (__u8) json_object_get_int(seq_parameter_set_id_obj);
+
+	json_object *pic_width_in_luma_samples_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "pic_width_in_luma_samples", &pic_width_in_luma_samples_obj))
+		p->pic_width_in_luma_samples = (__u16) json_object_get_int(pic_width_in_luma_samples_obj);
+
+	json_object *pic_height_in_luma_samples_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "pic_height_in_luma_samples", &pic_height_in_luma_samples_obj))
+		p->pic_height_in_luma_samples = (__u16) json_object_get_int(pic_height_in_luma_samples_obj);
+
+	json_object *bit_depth_luma_minus8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "bit_depth_luma_minus8", &bit_depth_luma_minus8_obj))
+		p->bit_depth_luma_minus8 = (__u8) json_object_get_int(bit_depth_luma_minus8_obj);
+
+	json_object *bit_depth_chroma_minus8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "bit_depth_chroma_minus8", &bit_depth_chroma_minus8_obj))
+		p->bit_depth_chroma_minus8 = (__u8) json_object_get_int(bit_depth_chroma_minus8_obj);
+
+	json_object *log2_max_pic_order_cnt_lsb_minus4_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "log2_max_pic_order_cnt_lsb_minus4", &log2_max_pic_order_cnt_lsb_minus4_obj))
+		p->log2_max_pic_order_cnt_lsb_minus4 = (__u8) json_object_get_int(log2_max_pic_order_cnt_lsb_minus4_obj);
+
+	json_object *sps_max_dec_pic_buffering_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "sps_max_dec_pic_buffering_minus1", &sps_max_dec_pic_buffering_minus1_obj))
+		p->sps_max_dec_pic_buffering_minus1 = (__u8) json_object_get_int(sps_max_dec_pic_buffering_minus1_obj);
+
+	json_object *sps_max_num_reorder_pics_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "sps_max_num_reorder_pics", &sps_max_num_reorder_pics_obj))
+		p->sps_max_num_reorder_pics = (__u8) json_object_get_int(sps_max_num_reorder_pics_obj);
+
+	json_object *sps_max_latency_increase_plus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "sps_max_latency_increase_plus1", &sps_max_latency_increase_plus1_obj))
+		p->sps_max_latency_increase_plus1 = (__u8) json_object_get_int(sps_max_latency_increase_plus1_obj);
+
+	json_object *log2_min_luma_coding_block_size_minus3_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "log2_min_luma_coding_block_size_minus3", &log2_min_luma_coding_block_size_minus3_obj))
+		p->log2_min_luma_coding_block_size_minus3 = (__u8) json_object_get_int(log2_min_luma_coding_block_size_minus3_obj);
+
+	json_object *log2_diff_max_min_luma_coding_block_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "log2_diff_max_min_luma_coding_block_size", &log2_diff_max_min_luma_coding_block_size_obj))
+		p->log2_diff_max_min_luma_coding_block_size = (__u8) json_object_get_int(log2_diff_max_min_luma_coding_block_size_obj);
+
+	json_object *log2_min_luma_transform_block_size_minus2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "log2_min_luma_transform_block_size_minus2", &log2_min_luma_transform_block_size_minus2_obj))
+		p->log2_min_luma_transform_block_size_minus2 = (__u8) json_object_get_int(log2_min_luma_transform_block_size_minus2_obj);
+
+	json_object *log2_diff_max_min_luma_transform_block_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "log2_diff_max_min_luma_transform_block_size", &log2_diff_max_min_luma_transform_block_size_obj))
+		p->log2_diff_max_min_luma_transform_block_size = (__u8) json_object_get_int(log2_diff_max_min_luma_transform_block_size_obj);
+
+	json_object *max_transform_hierarchy_depth_inter_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "max_transform_hierarchy_depth_inter", &max_transform_hierarchy_depth_inter_obj))
+		p->max_transform_hierarchy_depth_inter = (__u8) json_object_get_int(max_transform_hierarchy_depth_inter_obj);
+
+	json_object *max_transform_hierarchy_depth_intra_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "max_transform_hierarchy_depth_intra", &max_transform_hierarchy_depth_intra_obj))
+		p->max_transform_hierarchy_depth_intra = (__u8) json_object_get_int(max_transform_hierarchy_depth_intra_obj);
+
+	json_object *pcm_sample_bit_depth_luma_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "pcm_sample_bit_depth_luma_minus1", &pcm_sample_bit_depth_luma_minus1_obj))
+		p->pcm_sample_bit_depth_luma_minus1 = (__u8) json_object_get_int(pcm_sample_bit_depth_luma_minus1_obj);
+
+	json_object *pcm_sample_bit_depth_chroma_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "pcm_sample_bit_depth_chroma_minus1", &pcm_sample_bit_depth_chroma_minus1_obj))
+		p->pcm_sample_bit_depth_chroma_minus1 = (__u8) json_object_get_int(pcm_sample_bit_depth_chroma_minus1_obj);
+
+	json_object *log2_min_pcm_luma_coding_block_size_minus3_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "log2_min_pcm_luma_coding_block_size_minus3", &log2_min_pcm_luma_coding_block_size_minus3_obj))
+		p->log2_min_pcm_luma_coding_block_size_minus3 = (__u8) json_object_get_int(log2_min_pcm_luma_coding_block_size_minus3_obj);
+
+	json_object *log2_diff_max_min_pcm_luma_coding_block_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "log2_diff_max_min_pcm_luma_coding_block_size", &log2_diff_max_min_pcm_luma_coding_block_size_obj))
+		p->log2_diff_max_min_pcm_luma_coding_block_size = (__u8) json_object_get_int(log2_diff_max_min_pcm_luma_coding_block_size_obj);
+
+	json_object *num_short_term_ref_pic_sets_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "num_short_term_ref_pic_sets", &num_short_term_ref_pic_sets_obj))
+		p->num_short_term_ref_pic_sets = (__u8) json_object_get_int(num_short_term_ref_pic_sets_obj);
+
+	json_object *num_long_term_ref_pics_sps_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "num_long_term_ref_pics_sps", &num_long_term_ref_pics_sps_obj))
+		p->num_long_term_ref_pics_sps = (__u8) json_object_get_int(num_long_term_ref_pics_sps_obj);
+
+	json_object *chroma_format_idc_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "chroma_format_idc", &chroma_format_idc_obj))
+		p->chroma_format_idc = (__u8) json_object_get_int(chroma_format_idc_obj);
+
+	json_object *sps_max_sub_layers_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "sps_max_sub_layers_minus1", &sps_max_sub_layers_minus1_obj))
+		p->sps_max_sub_layers_minus1 = (__u8) json_object_get_int(sps_max_sub_layers_minus1_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_sps_obj, "flags", &flags_obj))
+		p->flags = (__u64) s2flags(json_object_get_string(flags_obj), v4l2_hevc_sps_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_hevc_pps *retrace_v4l2_ctrl_hevc_pps_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_hevc_pps *p = (struct v4l2_ctrl_hevc_pps *) calloc(1, sizeof(v4l2_ctrl_hevc_pps));
+	json_object *v4l2_ctrl_hevc_pps_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hevc_pps", &v4l2_ctrl_hevc_pps_obj))
+		v4l2_ctrl_hevc_pps_obj = ctrl_obj;
+
+	json_object *pic_parameter_set_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "pic_parameter_set_id", &pic_parameter_set_id_obj))
+		p->pic_parameter_set_id = (__u8) json_object_get_int(pic_parameter_set_id_obj);
+
+	json_object *num_extra_slice_header_bits_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "num_extra_slice_header_bits", &num_extra_slice_header_bits_obj))
+		p->num_extra_slice_header_bits = (__u8) json_object_get_int(num_extra_slice_header_bits_obj);
+
+	json_object *num_ref_idx_l0_default_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "num_ref_idx_l0_default_active_minus1", &num_ref_idx_l0_default_active_minus1_obj))
+		p->num_ref_idx_l0_default_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l0_default_active_minus1_obj);
+
+	json_object *num_ref_idx_l1_default_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "num_ref_idx_l1_default_active_minus1", &num_ref_idx_l1_default_active_minus1_obj))
+		p->num_ref_idx_l1_default_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l1_default_active_minus1_obj);
+
+	json_object *init_qp_minus26_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "init_qp_minus26", &init_qp_minus26_obj))
+		p->init_qp_minus26 = (__s8) json_object_get_int(init_qp_minus26_obj);
+
+	json_object *diff_cu_qp_delta_depth_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "diff_cu_qp_delta_depth", &diff_cu_qp_delta_depth_obj))
+		p->diff_cu_qp_delta_depth = (__u8) json_object_get_int(diff_cu_qp_delta_depth_obj);
+
+	json_object *pps_cb_qp_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "pps_cb_qp_offset", &pps_cb_qp_offset_obj))
+		p->pps_cb_qp_offset = (__s8) json_object_get_int(pps_cb_qp_offset_obj);
+
+	json_object *pps_cr_qp_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "pps_cr_qp_offset", &pps_cr_qp_offset_obj))
+		p->pps_cr_qp_offset = (__s8) json_object_get_int(pps_cr_qp_offset_obj);
+
+	json_object *num_tile_columns_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "num_tile_columns_minus1", &num_tile_columns_minus1_obj))
+		p->num_tile_columns_minus1 = (__u8) json_object_get_int(num_tile_columns_minus1_obj);
+
+	json_object *num_tile_rows_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "num_tile_rows_minus1", &num_tile_rows_minus1_obj))
+		p->num_tile_rows_minus1 = (__u8) json_object_get_int(num_tile_rows_minus1_obj);
+
+	/* __u8	column_width_minus1[20] */
+	json_object *column_width_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "column_width_minus1", &column_width_minus1_obj)) {
+		for (size_t i = 0; i < 20; i++) {
+			if (json_object_array_get_idx(column_width_minus1_obj, i))
+				p->column_width_minus1[i] = (__u8) json_object_get_int(json_object_array_get_idx(column_width_minus1_obj, i));
+		}
+	}
+
+	/* __u8	row_height_minus1[22] */
+	json_object *row_height_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "row_height_minus1", &row_height_minus1_obj)) {
+		for (size_t i = 0; i < 22; i++) {
+			if (json_object_array_get_idx(row_height_minus1_obj, i))
+				p->row_height_minus1[i] = (__u8) json_object_get_int(json_object_array_get_idx(row_height_minus1_obj, i));
+		}
+	}
+
+	json_object *pps_beta_offset_div2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "pps_beta_offset_div2", &pps_beta_offset_div2_obj))
+		p->pps_beta_offset_div2 = (__s8) json_object_get_int(pps_beta_offset_div2_obj);
+
+	json_object *pps_tc_offset_div2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "pps_tc_offset_div2", &pps_tc_offset_div2_obj))
+		p->pps_tc_offset_div2 = (__s8) json_object_get_int(pps_tc_offset_div2_obj);
+
+	json_object *log2_parallel_merge_level_minus2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "log2_parallel_merge_level_minus2", &log2_parallel_merge_level_minus2_obj))
+		p->log2_parallel_merge_level_minus2 = (__u8) json_object_get_int(log2_parallel_merge_level_minus2_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_pps_obj, "flags", &flags_obj))
+		p->flags = (__u64) s2flags(json_object_get_string(flags_obj), v4l2_hevc_pps_flag_def);
+
+	return p;
+}
+
+struct v4l2_hevc_dpb_entry *retrace_v4l2_hevc_dpb_entry_gen(json_object *ctrl_obj)
+{
+	struct v4l2_hevc_dpb_entry *p = (struct v4l2_hevc_dpb_entry *) calloc(1, sizeof(v4l2_hevc_dpb_entry));
+	json_object *v4l2_hevc_dpb_entry_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_hevc_dpb_entry", &v4l2_hevc_dpb_entry_obj))
+		v4l2_hevc_dpb_entry_obj = ctrl_obj;
+
+	json_object *timestamp_obj;
+	if (json_object_object_get_ex(v4l2_hevc_dpb_entry_obj, "timestamp", &timestamp_obj))
+		p->timestamp = (__u64) json_object_get_uint64(timestamp_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_hevc_dpb_entry_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_hevc_pps_flag_def);
+
+	json_object *field_pic_obj;
+	if (json_object_object_get_ex(v4l2_hevc_dpb_entry_obj, "field_pic", &field_pic_obj))
+		p->field_pic = (__u8) json_object_get_int(field_pic_obj);
+
+	json_object *pic_order_cnt_val_obj;
+	if (json_object_object_get_ex(v4l2_hevc_dpb_entry_obj, "pic_order_cnt_val", &pic_order_cnt_val_obj))
+		p->pic_order_cnt_val = (__s32) json_object_get_int(pic_order_cnt_val_obj);
+
+	return p;
+}
+
+struct v4l2_hevc_pred_weight_table *retrace_v4l2_hevc_pred_weight_table_gen(json_object *ctrl_obj)
+{
+	struct v4l2_hevc_pred_weight_table *p = (struct v4l2_hevc_pred_weight_table *) calloc(1, sizeof(v4l2_hevc_pred_weight_table));
+	json_object *v4l2_hevc_pred_weight_table_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_hevc_pred_weight_table", &v4l2_hevc_pred_weight_table_obj))
+		v4l2_hevc_pred_weight_table_obj = ctrl_obj;
+
+	/* __s8	delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *delta_luma_weight_l0_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "delta_luma_weight_l0", &delta_luma_weight_l0_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(delta_luma_weight_l0_obj, i))
+				p->delta_luma_weight_l0[i] = (__s8) json_object_get_int(json_object_array_get_idx(delta_luma_weight_l0_obj, i));
+		}
+	}
+
+	/* __s8	luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *luma_offset_l0_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "luma_offset_l0", &luma_offset_l0_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(luma_offset_l0_obj, i))
+				p->luma_offset_l0[i] = (__s8) json_object_get_int(json_object_array_get_idx(luma_offset_l0_obj, i));
+		}
+	}
+
+	/* __s8	delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	int count_delta_chroma_weight_l0 = 0;
+	json_object *delta_chroma_weight_l0_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "delta_chroma_weight_l0", &delta_chroma_weight_l0_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(delta_chroma_weight_l0_obj, count_delta_chroma_weight_l0))
+					p->delta_chroma_weight_l0[i][j] = (__s8) json_object_get_int(json_object_array_get_idx(delta_chroma_weight_l0_obj, count_delta_chroma_weight_l0++));
+			}
+		}
+	}
+
+	/* __s8	chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	int count_chroma_offset_l0 = 0;
+	json_object *chroma_offset_l0_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "chroma_offset_l0", &chroma_offset_l0_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(chroma_offset_l0_obj, count_chroma_offset_l0))
+					p->chroma_offset_l0[i][j] = (__s8) json_object_get_int(json_object_array_get_idx(chroma_offset_l0_obj, count_chroma_offset_l0++));
+			}
+		}
+	}
+
+	/* __s8	delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *delta_luma_weight_l1_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "delta_luma_weight_l1", &delta_luma_weight_l1_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(delta_luma_weight_l1_obj, i))
+				p->delta_luma_weight_l1[i] = (__s8) json_object_get_int(json_object_array_get_idx(delta_luma_weight_l1_obj, i));
+		}
+	}
+
+	/* __s8	luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *luma_offset_l1_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "luma_offset_l1", &luma_offset_l1_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(luma_offset_l1_obj, i))
+				p->luma_offset_l1[i] = (__s8) json_object_get_int(json_object_array_get_idx(luma_offset_l1_obj, i));
+		}
+	}
+
+	/* __s8	delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	int count_delta_chroma_weight_l1 = 0;
+	json_object *delta_chroma_weight_l1_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "delta_chroma_weight_l1", &delta_chroma_weight_l1_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(delta_chroma_weight_l1_obj, count_delta_chroma_weight_l1))
+					p->delta_chroma_weight_l1[i][j] = (__s8) json_object_get_int(json_object_array_get_idx(delta_chroma_weight_l1_obj, count_delta_chroma_weight_l1++));
+			}
+		}
+	}
+
+	/* __s8	chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	int count_chroma_offset_l1 = 0;
+	json_object *chroma_offset_l1_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "chroma_offset_l1", &chroma_offset_l1_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(chroma_offset_l1_obj, count_chroma_offset_l1))
+					p->chroma_offset_l1[i][j] = (__s8) json_object_get_int(json_object_array_get_idx(chroma_offset_l1_obj, count_chroma_offset_l1++));
+			}
+		}
+	}
+
+	json_object *luma_log2_weight_denom_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "luma_log2_weight_denom", &luma_log2_weight_denom_obj))
+		p->luma_log2_weight_denom = (__u8) json_object_get_int(luma_log2_weight_denom_obj);
+
+	json_object *delta_chroma_log2_weight_denom_obj;
+	if (json_object_object_get_ex(v4l2_hevc_pred_weight_table_obj, "delta_chroma_log2_weight_denom", &delta_chroma_log2_weight_denom_obj))
+		p->delta_chroma_log2_weight_denom = (__s8) json_object_get_int(delta_chroma_log2_weight_denom_obj);
+
+	return p;
+}
+
+struct v4l2_ctrl_hevc_slice_params *retrace_v4l2_ctrl_hevc_slice_params_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_hevc_slice_params *p = (struct v4l2_ctrl_hevc_slice_params *) calloc(1, sizeof(v4l2_ctrl_hevc_slice_params));
+	json_object *v4l2_ctrl_hevc_slice_params_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hevc_slice_params", &v4l2_ctrl_hevc_slice_params_obj))
+		v4l2_ctrl_hevc_slice_params_obj = ctrl_obj;
+
+	json_object *bit_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "bit_size", &bit_size_obj))
+		p->bit_size = (__u32) json_object_get_int64(bit_size_obj);
+
+	json_object *data_byte_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "data_byte_offset", &data_byte_offset_obj))
+		p->data_byte_offset = (__u32) json_object_get_int64(data_byte_offset_obj);
+
+	json_object *num_entry_point_offsets_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "num_entry_point_offsets", &num_entry_point_offsets_obj))
+		p->num_entry_point_offsets = (__u32) json_object_get_int64(num_entry_point_offsets_obj);
+
+	json_object *nal_unit_type_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "nal_unit_type", &nal_unit_type_obj))
+		p->nal_unit_type = (__u8) json_object_get_int(nal_unit_type_obj);
+
+	json_object *nuh_temporal_id_plus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "nuh_temporal_id_plus1", &nuh_temporal_id_plus1_obj))
+		p->nuh_temporal_id_plus1 = (__u8) json_object_get_int(nuh_temporal_id_plus1_obj);
+
+	json_object *slice_type_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_type", &slice_type_obj))
+		p->slice_type = (__u8) json_object_get_int(slice_type_obj);
+
+	json_object *colour_plane_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "colour_plane_id", &colour_plane_id_obj))
+		p->colour_plane_id = (__u8) json_object_get_int(colour_plane_id_obj);
+
+	json_object *slice_pic_order_cnt_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_pic_order_cnt", &slice_pic_order_cnt_obj))
+		p->slice_pic_order_cnt = (__s32) json_object_get_int(slice_pic_order_cnt_obj);
+
+	json_object *num_ref_idx_l0_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "num_ref_idx_l0_active_minus1", &num_ref_idx_l0_active_minus1_obj))
+		p->num_ref_idx_l0_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l0_active_minus1_obj);
+
+	json_object *num_ref_idx_l1_active_minus1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "num_ref_idx_l1_active_minus1", &num_ref_idx_l1_active_minus1_obj))
+		p->num_ref_idx_l1_active_minus1 = (__u8) json_object_get_int(num_ref_idx_l1_active_minus1_obj);
+
+	json_object *collocated_ref_idx_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "collocated_ref_idx", &collocated_ref_idx_obj))
+		p->collocated_ref_idx = (__u8) json_object_get_int(collocated_ref_idx_obj);
+
+	json_object *five_minus_max_num_merge_cand_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "five_minus_max_num_merge_cand", &five_minus_max_num_merge_cand_obj))
+		p->five_minus_max_num_merge_cand = (__u8) json_object_get_int(five_minus_max_num_merge_cand_obj);
+
+	json_object *slice_qp_delta_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_qp_delta", &slice_qp_delta_obj))
+		p->slice_qp_delta = (__s8) json_object_get_int(slice_qp_delta_obj);
+
+	json_object *slice_cb_qp_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_cb_qp_offset", &slice_cb_qp_offset_obj))
+		p->slice_cb_qp_offset = (__s8) json_object_get_int(slice_cb_qp_offset_obj);
+
+	json_object *slice_cr_qp_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_cr_qp_offset", &slice_cr_qp_offset_obj))
+		p->slice_cr_qp_offset = (__s8) json_object_get_int(slice_cr_qp_offset_obj);
+
+	json_object *slice_act_y_qp_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_act_y_qp_offset", &slice_act_y_qp_offset_obj))
+		p->slice_act_y_qp_offset = (__s8) json_object_get_int(slice_act_y_qp_offset_obj);
+
+	json_object *slice_act_cb_qp_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_act_cb_qp_offset", &slice_act_cb_qp_offset_obj))
+		p->slice_act_cb_qp_offset = (__s8) json_object_get_int(slice_act_cb_qp_offset_obj);
+
+	json_object *slice_act_cr_qp_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_act_cr_qp_offset", &slice_act_cr_qp_offset_obj))
+		p->slice_act_cr_qp_offset = (__s8) json_object_get_int(slice_act_cr_qp_offset_obj);
+
+	json_object *slice_beta_offset_div2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_beta_offset_div2", &slice_beta_offset_div2_obj))
+		p->slice_beta_offset_div2 = (__s8) json_object_get_int(slice_beta_offset_div2_obj);
+
+	json_object *slice_tc_offset_div2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_tc_offset_div2", &slice_tc_offset_div2_obj))
+		p->slice_tc_offset_div2 = (__s8) json_object_get_int(slice_tc_offset_div2_obj);
+
+	json_object *pic_struct_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "pic_struct", &pic_struct_obj))
+		p->pic_struct = (__u8) json_object_get_int(pic_struct_obj);
+
+	json_object *slice_segment_addr_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "slice_segment_addr", &slice_segment_addr_obj))
+		p->slice_segment_addr = (__u32) json_object_get_int64(slice_segment_addr_obj);
+
+	/* __u8	ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *ref_idx_l0_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "ref_idx_l0", &ref_idx_l0_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(ref_idx_l0_obj, i))
+				p->ref_idx_l0[i] = (__u8) json_object_get_int(json_object_array_get_idx(ref_idx_l0_obj, i));
+		}
+	}
+
+	/* __u8	ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *ref_idx_l1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "ref_idx_l1", &ref_idx_l1_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(ref_idx_l1_obj, i))
+				p->ref_idx_l1[i] = (__u8) json_object_get_int(json_object_array_get_idx(ref_idx_l1_obj, i));
+		}
+	}
+
+	json_object *short_term_ref_pic_set_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "short_term_ref_pic_set_size", &short_term_ref_pic_set_size_obj))
+		p->short_term_ref_pic_set_size = (__u16) json_object_get_int(short_term_ref_pic_set_size_obj);
+
+	json_object *long_term_ref_pic_set_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "long_term_ref_pic_set_size", &long_term_ref_pic_set_size_obj))
+		p->long_term_ref_pic_set_size = (__u16) json_object_get_int(long_term_ref_pic_set_size_obj);
+
+	/* struct v4l2_hevc_pred_weight_table pred_weight_table */
+	json_object *pred_weight_table_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "v4l2_hevc_pred_weight_table", &pred_weight_table_obj))
+		return p;
+	void *pred_weight_table_ptr = (void *) retrace_v4l2_hevc_pred_weight_table_gen(pred_weight_table_obj);
+	p->pred_weight_table = *static_cast<struct v4l2_hevc_pred_weight_table*>(pred_weight_table_ptr);
+	free(pred_weight_table_ptr);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_slice_params_obj, "flags", &flags_obj))
+		p->flags = (__u64) s2flags(json_object_get_string(flags_obj), v4l2_hevc_slice_params_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_hevc_decode_params *retrace_v4l2_ctrl_hevc_decode_params_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_hevc_decode_params *p = (struct v4l2_ctrl_hevc_decode_params *) calloc(1, sizeof(v4l2_ctrl_hevc_decode_params));
+	json_object *v4l2_ctrl_hevc_decode_params_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hevc_decode_params", &v4l2_ctrl_hevc_decode_params_obj))
+		v4l2_ctrl_hevc_decode_params_obj = ctrl_obj;
+
+	json_object *pic_order_cnt_val_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "pic_order_cnt_val", &pic_order_cnt_val_obj))
+		p->pic_order_cnt_val = (__s32) json_object_get_int(pic_order_cnt_val_obj);
+
+	json_object *short_term_ref_pic_set_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "short_term_ref_pic_set_size", &short_term_ref_pic_set_size_obj))
+		p->short_term_ref_pic_set_size = (__u16) json_object_get_int(short_term_ref_pic_set_size_obj);
+
+	json_object *long_term_ref_pic_set_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "long_term_ref_pic_set_size", &long_term_ref_pic_set_size_obj))
+		p->long_term_ref_pic_set_size = (__u16) json_object_get_int(long_term_ref_pic_set_size_obj);
+
+	json_object *num_active_dpb_entries_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "num_active_dpb_entries", &num_active_dpb_entries_obj))
+		p->num_active_dpb_entries = (__u8) json_object_get_int(num_active_dpb_entries_obj);
+
+	json_object *num_poc_st_curr_before_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "num_poc_st_curr_before", &num_poc_st_curr_before_obj))
+		p->num_poc_st_curr_before = (__u8) json_object_get_int(num_poc_st_curr_before_obj);
+
+	json_object *num_poc_st_curr_after_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "num_poc_st_curr_after", &num_poc_st_curr_after_obj))
+		p->num_poc_st_curr_after = (__u8) json_object_get_int(num_poc_st_curr_after_obj);
+
+	json_object *num_poc_lt_curr_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "num_poc_lt_curr", &num_poc_lt_curr_obj))
+		p->num_poc_lt_curr = (__u8) json_object_get_int(num_poc_lt_curr_obj);
+
+	/* __u8	poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *poc_st_curr_before_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "poc_st_curr_before", &poc_st_curr_before_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(poc_st_curr_before_obj, i))
+				p->poc_st_curr_before[i] = (__u8) json_object_get_int(json_object_array_get_idx(poc_st_curr_before_obj, i));
+		}
+	}
+
+	/* __u8	poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *poc_st_curr_after_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "poc_st_curr_after", &poc_st_curr_after_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(poc_st_curr_after_obj, i))
+				p->poc_st_curr_after[i] = (__u8) json_object_get_int(json_object_array_get_idx(poc_st_curr_after_obj, i));
+		}
+	}
+
+	/* __u8	poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *poc_lt_curr_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "poc_lt_curr", &poc_lt_curr_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			if (json_object_array_get_idx(poc_lt_curr_obj, i))
+				p->poc_lt_curr[i] = (__u8) json_object_get_int(json_object_array_get_idx(poc_lt_curr_obj, i));
+		}
+	}
+
+	json_object *num_delta_pocs_of_ref_rps_idx_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "num_delta_pocs_of_ref_rps_idx", &num_delta_pocs_of_ref_rps_idx_obj))
+		p->num_delta_pocs_of_ref_rps_idx = (__u8) json_object_get_int(num_delta_pocs_of_ref_rps_idx_obj);
+
+	/* struct	v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *dpb_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "dpb", &dpb_obj)) {
+		for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+			void *dpb_ptr = (void *) retrace_v4l2_hevc_dpb_entry_gen(json_object_array_get_idx(dpb_obj, i));
+			p->dpb[i] = *static_cast<struct v4l2_hevc_dpb_entry*>(dpb_ptr);
+			free(dpb_ptr);
+		}
+	}
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_decode_params_obj, "flags", &flags_obj))
+		p->flags = (__u64) s2flags(json_object_get_string(flags_obj), v4l2_hevc_decode_param_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_hevc_scaling_matrix *retrace_v4l2_ctrl_hevc_scaling_matrix_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_hevc_scaling_matrix *p = (struct v4l2_ctrl_hevc_scaling_matrix *) calloc(1, sizeof(v4l2_ctrl_hevc_scaling_matrix));
+	json_object *v4l2_ctrl_hevc_scaling_matrix_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hevc_scaling_matrix", &v4l2_ctrl_hevc_scaling_matrix_obj))
+		v4l2_ctrl_hevc_scaling_matrix_obj = ctrl_obj;
+
+	/* __u8	scaling_list_4x4[6][16] */
+	int count_scaling_list_4x4 = 0;
+	json_object *scaling_list_4x4_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_4x4", &scaling_list_4x4_obj)) {
+		for (size_t i = 0; i < 6; i++) {
+			for (size_t j = 0; j < 16; j++) {
+				if (json_object_array_get_idx(scaling_list_4x4_obj, count_scaling_list_4x4))
+					p->scaling_list_4x4[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_4x4_obj, count_scaling_list_4x4++));
+			}
+		}
+	}
+
+	/* __u8	scaling_list_8x8[6][64] */
+	int count_scaling_list_8x8 = 0;
+	json_object *scaling_list_8x8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_8x8", &scaling_list_8x8_obj)) {
+		for (size_t i = 0; i < 6; i++) {
+			for (size_t j = 0; j < 64; j++) {
+				if (json_object_array_get_idx(scaling_list_8x8_obj, count_scaling_list_8x8))
+					p->scaling_list_8x8[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_8x8_obj, count_scaling_list_8x8++));
+			}
+		}
+	}
+
+	/* __u8	scaling_list_16x16[6][64] */
+	int count_scaling_list_16x16 = 0;
+	json_object *scaling_list_16x16_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_16x16", &scaling_list_16x16_obj)) {
+		for (size_t i = 0; i < 6; i++) {
+			for (size_t j = 0; j < 64; j++) {
+				if (json_object_array_get_idx(scaling_list_16x16_obj, count_scaling_list_16x16))
+					p->scaling_list_16x16[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_16x16_obj, count_scaling_list_16x16++));
+			}
+		}
+	}
+
+	/* __u8	scaling_list_32x32[2][64] */
+	int count_scaling_list_32x32 = 0;
+	json_object *scaling_list_32x32_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_32x32", &scaling_list_32x32_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 64; j++) {
+				if (json_object_array_get_idx(scaling_list_32x32_obj, count_scaling_list_32x32))
+					p->scaling_list_32x32[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_32x32_obj, count_scaling_list_32x32++));
+			}
+		}
+	}
+
+	/* __u8	scaling_list_dc_coef_16x16[6] */
+	json_object *scaling_list_dc_coef_16x16_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_dc_coef_16x16", &scaling_list_dc_coef_16x16_obj)) {
+		for (size_t i = 0; i < 6; i++) {
+			if (json_object_array_get_idx(scaling_list_dc_coef_16x16_obj, i))
+				p->scaling_list_dc_coef_16x16[i] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_dc_coef_16x16_obj, i));
+		}
+	}
+
+	/* __u8	scaling_list_dc_coef_32x32[2] */
+	json_object *scaling_list_dc_coef_32x32_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_dc_coef_32x32", &scaling_list_dc_coef_32x32_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(scaling_list_dc_coef_32x32_obj, i))
+				p->scaling_list_dc_coef_32x32[i] = (__u8) json_object_get_int(json_object_array_get_idx(scaling_list_dc_coef_32x32_obj, i));
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_ctrl_hdr10_cll_info *retrace_v4l2_ctrl_hdr10_cll_info_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_hdr10_cll_info *p = (struct v4l2_ctrl_hdr10_cll_info *) calloc(1, sizeof(v4l2_ctrl_hdr10_cll_info));
+	json_object *v4l2_ctrl_hdr10_cll_info_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hdr10_cll_info", &v4l2_ctrl_hdr10_cll_info_obj))
+		v4l2_ctrl_hdr10_cll_info_obj = ctrl_obj;
+
+	json_object *max_content_light_level_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_cll_info_obj, "max_content_light_level", &max_content_light_level_obj))
+		p->max_content_light_level = (__u16) json_object_get_int(max_content_light_level_obj);
+
+	json_object *max_pic_average_light_level_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_cll_info_obj, "max_pic_average_light_level", &max_pic_average_light_level_obj))
+		p->max_pic_average_light_level = (__u16) json_object_get_int(max_pic_average_light_level_obj);
+
+	return p;
+}
+
+struct v4l2_ctrl_hdr10_mastering_display *retrace_v4l2_ctrl_hdr10_mastering_display_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_hdr10_mastering_display *p = (struct v4l2_ctrl_hdr10_mastering_display *) calloc(1, sizeof(v4l2_ctrl_hdr10_mastering_display));
+	json_object *v4l2_ctrl_hdr10_mastering_display_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hdr10_mastering_display", &v4l2_ctrl_hdr10_mastering_display_obj))
+		v4l2_ctrl_hdr10_mastering_display_obj = ctrl_obj;
+
+	/* __u16 display_primaries_x[3] */
+	json_object *display_primaries_x_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, "display_primaries_x", &display_primaries_x_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(display_primaries_x_obj, i))
+				p->display_primaries_x[i] = (__u16) json_object_get_int(json_object_array_get_idx(display_primaries_x_obj, i));
+		}
+	}
+
+	/* __u16 display_primaries_y[3] */
+	json_object *display_primaries_y_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, "display_primaries_y", &display_primaries_y_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(display_primaries_y_obj, i))
+				p->display_primaries_y[i] = (__u16) json_object_get_int(json_object_array_get_idx(display_primaries_y_obj, i));
+		}
+	}
+
+	json_object *white_point_x_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, "white_point_x", &white_point_x_obj))
+		p->white_point_x = (__u16) json_object_get_int(white_point_x_obj);
+
+	json_object *white_point_y_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, "white_point_y", &white_point_y_obj))
+		p->white_point_y = (__u16) json_object_get_int(white_point_y_obj);
+
+	json_object *max_display_mastering_luminance_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, "max_display_mastering_luminance", &max_display_mastering_luminance_obj))
+		p->max_display_mastering_luminance = (__u32) json_object_get_int64(max_display_mastering_luminance_obj);
+
+	json_object *min_display_mastering_luminance_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, "min_display_mastering_luminance", &min_display_mastering_luminance_obj))
+		p->min_display_mastering_luminance = (__u32) json_object_get_int64(min_display_mastering_luminance_obj);
+
+	return p;
+}
+
+struct v4l2_vp9_loop_filter *retrace_v4l2_vp9_loop_filter_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp9_loop_filter *p = (struct v4l2_vp9_loop_filter *) calloc(1, sizeof(v4l2_vp9_loop_filter));
+	json_object *v4l2_vp9_loop_filter_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp9_loop_filter", &v4l2_vp9_loop_filter_obj))
+		v4l2_vp9_loop_filter_obj = ctrl_obj;
+
+	/* __s8 ref_deltas[4] */
+	json_object *ref_deltas_obj;
+	if (json_object_object_get_ex(v4l2_vp9_loop_filter_obj, "ref_deltas", &ref_deltas_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(ref_deltas_obj, i))
+				p->ref_deltas[i] = (__s8) json_object_get_int(json_object_array_get_idx(ref_deltas_obj, i));
+		}
+	}
+
+	/* __s8 mode_deltas[2] */
+	json_object *mode_deltas_obj;
+	if (json_object_object_get_ex(v4l2_vp9_loop_filter_obj, "mode_deltas", &mode_deltas_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(mode_deltas_obj, i))
+				p->mode_deltas[i] = (__s8) json_object_get_int(json_object_array_get_idx(mode_deltas_obj, i));
+		}
+	}
+
+	json_object *level_obj;
+	if (json_object_object_get_ex(v4l2_vp9_loop_filter_obj, "level", &level_obj))
+		p->level = (__u8) json_object_get_int(level_obj);
+
+	json_object *sharpness_obj;
+	if (json_object_object_get_ex(v4l2_vp9_loop_filter_obj, "sharpness", &sharpness_obj))
+		p->sharpness = (__u8) json_object_get_int(sharpness_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_vp9_loop_filter_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_vp9_loop_filter_flag_def);
+
+	return p;
+}
+
+struct v4l2_vp9_quantization *retrace_v4l2_vp9_quantization_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp9_quantization *p = (struct v4l2_vp9_quantization *) calloc(1, sizeof(v4l2_vp9_quantization));
+	json_object *v4l2_vp9_quantization_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp9_quantization", &v4l2_vp9_quantization_obj))
+		v4l2_vp9_quantization_obj = ctrl_obj;
+
+	json_object *base_q_idx_obj;
+	if (json_object_object_get_ex(v4l2_vp9_quantization_obj, "base_q_idx", &base_q_idx_obj))
+		p->base_q_idx = (__u8) json_object_get_int(base_q_idx_obj);
+
+	json_object *delta_q_y_dc_obj;
+	if (json_object_object_get_ex(v4l2_vp9_quantization_obj, "delta_q_y_dc", &delta_q_y_dc_obj))
+		p->delta_q_y_dc = (__s8) json_object_get_int(delta_q_y_dc_obj);
+
+	json_object *delta_q_uv_dc_obj;
+	if (json_object_object_get_ex(v4l2_vp9_quantization_obj, "delta_q_uv_dc", &delta_q_uv_dc_obj))
+		p->delta_q_uv_dc = (__s8) json_object_get_int(delta_q_uv_dc_obj);
+
+	json_object *delta_q_uv_ac_obj;
+	if (json_object_object_get_ex(v4l2_vp9_quantization_obj, "delta_q_uv_ac", &delta_q_uv_ac_obj))
+		p->delta_q_uv_ac = (__s8) json_object_get_int(delta_q_uv_ac_obj);
+
+	return p;
+}
+
+struct v4l2_vp9_segmentation *retrace_v4l2_vp9_segmentation_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp9_segmentation *p = (struct v4l2_vp9_segmentation *) calloc(1, sizeof(v4l2_vp9_segmentation));
+	json_object *v4l2_vp9_segmentation_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp9_segmentation", &v4l2_vp9_segmentation_obj))
+		v4l2_vp9_segmentation_obj = ctrl_obj;
+
+	/* __s16 feature_data[8][4] */
+	int count_feature_data = 0;
+	json_object *feature_data_obj;
+	if (json_object_object_get_ex(v4l2_vp9_segmentation_obj, "feature_data", &feature_data_obj)) {
+		for (size_t i = 0; i < 8; i++) {
+			for (size_t j = 0; j < 4; j++) {
+				if (json_object_array_get_idx(feature_data_obj, count_feature_data))
+					p->feature_data[i][j] = (__s16) json_object_get_int(json_object_array_get_idx(feature_data_obj, count_feature_data++));
+			}
+		}
+	}
+
+	/* __u8 feature_enabled[8] */
+	json_object *feature_enabled_obj;
+	if (json_object_object_get_ex(v4l2_vp9_segmentation_obj, "feature_enabled", &feature_enabled_obj)) {
+		for (size_t i = 0; i < 8; i++) {
+			if (json_object_array_get_idx(feature_enabled_obj, i))
+				p->feature_enabled[i] = (__u8) json_object_get_int(json_object_array_get_idx(feature_enabled_obj, i));
+		}
+	}
+
+	/* __u8 tree_probs[7] */
+	json_object *tree_probs_obj;
+	if (json_object_object_get_ex(v4l2_vp9_segmentation_obj, "tree_probs", &tree_probs_obj)) {
+		for (size_t i = 0; i < 7; i++) {
+			if (json_object_array_get_idx(tree_probs_obj, i))
+				p->tree_probs[i] = (__u8) json_object_get_int(json_object_array_get_idx(tree_probs_obj, i));
+		}
+	}
+
+	/* __u8 pred_probs[3] */
+	json_object *pred_probs_obj;
+	if (json_object_object_get_ex(v4l2_vp9_segmentation_obj, "pred_probs", &pred_probs_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(pred_probs_obj, i))
+				p->pred_probs[i] = (__u8) json_object_get_int(json_object_array_get_idx(pred_probs_obj, i));
+		}
+	}
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_vp9_segmentation_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_vp9_segmentation_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_vp9_frame *retrace_v4l2_ctrl_vp9_frame_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_vp9_frame *p = (struct v4l2_ctrl_vp9_frame *) calloc(1, sizeof(v4l2_ctrl_vp9_frame));
+	json_object *v4l2_ctrl_vp9_frame_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_vp9_frame", &v4l2_ctrl_vp9_frame_obj))
+		v4l2_ctrl_vp9_frame_obj = ctrl_obj;
+
+	/* struct v4l2_vp9_loop_filter lf */
+	json_object *lf_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "v4l2_vp9_loop_filter", &lf_obj))
+		return p;
+	void *lf_ptr = (void *) retrace_v4l2_vp9_loop_filter_gen(lf_obj);
+	p->lf = *static_cast<struct v4l2_vp9_loop_filter*>(lf_ptr);
+	free(lf_ptr);
+
+	/* struct v4l2_vp9_quantization quant */
+	json_object *quant_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "v4l2_vp9_quantization", &quant_obj))
+		return p;
+	void *quant_ptr = (void *) retrace_v4l2_vp9_quantization_gen(quant_obj);
+	p->quant = *static_cast<struct v4l2_vp9_quantization*>(quant_ptr);
+	free(quant_ptr);
+
+	/* struct v4l2_vp9_segmentation seg */
+	json_object *seg_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "v4l2_vp9_segmentation", &seg_obj))
+		return p;
+	void *seg_ptr = (void *) retrace_v4l2_vp9_segmentation_gen(seg_obj);
+	p->seg = *static_cast<struct v4l2_vp9_segmentation*>(seg_ptr);
+	free(seg_ptr);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_vp9_frame_flag_def);
+
+	json_object *compressed_header_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "compressed_header_size", &compressed_header_size_obj))
+		p->compressed_header_size = (__u16) json_object_get_int(compressed_header_size_obj);
+
+	json_object *uncompressed_header_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "uncompressed_header_size", &uncompressed_header_size_obj))
+		p->uncompressed_header_size = (__u16) json_object_get_int(uncompressed_header_size_obj);
+
+	json_object *frame_width_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "frame_width_minus_1", &frame_width_minus_1_obj))
+		p->frame_width_minus_1 = (__u16) json_object_get_int(frame_width_minus_1_obj);
+
+	json_object *frame_height_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "frame_height_minus_1", &frame_height_minus_1_obj))
+		p->frame_height_minus_1 = (__u16) json_object_get_int(frame_height_minus_1_obj);
+
+	json_object *render_width_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "render_width_minus_1", &render_width_minus_1_obj))
+		p->render_width_minus_1 = (__u16) json_object_get_int(render_width_minus_1_obj);
+
+	json_object *render_height_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "render_height_minus_1", &render_height_minus_1_obj))
+		p->render_height_minus_1 = (__u16) json_object_get_int(render_height_minus_1_obj);
+
+	json_object *last_frame_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "last_frame_ts", &last_frame_ts_obj))
+		p->last_frame_ts = (__u64) json_object_get_uint64(last_frame_ts_obj);
+
+	json_object *golden_frame_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "golden_frame_ts", &golden_frame_ts_obj))
+		p->golden_frame_ts = (__u64) json_object_get_uint64(golden_frame_ts_obj);
+
+	json_object *alt_frame_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "alt_frame_ts", &alt_frame_ts_obj))
+		p->alt_frame_ts = (__u64) json_object_get_uint64(alt_frame_ts_obj);
+
+	json_object *ref_frame_sign_bias_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "ref_frame_sign_bias", &ref_frame_sign_bias_obj))
+		p->ref_frame_sign_bias = (__u8) json_object_get_int(ref_frame_sign_bias_obj);
+
+	json_object *reset_frame_context_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "reset_frame_context", &reset_frame_context_obj))
+		p->reset_frame_context = (__u8) json_object_get_int(reset_frame_context_obj);
+
+	json_object *frame_context_idx_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "frame_context_idx", &frame_context_idx_obj))
+		p->frame_context_idx = (__u8) json_object_get_int(frame_context_idx_obj);
+
+	json_object *profile_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "profile", &profile_obj))
+		p->profile = (__u8) json_object_get_int(profile_obj);
+
+	json_object *bit_depth_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "bit_depth", &bit_depth_obj))
+		p->bit_depth = (__u8) json_object_get_int(bit_depth_obj);
+
+	json_object *interpolation_filter_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "interpolation_filter", &interpolation_filter_obj))
+		p->interpolation_filter = (__u8) json_object_get_int(interpolation_filter_obj);
+
+	json_object *tile_cols_log2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "tile_cols_log2", &tile_cols_log2_obj))
+		p->tile_cols_log2 = (__u8) json_object_get_int(tile_cols_log2_obj);
+
+	json_object *tile_rows_log2_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "tile_rows_log2", &tile_rows_log2_obj))
+		p->tile_rows_log2 = (__u8) json_object_get_int(tile_rows_log2_obj);
+
+	json_object *reference_mode_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_frame_obj, "reference_mode", &reference_mode_obj))
+		p->reference_mode = (__u8) json_object_get_int(reference_mode_obj);
+
+	return p;
+}
+
+struct v4l2_vp9_mv_probs *retrace_v4l2_vp9_mv_probs_gen(json_object *ctrl_obj)
+{
+	struct v4l2_vp9_mv_probs *p = (struct v4l2_vp9_mv_probs *) calloc(1, sizeof(v4l2_vp9_mv_probs));
+	json_object *v4l2_vp9_mv_probs_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_vp9_mv_probs", &v4l2_vp9_mv_probs_obj))
+		v4l2_vp9_mv_probs_obj = ctrl_obj;
+
+	/* __u8 joint[3] */
+	json_object *joint_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "joint", &joint_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(joint_obj, i))
+				p->joint[i] = (__u8) json_object_get_int(json_object_array_get_idx(joint_obj, i));
+		}
+	}
+
+	/* __u8 sign[2] */
+	json_object *sign_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "sign", &sign_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(sign_obj, i))
+				p->sign[i] = (__u8) json_object_get_int(json_object_array_get_idx(sign_obj, i));
+		}
+	}
+
+	/* __u8 classes[2][10] */
+	int count_classes = 0;
+	json_object *classes_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "classes", &classes_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 10; j++) {
+				if (json_object_array_get_idx(classes_obj, count_classes))
+					p->classes[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(classes_obj, count_classes++));
+			}
+		}
+	}
+
+	/* __u8 class0_bit[2] */
+	json_object *class0_bit_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "class0_bit", &class0_bit_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(class0_bit_obj, i))
+				p->class0_bit[i] = (__u8) json_object_get_int(json_object_array_get_idx(class0_bit_obj, i));
+		}
+	}
+
+	/* __u8 bits[2][10] */
+	int count_bits = 0;
+	json_object *bits_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "bits", &bits_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 10; j++) {
+				if (json_object_array_get_idx(bits_obj, count_bits))
+					p->bits[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(bits_obj, count_bits++));
+			}
+		}
+	}
+
+	/* __u8 class0_fr[2][2][3] */
+	int count_class0_fr = 0;
+	json_object *class0_fr_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "class0_fr", &class0_fr_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				for (size_t k = 0; k < 3; k++) {
+					if (json_object_array_get_idx(class0_fr_obj, count_class0_fr))
+						p->class0_fr[i][j][k] = (__u8) json_object_get_int(json_object_array_get_idx(class0_fr_obj, count_class0_fr++));
+				}
+			}
+		}
+	}
+
+	/* __u8 fr[2][3] */
+	int count_fr = 0;
+	json_object *fr_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "fr", &fr_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 3; j++) {
+				if (json_object_array_get_idx(fr_obj, count_fr))
+					p->fr[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(fr_obj, count_fr++));
+			}
+		}
+	}
+
+	/* __u8 class0_hp[2] */
+	json_object *class0_hp_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "class0_hp", &class0_hp_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(class0_hp_obj, i))
+				p->class0_hp[i] = (__u8) json_object_get_int(json_object_array_get_idx(class0_hp_obj, i));
+		}
+	}
+
+	/* __u8 hp[2] */
+	json_object *hp_obj;
+	if (json_object_object_get_ex(v4l2_vp9_mv_probs_obj, "hp", &hp_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(hp_obj, i))
+				p->hp[i] = (__u8) json_object_get_int(json_object_array_get_idx(hp_obj, i));
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_ctrl_vp9_compressed_hdr *retrace_v4l2_ctrl_vp9_compressed_hdr_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_vp9_compressed_hdr *p = (struct v4l2_ctrl_vp9_compressed_hdr *) calloc(1, sizeof(v4l2_ctrl_vp9_compressed_hdr));
+	json_object *v4l2_ctrl_vp9_compressed_hdr_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_vp9_compressed_hdr", &v4l2_ctrl_vp9_compressed_hdr_obj))
+		v4l2_ctrl_vp9_compressed_hdr_obj = ctrl_obj;
+
+	json_object *tx_mode_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "tx_mode", &tx_mode_obj))
+		p->tx_mode = (__u8) json_object_get_int(tx_mode_obj);
+
+	/* __u8 tx8[2][1] */
+	int count_tx8 = 0;
+	json_object *tx8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "tx8", &tx8_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 1; j++) {
+				if (json_object_array_get_idx(tx8_obj, count_tx8))
+					p->tx8[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(tx8_obj, count_tx8++));
+			}
+		}
+	}
+
+	/* __u8 tx16[2][2] */
+	int count_tx16 = 0;
+	json_object *tx16_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "tx16", &tx16_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(tx16_obj, count_tx16))
+					p->tx16[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(tx16_obj, count_tx16++));
+			}
+		}
+	}
+
+	/* __u8 tx32[2][3] */
+	int count_tx32 = 0;
+	json_object *tx32_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "tx32", &tx32_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			for (size_t j = 0; j < 3; j++) {
+				if (json_object_array_get_idx(tx32_obj, count_tx32))
+					p->tx32[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(tx32_obj, count_tx32++));
+			}
+		}
+	}
+
+	/* __u8 coef[4][2][2][6][6][3] */
+	int count_coef = 0;
+	json_object *coef_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "coef", &coef_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				for (size_t k = 0; k < 2; k++) {
+					for (size_t l = 0; l < 6; l++) {
+						for (size_t m = 0; m < 6; m++) {
+							for (size_t n = 0; n < 3; n++) {
+								if (json_object_array_get_idx(coef_obj, count_coef))
+									p->coef[i][j][k][l][m][n] = (__u8) json_object_get_int(json_object_array_get_idx(coef_obj, count_coef++));
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/* __u8 skip[3] */
+	json_object *skip_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "skip", &skip_obj)) {
+		for (size_t i = 0; i < 3; i++) {
+			if (json_object_array_get_idx(skip_obj, i))
+				p->skip[i] = (__u8) json_object_get_int(json_object_array_get_idx(skip_obj, i));
+		}
+	}
+
+	/* __u8 inter_mode[7][3] */
+	int count_inter_mode = 0;
+	json_object *inter_mode_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "inter_mode", &inter_mode_obj)) {
+		for (size_t i = 0; i < 7; i++) {
+			for (size_t j = 0; j < 3; j++) {
+				if (json_object_array_get_idx(inter_mode_obj, count_inter_mode))
+					p->inter_mode[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(inter_mode_obj, count_inter_mode++));
+			}
+		}
+	}
+
+	/* __u8 interp_filter[4][2] */
+	int count_interp_filter = 0;
+	json_object *interp_filter_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "interp_filter", &interp_filter_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(interp_filter_obj, count_interp_filter))
+					p->interp_filter[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(interp_filter_obj, count_interp_filter++));
+			}
+		}
+	}
+
+	/* __u8 is_inter[4] */
+	json_object *is_inter_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "is_inter", &is_inter_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(is_inter_obj, i))
+				p->is_inter[i] = (__u8) json_object_get_int(json_object_array_get_idx(is_inter_obj, i));
+		}
+	}
+
+	/* __u8 comp_mode[5] */
+	json_object *comp_mode_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "comp_mode", &comp_mode_obj)) {
+		for (size_t i = 0; i < 5; i++) {
+			if (json_object_array_get_idx(comp_mode_obj, i))
+				p->comp_mode[i] = (__u8) json_object_get_int(json_object_array_get_idx(comp_mode_obj, i));
+		}
+	}
+
+	/* __u8 single_ref[5][2] */
+	int count_single_ref = 0;
+	json_object *single_ref_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "single_ref", &single_ref_obj)) {
+		for (size_t i = 0; i < 5; i++) {
+			for (size_t j = 0; j < 2; j++) {
+				if (json_object_array_get_idx(single_ref_obj, count_single_ref))
+					p->single_ref[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(single_ref_obj, count_single_ref++));
+			}
+		}
+	}
+
+	/* __u8 comp_ref[5] */
+	json_object *comp_ref_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "comp_ref", &comp_ref_obj)) {
+		for (size_t i = 0; i < 5; i++) {
+			if (json_object_array_get_idx(comp_ref_obj, i))
+				p->comp_ref[i] = (__u8) json_object_get_int(json_object_array_get_idx(comp_ref_obj, i));
+		}
+	}
+
+	/* __u8 y_mode[4][9] */
+	int count_y_mode = 0;
+	json_object *y_mode_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "y_mode", &y_mode_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			for (size_t j = 0; j < 9; j++) {
+				if (json_object_array_get_idx(y_mode_obj, count_y_mode))
+					p->y_mode[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(y_mode_obj, count_y_mode++));
+			}
+		}
+	}
+
+	/* __u8 uv_mode[10][9] */
+	int count_uv_mode = 0;
+	json_object *uv_mode_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "uv_mode", &uv_mode_obj)) {
+		for (size_t i = 0; i < 10; i++) {
+			for (size_t j = 0; j < 9; j++) {
+				if (json_object_array_get_idx(uv_mode_obj, count_uv_mode))
+					p->uv_mode[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(uv_mode_obj, count_uv_mode++));
+			}
+		}
+	}
+
+	/* __u8 partition[16][3] */
+	int count_partition = 0;
+	json_object *partition_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "partition", &partition_obj)) {
+		for (size_t i = 0; i < 16; i++) {
+			for (size_t j = 0; j < 3; j++) {
+				if (json_object_array_get_idx(partition_obj, count_partition))
+					p->partition[i][j] = (__u8) json_object_get_int(json_object_array_get_idx(partition_obj, count_partition++));
+			}
+		}
+	}
+
+	/* struct v4l2_vp9_mv_probs mv */
+	json_object *mv_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_vp9_compressed_hdr_obj, "v4l2_vp9_mv_probs", &mv_obj))
+		return p;
+	void *mv_ptr = (void *) retrace_v4l2_vp9_mv_probs_gen(mv_obj);
+	p->mv = *static_cast<struct v4l2_vp9_mv_probs*>(mv_ptr);
+	free(mv_ptr);
+
+	return p;
+}
+
+struct v4l2_ctrl_av1_sequence *retrace_v4l2_ctrl_av1_sequence_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_av1_sequence *p = (struct v4l2_ctrl_av1_sequence *) calloc(1, sizeof(v4l2_ctrl_av1_sequence));
+	json_object *v4l2_ctrl_av1_sequence_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_av1_sequence", &v4l2_ctrl_av1_sequence_obj))
+		v4l2_ctrl_av1_sequence_obj = ctrl_obj;
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_sequence_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_av1_sequence_flag_def);
+
+	json_object *seq_profile_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_sequence_obj, "seq_profile", &seq_profile_obj))
+		p->seq_profile = (__u8) json_object_get_int(seq_profile_obj);
+
+	json_object *order_hint_bits_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_sequence_obj, "order_hint_bits", &order_hint_bits_obj))
+		p->order_hint_bits = (__u8) json_object_get_int(order_hint_bits_obj);
+
+	json_object *bit_depth_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_sequence_obj, "bit_depth", &bit_depth_obj))
+		p->bit_depth = (__u8) json_object_get_int(bit_depth_obj);
+
+	json_object *max_frame_width_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_sequence_obj, "max_frame_width_minus_1", &max_frame_width_minus_1_obj))
+		p->max_frame_width_minus_1 = (__u16) json_object_get_int(max_frame_width_minus_1_obj);
+
+	json_object *max_frame_height_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_sequence_obj, "max_frame_height_minus_1", &max_frame_height_minus_1_obj))
+		p->max_frame_height_minus_1 = (__u16) json_object_get_int(max_frame_height_minus_1_obj);
+
+	return p;
+}
+
+struct v4l2_ctrl_av1_tile_group_entry *retrace_v4l2_ctrl_av1_tile_group_entry_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_av1_tile_group_entry *p = (struct v4l2_ctrl_av1_tile_group_entry *) calloc(1, sizeof(v4l2_ctrl_av1_tile_group_entry));
+	json_object *v4l2_ctrl_av1_tile_group_entry_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_av1_tile_group_entry", &v4l2_ctrl_av1_tile_group_entry_obj))
+		v4l2_ctrl_av1_tile_group_entry_obj = ctrl_obj;
+
+	json_object *tile_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_tile_group_entry_obj, "tile_offset", &tile_offset_obj))
+		p->tile_offset = (__u32) json_object_get_int64(tile_offset_obj);
+
+	json_object *tile_size_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_tile_group_entry_obj, "tile_size", &tile_size_obj))
+		p->tile_size = (__u32) json_object_get_int64(tile_size_obj);
+
+	json_object *tile_row_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_tile_group_entry_obj, "tile_row", &tile_row_obj))
+		p->tile_row = (__u32) json_object_get_int64(tile_row_obj);
+
+	json_object *tile_col_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_tile_group_entry_obj, "tile_col", &tile_col_obj))
+		p->tile_col = (__u32) json_object_get_int64(tile_col_obj);
+
+	return p;
+}
+
+struct v4l2_av1_global_motion *retrace_v4l2_av1_global_motion_gen(json_object *ctrl_obj)
+{
+	struct v4l2_av1_global_motion *p = (struct v4l2_av1_global_motion *) calloc(1, sizeof(v4l2_av1_global_motion));
+	json_object *v4l2_av1_global_motion_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_av1_global_motion", &v4l2_av1_global_motion_obj))
+		v4l2_av1_global_motion_obj = ctrl_obj;
+
+	/* __u8 flags[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_av1_global_motion_obj, "flags", &flags_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+			if (json_object_array_get_idx(flags_obj, i))
+				p->flags[i] = (__u8) json_object_get_int(json_object_array_get_idx(flags_obj, i));
+		}
+	}
+
+	/* enum v4l2_av1_warp_model type[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_av1_global_motion_obj, "type", &type_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+			if (json_object_array_get_idx(type_obj, i))
+				p->type[i] = (v4l2_av1_warp_model) json_object_get_int(json_object_array_get_idx(type_obj, i));
+		}
+	}
+
+	/* __s32 params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6] */
+	int count_params = 0;
+	json_object *params_obj;
+	if (json_object_object_get_ex(v4l2_av1_global_motion_obj, "params", &params_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+			for (size_t j = 0; j < 6; j++) {
+				if (json_object_array_get_idx(params_obj, count_params))
+					p->params[i][j] = (__s32) json_object_get_int(json_object_array_get_idx(params_obj, count_params++));
+			}
+		}
+	}
+
+	json_object *invalid_obj;
+	if (json_object_object_get_ex(v4l2_av1_global_motion_obj, "invalid", &invalid_obj))
+		p->invalid = (__u8) json_object_get_int(invalid_obj);
+
+	return p;
+}
+
+struct v4l2_av1_loop_restoration *retrace_v4l2_av1_loop_restoration_gen(json_object *ctrl_obj)
+{
+	struct v4l2_av1_loop_restoration *p = (struct v4l2_av1_loop_restoration *) calloc(1, sizeof(v4l2_av1_loop_restoration));
+	json_object *v4l2_av1_loop_restoration_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_av1_loop_restoration", &v4l2_av1_loop_restoration_obj))
+		v4l2_av1_loop_restoration_obj = ctrl_obj;
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_restoration_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_av1_loop_restoration_flag_def);
+
+	json_object *lr_unit_shift_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_restoration_obj, "lr_unit_shift", &lr_unit_shift_obj))
+		p->lr_unit_shift = (__u8) json_object_get_int(lr_unit_shift_obj);
+
+	json_object *lr_uv_shift_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_restoration_obj, "lr_uv_shift", &lr_uv_shift_obj))
+		p->lr_uv_shift = (__u8) json_object_get_int(lr_uv_shift_obj);
+
+	/* enum v4l2_av1_frame_restoration_type frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX] */
+	json_object *frame_restoration_type_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_restoration_obj, "frame_restoration_type", &frame_restoration_type_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_NUM_PLANES_MAX; i++) {
+			if (json_object_array_get_idx(frame_restoration_type_obj, i))
+				p->frame_restoration_type[i] = (v4l2_av1_frame_restoration_type) json_object_get_int(json_object_array_get_idx(frame_restoration_type_obj, i));
+		}
+	}
+
+	/* __u32 loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES] */
+	json_object *loop_restoration_size_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_restoration_obj, "loop_restoration_size", &loop_restoration_size_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_NUM_PLANES; i++) {
+			if (json_object_array_get_idx(loop_restoration_size_obj, i))
+				p->loop_restoration_size[i] = (__u32) json_object_get_int64(json_object_array_get_idx(loop_restoration_size_obj, i));
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_av1_cdef *retrace_v4l2_av1_cdef_gen(json_object *ctrl_obj)
+{
+	struct v4l2_av1_cdef *p = (struct v4l2_av1_cdef *) calloc(1, sizeof(v4l2_av1_cdef));
+	json_object *v4l2_av1_cdef_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_av1_cdef", &v4l2_av1_cdef_obj))
+		v4l2_av1_cdef_obj = ctrl_obj;
+
+	json_object *damping_minus_3_obj;
+	if (json_object_object_get_ex(v4l2_av1_cdef_obj, "damping_minus_3", &damping_minus_3_obj))
+		p->damping_minus_3 = (__u8) json_object_get_int(damping_minus_3_obj);
+
+	json_object *bits_obj;
+	if (json_object_object_get_ex(v4l2_av1_cdef_obj, "bits", &bits_obj))
+		p->bits = (__u8) json_object_get_int(bits_obj);
+
+	/* __u8 y_pri_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *y_pri_strength_obj;
+	if (json_object_object_get_ex(v4l2_av1_cdef_obj, "y_pri_strength", &y_pri_strength_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+			if (json_object_array_get_idx(y_pri_strength_obj, i))
+				p->y_pri_strength[i] = (__u8) json_object_get_int(json_object_array_get_idx(y_pri_strength_obj, i));
+		}
+	}
+
+	/* __u8 y_sec_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *y_sec_strength_obj;
+	if (json_object_object_get_ex(v4l2_av1_cdef_obj, "y_sec_strength", &y_sec_strength_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+			if (json_object_array_get_idx(y_sec_strength_obj, i))
+				p->y_sec_strength[i] = (__u8) json_object_get_int(json_object_array_get_idx(y_sec_strength_obj, i));
+		}
+	}
+
+	/* __u8 uv_pri_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *uv_pri_strength_obj;
+	if (json_object_object_get_ex(v4l2_av1_cdef_obj, "uv_pri_strength", &uv_pri_strength_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+			if (json_object_array_get_idx(uv_pri_strength_obj, i))
+				p->uv_pri_strength[i] = (__u8) json_object_get_int(json_object_array_get_idx(uv_pri_strength_obj, i));
+		}
+	}
+
+	/* __u8 uv_sec_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *uv_sec_strength_obj;
+	if (json_object_object_get_ex(v4l2_av1_cdef_obj, "uv_sec_strength", &uv_sec_strength_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+			if (json_object_array_get_idx(uv_sec_strength_obj, i))
+				p->uv_sec_strength[i] = (__u8) json_object_get_int(json_object_array_get_idx(uv_sec_strength_obj, i));
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_av1_segmentation *retrace_v4l2_av1_segmentation_gen(json_object *ctrl_obj)
+{
+	struct v4l2_av1_segmentation *p = (struct v4l2_av1_segmentation *) calloc(1, sizeof(v4l2_av1_segmentation));
+	json_object *v4l2_av1_segmentation_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_av1_segmentation", &v4l2_av1_segmentation_obj))
+		v4l2_av1_segmentation_obj = ctrl_obj;
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_av1_segmentation_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_av1_segmentation_flag_def);
+
+	json_object *last_active_seg_id_obj;
+	if (json_object_object_get_ex(v4l2_av1_segmentation_obj, "last_active_seg_id", &last_active_seg_id_obj))
+		p->last_active_seg_id = (__u8) json_object_get_int(last_active_seg_id_obj);
+
+	/* __u8 feature_enabled[V4L2_AV1_MAX_SEGMENTS] */
+	json_object *feature_enabled_obj;
+	if (json_object_object_get_ex(v4l2_av1_segmentation_obj, "feature_enabled", &feature_enabled_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_SEGMENTS; i++) {
+			if (json_object_array_get_idx(feature_enabled_obj, i))
+				p->feature_enabled[i] = (__u8) json_object_get_int(json_object_array_get_idx(feature_enabled_obj, i));
+		}
+	}
+
+	/* __s16 feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX] */
+	int count_feature_data = 0;
+	json_object *feature_data_obj;
+	if (json_object_object_get_ex(v4l2_av1_segmentation_obj, "feature_data", &feature_data_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_SEGMENTS; i++) {
+			for (size_t j = 0; j < V4L2_AV1_SEG_LVL_MAX; j++) {
+				if (json_object_array_get_idx(feature_data_obj, count_feature_data))
+					p->feature_data[i][j] = (__s16) json_object_get_int(json_object_array_get_idx(feature_data_obj, count_feature_data++));
+			}
+		}
+	}
+
+	return p;
+}
+
+struct v4l2_av1_loop_filter *retrace_v4l2_av1_loop_filter_gen(json_object *ctrl_obj)
+{
+	struct v4l2_av1_loop_filter *p = (struct v4l2_av1_loop_filter *) calloc(1, sizeof(v4l2_av1_loop_filter));
+	json_object *v4l2_av1_loop_filter_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_av1_loop_filter", &v4l2_av1_loop_filter_obj))
+		v4l2_av1_loop_filter_obj = ctrl_obj;
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_filter_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_av1_loop_filter_flag_def);
+
+	/* __u8 level[4] */
+	json_object *level_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_filter_obj, "level", &level_obj)) {
+		for (size_t i = 0; i < 4; i++) {
+			if (json_object_array_get_idx(level_obj, i))
+				p->level[i] = (__u8) json_object_get_int(json_object_array_get_idx(level_obj, i));
+		}
+	}
+
+	json_object *sharpness_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_filter_obj, "sharpness", &sharpness_obj))
+		p->sharpness = (__u8) json_object_get_int(sharpness_obj);
+
+	/* __s8 ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *ref_deltas_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_filter_obj, "ref_deltas", &ref_deltas_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+			if (json_object_array_get_idx(ref_deltas_obj, i))
+				p->ref_deltas[i] = (__s8) json_object_get_int(json_object_array_get_idx(ref_deltas_obj, i));
+		}
+	}
+
+	/* __s8 mode_deltas[2] */
+	json_object *mode_deltas_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_filter_obj, "mode_deltas", &mode_deltas_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(mode_deltas_obj, i))
+				p->mode_deltas[i] = (__s8) json_object_get_int(json_object_array_get_idx(mode_deltas_obj, i));
+		}
+	}
+
+	json_object *delta_lf_res_obj;
+	if (json_object_object_get_ex(v4l2_av1_loop_filter_obj, "delta_lf_res", &delta_lf_res_obj))
+		p->delta_lf_res = (__u8) json_object_get_int(delta_lf_res_obj);
+
+	return p;
+}
+
+struct v4l2_av1_quantization *retrace_v4l2_av1_quantization_gen(json_object *ctrl_obj)
+{
+	struct v4l2_av1_quantization *p = (struct v4l2_av1_quantization *) calloc(1, sizeof(v4l2_av1_quantization));
+	json_object *v4l2_av1_quantization_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_av1_quantization", &v4l2_av1_quantization_obj))
+		v4l2_av1_quantization_obj = ctrl_obj;
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_av1_quantization_flag_def);
+
+	json_object *base_q_idx_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "base_q_idx", &base_q_idx_obj))
+		p->base_q_idx = (__u8) json_object_get_int(base_q_idx_obj);
+
+	json_object *delta_q_y_dc_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "delta_q_y_dc", &delta_q_y_dc_obj))
+		p->delta_q_y_dc = (__s8) json_object_get_int(delta_q_y_dc_obj);
+
+	json_object *delta_q_u_dc_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "delta_q_u_dc", &delta_q_u_dc_obj))
+		p->delta_q_u_dc = (__s8) json_object_get_int(delta_q_u_dc_obj);
+
+	json_object *delta_q_u_ac_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "delta_q_u_ac", &delta_q_u_ac_obj))
+		p->delta_q_u_ac = (__s8) json_object_get_int(delta_q_u_ac_obj);
+
+	json_object *delta_q_v_dc_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "delta_q_v_dc", &delta_q_v_dc_obj))
+		p->delta_q_v_dc = (__s8) json_object_get_int(delta_q_v_dc_obj);
+
+	json_object *delta_q_v_ac_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "delta_q_v_ac", &delta_q_v_ac_obj))
+		p->delta_q_v_ac = (__s8) json_object_get_int(delta_q_v_ac_obj);
+
+	json_object *qm_y_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "qm_y", &qm_y_obj))
+		p->qm_y = (__u8) json_object_get_int(qm_y_obj);
+
+	json_object *qm_u_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "qm_u", &qm_u_obj))
+		p->qm_u = (__u8) json_object_get_int(qm_u_obj);
+
+	json_object *qm_v_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "qm_v", &qm_v_obj))
+		p->qm_v = (__u8) json_object_get_int(qm_v_obj);
+
+	json_object *delta_q_res_obj;
+	if (json_object_object_get_ex(v4l2_av1_quantization_obj, "delta_q_res", &delta_q_res_obj))
+		p->delta_q_res = (__u8) json_object_get_int(delta_q_res_obj);
+
+	return p;
+}
+
+struct v4l2_av1_tile_info *retrace_v4l2_av1_tile_info_gen(json_object *ctrl_obj)
+{
+	struct v4l2_av1_tile_info *p = (struct v4l2_av1_tile_info *) calloc(1, sizeof(v4l2_av1_tile_info));
+	json_object *v4l2_av1_tile_info_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_av1_tile_info", &v4l2_av1_tile_info_obj))
+		v4l2_av1_tile_info_obj = ctrl_obj;
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_av1_tile_info_flag_def);
+
+	json_object *context_update_tile_id_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "context_update_tile_id", &context_update_tile_id_obj))
+		p->context_update_tile_id = (__u8) json_object_get_int(context_update_tile_id_obj);
+
+	json_object *tile_cols_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "tile_cols", &tile_cols_obj))
+		p->tile_cols = (__u8) json_object_get_int(tile_cols_obj);
+
+	json_object *tile_rows_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "tile_rows", &tile_rows_obj))
+		p->tile_rows = (__u8) json_object_get_int(tile_rows_obj);
+
+	/* __u32 mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1] */
+	json_object *mi_col_starts_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "mi_col_starts", &mi_col_starts_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_TILE_COLS + 1; i++) {
+			if (json_object_array_get_idx(mi_col_starts_obj, i))
+				p->mi_col_starts[i] = (__u32) json_object_get_int64(json_object_array_get_idx(mi_col_starts_obj, i));
+		}
+	}
+
+	/* __u32 mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1] */
+	json_object *mi_row_starts_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "mi_row_starts", &mi_row_starts_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_TILE_ROWS + 1; i++) {
+			if (json_object_array_get_idx(mi_row_starts_obj, i))
+				p->mi_row_starts[i] = (__u32) json_object_get_int64(json_object_array_get_idx(mi_row_starts_obj, i));
+		}
+	}
+
+	/* __u32 width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS] */
+	json_object *width_in_sbs_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "width_in_sbs_minus_1", &width_in_sbs_minus_1_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_TILE_COLS; i++) {
+			if (json_object_array_get_idx(width_in_sbs_minus_1_obj, i))
+				p->width_in_sbs_minus_1[i] = (__u32) json_object_get_int64(json_object_array_get_idx(width_in_sbs_minus_1_obj, i));
+		}
+	}
+
+	/* __u32 height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS] */
+	json_object *height_in_sbs_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "height_in_sbs_minus_1", &height_in_sbs_minus_1_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_TILE_ROWS; i++) {
+			if (json_object_array_get_idx(height_in_sbs_minus_1_obj, i))
+				p->height_in_sbs_minus_1[i] = (__u32) json_object_get_int64(json_object_array_get_idx(height_in_sbs_minus_1_obj, i));
+		}
+	}
+
+	json_object *tile_size_bytes_obj;
+	if (json_object_object_get_ex(v4l2_av1_tile_info_obj, "tile_size_bytes", &tile_size_bytes_obj))
+		p->tile_size_bytes = (__u8) json_object_get_int(tile_size_bytes_obj);
+
+	return p;
+}
+
+struct v4l2_ctrl_av1_frame *retrace_v4l2_ctrl_av1_frame_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_av1_frame *p = (struct v4l2_ctrl_av1_frame *) calloc(1, sizeof(v4l2_ctrl_av1_frame));
+	json_object *v4l2_ctrl_av1_frame_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_av1_frame", &v4l2_ctrl_av1_frame_obj))
+		v4l2_ctrl_av1_frame_obj = ctrl_obj;
+
+	/* struct v4l2_av1_tile_info tile_info */
+	json_object *tile_info_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "v4l2_av1_tile_info", &tile_info_obj))
+		return p;
+	void *tile_info_ptr = (void *) retrace_v4l2_av1_tile_info_gen(tile_info_obj);
+	p->tile_info = *static_cast<struct v4l2_av1_tile_info*>(tile_info_ptr);
+	free(tile_info_ptr);
+
+	/* struct v4l2_av1_quantization quantization */
+	json_object *quantization_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "v4l2_av1_quantization", &quantization_obj))
+		return p;
+	void *quantization_ptr = (void *) retrace_v4l2_av1_quantization_gen(quantization_obj);
+	p->quantization = *static_cast<struct v4l2_av1_quantization*>(quantization_ptr);
+	free(quantization_ptr);
+
+	json_object *superres_denom_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "superres_denom", &superres_denom_obj))
+		p->superres_denom = (__u8) json_object_get_int(superres_denom_obj);
+
+	/* struct v4l2_av1_segmentation segmentation */
+	json_object *segmentation_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "v4l2_av1_segmentation", &segmentation_obj))
+		return p;
+	void *segmentation_ptr = (void *) retrace_v4l2_av1_segmentation_gen(segmentation_obj);
+	p->segmentation = *static_cast<struct v4l2_av1_segmentation*>(segmentation_ptr);
+	free(segmentation_ptr);
+
+	/* struct v4l2_av1_loop_filter loop_filter */
+	json_object *loop_filter_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "v4l2_av1_loop_filter", &loop_filter_obj))
+		return p;
+	void *loop_filter_ptr = (void *) retrace_v4l2_av1_loop_filter_gen(loop_filter_obj);
+	p->loop_filter = *static_cast<struct v4l2_av1_loop_filter*>(loop_filter_ptr);
+	free(loop_filter_ptr);
+
+	/* struct v4l2_av1_cdef cdef */
+	json_object *cdef_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "v4l2_av1_cdef", &cdef_obj))
+		return p;
+	void *cdef_ptr = (void *) retrace_v4l2_av1_cdef_gen(cdef_obj);
+	p->cdef = *static_cast<struct v4l2_av1_cdef*>(cdef_ptr);
+	free(cdef_ptr);
+
+	/* __u8 skip_mode_frame[2] */
+	json_object *skip_mode_frame_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "skip_mode_frame", &skip_mode_frame_obj)) {
+		for (size_t i = 0; i < 2; i++) {
+			if (json_object_array_get_idx(skip_mode_frame_obj, i))
+				p->skip_mode_frame[i] = (__u8) json_object_get_int(json_object_array_get_idx(skip_mode_frame_obj, i));
+		}
+	}
+
+	json_object *primary_ref_frame_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "primary_ref_frame", &primary_ref_frame_obj))
+		p->primary_ref_frame = (__u8) json_object_get_int(primary_ref_frame_obj);
+
+	/* struct v4l2_av1_loop_restoration loop_restoration */
+	json_object *loop_restoration_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "v4l2_av1_loop_restoration", &loop_restoration_obj))
+		return p;
+	void *loop_restoration_ptr = (void *) retrace_v4l2_av1_loop_restoration_gen(loop_restoration_obj);
+	p->loop_restoration = *static_cast<struct v4l2_av1_loop_restoration*>(loop_restoration_ptr);
+	free(loop_restoration_ptr);
+
+	/* struct v4l2_av1_global_motion global_motion */
+	json_object *global_motion_obj;
+	if (!json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "v4l2_av1_global_motion", &global_motion_obj))
+		return p;
+	void *global_motion_ptr = (void *) retrace_v4l2_av1_global_motion_gen(global_motion_obj);
+	p->global_motion = *static_cast<struct v4l2_av1_global_motion*>(global_motion_ptr);
+	free(global_motion_ptr);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_av1_frame_flag_def);
+
+	json_object *frame_type_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "frame_type", &frame_type_obj))
+		p->frame_type = (v4l2_av1_frame_type) json_object_get_int(frame_type_obj);
+
+	json_object *order_hint_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "order_hint", &order_hint_obj))
+		p->order_hint = (__u32) json_object_get_int64(order_hint_obj);
+
+	json_object *upscaled_width_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "upscaled_width", &upscaled_width_obj))
+		p->upscaled_width = (__u32) json_object_get_int64(upscaled_width_obj);
+
+	json_object *interpolation_filter_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "interpolation_filter", &interpolation_filter_obj))
+		p->interpolation_filter = (v4l2_av1_interpolation_filter) json_object_get_int(interpolation_filter_obj);
+
+	json_object *tx_mode_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "tx_mode", &tx_mode_obj))
+		p->tx_mode = (v4l2_av1_tx_mode) json_object_get_int(tx_mode_obj);
+
+	json_object *frame_width_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "frame_width_minus_1", &frame_width_minus_1_obj))
+		p->frame_width_minus_1 = (__u32) json_object_get_int64(frame_width_minus_1_obj);
+
+	json_object *frame_height_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "frame_height_minus_1", &frame_height_minus_1_obj))
+		p->frame_height_minus_1 = (__u32) json_object_get_int64(frame_height_minus_1_obj);
+
+	json_object *render_width_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "render_width_minus_1", &render_width_minus_1_obj))
+		p->render_width_minus_1 = (__u16) json_object_get_int(render_width_minus_1_obj);
+
+	json_object *render_height_minus_1_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "render_height_minus_1", &render_height_minus_1_obj))
+		p->render_height_minus_1 = (__u16) json_object_get_int(render_height_minus_1_obj);
+
+	json_object *current_frame_id_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "current_frame_id", &current_frame_id_obj))
+		p->current_frame_id = (__u32) json_object_get_int64(current_frame_id_obj);
+
+	/* __u32 buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS] */
+	json_object *buffer_removal_time_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "buffer_removal_time", &buffer_removal_time_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_OPERATING_POINTS; i++) {
+			if (json_object_array_get_idx(buffer_removal_time_obj, i))
+				p->buffer_removal_time[i] = (__u32) json_object_get_int64(json_object_array_get_idx(buffer_removal_time_obj, i));
+		}
+	}
+
+	/* __u32 order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *order_hints_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "order_hints", &order_hints_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+			if (json_object_array_get_idx(order_hints_obj, i))
+				p->order_hints[i] = (__u32) json_object_get_int64(json_object_array_get_idx(order_hints_obj, i));
+		}
+	}
+
+	/* __u64 reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *reference_frame_ts_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "reference_frame_ts", &reference_frame_ts_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+			if (json_object_array_get_idx(reference_frame_ts_obj, i))
+				p->reference_frame_ts[i] = (__u64) json_object_get_uint64(json_object_array_get_idx(reference_frame_ts_obj, i));
+		}
+	}
+
+	/* __s8 ref_frame_idx[V4L2_AV1_REFS_PER_FRAME] */
+	json_object *ref_frame_idx_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "ref_frame_idx", &ref_frame_idx_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_REFS_PER_FRAME; i++) {
+			if (json_object_array_get_idx(ref_frame_idx_obj, i))
+				p->ref_frame_idx[i] = (__s8) json_object_get_int(json_object_array_get_idx(ref_frame_idx_obj, i));
+		}
+	}
+
+	json_object *refresh_frame_flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_frame_obj, "refresh_frame_flags", &refresh_frame_flags_obj))
+		p->refresh_frame_flags = (__u8) s2flags(json_object_get_string(refresh_frame_flags_obj), v4l2_av1_frame_flag_def);
+
+	return p;
+}
+
+struct v4l2_ctrl_av1_film_grain *retrace_v4l2_ctrl_av1_film_grain_gen(json_object *ctrl_obj)
+{
+	struct v4l2_ctrl_av1_film_grain *p = (struct v4l2_ctrl_av1_film_grain *) calloc(1, sizeof(v4l2_ctrl_av1_film_grain));
+	json_object *v4l2_ctrl_av1_film_grain_obj;
+	if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_av1_film_grain", &v4l2_ctrl_av1_film_grain_obj))
+		v4l2_ctrl_av1_film_grain_obj = ctrl_obj;
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_av1_film_grain_flag_def);
+
+	json_object *cr_mult_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "cr_mult", &cr_mult_obj))
+		p->cr_mult = (__u8) json_object_get_int(cr_mult_obj);
+
+	json_object *grain_seed_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "grain_seed", &grain_seed_obj))
+		p->grain_seed = (__u16) json_object_get_int(grain_seed_obj);
+
+	json_object *film_grain_params_ref_idx_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "film_grain_params_ref_idx", &film_grain_params_ref_idx_obj))
+		p->film_grain_params_ref_idx = (__u8) json_object_get_int(film_grain_params_ref_idx_obj);
+
+	json_object *num_y_points_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "num_y_points", &num_y_points_obj))
+		p->num_y_points = (__u8) json_object_get_int(num_y_points_obj);
+
+	/* __u8 point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS] */
+	json_object *point_y_value_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "point_y_value", &point_y_value_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_NUM_Y_POINTS; i++) {
+			if (json_object_array_get_idx(point_y_value_obj, i))
+				p->point_y_value[i] = (__u8) json_object_get_int(json_object_array_get_idx(point_y_value_obj, i));
+		}
+	}
+
+	/* __u8 point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS] */
+	json_object *point_y_scaling_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "point_y_scaling", &point_y_scaling_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_NUM_Y_POINTS; i++) {
+			if (json_object_array_get_idx(point_y_scaling_obj, i))
+				p->point_y_scaling[i] = (__u8) json_object_get_int(json_object_array_get_idx(point_y_scaling_obj, i));
+		}
+	}
+
+	json_object *num_cb_points_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "num_cb_points", &num_cb_points_obj))
+		p->num_cb_points = (__u8) json_object_get_int(num_cb_points_obj);
+
+	/* __u8 point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS] */
+	json_object *point_cb_value_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "point_cb_value", &point_cb_value_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CB_POINTS; i++) {
+			if (json_object_array_get_idx(point_cb_value_obj, i))
+				p->point_cb_value[i] = (__u8) json_object_get_int(json_object_array_get_idx(point_cb_value_obj, i));
+		}
+	}
+
+	/* __u8 point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS] */
+	json_object *point_cb_scaling_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "point_cb_scaling", &point_cb_scaling_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CB_POINTS; i++) {
+			if (json_object_array_get_idx(point_cb_scaling_obj, i))
+				p->point_cb_scaling[i] = (__u8) json_object_get_int(json_object_array_get_idx(point_cb_scaling_obj, i));
+		}
+	}
+
+	json_object *num_cr_points_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "num_cr_points", &num_cr_points_obj))
+		p->num_cr_points = (__u8) json_object_get_int(num_cr_points_obj);
+
+	/* __u8 point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS] */
+	json_object *point_cr_value_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "point_cr_value", &point_cr_value_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CR_POINTS; i++) {
+			if (json_object_array_get_idx(point_cr_value_obj, i))
+				p->point_cr_value[i] = (__u8) json_object_get_int(json_object_array_get_idx(point_cr_value_obj, i));
+		}
+	}
+
+	/* __u8 point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS] */
+	json_object *point_cr_scaling_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "point_cr_scaling", &point_cr_scaling_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CR_POINTS; i++) {
+			if (json_object_array_get_idx(point_cr_scaling_obj, i))
+				p->point_cr_scaling[i] = (__u8) json_object_get_int(json_object_array_get_idx(point_cr_scaling_obj, i));
+		}
+	}
+
+	json_object *grain_scaling_minus_8_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "grain_scaling_minus_8", &grain_scaling_minus_8_obj))
+		p->grain_scaling_minus_8 = (__u8) json_object_get_int(grain_scaling_minus_8_obj);
+
+	json_object *ar_coeff_lag_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "ar_coeff_lag", &ar_coeff_lag_obj))
+		p->ar_coeff_lag = (__u8) json_object_get_int(ar_coeff_lag_obj);
+
+	/* __u8 ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE] */
+	json_object *ar_coeffs_y_plus_128_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "ar_coeffs_y_plus_128", &ar_coeffs_y_plus_128_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_AR_COEFFS_SIZE; i++) {
+			if (json_object_array_get_idx(ar_coeffs_y_plus_128_obj, i))
+				p->ar_coeffs_y_plus_128[i] = (__u8) json_object_get_int(json_object_array_get_idx(ar_coeffs_y_plus_128_obj, i));
+		}
+	}
+
+	/* __u8 ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE] */
+	json_object *ar_coeffs_cb_plus_128_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "ar_coeffs_cb_plus_128", &ar_coeffs_cb_plus_128_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_AR_COEFFS_SIZE; i++) {
+			if (json_object_array_get_idx(ar_coeffs_cb_plus_128_obj, i))
+				p->ar_coeffs_cb_plus_128[i] = (__u8) json_object_get_int(json_object_array_get_idx(ar_coeffs_cb_plus_128_obj, i));
+		}
+	}
+
+	/* __u8 ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE] */
+	json_object *ar_coeffs_cr_plus_128_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "ar_coeffs_cr_plus_128", &ar_coeffs_cr_plus_128_obj)) {
+		for (size_t i = 0; i < V4L2_AV1_AR_COEFFS_SIZE; i++) {
+			if (json_object_array_get_idx(ar_coeffs_cr_plus_128_obj, i))
+				p->ar_coeffs_cr_plus_128[i] = (__u8) json_object_get_int(json_object_array_get_idx(ar_coeffs_cr_plus_128_obj, i));
+		}
+	}
+
+	json_object *ar_coeff_shift_minus_6_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "ar_coeff_shift_minus_6", &ar_coeff_shift_minus_6_obj))
+		p->ar_coeff_shift_minus_6 = (__u8) json_object_get_int(ar_coeff_shift_minus_6_obj);
+
+	json_object *grain_scale_shift_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "grain_scale_shift", &grain_scale_shift_obj))
+		p->grain_scale_shift = (__u8) json_object_get_int(grain_scale_shift_obj);
+
+	json_object *cb_mult_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "cb_mult", &cb_mult_obj))
+		p->cb_mult = (__u8) json_object_get_int(cb_mult_obj);
+
+	json_object *cb_luma_mult_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "cb_luma_mult", &cb_luma_mult_obj))
+		p->cb_luma_mult = (__u8) json_object_get_int(cb_luma_mult_obj);
+
+	json_object *cr_luma_mult_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "cr_luma_mult", &cr_luma_mult_obj))
+		p->cr_luma_mult = (__u8) json_object_get_int(cr_luma_mult_obj);
+
+	json_object *cb_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "cb_offset", &cb_offset_obj))
+		p->cb_offset = (__u16) json_object_get_int(cb_offset_obj);
+
+	json_object *cr_offset_obj;
+	if (json_object_object_get_ex(v4l2_ctrl_av1_film_grain_obj, "cr_offset", &cr_offset_obj))
+		p->cr_offset = (__u16) json_object_get_int(cr_offset_obj);
+
+	return p;
+}
+
+struct v4l2_rect *retrace_v4l2_rect_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_rect *p = (struct v4l2_rect *) calloc(1, sizeof(v4l2_rect));
+
+	json_object *v4l2_rect_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_rect", &v4l2_rect_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_rect_obj);
+
+	json_object *left_obj;
+	if (json_object_object_get_ex(v4l2_rect_obj, "left", &left_obj))
+		p->left = (__s32) json_object_get_int(left_obj);
+
+	json_object *top_obj;
+	if (json_object_object_get_ex(v4l2_rect_obj, "top", &top_obj))
+		p->top = (__s32) json_object_get_int(top_obj);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_rect_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_rect_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	return p;
+}
+struct v4l2_fract *retrace_v4l2_fract_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_fract *p = (struct v4l2_fract *) calloc(1, sizeof(v4l2_fract));
+
+	json_object *v4l2_fract_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_fract", &v4l2_fract_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_fract_obj);
+
+	json_object *numerator_obj;
+	if (json_object_object_get_ex(v4l2_fract_obj, "numerator", &numerator_obj))
+		p->numerator = (__u32) json_object_get_int64(numerator_obj);
+
+	json_object *denominator_obj;
+	if (json_object_object_get_ex(v4l2_fract_obj, "denominator", &denominator_obj))
+		p->denominator = (__u32) json_object_get_int64(denominator_obj);
+
+	return p;
+}
+struct v4l2_area *retrace_v4l2_area_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_area *p = (struct v4l2_area *) calloc(1, sizeof(v4l2_area));
+
+	json_object *v4l2_area_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_area", &v4l2_area_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_area_obj);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_area_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_area_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	return p;
+}
+struct v4l2_capability *retrace_v4l2_capability_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_capability *p = (struct v4l2_capability *) calloc(1, sizeof(v4l2_capability));
+
+	json_object *v4l2_capability_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_capability", &v4l2_capability_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_capability_obj);
+
+	json_object *driver_obj;
+	if (json_object_object_get_ex(v4l2_capability_obj, "driver", &driver_obj))
+		if (json_object_get_string(driver_obj) != nullptr)
+			memcpy(p->driver, json_object_get_string(driver_obj), 16);
+
+	json_object *card_obj;
+	if (json_object_object_get_ex(v4l2_capability_obj, "card", &card_obj))
+		if (json_object_get_string(card_obj) != nullptr)
+			memcpy(p->card, json_object_get_string(card_obj), 32);
+
+	json_object *bus_info_obj;
+	if (json_object_object_get_ex(v4l2_capability_obj, "bus_info", &bus_info_obj))
+		if (json_object_get_string(bus_info_obj) != nullptr)
+			memcpy(p->bus_info, json_object_get_string(bus_info_obj), 32);
+
+	json_object *version_obj;
+	if (json_object_object_get_ex(v4l2_capability_obj, "version", &version_obj))
+		memset(&p->version, 0, sizeof(p->version));
+
+	json_object *capabilities_obj;
+	if (json_object_object_get_ex(v4l2_capability_obj, "capabilities", &capabilities_obj))
+		p->capabilities = (__u32) s2flags(json_object_get_string(capabilities_obj), v4l2_cap_flag_def);
+
+	json_object *device_caps_obj;
+	if (json_object_object_get_ex(v4l2_capability_obj, "device_caps", &device_caps_obj))
+		p->device_caps = (__u32) s2flags(json_object_get_string(device_caps_obj), v4l2_cap_flag_def);
+
+	return p;
+}
+struct v4l2_pix_format *retrace_v4l2_pix_format_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_pix_format *p = (struct v4l2_pix_format *) calloc(1, sizeof(v4l2_pix_format));
+
+	json_object *v4l2_pix_format_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_pix_format", &v4l2_pix_format_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_pix_format_obj);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	json_object *pixelformat_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "pixelformat", &pixelformat_obj))
+		p->pixelformat = (__u32) s2val(json_object_get_string(pixelformat_obj), v4l2_pix_fmt_val_def);
+	json_object *field_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "field", &field_obj))
+		p->field = (__u32) s2val(json_object_get_string(field_obj), v4l2_field_val_def);
+	json_object *bytesperline_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "bytesperline", &bytesperline_obj))
+		p->bytesperline = (__u32) json_object_get_int64(bytesperline_obj);
+
+	json_object *sizeimage_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "sizeimage", &sizeimage_obj))
+		p->sizeimage = (__u32) json_object_get_int64(sizeimage_obj);
+
+	json_object *colorspace_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "colorspace", &colorspace_obj))
+		p->colorspace = (__u32) s2val(json_object_get_string(colorspace_obj), v4l2_colorspace_val_def);
+	json_object *priv_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "priv", &priv_obj)) {
+		if (json_object_get_string(priv_obj) == nullptr)
+			return p;
+		std::string priv_str = json_object_get_string(priv_obj);
+		if (!priv_str.empty())
+			p->priv = V4L2_PIX_FMT_PRIV_MAGIC;
+	}
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_pix_fmt_flag_def);
+
+	//union
+	json_object *ycbcr_enc_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "ycbcr_enc", &ycbcr_enc_obj))
+		p->ycbcr_enc = (__u32) s2val(json_object_get_string(ycbcr_enc_obj), v4l2_ycbcr_encoding_val_def);
+	json_object *hsv_enc_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "hsv_enc", &hsv_enc_obj))
+		p->hsv_enc = (__u32) json_object_get_int64(hsv_enc_obj);
+
+	//end of union 	};
+	json_object *quantization_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "quantization", &quantization_obj))
+		p->quantization = (__u32) s2val(json_object_get_string(quantization_obj), v4l2_quantization_val_def);
+	json_object *xfer_func_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_obj, "xfer_func", &xfer_func_obj))
+		p->xfer_func = (__u32) s2val(json_object_get_string(xfer_func_obj), v4l2_xfer_func_val_def);
+	return p;
+}
+struct v4l2_fmtdesc *retrace_v4l2_fmtdesc_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_fmtdesc *p = (struct v4l2_fmtdesc *) calloc(1, sizeof(v4l2_fmtdesc));
+
+	json_object *v4l2_fmtdesc_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_fmtdesc", &v4l2_fmtdesc_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_fmtdesc_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_fmtdesc_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_fmtdesc_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_fmtdesc_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_fmt_flag_def);
+
+	json_object *description_obj;
+	if (json_object_object_get_ex(v4l2_fmtdesc_obj, "description", &description_obj))
+		if (json_object_get_string(description_obj) != nullptr)
+			memcpy(p->description, json_object_get_string(description_obj), 32);
+
+	json_object *pixelformat_obj;
+	if (json_object_object_get_ex(v4l2_fmtdesc_obj, "pixelformat", &pixelformat_obj))
+		p->pixelformat = (__u32) s2val(json_object_get_string(pixelformat_obj), v4l2_pix_fmt_val_def);
+	json_object *mbus_code_obj;
+	if (json_object_object_get_ex(v4l2_fmtdesc_obj, "mbus_code", &mbus_code_obj))
+		p->mbus_code = (__u32) json_object_get_int64(mbus_code_obj);
+
+	return p;
+}
+struct v4l2_frmsize_discrete *retrace_v4l2_frmsize_discrete_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_frmsize_discrete *p = (struct v4l2_frmsize_discrete *) calloc(1, sizeof(v4l2_frmsize_discrete));
+
+	json_object *v4l2_frmsize_discrete_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_frmsize_discrete", &v4l2_frmsize_discrete_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_frmsize_discrete_obj);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_discrete_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_discrete_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	return p;
+}
+struct v4l2_frmsize_stepwise *retrace_v4l2_frmsize_stepwise_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_frmsize_stepwise *p = (struct v4l2_frmsize_stepwise *) calloc(1, sizeof(v4l2_frmsize_stepwise));
+
+	json_object *v4l2_frmsize_stepwise_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_frmsize_stepwise", &v4l2_frmsize_stepwise_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_frmsize_stepwise_obj);
+
+	json_object *min_width_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_stepwise_obj, "min_width", &min_width_obj))
+		p->min_width = (__u32) json_object_get_int64(min_width_obj);
+
+	json_object *max_width_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_stepwise_obj, "max_width", &max_width_obj))
+		p->max_width = (__u32) json_object_get_int64(max_width_obj);
+
+	json_object *step_width_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_stepwise_obj, "step_width", &step_width_obj))
+		p->step_width = (__u32) json_object_get_int64(step_width_obj);
+
+	json_object *min_height_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_stepwise_obj, "min_height", &min_height_obj))
+		p->min_height = (__u32) json_object_get_int64(min_height_obj);
+
+	json_object *max_height_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_stepwise_obj, "max_height", &max_height_obj))
+		p->max_height = (__u32) json_object_get_int64(max_height_obj);
+
+	json_object *step_height_obj;
+	if (json_object_object_get_ex(v4l2_frmsize_stepwise_obj, "step_height", &step_height_obj))
+		p->step_height = (__u32) json_object_get_int64(step_height_obj);
+
+	return p;
+}
+struct v4l2_frmsizeenum *retrace_v4l2_frmsizeenum_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_frmsizeenum *p = (struct v4l2_frmsizeenum *) calloc(1, sizeof(v4l2_frmsizeenum));
+
+	json_object *v4l2_frmsizeenum_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_frmsizeenum", &v4l2_frmsizeenum_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_frmsizeenum_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_frmsizeenum_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *pixel_format_obj;
+	if (json_object_object_get_ex(v4l2_frmsizeenum_obj, "pixel_format", &pixel_format_obj))
+		p->pixel_format = (__u32) s2val(json_object_get_string(pixel_format_obj), v4l2_pix_fmt_val_def);
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_frmsizeenum_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_frmsizetypes_val_def);
+	//union
+	//struct v4l2_frmsize_discrete	discrete;
+	//struct v4l2_frmsize_stepwise	stepwise;
+	//end of union 	};
+	return p;
+}
+struct v4l2_frmival_stepwise *retrace_v4l2_frmival_stepwise_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_frmival_stepwise *p = (struct v4l2_frmival_stepwise *) calloc(1, sizeof(v4l2_frmival_stepwise));
+
+	json_object *v4l2_frmival_stepwise_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_frmival_stepwise", &v4l2_frmival_stepwise_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_frmival_stepwise_obj);
+
+	//struct v4l2_fract	min;
+	void *min_ptr = (void *) retrace_v4l2_fract_gen(v4l2_frmival_stepwise_obj, "min");
+	p->min = *static_cast<struct v4l2_fract*>(min_ptr);
+	free(min_ptr);
+
+	//struct v4l2_fract	max;
+	void *max_ptr = (void *) retrace_v4l2_fract_gen(v4l2_frmival_stepwise_obj, "max");
+	p->max = *static_cast<struct v4l2_fract*>(max_ptr);
+	free(max_ptr);
+
+	//struct v4l2_fract	step;
+	void *step_ptr = (void *) retrace_v4l2_fract_gen(v4l2_frmival_stepwise_obj, "step");
+	p->step = *static_cast<struct v4l2_fract*>(step_ptr);
+	free(step_ptr);
+
+	return p;
+}
+struct v4l2_frmivalenum *retrace_v4l2_frmivalenum_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_frmivalenum *p = (struct v4l2_frmivalenum *) calloc(1, sizeof(v4l2_frmivalenum));
+
+	json_object *v4l2_frmivalenum_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_frmivalenum", &v4l2_frmivalenum_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_frmivalenum_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_frmivalenum_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *pixel_format_obj;
+	if (json_object_object_get_ex(v4l2_frmivalenum_obj, "pixel_format", &pixel_format_obj))
+		p->pixel_format = (__u32) s2val(json_object_get_string(pixel_format_obj), v4l2_pix_fmt_val_def);
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_frmivalenum_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_frmivalenum_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_frmivalenum_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_frmivaltypes_val_def);
+	//union
+	//struct v4l2_fract		discrete;
+	//struct v4l2_frmival_stepwise	stepwise;
+	//end of union 	};
+	return p;
+}
+struct v4l2_timecode *retrace_v4l2_timecode_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_timecode *p = (struct v4l2_timecode *) calloc(1, sizeof(v4l2_timecode));
+
+	json_object *v4l2_timecode_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_timecode", &v4l2_timecode_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_timecode_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_timecode_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_timecode_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	json_object *frames_obj;
+	if (json_object_object_get_ex(v4l2_timecode_obj, "frames", &frames_obj))
+		p->frames = (__u8) json_object_get_int(frames_obj);
+
+	json_object *seconds_obj;
+	if (json_object_object_get_ex(v4l2_timecode_obj, "seconds", &seconds_obj))
+		p->seconds = (__u8) json_object_get_int(seconds_obj);
+
+	json_object *minutes_obj;
+	if (json_object_object_get_ex(v4l2_timecode_obj, "minutes", &minutes_obj))
+		p->minutes = (__u8) json_object_get_int(minutes_obj);
+
+	json_object *hours_obj;
+	if (json_object_object_get_ex(v4l2_timecode_obj, "hours", &hours_obj))
+		p->hours = (__u8) json_object_get_int(hours_obj);
+
+	json_object *userbits_obj;
+	if (json_object_object_get_ex(v4l2_timecode_obj, "userbits", &userbits_obj))
+		if (json_object_get_string(userbits_obj) != nullptr)
+			memcpy(p->userbits, json_object_get_string(userbits_obj), 4);
+
+	return p;
+}
+struct v4l2_jpegcompression *retrace_v4l2_jpegcompression_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_jpegcompression *p = (struct v4l2_jpegcompression *) calloc(1, sizeof(v4l2_jpegcompression));
+
+	json_object *v4l2_jpegcompression_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_jpegcompression", &v4l2_jpegcompression_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_jpegcompression_obj);
+
+	json_object *quality_obj;
+	if (json_object_object_get_ex(v4l2_jpegcompression_obj, "quality", &quality_obj))
+		p->quality = (int) json_object_get_int(quality_obj);
+
+	json_object *APPn_obj;
+	if (json_object_object_get_ex(v4l2_jpegcompression_obj, "APPn", &APPn_obj))
+		p->APPn = (int) json_object_get_int(APPn_obj);
+
+	json_object *APP_len_obj;
+	if (json_object_object_get_ex(v4l2_jpegcompression_obj, "APP_len", &APP_len_obj))
+		p->APP_len = (int) json_object_get_int(APP_len_obj);
+
+	json_object *APP_data_obj;
+	if (json_object_object_get_ex(v4l2_jpegcompression_obj, "APP_data", &APP_data_obj))
+		if (json_object_get_string(APP_data_obj) != nullptr)
+			memcpy(p->APP_data, json_object_get_string(APP_data_obj), 60);
+
+	json_object *COM_len_obj;
+	if (json_object_object_get_ex(v4l2_jpegcompression_obj, "COM_len", &COM_len_obj))
+		p->COM_len = (int) json_object_get_int(COM_len_obj);
+
+	json_object *COM_data_obj;
+	if (json_object_object_get_ex(v4l2_jpegcompression_obj, "COM_data", &COM_data_obj))
+		if (json_object_get_string(COM_data_obj) != nullptr)
+			memcpy(p->COM_data, json_object_get_string(COM_data_obj), 60);
+
+	json_object *jpeg_markers_obj;
+	if (json_object_object_get_ex(v4l2_jpegcompression_obj, "jpeg_markers", &jpeg_markers_obj))
+		p->jpeg_markers = (__u32) json_object_get_int64(jpeg_markers_obj);
+
+	return p;
+}
+struct v4l2_requestbuffers *retrace_v4l2_requestbuffers_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_requestbuffers *p = (struct v4l2_requestbuffers *) calloc(1, sizeof(v4l2_requestbuffers));
+
+	json_object *v4l2_requestbuffers_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_requestbuffers", &v4l2_requestbuffers_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_requestbuffers_obj);
+
+	json_object *count_obj;
+	if (json_object_object_get_ex(v4l2_requestbuffers_obj, "count", &count_obj))
+		p->count = (__u32) json_object_get_int64(count_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_requestbuffers_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	json_object *memory_obj;
+	if (json_object_object_get_ex(v4l2_requestbuffers_obj, "memory", &memory_obj))
+		p->memory = (__u32) s2val(json_object_get_string(memory_obj), v4l2_memory_val_def);
+	json_object *capabilities_obj;
+	if (json_object_object_get_ex(v4l2_requestbuffers_obj, "capabilities", &capabilities_obj))
+		p->capabilities = (__u32) s2flags(json_object_get_string(capabilities_obj), v4l2_buf_cap_flag_def);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_requestbuffers_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_memory_flag_def);
+
+	return p;
+}
+struct v4l2_plane *retrace_v4l2_plane_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_plane *p = (struct v4l2_plane *) calloc(1, sizeof(v4l2_plane));
+
+	json_object *v4l2_plane_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_plane", &v4l2_plane_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_plane_obj);
+
+	json_object *bytesused_obj;
+	if (json_object_object_get_ex(v4l2_plane_obj, "bytesused", &bytesused_obj))
+		p->bytesused = (__u32) json_object_get_int64(bytesused_obj);
+
+	json_object *length_obj;
+	if (json_object_object_get_ex(v4l2_plane_obj, "length", &length_obj))
+		p->length = (__u32) json_object_get_int64(length_obj);
+
+	//union
+	//__u32		mem_offset;
+	//unsigned long	userptr;
+	//__s32		fd;
+	//end of union 	} m;
+	json_object *data_offset_obj;
+	if (json_object_object_get_ex(v4l2_plane_obj, "data_offset", &data_offset_obj))
+		p->data_offset = (__u32) json_object_get_int64(data_offset_obj);
+
+	return p;
+}
+struct v4l2_buffer *retrace_v4l2_buffer_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_buffer *p = (struct v4l2_buffer *) calloc(1, sizeof(v4l2_buffer));
+
+	json_object *v4l2_buffer_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_buffer", &v4l2_buffer_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_buffer_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	json_object *bytesused_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "bytesused", &bytesused_obj))
+		p->bytesused = (__u32) json_object_get_int64(bytesused_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags_buffer(json_object_get_string(flags_obj));
+
+	json_object *field_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "field", &field_obj))
+		p->field = (__u32) s2val(json_object_get_string(field_obj), v4l2_field_val_def);
+	//struct timeval		timestamp;
+	//struct v4l2_timecode	timecode;
+	void *timecode_ptr = (void *) retrace_v4l2_timecode_gen(v4l2_buffer_obj, "timecode");
+	p->timecode = *static_cast<struct v4l2_timecode*>(timecode_ptr);
+	free(timecode_ptr);
+
+	json_object *sequence_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "sequence", &sequence_obj))
+		p->sequence = (__u32) json_object_get_int64(sequence_obj);
+
+	json_object *memory_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "memory", &memory_obj))
+		p->memory = (__u32) s2val(json_object_get_string(memory_obj), v4l2_memory_val_def);
+	//union
+	//__u32           offset;
+	//unsigned long   userptr;
+	//struct v4l2_plane *planes;
+	//__s32		fd;
+	//end of union 	} m;
+	json_object *length_obj;
+	if (json_object_object_get_ex(v4l2_buffer_obj, "length", &length_obj))
+		p->length = (__u32) json_object_get_int64(length_obj);
+
+	//union
+	//__s32		request_fd;
+	//end of union 	};
+	return p;
+}
+struct v4l2_exportbuffer *retrace_v4l2_exportbuffer_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_exportbuffer *p = (struct v4l2_exportbuffer *) calloc(1, sizeof(v4l2_exportbuffer));
+
+	json_object *v4l2_exportbuffer_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_exportbuffer", &v4l2_exportbuffer_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_exportbuffer_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_exportbuffer_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_exportbuffer_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *plane_obj;
+	if (json_object_object_get_ex(v4l2_exportbuffer_obj, "plane", &plane_obj))
+		p->plane = (__u32) json_object_get_int64(plane_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_exportbuffer_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	json_object *fd_obj;
+	if (json_object_object_get_ex(v4l2_exportbuffer_obj, "fd", &fd_obj))
+		p->fd = (__s32) json_object_get_int(fd_obj);
+
+	return p;
+}
+struct v4l2_framebuffer *retrace_v4l2_framebuffer_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_framebuffer *p = (struct v4l2_framebuffer *) calloc(1, sizeof(v4l2_framebuffer));
+
+	json_object *v4l2_framebuffer_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_framebuffer", &v4l2_framebuffer_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_framebuffer_obj);
+
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_framebuffer_obj, "capability", &capability_obj))
+		p->capability = (__u32) json_object_get_int64(capability_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_framebuffer_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	//void                    *base;
+	//struct {
+	//__u32		width;
+	//__u32		height;
+	//__u32		pixelformat;
+	//__u32		field;
+	//__u32		bytesperline;
+	//__u32		sizeimage;
+	//__u32		colorspace;
+	//__u32		priv;
+	//end of struct 	} fmt;
+	return p;
+}
+struct v4l2_clip *retrace_v4l2_clip_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_clip *p = (struct v4l2_clip *) calloc(1, sizeof(v4l2_clip));
+
+	json_object *v4l2_clip_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_clip", &v4l2_clip_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_clip_obj);
+
+	//struct v4l2_rect        c;
+	void *c_ptr = (void *) retrace_v4l2_rect_gen(v4l2_clip_obj, "c");
+	p->c = *static_cast<struct v4l2_rect*>(c_ptr);
+	free(c_ptr);
+
+	//struct v4l2_clip	*next;
+	return p;
+}
+struct v4l2_window *retrace_v4l2_window_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_window *p = (struct v4l2_window *) calloc(1, sizeof(v4l2_window));
+
+	json_object *v4l2_window_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_window", &v4l2_window_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_window_obj);
+
+	//struct v4l2_rect        w;
+	void *w_ptr = (void *) retrace_v4l2_rect_gen(v4l2_window_obj, "w");
+	p->w = *static_cast<struct v4l2_rect*>(w_ptr);
+	free(w_ptr);
+
+	json_object *field_obj;
+	if (json_object_object_get_ex(v4l2_window_obj, "field", &field_obj))
+		p->field = (__u32) s2val(json_object_get_string(field_obj), v4l2_field_val_def);
+	json_object *chromakey_obj;
+	if (json_object_object_get_ex(v4l2_window_obj, "chromakey", &chromakey_obj))
+		p->chromakey = (__u32) json_object_get_int64(chromakey_obj);
+
+	//struct v4l2_clip	*clips;
+	json_object *clipcount_obj;
+	if (json_object_object_get_ex(v4l2_window_obj, "clipcount", &clipcount_obj))
+		p->clipcount = (__u32) json_object_get_int64(clipcount_obj);
+
+	//void			*bitmap;
+	json_object *global_alpha_obj;
+	if (json_object_object_get_ex(v4l2_window_obj, "global_alpha", &global_alpha_obj))
+		p->global_alpha = (__u8) json_object_get_int(global_alpha_obj);
+
+	return p;
+}
+struct v4l2_captureparm *retrace_v4l2_captureparm_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_captureparm *p = (struct v4l2_captureparm *) calloc(1, sizeof(v4l2_captureparm));
+
+	json_object *v4l2_captureparm_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_captureparm", &v4l2_captureparm_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_captureparm_obj);
+
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_captureparm_obj, "capability", &capability_obj))
+		p->capability = (__u32) s2val(json_object_get_string(capability_obj), streamparm_val_def);
+	json_object *capturemode_obj;
+	if (json_object_object_get_ex(v4l2_captureparm_obj, "capturemode", &capturemode_obj))
+		p->capturemode = (__u32) s2val(json_object_get_string(capturemode_obj), streamparm_val_def);
+	//struct v4l2_fract  timeperframe;
+	void *timeperframe_ptr = (void *) retrace_v4l2_fract_gen(v4l2_captureparm_obj, "timeperframe");
+	p->timeperframe = *static_cast<struct v4l2_fract*>(timeperframe_ptr);
+	free(timeperframe_ptr);
+
+	json_object *extendedmode_obj;
+	if (json_object_object_get_ex(v4l2_captureparm_obj, "extendedmode", &extendedmode_obj))
+		p->extendedmode = (__u32) json_object_get_int64(extendedmode_obj);
+
+	json_object *readbuffers_obj;
+	if (json_object_object_get_ex(v4l2_captureparm_obj, "readbuffers", &readbuffers_obj))
+		p->readbuffers = (__u32) json_object_get_int64(readbuffers_obj);
+
+	return p;
+}
+struct v4l2_outputparm *retrace_v4l2_outputparm_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_outputparm *p = (struct v4l2_outputparm *) calloc(1, sizeof(v4l2_outputparm));
+
+	json_object *v4l2_outputparm_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_outputparm", &v4l2_outputparm_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_outputparm_obj);
+
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_outputparm_obj, "capability", &capability_obj))
+		p->capability = (__u32) s2val(json_object_get_string(capability_obj), streamparm_val_def);
+	json_object *outputmode_obj;
+	if (json_object_object_get_ex(v4l2_outputparm_obj, "outputmode", &outputmode_obj))
+		p->outputmode = (__u32) s2val(json_object_get_string(outputmode_obj), streamparm_val_def);
+	//struct v4l2_fract  timeperframe;
+	void *timeperframe_ptr = (void *) retrace_v4l2_fract_gen(v4l2_outputparm_obj, "timeperframe");
+	p->timeperframe = *static_cast<struct v4l2_fract*>(timeperframe_ptr);
+	free(timeperframe_ptr);
+
+	json_object *extendedmode_obj;
+	if (json_object_object_get_ex(v4l2_outputparm_obj, "extendedmode", &extendedmode_obj))
+		p->extendedmode = (__u32) json_object_get_int64(extendedmode_obj);
+
+	json_object *writebuffers_obj;
+	if (json_object_object_get_ex(v4l2_outputparm_obj, "writebuffers", &writebuffers_obj))
+		p->writebuffers = (__u32) json_object_get_int64(writebuffers_obj);
+
+	return p;
+}
+struct v4l2_cropcap *retrace_v4l2_cropcap_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_cropcap *p = (struct v4l2_cropcap *) calloc(1, sizeof(v4l2_cropcap));
+
+	json_object *v4l2_cropcap_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_cropcap", &v4l2_cropcap_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_cropcap_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_cropcap_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	//struct v4l2_rect        bounds;
+	void *bounds_ptr = (void *) retrace_v4l2_rect_gen(v4l2_cropcap_obj, "bounds");
+	p->bounds = *static_cast<struct v4l2_rect*>(bounds_ptr);
+	free(bounds_ptr);
+
+	//struct v4l2_rect        defrect;
+	void *defrect_ptr = (void *) retrace_v4l2_rect_gen(v4l2_cropcap_obj, "defrect");
+	p->defrect = *static_cast<struct v4l2_rect*>(defrect_ptr);
+	free(defrect_ptr);
+
+	//struct v4l2_fract       pixelaspect;
+	void *pixelaspect_ptr = (void *) retrace_v4l2_fract_gen(v4l2_cropcap_obj, "pixelaspect");
+	p->pixelaspect = *static_cast<struct v4l2_fract*>(pixelaspect_ptr);
+	free(pixelaspect_ptr);
+
+	return p;
+}
+struct v4l2_crop *retrace_v4l2_crop_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_crop *p = (struct v4l2_crop *) calloc(1, sizeof(v4l2_crop));
+
+	json_object *v4l2_crop_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_crop", &v4l2_crop_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_crop_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_crop_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	//struct v4l2_rect        c;
+	void *c_ptr = (void *) retrace_v4l2_rect_gen(v4l2_crop_obj, "c");
+	p->c = *static_cast<struct v4l2_rect*>(c_ptr);
+	free(c_ptr);
+
+	return p;
+}
+struct v4l2_selection *retrace_v4l2_selection_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_selection *p = (struct v4l2_selection *) calloc(1, sizeof(v4l2_selection));
+
+	json_object *v4l2_selection_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_selection", &v4l2_selection_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_selection_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_selection_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	json_object *target_obj;
+	if (json_object_object_get_ex(v4l2_selection_obj, "target", &target_obj))
+		p->target = (__u32) s2val(json_object_get_string(target_obj), selection_target_val_def);
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_selection_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_sel_flag_def);
+
+	//struct v4l2_rect        r;
+	void *r_ptr = (void *) retrace_v4l2_rect_gen(v4l2_selection_obj, "r");
+	p->r = *static_cast<struct v4l2_rect*>(r_ptr);
+	free(r_ptr);
+
+	return p;
+}
+struct v4l2_standard *retrace_v4l2_standard_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_standard *p = (struct v4l2_standard *) calloc(1, sizeof(v4l2_standard));
+
+	json_object *v4l2_standard_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_standard", &v4l2_standard_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_standard_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_standard_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_standard_obj, "id", &id_obj))
+		p->id = (v4l2_std_id) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_standard_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 24);
+
+	//struct v4l2_fract    frameperiod;
+	void *frameperiod_ptr = (void *) retrace_v4l2_fract_gen(v4l2_standard_obj, "frameperiod");
+	p->frameperiod = *static_cast<struct v4l2_fract*>(frameperiod_ptr);
+	free(frameperiod_ptr);
+
+	json_object *framelines_obj;
+	if (json_object_object_get_ex(v4l2_standard_obj, "framelines", &framelines_obj))
+		p->framelines = (__u32) json_object_get_int64(framelines_obj);
+
+	return p;
+}
+struct v4l2_bt_timings *retrace_v4l2_bt_timings_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_bt_timings *p = (struct v4l2_bt_timings *) calloc(1, sizeof(v4l2_bt_timings));
+
+	json_object *v4l2_bt_timings_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_bt_timings", &v4l2_bt_timings_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_bt_timings_obj);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	json_object *interlaced_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "interlaced", &interlaced_obj))
+		p->interlaced = (__u32) json_object_get_int64(interlaced_obj);
+
+	json_object *polarities_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "polarities", &polarities_obj))
+		p->polarities = (__u32) json_object_get_int64(polarities_obj);
+
+	json_object *pixelclock_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "pixelclock", &pixelclock_obj))
+		p->pixelclock = (__u64) json_object_get_uint64(pixelclock_obj);
+
+	json_object *hfrontporch_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "hfrontporch", &hfrontporch_obj))
+		p->hfrontporch = (__u32) json_object_get_int64(hfrontporch_obj);
+
+	json_object *hsync_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "hsync", &hsync_obj))
+		p->hsync = (__u32) json_object_get_int64(hsync_obj);
+
+	json_object *hbackporch_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "hbackporch", &hbackporch_obj))
+		p->hbackporch = (__u32) json_object_get_int64(hbackporch_obj);
+
+	json_object *vfrontporch_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "vfrontporch", &vfrontporch_obj))
+		p->vfrontporch = (__u32) json_object_get_int64(vfrontporch_obj);
+
+	json_object *vsync_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "vsync", &vsync_obj))
+		p->vsync = (__u32) json_object_get_int64(vsync_obj);
+
+	json_object *vbackporch_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "vbackporch", &vbackporch_obj))
+		p->vbackporch = (__u32) json_object_get_int64(vbackporch_obj);
+
+	json_object *il_vfrontporch_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "il_vfrontporch", &il_vfrontporch_obj))
+		p->il_vfrontporch = (__u32) json_object_get_int64(il_vfrontporch_obj);
+
+	json_object *il_vsync_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "il_vsync", &il_vsync_obj))
+		p->il_vsync = (__u32) json_object_get_int64(il_vsync_obj);
+
+	json_object *il_vbackporch_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "il_vbackporch", &il_vbackporch_obj))
+		p->il_vbackporch = (__u32) json_object_get_int64(il_vbackporch_obj);
+
+	json_object *standards_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "standards", &standards_obj))
+		p->standards = (__u32) json_object_get_int64(standards_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	//struct v4l2_fract picture_aspect;
+	void *picture_aspect_ptr = (void *) retrace_v4l2_fract_gen(v4l2_bt_timings_obj, "picture_aspect");
+	p->picture_aspect = *static_cast<struct v4l2_fract*>(picture_aspect_ptr);
+	free(picture_aspect_ptr);
+
+	json_object *cea861_vic_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "cea861_vic", &cea861_vic_obj))
+		p->cea861_vic = (__u8) json_object_get_int(cea861_vic_obj);
+
+	json_object *hdmi_vic_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_obj, "hdmi_vic", &hdmi_vic_obj))
+		p->hdmi_vic = (__u8) json_object_get_int(hdmi_vic_obj);
+
+	return p;
+}
+struct v4l2_dv_timings *retrace_v4l2_dv_timings_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_dv_timings *p = (struct v4l2_dv_timings *) calloc(1, sizeof(v4l2_dv_timings));
+
+	json_object *v4l2_dv_timings_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_dv_timings", &v4l2_dv_timings_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_dv_timings_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_dv_timings_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	//union
+	//struct v4l2_bt_timings	bt;
+	//end of union 	};
+	return p;
+}
+struct v4l2_enum_dv_timings *retrace_v4l2_enum_dv_timings_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_enum_dv_timings *p = (struct v4l2_enum_dv_timings *) calloc(1, sizeof(v4l2_enum_dv_timings));
+
+	json_object *v4l2_enum_dv_timings_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_enum_dv_timings", &v4l2_enum_dv_timings_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_enum_dv_timings_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_enum_dv_timings_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *pad_obj;
+	if (json_object_object_get_ex(v4l2_enum_dv_timings_obj, "pad", &pad_obj))
+		p->pad = (__u32) json_object_get_int64(pad_obj);
+
+	//struct v4l2_dv_timings timings;
+	void *timings_ptr = (void *) retrace_v4l2_dv_timings_gen(v4l2_enum_dv_timings_obj, "timings");
+	p->timings = *static_cast<struct v4l2_dv_timings*>(timings_ptr);
+	free(timings_ptr);
+
+	return p;
+}
+struct v4l2_bt_timings_cap *retrace_v4l2_bt_timings_cap_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_bt_timings_cap *p = (struct v4l2_bt_timings_cap *) calloc(1, sizeof(v4l2_bt_timings_cap));
+
+	json_object *v4l2_bt_timings_cap_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_bt_timings_cap", &v4l2_bt_timings_cap_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_bt_timings_cap_obj);
+
+	json_object *min_width_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "min_width", &min_width_obj))
+		p->min_width = (__u32) json_object_get_int64(min_width_obj);
+
+	json_object *max_width_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "max_width", &max_width_obj))
+		p->max_width = (__u32) json_object_get_int64(max_width_obj);
+
+	json_object *min_height_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "min_height", &min_height_obj))
+		p->min_height = (__u32) json_object_get_int64(min_height_obj);
+
+	json_object *max_height_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "max_height", &max_height_obj))
+		p->max_height = (__u32) json_object_get_int64(max_height_obj);
+
+	json_object *min_pixelclock_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "min_pixelclock", &min_pixelclock_obj))
+		p->min_pixelclock = (__u64) json_object_get_uint64(min_pixelclock_obj);
+
+	json_object *max_pixelclock_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "max_pixelclock", &max_pixelclock_obj))
+		p->max_pixelclock = (__u64) json_object_get_uint64(max_pixelclock_obj);
+
+	json_object *standards_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "standards", &standards_obj))
+		p->standards = (__u32) json_object_get_int64(standards_obj);
+
+	json_object *capabilities_obj;
+	if (json_object_object_get_ex(v4l2_bt_timings_cap_obj, "capabilities", &capabilities_obj))
+		p->capabilities = (__u32) json_object_get_int64(capabilities_obj);
+
+	return p;
+}
+struct v4l2_dv_timings_cap *retrace_v4l2_dv_timings_cap_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_dv_timings_cap *p = (struct v4l2_dv_timings_cap *) calloc(1, sizeof(v4l2_dv_timings_cap));
+
+	json_object *v4l2_dv_timings_cap_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_dv_timings_cap", &v4l2_dv_timings_cap_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_dv_timings_cap_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_dv_timings_cap_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	json_object *pad_obj;
+	if (json_object_object_get_ex(v4l2_dv_timings_cap_obj, "pad", &pad_obj))
+		p->pad = (__u32) json_object_get_int64(pad_obj);
+
+	//union
+	//struct v4l2_bt_timings_cap bt;
+	//end of union 	};
+	return p;
+}
+struct v4l2_input *retrace_v4l2_input_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_input *p = (struct v4l2_input *) calloc(1, sizeof(v4l2_input));
+
+	json_object *v4l2_input_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_input", &v4l2_input_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_input_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), input_type_val_def);
+	json_object *audioset_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "audioset", &audioset_obj))
+		p->audioset = (__u32) json_object_get_int64(audioset_obj);
+
+	json_object *tuner_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "tuner", &tuner_obj))
+		p->tuner = (__u32) json_object_get_int64(tuner_obj);
+
+	json_object *std_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "std", &std_obj))
+		p->std = (v4l2_std_id) json_object_get_uint64(std_obj);
+
+	json_object *status_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "status", &status_obj))
+		p->status = (__u32) json_object_get_int64(status_obj);
+
+	json_object *capabilities_obj;
+	if (json_object_object_get_ex(v4l2_input_obj, "capabilities", &capabilities_obj))
+		p->capabilities = (__u32) json_object_get_int64(capabilities_obj);
+
+	return p;
+}
+struct v4l2_output *retrace_v4l2_output_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_output *p = (struct v4l2_output *) calloc(1, sizeof(v4l2_output));
+
+	json_object *v4l2_output_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_output", &v4l2_output_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_output_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_output_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_output_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_output_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), output_type_val_def);
+	json_object *audioset_obj;
+	if (json_object_object_get_ex(v4l2_output_obj, "audioset", &audioset_obj))
+		p->audioset = (__u32) json_object_get_int64(audioset_obj);
+
+	json_object *modulator_obj;
+	if (json_object_object_get_ex(v4l2_output_obj, "modulator", &modulator_obj))
+		p->modulator = (__u32) json_object_get_int64(modulator_obj);
+
+	json_object *std_obj;
+	if (json_object_object_get_ex(v4l2_output_obj, "std", &std_obj))
+		p->std = (v4l2_std_id) json_object_get_uint64(std_obj);
+
+	json_object *capabilities_obj;
+	if (json_object_object_get_ex(v4l2_output_obj, "capabilities", &capabilities_obj))
+		p->capabilities = (__u32) json_object_get_int64(capabilities_obj);
+
+	return p;
+}
+struct v4l2_control *retrace_v4l2_control_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_control *p = (struct v4l2_control *) calloc(1, sizeof(v4l2_control));
+
+	json_object *v4l2_control_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_control", &v4l2_control_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_control_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_control_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), control_val_def);
+	json_object *value_obj;
+	if (json_object_object_get_ex(v4l2_control_obj, "value", &value_obj))
+		p->value = (__s32) json_object_get_int(value_obj);
+
+	return p;
+}
+struct v4l2_ext_control *retrace_v4l2_ext_control_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_ext_control *p = (struct v4l2_ext_control *) calloc(1, sizeof(v4l2_ext_control));
+
+	json_object *v4l2_ext_control_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_ext_control", &v4l2_ext_control_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_ext_control_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_ext_control_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), control_val_def);
+	json_object *size_obj;
+	if (json_object_object_get_ex(v4l2_ext_control_obj, "size", &size_obj))
+		p->size = (__u32) json_object_get_int64(size_obj);
+
+	//union
+	//__s32 value;
+	//__s64 value64;
+	//char *string;
+	//__u8 *p_u8;
+	//__u16 *p_u16;
+	//__u32 *p_u32;
+	//__s32 *p_s32;
+	//__s64 *p_s64;
+	//struct v4l2_area *p_area;
+	//struct v4l2_ctrl_h264_sps *p_h264_sps;
+	//struct v4l2_ctrl_h264_pps *p_h264_pps;
+	//struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix;
+	//struct v4l2_ctrl_h264_pred_weights *p_h264_pred_weights;
+	//struct v4l2_ctrl_h264_slice_params *p_h264_slice_params;
+	//struct v4l2_ctrl_h264_decode_params *p_h264_decode_params;
+	//struct v4l2_ctrl_fwht_params *p_fwht_params;
+	//struct v4l2_ctrl_vp8_frame *p_vp8_frame;
+	//struct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;
+	//struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
+	//struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;
+	//struct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;
+	//struct v4l2_ctrl_vp9_frame *p_vp9_frame;
+	//struct v4l2_ctrl_hevc_sps *p_hevc_sps;
+	//struct v4l2_ctrl_hevc_pps *p_hevc_pps;
+	//struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params;
+	//struct v4l2_ctrl_hevc_scaling_matrix *p_hevc_scaling_matrix;
+	//struct v4l2_ctrl_hevc_decode_params *p_hevc_decode_params;
+	//struct v4l2_ctrl_av1_sequence *p_av1_sequence;
+	//struct v4l2_ctrl_av1_tile_group_entry *p_av1_tile_group_entry;
+	//struct v4l2_ctrl_av1_frame *p_av1_frame;
+	//struct v4l2_ctrl_av1_film_grain *p_av1_film_grain;
+	//struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll_info;
+	//struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering_display;
+	//void *ptr;
+	//end of union 	};
+	return p;
+}
+struct v4l2_ext_controls *retrace_v4l2_ext_controls_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_ext_controls *p = (struct v4l2_ext_controls *) calloc(1, sizeof(v4l2_ext_controls));
+
+	json_object *v4l2_ext_controls_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_ext_controls", &v4l2_ext_controls_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_ext_controls_obj);
+
+	//union
+	//__u32 ctrl_class;
+	//__u32 which;
+	//end of union 	};
+	json_object *count_obj;
+	if (json_object_object_get_ex(v4l2_ext_controls_obj, "count", &count_obj))
+		p->count = (__u32) json_object_get_int64(count_obj);
+
+	json_object *error_idx_obj;
+	if (json_object_object_get_ex(v4l2_ext_controls_obj, "error_idx", &error_idx_obj))
+		p->error_idx = (__u32) json_object_get_int64(error_idx_obj);
+
+	json_object *request_fd_obj;
+	if (json_object_object_get_ex(v4l2_ext_controls_obj, "request_fd", &request_fd_obj))
+		p->request_fd = (__s32) json_object_get_int(request_fd_obj);
+
+	//struct v4l2_ext_control *controls;
+	return p;
+}
+struct v4l2_queryctrl *retrace_v4l2_queryctrl_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_queryctrl *p = (struct v4l2_queryctrl *) calloc(1, sizeof(v4l2_queryctrl));
+
+	json_object *v4l2_queryctrl_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_queryctrl", &v4l2_queryctrl_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_queryctrl_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), control_val_def);
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_ctrl_type_val_def);
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *minimum_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "minimum", &minimum_obj))
+		p->minimum = (__s32) json_object_get_int(minimum_obj);
+
+	json_object *maximum_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "maximum", &maximum_obj))
+		p->maximum = (__s32) json_object_get_int(maximum_obj);
+
+	json_object *step_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "step", &step_obj))
+		p->step = (__s32) json_object_get_int(step_obj);
+
+	json_object *default_value_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "default_value", &default_value_obj))
+		p->default_value = (__s32) json_object_get_int(default_value_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_queryctrl_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_ctrl_flag_def);
+
+	return p;
+}
+struct v4l2_query_ext_ctrl *retrace_v4l2_query_ext_ctrl_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_query_ext_ctrl *p = (struct v4l2_query_ext_ctrl *) calloc(1, sizeof(v4l2_query_ext_ctrl));
+
+	json_object *v4l2_query_ext_ctrl_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_query_ext_ctrl", &v4l2_query_ext_ctrl_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_query_ext_ctrl_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), control_val_def);
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_ctrl_type_val_def);
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *minimum_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "minimum", &minimum_obj))
+		p->minimum = (__s64) json_object_get_int64(minimum_obj);
+
+	json_object *maximum_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "maximum", &maximum_obj))
+		p->maximum = (__s64) json_object_get_int64(maximum_obj);
+
+	json_object *step_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "step", &step_obj))
+		p->step = (__u64) json_object_get_uint64(step_obj);
+
+	json_object *default_value_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "default_value", &default_value_obj))
+		p->default_value = (__s64) json_object_get_int64(default_value_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_ctrl_flag_def);
+
+	json_object *elem_size_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "elem_size", &elem_size_obj))
+		p->elem_size = (__u32) json_object_get_int64(elem_size_obj);
+
+	json_object *elems_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "elems", &elems_obj))
+		p->elems = (__u32) json_object_get_int64(elems_obj);
+
+	json_object *nr_of_dims_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "nr_of_dims", &nr_of_dims_obj))
+		p->nr_of_dims = (__u32) json_object_get_int64(nr_of_dims_obj);
+
+	/* __u32                dims[V4L2_CTRL_MAX_DIMS]; */
+	json_object *dims_obj;
+	if (json_object_object_get_ex(v4l2_query_ext_ctrl_obj, "dims", &dims_obj)) {
+		for (int i = 0; i < (std::min((int) p->nr_of_dims, V4L2_CTRL_MAX_DIMS)); i++) {
+			if (json_object_array_get_idx(dims_obj, i))
+				p->dims[i] = (__u32) json_object_get_int64(json_object_array_get_idx(dims_obj, i));
+		}
+	}
+	return p;
+}
+struct v4l2_querymenu *retrace_v4l2_querymenu_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_querymenu *p = (struct v4l2_querymenu *) calloc(1, sizeof(v4l2_querymenu));
+
+	json_object *v4l2_querymenu_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_querymenu", &v4l2_querymenu_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_querymenu_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_querymenu_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), control_val_def);
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_querymenu_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	//union
+	//__u8	name[32];
+	//__s64	value;
+	//end of union 	};
+	return p;
+}
+struct v4l2_tuner *retrace_v4l2_tuner_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_tuner *p = (struct v4l2_tuner *) calloc(1, sizeof(v4l2_tuner));
+
+	json_object *v4l2_tuner_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_tuner", &v4l2_tuner_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_tuner_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_tuner_type_val_def);
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "capability", &capability_obj))
+		p->capability = (__u32) s2flags(json_object_get_string(capability_obj), tuner_cap_flag_def);
+
+	json_object *rangelow_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "rangelow", &rangelow_obj))
+		p->rangelow = (__u32) json_object_get_int64(rangelow_obj);
+
+	json_object *rangehigh_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "rangehigh", &rangehigh_obj))
+		p->rangehigh = (__u32) json_object_get_int64(rangehigh_obj);
+
+	json_object *rxsubchans_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "rxsubchans", &rxsubchans_obj))
+		p->rxsubchans = (__u32) s2flags(json_object_get_string(rxsubchans_obj), tuner_rxsub_flag_def);
+
+	json_object *audmode_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "audmode", &audmode_obj))
+		p->audmode = (__u32) s2val(json_object_get_string(audmode_obj), tuner_audmode_val_def);
+	json_object *signal_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "signal", &signal_obj))
+		p->signal = (__s32) json_object_get_int(signal_obj);
+
+	json_object *afc_obj;
+	if (json_object_object_get_ex(v4l2_tuner_obj, "afc", &afc_obj))
+		p->afc = (__s32) json_object_get_int(afc_obj);
+
+	return p;
+}
+struct v4l2_modulator *retrace_v4l2_modulator_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_modulator *p = (struct v4l2_modulator *) calloc(1, sizeof(v4l2_modulator));
+
+	json_object *v4l2_modulator_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_modulator", &v4l2_modulator_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_modulator_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_modulator_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_modulator_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_modulator_obj, "capability", &capability_obj))
+		p->capability = (__u32) json_object_get_int64(capability_obj);
+
+	json_object *rangelow_obj;
+	if (json_object_object_get_ex(v4l2_modulator_obj, "rangelow", &rangelow_obj))
+		p->rangelow = (__u32) json_object_get_int64(rangelow_obj);
+
+	json_object *rangehigh_obj;
+	if (json_object_object_get_ex(v4l2_modulator_obj, "rangehigh", &rangehigh_obj))
+		p->rangehigh = (__u32) json_object_get_int64(rangehigh_obj);
+
+	json_object *txsubchans_obj;
+	if (json_object_object_get_ex(v4l2_modulator_obj, "txsubchans", &txsubchans_obj))
+		p->txsubchans = (__u32) json_object_get_int64(txsubchans_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_modulator_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	return p;
+}
+struct v4l2_frequency *retrace_v4l2_frequency_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_frequency *p = (struct v4l2_frequency *) calloc(1, sizeof(v4l2_frequency));
+
+	json_object *v4l2_frequency_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_frequency", &v4l2_frequency_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_frequency_obj);
+
+	json_object *tuner_obj;
+	if (json_object_object_get_ex(v4l2_frequency_obj, "tuner", &tuner_obj))
+		p->tuner = (__u32) json_object_get_int64(tuner_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_frequency_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_tuner_type_val_def);
+	json_object *frequency_obj;
+	if (json_object_object_get_ex(v4l2_frequency_obj, "frequency", &frequency_obj))
+		p->frequency = (__u32) json_object_get_int64(frequency_obj);
+
+	return p;
+}
+struct v4l2_frequency_band *retrace_v4l2_frequency_band_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_frequency_band *p = (struct v4l2_frequency_band *) calloc(1, sizeof(v4l2_frequency_band));
+
+	json_object *v4l2_frequency_band_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_frequency_band", &v4l2_frequency_band_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_frequency_band_obj);
+
+	json_object *tuner_obj;
+	if (json_object_object_get_ex(v4l2_frequency_band_obj, "tuner", &tuner_obj))
+		p->tuner = (__u32) json_object_get_int64(tuner_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_frequency_band_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_frequency_band_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_frequency_band_obj, "capability", &capability_obj))
+		p->capability = (__u32) json_object_get_int64(capability_obj);
+
+	json_object *rangelow_obj;
+	if (json_object_object_get_ex(v4l2_frequency_band_obj, "rangelow", &rangelow_obj))
+		p->rangelow = (__u32) json_object_get_int64(rangelow_obj);
+
+	json_object *rangehigh_obj;
+	if (json_object_object_get_ex(v4l2_frequency_band_obj, "rangehigh", &rangehigh_obj))
+		p->rangehigh = (__u32) json_object_get_int64(rangehigh_obj);
+
+	json_object *modulation_obj;
+	if (json_object_object_get_ex(v4l2_frequency_band_obj, "modulation", &modulation_obj))
+		p->modulation = (__u32) json_object_get_int64(modulation_obj);
+
+	return p;
+}
+struct v4l2_hw_freq_seek *retrace_v4l2_hw_freq_seek_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_hw_freq_seek *p = (struct v4l2_hw_freq_seek *) calloc(1, sizeof(v4l2_hw_freq_seek));
+
+	json_object *v4l2_hw_freq_seek_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_hw_freq_seek", &v4l2_hw_freq_seek_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_hw_freq_seek_obj);
+
+	json_object *tuner_obj;
+	if (json_object_object_get_ex(v4l2_hw_freq_seek_obj, "tuner", &tuner_obj))
+		p->tuner = (__u32) json_object_get_int64(tuner_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_hw_freq_seek_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	json_object *seek_upward_obj;
+	if (json_object_object_get_ex(v4l2_hw_freq_seek_obj, "seek_upward", &seek_upward_obj))
+		p->seek_upward = (__u32) json_object_get_int64(seek_upward_obj);
+
+	json_object *wrap_around_obj;
+	if (json_object_object_get_ex(v4l2_hw_freq_seek_obj, "wrap_around", &wrap_around_obj))
+		p->wrap_around = (__u32) json_object_get_int64(wrap_around_obj);
+
+	json_object *spacing_obj;
+	if (json_object_object_get_ex(v4l2_hw_freq_seek_obj, "spacing", &spacing_obj))
+		p->spacing = (__u32) json_object_get_int64(spacing_obj);
+
+	json_object *rangelow_obj;
+	if (json_object_object_get_ex(v4l2_hw_freq_seek_obj, "rangelow", &rangelow_obj))
+		p->rangelow = (__u32) json_object_get_int64(rangelow_obj);
+
+	json_object *rangehigh_obj;
+	if (json_object_object_get_ex(v4l2_hw_freq_seek_obj, "rangehigh", &rangehigh_obj))
+		p->rangehigh = (__u32) json_object_get_int64(rangehigh_obj);
+
+	return p;
+}
+struct v4l2_rds_data *retrace_v4l2_rds_data_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_rds_data *p = (struct v4l2_rds_data *) calloc(1, sizeof(v4l2_rds_data));
+
+	json_object *v4l2_rds_data_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_rds_data", &v4l2_rds_data_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_rds_data_obj);
+
+	json_object *lsb_obj;
+	if (json_object_object_get_ex(v4l2_rds_data_obj, "lsb", &lsb_obj))
+		p->lsb = (__u8) json_object_get_int(lsb_obj);
+
+	json_object *msb_obj;
+	if (json_object_object_get_ex(v4l2_rds_data_obj, "msb", &msb_obj))
+		p->msb = (__u8) json_object_get_int(msb_obj);
+
+	json_object *block_obj;
+	if (json_object_object_get_ex(v4l2_rds_data_obj, "block", &block_obj))
+		p->block = (__u8) json_object_get_int(block_obj);
+
+	return p;
+}
+struct v4l2_audio *retrace_v4l2_audio_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_audio *p = (struct v4l2_audio *) calloc(1, sizeof(v4l2_audio));
+
+	json_object *v4l2_audio_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_audio", &v4l2_audio_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_audio_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_audio_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_audio_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_audio_obj, "capability", &capability_obj))
+		p->capability = (__u32) json_object_get_int64(capability_obj);
+
+	json_object *mode_obj;
+	if (json_object_object_get_ex(v4l2_audio_obj, "mode", &mode_obj))
+		p->mode = (__u32) json_object_get_int64(mode_obj);
+
+	return p;
+}
+struct v4l2_audioout *retrace_v4l2_audioout_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_audioout *p = (struct v4l2_audioout *) calloc(1, sizeof(v4l2_audioout));
+
+	json_object *v4l2_audioout_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_audioout", &v4l2_audioout_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_audioout_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_audioout_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_audioout_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *capability_obj;
+	if (json_object_object_get_ex(v4l2_audioout_obj, "capability", &capability_obj))
+		p->capability = (__u32) json_object_get_int64(capability_obj);
+
+	json_object *mode_obj;
+	if (json_object_object_get_ex(v4l2_audioout_obj, "mode", &mode_obj))
+		p->mode = (__u32) json_object_get_int64(mode_obj);
+
+	return p;
+}
+struct v4l2_enc_idx_entry *retrace_v4l2_enc_idx_entry_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_enc_idx_entry *p = (struct v4l2_enc_idx_entry *) calloc(1, sizeof(v4l2_enc_idx_entry));
+
+	json_object *v4l2_enc_idx_entry_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_enc_idx_entry", &v4l2_enc_idx_entry_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_enc_idx_entry_obj);
+
+	json_object *offset_obj;
+	if (json_object_object_get_ex(v4l2_enc_idx_entry_obj, "offset", &offset_obj))
+		p->offset = (__u64) json_object_get_uint64(offset_obj);
+
+	json_object *pts_obj;
+	if (json_object_object_get_ex(v4l2_enc_idx_entry_obj, "pts", &pts_obj))
+		p->pts = (__u64) json_object_get_uint64(pts_obj);
+
+	json_object *length_obj;
+	if (json_object_object_get_ex(v4l2_enc_idx_entry_obj, "length", &length_obj))
+		p->length = (__u32) json_object_get_int64(length_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_enc_idx_entry_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	return p;
+}
+struct v4l2_enc_idx *retrace_v4l2_enc_idx_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_enc_idx *p = (struct v4l2_enc_idx *) calloc(1, sizeof(v4l2_enc_idx));
+
+	json_object *v4l2_enc_idx_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_enc_idx", &v4l2_enc_idx_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_enc_idx_obj);
+
+	json_object *entries_obj;
+	if (json_object_object_get_ex(v4l2_enc_idx_obj, "entries", &entries_obj))
+		p->entries = (__u32) json_object_get_int64(entries_obj);
+
+	json_object *entries_cap_obj;
+	if (json_object_object_get_ex(v4l2_enc_idx_obj, "entries_cap", &entries_cap_obj))
+		p->entries_cap = (__u32) json_object_get_int64(entries_cap_obj);
+
+	//struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES];
+	return p;
+}
+struct v4l2_encoder_cmd *retrace_v4l2_encoder_cmd_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_encoder_cmd *p = (struct v4l2_encoder_cmd *) calloc(1, sizeof(v4l2_encoder_cmd));
+
+	json_object *v4l2_encoder_cmd_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_encoder_cmd", &v4l2_encoder_cmd_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_encoder_cmd_obj);
+
+	json_object *cmd_obj;
+	if (json_object_object_get_ex(v4l2_encoder_cmd_obj, "cmd", &cmd_obj))
+		p->cmd = (__u32) s2val(json_object_get_string(cmd_obj), encoder_cmd_val_def);
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_encoder_cmd_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	//union
+	//struct {
+	//__u32 data[8];
+	//end of union 		} raw;
+	return p;
+}
+struct v4l2_decoder_cmd *retrace_v4l2_decoder_cmd_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_decoder_cmd *p = (struct v4l2_decoder_cmd *) calloc(1, sizeof(v4l2_decoder_cmd));
+
+	json_object *v4l2_decoder_cmd_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_decoder_cmd", &v4l2_decoder_cmd_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_decoder_cmd_obj);
+
+	json_object *cmd_obj;
+	if (json_object_object_get_ex(v4l2_decoder_cmd_obj, "cmd", &cmd_obj))
+		p->cmd = (__u32) s2val(json_object_get_string(cmd_obj), decoder_cmd_val_def);
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_decoder_cmd_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	//union
+	//struct {
+	//__u64 pts;
+	//end of union 		} stop;
+	//struct {
+	//__s32 speed;
+	//__u32 format;
+	//end of struct 		} start;
+	//struct {
+	//__u32 data[16];
+	//end of struct 		} raw;
+	return p;
+}
+struct v4l2_vbi_format *retrace_v4l2_vbi_format_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_vbi_format *p = (struct v4l2_vbi_format *) calloc(1, sizeof(v4l2_vbi_format));
+
+	json_object *v4l2_vbi_format_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_vbi_format", &v4l2_vbi_format_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_vbi_format_obj);
+
+	json_object *sampling_rate_obj;
+	if (json_object_object_get_ex(v4l2_vbi_format_obj, "sampling_rate", &sampling_rate_obj))
+		p->sampling_rate = (__u32) json_object_get_int64(sampling_rate_obj);
+
+	json_object *offset_obj;
+	if (json_object_object_get_ex(v4l2_vbi_format_obj, "offset", &offset_obj))
+		p->offset = (__u32) json_object_get_int64(offset_obj);
+
+	json_object *samples_per_line_obj;
+	if (json_object_object_get_ex(v4l2_vbi_format_obj, "samples_per_line", &samples_per_line_obj))
+		p->samples_per_line = (__u32) json_object_get_int64(samples_per_line_obj);
+
+	json_object *sample_format_obj;
+	if (json_object_object_get_ex(v4l2_vbi_format_obj, "sample_format", &sample_format_obj))
+		p->sample_format = (__u32) json_object_get_int64(sample_format_obj);
+
+	json_object *start_obj;
+	if (json_object_object_get_ex(v4l2_vbi_format_obj, "start", &start_obj))
+		if (json_object_get_string(start_obj) != nullptr)
+			memcpy(p->start, json_object_get_string(start_obj), 2);
+
+	json_object *count_obj;
+	if (json_object_object_get_ex(v4l2_vbi_format_obj, "count", &count_obj))
+		if (json_object_get_string(count_obj) != nullptr)
+			memcpy(p->count, json_object_get_string(count_obj), 2);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_vbi_format_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	return p;
+}
+struct v4l2_sliced_vbi_format *retrace_v4l2_sliced_vbi_format_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_sliced_vbi_format *p = (struct v4l2_sliced_vbi_format *) calloc(1, sizeof(v4l2_sliced_vbi_format));
+
+	json_object *v4l2_sliced_vbi_format_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_sliced_vbi_format", &v4l2_sliced_vbi_format_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_sliced_vbi_format_obj);
+
+	json_object *service_set_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_format_obj, "service_set", &service_set_obj))
+		p->service_set = (__u16) json_object_get_int(service_set_obj);
+
+	//__u16   service_lines[2][24];
+	json_object *io_size_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_format_obj, "io_size", &io_size_obj))
+		p->io_size = (__u32) json_object_get_int64(io_size_obj);
+
+	return p;
+}
+struct v4l2_sliced_vbi_cap *retrace_v4l2_sliced_vbi_cap_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_sliced_vbi_cap *p = (struct v4l2_sliced_vbi_cap *) calloc(1, sizeof(v4l2_sliced_vbi_cap));
+
+	json_object *v4l2_sliced_vbi_cap_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_sliced_vbi_cap", &v4l2_sliced_vbi_cap_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_sliced_vbi_cap_obj);
+
+	json_object *service_set_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_cap_obj, "service_set", &service_set_obj))
+		p->service_set = (__u16) json_object_get_int(service_set_obj);
+
+	//__u16   service_lines[2][24];
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_cap_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	return p;
+}
+struct v4l2_sliced_vbi_data *retrace_v4l2_sliced_vbi_data_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_sliced_vbi_data *p = (struct v4l2_sliced_vbi_data *) calloc(1, sizeof(v4l2_sliced_vbi_data));
+
+	json_object *v4l2_sliced_vbi_data_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_sliced_vbi_data", &v4l2_sliced_vbi_data_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_sliced_vbi_data_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_data_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *field_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_data_obj, "field", &field_obj))
+		p->field = (__u32) s2val(json_object_get_string(field_obj), nullptr);
+	json_object *line_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_data_obj, "line", &line_obj))
+		p->line = (__u32) json_object_get_int64(line_obj);
+
+	json_object *data_obj;
+	if (json_object_object_get_ex(v4l2_sliced_vbi_data_obj, "data", &data_obj))
+		if (json_object_get_string(data_obj) != nullptr)
+			memcpy(p->data, json_object_get_string(data_obj), 48);
+
+	return p;
+}
+struct v4l2_mpeg_vbi_itv0_line *retrace_v4l2_mpeg_vbi_itv0_line_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_mpeg_vbi_itv0_line *p = (struct v4l2_mpeg_vbi_itv0_line *) calloc(1, sizeof(v4l2_mpeg_vbi_itv0_line));
+
+	json_object *v4l2_mpeg_vbi_itv0_line_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_mpeg_vbi_itv0_line", &v4l2_mpeg_vbi_itv0_line_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_mpeg_vbi_itv0_line_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_mpeg_vbi_itv0_line_obj, "id", &id_obj))
+		p->id = (__u8) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *data_obj;
+	if (json_object_object_get_ex(v4l2_mpeg_vbi_itv0_line_obj, "data", &data_obj))
+		if (json_object_get_string(data_obj) != nullptr)
+			memcpy(p->data, json_object_get_string(data_obj), 42);
+
+	return p;
+}
+struct v4l2_mpeg_vbi_itv0 *retrace_v4l2_mpeg_vbi_itv0_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_mpeg_vbi_itv0 *p = (struct v4l2_mpeg_vbi_itv0 *) calloc(1, sizeof(v4l2_mpeg_vbi_itv0));
+
+	json_object *v4l2_mpeg_vbi_itv0_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_mpeg_vbi_itv0", &v4l2_mpeg_vbi_itv0_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_mpeg_vbi_itv0_obj);
+
+	json_object *linemask_obj;
+	if (json_object_object_get_ex(v4l2_mpeg_vbi_itv0_obj, "linemask", &linemask_obj))
+		if (json_object_get_string(linemask_obj) != nullptr)
+			memcpy(p->linemask, json_object_get_string(linemask_obj), 2);
+
+	//struct v4l2_mpeg_vbi_itv0_line line[35];
+	return p;
+}
+struct v4l2_mpeg_vbi_fmt_ivtv *retrace_v4l2_mpeg_vbi_fmt_ivtv_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_mpeg_vbi_fmt_ivtv *p = (struct v4l2_mpeg_vbi_fmt_ivtv *) calloc(1, sizeof(v4l2_mpeg_vbi_fmt_ivtv));
+
+	json_object *v4l2_mpeg_vbi_fmt_ivtv_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_mpeg_vbi_fmt_ivtv", &v4l2_mpeg_vbi_fmt_ivtv_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_mpeg_vbi_fmt_ivtv_obj);
+
+	json_object *magic_obj;
+	if (json_object_object_get_ex(v4l2_mpeg_vbi_fmt_ivtv_obj, "magic", &magic_obj))
+		if (json_object_get_string(magic_obj) != nullptr)
+			memcpy(p->magic, json_object_get_string(magic_obj), 4);
+
+	//union
+	//struct v4l2_mpeg_vbi_itv0 itv0;
+	//struct v4l2_mpeg_vbi_ITV0 ITV0;
+	//end of union 	};
+	return p;
+}
+struct v4l2_plane_pix_format *retrace_v4l2_plane_pix_format_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_plane_pix_format *p = (struct v4l2_plane_pix_format *) calloc(1, sizeof(v4l2_plane_pix_format));
+
+	json_object *v4l2_plane_pix_format_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_plane_pix_format", &v4l2_plane_pix_format_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_plane_pix_format_obj);
+
+	json_object *sizeimage_obj;
+	if (json_object_object_get_ex(v4l2_plane_pix_format_obj, "sizeimage", &sizeimage_obj))
+		p->sizeimage = (__u32) json_object_get_int64(sizeimage_obj);
+
+	json_object *bytesperline_obj;
+	if (json_object_object_get_ex(v4l2_plane_pix_format_obj, "bytesperline", &bytesperline_obj))
+		p->bytesperline = (__u32) json_object_get_int64(bytesperline_obj);
+
+	return p;
+}
+struct v4l2_pix_format_mplane *retrace_v4l2_pix_format_mplane_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_pix_format_mplane *p = (struct v4l2_pix_format_mplane *) calloc(1, sizeof(v4l2_pix_format_mplane));
+
+	json_object *v4l2_pix_format_mplane_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_pix_format_mplane", &v4l2_pix_format_mplane_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_pix_format_mplane_obj);
+
+	json_object *width_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "width", &width_obj))
+		p->width = (__u32) json_object_get_int64(width_obj);
+
+	json_object *height_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "height", &height_obj))
+		p->height = (__u32) json_object_get_int64(height_obj);
+
+	json_object *pixelformat_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "pixelformat", &pixelformat_obj))
+		p->pixelformat = (__u32) s2val(json_object_get_string(pixelformat_obj), v4l2_pix_fmt_val_def);
+	json_object *field_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "field", &field_obj))
+		p->field = (__u32) s2val(json_object_get_string(field_obj), v4l2_field_val_def);
+	json_object *colorspace_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "colorspace", &colorspace_obj))
+		p->colorspace = (__u32) s2val(json_object_get_string(colorspace_obj), v4l2_colorspace_val_def);
+	//struct v4l2_plane_pix_format	plane_fmt[VIDEO_MAX_PLANES];
+	json_object *num_planes_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "num_planes", &num_planes_obj))
+		p->num_planes = (__u8) json_object_get_int(num_planes_obj);
+
+	json_object *plane_fmt_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "plane_fmt", &plane_fmt_obj)) {
+		for (int i = 0; i < (std::min((int) p->num_planes, VIDEO_MAX_PLANES)); i++) {
+			if (json_object_array_get_idx(plane_fmt_obj, i)) {
+				json_object *element_obj = json_object_new_object();
+				json_object_object_add(element_obj, "v4l2_plane_pix_format", json_object_array_get_idx(plane_fmt_obj, i));
+				void *ptr = (void *) retrace_v4l2_plane_pix_format_gen(element_obj);
+				p->plane_fmt[i] = *static_cast<struct v4l2_plane_pix_format *>(ptr);
+				free(ptr);
+			}
+		}
+	}
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "flags", &flags_obj))
+		p->flags = (__u8) s2flags(json_object_get_string(flags_obj), v4l2_pix_fmt_flag_def);
+
+	//union
+	json_object *ycbcr_enc_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "ycbcr_enc", &ycbcr_enc_obj))
+		p->ycbcr_enc = (__u8) s2val(json_object_get_string(ycbcr_enc_obj), v4l2_ycbcr_encoding_val_def);
+	json_object *hsv_enc_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "hsv_enc", &hsv_enc_obj))
+		p->hsv_enc = (__u8) json_object_get_int(hsv_enc_obj);
+
+	//end of union 	};
+	json_object *quantization_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "quantization", &quantization_obj))
+		p->quantization = (__u8) s2val(json_object_get_string(quantization_obj), v4l2_quantization_val_def);
+	json_object *xfer_func_obj;
+	if (json_object_object_get_ex(v4l2_pix_format_mplane_obj, "xfer_func", &xfer_func_obj))
+		p->xfer_func = (__u8) s2val(json_object_get_string(xfer_func_obj), v4l2_xfer_func_val_def);
+	return p;
+}
+struct v4l2_sdr_format *retrace_v4l2_sdr_format_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_sdr_format *p = (struct v4l2_sdr_format *) calloc(1, sizeof(v4l2_sdr_format));
+
+	json_object *v4l2_sdr_format_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_sdr_format", &v4l2_sdr_format_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_sdr_format_obj);
+
+	json_object *pixelformat_obj;
+	if (json_object_object_get_ex(v4l2_sdr_format_obj, "pixelformat", &pixelformat_obj))
+		p->pixelformat = (__u32) s2val(json_object_get_string(pixelformat_obj), v4l2_pix_fmt_val_def);
+	json_object *buffersize_obj;
+	if (json_object_object_get_ex(v4l2_sdr_format_obj, "buffersize", &buffersize_obj))
+		p->buffersize = (__u32) json_object_get_int64(buffersize_obj);
+
+	return p;
+}
+struct v4l2_meta_format *retrace_v4l2_meta_format_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_meta_format *p = (struct v4l2_meta_format *) calloc(1, sizeof(v4l2_meta_format));
+
+	json_object *v4l2_meta_format_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_meta_format", &v4l2_meta_format_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_meta_format_obj);
+
+	json_object *dataformat_obj;
+	if (json_object_object_get_ex(v4l2_meta_format_obj, "dataformat", &dataformat_obj))
+		p->dataformat = (__u32) json_object_get_int64(dataformat_obj);
+
+	json_object *buffersize_obj;
+	if (json_object_object_get_ex(v4l2_meta_format_obj, "buffersize", &buffersize_obj))
+		p->buffersize = (__u32) json_object_get_int64(buffersize_obj);
+
+	return p;
+}
+struct v4l2_format *retrace_v4l2_format_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_format *p = (struct v4l2_format *) calloc(1, sizeof(v4l2_format));
+
+	json_object *v4l2_format_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_format", &v4l2_format_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_format_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_format_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	//union
+	switch (p->type) {
+	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+	case V4L2_BUF_TYPE_VIDEO_OUTPUT: {
+		void *pix_ptr = (void *) retrace_v4l2_pix_format_gen(v4l2_format_obj);
+		p->fmt.pix = *static_cast<struct v4l2_pix_format*>(pix_ptr);
+		free(pix_ptr);
+		break;
+	}
+	case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
+	case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: {
+		void *pix_mp_ptr = (void *) retrace_v4l2_pix_format_mplane_gen(v4l2_format_obj);
+		p->fmt.pix_mp = *static_cast<struct v4l2_pix_format_mplane*>(pix_mp_ptr);
+		free(pix_mp_ptr);
+		break;
+	}
+	default:
+		break;
+	}
+	//struct v4l2_pix_format		pix;
+	//struct v4l2_pix_format_mplane	pix_mp;
+	//struct v4l2_window		win;
+	//struct v4l2_vbi_format		vbi;
+	//struct v4l2_sliced_vbi_format	sliced;
+	//struct v4l2_sdr_format		sdr;
+	//struct v4l2_meta_format		meta;
+	//end of union 	} fmt;
+	return p;
+}
+struct v4l2_streamparm *retrace_v4l2_streamparm_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_streamparm *p = (struct v4l2_streamparm *) calloc(1, sizeof(v4l2_streamparm));
+
+	json_object *v4l2_streamparm_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_streamparm", &v4l2_streamparm_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_streamparm_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_streamparm_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_buf_type_val_def);
+	//union
+	//struct v4l2_captureparm	capture;
+	//struct v4l2_outputparm	output;
+	//end of union 	} parm;
+	return p;
+}
+struct v4l2_event_vsync *retrace_v4l2_event_vsync_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_event_vsync *p = (struct v4l2_event_vsync *) calloc(1, sizeof(v4l2_event_vsync));
+
+	json_object *v4l2_event_vsync_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_event_vsync", &v4l2_event_vsync_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_event_vsync_obj);
+
+	json_object *field_obj;
+	if (json_object_object_get_ex(v4l2_event_vsync_obj, "field", &field_obj))
+		p->field = (__u8) s2val(json_object_get_string(field_obj), v4l2_field_val_def);
+	return p;
+}
+struct v4l2_event_ctrl *retrace_v4l2_event_ctrl_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_event_ctrl *p = (struct v4l2_event_ctrl *) calloc(1, sizeof(v4l2_event_ctrl));
+
+	json_object *v4l2_event_ctrl_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_event_ctrl", &v4l2_event_ctrl_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_event_ctrl_obj);
+
+	json_object *changes_obj;
+	if (json_object_object_get_ex(v4l2_event_ctrl_obj, "changes", &changes_obj))
+		p->changes = (__u32) s2flags(json_object_get_string(changes_obj), v4l2_event_ctrl_ch_flag_def);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_event_ctrl_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), v4l2_ctrl_type_val_def);
+	//union
+	//__s32 value;
+	//__s64 value64;
+	//end of union 	};
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_event_ctrl_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_ctrl_flag_def);
+
+	json_object *minimum_obj;
+	if (json_object_object_get_ex(v4l2_event_ctrl_obj, "minimum", &minimum_obj))
+		p->minimum = (__s32) json_object_get_int(minimum_obj);
+
+	json_object *maximum_obj;
+	if (json_object_object_get_ex(v4l2_event_ctrl_obj, "maximum", &maximum_obj))
+		p->maximum = (__s32) json_object_get_int(maximum_obj);
+
+	json_object *step_obj;
+	if (json_object_object_get_ex(v4l2_event_ctrl_obj, "step", &step_obj))
+		p->step = (__s32) json_object_get_int(step_obj);
+
+	json_object *default_value_obj;
+	if (json_object_object_get_ex(v4l2_event_ctrl_obj, "default_value", &default_value_obj))
+		p->default_value = (__s32) json_object_get_int(default_value_obj);
+
+	return p;
+}
+struct v4l2_event_frame_sync *retrace_v4l2_event_frame_sync_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_event_frame_sync *p = (struct v4l2_event_frame_sync *) calloc(1, sizeof(v4l2_event_frame_sync));
+
+	json_object *v4l2_event_frame_sync_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_event_frame_sync", &v4l2_event_frame_sync_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_event_frame_sync_obj);
+
+	json_object *frame_sequence_obj;
+	if (json_object_object_get_ex(v4l2_event_frame_sync_obj, "frame_sequence", &frame_sequence_obj))
+		p->frame_sequence = (__u32) json_object_get_int64(frame_sequence_obj);
+
+	return p;
+}
+struct v4l2_event_src_change *retrace_v4l2_event_src_change_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_event_src_change *p = (struct v4l2_event_src_change *) calloc(1, sizeof(v4l2_event_src_change));
+
+	json_object *v4l2_event_src_change_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_event_src_change", &v4l2_event_src_change_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_event_src_change_obj);
+
+	json_object *changes_obj;
+	if (json_object_object_get_ex(v4l2_event_src_change_obj, "changes", &changes_obj))
+		p->changes = (__u32) json_object_get_int64(changes_obj);
+
+	return p;
+}
+struct v4l2_event_motion_det *retrace_v4l2_event_motion_det_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_event_motion_det *p = (struct v4l2_event_motion_det *) calloc(1, sizeof(v4l2_event_motion_det));
+
+	json_object *v4l2_event_motion_det_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_event_motion_det", &v4l2_event_motion_det_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_event_motion_det_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_event_motion_det_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	json_object *frame_sequence_obj;
+	if (json_object_object_get_ex(v4l2_event_motion_det_obj, "frame_sequence", &frame_sequence_obj))
+		p->frame_sequence = (__u32) json_object_get_int64(frame_sequence_obj);
+
+	json_object *region_mask_obj;
+	if (json_object_object_get_ex(v4l2_event_motion_det_obj, "region_mask", &region_mask_obj))
+		p->region_mask = (__u32) json_object_get_int64(region_mask_obj);
+
+	return p;
+}
+struct v4l2_event *retrace_v4l2_event_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_event *p = (struct v4l2_event *) calloc(1, sizeof(v4l2_event));
+
+	json_object *v4l2_event_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_event", &v4l2_event_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_event_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_event_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), event_val_def);
+	//union
+	//struct v4l2_event_vsync		vsync;
+	//struct v4l2_event_ctrl		ctrl;
+	//struct v4l2_event_frame_sync	frame_sync;
+	//struct v4l2_event_src_change	src_change;
+	//struct v4l2_event_motion_det	motion_det;
+	//__u8				data[64];
+	//end of union 	} u;
+	json_object *pending_obj;
+	if (json_object_object_get_ex(v4l2_event_obj, "pending", &pending_obj))
+		p->pending = (__u32) json_object_get_int64(pending_obj);
+
+	json_object *sequence_obj;
+	if (json_object_object_get_ex(v4l2_event_obj, "sequence", &sequence_obj))
+		p->sequence = (__u32) json_object_get_int64(sequence_obj);
+
+	//struct timespec			timestamp;
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_event_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	return p;
+}
+struct v4l2_event_subscription *retrace_v4l2_event_subscription_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_event_subscription *p = (struct v4l2_event_subscription *) calloc(1, sizeof(v4l2_event_subscription));
+
+	json_object *v4l2_event_subscription_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_event_subscription", &v4l2_event_subscription_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_event_subscription_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_event_subscription_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), event_val_def);
+	json_object *id_obj;
+	if (json_object_object_get_ex(v4l2_event_subscription_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_event_subscription_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_event_sub_flag_def);
+
+	return p;
+}
+struct v4l2_dbg_match *retrace_v4l2_dbg_match_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_dbg_match *p = (struct v4l2_dbg_match *) calloc(1, sizeof(v4l2_dbg_match));
+
+	json_object *v4l2_dbg_match_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_dbg_match", &v4l2_dbg_match_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_dbg_match_obj);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(v4l2_dbg_match_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	//union
+	//__u32 addr;
+	//char name[32];
+	//end of union 	};
+	return p;
+}
+struct v4l2_dbg_register *retrace_v4l2_dbg_register_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_dbg_register *p = (struct v4l2_dbg_register *) calloc(1, sizeof(v4l2_dbg_register));
+
+	json_object *v4l2_dbg_register_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_dbg_register", &v4l2_dbg_register_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_dbg_register_obj);
+
+	//struct v4l2_dbg_match match;
+	void *match_ptr = (void *) retrace_v4l2_dbg_match_gen(v4l2_dbg_register_obj, "match");
+	p->match = *static_cast<struct v4l2_dbg_match*>(match_ptr);
+	free(match_ptr);
+
+	json_object *size_obj;
+	if (json_object_object_get_ex(v4l2_dbg_register_obj, "size", &size_obj))
+		p->size = (__u32) json_object_get_int64(size_obj);
+
+	json_object *reg_obj;
+	if (json_object_object_get_ex(v4l2_dbg_register_obj, "reg", &reg_obj))
+		p->reg = (__u64) json_object_get_uint64(reg_obj);
+
+	json_object *val_obj;
+	if (json_object_object_get_ex(v4l2_dbg_register_obj, "val", &val_obj))
+		p->val = (__u64) json_object_get_uint64(val_obj);
+
+	return p;
+}
+struct v4l2_dbg_chip_info *retrace_v4l2_dbg_chip_info_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_dbg_chip_info *p = (struct v4l2_dbg_chip_info *) calloc(1, sizeof(v4l2_dbg_chip_info));
+
+	json_object *v4l2_dbg_chip_info_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_dbg_chip_info", &v4l2_dbg_chip_info_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_dbg_chip_info_obj);
+
+	//struct v4l2_dbg_match match;
+	void *match_ptr = (void *) retrace_v4l2_dbg_match_gen(v4l2_dbg_chip_info_obj, "match");
+	p->match = *static_cast<struct v4l2_dbg_match*>(match_ptr);
+	free(match_ptr);
+
+	json_object *name_obj;
+	if (json_object_object_get_ex(v4l2_dbg_chip_info_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_dbg_chip_info_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	return p;
+}
+struct v4l2_create_buffers *retrace_v4l2_create_buffers_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_create_buffers *p = (struct v4l2_create_buffers *) calloc(1, sizeof(v4l2_create_buffers));
+
+	json_object *v4l2_create_buffers_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_create_buffers", &v4l2_create_buffers_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_create_buffers_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(v4l2_create_buffers_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	json_object *count_obj;
+	if (json_object_object_get_ex(v4l2_create_buffers_obj, "count", &count_obj))
+		p->count = (__u32) json_object_get_int64(count_obj);
+
+	json_object *memory_obj;
+	if (json_object_object_get_ex(v4l2_create_buffers_obj, "memory", &memory_obj))
+		p->memory = (__u32) s2val(json_object_get_string(memory_obj), v4l2_memory_val_def);
+	//struct v4l2_format	format;
+	void *format_ptr = (void *) retrace_v4l2_format_gen(v4l2_create_buffers_obj, "format");
+	p->format = *static_cast<struct v4l2_format*>(format_ptr);
+	free(format_ptr);
+
+	json_object *capabilities_obj;
+	if (json_object_object_get_ex(v4l2_create_buffers_obj, "capabilities", &capabilities_obj))
+		p->capabilities = (__u32) s2flags(json_object_get_string(capabilities_obj), v4l2_buf_cap_flag_def);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(v4l2_create_buffers_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), v4l2_memory_flag_def);
+
+	json_object *max_num_buffers_obj;
+	if (json_object_object_get_ex(v4l2_create_buffers_obj, "max_num_buffers", &max_num_buffers_obj))
+		p->max_num_buffers = (__u32) json_object_get_int64(max_num_buffers_obj);
+
+	return p;
+}
+struct media_device_info *retrace_media_device_info_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_device_info *p = (struct media_device_info *) calloc(1, sizeof(media_device_info));
+
+	json_object *media_device_info_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_device_info", &media_device_info_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_device_info_obj);
+
+	json_object *driver_obj;
+	if (json_object_object_get_ex(media_device_info_obj, "driver", &driver_obj))
+		if (json_object_get_string(driver_obj) != nullptr)
+			memcpy(p->driver, json_object_get_string(driver_obj), 16);
+
+	json_object *model_obj;
+	if (json_object_object_get_ex(media_device_info_obj, "model", &model_obj))
+		if (json_object_get_string(model_obj) != nullptr)
+			memcpy(p->model, json_object_get_string(model_obj), 32);
+
+	json_object *serial_obj;
+	if (json_object_object_get_ex(media_device_info_obj, "serial", &serial_obj))
+		if (json_object_get_string(serial_obj) != nullptr)
+			memcpy(p->serial, json_object_get_string(serial_obj), 40);
+
+	json_object *bus_info_obj;
+	if (json_object_object_get_ex(media_device_info_obj, "bus_info", &bus_info_obj))
+		if (json_object_get_string(bus_info_obj) != nullptr)
+			memcpy(p->bus_info, json_object_get_string(bus_info_obj), 32);
+
+	json_object *media_version_obj;
+	if (json_object_object_get_ex(media_device_info_obj, "media_version", &media_version_obj))
+		memset(&p->media_version, 0, sizeof(p->media_version));
+
+	json_object *hw_revision_obj;
+	if (json_object_object_get_ex(media_device_info_obj, "hw_revision", &hw_revision_obj))
+		p->hw_revision = (__u32) json_object_get_int64(hw_revision_obj);
+
+	json_object *driver_version_obj;
+	if (json_object_object_get_ex(media_device_info_obj, "driver_version", &driver_version_obj))
+		memset(&p->driver_version, 0, sizeof(p->driver_version));
+
+	return p;
+}
+struct media_entity_desc *retrace_media_entity_desc_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_entity_desc *p = (struct media_entity_desc *) calloc(1, sizeof(media_entity_desc));
+
+	json_object *media_entity_desc_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_entity_desc", &media_entity_desc_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_entity_desc_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *name_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 32);
+
+	json_object *type_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "type", &type_obj))
+		p->type = (__u32) s2val(json_object_get_string(type_obj), nullptr);
+	json_object *revision_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "revision", &revision_obj))
+		p->revision = (__u32) json_object_get_int64(revision_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	json_object *group_id_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "group_id", &group_id_obj))
+		p->group_id = (__u32) json_object_get_int64(group_id_obj);
+
+	json_object *pads_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "pads", &pads_obj))
+		p->pads = (__u16) json_object_get_int(pads_obj);
+
+	json_object *links_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "links", &links_obj))
+		p->links = (__u16) json_object_get_int(links_obj);
+
+	//union
+	//struct {
+	//__u32 major;
+	//__u32 minor;
+	//end of union 		} dev;
+	//struct {
+	//__u32 card;
+	//__u32 device;
+	//__u32 subdevice;
+	//end of struct 		} alsa;
+	//struct {
+	//__u32 major;
+	//__u32 minor;
+	//end of struct 		} v4l;
+	//struct {
+	//__u32 major;
+	//__u32 minor;
+	//end of struct 		} fb;
+	json_object *dvb_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "dvb", &dvb_obj))
+		p->dvb = (int) json_object_get_int(dvb_obj);
+
+	json_object *raw_obj;
+	if (json_object_object_get_ex(media_entity_desc_obj, "raw", &raw_obj))
+		if (json_object_get_string(raw_obj) != nullptr)
+			memcpy(p->raw, json_object_get_string(raw_obj), 184);
+
+	return p;
+}
+struct media_pad_desc *retrace_media_pad_desc_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_pad_desc *p = (struct media_pad_desc *) calloc(1, sizeof(media_pad_desc));
+
+	json_object *media_pad_desc_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_pad_desc", &media_pad_desc_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_pad_desc_obj);
+
+	json_object *entity_obj;
+	if (json_object_object_get_ex(media_pad_desc_obj, "entity", &entity_obj))
+		p->entity = (__u32) json_object_get_int64(entity_obj);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(media_pad_desc_obj, "index", &index_obj))
+		p->index = (__u16) json_object_get_int(index_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(media_pad_desc_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	return p;
+}
+struct media_link_desc *retrace_media_link_desc_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_link_desc *p = (struct media_link_desc *) calloc(1, sizeof(media_link_desc));
+
+	json_object *media_link_desc_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_link_desc", &media_link_desc_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_link_desc_obj);
+
+	//struct media_pad_desc source;
+	void *source_ptr = (void *) retrace_media_pad_desc_gen(media_link_desc_obj, "source");
+	p->source = *static_cast<struct media_pad_desc*>(source_ptr);
+	free(source_ptr);
+
+	//struct media_pad_desc sink;
+	void *sink_ptr = (void *) retrace_media_pad_desc_gen(media_link_desc_obj, "sink");
+	p->sink = *static_cast<struct media_pad_desc*>(sink_ptr);
+	free(sink_ptr);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(media_link_desc_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	return p;
+}
+struct media_links_enum *retrace_media_links_enum_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_links_enum *p = (struct media_links_enum *) calloc(1, sizeof(media_links_enum));
+
+	json_object *media_links_enum_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_links_enum", &media_links_enum_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_links_enum_obj);
+
+	json_object *entity_obj;
+	if (json_object_object_get_ex(media_links_enum_obj, "entity", &entity_obj))
+		p->entity = (__u32) json_object_get_int64(entity_obj);
+
+	//struct media_pad_desc *pads;
+	//struct media_link_desc *links;
+	return p;
+}
+struct media_v2_entity *retrace_media_v2_entity_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_v2_entity *p = (struct media_v2_entity *) calloc(1, sizeof(media_v2_entity));
+
+	json_object *media_v2_entity_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_v2_entity", &media_v2_entity_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_v2_entity_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(media_v2_entity_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *name_obj;
+	if (json_object_object_get_ex(media_v2_entity_obj, "name", &name_obj))
+		if (json_object_get_string(name_obj) != nullptr)
+			memcpy(p->name, json_object_get_string(name_obj), 64);
+
+	json_object *function_obj;
+	if (json_object_object_get_ex(media_v2_entity_obj, "function", &function_obj))
+		p->function = (__u32) json_object_get_int64(function_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(media_v2_entity_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	return p;
+}
+struct media_v2_intf_devnode *retrace_media_v2_intf_devnode_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_v2_intf_devnode *p = (struct media_v2_intf_devnode *) calloc(1, sizeof(media_v2_intf_devnode));
+
+	json_object *media_v2_intf_devnode_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_v2_intf_devnode", &media_v2_intf_devnode_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_v2_intf_devnode_obj);
+
+	json_object *major_obj;
+	if (json_object_object_get_ex(media_v2_intf_devnode_obj, "major", &major_obj))
+		p->major = (__u32) json_object_get_int64(major_obj);
+
+	json_object *minor_obj;
+	if (json_object_object_get_ex(media_v2_intf_devnode_obj, "minor", &minor_obj))
+		p->minor = (__u32) json_object_get_int64(minor_obj);
+
+	return p;
+}
+struct media_v2_interface *retrace_media_v2_interface_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_v2_interface *p = (struct media_v2_interface *) calloc(1, sizeof(media_v2_interface));
+
+	json_object *media_v2_interface_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_v2_interface", &media_v2_interface_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_v2_interface_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(media_v2_interface_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *intf_type_obj;
+	if (json_object_object_get_ex(media_v2_interface_obj, "intf_type", &intf_type_obj))
+		p->intf_type = (__u32) json_object_get_int64(intf_type_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(media_v2_interface_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	//union
+	//struct media_v2_intf_devnode devnode;
+	//__u32 raw[16];
+	//end of union 	};
+	return p;
+}
+struct media_v2_pad *retrace_media_v2_pad_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_v2_pad *p = (struct media_v2_pad *) calloc(1, sizeof(media_v2_pad));
+
+	json_object *media_v2_pad_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_v2_pad", &media_v2_pad_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_v2_pad_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(media_v2_pad_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *entity_id_obj;
+	if (json_object_object_get_ex(media_v2_pad_obj, "entity_id", &entity_id_obj))
+		p->entity_id = (__u32) json_object_get_int64(entity_id_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(media_v2_pad_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	json_object *index_obj;
+	if (json_object_object_get_ex(media_v2_pad_obj, "index", &index_obj))
+		p->index = (__u32) json_object_get_int64(index_obj);
+
+	return p;
+}
+struct media_v2_link *retrace_media_v2_link_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_v2_link *p = (struct media_v2_link *) calloc(1, sizeof(media_v2_link));
+
+	json_object *media_v2_link_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_v2_link", &media_v2_link_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_v2_link_obj);
+
+	json_object *id_obj;
+	if (json_object_object_get_ex(media_v2_link_obj, "id", &id_obj))
+		p->id = (__u32) s2val(json_object_get_string(id_obj), nullptr);
+	json_object *source_id_obj;
+	if (json_object_object_get_ex(media_v2_link_obj, "source_id", &source_id_obj))
+		p->source_id = (__u32) json_object_get_int64(source_id_obj);
+
+	json_object *sink_id_obj;
+	if (json_object_object_get_ex(media_v2_link_obj, "sink_id", &sink_id_obj))
+		p->sink_id = (__u32) json_object_get_int64(sink_id_obj);
+
+	json_object *flags_obj;
+	if (json_object_object_get_ex(media_v2_link_obj, "flags", &flags_obj))
+		p->flags = (__u32) s2flags(json_object_get_string(flags_obj), nullptr);
+
+	return p;
+}
+struct media_v2_topology *retrace_media_v2_topology_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct media_v2_topology *p = (struct media_v2_topology *) calloc(1, sizeof(media_v2_topology));
+
+	json_object *media_v2_topology_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "media_v2_topology", &media_v2_topology_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &media_v2_topology_obj);
+
+	json_object *topology_version_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "topology_version", &topology_version_obj))
+		memset(&p->topology_version, 0, sizeof(p->topology_version));
+
+	json_object *num_entities_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "num_entities", &num_entities_obj))
+		p->num_entities = (__u32) json_object_get_int64(num_entities_obj);
+
+	json_object *ptr_entities_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "ptr_entities", &ptr_entities_obj))
+		p->ptr_entities = (__u64) json_object_get_uint64(ptr_entities_obj);
+
+	json_object *num_interfaces_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "num_interfaces", &num_interfaces_obj))
+		p->num_interfaces = (__u32) json_object_get_int64(num_interfaces_obj);
+
+	json_object *ptr_interfaces_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "ptr_interfaces", &ptr_interfaces_obj))
+		p->ptr_interfaces = (__u64) json_object_get_uint64(ptr_interfaces_obj);
+
+	json_object *num_pads_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "num_pads", &num_pads_obj))
+		p->num_pads = (__u32) json_object_get_int64(num_pads_obj);
+
+	json_object *ptr_pads_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "ptr_pads", &ptr_pads_obj))
+		p->ptr_pads = (__u64) json_object_get_uint64(ptr_pads_obj);
+
+	json_object *num_links_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "num_links", &num_links_obj))
+		p->num_links = (__u32) json_object_get_int64(num_links_obj);
+
+	json_object *ptr_links_obj;
+	if (json_object_object_get_ex(media_v2_topology_obj, "ptr_links", &ptr_links_obj))
+		p->ptr_links = (__u64) json_object_get_uint64(ptr_links_obj);
+
+	return p;
+}
+struct v4l2_edid *retrace_v4l2_edid_gen(json_object *parent_obj, std::string key_name = "")
+{
+	struct v4l2_edid *p = (struct v4l2_edid *) calloc(1, sizeof(v4l2_edid));
+
+	json_object *v4l2_edid_obj;
+	if (key_name.empty())
+		json_object_object_get_ex(parent_obj, "v4l2_edid", &v4l2_edid_obj);
+	else
+		json_object_object_get_ex(parent_obj, key_name.c_str(), &v4l2_edid_obj);
+
+	json_object *pad_obj;
+	if (json_object_object_get_ex(v4l2_edid_obj, "pad", &pad_obj))
+		p->pad = (__u32) json_object_get_int64(pad_obj);
+
+	json_object *start_block_obj;
+	if (json_object_object_get_ex(v4l2_edid_obj, "start_block", &start_block_obj))
+		p->start_block = (__u32) json_object_get_int64(start_block_obj);
+
+	json_object *blocks_obj;
+	if (json_object_object_get_ex(v4l2_edid_obj, "blocks", &blocks_obj))
+		p->blocks = (__u32) json_object_get_int64(blocks_obj);
+
+	//__u8  *edid;
+	return p;
+}
diff --git a/utils/v4l2-tracer/retrace-gen.h b/utils/v4l2-tracer/retrace-gen.h
new file mode 100644
index 00000000..e2b2dbfc
--- /dev/null
+++ b/utils/v4l2-tracer/retrace-gen.h
@@ -0,0 +1,144 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright 2022 Collabora Ltd.
+ *
+ * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT
+ */
+
+#ifndef RETRACE_GEN_H
+#define RETRACE_GEN_H
+
+struct v4l2_ctrl_h264_sps *retrace_v4l2_ctrl_h264_sps_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_h264_pps *retrace_v4l2_ctrl_h264_pps_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_h264_scaling_matrix *retrace_v4l2_ctrl_h264_scaling_matrix_gen(json_object *ctrl_obj);
+struct v4l2_h264_weight_factors *retrace_v4l2_h264_weight_factors_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_h264_pred_weights *retrace_v4l2_ctrl_h264_pred_weights_gen(json_object *ctrl_obj);
+struct v4l2_h264_reference *retrace_v4l2_h264_reference_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_h264_slice_params *retrace_v4l2_ctrl_h264_slice_params_gen(json_object *ctrl_obj);
+struct v4l2_h264_dpb_entry *retrace_v4l2_h264_dpb_entry_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_h264_decode_params *retrace_v4l2_ctrl_h264_decode_params_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_fwht_params *retrace_v4l2_ctrl_fwht_params_gen(json_object *ctrl_obj);
+struct v4l2_vp8_segment *retrace_v4l2_vp8_segment_gen(json_object *ctrl_obj);
+struct v4l2_vp8_loop_filter *retrace_v4l2_vp8_loop_filter_gen(json_object *ctrl_obj);
+struct v4l2_vp8_quantization *retrace_v4l2_vp8_quantization_gen(json_object *ctrl_obj);
+struct v4l2_vp8_entropy *retrace_v4l2_vp8_entropy_gen(json_object *ctrl_obj);
+struct v4l2_vp8_entropy_coder_state *retrace_v4l2_vp8_entropy_coder_state_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_vp8_frame *retrace_v4l2_ctrl_vp8_frame_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_mpeg2_sequence *retrace_v4l2_ctrl_mpeg2_sequence_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_mpeg2_picture *retrace_v4l2_ctrl_mpeg2_picture_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_mpeg2_quantisation *retrace_v4l2_ctrl_mpeg2_quantisation_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hevc_sps *retrace_v4l2_ctrl_hevc_sps_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hevc_pps *retrace_v4l2_ctrl_hevc_pps_gen(json_object *ctrl_obj);
+struct v4l2_hevc_dpb_entry *retrace_v4l2_hevc_dpb_entry_gen(json_object *ctrl_obj);
+struct v4l2_hevc_pred_weight_table *retrace_v4l2_hevc_pred_weight_table_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hevc_slice_params *retrace_v4l2_ctrl_hevc_slice_params_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hevc_decode_params *retrace_v4l2_ctrl_hevc_decode_params_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hevc_scaling_matrix *retrace_v4l2_ctrl_hevc_scaling_matrix_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hdr10_cll_info *retrace_v4l2_ctrl_hdr10_cll_info_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hdr10_mastering_display *retrace_v4l2_ctrl_hdr10_mastering_display_gen(json_object *ctrl_obj);
+struct v4l2_vp9_loop_filter *retrace_v4l2_vp9_loop_filter_gen(json_object *ctrl_obj);
+struct v4l2_vp9_quantization *retrace_v4l2_vp9_quantization_gen(json_object *ctrl_obj);
+struct v4l2_vp9_segmentation *retrace_v4l2_vp9_segmentation_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_vp9_frame *retrace_v4l2_ctrl_vp9_frame_gen(json_object *ctrl_obj);
+struct v4l2_vp9_mv_probs *retrace_v4l2_vp9_mv_probs_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_vp9_compressed_hdr *retrace_v4l2_ctrl_vp9_compressed_hdr_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_av1_sequence *retrace_v4l2_ctrl_av1_sequence_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_av1_tile_group_entry *retrace_v4l2_ctrl_av1_tile_group_entry_gen(json_object *ctrl_obj);
+struct v4l2_av1_global_motion *retrace_v4l2_av1_global_motion_gen(json_object *ctrl_obj);
+struct v4l2_av1_loop_restoration *retrace_v4l2_av1_loop_restoration_gen(json_object *ctrl_obj);
+struct v4l2_av1_cdef *retrace_v4l2_av1_cdef_gen(json_object *ctrl_obj);
+struct v4l2_av1_segmentation *retrace_v4l2_av1_segmentation_gen(json_object *ctrl_obj);
+struct v4l2_av1_loop_filter *retrace_v4l2_av1_loop_filter_gen(json_object *ctrl_obj);
+struct v4l2_av1_quantization *retrace_v4l2_av1_quantization_gen(json_object *ctrl_obj);
+struct v4l2_av1_tile_info *retrace_v4l2_av1_tile_info_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_av1_frame *retrace_v4l2_ctrl_av1_frame_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_av1_film_grain *retrace_v4l2_ctrl_av1_film_grain_gen(json_object *ctrl_obj);
+struct v4l2_rect *retrace_v4l2_rect_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_fract *retrace_v4l2_fract_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_area *retrace_v4l2_area_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_capability *retrace_v4l2_capability_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_pix_format *retrace_v4l2_pix_format_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_fmtdesc *retrace_v4l2_fmtdesc_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_frmsize_discrete *retrace_v4l2_frmsize_discrete_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_frmsize_stepwise *retrace_v4l2_frmsize_stepwise_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_frmsizeenum *retrace_v4l2_frmsizeenum_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_frmival_stepwise *retrace_v4l2_frmival_stepwise_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_frmivalenum *retrace_v4l2_frmivalenum_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_timecode *retrace_v4l2_timecode_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_jpegcompression *retrace_v4l2_jpegcompression_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_requestbuffers *retrace_v4l2_requestbuffers_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_plane *retrace_v4l2_plane_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_buffer *retrace_v4l2_buffer_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_exportbuffer *retrace_v4l2_exportbuffer_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_framebuffer *retrace_v4l2_framebuffer_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_clip *retrace_v4l2_clip_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_window *retrace_v4l2_window_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_captureparm *retrace_v4l2_captureparm_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_outputparm *retrace_v4l2_outputparm_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_cropcap *retrace_v4l2_cropcap_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_crop *retrace_v4l2_crop_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_selection *retrace_v4l2_selection_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_standard *retrace_v4l2_standard_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_bt_timings *retrace_v4l2_bt_timings_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_dv_timings *retrace_v4l2_dv_timings_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_enum_dv_timings *retrace_v4l2_enum_dv_timings_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_bt_timings_cap *retrace_v4l2_bt_timings_cap_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_dv_timings_cap *retrace_v4l2_dv_timings_cap_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_input *retrace_v4l2_input_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_output *retrace_v4l2_output_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_control *retrace_v4l2_control_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_ext_control *retrace_v4l2_ext_control_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_ext_controls *retrace_v4l2_ext_controls_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_queryctrl *retrace_v4l2_queryctrl_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_query_ext_ctrl *retrace_v4l2_query_ext_ctrl_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_querymenu *retrace_v4l2_querymenu_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_tuner *retrace_v4l2_tuner_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_modulator *retrace_v4l2_modulator_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_frequency *retrace_v4l2_frequency_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_frequency_band *retrace_v4l2_frequency_band_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_hw_freq_seek *retrace_v4l2_hw_freq_seek_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_rds_data *retrace_v4l2_rds_data_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_audio *retrace_v4l2_audio_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_audioout *retrace_v4l2_audioout_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_enc_idx_entry *retrace_v4l2_enc_idx_entry_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_enc_idx *retrace_v4l2_enc_idx_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_encoder_cmd *retrace_v4l2_encoder_cmd_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_decoder_cmd *retrace_v4l2_decoder_cmd_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_vbi_format *retrace_v4l2_vbi_format_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_sliced_vbi_format *retrace_v4l2_sliced_vbi_format_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_sliced_vbi_cap *retrace_v4l2_sliced_vbi_cap_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_sliced_vbi_data *retrace_v4l2_sliced_vbi_data_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_mpeg_vbi_itv0_line *retrace_v4l2_mpeg_vbi_itv0_line_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_mpeg_vbi_itv0 *retrace_v4l2_mpeg_vbi_itv0_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_mpeg_vbi_fmt_ivtv *retrace_v4l2_mpeg_vbi_fmt_ivtv_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_plane_pix_format *retrace_v4l2_plane_pix_format_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_pix_format_mplane *retrace_v4l2_pix_format_mplane_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_sdr_format *retrace_v4l2_sdr_format_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_meta_format *retrace_v4l2_meta_format_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_format *retrace_v4l2_format_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_streamparm *retrace_v4l2_streamparm_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_event_vsync *retrace_v4l2_event_vsync_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_event_ctrl *retrace_v4l2_event_ctrl_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_event_frame_sync *retrace_v4l2_event_frame_sync_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_event_src_change *retrace_v4l2_event_src_change_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_event_motion_det *retrace_v4l2_event_motion_det_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_event *retrace_v4l2_event_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_event_subscription *retrace_v4l2_event_subscription_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_dbg_match *retrace_v4l2_dbg_match_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_dbg_register *retrace_v4l2_dbg_register_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_dbg_chip_info *retrace_v4l2_dbg_chip_info_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_create_buffers *retrace_v4l2_create_buffers_gen(json_object *parent_obj, std::string key_name = "");
+struct media_device_info *retrace_media_device_info_gen(json_object *parent_obj, std::string key_name = "");
+struct media_entity_desc *retrace_media_entity_desc_gen(json_object *parent_obj, std::string key_name = "");
+struct media_pad_desc *retrace_media_pad_desc_gen(json_object *parent_obj, std::string key_name = "");
+struct media_link_desc *retrace_media_link_desc_gen(json_object *parent_obj, std::string key_name = "");
+struct media_links_enum *retrace_media_links_enum_gen(json_object *parent_obj, std::string key_name = "");
+struct media_v2_entity *retrace_media_v2_entity_gen(json_object *parent_obj, std::string key_name = "");
+struct media_v2_intf_devnode *retrace_media_v2_intf_devnode_gen(json_object *parent_obj, std::string key_name = "");
+struct media_v2_interface *retrace_media_v2_interface_gen(json_object *parent_obj, std::string key_name = "");
+struct media_v2_pad *retrace_media_v2_pad_gen(json_object *parent_obj, std::string key_name = "");
+struct media_v2_link *retrace_media_v2_link_gen(json_object *parent_obj, std::string key_name = "");
+struct media_v2_topology *retrace_media_v2_topology_gen(json_object *parent_obj, std::string key_name = "");
+struct v4l2_edid *retrace_v4l2_edid_gen(json_object *parent_obj, std::string key_name = "");
+
+#endif
diff --git a/utils/v4l2-tracer/trace-gen.cpp b/utils/v4l2-tracer/trace-gen.cpp
new file mode 100644
index 00000000..6fc4d4a1
--- /dev/null
+++ b/utils/v4l2-tracer/trace-gen.cpp
@@ -0,0 +1,3225 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright 2022 Collabora Ltd.
+ *
+ * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT
+ */
+
+#include "v4l2-tracer-common.h"
+
+void trace_v4l2_ctrl_h264_sps_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_h264_sps_obj = json_object_new_object();
+	struct v4l2_ctrl_h264_sps *p = static_cast<struct v4l2_ctrl_h264_sps*>(ptr);
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "profile_idc", json_object_new_int(p->profile_idc));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "constraint_set_flags", json_object_new_string(fl2s(p->constraint_set_flags, v4l2_h264_sps_flag_def).c_str()));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "level_idc", json_object_new_int(p->level_idc));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "seq_parameter_set_id", json_object_new_int(p->seq_parameter_set_id));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "chroma_format_idc", json_object_new_int(p->chroma_format_idc));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "bit_depth_luma_minus8", json_object_new_int(p->bit_depth_luma_minus8));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "bit_depth_chroma_minus8", json_object_new_int(p->bit_depth_chroma_minus8));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "log2_max_frame_num_minus4", json_object_new_int(p->log2_max_frame_num_minus4));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "pic_order_cnt_type", json_object_new_int(p->pic_order_cnt_type));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "log2_max_pic_order_cnt_lsb_minus4", json_object_new_int(p->log2_max_pic_order_cnt_lsb_minus4));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "max_num_ref_frames", json_object_new_int(p->max_num_ref_frames));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "num_ref_frames_in_pic_order_cnt_cycle", json_object_new_int(p->num_ref_frames_in_pic_order_cnt_cycle));
+	/* __s32 offset_for_ref_frame[255] */
+	json_object *offset_for_ref_frame_obj = json_object_new_array();
+	for (size_t i = 0; i < 255; i++) {
+		json_object_array_add(offset_for_ref_frame_obj, json_object_new_int(p->offset_for_ref_frame[i]));
+	}
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "offset_for_ref_frame", offset_for_ref_frame_obj);
+
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "offset_for_non_ref_pic", json_object_new_int(p->offset_for_non_ref_pic));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "offset_for_top_to_bottom_field", json_object_new_int(p->offset_for_top_to_bottom_field));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "pic_width_in_mbs_minus1", json_object_new_int(p->pic_width_in_mbs_minus1));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "pic_height_in_map_units_minus1", json_object_new_int(p->pic_height_in_map_units_minus1));
+	json_object_object_add(v4l2_ctrl_h264_sps_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_h264_sps_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_h264_sps", v4l2_ctrl_h264_sps_obj);
+}
+
+void trace_v4l2_ctrl_h264_pps_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_h264_pps_obj = json_object_new_object();
+	struct v4l2_ctrl_h264_pps *p = static_cast<struct v4l2_ctrl_h264_pps*>(ptr);
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "pic_parameter_set_id", json_object_new_int(p->pic_parameter_set_id));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "seq_parameter_set_id", json_object_new_int(p->seq_parameter_set_id));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "num_slice_groups_minus1", json_object_new_int(p->num_slice_groups_minus1));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "num_ref_idx_l0_default_active_minus1", json_object_new_int(p->num_ref_idx_l0_default_active_minus1));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "num_ref_idx_l1_default_active_minus1", json_object_new_int(p->num_ref_idx_l1_default_active_minus1));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "weighted_bipred_idc", json_object_new_int(p->weighted_bipred_idc));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "pic_init_qp_minus26", json_object_new_int(p->pic_init_qp_minus26));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "pic_init_qs_minus26", json_object_new_int(p->pic_init_qs_minus26));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "chroma_qp_index_offset", json_object_new_int(p->chroma_qp_index_offset));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "second_chroma_qp_index_offset", json_object_new_int(p->second_chroma_qp_index_offset));
+	json_object_object_add(v4l2_ctrl_h264_pps_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_h264_pps_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_h264_pps", v4l2_ctrl_h264_pps_obj);
+}
+
+void trace_v4l2_ctrl_h264_scaling_matrix_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_h264_scaling_matrix_obj = json_object_new_object();
+	struct v4l2_ctrl_h264_scaling_matrix *p = static_cast<struct v4l2_ctrl_h264_scaling_matrix*>(ptr);
+	/* __u8 scaling_list_4x4[6][16] */
+	json_object *scaling_list_4x4_obj = json_object_new_array();
+	for (size_t i = 0; i < 6; i++) {
+		for (size_t j = 0; j < 16; j++) {
+			json_object_array_add(scaling_list_4x4_obj, json_object_new_int(p->scaling_list_4x4[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_h264_scaling_matrix_obj, "scaling_list_4x4", scaling_list_4x4_obj);
+
+	/* __u8 scaling_list_8x8[6][64] */
+	json_object *scaling_list_8x8_obj = json_object_new_array();
+	for (size_t i = 0; i < 6; i++) {
+		for (size_t j = 0; j < 64; j++) {
+			json_object_array_add(scaling_list_8x8_obj, json_object_new_int(p->scaling_list_8x8[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_h264_scaling_matrix_obj, "scaling_list_8x8", scaling_list_8x8_obj);
+
+	json_object_object_add(parent_obj, "v4l2_ctrl_h264_scaling_matrix", v4l2_ctrl_h264_scaling_matrix_obj);
+}
+
+void trace_v4l2_h264_weight_factors_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_h264_weight_factors_obj = json_object_new_object();
+	struct v4l2_h264_weight_factors *p = static_cast<struct v4l2_h264_weight_factors*>(ptr);
+	/* __s16 luma_weight[32] */
+	json_object *luma_weight_obj = json_object_new_array();
+	for (size_t i = 0; i < 32; i++) {
+		json_object_array_add(luma_weight_obj, json_object_new_int(p->luma_weight[i]));
+	}
+	json_object_object_add(v4l2_h264_weight_factors_obj, "luma_weight", luma_weight_obj);
+
+	/* __s16 luma_offset[32] */
+	json_object *luma_offset_obj = json_object_new_array();
+	for (size_t i = 0; i < 32; i++) {
+		json_object_array_add(luma_offset_obj, json_object_new_int(p->luma_offset[i]));
+	}
+	json_object_object_add(v4l2_h264_weight_factors_obj, "luma_offset", luma_offset_obj);
+
+	/* __s16 chroma_weight[32][2] */
+	json_object *chroma_weight_obj = json_object_new_array();
+	for (size_t i = 0; i < 32; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(chroma_weight_obj, json_object_new_int(p->chroma_weight[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_h264_weight_factors_obj, "chroma_weight", chroma_weight_obj);
+
+	/* __s16 chroma_offset[32][2] */
+	json_object *chroma_offset_obj = json_object_new_array();
+	for (size_t i = 0; i < 32; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(chroma_offset_obj, json_object_new_int(p->chroma_offset[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_h264_weight_factors_obj, "chroma_offset", chroma_offset_obj);
+
+	json_object_object_add(parent_obj, "v4l2_h264_weight_factors", v4l2_h264_weight_factors_obj);
+}
+
+void trace_v4l2_ctrl_h264_pred_weights_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_h264_pred_weights_obj = json_object_new_object();
+	struct v4l2_ctrl_h264_pred_weights *p = static_cast<struct v4l2_ctrl_h264_pred_weights*>(ptr);
+	json_object_object_add(v4l2_ctrl_h264_pred_weights_obj, "luma_log2_weight_denom", json_object_new_int(p->luma_log2_weight_denom));
+	json_object_object_add(v4l2_ctrl_h264_pred_weights_obj, "chroma_log2_weight_denom", json_object_new_int(p->chroma_log2_weight_denom));
+	/* struct v4l2_h264_weight_factors weight_factors[2] */
+	json_object *weight_factors_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object *element_obj = json_object_new_object();
+		trace_v4l2_h264_weight_factors_gen(&(p->weight_factors[i]), element_obj);
+		json_object *element_no_key_obj;
+		json_object_object_get_ex(element_obj, "v4l2_h264_weight_factors", &element_no_key_obj);
+		json_object_array_add(weight_factors_obj, element_no_key_obj);
+	}
+	json_object_object_add(v4l2_ctrl_h264_pred_weights_obj, "weight_factors", weight_factors_obj);
+
+	json_object_object_add(parent_obj, "v4l2_ctrl_h264_pred_weights", v4l2_ctrl_h264_pred_weights_obj);
+}
+
+void trace_v4l2_h264_reference_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_h264_reference_obj = json_object_new_object();
+	struct v4l2_h264_reference *p = static_cast<struct v4l2_h264_reference*>(ptr);
+	json_object_object_add(v4l2_h264_reference_obj, "fields", json_object_new_int(p->fields));
+	json_object_object_add(v4l2_h264_reference_obj, "index", json_object_new_int(p->index));
+	json_object_object_add(parent_obj, "v4l2_h264_reference", v4l2_h264_reference_obj);
+}
+
+void trace_v4l2_ctrl_h264_slice_params_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_h264_slice_params_obj = json_object_new_object();
+	struct v4l2_ctrl_h264_slice_params *p = static_cast<struct v4l2_ctrl_h264_slice_params*>(ptr);
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "header_bit_size", json_object_new_int64(p->header_bit_size));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "first_mb_in_slice", json_object_new_int64(p->first_mb_in_slice));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "slice_type", json_object_new_int(p->slice_type));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "colour_plane_id", json_object_new_int(p->colour_plane_id));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "redundant_pic_cnt", json_object_new_int(p->redundant_pic_cnt));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "cabac_init_idc", json_object_new_int(p->cabac_init_idc));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "slice_qp_delta", json_object_new_int(p->slice_qp_delta));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "slice_qs_delta", json_object_new_int(p->slice_qs_delta));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "disable_deblocking_filter_idc", json_object_new_int(p->disable_deblocking_filter_idc));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "slice_alpha_c0_offset_div2", json_object_new_int(p->slice_alpha_c0_offset_div2));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "slice_beta_offset_div2", json_object_new_int(p->slice_beta_offset_div2));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "num_ref_idx_l0_active_minus1", json_object_new_int(p->num_ref_idx_l0_active_minus1));
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "num_ref_idx_l1_active_minus1", json_object_new_int(p->num_ref_idx_l1_active_minus1));
+	/* struct v4l2_h264_reference ref_pic_list0[V4L2_H264_REF_LIST_LEN] */
+	json_object *ref_pic_list0_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_H264_REF_LIST_LEN; i++) {
+		json_object *element_obj = json_object_new_object();
+		trace_v4l2_h264_reference_gen(&(p->ref_pic_list0[i]), element_obj);
+		json_object *element_no_key_obj;
+		json_object_object_get_ex(element_obj, "v4l2_h264_reference", &element_no_key_obj);
+		json_object_array_add(ref_pic_list0_obj, element_no_key_obj);
+	}
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "ref_pic_list0", ref_pic_list0_obj);
+
+	/* struct v4l2_h264_reference ref_pic_list1[V4L2_H264_REF_LIST_LEN] */
+	json_object *ref_pic_list1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_H264_REF_LIST_LEN; i++) {
+		json_object *element_obj = json_object_new_object();
+		trace_v4l2_h264_reference_gen(&(p->ref_pic_list1[i]), element_obj);
+		json_object *element_no_key_obj;
+		json_object_object_get_ex(element_obj, "v4l2_h264_reference", &element_no_key_obj);
+		json_object_array_add(ref_pic_list1_obj, element_no_key_obj);
+	}
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "ref_pic_list1", ref_pic_list1_obj);
+
+	json_object_object_add(v4l2_ctrl_h264_slice_params_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_h264_slice_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_h264_slice_params", v4l2_ctrl_h264_slice_params_obj);
+}
+
+void trace_v4l2_h264_dpb_entry_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_h264_dpb_entry_obj = json_object_new_object();
+	struct v4l2_h264_dpb_entry *p = static_cast<struct v4l2_h264_dpb_entry*>(ptr);
+	json_object_object_add(v4l2_h264_dpb_entry_obj, "reference_ts", json_object_new_uint64(p->reference_ts));
+	json_object_object_add(v4l2_h264_dpb_entry_obj, "pic_num", json_object_new_int64(p->pic_num));
+	json_object_object_add(v4l2_h264_dpb_entry_obj, "frame_num", json_object_new_int(p->frame_num));
+	json_object_object_add(v4l2_h264_dpb_entry_obj, "fields", json_object_new_int(p->fields));
+	json_object_object_add(v4l2_h264_dpb_entry_obj, "top_field_order_cnt", json_object_new_int(p->top_field_order_cnt));
+	json_object_object_add(v4l2_h264_dpb_entry_obj, "bottom_field_order_cnt", json_object_new_int(p->bottom_field_order_cnt));
+	json_object_object_add(v4l2_h264_dpb_entry_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_h264_dpb_entry_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_h264_dpb_entry", v4l2_h264_dpb_entry_obj);
+}
+
+void trace_v4l2_ctrl_h264_decode_params_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_h264_decode_params_obj = json_object_new_object();
+	struct v4l2_ctrl_h264_decode_params *p = static_cast<struct v4l2_ctrl_h264_decode_params*>(ptr);
+	/* struct v4l2_h264_dpb_entry dpb[V4L2_H264_NUM_DPB_ENTRIES] */
+	json_object *dpb_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_H264_NUM_DPB_ENTRIES; i++) {
+		json_object *element_obj = json_object_new_object();
+		trace_v4l2_h264_dpb_entry_gen(&(p->dpb[i]), element_obj);
+		json_object *element_no_key_obj;
+		json_object_object_get_ex(element_obj, "v4l2_h264_dpb_entry", &element_no_key_obj);
+		json_object_array_add(dpb_obj, element_no_key_obj);
+	}
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "dpb", dpb_obj);
+
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "nal_ref_idc", json_object_new_int(p->nal_ref_idc));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "frame_num", json_object_new_int(p->frame_num));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "top_field_order_cnt", json_object_new_int(p->top_field_order_cnt));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "bottom_field_order_cnt", json_object_new_int(p->bottom_field_order_cnt));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "idr_pic_id", json_object_new_int(p->idr_pic_id));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "pic_order_cnt_lsb", json_object_new_int(p->pic_order_cnt_lsb));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "delta_pic_order_cnt_bottom", json_object_new_int(p->delta_pic_order_cnt_bottom));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "delta_pic_order_cnt0", json_object_new_int(p->delta_pic_order_cnt0));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "delta_pic_order_cnt1", json_object_new_int(p->delta_pic_order_cnt1));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "dec_ref_pic_marking_bit_size", json_object_new_int64(p->dec_ref_pic_marking_bit_size));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "pic_order_cnt_bit_size", json_object_new_int64(p->pic_order_cnt_bit_size));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "slice_group_change_cycle", json_object_new_int64(p->slice_group_change_cycle));
+	json_object_object_add(v4l2_ctrl_h264_decode_params_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_h264_decode_param_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_h264_decode_params", v4l2_ctrl_h264_decode_params_obj);
+}
+
+void trace_v4l2_ctrl_fwht_params_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_fwht_params_obj = json_object_new_object();
+	struct v4l2_ctrl_fwht_params *p = static_cast<struct v4l2_ctrl_fwht_params*>(ptr);
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "backward_ref_ts", json_object_new_uint64(p->backward_ref_ts));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "version", json_object_new_int64(p->version));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "height", json_object_new_int64(p->height));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "flags", json_object_new_string(fl2s_fwht(p->flags).c_str()));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "colorspace", json_object_new_string(val2s(p->colorspace, v4l2_colorspace_val_def).c_str()));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "xfer_func", json_object_new_string(val2s(p->xfer_func, v4l2_xfer_func_val_def).c_str()));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "ycbcr_enc", json_object_new_string(val2s(p->ycbcr_enc, v4l2_ycbcr_encoding_val_def).c_str()));
+	json_object_object_add(v4l2_ctrl_fwht_params_obj, "quantization", json_object_new_string(val2s(p->quantization, v4l2_quantization_val_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_fwht_params", v4l2_ctrl_fwht_params_obj);
+}
+
+void trace_v4l2_vp8_segment_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp8_segment_obj = json_object_new_object();
+	struct v4l2_vp8_segment *p = static_cast<struct v4l2_vp8_segment*>(ptr);
+	/* __s8 quant_update[4] */
+	json_object *quant_update_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(quant_update_obj, json_object_new_int(p->quant_update[i]));
+	}
+	json_object_object_add(v4l2_vp8_segment_obj, "quant_update", quant_update_obj);
+
+	/* __s8 lf_update[4] */
+	json_object *lf_update_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(lf_update_obj, json_object_new_int(p->lf_update[i]));
+	}
+	json_object_object_add(v4l2_vp8_segment_obj, "lf_update", lf_update_obj);
+
+	/* __u8 segment_probs[3] */
+	json_object *segment_probs_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(segment_probs_obj, json_object_new_int(p->segment_probs[i]));
+	}
+	json_object_object_add(v4l2_vp8_segment_obj, "segment_probs", segment_probs_obj);
+
+	json_object_object_add(v4l2_vp8_segment_obj, "padding", json_object_new_int(p->padding));
+	json_object_object_add(v4l2_vp8_segment_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_vp8_segment_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_vp8_segment", v4l2_vp8_segment_obj);
+}
+
+void trace_v4l2_vp8_loop_filter_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp8_loop_filter_obj = json_object_new_object();
+	struct v4l2_vp8_loop_filter *p = static_cast<struct v4l2_vp8_loop_filter*>(ptr);
+	/* __s8 ref_frm_delta[4] */
+	json_object *ref_frm_delta_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(ref_frm_delta_obj, json_object_new_int(p->ref_frm_delta[i]));
+	}
+	json_object_object_add(v4l2_vp8_loop_filter_obj, "ref_frm_delta", ref_frm_delta_obj);
+
+	/* __s8 mb_mode_delta[4] */
+	json_object *mb_mode_delta_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(mb_mode_delta_obj, json_object_new_int(p->mb_mode_delta[i]));
+	}
+	json_object_object_add(v4l2_vp8_loop_filter_obj, "mb_mode_delta", mb_mode_delta_obj);
+
+	json_object_object_add(v4l2_vp8_loop_filter_obj, "sharpness_level", json_object_new_int(p->sharpness_level));
+	json_object_object_add(v4l2_vp8_loop_filter_obj, "level", json_object_new_int(p->level));
+	json_object_object_add(v4l2_vp8_loop_filter_obj, "padding", json_object_new_int(p->padding));
+	json_object_object_add(v4l2_vp8_loop_filter_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_vp8_loop_filter_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_vp8_loop_filter", v4l2_vp8_loop_filter_obj);
+}
+
+void trace_v4l2_vp8_quantization_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp8_quantization_obj = json_object_new_object();
+	struct v4l2_vp8_quantization *p = static_cast<struct v4l2_vp8_quantization*>(ptr);
+	json_object_object_add(v4l2_vp8_quantization_obj, "y_ac_qi", json_object_new_int(p->y_ac_qi));
+	json_object_object_add(v4l2_vp8_quantization_obj, "y_dc_delta", json_object_new_int(p->y_dc_delta));
+	json_object_object_add(v4l2_vp8_quantization_obj, "y2_dc_delta", json_object_new_int(p->y2_dc_delta));
+	json_object_object_add(v4l2_vp8_quantization_obj, "y2_ac_delta", json_object_new_int(p->y2_ac_delta));
+	json_object_object_add(v4l2_vp8_quantization_obj, "uv_dc_delta", json_object_new_int(p->uv_dc_delta));
+	json_object_object_add(v4l2_vp8_quantization_obj, "uv_ac_delta", json_object_new_int(p->uv_ac_delta));
+	json_object_object_add(v4l2_vp8_quantization_obj, "padding", json_object_new_int(p->padding));
+	json_object_object_add(parent_obj, "v4l2_vp8_quantization", v4l2_vp8_quantization_obj);
+}
+
+void trace_v4l2_vp8_entropy_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp8_entropy_obj = json_object_new_object();
+	struct v4l2_vp8_entropy *p = static_cast<struct v4l2_vp8_entropy*>(ptr);
+	/* __u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT] */
+	json_object *coeff_probs_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		for (size_t j = 0; j < 8; j++) {
+			for (size_t k = 0; k < 3; k++) {
+				for (size_t l = 0; l < V4L2_VP8_COEFF_PROB_CNT; l++) {
+					json_object_array_add(coeff_probs_obj, json_object_new_int(p->coeff_probs[i][j][k][l]));
+				}
+			}
+		}
+	}
+	json_object_object_add(v4l2_vp8_entropy_obj, "coeff_probs", coeff_probs_obj);
+
+	/* __u8 y_mode_probs[4] */
+	json_object *y_mode_probs_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(y_mode_probs_obj, json_object_new_int(p->y_mode_probs[i]));
+	}
+	json_object_object_add(v4l2_vp8_entropy_obj, "y_mode_probs", y_mode_probs_obj);
+
+	/* __u8 uv_mode_probs[3] */
+	json_object *uv_mode_probs_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(uv_mode_probs_obj, json_object_new_int(p->uv_mode_probs[i]));
+	}
+	json_object_object_add(v4l2_vp8_entropy_obj, "uv_mode_probs", uv_mode_probs_obj);
+
+	/* __u8 mv_probs[2][V4L2_VP8_MV_PROB_CNT] */
+	json_object *mv_probs_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < V4L2_VP8_MV_PROB_CNT; j++) {
+			json_object_array_add(mv_probs_obj, json_object_new_int(p->mv_probs[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_vp8_entropy_obj, "mv_probs", mv_probs_obj);
+
+	/* __u8 padding[3] */
+	json_object *padding_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(padding_obj, json_object_new_int(p->padding[i]));
+	}
+	json_object_object_add(v4l2_vp8_entropy_obj, "padding", padding_obj);
+
+	json_object_object_add(parent_obj, "v4l2_vp8_entropy", v4l2_vp8_entropy_obj);
+}
+
+void trace_v4l2_vp8_entropy_coder_state_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp8_entropy_coder_state_obj = json_object_new_object();
+	struct v4l2_vp8_entropy_coder_state *p = static_cast<struct v4l2_vp8_entropy_coder_state*>(ptr);
+	json_object_object_add(v4l2_vp8_entropy_coder_state_obj, "range", json_object_new_int(p->range));
+	json_object_object_add(v4l2_vp8_entropy_coder_state_obj, "value", json_object_new_int(p->value));
+	json_object_object_add(v4l2_vp8_entropy_coder_state_obj, "bit_count", json_object_new_int(p->bit_count));
+	json_object_object_add(v4l2_vp8_entropy_coder_state_obj, "padding", json_object_new_int(p->padding));
+	json_object_object_add(parent_obj, "v4l2_vp8_entropy_coder_state", v4l2_vp8_entropy_coder_state_obj);
+}
+
+void trace_v4l2_ctrl_vp8_frame_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_vp8_frame_obj = json_object_new_object();
+	struct v4l2_ctrl_vp8_frame *p = static_cast<struct v4l2_ctrl_vp8_frame*>(ptr);
+	/* struct v4l2_vp8_segment segment */
+	trace_v4l2_vp8_segment_gen(&p->segment, v4l2_ctrl_vp8_frame_obj);
+	/* struct v4l2_vp8_loop_filter lf */
+	trace_v4l2_vp8_loop_filter_gen(&p->lf, v4l2_ctrl_vp8_frame_obj);
+	/* struct v4l2_vp8_quantization quant */
+	trace_v4l2_vp8_quantization_gen(&p->quant, v4l2_ctrl_vp8_frame_obj);
+	/* struct v4l2_vp8_entropy entropy */
+	trace_v4l2_vp8_entropy_gen(&p->entropy, v4l2_ctrl_vp8_frame_obj);
+	/* struct v4l2_vp8_entropy_coder_state coder_state */
+	trace_v4l2_vp8_entropy_coder_state_gen(&p->coder_state, v4l2_ctrl_vp8_frame_obj);
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "width", json_object_new_int(p->width));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "height", json_object_new_int(p->height));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "horizontal_scale", json_object_new_int(p->horizontal_scale));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "vertical_scale", json_object_new_int(p->vertical_scale));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "version", json_object_new_int(p->version));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "prob_skip_false", json_object_new_int(p->prob_skip_false));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "prob_intra", json_object_new_int(p->prob_intra));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "prob_last", json_object_new_int(p->prob_last));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "prob_gf", json_object_new_int(p->prob_gf));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "num_dct_parts", json_object_new_int(p->num_dct_parts));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "first_part_size", json_object_new_int64(p->first_part_size));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "first_part_header_bits", json_object_new_int64(p->first_part_header_bits));
+	/* __u32 dct_part_sizes[8] */
+	json_object *dct_part_sizes_obj = json_object_new_array();
+	for (size_t i = 0; i < 8; i++) {
+		json_object_array_add(dct_part_sizes_obj, json_object_new_int64(p->dct_part_sizes[i]));
+	}
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "dct_part_sizes", dct_part_sizes_obj);
+
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "last_frame_ts", json_object_new_uint64(p->last_frame_ts));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "golden_frame_ts", json_object_new_uint64(p->golden_frame_ts));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "alt_frame_ts", json_object_new_uint64(p->alt_frame_ts));
+	json_object_object_add(v4l2_ctrl_vp8_frame_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_vp8_frame_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_vp8_frame", v4l2_ctrl_vp8_frame_obj);
+}
+
+void trace_v4l2_ctrl_mpeg2_sequence_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_mpeg2_sequence_obj = json_object_new_object();
+	struct v4l2_ctrl_mpeg2_sequence *p = static_cast<struct v4l2_ctrl_mpeg2_sequence*>(ptr);
+	json_object_object_add(v4l2_ctrl_mpeg2_sequence_obj, "horizontal_size", json_object_new_int(p->horizontal_size));
+	json_object_object_add(v4l2_ctrl_mpeg2_sequence_obj, "vertical_size", json_object_new_int(p->vertical_size));
+	json_object_object_add(v4l2_ctrl_mpeg2_sequence_obj, "vbv_buffer_size", json_object_new_int64(p->vbv_buffer_size));
+	json_object_object_add(v4l2_ctrl_mpeg2_sequence_obj, "profile_and_level_indication", json_object_new_int(p->profile_and_level_indication));
+	json_object_object_add(v4l2_ctrl_mpeg2_sequence_obj, "chroma_format", json_object_new_int(p->chroma_format));
+	json_object_object_add(v4l2_ctrl_mpeg2_sequence_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_mpeg2_seq_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_mpeg2_sequence", v4l2_ctrl_mpeg2_sequence_obj);
+}
+
+void trace_v4l2_ctrl_mpeg2_picture_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_mpeg2_picture_obj = json_object_new_object();
+	struct v4l2_ctrl_mpeg2_picture *p = static_cast<struct v4l2_ctrl_mpeg2_picture*>(ptr);
+	json_object_object_add(v4l2_ctrl_mpeg2_picture_obj, "backward_ref_ts", json_object_new_uint64(p->backward_ref_ts));
+	json_object_object_add(v4l2_ctrl_mpeg2_picture_obj, "forward_ref_ts", json_object_new_uint64(p->forward_ref_ts));
+	json_object_object_add(v4l2_ctrl_mpeg2_picture_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_mpeg2_pic_flag_def).c_str()));
+	/* __u8	f_code[2][2] */
+	json_object *f_code_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(f_code_obj, json_object_new_int(p->f_code[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_mpeg2_picture_obj, "f_code", f_code_obj);
+
+	json_object_object_add(v4l2_ctrl_mpeg2_picture_obj, "picture_coding_type", json_object_new_int(p->picture_coding_type));
+	json_object_object_add(v4l2_ctrl_mpeg2_picture_obj, "picture_structure", json_object_new_int(p->picture_structure));
+	json_object_object_add(v4l2_ctrl_mpeg2_picture_obj, "intra_dc_precision", json_object_new_int(p->intra_dc_precision));
+	json_object_object_add(parent_obj, "v4l2_ctrl_mpeg2_picture", v4l2_ctrl_mpeg2_picture_obj);
+}
+
+void trace_v4l2_ctrl_mpeg2_quantisation_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_mpeg2_quantisation_obj = json_object_new_object();
+	struct v4l2_ctrl_mpeg2_quantisation *p = static_cast<struct v4l2_ctrl_mpeg2_quantisation*>(ptr);
+	/* __u8	intra_quantiser_matrix[64] */
+	json_object *intra_quantiser_matrix_obj = json_object_new_array();
+	for (size_t i = 0; i < 64; i++) {
+		json_object_array_add(intra_quantiser_matrix_obj, json_object_new_int(p->intra_quantiser_matrix[i]));
+	}
+	json_object_object_add(v4l2_ctrl_mpeg2_quantisation_obj, "intra_quantiser_matrix", intra_quantiser_matrix_obj);
+
+	/* __u8	non_intra_quantiser_matrix[64] */
+	json_object *non_intra_quantiser_matrix_obj = json_object_new_array();
+	for (size_t i = 0; i < 64; i++) {
+		json_object_array_add(non_intra_quantiser_matrix_obj, json_object_new_int(p->non_intra_quantiser_matrix[i]));
+	}
+	json_object_object_add(v4l2_ctrl_mpeg2_quantisation_obj, "non_intra_quantiser_matrix", non_intra_quantiser_matrix_obj);
+
+	/* __u8	chroma_intra_quantiser_matrix[64] */
+	json_object *chroma_intra_quantiser_matrix_obj = json_object_new_array();
+	for (size_t i = 0; i < 64; i++) {
+		json_object_array_add(chroma_intra_quantiser_matrix_obj, json_object_new_int(p->chroma_intra_quantiser_matrix[i]));
+	}
+	json_object_object_add(v4l2_ctrl_mpeg2_quantisation_obj, "chroma_intra_quantiser_matrix", chroma_intra_quantiser_matrix_obj);
+
+	/* __u8	chroma_non_intra_quantiser_matrix[64] */
+	json_object *chroma_non_intra_quantiser_matrix_obj = json_object_new_array();
+	for (size_t i = 0; i < 64; i++) {
+		json_object_array_add(chroma_non_intra_quantiser_matrix_obj, json_object_new_int(p->chroma_non_intra_quantiser_matrix[i]));
+	}
+	json_object_object_add(v4l2_ctrl_mpeg2_quantisation_obj, "chroma_non_intra_quantiser_matrix", chroma_non_intra_quantiser_matrix_obj);
+
+	json_object_object_add(parent_obj, "v4l2_ctrl_mpeg2_quantisation", v4l2_ctrl_mpeg2_quantisation_obj);
+}
+
+void trace_v4l2_ctrl_hevc_sps_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_hevc_sps_obj = json_object_new_object();
+	struct v4l2_ctrl_hevc_sps *p = static_cast<struct v4l2_ctrl_hevc_sps*>(ptr);
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "video_parameter_set_id", json_object_new_int(p->video_parameter_set_id));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "seq_parameter_set_id", json_object_new_int(p->seq_parameter_set_id));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "pic_width_in_luma_samples", json_object_new_int(p->pic_width_in_luma_samples));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "pic_height_in_luma_samples", json_object_new_int(p->pic_height_in_luma_samples));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "bit_depth_luma_minus8", json_object_new_int(p->bit_depth_luma_minus8));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "bit_depth_chroma_minus8", json_object_new_int(p->bit_depth_chroma_minus8));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "log2_max_pic_order_cnt_lsb_minus4", json_object_new_int(p->log2_max_pic_order_cnt_lsb_minus4));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "sps_max_dec_pic_buffering_minus1", json_object_new_int(p->sps_max_dec_pic_buffering_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "sps_max_num_reorder_pics", json_object_new_int(p->sps_max_num_reorder_pics));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "sps_max_latency_increase_plus1", json_object_new_int(p->sps_max_latency_increase_plus1));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "log2_min_luma_coding_block_size_minus3", json_object_new_int(p->log2_min_luma_coding_block_size_minus3));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "log2_diff_max_min_luma_coding_block_size", json_object_new_int(p->log2_diff_max_min_luma_coding_block_size));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "log2_min_luma_transform_block_size_minus2", json_object_new_int(p->log2_min_luma_transform_block_size_minus2));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "log2_diff_max_min_luma_transform_block_size", json_object_new_int(p->log2_diff_max_min_luma_transform_block_size));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "max_transform_hierarchy_depth_inter", json_object_new_int(p->max_transform_hierarchy_depth_inter));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "max_transform_hierarchy_depth_intra", json_object_new_int(p->max_transform_hierarchy_depth_intra));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "pcm_sample_bit_depth_luma_minus1", json_object_new_int(p->pcm_sample_bit_depth_luma_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "pcm_sample_bit_depth_chroma_minus1", json_object_new_int(p->pcm_sample_bit_depth_chroma_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "log2_min_pcm_luma_coding_block_size_minus3", json_object_new_int(p->log2_min_pcm_luma_coding_block_size_minus3));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "log2_diff_max_min_pcm_luma_coding_block_size", json_object_new_int(p->log2_diff_max_min_pcm_luma_coding_block_size));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "num_short_term_ref_pic_sets", json_object_new_int(p->num_short_term_ref_pic_sets));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "num_long_term_ref_pics_sps", json_object_new_int(p->num_long_term_ref_pics_sps));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "chroma_format_idc", json_object_new_int(p->chroma_format_idc));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "sps_max_sub_layers_minus1", json_object_new_int(p->sps_max_sub_layers_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_sps_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_hevc_sps_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_hevc_sps", v4l2_ctrl_hevc_sps_obj);
+}
+
+void trace_v4l2_ctrl_hevc_pps_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_hevc_pps_obj = json_object_new_object();
+	struct v4l2_ctrl_hevc_pps *p = static_cast<struct v4l2_ctrl_hevc_pps*>(ptr);
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "pic_parameter_set_id", json_object_new_int(p->pic_parameter_set_id));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "num_extra_slice_header_bits", json_object_new_int(p->num_extra_slice_header_bits));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "num_ref_idx_l0_default_active_minus1", json_object_new_int(p->num_ref_idx_l0_default_active_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "num_ref_idx_l1_default_active_minus1", json_object_new_int(p->num_ref_idx_l1_default_active_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "init_qp_minus26", json_object_new_int(p->init_qp_minus26));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "diff_cu_qp_delta_depth", json_object_new_int(p->diff_cu_qp_delta_depth));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "pps_cb_qp_offset", json_object_new_int(p->pps_cb_qp_offset));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "pps_cr_qp_offset", json_object_new_int(p->pps_cr_qp_offset));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "num_tile_columns_minus1", json_object_new_int(p->num_tile_columns_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "num_tile_rows_minus1", json_object_new_int(p->num_tile_rows_minus1));
+	/* __u8	column_width_minus1[20] */
+	json_object *column_width_minus1_obj = json_object_new_array();
+	for (size_t i = 0; i < 20; i++) {
+		json_object_array_add(column_width_minus1_obj, json_object_new_int(p->column_width_minus1[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "column_width_minus1", column_width_minus1_obj);
+
+	/* __u8	row_height_minus1[22] */
+	json_object *row_height_minus1_obj = json_object_new_array();
+	for (size_t i = 0; i < 22; i++) {
+		json_object_array_add(row_height_minus1_obj, json_object_new_int(p->row_height_minus1[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "row_height_minus1", row_height_minus1_obj);
+
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "pps_beta_offset_div2", json_object_new_int(p->pps_beta_offset_div2));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "pps_tc_offset_div2", json_object_new_int(p->pps_tc_offset_div2));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "log2_parallel_merge_level_minus2", json_object_new_int(p->log2_parallel_merge_level_minus2));
+	json_object_object_add(v4l2_ctrl_hevc_pps_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_hevc_pps_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_hevc_pps", v4l2_ctrl_hevc_pps_obj);
+}
+
+void trace_v4l2_hevc_dpb_entry_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_hevc_dpb_entry_obj = json_object_new_object();
+	struct v4l2_hevc_dpb_entry *p = static_cast<struct v4l2_hevc_dpb_entry*>(ptr);
+	json_object_object_add(v4l2_hevc_dpb_entry_obj, "timestamp", json_object_new_uint64(p->timestamp));
+	json_object_object_add(v4l2_hevc_dpb_entry_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_hevc_pps_flag_def).c_str()));
+	json_object_object_add(v4l2_hevc_dpb_entry_obj, "field_pic", json_object_new_int(p->field_pic));
+	json_object_object_add(v4l2_hevc_dpb_entry_obj, "pic_order_cnt_val", json_object_new_int(p->pic_order_cnt_val));
+	json_object_object_add(parent_obj, "v4l2_hevc_dpb_entry", v4l2_hevc_dpb_entry_obj);
+}
+
+void trace_v4l2_hevc_pred_weight_table_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_hevc_pred_weight_table_obj = json_object_new_object();
+	struct v4l2_hevc_pred_weight_table *p = static_cast<struct v4l2_hevc_pred_weight_table*>(ptr);
+	/* __s8	delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *delta_luma_weight_l0_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(delta_luma_weight_l0_obj, json_object_new_int(p->delta_luma_weight_l0[i]));
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "delta_luma_weight_l0", delta_luma_weight_l0_obj);
+
+	/* __s8	luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *luma_offset_l0_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(luma_offset_l0_obj, json_object_new_int(p->luma_offset_l0[i]));
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "luma_offset_l0", luma_offset_l0_obj);
+
+	/* __s8	delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	json_object *delta_chroma_weight_l0_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(delta_chroma_weight_l0_obj, json_object_new_int(p->delta_chroma_weight_l0[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "delta_chroma_weight_l0", delta_chroma_weight_l0_obj);
+
+	/* __s8	chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	json_object *chroma_offset_l0_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(chroma_offset_l0_obj, json_object_new_int(p->chroma_offset_l0[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "chroma_offset_l0", chroma_offset_l0_obj);
+
+	/* __s8	delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *delta_luma_weight_l1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(delta_luma_weight_l1_obj, json_object_new_int(p->delta_luma_weight_l1[i]));
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "delta_luma_weight_l1", delta_luma_weight_l1_obj);
+
+	/* __s8	luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *luma_offset_l1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(luma_offset_l1_obj, json_object_new_int(p->luma_offset_l1[i]));
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "luma_offset_l1", luma_offset_l1_obj);
+
+	/* __s8	delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	json_object *delta_chroma_weight_l1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(delta_chroma_weight_l1_obj, json_object_new_int(p->delta_chroma_weight_l1[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "delta_chroma_weight_l1", delta_chroma_weight_l1_obj);
+
+	/* __s8	chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2] */
+	json_object *chroma_offset_l1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(chroma_offset_l1_obj, json_object_new_int(p->chroma_offset_l1[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "chroma_offset_l1", chroma_offset_l1_obj);
+
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "luma_log2_weight_denom", json_object_new_int(p->luma_log2_weight_denom));
+	json_object_object_add(v4l2_hevc_pred_weight_table_obj, "delta_chroma_log2_weight_denom", json_object_new_int(p->delta_chroma_log2_weight_denom));
+	json_object_object_add(parent_obj, "v4l2_hevc_pred_weight_table", v4l2_hevc_pred_weight_table_obj);
+}
+
+void trace_v4l2_ctrl_hevc_slice_params_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_hevc_slice_params_obj = json_object_new_object();
+	struct v4l2_ctrl_hevc_slice_params *p = static_cast<struct v4l2_ctrl_hevc_slice_params*>(ptr);
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "bit_size", json_object_new_int64(p->bit_size));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "data_byte_offset", json_object_new_int64(p->data_byte_offset));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "num_entry_point_offsets", json_object_new_int64(p->num_entry_point_offsets));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "nal_unit_type", json_object_new_int(p->nal_unit_type));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "nuh_temporal_id_plus1", json_object_new_int(p->nuh_temporal_id_plus1));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_type", json_object_new_int(p->slice_type));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "colour_plane_id", json_object_new_int(p->colour_plane_id));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_pic_order_cnt", json_object_new_int(p->slice_pic_order_cnt));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "num_ref_idx_l0_active_minus1", json_object_new_int(p->num_ref_idx_l0_active_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "num_ref_idx_l1_active_minus1", json_object_new_int(p->num_ref_idx_l1_active_minus1));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "collocated_ref_idx", json_object_new_int(p->collocated_ref_idx));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "five_minus_max_num_merge_cand", json_object_new_int(p->five_minus_max_num_merge_cand));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_qp_delta", json_object_new_int(p->slice_qp_delta));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_cb_qp_offset", json_object_new_int(p->slice_cb_qp_offset));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_cr_qp_offset", json_object_new_int(p->slice_cr_qp_offset));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_act_y_qp_offset", json_object_new_int(p->slice_act_y_qp_offset));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_act_cb_qp_offset", json_object_new_int(p->slice_act_cb_qp_offset));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_act_cr_qp_offset", json_object_new_int(p->slice_act_cr_qp_offset));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_beta_offset_div2", json_object_new_int(p->slice_beta_offset_div2));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_tc_offset_div2", json_object_new_int(p->slice_tc_offset_div2));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "pic_struct", json_object_new_int(p->pic_struct));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "slice_segment_addr", json_object_new_int64(p->slice_segment_addr));
+	/* __u8	ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *ref_idx_l0_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(ref_idx_l0_obj, json_object_new_int(p->ref_idx_l0[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "ref_idx_l0", ref_idx_l0_obj);
+
+	/* __u8	ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *ref_idx_l1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(ref_idx_l1_obj, json_object_new_int(p->ref_idx_l1[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "ref_idx_l1", ref_idx_l1_obj);
+
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "short_term_ref_pic_set_size", json_object_new_int(p->short_term_ref_pic_set_size));
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "long_term_ref_pic_set_size", json_object_new_int(p->long_term_ref_pic_set_size));
+	/* struct v4l2_hevc_pred_weight_table pred_weight_table */
+	trace_v4l2_hevc_pred_weight_table_gen(&p->pred_weight_table, v4l2_ctrl_hevc_slice_params_obj);
+	json_object_object_add(v4l2_ctrl_hevc_slice_params_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_hevc_slice_params_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_hevc_slice_params", v4l2_ctrl_hevc_slice_params_obj);
+}
+
+void trace_v4l2_ctrl_hevc_decode_params_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_hevc_decode_params_obj = json_object_new_object();
+	struct v4l2_ctrl_hevc_decode_params *p = static_cast<struct v4l2_ctrl_hevc_decode_params*>(ptr);
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "pic_order_cnt_val", json_object_new_int(p->pic_order_cnt_val));
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "short_term_ref_pic_set_size", json_object_new_int(p->short_term_ref_pic_set_size));
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "long_term_ref_pic_set_size", json_object_new_int(p->long_term_ref_pic_set_size));
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "num_active_dpb_entries", json_object_new_int(p->num_active_dpb_entries));
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "num_poc_st_curr_before", json_object_new_int(p->num_poc_st_curr_before));
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "num_poc_st_curr_after", json_object_new_int(p->num_poc_st_curr_after));
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "num_poc_lt_curr", json_object_new_int(p->num_poc_lt_curr));
+	/* __u8	poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *poc_st_curr_before_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(poc_st_curr_before_obj, json_object_new_int(p->poc_st_curr_before[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "poc_st_curr_before", poc_st_curr_before_obj);
+
+	/* __u8	poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *poc_st_curr_after_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(poc_st_curr_after_obj, json_object_new_int(p->poc_st_curr_after[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "poc_st_curr_after", poc_st_curr_after_obj);
+
+	/* __u8	poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *poc_lt_curr_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object_array_add(poc_lt_curr_obj, json_object_new_int(p->poc_lt_curr[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "poc_lt_curr", poc_lt_curr_obj);
+
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "num_delta_pocs_of_ref_rps_idx", json_object_new_int(p->num_delta_pocs_of_ref_rps_idx));
+	/* struct	v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX] */
+	json_object *dpb_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {
+		json_object *element_obj = json_object_new_object();
+		trace_v4l2_hevc_dpb_entry_gen(&(p->dpb[i]), element_obj);
+		json_object *element_no_key_obj;
+		json_object_object_get_ex(element_obj, "v4l2_hevc_dpb_entry", &element_no_key_obj);
+		json_object_array_add(dpb_obj, element_no_key_obj);
+	}
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "dpb", dpb_obj);
+
+	json_object_object_add(v4l2_ctrl_hevc_decode_params_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_hevc_decode_param_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_hevc_decode_params", v4l2_ctrl_hevc_decode_params_obj);
+}
+
+void trace_v4l2_ctrl_hevc_scaling_matrix_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_hevc_scaling_matrix_obj = json_object_new_object();
+	struct v4l2_ctrl_hevc_scaling_matrix *p = static_cast<struct v4l2_ctrl_hevc_scaling_matrix*>(ptr);
+	/* __u8	scaling_list_4x4[6][16] */
+	json_object *scaling_list_4x4_obj = json_object_new_array();
+	for (size_t i = 0; i < 6; i++) {
+		for (size_t j = 0; j < 16; j++) {
+			json_object_array_add(scaling_list_4x4_obj, json_object_new_int(p->scaling_list_4x4[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_4x4", scaling_list_4x4_obj);
+
+	/* __u8	scaling_list_8x8[6][64] */
+	json_object *scaling_list_8x8_obj = json_object_new_array();
+	for (size_t i = 0; i < 6; i++) {
+		for (size_t j = 0; j < 64; j++) {
+			json_object_array_add(scaling_list_8x8_obj, json_object_new_int(p->scaling_list_8x8[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_8x8", scaling_list_8x8_obj);
+
+	/* __u8	scaling_list_16x16[6][64] */
+	json_object *scaling_list_16x16_obj = json_object_new_array();
+	for (size_t i = 0; i < 6; i++) {
+		for (size_t j = 0; j < 64; j++) {
+			json_object_array_add(scaling_list_16x16_obj, json_object_new_int(p->scaling_list_16x16[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_16x16", scaling_list_16x16_obj);
+
+	/* __u8	scaling_list_32x32[2][64] */
+	json_object *scaling_list_32x32_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 64; j++) {
+			json_object_array_add(scaling_list_32x32_obj, json_object_new_int(p->scaling_list_32x32[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_32x32", scaling_list_32x32_obj);
+
+	/* __u8	scaling_list_dc_coef_16x16[6] */
+	json_object *scaling_list_dc_coef_16x16_obj = json_object_new_array();
+	for (size_t i = 0; i < 6; i++) {
+		json_object_array_add(scaling_list_dc_coef_16x16_obj, json_object_new_int(p->scaling_list_dc_coef_16x16[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_dc_coef_16x16", scaling_list_dc_coef_16x16_obj);
+
+	/* __u8	scaling_list_dc_coef_32x32[2] */
+	json_object *scaling_list_dc_coef_32x32_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(scaling_list_dc_coef_32x32_obj, json_object_new_int(p->scaling_list_dc_coef_32x32[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hevc_scaling_matrix_obj, "scaling_list_dc_coef_32x32", scaling_list_dc_coef_32x32_obj);
+
+	json_object_object_add(parent_obj, "v4l2_ctrl_hevc_scaling_matrix", v4l2_ctrl_hevc_scaling_matrix_obj);
+}
+
+void trace_v4l2_ctrl_hdr10_cll_info_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_hdr10_cll_info_obj = json_object_new_object();
+	struct v4l2_ctrl_hdr10_cll_info *p = static_cast<struct v4l2_ctrl_hdr10_cll_info*>(ptr);
+	json_object_object_add(v4l2_ctrl_hdr10_cll_info_obj, "max_content_light_level", json_object_new_int(p->max_content_light_level));
+	json_object_object_add(v4l2_ctrl_hdr10_cll_info_obj, "max_pic_average_light_level", json_object_new_int(p->max_pic_average_light_level));
+	json_object_object_add(parent_obj, "v4l2_ctrl_hdr10_cll_info", v4l2_ctrl_hdr10_cll_info_obj);
+}
+
+void trace_v4l2_ctrl_hdr10_mastering_display_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_hdr10_mastering_display_obj = json_object_new_object();
+	struct v4l2_ctrl_hdr10_mastering_display *p = static_cast<struct v4l2_ctrl_hdr10_mastering_display*>(ptr);
+	/* __u16 display_primaries_x[3] */
+	json_object *display_primaries_x_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(display_primaries_x_obj, json_object_new_int(p->display_primaries_x[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, "display_primaries_x", display_primaries_x_obj);
+
+	/* __u16 display_primaries_y[3] */
+	json_object *display_primaries_y_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(display_primaries_y_obj, json_object_new_int(p->display_primaries_y[i]));
+	}
+	json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, "display_primaries_y", display_primaries_y_obj);
+
+	json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, "white_point_x", json_object_new_int(p->white_point_x));
+	json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, "white_point_y", json_object_new_int(p->white_point_y));
+	json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, "max_display_mastering_luminance", json_object_new_int64(p->max_display_mastering_luminance));
+	json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, "min_display_mastering_luminance", json_object_new_int64(p->min_display_mastering_luminance));
+	json_object_object_add(parent_obj, "v4l2_ctrl_hdr10_mastering_display", v4l2_ctrl_hdr10_mastering_display_obj);
+}
+
+void trace_v4l2_vp9_loop_filter_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp9_loop_filter_obj = json_object_new_object();
+	struct v4l2_vp9_loop_filter *p = static_cast<struct v4l2_vp9_loop_filter*>(ptr);
+	/* __s8 ref_deltas[4] */
+	json_object *ref_deltas_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(ref_deltas_obj, json_object_new_int(p->ref_deltas[i]));
+	}
+	json_object_object_add(v4l2_vp9_loop_filter_obj, "ref_deltas", ref_deltas_obj);
+
+	/* __s8 mode_deltas[2] */
+	json_object *mode_deltas_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(mode_deltas_obj, json_object_new_int(p->mode_deltas[i]));
+	}
+	json_object_object_add(v4l2_vp9_loop_filter_obj, "mode_deltas", mode_deltas_obj);
+
+	json_object_object_add(v4l2_vp9_loop_filter_obj, "level", json_object_new_int(p->level));
+	json_object_object_add(v4l2_vp9_loop_filter_obj, "sharpness", json_object_new_int(p->sharpness));
+	json_object_object_add(v4l2_vp9_loop_filter_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_vp9_loop_filter_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_vp9_loop_filter", v4l2_vp9_loop_filter_obj);
+}
+
+void trace_v4l2_vp9_quantization_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp9_quantization_obj = json_object_new_object();
+	struct v4l2_vp9_quantization *p = static_cast<struct v4l2_vp9_quantization*>(ptr);
+	json_object_object_add(v4l2_vp9_quantization_obj, "base_q_idx", json_object_new_int(p->base_q_idx));
+	json_object_object_add(v4l2_vp9_quantization_obj, "delta_q_y_dc", json_object_new_int(p->delta_q_y_dc));
+	json_object_object_add(v4l2_vp9_quantization_obj, "delta_q_uv_dc", json_object_new_int(p->delta_q_uv_dc));
+	json_object_object_add(v4l2_vp9_quantization_obj, "delta_q_uv_ac", json_object_new_int(p->delta_q_uv_ac));
+	json_object_object_add(parent_obj, "v4l2_vp9_quantization", v4l2_vp9_quantization_obj);
+}
+
+void trace_v4l2_vp9_segmentation_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp9_segmentation_obj = json_object_new_object();
+	struct v4l2_vp9_segmentation *p = static_cast<struct v4l2_vp9_segmentation*>(ptr);
+	/* __s16 feature_data[8][4] */
+	json_object *feature_data_obj = json_object_new_array();
+	for (size_t i = 0; i < 8; i++) {
+		for (size_t j = 0; j < 4; j++) {
+			json_object_array_add(feature_data_obj, json_object_new_int(p->feature_data[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_vp9_segmentation_obj, "feature_data", feature_data_obj);
+
+	/* __u8 feature_enabled[8] */
+	json_object *feature_enabled_obj = json_object_new_array();
+	for (size_t i = 0; i < 8; i++) {
+		json_object_array_add(feature_enabled_obj, json_object_new_int(p->feature_enabled[i]));
+	}
+	json_object_object_add(v4l2_vp9_segmentation_obj, "feature_enabled", feature_enabled_obj);
+
+	/* __u8 tree_probs[7] */
+	json_object *tree_probs_obj = json_object_new_array();
+	for (size_t i = 0; i < 7; i++) {
+		json_object_array_add(tree_probs_obj, json_object_new_int(p->tree_probs[i]));
+	}
+	json_object_object_add(v4l2_vp9_segmentation_obj, "tree_probs", tree_probs_obj);
+
+	/* __u8 pred_probs[3] */
+	json_object *pred_probs_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(pred_probs_obj, json_object_new_int(p->pred_probs[i]));
+	}
+	json_object_object_add(v4l2_vp9_segmentation_obj, "pred_probs", pred_probs_obj);
+
+	json_object_object_add(v4l2_vp9_segmentation_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_vp9_segmentation_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_vp9_segmentation", v4l2_vp9_segmentation_obj);
+}
+
+void trace_v4l2_ctrl_vp9_frame_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_vp9_frame_obj = json_object_new_object();
+	struct v4l2_ctrl_vp9_frame *p = static_cast<struct v4l2_ctrl_vp9_frame*>(ptr);
+	/* struct v4l2_vp9_loop_filter lf */
+	trace_v4l2_vp9_loop_filter_gen(&p->lf, v4l2_ctrl_vp9_frame_obj);
+	/* struct v4l2_vp9_quantization quant */
+	trace_v4l2_vp9_quantization_gen(&p->quant, v4l2_ctrl_vp9_frame_obj);
+	/* struct v4l2_vp9_segmentation seg */
+	trace_v4l2_vp9_segmentation_gen(&p->seg, v4l2_ctrl_vp9_frame_obj);
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_vp9_frame_flag_def).c_str()));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "compressed_header_size", json_object_new_int(p->compressed_header_size));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "uncompressed_header_size", json_object_new_int(p->uncompressed_header_size));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "frame_width_minus_1", json_object_new_int(p->frame_width_minus_1));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "frame_height_minus_1", json_object_new_int(p->frame_height_minus_1));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "render_width_minus_1", json_object_new_int(p->render_width_minus_1));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "render_height_minus_1", json_object_new_int(p->render_height_minus_1));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "last_frame_ts", json_object_new_uint64(p->last_frame_ts));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "golden_frame_ts", json_object_new_uint64(p->golden_frame_ts));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "alt_frame_ts", json_object_new_uint64(p->alt_frame_ts));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "ref_frame_sign_bias", json_object_new_int(p->ref_frame_sign_bias));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "reset_frame_context", json_object_new_int(p->reset_frame_context));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "frame_context_idx", json_object_new_int(p->frame_context_idx));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "profile", json_object_new_int(p->profile));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "bit_depth", json_object_new_int(p->bit_depth));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "interpolation_filter", json_object_new_int(p->interpolation_filter));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "tile_cols_log2", json_object_new_int(p->tile_cols_log2));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "tile_rows_log2", json_object_new_int(p->tile_rows_log2));
+	json_object_object_add(v4l2_ctrl_vp9_frame_obj, "reference_mode", json_object_new_int(p->reference_mode));
+	json_object_object_add(parent_obj, "v4l2_ctrl_vp9_frame", v4l2_ctrl_vp9_frame_obj);
+}
+
+void trace_v4l2_vp9_mv_probs_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_vp9_mv_probs_obj = json_object_new_object();
+	struct v4l2_vp9_mv_probs *p = static_cast<struct v4l2_vp9_mv_probs*>(ptr);
+	/* __u8 joint[3] */
+	json_object *joint_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(joint_obj, json_object_new_int(p->joint[i]));
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "joint", joint_obj);
+
+	/* __u8 sign[2] */
+	json_object *sign_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(sign_obj, json_object_new_int(p->sign[i]));
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "sign", sign_obj);
+
+	/* __u8 classes[2][10] */
+	json_object *classes_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 10; j++) {
+			json_object_array_add(classes_obj, json_object_new_int(p->classes[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "classes", classes_obj);
+
+	/* __u8 class0_bit[2] */
+	json_object *class0_bit_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(class0_bit_obj, json_object_new_int(p->class0_bit[i]));
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "class0_bit", class0_bit_obj);
+
+	/* __u8 bits[2][10] */
+	json_object *bits_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 10; j++) {
+			json_object_array_add(bits_obj, json_object_new_int(p->bits[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "bits", bits_obj);
+
+	/* __u8 class0_fr[2][2][3] */
+	json_object *class0_fr_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			for (size_t k = 0; k < 3; k++) {
+				json_object_array_add(class0_fr_obj, json_object_new_int(p->class0_fr[i][j][k]));
+			}
+		}
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "class0_fr", class0_fr_obj);
+
+	/* __u8 fr[2][3] */
+	json_object *fr_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 3; j++) {
+			json_object_array_add(fr_obj, json_object_new_int(p->fr[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "fr", fr_obj);
+
+	/* __u8 class0_hp[2] */
+	json_object *class0_hp_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(class0_hp_obj, json_object_new_int(p->class0_hp[i]));
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "class0_hp", class0_hp_obj);
+
+	/* __u8 hp[2] */
+	json_object *hp_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(hp_obj, json_object_new_int(p->hp[i]));
+	}
+	json_object_object_add(v4l2_vp9_mv_probs_obj, "hp", hp_obj);
+
+	json_object_object_add(parent_obj, "v4l2_vp9_mv_probs", v4l2_vp9_mv_probs_obj);
+}
+
+void trace_v4l2_ctrl_vp9_compressed_hdr_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_vp9_compressed_hdr_obj = json_object_new_object();
+	struct v4l2_ctrl_vp9_compressed_hdr *p = static_cast<struct v4l2_ctrl_vp9_compressed_hdr*>(ptr);
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "tx_mode", json_object_new_int(p->tx_mode));
+	/* __u8 tx8[2][1] */
+	json_object *tx8_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 1; j++) {
+			json_object_array_add(tx8_obj, json_object_new_int(p->tx8[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "tx8", tx8_obj);
+
+	/* __u8 tx16[2][2] */
+	json_object *tx16_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(tx16_obj, json_object_new_int(p->tx16[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "tx16", tx16_obj);
+
+	/* __u8 tx32[2][3] */
+	json_object *tx32_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		for (size_t j = 0; j < 3; j++) {
+			json_object_array_add(tx32_obj, json_object_new_int(p->tx32[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "tx32", tx32_obj);
+
+	/* __u8 coef[4][2][2][6][6][3] */
+	json_object *coef_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			for (size_t k = 0; k < 2; k++) {
+				for (size_t l = 0; l < 6; l++) {
+					for (size_t m = 0; m < 6; m++) {
+						for (size_t n = 0; n < 3; n++) {
+							json_object_array_add(coef_obj, json_object_new_int(p->coef[i][j][k][l][m][n]));
+						}
+					}
+				}
+			}
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "coef", coef_obj);
+
+	/* __u8 skip[3] */
+	json_object *skip_obj = json_object_new_array();
+	for (size_t i = 0; i < 3; i++) {
+		json_object_array_add(skip_obj, json_object_new_int(p->skip[i]));
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "skip", skip_obj);
+
+	/* __u8 inter_mode[7][3] */
+	json_object *inter_mode_obj = json_object_new_array();
+	for (size_t i = 0; i < 7; i++) {
+		for (size_t j = 0; j < 3; j++) {
+			json_object_array_add(inter_mode_obj, json_object_new_int(p->inter_mode[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "inter_mode", inter_mode_obj);
+
+	/* __u8 interp_filter[4][2] */
+	json_object *interp_filter_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(interp_filter_obj, json_object_new_int(p->interp_filter[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "interp_filter", interp_filter_obj);
+
+	/* __u8 is_inter[4] */
+	json_object *is_inter_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(is_inter_obj, json_object_new_int(p->is_inter[i]));
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "is_inter", is_inter_obj);
+
+	/* __u8 comp_mode[5] */
+	json_object *comp_mode_obj = json_object_new_array();
+	for (size_t i = 0; i < 5; i++) {
+		json_object_array_add(comp_mode_obj, json_object_new_int(p->comp_mode[i]));
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "comp_mode", comp_mode_obj);
+
+	/* __u8 single_ref[5][2] */
+	json_object *single_ref_obj = json_object_new_array();
+	for (size_t i = 0; i < 5; i++) {
+		for (size_t j = 0; j < 2; j++) {
+			json_object_array_add(single_ref_obj, json_object_new_int(p->single_ref[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "single_ref", single_ref_obj);
+
+	/* __u8 comp_ref[5] */
+	json_object *comp_ref_obj = json_object_new_array();
+	for (size_t i = 0; i < 5; i++) {
+		json_object_array_add(comp_ref_obj, json_object_new_int(p->comp_ref[i]));
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "comp_ref", comp_ref_obj);
+
+	/* __u8 y_mode[4][9] */
+	json_object *y_mode_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		for (size_t j = 0; j < 9; j++) {
+			json_object_array_add(y_mode_obj, json_object_new_int(p->y_mode[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "y_mode", y_mode_obj);
+
+	/* __u8 uv_mode[10][9] */
+	json_object *uv_mode_obj = json_object_new_array();
+	for (size_t i = 0; i < 10; i++) {
+		for (size_t j = 0; j < 9; j++) {
+			json_object_array_add(uv_mode_obj, json_object_new_int(p->uv_mode[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "uv_mode", uv_mode_obj);
+
+	/* __u8 partition[16][3] */
+	json_object *partition_obj = json_object_new_array();
+	for (size_t i = 0; i < 16; i++) {
+		for (size_t j = 0; j < 3; j++) {
+			json_object_array_add(partition_obj, json_object_new_int(p->partition[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_ctrl_vp9_compressed_hdr_obj, "partition", partition_obj);
+
+	/* struct v4l2_vp9_mv_probs mv */
+	trace_v4l2_vp9_mv_probs_gen(&p->mv, v4l2_ctrl_vp9_compressed_hdr_obj);
+	json_object_object_add(parent_obj, "v4l2_ctrl_vp9_compressed_hdr", v4l2_ctrl_vp9_compressed_hdr_obj);
+}
+
+void trace_v4l2_ctrl_av1_sequence_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_av1_sequence_obj = json_object_new_object();
+	struct v4l2_ctrl_av1_sequence *p = static_cast<struct v4l2_ctrl_av1_sequence*>(ptr);
+	json_object_object_add(v4l2_ctrl_av1_sequence_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_sequence_flag_def).c_str()));
+	json_object_object_add(v4l2_ctrl_av1_sequence_obj, "seq_profile", json_object_new_int(p->seq_profile));
+	json_object_object_add(v4l2_ctrl_av1_sequence_obj, "order_hint_bits", json_object_new_int(p->order_hint_bits));
+	json_object_object_add(v4l2_ctrl_av1_sequence_obj, "bit_depth", json_object_new_int(p->bit_depth));
+	json_object_object_add(v4l2_ctrl_av1_sequence_obj, "max_frame_width_minus_1", json_object_new_int(p->max_frame_width_minus_1));
+	json_object_object_add(v4l2_ctrl_av1_sequence_obj, "max_frame_height_minus_1", json_object_new_int(p->max_frame_height_minus_1));
+	json_object_object_add(parent_obj, "v4l2_ctrl_av1_sequence", v4l2_ctrl_av1_sequence_obj);
+}
+
+void trace_v4l2_ctrl_av1_tile_group_entry_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_av1_tile_group_entry_obj = json_object_new_object();
+	struct v4l2_ctrl_av1_tile_group_entry *p = static_cast<struct v4l2_ctrl_av1_tile_group_entry*>(ptr);
+	json_object_object_add(v4l2_ctrl_av1_tile_group_entry_obj, "tile_offset", json_object_new_int64(p->tile_offset));
+	json_object_object_add(v4l2_ctrl_av1_tile_group_entry_obj, "tile_size", json_object_new_int64(p->tile_size));
+	json_object_object_add(v4l2_ctrl_av1_tile_group_entry_obj, "tile_row", json_object_new_int64(p->tile_row));
+	json_object_object_add(v4l2_ctrl_av1_tile_group_entry_obj, "tile_col", json_object_new_int64(p->tile_col));
+	json_object_object_add(parent_obj, "v4l2_ctrl_av1_tile_group_entry", v4l2_ctrl_av1_tile_group_entry_obj);
+}
+
+void trace_v4l2_av1_global_motion_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_av1_global_motion_obj = json_object_new_object();
+	struct v4l2_av1_global_motion *p = static_cast<struct v4l2_av1_global_motion*>(ptr);
+	/* __u8 flags[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *flags_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+		json_object_array_add(flags_obj, json_object_new_int(p->flags[i]));
+	}
+	json_object_object_add(v4l2_av1_global_motion_obj, "flags", flags_obj);
+
+	/* enum v4l2_av1_warp_model type[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *type_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+		json_object_array_add(type_obj, json_object_new_int(p->type[i]));
+	}
+	json_object_object_add(v4l2_av1_global_motion_obj, "type", type_obj);
+
+	/* __s32 params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6] */
+	json_object *params_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+		for (size_t j = 0; j < 6; j++) {
+			json_object_array_add(params_obj, json_object_new_int(p->params[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_av1_global_motion_obj, "params", params_obj);
+
+	json_object_object_add(v4l2_av1_global_motion_obj, "invalid", json_object_new_int(p->invalid));
+	json_object_object_add(parent_obj, "v4l2_av1_global_motion", v4l2_av1_global_motion_obj);
+}
+
+void trace_v4l2_av1_loop_restoration_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_av1_loop_restoration_obj = json_object_new_object();
+	struct v4l2_av1_loop_restoration *p = static_cast<struct v4l2_av1_loop_restoration*>(ptr);
+	json_object_object_add(v4l2_av1_loop_restoration_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_loop_restoration_flag_def).c_str()));
+	json_object_object_add(v4l2_av1_loop_restoration_obj, "lr_unit_shift", json_object_new_int(p->lr_unit_shift));
+	json_object_object_add(v4l2_av1_loop_restoration_obj, "lr_uv_shift", json_object_new_int(p->lr_uv_shift));
+	/* enum v4l2_av1_frame_restoration_type frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX] */
+	json_object *frame_restoration_type_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_NUM_PLANES_MAX; i++) {
+		json_object_array_add(frame_restoration_type_obj, json_object_new_int(p->frame_restoration_type[i]));
+	}
+	json_object_object_add(v4l2_av1_loop_restoration_obj, "frame_restoration_type", frame_restoration_type_obj);
+
+	/* __u32 loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES] */
+	json_object *loop_restoration_size_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_NUM_PLANES; i++) {
+		json_object_array_add(loop_restoration_size_obj, json_object_new_int64(p->loop_restoration_size[i]));
+	}
+	json_object_object_add(v4l2_av1_loop_restoration_obj, "loop_restoration_size", loop_restoration_size_obj);
+
+	json_object_object_add(parent_obj, "v4l2_av1_loop_restoration", v4l2_av1_loop_restoration_obj);
+}
+
+void trace_v4l2_av1_cdef_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_av1_cdef_obj = json_object_new_object();
+	struct v4l2_av1_cdef *p = static_cast<struct v4l2_av1_cdef*>(ptr);
+	json_object_object_add(v4l2_av1_cdef_obj, "damping_minus_3", json_object_new_int(p->damping_minus_3));
+	json_object_object_add(v4l2_av1_cdef_obj, "bits", json_object_new_int(p->bits));
+	/* __u8 y_pri_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *y_pri_strength_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+		json_object_array_add(y_pri_strength_obj, json_object_new_int(p->y_pri_strength[i]));
+	}
+	json_object_object_add(v4l2_av1_cdef_obj, "y_pri_strength", y_pri_strength_obj);
+
+	/* __u8 y_sec_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *y_sec_strength_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+		json_object_array_add(y_sec_strength_obj, json_object_new_int(p->y_sec_strength[i]));
+	}
+	json_object_object_add(v4l2_av1_cdef_obj, "y_sec_strength", y_sec_strength_obj);
+
+	/* __u8 uv_pri_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *uv_pri_strength_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+		json_object_array_add(uv_pri_strength_obj, json_object_new_int(p->uv_pri_strength[i]));
+	}
+	json_object_object_add(v4l2_av1_cdef_obj, "uv_pri_strength", uv_pri_strength_obj);
+
+	/* __u8 uv_sec_strength[V4L2_AV1_CDEF_MAX] */
+	json_object *uv_sec_strength_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_CDEF_MAX; i++) {
+		json_object_array_add(uv_sec_strength_obj, json_object_new_int(p->uv_sec_strength[i]));
+	}
+	json_object_object_add(v4l2_av1_cdef_obj, "uv_sec_strength", uv_sec_strength_obj);
+
+	json_object_object_add(parent_obj, "v4l2_av1_cdef", v4l2_av1_cdef_obj);
+}
+
+void trace_v4l2_av1_segmentation_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_av1_segmentation_obj = json_object_new_object();
+	struct v4l2_av1_segmentation *p = static_cast<struct v4l2_av1_segmentation*>(ptr);
+	json_object_object_add(v4l2_av1_segmentation_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_segmentation_flag_def).c_str()));
+	json_object_object_add(v4l2_av1_segmentation_obj, "last_active_seg_id", json_object_new_int(p->last_active_seg_id));
+	/* __u8 feature_enabled[V4L2_AV1_MAX_SEGMENTS] */
+	json_object *feature_enabled_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_SEGMENTS; i++) {
+		json_object_array_add(feature_enabled_obj, json_object_new_int(p->feature_enabled[i]));
+	}
+	json_object_object_add(v4l2_av1_segmentation_obj, "feature_enabled", feature_enabled_obj);
+
+	/* __s16 feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX] */
+	json_object *feature_data_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_SEGMENTS; i++) {
+		for (size_t j = 0; j < V4L2_AV1_SEG_LVL_MAX; j++) {
+			json_object_array_add(feature_data_obj, json_object_new_int(p->feature_data[i][j]));
+		}
+	}
+	json_object_object_add(v4l2_av1_segmentation_obj, "feature_data", feature_data_obj);
+
+	json_object_object_add(parent_obj, "v4l2_av1_segmentation", v4l2_av1_segmentation_obj);
+}
+
+void trace_v4l2_av1_loop_filter_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_av1_loop_filter_obj = json_object_new_object();
+	struct v4l2_av1_loop_filter *p = static_cast<struct v4l2_av1_loop_filter*>(ptr);
+	json_object_object_add(v4l2_av1_loop_filter_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_loop_filter_flag_def).c_str()));
+	/* __u8 level[4] */
+	json_object *level_obj = json_object_new_array();
+	for (size_t i = 0; i < 4; i++) {
+		json_object_array_add(level_obj, json_object_new_int(p->level[i]));
+	}
+	json_object_object_add(v4l2_av1_loop_filter_obj, "level", level_obj);
+
+	json_object_object_add(v4l2_av1_loop_filter_obj, "sharpness", json_object_new_int(p->sharpness));
+	/* __s8 ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *ref_deltas_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+		json_object_array_add(ref_deltas_obj, json_object_new_int(p->ref_deltas[i]));
+	}
+	json_object_object_add(v4l2_av1_loop_filter_obj, "ref_deltas", ref_deltas_obj);
+
+	/* __s8 mode_deltas[2] */
+	json_object *mode_deltas_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(mode_deltas_obj, json_object_new_int(p->mode_deltas[i]));
+	}
+	json_object_object_add(v4l2_av1_loop_filter_obj, "mode_deltas", mode_deltas_obj);
+
+	json_object_object_add(v4l2_av1_loop_filter_obj, "delta_lf_res", json_object_new_int(p->delta_lf_res));
+	json_object_object_add(parent_obj, "v4l2_av1_loop_filter", v4l2_av1_loop_filter_obj);
+}
+
+void trace_v4l2_av1_quantization_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_av1_quantization_obj = json_object_new_object();
+	struct v4l2_av1_quantization *p = static_cast<struct v4l2_av1_quantization*>(ptr);
+	json_object_object_add(v4l2_av1_quantization_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_quantization_flag_def).c_str()));
+	json_object_object_add(v4l2_av1_quantization_obj, "base_q_idx", json_object_new_int(p->base_q_idx));
+	json_object_object_add(v4l2_av1_quantization_obj, "delta_q_y_dc", json_object_new_int(p->delta_q_y_dc));
+	json_object_object_add(v4l2_av1_quantization_obj, "delta_q_u_dc", json_object_new_int(p->delta_q_u_dc));
+	json_object_object_add(v4l2_av1_quantization_obj, "delta_q_u_ac", json_object_new_int(p->delta_q_u_ac));
+	json_object_object_add(v4l2_av1_quantization_obj, "delta_q_v_dc", json_object_new_int(p->delta_q_v_dc));
+	json_object_object_add(v4l2_av1_quantization_obj, "delta_q_v_ac", json_object_new_int(p->delta_q_v_ac));
+	json_object_object_add(v4l2_av1_quantization_obj, "qm_y", json_object_new_int(p->qm_y));
+	json_object_object_add(v4l2_av1_quantization_obj, "qm_u", json_object_new_int(p->qm_u));
+	json_object_object_add(v4l2_av1_quantization_obj, "qm_v", json_object_new_int(p->qm_v));
+	json_object_object_add(v4l2_av1_quantization_obj, "delta_q_res", json_object_new_int(p->delta_q_res));
+	json_object_object_add(parent_obj, "v4l2_av1_quantization", v4l2_av1_quantization_obj);
+}
+
+void trace_v4l2_av1_tile_info_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_av1_tile_info_obj = json_object_new_object();
+	struct v4l2_av1_tile_info *p = static_cast<struct v4l2_av1_tile_info*>(ptr);
+	json_object_object_add(v4l2_av1_tile_info_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_tile_info_flag_def).c_str()));
+	json_object_object_add(v4l2_av1_tile_info_obj, "context_update_tile_id", json_object_new_int(p->context_update_tile_id));
+	json_object_object_add(v4l2_av1_tile_info_obj, "tile_cols", json_object_new_int(p->tile_cols));
+	json_object_object_add(v4l2_av1_tile_info_obj, "tile_rows", json_object_new_int(p->tile_rows));
+	/* __u32 mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1] */
+	json_object *mi_col_starts_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_TILE_COLS + 1; i++) {
+		json_object_array_add(mi_col_starts_obj, json_object_new_int64(p->mi_col_starts[i]));
+	}
+	json_object_object_add(v4l2_av1_tile_info_obj, "mi_col_starts", mi_col_starts_obj);
+
+	/* __u32 mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1] */
+	json_object *mi_row_starts_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_TILE_ROWS + 1; i++) {
+		json_object_array_add(mi_row_starts_obj, json_object_new_int64(p->mi_row_starts[i]));
+	}
+	json_object_object_add(v4l2_av1_tile_info_obj, "mi_row_starts", mi_row_starts_obj);
+
+	/* __u32 width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS] */
+	json_object *width_in_sbs_minus_1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_TILE_COLS; i++) {
+		json_object_array_add(width_in_sbs_minus_1_obj, json_object_new_int64(p->width_in_sbs_minus_1[i]));
+	}
+	json_object_object_add(v4l2_av1_tile_info_obj, "width_in_sbs_minus_1", width_in_sbs_minus_1_obj);
+
+	/* __u32 height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS] */
+	json_object *height_in_sbs_minus_1_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_TILE_ROWS; i++) {
+		json_object_array_add(height_in_sbs_minus_1_obj, json_object_new_int64(p->height_in_sbs_minus_1[i]));
+	}
+	json_object_object_add(v4l2_av1_tile_info_obj, "height_in_sbs_minus_1", height_in_sbs_minus_1_obj);
+
+	json_object_object_add(v4l2_av1_tile_info_obj, "tile_size_bytes", json_object_new_int(p->tile_size_bytes));
+	json_object_object_add(parent_obj, "v4l2_av1_tile_info", v4l2_av1_tile_info_obj);
+}
+
+void trace_v4l2_ctrl_av1_frame_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_av1_frame_obj = json_object_new_object();
+	struct v4l2_ctrl_av1_frame *p = static_cast<struct v4l2_ctrl_av1_frame*>(ptr);
+	/* struct v4l2_av1_tile_info tile_info */
+	trace_v4l2_av1_tile_info_gen(&p->tile_info, v4l2_ctrl_av1_frame_obj);
+	/* struct v4l2_av1_quantization quantization */
+	trace_v4l2_av1_quantization_gen(&p->quantization, v4l2_ctrl_av1_frame_obj);
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "superres_denom", json_object_new_int(p->superres_denom));
+	/* struct v4l2_av1_segmentation segmentation */
+	trace_v4l2_av1_segmentation_gen(&p->segmentation, v4l2_ctrl_av1_frame_obj);
+	/* struct v4l2_av1_loop_filter loop_filter */
+	trace_v4l2_av1_loop_filter_gen(&p->loop_filter, v4l2_ctrl_av1_frame_obj);
+	/* struct v4l2_av1_cdef cdef */
+	trace_v4l2_av1_cdef_gen(&p->cdef, v4l2_ctrl_av1_frame_obj);
+	/* __u8 skip_mode_frame[2] */
+	json_object *skip_mode_frame_obj = json_object_new_array();
+	for (size_t i = 0; i < 2; i++) {
+		json_object_array_add(skip_mode_frame_obj, json_object_new_int(p->skip_mode_frame[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "skip_mode_frame", skip_mode_frame_obj);
+
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "primary_ref_frame", json_object_new_int(p->primary_ref_frame));
+	/* struct v4l2_av1_loop_restoration loop_restoration */
+	trace_v4l2_av1_loop_restoration_gen(&p->loop_restoration, v4l2_ctrl_av1_frame_obj);
+	/* struct v4l2_av1_global_motion global_motion */
+	trace_v4l2_av1_global_motion_gen(&p->global_motion, v4l2_ctrl_av1_frame_obj);
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_frame_flag_def).c_str()));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "frame_type", json_object_new_int(p->frame_type));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "order_hint", json_object_new_int64(p->order_hint));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "upscaled_width", json_object_new_int64(p->upscaled_width));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "interpolation_filter", json_object_new_int(p->interpolation_filter));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "tx_mode", json_object_new_int(p->tx_mode));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "frame_width_minus_1", json_object_new_int64(p->frame_width_minus_1));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "frame_height_minus_1", json_object_new_int64(p->frame_height_minus_1));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "render_width_minus_1", json_object_new_int(p->render_width_minus_1));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "render_height_minus_1", json_object_new_int(p->render_height_minus_1));
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "current_frame_id", json_object_new_int64(p->current_frame_id));
+	/* __u32 buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS] */
+	json_object *buffer_removal_time_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_OPERATING_POINTS; i++) {
+		json_object_array_add(buffer_removal_time_obj, json_object_new_int64(p->buffer_removal_time[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "buffer_removal_time", buffer_removal_time_obj);
+
+	/* __u32 order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *order_hints_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+		json_object_array_add(order_hints_obj, json_object_new_int64(p->order_hints[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "order_hints", order_hints_obj);
+
+	/* __u64 reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME] */
+	json_object *reference_frame_ts_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_TOTAL_REFS_PER_FRAME; i++) {
+		json_object_array_add(reference_frame_ts_obj, json_object_new_uint64(p->reference_frame_ts[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "reference_frame_ts", reference_frame_ts_obj);
+
+	/* __s8 ref_frame_idx[V4L2_AV1_REFS_PER_FRAME] */
+	json_object *ref_frame_idx_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_REFS_PER_FRAME; i++) {
+		json_object_array_add(ref_frame_idx_obj, json_object_new_int(p->ref_frame_idx[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "ref_frame_idx", ref_frame_idx_obj);
+
+	json_object_object_add(v4l2_ctrl_av1_frame_obj, "refresh_frame_flags", json_object_new_string(fl2s(p->refresh_frame_flags, v4l2_av1_frame_flag_def).c_str()));
+	json_object_object_add(parent_obj, "v4l2_ctrl_av1_frame", v4l2_ctrl_av1_frame_obj);
+}
+
+void trace_v4l2_ctrl_av1_film_grain_gen(void *ptr, json_object *parent_obj)
+{
+	json_object *v4l2_ctrl_av1_film_grain_obj = json_object_new_object();
+	struct v4l2_ctrl_av1_film_grain *p = static_cast<struct v4l2_ctrl_av1_film_grain*>(ptr);
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_av1_film_grain_flag_def).c_str()));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "cr_mult", json_object_new_int(p->cr_mult));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "grain_seed", json_object_new_int(p->grain_seed));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "film_grain_params_ref_idx", json_object_new_int(p->film_grain_params_ref_idx));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "num_y_points", json_object_new_int(p->num_y_points));
+	/* __u8 point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS] */
+	json_object *point_y_value_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_NUM_Y_POINTS; i++) {
+		json_object_array_add(point_y_value_obj, json_object_new_int(p->point_y_value[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "point_y_value", point_y_value_obj);
+
+	/* __u8 point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS] */
+	json_object *point_y_scaling_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_NUM_Y_POINTS; i++) {
+		json_object_array_add(point_y_scaling_obj, json_object_new_int(p->point_y_scaling[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "point_y_scaling", point_y_scaling_obj);
+
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "num_cb_points", json_object_new_int(p->num_cb_points));
+	/* __u8 point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS] */
+	json_object *point_cb_value_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CB_POINTS; i++) {
+		json_object_array_add(point_cb_value_obj, json_object_new_int(p->point_cb_value[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "point_cb_value", point_cb_value_obj);
+
+	/* __u8 point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS] */
+	json_object *point_cb_scaling_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CB_POINTS; i++) {
+		json_object_array_add(point_cb_scaling_obj, json_object_new_int(p->point_cb_scaling[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "point_cb_scaling", point_cb_scaling_obj);
+
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "num_cr_points", json_object_new_int(p->num_cr_points));
+	/* __u8 point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS] */
+	json_object *point_cr_value_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CR_POINTS; i++) {
+		json_object_array_add(point_cr_value_obj, json_object_new_int(p->point_cr_value[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "point_cr_value", point_cr_value_obj);
+
+	/* __u8 point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS] */
+	json_object *point_cr_scaling_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_MAX_NUM_CR_POINTS; i++) {
+		json_object_array_add(point_cr_scaling_obj, json_object_new_int(p->point_cr_scaling[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "point_cr_scaling", point_cr_scaling_obj);
+
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "grain_scaling_minus_8", json_object_new_int(p->grain_scaling_minus_8));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "ar_coeff_lag", json_object_new_int(p->ar_coeff_lag));
+	/* __u8 ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE] */
+	json_object *ar_coeffs_y_plus_128_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_AR_COEFFS_SIZE; i++) {
+		json_object_array_add(ar_coeffs_y_plus_128_obj, json_object_new_int(p->ar_coeffs_y_plus_128[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "ar_coeffs_y_plus_128", ar_coeffs_y_plus_128_obj);
+
+	/* __u8 ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE] */
+	json_object *ar_coeffs_cb_plus_128_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_AR_COEFFS_SIZE; i++) {
+		json_object_array_add(ar_coeffs_cb_plus_128_obj, json_object_new_int(p->ar_coeffs_cb_plus_128[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "ar_coeffs_cb_plus_128", ar_coeffs_cb_plus_128_obj);
+
+	/* __u8 ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE] */
+	json_object *ar_coeffs_cr_plus_128_obj = json_object_new_array();
+	for (size_t i = 0; i < V4L2_AV1_AR_COEFFS_SIZE; i++) {
+		json_object_array_add(ar_coeffs_cr_plus_128_obj, json_object_new_int(p->ar_coeffs_cr_plus_128[i]));
+	}
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "ar_coeffs_cr_plus_128", ar_coeffs_cr_plus_128_obj);
+
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "ar_coeff_shift_minus_6", json_object_new_int(p->ar_coeff_shift_minus_6));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "grain_scale_shift", json_object_new_int(p->grain_scale_shift));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "cb_mult", json_object_new_int(p->cb_mult));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "cb_luma_mult", json_object_new_int(p->cb_luma_mult));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "cr_luma_mult", json_object_new_int(p->cr_luma_mult));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "cb_offset", json_object_new_int(p->cb_offset));
+	json_object_object_add(v4l2_ctrl_av1_film_grain_obj, "cr_offset", json_object_new_int(p->cr_offset));
+	json_object_object_add(parent_obj, "v4l2_ctrl_av1_film_grain", v4l2_ctrl_av1_film_grain_obj);
+}
+
+void trace_v4l2_rect_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_rect_obj = json_object_new_object();
+	struct v4l2_rect *p = static_cast<struct v4l2_rect*>(arg);
+
+	json_object_object_add(v4l2_rect_obj, "left", json_object_new_int(p->left));
+	json_object_object_add(v4l2_rect_obj, "top", json_object_new_int(p->top));
+	json_object_object_add(v4l2_rect_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_rect_obj, "height", json_object_new_int64(p->height));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_rect", v4l2_rect_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_rect_obj);
+}
+
+void trace_v4l2_fract_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_fract_obj = json_object_new_object();
+	struct v4l2_fract *p = static_cast<struct v4l2_fract*>(arg);
+
+	json_object_object_add(v4l2_fract_obj, "numerator", json_object_new_int64(p->numerator));
+	json_object_object_add(v4l2_fract_obj, "denominator", json_object_new_int64(p->denominator));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_fract", v4l2_fract_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_fract_obj);
+}
+
+void trace_v4l2_area_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_area_obj = json_object_new_object();
+	struct v4l2_area *p = static_cast<struct v4l2_area*>(arg);
+
+	json_object_object_add(v4l2_area_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_area_obj, "height", json_object_new_int64(p->height));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_area", v4l2_area_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_area_obj);
+}
+
+void trace_v4l2_capability_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_capability_obj = json_object_new_object();
+	struct v4l2_capability *p = static_cast<struct v4l2_capability*>(arg);
+
+	json_object_object_add(v4l2_capability_obj, "driver", json_object_new_string(reinterpret_cast<const char *>(p->driver)));
+	json_object_object_add(v4l2_capability_obj, "card", json_object_new_string(reinterpret_cast<const char *>(p->card)));
+	json_object_object_add(v4l2_capability_obj, "bus_info", json_object_new_string(reinterpret_cast<const char *>(p->bus_info)));
+	json_object_object_add(v4l2_capability_obj, "version", json_object_new_string(ver2s(p->version).c_str()));
+	json_object_object_add(v4l2_capability_obj, "capabilities", json_object_new_string(fl2s(p->capabilities, v4l2_cap_flag_def).c_str()));
+	json_object_object_add(v4l2_capability_obj, "device_caps", json_object_new_string(fl2s(p->device_caps, v4l2_cap_flag_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_capability", v4l2_capability_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_capability_obj);
+}
+
+void trace_v4l2_pix_format_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_pix_format_obj = json_object_new_object();
+	struct v4l2_pix_format *p = static_cast<struct v4l2_pix_format*>(arg);
+
+	json_object_object_add(v4l2_pix_format_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_pix_format_obj, "height", json_object_new_int64(p->height));
+	json_object_object_add(v4l2_pix_format_obj, "pixelformat", json_object_new_string(val2s(p->pixelformat, v4l2_pix_fmt_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_obj, "field", json_object_new_string(val2s(p->field, v4l2_field_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_obj, "bytesperline", json_object_new_int64(p->bytesperline));
+	json_object_object_add(v4l2_pix_format_obj, "sizeimage", json_object_new_int64(p->sizeimage));
+	json_object_object_add(v4l2_pix_format_obj, "colorspace", json_object_new_string(val2s(p->colorspace, v4l2_colorspace_val_def).c_str()));
+	if (p->priv == V4L2_PIX_FMT_PRIV_MAGIC)
+		json_object_object_add(v4l2_pix_format_obj, "priv", json_object_new_string("V4L2_PIX_FMT_PRIV_MAGIC"));
+	else
+		json_object_object_add(v4l2_pix_format_obj, "priv", json_object_new_string(""));
+	json_object_object_add(v4l2_pix_format_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_pix_fmt_flag_def).c_str()));
+	//union
+	json_object_object_add(v4l2_pix_format_obj, "ycbcr_enc", json_object_new_string(val2s(p->ycbcr_enc, v4l2_ycbcr_encoding_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_obj, "hsv_enc", json_object_new_int64(p->hsv_enc));
+	//end of union 	};
+	json_object_object_add(v4l2_pix_format_obj, "quantization", json_object_new_string(val2s(p->quantization, v4l2_quantization_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_obj, "xfer_func", json_object_new_string(val2s(p->xfer_func, v4l2_xfer_func_val_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_pix_format", v4l2_pix_format_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_pix_format_obj);
+}
+
+void trace_v4l2_fmtdesc_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_fmtdesc_obj = json_object_new_object();
+	struct v4l2_fmtdesc *p = static_cast<struct v4l2_fmtdesc*>(arg);
+
+	json_object_object_add(v4l2_fmtdesc_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_fmtdesc_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	json_object_object_add(v4l2_fmtdesc_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_fmt_flag_def).c_str()));
+	json_object_object_add(v4l2_fmtdesc_obj, "description", json_object_new_string(reinterpret_cast<const char *>(p->description)));
+	json_object_object_add(v4l2_fmtdesc_obj, "pixelformat", json_object_new_string(val2s(p->pixelformat, v4l2_pix_fmt_val_def).c_str()));
+	json_object_object_add(v4l2_fmtdesc_obj, "mbus_code", json_object_new_int64(p->mbus_code));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_fmtdesc", v4l2_fmtdesc_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_fmtdesc_obj);
+}
+
+void trace_v4l2_frmsize_discrete_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_frmsize_discrete_obj = json_object_new_object();
+	struct v4l2_frmsize_discrete *p = static_cast<struct v4l2_frmsize_discrete*>(arg);
+
+	json_object_object_add(v4l2_frmsize_discrete_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_frmsize_discrete_obj, "height", json_object_new_int64(p->height));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_frmsize_discrete", v4l2_frmsize_discrete_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_frmsize_discrete_obj);
+}
+
+void trace_v4l2_frmsize_stepwise_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_frmsize_stepwise_obj = json_object_new_object();
+	struct v4l2_frmsize_stepwise *p = static_cast<struct v4l2_frmsize_stepwise*>(arg);
+
+	json_object_object_add(v4l2_frmsize_stepwise_obj, "min_width", json_object_new_int64(p->min_width));
+	json_object_object_add(v4l2_frmsize_stepwise_obj, "max_width", json_object_new_int64(p->max_width));
+	json_object_object_add(v4l2_frmsize_stepwise_obj, "step_width", json_object_new_int64(p->step_width));
+	json_object_object_add(v4l2_frmsize_stepwise_obj, "min_height", json_object_new_int64(p->min_height));
+	json_object_object_add(v4l2_frmsize_stepwise_obj, "max_height", json_object_new_int64(p->max_height));
+	json_object_object_add(v4l2_frmsize_stepwise_obj, "step_height", json_object_new_int64(p->step_height));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_frmsize_stepwise", v4l2_frmsize_stepwise_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_frmsize_stepwise_obj);
+}
+
+void trace_v4l2_frmsizeenum_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_frmsizeenum_obj = json_object_new_object();
+	struct v4l2_frmsizeenum *p = static_cast<struct v4l2_frmsizeenum*>(arg);
+
+	json_object_object_add(v4l2_frmsizeenum_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_frmsizeenum_obj, "pixel_format", json_object_new_string(val2s(p->pixel_format, v4l2_pix_fmt_val_def).c_str()));
+	json_object_object_add(v4l2_frmsizeenum_obj, "type", json_object_new_string(val2s(p->type, v4l2_frmsizetypes_val_def).c_str()));
+	//union
+	switch (p->type) {
+	case V4L2_FRMSIZE_TYPE_DISCRETE:
+		trace_v4l2_frmsize_discrete_gen(&p->discrete, v4l2_frmsizeenum_obj);
+		break;
+	case V4L2_FRMSIZE_TYPE_STEPWISE:
+	case V4L2_FRMSIZE_TYPE_CONTINUOUS:
+		trace_v4l2_frmsize_stepwise_gen(&p->stepwise, v4l2_frmsizeenum_obj);
+		break;
+	default:
+		break;
+	}
+	//struct v4l2_frmsize_discrete	discrete;
+	//struct v4l2_frmsize_stepwise	stepwise;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_frmsizeenum", v4l2_frmsizeenum_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_frmsizeenum_obj);
+}
+
+void trace_v4l2_frmival_stepwise_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_frmival_stepwise_obj = json_object_new_object();
+	struct v4l2_frmival_stepwise *p = static_cast<struct v4l2_frmival_stepwise*>(arg);
+
+	//struct v4l2_fract	min;
+	trace_v4l2_fract_gen(&p->min, v4l2_frmival_stepwise_obj, "min");
+	//struct v4l2_fract	max;
+	trace_v4l2_fract_gen(&p->max, v4l2_frmival_stepwise_obj, "max");
+	//struct v4l2_fract	step;
+	trace_v4l2_fract_gen(&p->step, v4l2_frmival_stepwise_obj, "step");
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_frmival_stepwise", v4l2_frmival_stepwise_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_frmival_stepwise_obj);
+}
+
+void trace_v4l2_frmivalenum_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_frmivalenum_obj = json_object_new_object();
+	struct v4l2_frmivalenum *p = static_cast<struct v4l2_frmivalenum*>(arg);
+
+	json_object_object_add(v4l2_frmivalenum_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_frmivalenum_obj, "pixel_format", json_object_new_string(val2s(p->pixel_format, v4l2_pix_fmt_val_def).c_str()));
+	json_object_object_add(v4l2_frmivalenum_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_frmivalenum_obj, "height", json_object_new_int64(p->height));
+	json_object_object_add(v4l2_frmivalenum_obj, "type", json_object_new_string(val2s(p->type, v4l2_frmivaltypes_val_def).c_str()));
+	//union
+	switch (p->type) {
+	case V4L2_FRMIVAL_TYPE_DISCRETE:
+		trace_v4l2_fract_gen(&p->discrete, v4l2_frmivalenum_obj);
+		break;
+	case V4L2_FRMIVAL_TYPE_STEPWISE:
+	case V4L2_FRMIVAL_TYPE_CONTINUOUS:
+		trace_v4l2_frmival_stepwise_gen(&p->stepwise, v4l2_frmivalenum_obj);
+		break;
+	default:
+		break;
+	}
+	//struct v4l2_fract		discrete;
+	//struct v4l2_frmival_stepwise	stepwise;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_frmivalenum", v4l2_frmivalenum_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_frmivalenum_obj);
+}
+
+void trace_v4l2_timecode_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_timecode_obj = json_object_new_object();
+	struct v4l2_timecode *p = static_cast<struct v4l2_timecode*>(arg);
+
+	json_object_object_add(v4l2_timecode_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+	json_object_object_add(v4l2_timecode_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	json_object_object_add(v4l2_timecode_obj, "frames", json_object_new_int(p->frames));
+	json_object_object_add(v4l2_timecode_obj, "seconds", json_object_new_int(p->seconds));
+	json_object_object_add(v4l2_timecode_obj, "minutes", json_object_new_int(p->minutes));
+	json_object_object_add(v4l2_timecode_obj, "hours", json_object_new_int(p->hours));
+	json_object_object_add(v4l2_timecode_obj, "userbits", json_object_new_string(reinterpret_cast<const char *>(p->userbits)));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_timecode", v4l2_timecode_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_timecode_obj);
+}
+
+void trace_v4l2_jpegcompression_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_jpegcompression_obj = json_object_new_object();
+	struct v4l2_jpegcompression *p = static_cast<struct v4l2_jpegcompression*>(arg);
+
+	json_object_object_add(v4l2_jpegcompression_obj, "quality", json_object_new_int(p->quality));
+	json_object_object_add(v4l2_jpegcompression_obj, "APPn", json_object_new_int(p->APPn));
+	json_object_object_add(v4l2_jpegcompression_obj, "APP_len", json_object_new_int(p->APP_len));
+	json_object_object_add(v4l2_jpegcompression_obj, "APP_data", json_object_new_string(reinterpret_cast<const char *>(p->APP_data)));
+	json_object_object_add(v4l2_jpegcompression_obj, "COM_len", json_object_new_int(p->COM_len));
+	json_object_object_add(v4l2_jpegcompression_obj, "COM_data", json_object_new_string(reinterpret_cast<const char *>(p->COM_data)));
+	json_object_object_add(v4l2_jpegcompression_obj, "jpeg_markers", json_object_new_int64(p->jpeg_markers));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_jpegcompression", v4l2_jpegcompression_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_jpegcompression_obj);
+}
+
+void trace_v4l2_requestbuffers_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_requestbuffers_obj = json_object_new_object();
+	struct v4l2_requestbuffers *p = static_cast<struct v4l2_requestbuffers*>(arg);
+
+	json_object_object_add(v4l2_requestbuffers_obj, "count", json_object_new_int64(p->count));
+	json_object_object_add(v4l2_requestbuffers_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	json_object_object_add(v4l2_requestbuffers_obj, "memory", json_object_new_string(val2s(p->memory, v4l2_memory_val_def).c_str()));
+	json_object_object_add(v4l2_requestbuffers_obj, "capabilities", json_object_new_string(fl2s(p->capabilities, v4l2_buf_cap_flag_def).c_str()));
+	json_object_object_add(v4l2_requestbuffers_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_memory_flag_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_requestbuffers", v4l2_requestbuffers_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_requestbuffers_obj);
+}
+
+void trace_v4l2_plane_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_plane_obj = json_object_new_object();
+	struct v4l2_plane *p = static_cast<struct v4l2_plane*>(arg);
+
+	json_object_object_add(v4l2_plane_obj, "bytesused", json_object_new_int64(p->bytesused));
+	json_object_object_add(v4l2_plane_obj, "length", json_object_new_int64(p->length));
+	//union
+	//__u32		mem_offset;
+	//unsigned long	userptr;
+	//__s32		fd;
+	//end of union 	} m;
+	json_object_object_add(v4l2_plane_obj, "data_offset", json_object_new_int64(p->data_offset));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_plane", v4l2_plane_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_plane_obj);
+}
+
+void trace_v4l2_buffer_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_buffer_obj = json_object_new_object();
+	struct v4l2_buffer *p = static_cast<struct v4l2_buffer*>(arg);
+
+	json_object_object_add(v4l2_buffer_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_buffer_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	json_object_object_add(v4l2_buffer_obj, "bytesused", json_object_new_int64(p->bytesused));
+	json_object_object_add(v4l2_buffer_obj, "flags", json_object_new_string(fl2s_buffer(p->flags).c_str()));
+	json_object_object_add(v4l2_buffer_obj, "field", json_object_new_string(val2s(p->field, v4l2_field_val_def).c_str()));
+	//struct timeval		timestamp;
+	//struct v4l2_timecode	timecode;
+	trace_v4l2_timecode_gen(&p->timecode, v4l2_buffer_obj, "timecode");
+	json_object_object_add(v4l2_buffer_obj, "sequence", json_object_new_int64(p->sequence));
+	json_object_object_add(v4l2_buffer_obj, "memory", json_object_new_string(val2s(p->memory, v4l2_memory_val_def).c_str()));
+	//union
+	//__u32           offset;
+	//unsigned long   userptr;
+	//struct v4l2_plane *planes;
+	//__s32		fd;
+	//end of union 	} m;
+	json_object_object_add(v4l2_buffer_obj, "length", json_object_new_int64(p->length));
+	//union
+	//__s32		request_fd;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_buffer", v4l2_buffer_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_buffer_obj);
+}
+
+void trace_v4l2_exportbuffer_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_exportbuffer_obj = json_object_new_object();
+	struct v4l2_exportbuffer *p = static_cast<struct v4l2_exportbuffer*>(arg);
+
+	json_object_object_add(v4l2_exportbuffer_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	json_object_object_add(v4l2_exportbuffer_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_exportbuffer_obj, "plane", json_object_new_int64(p->plane));
+	json_object_object_add(v4l2_exportbuffer_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	json_object_object_add(v4l2_exportbuffer_obj, "fd", json_object_new_int(p->fd));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_exportbuffer", v4l2_exportbuffer_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_exportbuffer_obj);
+}
+
+void trace_v4l2_framebuffer_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_framebuffer_obj = json_object_new_object();
+	struct v4l2_framebuffer *p = static_cast<struct v4l2_framebuffer*>(arg);
+
+	json_object_object_add(v4l2_framebuffer_obj, "capability", json_object_new_int64(p->capability));
+	json_object_object_add(v4l2_framebuffer_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	//void                    *base;
+	//struct {
+	//__u32		width;
+	//__u32		height;
+	//__u32		pixelformat;
+	//__u32		field;
+	//__u32		bytesperline;
+	//__u32		sizeimage;
+	//__u32		colorspace;
+	//__u32		priv;
+	//end of struct 	} fmt;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_framebuffer", v4l2_framebuffer_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_framebuffer_obj);
+}
+
+void trace_v4l2_clip_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_clip_obj = json_object_new_object();
+	struct v4l2_clip *p = static_cast<struct v4l2_clip*>(arg);
+
+	//struct v4l2_rect        c;
+	trace_v4l2_rect_gen(&p->c, v4l2_clip_obj, "c");
+	//struct v4l2_clip	*next;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_clip", v4l2_clip_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_clip_obj);
+}
+
+void trace_v4l2_window_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_window_obj = json_object_new_object();
+	struct v4l2_window *p = static_cast<struct v4l2_window*>(arg);
+
+	//struct v4l2_rect        w;
+	trace_v4l2_rect_gen(&p->w, v4l2_window_obj, "w");
+	json_object_object_add(v4l2_window_obj, "field", json_object_new_string(val2s(p->field, v4l2_field_val_def).c_str()));
+	json_object_object_add(v4l2_window_obj, "chromakey", json_object_new_int64(p->chromakey));
+	//struct v4l2_clip	*clips;
+	json_object_object_add(v4l2_window_obj, "clipcount", json_object_new_int64(p->clipcount));
+	//void			*bitmap;
+	json_object_object_add(v4l2_window_obj, "global_alpha", json_object_new_int(p->global_alpha));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_window", v4l2_window_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_window_obj);
+}
+
+void trace_v4l2_captureparm_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_captureparm_obj = json_object_new_object();
+	struct v4l2_captureparm *p = static_cast<struct v4l2_captureparm*>(arg);
+
+	json_object_object_add(v4l2_captureparm_obj, "capability", json_object_new_string(val2s(p->capability, streamparm_val_def).c_str()));
+	json_object_object_add(v4l2_captureparm_obj, "capturemode", json_object_new_string(val2s(p->capturemode, streamparm_val_def).c_str()));
+	//struct v4l2_fract  timeperframe;
+	trace_v4l2_fract_gen(&p->timeperframe, v4l2_captureparm_obj, "timeperframe");
+	json_object_object_add(v4l2_captureparm_obj, "extendedmode", json_object_new_int64(p->extendedmode));
+	json_object_object_add(v4l2_captureparm_obj, "readbuffers", json_object_new_int64(p->readbuffers));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_captureparm", v4l2_captureparm_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_captureparm_obj);
+}
+
+void trace_v4l2_outputparm_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_outputparm_obj = json_object_new_object();
+	struct v4l2_outputparm *p = static_cast<struct v4l2_outputparm*>(arg);
+
+	json_object_object_add(v4l2_outputparm_obj, "capability", json_object_new_string(val2s(p->capability, streamparm_val_def).c_str()));
+	json_object_object_add(v4l2_outputparm_obj, "outputmode", json_object_new_string(val2s(p->outputmode, streamparm_val_def).c_str()));
+	//struct v4l2_fract  timeperframe;
+	trace_v4l2_fract_gen(&p->timeperframe, v4l2_outputparm_obj, "timeperframe");
+	json_object_object_add(v4l2_outputparm_obj, "extendedmode", json_object_new_int64(p->extendedmode));
+	json_object_object_add(v4l2_outputparm_obj, "writebuffers", json_object_new_int64(p->writebuffers));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_outputparm", v4l2_outputparm_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_outputparm_obj);
+}
+
+void trace_v4l2_cropcap_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_cropcap_obj = json_object_new_object();
+	struct v4l2_cropcap *p = static_cast<struct v4l2_cropcap*>(arg);
+
+	json_object_object_add(v4l2_cropcap_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	//struct v4l2_rect        bounds;
+	trace_v4l2_rect_gen(&p->bounds, v4l2_cropcap_obj, "bounds");
+	//struct v4l2_rect        defrect;
+	trace_v4l2_rect_gen(&p->defrect, v4l2_cropcap_obj, "defrect");
+	//struct v4l2_fract       pixelaspect;
+	trace_v4l2_fract_gen(&p->pixelaspect, v4l2_cropcap_obj, "pixelaspect");
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_cropcap", v4l2_cropcap_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_cropcap_obj);
+}
+
+void trace_v4l2_crop_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_crop_obj = json_object_new_object();
+	struct v4l2_crop *p = static_cast<struct v4l2_crop*>(arg);
+
+	json_object_object_add(v4l2_crop_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	//struct v4l2_rect        c;
+	trace_v4l2_rect_gen(&p->c, v4l2_crop_obj, "c");
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_crop", v4l2_crop_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_crop_obj);
+}
+
+void trace_v4l2_selection_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_selection_obj = json_object_new_object();
+	struct v4l2_selection *p = static_cast<struct v4l2_selection*>(arg);
+
+	json_object_object_add(v4l2_selection_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	json_object_object_add(v4l2_selection_obj, "target", json_object_new_string(val2s(p->target, selection_target_val_def).c_str()));
+	json_object_object_add(v4l2_selection_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_sel_flag_def).c_str()));
+	//struct v4l2_rect        r;
+	trace_v4l2_rect_gen(&p->r, v4l2_selection_obj, "r");
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_selection", v4l2_selection_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_selection_obj);
+}
+
+void trace_v4l2_standard_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_standard_obj = json_object_new_object();
+	struct v4l2_standard *p = static_cast<struct v4l2_standard*>(arg);
+
+	json_object_object_add(v4l2_standard_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_standard_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(v4l2_standard_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	//struct v4l2_fract    frameperiod;
+	trace_v4l2_fract_gen(&p->frameperiod, v4l2_standard_obj, "frameperiod");
+	json_object_object_add(v4l2_standard_obj, "framelines", json_object_new_int64(p->framelines));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_standard", v4l2_standard_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_standard_obj);
+}
+
+void trace_v4l2_bt_timings_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_bt_timings_obj = json_object_new_object();
+	struct v4l2_bt_timings *p = static_cast<struct v4l2_bt_timings*>(arg);
+
+	json_object_object_add(v4l2_bt_timings_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_bt_timings_obj, "height", json_object_new_int64(p->height));
+	json_object_object_add(v4l2_bt_timings_obj, "interlaced", json_object_new_int64(p->interlaced));
+	json_object_object_add(v4l2_bt_timings_obj, "polarities", json_object_new_int64(p->polarities));
+	json_object_object_add(v4l2_bt_timings_obj, "pixelclock", json_object_new_uint64(p->pixelclock));
+	json_object_object_add(v4l2_bt_timings_obj, "hfrontporch", json_object_new_int64(p->hfrontporch));
+	json_object_object_add(v4l2_bt_timings_obj, "hsync", json_object_new_int64(p->hsync));
+	json_object_object_add(v4l2_bt_timings_obj, "hbackporch", json_object_new_int64(p->hbackporch));
+	json_object_object_add(v4l2_bt_timings_obj, "vfrontporch", json_object_new_int64(p->vfrontporch));
+	json_object_object_add(v4l2_bt_timings_obj, "vsync", json_object_new_int64(p->vsync));
+	json_object_object_add(v4l2_bt_timings_obj, "vbackporch", json_object_new_int64(p->vbackporch));
+	json_object_object_add(v4l2_bt_timings_obj, "il_vfrontporch", json_object_new_int64(p->il_vfrontporch));
+	json_object_object_add(v4l2_bt_timings_obj, "il_vsync", json_object_new_int64(p->il_vsync));
+	json_object_object_add(v4l2_bt_timings_obj, "il_vbackporch", json_object_new_int64(p->il_vbackporch));
+	json_object_object_add(v4l2_bt_timings_obj, "standards", json_object_new_int64(p->standards));
+	json_object_object_add(v4l2_bt_timings_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	//struct v4l2_fract picture_aspect;
+	trace_v4l2_fract_gen(&p->picture_aspect, v4l2_bt_timings_obj, "picture_aspect");
+	json_object_object_add(v4l2_bt_timings_obj, "cea861_vic", json_object_new_int(p->cea861_vic));
+	json_object_object_add(v4l2_bt_timings_obj, "hdmi_vic", json_object_new_int(p->hdmi_vic));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_bt_timings", v4l2_bt_timings_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_bt_timings_obj);
+}
+
+void trace_v4l2_dv_timings_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_dv_timings_obj = json_object_new_object();
+	struct v4l2_dv_timings *p = static_cast<struct v4l2_dv_timings*>(arg);
+
+	json_object_object_add(v4l2_dv_timings_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+	//union
+	//struct v4l2_bt_timings	bt;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_dv_timings", v4l2_dv_timings_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_dv_timings_obj);
+}
+
+void trace_v4l2_enum_dv_timings_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_enum_dv_timings_obj = json_object_new_object();
+	struct v4l2_enum_dv_timings *p = static_cast<struct v4l2_enum_dv_timings*>(arg);
+
+	json_object_object_add(v4l2_enum_dv_timings_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_enum_dv_timings_obj, "pad", json_object_new_int64(p->pad));
+	//struct v4l2_dv_timings timings;
+	trace_v4l2_dv_timings_gen(&p->timings, v4l2_enum_dv_timings_obj, "timings");
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_enum_dv_timings", v4l2_enum_dv_timings_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_enum_dv_timings_obj);
+}
+
+void trace_v4l2_bt_timings_cap_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_bt_timings_cap_obj = json_object_new_object();
+	struct v4l2_bt_timings_cap *p = static_cast<struct v4l2_bt_timings_cap*>(arg);
+
+	json_object_object_add(v4l2_bt_timings_cap_obj, "min_width", json_object_new_int64(p->min_width));
+	json_object_object_add(v4l2_bt_timings_cap_obj, "max_width", json_object_new_int64(p->max_width));
+	json_object_object_add(v4l2_bt_timings_cap_obj, "min_height", json_object_new_int64(p->min_height));
+	json_object_object_add(v4l2_bt_timings_cap_obj, "max_height", json_object_new_int64(p->max_height));
+	json_object_object_add(v4l2_bt_timings_cap_obj, "min_pixelclock", json_object_new_uint64(p->min_pixelclock));
+	json_object_object_add(v4l2_bt_timings_cap_obj, "max_pixelclock", json_object_new_uint64(p->max_pixelclock));
+	json_object_object_add(v4l2_bt_timings_cap_obj, "standards", json_object_new_int64(p->standards));
+	json_object_object_add(v4l2_bt_timings_cap_obj, "capabilities", json_object_new_int64(p->capabilities));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_bt_timings_cap", v4l2_bt_timings_cap_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_bt_timings_cap_obj);
+}
+
+void trace_v4l2_dv_timings_cap_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_dv_timings_cap_obj = json_object_new_object();
+	struct v4l2_dv_timings_cap *p = static_cast<struct v4l2_dv_timings_cap*>(arg);
+
+	json_object_object_add(v4l2_dv_timings_cap_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+	json_object_object_add(v4l2_dv_timings_cap_obj, "pad", json_object_new_int64(p->pad));
+	//union
+	//struct v4l2_bt_timings_cap bt;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_dv_timings_cap", v4l2_dv_timings_cap_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_dv_timings_cap_obj);
+}
+
+void trace_v4l2_input_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_input_obj = json_object_new_object();
+	struct v4l2_input *p = static_cast<struct v4l2_input*>(arg);
+
+	json_object_object_add(v4l2_input_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_input_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_input_obj, "type", json_object_new_string(val2s(p->type, input_type_val_def).c_str()));
+	json_object_object_add(v4l2_input_obj, "audioset", json_object_new_int64(p->audioset));
+	json_object_object_add(v4l2_input_obj, "tuner", json_object_new_int64(p->tuner));
+	json_object_object_add(v4l2_input_obj, "std", json_object_new_uint64(p->std));
+	json_object_object_add(v4l2_input_obj, "status", json_object_new_int64(p->status));
+	json_object_object_add(v4l2_input_obj, "capabilities", json_object_new_int64(p->capabilities));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_input", v4l2_input_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_input_obj);
+}
+
+void trace_v4l2_output_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_output_obj = json_object_new_object();
+	struct v4l2_output *p = static_cast<struct v4l2_output*>(arg);
+
+	json_object_object_add(v4l2_output_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_output_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_output_obj, "type", json_object_new_string(val2s(p->type, output_type_val_def).c_str()));
+	json_object_object_add(v4l2_output_obj, "audioset", json_object_new_int64(p->audioset));
+	json_object_object_add(v4l2_output_obj, "modulator", json_object_new_int64(p->modulator));
+	json_object_object_add(v4l2_output_obj, "std", json_object_new_uint64(p->std));
+	json_object_object_add(v4l2_output_obj, "capabilities", json_object_new_int64(p->capabilities));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_output", v4l2_output_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_output_obj);
+}
+
+void trace_v4l2_control_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_control_obj = json_object_new_object();
+	struct v4l2_control *p = static_cast<struct v4l2_control*>(arg);
+
+	json_object_object_add(v4l2_control_obj, "id", json_object_new_string(val2s(p->id, control_val_def).c_str()));
+	json_object_object_add(v4l2_control_obj, "value", json_object_new_int(p->value));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_control", v4l2_control_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_control_obj);
+}
+
+void trace_v4l2_ext_control_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_ext_control_obj = json_object_new_object();
+	struct v4l2_ext_control *p = static_cast<struct v4l2_ext_control*>(arg);
+
+	json_object_object_add(v4l2_ext_control_obj, "id", json_object_new_string(val2s(p->id, control_val_def).c_str()));
+	json_object_object_add(v4l2_ext_control_obj, "size", json_object_new_int64(p->size));
+	//union
+	//__s32 value;
+	//__s64 value64;
+	//char *string;
+	//__u8 *p_u8;
+	//__u16 *p_u16;
+	//__u32 *p_u32;
+	//__s32 *p_s32;
+	//__s64 *p_s64;
+	//struct v4l2_area *p_area;
+	//struct v4l2_ctrl_h264_sps *p_h264_sps;
+	//struct v4l2_ctrl_h264_pps *p_h264_pps;
+	//struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix;
+	//struct v4l2_ctrl_h264_pred_weights *p_h264_pred_weights;
+	//struct v4l2_ctrl_h264_slice_params *p_h264_slice_params;
+	//struct v4l2_ctrl_h264_decode_params *p_h264_decode_params;
+	//struct v4l2_ctrl_fwht_params *p_fwht_params;
+	//struct v4l2_ctrl_vp8_frame *p_vp8_frame;
+	//struct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;
+	//struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;
+	//struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;
+	//struct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;
+	//struct v4l2_ctrl_vp9_frame *p_vp9_frame;
+	//struct v4l2_ctrl_hevc_sps *p_hevc_sps;
+	//struct v4l2_ctrl_hevc_pps *p_hevc_pps;
+	//struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params;
+	//struct v4l2_ctrl_hevc_scaling_matrix *p_hevc_scaling_matrix;
+	//struct v4l2_ctrl_hevc_decode_params *p_hevc_decode_params;
+	//struct v4l2_ctrl_av1_sequence *p_av1_sequence;
+	//struct v4l2_ctrl_av1_tile_group_entry *p_av1_tile_group_entry;
+	//struct v4l2_ctrl_av1_frame *p_av1_frame;
+	//struct v4l2_ctrl_av1_film_grain *p_av1_film_grain;
+	//struct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll_info;
+	//struct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering_display;
+	//void *ptr;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_ext_control", v4l2_ext_control_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_ext_control_obj);
+}
+
+void trace_v4l2_ext_controls_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_ext_controls_obj = json_object_new_object();
+	struct v4l2_ext_controls *p = static_cast<struct v4l2_ext_controls*>(arg);
+
+	//union
+	//__u32 ctrl_class;
+	//__u32 which;
+	//end of union 	};
+	json_object_object_add(v4l2_ext_controls_obj, "count", json_object_new_int64(p->count));
+	json_object_object_add(v4l2_ext_controls_obj, "error_idx", json_object_new_int64(p->error_idx));
+	json_object_object_add(v4l2_ext_controls_obj, "request_fd", json_object_new_int(p->request_fd));
+	//struct v4l2_ext_control *controls;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_ext_controls", v4l2_ext_controls_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_ext_controls_obj);
+}
+
+void trace_v4l2_queryctrl_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_queryctrl_obj = json_object_new_object();
+	struct v4l2_queryctrl *p = static_cast<struct v4l2_queryctrl*>(arg);
+
+	json_object_object_add(v4l2_queryctrl_obj, "id", json_object_new_string(val2s(p->id, control_val_def).c_str()));
+	json_object_object_add(v4l2_queryctrl_obj, "type", json_object_new_string(val2s(p->type, v4l2_ctrl_type_val_def).c_str()));
+	json_object_object_add(v4l2_queryctrl_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_queryctrl_obj, "minimum", json_object_new_int(p->minimum));
+	json_object_object_add(v4l2_queryctrl_obj, "maximum", json_object_new_int(p->maximum));
+	json_object_object_add(v4l2_queryctrl_obj, "step", json_object_new_int(p->step));
+	json_object_object_add(v4l2_queryctrl_obj, "default_value", json_object_new_int(p->default_value));
+	json_object_object_add(v4l2_queryctrl_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_ctrl_flag_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_queryctrl", v4l2_queryctrl_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_queryctrl_obj);
+}
+
+void trace_v4l2_query_ext_ctrl_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_query_ext_ctrl_obj = json_object_new_object();
+	struct v4l2_query_ext_ctrl *p = static_cast<struct v4l2_query_ext_ctrl*>(arg);
+
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "id", json_object_new_string(val2s(p->id, control_val_def).c_str()));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "type", json_object_new_string(val2s(p->type, v4l2_ctrl_type_val_def).c_str()));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "minimum", json_object_new_int64(p->minimum));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "maximum", json_object_new_int64(p->maximum));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "step", json_object_new_uint64(p->step));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "default_value", json_object_new_int64(p->default_value));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_ctrl_flag_def).c_str()));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "elem_size", json_object_new_int64(p->elem_size));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "elems", json_object_new_int64(p->elems));
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "nr_of_dims", json_object_new_int64(p->nr_of_dims));
+	/* __u32                dims[V4L2_CTRL_MAX_DIMS]; */
+	json_object *dims_obj = json_object_new_array();
+	for (int i = 0; i < (std::min((int) p->nr_of_dims, V4L2_CTRL_MAX_DIMS)); i++) {
+		json_object_array_add(dims_obj, json_object_new_int64(p->dims[i]));
+	}
+	json_object_object_add(v4l2_query_ext_ctrl_obj, "dims", dims_obj);
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_query_ext_ctrl", v4l2_query_ext_ctrl_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_query_ext_ctrl_obj);
+}
+
+void trace_v4l2_querymenu_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_querymenu_obj = json_object_new_object();
+	struct v4l2_querymenu *p = static_cast<struct v4l2_querymenu*>(arg);
+
+	json_object_object_add(v4l2_querymenu_obj, "id", json_object_new_string(val2s(p->id, control_val_def).c_str()));
+	json_object_object_add(v4l2_querymenu_obj, "index", json_object_new_int64(p->index));
+	//union
+	//__u8	name[32];
+	//__s64	value;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_querymenu", v4l2_querymenu_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_querymenu_obj);
+}
+
+void trace_v4l2_tuner_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_tuner_obj = json_object_new_object();
+	struct v4l2_tuner *p = static_cast<struct v4l2_tuner*>(arg);
+
+	json_object_object_add(v4l2_tuner_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_tuner_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_tuner_obj, "type", json_object_new_string(val2s(p->type, v4l2_tuner_type_val_def).c_str()));
+	json_object_object_add(v4l2_tuner_obj, "capability", json_object_new_string(fl2s(p->capability, tuner_cap_flag_def).c_str()));
+	json_object_object_add(v4l2_tuner_obj, "rangelow", json_object_new_int64(p->rangelow));
+	json_object_object_add(v4l2_tuner_obj, "rangehigh", json_object_new_int64(p->rangehigh));
+	json_object_object_add(v4l2_tuner_obj, "rxsubchans", json_object_new_string(fl2s(p->rxsubchans, tuner_rxsub_flag_def).c_str()));
+	json_object_object_add(v4l2_tuner_obj, "audmode", json_object_new_string(val2s(p->audmode, tuner_audmode_val_def).c_str()));
+	json_object_object_add(v4l2_tuner_obj, "signal", json_object_new_int(p->signal));
+	json_object_object_add(v4l2_tuner_obj, "afc", json_object_new_int(p->afc));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_tuner", v4l2_tuner_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_tuner_obj);
+}
+
+void trace_v4l2_modulator_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_modulator_obj = json_object_new_object();
+	struct v4l2_modulator *p = static_cast<struct v4l2_modulator*>(arg);
+
+	json_object_object_add(v4l2_modulator_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_modulator_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_modulator_obj, "capability", json_object_new_int64(p->capability));
+	json_object_object_add(v4l2_modulator_obj, "rangelow", json_object_new_int64(p->rangelow));
+	json_object_object_add(v4l2_modulator_obj, "rangehigh", json_object_new_int64(p->rangehigh));
+	json_object_object_add(v4l2_modulator_obj, "txsubchans", json_object_new_int64(p->txsubchans));
+	json_object_object_add(v4l2_modulator_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_modulator", v4l2_modulator_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_modulator_obj);
+}
+
+void trace_v4l2_frequency_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_frequency_obj = json_object_new_object();
+	struct v4l2_frequency *p = static_cast<struct v4l2_frequency*>(arg);
+
+	json_object_object_add(v4l2_frequency_obj, "tuner", json_object_new_int64(p->tuner));
+	json_object_object_add(v4l2_frequency_obj, "type", json_object_new_string(val2s(p->type, v4l2_tuner_type_val_def).c_str()));
+	json_object_object_add(v4l2_frequency_obj, "frequency", json_object_new_int64(p->frequency));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_frequency", v4l2_frequency_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_frequency_obj);
+}
+
+void trace_v4l2_frequency_band_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_frequency_band_obj = json_object_new_object();
+	struct v4l2_frequency_band *p = static_cast<struct v4l2_frequency_band*>(arg);
+
+	json_object_object_add(v4l2_frequency_band_obj, "tuner", json_object_new_int64(p->tuner));
+	json_object_object_add(v4l2_frequency_band_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+	json_object_object_add(v4l2_frequency_band_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_frequency_band_obj, "capability", json_object_new_int64(p->capability));
+	json_object_object_add(v4l2_frequency_band_obj, "rangelow", json_object_new_int64(p->rangelow));
+	json_object_object_add(v4l2_frequency_band_obj, "rangehigh", json_object_new_int64(p->rangehigh));
+	json_object_object_add(v4l2_frequency_band_obj, "modulation", json_object_new_int64(p->modulation));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_frequency_band", v4l2_frequency_band_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_frequency_band_obj);
+}
+
+void trace_v4l2_hw_freq_seek_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_hw_freq_seek_obj = json_object_new_object();
+	struct v4l2_hw_freq_seek *p = static_cast<struct v4l2_hw_freq_seek*>(arg);
+
+	json_object_object_add(v4l2_hw_freq_seek_obj, "tuner", json_object_new_int64(p->tuner));
+	json_object_object_add(v4l2_hw_freq_seek_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+	json_object_object_add(v4l2_hw_freq_seek_obj, "seek_upward", json_object_new_int64(p->seek_upward));
+	json_object_object_add(v4l2_hw_freq_seek_obj, "wrap_around", json_object_new_int64(p->wrap_around));
+	json_object_object_add(v4l2_hw_freq_seek_obj, "spacing", json_object_new_int64(p->spacing));
+	json_object_object_add(v4l2_hw_freq_seek_obj, "rangelow", json_object_new_int64(p->rangelow));
+	json_object_object_add(v4l2_hw_freq_seek_obj, "rangehigh", json_object_new_int64(p->rangehigh));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_hw_freq_seek", v4l2_hw_freq_seek_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_hw_freq_seek_obj);
+}
+
+void trace_v4l2_rds_data_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_rds_data_obj = json_object_new_object();
+	struct v4l2_rds_data *p = static_cast<struct v4l2_rds_data*>(arg);
+
+	json_object_object_add(v4l2_rds_data_obj, "lsb", json_object_new_int(p->lsb));
+	json_object_object_add(v4l2_rds_data_obj, "msb", json_object_new_int(p->msb));
+	json_object_object_add(v4l2_rds_data_obj, "block", json_object_new_int(p->block));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_rds_data", v4l2_rds_data_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_rds_data_obj);
+}
+
+void trace_v4l2_audio_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_audio_obj = json_object_new_object();
+	struct v4l2_audio *p = static_cast<struct v4l2_audio*>(arg);
+
+	json_object_object_add(v4l2_audio_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_audio_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_audio_obj, "capability", json_object_new_int64(p->capability));
+	json_object_object_add(v4l2_audio_obj, "mode", json_object_new_int64(p->mode));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_audio", v4l2_audio_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_audio_obj);
+}
+
+void trace_v4l2_audioout_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_audioout_obj = json_object_new_object();
+	struct v4l2_audioout *p = static_cast<struct v4l2_audioout*>(arg);
+
+	json_object_object_add(v4l2_audioout_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_audioout_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_audioout_obj, "capability", json_object_new_int64(p->capability));
+	json_object_object_add(v4l2_audioout_obj, "mode", json_object_new_int64(p->mode));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_audioout", v4l2_audioout_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_audioout_obj);
+}
+
+void trace_v4l2_enc_idx_entry_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_enc_idx_entry_obj = json_object_new_object();
+	struct v4l2_enc_idx_entry *p = static_cast<struct v4l2_enc_idx_entry*>(arg);
+
+	json_object_object_add(v4l2_enc_idx_entry_obj, "offset", json_object_new_uint64(p->offset));
+	json_object_object_add(v4l2_enc_idx_entry_obj, "pts", json_object_new_uint64(p->pts));
+	json_object_object_add(v4l2_enc_idx_entry_obj, "length", json_object_new_int64(p->length));
+	json_object_object_add(v4l2_enc_idx_entry_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_enc_idx_entry", v4l2_enc_idx_entry_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_enc_idx_entry_obj);
+}
+
+void trace_v4l2_enc_idx_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_enc_idx_obj = json_object_new_object();
+	struct v4l2_enc_idx *p = static_cast<struct v4l2_enc_idx*>(arg);
+
+	json_object_object_add(v4l2_enc_idx_obj, "entries", json_object_new_int64(p->entries));
+	json_object_object_add(v4l2_enc_idx_obj, "entries_cap", json_object_new_int64(p->entries_cap));
+	//struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES];
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_enc_idx", v4l2_enc_idx_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_enc_idx_obj);
+}
+
+void trace_v4l2_encoder_cmd_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_encoder_cmd_obj = json_object_new_object();
+	struct v4l2_encoder_cmd *p = static_cast<struct v4l2_encoder_cmd*>(arg);
+
+	json_object_object_add(v4l2_encoder_cmd_obj, "cmd", json_object_new_string(val2s(p->cmd, encoder_cmd_val_def).c_str()));
+	json_object_object_add(v4l2_encoder_cmd_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	//union
+	//struct {
+	//__u32 data[8];
+	//end of union 		} raw;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_encoder_cmd", v4l2_encoder_cmd_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_encoder_cmd_obj);
+}
+
+void trace_v4l2_decoder_cmd_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_decoder_cmd_obj = json_object_new_object();
+	struct v4l2_decoder_cmd *p = static_cast<struct v4l2_decoder_cmd*>(arg);
+
+	json_object_object_add(v4l2_decoder_cmd_obj, "cmd", json_object_new_string(val2s(p->cmd, decoder_cmd_val_def).c_str()));
+	json_object_object_add(v4l2_decoder_cmd_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	//union
+	//struct {
+	//__u64 pts;
+	//end of union 		} stop;
+	//struct {
+	//__s32 speed;
+	//__u32 format;
+	//end of struct 		} start;
+	//struct {
+	//__u32 data[16];
+	//end of struct 		} raw;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_decoder_cmd", v4l2_decoder_cmd_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_decoder_cmd_obj);
+}
+
+void trace_v4l2_vbi_format_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_vbi_format_obj = json_object_new_object();
+	struct v4l2_vbi_format *p = static_cast<struct v4l2_vbi_format*>(arg);
+
+	json_object_object_add(v4l2_vbi_format_obj, "sampling_rate", json_object_new_int64(p->sampling_rate));
+	json_object_object_add(v4l2_vbi_format_obj, "offset", json_object_new_int64(p->offset));
+	json_object_object_add(v4l2_vbi_format_obj, "samples_per_line", json_object_new_int64(p->samples_per_line));
+	json_object_object_add(v4l2_vbi_format_obj, "sample_format", json_object_new_int64(p->sample_format));
+	json_object_object_add(v4l2_vbi_format_obj, "start", json_object_new_string(reinterpret_cast<const char *>(p->start)));
+	json_object_object_add(v4l2_vbi_format_obj, "count", json_object_new_string(reinterpret_cast<const char *>(p->count)));
+	json_object_object_add(v4l2_vbi_format_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_vbi_format", v4l2_vbi_format_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_vbi_format_obj);
+}
+
+void trace_v4l2_sliced_vbi_format_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_sliced_vbi_format_obj = json_object_new_object();
+	struct v4l2_sliced_vbi_format *p = static_cast<struct v4l2_sliced_vbi_format*>(arg);
+
+	json_object_object_add(v4l2_sliced_vbi_format_obj, "service_set", json_object_new_int(p->service_set));
+	//__u16   service_lines[2][24];
+	json_object_object_add(v4l2_sliced_vbi_format_obj, "io_size", json_object_new_int64(p->io_size));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_sliced_vbi_format", v4l2_sliced_vbi_format_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_sliced_vbi_format_obj);
+}
+
+void trace_v4l2_sliced_vbi_cap_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_sliced_vbi_cap_obj = json_object_new_object();
+	struct v4l2_sliced_vbi_cap *p = static_cast<struct v4l2_sliced_vbi_cap*>(arg);
+
+	json_object_object_add(v4l2_sliced_vbi_cap_obj, "service_set", json_object_new_int(p->service_set));
+	//__u16   service_lines[2][24];
+	json_object_object_add(v4l2_sliced_vbi_cap_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_sliced_vbi_cap", v4l2_sliced_vbi_cap_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_sliced_vbi_cap_obj);
+}
+
+void trace_v4l2_sliced_vbi_data_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_sliced_vbi_data_obj = json_object_new_object();
+	struct v4l2_sliced_vbi_data *p = static_cast<struct v4l2_sliced_vbi_data*>(arg);
+
+	json_object_object_add(v4l2_sliced_vbi_data_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(v4l2_sliced_vbi_data_obj, "field", json_object_new_string(val2s(p->field, nullptr).c_str()));
+	json_object_object_add(v4l2_sliced_vbi_data_obj, "line", json_object_new_int64(p->line));
+	json_object_object_add(v4l2_sliced_vbi_data_obj, "data", json_object_new_string(reinterpret_cast<const char *>(p->data)));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_sliced_vbi_data", v4l2_sliced_vbi_data_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_sliced_vbi_data_obj);
+}
+
+void trace_v4l2_mpeg_vbi_itv0_line_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_mpeg_vbi_itv0_line_obj = json_object_new_object();
+	struct v4l2_mpeg_vbi_itv0_line *p = static_cast<struct v4l2_mpeg_vbi_itv0_line*>(arg);
+
+	json_object_object_add(v4l2_mpeg_vbi_itv0_line_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(v4l2_mpeg_vbi_itv0_line_obj, "data", json_object_new_string(reinterpret_cast<const char *>(p->data)));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_mpeg_vbi_itv0_line", v4l2_mpeg_vbi_itv0_line_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_mpeg_vbi_itv0_line_obj);
+}
+
+void trace_v4l2_mpeg_vbi_itv0_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_mpeg_vbi_itv0_obj = json_object_new_object();
+	struct v4l2_mpeg_vbi_itv0 *p = static_cast<struct v4l2_mpeg_vbi_itv0*>(arg);
+
+	json_object_object_add(v4l2_mpeg_vbi_itv0_obj, "linemask", json_object_new_string(reinterpret_cast<const char *>(p->linemask)));
+	//struct v4l2_mpeg_vbi_itv0_line line[35];
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_mpeg_vbi_itv0", v4l2_mpeg_vbi_itv0_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_mpeg_vbi_itv0_obj);
+}
+
+void trace_v4l2_mpeg_vbi_fmt_ivtv_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_mpeg_vbi_fmt_ivtv_obj = json_object_new_object();
+	struct v4l2_mpeg_vbi_fmt_ivtv *p = static_cast<struct v4l2_mpeg_vbi_fmt_ivtv*>(arg);
+
+	json_object_object_add(v4l2_mpeg_vbi_fmt_ivtv_obj, "magic", json_object_new_string(reinterpret_cast<const char *>(p->magic)));
+	//union
+	//struct v4l2_mpeg_vbi_itv0 itv0;
+	//struct v4l2_mpeg_vbi_ITV0 ITV0;
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_mpeg_vbi_fmt_ivtv", v4l2_mpeg_vbi_fmt_ivtv_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_mpeg_vbi_fmt_ivtv_obj);
+}
+
+void trace_v4l2_plane_pix_format_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_plane_pix_format_obj = json_object_new_object();
+	struct v4l2_plane_pix_format *p = static_cast<struct v4l2_plane_pix_format*>(arg);
+
+	json_object_object_add(v4l2_plane_pix_format_obj, "sizeimage", json_object_new_int64(p->sizeimage));
+	json_object_object_add(v4l2_plane_pix_format_obj, "bytesperline", json_object_new_int64(p->bytesperline));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_plane_pix_format", v4l2_plane_pix_format_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_plane_pix_format_obj);
+}
+
+void trace_v4l2_pix_format_mplane_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_pix_format_mplane_obj = json_object_new_object();
+	struct v4l2_pix_format_mplane *p = static_cast<struct v4l2_pix_format_mplane*>(arg);
+
+	json_object_object_add(v4l2_pix_format_mplane_obj, "width", json_object_new_int64(p->width));
+	json_object_object_add(v4l2_pix_format_mplane_obj, "height", json_object_new_int64(p->height));
+	json_object_object_add(v4l2_pix_format_mplane_obj, "pixelformat", json_object_new_string(val2s(p->pixelformat, v4l2_pix_fmt_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_mplane_obj, "field", json_object_new_string(val2s(p->field, v4l2_field_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_mplane_obj, "colorspace", json_object_new_string(val2s(p->colorspace, v4l2_colorspace_val_def).c_str()));
+	//struct v4l2_plane_pix_format	plane_fmt[VIDEO_MAX_PLANES];
+	json_object_object_add(v4l2_pix_format_mplane_obj, "num_planes", json_object_new_int(p->num_planes));
+	json_object *plane_fmt_obj = json_object_new_array();
+	for (int i = 0; i < (std::min((int) p->num_planes, VIDEO_MAX_PLANES)); i++) {
+		json_object *element_obj = json_object_new_object();
+		trace_v4l2_plane_pix_format_gen(&(p->plane_fmt[i]), element_obj);
+		json_object *element_no_key_obj;
+		json_object_object_get_ex(element_obj, "v4l2_plane_pix_format", &element_no_key_obj);
+		json_object_array_add(plane_fmt_obj, element_no_key_obj);
+	}
+	json_object_object_add(v4l2_pix_format_mplane_obj, "plane_fmt", plane_fmt_obj);
+
+	json_object_object_add(v4l2_pix_format_mplane_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_pix_fmt_flag_def).c_str()));
+	//union
+	json_object_object_add(v4l2_pix_format_mplane_obj, "ycbcr_enc", json_object_new_string(val2s(p->ycbcr_enc, v4l2_ycbcr_encoding_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_mplane_obj, "hsv_enc", json_object_new_int(p->hsv_enc));
+	//end of union 	};
+	json_object_object_add(v4l2_pix_format_mplane_obj, "quantization", json_object_new_string(val2s(p->quantization, v4l2_quantization_val_def).c_str()));
+	json_object_object_add(v4l2_pix_format_mplane_obj, "xfer_func", json_object_new_string(val2s(p->xfer_func, v4l2_xfer_func_val_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_pix_format_mplane", v4l2_pix_format_mplane_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_pix_format_mplane_obj);
+}
+
+void trace_v4l2_sdr_format_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_sdr_format_obj = json_object_new_object();
+	struct v4l2_sdr_format *p = static_cast<struct v4l2_sdr_format*>(arg);
+
+	json_object_object_add(v4l2_sdr_format_obj, "pixelformat", json_object_new_string(val2s(p->pixelformat, v4l2_pix_fmt_val_def).c_str()));
+	json_object_object_add(v4l2_sdr_format_obj, "buffersize", json_object_new_int64(p->buffersize));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_sdr_format", v4l2_sdr_format_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_sdr_format_obj);
+}
+
+void trace_v4l2_meta_format_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_meta_format_obj = json_object_new_object();
+	struct v4l2_meta_format *p = static_cast<struct v4l2_meta_format*>(arg);
+
+	json_object_object_add(v4l2_meta_format_obj, "dataformat", json_object_new_int64(p->dataformat));
+	json_object_object_add(v4l2_meta_format_obj, "buffersize", json_object_new_int64(p->buffersize));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_meta_format", v4l2_meta_format_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_meta_format_obj);
+}
+
+void trace_v4l2_format_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_format_obj = json_object_new_object();
+	struct v4l2_format *p = static_cast<struct v4l2_format*>(arg);
+
+	json_object_object_add(v4l2_format_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	//union
+	switch (p->type) {
+	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
+		trace_v4l2_pix_format_gen(&p->fmt.pix, v4l2_format_obj);
+		break;
+	case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
+	case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
+		trace_v4l2_pix_format_mplane_gen(&p->fmt.pix, v4l2_format_obj);
+		break;
+	default:
+		break;
+	}
+	//struct v4l2_pix_format		pix;
+	//struct v4l2_pix_format_mplane	pix_mp;
+	//struct v4l2_window		win;
+	//struct v4l2_vbi_format		vbi;
+	//struct v4l2_sliced_vbi_format	sliced;
+	//struct v4l2_sdr_format		sdr;
+	//struct v4l2_meta_format		meta;
+	//end of union 	} fmt;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_format", v4l2_format_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_format_obj);
+}
+
+void trace_v4l2_streamparm_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_streamparm_obj = json_object_new_object();
+	struct v4l2_streamparm *p = static_cast<struct v4l2_streamparm*>(arg);
+
+	json_object_object_add(v4l2_streamparm_obj, "type", json_object_new_string(val2s(p->type, v4l2_buf_type_val_def).c_str()));
+	//union
+	//struct v4l2_captureparm	capture;
+	//struct v4l2_outputparm	output;
+	//end of union 	} parm;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_streamparm", v4l2_streamparm_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_streamparm_obj);
+}
+
+void trace_v4l2_event_vsync_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_event_vsync_obj = json_object_new_object();
+	struct v4l2_event_vsync *p = static_cast<struct v4l2_event_vsync*>(arg);
+
+	json_object_object_add(v4l2_event_vsync_obj, "field", json_object_new_string(val2s(p->field, v4l2_field_val_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_event_vsync", v4l2_event_vsync_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_event_vsync_obj);
+}
+
+void trace_v4l2_event_ctrl_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_event_ctrl_obj = json_object_new_object();
+	struct v4l2_event_ctrl *p = static_cast<struct v4l2_event_ctrl*>(arg);
+
+	json_object_object_add(v4l2_event_ctrl_obj, "changes", json_object_new_string(fl2s(p->changes, v4l2_event_ctrl_ch_flag_def).c_str()));
+	json_object_object_add(v4l2_event_ctrl_obj, "type", json_object_new_string(val2s(p->type, v4l2_ctrl_type_val_def).c_str()));
+	//union
+	//__s32 value;
+	//__s64 value64;
+	//end of union 	};
+	json_object_object_add(v4l2_event_ctrl_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_ctrl_flag_def).c_str()));
+	json_object_object_add(v4l2_event_ctrl_obj, "minimum", json_object_new_int(p->minimum));
+	json_object_object_add(v4l2_event_ctrl_obj, "maximum", json_object_new_int(p->maximum));
+	json_object_object_add(v4l2_event_ctrl_obj, "step", json_object_new_int(p->step));
+	json_object_object_add(v4l2_event_ctrl_obj, "default_value", json_object_new_int(p->default_value));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_event_ctrl", v4l2_event_ctrl_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_event_ctrl_obj);
+}
+
+void trace_v4l2_event_frame_sync_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_event_frame_sync_obj = json_object_new_object();
+	struct v4l2_event_frame_sync *p = static_cast<struct v4l2_event_frame_sync*>(arg);
+
+	json_object_object_add(v4l2_event_frame_sync_obj, "frame_sequence", json_object_new_int64(p->frame_sequence));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_event_frame_sync", v4l2_event_frame_sync_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_event_frame_sync_obj);
+}
+
+void trace_v4l2_event_src_change_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_event_src_change_obj = json_object_new_object();
+	struct v4l2_event_src_change *p = static_cast<struct v4l2_event_src_change*>(arg);
+
+	json_object_object_add(v4l2_event_src_change_obj, "changes", json_object_new_int64(p->changes));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_event_src_change", v4l2_event_src_change_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_event_src_change_obj);
+}
+
+void trace_v4l2_event_motion_det_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_event_motion_det_obj = json_object_new_object();
+	struct v4l2_event_motion_det *p = static_cast<struct v4l2_event_motion_det*>(arg);
+
+	json_object_object_add(v4l2_event_motion_det_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	json_object_object_add(v4l2_event_motion_det_obj, "frame_sequence", json_object_new_int64(p->frame_sequence));
+	json_object_object_add(v4l2_event_motion_det_obj, "region_mask", json_object_new_int64(p->region_mask));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_event_motion_det", v4l2_event_motion_det_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_event_motion_det_obj);
+}
+
+void trace_v4l2_event_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_event_obj = json_object_new_object();
+	struct v4l2_event *p = static_cast<struct v4l2_event*>(arg);
+
+	json_object_object_add(v4l2_event_obj, "type", json_object_new_string(val2s(p->type, event_val_def).c_str()));
+	//union
+	switch (p->type) {
+	case V4L2_EVENT_VSYNC:
+		trace_v4l2_event_vsync_gen(&p->u, v4l2_event_obj);
+		break;
+	case V4L2_EVENT_CTRL:
+		trace_v4l2_event_ctrl_gen(&p->u, v4l2_event_obj);
+		break;
+	case V4L2_EVENT_FRAME_SYNC:
+		trace_v4l2_event_frame_sync_gen(&p->u, v4l2_event_obj);
+		break;
+	case V4L2_EVENT_SOURCE_CHANGE:
+		trace_v4l2_event_src_change_gen(&p->u, v4l2_event_obj);
+		break;
+	case V4L2_EVENT_MOTION_DET:
+		trace_v4l2_event_motion_det_gen(&p->u, v4l2_event_obj);
+		break;
+	default:
+		break;
+	}
+	//struct v4l2_event_vsync		vsync;
+	//struct v4l2_event_ctrl		ctrl;
+	//struct v4l2_event_frame_sync	frame_sync;
+	//struct v4l2_event_src_change	src_change;
+	//struct v4l2_event_motion_det	motion_det;
+	//__u8				data[64];
+	//end of union 	} u;
+	json_object_object_add(v4l2_event_obj, "pending", json_object_new_int64(p->pending));
+	json_object_object_add(v4l2_event_obj, "sequence", json_object_new_int64(p->sequence));
+	//struct timespec			timestamp;
+	json_object_object_add(v4l2_event_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_event", v4l2_event_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_event_obj);
+}
+
+void trace_v4l2_event_subscription_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_event_subscription_obj = json_object_new_object();
+	struct v4l2_event_subscription *p = static_cast<struct v4l2_event_subscription*>(arg);
+
+	json_object_object_add(v4l2_event_subscription_obj, "type", json_object_new_string(val2s(p->type, event_val_def).c_str()));
+	json_object_object_add(v4l2_event_subscription_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(v4l2_event_subscription_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_event_sub_flag_def).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_event_subscription", v4l2_event_subscription_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_event_subscription_obj);
+}
+
+void trace_v4l2_dbg_match_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_dbg_match_obj = json_object_new_object();
+	struct v4l2_dbg_match *p = static_cast<struct v4l2_dbg_match*>(arg);
+
+	json_object_object_add(v4l2_dbg_match_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+	//union
+	//__u32 addr;
+	//char name[32];
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_dbg_match", v4l2_dbg_match_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_dbg_match_obj);
+}
+
+void trace_v4l2_dbg_register_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_dbg_register_obj = json_object_new_object();
+	struct v4l2_dbg_register *p = static_cast<struct v4l2_dbg_register*>(arg);
+
+	//struct v4l2_dbg_match match;
+	trace_v4l2_dbg_match_gen(&p->match, v4l2_dbg_register_obj, "match");
+	json_object_object_add(v4l2_dbg_register_obj, "size", json_object_new_int64(p->size));
+	json_object_object_add(v4l2_dbg_register_obj, "reg", json_object_new_uint64(p->reg));
+	json_object_object_add(v4l2_dbg_register_obj, "val", json_object_new_uint64(p->val));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_dbg_register", v4l2_dbg_register_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_dbg_register_obj);
+}
+
+void trace_v4l2_dbg_chip_info_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_dbg_chip_info_obj = json_object_new_object();
+	struct v4l2_dbg_chip_info *p = static_cast<struct v4l2_dbg_chip_info*>(arg);
+
+	//struct v4l2_dbg_match match;
+	trace_v4l2_dbg_match_gen(&p->match, v4l2_dbg_chip_info_obj, "match");
+	json_object_object_add(v4l2_dbg_chip_info_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(v4l2_dbg_chip_info_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_dbg_chip_info", v4l2_dbg_chip_info_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_dbg_chip_info_obj);
+}
+
+void trace_v4l2_create_buffers_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_create_buffers_obj = json_object_new_object();
+	struct v4l2_create_buffers *p = static_cast<struct v4l2_create_buffers*>(arg);
+
+	json_object_object_add(v4l2_create_buffers_obj, "index", json_object_new_int64(p->index));
+	json_object_object_add(v4l2_create_buffers_obj, "count", json_object_new_int64(p->count));
+	json_object_object_add(v4l2_create_buffers_obj, "memory", json_object_new_string(val2s(p->memory, v4l2_memory_val_def).c_str()));
+	//struct v4l2_format	format;
+	trace_v4l2_format_gen(&p->format, v4l2_create_buffers_obj, "format");
+	json_object_object_add(v4l2_create_buffers_obj, "capabilities", json_object_new_string(fl2s(p->capabilities, v4l2_buf_cap_flag_def).c_str()));
+	json_object_object_add(v4l2_create_buffers_obj, "flags", json_object_new_string(fl2s(p->flags, v4l2_memory_flag_def).c_str()));
+	json_object_object_add(v4l2_create_buffers_obj, "max_num_buffers", json_object_new_int64(p->max_num_buffers));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_create_buffers", v4l2_create_buffers_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_create_buffers_obj);
+}
+
+void trace_media_device_info_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_device_info_obj = json_object_new_object();
+	struct media_device_info *p = static_cast<struct media_device_info*>(arg);
+
+	json_object_object_add(media_device_info_obj, "driver", json_object_new_string(reinterpret_cast<const char *>(p->driver)));
+	json_object_object_add(media_device_info_obj, "model", json_object_new_string(reinterpret_cast<const char *>(p->model)));
+	json_object_object_add(media_device_info_obj, "serial", json_object_new_string(reinterpret_cast<const char *>(p->serial)));
+	json_object_object_add(media_device_info_obj, "bus_info", json_object_new_string(reinterpret_cast<const char *>(p->bus_info)));
+	json_object_object_add(media_device_info_obj, "media_version", json_object_new_string(ver2s(p->media_version).c_str()));
+	json_object_object_add(media_device_info_obj, "hw_revision", json_object_new_int64(p->hw_revision));
+	json_object_object_add(media_device_info_obj, "driver_version", json_object_new_string(ver2s(p->driver_version).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_device_info", media_device_info_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_device_info_obj);
+}
+
+void trace_media_entity_desc_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_entity_desc_obj = json_object_new_object();
+	struct media_entity_desc *p = static_cast<struct media_entity_desc*>(arg);
+
+	json_object_object_add(media_entity_desc_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(media_entity_desc_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(media_entity_desc_obj, "type", json_object_new_string(val2s(p->type, nullptr).c_str()));
+	json_object_object_add(media_entity_desc_obj, "revision", json_object_new_int64(p->revision));
+	json_object_object_add(media_entity_desc_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	json_object_object_add(media_entity_desc_obj, "group_id", json_object_new_int64(p->group_id));
+	json_object_object_add(media_entity_desc_obj, "pads", json_object_new_int(p->pads));
+	json_object_object_add(media_entity_desc_obj, "links", json_object_new_int(p->links));
+	//union
+	//struct {
+	//__u32 major;
+	//__u32 minor;
+	//end of union 		} dev;
+	//struct {
+	//__u32 card;
+	//__u32 device;
+	//__u32 subdevice;
+	//end of struct 		} alsa;
+	//struct {
+	//__u32 major;
+	//__u32 minor;
+	//end of struct 		} v4l;
+	//struct {
+	//__u32 major;
+	//__u32 minor;
+	//end of struct 		} fb;
+	json_object_object_add(media_entity_desc_obj, "dvb", json_object_new_int(p->dvb));
+	json_object_object_add(media_entity_desc_obj, "raw", json_object_new_string(reinterpret_cast<const char *>(p->raw)));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_entity_desc", media_entity_desc_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_entity_desc_obj);
+}
+
+void trace_media_pad_desc_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_pad_desc_obj = json_object_new_object();
+	struct media_pad_desc *p = static_cast<struct media_pad_desc*>(arg);
+
+	json_object_object_add(media_pad_desc_obj, "entity", json_object_new_int64(p->entity));
+	json_object_object_add(media_pad_desc_obj, "index", json_object_new_int(p->index));
+	json_object_object_add(media_pad_desc_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_pad_desc", media_pad_desc_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_pad_desc_obj);
+}
+
+void trace_media_link_desc_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_link_desc_obj = json_object_new_object();
+	struct media_link_desc *p = static_cast<struct media_link_desc*>(arg);
+
+	//struct media_pad_desc source;
+	trace_media_pad_desc_gen(&p->source, media_link_desc_obj, "source");
+	//struct media_pad_desc sink;
+	trace_media_pad_desc_gen(&p->sink, media_link_desc_obj, "sink");
+	json_object_object_add(media_link_desc_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_link_desc", media_link_desc_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_link_desc_obj);
+}
+
+void trace_media_links_enum_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_links_enum_obj = json_object_new_object();
+	struct media_links_enum *p = static_cast<struct media_links_enum*>(arg);
+
+	json_object_object_add(media_links_enum_obj, "entity", json_object_new_int64(p->entity));
+	//struct media_pad_desc *pads;
+	//struct media_link_desc *links;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_links_enum", media_links_enum_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_links_enum_obj);
+}
+
+void trace_media_v2_entity_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_v2_entity_obj = json_object_new_object();
+	struct media_v2_entity *p = static_cast<struct media_v2_entity*>(arg);
+
+	json_object_object_add(media_v2_entity_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(media_v2_entity_obj, "name", json_object_new_string(reinterpret_cast<const char *>(p->name)));
+	json_object_object_add(media_v2_entity_obj, "function", json_object_new_int64(p->function));
+	json_object_object_add(media_v2_entity_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_v2_entity", media_v2_entity_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_v2_entity_obj);
+}
+
+void trace_media_v2_intf_devnode_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_v2_intf_devnode_obj = json_object_new_object();
+	struct media_v2_intf_devnode *p = static_cast<struct media_v2_intf_devnode*>(arg);
+
+	json_object_object_add(media_v2_intf_devnode_obj, "major", json_object_new_int64(p->major));
+	json_object_object_add(media_v2_intf_devnode_obj, "minor", json_object_new_int64(p->minor));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_v2_intf_devnode", media_v2_intf_devnode_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_v2_intf_devnode_obj);
+}
+
+void trace_media_v2_interface_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_v2_interface_obj = json_object_new_object();
+	struct media_v2_interface *p = static_cast<struct media_v2_interface*>(arg);
+
+	json_object_object_add(media_v2_interface_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(media_v2_interface_obj, "intf_type", json_object_new_int64(p->intf_type));
+	json_object_object_add(media_v2_interface_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	//union
+	//struct media_v2_intf_devnode devnode;
+	//__u32 raw[16];
+	//end of union 	};
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_v2_interface", media_v2_interface_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_v2_interface_obj);
+}
+
+void trace_media_v2_pad_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_v2_pad_obj = json_object_new_object();
+	struct media_v2_pad *p = static_cast<struct media_v2_pad*>(arg);
+
+	json_object_object_add(media_v2_pad_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(media_v2_pad_obj, "entity_id", json_object_new_int64(p->entity_id));
+	json_object_object_add(media_v2_pad_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+	json_object_object_add(media_v2_pad_obj, "index", json_object_new_int64(p->index));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_v2_pad", media_v2_pad_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_v2_pad_obj);
+}
+
+void trace_media_v2_link_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_v2_link_obj = json_object_new_object();
+	struct media_v2_link *p = static_cast<struct media_v2_link*>(arg);
+
+	json_object_object_add(media_v2_link_obj, "id", json_object_new_string(val2s(p->id, nullptr).c_str()));
+	json_object_object_add(media_v2_link_obj, "source_id", json_object_new_int64(p->source_id));
+	json_object_object_add(media_v2_link_obj, "sink_id", json_object_new_int64(p->sink_id));
+	json_object_object_add(media_v2_link_obj, "flags", json_object_new_string(fl2s(p->flags, nullptr).c_str()));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_v2_link", media_v2_link_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_v2_link_obj);
+}
+
+void trace_media_v2_topology_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *media_v2_topology_obj = json_object_new_object();
+	struct media_v2_topology *p = static_cast<struct media_v2_topology*>(arg);
+
+	json_object_object_add(media_v2_topology_obj, "topology_version", json_object_new_string(ver2s(p->topology_version).c_str()));
+	json_object_object_add(media_v2_topology_obj, "num_entities", json_object_new_int64(p->num_entities));
+	json_object_object_add(media_v2_topology_obj, "ptr_entities", json_object_new_uint64(p->ptr_entities));
+	json_object_object_add(media_v2_topology_obj, "num_interfaces", json_object_new_int64(p->num_interfaces));
+	json_object_object_add(media_v2_topology_obj, "ptr_interfaces", json_object_new_uint64(p->ptr_interfaces));
+	json_object_object_add(media_v2_topology_obj, "num_pads", json_object_new_int64(p->num_pads));
+	json_object_object_add(media_v2_topology_obj, "ptr_pads", json_object_new_uint64(p->ptr_pads));
+	json_object_object_add(media_v2_topology_obj, "num_links", json_object_new_int64(p->num_links));
+	json_object_object_add(media_v2_topology_obj, "ptr_links", json_object_new_uint64(p->ptr_links));
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "media_v2_topology", media_v2_topology_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), media_v2_topology_obj);
+}
+
+void trace_v4l2_edid_gen(void *arg, json_object *parent_obj, std::string key_name = "")
+{
+	json_object *v4l2_edid_obj = json_object_new_object();
+	struct v4l2_edid *p = static_cast<struct v4l2_edid*>(arg);
+
+	json_object_object_add(v4l2_edid_obj, "pad", json_object_new_int64(p->pad));
+	json_object_object_add(v4l2_edid_obj, "start_block", json_object_new_int64(p->start_block));
+	json_object_object_add(v4l2_edid_obj, "blocks", json_object_new_int64(p->blocks));
+	//__u8  *edid;
+
+	if (key_name.empty())
+		json_object_object_add(parent_obj, "v4l2_edid", v4l2_edid_obj);
+	else
+		json_object_object_add(parent_obj, key_name.c_str(), v4l2_edid_obj);
+}
diff --git a/utils/v4l2-tracer/trace-gen.h b/utils/v4l2-tracer/trace-gen.h
new file mode 100644
index 00000000..1fb23af2
--- /dev/null
+++ b/utils/v4l2-tracer/trace-gen.h
@@ -0,0 +1,144 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright 2022 Collabora Ltd.
+ *
+ * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT
+ */
+
+#ifndef TRACE_GEN_H
+#define TRACE_GEN_H
+
+void trace_v4l2_ctrl_h264_sps_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_h264_pps_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_h264_scaling_matrix_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_h264_weight_factors_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_h264_pred_weights_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_h264_reference_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_h264_slice_params_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_h264_dpb_entry_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_h264_decode_params_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_fwht_params_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp8_segment_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp8_loop_filter_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp8_quantization_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp8_entropy_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp8_entropy_coder_state_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_vp8_frame_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_mpeg2_sequence_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_mpeg2_picture_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_mpeg2_quantisation_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hevc_sps_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hevc_pps_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_hevc_dpb_entry_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_hevc_pred_weight_table_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hevc_slice_params_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hevc_decode_params_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hevc_scaling_matrix_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hdr10_cll_info_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hdr10_mastering_display_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp9_loop_filter_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp9_quantization_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp9_segmentation_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_vp9_frame_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_vp9_mv_probs_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_vp9_compressed_hdr_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_av1_sequence_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_av1_tile_group_entry_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_av1_global_motion_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_av1_loop_restoration_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_av1_cdef_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_av1_segmentation_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_av1_loop_filter_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_av1_quantization_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_av1_tile_info_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_av1_frame_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_av1_film_grain_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_rect_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_fract_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_area_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_capability_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_pix_format_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_fmtdesc_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_frmsize_discrete_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_frmsize_stepwise_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_frmsizeenum_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_frmival_stepwise_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_frmivalenum_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_timecode_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_jpegcompression_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_requestbuffers_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_plane_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_buffer_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_exportbuffer_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_framebuffer_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_clip_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_window_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_captureparm_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_outputparm_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_cropcap_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_crop_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_selection_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_standard_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_bt_timings_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_dv_timings_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_enum_dv_timings_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_bt_timings_cap_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_dv_timings_cap_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_input_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_output_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_control_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_ext_control_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_ext_controls_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_queryctrl_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_query_ext_ctrl_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_querymenu_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_tuner_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_modulator_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_frequency_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_frequency_band_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_hw_freq_seek_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_rds_data_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_audio_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_audioout_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_enc_idx_entry_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_enc_idx_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_encoder_cmd_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_decoder_cmd_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_vbi_format_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_sliced_vbi_format_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_sliced_vbi_cap_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_sliced_vbi_data_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_mpeg_vbi_itv0_line_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_mpeg_vbi_itv0_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_mpeg_vbi_fmt_ivtv_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_plane_pix_format_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_pix_format_mplane_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_sdr_format_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_meta_format_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_format_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_streamparm_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_event_vsync_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_event_ctrl_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_event_frame_sync_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_event_src_change_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_event_motion_det_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_event_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_event_subscription_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_dbg_match_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_dbg_register_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_dbg_chip_info_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_create_buffers_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_device_info_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_entity_desc_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_pad_desc_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_link_desc_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_links_enum_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_v2_entity_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_v2_intf_devnode_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_v2_interface_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_v2_pad_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_v2_link_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_media_v2_topology_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+void trace_v4l2_edid_gen(void *arg, json_object *parent_obj, std::string key_name = "");
+
+#endif
diff --git a/utils/v4l2-tracer/v4l2-tracer-info-gen.h b/utils/v4l2-tracer/v4l2-tracer-info-gen.h
new file mode 100644
index 00000000..332e271f
--- /dev/null
+++ b/utils/v4l2-tracer/v4l2-tracer-info-gen.h
@@ -0,0 +1,2419 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright 2022 Collabora Ltd.
+ *
+ * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT
+ */
+
+#ifndef V4L2_TRACER_INFO_GEN_H
+#define V4L2_TRACER_INFO_GEN_H
+
+#include "v4l2-tracer-common.h"
+
+constexpr val_def ctrlclass_val_def[] = {
+	{ V4L2_CTRL_CLASS_USER,	"V4L2_CTRL_CLASS_USER" },
+	{ V4L2_CTRL_CLASS_CODEC,	"V4L2_CTRL_CLASS_CODEC" },
+	{ V4L2_CTRL_CLASS_CAMERA,	"V4L2_CTRL_CLASS_CAMERA" },
+	{ V4L2_CTRL_CLASS_FM_TX,	"V4L2_CTRL_CLASS_FM_TX" },
+	{ V4L2_CTRL_CLASS_FLASH,	"V4L2_CTRL_CLASS_FLASH" },
+	{ V4L2_CTRL_CLASS_JPEG,	"V4L2_CTRL_CLASS_JPEG" },
+	{ V4L2_CTRL_CLASS_IMAGE_SOURCE,	"V4L2_CTRL_CLASS_IMAGE_SOURCE" },
+	{ V4L2_CTRL_CLASS_IMAGE_PROC,	"V4L2_CTRL_CLASS_IMAGE_PROC" },
+	{ V4L2_CTRL_CLASS_DV,	"V4L2_CTRL_CLASS_DV" },
+	{ V4L2_CTRL_CLASS_FM_RX,	"V4L2_CTRL_CLASS_FM_RX" },
+	{ V4L2_CTRL_CLASS_RF_TUNER,	"V4L2_CTRL_CLASS_RF_TUNER" },
+	{ V4L2_CTRL_CLASS_DETECT,	"V4L2_CTRL_CLASS_DETECT" },
+	{ V4L2_CTRL_CLASS_CODEC_STATELESS,	"V4L2_CTRL_CLASS_CODEC_STATELESS" },
+	{ V4L2_CTRL_CLASS_COLORIMETRY,	"V4L2_CTRL_CLASS_COLORIMETRY" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_power_line_frequency_val_def[] = {
+	{ V4L2_CID_POWER_LINE_FREQUENCY_DISABLED,	"V4L2_CID_POWER_LINE_FREQUENCY_DISABLED" },
+	{ V4L2_CID_POWER_LINE_FREQUENCY_50HZ,	"V4L2_CID_POWER_LINE_FREQUENCY_50HZ" },
+	{ V4L2_CID_POWER_LINE_FREQUENCY_60HZ,	"V4L2_CID_POWER_LINE_FREQUENCY_60HZ" },
+	{ V4L2_CID_POWER_LINE_FREQUENCY_AUTO,	"V4L2_CID_POWER_LINE_FREQUENCY_AUTO" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_colorfx_val_def[] = {
+	{ V4L2_COLORFX_NONE,	"V4L2_COLORFX_NONE" },
+	{ V4L2_COLORFX_BW,	"V4L2_COLORFX_BW" },
+	{ V4L2_COLORFX_SEPIA,	"V4L2_COLORFX_SEPIA" },
+	{ V4L2_COLORFX_NEGATIVE,	"V4L2_COLORFX_NEGATIVE" },
+	{ V4L2_COLORFX_EMBOSS,	"V4L2_COLORFX_EMBOSS" },
+	{ V4L2_COLORFX_SKETCH,	"V4L2_COLORFX_SKETCH" },
+	{ V4L2_COLORFX_SKY_BLUE,	"V4L2_COLORFX_SKY_BLUE" },
+	{ V4L2_COLORFX_GRASS_GREEN,	"V4L2_COLORFX_GRASS_GREEN" },
+	{ V4L2_COLORFX_SKIN_WHITEN,	"V4L2_COLORFX_SKIN_WHITEN" },
+	{ V4L2_COLORFX_VIVID,	"V4L2_COLORFX_VIVID" },
+	{ V4L2_COLORFX_AQUA,	"V4L2_COLORFX_AQUA" },
+	{ V4L2_COLORFX_ART_FREEZE,	"V4L2_COLORFX_ART_FREEZE" },
+	{ V4L2_COLORFX_SILHOUETTE,	"V4L2_COLORFX_SILHOUETTE" },
+	{ V4L2_COLORFX_SOLARIZATION,	"V4L2_COLORFX_SOLARIZATION" },
+	{ V4L2_COLORFX_ANTIQUE,	"V4L2_COLORFX_ANTIQUE" },
+	{ V4L2_COLORFX_SET_CBCR,	"V4L2_COLORFX_SET_CBCR" },
+	{ V4L2_COLORFX_SET_RGB,	"V4L2_COLORFX_SET_RGB" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_stream_type_val_def[] = {
+	{ V4L2_MPEG_STREAM_TYPE_MPEG2_PS,	"V4L2_MPEG_STREAM_TYPE_MPEG2_PS" },
+	{ V4L2_MPEG_STREAM_TYPE_MPEG2_TS,	"V4L2_MPEG_STREAM_TYPE_MPEG2_TS" },
+	{ V4L2_MPEG_STREAM_TYPE_MPEG1_SS,	"V4L2_MPEG_STREAM_TYPE_MPEG1_SS" },
+	{ V4L2_MPEG_STREAM_TYPE_MPEG2_DVD,	"V4L2_MPEG_STREAM_TYPE_MPEG2_DVD" },
+	{ V4L2_MPEG_STREAM_TYPE_MPEG1_VCD,	"V4L2_MPEG_STREAM_TYPE_MPEG1_VCD" },
+	{ V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD,	"V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_stream_vbi_fmt_val_def[] = {
+	{ V4L2_MPEG_STREAM_VBI_FMT_NONE,	"V4L2_MPEG_STREAM_VBI_FMT_NONE" },
+	{ V4L2_MPEG_STREAM_VBI_FMT_IVTV,	"V4L2_MPEG_STREAM_VBI_FMT_IVTV" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_sampling_freq_val_def[] = {
+	{ V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100,	"V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100" },
+	{ V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000,	"V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000" },
+	{ V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000,	"V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_encoding_val_def[] = {
+	{ V4L2_MPEG_AUDIO_ENCODING_LAYER_1,	"V4L2_MPEG_AUDIO_ENCODING_LAYER_1" },
+	{ V4L2_MPEG_AUDIO_ENCODING_LAYER_2,	"V4L2_MPEG_AUDIO_ENCODING_LAYER_2" },
+	{ V4L2_MPEG_AUDIO_ENCODING_LAYER_3,	"V4L2_MPEG_AUDIO_ENCODING_LAYER_3" },
+	{ V4L2_MPEG_AUDIO_ENCODING_AAC,	"V4L2_MPEG_AUDIO_ENCODING_AAC" },
+	{ V4L2_MPEG_AUDIO_ENCODING_AC3,	"V4L2_MPEG_AUDIO_ENCODING_AC3" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_l1_bitrate_val_def[] = {
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_32K,	"V4L2_MPEG_AUDIO_L1_BITRATE_32K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_64K,	"V4L2_MPEG_AUDIO_L1_BITRATE_64K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_96K,	"V4L2_MPEG_AUDIO_L1_BITRATE_96K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_128K,	"V4L2_MPEG_AUDIO_L1_BITRATE_128K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_160K,	"V4L2_MPEG_AUDIO_L1_BITRATE_160K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_192K,	"V4L2_MPEG_AUDIO_L1_BITRATE_192K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_224K,	"V4L2_MPEG_AUDIO_L1_BITRATE_224K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_256K,	"V4L2_MPEG_AUDIO_L1_BITRATE_256K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_288K,	"V4L2_MPEG_AUDIO_L1_BITRATE_288K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_320K,	"V4L2_MPEG_AUDIO_L1_BITRATE_320K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_352K,	"V4L2_MPEG_AUDIO_L1_BITRATE_352K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_384K,	"V4L2_MPEG_AUDIO_L1_BITRATE_384K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_416K,	"V4L2_MPEG_AUDIO_L1_BITRATE_416K" },
+	{ V4L2_MPEG_AUDIO_L1_BITRATE_448K,	"V4L2_MPEG_AUDIO_L1_BITRATE_448K" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_l2_bitrate_val_def[] = {
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_32K,	"V4L2_MPEG_AUDIO_L2_BITRATE_32K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_48K,	"V4L2_MPEG_AUDIO_L2_BITRATE_48K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_56K,	"V4L2_MPEG_AUDIO_L2_BITRATE_56K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_64K,	"V4L2_MPEG_AUDIO_L2_BITRATE_64K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_80K,	"V4L2_MPEG_AUDIO_L2_BITRATE_80K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_96K,	"V4L2_MPEG_AUDIO_L2_BITRATE_96K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_112K,	"V4L2_MPEG_AUDIO_L2_BITRATE_112K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_128K,	"V4L2_MPEG_AUDIO_L2_BITRATE_128K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_160K,	"V4L2_MPEG_AUDIO_L2_BITRATE_160K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_192K,	"V4L2_MPEG_AUDIO_L2_BITRATE_192K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_224K,	"V4L2_MPEG_AUDIO_L2_BITRATE_224K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_256K,	"V4L2_MPEG_AUDIO_L2_BITRATE_256K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_320K,	"V4L2_MPEG_AUDIO_L2_BITRATE_320K" },
+	{ V4L2_MPEG_AUDIO_L2_BITRATE_384K,	"V4L2_MPEG_AUDIO_L2_BITRATE_384K" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_l3_bitrate_val_def[] = {
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_32K,	"V4L2_MPEG_AUDIO_L3_BITRATE_32K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_40K,	"V4L2_MPEG_AUDIO_L3_BITRATE_40K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_48K,	"V4L2_MPEG_AUDIO_L3_BITRATE_48K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_56K,	"V4L2_MPEG_AUDIO_L3_BITRATE_56K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_64K,	"V4L2_MPEG_AUDIO_L3_BITRATE_64K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_80K,	"V4L2_MPEG_AUDIO_L3_BITRATE_80K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_96K,	"V4L2_MPEG_AUDIO_L3_BITRATE_96K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_112K,	"V4L2_MPEG_AUDIO_L3_BITRATE_112K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_128K,	"V4L2_MPEG_AUDIO_L3_BITRATE_128K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_160K,	"V4L2_MPEG_AUDIO_L3_BITRATE_160K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_192K,	"V4L2_MPEG_AUDIO_L3_BITRATE_192K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_224K,	"V4L2_MPEG_AUDIO_L3_BITRATE_224K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_256K,	"V4L2_MPEG_AUDIO_L3_BITRATE_256K" },
+	{ V4L2_MPEG_AUDIO_L3_BITRATE_320K,	"V4L2_MPEG_AUDIO_L3_BITRATE_320K" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_mode_val_def[] = {
+	{ V4L2_MPEG_AUDIO_MODE_STEREO,	"V4L2_MPEG_AUDIO_MODE_STEREO" },
+	{ V4L2_MPEG_AUDIO_MODE_JOINT_STEREO,	"V4L2_MPEG_AUDIO_MODE_JOINT_STEREO" },
+	{ V4L2_MPEG_AUDIO_MODE_DUAL,	"V4L2_MPEG_AUDIO_MODE_DUAL" },
+	{ V4L2_MPEG_AUDIO_MODE_MONO,	"V4L2_MPEG_AUDIO_MODE_MONO" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_mode_extension_val_def[] = {
+	{ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4,	"V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4" },
+	{ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8,	"V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8" },
+	{ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12,	"V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12" },
+	{ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16,	"V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_emphasis_val_def[] = {
+	{ V4L2_MPEG_AUDIO_EMPHASIS_NONE,	"V4L2_MPEG_AUDIO_EMPHASIS_NONE" },
+	{ V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17,	"V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_crc_val_def[] = {
+	{ V4L2_MPEG_AUDIO_CRC_NONE,	"V4L2_MPEG_AUDIO_CRC_NONE" },
+	{ V4L2_MPEG_AUDIO_CRC_CRC16,	"V4L2_MPEG_AUDIO_CRC_CRC16" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_ac3_bitrate_val_def[] = {
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_32K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_32K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_40K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_40K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_48K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_48K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_56K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_56K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_64K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_64K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_80K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_80K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_96K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_96K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_112K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_112K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_128K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_128K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_160K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_160K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_192K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_192K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_224K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_224K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_256K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_256K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_320K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_320K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_384K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_384K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_448K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_448K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_512K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_512K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_576K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_576K" },
+	{ V4L2_MPEG_AUDIO_AC3_BITRATE_640K,	"V4L2_MPEG_AUDIO_AC3_BITRATE_640K" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_audio_dec_playback_val_def[] = {
+	{ V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO,	"V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO" },
+	{ V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO,	"V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO" },
+	{ V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT,	"V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT" },
+	{ V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT,	"V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT" },
+	{ V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO,	"V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO" },
+	{ V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO,	"V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_encoding_val_def[] = {
+	{ V4L2_MPEG_VIDEO_ENCODING_MPEG_1,	"V4L2_MPEG_VIDEO_ENCODING_MPEG_1" },
+	{ V4L2_MPEG_VIDEO_ENCODING_MPEG_2,	"V4L2_MPEG_VIDEO_ENCODING_MPEG_2" },
+	{ V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC,	"V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_aspect_val_def[] = {
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_bitrate_mode_val_def[] = {
+	{ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,	"V4L2_MPEG_VIDEO_BITRATE_MODE_VBR" },
+	{ V4L2_MPEG_VIDEO_BITRATE_MODE_CBR,	"V4L2_MPEG_VIDEO_BITRATE_MODE_CBR" },
+	{ V4L2_MPEG_VIDEO_BITRATE_MODE_CQ,	"V4L2_MPEG_VIDEO_BITRATE_MODE_CQ" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_header_mode_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,	"V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE" },
+	{ V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME,	"V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_multi_slice_mode_val_def[] = {
+	{ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE,	"V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE" },
+	{ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB,	"V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB" },
+	{ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES,	"V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES" },
+	{ V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB,	"V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB" },
+	{ V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES,	"V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_intra_refresh_period_type_val_def[] = {
+	{ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM,	"V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM" },
+	{ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC,	"V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_mpeg2_level_val_def[] = {
+	{ V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW,	"V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW" },
+	{ V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN,	"V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN" },
+	{ V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440,	"V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440" },
+	{ V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH,	"V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_mpeg2_profile_val_def[] = {
+	{ V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE,	"V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE" },
+	{ V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN,	"V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN" },
+	{ V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE,	"V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE" },
+	{ V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE,	"V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE" },
+	{ V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH,	"V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH" },
+	{ V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW,	"V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_entropy_mode_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC,	"V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC" },
+	{ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC,	"V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_level_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_1_0,	"V4L2_MPEG_VIDEO_H264_LEVEL_1_0" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_1B,	"V4L2_MPEG_VIDEO_H264_LEVEL_1B" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_1_1,	"V4L2_MPEG_VIDEO_H264_LEVEL_1_1" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_1_2,	"V4L2_MPEG_VIDEO_H264_LEVEL_1_2" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_1_3,	"V4L2_MPEG_VIDEO_H264_LEVEL_1_3" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_2_0,	"V4L2_MPEG_VIDEO_H264_LEVEL_2_0" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_2_1,	"V4L2_MPEG_VIDEO_H264_LEVEL_2_1" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_2_2,	"V4L2_MPEG_VIDEO_H264_LEVEL_2_2" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_3_0,	"V4L2_MPEG_VIDEO_H264_LEVEL_3_0" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_3_1,	"V4L2_MPEG_VIDEO_H264_LEVEL_3_1" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_3_2,	"V4L2_MPEG_VIDEO_H264_LEVEL_3_2" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_4_0,	"V4L2_MPEG_VIDEO_H264_LEVEL_4_0" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_4_1,	"V4L2_MPEG_VIDEO_H264_LEVEL_4_1" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_4_2,	"V4L2_MPEG_VIDEO_H264_LEVEL_4_2" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_5_0,	"V4L2_MPEG_VIDEO_H264_LEVEL_5_0" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_5_1,	"V4L2_MPEG_VIDEO_H264_LEVEL_5_1" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_5_2,	"V4L2_MPEG_VIDEO_H264_LEVEL_5_2" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_6_0,	"V4L2_MPEG_VIDEO_H264_LEVEL_6_0" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_6_1,	"V4L2_MPEG_VIDEO_H264_LEVEL_6_1" },
+	{ V4L2_MPEG_VIDEO_H264_LEVEL_6_2,	"V4L2_MPEG_VIDEO_H264_LEVEL_6_2" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_loop_filter_mode_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED,	"V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED" },
+	{ V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED,	"V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED" },
+	{ V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY,	"V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_profile_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE,	"V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE,	"V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_MAIN,	"V4L2_MPEG_VIDEO_H264_PROFILE_MAIN" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED,	"V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,	"V4L2_MPEG_VIDEO_H264_PROFILE_HIGH" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10,	"V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422,	"V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE,	"V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA,	"V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA,	"V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA,	"V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA,	"V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE,	"V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH,	"V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA,	"V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH,	"V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH,	"V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH" },
+	{ V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH,	"V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_vui_sar_idc_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED,	"V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED" },
+	{ V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED,	"V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_sei_fp_arrangement_type_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD,	"V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD" },
+	{ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN,	"V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN" },
+	{ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW,	"V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW" },
+	{ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE,	"V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE" },
+	{ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM,	"V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM" },
+	{ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL,	"V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_fmo_map_type_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES,	"V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES" },
+	{ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES,	"V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES" },
+	{ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER,	"V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER" },
+	{ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT,	"V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT" },
+	{ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN,	"V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN" },
+	{ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN,	"V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN" },
+	{ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT,	"V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_fmo_change_dir_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT,	"V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT" },
+	{ V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT,	"V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_h264_hierarchical_coding_type_val_def[] = {
+	{ V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B,	"V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B" },
+	{ V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P,	"V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_mpeg4_level_val_def[] = {
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_0,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_0" },
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B" },
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_1,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_1" },
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_2,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_2" },
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_3,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_3" },
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B" },
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_4,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_4" },
+	{ V4L2_MPEG_VIDEO_MPEG4_LEVEL_5,	"V4L2_MPEG_VIDEO_MPEG4_LEVEL_5" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_mpeg4_profile_val_def[] = {
+	{ V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE,	"V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE" },
+	{ V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE,	"V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE" },
+	{ V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE,	"V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE" },
+	{ V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE,	"V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE" },
+	{ V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY,	"V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_vp8_num_partitions_val_def[] = {
+	{ V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION,	"V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS,	"V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS,	"V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS,	"V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_vp8_num_ref_frames_val_def[] = {
+	{ V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME,	"V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME,	"V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME,	"V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_vp8_golden_frame_sel_val_def[] = {
+	{ V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV,	"V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD,	"V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_vp8_profile_val_def[] = {
+	{ V4L2_MPEG_VIDEO_VP8_PROFILE_0,	"V4L2_MPEG_VIDEO_VP8_PROFILE_0" },
+	{ V4L2_MPEG_VIDEO_VP8_PROFILE_1,	"V4L2_MPEG_VIDEO_VP8_PROFILE_1" },
+	{ V4L2_MPEG_VIDEO_VP8_PROFILE_2,	"V4L2_MPEG_VIDEO_VP8_PROFILE_2" },
+	{ V4L2_MPEG_VIDEO_VP8_PROFILE_3,	"V4L2_MPEG_VIDEO_VP8_PROFILE_3" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_vp9_profile_val_def[] = {
+	{ V4L2_MPEG_VIDEO_VP9_PROFILE_0,	"V4L2_MPEG_VIDEO_VP9_PROFILE_0" },
+	{ V4L2_MPEG_VIDEO_VP9_PROFILE_1,	"V4L2_MPEG_VIDEO_VP9_PROFILE_1" },
+	{ V4L2_MPEG_VIDEO_VP9_PROFILE_2,	"V4L2_MPEG_VIDEO_VP9_PROFILE_2" },
+	{ V4L2_MPEG_VIDEO_VP9_PROFILE_3,	"V4L2_MPEG_VIDEO_VP9_PROFILE_3" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_vp9_level_val_def[] = {
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_1_0,	"V4L2_MPEG_VIDEO_VP9_LEVEL_1_0" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_1_1,	"V4L2_MPEG_VIDEO_VP9_LEVEL_1_1" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_2_0,	"V4L2_MPEG_VIDEO_VP9_LEVEL_2_0" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_2_1,	"V4L2_MPEG_VIDEO_VP9_LEVEL_2_1" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_3_0,	"V4L2_MPEG_VIDEO_VP9_LEVEL_3_0" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_3_1,	"V4L2_MPEG_VIDEO_VP9_LEVEL_3_1" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_4_0,	"V4L2_MPEG_VIDEO_VP9_LEVEL_4_0" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_4_1,	"V4L2_MPEG_VIDEO_VP9_LEVEL_4_1" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_5_0,	"V4L2_MPEG_VIDEO_VP9_LEVEL_5_0" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_5_1,	"V4L2_MPEG_VIDEO_VP9_LEVEL_5_1" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_5_2,	"V4L2_MPEG_VIDEO_VP9_LEVEL_5_2" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_6_0,	"V4L2_MPEG_VIDEO_VP9_LEVEL_6_0" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_6_1,	"V4L2_MPEG_VIDEO_VP9_LEVEL_6_1" },
+	{ V4L2_MPEG_VIDEO_VP9_LEVEL_6_2,	"V4L2_MPEG_VIDEO_VP9_LEVEL_6_2" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_hevc_hier_coding_type_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B,	"V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B" },
+	{ V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P,	"V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_hevc_profile_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,	"V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN" },
+	{ V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,	"V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE" },
+	{ V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,	"V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_hevc_level_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_1,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_1" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_2,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_2" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_3,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_3" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_4,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_4" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_5,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_5" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_6,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_6" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1" },
+	{ V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2,	"V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_hevc_tier_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEVC_TIER_MAIN,	"V4L2_MPEG_VIDEO_HEVC_TIER_MAIN" },
+	{ V4L2_MPEG_VIDEO_HEVC_TIER_HIGH,	"V4L2_MPEG_VIDEO_HEVC_TIER_HIGH" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_cid_mpeg_video_hevc_loop_filter_mode_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED,	"V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED" },
+	{ V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED,	"V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED" },
+	{ V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY,	"V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_cid_mpeg_video_hevc_refresh_type_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE,	"V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE" },
+	{ V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA,	"V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA" },
+	{ V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR,	"V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_cid_mpeg_video_hevc_size_of_length_field_val_def[] = {
+	{ V4L2_MPEG_VIDEO_HEVC_SIZE_0,	"V4L2_MPEG_VIDEO_HEVC_SIZE_0" },
+	{ V4L2_MPEG_VIDEO_HEVC_SIZE_1,	"V4L2_MPEG_VIDEO_HEVC_SIZE_1" },
+	{ V4L2_MPEG_VIDEO_HEVC_SIZE_2,	"V4L2_MPEG_VIDEO_HEVC_SIZE_2" },
+	{ V4L2_MPEG_VIDEO_HEVC_SIZE_4,	"V4L2_MPEG_VIDEO_HEVC_SIZE_4" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_frame_skip_mode_val_def[] = {
+	{ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED,	"V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED" },
+	{ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT,	"V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT" },
+	{ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT,	"V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_av1_profile_val_def[] = {
+	{ V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN,	"V4L2_MPEG_VIDEO_AV1_PROFILE_MAIN" },
+	{ V4L2_MPEG_VIDEO_AV1_PROFILE_HIGH,	"V4L2_MPEG_VIDEO_AV1_PROFILE_HIGH" },
+	{ V4L2_MPEG_VIDEO_AV1_PROFILE_PROFESSIONAL,	"V4L2_MPEG_VIDEO_AV1_PROFILE_PROFESSIONAL" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_video_av1_level_val_def[] = {
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_2_0,	"V4L2_MPEG_VIDEO_AV1_LEVEL_2_0" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_2_1,	"V4L2_MPEG_VIDEO_AV1_LEVEL_2_1" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_2_2,	"V4L2_MPEG_VIDEO_AV1_LEVEL_2_2" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_2_3,	"V4L2_MPEG_VIDEO_AV1_LEVEL_2_3" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_3_0,	"V4L2_MPEG_VIDEO_AV1_LEVEL_3_0" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_3_1,	"V4L2_MPEG_VIDEO_AV1_LEVEL_3_1" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_3_2,	"V4L2_MPEG_VIDEO_AV1_LEVEL_3_2" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_3_3,	"V4L2_MPEG_VIDEO_AV1_LEVEL_3_3" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_4_0,	"V4L2_MPEG_VIDEO_AV1_LEVEL_4_0" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_4_1,	"V4L2_MPEG_VIDEO_AV1_LEVEL_4_1" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_4_2,	"V4L2_MPEG_VIDEO_AV1_LEVEL_4_2" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_4_3,	"V4L2_MPEG_VIDEO_AV1_LEVEL_4_3" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_5_0,	"V4L2_MPEG_VIDEO_AV1_LEVEL_5_0" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_5_1,	"V4L2_MPEG_VIDEO_AV1_LEVEL_5_1" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_5_2,	"V4L2_MPEG_VIDEO_AV1_LEVEL_5_2" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_5_3,	"V4L2_MPEG_VIDEO_AV1_LEVEL_5_3" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_6_0,	"V4L2_MPEG_VIDEO_AV1_LEVEL_6_0" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_6_1,	"V4L2_MPEG_VIDEO_AV1_LEVEL_6_1" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_6_2,	"V4L2_MPEG_VIDEO_AV1_LEVEL_6_2" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_6_3,	"V4L2_MPEG_VIDEO_AV1_LEVEL_6_3" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_7_0,	"V4L2_MPEG_VIDEO_AV1_LEVEL_7_0" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_7_1,	"V4L2_MPEG_VIDEO_AV1_LEVEL_7_1" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_7_2,	"V4L2_MPEG_VIDEO_AV1_LEVEL_7_2" },
+	{ V4L2_MPEG_VIDEO_AV1_LEVEL_7_3,	"V4L2_MPEG_VIDEO_AV1_LEVEL_7_3" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_cx2341x_video_spatial_filter_mode_val_def[] = {
+	{ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL,	"V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL" },
+	{ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO,	"V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_cx2341x_video_luma_spatial_filter_type_val_def[] = {
+	{ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF,	"V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF" },
+	{ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR,	"V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR" },
+	{ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT,	"V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT" },
+	{ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE,	"V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE" },
+	{ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE,	"V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type_val_def[] = {
+	{ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF,	"V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF" },
+	{ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR,	"V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_cx2341x_video_temporal_filter_mode_val_def[] = {
+	{ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL,	"V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL" },
+	{ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO,	"V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_cx2341x_video_median_filter_type_val_def[] = {
+	{ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF,	"V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF" },
+	{ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR,	"V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR" },
+	{ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT,	"V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT" },
+	{ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT,	"V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT" },
+	{ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG,	"V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_mfc51_video_frame_skip_mode_val_def[] = {
+	{ V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED,	"V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED" },
+	{ V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT,	"V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT" },
+	{ V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT,	"V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_mpeg_mfc51_video_force_frame_type_val_def[] = {
+	{ V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED,	"V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED" },
+	{ V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME,	"V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME" },
+	{ V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED,	"V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED" },
+	{ -1, "" }
+};
+
+constexpr val_def _val_def[] = {
+	{ V4L2_EXPOSURE_AUTO,	"V4L2_EXPOSURE_AUTO" },
+	{ V4L2_EXPOSURE_MANUAL,	"V4L2_EXPOSURE_MANUAL" },
+	{ V4L2_EXPOSURE_SHUTTER_PRIORITY,	"V4L2_EXPOSURE_SHUTTER_PRIORITY" },
+	{ V4L2_EXPOSURE_APERTURE_PRIORITY,	"V4L2_EXPOSURE_APERTURE_PRIORITY" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_auto_n_preset_white_balance_val_def[] = {
+	{ V4L2_WHITE_BALANCE_MANUAL,	"V4L2_WHITE_BALANCE_MANUAL" },
+	{ V4L2_WHITE_BALANCE_AUTO,	"V4L2_WHITE_BALANCE_AUTO" },
+	{ V4L2_WHITE_BALANCE_INCANDESCENT,	"V4L2_WHITE_BALANCE_INCANDESCENT" },
+	{ V4L2_WHITE_BALANCE_FLUORESCENT,	"V4L2_WHITE_BALANCE_FLUORESCENT" },
+	{ V4L2_WHITE_BALANCE_FLUORESCENT_H,	"V4L2_WHITE_BALANCE_FLUORESCENT_H" },
+	{ V4L2_WHITE_BALANCE_HORIZON,	"V4L2_WHITE_BALANCE_HORIZON" },
+	{ V4L2_WHITE_BALANCE_DAYLIGHT,	"V4L2_WHITE_BALANCE_DAYLIGHT" },
+	{ V4L2_WHITE_BALANCE_FLASH,	"V4L2_WHITE_BALANCE_FLASH" },
+	{ V4L2_WHITE_BALANCE_CLOUDY,	"V4L2_WHITE_BALANCE_CLOUDY" },
+	{ V4L2_WHITE_BALANCE_SHADE,	"V4L2_WHITE_BALANCE_SHADE" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_iso_sensitivity_auto_type_val_def[] = {
+	{ V4L2_ISO_SENSITIVITY_MANUAL,	"V4L2_ISO_SENSITIVITY_MANUAL" },
+	{ V4L2_ISO_SENSITIVITY_AUTO,	"V4L2_ISO_SENSITIVITY_AUTO" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_exposure_metering_val_def[] = {
+	{ V4L2_EXPOSURE_METERING_AVERAGE,	"V4L2_EXPOSURE_METERING_AVERAGE" },
+	{ V4L2_EXPOSURE_METERING_CENTER_WEIGHTED,	"V4L2_EXPOSURE_METERING_CENTER_WEIGHTED" },
+	{ V4L2_EXPOSURE_METERING_SPOT,	"V4L2_EXPOSURE_METERING_SPOT" },
+	{ V4L2_EXPOSURE_METERING_MATRIX,	"V4L2_EXPOSURE_METERING_MATRIX" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_scene_mode_val_def[] = {
+	{ V4L2_SCENE_MODE_NONE,	"V4L2_SCENE_MODE_NONE" },
+	{ V4L2_SCENE_MODE_BACKLIGHT,	"V4L2_SCENE_MODE_BACKLIGHT" },
+	{ V4L2_SCENE_MODE_BEACH_SNOW,	"V4L2_SCENE_MODE_BEACH_SNOW" },
+	{ V4L2_SCENE_MODE_CANDLE_LIGHT,	"V4L2_SCENE_MODE_CANDLE_LIGHT" },
+	{ V4L2_SCENE_MODE_DAWN_DUSK,	"V4L2_SCENE_MODE_DAWN_DUSK" },
+	{ V4L2_SCENE_MODE_FALL_COLORS,	"V4L2_SCENE_MODE_FALL_COLORS" },
+	{ V4L2_SCENE_MODE_FIREWORKS,	"V4L2_SCENE_MODE_FIREWORKS" },
+	{ V4L2_SCENE_MODE_LANDSCAPE,	"V4L2_SCENE_MODE_LANDSCAPE" },
+	{ V4L2_SCENE_MODE_NIGHT,	"V4L2_SCENE_MODE_NIGHT" },
+	{ V4L2_SCENE_MODE_PARTY_INDOOR,	"V4L2_SCENE_MODE_PARTY_INDOOR" },
+	{ V4L2_SCENE_MODE_PORTRAIT,	"V4L2_SCENE_MODE_PORTRAIT" },
+	{ V4L2_SCENE_MODE_SPORTS,	"V4L2_SCENE_MODE_SPORTS" },
+	{ V4L2_SCENE_MODE_SUNSET,	"V4L2_SCENE_MODE_SUNSET" },
+	{ V4L2_SCENE_MODE_TEXT,	"V4L2_SCENE_MODE_TEXT" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_auto_focus_range_val_def[] = {
+	{ V4L2_AUTO_FOCUS_RANGE_AUTO,	"V4L2_AUTO_FOCUS_RANGE_AUTO" },
+	{ V4L2_AUTO_FOCUS_RANGE_NORMAL,	"V4L2_AUTO_FOCUS_RANGE_NORMAL" },
+	{ V4L2_AUTO_FOCUS_RANGE_MACRO,	"V4L2_AUTO_FOCUS_RANGE_MACRO" },
+	{ V4L2_AUTO_FOCUS_RANGE_INFINITY,	"V4L2_AUTO_FOCUS_RANGE_INFINITY" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_preemphasis_val_def[] = {
+	{ V4L2_PREEMPHASIS_DISABLED,	"V4L2_PREEMPHASIS_DISABLED" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_flash_led_mode_val_def[] = {
+	{ V4L2_FLASH_LED_MODE_NONE,	"V4L2_FLASH_LED_MODE_NONE" },
+	{ V4L2_FLASH_LED_MODE_FLASH,	"V4L2_FLASH_LED_MODE_FLASH" },
+	{ V4L2_FLASH_LED_MODE_TORCH,	"V4L2_FLASH_LED_MODE_TORCH" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_flash_strobe_source_val_def[] = {
+	{ V4L2_FLASH_STROBE_SOURCE_SOFTWARE,	"V4L2_FLASH_STROBE_SOURCE_SOFTWARE" },
+	{ V4L2_FLASH_STROBE_SOURCE_EXTERNAL,	"V4L2_FLASH_STROBE_SOURCE_EXTERNAL" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_jpeg_chroma_subsampling_val_def[] = {
+	{ V4L2_JPEG_CHROMA_SUBSAMPLING_444,	"V4L2_JPEG_CHROMA_SUBSAMPLING_444" },
+	{ V4L2_JPEG_CHROMA_SUBSAMPLING_422,	"V4L2_JPEG_CHROMA_SUBSAMPLING_422" },
+	{ V4L2_JPEG_CHROMA_SUBSAMPLING_420,	"V4L2_JPEG_CHROMA_SUBSAMPLING_420" },
+	{ V4L2_JPEG_CHROMA_SUBSAMPLING_411,	"V4L2_JPEG_CHROMA_SUBSAMPLING_411" },
+	{ V4L2_JPEG_CHROMA_SUBSAMPLING_410,	"V4L2_JPEG_CHROMA_SUBSAMPLING_410" },
+	{ V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY,	"V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_dv_tx_mode_val_def[] = {
+	{ V4L2_DV_TX_MODE_DVI_D,	"V4L2_DV_TX_MODE_DVI_D" },
+	{ V4L2_DV_TX_MODE_HDMI,	"V4L2_DV_TX_MODE_HDMI" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_dv_rgb_range_val_def[] = {
+	{ V4L2_DV_RGB_RANGE_AUTO,	"V4L2_DV_RGB_RANGE_AUTO" },
+	{ V4L2_DV_RGB_RANGE_LIMITED,	"V4L2_DV_RGB_RANGE_LIMITED" },
+	{ V4L2_DV_RGB_RANGE_FULL,	"V4L2_DV_RGB_RANGE_FULL" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_dv_it_content_type_val_def[] = {
+	{ V4L2_DV_IT_CONTENT_TYPE_GRAPHICS,	"V4L2_DV_IT_CONTENT_TYPE_GRAPHICS" },
+	{ V4L2_DV_IT_CONTENT_TYPE_PHOTO,	"V4L2_DV_IT_CONTENT_TYPE_PHOTO" },
+	{ V4L2_DV_IT_CONTENT_TYPE_CINEMA,	"V4L2_DV_IT_CONTENT_TYPE_CINEMA" },
+	{ V4L2_DV_IT_CONTENT_TYPE_GAME,	"V4L2_DV_IT_CONTENT_TYPE_GAME" },
+	{ V4L2_DV_IT_CONTENT_TYPE_NO_ITC,	"V4L2_DV_IT_CONTENT_TYPE_NO_ITC" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_deemphasis_val_def[] = {
+	{ V4L2_DEEMPHASIS_DISABLED,	"V4L2_DEEMPHASIS_DISABLED" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_detect_md_mode_val_def[] = {
+	{ V4L2_DETECT_MD_MODE_DISABLED,	"V4L2_DETECT_MD_MODE_DISABLED" },
+	{ V4L2_DETECT_MD_MODE_GLOBAL,	"V4L2_DETECT_MD_MODE_GLOBAL" },
+	{ V4L2_DETECT_MD_MODE_THRESHOLD_GRID,	"V4L2_DETECT_MD_MODE_THRESHOLD_GRID" },
+	{ V4L2_DETECT_MD_MODE_REGION_GRID,	"V4L2_DETECT_MD_MODE_REGION_GRID" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_stateless_h264_decode_mode_val_def[] = {
+	{ V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED,	"V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED" },
+	{ V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED,	"V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_stateless_h264_start_code_val_def[] = {
+	{ V4L2_STATELESS_H264_START_CODE_NONE,	"V4L2_STATELESS_H264_START_CODE_NONE" },
+	{ V4L2_STATELESS_H264_START_CODE_ANNEX_B,	"V4L2_STATELESS_H264_START_CODE_ANNEX_B" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_h264_sps_flag_def[] = {
+	{ V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE, "V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE" },
+	{ V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS, "V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS" },
+	{ V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO, "V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO" },
+	{ V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED, "V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED" },
+	{ V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY, "V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY" },
+	{ V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD, "V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD" },
+	{ V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE, "V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_h264_pps_flag_def[] = {
+	{ V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE, "V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE" },
+	{ V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT, "V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT" },
+	{ V4L2_H264_PPS_FLAG_WEIGHTED_PRED, "V4L2_H264_PPS_FLAG_WEIGHTED_PRED" },
+	{ V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT, "V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT" },
+	{ V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED, "V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED" },
+	{ V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT, "V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT" },
+	{ V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE, "V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE" },
+	{ V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT, "V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_h264_slice_flag_def[] = {
+	{ V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED, "V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED" },
+	{ V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH, "V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_h264_dpb_entry_flag_def[] = {
+	{ V4L2_H264_DPB_ENTRY_FLAG_VALID, "V4L2_H264_DPB_ENTRY_FLAG_VALID" },
+	{ V4L2_H264_DPB_ENTRY_FLAG_ACTIVE, "V4L2_H264_DPB_ENTRY_FLAG_ACTIVE" },
+	{ V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM, "V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM" },
+	{ V4L2_H264_DPB_ENTRY_FLAG_FIELD, "V4L2_H264_DPB_ENTRY_FLAG_FIELD" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_h264_decode_param_flag_def[] = {
+	{ V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC, "V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC" },
+	{ V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC, "V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC" },
+	{ V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD, "V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD" },
+	{ V4L2_H264_DECODE_PARAM_FLAG_PFRAME, "V4L2_H264_DECODE_PARAM_FLAG_PFRAME" },
+	{ V4L2_H264_DECODE_PARAM_FLAG_BFRAME, "V4L2_H264_DECODE_PARAM_FLAG_BFRAME" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_ctrl_fwht_params_flag_def[] = {
+	{ V4L2_FWHT_FL_IS_INTERLACED, "V4L2_FWHT_FL_IS_INTERLACED" },
+	{ V4L2_FWHT_FL_IS_BOTTOM_FIRST, "V4L2_FWHT_FL_IS_BOTTOM_FIRST" },
+	{ V4L2_FWHT_FL_IS_ALTERNATE, "V4L2_FWHT_FL_IS_ALTERNATE" },
+	{ V4L2_FWHT_FL_IS_BOTTOM_FIELD, "V4L2_FWHT_FL_IS_BOTTOM_FIELD" },
+	{ V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED, "V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED" },
+	{ V4L2_FWHT_FL_CB_IS_UNCOMPRESSED, "V4L2_FWHT_FL_CB_IS_UNCOMPRESSED" },
+	{ V4L2_FWHT_FL_CR_IS_UNCOMPRESSED, "V4L2_FWHT_FL_CR_IS_UNCOMPRESSED" },
+	{ V4L2_FWHT_FL_CHROMA_FULL_HEIGHT, "V4L2_FWHT_FL_CHROMA_FULL_HEIGHT" },
+	{ V4L2_FWHT_FL_CHROMA_FULL_WIDTH, "V4L2_FWHT_FL_CHROMA_FULL_WIDTH" },
+	{ V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED, "V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED" },
+	{ V4L2_FWHT_FL_I_FRAME, "V4L2_FWHT_FL_I_FRAME" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_vp8_segment_flag_def[] = {
+	{ V4L2_VP8_SEGMENT_FLAG_ENABLED, "V4L2_VP8_SEGMENT_FLAG_ENABLED" },
+	{ V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP, "V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP" },
+	{ V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA, "V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA" },
+	{ V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE, "V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_vp8_loop_filter_flag_def[] = {
+	{ V4L2_VP8_LF_ADJ_ENABLE, "V4L2_VP8_LF_ADJ_ENABLE" },
+	{ V4L2_VP8_LF_DELTA_UPDATE, "V4L2_VP8_LF_DELTA_UPDATE" },
+	{ V4L2_VP8_LF_FILTER_TYPE_SIMPLE, "V4L2_VP8_LF_FILTER_TYPE_SIMPLE" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_vp8_frame_flag_def[] = {
+	{ V4L2_VP8_FRAME_FLAG_KEY_FRAME, "V4L2_VP8_FRAME_FLAG_KEY_FRAME" },
+	{ V4L2_VP8_FRAME_FLAG_EXPERIMENTAL, "V4L2_VP8_FRAME_FLAG_EXPERIMENTAL" },
+	{ V4L2_VP8_FRAME_FLAG_SHOW_FRAME, "V4L2_VP8_FRAME_FLAG_SHOW_FRAME" },
+	{ V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF, "V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF" },
+	{ V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN, "V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN" },
+	{ V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT, "V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_mpeg2_seq_flag_def[] = {
+	{ V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE, "V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_mpeg2_pic_flag_def[] = {
+	{ V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST, "V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST" },
+	{ V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT, "V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT" },
+	{ V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV, "V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV" },
+	{ V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE, "V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE" },
+	{ V4L2_MPEG2_PIC_FLAG_INTRA_VLC, "V4L2_MPEG2_PIC_FLAG_INTRA_VLC" },
+	{ V4L2_MPEG2_PIC_FLAG_ALT_SCAN, "V4L2_MPEG2_PIC_FLAG_ALT_SCAN" },
+	{ V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST, "V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST" },
+	{ V4L2_MPEG2_PIC_FLAG_PROGRESSIVE, "V4L2_MPEG2_PIC_FLAG_PROGRESSIVE" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_stateless_hevc_decode_mode_val_def[] = {
+	{ V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,	"V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED" },
+	{ V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED,	"V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_stateless_hevc_start_code_val_def[] = {
+	{ V4L2_STATELESS_HEVC_START_CODE_NONE,	"V4L2_STATELESS_HEVC_START_CODE_NONE" },
+	{ V4L2_STATELESS_HEVC_START_CODE_ANNEX_B,	"V4L2_STATELESS_HEVC_START_CODE_ANNEX_B" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_hevc_sps_flag_def[] = {
+	{ V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE, "V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE" },
+	{ V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED, "V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED" },
+	{ V4L2_HEVC_SPS_FLAG_AMP_ENABLED, "V4L2_HEVC_SPS_FLAG_AMP_ENABLED" },
+	{ V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET, "V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET" },
+	{ V4L2_HEVC_SPS_FLAG_PCM_ENABLED, "V4L2_HEVC_SPS_FLAG_PCM_ENABLED" },
+	{ V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED, "V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED" },
+	{ V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT, "V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT" },
+	{ V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED, "V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED" },
+	{ V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED, "V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_hevc_pps_flag_def[] = {
+	{ V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED, "V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT, "V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT" },
+	{ V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED, "V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT, "V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT" },
+	{ V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED, "V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED" },
+	{ V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED, "V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED, "V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT, "V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT" },
+	{ V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED, "V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED" },
+	{ V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED, "V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED" },
+	{ V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED, "V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_TILES_ENABLED, "V4L2_HEVC_PPS_FLAG_TILES_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED, "V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED, "V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED, "V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED, "V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED" },
+	{ V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER, "V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER" },
+	{ V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT, "V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT" },
+	{ V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT, "V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT" },
+	{ V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT, "V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT" },
+	{ V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING, "V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_hevc_slice_params_flag_def[] = {
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA, "V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA, "V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED, "V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO, "V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT, "V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0, "V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV, "V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED, "V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED, "V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED" },
+	{ V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT, "V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_hevc_decode_param_flag_def[] = {
+	{ V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC, "V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC" },
+	{ V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC, "V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC" },
+	{ V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR, "V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_vp9_loop_filter_flag_def[] = {
+	{ V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED, "V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED" },
+	{ V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE, "V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_vp9_segmentation_flag_def[] = {
+	{ V4L2_VP9_SEGMENTATION_FLAG_ENABLED, "V4L2_VP9_SEGMENTATION_FLAG_ENABLED" },
+	{ V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP, "V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP" },
+	{ V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE, "V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE" },
+	{ V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA, "V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA" },
+	{ V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE, "V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_vp9_frame_flag_def[] = {
+	{ V4L2_VP9_FRAME_FLAG_KEY_FRAME, "V4L2_VP9_FRAME_FLAG_KEY_FRAME" },
+	{ V4L2_VP9_FRAME_FLAG_SHOW_FRAME, "V4L2_VP9_FRAME_FLAG_SHOW_FRAME" },
+	{ V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT, "V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT" },
+	{ V4L2_VP9_FRAME_FLAG_INTRA_ONLY, "V4L2_VP9_FRAME_FLAG_INTRA_ONLY" },
+	{ V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV, "V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV" },
+	{ V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX, "V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX" },
+	{ V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE, "V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE" },
+	{ V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING, "V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING" },
+	{ V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING, "V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING" },
+	{ V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING, "V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_av1_sequence_flag_def[] = {
+	{ V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE, "V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE" },
+	{ V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK, "V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF" },
+	{ V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION, "V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION" },
+	{ V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME, "V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME" },
+	{ V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE, "V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE" },
+	{ V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X, "V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X" },
+	{ V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y, "V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y" },
+	{ V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT, "V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT" },
+	{ V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q, "V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_av1_warp_model_val_def[] = {
+	{ V4L2_AV1_WARP_MODEL_IDENTITY,	"V4L2_AV1_WARP_MODEL_IDENTITY" },
+	{ V4L2_AV1_WARP_MODEL_TRANSLATION,	"V4L2_AV1_WARP_MODEL_TRANSLATION" },
+	{ V4L2_AV1_WARP_MODEL_ROTZOOM,	"V4L2_AV1_WARP_MODEL_ROTZOOM" },
+	{ V4L2_AV1_WARP_MODEL_AFFINE,	"V4L2_AV1_WARP_MODEL_AFFINE" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_av1_reference_frame_val_def[] = {
+	{ V4L2_AV1_REF_INTRA_FRAME,	"V4L2_AV1_REF_INTRA_FRAME" },
+	{ V4L2_AV1_REF_LAST_FRAME,	"V4L2_AV1_REF_LAST_FRAME" },
+	{ V4L2_AV1_REF_LAST2_FRAME,	"V4L2_AV1_REF_LAST2_FRAME" },
+	{ V4L2_AV1_REF_LAST3_FRAME,	"V4L2_AV1_REF_LAST3_FRAME" },
+	{ V4L2_AV1_REF_GOLDEN_FRAME,	"V4L2_AV1_REF_GOLDEN_FRAME" },
+	{ V4L2_AV1_REF_BWDREF_FRAME,	"V4L2_AV1_REF_BWDREF_FRAME" },
+	{ V4L2_AV1_REF_ALTREF2_FRAME,	"V4L2_AV1_REF_ALTREF2_FRAME" },
+	{ V4L2_AV1_REF_ALTREF_FRAME,	"V4L2_AV1_REF_ALTREF_FRAME" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_av1_global_motion_flag_def[] = {
+	{ V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL, "V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL" },
+	{ V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM, "V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM" },
+	{ V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION, "V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_av1_frame_restoration_type_val_def[] = {
+	{ V4L2_AV1_FRAME_RESTORE_NONE,	"V4L2_AV1_FRAME_RESTORE_NONE" },
+	{ V4L2_AV1_FRAME_RESTORE_WIENER,	"V4L2_AV1_FRAME_RESTORE_WIENER" },
+	{ V4L2_AV1_FRAME_RESTORE_SGRPROJ,	"V4L2_AV1_FRAME_RESTORE_SGRPROJ" },
+	{ V4L2_AV1_FRAME_RESTORE_SWITCHABLE,	"V4L2_AV1_FRAME_RESTORE_SWITCHABLE" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_av1_loop_restoration_flag_def[] = {
+	{ V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR, "V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR" },
+	{ V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR, "V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_av1_segmentation_flag_def[] = {
+	{ V4L2_AV1_SEGMENTATION_FLAG_ENABLED, "V4L2_AV1_SEGMENTATION_FLAG_ENABLED" },
+	{ V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP, "V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP" },
+	{ V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE, "V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE" },
+	{ V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA, "V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA" },
+	{ V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP, "V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_av1_segment_feature_val_def[] = {
+	{ V4L2_AV1_SEG_LVL_ALT_Q,	"V4L2_AV1_SEG_LVL_ALT_Q" },
+	{ V4L2_AV1_SEG_LVL_ALT_LF_Y_V,	"V4L2_AV1_SEG_LVL_ALT_LF_Y_V" },
+	{ V4L2_AV1_SEG_LVL_REF_FRAME,	"V4L2_AV1_SEG_LVL_REF_FRAME" },
+	{ V4L2_AV1_SEG_LVL_REF_SKIP,	"V4L2_AV1_SEG_LVL_REF_SKIP" },
+	{ V4L2_AV1_SEG_LVL_REF_GLOBALMV,	"V4L2_AV1_SEG_LVL_REF_GLOBALMV" },
+	{ V4L2_AV1_SEG_LVL_MAX,	"V4L2_AV1_SEG_LVL_MAX" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_av1_loop_filter_flag_def[] = {
+	{ V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED, "V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED" },
+	{ V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE, "V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE" },
+	{ V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT, "V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT" },
+	{ V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI, "V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_av1_quantization_flag_def[] = {
+	{ V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA, "V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA" },
+	{ V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX, "V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX" },
+	{ V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT, "V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_av1_tile_info_flag_def[] = {
+	{ V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING, "V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_av1_frame_type_val_def[] = {
+	{ V4L2_AV1_KEY_FRAME,	"V4L2_AV1_KEY_FRAME" },
+	{ V4L2_AV1_INTER_FRAME,	"V4L2_AV1_INTER_FRAME" },
+	{ V4L2_AV1_INTRA_ONLY_FRAME,	"V4L2_AV1_INTRA_ONLY_FRAME" },
+	{ V4L2_AV1_SWITCH_FRAME,	"V4L2_AV1_SWITCH_FRAME" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_av1_interpolation_filter_val_def[] = {
+	{ V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP,	"V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP" },
+	{ V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH,	"V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH" },
+	{ V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP,	"V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP" },
+	{ V4L2_AV1_INTERPOLATION_FILTER_BILINEAR,	"V4L2_AV1_INTERPOLATION_FILTER_BILINEAR" },
+	{ V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE,	"V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_av1_tx_mode_val_def[] = {
+	{ V4L2_AV1_TX_MODE_ONLY_4X4,	"V4L2_AV1_TX_MODE_ONLY_4X4" },
+	{ V4L2_AV1_TX_MODE_LARGEST,	"V4L2_AV1_TX_MODE_LARGEST" },
+	{ V4L2_AV1_TX_MODE_SELECT,	"V4L2_AV1_TX_MODE_SELECT" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_av1_frame_flag_def[] = {
+	{ V4L2_AV1_FRAME_FLAG_SHOW_FRAME, "V4L2_AV1_FRAME_FLAG_SHOW_FRAME" },
+	{ V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME, "V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME" },
+	{ V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE, "V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE" },
+	{ V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE, "V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE" },
+	{ V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS, "V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS" },
+	{ V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV, "V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV" },
+	{ V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC, "V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC" },
+	{ V4L2_AV1_FRAME_FLAG_USE_SUPERRES, "V4L2_AV1_FRAME_FLAG_USE_SUPERRES" },
+	{ V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV, "V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV" },
+	{ V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE, "V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE" },
+	{ V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS, "V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS" },
+	{ V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF, "V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF" },
+	{ V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION, "V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION" },
+	{ V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT, "V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT" },
+	{ V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET, "V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET" },
+	{ V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED, "V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED" },
+	{ V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT, "V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT" },
+	{ V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE, "V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE" },
+	{ V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT, "V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT" },
+	{ V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING, "V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_av1_film_grain_flag_def[] = {
+	{ V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN, "V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN" },
+	{ V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN, "V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN" },
+	{ V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA, "V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA" },
+	{ V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP, "V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP" },
+	{ V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE, "V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_field_val_def[] = {
+	{ V4L2_FIELD_ANY,	"V4L2_FIELD_ANY" },
+	{ V4L2_FIELD_NONE,	"V4L2_FIELD_NONE" },
+	{ V4L2_FIELD_TOP,	"V4L2_FIELD_TOP" },
+	{ V4L2_FIELD_BOTTOM,	"V4L2_FIELD_BOTTOM" },
+	{ V4L2_FIELD_INTERLACED,	"V4L2_FIELD_INTERLACED" },
+	{ V4L2_FIELD_SEQ_TB,	"V4L2_FIELD_SEQ_TB" },
+	{ V4L2_FIELD_SEQ_BT,	"V4L2_FIELD_SEQ_BT" },
+	{ V4L2_FIELD_ALTERNATE,	"V4L2_FIELD_ALTERNATE" },
+	{ V4L2_FIELD_INTERLACED_TB,	"V4L2_FIELD_INTERLACED_TB" },
+	{ V4L2_FIELD_INTERLACED_BT,	"V4L2_FIELD_INTERLACED_BT" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_buf_type_val_def[] = {
+	{ V4L2_BUF_TYPE_VIDEO_CAPTURE,	"V4L2_BUF_TYPE_VIDEO_CAPTURE" },
+	{ V4L2_BUF_TYPE_VIDEO_OUTPUT,	"V4L2_BUF_TYPE_VIDEO_OUTPUT" },
+	{ V4L2_BUF_TYPE_VIDEO_OVERLAY,	"V4L2_BUF_TYPE_VIDEO_OVERLAY" },
+	{ V4L2_BUF_TYPE_VBI_CAPTURE,	"V4L2_BUF_TYPE_VBI_CAPTURE" },
+	{ V4L2_BUF_TYPE_VBI_OUTPUT,	"V4L2_BUF_TYPE_VBI_OUTPUT" },
+	{ V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,	"V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" },
+	{ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,	"V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" },
+	{ V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY,	"V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" },
+	{ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,	"V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" },
+	{ V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,	"V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" },
+	{ V4L2_BUF_TYPE_SDR_CAPTURE,	"V4L2_BUF_TYPE_SDR_CAPTURE" },
+	{ V4L2_BUF_TYPE_SDR_OUTPUT,	"V4L2_BUF_TYPE_SDR_OUTPUT" },
+	{ V4L2_BUF_TYPE_META_CAPTURE,	"V4L2_BUF_TYPE_META_CAPTURE" },
+	{ V4L2_BUF_TYPE_META_OUTPUT,	"V4L2_BUF_TYPE_META_OUTPUT" },
+	{ V4L2_BUF_TYPE_PRIVATE,	"V4L2_BUF_TYPE_PRIVATE" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_tuner_type_val_def[] = {
+	{ V4L2_TUNER_RADIO,	"V4L2_TUNER_RADIO" },
+	{ V4L2_TUNER_ANALOG_TV,	"V4L2_TUNER_ANALOG_TV" },
+	{ V4L2_TUNER_DIGITAL_TV,	"V4L2_TUNER_DIGITAL_TV" },
+	{ V4L2_TUNER_SDR,	"V4L2_TUNER_SDR" },
+	{ V4L2_TUNER_RF,	"V4L2_TUNER_RF" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_memory_val_def[] = {
+	{ V4L2_MEMORY_MMAP,	"V4L2_MEMORY_MMAP" },
+	{ V4L2_MEMORY_USERPTR,	"V4L2_MEMORY_USERPTR" },
+	{ V4L2_MEMORY_OVERLAY,	"V4L2_MEMORY_OVERLAY" },
+	{ V4L2_MEMORY_DMABUF,	"V4L2_MEMORY_DMABUF" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_colorspace_val_def[] = {
+	{ V4L2_COLORSPACE_DEFAULT,	"V4L2_COLORSPACE_DEFAULT" },
+	{ V4L2_COLORSPACE_SMPTE170M,	"V4L2_COLORSPACE_SMPTE170M" },
+	{ V4L2_COLORSPACE_SMPTE240M,	"V4L2_COLORSPACE_SMPTE240M" },
+	{ V4L2_COLORSPACE_REC709,	"V4L2_COLORSPACE_REC709" },
+	{ V4L2_COLORSPACE_BT878,	"V4L2_COLORSPACE_BT878" },
+	{ V4L2_COLORSPACE_470_SYSTEM_M,	"V4L2_COLORSPACE_470_SYSTEM_M" },
+	{ V4L2_COLORSPACE_470_SYSTEM_BG,	"V4L2_COLORSPACE_470_SYSTEM_BG" },
+	{ V4L2_COLORSPACE_JPEG,	"V4L2_COLORSPACE_JPEG" },
+	{ V4L2_COLORSPACE_SRGB,	"V4L2_COLORSPACE_SRGB" },
+	{ V4L2_COLORSPACE_OPRGB,	"V4L2_COLORSPACE_OPRGB" },
+	{ V4L2_COLORSPACE_BT2020,	"V4L2_COLORSPACE_BT2020" },
+	{ V4L2_COLORSPACE_RAW,	"V4L2_COLORSPACE_RAW" },
+	{ V4L2_COLORSPACE_DCI_P3,	"V4L2_COLORSPACE_DCI_P3" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_xfer_func_val_def[] = {
+	{ V4L2_XFER_FUNC_DEFAULT,	"V4L2_XFER_FUNC_DEFAULT" },
+	{ V4L2_XFER_FUNC_709,	"V4L2_XFER_FUNC_709" },
+	{ V4L2_XFER_FUNC_SRGB,	"V4L2_XFER_FUNC_SRGB" },
+	{ V4L2_XFER_FUNC_OPRGB,	"V4L2_XFER_FUNC_OPRGB" },
+	{ V4L2_XFER_FUNC_SMPTE240M,	"V4L2_XFER_FUNC_SMPTE240M" },
+	{ V4L2_XFER_FUNC_NONE,	"V4L2_XFER_FUNC_NONE" },
+	{ V4L2_XFER_FUNC_DCI_P3,	"V4L2_XFER_FUNC_DCI_P3" },
+	{ V4L2_XFER_FUNC_SMPTE2084,	"V4L2_XFER_FUNC_SMPTE2084" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_ycbcr_encoding_val_def[] = {
+	{ V4L2_YCBCR_ENC_DEFAULT,	"V4L2_YCBCR_ENC_DEFAULT" },
+	{ V4L2_YCBCR_ENC_601,	"V4L2_YCBCR_ENC_601" },
+	{ V4L2_YCBCR_ENC_709,	"V4L2_YCBCR_ENC_709" },
+	{ V4L2_YCBCR_ENC_XV601,	"V4L2_YCBCR_ENC_XV601" },
+	{ V4L2_YCBCR_ENC_XV709,	"V4L2_YCBCR_ENC_XV709" },
+	{ V4L2_YCBCR_ENC_SYCC,	"V4L2_YCBCR_ENC_SYCC" },
+	{ V4L2_YCBCR_ENC_BT2020,	"V4L2_YCBCR_ENC_BT2020" },
+	{ V4L2_YCBCR_ENC_BT2020_CONST_LUM,	"V4L2_YCBCR_ENC_BT2020_CONST_LUM" },
+	{ V4L2_YCBCR_ENC_SMPTE240M,	"V4L2_YCBCR_ENC_SMPTE240M" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_hsv_encoding_val_def[] = {
+	{ V4L2_HSV_ENC_180,	"V4L2_HSV_ENC_180" },
+	{ V4L2_HSV_ENC_256,	"V4L2_HSV_ENC_256" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_quantization_val_def[] = {
+	{ V4L2_QUANTIZATION_DEFAULT,	"V4L2_QUANTIZATION_DEFAULT" },
+	{ V4L2_QUANTIZATION_FULL_RANGE,	"V4L2_QUANTIZATION_FULL_RANGE" },
+	{ V4L2_QUANTIZATION_LIM_RANGE,	"V4L2_QUANTIZATION_LIM_RANGE" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_priority_val_def[] = {
+	{ V4L2_PRIORITY_UNSET,	"V4L2_PRIORITY_UNSET" },
+	{ V4L2_PRIORITY_BACKGROUND,	"V4L2_PRIORITY_BACKGROUND" },
+	{ V4L2_PRIORITY_INTERACTIVE,	"V4L2_PRIORITY_INTERACTIVE" },
+	{ V4L2_PRIORITY_RECORD,	"V4L2_PRIORITY_RECORD" },
+	{ V4L2_PRIORITY_DEFAULT,	"V4L2_PRIORITY_DEFAULT" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_cap_flag_def[] = {
+	{ V4L2_CAP_VIDEO_CAPTURE,	"V4L2_CAP_VIDEO_CAPTURE" },
+	{ V4L2_CAP_VIDEO_OUTPUT,	"V4L2_CAP_VIDEO_OUTPUT" },
+	{ V4L2_CAP_VIDEO_OVERLAY,	"V4L2_CAP_VIDEO_OVERLAY" },
+	{ V4L2_CAP_VBI_CAPTURE,	"V4L2_CAP_VBI_CAPTURE" },
+	{ V4L2_CAP_VBI_OUTPUT,	"V4L2_CAP_VBI_OUTPUT" },
+	{ V4L2_CAP_SLICED_VBI_CAPTURE,	"V4L2_CAP_SLICED_VBI_CAPTURE" },
+	{ V4L2_CAP_SLICED_VBI_OUTPUT,	"V4L2_CAP_SLICED_VBI_OUTPUT" },
+	{ V4L2_CAP_RDS_CAPTURE,	"V4L2_CAP_RDS_CAPTURE" },
+	{ V4L2_CAP_VIDEO_OUTPUT_OVERLAY,	"V4L2_CAP_VIDEO_OUTPUT_OVERLAY" },
+	{ V4L2_CAP_HW_FREQ_SEEK,	"V4L2_CAP_HW_FREQ_SEEK" },
+	{ V4L2_CAP_RDS_OUTPUT,	"V4L2_CAP_RDS_OUTPUT" },
+	{ V4L2_CAP_VIDEO_CAPTURE_MPLANE,	"V4L2_CAP_VIDEO_CAPTURE_MPLANE" },
+	{ V4L2_CAP_VIDEO_OUTPUT_MPLANE,	"V4L2_CAP_VIDEO_OUTPUT_MPLANE" },
+	{ V4L2_CAP_VIDEO_M2M_MPLANE,	"V4L2_CAP_VIDEO_M2M_MPLANE" },
+	{ V4L2_CAP_VIDEO_M2M,	"V4L2_CAP_VIDEO_M2M" },
+	{ V4L2_CAP_TUNER,	"V4L2_CAP_TUNER" },
+	{ V4L2_CAP_AUDIO,	"V4L2_CAP_AUDIO" },
+	{ V4L2_CAP_RADIO,	"V4L2_CAP_RADIO" },
+	{ V4L2_CAP_MODULATOR,	"V4L2_CAP_MODULATOR" },
+	{ V4L2_CAP_SDR_CAPTURE,	"V4L2_CAP_SDR_CAPTURE" },
+	{ V4L2_CAP_EXT_PIX_FORMAT,	"V4L2_CAP_EXT_PIX_FORMAT" },
+	{ V4L2_CAP_SDR_OUTPUT,	"V4L2_CAP_SDR_OUTPUT" },
+	{ V4L2_CAP_META_CAPTURE,	"V4L2_CAP_META_CAPTURE" },
+	{ V4L2_CAP_READWRITE,	"V4L2_CAP_READWRITE" },
+	{ V4L2_CAP_STREAMING,	"V4L2_CAP_STREAMING" },
+	{ V4L2_CAP_META_OUTPUT,	"V4L2_CAP_META_OUTPUT" },
+	{ V4L2_CAP_TOUCH,	"V4L2_CAP_TOUCH" },
+	{ V4L2_CAP_IO_MC,	"V4L2_CAP_IO_MC" },
+	{ V4L2_CAP_DEVICE_CAPS,	"V4L2_CAP_DEVICE_CAPS" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_pix_fmt_val_def[] = {
+	{ V4L2_PIX_FMT_RGB332,	"V4L2_PIX_FMT_RGB332" },
+	{ V4L2_PIX_FMT_RGB444,	"V4L2_PIX_FMT_RGB444" },
+	{ V4L2_PIX_FMT_ARGB444,	"V4L2_PIX_FMT_ARGB444" },
+	{ V4L2_PIX_FMT_XRGB444,	"V4L2_PIX_FMT_XRGB444" },
+	{ V4L2_PIX_FMT_RGBA444,	"V4L2_PIX_FMT_RGBA444" },
+	{ V4L2_PIX_FMT_RGBX444,	"V4L2_PIX_FMT_RGBX444" },
+	{ V4L2_PIX_FMT_ABGR444,	"V4L2_PIX_FMT_ABGR444" },
+	{ V4L2_PIX_FMT_XBGR444,	"V4L2_PIX_FMT_XBGR444" },
+	{ V4L2_PIX_FMT_BGRA444,	"V4L2_PIX_FMT_BGRA444" },
+	{ V4L2_PIX_FMT_BGRX444,	"V4L2_PIX_FMT_BGRX444" },
+	{ V4L2_PIX_FMT_RGB555,	"V4L2_PIX_FMT_RGB555" },
+	{ V4L2_PIX_FMT_ARGB555,	"V4L2_PIX_FMT_ARGB555" },
+	{ V4L2_PIX_FMT_XRGB555,	"V4L2_PIX_FMT_XRGB555" },
+	{ V4L2_PIX_FMT_RGBA555,	"V4L2_PIX_FMT_RGBA555" },
+	{ V4L2_PIX_FMT_RGBX555,	"V4L2_PIX_FMT_RGBX555" },
+	{ V4L2_PIX_FMT_ABGR555,	"V4L2_PIX_FMT_ABGR555" },
+	{ V4L2_PIX_FMT_XBGR555,	"V4L2_PIX_FMT_XBGR555" },
+	{ V4L2_PIX_FMT_BGRA555,	"V4L2_PIX_FMT_BGRA555" },
+	{ V4L2_PIX_FMT_BGRX555,	"V4L2_PIX_FMT_BGRX555" },
+	{ V4L2_PIX_FMT_RGB565,	"V4L2_PIX_FMT_RGB565" },
+	{ V4L2_PIX_FMT_RGB555X,	"V4L2_PIX_FMT_RGB555X" },
+	{ V4L2_PIX_FMT_ARGB555X,	"V4L2_PIX_FMT_ARGB555X" },
+	{ V4L2_PIX_FMT_XRGB555X,	"V4L2_PIX_FMT_XRGB555X" },
+	{ V4L2_PIX_FMT_RGB565X,	"V4L2_PIX_FMT_RGB565X" },
+	{ V4L2_PIX_FMT_BGR666,	"V4L2_PIX_FMT_BGR666" },
+	{ V4L2_PIX_FMT_BGR24,	"V4L2_PIX_FMT_BGR24" },
+	{ V4L2_PIX_FMT_RGB24,	"V4L2_PIX_FMT_RGB24" },
+	{ V4L2_PIX_FMT_BGR32,	"V4L2_PIX_FMT_BGR32" },
+	{ V4L2_PIX_FMT_ABGR32,	"V4L2_PIX_FMT_ABGR32" },
+	{ V4L2_PIX_FMT_XBGR32,	"V4L2_PIX_FMT_XBGR32" },
+	{ V4L2_PIX_FMT_BGRA32,	"V4L2_PIX_FMT_BGRA32" },
+	{ V4L2_PIX_FMT_BGRX32,	"V4L2_PIX_FMT_BGRX32" },
+	{ V4L2_PIX_FMT_RGB32,	"V4L2_PIX_FMT_RGB32" },
+	{ V4L2_PIX_FMT_RGBA32,	"V4L2_PIX_FMT_RGBA32" },
+	{ V4L2_PIX_FMT_RGBX32,	"V4L2_PIX_FMT_RGBX32" },
+	{ V4L2_PIX_FMT_ARGB32,	"V4L2_PIX_FMT_ARGB32" },
+	{ V4L2_PIX_FMT_XRGB32,	"V4L2_PIX_FMT_XRGB32" },
+	{ V4L2_PIX_FMT_RGBX1010102,	"V4L2_PIX_FMT_RGBX1010102" },
+	{ V4L2_PIX_FMT_RGBA1010102,	"V4L2_PIX_FMT_RGBA1010102" },
+	{ V4L2_PIX_FMT_ARGB2101010,	"V4L2_PIX_FMT_ARGB2101010" },
+	{ V4L2_PIX_FMT_BGR48_12,	"V4L2_PIX_FMT_BGR48_12" },
+	{ V4L2_PIX_FMT_ABGR64_12,	"V4L2_PIX_FMT_ABGR64_12" },
+	{ V4L2_PIX_FMT_GREY,	"V4L2_PIX_FMT_GREY" },
+	{ V4L2_PIX_FMT_Y4,	"V4L2_PIX_FMT_Y4" },
+	{ V4L2_PIX_FMT_Y6,	"V4L2_PIX_FMT_Y6" },
+	{ V4L2_PIX_FMT_Y10,	"V4L2_PIX_FMT_Y10" },
+	{ V4L2_PIX_FMT_Y12,	"V4L2_PIX_FMT_Y12" },
+	{ V4L2_PIX_FMT_Y012,	"V4L2_PIX_FMT_Y012" },
+	{ V4L2_PIX_FMT_Y14,	"V4L2_PIX_FMT_Y14" },
+	{ V4L2_PIX_FMT_Y16,	"V4L2_PIX_FMT_Y16" },
+	{ V4L2_PIX_FMT_Y16_BE,	"V4L2_PIX_FMT_Y16_BE" },
+	{ V4L2_PIX_FMT_Y10BPACK,	"V4L2_PIX_FMT_Y10BPACK" },
+	{ V4L2_PIX_FMT_Y10P,	"V4L2_PIX_FMT_Y10P" },
+	{ V4L2_PIX_FMT_IPU3_Y10,	"V4L2_PIX_FMT_IPU3_Y10" },
+	{ V4L2_PIX_FMT_PAL8,	"V4L2_PIX_FMT_PAL8" },
+	{ V4L2_PIX_FMT_UV8,	"V4L2_PIX_FMT_UV8" },
+	{ V4L2_PIX_FMT_YUYV,	"V4L2_PIX_FMT_YUYV" },
+	{ V4L2_PIX_FMT_YYUV,	"V4L2_PIX_FMT_YYUV" },
+	{ V4L2_PIX_FMT_YVYU,	"V4L2_PIX_FMT_YVYU" },
+	{ V4L2_PIX_FMT_UYVY,	"V4L2_PIX_FMT_UYVY" },
+	{ V4L2_PIX_FMT_VYUY,	"V4L2_PIX_FMT_VYUY" },
+	{ V4L2_PIX_FMT_Y41P,	"V4L2_PIX_FMT_Y41P" },
+	{ V4L2_PIX_FMT_YUV444,	"V4L2_PIX_FMT_YUV444" },
+	{ V4L2_PIX_FMT_YUV555,	"V4L2_PIX_FMT_YUV555" },
+	{ V4L2_PIX_FMT_YUV565,	"V4L2_PIX_FMT_YUV565" },
+	{ V4L2_PIX_FMT_YUV24,	"V4L2_PIX_FMT_YUV24" },
+	{ V4L2_PIX_FMT_YUV32,	"V4L2_PIX_FMT_YUV32" },
+	{ V4L2_PIX_FMT_AYUV32,	"V4L2_PIX_FMT_AYUV32" },
+	{ V4L2_PIX_FMT_XYUV32,	"V4L2_PIX_FMT_XYUV32" },
+	{ V4L2_PIX_FMT_VUYA32,	"V4L2_PIX_FMT_VUYA32" },
+	{ V4L2_PIX_FMT_VUYX32,	"V4L2_PIX_FMT_VUYX32" },
+	{ V4L2_PIX_FMT_YUVA32,	"V4L2_PIX_FMT_YUVA32" },
+	{ V4L2_PIX_FMT_YUVX32,	"V4L2_PIX_FMT_YUVX32" },
+	{ V4L2_PIX_FMT_M420,	"V4L2_PIX_FMT_M420" },
+	{ V4L2_PIX_FMT_YUV48_12,	"V4L2_PIX_FMT_YUV48_12" },
+	{ V4L2_PIX_FMT_Y210,	"V4L2_PIX_FMT_Y210" },
+	{ V4L2_PIX_FMT_Y212,	"V4L2_PIX_FMT_Y212" },
+	{ V4L2_PIX_FMT_Y216,	"V4L2_PIX_FMT_Y216" },
+	{ V4L2_PIX_FMT_NV12,	"V4L2_PIX_FMT_NV12" },
+	{ V4L2_PIX_FMT_NV21,	"V4L2_PIX_FMT_NV21" },
+	{ V4L2_PIX_FMT_NV16,	"V4L2_PIX_FMT_NV16" },
+	{ V4L2_PIX_FMT_NV61,	"V4L2_PIX_FMT_NV61" },
+	{ V4L2_PIX_FMT_NV24,	"V4L2_PIX_FMT_NV24" },
+	{ V4L2_PIX_FMT_NV42,	"V4L2_PIX_FMT_NV42" },
+	{ V4L2_PIX_FMT_P010,	"V4L2_PIX_FMT_P010" },
+	{ V4L2_PIX_FMT_P012,	"V4L2_PIX_FMT_P012" },
+	{ V4L2_PIX_FMT_NV12M,	"V4L2_PIX_FMT_NV12M" },
+	{ V4L2_PIX_FMT_NV21M,	"V4L2_PIX_FMT_NV21M" },
+	{ V4L2_PIX_FMT_NV16M,	"V4L2_PIX_FMT_NV16M" },
+	{ V4L2_PIX_FMT_NV61M,	"V4L2_PIX_FMT_NV61M" },
+	{ V4L2_PIX_FMT_P012M,	"V4L2_PIX_FMT_P012M" },
+	{ V4L2_PIX_FMT_YUV410,	"V4L2_PIX_FMT_YUV410" },
+	{ V4L2_PIX_FMT_YVU410,	"V4L2_PIX_FMT_YVU410" },
+	{ V4L2_PIX_FMT_YUV411P,	"V4L2_PIX_FMT_YUV411P" },
+	{ V4L2_PIX_FMT_YUV420,	"V4L2_PIX_FMT_YUV420" },
+	{ V4L2_PIX_FMT_YVU420,	"V4L2_PIX_FMT_YVU420" },
+	{ V4L2_PIX_FMT_YUV422P,	"V4L2_PIX_FMT_YUV422P" },
+	{ V4L2_PIX_FMT_YUV420M,	"V4L2_PIX_FMT_YUV420M" },
+	{ V4L2_PIX_FMT_YVU420M,	"V4L2_PIX_FMT_YVU420M" },
+	{ V4L2_PIX_FMT_YUV422M,	"V4L2_PIX_FMT_YUV422M" },
+	{ V4L2_PIX_FMT_YVU422M,	"V4L2_PIX_FMT_YVU422M" },
+	{ V4L2_PIX_FMT_YUV444M,	"V4L2_PIX_FMT_YUV444M" },
+	{ V4L2_PIX_FMT_YVU444M,	"V4L2_PIX_FMT_YVU444M" },
+	{ V4L2_PIX_FMT_NV12_4L4,	"V4L2_PIX_FMT_NV12_4L4" },
+	{ V4L2_PIX_FMT_NV12_16L16,	"V4L2_PIX_FMT_NV12_16L16" },
+	{ V4L2_PIX_FMT_NV12_32L32,	"V4L2_PIX_FMT_NV12_32L32" },
+	{ V4L2_PIX_FMT_NV15_4L4,	"V4L2_PIX_FMT_NV15_4L4" },
+	{ V4L2_PIX_FMT_P010_4L4,	"V4L2_PIX_FMT_P010_4L4" },
+	{ V4L2_PIX_FMT_NV12_8L128,	"V4L2_PIX_FMT_NV12_8L128" },
+	{ V4L2_PIX_FMT_NV12_10BE_8L128,	"V4L2_PIX_FMT_NV12_10BE_8L128" },
+	{ V4L2_PIX_FMT_NV12MT,	"V4L2_PIX_FMT_NV12MT" },
+	{ V4L2_PIX_FMT_NV12MT_16X16,	"V4L2_PIX_FMT_NV12MT_16X16" },
+	{ V4L2_PIX_FMT_NV12M_8L128,	"V4L2_PIX_FMT_NV12M_8L128" },
+	{ V4L2_PIX_FMT_NV12M_10BE_8L128,	"V4L2_PIX_FMT_NV12M_10BE_8L128" },
+	{ V4L2_PIX_FMT_SBGGR8,	"V4L2_PIX_FMT_SBGGR8" },
+	{ V4L2_PIX_FMT_SGBRG8,	"V4L2_PIX_FMT_SGBRG8" },
+	{ V4L2_PIX_FMT_SGRBG8,	"V4L2_PIX_FMT_SGRBG8" },
+	{ V4L2_PIX_FMT_SRGGB8,	"V4L2_PIX_FMT_SRGGB8" },
+	{ V4L2_PIX_FMT_SBGGR10,	"V4L2_PIX_FMT_SBGGR10" },
+	{ V4L2_PIX_FMT_SGBRG10,	"V4L2_PIX_FMT_SGBRG10" },
+	{ V4L2_PIX_FMT_SGRBG10,	"V4L2_PIX_FMT_SGRBG10" },
+	{ V4L2_PIX_FMT_SRGGB10,	"V4L2_PIX_FMT_SRGGB10" },
+	{ V4L2_PIX_FMT_SBGGR10P,	"V4L2_PIX_FMT_SBGGR10P" },
+	{ V4L2_PIX_FMT_SGBRG10P,	"V4L2_PIX_FMT_SGBRG10P" },
+	{ V4L2_PIX_FMT_SGRBG10P,	"V4L2_PIX_FMT_SGRBG10P" },
+	{ V4L2_PIX_FMT_SRGGB10P,	"V4L2_PIX_FMT_SRGGB10P" },
+	{ V4L2_PIX_FMT_SBGGR10ALAW8,	"V4L2_PIX_FMT_SBGGR10ALAW8" },
+	{ V4L2_PIX_FMT_SGBRG10ALAW8,	"V4L2_PIX_FMT_SGBRG10ALAW8" },
+	{ V4L2_PIX_FMT_SGRBG10ALAW8,	"V4L2_PIX_FMT_SGRBG10ALAW8" },
+	{ V4L2_PIX_FMT_SRGGB10ALAW8,	"V4L2_PIX_FMT_SRGGB10ALAW8" },
+	{ V4L2_PIX_FMT_SBGGR10DPCM8,	"V4L2_PIX_FMT_SBGGR10DPCM8" },
+	{ V4L2_PIX_FMT_SGBRG10DPCM8,	"V4L2_PIX_FMT_SGBRG10DPCM8" },
+	{ V4L2_PIX_FMT_SGRBG10DPCM8,	"V4L2_PIX_FMT_SGRBG10DPCM8" },
+	{ V4L2_PIX_FMT_SRGGB10DPCM8,	"V4L2_PIX_FMT_SRGGB10DPCM8" },
+	{ V4L2_PIX_FMT_SBGGR12,	"V4L2_PIX_FMT_SBGGR12" },
+	{ V4L2_PIX_FMT_SGBRG12,	"V4L2_PIX_FMT_SGBRG12" },
+	{ V4L2_PIX_FMT_SGRBG12,	"V4L2_PIX_FMT_SGRBG12" },
+	{ V4L2_PIX_FMT_SRGGB12,	"V4L2_PIX_FMT_SRGGB12" },
+	{ V4L2_PIX_FMT_SBGGR12P,	"V4L2_PIX_FMT_SBGGR12P" },
+	{ V4L2_PIX_FMT_SGBRG12P,	"V4L2_PIX_FMT_SGBRG12P" },
+	{ V4L2_PIX_FMT_SGRBG12P,	"V4L2_PIX_FMT_SGRBG12P" },
+	{ V4L2_PIX_FMT_SRGGB12P,	"V4L2_PIX_FMT_SRGGB12P" },
+	{ V4L2_PIX_FMT_SBGGR14,	"V4L2_PIX_FMT_SBGGR14" },
+	{ V4L2_PIX_FMT_SGBRG14,	"V4L2_PIX_FMT_SGBRG14" },
+	{ V4L2_PIX_FMT_SGRBG14,	"V4L2_PIX_FMT_SGRBG14" },
+	{ V4L2_PIX_FMT_SRGGB14,	"V4L2_PIX_FMT_SRGGB14" },
+	{ V4L2_PIX_FMT_SBGGR14P,	"V4L2_PIX_FMT_SBGGR14P" },
+	{ V4L2_PIX_FMT_SGBRG14P,	"V4L2_PIX_FMT_SGBRG14P" },
+	{ V4L2_PIX_FMT_SGRBG14P,	"V4L2_PIX_FMT_SGRBG14P" },
+	{ V4L2_PIX_FMT_SRGGB14P,	"V4L2_PIX_FMT_SRGGB14P" },
+	{ V4L2_PIX_FMT_SBGGR16,	"V4L2_PIX_FMT_SBGGR16" },
+	{ V4L2_PIX_FMT_SGBRG16,	"V4L2_PIX_FMT_SGBRG16" },
+	{ V4L2_PIX_FMT_SGRBG16,	"V4L2_PIX_FMT_SGRBG16" },
+	{ V4L2_PIX_FMT_SRGGB16,	"V4L2_PIX_FMT_SRGGB16" },
+	{ V4L2_PIX_FMT_HSV24,	"V4L2_PIX_FMT_HSV24" },
+	{ V4L2_PIX_FMT_HSV32,	"V4L2_PIX_FMT_HSV32" },
+	{ V4L2_PIX_FMT_MJPEG,	"V4L2_PIX_FMT_MJPEG" },
+	{ V4L2_PIX_FMT_JPEG,	"V4L2_PIX_FMT_JPEG" },
+	{ V4L2_PIX_FMT_DV,	"V4L2_PIX_FMT_DV" },
+	{ V4L2_PIX_FMT_MPEG,	"V4L2_PIX_FMT_MPEG" },
+	{ V4L2_PIX_FMT_H264,	"V4L2_PIX_FMT_H264" },
+	{ V4L2_PIX_FMT_H264_NO_SC,	"V4L2_PIX_FMT_H264_NO_SC" },
+	{ V4L2_PIX_FMT_H264_MVC,	"V4L2_PIX_FMT_H264_MVC" },
+	{ V4L2_PIX_FMT_H263,	"V4L2_PIX_FMT_H263" },
+	{ V4L2_PIX_FMT_MPEG1,	"V4L2_PIX_FMT_MPEG1" },
+	{ V4L2_PIX_FMT_MPEG2,	"V4L2_PIX_FMT_MPEG2" },
+	{ V4L2_PIX_FMT_MPEG2_SLICE,	"V4L2_PIX_FMT_MPEG2_SLICE" },
+	{ V4L2_PIX_FMT_MPEG4,	"V4L2_PIX_FMT_MPEG4" },
+	{ V4L2_PIX_FMT_XVID,	"V4L2_PIX_FMT_XVID" },
+	{ V4L2_PIX_FMT_VC1_ANNEX_G,	"V4L2_PIX_FMT_VC1_ANNEX_G" },
+	{ V4L2_PIX_FMT_VC1_ANNEX_L,	"V4L2_PIX_FMT_VC1_ANNEX_L" },
+	{ V4L2_PIX_FMT_VP8,	"V4L2_PIX_FMT_VP8" },
+	{ V4L2_PIX_FMT_VP8_FRAME,	"V4L2_PIX_FMT_VP8_FRAME" },
+	{ V4L2_PIX_FMT_VP9,	"V4L2_PIX_FMT_VP9" },
+	{ V4L2_PIX_FMT_VP9_FRAME,	"V4L2_PIX_FMT_VP9_FRAME" },
+	{ V4L2_PIX_FMT_HEVC,	"V4L2_PIX_FMT_HEVC" },
+	{ V4L2_PIX_FMT_FWHT,	"V4L2_PIX_FMT_FWHT" },
+	{ V4L2_PIX_FMT_FWHT_STATELESS,	"V4L2_PIX_FMT_FWHT_STATELESS" },
+	{ V4L2_PIX_FMT_H264_SLICE,	"V4L2_PIX_FMT_H264_SLICE" },
+	{ V4L2_PIX_FMT_HEVC_SLICE,	"V4L2_PIX_FMT_HEVC_SLICE" },
+	{ V4L2_PIX_FMT_AV1_FRAME,	"V4L2_PIX_FMT_AV1_FRAME" },
+	{ V4L2_PIX_FMT_SPK,	"V4L2_PIX_FMT_SPK" },
+	{ V4L2_PIX_FMT_RV30,	"V4L2_PIX_FMT_RV30" },
+	{ V4L2_PIX_FMT_RV40,	"V4L2_PIX_FMT_RV40" },
+	{ V4L2_PIX_FMT_CPIA1,	"V4L2_PIX_FMT_CPIA1" },
+	{ V4L2_PIX_FMT_WNVA,	"V4L2_PIX_FMT_WNVA" },
+	{ V4L2_PIX_FMT_SN9C10X,	"V4L2_PIX_FMT_SN9C10X" },
+	{ V4L2_PIX_FMT_SN9C20X_I420,	"V4L2_PIX_FMT_SN9C20X_I420" },
+	{ V4L2_PIX_FMT_PWC1,	"V4L2_PIX_FMT_PWC1" },
+	{ V4L2_PIX_FMT_PWC2,	"V4L2_PIX_FMT_PWC2" },
+	{ V4L2_PIX_FMT_ET61X251,	"V4L2_PIX_FMT_ET61X251" },
+	{ V4L2_PIX_FMT_SPCA501,	"V4L2_PIX_FMT_SPCA501" },
+	{ V4L2_PIX_FMT_SPCA505,	"V4L2_PIX_FMT_SPCA505" },
+	{ V4L2_PIX_FMT_SPCA508,	"V4L2_PIX_FMT_SPCA508" },
+	{ V4L2_PIX_FMT_SPCA561,	"V4L2_PIX_FMT_SPCA561" },
+	{ V4L2_PIX_FMT_PAC207,	"V4L2_PIX_FMT_PAC207" },
+	{ V4L2_PIX_FMT_MR97310A,	"V4L2_PIX_FMT_MR97310A" },
+	{ V4L2_PIX_FMT_JL2005BCD,	"V4L2_PIX_FMT_JL2005BCD" },
+	{ V4L2_PIX_FMT_SN9C2028,	"V4L2_PIX_FMT_SN9C2028" },
+	{ V4L2_PIX_FMT_SQ905C,	"V4L2_PIX_FMT_SQ905C" },
+	{ V4L2_PIX_FMT_PJPG,	"V4L2_PIX_FMT_PJPG" },
+	{ V4L2_PIX_FMT_OV511,	"V4L2_PIX_FMT_OV511" },
+	{ V4L2_PIX_FMT_OV518,	"V4L2_PIX_FMT_OV518" },
+	{ V4L2_PIX_FMT_STV0680,	"V4L2_PIX_FMT_STV0680" },
+	{ V4L2_PIX_FMT_TM6000,	"V4L2_PIX_FMT_TM6000" },
+	{ V4L2_PIX_FMT_CIT_YYVYUY,	"V4L2_PIX_FMT_CIT_YYVYUY" },
+	{ V4L2_PIX_FMT_KONICA420,	"V4L2_PIX_FMT_KONICA420" },
+	{ V4L2_PIX_FMT_JPGL,	"V4L2_PIX_FMT_JPGL" },
+	{ V4L2_PIX_FMT_SE401,	"V4L2_PIX_FMT_SE401" },
+	{ V4L2_PIX_FMT_S5C_UYVY_JPG,	"V4L2_PIX_FMT_S5C_UYVY_JPG" },
+	{ V4L2_PIX_FMT_Y8I,	"V4L2_PIX_FMT_Y8I" },
+	{ V4L2_PIX_FMT_Y12I,	"V4L2_PIX_FMT_Y12I" },
+	{ V4L2_PIX_FMT_Z16,	"V4L2_PIX_FMT_Z16" },
+	{ V4L2_PIX_FMT_MT21C,	"V4L2_PIX_FMT_MT21C" },
+	{ V4L2_PIX_FMT_MM21,	"V4L2_PIX_FMT_MM21" },
+	{ V4L2_PIX_FMT_MT2110T,	"V4L2_PIX_FMT_MT2110T" },
+	{ V4L2_PIX_FMT_MT2110R,	"V4L2_PIX_FMT_MT2110R" },
+	{ V4L2_PIX_FMT_INZI,	"V4L2_PIX_FMT_INZI" },
+	{ V4L2_PIX_FMT_CNF4,	"V4L2_PIX_FMT_CNF4" },
+	{ V4L2_PIX_FMT_HI240,	"V4L2_PIX_FMT_HI240" },
+	{ V4L2_PIX_FMT_QC08C,	"V4L2_PIX_FMT_QC08C" },
+	{ V4L2_PIX_FMT_QC10C,	"V4L2_PIX_FMT_QC10C" },
+	{ V4L2_PIX_FMT_AJPG,	"V4L2_PIX_FMT_AJPG" },
+	{ V4L2_PIX_FMT_HEXTILE,	"V4L2_PIX_FMT_HEXTILE" },
+	{ V4L2_PIX_FMT_IPU3_SBGGR10,	"V4L2_PIX_FMT_IPU3_SBGGR10" },
+	{ V4L2_PIX_FMT_IPU3_SGBRG10,	"V4L2_PIX_FMT_IPU3_SGBRG10" },
+	{ V4L2_PIX_FMT_IPU3_SGRBG10,	"V4L2_PIX_FMT_IPU3_SGRBG10" },
+	{ V4L2_PIX_FMT_IPU3_SRGGB10,	"V4L2_PIX_FMT_IPU3_SRGGB10" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_pix_fmt_flag_def[] = {
+	{ V4L2_PIX_FMT_FLAG_PREMUL_ALPHA, "V4L2_PIX_FMT_FLAG_PREMUL_ALPHA" },
+	{ V4L2_PIX_FMT_FLAG_SET_CSC, "V4L2_PIX_FMT_FLAG_SET_CSC" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_fmt_flag_def[] = {
+	{ V4L2_FMT_FLAG_COMPRESSED, "V4L2_FMT_FLAG_COMPRESSED" },
+	{ V4L2_FMT_FLAG_EMULATED, "V4L2_FMT_FLAG_EMULATED" },
+	{ V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM, "V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM" },
+	{ V4L2_FMT_FLAG_DYN_RESOLUTION, "V4L2_FMT_FLAG_DYN_RESOLUTION" },
+	{ V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL, "V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL" },
+	{ V4L2_FMT_FLAG_CSC_COLORSPACE, "V4L2_FMT_FLAG_CSC_COLORSPACE" },
+	{ V4L2_FMT_FLAG_CSC_XFER_FUNC, "V4L2_FMT_FLAG_CSC_XFER_FUNC" },
+	{ V4L2_FMT_FLAG_CSC_YCBCR_ENC, "V4L2_FMT_FLAG_CSC_YCBCR_ENC" },
+	{ V4L2_FMT_FLAG_CSC_HSV_ENC, "V4L2_FMT_FLAG_CSC_HSV_ENC" },
+	{ V4L2_FMT_FLAG_CSC_QUANTIZATION, "V4L2_FMT_FLAG_CSC_QUANTIZATION" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_frmsizetypes_val_def[] = {
+	{ V4L2_FRMSIZE_TYPE_DISCRETE,	"V4L2_FRMSIZE_TYPE_DISCRETE" },
+	{ V4L2_FRMSIZE_TYPE_CONTINUOUS,	"V4L2_FRMSIZE_TYPE_CONTINUOUS" },
+	{ V4L2_FRMSIZE_TYPE_STEPWISE,	"V4L2_FRMSIZE_TYPE_STEPWISE" },
+	{ -1, "" }
+};
+
+constexpr val_def v4l2_frmivaltypes_val_def[] = {
+	{ V4L2_FRMIVAL_TYPE_DISCRETE,	"V4L2_FRMIVAL_TYPE_DISCRETE" },
+	{ V4L2_FRMIVAL_TYPE_CONTINUOUS,	"V4L2_FRMIVAL_TYPE_CONTINUOUS" },
+	{ V4L2_FRMIVAL_TYPE_STEPWISE,	"V4L2_FRMIVAL_TYPE_STEPWISE" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_tc_flag_def[] = {
+	{ V4L2_TC_FLAG_DROPFRAME, "V4L2_TC_FLAG_DROPFRAME" },
+	{ V4L2_TC_FLAG_COLORFRAME, "V4L2_TC_FLAG_COLORFRAME" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_memory_flag_def[] = {
+	{ V4L2_MEMORY_FLAG_NON_COHERENT, "V4L2_MEMORY_FLAG_NON_COHERENT" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_buf_cap_flag_def[] = {
+	{ V4L2_BUF_CAP_SUPPORTS_MMAP,	"V4L2_BUF_CAP_SUPPORTS_MMAP" },
+	{ V4L2_BUF_CAP_SUPPORTS_USERPTR,	"V4L2_BUF_CAP_SUPPORTS_USERPTR" },
+	{ V4L2_BUF_CAP_SUPPORTS_DMABUF,	"V4L2_BUF_CAP_SUPPORTS_DMABUF" },
+	{ V4L2_BUF_CAP_SUPPORTS_REQUESTS,	"V4L2_BUF_CAP_SUPPORTS_REQUESTS" },
+	{ V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS,	"V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS" },
+	{ V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF,	"V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF" },
+	{ V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS,	"V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_buf_flag_def[] = {
+	{ V4L2_BUF_FLAG_MAPPED, "V4L2_BUF_FLAG_MAPPED" },
+	{ V4L2_BUF_FLAG_QUEUED, "V4L2_BUF_FLAG_QUEUED" },
+	{ V4L2_BUF_FLAG_DONE, "V4L2_BUF_FLAG_DONE" },
+	{ V4L2_BUF_FLAG_KEYFRAME, "V4L2_BUF_FLAG_KEYFRAME" },
+	{ V4L2_BUF_FLAG_PFRAME, "V4L2_BUF_FLAG_PFRAME" },
+	{ V4L2_BUF_FLAG_BFRAME, "V4L2_BUF_FLAG_BFRAME" },
+	{ V4L2_BUF_FLAG_ERROR, "V4L2_BUF_FLAG_ERROR" },
+	{ V4L2_BUF_FLAG_IN_REQUEST, "V4L2_BUF_FLAG_IN_REQUEST" },
+	{ V4L2_BUF_FLAG_TIMECODE, "V4L2_BUF_FLAG_TIMECODE" },
+	{ V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF, "V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF" },
+	{ V4L2_BUF_FLAG_PREPARED, "V4L2_BUF_FLAG_PREPARED" },
+	{ V4L2_BUF_FLAG_NO_CACHE_INVALIDATE, "V4L2_BUF_FLAG_NO_CACHE_INVALIDATE" },
+	{ V4L2_BUF_FLAG_NO_CACHE_CLEAN, "V4L2_BUF_FLAG_NO_CACHE_CLEAN" },
+	{ V4L2_BUF_FLAG_LAST, "V4L2_BUF_FLAG_LAST" },
+	{ V4L2_BUF_FLAG_REQUEST_FD, "V4L2_BUF_FLAG_REQUEST_FD" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_fbuf_flag_def[] = {
+	{ V4L2_FBUF_FLAG_PRIMARY, "V4L2_FBUF_FLAG_PRIMARY" },
+	{ V4L2_FBUF_FLAG_OVERLAY, "V4L2_FBUF_FLAG_OVERLAY" },
+	{ V4L2_FBUF_FLAG_CHROMAKEY, "V4L2_FBUF_FLAG_CHROMAKEY" },
+	{ V4L2_FBUF_FLAG_LOCAL_ALPHA, "V4L2_FBUF_FLAG_LOCAL_ALPHA" },
+	{ V4L2_FBUF_FLAG_GLOBAL_ALPHA, "V4L2_FBUF_FLAG_GLOBAL_ALPHA" },
+	{ V4L2_FBUF_FLAG_LOCAL_INV_ALPHA, "V4L2_FBUF_FLAG_LOCAL_INV_ALPHA" },
+	{ V4L2_FBUF_FLAG_SRC_CHROMAKEY, "V4L2_FBUF_FLAG_SRC_CHROMAKEY" },
+	{ 0, "" }
+};
+
+constexpr val_def streamparm_val_def[] = {
+	{ V4L2_MODE_HIGHQUALITY,	"V4L2_MODE_HIGHQUALITY" },
+	{ V4L2_CAP_TIMEPERFRAME,	"V4L2_CAP_TIMEPERFRAME" },
+	{ -1, "" }
+};
+
+constexpr flag_def std_flag_def[] = {
+	{ V4L2_STD_PAL_B,	"V4L2_STD_PAL_B" },
+	{ V4L2_STD_PAL_B1,	"V4L2_STD_PAL_B1" },
+	{ V4L2_STD_PAL_G,	"V4L2_STD_PAL_G" },
+	{ V4L2_STD_PAL_H,	"V4L2_STD_PAL_H" },
+	{ V4L2_STD_PAL_I,	"V4L2_STD_PAL_I" },
+	{ V4L2_STD_PAL_D,	"V4L2_STD_PAL_D" },
+	{ V4L2_STD_PAL_D1,	"V4L2_STD_PAL_D1" },
+	{ V4L2_STD_PAL_K,	"V4L2_STD_PAL_K" },
+	{ V4L2_STD_PAL_M,	"V4L2_STD_PAL_M" },
+	{ V4L2_STD_PAL_N,	"V4L2_STD_PAL_N" },
+	{ V4L2_STD_PAL_Nc,	"V4L2_STD_PAL_Nc" },
+	{ V4L2_STD_PAL_60,	"V4L2_STD_PAL_60" },
+	{ V4L2_STD_NTSC_M,	"V4L2_STD_NTSC_M" },
+	{ V4L2_STD_NTSC_M_JP,	"V4L2_STD_NTSC_M_JP" },
+	{ V4L2_STD_NTSC_443,	"V4L2_STD_NTSC_443" },
+	{ V4L2_STD_NTSC_M_KR,	"V4L2_STD_NTSC_M_KR" },
+	{ V4L2_STD_SECAM_B,	"V4L2_STD_SECAM_B" },
+	{ V4L2_STD_SECAM_D,	"V4L2_STD_SECAM_D" },
+	{ V4L2_STD_SECAM_G,	"V4L2_STD_SECAM_G" },
+	{ V4L2_STD_SECAM_H,	"V4L2_STD_SECAM_H" },
+	{ V4L2_STD_SECAM_K,	"V4L2_STD_SECAM_K" },
+	{ V4L2_STD_SECAM_K1,	"V4L2_STD_SECAM_K1" },
+	{ V4L2_STD_SECAM_L,	"V4L2_STD_SECAM_L" },
+	{ V4L2_STD_SECAM_LC,	"V4L2_STD_SECAM_LC" },
+	{ V4L2_STD_ATSC_8_VSB,	"V4L2_STD_ATSC_8_VSB" },
+	{ V4L2_STD_ATSC_16_VSB,	"V4L2_STD_ATSC_16_VSB" },
+	{ V4L2_STD_NTSC,	"V4L2_STD_NTSC" },
+	{ V4L2_STD_SECAM_DK,	"V4L2_STD_SECAM_DK" },
+	{ V4L2_STD_SECAM,	"V4L2_STD_SECAM" },
+	{ V4L2_STD_PAL_BG,	"V4L2_STD_PAL_BG" },
+	{ V4L2_STD_PAL_DK,	"V4L2_STD_PAL_DK" },
+	{ V4L2_STD_PAL,	"V4L2_STD_PAL" },
+	{ V4L2_STD_B,	"V4L2_STD_B" },
+	{ V4L2_STD_G,	"V4L2_STD_G" },
+	{ V4L2_STD_H,	"V4L2_STD_H" },
+	{ V4L2_STD_L,	"V4L2_STD_L" },
+	{ V4L2_STD_GH,	"V4L2_STD_GH" },
+	{ V4L2_STD_DK,	"V4L2_STD_DK" },
+	{ V4L2_STD_BG,	"V4L2_STD_BG" },
+	{ V4L2_STD_MN,	"V4L2_STD_MN" },
+	{ V4L2_STD_MTS,	"V4L2_STD_MTS" },
+	{ V4L2_STD_525_60,	"V4L2_STD_525_60" },
+	{ V4L2_STD_625_50,	"V4L2_STD_625_50" },
+	{ V4L2_STD_ATSC,	"V4L2_STD_ATSC" },
+	{ V4L2_STD_UNKNOWN,	"V4L2_STD_UNKNOWN" },
+	{ V4L2_STD_ALL,	"V4L2_STD_ALL" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_dv_flag_def[] = {
+	{ V4L2_DV_FL_REDUCED_BLANKING, "V4L2_DV_FL_REDUCED_BLANKING" },
+	{ V4L2_DV_FL_CAN_REDUCE_FPS, "V4L2_DV_FL_CAN_REDUCE_FPS" },
+	{ V4L2_DV_FL_REDUCED_FPS, "V4L2_DV_FL_REDUCED_FPS" },
+	{ V4L2_DV_FL_HALF_LINE, "V4L2_DV_FL_HALF_LINE" },
+	{ V4L2_DV_FL_IS_CE_VIDEO, "V4L2_DV_FL_IS_CE_VIDEO" },
+	{ V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE, "V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE" },
+	{ V4L2_DV_FL_HAS_PICTURE_ASPECT, "V4L2_DV_FL_HAS_PICTURE_ASPECT" },
+	{ V4L2_DV_FL_HAS_CEA861_VIC, "V4L2_DV_FL_HAS_CEA861_VIC" },
+	{ V4L2_DV_FL_HAS_HDMI_VIC, "V4L2_DV_FL_HAS_HDMI_VIC" },
+	{ V4L2_DV_FL_CAN_DETECT_REDUCED_FPS, "V4L2_DV_FL_CAN_DETECT_REDUCED_FPS" },
+	{ 0, "" }
+};
+
+constexpr val_def input_type_val_def[] = {
+	{ V4L2_INPUT_TYPE_TUNER,	"V4L2_INPUT_TYPE_TUNER" },
+	{ V4L2_INPUT_TYPE_CAMERA,	"V4L2_INPUT_TYPE_CAMERA" },
+	{ V4L2_INPUT_TYPE_TOUCH,	"V4L2_INPUT_TYPE_TOUCH" },
+	{ -1, "" }
+};
+
+constexpr val_def input_field_val_def[] = {
+	{ V4L2_IN_ST_NO_POWER,	"V4L2_IN_ST_NO_POWER" },
+	{ V4L2_IN_ST_NO_SIGNAL,	"V4L2_IN_ST_NO_SIGNAL" },
+	{ V4L2_IN_ST_NO_COLOR,	"V4L2_IN_ST_NO_COLOR" },
+	{ V4L2_IN_ST_HFLIP,	"V4L2_IN_ST_HFLIP" },
+	{ V4L2_IN_ST_VFLIP,	"V4L2_IN_ST_VFLIP" },
+	{ V4L2_IN_ST_NO_H_LOCK,	"V4L2_IN_ST_NO_H_LOCK" },
+	{ V4L2_IN_ST_COLOR_KILL,	"V4L2_IN_ST_COLOR_KILL" },
+	{ V4L2_IN_ST_NO_V_LOCK,	"V4L2_IN_ST_NO_V_LOCK" },
+	{ V4L2_IN_ST_NO_STD_LOCK,	"V4L2_IN_ST_NO_STD_LOCK" },
+	{ V4L2_IN_ST_NO_SYNC,	"V4L2_IN_ST_NO_SYNC" },
+	{ V4L2_IN_ST_NO_EQU,	"V4L2_IN_ST_NO_EQU" },
+	{ V4L2_IN_ST_NO_CARRIER,	"V4L2_IN_ST_NO_CARRIER" },
+	{ V4L2_IN_ST_MACROVISION,	"V4L2_IN_ST_MACROVISION" },
+	{ V4L2_IN_ST_NO_ACCESS,	"V4L2_IN_ST_NO_ACCESS" },
+	{ V4L2_IN_ST_VTR,	"V4L2_IN_ST_VTR" },
+	{ -1, "" }
+};
+
+constexpr flag_def input_cap_flag_def[] = {
+	{ V4L2_IN_CAP_DV_TIMINGS,	"V4L2_IN_CAP_DV_TIMINGS" },
+	{ V4L2_IN_CAP_CUSTOM_TIMINGS,	"V4L2_IN_CAP_CUSTOM_TIMINGS" },
+	{ V4L2_IN_CAP_STD,	"V4L2_IN_CAP_STD" },
+	{ V4L2_IN_CAP_NATIVE_SIZE,	"V4L2_IN_CAP_NATIVE_SIZE" },
+	{ 0, "" }
+};
+
+constexpr val_def output_type_val_def[] = {
+	{ V4L2_OUTPUT_TYPE_MODULATOR,	"V4L2_OUTPUT_TYPE_MODULATOR" },
+	{ V4L2_OUTPUT_TYPE_ANALOG,	"V4L2_OUTPUT_TYPE_ANALOG" },
+	{ V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY,	"V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY" },
+	{ -1, "" }
+};
+
+constexpr flag_def output_cap_flag_def[] = {
+	{ V4L2_OUT_CAP_DV_TIMINGS,	"V4L2_OUT_CAP_DV_TIMINGS" },
+	{ V4L2_OUT_CAP_CUSTOM_TIMINGS,	"V4L2_OUT_CAP_CUSTOM_TIMINGS" },
+	{ V4L2_OUT_CAP_STD,	"V4L2_OUT_CAP_STD" },
+	{ V4L2_OUT_CAP_NATIVE_SIZE,	"V4L2_OUT_CAP_NATIVE_SIZE" },
+	{ 0, "" }
+};
+
+constexpr val_def v4l2_ctrl_type_val_def[] = {
+	{ V4L2_CTRL_TYPE_INTEGER,	"V4L2_CTRL_TYPE_INTEGER" },
+	{ V4L2_CTRL_TYPE_BOOLEAN,	"V4L2_CTRL_TYPE_BOOLEAN" },
+	{ V4L2_CTRL_TYPE_MENU,	"V4L2_CTRL_TYPE_MENU" },
+	{ V4L2_CTRL_TYPE_BUTTON,	"V4L2_CTRL_TYPE_BUTTON" },
+	{ V4L2_CTRL_TYPE_INTEGER64,	"V4L2_CTRL_TYPE_INTEGER64" },
+	{ V4L2_CTRL_TYPE_CTRL_CLASS,	"V4L2_CTRL_TYPE_CTRL_CLASS" },
+	{ V4L2_CTRL_TYPE_STRING,	"V4L2_CTRL_TYPE_STRING" },
+	{ V4L2_CTRL_TYPE_BITMASK,	"V4L2_CTRL_TYPE_BITMASK" },
+	{ V4L2_CTRL_TYPE_INTEGER_MENU,	"V4L2_CTRL_TYPE_INTEGER_MENU" },
+	{ V4L2_CTRL_COMPOUND_TYPES,	"V4L2_CTRL_COMPOUND_TYPES" },
+	{ V4L2_CTRL_TYPE_U8,	"V4L2_CTRL_TYPE_U8" },
+	{ V4L2_CTRL_TYPE_U16,	"V4L2_CTRL_TYPE_U16" },
+	{ V4L2_CTRL_TYPE_U32,	"V4L2_CTRL_TYPE_U32" },
+	{ V4L2_CTRL_TYPE_AREA,	"V4L2_CTRL_TYPE_AREA" },
+	{ V4L2_CTRL_TYPE_HDR10_CLL_INFO,	"V4L2_CTRL_TYPE_HDR10_CLL_INFO" },
+	{ V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY,	"V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY" },
+	{ V4L2_CTRL_TYPE_H264_SPS,	"V4L2_CTRL_TYPE_H264_SPS" },
+	{ V4L2_CTRL_TYPE_H264_PPS,	"V4L2_CTRL_TYPE_H264_PPS" },
+	{ V4L2_CTRL_TYPE_H264_SCALING_MATRIX,	"V4L2_CTRL_TYPE_H264_SCALING_MATRIX" },
+	{ V4L2_CTRL_TYPE_H264_SLICE_PARAMS,	"V4L2_CTRL_TYPE_H264_SLICE_PARAMS" },
+	{ V4L2_CTRL_TYPE_H264_DECODE_PARAMS,	"V4L2_CTRL_TYPE_H264_DECODE_PARAMS" },
+	{ V4L2_CTRL_TYPE_H264_PRED_WEIGHTS,	"V4L2_CTRL_TYPE_H264_PRED_WEIGHTS" },
+	{ V4L2_CTRL_TYPE_FWHT_PARAMS,	"V4L2_CTRL_TYPE_FWHT_PARAMS" },
+	{ V4L2_CTRL_TYPE_VP8_FRAME,	"V4L2_CTRL_TYPE_VP8_FRAME" },
+	{ V4L2_CTRL_TYPE_MPEG2_QUANTISATION,	"V4L2_CTRL_TYPE_MPEG2_QUANTISATION" },
+	{ V4L2_CTRL_TYPE_MPEG2_SEQUENCE,	"V4L2_CTRL_TYPE_MPEG2_SEQUENCE" },
+	{ V4L2_CTRL_TYPE_MPEG2_PICTURE,	"V4L2_CTRL_TYPE_MPEG2_PICTURE" },
+	{ V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR,	"V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR" },
+	{ V4L2_CTRL_TYPE_VP9_FRAME,	"V4L2_CTRL_TYPE_VP9_FRAME" },
+	{ V4L2_CTRL_TYPE_HEVC_SPS,	"V4L2_CTRL_TYPE_HEVC_SPS" },
+	{ V4L2_CTRL_TYPE_HEVC_PPS,	"V4L2_CTRL_TYPE_HEVC_PPS" },
+	{ V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS,	"V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS" },
+	{ V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX,	"V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX" },
+	{ V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS,	"V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS" },
+	{ V4L2_CTRL_TYPE_AV1_SEQUENCE,	"V4L2_CTRL_TYPE_AV1_SEQUENCE" },
+	{ V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY,	"V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY" },
+	{ V4L2_CTRL_TYPE_AV1_FRAME,	"V4L2_CTRL_TYPE_AV1_FRAME" },
+	{ V4L2_CTRL_TYPE_AV1_FILM_GRAIN,	"V4L2_CTRL_TYPE_AV1_FILM_GRAIN" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_ctrl_flag_def[] = {
+	{ V4L2_CTRL_FLAG_DISABLED, "V4L2_CTRL_FLAG_DISABLED" },
+	{ V4L2_CTRL_FLAG_GRABBED, "V4L2_CTRL_FLAG_GRABBED" },
+	{ V4L2_CTRL_FLAG_READ_ONLY, "V4L2_CTRL_FLAG_READ_ONLY" },
+	{ V4L2_CTRL_FLAG_UPDATE, "V4L2_CTRL_FLAG_UPDATE" },
+	{ V4L2_CTRL_FLAG_INACTIVE, "V4L2_CTRL_FLAG_INACTIVE" },
+	{ V4L2_CTRL_FLAG_SLIDER, "V4L2_CTRL_FLAG_SLIDER" },
+	{ V4L2_CTRL_FLAG_WRITE_ONLY, "V4L2_CTRL_FLAG_WRITE_ONLY" },
+	{ V4L2_CTRL_FLAG_VOLATILE, "V4L2_CTRL_FLAG_VOLATILE" },
+	{ V4L2_CTRL_FLAG_HAS_PAYLOAD, "V4L2_CTRL_FLAG_HAS_PAYLOAD" },
+	{ V4L2_CTRL_FLAG_EXECUTE_ON_WRITE, "V4L2_CTRL_FLAG_EXECUTE_ON_WRITE" },
+	{ V4L2_CTRL_FLAG_MODIFY_LAYOUT, "V4L2_CTRL_FLAG_MODIFY_LAYOUT" },
+	{ V4L2_CTRL_FLAG_DYNAMIC_ARRAY, "V4L2_CTRL_FLAG_DYNAMIC_ARRAY" },
+	{ V4L2_CTRL_FLAG_NEXT_CTRL, "V4L2_CTRL_FLAG_NEXT_CTRL" },
+	{ V4L2_CTRL_FLAG_NEXT_COMPOUND, "V4L2_CTRL_FLAG_NEXT_COMPOUND" },
+	{ 0, "" }
+};
+
+constexpr flag_def tuner_cap_flag_def[] = {
+	{ V4L2_TUNER_CAP_LOW,	"V4L2_TUNER_CAP_LOW" },
+	{ V4L2_TUNER_CAP_NORM,	"V4L2_TUNER_CAP_NORM" },
+	{ V4L2_TUNER_CAP_HWSEEK_BOUNDED,	"V4L2_TUNER_CAP_HWSEEK_BOUNDED" },
+	{ V4L2_TUNER_CAP_HWSEEK_WRAP,	"V4L2_TUNER_CAP_HWSEEK_WRAP" },
+	{ V4L2_TUNER_CAP_STEREO,	"V4L2_TUNER_CAP_STEREO" },
+	{ V4L2_TUNER_CAP_LANG2,	"V4L2_TUNER_CAP_LANG2" },
+	{ V4L2_TUNER_CAP_SAP,	"V4L2_TUNER_CAP_SAP" },
+	{ V4L2_TUNER_CAP_LANG1,	"V4L2_TUNER_CAP_LANG1" },
+	{ V4L2_TUNER_CAP_RDS,	"V4L2_TUNER_CAP_RDS" },
+	{ V4L2_TUNER_CAP_RDS_BLOCK_IO,	"V4L2_TUNER_CAP_RDS_BLOCK_IO" },
+	{ V4L2_TUNER_CAP_RDS_CONTROLS,	"V4L2_TUNER_CAP_RDS_CONTROLS" },
+	{ V4L2_TUNER_CAP_FREQ_BANDS,	"V4L2_TUNER_CAP_FREQ_BANDS" },
+	{ V4L2_TUNER_CAP_HWSEEK_PROG_LIM,	"V4L2_TUNER_CAP_HWSEEK_PROG_LIM" },
+	{ V4L2_TUNER_CAP_1HZ,	"V4L2_TUNER_CAP_1HZ" },
+	{ 0, "" }
+};
+
+constexpr flag_def tuner_rxsub_flag_def[] = {
+	{ V4L2_TUNER_SUB_MONO,	"V4L2_TUNER_SUB_MONO" },
+	{ V4L2_TUNER_SUB_STEREO,	"V4L2_TUNER_SUB_STEREO" },
+	{ V4L2_TUNER_SUB_LANG2,	"V4L2_TUNER_SUB_LANG2" },
+	{ V4L2_TUNER_SUB_SAP,	"V4L2_TUNER_SUB_SAP" },
+	{ V4L2_TUNER_SUB_LANG1,	"V4L2_TUNER_SUB_LANG1" },
+	{ V4L2_TUNER_SUB_RDS,	"V4L2_TUNER_SUB_RDS" },
+	{ 0, "" }
+};
+
+constexpr val_def tuner_audmode_val_def[] = {
+	{ V4L2_TUNER_MODE_MONO,	"V4L2_TUNER_MODE_MONO" },
+	{ V4L2_TUNER_MODE_STEREO,	"V4L2_TUNER_MODE_STEREO" },
+	{ V4L2_TUNER_MODE_LANG2,	"V4L2_TUNER_MODE_LANG2" },
+	{ V4L2_TUNER_MODE_SAP,	"V4L2_TUNER_MODE_SAP" },
+	{ V4L2_TUNER_MODE_LANG1,	"V4L2_TUNER_MODE_LANG1" },
+	{ V4L2_TUNER_MODE_LANG1_LANG2,	"V4L2_TUNER_MODE_LANG1_LANG2" },
+	{ -1, "" }
+};
+
+constexpr val_def encoder_cmd_val_def[] = {
+	{ V4L2_ENC_CMD_START,	"V4L2_ENC_CMD_START" },
+	{ V4L2_ENC_CMD_STOP,	"V4L2_ENC_CMD_STOP" },
+	{ V4L2_ENC_CMD_PAUSE,	"V4L2_ENC_CMD_PAUSE" },
+	{ V4L2_ENC_CMD_RESUME,	"V4L2_ENC_CMD_RESUME" },
+	{ -1, "" }
+};
+
+constexpr val_def decoder_cmd_val_def[] = {
+	{ V4L2_DEC_CMD_START,	"V4L2_DEC_CMD_START" },
+	{ V4L2_DEC_CMD_STOP,	"V4L2_DEC_CMD_STOP" },
+	{ V4L2_DEC_CMD_PAUSE,	"V4L2_DEC_CMD_PAUSE" },
+	{ V4L2_DEC_CMD_RESUME,	"V4L2_DEC_CMD_RESUME" },
+	{ V4L2_DEC_CMD_FLUSH,	"V4L2_DEC_CMD_FLUSH" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_decoder_cmd_start_flag_def[] = {
+	{ V4L2_DEC_CMD_START_MUTE_AUDIO,	"V4L2_DEC_CMD_START_MUTE_AUDIO" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_decoder_cmd_pause_flag_def[] = {
+	{ V4L2_DEC_CMD_PAUSE_TO_BLACK,	"V4L2_DEC_CMD_PAUSE_TO_BLACK" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_decoder_cmd_stop_flag_def[] = {
+	{ V4L2_DEC_CMD_STOP_TO_BLACK,	"V4L2_DEC_CMD_STOP_TO_BLACK" },
+	{ V4L2_DEC_CMD_STOP_IMMEDIATELY,	"V4L2_DEC_CMD_STOP_IMMEDIATELY" },
+	{ 0, "" }
+};
+
+constexpr val_def event_val_def[] = {
+	{ V4L2_EVENT_ALL,	"V4L2_EVENT_ALL" },
+	{ V4L2_EVENT_VSYNC,	"V4L2_EVENT_VSYNC" },
+	{ V4L2_EVENT_EOS,	"V4L2_EVENT_EOS" },
+	{ V4L2_EVENT_CTRL,	"V4L2_EVENT_CTRL" },
+	{ V4L2_EVENT_FRAME_SYNC,	"V4L2_EVENT_FRAME_SYNC" },
+	{ V4L2_EVENT_SOURCE_CHANGE,	"V4L2_EVENT_SOURCE_CHANGE" },
+	{ V4L2_EVENT_MOTION_DET,	"V4L2_EVENT_MOTION_DET" },
+	{ V4L2_EVENT_PRIVATE_START,	"V4L2_EVENT_PRIVATE_START" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_event_ctrl_ch_flag_def[] = {
+	{ V4L2_EVENT_CTRL_CH_VALUE,	"V4L2_EVENT_CTRL_CH_VALUE" },
+	{ V4L2_EVENT_CTRL_CH_FLAGS,	"V4L2_EVENT_CTRL_CH_FLAGS" },
+	{ V4L2_EVENT_CTRL_CH_RANGE,	"V4L2_EVENT_CTRL_CH_RANGE" },
+	{ V4L2_EVENT_CTRL_CH_DIMENSIONS,	"V4L2_EVENT_CTRL_CH_DIMENSIONS" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_event_md_flag_def[] = {
+	{ V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ, "V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_event_sub_flag_def[] = {
+	{ V4L2_EVENT_SUB_FL_SEND_INITIAL, "V4L2_EVENT_SUB_FL_SEND_INITIAL" },
+	{ V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK, "V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_chip_flag_def[] = {
+	{ V4L2_CHIP_FL_READABLE, "V4L2_CHIP_FL_READABLE" },
+	{ V4L2_CHIP_FL_WRITABLE, "V4L2_CHIP_FL_WRITABLE" },
+	{ 0, "" }
+};
+
+constexpr flag_def media_ent_flag_def[] = {
+	{ MEDIA_ENT_FL_DEFAULT, "MEDIA_ENT_FL_DEFAULT" },
+	{ MEDIA_ENT_FL_CONNECTOR, "MEDIA_ENT_FL_CONNECTOR" },
+	{ 0, "" }
+};
+
+constexpr flag_def media_pad_flag_def[] = {
+	{ MEDIA_PAD_FL_SINK, "MEDIA_PAD_FL_SINK" },
+	{ MEDIA_PAD_FL_SOURCE, "MEDIA_PAD_FL_SOURCE" },
+	{ MEDIA_PAD_FL_MUST_CONNECT, "MEDIA_PAD_FL_MUST_CONNECT" },
+	{ 0, "" }
+};
+
+constexpr flag_def media_lnk_flag_def[] = {
+	{ MEDIA_LNK_FL_ENABLED, "MEDIA_LNK_FL_ENABLED" },
+	{ MEDIA_LNK_FL_IMMUTABLE, "MEDIA_LNK_FL_IMMUTABLE" },
+	{ MEDIA_LNK_FL_DYNAMIC, "MEDIA_LNK_FL_DYNAMIC" },
+	{ 0, "" }
+};
+
+constexpr val_def selection_target_val_def[] = {
+	{ V4L2_SEL_TGT_CROP,	"V4L2_SEL_TGT_CROP" },
+	{ V4L2_SEL_TGT_CROP_DEFAULT,	"V4L2_SEL_TGT_CROP_DEFAULT" },
+	{ V4L2_SEL_TGT_CROP_BOUNDS,	"V4L2_SEL_TGT_CROP_BOUNDS" },
+	{ V4L2_SEL_TGT_NATIVE_SIZE,	"V4L2_SEL_TGT_NATIVE_SIZE" },
+	{ V4L2_SEL_TGT_COMPOSE,	"V4L2_SEL_TGT_COMPOSE" },
+	{ V4L2_SEL_TGT_COMPOSE_DEFAULT,	"V4L2_SEL_TGT_COMPOSE_DEFAULT" },
+	{ V4L2_SEL_TGT_COMPOSE_BOUNDS,	"V4L2_SEL_TGT_COMPOSE_BOUNDS" },
+	{ V4L2_SEL_TGT_COMPOSE_PADDED,	"V4L2_SEL_TGT_COMPOSE_PADDED" },
+	{ -1, "" }
+};
+
+constexpr flag_def v4l2_sel_flag_def[] = {
+	{ V4L2_SEL_FLAG_GE, "V4L2_SEL_FLAG_GE" },
+	{ V4L2_SEL_FLAG_LE, "V4L2_SEL_FLAG_LE" },
+	{ V4L2_SEL_FLAG_KEEP_CONFIG, "V4L2_SEL_FLAG_KEEP_CONFIG" },
+	{ 0, "" }
+};
+
+constexpr flag_def v4l2_subdev_sel_flag_def[] = {
+	{ V4L2_SUBDEV_SEL_FLAG_SIZE_GE, "V4L2_SUBDEV_SEL_FLAG_SIZE_GE" },
+	{ V4L2_SUBDEV_SEL_FLAG_SIZE_LE, "V4L2_SUBDEV_SEL_FLAG_SIZE_LE" },
+	{ V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG, "V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG" },
+	{ 0, "" }
+};
+
+constexpr val_def control_val_def[] = {
+	{ V4L2_CID_USER_CLASS,	"V4L2_CID_USER_CLASS" },
+	{ V4L2_CID_BRIGHTNESS,	"V4L2_CID_BRIGHTNESS" },
+	{ V4L2_CID_CONTRAST,	"V4L2_CID_CONTRAST" },
+	{ V4L2_CID_SATURATION,	"V4L2_CID_SATURATION" },
+	{ V4L2_CID_HUE,	"V4L2_CID_HUE" },
+	{ V4L2_CID_AUDIO_VOLUME,	"V4L2_CID_AUDIO_VOLUME" },
+	{ V4L2_CID_AUDIO_BALANCE,	"V4L2_CID_AUDIO_BALANCE" },
+	{ V4L2_CID_AUDIO_BASS,	"V4L2_CID_AUDIO_BASS" },
+	{ V4L2_CID_AUDIO_TREBLE,	"V4L2_CID_AUDIO_TREBLE" },
+	{ V4L2_CID_AUDIO_MUTE,	"V4L2_CID_AUDIO_MUTE" },
+	{ V4L2_CID_AUDIO_LOUDNESS,	"V4L2_CID_AUDIO_LOUDNESS" },
+	{ V4L2_CID_BLACK_LEVEL,	"V4L2_CID_BLACK_LEVEL" },
+	{ V4L2_CID_AUTO_WHITE_BALANCE,	"V4L2_CID_AUTO_WHITE_BALANCE" },
+	{ V4L2_CID_DO_WHITE_BALANCE,	"V4L2_CID_DO_WHITE_BALANCE" },
+	{ V4L2_CID_RED_BALANCE,	"V4L2_CID_RED_BALANCE" },
+	{ V4L2_CID_BLUE_BALANCE,	"V4L2_CID_BLUE_BALANCE" },
+	{ V4L2_CID_GAMMA,	"V4L2_CID_GAMMA" },
+	{ V4L2_CID_WHITENESS,	"V4L2_CID_WHITENESS" },
+	{ V4L2_CID_EXPOSURE,	"V4L2_CID_EXPOSURE" },
+	{ V4L2_CID_AUTOGAIN,	"V4L2_CID_AUTOGAIN" },
+	{ V4L2_CID_GAIN,	"V4L2_CID_GAIN" },
+	{ V4L2_CID_HFLIP,	"V4L2_CID_HFLIP" },
+	{ V4L2_CID_VFLIP,	"V4L2_CID_VFLIP" },
+	{ V4L2_CID_POWER_LINE_FREQUENCY,	"V4L2_CID_POWER_LINE_FREQUENCY" },
+	{ V4L2_CID_HUE_AUTO,	"V4L2_CID_HUE_AUTO" },
+	{ V4L2_CID_WHITE_BALANCE_TEMPERATURE,	"V4L2_CID_WHITE_BALANCE_TEMPERATURE" },
+	{ V4L2_CID_SHARPNESS,	"V4L2_CID_SHARPNESS" },
+	{ V4L2_CID_BACKLIGHT_COMPENSATION,	"V4L2_CID_BACKLIGHT_COMPENSATION" },
+	{ V4L2_CID_CHROMA_AGC,	"V4L2_CID_CHROMA_AGC" },
+	{ V4L2_CID_COLOR_KILLER,	"V4L2_CID_COLOR_KILLER" },
+	{ V4L2_CID_COLORFX,	"V4L2_CID_COLORFX" },
+	{ V4L2_CID_AUTOBRIGHTNESS,	"V4L2_CID_AUTOBRIGHTNESS" },
+	{ V4L2_CID_BAND_STOP_FILTER,	"V4L2_CID_BAND_STOP_FILTER" },
+	{ V4L2_CID_ROTATE,	"V4L2_CID_ROTATE" },
+	{ V4L2_CID_BG_COLOR,	"V4L2_CID_BG_COLOR" },
+	{ V4L2_CID_CHROMA_GAIN,	"V4L2_CID_CHROMA_GAIN" },
+	{ V4L2_CID_ILLUMINATORS_1,	"V4L2_CID_ILLUMINATORS_1" },
+	{ V4L2_CID_ILLUMINATORS_2,	"V4L2_CID_ILLUMINATORS_2" },
+	{ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE,	"V4L2_CID_MIN_BUFFERS_FOR_CAPTURE" },
+	{ V4L2_CID_MIN_BUFFERS_FOR_OUTPUT,	"V4L2_CID_MIN_BUFFERS_FOR_OUTPUT" },
+	{ V4L2_CID_ALPHA_COMPONENT,	"V4L2_CID_ALPHA_COMPONENT" },
+	{ V4L2_CID_COLORFX_CBCR,	"V4L2_CID_COLORFX_CBCR" },
+	{ V4L2_CID_COLORFX_RGB,	"V4L2_CID_COLORFX_RGB" },
+	{ V4L2_CID_LASTP1,	"V4L2_CID_LASTP1" },
+	{ V4L2_CID_CODEC_CLASS,	"V4L2_CID_CODEC_CLASS" },
+	{ V4L2_CID_MPEG_STREAM_TYPE,	"V4L2_CID_MPEG_STREAM_TYPE" },
+	{ V4L2_CID_MPEG_STREAM_PID_PMT,	"V4L2_CID_MPEG_STREAM_PID_PMT" },
+	{ V4L2_CID_MPEG_STREAM_PID_AUDIO,	"V4L2_CID_MPEG_STREAM_PID_AUDIO" },
+	{ V4L2_CID_MPEG_STREAM_PID_VIDEO,	"V4L2_CID_MPEG_STREAM_PID_VIDEO" },
+	{ V4L2_CID_MPEG_STREAM_PID_PCR,	"V4L2_CID_MPEG_STREAM_PID_PCR" },
+	{ V4L2_CID_MPEG_STREAM_PES_ID_AUDIO,	"V4L2_CID_MPEG_STREAM_PES_ID_AUDIO" },
+	{ V4L2_CID_MPEG_STREAM_PES_ID_VIDEO,	"V4L2_CID_MPEG_STREAM_PES_ID_VIDEO" },
+	{ V4L2_CID_MPEG_STREAM_VBI_FMT,	"V4L2_CID_MPEG_STREAM_VBI_FMT" },
+	{ V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ,	"V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ" },
+	{ V4L2_CID_MPEG_AUDIO_ENCODING,	"V4L2_CID_MPEG_AUDIO_ENCODING" },
+	{ V4L2_CID_MPEG_AUDIO_L1_BITRATE,	"V4L2_CID_MPEG_AUDIO_L1_BITRATE" },
+	{ V4L2_CID_MPEG_AUDIO_L2_BITRATE,	"V4L2_CID_MPEG_AUDIO_L2_BITRATE" },
+	{ V4L2_CID_MPEG_AUDIO_L3_BITRATE,	"V4L2_CID_MPEG_AUDIO_L3_BITRATE" },
+	{ V4L2_CID_MPEG_AUDIO_MODE,	"V4L2_CID_MPEG_AUDIO_MODE" },
+	{ V4L2_CID_MPEG_AUDIO_MODE_EXTENSION,	"V4L2_CID_MPEG_AUDIO_MODE_EXTENSION" },
+	{ V4L2_CID_MPEG_AUDIO_EMPHASIS,	"V4L2_CID_MPEG_AUDIO_EMPHASIS" },
+	{ V4L2_CID_MPEG_AUDIO_CRC,	"V4L2_CID_MPEG_AUDIO_CRC" },
+	{ V4L2_CID_MPEG_AUDIO_MUTE,	"V4L2_CID_MPEG_AUDIO_MUTE" },
+	{ V4L2_CID_MPEG_AUDIO_AAC_BITRATE,	"V4L2_CID_MPEG_AUDIO_AAC_BITRATE" },
+	{ V4L2_CID_MPEG_AUDIO_AC3_BITRATE,	"V4L2_CID_MPEG_AUDIO_AC3_BITRATE" },
+	{ V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK,	"V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK" },
+	{ V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK,	"V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK" },
+	{ V4L2_CID_MPEG_VIDEO_ENCODING,	"V4L2_CID_MPEG_VIDEO_ENCODING" },
+	{ V4L2_CID_MPEG_VIDEO_ASPECT,	"V4L2_CID_MPEG_VIDEO_ASPECT" },
+	{ V4L2_CID_MPEG_VIDEO_B_FRAMES,	"V4L2_CID_MPEG_VIDEO_B_FRAMES" },
+	{ V4L2_CID_MPEG_VIDEO_GOP_SIZE,	"V4L2_CID_MPEG_VIDEO_GOP_SIZE" },
+	{ V4L2_CID_MPEG_VIDEO_GOP_CLOSURE,	"V4L2_CID_MPEG_VIDEO_GOP_CLOSURE" },
+	{ V4L2_CID_MPEG_VIDEO_PULLDOWN,	"V4L2_CID_MPEG_VIDEO_PULLDOWN" },
+	{ V4L2_CID_MPEG_VIDEO_BITRATE_MODE,	"V4L2_CID_MPEG_VIDEO_BITRATE_MODE" },
+	{ V4L2_CID_MPEG_VIDEO_BITRATE,	"V4L2_CID_MPEG_VIDEO_BITRATE" },
+	{ V4L2_CID_MPEG_VIDEO_BITRATE_PEAK,	"V4L2_CID_MPEG_VIDEO_BITRATE_PEAK" },
+	{ V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION,	"V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION" },
+	{ V4L2_CID_MPEG_VIDEO_MUTE,	"V4L2_CID_MPEG_VIDEO_MUTE" },
+	{ V4L2_CID_MPEG_VIDEO_MUTE_YUV,	"V4L2_CID_MPEG_VIDEO_MUTE_YUV" },
+	{ V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE,	"V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE" },
+	{ V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER,	"V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER" },
+	{ V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB,	"V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB" },
+	{ V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE,	"V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE" },
+	{ V4L2_CID_MPEG_VIDEO_HEADER_MODE,	"V4L2_CID_MPEG_VIDEO_HEADER_MODE" },
+	{ V4L2_CID_MPEG_VIDEO_MAX_REF_PIC,	"V4L2_CID_MPEG_VIDEO_MAX_REF_PIC" },
+	{ V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE,	"V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE" },
+	{ V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES,	"V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES" },
+	{ V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB,	"V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB" },
+	{ V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE,	"V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE" },
+	{ V4L2_CID_MPEG_VIDEO_VBV_SIZE,	"V4L2_CID_MPEG_VIDEO_VBV_SIZE" },
+	{ V4L2_CID_MPEG_VIDEO_DEC_PTS,	"V4L2_CID_MPEG_VIDEO_DEC_PTS" },
+	{ V4L2_CID_MPEG_VIDEO_DEC_FRAME,	"V4L2_CID_MPEG_VIDEO_DEC_FRAME" },
+	{ V4L2_CID_MPEG_VIDEO_VBV_DELAY,	"V4L2_CID_MPEG_VIDEO_VBV_DELAY" },
+	{ V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER,	"V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER" },
+	{ V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE,	"V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE" },
+	{ V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE,	"V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE" },
+	{ V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME,	"V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME" },
+	{ V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID,	"V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID" },
+	{ V4L2_CID_MPEG_VIDEO_AU_DELIMITER,	"V4L2_CID_MPEG_VIDEO_AU_DELIMITER" },
+	{ V4L2_CID_MPEG_VIDEO_LTR_COUNT,	"V4L2_CID_MPEG_VIDEO_LTR_COUNT" },
+	{ V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX,	"V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX" },
+	{ V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES,	"V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES" },
+	{ V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR,	"V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR" },
+	{ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD,	"V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD" },
+	{ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE,	"V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL,	"V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE,	"V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE" },
+	{ V4L2_CID_FWHT_I_FRAME_QP,	"V4L2_CID_FWHT_I_FRAME_QP" },
+	{ V4L2_CID_FWHT_P_FRAME_QP,	"V4L2_CID_FWHT_P_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H263_MIN_QP,	"V4L2_CID_MPEG_VIDEO_H263_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H263_MAX_QP,	"V4L2_CID_MPEG_VIDEO_H263_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_MIN_QP,	"V4L2_CID_MPEG_VIDEO_H264_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_MAX_QP,	"V4L2_CID_MPEG_VIDEO_H264_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM,	"V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM" },
+	{ V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE,	"V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE,	"V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_I_PERIOD,	"V4L2_CID_MPEG_VIDEO_H264_I_PERIOD" },
+	{ V4L2_CID_MPEG_VIDEO_H264_LEVEL,	"V4L2_CID_MPEG_VIDEO_H264_LEVEL" },
+	{ V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA,	"V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA" },
+	{ V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA,	"V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA" },
+	{ V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE,	"V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_PROFILE,	"V4L2_CID_MPEG_VIDEO_H264_PROFILE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT,	"V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT" },
+	{ V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH,	"V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH" },
+	{ V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE,	"V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC,	"V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC" },
+	{ V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING,	"V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING" },
+	{ V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0,	"V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0" },
+	{ V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE,	"V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_FMO,	"V4L2_CID_MPEG_VIDEO_H264_FMO" },
+	{ V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE,	"V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP,	"V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION,	"V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION" },
+	{ V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE,	"V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH,	"V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH" },
+	{ V4L2_CID_MPEG_VIDEO_H264_ASO,	"V4L2_CID_MPEG_VIDEO_H264_ASO" },
+	{ V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER,	"V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING,	"V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE,	"V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER,	"V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP,	"V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION,	"V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION" },
+	{ V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET,	"V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET" },
+	{ V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP,	"V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP,	"V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP,	"V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP,	"V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP,	"V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP,	"V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR,	"V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR,	"V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR,	"V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR,	"V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR,	"V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR,	"V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR" },
+	{ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR,	"V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP,	"V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP,	"V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL,	"V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE,	"V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE" },
+	{ V4L2_CID_MPEG_VIDEO_MPEG4_QPEL,	"V4L2_CID_MPEG_VIDEO_MPEG4_QPEL" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS,	"V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4,	"V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES,	"V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL,	"V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS,	"V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD,	"V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL,	"V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_MIN_QP,	"V4L2_CID_MPEG_VIDEO_VPX_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_MAX_QP,	"V4L2_CID_MPEG_VIDEO_VPX_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_VP8_PROFILE,	"V4L2_CID_MPEG_VIDEO_VP8_PROFILE" },
+	{ V4L2_CID_MPEG_VIDEO_VPX_PROFILE,	"V4L2_CID_MPEG_VIDEO_VPX_PROFILE" },
+	{ V4L2_CID_MPEG_VIDEO_VP9_PROFILE,	"V4L2_CID_MPEG_VIDEO_VP9_PROFILE" },
+	{ V4L2_CID_MPEG_VIDEO_VP9_LEVEL,	"V4L2_CID_MPEG_VIDEO_VP9_LEVEL" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,	"V4L2_CID_MPEG_VIDEO_HEVC_PROFILE" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_LEVEL,	"V4L2_CID_MPEG_VIDEO_HEVC_LEVEL" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION,	"V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_TIER,	"V4L2_CID_MPEG_VIDEO_HEVC_TIER" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH,	"V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE,	"V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2,	"V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2,	"V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE,	"V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD,	"V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU,	"V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED,	"V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT,	"V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB,	"V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID,	"V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING,	"V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1,	"V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT,	"V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION,	"V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE,	"V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD,	"V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR,	"V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR" },
+	{ V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES,	"V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES" },
+	{ V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR,	"V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR" },
+	{ V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY,	"V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY" },
+	{ V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE,	"V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP" },
+	{ V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP,	"V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP" },
+	{ V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY,	"V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY" },
+	{ V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE,	"V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE" },
+	{ V4L2_CID_MPEG_VIDEO_AV1_PROFILE,	"V4L2_CID_MPEG_VIDEO_AV1_PROFILE" },
+	{ V4L2_CID_MPEG_VIDEO_AV1_LEVEL,	"V4L2_CID_MPEG_VIDEO_AV1_LEVEL" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE,	"V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER,	"V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE,	"V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE,	"V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE,	"V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER,	"V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE,	"V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM,	"V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP,	"V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM,	"V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM" },
+	{ V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP,	"V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP" },
+	{ V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS,	"V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY,	"V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE,	"V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE,	"V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE,	"V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_PADDING,	"V4L2_CID_MPEG_MFC51_VIDEO_PADDING" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV,	"V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT,	"V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF,	"V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY,	"V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK,	"V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH,	"V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC,	"V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC" },
+	{ V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P,	"V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P" },
+	{ V4L2_CID_CAMERA_CLASS,	"V4L2_CID_CAMERA_CLASS" },
+	{ V4L2_CID_EXPOSURE_AUTO,	"V4L2_CID_EXPOSURE_AUTO" },
+	{ V4L2_CID_EXPOSURE_ABSOLUTE,	"V4L2_CID_EXPOSURE_ABSOLUTE" },
+	{ V4L2_CID_EXPOSURE_AUTO_PRIORITY,	"V4L2_CID_EXPOSURE_AUTO_PRIORITY" },
+	{ V4L2_CID_PAN_RELATIVE,	"V4L2_CID_PAN_RELATIVE" },
+	{ V4L2_CID_TILT_RELATIVE,	"V4L2_CID_TILT_RELATIVE" },
+	{ V4L2_CID_PAN_RESET,	"V4L2_CID_PAN_RESET" },
+	{ V4L2_CID_TILT_RESET,	"V4L2_CID_TILT_RESET" },
+	{ V4L2_CID_PAN_ABSOLUTE,	"V4L2_CID_PAN_ABSOLUTE" },
+	{ V4L2_CID_TILT_ABSOLUTE,	"V4L2_CID_TILT_ABSOLUTE" },
+	{ V4L2_CID_FOCUS_ABSOLUTE,	"V4L2_CID_FOCUS_ABSOLUTE" },
+	{ V4L2_CID_FOCUS_RELATIVE,	"V4L2_CID_FOCUS_RELATIVE" },
+	{ V4L2_CID_FOCUS_AUTO,	"V4L2_CID_FOCUS_AUTO" },
+	{ V4L2_CID_ZOOM_ABSOLUTE,	"V4L2_CID_ZOOM_ABSOLUTE" },
+	{ V4L2_CID_ZOOM_RELATIVE,	"V4L2_CID_ZOOM_RELATIVE" },
+	{ V4L2_CID_ZOOM_CONTINUOUS,	"V4L2_CID_ZOOM_CONTINUOUS" },
+	{ V4L2_CID_PRIVACY,	"V4L2_CID_PRIVACY" },
+	{ V4L2_CID_IRIS_ABSOLUTE,	"V4L2_CID_IRIS_ABSOLUTE" },
+	{ V4L2_CID_IRIS_RELATIVE,	"V4L2_CID_IRIS_RELATIVE" },
+	{ V4L2_CID_AUTO_EXPOSURE_BIAS,	"V4L2_CID_AUTO_EXPOSURE_BIAS" },
+	{ V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE,	"V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE" },
+	{ V4L2_CID_WIDE_DYNAMIC_RANGE,	"V4L2_CID_WIDE_DYNAMIC_RANGE" },
+	{ V4L2_CID_IMAGE_STABILIZATION,	"V4L2_CID_IMAGE_STABILIZATION" },
+	{ V4L2_CID_ISO_SENSITIVITY,	"V4L2_CID_ISO_SENSITIVITY" },
+	{ V4L2_CID_ISO_SENSITIVITY_AUTO,	"V4L2_CID_ISO_SENSITIVITY_AUTO" },
+	{ V4L2_CID_EXPOSURE_METERING,	"V4L2_CID_EXPOSURE_METERING" },
+	{ V4L2_CID_SCENE_MODE,	"V4L2_CID_SCENE_MODE" },
+	{ V4L2_CID_3A_LOCK,	"V4L2_CID_3A_LOCK" },
+	{ V4L2_CID_AUTO_FOCUS_START,	"V4L2_CID_AUTO_FOCUS_START" },
+	{ V4L2_CID_AUTO_FOCUS_STOP,	"V4L2_CID_AUTO_FOCUS_STOP" },
+	{ V4L2_CID_AUTO_FOCUS_STATUS,	"V4L2_CID_AUTO_FOCUS_STATUS" },
+	{ V4L2_CID_AUTO_FOCUS_RANGE,	"V4L2_CID_AUTO_FOCUS_RANGE" },
+	{ V4L2_CID_PAN_SPEED,	"V4L2_CID_PAN_SPEED" },
+	{ V4L2_CID_TILT_SPEED,	"V4L2_CID_TILT_SPEED" },
+	{ V4L2_CID_CAMERA_ORIENTATION,	"V4L2_CID_CAMERA_ORIENTATION" },
+	{ V4L2_CID_CAMERA_SENSOR_ROTATION,	"V4L2_CID_CAMERA_SENSOR_ROTATION" },
+	{ V4L2_CID_HDR_SENSOR_MODE,	"V4L2_CID_HDR_SENSOR_MODE" },
+	{ V4L2_CID_FM_TX_CLASS,	"V4L2_CID_FM_TX_CLASS" },
+	{ V4L2_CID_RDS_TX_DEVIATION,	"V4L2_CID_RDS_TX_DEVIATION" },
+	{ V4L2_CID_RDS_TX_PI,	"V4L2_CID_RDS_TX_PI" },
+	{ V4L2_CID_RDS_TX_PTY,	"V4L2_CID_RDS_TX_PTY" },
+	{ V4L2_CID_RDS_TX_PS_NAME,	"V4L2_CID_RDS_TX_PS_NAME" },
+	{ V4L2_CID_RDS_TX_RADIO_TEXT,	"V4L2_CID_RDS_TX_RADIO_TEXT" },
+	{ V4L2_CID_RDS_TX_MONO_STEREO,	"V4L2_CID_RDS_TX_MONO_STEREO" },
+	{ V4L2_CID_RDS_TX_ARTIFICIAL_HEAD,	"V4L2_CID_RDS_TX_ARTIFICIAL_HEAD" },
+	{ V4L2_CID_RDS_TX_COMPRESSED,	"V4L2_CID_RDS_TX_COMPRESSED" },
+	{ V4L2_CID_RDS_TX_DYNAMIC_PTY,	"V4L2_CID_RDS_TX_DYNAMIC_PTY" },
+	{ V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT,	"V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT" },
+	{ V4L2_CID_RDS_TX_TRAFFIC_PROGRAM,	"V4L2_CID_RDS_TX_TRAFFIC_PROGRAM" },
+	{ V4L2_CID_RDS_TX_MUSIC_SPEECH,	"V4L2_CID_RDS_TX_MUSIC_SPEECH" },
+	{ V4L2_CID_RDS_TX_ALT_FREQS_ENABLE,	"V4L2_CID_RDS_TX_ALT_FREQS_ENABLE" },
+	{ V4L2_CID_RDS_TX_ALT_FREQS,	"V4L2_CID_RDS_TX_ALT_FREQS" },
+	{ V4L2_CID_AUDIO_LIMITER_ENABLED,	"V4L2_CID_AUDIO_LIMITER_ENABLED" },
+	{ V4L2_CID_AUDIO_LIMITER_RELEASE_TIME,	"V4L2_CID_AUDIO_LIMITER_RELEASE_TIME" },
+	{ V4L2_CID_AUDIO_LIMITER_DEVIATION,	"V4L2_CID_AUDIO_LIMITER_DEVIATION" },
+	{ V4L2_CID_AUDIO_COMPRESSION_ENABLED,	"V4L2_CID_AUDIO_COMPRESSION_ENABLED" },
+	{ V4L2_CID_AUDIO_COMPRESSION_GAIN,	"V4L2_CID_AUDIO_COMPRESSION_GAIN" },
+	{ V4L2_CID_AUDIO_COMPRESSION_THRESHOLD,	"V4L2_CID_AUDIO_COMPRESSION_THRESHOLD" },
+	{ V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME,	"V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME" },
+	{ V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME,	"V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME" },
+	{ V4L2_CID_PILOT_TONE_ENABLED,	"V4L2_CID_PILOT_TONE_ENABLED" },
+	{ V4L2_CID_PILOT_TONE_DEVIATION,	"V4L2_CID_PILOT_TONE_DEVIATION" },
+	{ V4L2_CID_PILOT_TONE_FREQUENCY,	"V4L2_CID_PILOT_TONE_FREQUENCY" },
+	{ V4L2_CID_TUNE_PREEMPHASIS,	"V4L2_CID_TUNE_PREEMPHASIS" },
+	{ V4L2_CID_TUNE_POWER_LEVEL,	"V4L2_CID_TUNE_POWER_LEVEL" },
+	{ V4L2_CID_TUNE_ANTENNA_CAPACITOR,	"V4L2_CID_TUNE_ANTENNA_CAPACITOR" },
+	{ V4L2_CID_FLASH_CLASS,	"V4L2_CID_FLASH_CLASS" },
+	{ V4L2_CID_FLASH_LED_MODE,	"V4L2_CID_FLASH_LED_MODE" },
+	{ V4L2_CID_FLASH_STROBE_SOURCE,	"V4L2_CID_FLASH_STROBE_SOURCE" },
+	{ V4L2_CID_FLASH_STROBE,	"V4L2_CID_FLASH_STROBE" },
+	{ V4L2_CID_FLASH_STROBE_STOP,	"V4L2_CID_FLASH_STROBE_STOP" },
+	{ V4L2_CID_FLASH_STROBE_STATUS,	"V4L2_CID_FLASH_STROBE_STATUS" },
+	{ V4L2_CID_FLASH_TIMEOUT,	"V4L2_CID_FLASH_TIMEOUT" },
+	{ V4L2_CID_FLASH_INTENSITY,	"V4L2_CID_FLASH_INTENSITY" },
+	{ V4L2_CID_FLASH_TORCH_INTENSITY,	"V4L2_CID_FLASH_TORCH_INTENSITY" },
+	{ V4L2_CID_FLASH_INDICATOR_INTENSITY,	"V4L2_CID_FLASH_INDICATOR_INTENSITY" },
+	{ V4L2_CID_FLASH_FAULT,	"V4L2_CID_FLASH_FAULT" },
+	{ V4L2_CID_FLASH_CHARGE,	"V4L2_CID_FLASH_CHARGE" },
+	{ V4L2_CID_FLASH_READY,	"V4L2_CID_FLASH_READY" },
+	{ V4L2_CID_JPEG_CLASS,	"V4L2_CID_JPEG_CLASS" },
+	{ V4L2_CID_JPEG_CHROMA_SUBSAMPLING,	"V4L2_CID_JPEG_CHROMA_SUBSAMPLING" },
+	{ V4L2_CID_JPEG_RESTART_INTERVAL,	"V4L2_CID_JPEG_RESTART_INTERVAL" },
+	{ V4L2_CID_JPEG_COMPRESSION_QUALITY,	"V4L2_CID_JPEG_COMPRESSION_QUALITY" },
+	{ V4L2_CID_JPEG_ACTIVE_MARKER,	"V4L2_CID_JPEG_ACTIVE_MARKER" },
+	{ V4L2_CID_IMAGE_SOURCE_CLASS,	"V4L2_CID_IMAGE_SOURCE_CLASS" },
+	{ V4L2_CID_VBLANK,	"V4L2_CID_VBLANK" },
+	{ V4L2_CID_HBLANK,	"V4L2_CID_HBLANK" },
+	{ V4L2_CID_ANALOGUE_GAIN,	"V4L2_CID_ANALOGUE_GAIN" },
+	{ V4L2_CID_TEST_PATTERN_RED,	"V4L2_CID_TEST_PATTERN_RED" },
+	{ V4L2_CID_TEST_PATTERN_GREENR,	"V4L2_CID_TEST_PATTERN_GREENR" },
+	{ V4L2_CID_TEST_PATTERN_BLUE,	"V4L2_CID_TEST_PATTERN_BLUE" },
+	{ V4L2_CID_TEST_PATTERN_GREENB,	"V4L2_CID_TEST_PATTERN_GREENB" },
+	{ V4L2_CID_UNIT_CELL_SIZE,	"V4L2_CID_UNIT_CELL_SIZE" },
+	{ V4L2_CID_NOTIFY_GAINS,	"V4L2_CID_NOTIFY_GAINS" },
+	{ V4L2_CID_IMAGE_PROC_CLASS,	"V4L2_CID_IMAGE_PROC_CLASS" },
+	{ V4L2_CID_LINK_FREQ,	"V4L2_CID_LINK_FREQ" },
+	{ V4L2_CID_PIXEL_RATE,	"V4L2_CID_PIXEL_RATE" },
+	{ V4L2_CID_TEST_PATTERN,	"V4L2_CID_TEST_PATTERN" },
+	{ V4L2_CID_DEINTERLACING_MODE,	"V4L2_CID_DEINTERLACING_MODE" },
+	{ V4L2_CID_DIGITAL_GAIN,	"V4L2_CID_DIGITAL_GAIN" },
+	{ V4L2_CID_DV_CLASS,	"V4L2_CID_DV_CLASS" },
+	{ V4L2_CID_DV_TX_HOTPLUG,	"V4L2_CID_DV_TX_HOTPLUG" },
+	{ V4L2_CID_DV_TX_RXSENSE,	"V4L2_CID_DV_TX_RXSENSE" },
+	{ V4L2_CID_DV_TX_EDID_PRESENT,	"V4L2_CID_DV_TX_EDID_PRESENT" },
+	{ V4L2_CID_DV_TX_MODE,	"V4L2_CID_DV_TX_MODE" },
+	{ V4L2_CID_DV_TX_RGB_RANGE,	"V4L2_CID_DV_TX_RGB_RANGE" },
+	{ V4L2_CID_DV_TX_IT_CONTENT_TYPE,	"V4L2_CID_DV_TX_IT_CONTENT_TYPE" },
+	{ V4L2_CID_DV_RX_POWER_PRESENT,	"V4L2_CID_DV_RX_POWER_PRESENT" },
+	{ V4L2_CID_DV_RX_RGB_RANGE,	"V4L2_CID_DV_RX_RGB_RANGE" },
+	{ V4L2_CID_DV_RX_IT_CONTENT_TYPE,	"V4L2_CID_DV_RX_IT_CONTENT_TYPE" },
+	{ V4L2_CID_FM_RX_CLASS,	"V4L2_CID_FM_RX_CLASS" },
+	{ V4L2_CID_TUNE_DEEMPHASIS,	"V4L2_CID_TUNE_DEEMPHASIS" },
+	{ V4L2_CID_RDS_RECEPTION,	"V4L2_CID_RDS_RECEPTION" },
+	{ V4L2_CID_RDS_RX_PTY,	"V4L2_CID_RDS_RX_PTY" },
+	{ V4L2_CID_RDS_RX_PS_NAME,	"V4L2_CID_RDS_RX_PS_NAME" },
+	{ V4L2_CID_RDS_RX_RADIO_TEXT,	"V4L2_CID_RDS_RX_RADIO_TEXT" },
+	{ V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT,	"V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT" },
+	{ V4L2_CID_RDS_RX_TRAFFIC_PROGRAM,	"V4L2_CID_RDS_RX_TRAFFIC_PROGRAM" },
+	{ V4L2_CID_RDS_RX_MUSIC_SPEECH,	"V4L2_CID_RDS_RX_MUSIC_SPEECH" },
+	{ V4L2_CID_RF_TUNER_CLASS,	"V4L2_CID_RF_TUNER_CLASS" },
+	{ V4L2_CID_RF_TUNER_BANDWIDTH_AUTO,	"V4L2_CID_RF_TUNER_BANDWIDTH_AUTO" },
+	{ V4L2_CID_RF_TUNER_BANDWIDTH,	"V4L2_CID_RF_TUNER_BANDWIDTH" },
+	{ V4L2_CID_RF_TUNER_RF_GAIN,	"V4L2_CID_RF_TUNER_RF_GAIN" },
+	{ V4L2_CID_RF_TUNER_LNA_GAIN_AUTO,	"V4L2_CID_RF_TUNER_LNA_GAIN_AUTO" },
+	{ V4L2_CID_RF_TUNER_LNA_GAIN,	"V4L2_CID_RF_TUNER_LNA_GAIN" },
+	{ V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO,	"V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO" },
+	{ V4L2_CID_RF_TUNER_MIXER_GAIN,	"V4L2_CID_RF_TUNER_MIXER_GAIN" },
+	{ V4L2_CID_RF_TUNER_IF_GAIN_AUTO,	"V4L2_CID_RF_TUNER_IF_GAIN_AUTO" },
+	{ V4L2_CID_RF_TUNER_IF_GAIN,	"V4L2_CID_RF_TUNER_IF_GAIN" },
+	{ V4L2_CID_RF_TUNER_PLL_LOCK,	"V4L2_CID_RF_TUNER_PLL_LOCK" },
+	{ V4L2_CID_DETECT_CLASS,	"V4L2_CID_DETECT_CLASS" },
+	{ V4L2_CID_DETECT_MD_MODE,	"V4L2_CID_DETECT_MD_MODE" },
+	{ V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD,	"V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD" },
+	{ V4L2_CID_DETECT_MD_THRESHOLD_GRID,	"V4L2_CID_DETECT_MD_THRESHOLD_GRID" },
+	{ V4L2_CID_DETECT_MD_REGION_GRID,	"V4L2_CID_DETECT_MD_REGION_GRID" },
+	{ V4L2_CID_CODEC_STATELESS_CLASS,	"V4L2_CID_CODEC_STATELESS_CLASS" },
+	{ V4L2_CID_STATELESS_H264_DECODE_MODE,	"V4L2_CID_STATELESS_H264_DECODE_MODE" },
+	{ V4L2_CID_STATELESS_H264_START_CODE,	"V4L2_CID_STATELESS_H264_START_CODE" },
+	{ V4L2_CID_STATELESS_H264_SPS,	"V4L2_CID_STATELESS_H264_SPS" },
+	{ V4L2_CID_STATELESS_H264_PPS,	"V4L2_CID_STATELESS_H264_PPS" },
+	{ V4L2_CID_STATELESS_H264_SCALING_MATRIX,	"V4L2_CID_STATELESS_H264_SCALING_MATRIX" },
+	{ V4L2_CID_STATELESS_H264_PRED_WEIGHTS,	"V4L2_CID_STATELESS_H264_PRED_WEIGHTS" },
+	{ V4L2_CID_STATELESS_H264_SLICE_PARAMS,	"V4L2_CID_STATELESS_H264_SLICE_PARAMS" },
+	{ V4L2_CID_STATELESS_H264_DECODE_PARAMS,	"V4L2_CID_STATELESS_H264_DECODE_PARAMS" },
+	{ V4L2_CID_STATELESS_FWHT_PARAMS,	"V4L2_CID_STATELESS_FWHT_PARAMS" },
+	{ V4L2_CID_STATELESS_VP8_FRAME,	"V4L2_CID_STATELESS_VP8_FRAME" },
+	{ V4L2_CID_STATELESS_MPEG2_SEQUENCE,	"V4L2_CID_STATELESS_MPEG2_SEQUENCE" },
+	{ V4L2_CID_STATELESS_MPEG2_PICTURE,	"V4L2_CID_STATELESS_MPEG2_PICTURE" },
+	{ V4L2_CID_STATELESS_MPEG2_QUANTISATION,	"V4L2_CID_STATELESS_MPEG2_QUANTISATION" },
+	{ V4L2_CID_STATELESS_HEVC_SPS,	"V4L2_CID_STATELESS_HEVC_SPS" },
+	{ V4L2_CID_STATELESS_HEVC_PPS,	"V4L2_CID_STATELESS_HEVC_PPS" },
+	{ V4L2_CID_STATELESS_HEVC_SLICE_PARAMS,	"V4L2_CID_STATELESS_HEVC_SLICE_PARAMS" },
+	{ V4L2_CID_STATELESS_HEVC_SCALING_MATRIX,	"V4L2_CID_STATELESS_HEVC_SCALING_MATRIX" },
+	{ V4L2_CID_STATELESS_HEVC_DECODE_PARAMS,	"V4L2_CID_STATELESS_HEVC_DECODE_PARAMS" },
+	{ V4L2_CID_STATELESS_HEVC_DECODE_MODE,	"V4L2_CID_STATELESS_HEVC_DECODE_MODE" },
+	{ V4L2_CID_STATELESS_HEVC_START_CODE,	"V4L2_CID_STATELESS_HEVC_START_CODE" },
+	{ V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS,	"V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS" },
+	{ V4L2_CID_COLORIMETRY_CLASS,	"V4L2_CID_COLORIMETRY_CLASS" },
+	{ V4L2_CID_COLORIMETRY_HDR10_CLL_INFO,	"V4L2_CID_COLORIMETRY_HDR10_CLL_INFO" },
+	{ V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,	"V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY" },
+	{ V4L2_CID_STATELESS_VP9_FRAME,	"V4L2_CID_STATELESS_VP9_FRAME" },
+	{ V4L2_CID_STATELESS_VP9_COMPRESSED_HDR,	"V4L2_CID_STATELESS_VP9_COMPRESSED_HDR" },
+	{ V4L2_CID_STATELESS_AV1_SEQUENCE,	"V4L2_CID_STATELESS_AV1_SEQUENCE" },
+	{ V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY,	"V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY" },
+	{ V4L2_CID_STATELESS_AV1_FRAME,	"V4L2_CID_STATELESS_AV1_FRAME" },
+	{ V4L2_CID_STATELESS_AV1_FILM_GRAIN,	"V4L2_CID_STATELESS_AV1_FILM_GRAIN" },
+	{ V4L2_CID_MPEG_CLASS,	"V4L2_CID_MPEG_CLASS" },
+	{ V4L2_CID_MAX_CTRLS,	"V4L2_CID_MAX_CTRLS" },
+	{ -1, "" }
+};
+constexpr val_def ioctl_val_def[] = {
+	{ VIDIOC_QUERYCAP,	"VIDIOC_QUERYCAP" },
+	{ VIDIOC_ENUM_FMT,	"VIDIOC_ENUM_FMT" },
+	{ VIDIOC_G_FMT,	"VIDIOC_G_FMT" },
+	{ VIDIOC_S_FMT,	"VIDIOC_S_FMT" },
+	{ VIDIOC_REQBUFS,	"VIDIOC_REQBUFS" },
+	{ VIDIOC_QUERYBUF,	"VIDIOC_QUERYBUF" },
+	{ VIDIOC_G_FBUF,	"VIDIOC_G_FBUF" },
+	{ VIDIOC_S_FBUF,	"VIDIOC_S_FBUF" },
+	{ VIDIOC_OVERLAY,	"VIDIOC_OVERLAY" },
+	{ VIDIOC_QBUF,	"VIDIOC_QBUF" },
+	{ VIDIOC_EXPBUF,	"VIDIOC_EXPBUF" },
+	{ VIDIOC_DQBUF,	"VIDIOC_DQBUF" },
+	{ VIDIOC_STREAMON,	"VIDIOC_STREAMON" },
+	{ VIDIOC_STREAMOFF,	"VIDIOC_STREAMOFF" },
+	{ VIDIOC_G_PARM,	"VIDIOC_G_PARM" },
+	{ VIDIOC_S_PARM,	"VIDIOC_S_PARM" },
+	{ VIDIOC_G_STD,	"VIDIOC_G_STD" },
+	{ VIDIOC_S_STD,	"VIDIOC_S_STD" },
+	{ VIDIOC_ENUMSTD,	"VIDIOC_ENUMSTD" },
+	{ VIDIOC_ENUMINPUT,	"VIDIOC_ENUMINPUT" },
+	{ VIDIOC_G_CTRL,	"VIDIOC_G_CTRL" },
+	{ VIDIOC_S_CTRL,	"VIDIOC_S_CTRL" },
+	{ VIDIOC_G_TUNER,	"VIDIOC_G_TUNER" },
+	{ VIDIOC_S_TUNER,	"VIDIOC_S_TUNER" },
+	{ VIDIOC_G_AUDIO,	"VIDIOC_G_AUDIO" },
+	{ VIDIOC_S_AUDIO,	"VIDIOC_S_AUDIO" },
+	{ VIDIOC_QUERYCTRL,	"VIDIOC_QUERYCTRL" },
+	{ VIDIOC_QUERYMENU,	"VIDIOC_QUERYMENU" },
+	{ VIDIOC_G_INPUT,	"VIDIOC_G_INPUT" },
+	{ VIDIOC_S_INPUT,	"VIDIOC_S_INPUT" },
+	{ VIDIOC_G_EDID,	"VIDIOC_G_EDID" },
+	{ VIDIOC_S_EDID,	"VIDIOC_S_EDID" },
+	{ VIDIOC_G_OUTPUT,	"VIDIOC_G_OUTPUT" },
+	{ VIDIOC_S_OUTPUT,	"VIDIOC_S_OUTPUT" },
+	{ VIDIOC_ENUMOUTPUT,	"VIDIOC_ENUMOUTPUT" },
+	{ VIDIOC_G_AUDOUT,	"VIDIOC_G_AUDOUT" },
+	{ VIDIOC_S_AUDOUT,	"VIDIOC_S_AUDOUT" },
+	{ VIDIOC_G_MODULATOR,	"VIDIOC_G_MODULATOR" },
+	{ VIDIOC_S_MODULATOR,	"VIDIOC_S_MODULATOR" },
+	{ VIDIOC_G_FREQUENCY,	"VIDIOC_G_FREQUENCY" },
+	{ VIDIOC_S_FREQUENCY,	"VIDIOC_S_FREQUENCY" },
+	{ VIDIOC_CROPCAP,	"VIDIOC_CROPCAP" },
+	{ VIDIOC_G_CROP,	"VIDIOC_G_CROP" },
+	{ VIDIOC_S_CROP,	"VIDIOC_S_CROP" },
+	{ VIDIOC_G_JPEGCOMP,	"VIDIOC_G_JPEGCOMP" },
+	{ VIDIOC_S_JPEGCOMP,	"VIDIOC_S_JPEGCOMP" },
+	{ VIDIOC_QUERYSTD,	"VIDIOC_QUERYSTD" },
+	{ VIDIOC_TRY_FMT,	"VIDIOC_TRY_FMT" },
+	{ VIDIOC_ENUMAUDIO,	"VIDIOC_ENUMAUDIO" },
+	{ VIDIOC_ENUMAUDOUT,	"VIDIOC_ENUMAUDOUT" },
+	{ VIDIOC_G_PRIORITY,	"VIDIOC_G_PRIORITY" },
+	{ VIDIOC_S_PRIORITY,	"VIDIOC_S_PRIORITY" },
+	{ VIDIOC_G_SLICED_VBI_CAP,	"VIDIOC_G_SLICED_VBI_CAP" },
+	{ VIDIOC_LOG_STATUS,	"VIDIOC_LOG_STATUS" },
+	{ VIDIOC_G_EXT_CTRLS,	"VIDIOC_G_EXT_CTRLS" },
+	{ VIDIOC_S_EXT_CTRLS,	"VIDIOC_S_EXT_CTRLS" },
+	{ VIDIOC_TRY_EXT_CTRLS,	"VIDIOC_TRY_EXT_CTRLS" },
+	{ VIDIOC_ENUM_FRAMESIZES,	"VIDIOC_ENUM_FRAMESIZES" },
+	{ VIDIOC_ENUM_FRAMEINTERVALS,	"VIDIOC_ENUM_FRAMEINTERVALS" },
+	{ VIDIOC_G_ENC_INDEX,	"VIDIOC_G_ENC_INDEX" },
+	{ VIDIOC_ENCODER_CMD,	"VIDIOC_ENCODER_CMD" },
+	{ VIDIOC_TRY_ENCODER_CMD,	"VIDIOC_TRY_ENCODER_CMD" },
+	{ VIDIOC_DBG_S_REGISTER,	"VIDIOC_DBG_S_REGISTER" },
+	{ VIDIOC_DBG_G_REGISTER,	"VIDIOC_DBG_G_REGISTER" },
+	{ VIDIOC_S_HW_FREQ_SEEK,	"VIDIOC_S_HW_FREQ_SEEK" },
+	{ VIDIOC_S_DV_TIMINGS,	"VIDIOC_S_DV_TIMINGS" },
+	{ VIDIOC_G_DV_TIMINGS,	"VIDIOC_G_DV_TIMINGS" },
+	{ VIDIOC_DQEVENT,	"VIDIOC_DQEVENT" },
+	{ VIDIOC_SUBSCRIBE_EVENT,	"VIDIOC_SUBSCRIBE_EVENT" },
+	{ VIDIOC_UNSUBSCRIBE_EVENT,	"VIDIOC_UNSUBSCRIBE_EVENT" },
+	{ VIDIOC_CREATE_BUFS,	"VIDIOC_CREATE_BUFS" },
+	{ VIDIOC_PREPARE_BUF,	"VIDIOC_PREPARE_BUF" },
+	{ VIDIOC_G_SELECTION,	"VIDIOC_G_SELECTION" },
+	{ VIDIOC_S_SELECTION,	"VIDIOC_S_SELECTION" },
+	{ VIDIOC_DECODER_CMD,	"VIDIOC_DECODER_CMD" },
+	{ VIDIOC_TRY_DECODER_CMD,	"VIDIOC_TRY_DECODER_CMD" },
+	{ VIDIOC_ENUM_DV_TIMINGS,	"VIDIOC_ENUM_DV_TIMINGS" },
+	{ VIDIOC_QUERY_DV_TIMINGS,	"VIDIOC_QUERY_DV_TIMINGS" },
+	{ VIDIOC_DV_TIMINGS_CAP,	"VIDIOC_DV_TIMINGS_CAP" },
+	{ VIDIOC_ENUM_FREQ_BANDS,	"VIDIOC_ENUM_FREQ_BANDS" },
+	{ VIDIOC_DBG_G_CHIP_INFO,	"VIDIOC_DBG_G_CHIP_INFO" },
+	{ VIDIOC_QUERY_EXT_CTRL,	"VIDIOC_QUERY_EXT_CTRL" },
+	{ MEDIA_IOC_DEVICE_INFO,	"MEDIA_IOC_DEVICE_INFO" },
+	{ MEDIA_IOC_ENUM_ENTITIES,	"MEDIA_IOC_ENUM_ENTITIES" },
+	{ MEDIA_IOC_ENUM_LINKS,	"MEDIA_IOC_ENUM_LINKS" },
+	{ MEDIA_IOC_SETUP_LINK,	"MEDIA_IOC_SETUP_LINK" },
+	{ MEDIA_IOC_G_TOPOLOGY,	"MEDIA_IOC_G_TOPOLOGY" },
+	{ MEDIA_IOC_REQUEST_ALLOC,	"MEDIA_IOC_REQUEST_ALLOC" },
+	{ MEDIA_REQUEST_IOC_QUEUE,	"MEDIA_REQUEST_IOC_QUEUE" },
+	{ MEDIA_REQUEST_IOC_REINIT,	"MEDIA_REQUEST_IOC_REINIT" },
+	{ -1, "" }
+};
+
+#endif
-- 
2.41.0





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux