Skip to content

Commit

Permalink
コンパイラの警告対策とLinuxのビルド修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Feb 12, 2025
1 parent 375b4f3 commit a3e8c52
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion NVEncCore/NVEncCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,8 @@ RGY_ERR NVEncCore::SetInputParam(InEncodeVideoParam *inputParam) {
case RGY_CHROMAFMT_YUV422:
m_stCreateEncodeParams.encodeConfig->encodeCodecConfig.hevcConfig.chromaFormatIDC = 2;
break;

default:
break;
}
//m_stCreateEncodeParams.encodeConfig->encodeCodecConfig.h264Config.separateColourPlaneFlag = 1;
m_stCreateEncodeParams.encodeConfig->profileGUID = NV_ENC_HEVC_PROFILE_FREXT_GUID;
Expand Down Expand Up @@ -2395,6 +2396,8 @@ RGY_ERR NVEncCore::SetInputParam(InEncodeVideoParam *inputParam) {
m_stCreateEncodeParams.encodeConfig->encodeCodecConfig.h264Config.chromaFormatIDC = 2;
m_stCreateEncodeParams.encodeConfig->profileGUID = NV_ENC_H264_PROFILE_HIGH_422_GUID;
break;
default:
break;
}
//m_stCreateEncodeParams.encodeConfig->encodeCodecConfig.h264Config.separateColourPlaneFlag = 1;
} else if (get_bitDepth(m_stEncConfig.encodeCodecConfig, inputParam->codec_rgy, m_dev->encoder()->getAPIver()) > 8) {
Expand Down
10 changes: 5 additions & 5 deletions NVEncCore/NVEncPipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ class PipelineTask {
public:
PipelineTask() : m_type(PipelineTaskType::UNKNOWN), m_dev(nullptr), m_outQeueue(), m_workSurfs(), m_inFrames(0), m_outFrames(0), m_outMaxQueueSize(0), m_log() {};
PipelineTask(PipelineTaskType type, NVGPUInfo *dev, int outMaxQueueSize, bool useOutQueueMtx, std::shared_ptr<RGYLog> log) :
m_type(type), m_dev(dev), m_outQeueue(), m_workSurfs(), m_inFrames(0), m_outFrames(0), m_outMaxQueueSize(outMaxQueueSize), m_log(log), m_outQeueueMtx(useOutQueueMtx ? std::make_unique<std::mutex>() : nullptr) {
m_type(type), m_dev(dev), m_outQeueue(), m_workSurfs(), m_inFrames(0), m_outFrames(0), m_outMaxQueueSize(outMaxQueueSize), m_outQeueueMtx(useOutQueueMtx ? std::make_unique<std::mutex>() : nullptr), m_log(log) {
};
virtual ~PipelineTask() {
m_workSurfs.clear();
Expand Down Expand Up @@ -1168,14 +1168,14 @@ class PipelineTaskNVDecode : public PipelineTask {
}

virtual RGY_ERR sendFrame([[maybe_unused]] std::unique_ptr<PipelineTaskOutput>& frame) override {
return getOutput();
return getOutputFrame();
}
PipelineTaskSurface addTaskSurface(std::unique_ptr<CUFrameCuvid>& surf) {
return m_workSurfs.addSurface(surf);
}

protected:
RGY_ERR getOutput() {
RGY_ERR getOutputFrame() {
auto ret = RGY_ERR_NONE;
if (m_state == RGY_STATE_STOPPED) {
m_state = RGY_STATE_RUNNING;
Expand Down Expand Up @@ -1403,7 +1403,7 @@ class PipelineTaskCheckPTS : public PipelineTask {

if ((m_srcTimebase.n() > 0 && m_srcTimebase.is_valid())
&& ((m_avsync & (RGY_AVSYNC_VFR | RGY_AVSYNC_FORCE_CFR)) || m_vpp_rff || m_vpp_afs_rff_aware || m_timestampPassThrough)) {
const auto srcTimestamp = taskSurf->surf().frame()->timestamp();
const int64_t srcTimestamp = taskSurf->surf().frame()->timestamp();
if (srcTimestamp < 0) {
// timestampを修正
outPtsSource = m_tsOutEstimated;
Expand Down Expand Up @@ -2013,7 +2013,7 @@ class NVEncRunCtx {
return RGY_ERR_NONE;
}
void releaseEncodeBuffer() {
for (int i = 0; i < m_stEncodeBuffer.size(); i++) {
for (size_t i = 0; i < m_stEncodeBuffer.size(); i++) {
releaseEncodeBufferFrame(m_stEncodeBuffer[i].get());
}
m_stEncodeBuffer.clear();
Expand Down
1 change: 1 addition & 0 deletions NVEncCore/rgy_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const char *get_encoder_version();
#define ENABLE_D3D11 0
#define ENABLE_D3D11_DEVINFO_WMI 0
#define ENABLE_NVSDKNGX 0
#define ENABLE_INTERLACE_FROM_HWMEM 1
#endif // #if defined(WIN32) || defined(WIN64)

#endif //__RGY_CONFIG_H__

0 comments on commit a3e8c52

Please sign in to comment.