Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / lib / libxcvt
Commits:
-
26164df0
by nyanpasu64 at 2023-05-02T18:20:29-07:00
-
e1c7adb0
by nyanpasu64 at 2023-05-05T10:30:45+00:00
-
55aa4ae7
by nyanpasu64 at 2023-05-05T10:30:45+00:00
-
0adc5fc8
by Peter Hutterer at 2024-07-22T16:23:38+10:00
-
922c7e1f
by Olivier Fourdan at 2024-07-22T07:07:18+00:00
-
0e3d127e
by Alan Coopersmith at 2024-09-30T13:32:08-07:00
-
dd8631c6
by Alan Coopersmith at 2024-12-13T17:42:24-08:00
7 changed files:
- .gitlab-ci.yml
- .gitlab-ci/ci.template
- .gitlab-ci/config.yml
- README.md
- cvt/cvt.c
- lib/libxcvt.c
- meson.build
Changes:
... | ... | @@ -18,11 +18,13 @@ include: |
18 | 18 | file:
|
19 | 19 | - '/templates/ci-fairy.yml'
|
20 | 20 | - '/templates/fedora.yml'
|
21 | + - template: Security/SAST.gitlab-ci.yml
|
|
21 | 22 | |
22 | 23 | stages:
|
23 | 24 | - sanity check
|
24 | 25 | - prep
|
25 | 26 | - build
|
27 | + - test
|
|
26 | 28 | |
27 | 29 | variables:
|
28 | 30 | FDO_UPSTREAM_REPO: xorg/lib/libxcvt
|
... | ... | @@ -91,7 +93,7 @@ check-merge-request: |
91 | 93 | .fedora.34:
|
92 | 94 | variables:
|
93 | 95 | FDO_DISTRIBUTION_VERSION: '34'
|
94 | - FDO_DISTRIBUTION_TAG: '2021-07-26.0'
|
|
96 | + FDO_DISTRIBUTION_TAG: '2022-08-03.0'
|
|
95 | 97 | |
96 | 98 | prep-fedora-34:
|
97 | 99 | extends:
|
... | ... | @@ -22,11 +22,13 @@ include: |
22 | 22 | {% for d in distributions %}
|
23 | 23 | - '/templates/{{d.name}}.yml'
|
24 | 24 | {% endfor %}
|
25 | + - template: Security/SAST.gitlab-ci.yml
|
|
25 | 26 | |
26 | 27 | stages:
|
27 | 28 | - sanity check
|
28 | 29 | - prep
|
29 | 30 | - build
|
31 | + - test
|
|
30 | 32 | |
31 | 33 | variables:
|
32 | 34 | FDO_UPSTREAM_REPO: xorg/lib/libxcvt
|
1 | -.default_tag: &default_tag '2021-07-26.0'
|
|
1 | +.default_tag: &default_tag '2022-08-03.0'
|
|
2 | 2 | |
3 | 3 | distributions:
|
4 | 4 | - name: fedora
|
... | ... | @@ -11,7 +11,7 @@ replacement to the version provided by the `Xorg` server. |
11 | 11 | An example output is:
|
12 | 12 | |
13 | 13 | ```
|
14 | -$ $ cvt --verbose 1920 1200 75
|
|
14 | +$ cvt --verbose 1920 1200 75
|
|
15 | 15 | # 1920x1200 74.93 Hz (CVT 2.30MA) hsync: 94.04 kHz; pclk: 245.25 MHz
|
16 | 16 | Modeline "1920x1200_75.00" 245.25 1920 2064 2264 2608 1200 1203 1209 1255 -hsync +vsync
|
17 | 17 | ```
|
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | |
31 | 31 | #include <libxcvt/libxcvt.h>
|
32 | 32 | |
33 | -bool
|
|
33 | +static bool
|
|
34 | 34 | cvt_is_standard(int hdisplay, int vdisplay, float vrefresh, bool reduced, bool verbose)
|
35 | 35 | {
|
36 | 36 | bool is_cvt = true;
|
... | ... | @@ -79,8 +79,8 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced, |
79 | 79 | /* 2) character cell horizontal granularity (pixels) - default 8 */
|
80 | 80 | #define CVT_H_GRANULARITY 8
|
81 | 81 | |
82 | - /* 4) Minimum vertical porch (lines) - default 3 */
|
|
83 | -#define CVT_MIN_V_PORCH 3
|
|
82 | + /* 4) Minimum vertical front porch (lines) - default 3 */
|
|
83 | +#define CVT_MIN_V_PORCH_RND 3
|
|
84 | 84 | |
85 | 85 | /* 4) Minimum number of vertical back porch lines - default 6 */
|
86 | 86 | #define CVT_MIN_V_BPORCH 6
|
... | ... | @@ -161,16 +161,16 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced, |
161 | 161 | |
162 | 162 | float hblank_percentage;
|
163 | 163 | int vsync_and_back_porch, vback_porch;
|
164 | - int hblank;
|
|
164 | + int hblank, hsync_w;
|
|
165 | 165 | |
166 | 166 | /* 8. Estimated Horizontal period */
|
167 | 167 | hperiod = ((float) (1000000.0 / vfield_rate - CVT_MIN_VSYNC_BP)) /
|
168 | - (vdisplay_rnd + 2 * vmargin + CVT_MIN_V_PORCH + interlace);
|
|
168 | + (vdisplay_rnd + 2 * vmargin + CVT_MIN_V_PORCH_RND + interlace);
|
|
169 | 169 | |
170 | 170 | /* 9. Find number of lines in sync + backporch */
|
171 | 171 | if (((int) (CVT_MIN_VSYNC_BP / hperiod) + 1) <
|
172 | - (vsync + CVT_MIN_V_PORCH))
|
|
173 | - vsync_and_back_porch = vsync + CVT_MIN_V_PORCH;
|
|
172 | + (vsync + CVT_MIN_V_BPORCH))
|
|
173 | + vsync_and_back_porch = vsync + CVT_MIN_V_BPORCH;
|
|
174 | 174 | else
|
175 | 175 | vsync_and_back_porch = (int) (CVT_MIN_VSYNC_BP / hperiod) + 1;
|
176 | 176 | |
... | ... | @@ -181,7 +181,7 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced, |
181 | 181 | /* 11. Find total number of lines in vertical field */
|
182 | 182 | mode_info->vtotal =
|
183 | 183 | vdisplay_rnd + 2 * vmargin + vsync_and_back_porch + interlace +
|
184 | - CVT_MIN_V_PORCH;
|
|
184 | + CVT_MIN_V_PORCH_RND;
|
|
185 | 185 | |
186 | 186 | /* 5) Definition of Horizontal blanking time limitation */
|
187 | 187 | /* Gradient (%/kHz) - default 600 */
|
... | ... | @@ -216,13 +216,12 @@ libxcvt_gen_mode_info(int hdisplay, int vdisplay, float vrefresh, bool reduced, |
216 | 216 | /* Fill in HSync values */
|
217 | 217 | mode_info->hsync_end = mode_info->hdisplay + hblank / 2;
|
218 | 218 | |
219 | - mode_info->hsync_start = mode_info->hsync_end -
|
|
220 | - (mode_info->htotal * CVT_HSYNC_PERCENTAGE) / 100;
|
|
221 | - mode_info->hsync_start += CVT_H_GRANULARITY -
|
|
222 | - mode_info->hsync_start % CVT_H_GRANULARITY;
|
|
219 | + hsync_w = (mode_info->htotal * CVT_HSYNC_PERCENTAGE) / 100;
|
|
220 | + hsync_w -= hsync_w % CVT_H_GRANULARITY;
|
|
221 | + mode_info->hsync_start = mode_info->hsync_end - hsync_w;
|
|
223 | 222 | |
224 | 223 | /* Fill in vsync values */
|
225 | - mode_info->vsync_start = mode_info->vdisplay + CVT_MIN_V_PORCH;
|
|
224 | + mode_info->vsync_start = mode_info->vdisplay + CVT_MIN_V_PORCH_RND;
|
|
226 | 225 | mode_info->vsync_end = mode_info->vsync_start + vsync;
|
227 | 226 | |
228 | 227 | }
|
1 | 1 | project('libxcvt', 'c',
|
2 | - version: '0.1.2',
|
|
2 | + version: '0.1.3',
|
|
3 | 3 | meson_version: '>= 0.40.0',
|
4 | 4 | default_options: ['warning_level=1',
|
5 | 5 | 'buildtype=debugoptimized'])
|