[PR #1446] [MERGED] [WIP] Port hardsubx classifier #2193

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

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1446
Author: @shashwat1002
Created: 7/27/2022
Status: Merged
Merged: 10/24/2022
Merged by: @PunitLodha

Base: masterHead: port_hardsubx_classifier


📝 Commits (10+)

  • 19b0309 add tesseract-sys in dependencies of rust modules
  • 1c296f9 add appropriate feature flags and required packages to cargo toml
  • daf3d7b expose classifier
  • cc554ab Redefine structs that are required for hardsubx
  • f76df32 write code to generate bindings for mprint
  • 334e216 - write a function to convert rust strings to c strings
  • 3d57f86 - add helper function to deal with tess strings in a memory safe manner
  • 4a89488 improve conversion of C string to Rust string by using built-in functions
  • 6834328 replace mprint usage with warn!
  • 03597b0 port get_ocr_text_letterwise

📊 Changes

10 files changed (+770 additions, -15 deletions)

View changed files

📝 src/lib_ccx/hardsubx_classifier.c (+2 -2)
📝 src/lib_ccx/hardsubx_decoder.c (+10 -6)
📝 src/rust/Cargo.lock (+56 -2)
📝 src/rust/Cargo.toml (+5 -2)
📝 src/rust/build.rs (+14 -3)
src/rust/src/hardsubx/classifier.rs (+285 -0)
src/rust/src/hardsubx/decoder.rs (+334 -0)
📝 src/rust/src/hardsubx/mod.rs (+53 -0)
📝 src/rust/src/utils.rs (+10 -0)
📝 src/rust/wrapper.h (+1 -0)

📄 Description

Starting port of the classifier module.


🔄 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/1446 **Author:** [@shashwat1002](https://github.com/shashwat1002) **Created:** 7/27/2022 **Status:** ✅ Merged **Merged:** 10/24/2022 **Merged by:** [@PunitLodha](https://github.com/PunitLodha) **Base:** `master` ← **Head:** `port_hardsubx_classifier` --- ### 📝 Commits (10+) - [`19b0309`](https://github.com/CCExtractor/ccextractor/commit/19b0309e6263783f4f0d0d68fcfb19421b9179b1) add tesseract-sys in dependencies of rust modules - [`1c296f9`](https://github.com/CCExtractor/ccextractor/commit/1c296f95d259a055e151553645196e31af8ac6f7) add appropriate feature flags and required packages to cargo toml - [`daf3d7b`](https://github.com/CCExtractor/ccextractor/commit/daf3d7b4b47b49d939ec7891c2eb6a4fc9b4e6e6) expose classifier - [`cc554ab`](https://github.com/CCExtractor/ccextractor/commit/cc554abcc5e98d02e58c890ecc2339e9600788b3) Redefine structs that are required for hardsubx - [`f76df32`](https://github.com/CCExtractor/ccextractor/commit/f76df3229bb7b410e0817f22ca3ba3b0d90ba5aa) write code to generate bindings for mprint - [`334e216`](https://github.com/CCExtractor/ccextractor/commit/334e216833784e2ab3f0245297a1acfc5e08ec79) - write a function to convert rust strings to c strings - [`3d57f86`](https://github.com/CCExtractor/ccextractor/commit/3d57f860a81aa91ead154d8184666e58059180e1) - add helper function to deal with tess strings in a memory safe manner - [`4a89488`](https://github.com/CCExtractor/ccextractor/commit/4a89488f7971bb3baae4aad931e3cdc6c6d3aae3) improve conversion of C string to Rust string by using built-in functions - [`6834328`](https://github.com/CCExtractor/ccextractor/commit/6834328292c3b9ac92fe74d59abbafc4096aebe6) replace mprint usage with warn! - [`03597b0`](https://github.com/CCExtractor/ccextractor/commit/03597b077277f0b535c9d9f15f14b5613d84304e) port get_ocr_text_letterwise ### 📊 Changes **10 files changed** (+770 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/lib_ccx/hardsubx_classifier.c` (+2 -2) 📝 `src/lib_ccx/hardsubx_decoder.c` (+10 -6) 📝 `src/rust/Cargo.lock` (+56 -2) 📝 `src/rust/Cargo.toml` (+5 -2) 📝 `src/rust/build.rs` (+14 -3) ➕ `src/rust/src/hardsubx/classifier.rs` (+285 -0) ➕ `src/rust/src/hardsubx/decoder.rs` (+334 -0) 📝 `src/rust/src/hardsubx/mod.rs` (+53 -0) 📝 `src/rust/src/utils.rs` (+10 -0) 📝 `src/rust/wrapper.h` (+1 -0) </details> ### 📄 Description Starting port of the classifier module. --- <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:20:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2193