/* * For sliced VBI output, we set up to use VIP-1.1, 8-bit mode, * NN counts 1 byte Dwords, an IDID with the VBI line # in it. * Thus, according to the VIP-2 Spec, our VBI ancillary data lines * (should!) look like: * 4 byte EAV code: 0xff 0x00 0x00 0xRP * unknown number of possible idle bytes * 3 byte Anc data preamble: 0x00 0xff 0xff * 1 byte data identifier: ne010iii (parity bits, 010, DID bits) * 1 byte secondary data id: nessssss (parity bits, SDID bits) * 1 byte data word count: necccccc (parity bits, NN Dword count) * 2 byte Internal DID: VBI-line-# 0x80 * NN data bytes * 1 byte checksum * Fill bytes needed to fil out to 4*NN bytes of payload * * The RP codes for EAVs when in VIP-1.1 mode, not in raw mode, & * in the vertical blanking interval are: * 0xb0 (Task 0 VerticalBlank HorizontalBlank 0 0 0 0) * 0xf0 (Task EvenField VerticalBlank HorizontalBlank 0 0 0 0) * * Since the V bit is only allowed to toggle in the EAV RP code, just * before the first active region line and for active lines, they are: * 0x90 (Task 0 0 HorizontalBlank 0 0 0 0) * 0xd0 (Task EvenField 0 HorizontalBlank 0 0 0 0) * * The user application DID bytes we care about are: * 0x91 (1 0 010 0 !ActiveLine AncDataPresent) * 0x55 (0 1 010 2ndField !ActiveLine AncDataPresent) *
*/ staticconst u8 sliced_vbi_did[2] = { 0x91, 0x55 };
struct vbi_anc_data { /* u8 eav[4]; */ /* u8 idle[]; Variable number of idle bytes */
u8 preamble[3];
u8 did;
u8 sdid;
u8 data_count;
u8 idid[2];
u8 payload[]; /* data_count of payload */ /* u8 checksum; */ /* u8 fill[]; Variable number of fill bytes */
};
/* Force impossible lines to 0 */ if (is_pal) { for (i = 0; i <= 6; i++)
svbi->service_lines[0][i] =
svbi->service_lines[1][i] = 0;
} else { for (i = 0; i <= 9; i++)
svbi->service_lines[0][i] =
svbi->service_lines[1][i] = 0;
for (i = 22; i <= 23; i++)
svbi->service_lines[0][i] =
svbi->service_lines[1][i] = 0;
}
/* Build register values for requested service lines */ for (i = 7; i <= 23; i++) { for (x = 0; x <= 1; x++) { switch (svbi->service_lines[1-x][i]) { case V4L2_SLICED_TELETEXT_B:
lcr[i] |= 1 << (4 * x); break; case V4L2_SLICED_WSS_625:
lcr[i] |= 4 << (4 * x); break; case V4L2_SLICED_CAPTION_525:
lcr[i] |= 6 << (4 * x); break; case V4L2_SLICED_VPS:
lcr[i] |= 9 << (4 * x); break;
}
}
}
if (is_pal) { for (x = 1, i = 0x424; i <= 0x434; i++, x++)
cx18_av_write(cx, i, lcr[6 + x]);
} else { for (x = 1, i = 0x424; i <= 0x430; i++, x++)
cx18_av_write(cx, i, lcr[9 + x]); for (i = 0x431; i <= 0x434; i++)
cx18_av_write(cx, i, 0);
}
cx18_av_write(cx, 0x43c, 0x16); /* Should match vblank set in cx18_av_std_setup() */
cx18_av_write(cx, 0x474, is_pal ? 38 : 26); return 0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.