Commit Graph
7 Commits
Author SHA1 Message Date
dotCooCoo f7e3a17e84 Merge main into feat/media-source-decoded-frame
# Conflicts:
#	Cargo.lock
#	crates/media-source/Cargo.toml
#	crates/media-source/src/lib.rs
2026-11-22 00:54:30 -08:00
FredApps 3de39fd3a5 media-source: play indexed Y4M from bounded byte ranges (#2903)
* media-source: play indexed Y4M from bounded byte ranges

* Preserve Y4M indexing errors and align fractional seek boundaries
2026-11-22 04:58:22 +07:00
dotCooCoo ad3aa18a3e craft-media-source: expand limited-range RGB pictures to full range
compositor_frame tagged every RGB picture full range and passed its
samples through, so an AV1 4:4:4 picture with the identity matrix and a
limited-range flag drew black (code 16) as dark gray. RGB samples tagged
limited range are now expanded from black at 16 and white at 235, scaled
to the plane's depth, before the frame is tagged full range.

craft-video's VideoFrame::new now starts RGB frames full range, so RGB
frames whose source does not signal a range (VMD palettes, DNx RGB, and
frames built by hand) are not expanded. AV1 and VP9 still set the range
they decode.
2026-11-21 12:21:52 -08:00
dotCooCoo 2fc9b9707e Merge main into feat/media-source-decoded-frame 2026-11-21 11:46:18 -08:00
Terra854 5d25fa3d22 Share scoped media request cancellation (#2861) 2026-11-21 12:56:29 -05:00
dotCooCoo c2f5077253 craft-media-source: compositor_frame turns a decoded picture into a compositor frame
compositor_frame and compositor_frame_within take the picture a
craft-video decoder returns (craft_video::frame::VideoFrame) and build
the craft_frame::VideoFrame a MediaSource returns, with every buffer
bounded by a byte limit.

- Y'CbCr and gray pictures become Yuv8, or Yuv16 at the deepest plane's
  bit depth. 4:2:0, 4:2:2 and 4:4:4 keep their subsampling; other
  subsamplings are repeated out to 4:4:4. Gray gets neutral chroma.
- RGB pictures become Rgba8 when every plane is 8 bits and the transfer
  is BT.709 or sRGB, otherwise linear premultiplied RgbaF32.
- H.273 color tags map onto ColorInfo, with BT.601 defaults under 720
  lines and BT.709 otherwise. The sample aspect ratio becomes the pixel
  aspect ratio.
2026-11-20 14:42:47 -08:00
FredApps 617a3cea3b Add craft-media-source: MediaSource, open_bytes, and open_reader (#1891) 2026-11-16 15:51:32 -05:00