mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #1741] [MERGED] Fix Hardsubx OCR #2465
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/1741
Author: @hrideshmg
Created: 8/30/2025
Status: ✅ Merged
Merged: 9/2/2025
Merged by: @prateekmedia
Base:
master← Head:hardsubx_fixes📝 Commits (3)
057671cfix: hardsubx segmentation fault2a54f6ffix: hardsubx garbage output83483c4chore: enable hardsubx on test builds📊 Changes
4 files changed (+20 additions, -16 deletions)
View changed files
📝
.github/workflows/build_linux.yml(+2 -2)📝
docs/CHANGES.TXT(+1 -0)📝
src/rust/src/hardsubx/decoder.rs(+13 -11)📝
src/rust/src/hardsubx/imgops.rs(+4 -3)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
closes #1723
Hardsubx is currently broken on the master branch on Rust.
Fixed a segmentation faults on Linux which was caused by a null pointer dereference in
dispatch_classifier_function, I've added proper error handling to fix this. While here, I also noticed that the values in the match statement for the classifier functions are incorrect, see here. ThepixDilateGray()function also had an incorrect argument, see here.While CCextractor seemed to run after this, the output seemed to be garbled. On running some tests, I found out that the luminance mask was fully white. This is because the Srgb::new() function expects values in the range of
0.0-1.0, however we were passing values from0.0-255.0.I've also enabled hardsubx for the test builds. This is to facilitate adding regression tests on the sample platform.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.