Codebase list frei0r / 9526273
Update upstream source from tag 'upstream/2.5.4' Update to upstream version '2.5.4' with Debian dir 4fca8f4ed9b341f0adc56476b431ddc3af52f994 IOhannes m zmΓΆlnig (Debian/GNU) 4 months ago
9 changed file(s) with 165 addition(s) and 48 deletion(s). Raw diff Collapse all Expand all
0 name: βœ’οΈ Conventional Commits
1
2 on:
3 pull_request_target:
4 paths-ignore:
5 - 'doc/**'
6 - '*.md'
7 branches:
8 - master
9 - release/**
10
11 permissions:
12 contents: read
13 pull-requests: write
14
15 jobs:
16 conventional-commits:
17 name: πŸ“œ Parse PR commits
18 runs-on: ubuntu-latest
19 steps:
20 - name: πŸ”Ž Check PR commit messages follow Conventional Commits
21 uses: actions/github-script@v8
22 with:
23 script: |
24 const owner = context.repo.owner;
25 const repo = context.repo.repo;
26 const pull_number = context.payload.pull_request.number;
27
28 const marker = "<!-- conventional-commits-check -->";
29
30 // Conventional Commits v1.0.0 summary line regex
31 const re = /^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([^)]+\))?(!)?:\s\S.+/;
32
33 const commits = await github.paginate(
34 github.rest.pulls.listCommits,
35 { owner, repo, pull_number, per_page: 100 }
36 );
37
38 const invalid = [];
39 for (const c of commits) {
40 const summary = c.commit.message.split("\n")[0];
41 if (!re.test(summary)) {
42 invalid.push({
43 sha: c.sha.substring(0, 7),
44 message: summary,
45 });
46 }
47 }
48
49 // Find existing bot comment (if any)
50 const comments = await github.paginate(
51 github.rest.issues.listComments,
52 { owner, repo, issue_number: pull_number }
53 );
54
55 const existing = comments.find(
56 c => c.user?.type === "Bot" && c.body?.includes(marker)
57 );
58
59 if (invalid.length > 0) {
60 const body =
61 `${marker}
62 ### ❌ Conventional Commits check failed
63
64 One or more commit messages in this PR do **not** follow the
65 [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) specification.
66
67 **Invalid commits:**
68 ${invalid.map(i => `- \`${i.sha}\` β€” ${i.message}`).join("\n")}
69
70 **Expected format**
71 \`\`\`
72 type(scope?)!?: subject
73 \`\`\`
74
75 **Examples**
76 - \`feat: add user login\`
77 - \`fix(api): handle null response\`
78 - \`chore!: drop node 16 support\`
79
80 Please fix the commit messages (e.g. via \`git rebase -i\`) and push again.`;
81
82 if (existing) {
83 await github.rest.issues.updateComment({
84 owner,
85 repo,
86 comment_id: existing.id,
87 body,
88 });
89 } else {
90 await github.rest.issues.createComment({
91 owner,
92 repo,
93 issue_number: pull_number,
94 body,
95 });
96 }
97
98 core.setFailed(
99 `${invalid.length} commit(s) do not follow Conventional Commits`
100 );
101 } else {
102 // If previously failed, clean up the comment
103 if (existing) {
104 await github.rest.issues.updateComment({
105 owner,
106 repo,
107 comment_id: existing.id,
108 body: `${marker}
109 ### βœ… Conventional Commits check passed
110
111 All commit messages in this PR now follow the Conventional Commits specification. πŸŽ‰`,
112 });
113 }
114
115 core.info(`All ${commits.length} commit(s) follow Conventional Commits.`);
116 }
0 name: 020-Release
0 name: πŸ“’ Release
11
22 on:
33 workflow_run:
44 workflows:
5 - 010-Test
5 - πŸ§ͺ Test
66 types: [completed]
77 branches:
88 - master
1717 name: πŸ€– Semantic release
1818 runs-on: ubuntu-latest
1919 if: "!contains(github.event.pull_request.labels.*.name, 'skip-release')"
20 # if: ${{ github.ref_name == 'master' && github.event_name == 'push' }}
2120 outputs:
2221 release: ${{ steps.tag_release.outputs.release }}
2322 version: ${{ steps.tag_release.outputs.version }}
2423 steps:
25 - uses: actions/checkout@v4
24 - uses: actions/checkout@v6
2625 - name: Setup Node.js
27 uses: actions/setup-node@v3
26 uses: actions/setup-node@v6
2827 with:
2928 node-version: latest
3029 - name: Install semantic-release
3130 run: |
32 npm i npx
3331 npm i semantic-release/changelog
3432 - name: Tag release
3533 id: tag_release
5048 needs: [semantic-release]
5149 if: ${{ needs.semantic-release.outputs.release == 'True' }}
5250 steps:
53 - uses: actions/checkout@v4
51 - uses: actions/checkout@v6
5452 - name: apt install deps
5553 run: |
5654 sudo apt-get update -y -q
6159 cmake -G "Ninja" ../
6260 ninja
6361 - name: Upload linux filter
64 uses: actions/upload-artifact@v4
62 uses: actions/upload-artifact@v6
6563 with:
6664 name: release-linux-filter
6765 path: build/src/filter/**/*.so
6866 - name: Upload linux mixer2
69 uses: actions/upload-artifact@v4
67 uses: actions/upload-artifact@v6
7068 with:
7169 name: release-linux-mixer2
7270 path: build/src/mixer2/**/*.so
7371 - name: Upload linux mixer3
74 uses: actions/upload-artifact@v4
72 uses: actions/upload-artifact@v6
7573 with:
7674 name: release-linux-mixer3
7775 path: build/src/mixer3/**/*.so
7876 - name: Upload linux generator
79 uses: actions/upload-artifact@v4
77 uses: actions/upload-artifact@v6
8078 with:
8179 name: release-linux-generator
8280 path: build/src/generator/**/*.so
8785 needs: [semantic-release]
8886 if: ${{ needs.semantic-release.outputs.release == 'True' }}
8987 steps:
90 - uses: actions/checkout@v4
88 - uses: actions/checkout@v6
9189 - uses: ilammy/msvc-dev-cmd@v1
9290 - name: choco install deps
93 uses: crazy-max/ghaction-chocolatey@v2
91 uses: crazy-max/ghaction-chocolatey@v3
9492 with:
9593 args: install libopencv-dev
9694 - name: Build using nmake
9795 run: |
9896 mkdir build && cd build
99 cmake -G "NMake Makefiles" ../
97 cmake -G "NMake Makefiles" -D WITHOUT_OPENCV=1 -D WITHOUT_CAIRO=1 -D WITHOUT_GAVL=1 ../
10098 nmake
10199 - name: Upload win64 filter
102 uses: actions/upload-artifact@v4
100 uses: actions/upload-artifact@v6
103101 with:
104102 name: release-win64-filter
105103 path: build/src/filter/**/*.dll
106104 - name: Upload win64 mixer2
107 uses: actions/upload-artifact@v4
105 uses: actions/upload-artifact@v6
108106 with:
109107 name: release-win64-mixer2
110108 path: build/src/mixer2/**/*.dll
111109 - name: Upload win64 mixer3
112 uses: actions/upload-artifact@v4
110 uses: actions/upload-artifact@v6
113111 with:
114112 name: release-win64-mixer3
115113 path: build/src/mixer3/**/*.dll
116114 - name: Upload win64 generator
117 uses: actions/upload-artifact@v4
115 uses: actions/upload-artifact@v6
118116 with:
119117 name: release-win64-generator
120118 path: build/src/generator/**/*.dll
125123 needs: [semantic-release]
126124 if: ${{ needs.semantic-release.outputs.release == 'True' }}
127125 steps:
128 - uses: actions/checkout@v4
126 - uses: actions/checkout@v6
129127 - name: Update Homebrew
130128 run: |
131129 brew update
136134 - name: Build using ninja
137135 run: |
138136 mkdir build && cd build
139 cmake -G "Ninja" ../
137 cmake -G "Ninja" -D WITHOUT_OPENCV=1 -D WITHOUT_GAVL=1 ../
140138 ninja
141139 - name: Upload osx filter
142 uses: actions/upload-artifact@v4
140 uses: actions/upload-artifact@v6
143141 with:
144142 name: release-osx-filter
145143 path: build/src/filter/**/*.so
146144 - name: Upload osx mixer2
147 uses: actions/upload-artifact@v4
145 uses: actions/upload-artifact@v6
148146 with:
149147 name: release-osx-mixer2
150148 path: build/src/mixer2/**/*.so
151149 - name: Upload osx mixer3
152 uses: actions/upload-artifact@v4
150 uses: actions/upload-artifact@v6
153151 with:
154152 name: release-osx-mixer3
155153 path: build/src/mixer3/**/*.so
156154 - name: Upload osx generator
157 uses: actions/upload-artifact@v4
155 uses: actions/upload-artifact@v6
158156 with:
159157 name: release-osx-generator
160158 path: build/src/generator/**/*.so
165163 if: ${{ needs.semantic-release.outputs.release == 'True' }}
166164 runs-on: ubuntu-latest
167165 steps:
168 - uses: actions/checkout@v4
166 - uses: actions/checkout@v6
169167 - name: download binary artifacts
170 uses: actions/download-artifact@v4
168 uses: actions/download-artifact@v7
171169 with:
172170 path: |
173171 frei0r-bin
218216 sha256sum *.zip *.tar.gz > SHA256SUMS.txt
219217
220218 - name: release all archives
221 uses: softprops/action-gh-release@v1
219 uses: softprops/action-gh-release@v2
222220 with:
223221 files: |
224222 *.zip
0 name: 010-Test
0 name: πŸ§ͺ Test
11
22 on:
33 push:
2121 cancel-in-progress: true
2222
2323 jobs:
24
25 # reuse:
26 # name: 🚨 REUSE Compliance
27 # runs-on: ubuntu-latest
28 # steps:
29 # - uses: actions/checkout@v4
30 # - uses: fsfe/reuse-action@v1
31
3224 c-lint:
3325 name: 🚨 C lint
3426 runs-on: ubuntu-latest
3527 if: "!contains(github.event.pull_request.labels.*.name, 'skip-lint')"
3628 steps:
37 - uses: actions/checkout@v4
29 - uses: actions/checkout@v6
3830 - uses: reviewdog/action-cpplint@master
3931 env:
4032 REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7466 fail-fast: false
7567 runs-on: ubuntu-latest
7668 steps:
77 - uses: actions/checkout@v4
69 - uses: actions/checkout@v6
7870 - name: install dependencies
7971 run: |
8072 sudo apt-get update -qy
9082 run: |
9183 cd test && make
9284 - name: ${{ matrix.compiler }} upload plugin analysis
93 uses: actions/upload-artifact@v4
85 uses: actions/upload-artifact@v6
9486 with:
9587 name: release-plugin-analysis
9688 path: test/*.json
1010 option (WITHOUT_FACERECOGNITION "Disable facedetect plugin to avoid protobuf conflicts" OFF)
1111
1212 if (NOT WITHOUT_OPENCV)
13 find_package (OpenCV)
13 find_package (OpenCV REQUIRED)
1414 endif ()
1515
16 find_package (Cairo)
16 option (WITHOUT_CAIRO "Disable plugins dependent upon gavl" OFF)
17 if (NOT WITHOUT_CAIRO)
18 find_package (Cairo REQUIRED)
19 endif ()
1720
1821 include(FindPkgConfig)
1922 option (WITHOUT_GAVL "Disable plugins dependent upon gavl" OFF)
2023 if (PKG_CONFIG_FOUND AND NOT WITHOUT_GAVL)
21 pkg_check_modules(GAVL gavl)
24 pkg_check_modules(GAVL REQUIRED gavl)
2225 endif ()
2326
2427 include_directories (AFTER include)
0 [![Frei0r logo](https://github.com/dyne/frei0r/raw/gh_pages/pics/frei0r.png)](https://frei0r.dyne.org)
0 [![Frei0r logo](https://frei0r.dyne.org/pics/fla_name_lb.webp)](https://frei0r.dyne.org)
11
22 <img src="https://files.dyne.org/software_by_dyne.png" width="300">
33
2525 #include <assert.h>
2626 #include <stdio.h>
2727 #include <math.h>
28 #include <string.h>
2829 #include "frei0r.h"
2930 #include "frei0r/math.h"
3031
7273
7374 int width = inst->width;
7475 int height = inst->height;
76
77 // Copy input to output to preserve alpha channel
78 memcpy(outframe, inframe, width * height * sizeof(uint32_t));
7579
7680 double dotRadius = inst->dot_radius * 9.99;
7781 dotRadius = ceil(dotRadius);
572572 int count = 0;
573573 char *input = strdup(string);
574574 char *result = NULL;
575 result = strtok_r(string, delimiter, &input);
575 char *saveptr;
576 result = strtok_r(input, delimiter, &saveptr);
576577 while (result != NULL) {
577578 *tokens = realloc(*tokens, (count + 1) * sizeof(char *));
578579 (*tokens)[count++] = strdup(result);
579 result = strtok_r(NULL, delimiter, &input);
580 result = strtok_r(NULL, delimiter, &saveptr);
580581 }
581582 free(input);
582583 return count;
1616 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19 #define _USE_MATH_DEFINES
1920 #include "frei0r.hpp"
2021 #include <cairo.h>
21 #define _USE_MATH_DEFINES
2222 #include <cmath>
2323
2424 class Mirr0r : public frei0r::filter {
132132 "Johann JEG",
133133 1, 0,
134134 F0R_COLOR_MODEL_RGBA8888);
135 ⏎
135
206206
207207 // First make a blue layer shifted back
208208 if (((int)x >= (int)inst->shiftX) &&
209 ((int)y >= (int)inst->shiftY))
209 ((int)y >= (int)inst->shiftY) &&
210 ((x - inst->shiftX) < inst->width) &&
211 ((y - inst->shiftY) < inst->height))
210212 {
211213 rgbsplit0r_extract_color((uint32_t *)(src +
212214 (x - inst->shiftX) +