vscarefulsource 2__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.
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,40 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ build-windows:
10
+ runs-on: windows-latest
11
+ defaults:
12
+ run:
13
+ shell: msys2 {0}
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+ - name: Setup MSYS2
18
+ uses: msys2/setup-msys2@v2
19
+ with:
20
+ msystem: UCRT64
21
+ update: true
22
+ install: >-
23
+ base-devel
24
+ mingw-w64-ucrt-x86_64-gcc
25
+ mingw-w64-ucrt-x86_64-meson
26
+ mingw-w64-ucrt-x86_64-ninja
27
+ mingw-w64-ucrt-x86_64-vapoursynth
28
+ mingw-w64-ucrt-x86_64-libjpeg-turbo
29
+ mingw-w64-ucrt-x86_64-libpng
30
+ mingw-w64-ucrt-x86_64-lcms2
31
+ - name: Build
32
+ run: |
33
+ CXX="c++" meson setup build --prefer-static -Dcpp_link_args='-static'
34
+ meson compile -C build
35
+ - name: Upload
36
+ uses: actions/upload-artifact@v4
37
+ with:
38
+ name: carefulsource-windows
39
+ path: |
40
+ build/libcarefulsource.dll
@@ -0,0 +1,8 @@
1
+ # Compiled Dynamic libraries
2
+ *.so
3
+ *.dylib
4
+ *.dll
5
+
6
+ /.vspreview
7
+ *.png
8
+ /build*
@@ -0,0 +1,66 @@
1
+ Metadata-Version: 2.1
2
+ Name: vscarefulsource
3
+ Version: 2
4
+ Requires-Python: >3.12
5
+ Requires-Dist: vsauto
6
+ Description-Content-Type: text/markdown
7
+
8
+ # CarefulSource
9
+
10
+ ## Installation
11
+
12
+ `pip install vsnoise`
13
+
14
+ import vsauto
15
+ vsauto.load()
16
+ ...
17
+ import vapoursynth as vs
18
+ vs.core.noise.Add(...)
19
+
20
+ ## Usage
21
+
22
+ ```
23
+ cs.ImageSource(string path[, int subsampling_pad=True, int jpeg_rgb=False, int jpeg_fancy_upsampling=True, string jpeg_cmyk_profile, string jpeg_cmyk_target_profile])
24
+ ```
25
+
26
+ - path: Path to image file
27
+ - subsampling_pad: Pad the image for subsampled images with odd resolutions
28
+ - jpeg_rgb: RGB output using internal JPEG upsampling for chroma
29
+ - jpeg_fancy_upsampling: libjpeg fancy chroma upscaling for rgb output
30
+ - jpeg_cmyk_profile: Path to force cmyk input profile
31
+ - jpeg_cmyk_target_profile: Path to force cmyk output profile - Predefined profiles ["srgb"]
32
+
33
+ ```
34
+ cs.ConvertColor(vnode clip, string output_profile[, string input_profile, int float_output=False])
35
+ ```
36
+
37
+ - clip: Clip to process
38
+ - output_profile: Path to ICC profile to transform to - Predefined profiles ["srgb", "srgb-gray", "xyz"]
39
+ - input_profile: Profile to transform from
40
+ - float_output: Output as float
41
+
42
+ ## Formats
43
+
44
+ - [ ] AVIF
45
+ - [ ] HEIC
46
+ - [ ] JPEG
47
+ - [x] libjpeg
48
+ - [x] RGB
49
+ - [x] YCbCr444
50
+ - [x] YCbCr420
51
+ - [x] YCbCr422
52
+ - [x] YCbCr440
53
+ - [x] L
54
+ - [x] CMYK
55
+ - [ ] JXL
56
+ - [x] PNG
57
+ - [x] 8 bit RGBA
58
+ - [x] 8 bit RGB
59
+ - [x] 8 bit LA
60
+ - [x] 8 bit L
61
+ - [x] 16 bit RGBA
62
+ - [x] 16 bit RGB
63
+ - [x] 16 bit LA
64
+ - [x] 16 bit L
65
+ - [ ] TIFF
66
+ - [ ] WEBP
@@ -0,0 +1,59 @@
1
+ # CarefulSource
2
+
3
+ ## Installation
4
+
5
+ `pip install vsnoise`
6
+
7
+ import vsauto
8
+ vsauto.load()
9
+ ...
10
+ import vapoursynth as vs
11
+ vs.core.noise.Add(...)
12
+
13
+ ## Usage
14
+
15
+ ```
16
+ cs.ImageSource(string path[, int subsampling_pad=True, int jpeg_rgb=False, int jpeg_fancy_upsampling=True, string jpeg_cmyk_profile, string jpeg_cmyk_target_profile])
17
+ ```
18
+
19
+ - path: Path to image file
20
+ - subsampling_pad: Pad the image for subsampled images with odd resolutions
21
+ - jpeg_rgb: RGB output using internal JPEG upsampling for chroma
22
+ - jpeg_fancy_upsampling: libjpeg fancy chroma upscaling for rgb output
23
+ - jpeg_cmyk_profile: Path to force cmyk input profile
24
+ - jpeg_cmyk_target_profile: Path to force cmyk output profile - Predefined profiles ["srgb"]
25
+
26
+ ```
27
+ cs.ConvertColor(vnode clip, string output_profile[, string input_profile, int float_output=False])
28
+ ```
29
+
30
+ - clip: Clip to process
31
+ - output_profile: Path to ICC profile to transform to - Predefined profiles ["srgb", "srgb-gray", "xyz"]
32
+ - input_profile: Profile to transform from
33
+ - float_output: Output as float
34
+
35
+ ## Formats
36
+
37
+ - [ ] AVIF
38
+ - [ ] HEIC
39
+ - [ ] JPEG
40
+ - [x] libjpeg
41
+ - [x] RGB
42
+ - [x] YCbCr444
43
+ - [x] YCbCr420
44
+ - [x] YCbCr422
45
+ - [x] YCbCr440
46
+ - [x] L
47
+ - [x] CMYK
48
+ - [ ] JXL
49
+ - [x] PNG
50
+ - [x] 8 bit RGBA
51
+ - [x] 8 bit RGB
52
+ - [x] 8 bit LA
53
+ - [x] 8 bit L
54
+ - [x] 16 bit RGBA
55
+ - [x] 16 bit RGB
56
+ - [x] 16 bit LA
57
+ - [x] 16 bit L
58
+ - [ ] TIFF
59
+ - [ ] WEBP
@@ -0,0 +1,54 @@
1
+ project('carefulsource', 'cpp',
2
+ default_options: ['buildtype=release', 'warning_level=2', 'b_lto=true', 'b_ndebug=if-release', 'cpp_std=c++20'],
3
+ meson_version: '>=0.51.0',
4
+ version: '1'
5
+ )
6
+
7
+ cxx = meson.get_compiler('cpp')
8
+
9
+ gcc_syntax = cxx.get_argument_syntax() == 'gcc'
10
+
11
+ if get_option('buildtype') == 'release'
12
+ add_project_arguments(gcc_syntax ? ['-fno-math-errno', '-fno-trapping-math'] : ['/GS-'], language: 'cpp')
13
+ endif
14
+
15
+ if gcc_syntax
16
+ vapoursynth_dep = dependency('vapoursynth', version: '>=55').partial_dependency(compile_args: true, includes: true)
17
+ install_dir = vapoursynth_dep.get_variable(pkgconfig: 'libdir') / 'vapoursynth'
18
+ else
19
+ vapoursynth_inc = include_directories('C:/Program Files/VapourSynth/sdk/include/vapoursynth', is_system: true)
20
+ vapoursynth_dep = declare_dependency(include_directories: vapoursynth_inc)
21
+ install_dir = get_option('libdir') / 'vapoursynth'
22
+ endif
23
+
24
+ lcms2_dep = dependency('lcms2')
25
+ libpng_dep = dependency('libpng')
26
+ libjpeg_dep = dependency('libjpeg')
27
+
28
+ sources = [
29
+ 'src/carefulsource.cpp',
30
+ 'src/decoder_png.cpp',
31
+ 'src/decoder_jpeg.cpp',
32
+ ]
33
+
34
+ deps = [vapoursynth_dep, lcms2_dep, libpng_dep, libjpeg_dep]
35
+ libs = []
36
+
37
+ if get_option('py_ext')
38
+ python = import('python')
39
+ py = python.find_installation(pure: false)
40
+ py.extension_module('vscarefulsource_ext', sources,
41
+ dependencies: deps,
42
+ link_with: libs,
43
+ install: true,
44
+ )
45
+ py.install_sources(['vscarefulsource/__init__.py'], subdir: 'vscarefulsource')
46
+ else
47
+ shared_module('carefulsource', sources,
48
+ dependencies: deps,
49
+ link_with: libs,
50
+ install: true,
51
+ install_dir: install_dir,
52
+ gnu_symbol_visibility: 'hidden',
53
+ )
54
+ endif
@@ -0,0 +1 @@
1
+ option('py_ext', type: 'boolean', value: false)
@@ -0,0 +1,19 @@
1
+ [project]
2
+ name = "vscarefulsource"
3
+ version = "2"
4
+ requires-python = ">3.12"
5
+ readme = "README.md"
6
+ dependencies = ["vsauto"]
7
+
8
+ [build-system]
9
+ build-backend = "mesonpy"
10
+ requires = ["meson-python", "meson", "ninja", "wheel"]
11
+
12
+ [tool.meson-python]
13
+ allow-windows-internal-shared-libs = true
14
+
15
+ [tool.meson-python.args]
16
+ setup = ["-Dpy_ext=true"]
17
+
18
+ [project.entry-points.vsauto]
19
+ vscarefulsource = "vscarefulsource"