mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-04 05:44:53 +00:00
[PR #1439] [MERGED] Port hardsubx imgops #2182
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/1439
Author: @shashwat1002
Created: 6/6/2022
Status: ✅ Merged
Merged: 6/15/2022
Merged by: @PunitLodha
Base:
master← Head:port_hardsubx_imgops📝 Commits (10+)
9f50803add hardsubx rust module and expose it77a8ab2port rgb_to_hsv to ruste1bc1d9add dependency fast-math and extern it5c2fb1dport rgb_to_lab to rust3f3b17eimprove if-else constructs for readabilityb02ab18unroll macros that were only used once and remove their definitiondcd6d8aImprove readability of rgb_to_lab function (and fixes)15efc4aremove fast math library, use palette library and rewrite imgops using it21f84f0run formatterd0d849areplace destructuring assignment statement with normal assignment statements because of build rust compiler issues📊 Changes
6 files changed (+228 additions, -6 deletions)
View changed files
📝
src/lib_ccx/hardsubx_imgops.c(+4 -4)📝
src/rust/Cargo.lock(+197 -2)📝
src/rust/Cargo.toml(+1 -0)➕
src/rust/src/hardsubx/imgops.rs(+24 -0)➕
src/rust/src/hardsubx/mod.rs(+1 -0)📝
src/rust/src/lib.rs(+1 -0)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
On determination that the imgops functions have lowest dependency and need to be used as-is, that is where I have begun porting.
The PR introduces (as of now) a function with an identical signature to
rgb_to_hsvwith rest of the code unchanged. TheDISABLE_RUSTflag is used to decide if the Rust version is compiled or the C version.Edit: hardsubx_imgops is now fully ported
The compilation works and the executable runs properly on the files I have. However, the who suite of tests must be run as soon as the
imgopsmodule is ported.Ps: I discovered that when building using
cmake, Rust compilation is disabled by default and I had to explicitly set theDWITHOUT_RUST=OFFI am unsure if this is the expected behaviour.
Edit: apparently this is because cmake caches options
Cc: @PunitLodha, @cfsmp3
please look this over once to check if I am not doing something obviously dangerous. I will continue after feedback.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.