From bc461b2cf37ca14019623f29219047d8089bd824 Mon Sep 17 00:00:00 2001 From: Xin Zhang Date: Fri, 3 Mar 2017 19:18:38 +0800 Subject: [PATCH 1/3] Remove reduplicate saving of session cmd line --- samples/sample_multi_transcode/src/transcode_utils.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/sample_multi_transcode/src/transcode_utils.cpp b/samples/sample_multi_transcode/src/transcode_utils.cpp index be045d9..4e3eb95 100644 --- a/samples/sample_multi_transcode/src/transcode_utils.cpp +++ b/samples/sample_multi_transcode/src/transcode_utils.cpp @@ -504,8 +504,6 @@ mfxStatus CmdProcessor::ParseParFile(FILE *parFile) sts = TokenizeLine(pCur, currPos); MSDK_CHECK_STATUS(sts, "TokenizeLine failed"); - // save original cmd line for debug purposes - m_lines.push_back(msdk_string(pCur, currPos)); currPos = 0; lineIndex++; } From b8a40771fd6013857c4ad7f0150a39db092f9b94 Mon Sep 17 00:00:00 2001 From: Xin Zhang Date: Sat, 4 Mar 2017 21:23:13 +0800 Subject: [PATCH 2/3] Check vpp_comp output raw file with opaque memory opaque memory usage is disabled of output raw yuv file in CTranscodingPipeline, but for -vpp_comp all sink inter sessions need to be changed. check and change it, and there's already code to change other inter sessions. --- samples/sample_multi_transcode/src/transcode_utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/sample_multi_transcode/src/transcode_utils.cpp b/samples/sample_multi_transcode/src/transcode_utils.cpp index 4e3eb95..acb8244 100644 --- a/samples/sample_multi_transcode/src/transcode_utils.cpp +++ b/samples/sample_multi_transcode/src/transcode_utils.cpp @@ -1505,6 +1505,11 @@ mfxStatus CmdProcessor::VerifyAndCorrectInputParams(TranscodingSample::sInputPar return MFX_ERR_UNSUPPORTED; } + if(InputParams.EncodeId == MFX_FOURCC_DUMP && InputParams.bUseOpaqueMemory) + { + InputParams.bUseOpaqueMemory = false; + } + return MFX_ERR_NONE; } //mfxStatus CmdProcessor::VerifyAndCorrectInputParams(TranscodingSample::sInputParams &InputParams) From 1eaa1fa5034a6f1fa297109c77f7605655449615 Mon Sep 17 00:00:00 2001 From: Xin Zhang Date: Tue, 21 Mar 2017 17:20:52 +0800 Subject: [PATCH 3/3] Fix -fps bug on Windows QueryPerformanceFrequency is not always 1000000 --- samples/sample_multi_transcode/src/pipeline_transcode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/sample_multi_transcode/src/pipeline_transcode.cpp b/samples/sample_multi_transcode/src/pipeline_transcode.cpp index 80192c1..40e2c46 100644 --- a/samples/sample_multi_transcode/src/pipeline_transcode.cpp +++ b/samples/sample_multi_transcode/src/pipeline_transcode.cpp @@ -953,7 +953,7 @@ mfxStatus CTranscodingPipeline::Decode() break; } - msdk_tick nFrameTime = msdk_time_get_tick() - nBeginTime; + msdk_tick nFrameTime = (msdk_time_get_tick() - nBeginTime) * 1000000 / msdk_time_get_frequency(); if (nFrameTime < m_nReqFrameTime) { MSDK_USLEEP((mfxU32)(m_nReqFrameTime - nFrameTime)); @@ -1240,7 +1240,7 @@ mfxStatus CTranscodingPipeline::Encode() break; } - msdk_tick nFrameTime = msdk_time_get_tick() - nBeginTime; + msdk_tick nFrameTime = (msdk_time_get_tick() - nBeginTime) * 1000000 / msdk_time_get_frequency(); if (nFrameTime < m_nReqFrameTime) { MSDK_USLEEP((mfxU32)(m_nReqFrameTime - nFrameTime)); @@ -1540,7 +1540,7 @@ mfxStatus CTranscodingPipeline::Transcode() MSDK_CHECK_STATUS(sts, "PutBS failed"); } - msdk_tick nFrameTime = msdk_time_get_tick() - nBeginTime; + msdk_tick nFrameTime = (msdk_time_get_tick() - nBeginTime) * 1000000 / msdk_time_get_frequency(); if (nFrameTime < m_nReqFrameTime) { MSDK_USLEEP((mfxU32)(m_nReqFrameTime - nFrameTime));