SDV Media Requirements

The keywords MUST, MUST NOT, SHOULD, and STRONGLY RECOMMENDED in this document are to be interpreted as described in RFC 2119.

Guest system (VM image)

The requirements in this section apply to the guest system.

Memory

The system MUST provide a minimum of 2 GB of memory per VM.

Application binary interfaces

Device implementations:

  • MUST be compatible with one or more defined Android NDK ABIs.
  • MUST use the same Android NDK ABI for all VM images on the same device.
  • MUST be source compatible (for example, header compatible) and binary compatible (for the ABI) with each required library in the following list.
  • MUST make all the following libraries, providing native APIs, available to SDV apps:
    • libc (C library)
    • libdl (dynamic linker)
    • libdrm.so (Direct Rendering Manager userspace library)
    • libgbm.so (Generic Buffer Management)
    • libEGL.so (native OpenGL surface management)
    • libGLESv1_CM.so (OpenGL ES 1.x)
    • libGLESv2.so (OpenGL ES 2.0)
    • libGLESv3.so (OpenGL ES 3.x)
    • liblog (Android logging)
    • libtinyalsav2.so (audio recording and playback)
    • libvulkan.so (Vulkan)
  • MUST NOT add or remove the public functions for the preceding native libraries.
  • MUST export all the OpenGL ES 3.1 and Android Extension Pack function symbols, as defined in the NDK, through the libGLESv3.so library. Note that while all symbols MUST be present, OpenGL ES describes in more detail the requirements for when the full implementation of each corresponding function is expected.
  • MUST export the core Vulkan 1.1 function symbols, as well as the VK_KHR_surface, VK_KHR_swapchain, VK_KHR_maintenance1, and VK_KHR_get_physical_device_properties2 extensions through the libvulkan.so library. Note that while all symbols MUST be present, Vulkan describes in more detail the requirements for when the full implementation of each corresponding function is expected.
  • SHOULD be built using the source code and header files available in the upstream Android Open Source Project.

Graphics

  • The system MUST use virtio-gpu for hardware-accelerated graphics. The guest-side driver SHOULD use gfxstream for rendering.

Input

The guest system MUST include support for input events forwarded from the host system using virtio-input.

OpenGL ES

Device implementations:

  • MUST correctly identify the supported OpenGL ES versions (1.1, 2.0, 3.0, 3.1, 3.2) through the native APIs.
  • MUST include support for all corresponding native APIs for every OpenGL ES version they support.
  • MUST support both OpenGL ES 1.1 and 2.0.
  • Are STRONGLY RECOMMENDED to support OpenGL ES 3.1.
  • SHOULD support OpenGL ES 3.2.
  • MUST report using the OpenGL ES managed APIs and native APIs any other OpenGL ES extensions they have implemented, and conversely MUST NOT report extension strings that they don't support.
  • MUST support following extensions:
    • EGL_EXT_image_dma_buf_import
    • EGL_EXT_image_dma_buf_import_modifiers
    • EGL_KHR_fence_sync
    • EGL_KHR_image_base
    • EGL_KHR_wait_sync
    • GL_OES_EGL_image

Device implementations are STRONGLY RECOMMENDED to implement OpenGL ES using ANGLE library with Vulkan backend.

Vulkan

Device implementations:

  • Are STRONGLY RECOMMENDED to include support for Vulkan 1.3.
  • MUST NOT support a Vulkan variant version (that is, the variant part of the Vulkan core version MUST be zero).
  • MUST support following extensions:
    • VK_ANDROID_external_memory_android_hardware_buffer
    • VK_EXT_external_memory_dma_buf
    • VK_EXT_queue_family_foreign
    • VK_KHR_external_memory_fd
    • VK_KHR_external_semaphore_fd

Multimedia compatibility

  • Device implementations MUST allow playback of raw audio content with the following characteristics:

    • Source formats: Linear PCM, 16-bit, 8-bit, float
    • Channels: Mono, stereo, valid multichannel configurations with up to eight channels
    • Sampling rates (in Hz):
      • 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 in the channel configurations listed previously
      • 96000 in mono and stereo
  • Device implementations MUST allow capture of raw audio content. At a minimum, device implementations MUST support the following characteristics:

    • Format: Linear PCM, 16-bit
    • Sampling rates: 8000, 11025, 16000, 44100, 48000 Hz
    • Channels: Mono
  • Device implementations SHOULD allow capture of raw audio content with the following characteristics:

    • Format: Linear PCM, 16-bit and 24-bit
    • Sampling rates: 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 Hz
    • Channels: As many channels as the number of microphones on the device
  • Device implementations MUST provide support for audio playback and capture through the libtinyalsav2.so API, using the virtio-sound device for hardware access, and MUST support the ALSA API.

  • Video encoders and decoders MUST support at least one of a planar or semiplanar YUV420 8:8:8 color format.

  • Video decoders and encoders MUST support the H.264 AVC codec.

  • Device implementations MUST support H.264 Main Profile Level 3.1 and Baseline Profile. Support for arbitrary slice ordering (ASO), flexible macroblock ordering (FMO), and redundant slices (RS) is optional.

  • Video encoders:

    • MUST support the standard definition (SD) video encoding profiles in the following table.
    • SHOULD support the high definition (HD) video encoding profiles as indicated in the following table.

      SD (low quality) SD (high quality) HD 720p HD 1080p
      Video resolution 320 x 240 px 720 x 480 px 1280 x 720 px 1920 x 1080 px
      Video frame rate 20 fps 30 fps 30 fps 30 fps
      Video bitrate 384 Kbps 2 Mbps 4 Mbps 10 Mbps
  • Video decoders:

    • MUST support the HD 720p video decoding profiles in the following table.
    • MUST support the HD 1080p video decoding profiles in the following table.

      SD (low quality) SD (high quality) HD 720p HD 1080p
      Video resolution 320 x 240 px 720 x 480 px 1280 x 720 px 1920 x 1080 px
      Video frame rate 30 fps 30 fps 60 fps 30 fps
      Video bitrate 800 Kbps 2 Mbps 8 Mbps 20 Mbps
  • Device implementations MUST provide support for media codecs using the Video4Linux API.

  • Device implementations MUST provide access to a hardware video decoder using the Video4Linux API.

  • All hardware accelerated video and image encoders MUST support encoding frames from the hardware cameras. Device implementations MUST provide hardware access for video encoding and decoding through virtio-media.

  • Device implementations MUST provide access to a video camera using the Video4Linux API.

Host system (hypervisor and hardware)

The requirements in this section apply to the host system and the hypervisor environment.

Virtualization

  • In addition to the virtio devices required by the core profile, the host system MUST provide the following:
    • virtio-gpu: For virtual GPU and display
    • virtio-input: For forwarding input events (for example, touch, keyboard)
    • virtio-sound: For virtual audio devices
    • virtio-video or virtio-media: For virtual video codec devices

Input

  • The device MUST support input devices and forward events to guest systems using virtio-input. The device SHOULD support pointer, button, and rotary controller inputs.