STEREO

STEREO

#Overview

name: STEREO

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of STEREO is to represent a specific H.264 video encoding profile used in hardware-accelerated video encoding, particularly with NVIDIA’s NVENC encoder. This setting is part of the video encoding and XR (Extended Reality) systems in Unreal Engine 5.

This setting variable is primarily used in the following Unreal Engine subsystems and plugins:

  1. Hardware Encoders plugin (EncoderNVENC)
  2. XRBase plugin
  3. AVEncoder module (deprecated as of UE 5.4)

The value of this variable is not directly set in the provided code snippets. Instead, it’s used as an enum value in different contexts:

  1. In the NVENC encoder, it’s used to map the STEREO profile to the corresponding NVIDIA-specific GUID.
  2. In the XRBase plugin, it’s used as part of a console command parsing system.
  3. In the AVEncoder module, it’s defined as part of the H264Profile enum.

The STEREO setting interacts with other H.264 profile settings and is part of the broader video encoding configuration system. It’s specifically related to stereoscopic video encoding, which is relevant for VR and 3D video applications.

Developers should be aware that:

  1. The STEREO profile is a specialized H.264 profile and may not be supported by all hardware or software decoders.
  2. Using this profile may have implications for compatibility and performance in different playback scenarios.
  3. The AVEncoder module is deprecated as of UE 5.4, so developers should consider using the AVCodecs plugin family for future projects.

Best practices when using this variable include:

  1. Ensure that the target playback devices or software support the STEREO H.264 profile before using it.
  2. Consider the performance implications of using this profile, especially in resource-constrained environments.
  3. Test thoroughly with target hardware to ensure compatibility and optimal performance.
  4. When working with VR or 3D content, evaluate whether the STEREO profile provides benefits over other H.264 profiles for your specific use case.
  5. Stay updated with Unreal Engine documentation, as the deprecation of AVEncoder suggests that the video encoding systems are evolving.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Media/HardwareEncoders/Source/EncoderNVENC/Private/NVENC_EncoderH264.cpp:61

Scope (from outer to inner):

file
namespace    anonymous
function     GUID ConvertH264Profile

Source code excerpt:

			case AVEncoder::FVideoEncoder::H264Profile::HIGH444:
				return NV_ENC_H264_PROFILE_HIGH_444_GUID;
			case AVEncoder::FVideoEncoder::H264Profile::STEREO:
				return NV_ENC_H264_PROFILE_STEREO_GUID;
			case AVEncoder::FVideoEncoder::H264Profile::PROGRESSIVE_HIGH:
				return NV_ENC_H264_PROFILE_PROGRESSIVE_HIGH_GUID;
			case AVEncoder::FVideoEncoder::H264Profile::CONSTRAINED_HIGH:
				return NV_ENC_H264_PROFILE_CONSTRAINED_HIGH_GUID;
		}

#Loc: <Workspace>/Engine/Plugins/Runtime/XRBase/Source/XRBase/Private/HeadMountedDisplayConsoleCommands.cpp:516

Scope (from outer to inner):

file
function     static bool CompatExec

Source code excerpt:

		}
	}
	else if (FParse::Command(&Cmd, TEXT("STEREO")))
	{
		FString Value;
		if (FParse::Command(&Cmd, TEXT("ON")) || FParse::Command(&Cmd, TEXT("ENABLE")))
		{
			AliasedCommand = TEXT("vr.bEnableStereo True");
		}

#Loc: <Workspace>/Engine/Source/Runtime/AVEncoder/Public/VideoEncoder.h:24

Scope (from outer to inner):

file
namespace    AVEncoder
class        class /*EPRECATED(5.4, "AVEncoder has been deprecated. Please use the AVCodecs plugin family instead.")*/ FVideoEncoder

Source code excerpt:

        enum class RateControlMode { UNKNOWN, CONSTQP, VBR, CBR };
        enum class MultipassMode { UNKNOWN, DISABLED, QUARTER, FULL };
		enum class H264Profile { AUTO, CONSTRAINED_BASELINE, BASELINE, MAIN, CONSTRAINED_HIGH, HIGH, HIGH444, STEREO, SVC_TEMPORAL_SCALABILITY, PROGRESSIVE_HIGH };

        struct UE_DEPRECATED(5.4, "AVEncoder has been deprecated. Please use the AVCodecs plugin family instead.") FLayerConfig
        {
            uint32			Width = 0;
            uint32			Height = 0;
            uint32			MaxFramerate = 0;