History

add a frame-skip setting option

Sijia Chen committed 11 years ago

Commit dea37ce1 parent 52cd5d94 files · +23 −2Browse files

Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 4 files). Show all

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+16−1
@@ -877,8 +877,23 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 876 unmodified lines
877877 int32_t iValue = * ((int32_t*)pOption);
878878 m_pEncContext->pSvcParam->iRCMode = (RC_MODES) iValue;
879879 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
880− "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_RC_MODE iRCMode= %d ",
880+ "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_RC_MODE iRCMode= %d (Note: not suggest changing RC-mode in middle of encoding)",
881881 iValue);
882+ WelsRcInitFuncPointers(m_pEncContext, m_pEncContext->pSvcParam->iRCMode);
883+ }
884+ break;
885+ case ENCODER_OPTION_RC_FRAME_SKIP: { // 0:FRAME-SKIP disabled;1:FRAME-SKIP enabled
886+ bool bValue = * ((bool*)pOption);
887+ if (m_pEncContext->pSvcParam->iRCMode != RC_OFF_MODE) {
888+ m_pEncContext->pSvcParam->bEnableFrameSkip = bValue;
889+ WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
890+ "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_RC_FRAME_SKIP, frame-skip setting(%d)",
891+ bValue);
892+ } else {
893+ WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
894+ "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_RC_FRAME_SKIP, rc off, frame-skip setting(%d) un-useful",
895+ bValue);
896+ }
882897 }
883898 break;
884899 case ENCODER_PADDING_PADDING: { // 0:disable padding;1:padding

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t