@@ -101,7 +101,7 @@ void NvEncoder::CreateDefaultEncoderParams(NV_ENC_INITIALIZE_PARAMS* pIntializeP
101
101
#endif
102
102
pIntializeParams->tuningInfo = tuningInfo;
103
103
pIntializeParams->encodeConfig ->rcParams .rateControlMode = NV_ENC_PARAMS_RC_CONSTQP;
104
- #if (NVENCAPI_MAJOR_VERSION >= 12 && NVENCAPI_MINOR_VERSION >= 2)
104
+ #if (( NVENCAPI_MAJOR_VERSION == 12 && NVENCAPI_MINOR_VERSION >= 2) || NVENCAPI_MAJOR_VERSION > 12 )
105
105
NV_ENC_PRESET_CONFIG presetConfig = { NV_ENC_PRESET_CONFIG_VER, 0 , { NV_ENC_CONFIG_VER } };
106
106
#else
107
107
NV_ENC_PRESET_CONFIG presetConfig = { NV_ENC_PRESET_CONFIG_VER, { NV_ENC_CONFIG_VER } };
@@ -119,7 +119,7 @@ void NvEncoder::CreateDefaultEncoderParams(NV_ENC_INITIALIZE_PARAMS* pIntializeP
119
119
}
120
120
else if (pIntializeParams->encodeGUID == NV_ENC_CODEC_HEVC_GUID)
121
121
{
122
- #if (NVENCAPI_MAJOR_VERSION >= 12 && NVENCAPI_MINOR_VERSION >= 2)
122
+ #if (( NVENCAPI_MAJOR_VERSION == 12 && NVENCAPI_MINOR_VERSION >= 2) || NVENCAPI_MAJOR_VERSION > 12 )
123
123
pIntializeParams->encodeConfig ->encodeCodecConfig .hevcConfig .inputBitDepth = pIntializeParams->encodeConfig ->encodeCodecConfig .hevcConfig .outputBitDepth =
124
124
(m_eBufferFormat == NV_ENC_BUFFER_FORMAT_YUV420_10BIT || m_eBufferFormat == NV_ENC_BUFFER_FORMAT_YUV444_10BIT) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8;
125
125
#else
@@ -179,7 +179,7 @@ void NvEncoder::CreateEncoder(const NV_ENC_INITIALIZE_PARAMS* pEncoderParams)
179
179
if (pEncoderParams->encodeGUID == NV_ENC_CODEC_HEVC_GUID)
180
180
{
181
181
bool yuv10BitFormat = (m_eBufferFormat == NV_ENC_BUFFER_FORMAT_YUV420_10BIT || m_eBufferFormat == NV_ENC_BUFFER_FORMAT_YUV444_10BIT) ? true : false ;
182
- #if (NVENCAPI_MAJOR_VERSION >= 12 && NVENCAPI_MINOR_VERSION >= 2)
182
+ #if (( NVENCAPI_MAJOR_VERSION == 12 && NVENCAPI_MINOR_VERSION >= 2) || NVENCAPI_MAJOR_VERSION > 12 )
183
183
if (yuv10BitFormat && pEncoderParams->encodeConfig ->encodeCodecConfig .hevcConfig .inputBitDepth != NV_ENC_BIT_DEPTH_10)
184
184
#else
185
185
if (yuv10BitFormat && pEncoderParams->encodeConfig ->encodeCodecConfig .hevcConfig .pixelBitDepthMinus8 != 2 )
@@ -205,7 +205,7 @@ void NvEncoder::CreateEncoder(const NV_ENC_INITIALIZE_PARAMS* pEncoderParams)
205
205
}
206
206
else
207
207
{
208
- #if (NVENCAPI_MAJOR_VERSION >= 12 && NVENCAPI_MINOR_VERSION >= 2)
208
+ #if (( NVENCAPI_MAJOR_VERSION == 12 && NVENCAPI_MINOR_VERSION >= 2) || NVENCAPI_MAJOR_VERSION > 12 )
209
209
NV_ENC_PRESET_CONFIG presetConfig = { NV_ENC_PRESET_CONFIG_VER, 0 , { NV_ENC_CONFIG_VER } };
210
210
#else
211
211
NV_ENC_PRESET_CONFIG presetConfig = { NV_ENC_PRESET_CONFIG_VER, { NV_ENC_CONFIG_VER } };
0 commit comments