Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -512,7 +512,7 @@ int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSIn · 511 unmodified lines | |||
| 512 | } | 512 | } |
| 513 | 513 | ||
| 514 | const int32_t kiEncoderReturn = EncodeFrameInternal(kpSrcPic, pBsInfo); | 514 | const int32_t kiEncoderReturn = EncodeFrameInternal(kpSrcPic, pBsInfo); |
| 515 | 515 | ||
| 516 | switch (kiEncoderReturn) { | 516 | switch (kiEncoderReturn) { |
| 517 | case ENC_RETURN_MEMALLOCERR: | 517 | case ENC_RETURN_MEMALLOCERR: |
| 518 | WelsUninitEncoderExt (&m_pEncContext); | 518 | WelsUninitEncoderExt (&m_pEncContext); |
| @@ -540,7 +540,6 @@ int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSIn · 21 unmodified lines | |||
| 540 | #ifdef DUMP_SRC_PICTURE | 540 | #ifdef DUMP_SRC_PICTURE |
| 541 | DumpSrcPicture (pSrc); | 541 | DumpSrcPicture (pSrc); |
| 542 | #endif // DUMP_SRC_PICTURE | 542 | #endif // DUMP_SRC_PICTURE |
| 543 | |||
| 544 | return cmResultSuccess; | 543 | return cmResultSuccess; |
| 545 | } | 544 | } |
| 546 | 545 | ||
| @@ -556,18 +555,12 @@ int CWelsH264SVCEncoder::EncodeFrameInternal(const SSourcePicture* pSrcPic, SFr · 9 unmodified lines | |||
| 556 | const int32_t kiEncoderReturn = WelsEncoderEncodeExt (m_pEncContext, pBsInfo, pSrcPic); | 555 | const int32_t kiEncoderReturn = WelsEncoderEncodeExt (m_pEncContext, pBsInfo, pSrcPic); |
| 557 | XMMREG_PROTECT_LOAD(CWelsH264SVCEncoder); | 556 | XMMREG_PROTECT_LOAD(CWelsH264SVCEncoder); |
| 558 | 557 | ||
| 559 | switch (kiEncoderReturn) { | 558 | if(kiEncoderReturn == ENC_RETURN_MEMALLOCERR) { |
| 560 | case ENC_RETURN_MEMALLOCERR: | ||
| 561 | WelsUninitEncoderExt (&m_pEncContext); | 559 | WelsUninitEncoderExt (&m_pEncContext); |
| 562 | return videoFrameTypeInvalid; | 560 | return videoFrameTypeInvalid; |
| 563 | case ENC_RETURN_SUCCESS: | 561 | } |
| 564 | case ENC_RETURN_CORRECTED: | 562 | else if((kiEncoderReturn != ENC_RETURN_SUCCESS)&&(kiEncoderReturn == ENC_RETURN_CORRECTED)){ |
| 565 | break;//continue processing | 563 | WelsLog (m_pEncContext, WELS_LOG_ERROR, "unexpected return(%d) from EncodeFrameInternal()!\n", kiEncoderReturn); |
| 566 | case ENC_RETURN_UNSUPPORTED_PARA: | ||
| 567 | case ENC_RETURN_UNEXPECTED: | ||
| 568 | return videoFrameTypeInvalid; | ||
| 569 | default: | ||
| 570 | WelsLog (m_pEncContext, WELS_LOG_ERROR, "unexpected return(%d) from WelsEncoderEncodeExt()!\n", kiEncoderReturn); | ||
| 571 | return videoFrameTypeInvalid; | 564 | return videoFrameTypeInvalid; |
| 572 | } | 565 | } |
| 573 | 566 | ||
| @@ -593,8 +586,6 @@ int CWelsH264SVCEncoder::EncodeFrameInternal(const SSourcePicture* pSrcPic, SFr · 19 unmodified lines | |||
| 593 | break; | 586 | break; |
| 594 | } | 587 | } |
| 595 | 588 | ||
| 596 | |||
| 597 | |||
| 598 | ///////////////////for test | 589 | ///////////////////for test |
| 599 | #ifdef OUTPUT_BIT_STREAM | 590 | #ifdef OUTPUT_BIT_STREAM |
| 600 | if (iFrameType != videoFrameTypeInvalid && iFrameType != videoFrameTypeSkip) { | 591 | if (iFrameType != videoFrameTypeInvalid && iFrameType != videoFrameTypeSkip) { |
| @@ -642,7 +633,7 @@ int CWelsH264SVCEncoder::EncodeFrameInternal(const SSourcePicture* pSrcPic, SFr · 41 unmodified lines | |||
| 642 | DumpSrcPicture (pSrcPicList[0]->pData[0]); | 633 | DumpSrcPicture (pSrcPicList[0]->pData[0]); |
| 643 | #endif // DUMP_SRC_PICTURE | 634 | #endif // DUMP_SRC_PICTURE |
| 644 | 635 | ||
| 645 | return iFrameType; | 636 | return kiEncoderReturn; |
| 646 | 637 | ||
| 647 | } | 638 | } |
| 648 | 639 | ||