summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2023-05-05 15:17:16 +1000
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-05-10 00:52:01 +0000
commit21b232ce3056bfd449e1757e856dbd5262ce2ed4 (patch)
treee3992d6b9d5fe714c6bd9a8ffd3ecca1cfc4bbe2
parent4e8af5c41d65cfed2c39b38da70daa0da0dc7a83 (diff)
downloadgstreamer-21b232ce3056bfd449e1757e856dbd5262ce2ed4.tar.gz
closedcaption: write 0x00 padding instead of 0x80 in cc_data/cdp
Depending on the exact output format, 0x00 may be a better default for padding than 0x80. 0x00 is the recommended padding value when used in CDP (and cc_data) but is not when used in s334-1a. See CTA-708-E 4.3.5 amd SMPTE 334-1-2007 5.3.2. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4578>
-rw-r--r--subprojects/gst-plugins-bad/ext/closedcaption/ccutils.c15
-rw-r--r--subprojects/gst-plugins-bad/ext/closedcaption/ccutils.h1
-rw-r--r--subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c15
-rw-r--r--subprojects/gst-plugins-bad/ext/closedcaption/gstccconverter.c15
-rw-r--r--subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c2
-rw-r--r--subprojects/gst-plugins-bad/tests/check/elements/cccombiner.c2
-rw-r--r--subprojects/gst-plugins-bad/tests/check/elements/ccconverter.c40
7 files changed, 48 insertions, 42 deletions
diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.c b/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.c
index 455a93e48e..84f73632c1 100644
--- a/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.c
+++ b/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.c
@@ -859,12 +859,13 @@ cc_buffer_take_separated (CCBuffer * buf,
void
cc_buffer_take_cc_data (CCBuffer * buf,
- const struct cdp_fps_entry *fps_entry, guint8 * cc_data,
- guint * cc_data_len)
+ const struct cdp_fps_entry *fps_entry, gboolean nul_padding,
+ guint8 * cc_data, guint * cc_data_len)
{
guint write_cea608_1_size, write_cea608_2_size, write_ccp_size;
guint field1_padding, field2_padding;
gboolean wrote_first;
+ guint8 padding_byte = nul_padding ? 0x00 : 0x80;
cc_buffer_get_out_sizes (buf, fps_entry, &write_cea608_1_size,
&field1_padding, &write_cea608_2_size, &field2_padding, &write_ccp_size);
@@ -897,11 +898,13 @@ cc_buffer_take_cc_data (CCBuffer * buf,
GST_TRACE_OBJECT (buf, "writing valid field1 padding because "
"we need to write valid field2");
cc_data[out_i++] = 0xfc;
+ cc_data[out_i++] = 0x80;
+ cc_data[out_i++] = 0x80;
} else {
cc_data[out_i++] = 0xf8;
+ cc_data[out_i++] = padding_byte;
+ cc_data[out_i++] = padding_byte;
}
- cc_data[out_i++] = 0x80;
- cc_data[out_i++] = 0x80;
cea608_1_i += 2;
buf->last_cea608_written_was_field1 = TRUE;
}
@@ -915,8 +918,8 @@ cc_buffer_take_cc_data (CCBuffer * buf,
buf->last_cea608_written_was_field1 = FALSE;
} else if (cea608_2_i < write_cea608_2_size + field2_padding) {
cc_data[out_i++] = 0xf9;
- cc_data[out_i++] = 0x80;
- cc_data[out_i++] = 0x80;
+ cc_data[out_i++] = padding_byte;
+ cc_data[out_i++] = padding_byte;
cea608_2_i += 2;
buf->last_cea608_written_was_field1 = FALSE;
}
diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.h b/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.h
index c5374a41a8..4c745822f1 100644
--- a/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.h
+++ b/subprojects/gst-plugins-bad/ext/closedcaption/ccutils.h
@@ -99,6 +99,7 @@ gboolean cc_buffer_push_cc_data (CCBuffer * buf,
G_GNUC_INTERNAL
void cc_buffer_take_cc_data (CCBuffer * buf,
const struct cdp_fps_entry * fps_entry,
+ gboolean nul_padding,
guint8 * cc_data,
guint * cc_data_len);
G_GNUC_INTERNAL
diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c
index 743f444bab..743cc65c0d 100644
--- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c
+++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c
@@ -156,7 +156,8 @@ write_cc_data_to (GstCCCombiner * self, GstBuffer * buffer)
gst_buffer_map (buffer, &map, GST_MAP_WRITE);
len = map.size;
- cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, map.data, &len);
+ cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, TRUE, map.data,
+ &len);
gst_buffer_unmap (buffer, &map);
gst_buffer_set_size (buffer, len);
}
@@ -187,8 +188,8 @@ take_s334_both_fields (GstCCCombiner * self, GstBuffer * buffer)
gst_buffer_map (buffer, &out, GST_MAP_READWRITE);
cc_data_len = out.size;
- cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, out.data,
- &cc_data_len);
+ cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, FALSE,
+ out.data, &cc_data_len);
s334_len = drop_ccp_from_cc_data (out.data, cc_data_len);
if (s334_len < 0) {
s334_len = 0;
@@ -350,16 +351,16 @@ dequeue_caption (GstCCCombiner * self, GstVideoTimeCode * tc, gboolean drain)
if (GST_BUFFER_FLAG_IS_SET (self->current_video_buffer,
GST_VIDEO_BUFFER_FLAG_INTERLACED)) {
if (!GST_VIDEO_BUFFER_IS_BOTTOM_FIELD (self->current_video_buffer)) {
- cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, cc_data,
- &cc_data_len);
+ cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, TRUE,
+ cc_data, &cc_data_len);
caption_data.buffer =
make_cdp_buffer (self, cc_data, cc_data_len, self->cdp_fps_entry,
tc);
g_array_append_val (self->current_frame_captions, caption_data);
}
} else {
- cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, cc_data,
- &cc_data_len);
+ cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, TRUE,
+ cc_data, &cc_data_len);
caption_data.buffer =
make_cdp_buffer (self, cc_data, cc_data_len, self->cdp_fps_entry,
tc);
diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstccconverter.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstccconverter.c
index 308df65152..98784c887c 100644
--- a/subprojects/gst-plugins-bad/ext/closedcaption/gstccconverter.c
+++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstccconverter.c
@@ -901,7 +901,7 @@ convert_cea608_raw_cea708_cdp (GstCCConverter * self, GstBuffer * inbuf,
tc_meta ? &tc_meta->tc : NULL, &self->current_output_timecode))
goto drop;
- cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, cc_data,
+ cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, TRUE, cc_data,
&cc_data_len);
gst_buffer_map (outbuf, &out, GST_MAP_WRITE);
@@ -1062,7 +1062,7 @@ convert_cea608_s334_1a_cea708_cdp (GstCCConverter * self, GstBuffer * inbuf,
tc_meta ? &tc_meta->tc : NULL, &self->current_output_timecode))
goto drop;
- cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, cc_data,
+ cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, TRUE, cc_data,
&cc_data_len);
gst_buffer_map (outbuf, &out, GST_MAP_WRITE);
@@ -1202,7 +1202,7 @@ convert_cea708_cc_data_cea708_cdp (GstCCConverter * self, GstBuffer * inbuf,
tc_meta ? &tc_meta->tc : NULL, &self->current_output_timecode))
goto drop;
- cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, cc_data,
+ cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, TRUE, cc_data,
&cc_data_len);
gst_buffer_map (outbuf, &out, GST_MAP_WRITE);
@@ -1296,8 +1296,8 @@ convert_cea708_cdp_cea608_s334_1a (GstCCConverter * self, GstBuffer * inbuf,
gst_buffer_map (outbuf, &out, GST_MAP_READWRITE);
cc_data_len = out.size;
- cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, out.data,
- &cc_data_len);
+ cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, FALSE,
+ out.data, &cc_data_len);
s334_len = drop_ccp_from_cc_data (out.data, cc_data_len);
if (s334_len < 0)
goto drop;
@@ -1348,7 +1348,8 @@ convert_cea708_cdp_cea708_cc_data (GstCCConverter * self, GstBuffer * inbuf,
gst_buffer_map (outbuf, &out, GST_MAP_WRITE);
out_len = (guint) out.size;
- cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, out.data, &out_len);
+ cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, TRUE, out.data,
+ &out_len);
gst_buffer_unmap (outbuf, &out);
self->output_frames++;
@@ -1387,7 +1388,7 @@ convert_cea708_cdp_cea708_cdp (GstCCConverter * self, GstBuffer * inbuf,
&self->current_output_timecode))
goto out;
- cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, cc_data,
+ cc_buffer_take_cc_data (self->cc_buffer, out_fps_entry, TRUE, cc_data,
&cc_data_len);
gst_buffer_map (outbuf, &out, GST_MAP_WRITE);
diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c
index f84de7c6e3..d897b482ac 100644
--- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c
+++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c
@@ -190,7 +190,7 @@ take_s334_both_fields (GstCea608Mux * self, GstBuffer * buffer)
gst_buffer_map (buffer, &out, GST_MAP_READWRITE);
cc_data_len = out.size;
- cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, out.data,
+ cc_buffer_take_cc_data (self->cc_buffer, self->cdp_fps_entry, FALSE, out.data,
&cc_data_len);
s334_len = drop_ccp_from_cc_data (out.data, cc_data_len);
if (s334_len < 0) {
diff --git a/subprojects/gst-plugins-bad/tests/check/elements/cccombiner.c b/subprojects/gst-plugins-bad/tests/check/elements/cccombiner.c
index 89d5368775..74894722ad 100644
--- a/subprojects/gst-plugins-bad/tests/check/elements/cccombiner.c
+++ b/subprojects/gst-plugins-bad/tests/check/elements/cccombiner.c
@@ -252,7 +252,7 @@ GST_START_TEST (captions_no_output_padding_60fps_608_field1_only)
if ((i % 2) == 1) {
fail_unless_equals_int (meta->data[j], cc_data[j]);
} else {
- int padding_field2[] = { 0xf9, 0x80, 0x80 };
+ int padding_field2[] = { 0xf9, 0x00, 0x00 };
fail_unless_equals_int (meta->data[j], padding_field2[j]);
}
}
diff --git a/subprojects/gst-plugins-bad/tests/check/elements/ccconverter.c b/subprojects/gst-plugins-bad/tests/check/elements/ccconverter.c
index fb1e276d7b..36b4c7e83a 100644
--- a/subprojects/gst-plugins-bad/tests/check/elements/ccconverter.c
+++ b/subprojects/gst-plugins-bad/tests/check/elements/ccconverter.c
@@ -360,7 +360,7 @@ GST_START_TEST (convert_cea608_raw_cea708_cdp)
0xfa, 0x00, 0x00, 0x74, 0x00, 0x00, 0x6b
};
const guint8 out2[] =
- { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x01, 0x72, 0xea, 0xf9, 0x80, 0x80,
+ { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x01, 0x72, 0xea, 0xf9, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0x74, 0x00, 0x01, 0x6f
@@ -415,14 +415,14 @@ GST_END_TEST;
GST_START_TEST (convert_cea608_s334_1a_cea708_cdp)
{
- const guint8 in[] = { 0x80, 0x80, 0x80, 0x00, 0x80, 0x80 };
+ const guint8 in[] = { 0x80, 0x81, 0x82, 0x00, 0x83, 0x84 };
const guint8 out[] =
- { 0x96, 0x69, 0x49, 0x5f, 0x43, 0x00, 0x00, 0x72, 0xf4, 0xf8, 0x80, 0x80,
- 0xf9, 0x80, 0x80, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
+ { 0x96, 0x69, 0x49, 0x5f, 0x43, 0x00, 0x00, 0x72, 0xf4, 0xfc, 0x81, 0x82,
+ 0xfd, 0x83, 0x84, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
- 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0x74, 0x00, 0x00, 0xb7
+ 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0x74, 0x00, 0x00, 0xa5
};
check_conversion (in, sizeof (in), out, sizeof (out),
"closedcaption/x-cea-608,format=(string)s334-1a,framerate=(fraction)30/1",
@@ -458,7 +458,7 @@ GST_START_TEST (convert_cea708_cc_data_cea708_cdp)
{
const guint8 in[] = { 0xfc, 0x80, 0x80, 0xfe, 0x80, 0x80 };
const guint8 out[] =
- { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x00, 0x72, 0xea, 0xf8, 0x80, 0x80,
+ { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x00, 0x72, 0xea, 0xf8, 0x00, 0x00,
0xfe, 0x80, 0x80, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0x74, 0x00, 0x00, 0x6e
@@ -512,7 +512,7 @@ GST_START_TEST (convert_cea708_cdp_cea708_cc_data)
{ 0x96, 0x69, 0x13, 0x5f, 0x43, 0x00, 0x00, 0x72, 0xe2, 0xfc, 0x80, 0x80,
0xfd, 0x80, 0x80, 0x74, 0x00, 0x00, 0x8a
};
- const guint8 out[] = { 0xf8, 0x80, 0x80, 0xf9, 0x80, 0x80 };
+ const guint8 out[] = { 0xf8, 0x00, 0x00, 0xf9, 0x00, 0x00 };
check_conversion_tc_passthrough (in, sizeof (in), out, sizeof (out),
"closedcaption/x-cea-708,format=(string)cdp,framerate=30/1",
"closedcaption/x-cea-708,format=(string)cc_data");
@@ -524,7 +524,7 @@ GST_START_TEST (convert_cea708_cdp_cea708_cc_data_too_big)
{
/* tests that too large input is truncated */
const guint8 in[] =
- { 0x96, 0x69, 0x4c, 0x8f, 0x43, 0x00, 0x00, 0x72, 0xf5, 0xfc, 0x80, 0x80,
+ { 0x96, 0x69, 0x4c, 0x8f, 0x43, 0x00, 0x00, 0x72, 0xf5, 0xfc, 0x81, 0x82,
0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80,
0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80,
0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80,
@@ -532,7 +532,7 @@ GST_START_TEST (convert_cea708_cdp_cea708_cc_data_too_big)
0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80,
0x74, 0x00, 0x00, 0x8a,
};
- const guint8 out[] = { 0xf8, 0x80, 0x80, 0xf9, 0x80, 0x80, 0xfe, 0x80, 0x80,
+ const guint8 out[] = { 0xfc, 0x81, 0x82, 0xf9, 0x00, 0x00, 0xfe, 0x80, 0x80,
0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80,
0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80,
0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80,
@@ -679,7 +679,7 @@ GST_START_TEST (convert_cea708_cdp_cea708_cdp_max_merge)
const guint8 out1[] =
{ 0x96, 0x69, 0x58, 0x1f, 0x43, 0x00, 0x00, 0x72, 0xf9, 0xfc, 0x01, 0x02,
- 0xf9, 0x80, 0x80, 0xfc, 0x01, 0x02, 0xfe, 0x03, 0x04, 0xfe, 0x05, 0x06,
+ 0xf9, 0x00, 0x00, 0xfc, 0x01, 0x02, 0xfe, 0x03, 0x04, 0xfe, 0x05, 0x06,
0xfe, 0x07, 0x08, 0xfe, 0x09, 0x0a, 0xfe, 0x0b, 0x0c, 0xfe, 0x0d, 0x0e,
0xfe, 0x0f, 0x10, 0xfe, 0x11, 0x12, 0xfe, 0x13, 0x14, 0xfe, 0x03, 0x04,
0xfe, 0x05, 0x06, 0xfe, 0x07, 0x08, 0xfe, 0x09, 0x0a, 0xfe, 0x0b, 0x0c,
@@ -688,8 +688,8 @@ GST_START_TEST (convert_cea708_cdp_cea708_cdp_max_merge)
0x74, 0x00, 0x00, 0xcb
};
const guint8 out2[] =
- { 0x96, 0x69, 0x58, 0x1f, 0x43, 0x00, 0x01, 0x72, 0xf9, 0xf9, 0x80, 0x80,
- 0xfc, 0x01, 0x02, 0xf9, 0x80, 0x80, 0xfe, 0x0b, 0x0c, 0xfe, 0x0d, 0x0e,
+ { 0x96, 0x69, 0x58, 0x1f, 0x43, 0x00, 0x01, 0x72, 0xf9, 0xf9, 0x00, 0x00,
+ 0xfc, 0x01, 0x02, 0xf9, 0x00, 0x00, 0xfe, 0x0b, 0x0c, 0xfe, 0x0d, 0x0e,
0xfe, 0x0f, 0x10, 0xfe, 0x11, 0x12, 0xfe, 0x13, 0x14, 0xfe, 0x03, 0x04,
0xfe, 0x05, 0x06, 0xfe, 0x07, 0x08, 0xfe, 0x09, 0x0a, 0xfe, 0x0b, 0x0c,
0xfe, 0x0d, 0x0e, 0xfe, 0x0f, 0x10, 0xfe, 0x11, 0x12, 0xfe, 0x13, 0x14,
@@ -813,7 +813,7 @@ GST_START_TEST (convert_cea708_cdp_cea708_cdp_from_drop_frame_scaling)
const guint8 out1[] =
{ 0x96, 0x69, 0x4e, 0x5f, 0xc3, 0x00, 0x00, 0x71, 0xc0, 0x81, 0x59, 0x29,
- 0x72, 0xf4, 0xf8, 0x80, 0x80, 0xf9, 0x80, 0x80, 0xfa, 0x00, 0x00, 0xfa,
+ 0x72, 0xf4, 0xf8, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
@@ -822,7 +822,7 @@ GST_START_TEST (convert_cea708_cdp_cea708_cdp_from_drop_frame_scaling)
};
const guint8 out2[] =
{ 0x96, 0x69, 0x4e, 0x5f, 0xc3, 0x00, 0x01, 0x71, 0xc0, 0x82, 0x00, 0x00,
- 0x72, 0xf4, 0xf8, 0x80, 0x80, 0xf9, 0x80, 0x80, 0xfa, 0x00, 0x00, 0xfa,
+ 0x72, 0xf4, 0xf8, 0x00, 0x00, 0xf9, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa,
@@ -917,7 +917,7 @@ GST_START_TEST (convert_cea608_raw_cea708_cdp_double_framerate)
0xfa, 0x00, 0x00, 0x74, 0x00, 0x00, 0x6d
};
const guint8 out2[] =
- { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x01, 0x72, 0xea, 0xf9, 0x80, 0x80,
+ { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x01, 0x72, 0xea, 0xf9, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0x74, 0x00, 0x01, 0x6f
@@ -929,7 +929,7 @@ GST_START_TEST (convert_cea608_raw_cea708_cdp_double_framerate)
0xfa, 0x00, 0x00, 0x74, 0x00, 0x02, 0x65
};
const guint8 out4[] =
- { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x03, 0x72, 0xea, 0xf9, 0x80, 0x80,
+ { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x03, 0x72, 0xea, 0xf9, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0x74, 0x00, 0x03, 0x6b
@@ -1133,7 +1133,7 @@ GST_START_TEST (convert_cea708_cc_data_cea708_cdp_double_input_data)
};
/* padding buffer */
const guint8 out2[] =
- { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x01, 0x72, 0xea, 0xf9, 0x80, 0x80,
+ { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x01, 0x72, 0xea, 0xf9, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0x74, 0x00, 0x01, 0x6f
@@ -1145,7 +1145,7 @@ GST_START_TEST (convert_cea708_cc_data_cea708_cdp_double_input_data)
0xfa, 0x00, 0x00, 0x74, 0x00, 0x02, 0x63
};
const guint8 out4[] =
- { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x03, 0x72, 0xea, 0xf9, 0x80, 0x80,
+ { 0x96, 0x69, 0x2b, 0x8f, 0x43, 0x00, 0x03, 0x72, 0xea, 0xf9, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00, 0xfa, 0x00, 0x00,
0xfa, 0x00, 0x00, 0x74, 0x00, 0x03, 0x6b
@@ -1241,8 +1241,8 @@ GST_START_TEST (convert_cea708_cc_data_cea708_cdp_field1_overflow)
out_data[i * 43 + 11] = in_data[in_data_offset + 2];
} else {
out_data[i * 43 + 9] = 0xf9;
- out_data[i * 43 + 10] = 0x80;
- out_data[i * 43 + 11] = 0x80;
+ out_data[i * 43 + 10] = 0x00;
+ out_data[i * 43 + 11] = 0x00;
}
out_data[i * 43 + 42] = calculate_cdp_checksum (&out_data[i * 43], 42);
out[i] = &out_data[i * 43];