Merge pull request #191 from zhilwang/fix-decoder-win64-asm-issues

Fix decoder win64 asm issues
This commit is contained in:
Ethan Hugg 2014-01-23 10:47:13 -08:00
commit e55d777d17
5 changed files with 17 additions and 12 deletions

View File

@ -134,7 +134,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\decoder\core\inc;..\..\..\common;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc"
PreprocessorDefinitions="WIN64;NDEBUG;_LIB;HAVE_CACHE_LINE_ALIGN"
PreprocessorDefinitions="WIN64;NDEBUG;_LIB;HAVE_CACHE_LINE_ALIGN;X86_ASM"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@ -291,7 +291,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\decoder\core\inc;..\..\..\common;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc"
PreprocessorDefinitions="WIN64;_DEBUG;_LIB;HAVE_CACHE_LINE_ALIGN"
PreprocessorDefinitions="WIN64;_DEBUG;_LIB;HAVE_CACHE_LINE_ALIGN;X86_ASM"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"

View File

@ -54,7 +54,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;X86_ASM"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@ -154,7 +154,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc"
PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN"
PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;X86_ASM"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@ -253,7 +253,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;X86_ASM"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -317,7 +317,7 @@
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory=".\..\..\..\..\bin\win32\Debug"
OutputDirectory=".\..\..\..\..\bin\win64\Debug"
IntermediateDirectory=".\..\..\..\obj\decoder\plus\debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
@ -350,7 +350,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc"
PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN"
PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;X86_ASM"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"

View File

@ -143,7 +143,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\console\dec\inc,..\..\..\api\svc,..\..\..\common,..\..\..\encoder\core\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
PreprocessorDefinitions="WIN64;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@ -171,7 +171,7 @@
OutputFile="$(OutDir)\decConsole.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\bin\win32"
AdditionalLibraryDirectories="..\..\..\..\bin\win64"
ProgramDatabaseFile="$(OutDir)\decConsole.pdb"
GenerateMapFile="false"
SubSystem="1"
@ -358,7 +358,7 @@
OutputFile="$(OutDir)\decConsoled.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\bin\win32"
AdditionalLibraryDirectories="..\..\..\..\bin\win64"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\decConsoled.pdb"
SubSystem="1"

View File

@ -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;

View File

@ -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;