Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -506,7 +506,7 @@ int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSIn · 505 unmodified lines | |||
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | int32_t uiFrameType = videoFrameTypeInvalid; | 508 | int32_t uiFrameType = videoFrameTypeInvalid; |
| 509 | uiFrameType = EncodeFrame2 (&kpSrcPic, 1, pBsInfo); | 509 | uiFrameType = EncodeFrameInternal(kpSrcPic, pBsInfo); |
| 510 | 510 | ||
| 511 | #ifdef REC_FRAME_COUNT | 511 | #ifdef REC_FRAME_COUNT |
| 512 | ++ m_uiCountFrameNum; | 512 | ++ m_uiCountFrameNum; |
| @@ -522,15 +522,15 @@ int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSIn · 9 unmodified lines | |||
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | 524 | ||
| 525 | int CWelsH264SVCEncoder::EncodeFrame2 (const SSourcePicture** pSrcPicList, int nSrcPicNum, SFrameBSInfo* pBsInfo) { | 525 | int CWelsH264SVCEncoder::EncodeFrameInternal(const SSourcePicture* pSrcPic, SFrameBSInfo* pBsInfo) { |
| 526 | if (!(pSrcPicList && m_pEncContext && m_bInitialFlag) || (nSrcPicNum<=0) ){ | 526 | if (!(pSrcPic && m_pEncContext && m_bInitialFlag) ){ |
| 527 | return videoFrameTypeInvalid; | 527 | return videoFrameTypeInvalid; |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | int32_t iFrameTypeReturned = 0; | 530 | int32_t iFrameTypeReturned = 0; |
| 531 | int32_t iFrameType = videoFrameTypeInvalid; | 531 | int32_t iFrameType = videoFrameTypeInvalid; |
| 532 | XMMREG_PROTECT_STORE(CWelsH264SVCEncoder); | 532 | XMMREG_PROTECT_STORE(CWelsH264SVCEncoder); |
| 533 | const int32_t kiEncoderReturn = WelsEncoderEncodeExt (m_pEncContext, pBsInfo, pSrcPicList, nSrcPicNum); | 533 | const int32_t kiEncoderReturn = WelsEncoderEncodeExt (m_pEncContext, pBsInfo, &pSrcPic, 1); |
| 534 | XMMREG_PROTECT_LOAD(CWelsH264SVCEncoder); | 534 | XMMREG_PROTECT_LOAD(CWelsH264SVCEncoder); |
| 535 | 535 | ||
| 536 | switch (kiEncoderReturn) { | 536 | switch (kiEncoderReturn) { |
| @@ -635,10 +635,10 @@ int CWelsH264SVCEncoder::PauseFrame (const SSourcePicture* kpSrcPic, SFrameBSInf · 98 unmodified lines | |||
| 635 | 635 | ||
| 636 | ForceIntraFrame (true); | 636 | ForceIntraFrame (true); |
| 637 | 637 | ||
| 638 | if (EncodeFrame2 (&kpSrcPic, 1,pBsInfo) != videoFrameTypeInvalid) { | 638 | if (EncodeFrameInternal (kpSrcPic, pBsInfo) != videoFrameTypeInvalid) { |
| 639 | iReturn = 0; | 639 | iReturn = 0; |
| 640 | } | 640 | } |
| 641 | 641 | ||
| 642 | 642 | ||
| 643 | // to avoid pause frame bitstream and | 643 | // to avoid pause frame bitstream and |
| 644 | // normal bitstream use different video channel. | 644 | // normal bitstream use different video channel. |