Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Q] Conversion of SCC file containing Field 2 (CC3/4), including PAC codes #18

Open
bbgdzxng1 opened this issue Nov 16, 2023 · 0 comments

Comments

@bbgdzxng1
Copy link

Firstly, many thanks to Rob & Co for sharing caption-inspector with the open source community. I've been using caption-inspector for a few years for field 1 data.

However, recently I have been attempting to decode SCC files containing field 2 (CC3/4) data with caption-inspector.

Test Case - Field 1(CC1/2) only

Below is a test case containing.
CC1: AAAAAAAA
CC2: aaaaaaaa

Scenarist_SCC V1.0

00:00:00;00 9420 94ae 9140 c1c1 c1c1 c1c1 c1c1 942f 1c20 1cae 1940 6161 6161 6161 6161 1c2f

✅ This successfully decodes to CC1/2 as expected.

Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field1-C1 - Channel: 1
00:00:00:00 - {RCL} {ENM} {R1:White} "AAAAAAAA"
00:00:00:07 - {EOC}

Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field1-C2 - Channel: 2
00:00:00:08 - {RCL} {ENM} {R1:White} "aaaaaaaa"
00:00:00:15 - {EOC}

Test Case - Field 2(CC3/4) only, containing PAC codes

If I take a field 2 CC3/4 equivalent test case containing:
CC3: XXXXXXXX
CC4: xxxxxxxx

Scenarist_SCC V1.0

00:00:00;00 1520 15ae 9140 5858 5858 5858 5858 152f 9d20 9dae 1940 f8f8 f8f8 f8f8 f8f8 9d2f

❌ The field 2 SCC file does not decode as expected. The PAC codes {R1:White} 9140 and 1940 are interpreted as always belonging to field 1, and instead of producing a decode containing CC3/4, caption-inspector extracts the PAC and payload as if they belong in field 1/CC1&2.

Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field2-C1 - Channel: 1 {R1:White} "XXXXXXXX

Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field2-C2 - Channel: 2 {R1:White} "xxxxxxxx

Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field2-C3 - Channel: 3
00:00:00:00 - {RCL} {ENM}
00:00:00:07 - {EOC}

Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field2-C4 - Channel: 4
00:00:00:08 - {RCL} {ENM}
00:00:00:15 - {EOC}

I believe that PAC codes {R1:White} 9140 and 1940 codes are correct, even when used in Field 2. I have cross referenced against McPoodle's 7 bit parity tables, which although is not anything near a reference implementation of SCC/608, but is at least an independent 3rd party interpretation of CTA-608 / Title 47.

✅ Removing the PAC codes from a field 2 SCC file results in an expected decode on channels 3 & 4

Scenarist_SCC V1.0

00:00:00;00 1520 15ae 5858 5858 5858 5858 152f 9d20 9dae f8f8 f8f8 f8f8 f8f8 9d2f
Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field2-without-pac-C3 - Channel: 3
00:00:00:00 - {RCL} {ENM} "XXXXXXXX"
00:00:00:06 - {EOC}

Decoded Line 21 / CEA-608 for Asset: ./captioninspector/field2-without-pac-C4 - Channel: 4
00:00:00:07 - {RCL} {ENM} "xxxxxxxx"
00:00:00:13 - {EOC}

Although it is noted that even this final example without PAC codes, caption-inspector reports Channel/Field Mismatch on an SCC file containing Field 2 data.

$ grep -i 'ERROR' "./captioninspector/field2-without-pac.dbg"
ERROR DBG_608_DEC [line21_decode.c:441] - Channel/Field Mismatch: Chan - 3 Field - 0
ERROR DBG_CCD_OUT [cc_data_output.c:396] - Channel/Field Mismatch: Chan - 3 Field - 1 Code - RCL
ERROR DBG_608_DEC [line21_decode.c:441] - Channel/Field Mismatch: Chan - 3 Field - 0
ERROR DBG_CCD_OUT [cc_data_output.c:396] - Channel/Field Mismatch: Chan - 3 Field - 1 Code - ENM
ERROR DBG_608_DEC [line21_decode.c:441] - Channel/Field Mismatch: Chan - 3 Field - 0
ERROR DBG_CCD_OUT [cc_data_output.c:396] - Channel/Field Mismatch: Chan - 3 Field - 1 Code - EOC
ERROR DBG_608_DEC [line21_decode.c:441] - Channel/Field Mismatch: Chan - 4 Field - 0
ERROR DBG_CCD_OUT [cc_data_output.c:396] - Channel/Field Mismatch: Chan - 4 Field - 1 Code - RCL
ERROR DBG_608_DEC [line21_decode.c:441] - Channel/Field Mismatch: Chan - 4 Field - 0
ERROR DBG_CCD_OUT [cc_data_output.c:396] - Channel/Field Mismatch: Chan - 4 Field - 1 Code - ENM
ERROR DBG_608_DEC [line21_decode.c:441] - Channel/Field Mismatch: Chan - 4 Field - 0
ERROR DBG_CCD_OUT [cc_data_output.c:396] - Channel/Field Mismatch: Chan - 4 Field - 1 Code - EOC

Question: Does caption-inspector support field 2(CC3/4) input from SCC/SC2 files or does it assume that all SCC files (and PAC codes therein) are field 1? Or have I misinterpreted how field 2(CC3/4) should be included within an SCC/SC2 file. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant