summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/bbb-mpeg2/frames.h850
-rw-r--r--presets.c14
-rw-r--r--v4l2-request-test.c4
3 files changed, 606 insertions, 262 deletions
diff --git a/data/bbb-mpeg2/frames.h b/data/bbb-mpeg2/frames.h
index e58205b..a645883 100644
--- a/data/bbb-mpeg2/frames.h
+++ b/data/bbb-mpeg2/frames.h
@@ -1,16 +1,30 @@
{
.index = 0,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_I,
- .f_code = { 15, 15, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 322288,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_I,
+ .f_code = { 15, 15, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 4,
.forward_ref_index = 0,
.backward_ref_index = 0,
},
@@ -28,16 +42,30 @@
{
.index = 1,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 57544,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 3,
.forward_ref_index = 0,
.backward_ref_index = 1,
},
@@ -55,16 +83,30 @@
{
.index = 2,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 213968,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 1,
.backward_ref_index = 2,
},
@@ -82,16 +124,30 @@
{
.index = 3,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 25288,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 2,
.backward_ref_index = 3,
},
@@ -109,16 +165,30 @@
{
.index = 4,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 16288,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 3,
.backward_ref_index = 4,
},
@@ -136,16 +206,30 @@
{
.index = 5,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 13832,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 4,
.backward_ref_index = 5,
},
@@ -163,16 +247,30 @@
{
.index = 6,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 15232,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 5,
.backward_ref_index = 6,
},
@@ -190,16 +288,30 @@
{
.index = 7,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 15400,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 6,
.backward_ref_index = 7,
},
@@ -217,16 +329,30 @@
{
.index = 8,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 13736,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 7,
.backward_ref_index = 8,
},
@@ -244,16 +370,30 @@
{
.index = 9,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 14088,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 8,
.backward_ref_index = 9,
},
@@ -271,16 +411,30 @@
{
.index = 10,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 12136,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 9,
.backward_ref_index = 10,
},
@@ -298,16 +452,30 @@
{
.index = 11,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 10864,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 10,
.backward_ref_index = 11,
},
@@ -325,16 +493,30 @@
{
.index = 12,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 9976,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 11,
.backward_ref_index = 12,
},
@@ -352,16 +534,30 @@
{
.index = 13,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 8976,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 12,
.backward_ref_index = 13,
},
@@ -379,16 +575,30 @@
{
.index = 14,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 7, 7, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 488824,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 7, 7, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 3,
.forward_ref_index = 13,
.backward_ref_index = 14,
},
@@ -406,16 +616,30 @@
{
.index = 15,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_I,
- .f_code = { 15, 15, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 471208,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_I,
+ .f_code = { 15, 15, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 3,
.forward_ref_index = 15,
.backward_ref_index = 15,
},
@@ -433,16 +657,30 @@
{
.index = 16,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 82360,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 15,
.backward_ref_index = 16,
},
@@ -460,16 +698,30 @@
{
.index = 17,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 35744,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 16,
.backward_ref_index = 17,
},
@@ -487,16 +739,30 @@
{
.index = 18,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 60080,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 17,
.backward_ref_index = 18,
},
@@ -514,16 +780,30 @@
{
.index = 19,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 38880,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 18,
.backward_ref_index = 19,
},
@@ -541,16 +821,30 @@
{
.index = 20,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 68640,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 19,
.backward_ref_index = 20,
},
@@ -568,16 +862,30 @@
{
.index = 21,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 57568,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 20,
.backward_ref_index = 21,
},
@@ -595,16 +903,30 @@
{
.index = 22,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 68352,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 21,
.backward_ref_index = 22,
},
@@ -622,16 +944,30 @@
{
.index = 23,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 88392,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 22,
.backward_ref_index = 23,
},
@@ -649,16 +985,30 @@
{
.index = 24,
.frame.mpeg2.slice_params = {
- .slice_type = V4L2_MPEG2_SLICE_TYPE_P,
- .f_code = { 1, 1, 15, 15 },
- .intra_dc_precision = 0,
- .picture_structure = 3,
- .top_field_first = 0,
- .frame_pred_frame_dct = 1,
- .concealment_motion_vectors = 0,
- .q_scale_type = 0,
- .intra_vlc_format = 0,
- .alternate_scan = 0,
+ .bit_size = 67136,
+ .data_bit_offset = 0,
+ .sequence = {
+ .horizontal_size = 854,
+ .vertical_size = 480,
+ .vbv_buffer_size = 1048576,
+ .profile_and_level_indication = 0,
+ .chroma_format = 1,
+ },
+ .picture = {
+ .picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_P,
+ .f_code = { 1, 1, 15, 15 },
+ .intra_dc_precision = 0,
+ .picture_structure = 3,
+ .top_field_first = 0,
+ .frame_pred_frame_dct = 1,
+ .concealment_motion_vectors = 0,
+ .q_scale_type = 0,
+ .intra_vlc_format = 0,
+ .alternate_scan = 0,
+ .repeat_first_field = 0,
+ .progressive_frame = 1,
+ },
+ .quantiser_scale_code = 2,
.forward_ref_index = 23,
.backward_ref_index = 24,
},
diff --git a/presets.c b/presets.c
index 61bd5c7..8d341ac 100644
--- a/presets.c
+++ b/presets.c
@@ -176,12 +176,6 @@ int frame_controls_fill(struct frame *frame, struct preset *preset,
switch (preset->type) {
case CODEC_TYPE_MPEG2:
- frame->frame.mpeg2.slice_params.slice_pos = 0;
- frame->frame.mpeg2.slice_params.slice_len = slice_size * 8;
-
- frame->frame.mpeg2.slice_params.width = preset->width;
- frame->frame.mpeg2.slice_params.height = preset->height;
-
frame->frame.mpeg2.slice_params.forward_ref_index %=
buffers_count;
frame->frame.mpeg2.slice_params.backward_ref_index %=
@@ -203,12 +197,12 @@ unsigned int frame_pct(struct preset *preset, unsigned int index)
switch (preset->type) {
case CODEC_TYPE_MPEG2:
- switch (preset->frames[index].frame.mpeg2.slice_params.slice_type) {
- case V4L2_MPEG2_SLICE_TYPE_I:
+ switch (preset->frames[index].frame.mpeg2.slice_params.picture.picture_coding_type) {
+ case V4L2_MPEG2_PICTURE_CODING_TYPE_I:
return PCT_I;
- case V4L2_MPEG2_SLICE_TYPE_P:
+ case V4L2_MPEG2_PICTURE_CODING_TYPE_P:
return PCT_P;
- case V4L2_MPEG2_SLICE_TYPE_B:
+ case V4L2_MPEG2_PICTURE_CODING_TYPE_B:
return PCT_B;
default:
return PCT_I;
diff --git a/v4l2-request-test.c b/v4l2-request-test.c
index a17ecff..a6c81d0 100644
--- a/v4l2-request-test.c
+++ b/v4l2-request-test.c
@@ -47,8 +47,8 @@ struct format_description formats[] = {
.bpp = 16,
},
{
- .description = "MB32-tiled NV12 YUV",
- .v4l2_format = V4L2_PIX_FMT_MB32_NV12,
+ .description = "Sunxi Tiled NV12 YUV",
+ .v4l2_format = V4L2_PIX_FMT_SUNXI_TILED_NV12,
.v4l2_buffers_count = 1,
.drm_format = DRM_FORMAT_NV12,
.drm_modifier = DRM_FORMAT_MOD_ALLWINNER_MB32_TILED,