shithub: openh264

Download patch

ref: def55c141ec182e75de7d1279e753f104edd941f
parent: 9efbef67b9d24aedcbbd170172da40c533b0f615
author: Licai Guo <[email protected]>
date: Wed Jan 22 14:01:51 EST 2014

fix decoder win64 asm float issues

--- a/codec/decoder/plus/inc/welsDecoderExt.h
+++ b/codec/decoder/plus/inc/welsDecoderExt.h
@@ -46,8 +46,8 @@
 #include "codec_app_def.h"
 #include "decoder_context.h"
 #include "welsCodecTrace.h"
+#include "cpu.h"
 
-
 class ISVCDecoder;
 
 namespace WelsDec {
@@ -103,6 +103,8 @@
 
 void_t InitDecoder (void_t);
 void_t UninitDecoder (void_t);
+
+XMMREG_PROTECT_DECLARE(CWelsH264Decoder);
 
 #ifdef OUTPUT_BIT_STREAM
 WelsFileHandle* m_pFBS;
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -99,8 +99,8 @@
   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 @@
   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 @@
 
   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;