Emby Emby Emby Learn
  • Emby Home
  • Video
  • Audio
  • Media Files
    • Subtitles and captions
    • Photos and images
    • Metadata and discovery
    • Libraries and media collections
    • Playback and streaming
    • Media hardware acceleration
    • Displays and AV connections
    • Live TV and recording
  1. Emby Learn
  2. Media hardware acceleration
  3. Media engines and acceleration interfaces
  4. Vendor media technologies
  5. Apple
  6. Metal for video processing
Search Results for

    Show / Hide Table of Contents

    Metal for video processing

    Metal exposes Apple GPU graphics and compute work used to process suitable picture textures, with CoreVideo interoperability, layout and synchronization connecting it to media sessions.

    Metal is Apple's graphics and compute interface. A media application can use it to process or render suitable picture data produced by its media path.

    Compressed-video reconstruction and compression belong to their selected media implementations. Metal adds programmable work around the prepared pictures.

    CoreVideo can supply picture storage

    VideoToolbox and related media paths use pixel-buffer representations. CoreVideo's Metal texture-cache interface can expose compatible pixel-buffer data as suitable Metal textures.

    An original Apple picture route links pixel-buffer storage, texture views, programmable processing and later media use.

    A texture view describes access to particular picture storage. The actual compatibility depends on the pixel-buffer attributes, storage and requested texture format.

    This route can avoid an application manually copying every pixel into an unrelated allocation when suitable shared resources are available.

    One picture can have several planes

    Consider an original, unpadded 1920 × 1080 NV12 picture:

    Plane Dimensions Stored channels per element Payload
    Luma 1920 × 1080 1 byte 2,073,600 bytes
    Interleaved chroma 960 × 540 2 bytes 1,036,800 bytes
    Complete picture — — 3,110,400 bytes

    An appropriate texture representation can expose the luma through a single-channel eight-bit view and chroma through a two-channel eight-bit view.

    The half-sized chroma plane contains paired chroma values. It is not a second smaller full-colour picture.

    The layout example assumes compatible linear unpadded storage; real pixel buffers expose their actual row layout and supported resource arrangement.

    Texture format does not provide the whole colour description

    Sampling an eight-bit channel tells the shader how values are stored. Video range, matrix, primaries and transfer function determine how those values should be interpreted.

    A YUV-to-RGB operation needs that interpretation, and an HDR transformation needs the intended output relationship. Otherwise a fast GPU operation can faithfully compute the wrong picture transformation.

    The GPU-processing explanation develops operation and coordinate order independently of the execution API.

    Completion preserves picture ownership

    Metal command work can proceed asynchronously. The source pixel buffer and texture-related resources need suitable lifetimes through their consumers' use.

    A following encoder needs a completed, accepted picture representation. Releasing or rewriting storage while the GPU is still reading it violates the intended data relationship.

    See Also

    • Apple VideoToolbox
    • Apple silicon media engines
    • GPU compute and video processing
    • The hardware decode-filter-encode pipeline
    • Media filter graphs

    References

    • Apple: Metal graphics and compute
    • Apple: CoreVideo to Metal texture creation
    • Apple WWDC20: VideoToolbox decode and hardware requirements
    • Apple: VideoToolbox framework
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top