Diese Instanz von GitLab ist Pre-Release und noch nicht offiziell als Dienst freigeschaltet.

This GitLab instance is pre-release and not an officially announced service.

Skip to content
  • Vivek Kasireddy's avatar
    3208be45
    gstreamer-encoder: Use an env var to override converter format · 3208be45
    Vivek Kasireddy authored
    
    
    If we use the x264enc encoder to encode a stream, then videoconvert
    would convert the BGRx data into Y444, which is the preferred format
    for x264enc. However, some decoders particularly the ones that are
    h/w based cannot work with Y444 if it was the format used by the
    encoder. Therefore, to address these situations, we need a way to
    override the format used during the encoding stage which can be
    accomplished by using the environment variable introduced in this
    patch: SPICE_CONVERTER_PREFERRED_FORMAT.
    
    For example, using NV12 as the output format for the videoconvert
    element would allow us to pair a s/w based encoder (such as x264enc)
    with a h/w based decoder (such as msdkh264dec) for decoding the
    stream as most h/w based decoders only work with NV12 format given
    its popularity.
    
    Note that choosing an encoder format such as NV12 over Y444 would
    probably result in decreased video quality although it would be
    compatible with more decoders. Ideally, the client and server need
    to negotiate a suitable format dynamically but the current
    capabilities do not allow for such exchange.
    
    Cc: Frediano Ziglio <freddy77@gmail.com>
    Cc: Dongwon Kim <dongwon.kim@intel.com>
    Based-on-patch-by: default avatarHazwan Arif Mazlan <hazwan.arif.mazlan@intel.com>
    Signed-off-by: default avatarJin Chung Teng <jin.chung.teng@intel.com>
    Signed-off-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
    Acked-by: default avatarFrediano Ziglio <freddy77@gmail.com>
    3208be45
    gstreamer-encoder: Use an env var to override converter format
    Vivek Kasireddy authored
    
    
    If we use the x264enc encoder to encode a stream, then videoconvert
    would convert the BGRx data into Y444, which is the preferred format
    for x264enc. However, some decoders particularly the ones that are
    h/w based cannot work with Y444 if it was the format used by the
    encoder. Therefore, to address these situations, we need a way to
    override the format used during the encoding stage which can be
    accomplished by using the environment variable introduced in this
    patch: SPICE_CONVERTER_PREFERRED_FORMAT.
    
    For example, using NV12 as the output format for the videoconvert
    element would allow us to pair a s/w based encoder (such as x264enc)
    with a h/w based decoder (such as msdkh264dec) for decoding the
    stream as most h/w based decoders only work with NV12 format given
    its popularity.
    
    Note that choosing an encoder format such as NV12 over Y444 would
    probably result in decreased video quality although it would be
    compatible with more decoders. Ideally, the client and server need
    to negotiate a suitable format dynamically but the current
    capabilities do not allow for such exchange.
    
    Cc: Frediano Ziglio <freddy77@gmail.com>
    Cc: Dongwon Kim <dongwon.kim@intel.com>
    Based-on-patch-by: default avatarHazwan Arif Mazlan <hazwan.arif.mazlan@intel.com>
    Signed-off-by: default avatarJin Chung Teng <jin.chung.teng@intel.com>
    Signed-off-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
    Acked-by: default avatarFrediano Ziglio <freddy77@gmail.com>
Loading