Results 1 to 2 of 2

Thread: NDI video frame stride

  1. #1
    Registered User
    Join Date
    Dec 2016
    Location
    Russia
    Posts
    2

    NDI video frame stride

    When i cunstruct NDI videoframe i should set up a Stride - buffer where image stores. In SD stride calculates different ways. For RGB strid = 1920*4 (why 4?), for BRGA stride = 1920*8 +7 / 8.
    But what stride should be for YUV? When i set 1920x4 , i have image shifted to left.
    How to calculate correct stride for YUV?

  2. #2
    Registered User
    Join Date
    Aug 2015
    Location
    london
    Posts
    200
    Quote Originally Posted by gorbva View Post
    When i cunstruct NDI videoframe i should set up a Stride - buffer where image stores. In SD stride calculates different ways. For RGB strid = 1920*4 (why 4?), for BRGA stride = 1920*8 +7 / 8.
    But what stride should be for YUV? When i set 1920x4 , i have image shifted to left.
    How to calculate correct stride for YUV?
    RGB is always RGBA (or BGRA) in NDI even if its actually BGRX (no alpha)
    4 bytes per pixel So the byte stride is 4 x the XResolution

    YUV is always UYVY in NDI
    2 bytes per pixel (with UV chroma shared amongst pairs) So the byte stride is 2 x the XResolution

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •