diff --git a/codec/decoder/plus/inc/welsDecoderExt.h b/codec/decoder/plus/inc/welsDecoderExt.h index 4fea2e2d..fcf57af5 100644 --- a/codec/decoder/plus/inc/welsDecoderExt.h +++ b/codec/decoder/plus/inc/welsDecoderExt.h @@ -46,7 +46,7 @@ #include "codec_app_def.h" #include "decoder_context.h" #include "welsCodecTrace.h" - +#include "cpu.h" class ISVCDecoder; @@ -104,6 +104,8 @@ IWelsTrace* m_pTrace; void_t InitDecoder (void_t); void_t UninitDecoder (void_t); +XMMREG_PROTECT_DECLARE(CWelsH264Decoder); + #ifdef OUTPUT_BIT_STREAM WelsFileHandle* m_pFBS; WelsFileHandle* m_pFBSSize; diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp index 9413e8be..902ac4a1 100644 --- a/codec/decoder/plus/src/welsDecoderExt.cpp +++ b/codec/decoder/plus/src/welsDecoderExt.cpp @@ -99,7 +99,7 @@ CWelsDecoder::CWelsDecoder (void_t) m_pTrace = CreateWelsTrace (Wels_Trace_Type); IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, "CWelsDecoder::CWelsDecoder() entry"); - + XMMREG_PROTECT_INIT(CWelsH264Decoder); #ifdef OUTPUT_BIT_STREAM SWelsTime sCurTime; @@ -151,6 +151,7 @@ CWelsDecoder::~CWelsDecoder() { IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, "CWelsDecoder::~CWelsDecoder()"); UninitDecoder(); + XMMREG_PROTECT_UNINIT(CWelsH264Decoder); #ifdef OUTPUT_BIT_STREAM if (m_pFBS) { @@ -384,8 +385,10 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, m_pDecContext->iFeedbackTidInAu = -1; //initialize + XMMREG_PROTECT_STORE(CWelsH264Decoder); WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, (unsigned char**)ppDst, pDstInfo); //iErrorCode has been modified in this function + XMMREG_PROTECT_LOAD(CWelsH264Decoder); pDstInfo->eWorkMode = (EDecodeMode)m_pDecContext->iDecoderMode;