Changelog

Version 0.9.3 (03.05.2026)

  • Anisotropic directional blur (blur.wgsl): The blur algorithm has been modified to calculate the local luminance gradient vector and align the blur kernel along the edge tangent (edge_dir).
  • Macro-Tangent AA integration: Added a subpixel anti-aliasing algorithm (mixing samples at tangent angles at distances of ±1.0px and ±2.2px). This effectively smooths out "aliasing jaggedness" on high-contrast diagonal edges of the interface and video frames.
  • Multi-scale sharpness shader (sharpness.wgsl): The shader has been migrated to use a Laplacian pyramid decomposition method. Sharpness is boosted separately across three frequency bands (Fine, Medium, Coarse), preventing noise enhancement. Added calculation of an anisotropic structure tensor to stabilize details along edges. Implemented Weber-like amplitude limiting (Dehalo) to suppress white halos at high-contrast boundaries.
  • Original Frame Buffer: Added an auxiliary original_tex texture (@group(2) @binding(0) var t_original) to the graphics engine. At the beginning of each frame, the clean decoded frame is stored in this buffer. Subsequent shaders in the chain (e.g., sharpness) can reference the original undistorted source to analyze edges, preventing post-processing error accumulation from prior shaders.
  • Safe shader compilation: Shader compilation calls in pipeline.rs are now wrapped in a validation error scope (device.push_error_scope). If syntactic errors are present in custom shaders, the application will not crash; instead, it outputs a detailed compilation error log to the console and safely rolls back to the last working version of the shader pipeline.

Version 0.9.2 (30.04.2026)

  • Database editor: Added "+" (create empty movie record) and "-" (delete selected movie from SQLite database along with all related per-season settings and episode bookmarks) buttons to the editor.rs screen.
  • Video decoder optimization: Added a boundary check for copying YUV planes inside the copy_plane method. If the frame resolution is odd, missing rows and pixels are automatically padded with zeros, preventing buffer out-of-bounds access. The function that sends decoded frames to the queue has been switched to a non-blocking send_timeout(..., Duration::from_millis(50)) call. If the buffer overflows, the decoding thread no longer hangs, reducing the probability of micro-stutters in ultra-high-bitrate videos.
  • Audio clock stabilization: In the SDL2 audio callback, the accumulation of the played_samples counter is now strictly tied to the requested system buffer size (out.len()), helping to avoid audio/video desynchronization during silent scenes or audio underruns.

Version 0.9.1 (29.04.2026)

  • UI and Theme Customization: Implemented an external theme database via the themes.json file. The app reads color profiles for the background, active elements, buttons, sliders, and text on the fly. An integrated theme editor in the settings screen allows users to manually adjust the active theme's colors using real-time RGB sliders. Scanning the fonts/ folder at startup groups unique fonts by PostScript names, allowing users to reassign them to five functional roles (headings, body text, light text, special, and subtitles).
  • Internationalization (i18n): Implemented multi-language localization via external .loc files in the lang/ directory (added ru-RU.loc and en-US.loc), dynamically translating all interface elements.
  • Shader Hot-Reloading: Added a ReloadShaders event (hotkey "R"), allowing post-processing effect files to be re-read from disk on the fly without restarting the video.

Version 0.9.0 (28.04.2026)

  • New settings interface (settings.rs): Designed a fully functional application configuration screen split into tabs: appearance (theme selection, procedural background type), audio (audio device selector), and decoding.
  • Hardware integration: The SDL2 callback now queries the operating system for available playback devices, allowing audio output selection from a dropdown list. Implemented manual selection of physical graphics cards via enumerate_adapters. Added a selector for the CPU cores used to distribute FFmpeg decoding workload.
  • Player refinements: Implemented independent vertical scrolling of long lists within the player's audio and shader panels to prevent overflowing the screen. Implemented a video startup error handler: if a file is missing or the decoder fails, the player safely switches to an error screen with log output instead of crashing the program.

Version 0.8.2 (26.04.2026)

  • Media engine and GPU pipeline: Implemented a system to extract color metadata (extract_color_info) from the video stream via the C-API. The decoder reads the brightness range (Full vs Limited Range), color space (BT.709, BT.470BG, BT.601/SMPTE170M, BT.2020), primaries, and transfer characteristic type (SDR, HDR/PQ, HLG). These parameters are passed to the GPU via a uniform buffer (14th slot of the custom array). The decode_yuv function was added to the pipeline.rs video shader to perform hardware YUV -> RGB conversion on the fly using the correct matrices.
  • Post-processing shaders: Completely rewrote the film grain algorithm (grain.wgsl). The post-processing effect is now divided into two independent FBM-based noise layers: contour-anchored noise (noise_anchored) and free noise (noise_free) simulating chaotic grain movement. Added adjustments for noise gamma and random color shift (HSV).

Version 0.8.1 (25.04.2026)

  • Database and metadata separation: Designed and implemented support for season_settings and episode_bookmarks tables for TV shows. Image, shader, audio, and post-processing parameters are now isolated and saved individually for each season, and bookmarks are saved for each episode. The parse_db_settings logic has been expanded to dynamically load configurations depending on the selected season and episode.
  • Catalog interface (catalogue.rs): Added a calc_fade_alpha(y: f32) function to apply a soft transparency effect to movie cards at scroll boundaries (within 130px and 970px ranges). Implemented the ScrollList(d) event to automatically keep the active item of the right list visible with smooth auto-scrolling when switching keyboard focus. Implemented a dynamic glitch effect: the subgenre horizontal menu text displays a double-offset shadow (Red/Cyan) with procedural jitter and flashes during fast scrolling. Added a marquee effect (X-axis ping-pong scrolling) for overflowing movie titles and categories.
  • Controls: Integrated a rule into the ToggleFilterMode handler to automatically switch to list-view mode when filtering by directors or anthologies.

Version 0.8.0 (24.04.2026)

  • Migrating from CLI processes to C-API (ffmpeg-next): The logic of launching FFmpeg child processes via the command line has been completely removed. The project has migrated to direct system calls of decoding libraries using a safe Rust wrapper, ffmpeg-next (linked to FFmpeg 8.1). Video plane and audio sample decoding, scaling, and resampling are now performed within the application's memory space, eliminating IPC overhead and memory leaks.
  • Asynchronous lock-free queues: Video frame transmission to the graphics thread has been moved to a thread-safe crossbeam_channel::bounded channel with timeout controls to eliminate micro-stutters. Audio transmission to the SDL2 thread now uses a non-blocking ringbuf::HeapRb ring buffer (producer/consumer separation), guaranteeing crackle-free audio even under 100% CPU load.
  • Low-level audio processor optimization (SSE Assembly): The internal compression loops (Soundgoodizer) in dsp.rs have been optimized using inline assembly (asm!). Absolute value calculations, limit comparisons, and hard clipping operations are performed on SSE vector registers (andps, ucomiss, minss, maxss instructions), reducing CPU usage of the audio callback by more than 3x.
  • Orphan Covers Cleaner service: Added a clean_orphan_covers function to editor.rs. When saving changes, the database verifies paths for all active covers, frames, and icons. Unused JXL and WebP files are automatically deleted from disk.
  • Hardware timer synchronization: In the audio.rs callback, the played_samples counter increments strictly by the system buffer size (out.len()), independent of data availability in the ring buffer, preventing audio/video desynchronization in quiet scenes or during audio starvation.

Version 0.7.0 (20.04.2026)

  • Transition to native YUV rendering: FFmpeg has been configured to output a high-bit planar format: -pix_fmt yuv420p16le (16-bit YUV 4:2:0). Three separate textures—VideoY, VideoU, and VideoV—have been allocated in texture.rs in R16Unorm format, reducing the frame data transfer rate to the GPU by approximately 50% compared to RGBA. YUV -> RGB conversion is handled by the fs_video hardware shader using a BT.709 matrix.
  • Multi-pass effect pipeline (Ping-Pong Buffering): Created two intermediate high-resolution (4K) textures—pass_a_tex and pass_b_tex—in Rgba16Float HDR format. The engine dynamically swaps the source and render targets between them to apply a chain of post-processing shaders sequentially.
  • 5-pass sharpness shader (sharpness.wgsl): Passes 0-1 perform 2D upscaling using the Lanczos4 method. Pass 2 calculates the structure tensor and high-frequency noise level. Pass 3 thins edges (Edge Thinning) via subpixel texture coordinate offsets. Pass 4 implements anisotropic flow diffusion to suppress ringing and preserve natural micro-texture.
  • Interactive Zoom & Pan: Added a video zoom tool (up to 5x) with pan capability by dragging with the left mouse button. Coordinates are passed to the UI shader via the zoom_factor and zoom_offset uniforms.
  • View history saving and auto-resume: Implemented auto-saving of playback progress to the movies.json file every 5 seconds. Reopening a movie displays an interactive "Resume playback?" dialog to jump back to the saved timestamp.
  • Bilateral Blur: The blur algorithm in blur.wgsl has been enhanced with bilateral filtering by luminance. Pixels are blurred only if the difference in their luminance compared to the central pixel falls within an exponential distribution, keeping high-contrast edges sharp.

Version 0.6.0 (18.04.2026)

  • Film stock shader (cinema.wgsl): Designed an analog film stock emulation algorithm: tetrahedral color interpolation (simulating Teal & Orange spectrum shifting), subtractive density (emulating physical light absorption by film emulsion), gamut compression (Cube Shrink to eliminate clipping of "poisonous" neon shades), and highlight roll-off using a Reinhard-like curve with soft desaturation in highlights.
  • Hardware 3D LUT decoder: Added support for three-dimensional color lookup tables (.cube files). The engine parses files from the shaders/LUT directory, uploads them into a single 3D texture t_lut (Rgba32Float), and performs sampling with tetrahedral interpolation on the GPU (lut.wgsl).
  • Subtractive CMY shader (subtractive.wgsl): Implements exponential color density mapping in CMY space with a cmy_luma_prot feature to preserve the original luminance and prevent unwanted darkening.

Version 0.5.2 (15.04.2026)

  • Text alignment correction: Fixed a movie description offset bug in catalogue.rs. Vertical alignment v_align has been forced to 0, preventing long text from shifting above the mask boundary during dynamic card scaling.
  • Multi-module build stabilization: Temporarily disabled release profile optimizations (profile.release) in the root Cargo.toml to speed up incremental compilation and simplify debugging of the FFmpeg and SDL2 interaction on test beds.

Version 0.5.1 (14.04.2026)

  • UI Audio Manager (UiAudioManager): Integrated an audio subsystem based on SDL2 Audio into the graphics engine. Added decoding of .opus files from the SFX/ directory via FFmpeg to load raw pcm_f32le streams (48000 Hz, stereo) into application memory.
  • Effect Mixer (UiMixer): Developed an audio mixer to play back looping background textures and short sound effects (SFX) concurrently.
  • Seamless loops (Crossfade): Implemented a seamless loop-back algorithm: when approaching the end of audio data, the mixer smoothly crossfades the fading tail (fade_out) with the rising head (fade_in) using a sinusoidal curve to eliminate clicks and silences.
  • Sound events integration: Added a list of AppEvent::PlayUiSound events to state.rs. Audio cues are bound to user actions: clicking buttons, switching subgenres, and scrolling movies.
  • SFX rate-limiting: Introduced the last_played_movie_sfx_idx variable to prevent audio subsystem overload during extremely fast kinetic scrolling.

Version 0.5.0 (13.04.2026)

  • Separation of rendering passes: Reorganized pipeline logic in pipeline.rs. The sample_pipeline function now solely handles primary frame preparation (color correction and HDR-to-SDR conversion). Spatial effects (film grain, sharpness, etc.) are moved into a unified, sequential post-processing chain, preventing mutual distortions.
  • Font atlas overflow resolution: Added a forced self.text_atlas.trim() call to the end of each frame in the Renderer::render method, eliminating the AtlasFull panic during prolonged scrolling. Removed .unwrap() calls from text preparation functions to prevent crashes during rare frame glitches.
  • Procedural background calculation: In the ui.wgsl fragment shader, static noise for blending mode 5u (Color Dodge) was replaced with a procedural background based on fs_background. This resolved a bug where background blur remained frozen during UI movements.
  • Mode 12 overlay layer: Added a 12u mode to ui.wgsl for applying a Color Dodge effect on top of the SCREEN_BUFFER, enabling glow effects on background UI elements.
  • DB schema migration: Added safe ALTER TABLE blocks to the Db initialization class to automatically add bookmarks and audio_track columns when upgrading databases from older versions.

Version 0.4.2 (08.04.2026)

  • Multi-band audio processor (engine/dsp.rs): Designed an 8-band parametric peak EQ based on a 2nd-order biquad cascade. Developed the Soundgoodizer compression algorithm with support for four signature compression settings (A, B, C, D) using a 3-band crossover and independent TrueCompressor instances.
  • Zero audio latency: DSP processing has been moved directly into the SDL2 audio callback (instead of being processed during FFmpeg reading), eliminating multi-second latency when modifying audio settings on the fly.
  • Multi-threaded JPEG XL decoder: Replaced the image codec with the jxl-oxide library, supporting parallel decoding of cover images via a global Rayon thread pool.
  • Video effects quality improvements: The unsharp masking algorithm in sharpness.wgsl has been enhanced with local contrast calculation to suppress white and black halo artifacts (Dehalo). Designed a tone-mapper using the Uncharted 2 formula and a BT.2020 -> BT.709 color matrix for accurate HDR (PQ) playback on standard SDR monitors.
  • Functional enhancements: Added lossless .png screenshot export to the user's Desktop. Implemented a bookmarking system (with saving in the DB and rendering tick marks on the player's timeline). Configured film grain noise to freeze when playback is paused.
  • Binary size optimization: Configured release build options in Cargo.toml (LTO, codegen-units, panic abort, and strip) to drastically reduce executable size.

Version 0.4.1 (05.04.2026)

  • TV Series support: Implemented a system to automatically parse TV show folder structures. The player parses folder filenames with season and episode tags (e.g., {Season 1} {Episode 2}) and renders interactive season/episode selection menus in the player's UI.
  • Dynamic shader parsing from disk: Effect shaders have been moved to separate files in the shaders/effects/ directory. Built a header parser on the Rust side (parsing lines like // NAME:, // FUNC:, and // PARAM:). The app reads files on startup and dynamically constructs parameter structures and sliders in the GUI.
  • Flexible parameter buffer: Reorganized Uniform buffer data into a custom: array<vec4<f32>, 16> array, allowing new shader parameters to be passed without altering or recompiling Rust code.
  • Navigation and scroll optimizations: Implemented a smooth kinetic scrolling algorithm (LERP interpolation) for lists, carousels, and categories. Added adaptive width to the catalog's left panel (automatically collapsing into compact mode when selecting "All Movies").

Version 0.4.0 (03.04.2026)

  • Video player integration (engine/media.rs): Implemented launching and reading streams from two parallel ffmpeg child processes: one decodes video into a raw RGBA stream, while the other decodes audio into pcm_f32le format. Integrated audio output via the sdl2 audio library. Framerate synchronization is driven by the audio playback timer (current_audio_time).
  • Playback screen (screens/player.rs): Designed a custom player interface featuring a timeline (supporting click-to-seek), buffering indicator, playback controls, and a settings overlay.
  • Dynamic effects pipeline: Implemented an on-the-fly shader assembly mechanism. In the PipelineManager, the original.wgsl template is dynamically modified based on active effects to inject shader call chains. Post-processing parameters are bound to the updated ShaderParams Uniform buffer structure.
  • Initial shader effects: Created individual effect files for the video stream: film grain (grain.wgsl), blur (blur.wgsl), chromatic aberration (chroma.wgsl), and unsharp masking (sharpness.wgsl).

Version 0.3.0 (25.03.2026)

  • Glyphon integration: Replaced the outdated wgpu_text and ab_glyph libraries with the modern glyphon text pipeline (v0.9.0). This improved font rendering quality, optimized glyph caching in the integrated atlas, and lowered memory consumption (automatic buffer clearing is triggered when reaching limits).
  • Multi-pass rendering (Offscreen Pass): Added an offscreen_texture intermediate texture to the GpuState for preliminary background rendering. Implemented a two-pass rendering layout: the scene is rendered to an offscreen buffer first, then copied to the swapchain frame buffer before drawing the UI overlay.
  • "Dispersion Glass" effect: Developed a frosted glass shader effect (mode 6u in ui.wgsl) utilizing the offscreen buffer. The blur is optimized using IGN (Interleaved Gradient Noise) and chromatic channel dispersion, achieving a soft blur look with no performance drop.
  • Dynamic catalog UI (catalogue.rs):
    • Subgenre Carousel: Implemented horizontal scrolling of elements with chromatic aberration and visual glitch effects during rapid movement.
    • Vertical 3D Movie Scroll: Designed a vertical card carousel mapping items into 5 fixed spatial slots (Main Center, Top Left/Right, Bottom Left/Right). Scaling, transparency, and boundary fade effects are computed dynamically for each card.
  • DB Schema Reorganization: Temporarily switched the database schema in core_db from relational integer ID lookups to direct text values to simplify early-stage debugging.

Version 0.2.0 (23.03.2026)

  • Custom text layout: Completely removed egui dependencies. Implemented manual text line assembly, character width calculations, and bounding box evaluations using ab_glyph in gui/text_layout.rs.
  • Interactive text input:
    • Developed a hit_test algorithm to determine caret position (character index) when clicking inside input fields.
    • Implemented text selection logic (get_selection_rects).
    • Added clipboard integration via the arboard library (supporting copy, paste, and select-all with Ctrl+A/C/V).
  • Rust architecture optimizations: Resolved a critical compile error, E0499 (conflicting mutable borrows of self when handling text fields). Moved all text input mutation logic into a centralized apply_text_logic method inside the AppState structure.
  • UI events: Added UpdateCursor and ToggleMultiSelect system events to enhance user interaction with input controls (e.g., multi-selecting subgenres in dropdown lists).

Version 0.1.0 (21.03.2026)

  • Workspace architecture: Split the project into two distinct packages: core_db (a library for SQLite database management via rusqlite) and app_main (the primary graphical application).
  • Graphics stack: Moved from an early eframe/egui prototype to building a custom graphics engine on top of the low-level wgpu API (using winit).
  • Interface composer (GuiComposer): Designed a basic composer to accumulate UI geometry (vertices and indices) and batch draw calls, keeping draw counts as low as possible.
  • Text rendering: Integrated the wgpu_text library (powered by ab_glyph) for basic text elements rendering.
  • Shader pipeline: Coded a base WGSL shader (shader.wgsl) supporting multiple primitive render modes:
    • Solid color rendering.
    • Raw texture and colored icon rendering (vector SVG parsing is handled via resvg, usvg, and tiny-skia).
    • Software blur and Color Dodge blending.
  • Database and scanning: Designed an SQLite database schema (cinema.db) with tables mapping movies and dictionary metadata (genres, categories, media types, quality, frame formats). Implemented recursive scanning of directories for .mp4 and .mkv files using walkdir.
  • Import tools: Added utility functions to image_utils.rs to convert cover images into JPEG XL (.jxl) format via FFmpeg subprocess calls.