Repository navigation
fix(python): declare init_dwt_band_d to Cython as adm.c defines it - #1881
Merged
Merged
Conversation
…1881) * fix(python): declare init_dwt_band_d to Cython as adm.c defines it The wheel build of the Python harness failed on every hosted job that runs it (Ubuntu clang, Ubuntu ARM clang, macOS clang, macOS clang+DNN): adm_dwt2_cy.c:21871 passed a char * where init_dwt_band_d() takes a double *. PR #1859 gave adm.c's helper a sample-typed cursor and a length in samples; adm_dwt2_cy.pyx still declared char *data_top and passed a byte count. The declaration, the cursor and the call now use double * and buf_sz_one // sizeof(double). test_cython_adm_dwt_band_decl_contract keeps the declaration in step with adm.c without building the extension.
lusoris
force-pushed
the
fix/ci-cython-adm-dwt-band-cursor
branch
from
October 2, 2026 21:17
21e63bf to
bf5527a
Compare
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BLUF: the Python harness wheel failed to build on every hosted job that builds it, because
adm_dwt2_cy.pyxdeclaredinit_dwt_band_d()with the signatureadm.chad before #1859. The declaration and the call are fixed; a device-free contract test keeps them in step.Cause
#1859 changed
core/src/feature/adm.c::init_dwt_band_d()fromchar *init_dwt_band_d(band, char *data_top, size_t buf_sz_one)(cursor in bytes) todouble *init_dwt_band_d(band, double *data_top, size_t band_len)(cursor in samples).compat/python-vmaf/core/adm_dwt2_cy.pyxtext-includesadm.c, re-declares the helper, and kept the old declaration, so the generatedadm_dwt2_cy.c:21871passeschar *asdouble *. Failing jobs: Ubuntu clang, Ubuntu ARM clang, macOS clang, macOS clang+DNN (run 37051927171, jobs 110987165105, 110987165289, 110987165189, 110987165152). The error is-Wincompatible-pointer-typesas an error on clang 22 and Homebrew clang; GCC rejects it too. No warning flag is touched.Reproduction
Before:
cd python && CC=clang python setup.py build_ext(alsoCC=gcc):../compat/vmaf/core/adm_dwt2_cy.c:21871:58: error: incompatible pointer types passing 'char *' to parameter of type 'double *' [-Wincompatible-pointer-types](and:21871:20, assigning tochar *fromdouble *).After: both compilers build
vmaf.core.adm_dwt2_cyclean. The generated code is architecture-independent, so the aarch64 job fails and passes for the same reason (no qemu run).Fix:
double *data_top,data_top = data_buf, declarationdouble *init_dwt_band_d(adm_dwt_band_t_d *band, double *data_top, size_t band_len), call withbuf_sz_one // sizeof(double)(the byte plane size to a sample count, as the C caller does).Test:
core/test/test_cython_adm_dwt_band_decl_contract.py(fast suite, no compiler, no Cython) compares the declaration with the definition and the call's length; it fails 3 of 4 cases on the old.pyxand passes 4 of 4 now.make test-netflix-golden: 271 passed, 12 skipped.Checklist
changelog.d/fixed/cython-adm-dwt-band-declaration.md.docs/rebase-notes.md.T-CI-MASTER-FIRST-FULL-RUN-2026-10-02, item 9.