[PR #1212] [MERGED] [IMPROVEMENT] Clean up SCC control codes #2008

Closed
opened 2026-01-29 17:19:45 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1212
Author: @kdrag0n
Created: 1/23/2020
Status: Merged
Merged: 1/23/2020
Merged by: @cfsmp3

Base: masterHead: scc-control-code-cleanup


📝 Commits (2)

  • cae53a9 scc: Reformat control code list
  • ac94cea scc: Revamp control code handling

📊 Changes

1 file changed (+214 additions, -1282 deletions)

View changed files

📝 src/lib_ccx/ccx_encoders_scc.c (+214 -1282)

📄 Description

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

My familiarity with the project is as follows (check one):

  • I have used CCExtractor just a couple of times.

This makes the control code handling more readable by adding a small info struct that contains all the information about a control code (first byte odd & even, second byte, and assembly). Information is stored in and retrieved from an array, created using an array initializer with the enum values as indices.

This allows us to remove the massive switch-case blocks, leading to much cleaner and more streamlined code.

I have verified that the output is identical using diff for both SCC and CCD formats.

Depends on #1211.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1212 **Author:** [@kdrag0n](https://github.com/kdrag0n) **Created:** 1/23/2020 **Status:** ✅ Merged **Merged:** 1/23/2020 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `scc-control-code-cleanup` --- ### 📝 Commits (2) - [`cae53a9`](https://github.com/CCExtractor/ccextractor/commit/cae53a9c68a8bedbb3017f207be4680984164565) scc: Reformat control code list - [`ac94cea`](https://github.com/CCExtractor/ccextractor/commit/ac94ceafb8fd676fc8fc5d5296b3f65b1f719789) scc: Revamp control code handling ### 📊 Changes **1 file changed** (+214 additions, -1282 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/ccx_encoders_scc.c` (+214 -1282) </details> ### 📄 Description **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. **My familiarity with the project is as follows (check one):** - [x] I have used CCExtractor just a couple of times. --- This makes the control code handling more readable by adding a small info struct that contains all the information about a control code (first byte odd & even, second byte, and assembly). Information is stored in and retrieved from an array, created using an array initializer with the enum values as indices. This allows us to remove the massive switch-case blocks, leading to much cleaner and more streamlined code. I have verified that the output is identical using `diff` for both SCC and CCD formats. **Depends on #1211.** --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:19:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2008