[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/lib/libxcvt][debian-unstable] 11 commits: Fix hsync_start computation



Title: GitLab

Timo Aaltonen pushed to branch debian-unstable at X Strike Force / lib / libxcvt

Commits:

  • 26164df0
    by nyanpasu64 at 2023-05-02T18:20:29-07:00
    Fix hsync_start computation
    
    The CVT v1.2 specification says, in section 3.4.1 "Standard CRT-based
    Timing":
    
    > The Horizontal Sync Pulse duration will in all cases be set as closely
    > as possible to 8% of the Total Horizontal time, rounded down to the
    > nearest cell width.
    
    The previous code achieved this by first setting mode_info->hsync_end to
    a multiple of the cell width, then calculating mode_info->hsync_start
    and rounding its position up to a cell width. However, if
    mode_info->hsync_start was already a multiple of 8 (for example on
    640x480@60), the rounding code would erroneously add 8 to it, shortening
    the hsync duration by 8 pixels.
    
    This commit fixes the bug by calculating and rounding the sync width
    separately, closer to the specification's wording.
    
    Signed-off-by: nyanpasu64 <nyanpasu64@tuta.io>
    Closes: https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/issues/6
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    
  • e1c7adb0
    by nyanpasu64 at 2023-05-05T10:30:45+00:00
    Fix too-small back porch at very low resolutions
    
    Previously the code erroneously used CVT_MIN_V_PORCH=3 instead of the
    specified CVT_MIN_V_BPORCH=6, when calculating the minimum size of the
    back porch in scanlines. As a result, when generating 320x240@60, the
    vtotal would be be incorrectly set to 252 instead of 253.
    
    This commit fixes the typo.
    
    Signed-off-by: nyanpasu64 <nyanpasu64@tuta.io>
    Closes: https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/issues/7
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    
  • 55aa4ae7
    by nyanpasu64 at 2023-05-05T10:30:45+00:00
    Rename constant to CVT_MIN_V_PORCH_RND
    
    Signed-off-by: nyanpasu64 <nyanpasu64@tuta.io>
    
  • 0adc5fc8
    by Peter Hutterer at 2024-07-22T16:23:38+10:00
    README: remove double dollar sign
    
    We're not getting paid enough to use that many dollars.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/merge_requests/15>
    
  • 922c7e1f
    by Olivier Fourdan at 2024-07-22T07:07:18+00:00
    ci: Update CI and enable static analysis
    
    Update the CI to add the template Security/SAST.gitlab-ci.yml as most of
    the other xorg projects do.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/merge_requests/12>
    
  • 0e3d127e
    by Alan Coopersmith at 2024-09-30T13:32:08-07:00
    cvt: fix -Wmissing-prototypes warning for cvt_is_standard
    
    ../cvt/cvt.c:34:1: warning: no previous prototype for ‘cvt_is_standard’ [-Wmissing-prototypes]
       34 | cvt_is_standard(int hdisplay, int vdisplay, float vrefresh, bool reduced, bool verbose)
          | ^~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    
  • dd8631c6
    by Alan Coopersmith at 2024-12-13T17:42:24-08:00
    libxcvt 0.1.3
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    
  • d0e0ef9a
    by Timo Aaltonen at 2025-02-06T09:44:02+02:00
    Merge branch 'upstream-unstable' into debian-unstable
    
  • affea109
    by Timo Aaltonen at 2025-02-06T09:44:41+02:00
    version bump
    
  • a921eec4
    by Timo Aaltonen at 2025-02-06T09:46:14+02:00
    upstream: Update signing.key.asc.
    
  • 357fabd8
    by Timo Aaltonen at 2025-02-06T09:57:46+02:00
    releasing package libxcvt version 0.1.3-1
    

9 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -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:
    

  • .gitlab-ci/ci.template
    ... ... @@ -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
    

  • .gitlab-ci/config.yml
    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
    

  • README.md
    ... ... @@ -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
     ```
    

  • cvt/cvt.c
    ... ... @@ -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;
    

  • debian/changelog
    1
    +libxcvt (0.1.3-1) unstable; urgency=medium
    
    2
    +
    
    3
    +  * New upstream release.
    
    4
    +  * upstream: Update signing.key.asc.
    
    5
    +
    
    6
    + -- Timo Aaltonen <tjaalton@debian.org>  Thu, 06 Feb 2025 09:57:43 +0200
    
    7
    +
    
    1 8
     libxcvt (0.1.2-1) unstable; urgency=medium
    
    2 9
     
    
    3 10
       * New upstream release. (LP: #1970021)
    

  • debian/upstream/signing-key.asc
    ... ... @@ -225,3 +225,64 @@ FgIDAQIeAQIXgAUCRqPLWAUJGlQd0gAKCRAUcG2+HktFQKczAKDeq33Q9kYEKPAL
    225 225
     5FdFAfX5HOdbMQCgrJ1XMhV5ELa+QYhFTH6TmNfffeg=
    
    226 226
     =gHbK
    
    227 227
     -----END PGP PUBLIC KEY BLOCK-----
    
    228
    +-----BEGIN PGP PUBLIC KEY BLOCK-----
    
    229
    +
    
    230
    +mQGiBEab+moRBACDH5yKqS3wcc5bdxY7PBNuwKvF5TKMfagmSvuRDtZjjIIWaA/n
    
    231
    +Z1KboV9Gq5g7kP7+Kfu+Qgd8u65eVsWwmPW10fXvj3aCU53glx2EdGdrHcgiyH2g
    
    232
    +EQfPiyBw+trIppWFRV0IDXSLMA1FNC92t2nSG/VFHaPTVwcgkIRSfcXDvwCglGdE
    
    233
    +a6f4uLqoNHP+m4yYnzapFuMD/R4+2AJDAvEWKDdYCGZzlawjAmmWyXrmT7/C/mx9
    
    234
    +8qUR473l4buXjHgDkkXXlHqdzil1vK85PhrKzNJDCCmlHUJNz+QwiAMOLwpD+kwV
    
    235
    +Pb57RG7y+a5JQ5+jtVw4RlUxZIk/wj2An9YBO3A5vR7PdjM32ZJCN2+aM4dYfNzQ
    
    236
    +xQKTA/47icvBaBVTl9rztjg2pd2Aqpc1P/GsIYLGj7XjnnJvGAENBHSH1QjpZMJG
    
    237
    +CTS9oJ+B0/wrIr+pA+MdFgYAb6ojMQJOO6UChjWWSGjMFcs/CeXhxlLBido3DtAE
    
    238
    +TbNTwO6OEfAvdosvTdhJFnwvZlJ+zZGGy5CrF2Fd9PUe9tmASbQuQWxhbiBDb29w
    
    239
    +ZXJzbWl0aCA8YWxhbi5jb29wZXJzbWl0aEBvcmFjbGUuY29tPoiCBBMRCgBCAhsD
    
    240
    +BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAIZARYhBEoZPAbTXnxnD6TvC6L7nggf
    
    241
    +LRMOBQJkQs2eBQknDNS0AAoJEKL7nggfLRMO1esAnR4FVD60BpDY/bJp5RC1VXhO
    
    242
    +Vlo4AKCJgsQeVeGLxDlMuhAmbcCkOjafqbQoQWxhbiBDb29wZXJzbWl0aCA8YWxh
    
    243
    +bmNAZnJlZWRlc2t0b3Aub3JnPoh/BBMRCgA/AhsDBgsJCAcDAgYVCAIJCgsEFgID
    
    244
    +AQIeAQIXgBYhBEoZPAbTXnxnD6TvC6L7nggfLRMOBQJkQs2eBQknDNS0AAoJEKL7
    
    245
    +nggfLRMOUgAAoIyNXuU5kOotpZrKvPrjQATbsPClAJ9wkh/n3IAobV6aDLb1qOt5
    
    246
    +RT3Pp7QrQWxhbiBDb29wZXJzbWl0aCA8YWxhbi5jb29wZXJzbWl0aEBzdW4uY29t
    
    247
    +Poh9BBMRCgA9AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AWIQRKGTwG0158Zw+k
    
    248
    +7wui+54IHy0TDgUCZELNngUJJwzUtAAKCRCi+54IHy0TDunHAKCKZyiF/IwgoqYQ
    
    249
    +r4SjpuMD64swlgCfdkI2v8kaaFwSrEp3AeYvcT2psPS5Ag0EUXnVIQEQAKHpjOmY
    
    250
    +056n0tsZoW9q5egsMcl5tKC8uimrhO05nnq+5/60/YedC++V9c9b/3/X7O28LyBk
    
    251
    +AtBgD0xJZSDQ0DhTzKAp6AzjQtBvI68uinGwxSjT+oQpPMxqhA1I0kzoEDCdEqV+
    
    252
    +HsVOAEdbAi/tP9bbdTDzwVc8MWDriamBUqc53Rb00Mffy9435UgTS4gAhMwANhy6
    
    253
    +XZmOMBhITOzxFJUEDTDJtLbE0b1jPRQS7NHQgak1inmuvPMc3wAuoEcSCSt1xupb
    
    254
    +YsBoXOjK5wC/eE1LIdZoRyW2OkT140DqDZ8zfRID860hnirnYgb09TPNtj93pudU
    
    255
    +AUt6T9+tcLN4/rxhxHOwse66KGHO4bQ1rZ6mfco6SYd9V60cL6hC2eMecyxZliMu
    
    256
    +17lj7EX8lxUH+omIgHc7HGoyUR6V+WB60cxWj5v05zdeLeZ2aLBcPFhxlfDESm8f
    
    257
    +4ezdJSDS1QZmC0P5h3RJfhhfmdBr8kHzr7111D1/O71Av1VV5FyJ9YxUSxp4IPuz
    
    258
    +K7JbbgVHcA6PvXrDzWUslmZgPADpKH4hTmG/NdCqhEXcufvY6s5yNksB8X3ReNvu
    
    259
    +SSyfGnRz3kvtyK0XzC7KRX2PquLI6A8KJprHwZGqEB1NDG8b2iaYnghOjyfIYEVQ
    
    260
    +F3nGfaBwv4lrCPEoZSUaK8f/NQZjNU8NQyTnABEBAAGJAoUEGBEKACYCGwIWIQRK
    
    261
    +GTwG0158Zw+k7wui+54IHy0TDgUCZELNigUJHC756QIpwV0gBBkBCgAGBQJRedUh
    
    262
    +AAoJEM/fFIgoxkKn1uYP/3TnSR7dt3HTMs+VQA2hO7vi9BPnl/RrRxeCeuPXl7Lo
    
    263
    +ufRLWx4dp13RoXeUqkPBQ4vRghCmkOEt9Z/2ASxAQpI+0dCDIpFtqO/PycQ6LwfP
    
    264
    +mi+tOoYJmnzVcdWiLISIJa5fF5bt7I3gLxuPFumI3S9pn6yAx4yFcDmbDIoWzib0
    
    265
    +k+kN7qR3Z5ow7TORwkJiOTRFw1mI+iGboSZ56w1sDbMmFeCj6FAcQHKiMgnmW1bL
    
    266
    +Lllpxz11/FWr1avfL6Vcp3xsxmKSWw49fQv7rTIyhiOXXL21WrnAO1/6JLca8Uuk
    
    267
    +gQ4biGgBPeGR5W8an8h3xEyPy2tmfwCwwLWHYSUdoEpEx8ikltUKmJbpUnwf/5Z5
    
    268
    +2uOJpk7kTjWwzYG9BRkr7bATGfNIhw6j4FH0utJMQnxa7Ehn0xVPl+EAM6U7VCRH
    
    269
    +K/ieB1Cw3jH8DoIIVX5isRV1n7nfMQ2gl7ssC07VYDAmaeD+zAMriZWsbBU7vnNV
    
    270
    +ZcveIK5OFDLQCyzKgl0qLAOPdIC00nYNx0sMbdkPyyXcuNu2SDL4xlyK7p7PFPzp
    
    271
    +i/XVYFrt2yR7C+vEpMfE7Ot6kzfUFzPzwfvFcDmguzyfoOreNA5XjpnbEvHDd9cn
    
    272
    ++SgfK7C+Lp+LtcqzCX6Z0m5TzLucCYt5I6APg3eWRasfZ04uMAY31WBgj7JXqufS
    
    273
    +CRCi+54IHy0TDiRsAJ97uVS+ZHPJ6P8o4rac77WTtYgYZgCfdka/GHv4Mk1MfL/M
    
    274
    +FS41nSdZZvy5Ag0ERpv6bxAIAJp5aUlho5rUhpS6ik7spsAQFPRuycPKMNu0J4F0
    
    275
    +v/OoPz085soV8ytLj4HqCGk2Zamh1jSgliZwuk9m7V7Wgxx+nBJawpWDX/eKLObE
    
    276
    +rfDwQ4dfOFvjbXLQMmNnQNaUGIWLPP3l8GuBOHMq60Bu+TPgh627vUntL5REQEQq
    
    277
    +TXIzWC6U10QsDblLwIvdOVSdGF5xl/N1myXzSKvrsZwWtoFc8G9v9hcCjhtN1sm9
    
    278
    +b7Ojc51iZXvcetcvPy5RA6AUW3yEExaedUdLnvIF9sjFYIfJWFVYh2AgavnGre6f
    
    279
    +F+NV2v3zfx3wRT7H9//m4YIDYJmgZgyQccXegTwfGBIq3osAAwYH/1FiMUMMES5I
    
    280
    +lz2nDqId+DCWECAU6wgvIFRcXrZWxDxB+ZrnmTCXoAD0xedpfOkRHp8XTVc/9MU+
    
    281
    +wQ+lZRx2OQ6MJW0XGuFvHm94KZF/8HzWA2Ah7U4n0+3sLpk6zWceZq2zZNF0yVTj
    
    282
    +wD98+xNK1Q9sP8aOKdtg8yMH3hisKR6rdW+mfX5q0Q8Gol2hZsFH/qyIhnPzhXDk
    
    283
    +nuOh8E5iMkzrejVXUEn++Yzj23XjP59SObLznVkyxI+kBI9qvVEPfFBDybjHWqLc
    
    284
    +gRcCpXAzjizEi+/d31iDa2ErJHV4R42obecFqiPnoDtiX3IiP7z9fmxM4aWPZZRq
    
    285
    +vq+1ht5wkn+ISQQYEQIACQUCRpv6bwIbDAAKCRCi+54IHy0TDoLoAKCHYRpw/Xfy
    
    286
    +Eunw1YL/uMZzl78qIQCdFVcXNbqD83qVhW4Ly7hyDL8o0aI=
    
    287
    +=awvS
    
    288
    +-----END PGP PUBLIC KEY BLOCK-----

  • lib/libxcvt.c
    ... ... @@ -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
         }
    

  • meson.build
    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'])
    


  • Reply to: