mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-17 21:23:53 +00:00
[PR #1212] [MERGED] [IMPROVEMENT] Clean up SCC control codes #2008
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:scc-control-code-cleanup📝 Commits (2)
cae53a9scc: Reformat control code listac94ceascc: 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):
My familiarity with the project is as follows (check one):
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
difffor 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.