Skip to content

Test CI with turbo-jpeg, benchmarks, and image orientation tests - #66

Merged
Thibault-Pelletier merged 2 commits into
Kitware:masterfrom
user27182:ci/turbo-benchmarks-orientation
Oct 9, 2026
Merged

Thibault-Pelletier merged 2 commits into
Kitware:masterfrom
user27182:ci/turbo-benchmarks-orientation

Conversation

@user27182

@user27182 user27182 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

CI fixes, benchmarking, and new tests, so that #65 can land with improved confidence nothing breaks.

  • fix: return columns then rows from VtkRemoteControlledArea.img_cols_rows, with a test.
  • test: install libjpeg-turbo 3 on CI so turbo-jpeg is really tested, render with OSMesa directly on Linux, benchmark capture and encoding with pytest-benchmark, and check frame orientation, alpha and lifetime, and encoder handling of non-contiguous arrays.

@Thibault-Pelletier

Copy link
Copy Markdown
Contributor

Thx @user27182 for working on this.
It looks good to me 👍.

Could you just update your commits so that:

  • The rows / cols fix is first
  • Squash the other commits into one marked test: ...

img_cols_rows unpacked vtkImageData.GetDimensions(), which is (width,
height, depth), as rows, cols, so it returned the height as cols and the
width as rows, unlike the protocol and the vanilla example. The array
shape was right, but the encoders' meta reported w and h swapped for
non-square windows. Add a test with a non-square window that checks
cols, rows and every encoder's meta w/h.
- CI: install libjpeg-turbo 3.2.0 (checksum pinned) on Linux and
  Homebrew's jpeg-turbo on macOS. Ubuntu's libturbojpeg 2.1.5 lacks the
  tj3* API PyTurboJPEG 2 needs, so turbo-jpeg silently fell back to
  Pillow; the job now fails if it does. README's Ubuntu instructions
  point to the official package too.
- CI: select OSMesa directly on Linux (VTK_DEFAULT_OPENGL_WINDOW), so
  render windows no longer log "Failed to load EGL!" first.
- Benchmark VtkRemoteControlledArea.img_cols_rows on a 1920x1080 frame
  separately from encoding it with each encoder (pytest-benchmark, dev
  extra); CI saves the results as a Linux artifact.
- Check each quadrant's color in the img_cols_rows array and in every
  encoder's decoded output, that encoded frames have no alpha channel,
  and that a frame isn't overwritten by the next capture.
- Check that every encoder gives the same bytes for non-contiguous RGB
  arrays (views of RGBA, bottom-up, mirrored, transposed, strided,
  Fortran order) as for a contiguous copy; these need no rendering and
  also run on macOS and Windows CI.
@user27182
user27182 force-pushed the ci/turbo-benchmarks-orientation branch from fe54a08 to ae12d33 Compare October 8, 2026 16:53
@user27182

Copy link
Copy Markdown
Contributor Author

The commits have been restructured

@jourdain

jourdain commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

@Thibault-Pelletier I let you merge it once you are ok with it.

@Thibault-Pelletier
Thibault-Pelletier merged commit 1324dfb into Kitware:master Oct 9, 2026
7 checks passed
@user27182
user27182 deleted the ci/turbo-benchmarks-orientation branch October 9, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants