vscarefulsource 2__tar.gz → 7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vscarefulsource-7/.gitignore +15 -0
- vscarefulsource-7/PKG-INFO +36 -0
- vscarefulsource-7/README.md +29 -0
- vscarefulsource-7/hatch_build.py +47 -0
- vscarefulsource-7/meson.build +40 -0
- vscarefulsource-7/pyproject.toml +54 -0
- vscarefulsource-7/src/carefulsource.cpp +1142 -0
- vscarefulsource-7/src/carefulsource.h +84 -0
- vscarefulsource-7/subprojects/imagedecoder.wrap +7 -0
- vscarefulsource-2/.gitattributes +0 -2
- vscarefulsource-2/.github/workflows/build.yaml +0 -40
- vscarefulsource-2/.gitignore +0 -8
- vscarefulsource-2/PKG-INFO +0 -66
- vscarefulsource-2/README.md +0 -59
- vscarefulsource-2/dist/vscarefulsource-2.tar.gz +0 -0
- vscarefulsource-2/meson.build +0 -54
- vscarefulsource-2/meson.options +0 -1
- vscarefulsource-2/pyproject.toml +0 -19
- vscarefulsource-2/src/carefulsource.cpp +0 -692
- vscarefulsource-2/src/carefulsource.h +0 -24
- vscarefulsource-2/src/cmyk.h +0 -46434
- vscarefulsource-2/src/decoder_base.h +0 -37
- vscarefulsource-2/src/decoder_jpeg.cpp +0 -288
- vscarefulsource-2/src/decoder_jpeg.h +0 -49
- vscarefulsource-2/src/decoder_png.cpp +0 -178
- vscarefulsource-2/src/decoder_png.h +0 -46
- vscarefulsource-2/subprojects/lcms2.wrap +0 -10
- vscarefulsource-2/subprojects/libjpeg-turbo.wrap +0 -14
- vscarefulsource-2/subprojects/libpng.wrap +0 -14
- vscarefulsource-2/subprojects/zlib.wrap +0 -14
- vscarefulsource-2/vscarefulsource/__init__.py +0 -34
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: vscarefulsource
|
|
3
|
+
Version: 7
|
|
4
|
+
Requires-Python: >3.12
|
|
5
|
+
Requires-Dist: vapoursynth>=74
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
|
|
8
|
+
# CarefulSource
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
cs.ImageSource(string path[, int yuv_to_rgb=False])
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- path: Path to image file
|
|
17
|
+
- yuv_to_rgb: RGB output using internal JPEG/AVIF upsampling for chroma
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
cs.ConvertColor(vnode clip, string output_profile[, string input_profile, int float_output=False])
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- clip: Clip to process
|
|
24
|
+
- output_profile: Path to ICC profile to transform to - Predefined profiles ["srgb", "srgb-gray", "xyz"]
|
|
25
|
+
- input_profile: Profile to transform from
|
|
26
|
+
- float_output: Output as float
|
|
27
|
+
|
|
28
|
+
## Formats
|
|
29
|
+
|
|
30
|
+
- [x] AVIF
|
|
31
|
+
- [x] HEIC
|
|
32
|
+
- [x] JPEG
|
|
33
|
+
- [x] JXL
|
|
34
|
+
- [x] PNG
|
|
35
|
+
- [x] TIFF
|
|
36
|
+
- [x] WEBP
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# CarefulSource
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
cs.ImageSource(string path[, int yuv_to_rgb=False])
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
- path: Path to image file
|
|
10
|
+
- yuv_to_rgb: RGB output using internal JPEG/AVIF upsampling for chroma
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
cs.ConvertColor(vnode clip, string output_profile[, string input_profile, int float_output=False])
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- clip: Clip to process
|
|
17
|
+
- output_profile: Path to ICC profile to transform to - Predefined profiles ["srgb", "srgb-gray", "xyz"]
|
|
18
|
+
- input_profile: Profile to transform from
|
|
19
|
+
- float_output: Output as float
|
|
20
|
+
|
|
21
|
+
## Formats
|
|
22
|
+
|
|
23
|
+
- [x] AVIF
|
|
24
|
+
- [x] HEIC
|
|
25
|
+
- [x] JPEG
|
|
26
|
+
- [x] JXL
|
|
27
|
+
- [x] PNG
|
|
28
|
+
- [x] TIFF
|
|
29
|
+
- [x] WEBP
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
import subprocess
|
|
3
|
+
import sys
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
8
|
+
from packaging import tags
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CustomHook(BuildHookInterface[Any]):
|
|
12
|
+
source_dir = Path("build")
|
|
13
|
+
target_dir = Path("vapoursynth/plugins")
|
|
14
|
+
|
|
15
|
+
def initialize(self, version: str, build_data: dict[str, Any]) -> None:
|
|
16
|
+
|
|
17
|
+
build_data["pure_python"] = False
|
|
18
|
+
build_data["tag"] = f"py3-none-{next(tags.platform_tags())}"
|
|
19
|
+
|
|
20
|
+
subprocess.run(
|
|
21
|
+
[
|
|
22
|
+
sys.executable,
|
|
23
|
+
"-m",
|
|
24
|
+
"mesonbuild.mesonmain",
|
|
25
|
+
"setup",
|
|
26
|
+
"build",
|
|
27
|
+
"--vsenv",
|
|
28
|
+
"--reconfigure",
|
|
29
|
+
],
|
|
30
|
+
check=True,
|
|
31
|
+
)
|
|
32
|
+
subprocess.run(
|
|
33
|
+
[sys.executable, "-m", "mesonbuild.mesonmain", "compile", "-C", "build"],
|
|
34
|
+
check=True,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
shutil.rmtree(self.target_dir.parent, ignore_errors=True)
|
|
38
|
+
for file_path in self.source_dir.rglob("*"):
|
|
39
|
+
if file_path.is_file() and file_path.suffix in [".dll", ".so", ".dylib"]:
|
|
40
|
+
build_data.setdefault("force_include", {})[str(file_path)] = str(
|
|
41
|
+
self.target_dir / file_path.name
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def finalize(
|
|
45
|
+
self, version: str, build_data: dict[str, Any], artifact_path: str
|
|
46
|
+
) -> None:
|
|
47
|
+
shutil.rmtree(self.target_dir.parent, ignore_errors=True)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
project('carefulsource', 'cpp',
|
|
2
|
+
default_options: ['buildtype=release', 'warning_level=2', 'b_lto=true', 'b_ndebug=if-release', 'cpp_std=c++20', 'default_library=static', 'wrap_mode=forcefallback'],
|
|
3
|
+
meson_version: '>=1.1.0',
|
|
4
|
+
version: '3'
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
cxx = meson.get_compiler('cpp')
|
|
8
|
+
gcc_syntax = cxx.get_argument_syntax() == 'gcc'
|
|
9
|
+
|
|
10
|
+
if get_option('buildtype') == 'release'
|
|
11
|
+
add_project_arguments(gcc_syntax ? ['-fno-math-errno', '-fno-trapping-math'] : ['/GS-'], language: 'cpp')
|
|
12
|
+
endif
|
|
13
|
+
|
|
14
|
+
py = import('python').find_installation(pure: false)
|
|
15
|
+
|
|
16
|
+
vapoursynth_include_command = run_command(
|
|
17
|
+
py,
|
|
18
|
+
'-c',
|
|
19
|
+
'import vapoursynth as vs; print(vs.get_include())',
|
|
20
|
+
check: true,
|
|
21
|
+
)
|
|
22
|
+
vapoursynth_inc = include_directories(vapoursynth_include_command.stdout().strip(), is_system: true)
|
|
23
|
+
vapoursynth_dep = declare_dependency(compile_args: '-I' + vapoursynth_include_command.stdout().strip())
|
|
24
|
+
|
|
25
|
+
imagedecoder_dep = dependency('imagedecoder', static: true)
|
|
26
|
+
|
|
27
|
+
sources = [
|
|
28
|
+
'src/carefulsource.cpp',
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
deps = [vapoursynth_dep, imagedecoder_dep]
|
|
32
|
+
libs = []
|
|
33
|
+
|
|
34
|
+
shared_module('carefulsource', sources,
|
|
35
|
+
dependencies: deps,
|
|
36
|
+
link_with: libs,
|
|
37
|
+
install: true,
|
|
38
|
+
install_dir: py.get_install_dir(pure: false) / 'vapoursynth' / 'plugins',
|
|
39
|
+
gnu_symbol_visibility: 'hidden',
|
|
40
|
+
)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "vscarefulsource"
|
|
3
|
+
version = "7"
|
|
4
|
+
requires-python = ">3.12"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
dependencies = ["vapoursynth>=74"]
|
|
7
|
+
|
|
8
|
+
[build-system]
|
|
9
|
+
build-backend = "hatchling.build"
|
|
10
|
+
requires = ["hatchling", "packaging", "meson", "ninja", "wheel", "vapoursynth>=74"]
|
|
11
|
+
|
|
12
|
+
[tool.hatch.build.targets.wheel]
|
|
13
|
+
include = ["vapoursynth/plugins"]
|
|
14
|
+
artifacts = [
|
|
15
|
+
"vapoursynth/plugins/*.dylib",
|
|
16
|
+
"vapoursynth/plugins/*.so",
|
|
17
|
+
"vapoursynth/plugins/*.dll",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[tool.hatch.build.targets.sdist]
|
|
21
|
+
include = [
|
|
22
|
+
"src",
|
|
23
|
+
"subprojects/*.wrap",
|
|
24
|
+
"subprojects/packagefiles",
|
|
25
|
+
"subprojects/lcms2-*",
|
|
26
|
+
"subprojects/libjpeg-turbo-*",
|
|
27
|
+
"subprojects/libpng-*",
|
|
28
|
+
"subprojects/zlib-*",
|
|
29
|
+
"meson.build",
|
|
30
|
+
"meson.options",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[tool.hatch.build.targets.wheel.hooks.custom]
|
|
34
|
+
path = "hatch_build.py"
|
|
35
|
+
|
|
36
|
+
[tool.uv]
|
|
37
|
+
cache-keys = [
|
|
38
|
+
{ file = "pyproject.toml" },
|
|
39
|
+
{ file = "hatch_build.py" },
|
|
40
|
+
{ file = "meson.build" },
|
|
41
|
+
{ file = "meson.options" },
|
|
42
|
+
{ file = "src/**" },
|
|
43
|
+
{ file = "subprojects/*.wrap" },
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[tool.cibuildwheel]
|
|
47
|
+
archs = ["auto64"]
|
|
48
|
+
|
|
49
|
+
[tool.cibuildwheel.macos]
|
|
50
|
+
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
|
|
51
|
+
|
|
52
|
+
[[tool.cibuildwheel.overrides]]
|
|
53
|
+
select = "*-macosx_x86_64"
|
|
54
|
+
environment = { MACOSX_DEPLOYMENT_TARGET = "10.13" }
|