Files
MasakatsuFunaki ba6fe10529 export: GPU-rendered SDR exports read back the finished sRGB RGBA8 frame (1.6x faster NVENC export) (#2119)
With GPU Rendering on, opaque SDR exports take the renderer's 8-bit frame instead of reading back
Rgba16Float and converting it on the CPU (f16 -> f32 -> 12-bit sRGB table).

- gpu: render_export_rgba8_prepared composites layers, Push transitions, and adjustment layers
  into the Rgba16Float accumulator and resolves into Rgba8Unorm through an export-only shader
  backed by filmcraft_color::linear_to_srgb_u8_table() (4096-entry LUT), leaving composite.wgsl
  untouched and preserving byte-for-byte parity with Image::over_black_rgba8() (Stage A of #1284)
- gpu: reuse the output readback buffer across frames and retire it on failed wait; wait_mapped
  waits on its own submission; f16_rows_to_f32 helper on the remaining float path
- export: FrameRenderer::render_rgba8 (default render + over_black_rgba8); Pipeline::frame uses it
  when nothing after the render needs float pixels, falling back to the float path otherwise

GPU Rendering off and on are both byte-identical to the f16 accumulator + 4096-entry LUT contract.
1080p HEVC NVENC, 3138 frames: 17.6 s -> 11.1 s on main 8309f21a.
2026-11-23 17:33:20 -06:00
..

FilmCraft export

The export pipeline renders sequence frames, encodes them and writes the selected container. See architecture for formats, settings, presets and queue behavior.

MP4 upload compatibility (#3459)

MP4 video exports finalize with the existing ISO BMFF muxer's fast-start layout: ftyp, then moov metadata before mdat media data. This lets progressive players and upload services read the track metadata before downloading the media. The choice follows the container, so it applies to H.264, HEVC and AV1 MP4 exports with software or hardware encoders. QuickTime MOV and audio-only export layouts are unchanged.

The muxer shifts media in place with a bounded copy buffer and updates sample offsets; it does not load the entire disk export into memory. Disk outputs therefore need read and write access. Callers supplying ExportSettings::output_file for MP4 video must reserve a readable, writable file. Buffered writes are flushed before reads through that same handle. In-memory download sinks use their existing seekable byte buffer. Read, write and seek failures propagate as export errors.

Animated GIF transparency

Animated GIF supports the existing ExportSettings::alpha option (#3396). In Export mode, choose Animated GIF and enable Video ▸ Include Alpha Channel. Engine and MCP exports use file.exportMedia with "format": "gif", "alpha": true; queue entries and presets use the same settings. The default remains off, flattening the picture over black.

GIF has binary transparency, not partial alpha. After rendering and scaling, RGBA8 alpha 0–127 becomes transparent and 128–255 becomes opaque. Visible pixels retain their straight RGB color before palette quantization; transparent pixels share a cleared color. This avoids darkening partially transparent edges, but cannot preserve smooth translucent edges or shadows. The UI displays the threshold alongside the checkbox.

The existing image GIF encoder writes the animation; no codec implementation is added. Format reference: GIF89a, 31 July 1990, §23 Graphic Control Extension.

settings_tests::gif_alpha_threshold_and_disposal_roundtrip exports synthetic moving stripes with alpha 0, 127, 128 and 255, followed by an empty frame. Decoding verifies transparency, color, frame timing and removal of previous-frame pixels, with alpha both enabled and disabled. When FFmpeg is installed, its independent decode must agree on every pixel's alpha and opaque color. settings_tests::gif_palette_quantization_preserves_isolated_transparency_and_dark_pixels checks two frames with more than 256 distinct post-conversion RGBA colors, forcing palette reduction. A single transparent pixel moves between frames, surrounded by opaque black and near-black pixels. Decoded alpha must match exactly; opaque RGB channels allow at most 16/255 quantization error. This test uses the Rust decoder and needs no FFmpeg installation.

Run the GIF export tests with cargo test -p filmcraft-export --lib gif_ -- --nocapture. Run all export unit tests with cargo test -p filmcraft-export --lib.

filmcraft-ui-egui's export_ui::gif_export_exposes_binary_alpha_option uses the control channel to select GIF, toggle alpha and inspect the explanatory label. Set FILMCRAFT_UI_SNAPSHOT_DIR to render its Export-mode screenshot.