Repository navigation
Conversation
|
@cfsmp3 Small fix: the CEA-708 SCC header was written after the first caption, so CCExtractor couldn't read its own 708 SCC files back. Repro and before/after output are in the description. Could you take a look when you have time? Thanks! |
0eed7bd to
38fce3e
Compare
cfsmp3
left a comment
There was a problem hiding this comment.
This is Carlos' claude doing the first pass. Before Carlos takes a look, please address these issues.
The fix is correct. I ran 34 of our samples with 708 captions through --service all --out=scc on master and on this branch:
- 31 SCC files differ only in that the header moved to the top.
- 5 files already started with the header and are unchanged.
- No new or missing files. In particular, no header-only files appear for services whose first screen is empty.
- Reading the files back: all 36 of this branch's 708 SCC files give captions, against 5 of master's.
One thing to fix:
- Braces. The new
if (tv->cc_count == 1)indtvcc_write_scc()(src/lib_ccx/ccx_decoders_708_output.c:525) needs{ }arounddtvcc_write_scc_header(tv, encoder);. The project requires braces on everyifbody.
38fce3e to
fff242e
Compare
|
Thanks for the review. Updated in fff242e:
|
CCExtractor CI platform finished running the test files on linux. 171/238 tests matched the approved output:
67 tests do not match the approved output. That is the pass/fail verdict. Whether this branch caused it is a separate question, answered below.
Compared with the tip of master — test 10124, commit 034fdbc:
Compared with the commit this branch was cut from: the same run as the tip of master (test 10124), so the comparison above already covers it. No test changes behaviour relative to the tip of master: every failure above fails there too, byte for byte. The approved output for those tests is out of date, which is a baseline to review rather than a regression in this branch. |
CCExtractor CI platform finished running the test files on windows. 171/238 tests matched the approved output:
67 tests do not match the approved output. That is the pass/fail verdict. Whether this branch caused it is a separate question, answered below.
Compared with the tip of master — test 10125, commit 034fdbc:
Compared with the commit this branch was cut from: the same run as the tip of master (test 10125), so the comparison above already covers it. No test changes behaviour relative to the tip of master: every failure above fails there too, byte for byte. The approved output for those tests is out of date, which is a baseline to review rather than a regression in this branch. |
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Repro instructions:
Sample: c83f765c…06cd.ts (has CEA-708 service 1).
On master
604dad8e:Reading that file back with CCExtractor prints
No captions were found in input., because SCC input is only detected when the file starts withScenarist_SCC V1.0(stream_functions.c/stream_functions.rs).With this PR:
and reading it back gives
Detected SCC (Scenarist Closed Caption) formatand the captions (( explosion )at00:00:00,835, ...).Problem
CEA-708 SCC output writes the
Scenarist_SCC V1.0header after the first caption instead of as the first line. The file is not a valid SCC file, and CCExtractor itself can't read it back.Root cause
write_sccwrites the header whencc_count == 2.cc_countis increased once per printed screen, right before the write, so it is 1 for the first caption and 2 for the second. The C writer (dtvcc_write_scc) has the same check.Fix
Write the header when
cc_count == 1, and do it before the "screen is empty" and "starts before zero" early returns, so it is still the first line if the first printed screen happens to be empty. Same change in the Rust writer and in the C writer.Tests
tv_screen.rs: header comes first on the first screen, is not repeated on the second, and is written even when the first screen is empty. All 3 fail on master and pass with the fix.cargo test: 444 passed (src/rust), 101 passed (lib_ccxr).cargo fmt --checkandcargo clippy -- -D warningsare clean in both crates.Note: #2466 (mine,
--delayfor 708) touches the lines right below the header check inwrite_scc. Whichever is merged second needs a small rebase, which I'll do.