-
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:
Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com> Signed-off-by:
Jin Chung Teng <jin.chung.teng@intel.com> Signed-off-by:
Vivek Kasireddy <vivek.kasireddy@intel.com> Acked-by:
Frediano Ziglio <freddy77@gmail.com>
Vivek Kasireddy authoredIf 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:
Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com> Signed-off-by:
Jin Chung Teng <jin.chung.teng@intel.com> Signed-off-by:
Vivek Kasireddy <vivek.kasireddy@intel.com> Acked-by:
Frediano Ziglio <freddy77@gmail.com>
Loading