Commit Graph
21 Commits
Author SHA1 Message Date
bonzi 51ce5332e0 Linux: menu entry for the capture card; plan: capture card is the main path
- scripts/linux/smoovplay-capture.sh: fullscreen on SMOOVPLAY_MONITOR (default
  HDMI-A-2), log in ~/.cache/smoovplay/last-run.log, notification on failure
- scripts/linux/install-desktop-entry.sh: 'SmoovPlay (capture card)' entry
- verified launching through KDE (kioclient exec) on the RTX 5080 box
2026-11-19 10:54:35 +00:00
bonzi d44820c2fc Phase 0 on the RTX 5080: results, rtkit fixes
- docs/linux-port/target.md: sm_120 native, RIFE 1080p 6.9 ms (PyTorch fp16),
  NVDEC 0.61 ms, CUDA->GL on Wayland 0.18 ms, GC311 = 1080p60 MJPEG/H.264
- winutil: rtkit MakeThreadRealtimeWithPID (busctl is another process) and
  lower the hard RLIMIT_RTTIME to rtkit's max; SCHED_RR 10 verified
- linux_spike: time the matmul with CUDA events
2026-11-19 08:56:24 +00:00
bonzi 7eba48426f Linux: chiaki-ng minimises itself on request, Arch PKGBUILD, Phase 0 spike script
- frame tap: window_request word (offset 100, feature bit 32): SmoovPlay asks
  chiaki-ng to minimise/restore its own windows (Wayland forbids doing it from
  outside); run.py uses it on Linux. Covered by chiaki_tap/selftest.py
- chiaki_tap/PKGBUILD (chiaki-ng-smoovplay, v1.10.1) + build_linux.sh; built in
  an archlinux:latest container (needs system curl: the bundled one fails with
  Arch's OpenSSL)
- scripts/linux_spike.py: Phase 0 checks in one command
- docs/linux-port: progress log, QUICKSTART
2026-11-19 08:39:37 +00:00
bonzi b206fb2c31 Linux: OS layer, frame tap over POSIX shared memory, XDG folders, LUT path fix
- framegen/oslayer.py: config/cache/Videos folders (XDG on Linux, unchanged on
  Windows), the frame tap's clock (CLOCK_MONOTONIC ns, qpc_freq 1e9) and its
  shared memory (/dev/shm, mode 0600) with a futex wake-up
- frame tap (chiaki_tap/frametap.c, framegen/chiaki_tap.py, docs writer):
  Linux backend; layout unchanged apart from a wake word at offset 96 behind
  feature bit 16. Windows code path unchanged (cross-compiled with mingw)
- looks: LUT names and look ids lose folders on every OS. On Linux a shared
  look code could carry ..\\..\\x.cube through Path.name untouched
- Windows-only modules import on Linux (WINFUNCTYPE stand-in)
- winutil.boost_thread: SCHED_RR 10 (direct or via rtkit) on Linux
- glcuda: finds libcudart.so from torch's nvidia wheels
- tests: frame tap tests run on Linux; tests/test_oslayer.py

pytest on Linux (CPU torch): 370 passed, 0 failed (was 328 passed, 6 failed).
chiaki_tap/selftest.py passes on Linux (C writer vs Python reader).
2026-11-19 08:28:52 +00:00
bonzi ee69f77c59 Plan: Zeb's decisions (Plasma 6, PS5 + GC311, simple UI in v1, public release path) 2026-11-19 08:03:44 +00:00
bonzi 806e467b3e Linux port plan: Arch + NVIDIA RTX 5080, in phases
Baseline on Linux (CPU torch): 328 passed, 6 failed, 33 skipped.
Maps every Win32 dependency to a Linux replacement, phases 0-9 with
measured gates, risks and open questions.
2026-11-19 07:55:05 +00:00
SmoovPlay 75a6e6b573 Fill the screen: Fit, Zoom, Stretch or Panorama on an ultrawide
An ultrawide player asked for more options than black bars. Consoles only
send a 16:9 picture, to a TV, a capture card or Remote Play, so there's no
more of the game to show: these are ways of laying out the same 16:9
picture, and the setting's help, hints, impact line and Z message say so.

- Fit: all of it, true to shape, with bars. The default, as before.
- Zoom: fills the screen by cutting off the top and bottom (the sides on
  16:10), which can cut the HUD.
- Stretch: fills the screen by making everything wider.
- Panorama: the picture is drawn as for Fit into a half-float texture,
  then bent across the screen with u = atan(t*x) / atan(t): the middle
  5% (21:9) to 15% (32:9) wider than true, the sides taking the rest.

Settings, Display, Fill the screen; Z in the video window; --fill in
run.py. Messages, the menu and the stats go on the part of the picture
that's on screen. Clips record the stream, so they're unchanged.

Checked in the video window at 2560x1097 with a 720p test picture: each
mode's shape and bars as expected, the Z key, the menu and the overlay
placed on the picture; Panorama's pass about 0.02 ms on an RTX 4070 Ti
SUPER. Tests for the layout, the curve and the GL pass.
2026-11-19 02:55:55 +00:00
SmoovPlay 2b4ff033de RTX VSR wording: say what it does, without results from testing NVIDIA's package
NVIDIA's package licence doesn't allow publishing results of testing it,
and the settings, the changelog and the developer docs compared RTX VSR's
speed and look with FSR 1's from our own runs (written when RTX VSR meant
the RTX Video SDK, whose licence allows that). They now say what it does
instead: an AI model on every frame, which can cost in-between frames at
90 and 120 fps. The SDK's figures stay with the SDK.
2026-11-19 02:20:52 +00:00
SmoovPlay d04499f526 RTX VSR in the installed app, through NVIDIA's package (Experimental)
The installed app had no RTX VSR: it needs NVIDIA's RTX Video SDK, which
is behind a developer login, and the wrapper links one of the SDK's
libraries, so it can't ship in the MIT app. NVIDIA's nvidia-vfx package,
which the launcher already downloads from NVIDIA for VFG once the user
accepts NVIDIA's licence, contains the same model and a VideoSuperRes
effect. VfxVsr runs it, and make_vsr picks it ahead of the SDK wrapper
(FRAMEGEN_VSR=sdk for developers).

- Frames go in and come out as NVIDIA's packed 10-bit RGB. The window
  copies the output words into an R32UI texture and draws it through an
  RGB10_A2 view of the same memory, so nothing unpacks them; alpha is
  swizzled to opaque, as NVIDIA leaves it 0 at times.
- A capture card's raw frames use NVIDIA's models for clean video.
- RTX VSR is made the first time it's picked, so sessions that never use
  it load nothing for it.
- NVIDIA's package licence forbids publishing benchmark results, so its
  timings stay out of the log (Copy diagnostics includes the log).
- Settings, the launcher's VFG panel, the README and the developer docs
  say RTX VSR comes with NVIDIA VFG's download; RTX VSR quality is marked
  Experimental, and published per-quality timings are gone.

Checked on an RTX 40 series card: colours come out in the right order,
every quality and the clean-video models run, VFG and VSR work in one
process, and a 90 fps fake-PS5 session upscaled to 2560x1440 ran
without errors.
2026-11-19 01:48:36 +00:00
SmoovPlay 6ddf4f11ac In-video menu: a main page and a page for each section
With Dip smoothing the menu had 22 rows by default, squeezed closer to fit
a 1080p window, and was hard to get through. Its main page now has the
quick picks that apply live (Frame generation, Output frame rate, Upscaler)
and a row for each section, from Spec.group as on the launcher's Settings
page (Smoothness, Picture, Looks, Display, Instant replay, PS5 Remote
Play). Enter or Right opens a section, Esc or Backspace goes back to the
main page on that section, and Esc there (or M anywhere) closes it. A
section reopens on the row it was left on, and the menu on the page it was
closed on. A section's row shows what's in it in the help area.

The panel is as tall as the longest page with the tallest help, whatever
page is shown, so nothing moves while going through it: 720 px at 1080p
against 1032 before, and a page has room for 15 rows before they're drawn
closer together. Restart now shows on every page when something needs it.
New settings still need no change to the menu.
2026-11-18 23:38:47 +00:00
SmoovPlay 3a17b9646f Delay figures: count a frame from when it's first drawn as itself
The timed path (Even out 40-60, Dip smoothing) counted a real
frame as shown only once the game time on screen had passed it, but
place() already draws it as itself a display time earlier, when an
in-between frame would be over 96% of the way to it. Timed as they arrived,
on whole ticks, dip-timed frames were drawn as themselves a tick before
they counted: at 60 and 120 fps every frame was logged 17 ms late, at 90
fps about half of them (the rest fall between two output frames and still
count when their moment passes). Sound in sync and instant replay follow
this figure, so the sound was held back that much too long. With Even out
40-60 the change is small: about 5 ms on average for a 45 fps game at 60 or
120 fps, none at 90.

Through the fake PS5 at 90 fps, a 27 fps game with Dip smoothing on: median
delay logged 66 ms instead of 70 (37 with it off).
2026-11-18 23:14:07 +00:00
SmoovPlay fc5e4b4247 Dip smoothing: even out dips below 30 fps (off by default, Experimental)
A 30 fps game that misses its slot holds a frame for 3 or 4 ticks (50 or
67 ms) and the next one jumps. With the new setting, Dip smoothing, on,
DipWatch spots two such dips within a second (by the picture's own call, so
it also works with Game frame rate 30 fps) and the pipeline times the
game's frames by the tick they arrived on (FrameTimeline.at_arrival, up to
3 ticks of delay), so a dip shows as a brief slow-down. It switches off 3 s
after the last dip, so a game holding 30 is unchanged. Made with big
open-world games on a base console in mind; it has its own section in the
patch notes.

On simulated games holding 10-20% of their frames, motion unevenness fell
from 0.23-0.59 to 0.02-0.12 with no frozen frames at 60 and 90 fps, for
17-25 ms more delay with 50 ms holds and 33-49 ms with 67 ms holds while
dipping. Through the fake PS5 on the GPU (a 27 fps game at 90 fps), extra
frames shown went from 97% to 79-83%, since every frame shown while
dipping is a generated one, and the logged median delay from 36 to 70 ms,
which overstates it: the delay figure counted these frames late (fixed in
the next commit; 37 to 66 ms after it). Not tried with a real game that
dips yet.
2026-11-18 23:13:55 +00:00
SmoovPlay 120d0c3cb8 Remote Play: tell new frames from repeats by the picture
Auto went by each frame's compressed size, which misread locked 30 fps
games: a repeat can be nearly half a new frame's size, and after any still
scene the size check stopped answering for the rest of the session, leaving
a fixed picture line that calls most decoded repeats new. Remote Play now
uses the learned two-band picture check App window already uses. Replayed
over five real 30 fps frame logs, repeats are called right 93-99% of the
time over Ethernet (83% over Wi-Fi) instead of 3-35%, and Even out 40-60
switches on by mistake 0-5% of the time instead of 3-23%.

The size check stays for the stream check, test mode and the frame log,
and now recovers once many recent frames look big (the old xfail passes).
2026-11-18 20:03:35 +00:00
SmoovPlay e2720b9312 README and developer docs: what's been tested, and how the numbers are measured
- Works with: who tested what, on which hardware (PS5 with real 30 fps games, RTX 4070 Ti SUPER and 5070 Ti,
  a player's AVerMedia GC573, a real PS5 HDR stream on an HDR monitor, the current Xbox app), and a short
  "How it's checked" note.
- The 9 ms and 36 ms figures say what they measure, with the live 30 fps PS5 results; 120 fps is marked as not
  yet shown live.
- Tips for locked 30 fps games and wired play, Ctrl+Alt keys in App window mode, Check for updates, the
  Auto-detect VFG offer, and a link to the website up top.
- DEVELOPING.md: live 30 fps PS5 results replace "not measured yet"; capture card, window capture and HDR limits
  updated.
2026-11-18 18:18:55 +00:00
Vadko 7499a081b0 Keep Windows' HDR on in fullscreen (#6)
* Keep Windows' HDR on in fullscreen

With Windows' HDR on, OpenGL's own fullscreen switched the display to SDR
while the video window was in front, and back to HDR whenever another window
was: the picture's colours changed with every Alt+Tab or click, and the
display's SDR mode can look different again (yellowish on the PC this was
found on). A DXGI swap chain keeps HDR on.

So when the main display has Windows' HDR on, the window now presents
through DXGI (8-bit) whatever "Window presentation" says, and fullscreen is a
borderless window over the monitor, as HDR output already does. The
presentation row in the menu says why it can't be changed. If DXGI can't be
set up (no NVIDIA interop), it's OpenGL's own as before, with a line in the
log. FRAMEGEN_KEEP_HDR=0 turns it off.

* Review fixes: keep HDR on when HDR output fails, no tearing in a plain window

- HDR output's 10-bit swap chain failing now falls back to the 8-bit one when Windows' HDR is on, instead of OpenGL, whose fullscreen would switch the display to SDR again. run.py keeps the presentation row's reason when it drops HDR output's rows.

- A window that's on DXGI only because Windows' HDR is on doesn't tear with VSync off: it never did with the standard presentation. Fullscreen, and Low delay picked on purpose, tear as before (DxgiPresenter.present(tear=)).

- Fullscreen after Windows' HDR was turned on during play (the window opened on OpenGL) says it will switch the display to SDR until the next Play.

- The log marks this DXGI path as Experimental too.
2026-11-18 08:38:22 -08:00
Vadko a539d968f9 Steady HUD with NVIDIA VFG too (#11)
Steady HUD was RIFE only, though it only needs the two real frames and the in-between one. Its maths move to framegen/steady.py (SteadyHud), which RIFE now uses (the same operations, so its captured CUDA graphs are as before) and so does VfgInterpolator: with it on, the real frames are kept as RGB halves beside VFG's own copies, the mask comes with each real frame, and VFG's in-between frame gets the real pixels where the HUD is. Turned on between two real frames, it takes them from VFG's copies.

The setting now applies to VFG as well, and run.py no longer greys it out there.
2026-11-18 08:35:50 -08:00
SmoovPlay 96bb00a58f Fix App window, capture card listing and video window keys; add a 30 fps game setting and frame logs
App window: find the Xbox app's current process and Microsoft Store app
windows, fit the smooth picture to the app's window exactly, and give
SmoovPlay its own Ctrl+Alt keys (menu, fullscreen, quit, stats, smooth)
that work while the app has the keyboard. A key another program holds
falls back to the next one; the Play page lists the keys and lets them
be changed.

Capture cards: read device names from Windows' list without opening
each camera, list cards that carry video and sound together, look at an
empty list once more, give up after 30 s, and say why a card won't open
(in use, camera privacy, unplugged). Log USB 2 ports and 10-bit cards.

Play: a Game frame rate setting (Auto, 30 fps) that takes every other
frame as new, counted by the stream's own frame numbers; a frame log
for each PS5 Remote Play session (last 10 kept); fullscreen as a
borderless window so Alt+Tab works; the video window takes the keys as
it opens, before chiaki-ng is minimised.

Launcher: Check for updates (automatic check every 6 hours), Esc and
Stop end a session gracefully while a before & after video finishes,
diagnostics leave out the Windows user name and device owners' names
and call Windows 11 by name, Frame tap labelled for developers.
2026-11-17 23:30:12 +00:00
SmoovPlay 853f7f6fed Keep the video window's keys, add a minimal overlay and a frame tap for any app
- Video window: a minimal stats overlay (the new default; S goes Off, Minimal,
  Detailed); keys work without a click (the launcher minimises itself without
  activating another window, and keys a program takes with no input from the
  player come back); its keys shown when it opens; an in-video menu that keeps
  its size.
- Instant replay at 120 fps keeps every other frame (60 fps clips).
- Test results: quality as the share of each frame that's visibly off, instead
  of dB, and only with enough frames to go on.
- Frame tap for any app (Experimental): decoded NV12/BGRA frames,
  docs/frame-tap.md, example writers, Frame tap on the Play page.
- chiaki-ng patch: the tap's code in its own files (frametap_session.cpp), with
  one-line hooks in chiaki-ng's own files.
2026-11-17 07:40:14 +00:00
SmoovPlay 2a5d6b40c4 Mark HDR as Experimental in the app and docs; prepare 0.2.0
- Settings can be marked experimental. HDR is: the launcher's Settings page
  shows the EXPERIMENTAL badge and a Send feedback button on its row, and
  the in-video menu an "experimental" tag. Its help starts with what hasn't
  been tried yet (a real PS5 HDR stream, an HDR screen).
- README: HDR in Works with (Experimental, from 0.2.0); the docs, the PS5
  guide and the log lines say Experimental too.
- CHANGELOG entry for 0.2.0 (not released yet); the installer builds 0.2.0.
2026-11-17 00:21:12 +00:00
SmoovPlay 3bb59e88e2 Add HDR for PS5 Remote Play streams (off by default)
A new HDR setting (Picture) for chiaki-ng's H.265 HDR codec: 10-bit HEVC,
PQ, BT.2020. With it off, nothing in the pipeline changes.

- On, shown in SDR: the stream is tone-mapped to 8-bit SDR as it's decoded
  (BT.2390 roll-off, SDR white at 203 nits, BT.2020 to BT.709), through a 3D
  LUT on the GPU: about 0.7 ms a 1080p frame.
- On, HDR output (Experimental): frames stay HDR10 as half floats through
  RIFE, VFG and FSR 1 into a 10-bit DXGI swap chain in HDR10's colour space,
  with the menu and overlays at SDR white. Needs Windows' HDR on; otherwise
  it falls back to SDR. Checked by reading back the presented buffer on an
  SDR display (FRAMEGEN_HDR_FORCE=1), not yet on an HDR screen.
- An HDR stream with the setting off now says how to fix the washed-out
  colours instead of only warning.
- The fake PS5 can send HDR10 (--hdr) for testing without a console.

Low delay presentation now copies into the swap chain by default. Read back
before each Present, the direct mode held the new frame only every other
Present (black on the others); the copy mode held it every time.
2026-11-16 23:49:56 +00:00
SmoovPlay 7624bed6f0 SmoovPlay 0.1.0 2026-11-15 07:34:33 +00:00