Opened 9 years ago

Closed 8 years ago

#9772 closed Patch - Feature (fixed)

EIA-608 closed caption colors

Reported by: Jim Stichnoth <stichnot@…> Owned by: danielk
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This patch adds support for colors, italics, and underlining to EIA-608 closed captions. (Sorry to say that I didn't add flashing support...)

Currently only intra-line formatting is supported, and not formatting associated with preamble address codes, as I haven't seen any examples of the latter in my testing.

In an ideal implementation, each character would be decorated with color/italic/underline attributes which would be extracted by the caption renderer. However, this approach looked like it would involve fairly major changes, so I took a different approach. Formatting commands are embedded into the caption string as two-character control sequences like "%a", "%b", etc. for the renderer to decode. This works well in practice, but might cause anomalies with backspacing and direct addressing via preamble address codes.

See also [85a5266e1].

Attachments (5)

cc608_colors_v1.patch (9.4 KB) - added by Jim Stichnoth <stichnot@…> 9 years ago.
cc608_colors_v2.patch (9.5 KB) - added by Jim Stichnoth <stichnot@…> 9 years ago.
Fix a bug exposed by roll-up captions.
cc608_colors_v3.patch (14.4 KB) - added by Jim Stichnoth <stichnot@…> 9 years ago.
Add support for preamble address codes.
cc608_colors_v4.patch (14.4 KB) - added by Jim Stichnoth <stichnot@…> 8 years ago.
Updated version.
cc608_colors_v5.patch (14.4 KB) - added by Jim Stichnoth <stichnot@…> 8 years ago.
Change VERBOSE() to LOG().

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by Jim Stichnoth <stichnot@…>

Attachment: cc608_colors_v1.patch added

Changed 9 years ago by Jim Stichnoth <stichnot@…>

Attachment: cc608_colors_v2.patch added

Fix a bug exposed by roll-up captions.

Changed 9 years ago by Jim Stichnoth <stichnot@…>

Attachment: cc608_colors_v3.patch added

Add support for preamble address codes.

comment:1 Changed 9 years ago by Jim Stichnoth <stichnot@…>

Revised patch adds support for formatting via preamble address codes.

Also, changes the internal buffer representation of a format control character to a single QChar in the arbitrarily chosen 0x70nn range, instead of a "%n" pair of characters.

At this point, the caption colors and italics look nice. The mpeg2-ts test file http://ncamftp.wgbh.org/DTV/CEA%20test%20material/Iteration_1/CEAv1.2zero.trp located by faginbagin seems to display captions correctly as intended, except for two strings "biu" (blue/italic/underline) and "giu" (green/italic/underline), but I believe the test file is wrong and the implementation correctly follows the spec.

BTW, when creating the ticket, I forgot to set the component (my best guess is video/osd rendering), in case someone wants to update it.

Changed 8 years ago by Jim Stichnoth <stichnot@…>

Attachment: cc608_colors_v4.patch added

Updated version.

Changed 8 years ago by Jim Stichnoth <stichnot@…>

Attachment: cc608_colors_v5.patch added

Change VERBOSE() to LOG().

comment:2 Changed 8 years ago by Raymond Wagner

Owner: set to danielk
Status: newassigned

comment:3 Changed 8 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: assignedclosed

Fixes #9772. Applies patch by Jim Stichnoth to for CEA-608 to add color, italic and underline support.

Branch: master Changeset: 11adb5bf74bbf0326691f40b8c588e01d73febe2

Note: See TracTickets for help on using tickets.