Skip to content

Commit 9b87bed

Browse files
author
Your Name
committed
Move EncoderParams constructor and add build/run instructions/comments
1 parent 1754d03 commit 9b87bed

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

modules/cudacodec/include/opencv2/cudacodec.hpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ struct CV_EXPORTS_W_SIMPLE EncodeQp
184184
struct CV_EXPORTS_W_SIMPLE EncoderParams
185185
{
186186
public:
187-
CV_WRAP EncoderParams();
187+
CV_WRAP EncoderParams() : nvPreset(ENC_PRESET_P3), tuningInfo(ENC_TUNING_INFO_HIGH_QUALITY), encodingProfile(ENC_CODEC_PROFILE_AUTOSELECT),
188+
rateControlMode(ENC_PARAMS_RC_VBR), multiPassEncoding(ENC_MULTI_PASS_DISABLED), constQp({ 0,0,0 }), averageBitRate(0), maxBitRate(0),
189+
targetQuality(30), gopLength(0) {};
190+
188191
CV_PROP_RW EncodePreset nvPreset;
189192
CV_PROP_RW EncodeTuningInfo tuningInfo;
190193
CV_PROP_RW EncodeProfile encodingProfile;
@@ -218,6 +221,11 @@ class CV_EXPORTS_W EncoderCallback {
218221
};
219222

220223
/** @brief Video writer interface.
224+
225+
Available when built with WITH_NVCUVENC=ON while Nvidia's Video Codec SDK is installed.
226+
227+
Encoding support is dependent on the GPU, refer to the Nvidia Video Codec SDK Video Encode and Decode GPU Support Matrix for details.
228+
221229
@note
222230
- An example on how to use the videoWriter class can be found at
223231
opencv_source_code/samples/gpu/video_writer.cpp
@@ -342,6 +350,10 @@ enum class VideoReaderProps {
342350

343351
/** @brief Video reader interface.
344352
353+
Available when built with WITH_NVCUVID=ON while Nvidia's Video Codec SDK is installed.
354+
355+
Decoding support is dependent on the GPU, refer to the Nvidia Video Codec SDK Video Encode and Decode GPU Support Matrix for details.
356+
345357
@note
346358
- An example on how to use the videoReader class can be found at
347359
opencv_source_code/samples/gpu/video_reader.cpp

modules/cudacodec/src/video_writer.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ GUID EncodingProfileGuid(const EncodeProfile encodingProfile);
6161
GUID EncodingPresetGuid(const EncodePreset nvPreset);
6262
bool Equal(const GUID& g1, const GUID& g2);
6363

64-
EncoderParams::EncoderParams() : nvPreset(ENC_PRESET_P3), tuningInfo(ENC_TUNING_INFO_HIGH_QUALITY), encodingProfile(ENC_CODEC_PROFILE_AUTOSELECT),
65-
rateControlMode(ENC_PARAMS_RC_VBR), multiPassEncoding(ENC_MULTI_PASS_DISABLED), constQp({ 0,0,0 }), averageBitRate(0), maxBitRate(0),
66-
targetQuality(30), gopLength(0)
67-
{
68-
};
69-
7064
bool operator==(const EncoderParams& lhs, const EncoderParams& rhs)
7165
{
7266
return std::tie(lhs.nvPreset, lhs.tuningInfo, lhs.encodingProfile, lhs.rateControlMode, lhs.multiPassEncoding, lhs.constQp.qpInterB, lhs.constQp.qpInterP, lhs.constQp.qpIntra,

0 commit comments

Comments
 (0)