Skip to content

Commit

Permalink
docs: Add info for scc labels
Browse files Browse the repository at this point in the history
  • Loading branch information
IshanGrover2004 committed Feb 17, 2024
1 parent 9f8991a commit ae7b7ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib_ccx/ccx_decoders_708_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,15 @@ void add_needed_scc_labels(char *buf, int subtitle_count, int count)
switch (subtitle_count)
{
case 1:
// row 15, column 00
sprintf(buf + strlen(buf), " 94e0 94e0");
break;
case 2:
// 9440: row 14, column 00 | 94e0: row 15, column 00
sprintf(buf + strlen(buf), count == 1 ? " 9440 9440" : " 94e0 94e0");
break;
default:
// 13e0: row 13, column 04 | 9440: row 14, column 00 | 94e0: row 15, column 00
sprintf(buf + strlen(buf), count == 1 ? " 13e0 13e0" : (count == 2 ? " 9440 9440" : " 94e0 94e0"));
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/rust/src/decoder/tv_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,20 +384,26 @@ impl dtvcc_tv_screen {
}
fn add_needed_scc_labels(buf: &mut String, subtitle_count: usize, count: usize) {
match subtitle_count {
// row 15, column 00
1 => buf.push_str(" 94e0 94e0"),
2 => {
if count == 1 {
// row 14, column 00
buf.push_str(" 9440 9440");
} else {
// row 15, column 00
buf.push_str(" 94e0 94e0")
}
}
_ => {
if count == 1 {
// row 13, column 04
buf.push_str(" 13e0 13e0");
} else if count == 2 {
// row 14, column 00
buf.push_str(" 9440 9440");
} else {
// row 15, column 00
buf.push_str(" 94e0 94e0")
}
}
Expand Down

0 comments on commit ae7b7ab

Please sign in to comment.