Initial Commit

This commit is contained in:
Ethan Hugg 2013-12-09 04:51:09 -08:00
parent bd509b2245
commit 70e5e62f3d
308 changed files with 97100 additions and 0 deletions

View File

@ -0,0 +1,151 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsThreadLib.h
*
* \brief Interfaces introduced in thread programming
*
* \date 11/17/2009 Created
*
*************************************************************************************
*/
#ifndef _WELS_THREAD_API_H_
#define _WELS_THREAD_API_H_
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(WIN32)
#include <windows.h>
typedef HANDLE WELS_THREAD_HANDLE;
typedef LPTHREAD_START_ROUTINE LPWELS_THREAD_ROUTINE;
typedef CRITICAL_SECTION WELS_MUTEX;
typedef HANDLE WELS_EVENT;
#define WELS_THREAD_ROUTINE_TYPE DWORD WINAPI
#define WELS_THREAD_ROUTINE_RETURN(rc) return (DWORD)rc;
#else // NON-WINDOWS
#if defined(__GNUC__) // LINUX, MACOS etc
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <fcntl.h>
typedef pthread_t WELS_THREAD_HANDLE;
typedef void* (*LPWELS_THREAD_ROUTINE) ( void * );
typedef pthread_mutex_t WELS_MUTEX;
typedef sem_t WELS_EVENT;
#define WELS_THREAD_ROUTINE_TYPE void *
#define WELS_THREAD_ROUTINE_RETURN(rc) return (void*)rc;
#endif//__GNUC__
#endif//WIN32
typedef int32_t WELS_THREAD_ERROR_CODE;
typedef int32_t WELS_THREAD_ATTR;
typedef struct _WelsLogicalProcessorInfo
{
int32_t ProcessorCount;
} WelsLogicalProcessInfo;
#define WELS_THREAD_ERROR_OK 0
#define WELS_THREAD_ERROR_GENERIAL ((uint32_t)(-1))
#define WELS_THREAD_ERROR_WAIT_OBJECT_0 0
#define WELS_THREAD_ERROR_WAIT_TIMEOUT ((uint32_t)0x00000102L)
#define WELS_THREAD_ERROR_WAIT_FAILED WELS_THREAD_ERROR_GENERIAL
void WelsSleep( uint32_t dwMilliseconds );
WELS_THREAD_ERROR_CODE WelsMutexInit( WELS_MUTEX * mutex );
WELS_THREAD_ERROR_CODE WelsMutexLock( WELS_MUTEX * mutex );
WELS_THREAD_ERROR_CODE WelsMutexUnlock( WELS_MUTEX * mutex );
WELS_THREAD_ERROR_CODE WelsMutexDestroy( WELS_MUTEX * mutex );
#ifdef __GNUC__
WELS_THREAD_ERROR_CODE WelsEventOpen( WELS_EVENT **p_event, str_t *event_name );
WELS_THREAD_ERROR_CODE WelsEventClose( WELS_EVENT *event, str_t *event_name );
#endif//__GNUC__
WELS_THREAD_ERROR_CODE WelsEventInit( WELS_EVENT *event );
WELS_THREAD_ERROR_CODE WelsEventDestroy( WELS_EVENT * event );
WELS_THREAD_ERROR_CODE WelsEventSignal( WELS_EVENT * event );
WELS_THREAD_ERROR_CODE WelsEventReset( WELS_EVENT * event );
WELS_THREAD_ERROR_CODE WelsEventWait( WELS_EVENT * event );
WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut( WELS_EVENT * event, uint32_t dwMilliseconds );
#ifdef WIN32
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking( uint32_t nCount, WELS_EVENT *event_list, uint32_t dwMilliseconds );
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitAllBlocking( uint32_t nCount, WELS_EVENT *event_list );
#else
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking( uint32_t nCount, WELS_EVENT **event_list, uint32_t dwMilliseconds );
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitAllBlocking( uint32_t nCount, WELS_EVENT **event_list );
#endif//WIN32
WELS_THREAD_ERROR_CODE WelsThreadCreate( WELS_THREAD_HANDLE * thread, LPWELS_THREAD_ROUTINE routine,
void * arg, WELS_THREAD_ATTR attr);
WELS_THREAD_ERROR_CODE WelsSetThreadCancelable();
WELS_THREAD_ERROR_CODE WelsThreadJoin( WELS_THREAD_HANDLE thread );
WELS_THREAD_ERROR_CODE WelsThreadCancel( WELS_THREAD_HANDLE thread );
WELS_THREAD_ERROR_CODE WelsThreadDestroy( WELS_THREAD_HANDLE *thread );
WELS_THREAD_HANDLE WelsThreadSelf();
WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo(WelsLogicalProcessInfo * pInfo);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,567 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsThreadLib.c
*
* \brief Interfaces introduced in thread programming
*
* \date 11/17/2009 Created
*
*************************************************************************************
*/
#include "WelsThreadLib.h"
#include <stdio.h>
#ifdef WIN32
void WelsSleep( uint32_t dwMilliseconds )
{
Sleep( dwMilliseconds );
}
WELS_THREAD_ERROR_CODE WelsMutexInit( WELS_MUTEX * mutex )
{
InitializeCriticalSection(mutex);
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsMutexLock( WELS_MUTEX * mutex )
{
EnterCriticalSection(mutex);
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsMutexUnlock( WELS_MUTEX * mutex )
{
LeaveCriticalSection(mutex);
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsMutexDestroy( WELS_MUTEX * mutex )
{
DeleteCriticalSection(mutex);
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsEventInit( WELS_EVENT * event )
{
WELS_EVENT h = CreateEvent(NULL, FALSE, FALSE, NULL);
if( h == NULL ){
return WELS_THREAD_ERROR_GENERIAL;
}
*event = h;
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsEventSignal( WELS_EVENT * event )
{
if( SetEvent( *event ) ){
return WELS_THREAD_ERROR_OK;
}
return WELS_THREAD_ERROR_GENERIAL;
}
WELS_THREAD_ERROR_CODE WelsEventReset( WELS_EVENT * event )
{
if ( ResetEvent( *event ) )
return WELS_THREAD_ERROR_OK;
return WELS_THREAD_ERROR_GENERIAL;
}
WELS_THREAD_ERROR_CODE WelsEventWait( WELS_EVENT * event )
{
return WaitForSingleObject(*event, INFINITE );
}
WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut( WELS_EVENT * event, uint32_t dwMilliseconds )
{
return WaitForSingleObject(*event, dwMilliseconds );
}
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking( uint32_t nCount,
WELS_EVENT *event_list,
uint32_t dwMilliseconds )
{
return WaitForMultipleObjects( nCount, event_list, FALSE, dwMilliseconds );
}
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitAllBlocking( uint32_t nCount, WELS_EVENT *event_list )
{
return WaitForMultipleObjects( nCount, event_list, TRUE, (uint32_t)-1 );
}
WELS_THREAD_ERROR_CODE WelsEventDestroy( WELS_EVENT * event )
{
CloseHandle( *event );
*event = NULL;
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsThreadCreate( WELS_THREAD_HANDLE * thread, LPWELS_THREAD_ROUTINE routine,
void * arg, WELS_THREAD_ATTR attr)
{
WELS_THREAD_HANDLE h = CreateThread(NULL, 0, routine, arg, 0, NULL);
if( h == NULL ) {
return WELS_THREAD_ERROR_GENERIAL;
}
* thread = h;
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsSetThreadCancelable()
{
// nil implementation for WIN32
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsThreadJoin( WELS_THREAD_HANDLE thread )
{
WaitForSingleObject(thread, INFINITE);
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsThreadCancel( WELS_THREAD_HANDLE thread )
{
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_ERROR_CODE WelsThreadDestroy( WELS_THREAD_HANDLE *thread )
{
if ( thread != NULL )
{
CloseHandle(*thread);
*thread = NULL;
}
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_HANDLE WelsThreadSelf()
{
return GetCurrentThread();
}
WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo(WelsLogicalProcessInfo * pInfo)
{
SYSTEM_INFO si;
GetSystemInfo(&si);
pInfo->ProcessorCount = si.dwNumberOfProcessors;
return WELS_THREAD_ERROR_OK;
}
#elif defined(__GNUC__)
#ifdef MACOS
#include <CoreServices/CoreServices.h>
//#include <Gestalt.h>
#endif//MACOS
static int32_t SystemCall(const str_t * pCmd, str_t * pRes, int32_t iSize)
{
int32_t fd[2];
int32_t iPid;
int32_t iCount;
int32_t left;
str_t * p = NULL;
int32_t iMaxLen = iSize - 1;
memset(pRes, 0, iSize);
if( pipe(fd) ){
return -1;
}
if( (iPid = fork()) == 0 ){
int32_t fd2[2];
if( pipe(fd2) ){
return -1;
}
close(STDOUT_FILENO);
dup2(fd2[1],STDOUT_FILENO);
close(fd[0]);
close(fd2[1]);
system(pCmd);
read(fd2[0], pRes, iMaxLen);
write(fd[1], pRes, strlen(pRes)); // confirmed_safe_unsafe_usage
close(fd2[0]);
close(fd[1]);
exit(0);
}
close(fd[1]);
p = pRes;
left = iMaxLen;
while( (iCount = read(fd[0], p, left)) ){
p += iCount;
left -= iCount;
if( left <=0 ) break;
}
close(fd[0]);
return 0;
}
void WelsSleep( uint32_t dwMilliseconds )
{
usleep( dwMilliseconds * 1000 ); // microseconds
}
WELS_THREAD_ERROR_CODE WelsThreadCreate( WELS_THREAD_HANDLE * thread, LPWELS_THREAD_ROUTINE routine,
void * arg, WELS_THREAD_ATTR attr)
{
WELS_THREAD_ERROR_CODE err = 0;
pthread_attr_t at;
err = pthread_attr_init(&at);
if ( err )
return err;
err = pthread_attr_setscope(&at, PTHREAD_SCOPE_SYSTEM);
if ( err )
return err;
err = pthread_attr_setschedpolicy(&at, SCHED_FIFO);
if ( err )
return err;
err = pthread_create( thread, &at, routine, arg );
pthread_attr_destroy(&at);
return err;
// return pthread_create(thread, NULL, routine, arg);
}
WELS_THREAD_ERROR_CODE WelsSetThreadCancelable()
{
WELS_THREAD_ERROR_CODE err = pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, NULL );
if ( 0 == err )
err = pthread_setcanceltype( PTHREAD_CANCEL_DEFERRED, NULL );
return err;
}
WELS_THREAD_ERROR_CODE WelsThreadJoin( WELS_THREAD_HANDLE thread )
{
return pthread_join(thread, NULL);
}
WELS_THREAD_ERROR_CODE WelsThreadCancel( WELS_THREAD_HANDLE thread )
{
return pthread_cancel( thread );
}
WELS_THREAD_ERROR_CODE WelsThreadDestroy( WELS_THREAD_HANDLE *thread )
{
return WELS_THREAD_ERROR_OK;
}
WELS_THREAD_HANDLE WelsThreadSelf()
{
return pthread_self();
}
WELS_THREAD_ERROR_CODE WelsMutexInit( WELS_MUTEX * mutex )
{
return pthread_mutex_init(mutex, NULL);
}
WELS_THREAD_ERROR_CODE WelsMutexLock( WELS_MUTEX * mutex )
{
return pthread_mutex_lock(mutex);
}
WELS_THREAD_ERROR_CODE WelsMutexUnlock( WELS_MUTEX * mutex )
{
return pthread_mutex_unlock(mutex);
}
WELS_THREAD_ERROR_CODE WelsMutexDestroy( WELS_MUTEX * mutex )
{
return pthread_mutex_destroy(mutex);
}
// unnamed semaphores can not work well for posix threading models under not root users
WELS_THREAD_ERROR_CODE WelsEventInit( WELS_EVENT *event )
{
return sem_init(event, 0, 0);
}
WELS_THREAD_ERROR_CODE WelsEventDestroy( WELS_EVENT * event )
{
return sem_destroy( event ); // match with sem_init
}
WELS_THREAD_ERROR_CODE WelsEventOpen( WELS_EVENT **p_event, str_t *event_name )
{
if ( p_event == NULL || event_name == NULL )
return WELS_THREAD_ERROR_GENERIAL;
*p_event = sem_open(event_name, O_CREAT, (S_IRUSR | S_IWUSR)/*0600*/, 0);
if ( *p_event == (sem_t *)SEM_FAILED ) {
sem_unlink( event_name );
*p_event = NULL;
return WELS_THREAD_ERROR_GENERIAL;
} else {
return WELS_THREAD_ERROR_OK;
}
}
WELS_THREAD_ERROR_CODE WelsEventClose( WELS_EVENT *event, str_t *event_name )
{
WELS_THREAD_ERROR_CODE err = sem_close( event ); // match with sem_open
if ( event_name )
sem_unlink( event_name );
return err;
}
WELS_THREAD_ERROR_CODE WelsEventSignal( WELS_EVENT * event )
{
WELS_THREAD_ERROR_CODE err = 0;
// int32_t val = 0;
// sem_getvalue(event, &val);
// fprintf( stderr, "before signal it, val= %d..\n",val );
err = sem_post(event);
// sem_getvalue(event, &val);
// fprintf( stderr, "after signal it, val= %d..\n",val );
return err;
}
WELS_THREAD_ERROR_CODE WelsEventReset( WELS_EVENT * event )
{
// FIXME for posix event reset, seems not be supported for pthread??
sem_close(event);
return sem_init(event, 0, 0);
}
WELS_THREAD_ERROR_CODE WelsEventWait( WELS_EVENT * event )
{
return sem_wait(event); // blocking until signaled
}
WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut( WELS_EVENT * event, uint32_t dwMilliseconds )
{
if ( dwMilliseconds != (uint32_t)-1 )
{
return sem_wait(event);
}
else
{
#if defined(MACOS)
int32_t err = 0;
int32_t wait_count = 0;
do{
err = sem_trywait(event);
if ( WELS_THREAD_ERROR_OK == err)
break;// WELS_THREAD_ERROR_OK;
else if ( wait_count > 0 )
break;
usleep( dwMilliseconds * 1000 );
++ wait_count;
}while(1);
return err;
#else
struct timespec ts;
struct timeval tv;
gettimeofday(&tv,0);
ts.tv_sec = tv.tv_sec + dwMilliseconds /1000;
ts.tv_nsec = tv.tv_usec*1000 + (dwMilliseconds % 1000) * 1000000;
return sem_timedwait(event, &ts);
#endif//MACOS
}
}
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking( uint32_t nCount,
WELS_EVENT **event_list,
uint32_t dwMilliseconds )
{
// bWaitAll = FALSE && blocking
uint32_t nIdx = 0;
const uint32_t kuiAccessTime = 2; // 2 us once
// uint32_t uiSleepMs = 0;
if ( nCount == 0 )
return WELS_THREAD_ERROR_WAIT_FAILED;
while (1)
{
nIdx = 0; // access each event by order
while ( nIdx < nCount )
{
int32_t err = 0;
//#if defined(MACOS) // clock_gettime(CLOCK_REALTIME) & sem_timedwait not supported on mac, so have below impl
int32_t wait_count = 0;
// struct timespec ts;
// struct timeval tv;
//
// gettimeofday(&tv,0);
// ts.tv_sec = tv.tv_sec/*+ kuiAccessTime / 1000*/; // second
// ts.tv_nsec = (tv.tv_usec + kuiAccessTime) * 1000; // nano-second
/*
* although such interface is not used in __GNUC__ like platform, to use
* pthread_cond_timedwait() might be better choice if need
*/
do{
err = sem_trywait( event_list[nIdx] );
if ( WELS_THREAD_ERROR_OK == err )
return WELS_THREAD_ERROR_WAIT_OBJECT_0 + nIdx;
else if ( wait_count > 0 )
break;
usleep(kuiAccessTime);
++ wait_count;
}while( 1 );
//#else
// struct timespec ts;
//
// if ( clock_gettime(CLOCK_REALTIME, &ts) == -1 )
// return WELS_THREAD_ERROR_WAIT_FAILED;
// ts.tv_nsec += kuiAccessTime/*(kuiAccessTime % 1000)*/ * 1000;
//
//// fprintf( stderr, "sem_timedwait(): start to wait event %d..\n", nIdx );
// err = sem_timedwait(event_list[nIdx], &ts);
//// if ( err == -1 )
//// {
//// sem_getvalue(&event_list[nIdx], &val);
//// fprintf( stderr, "sem_timedwait() errno(%d) semaphore %d..\n", errno, val);
//// return WELS_THREAD_ERROR_WAIT_FAILED;
//// }
//// fprintf( stderr, "sem_timedwait(): wait event %d result %d errno %d..\n", nIdx, err, errno );
// if ( WELS_THREAD_ERROR_OK == err ) // non-blocking mode
// {
//// int32_t val = 0;
//// sem_getvalue(&event_list[nIdx], &val);
//// fprintf( stderr, "after sem_timedwait(), event_list[%d] semaphore value= %d..\n", nIdx, val);
//// fprintf( stderr, "WelsMultipleEventsWaitSingleBlocking sleep %d us\n", uiSleepMs);
// return WELS_THREAD_ERROR_WAIT_OBJECT_0 + nIdx;
// }
//#endif
// we do need access next event next time
++ nIdx;
// uiSleepMs += kuiAccessTime;
}
usleep( 1 ); // switch to working threads
// ++ uiSleepMs;
}
return WELS_THREAD_ERROR_WAIT_FAILED;
}
WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitAllBlocking( uint32_t nCount, WELS_EVENT **event_list )
{
// bWaitAll = TRUE && blocking
uint32_t nIdx = 0;
// const uint32_t kuiAccessTime = (uint32_t)-1;// 1 ms once
uint32_t uiCountSignals = 0;
uint32_t uiSignalFlag = 0; // UGLY: suppose maximal event number up to 32
if ( nCount == 0 || nCount > (sizeof(uint32_t)<<3) )
return WELS_THREAD_ERROR_WAIT_FAILED;
while (1)
{
nIdx = 0; // access each event by order
while (nIdx < nCount)
{
const uint32_t kuiBitwiseFlag = (1<<nIdx);
if ( (uiSignalFlag & kuiBitwiseFlag) != kuiBitwiseFlag ) // non-blocking mode
{
int32_t err = 0;
// fprintf( stderr, "sem_wait(): start to wait event %d..\n", nIdx );
err = sem_wait(event_list[nIdx]);
// fprintf( stderr, "sem_wait(): wait event %d result %d errno %d..\n", nIdx, err, errno );
if ( WELS_THREAD_ERROR_OK == err )
{
// int32_t val = 0;
// sem_getvalue(&event_list[nIdx], &val);
// fprintf( stderr, "after sem_timedwait(), event_list[%d] semaphore value= %d..\n", nIdx, val);
uiSignalFlag |= kuiBitwiseFlag;
++ uiCountSignals;
if ( uiCountSignals >= nCount )
{
return WELS_THREAD_ERROR_OK;
}
}
}
// we do need access next event next time
++ nIdx;
}
}
return WELS_THREAD_ERROR_WAIT_FAILED;
}
WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo(WelsLogicalProcessInfo * pInfo)
{
#ifdef LINUX
#define CMD_RES_SIZE 2048
str_t pBuf[CMD_RES_SIZE];
SystemCall("cat /proc/cpuinfo | grep \"processor\" | wc -l", pBuf, CMD_RES_SIZE);
pInfo->ProcessorCount = atoi(pBuf);
if( pInfo->ProcessorCount == 0 ){
pInfo->ProcessorCount = 1;
}
return WELS_THREAD_ERROR_OK;
#undef CMD_RES_SIZE
#else
SInt32 cpunumber;
Gestalt(gestaltCountOfCPUs,&cpunumber);
pInfo->ProcessorCount = cpunumber;
return WELS_THREAD_ERROR_OK;
#endif//LINUX
}
#endif

126
codec/api/svc/codec_api.h Normal file
View File

@ -0,0 +1,126 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_VIDEO_CODEC_SVC_API_H__
#define WELS_VIDEO_CODEC_SVC_API_H__
#include "codec_app_def.h"
#include "codec_def.h"
class ISVCEncoder
{
public:
/*
* return: CM_RETURN: 0 - success; otherwise - failed;
*/
virtual int Initialize(SVCEncodingParam* pParam, const INIT_TYPE kiInitType = INIT_TYPE_PARAMETER_BASED) = 0;
virtual int Initialize(void* pParam, const INIT_TYPE kiInitType = INIT_TYPE_CONFIG_BASED) = 0;
virtual int Unintialize() = 0;
/*
* return: EVideoFrameType [IDR: videoFrameTypeIDR; P: videoFrameTypeP; ERROR: videoFrameTypeInvalid]
*/
virtual int EncodeFrame(const unsigned char* kpSrc, SFrameBSInfo* pBsInfo) = 0;
virtual int EncodeFrame(const SSourcePicture ** kppSrcPicList, int nSrcPicNum, SFrameBSInfo * pBsInfo) = 0;
/*
* return: 0 - success; otherwise - failed;
*/
virtual int PauseFrame(const unsigned char* kpSrc, SFrameBSInfo* pBsInfo) = 0;
/*
* return: 0 - success; otherwise - failed;
*/
virtual int ForceIntraFrame(bool bIDR) = 0;
/************************************************************************
* InDataFormat, IDRInterval, SVC Encode Param, Frame Rate, Bitrate,..
************************************************************************/
/*
* return: CM_RETURN: 0 - success; otherwise - failed;
*/
virtual int SetOption(ENCODER_OPTION eOptionId, void* pOption) = 0;
virtual int GetOption(ENCODER_OPTION eOptionId, void* pOption) = 0;
};
class ISVCDecoder
{
public:
virtual long Initialize(void* pParam, const INIT_TYPE iInitType) = 0;
virtual long Unintialize() = 0;
virtual DECODING_STATE DecodeFrame( const unsigned char* pSrc,
const int iSrcLen,
unsigned char** ppDst,
int* pStride,
int& iWidth,
int& iHeight ) = 0;
/*
* src must be 4 byte aligned, recommend 16 byte aligned. the available src size must be multiple of 4.
*/
virtual DECODING_STATE DecodeFrame( const unsigned char* pSrc,
const int iSrcLen,
void ** ppDst,
SBufferInfo* pDstInfo) = 0;
/*
* src must be 4 byte aligned, recommend 16 byte aligned. the available src size must be multiple of 4.
*/
virtual DECODING_STATE DecodeFrameEx( const unsigned char * pSrc,
const int iSrcLen,
unsigned char * pDst,
int iDstStride,
int & iDstLen,
int & iWidth,
int & iHeight,
int & iColorFormat) = 0;
/*************************************************************************
* OutDataFormat
*************************************************************************/
virtual long SetOption(DECODER_OPTION eOptionId, void* pOption) = 0;
virtual long GetOption(DECODER_OPTION eOptionId, void* pOption) = 0;
};
extern "C"
{
int CreateSVCEncoder(ISVCEncoder** ppEncoder);
void DestroySVCEncoder(ISVCEncoder* pEncoder);
long CreateDecoder(ISVCDecoder** ppDecoder);
void DestroyDecoder(ISVCDecoder* pDecoder);
}
#endif//WELS_VIDEO_CODEC_SVC_API_H__

View File

@ -0,0 +1,292 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_VIDEO_CODEC_APPLICATION_DEFINITION_H__
#define WELS_VIDEO_CODEC_APPLICATION_DEFINITION_H__
////////////////Data and /or structures introduced in Cisco OpenH264 application////////////////
/* Constants */
#define MAX_TEMPORAL_LAYER_NUM 5
#define MAX_SPATIAL_LAYER_NUM 4
#define MAX_QUALITY_LAYER_NUM 4
#define MAX_LAYER_NUM_OF_FRAME 128
#define MAX_NAL_UNITS_IN_LAYER 128 // predetermined here, adjust it later if need
#define MAX_RTP_PAYLOAD_LEN 1000
#define AVERAGE_RTP_PAYLOAD_LEN 800
#define SAVED_NALUNIT_NUM_TMP ( (MAX_SPATIAL_LAYER_NUM*MAX_QUALITY_LAYER_NUM) + 1 + MAX_SPATIAL_LAYER_NUM ) //SPS/PPS + SEI/SSEI + PADDING_NAL
#define MAX_SLICES_NUM_TMP ( ( MAX_NAL_UNITS_IN_LAYER - SAVED_NALUNIT_NUM_TMP ) / 3 )
typedef enum
{
/* Errors derived from bitstream parsing */
dsErrorFree = 0x00, /* Bitstream error-free */
dsFramePending = 0x01, /* Need more throughput to generate a frame output, */
dsRefLost = 0x02, /* layer lost at reference frame with temporal id 0 */
dsBitstreamError = 0x04, /* Error bitstreams(maybe broken internal frame) the decoder cared */
dsDepLayerLost = 0x08, /* Dependented layer is ever lost */
dsNoParamSets = 0x10, /* No parameter set NALs involved */
/* Errors derived from logic level */
dsInvalidArgument = 0x1000, /* Invalid argument specified */
dsInitialOptExpected= 0x2000, /* Initializing operation is expected */
dsOutOfMemory = 0x4000, /* Out of memory due to new request */
/* ANY OTHERS? */
dsDstBufNeedExpand = 0x8000 /* Actual picture size exceeds size of dst pBuffer feed in decoder, so need expand its size */
}DECODING_STATE;
/* Option types introduced in SVC encoder application */
typedef enum
{
ENCODER_OPTION_DATAFORMAT = 0,
ENCODER_OPTION_IDR_INTERVAL,
ENCODER_OPTION_SVC_ENCODE_PARAM,
ENCODER_OPTION_FRAME_RATE,
ENCODER_OPTION_iBitRate,
ENCODER_OPTION_INTER_SPATIAL_PRED,
ENCODER_OPTION_RC_MODE,
ENCODER_PADDING_PADDING,
ENCODER_LTR_RECOVERY_REQUEST,
ENCODER_LTR_MARKING_FEEDBACK,
ENCOCER_LTR_MARKING_PERIOD,
ENCODER_OPTION_LTR,
ENCODER_OPTION_ENABLE_SSEI, //disable SSEI: true--disable ssei; false--enable ssei
ENCODER_OPTION_ENABLE_PREFIX_NAL_ADDING, //enable prefix: true--enable prefix; false--disable prefix
ENCODER_OPTION_ENABLE_SPS_PPS_ID_ADDITION, //disable pSps/pPps id addition: true--disable pSps/pPps id; false--enable pSps/pPps id addistion
ENCODER_OPTION_CURRENT_PATH
} ENCODER_OPTION;
/* Option types introduced in SVC decoder application */
typedef enum
{
DECODER_OPTION_DATAFORMAT = 0, /* Set color space of decoding output frame */
DECODER_OPTION_TRUNCATED_MODE, /* Used in decoding bitstream of non integrated frame, only truncated working mode is supported by tune, so skip it */
DECODER_OPTION_END_OF_STREAM, /* Indicate bitstream of the final frame to be decoded */
DECODER_OPTION_VCL_NAL, //feedback whether or not have VCL NAL in current AU for application layer
DECODER_OPTION_TEMPORAL_ID, //feedback temporal id for application layer
DECODER_OPTION_MODE, // indicates the decoding mode
DECODER_OPTION_OUTPUT_PROPERTY,
DECODER_OPTION_FRAME_NUM, //feedback current decoded frame number
DECODER_OPTION_IDR_PIC_ID, // feedback current frame belong to which IDR period
DECODER_OPTION_LTR_MARKING_FLAG, // feedback wether current frame mark a LTR
DECODER_OPTION_LTR_MARKED_FRAME_NUM, // feedback frame num marked by current Frame
DECODER_OPTION_DEVICE_INFO,
} DECODER_OPTION;
typedef enum //feedback that whether or not have VCL NAL in current AU
{
FEEDBACK_NON_VCL_NAL = 0,
FEEDBACK_VCL_NAL,
FEEDBACK_UNKNOWN_NAL
} FEEDBACK_VCL_NAL_IN_AU;
typedef enum //feedback the iTemporalId in current AU if have VCL NAL
{
FEEDBACK_TEMPORAL_ID_0 = 0,
FEEDBACK_TEMPORAL_ID_1,
FEEDBACK_TEMPORAL_ID_2,
FEEDBACK_TEMPORAL_ID_3,
FEEDBACK_TEMPORAL_ID_4,
FEEDBACK_UNKNOWN_TEMPORAL_ID
} FEEDBACK_TEMPORAL_ID;
/* Type of layer being encoded */
typedef enum
{
NON_VIDEO_CODING_LAYER = 0,
VIDEO_CODING_LAYER = 1
} LAYER_TYPE;
/* SVC Encoder/Decoder Initializing Parameter Types */
typedef enum
{
INIT_TYPE_PARAMETER_BASED = 0, // For SVC DEMO Application
INIT_TYPE_CONFIG_BASED, // For SVC CONSOLE Application
}INIT_TYPE;
//enumerate the type of video bitstream which is provided to decoder
typedef enum
{
VIDEO_BITSTREAM_AVC = 0,
VIDEO_BITSTREAM_SVC = 1,
VIDEO_BITSTREAM_DEFAULT = VIDEO_BITSTREAM_SVC,
}VIDEO_BITSTREAM_TYPE;
typedef enum
{
NO_RECOVERY_REQUSET = 0,
LTR_RECOVERY_REQUEST = 1,
IDR_RECOVERY_REQUEST = 2,
NO_LTR_MARKING_FEEDBACK =3,
LTR_MARKING_SUCCESS = 4,
LTR_MARKING_FAILED = 5,
}KEY_FRAME_REQUEST_TYPE;
typedef struct
{
unsigned int uiFeedbackType; //IDR request or LTR recovery request
unsigned int uiIDRPicId; // distinguish request from different IDR
int iLastCorrectFrameNum;
int iCurrentFrameNum; //specify current decoder frame_num.
}SLTRRecoverRequest;
typedef struct
{
unsigned int uiFeedbackType; //mark failed or successful
unsigned int uiIDRPicId; // distinguish request from different IDR
int iLTRFrameNum; //specify current decoder frame_num
}SLTRMarkingFeedback;
#pragma pack(1)
typedef struct
{
//# 0 SM_SINGLE_SLICE | SliceNum==1
//# 1 SM_FIXEDSLCNUM_SLICE | according to SliceNum | Enabled dynamic slicing for multi-thread
//# 2 SM_RASTER_SLICE | according to SlicesAssign | Need input of MB numbers each slice. In addition, if other constraint in SSliceArgument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
//# 3 SM_ROWMB_SLICE | according to PictureMBHeight | Typical of single row of mbs each slice?+ slice size constraint which including re-encoding
//# 4 SM_DYN_SLICE | according to SliceSize | Dynamic slicing (have no idea about slice_nums until encoding current frame)
unsigned int uiSliceMode; //by default, uiSliceMode will be 0
struct {
unsigned int uiSliceMbNum[MAX_SLICES_NUM_TMP]; //here we use a tmp fixed value since MAX_SLICES_NUM is not defined here and its definition may be changed;
unsigned int uiSliceNum;
unsigned int uiSliceSizeConstraint;
} sSliceArgument;//not all the elements in this argument will be used, how it will be used depends on uiSliceMode; see below
} SSliceConfig;
typedef struct {
int iVideoWidth; // video size in cx specified for a layer
int iVideoHeight; // video size in cy specified for a layer
float fFrameRate; // frame rate specified for a layer
int iQualityLayerNum; // layer number at quality level
int iSpatialBitrate; // target bitrate for a spatial layer
int iCgsSnrRefined; // 0: SNR layers all MGS; 1: SNR layers all CGS
int iInterSpatialLayerPredFlag; // 0: diabled [independency spatial layer coding]; 1: enabled [base spatial layer dependency coding]
int iQualityBitrate[MAX_QUALITY_LAYER_NUM]; // target bitrate for a quality layer
SSliceConfig sSliceCfg;
} SSpatialLayerConfig;
/* SVC Encoding Parameters */
typedef struct {
int iPicWidth; // width of picture in samples
int iPicHeight; // height of picture in samples
int iTargetBitrate; // target bitrate desired
int iTemporalLayerNum; // layer number at temporal level
int iSpatialLayerNum; // layer number at spatial level
float fFrameRate; // input maximal frame rate
int iInputCsp; // color space of input sequence
int iKeyPicCodingMode;// mode of key picture coding
int iIntraPeriod; // period of Intra frame
bool bEnableSpsPpsIdAddition;
bool bPrefixNalAddingCtrl;
bool bEnableDenoise; // denoise control
bool bEnableBackgroundDetection; // background detection control //VAA_BACKGROUND_DETECTION //BGD cmd
bool bEnableAdaptiveQuant; // adaptive quantization control
bool bEnableCropPic; // enable cropping source picture. 8/25/2010
// FALSE: Streaming Video Sharing; TRUE: Video Conferencing Meeting;
bool bEnableLongTermReference; // 0: on, 1: off
int iLtrMarkPeriod;
int iRCMode; // RC mode
int iTemporalBitrate[MAX_TEMPORAL_LAYER_NUM]; // target bitrate specified for a temporal level
int iPaddingFlag; // 0:disable padding;1:padding
SSpatialLayerConfig sSpatialLayers[MAX_SPATIAL_LAYER_NUM];
} SVCEncodingParam, *PSVCEncodingParam;
//Define a new struct to show the property of video bitstream.
typedef struct {
unsigned int size; //size of the struct
VIDEO_BITSTREAM_TYPE eVideoBsType;
} SVideoProperty;
/* SVC Decoding Parameters, reserved here and potential applicable in the future */
typedef struct TagSVCDecodingParam{
char *pFileNameRestructed; // File name of restructed frame used for PSNR calculation based debug
int iOutputColorFormat; // color space format to be outputed, EVideoFormatType specified in codec_def.h
unsigned int uiCpuLoad; // CPU load
unsigned char uiTargetDqLayer; // Setting target dq layer id
unsigned char uiEcActiveFlag; // Whether active error concealment feature in decoder
SVideoProperty sVideoProperty;
} SDecodingParam, *PDecodingParam;
/* Bitstream inforamtion of a layer being encoded */
typedef struct {
unsigned char uiTemporalId;
unsigned char uiSpatialId;
unsigned char uiQualityId;
unsigned char uiPriorityId; //ignore it currently
unsigned char uiLayerType;
int iNalCount; // Count number of NAL coded already
int iNalLengthInByte[MAX_NAL_UNITS_IN_LAYER]; // Length of NAL size in byte from 0 to iNalCount-1
unsigned char* pBsBuf; // Buffer of bitstream contained
} SLayerBSInfo, *PLayerBSInfo;
typedef struct {
int iTemporalId; // Temporal ID
unsigned char uiFrameType;
int iLayerNum;
SLayerBSInfo sLayerInfo[MAX_LAYER_NUM_OF_FRAME];
} SFrameBSInfo, *PFrameBSInfo;
typedef struct Source_Picture_s {
int iColorFormat; // color space type
int iStride[4]; // stride for each plane pData
unsigned char *pData[4]; // plane pData
int iPicWidth; // luma picture width in x coordinate
int iPicHeight; // luma picture height in y coordinate
} SSourcePicture;
#pragma pack()
#endif//WELS_VIDEO_CODEC_APPLICATION_DEFINITION_H__

252
codec/api/svc/codec_def.h Normal file
View File

@ -0,0 +1,252 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_VIDEO_CODEC_DEFINITION_H__
#define WELS_VIDEO_CODEC_DEFINITION_H__
#if defined(WIN32)
#pragma once
#endif//WIN32
typedef enum
{
/*rgb color formats*/
videoFormatRGB = 1,
videoFormatRGBA = 2,
videoFormatRGB555 = 3,
videoFormatRGB565 = 4,
videoFormatBGR = 5,
videoFormatBGRA = 6,
videoFormatABGR = 7,
videoFormatARGB = 8,
/*yuv color formats*/
videoFormatYUY2 = 20,
videoFormatYVYU = 21,
videoFormatUYVY = 22,
videoFormatI420 = 23, //same as IYUV
videoFormatYV12 = 24,
videoFormatInternal = 25, // Only Used for SVC decoder testbed
videoFormatNV12 = 26, // new format for output by DXVA decoding
videoFormatVFlip = 0x80000000
}EVideoFormatType;
typedef enum
{
videoFrameTypeInvalid, /* Encoder not ready or parameters are invalidate */
videoFrameTypeIDR, /* This type is only available for H264 if this frame is key frame, then return this type */
videoFrameTypeI, /* I frame type */
videoFrameTypeP, /* P frame type */
videoFrameTypeSkip, /* Skip the frame based encoder kernel */
videoFrameTypeIPMixed, /* Frame type introduced I and P slices are mixing */
}EVideoFrameType;
typedef enum
{
cmResultSuccess,
cmInitParaError, /*Parameters are invalid */
cmMachPerfIsBad, /*The performance of machine is not enough to support
H264 CODEC, in this case, suggestion user use h263
or set fps to low like 5fps or more low*/
cmUnkonwReason,
cmMallocMemeError, /*Malloc a memory error*/
cmInitExpected, /*Initial action is expected*/
}CM_RETURN;
/* nal unit type */
enum ENalUnitType
{
NAL_UNKNOWN = 0,
NAL_SLICE = 1,
NAL_SLICE_DPA = 2,
NAL_SLICE_DPB = 3,
NAL_SLICE_DPC = 4,
NAL_SLICE_IDR = 5, /* ref_idc != 0 */
NAL_SEI = 6, /* ref_idc == 0 */
NAL_SPS = 7,
NAL_PPS = 8
/* ref_idc == 0 for 6,9,10,11,12 */
};
/* NRI: eNalRefIdc */
enum ENalPriority
{
NAL_PRIORITY_DISPOSABLE = 0,
NAL_PRIORITY_LOW = 1,
NAL_PRIORITY_HIGH = 2,
NAL_PRIORITY_HIGHEST = 3,
};
#define IS_PARAMETER_SET_NAL(eNalRefIdc, eNalType) \
( (eNalRefIdc == NAL_PRIORITY_HIGHEST) && (eNalType == (NAL_SPS|NAL_PPS) || eNalType == NAL_SPS) )
#define IS_IDR_NAL(eNalRefIdc, eNalType) \
( (eNalRefIdc == NAL_PRIORITY_HIGHEST) && (eNalType == NAL_SLICE_IDR) )
#define FRAME_NUM_PARAM_SET (-1)
#define FRAME_NUM_IDR 0
#pragma pack(1)
/* Error Tools definition */
typedef unsigned short ERR_TOOL;
enum{
ET_NONE = 0x00, // NONE Error Tools
ET_IP_SCALE = 0x01, // IP Scalable
ET_FMO = 0x02, // Flexible Macroblock Ordering
ET_IR_R1 = 0x04, // Intra Refresh in predifined 2% MB
ET_IR_R2 = 0x08, // Intra Refresh in predifined 5% MB
ET_IR_R3 = 0x10, // Intra Refresh in predifined 10% MB
ET_FEC_HALF = 0x20, // Forward Error Correction in 50% redundency mode
ET_FEC_FULL = 0x40, // Forward Error Correction in 100% redundency mode
ET_RFS = 0x80, // Reference Frame Selection
};
/* information of coded Slice(=NAL)(s) */
typedef struct SliceInformation
{
unsigned char* pBufferOfSlices; // base buffer of coded slice(s)
int iCodedSliceCount; // number of coded slices
unsigned int* pLengthOfSlices; // array of slices length accordingly by number of slice
int iFecType; // FEC type[0, 50%FEC, 100%FEC]
unsigned char uiSliceIdx; // index of slice in frame [FMO: 0,..,uiSliceCount-1; No FMO: 0]
unsigned char uiSliceCount; // count number of slice in frame [FMO: 2-8; No FMO: 1]
char iFrameIndex; // index of frame[-1, .., idr_interval-1]
unsigned char uiNalRefIdc; // NRI, priority level of slice(NAL)
unsigned char uiNalType; // NAL type
unsigned char uiContainingFinalNal; // whether final NAL is involved in buffer of coded slices, flag used in Pause feature in T27
} SliceInfo, *PSliceInfo;
#define CIF_WIDTH 352
#define CIF_HEIGHT 288
#define QVGA_WIDTH 320
#define QVGA_HEIGHT 240
#define QCIF_WIDTH 176
#define QCIF_HEIGHT 144
#define SQCIF_WIDTH 128
#define SQCIF_HEIGHT 96
/* thresholds of the initial, maximal and minimal rate */
typedef struct {
int iWidth; // frame width
int iHeight; // frame height
int iThresholdOfInitRate; // threshold of initial rate
int iThresholdOfMaxRate; // threshold of maximal rate
int iThresholdOfMinRate; // threshold of minimal rate
int iMinThresholdFrameRate; //min frame rate min
int iSkipFrameRate; //skip to frame rate min
int iSkipFrameStep; //how many frames to skip
}SRateThresholds, *PRateThresholds;
/*new interface*/
typedef struct WelsDeviceInfo
{
int bSupport; /* a logic flag provided by decoder which indicates whether GPU decoder can work based on the following device info. */
char Vendor[128]; // vendor name
char Device[128]; // device name
char Driver[128]; // driver version
char DriverDate[128]; // driver release date
} Device_Info;
typedef enum TagBufferProperty
{
BUFFER_HOST = 0, // host memory
BUFFER_DEVICE = 1, // device memory including surface and shared handle
// for DXVA: shared handle
// for VDA : iosurface
//SURFACE_DEVICE , // surface
//SHARED_HANDLE // shared handle
}EBufferProperty;
typedef enum TagDecodeMode
{
AUTO_MODE = 0, // decided by decoder itself, dynamic mode switch, delayed switch
SW_MODE = 1, // decoded by CPU, instant switch
GPU_MODE = 2, // decoded by GPU, instant switch
SWITCH_MODE =3 // switch to the other mode, forced mode switch, delayed switch
}EDecodeMode;
typedef struct TagSysMemBuffer
{
int iWidth; //width of decoded pic for display
int iHeight; //height of decoded pic for display
int iFormat; // type is "EVideoFormatType"
int iStride[2]; //stride of 2 component
}SSysMEMBuffer;
typedef struct TagVideoMemBuffer
{
int iSurfaceWidth; // used for surface create
int iSurfaceHeight;
int D3Dformat; //type is "D3DFORMAT"
int D3DPool; // type is "D3DPOOL";
int iLeftTopX;
int iLeftTopY;
int iRightBottomX;
int iRightBottomY;
}SVideoMemBuffer;
typedef struct TagBufferInfo
{
EBufferProperty eBufferProperty; //0: host memory; 1: device memory;
int iBufferStatus; // 0: one frame data is not ready; 1: one frame data is ready
EDecodeMode eWorkMode; //indicate what the real working mode in decoder
union {
SSysMEMBuffer sSystemBuffer;
SVideoMemBuffer sVideoBuffer;
}UsrData;
}SBufferInfo;
/* Constants related to transmission rate at various resolutions */
static const SRateThresholds ksRateThrMap[4] = {
// initial-maximal-minimal
{CIF_WIDTH, CIF_HEIGHT, 225000, 384000, 96000, 3, 1, 1}, // CIF
{QVGA_WIDTH, QVGA_HEIGHT, 192000, 320000, 80000, -1, -1, -1}, // QVGA
{QCIF_WIDTH, QCIF_HEIGHT, 150000, 256000, 64000, 8, 4, 2}, // QCIF
{SQCIF_WIDTH, SQCIF_HEIGHT, 120000, 192000, 48000, 5, 3, 1} // SQCIF
};
// In a GOP, multiple of the key frame number, derived from
// the number of layers(index or array below)
static const char kiKeyNumMultiple[] = {
1, 1, 2, 4, 8, 16,
};
#pragma pack()
#endif//WELS_VIDEO_CODEC_DEFINITION_H__

View File

@ -0,0 +1,246 @@
NAME= welsdec
### include debug information: 1=yes, 0=no
DBG= 0
NASM = 1
DEPEND= dependencies
BINDIR= ../bin
OUTDIR= ../../../../bin/linux
INCLUDE= -I../../../api/svc -I../../../decoder/core/inc -I../../../decoder/plus/inc -I../../../console/dec/inc
CORESRCDIR= ../../../decoder/core/src
PLUSSRCDIR= ../../../decoder/plus/src
ASMSRCDIR= ../../../decoder/core/asm
MAINSRCDIR= ../../../console/dec/src
OBJMAINDIR= ../obj
OBJDIR= ../obj/dec
CC= $(shell which gcc)
AS= $(shell which nasm)
CXX = g++ -m32
GCC = gcc -m32
ASFLAGS= -f elf -DNOPREFIX -I ../../../decoder/core/asm/
LIBS= -lstdc++ -ldl
#-lm
CFLAGS= $(INCLUDE) -fPIC -D__GCC__ -DLINUX -D__NO_CTYPE -DHAVE_CACHE_LINE_ALIGN
ifeq ($(DBG),1)
#SUFFIX= .dbg
CFLAGS+= -g
else
#SUFFIX=
CFLAGS+= -O3
endif
ifeq ($(NASM), 1)
CFLAGS += -DX86_ASM
endif
OBJSUF= .o$(SUFFIX)
DECODESRC=$(CORESRCDIR)/au_parser.cpp \
$(CORESRCDIR)/bit_stream.cpp \
$(CORESRCDIR)/cpu.cpp \
$(CORESRCDIR)/deblocking.cpp \
$(CORESRCDIR)/decode_mb_aux.cpp \
$(CORESRCDIR)/decoder.cpp \
$(CORESRCDIR)/decoder_data_tables.cpp \
$(CORESRCDIR)/expand_pic.cpp \
$(CORESRCDIR)/fmo.cpp \
$(CORESRCDIR)/get_intra_predictor.cpp \
$(CORESRCDIR)/manage_dec_ref.cpp \
$(CORESRCDIR)/mc.cpp \
$(CORESRCDIR)/mem_align.cpp \
$(CORESRCDIR)/memmgr_nal_unit.cpp \
$(CORESRCDIR)/mv_pred.cpp \
$(CORESRCDIR)/parse_mb_syn_cavlc.cpp \
$(CORESRCDIR)/pic_queue.cpp \
$(CORESRCDIR)/rec_mb.cpp \
$(CORESRCDIR)/decode_slice.cpp \
$(CORESRCDIR)/decoder_core.cpp \
$(CORESRCDIR)/utils.cpp \
$(PLUSSRCDIR)/welsDecoderExt.cpp \
$(PLUSSRCDIR)/welsCodecTrace.cpp
ASMSRC= $(ASMSRCDIR)/block_add.asm \
$(ASMSRCDIR)/cpuid.asm \
$(ASMSRCDIR)/deblock.asm \
$(ASMSRCDIR)/expand_picture.asm \
$(ASMSRCDIR)/dct.asm \
$(ASMSRCDIR)/intra_pred.asm \
$(ASMSRCDIR)/mc_chroma.asm \
$(ASMSRCDIR)/mb_copy.asm \
$(ASMSRCDIR)/mc_luma.asm \
$(ASMSRCDIR)/memzero.asm \
$(ASMSRCDIR)/asm_inc.asm \
MAINSRC= $(MAINSRCDIR)/d3d9_utils.cpp \
$(MAINSRCDIR)/h264dec.cpp \
$(MAINSRCDIR)/read_config.cpp
OBJDEC=$(OBJDIR)/au_parser.o \
$(OBJDIR)/bit_stream.o \
$(OBJDIR)/cpu.o \
$(OBJDIR)/deblocking.o \
$(OBJDIR)/decode_mb_aux.o \
$(OBJDIR)/decoder.o \
$(OBJDIR)/decoder_data_tables.o \
$(OBJDIR)/expand_pic.o \
$(OBJDIR)/fmo.o \
$(OBJDIR)/get_intra_predictor.o \
$(OBJDIR)/manage_dec_ref.o \
$(OBJDIR)/mc.o \
$(OBJDIR)/mem_align.o \
$(OBJDIR)/memmgr_nal_unit.o \
$(OBJDIR)/mv_pred.o \
$(OBJDIR)/parse_mb_syn_cavlc.o \
$(OBJDIR)/pic_queue.o \
$(OBJDIR)/rec_mb.o \
$(OBJDIR)/decode_slice.o \
$(OBJDIR)/decoder_core.o \
$(OBJDIR)/utils.o \
$(OBJDIR)/welsDecoderExt.o \
$(OBJDIR)/welsCodecTrace.o
ifeq ($(NASM), 1)
OBJDEC+=$(OBJDIR)/block_add.o \
$(OBJDIR)/cpuid.o \
$(OBJDIR)/deblock.o \
$(OBJDIR)/expand_picture.o \
$(OBJDIR)/dct.o \
$(OBJDIR)/intra_pred.o \
$(OBJDIR)/mc_chroma.o \
$(OBJDIR)/mb_copy.o \
$(OBJDIR)/mc_luma.o \
$(OBJDIR)/memzero.o \
$(OBJDIR)/asm_inc.o
endif
OBJBIN= $(OBJDIR)/d3d9_utils.o \
$(OBJDIR)/h264dec.o \
$(OBJDIR)/read_config.o
BINLIB= $(BINDIR)/$(NAME).a
SHAREDLIB= $(BINDIR)/$(NAME).so
BIN= $(BINDIR)/$(NAME).exe
default: depend checkdir lib dylib exe release
dependencies:
@echo "" >dependencies
checkdir:
@echo 'checkdir..'
@if test ! -d $(BINDIR) ; \
then \
mkdir -p $(BINDIR) ; \
fi
@if test ! -d $(OUTDIR) ; \
then \
mkdir -p $(OUTDIR) ; \
fi
@if test ! -d $(OBJMAINDIR) ; \
then \
mkdir -p $(OBJMAINDIR) ; \
fi
@if test ! -d $(OBJDIR) ; \
then \
mkdir -p $(OBJDIR) ; \
fi
@echo
release:
@echo 'release..'
@echo 'cp -f $(SHAREDLIB) $(OUTDIR)'
@cp -f $(SHAREDLIB) $(OUTDIR)
@echo 'cp -f $(BIN) $(OUTDIR)'
@cp -f $(BIN) $(OUTDIR)
@echo
clean:
@echo remove all objects
@rm -f $(OBJDEC)
@rm -f $(OBJBIN)
@rm -f $(BINLIB)
@rm -f $(SHAREDLIB)
@rm -f $(BIN)
tags:
@echo update tag table
@etags $(CORESRCDIR)/*.c $(CORESRCDIR)/*.cpp $(PLUSSRCDIR)/*.cpp $(MAINSRCDIR)/*.cpp
lib: $(OBJDEC)
@echo '$(OBJDEC)'
@echo
@echo 'ar cr $(BINLIB) $(OBJDEC)'
@echo
@echo 'creating libraries "$(BINLIB)"'
@ar cr $(BINLIB) $(OBJDEC)
@echo '... done'
#@echo 'cp $(BINLIB) /usr/lib'
#@cp $(BINLIB) /usr/lib
@echo
dylib: $(OBJDEC)
@echo '$(OBJDEC)'
@echo
@echo '$(CXX) -shared -Wl,-Bsymbolic -o $(SHAREDLIB) $(OBJDEC) $(LIBS)'
@echo 'creating dynamic library "$(SHAREDLIB)"'
@$(CXX) -shared -Wl,-Bsymbolic -o $(SHAREDLIB) $(OBJDEC) $(LIBS)
@echo '... done'
@echo
exe: $(OBJBIN)
@echo
@echo '$(OBJBIN)'
@echo
@echo '$(CXX) $(LIBS) $(OBJBIN) $(BINLIB) -o $(BIN)'
@echo 'creating binary "$(BIN)"'
@$(CXX) $(OBJBIN) $(BINLIB) -o $(BIN) $(LIBS)
@echo '... done'
@echo
depend:
@echo
@echo 'checking dependencies'
@$(SHELL) -ec '$(CC) -m32 -MM $(CFLAGS) $(DECODESRC) $(ASMSRC) $(MAINSRC)\
| sed '\''s@\(.*\)\.o[ :]@$(OBJDIR)/\1.o$(SUFFIX):@g'\'' \
>$(DEPEND)'
@echo
#$(OBJDIR)/%.o$(SUFFIX): $(COMMSRCDIR)/%.c
# @echo 'compiling object file "$@" ...'
# @$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(CORESRCDIR)/%.c
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(CORESRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(PLUSSRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(ASMSRCDIR)/%.asm
@echo 'compiling object file "$@" ...'
@$(AS) $(ASFLAGS) -o $@ $<
#$(OBJDIR)/%.o$(SUFFIX): $(ASMCOMDIR)/%.asm
# @echo 'compiling object file "$@" ...'
# @$(AS) $(ASFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(MAINSRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
include $(DEPEND)

View File

@ -0,0 +1,270 @@
NAME= welsenc
### include debug information: 1=yes, 0=no
DBG= 0
NASM = 1
DEPEND= dependencies
OUTDIR= ../../../../bin/linux
BINDIR= ../bin
INCLUDE= -I../../../encoder/core/inc -I../../../encoder/plus/inc -I../../../api/svc -I../../../WelsThreadLib/api -I../../../console/enc/inc
THREADLIBSRCDIR=../../../WelsThreadLib/src
CORESRCDIR= ../../../encoder/core/src
PLUSSRCDIR= ../../../encoder/plus/src
ASMSRCDIR= ../../../encoder/core/asm
MAINSRCDIR= ../../../console/enc/src
OBJMAINDIR= ../obj
OBJDIR= ../obj/enc
CC= $(shell which gcc)
AS= $(shell which nasm)
CXX = g++ -m32
GCC = gcc -m32
ASFLAGS= -f elf -DNOPREFIX -I ../../../encoder/core/asm/
LIBS= -lstdc++ -ldl -lpthread
#-lm
CFLAGS= $(INCLUDE) -m32 -fPIC -D__GCC__ -DLINUX -D__NO_CTYPE -DWELS_SVC -DENCODER_CORE -DHAVE_CACHE_LINE_ALIGN -DWELS_TESTBED -DMT_ENABLED
ifeq ($(DBG),1)
#SUFFIX= .dbg
CFLAGS+= -g
else
#SUFFIX=
CFLAGS+= -O3
endif
ifeq ($(NASM), 1)
CFLAGS += -DX86_ASM
endif
OBJSUF= .o$(SUFFIX)
ENCODESRC= $(CORESRCDIR)/wels_preprocess.cpp \
$(CORESRCDIR)/au_set.cpp \
$(CORESRCDIR)/cpu.cpp \
$(CORESRCDIR)/deblocking.cpp \
$(CORESRCDIR)/decode_mb_aux.cpp \
$(CORESRCDIR)/encode_mb_aux.cpp \
$(CORESRCDIR)/encoder.cpp \
$(CORESRCDIR)/encoder_data_tables.cpp \
$(CORESRCDIR)/encoder_ext.cpp \
$(CORESRCDIR)/expand_pic.cpp \
$(CORESRCDIR)/get_intra_predictor.cpp \
$(CORESRCDIR)/mc.cpp \
$(CORESRCDIR)/md.cpp \
$(CORESRCDIR)/memory_align.cpp \
$(CORESRCDIR)/mv_pred.cpp \
$(CORESRCDIR)/nal_encap.cpp \
$(CORESRCDIR)/picture_handle.cpp \
$(CORESRCDIR)/property.cpp \
$(CORESRCDIR)/ratectl.cpp \
$(CORESRCDIR)/ref_list_mgr_svc.cpp \
$(CORESRCDIR)/sample.cpp \
$(CORESRCDIR)/set_mb_syn_cavlc.cpp \
$(CORESRCDIR)/slice_multi_threading.cpp \
$(CORESRCDIR)/svc_enc_slice_segment.cpp \
$(CORESRCDIR)/svc_base_layer_md.cpp \
$(CORESRCDIR)/svc_encode_mb.cpp \
$(CORESRCDIR)/svc_encode_slice.cpp \
$(CORESRCDIR)/svc_mode_decision.cpp \
$(CORESRCDIR)/svc_motion_estimate.cpp \
$(CORESRCDIR)/svc_set_mb_syn_cavlc.cpp \
$(CORESRCDIR)/utils.cpp \
$(THREADLIBSRCDIR)/WelsThreadLib.cpp \
$(PLUSSRCDIR)/welsEncoderExt.cpp \
$(PLUSSRCDIR)/welsCodecTrace.cpp
ASMSRC= $(ASMSRCDIR)/coeff.asm \
$(ASMSRCDIR)/cpuid.asm \
$(ASMSRCDIR)/dct.asm \
$(ASMSRCDIR)/deblock.asm \
$(ASMSRCDIR)/expand_picture.asm \
$(ASMSRCDIR)/intra_pred.asm \
$(ASMSRCDIR)/intra_pred_util.asm \
$(ASMSRCDIR)/mb_copy.asm \
$(ASMSRCDIR)/mc_chroma.asm \
$(ASMSRCDIR)/mc_luma.asm \
$(ASMSRCDIR)/memzero.asm \
$(ASMSRCDIR)/quant.asm \
$(ASMSRCDIR)/satd_sad.asm \
$(ASMSRCDIR)/score.asm \
$(ASMSRCDIR)/asm_inc.asm \
$(ASMSRCDIR)/vaa.asm
MAINSRC= $(MAINSRCDIR)/read_config.cpp \
$(MAINSRCDIR)/welsenc.cpp
OBJENC= $(OBJDIR)/wels_preprocess.o \
$(OBJDIR)/au_set.o \
$(OBJDIR)/cpu.o \
$(OBJDIR)/deblocking.o \
$(OBJDIR)/decode_mb_aux.o \
$(OBJDIR)/encode_mb_aux.o \
$(OBJDIR)/encoder.o \
$(OBJDIR)/encoder_data_tables.o \
$(OBJDIR)/encoder_ext.o \
$(OBJDIR)/expand_pic.o \
$(OBJDIR)/get_intra_predictor.o \
$(OBJDIR)/mc.o \
$(OBJDIR)/md.o \
$(OBJDIR)/memory_align.o \
$(OBJDIR)/mv_pred.o \
$(OBJDIR)/nal_encap.o \
$(OBJDIR)/picture_handle.o \
$(OBJDIR)/property.o \
$(OBJDIR)/ratectl.o \
$(OBJDIR)/ref_list_mgr_svc.o \
$(OBJDIR)/sample.o \
$(OBJDIR)/set_mb_syn_cavlc.o \
$(OBJDIR)/slice_multi_threading.o \
$(OBJDIR)/svc_enc_slice_segment.o \
$(OBJDIR)/svc_base_layer_md.o \
$(OBJDIR)/svc_encode_mb.o \
$(OBJDIR)/svc_encode_slice.o \
$(OBJDIR)/svc_mode_decision.o \
$(OBJDIR)/svc_motion_estimate.o \
$(OBJDIR)/svc_set_mb_syn_cavlc.o \
$(OBJDIR)/utils.o \
$(OBJDIR)/WelsThreadLib.o \
$(OBJDIR)/welsEncoderExt.o \
$(OBJDIR)/welsCodecTrace.o
ifeq ($(NASM), 1)
OBJENC += $(OBJDIR)/cpuid.o \
$(OBJDIR)/coeff.o \
$(OBJDIR)/dct.o \
$(OBJDIR)/deblock.o \
$(OBJDIR)/expand_picture.o \
$(OBJDIR)/intra_pred_util.o \
$(OBJDIR)/intra_pred.o \
$(OBJDIR)/mb_copy.o \
$(OBJDIR)/mc_chroma.o \
$(OBJDIR)/mc_luma.o \
$(OBJDIR)/memzero.o \
$(OBJDIR)/quant.o \
$(OBJDIR)/satd_sad.o \
$(OBJDIR)/score.o \
$(OBJDIR)/asm_inc.o \
$(OBJDIR)/vaa.o
endif
OBJBIN= $(OBJDIR)/read_config.o \
$(OBJDIR)/welsenc.o
BINLIB= $(BINDIR)/$(NAME).a
SHAREDLIB= $(BINDIR)/$(NAME).so
BIN= $(BINDIR)/$(NAME).exe
default: depend checkdir lib dylib exe release
dependencies:
@echo "" >dependencies
checkdir:
@echo 'checkdir..'
@if test ! -d $(OUTDIR) ; \
then \
mkdir -p $(OUTDIR) ; \
fi
@if test ! -d $(BINDIR) ; \
then \
mkdir -p $(BINDIR) ; \
fi
@if test ! -d $(OBJMAINDIR) ; \
then \
mkdir -p $(OBJMAINDIR) ; \
fi
@if test ! -d $(OBJDIR) ; \
then \
mkdir -p $(OBJDIR) ; \
fi
@echo
clean:
@echo remove all objects
@rm -f $(OBJENC)
@rm -f $(OBJBIN)
@rm -f $(BINLIB)
@rm -f $(SHAREDLIB)
@rm -f $(BIN)
tags:
@echo update tag table
@etags $(THREADLIBSRCDIR)/*.cpp $(COMMSRCDIR)/*.cpp $(CORESRCDIR)/*.cpp $(PLUSSRCDIR)/*.cpp $(MAINSRCDIR)/*.cpp
lib: $(OBJENC)
@echo '$(OBJENC)'
@echo
@echo 'ar cr $(BINLIB) $(OBJENC)'
@echo
@echo 'creating libraries "$(BINLIB)"'
@ar cr $(BINLIB) $(OBJENC)
@echo '... done'
#@echo 'cp $(BINLIB) /usr/lib'
#@cp $(BINLIB) /usr/lib
@echo
dylib: $(OBJDEC)
@echo '$(OBJENC)'
@echo
@echo '$(GCC) -shared -Wl,-Bsymbolic -m32 -o $(SHAREDLIB) $(OBJENC) $(LIBS)'
@echo 'creating dynamic library "$(SHAREDLIB)"'
@$(GCC) -shared -Wl,-Bsymbolic -m32 -o $(SHAREDLIB) $(OBJENC) $(LIBS)
@echo '... done'
@echo
release:
@echo 'release..'
@echo 'cp -f $(SHAREDLIB) $(OUTDIR)'
@cp -f $(SHAREDLIB) $(OUTDIR)
@echo 'cp -f $(BIN) $(OUTDIR)'
@cp -f $(BIN) $(OUTDIR)
@echo
exe: $(OBJBIN)
@echo
@echo '$(OBJBIN)'
@echo
@echo '$(GCC) $(LIBS) $(OBJBIN) $(BINLIB) -m32 -o $(BIN)'
@echo 'creating binary "$(BIN)"'
@$(GCC) $(OBJBIN) $(BINLIB) -m32 -o $(BIN) $(LIBS)
@echo '... done'
@echo
depend:
@echo
@echo 'checking dependencies'
@$(SHELL) -ec '$(CC) -m32 -MM $(CFLAGS) $(ENCODESRC) $(ASMSRC) $(MAINSRC)\
| sed '\''s@\(.*\)\.o[ :]@$(OBJDIR)/\1.o$(SUFFIX):@g'\'' \
>$(DEPEND)'
@echo
$(OBJDIR)/%.o$(SUFFIX): $(THREADLIBSRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(CORESRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(PLUSSRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(ASMSRCDIR)/%.asm
@echo 'compiling object file "$@" ...'
@$(AS) $(ASFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(MAINSRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o$(SUFFIX): $(MAINSRCDIR)/%.cpp
@echo 'compiling object file "$@" ...'
@$(CC) -m32 -c $(CFLAGS) -o $@ $<
include $(DEPEND)

View File

@ -0,0 +1,683 @@
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="WelsDecCore"
ProjectGUID="{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
<DefaultToolFile
FileName="masm.rules"
/>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Release"
IntermediateDirectory=".\..\..\..\obj\decoder\core\release"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\decoder\core\inc;..\..\..\common\inc;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;X86_ASM;HAVE_CACHE_LINE_ALIGN"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\..\..\..\obj\decoder\core\release/WelsDecCore.pch"
AssemblerListingLocation=".\..\..\..\obj\decoder\core\release/"
ObjectFile=".\..\..\..\obj\decoder\core\release/"
ProgramDataBaseFileName=".\..\..\..\obj\decoder\core\release/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\welsdcore.lib"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\..\..\..\..\bin\win32\Release/WelsDecCore.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Debug"
IntermediateDirectory=".\..\..\..\obj\decoder\core\debug"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\decoder\core\inc;..\..\..\common\inc;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;X86_ASM;HAVE_CACHE_LINE_ALIGN"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\..\..\..\obj\decoder\core\debug/WelsDecCore.pch"
AssemblerListingLocation=".\..\..\..\obj\decoder\core\debug/"
ObjectFile=".\..\..\..\obj\decoder\core\debug/"
ProgramDataBaseFileName=".\..\..\..\obj\decoder\core\debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\welsdcore.lib"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\..\..\..\..\bin\win32\Debug/WelsDecCore.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="SW"
>
<Filter
Name="asm"
Filter="*.asm;*.inc"
>
<File
RelativePath="..\..\..\decoder\core\asm\asm_inc.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\block_add.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\cpuid.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\dct.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\deblock.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\expand_picture.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\intra_pred.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\mb_copy.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\mc_chroma.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\mc_luma.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\core\asm\memzero.asm"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -O3 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName).obj"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\decoder\core\inc\as264_common.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\au_parser.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\bit_stream.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\cpu.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\cpu_core.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\deblocking.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\dec_frame.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\dec_golomb.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\decode_mb_aux.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\decode_slice.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\decoder.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\decoder_context.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\decoder_core.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\error_code.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\expand_pic.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\fmo.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\get_intra_predictor.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\ls_defines.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\macros.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\manage_dec_ref.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\mb_cache.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\mc.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\measure_time.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\mem_align.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\memmgr_nal_unit.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\mv_pred.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\nal_prefix.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\nalu.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\parameter_sets.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\parse_mb_syn_cavlc.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\pic_queue.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\picture.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\rec_mb.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\slice.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\typedefs.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\utils.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\vlc_decoder.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\wels_common_basis.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\wels_const.h"
>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\decoder\core\src\au_parser.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\bit_stream.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\cpu.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\deblocking.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\decode_mb_aux.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\decode_slice.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\decoder.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\decoder_core.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\decoder_data_tables.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\expand_pic.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\fmo.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\get_intra_predictor.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\manage_dec_ref.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\mc.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\mem_align.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\memmgr_nal_unit.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\mv_pred.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\parse_mb_syn_cavlc.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\pic_queue.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\rec_mb.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\utils.cpp"
>
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,268 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\obj\decoder\core\release\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\obj\decoder\core\debug\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">welsdcore</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">welsdcore</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\decoder\core\inc;..\..\..\common\inc;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\core\release/WelsDecCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\core\release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\core\release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\core\release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>
</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\welsdcore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\WelsDecCore.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\decoder\core\inc;..\..\..\common\inc;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;X86_ASM;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\core\debug/WelsDecCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\core\debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\core\debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\core\debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\welsdcore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\WelsDecCore.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\decoder\core\asm\asm_inc.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\block_add.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\cpuid.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\dct.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\deblock.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\expand_picture.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\intra_pred.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\mb_copy.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\mc_chroma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\mc_luma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\memzero.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\decoder\core\inc\as264_common.h" />
<ClInclude Include="..\..\..\decoder\core\inc\au_parser.h" />
<ClInclude Include="..\..\..\decoder\core\inc\bit_stream.h" />
<ClInclude Include="..\..\..\decoder\core\inc\cpu.h" />
<ClInclude Include="..\..\..\decoder\core\inc\cpu_core.h" />
<ClInclude Include="..\..\..\decoder\core\inc\deblocking.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decode_mb_aux.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decoder.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decoder_context.h" />
<ClInclude Include="..\..\..\decoder\core\inc\error_code.h" />
<ClInclude Include="..\..\..\decoder\core\inc\expand_pic.h" />
<ClInclude Include="..\..\..\decoder\core\inc\fmo.h" />
<ClInclude Include="..\..\..\decoder\core\inc\get_intra_predictor.h" />
<ClInclude Include="..\..\..\decoder\core\inc\ls_defines.h" />
<ClInclude Include="..\..\..\decoder\core\inc\macros.h" />
<ClInclude Include="..\..\..\decoder\core\inc\manage_dec_ref.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mb_cache.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mc.h" />
<ClInclude Include="..\..\..\decoder\core\inc\measure_time.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mem_align.h" />
<ClInclude Include="..\..\..\decoder\core\inc\memmgr_nal_unit.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mv_pred.h" />
<ClInclude Include="..\..\..\decoder\core\inc\nal_prefix.h" />
<ClInclude Include="..\..\..\decoder\core\inc\nalu.h" />
<ClInclude Include="..\..\..\decoder\core\inc\parameter_sets.h" />
<ClInclude Include="..\..\..\decoder\core\inc\parse_mb_syn_cavlc.h" />
<ClInclude Include="..\..\..\decoder\core\inc\pic_queue.h" />
<ClInclude Include="..\..\..\decoder\core\inc\picture.h" />
<ClInclude Include="..\..\..\decoder\core\inc\rec_mb.h" />
<ClInclude Include="..\..\..\decoder\core\inc\slice.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decode_slice.h" />
<ClInclude Include="..\..\..\decoder\core\inc\dec_frame.h" />
<ClInclude Include="..\..\..\decoder\core\inc\dec_golomb.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decoder_core.h" />
<ClInclude Include="..\..\..\decoder\core\inc\typedefs.h" />
<ClInclude Include="..\..\..\decoder\core\inc\utils.h" />
<ClInclude Include="..\..\..\decoder\core\inc\vlc_decoder.h" />
<ClInclude Include="..\..\..\decoder\core\inc\wels_common_basis.h" />
<ClInclude Include="..\..\..\decoder\core\inc\wels_const.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\decoder\core\src\au_parser.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\bit_stream.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\cpu.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\deblocking.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decode_mb_aux.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decoder.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decoder_data_tables.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\expand_pic.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\fmo.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\get_intra_predictor.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\manage_dec_ref.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\mc.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\mem_align.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\memmgr_nal_unit.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\mv_pred.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\parse_mb_syn_cavlc.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\pic_queue.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\rec_mb.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decode_slice.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decoder_core.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\utils.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>

View File

@ -0,0 +1,267 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir>.\..\..\..\obj\decoder\core\release\</IntDir>
<TargetName>welsdcore</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir>.\..\..\..\obj\decoder\core\debug\</IntDir>
<TargetName>welsdcore</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\decoder\core\inc;..\..\..\common\inc;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\core\release/WelsDecCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\core\release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\core\release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\core\release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat />
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\welsdcore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsdcore.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\decoder\core\inc;..\..\..\common\inc;..\..\..\api\svc;..\..\..\hwDecoder\core\inc;..\..\..\hwDecoder\dxva\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;X86_ASM;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\core\debug/WelsDecCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\core\debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\core\debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\core\debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\welsdcore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsdcore.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\decoder\core\asm\asm_inc.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\block_add.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\cpuid.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\dct.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\deblock.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\expand_picture.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\intra_pred.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\mb_copy.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\mc_chroma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\mc_luma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\decoder\core\asm\memzero.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\decoder\core\inc\as264_common.h" />
<ClInclude Include="..\..\..\decoder\core\inc\au_parser.h" />
<ClInclude Include="..\..\..\decoder\core\inc\bit_stream.h" />
<ClInclude Include="..\..\..\decoder\core\inc\cpu.h" />
<ClInclude Include="..\..\..\decoder\core\inc\cpu_core.h" />
<ClInclude Include="..\..\..\decoder\core\inc\deblocking.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decode_mb_aux.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decoder.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decoder_context.h" />
<ClInclude Include="..\..\..\decoder\core\inc\error_code.h" />
<ClInclude Include="..\..\..\decoder\core\inc\expand_pic.h" />
<ClInclude Include="..\..\..\decoder\core\inc\fmo.h" />
<ClInclude Include="..\..\..\decoder\core\inc\get_intra_predictor.h" />
<ClInclude Include="..\..\..\decoder\core\inc\ls_defines.h" />
<ClInclude Include="..\..\..\decoder\core\inc\macros.h" />
<ClInclude Include="..\..\..\decoder\core\inc\manage_dec_ref.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mb_cache.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mc.h" />
<ClInclude Include="..\..\..\decoder\core\inc\measure_time.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mem_align.h" />
<ClInclude Include="..\..\..\decoder\core\inc\memmgr_nal_unit.h" />
<ClInclude Include="..\..\..\decoder\core\inc\mv_pred.h" />
<ClInclude Include="..\..\..\decoder\core\inc\nal_prefix.h" />
<ClInclude Include="..\..\..\decoder\core\inc\nalu.h" />
<ClInclude Include="..\..\..\decoder\core\inc\parameter_sets.h" />
<ClInclude Include="..\..\..\decoder\core\inc\parse_mb_syn_cavlc.h" />
<ClInclude Include="..\..\..\decoder\core\inc\pic_queue.h" />
<ClInclude Include="..\..\..\decoder\core\inc\picture.h" />
<ClInclude Include="..\..\..\decoder\core\inc\rec_mb.h" />
<ClInclude Include="..\..\..\decoder\core\inc\slice.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decode_slice.h" />
<ClInclude Include="..\..\..\decoder\core\inc\dec_frame.h" />
<ClInclude Include="..\..\..\decoder\core\inc\dec_golomb.h" />
<ClInclude Include="..\..\..\decoder\core\inc\decoder_core.h" />
<ClInclude Include="..\..\..\decoder\core\inc\typedefs.h" />
<ClInclude Include="..\..\..\decoder\core\inc\utils.h" />
<ClInclude Include="..\..\..\decoder\core\inc\vlc_decoder.h" />
<ClInclude Include="..\..\..\decoder\core\inc\wels_common_basis.h" />
<ClInclude Include="..\..\..\decoder\core\inc\wels_const.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\decoder\core\src\au_parser.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\bit_stream.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\cpu.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\deblocking.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decode_mb_aux.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decoder.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decoder_data_tables.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\expand_pic.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\fmo.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\get_intra_predictor.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\manage_dec_ref.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\mc.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\mem_align.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\memmgr_nal_unit.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\mv_pred.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\parse_mb_syn_cavlc.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\pic_queue.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\rec_mb.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decode_slice.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\decoder_core.cpp" />
<ClCompile Include="..\..\..\decoder\core\src\utils.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>

View File

@ -0,0 +1,323 @@
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="WelsDecPlus"
ProjectGUID="{1131558A-9986-4F4B-A13F-8B7F4C8438BF}"
RootNamespace="WelsDecPlus"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Release"
IntermediateDirectory=".\..\..\..\obj\decoder\plus\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\..\..\bin\win32\Release/WelsDecPlus.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\..\..\..\obj\decoder\plus\Release/WelsDecPlus.pch"
AssemblerListingLocation=".\..\..\..\obj\decoder\plus\Release/"
ObjectFile=".\..\..\..\obj\decoder\plus\Release/"
ProgramDataBaseFileName=".\..\..\..\obj\decoder\plus\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=".\..\..\..\..\bin\win32\Release\welsdcore.lib"
OutputFile="$(OutDir)\welsdec.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=".\..\..\..\libs\Release\"
ModuleDefinitionFile="..\..\..\decoder\plus\src\wels_dec_export.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\..\..\..\maps\Release\welsdec.pdb"
GenerateMapFile="true"
MapFileName=".\..\..\..\maps\Release\welsdec.map"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
ImportLibrary="$(OutDir)\welsdec.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\..\..\..\..\bin\win32\Release/WelsDecPlus.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Debug"
IntermediateDirectory=".\..\..\..\obj\decoder\plus\debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\..\..\bin\win32\Debug/WelsDecPlus.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\..\..\..\obj\decoder\plus\debug/WelsDecPlus.pch"
AssemblerListingLocation=".\..\..\..\obj\decoder\plus\debug/"
ObjectFile=".\..\..\..\obj\decoder\plus\debug/"
ProgramDataBaseFileName=".\..\..\..\obj\decoder\plus\debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=".\..\..\..\..\bin\win32\Debug\welsdcore.lib"
OutputFile="$(OutDir)\welsdec.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\libs\debug"
ModuleDefinitionFile="..\..\..\decoder\plus\src\wels_dec_export.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\..\..\..\..\bin\win32\Debug/welsdec.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
ImportLibrary="$(OutDir)\welsdec.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\..\..\..\..\bin\win32\Debug/WelsDecPlus.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="SW"
>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="..\..\..\decoder\plus\res\welsdec.rc"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\SVN_project_https\trunk\codec\Wels\project\decoder\plus\res"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\SVN_project_https\trunk\codec\Wels\project\decoder\plus\res"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\decoder\plus\src\wels_dec_export.def"
>
</File>
<File
RelativePath="..\..\..\decoder\plus\src\welsCodecTrace.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\decoder\plus\src\welsDecoderExt.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\decoder\core\inc\mem_align.h"
>
</File>
<File
RelativePath="..\..\..\decoder\plus\inc\welsCodecTrace.h"
>
</File>
<File
RelativePath="..\..\..\decoder\plus\inc\welsDecoderExt.h"
>
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1131558A-9986-4F4B-A13F-8B7F4C8438BF}</ProjectGuid>
<RootNamespace>WelsDecPlus</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\obj\decoder\plus\Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\obj\decoder\plus\debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">welsdec</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">welsdec</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Release/WelsDecPlus.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\plus\Release/WelsDecPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\plus\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\plus\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\plus\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>$(OutDir)\welsdcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsdec.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\..\libs\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\decoder\plus\src\wels_dec_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsdec.pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(OutDir)\welsdec.map</MapFileName>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsdec.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\WelsDecPlus.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Debug/WelsDecPlus.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\plus\debug/WelsDecPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\plus\debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\plus\debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\plus\debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>$(OutDir)\welsdcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsdec.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\libs\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\decoder\plus\src\wels_dec_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsdec.pdb</ProgramDatabaseFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsdec.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\WelsDecPlus.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\decoder\plus\res\welsdec.rc">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\SVN_project_https\trunk\codec\Wels\project\decoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\SVN_project_https\trunk\codec\Wels\project\decoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\decoder\plus\src\welsCodecTrace.cpp" />
<ClCompile Include="..\..\..\decoder\plus\src\welsDecoderExt.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\decoder\plus\src\wels_dec_export.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\decoder\core\inc\mem_align.h" />
<ClInclude Include="..\..\..\decoder\plus\inc\welsCodecTrace.h" />
<ClInclude Include="..\..\..\decoder\plus\inc\welsDecoderExt.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,182 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1131558A-9986-4F4B-A13F-8B7F4C8438BF}</ProjectGuid>
<RootNamespace>WelsDecPlus</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir>.\..\..\..\obj\decoder\plus\Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>welsdec</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir>.\..\..\..\obj\decoder\plus\debug\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>welsdec</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Release/WelsDecPlus.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\plus\Release/WelsDecPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\plus\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\plus\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\plus\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>.\..\..\..\..\bin\win32\Release\welsdcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsdec.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\..\libs\Release\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\decoder\plus\src\wels_dec_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsdec.pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(OutDir)\welsdec.map</MapFileName>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsdec.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ProfileGuidedDatabase>$(OutDir)\welsdec.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsdec.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Debug/WelsDecPlus.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\decoder\plus\inc;..\..\..\decoder\core\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\hwDecoder\plus\inc;..\..\..\hwDecoder\core\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSDECPLUS_EXPORTS;HAVE_CACHE_LINE_ALIGN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decoder\plus\debug/WelsDecPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decoder\plus\debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decoder\plus\debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decoder\plus\debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>.\..\..\..\..\bin\win32\Debug\welsdcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsdec.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\libs\debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\decoder\plus\src\wels_dec_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsdec.pdb</ProgramDatabaseFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsdec.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<MapFileName>$(OutDir)\welsdec.map</MapFileName>
<ProfileGuidedDatabase>$(OutDir)\welsdec.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsdec.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\decoder\plus\res\welsdec.rc">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\SVN_project_https\trunk\codec\Wels\project\decoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\SVN_project_https\trunk\codec\Wels\project\decoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\decoder\plus\src\welsCodecTrace.cpp" />
<ClCompile Include="..\..\..\decoder\plus\src\welsDecoderExt.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\decoder\plus\src\wels_dec_export.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\decoder\core\inc\mem_align.h" />
<ClInclude Include="..\..\..\decoder\plus\inc\welsCodecTrace.h" />
<ClInclude Include="..\..\..\decoder\plus\inc\welsDecoderExt.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="WelsDecCore.vcxproj">
<Project>{01b4ae41-6ad6-4caf-aeb3-c42f7f9121d5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsDecCore", "WelsDecCore.vcproj", "{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsDecPlus", "WelsDecPlus.vcproj", "{1131558A-9986-4F4B-A13F-8B7F4C8438BF}"
ProjectSection(ProjectDependencies) = postProject
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5} = {01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "decConsole", "decConsole.vcproj", "{71973A8E-103D-4FB7-951F-55E35E7F60FA}"
ProjectSection(ProjectDependencies) = postProject
{1131558A-9986-4F4B-A13F-8B7F4C8438BF} = {1131558A-9986-4F4B-A13F-8B7F4C8438BF}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Debug|Win32.ActiveCfg = Debug|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Debug|Win32.Build.0 = Debug|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Release|Win32.ActiveCfg = Release|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Release|Win32.Build.0 = Release|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Debug|Win32.ActiveCfg = Debug|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Debug|Win32.Build.0 = Debug|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Release|Win32.ActiveCfg = Release|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Release|Win32.Build.0 = Release|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Debug|Win32.ActiveCfg = Debug|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Debug|Win32.Build.0 = Debug|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Release|Win32.ActiveCfg = Release|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "decConsole_2010", "decConsole_2010.vcxproj", "{71973A8E-103D-4FB7-951F-55E35E7F60FA}"
ProjectSection(ProjectDependencies) = postProject
{1131558A-9986-4F4B-A13F-8B7F4C8438BF} = {1131558A-9986-4F4B-A13F-8B7F4C8438BF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsDecPlus_2010", "WelsDecPlus_2010.vcxproj", "{1131558A-9986-4F4B-A13F-8B7F4C8438BF}"
ProjectSection(ProjectDependencies) = postProject
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5} = {01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsDecCore_2010", "WelsDecCore_2010.vcxproj", "{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Debug|Win32.ActiveCfg = Debug|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Debug|Win32.Build.0 = Debug|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Release|Win32.ActiveCfg = Release|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Release|Win32.Build.0 = Release|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Debug|Win32.ActiveCfg = Debug|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Debug|Win32.Build.0 = Debug|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Release|Win32.ActiveCfg = Release|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Release|Win32.Build.0 = Release|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Debug|Win32.ActiveCfg = Debug|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Debug|Win32.Build.0 = Debug|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Release|Win32.ActiveCfg = Release|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsDecCore_2012", "WelsDecCore_2012.vcxproj", "{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsDecPlus_2012", "WelsDecPlus_2012.vcxproj", "{1131558A-9986-4F4B-A13F-8B7F4C8438BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "decConsole_2012", "decConsole_2012.vcxproj", "{71973A8E-103D-4FB7-951F-55E35E7F60FA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Debug|Win32.ActiveCfg = Debug|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Debug|Win32.Build.0 = Debug|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Release|Win32.ActiveCfg = Release|Win32
{01B4AE41-6AD6-4CAF-AEB3-C42F7F9121D5}.Release|Win32.Build.0 = Release|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Debug|Win32.ActiveCfg = Debug|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Debug|Win32.Build.0 = Debug|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Release|Win32.ActiveCfg = Release|Win32
{1131558A-9986-4F4B-A13F-8B7F4C8438BF}.Release|Win32.Build.0 = Release|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Debug|Win32.ActiveCfg = Debug|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Debug|Win32.Build.0 = Debug|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Release|Win32.ActiveCfg = Release|Win32
{71973A8E-103D-4FB7-951F-55E35E7F60FA}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,282 @@
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="decConsole"
ProjectGUID="{71973A8E-103D-4FB7-951F-55E35E7F60FA}"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Release"
IntermediateDirectory=".\..\..\..\obj\decConsole\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\..\..\..\..\bin\win32\Release/decConsole.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\console\dec\inc,..\..\..\api\svc,..\..\..\common\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\..\..\..\obj\decConsole\Release/decConsole.pch"
AssemblerListingLocation=".\..\..\..\obj\decConsole\Release/"
ObjectFile=".\..\..\..\obj\decConsole\Release/"
ProgramDataBaseFileName=".\..\..\..\obj\decConsole\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="2052"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\decConsole.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\bin\win32"
ProgramDatabaseFile="$(OutDir)\decConsole.pdb"
GenerateMapFile="false"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\decConsole.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Debug"
IntermediateDirectory=".\..\..\..\obj\decConsole\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\..\..\..\..\bin\win32\Debug/decConsole.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\console\dec\inc,..\..\..\api\svc,..\..\..\common\inc"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\..\..\..\obj\decConsole\Debug/decConsole.pch"
AssemblerListingLocation=".\..\..\..\obj\decConsole\Debug/"
ObjectFile=".\..\..\..\obj\decConsole\Debug/"
ProgramDataBaseFileName=".\..\..\..\obj\decConsole\Debug/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="2052"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\decConsoled.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\bin\win32"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\decConsoled.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\decConsole.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\console\dec\src\d3d9_utils.cpp"
>
</File>
<File
RelativePath="..\..\..\console\dec\src\h264dec.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\console\dec\src\read_config.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\console\dec\inc\d3d9_utils.h"
>
</File>
<File
RelativePath="..\..\..\console\dec\inc\read_config.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
<File
RelativePath="..\..\..\..\bin\win32\Release\welsdec.cfg"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{71973A8E-103D-4FB7-951F-55E35E7F60FA}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\obj\decConsole\Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\obj\decConsole\Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">decConsole</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">decConsole</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\bin\Release/decConsole.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\api\svc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decConsole\Release/decConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decConsole\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decConsole\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decConsole\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0804</Culture>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\decConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)\decConsole.pdb</ProgramDatabaseFile>
<GenerateMapFile>false</GenerateMapFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;.\..\..\..\..\bin\win32\Release\welsdec.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\decConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\bin\Debug/decConsole.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\api\svc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decConsole\Debug/decConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decConsole\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decConsole\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decConsole\Debug/</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0804</Culture>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\decConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\decConsoled.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;.\..\..\..\..\bin\win32\debug\welsdec.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\decConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\console\dec\src\d3d9_utils.cpp" />
<ClCompile Include="..\..\..\console\dec\src\h264dec.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\console\dec\src\read_config.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\console\dec\inc\d3d9_utils.h" />
<ClInclude Include="..\..\..\console\dec\inc\read_config.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\bin\Release\welsdec.cfg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="WelsDecPlus.vcxproj">
<Project>{1131558a-9986-4f4b-a13f-8b7f4c8438bf}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{71973A8E-103D-4FB7-951F-55E35E7F60FA}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir>.\..\..\..\obj\decConsole\Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>decConsole</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir>.\..\..\..\obj\decConsole\Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>decConsole</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\bin\Release/decConsole.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\api\svc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decConsole\Release/decConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decConsole\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decConsole\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decConsole\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0804</Culture>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\decConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)\decConsole.pdb</ProgramDatabaseFile>
<GenerateMapFile>false</GenerateMapFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(OutDir)welsdec.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ProfileGuidedDatabase>$(OutDir)\decConsole.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\decConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\bin\Debug/decConsole.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\api\svc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\decConsole\Debug/decConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\decConsole\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\decConsole\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\decConsole\Debug/</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0804</Culture>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\decConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\decConsole.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(OutDir)welsdec.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MapFileName>$(OutDir)\decConsole.map</MapFileName>
<ProfileGuidedDatabase>$(OutDir)\decConsole.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\decConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\console\dec\src\d3d9_utils.cpp" />
<ClCompile Include="..\..\..\console\dec\src\h264dec.cpp" />
<ClCompile Include="..\..\..\console\dec\src\read_config.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\console\dec\inc\d3d9_utils.h" />
<ClInclude Include="..\..\..\console\dec\inc\read_config.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\bin\Release\welsdec.cfg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="WelsDecPlus.vcxproj">
<Project>{1131558a-9986-4f4b-a13f-8b7f4c8438bf}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,485 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{59208004-1774-4816-AC24-31FF44C324B4}</ProjectGuid>
<RootNamespace>WelsEncCore</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\..\bin\win32\Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\obj\encoder\core\Debug\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\..\bin\win32\Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\obj\encoder\core\Release\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">welsecore</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">welsecore</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WELS_SVC;ENCODER_CORE;X86_ASM;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\core\Debug/WelsEncCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\core\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\core\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\core\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>..\..\..\..\libs\welsecore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\..\..\..\..\bin\Debug/WelsEncCore.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>IF EXIST "$(SolutionDir)..\..\bin\$(Configuration)" copy $(SolutionDir)..\..\bin\$(Configuration)\*.* $(SolutionDir)\..\..\..\..\..\bin\$(Configuration)\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WELS_SVC;ENCODER_CORE;X86_ASM;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\core\Release/WelsEncCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\core\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\core\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\core\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<OutputFile>..\..\..\..\libs\welsecore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\..\..\..\..\bin\Release/WelsEncCore.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>IF EXIST "$(SolutionDir)..\..\bin\$(Configuration)" copy $(SolutionDir)..\..\bin\$(Configuration)\*.* $(SolutionDir)\..\..\..\..\..\bin\$(Configuration)\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\encoder\core\src\au_set.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\cpu.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\deblocking.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\decode_mb_aux.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\encode_mb_aux.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\encoder.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">OUPUT_REF_PIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\encoder_data_tables.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\encoder_ext.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\expand_pic.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\get_intra_predictor.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\mc.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\md.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\memory_align.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\mv_pred.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\nal_encap.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\picture_handle.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\property.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\ratectl.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\ref_list_mgr_svc.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\sample.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\set_mb_syn_cavlc.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\slice_multi_threading.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_base_layer_md.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\svc_enc_slice_segment.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\svc_encode_mb.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\svc_encode_slice.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\svc_mode_decision.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\svc_motion_estimate.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\svc_set_mb_syn_cavlc.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\utils.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\WelsThreadLib\src\WelsThreadLib.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\wels_preprocess.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\encoder\core\inc\array_stack_align.h" />
<ClInclude Include="..\..\..\encoder\core\inc\as264_common.h" />
<ClInclude Include="..\..\..\encoder\core\inc\au_set.h" />
<ClInclude Include="..\..\..\encoder\core\inc\bit_stream.h" />
<ClInclude Include="..\..\..\encoder\core\inc\cpu.h" />
<ClInclude Include="..\..\..\encoder\core\inc\cpu_core.h" />
<ClInclude Include="..\..\..\encoder\core\inc\deblocking.h" />
<ClInclude Include="..\..\..\encoder\core\inc\decode_mb_aux.h" />
<ClInclude Include="..\..\..\encoder\core\inc\dq_map.h" />
<ClInclude Include="..\..\..\encoder\core\inc\encode_mb_aux.h" />
<ClInclude Include="..\..\..\encoder\core\inc\encoder.h" />
<ClInclude Include="..\..\..\encoder\core\inc\encoder_context.h" />
<ClInclude Include="..\..\..\encoder\core\inc\expand_pic.h" />
<ClInclude Include="..\..\..\encoder\core\inc\extern.h" />
<ClInclude Include="..\..\..\encoder\core\inc\get_intra_predictor.h" />
<ClInclude Include="..\..\..\encoder\core\inc\ls_defines.h" />
<ClInclude Include="..\..\..\encoder\core\inc\macros.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mb_cache.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\md.h" />
<ClInclude Include="..\..\..\encoder\core\inc\measure_time.h" />
<ClInclude Include="..\..\..\encoder\core\inc\memory_align.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mgs_layer_encode.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mt_defs.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mv_pred.h" />
<ClInclude Include="..\..\..\encoder\core\inc\nal_encap.h" />
<ClInclude Include="..\..\..\encoder\core\inc\nal_prefix.h" />
<ClInclude Include="..\..\..\encoder\core\inc\param_svc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\parameter_sets.h" />
<ClInclude Include="..\..\..\encoder\core\inc\picture.h" />
<ClInclude Include="..\..\..\encoder\core\inc\picture_handle.h" />
<ClInclude Include="..\..\..\encoder\core\inc\property.h" />
<ClInclude Include="..\..\..\encoder\core\inc\rc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\ref_list_mgr_svc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\sample.h" />
<ClInclude Include="..\..\..\encoder\core\inc\set_mb_syn_cavlc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\slice.h" />
<ClInclude Include="..\..\..\encoder\core\inc\slice_multi_threading.h" />
<ClInclude Include="..\..\..\encoder\core\inc\stat.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_base_layer_md.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_frame.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_golomb.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_macroblock.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_slice_segment.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_encode_mb.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_encode_slice.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_mode_decision.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_motion_estimate.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_set_mb_syn_cavlc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\trace.h" />
<ClInclude Include="..\..\..\encoder\core\inc\typedefs.h" />
<ClInclude Include="..\..\..\encoder\core\inc\utils.h" />
<ClInclude Include="..\..\..\encoder\core\inc\vlc_encoder.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_common_basis.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_const.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_func_ptr_def.h" />
<ClInclude Include="..\..\..\WelsThreadLib\api\WelsThreadLib.h" />
<ClInclude Include="..\..\..\encoder\core\inc\IWelsVP.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_preprocess.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\encoder\core\asm\asm_inc.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\coeff.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\cpuid.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\dct.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\deblock.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\expand_picture.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\intra_pred.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\intra_pred_util.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\mb_copy.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\mc_chroma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\mc_luma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\memzero.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\quant.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\satd_sad.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\score.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\vaa.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>

View File

@ -0,0 +1,352 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{59208004-1774-4816-AC24-31FF44C324B4}</ProjectGuid>
<RootNamespace>WelsEncCore</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir>.\..\..\..\obj\encoder\core\Debug\</IntDir>
<TargetName>welsecore</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir>.\..\..\..\obj\encoder\core\Release\</IntDir>
<TargetName>welsecore</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WELS_SVC;ENCODER_CORE;X86_ASM;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\core\Debug/WelsEncCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\core\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\core\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\core\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)\welsecore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsecore.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>IF EXIST "$(SolutionDir)..\..\bin\$(Configuration)" copy $(SolutionDir)..\..\bin\$(Configuration)\*.* $(SolutionDir)\..\..\..\..\..\bin\$(Configuration)\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WELS_SVC;ENCODER_CORE;X86_ASM;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\core\Release/WelsEncCore.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\core\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\core\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\core\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)\welsecore.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsecore.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>IF EXIST "$(SolutionDir)..\..\bin\$(Configuration)" copy $(SolutionDir)..\..\bin\$(Configuration)\*.* $(SolutionDir)\..\..\..\..\..\bin\$(Configuration)\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\encoder\core\src\au_set.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\cpu.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\deblocking.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\decode_mb_aux.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\encode_mb_aux.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\encoder.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">OUPUT_REF_PIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\core\src\encoder_data_tables.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\encoder_ext.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\expand_pic.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\get_intra_predictor.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\mc.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\md.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\memory_align.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\mv_pred.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\nal_encap.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\picture_handle.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\property.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\ratectl.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\ref_list_mgr_svc.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\sample.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\set_mb_syn_cavlc.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\slice_multi_threading.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_base_layer_md.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_enc_slice_segment.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_encode_mb.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_encode_slice.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_mode_decision.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_motion_estimate.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\svc_set_mb_syn_cavlc.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\utils.cpp" />
<ClCompile Include="..\..\..\WelsThreadLib\src\WelsThreadLib.cpp" />
<ClCompile Include="..\..\..\encoder\core\src\wels_preprocess.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\encoder\core\inc\array_stack_align.h" />
<ClInclude Include="..\..\..\encoder\core\inc\as264_common.h" />
<ClInclude Include="..\..\..\encoder\core\inc\au_set.h" />
<ClInclude Include="..\..\..\encoder\core\inc\bit_stream.h" />
<ClInclude Include="..\..\..\encoder\core\inc\cpu.h" />
<ClInclude Include="..\..\..\encoder\core\inc\cpu_core.h" />
<ClInclude Include="..\..\..\encoder\core\inc\deblocking.h" />
<ClInclude Include="..\..\..\encoder\core\inc\decode_mb_aux.h" />
<ClInclude Include="..\..\..\encoder\core\inc\dq_map.h" />
<ClInclude Include="..\..\..\encoder\core\inc\encode_mb_aux.h" />
<ClInclude Include="..\..\..\encoder\core\inc\encoder.h" />
<ClInclude Include="..\..\..\encoder\core\inc\encoder_context.h" />
<ClInclude Include="..\..\..\encoder\core\inc\expand_pic.h" />
<ClInclude Include="..\..\..\encoder\core\inc\extern.h" />
<ClInclude Include="..\..\..\encoder\core\inc\get_intra_predictor.h" />
<ClInclude Include="..\..\..\encoder\core\inc\ls_defines.h" />
<ClInclude Include="..\..\..\encoder\core\inc\macros.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mb_cache.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\md.h" />
<ClInclude Include="..\..\..\encoder\core\inc\measure_time.h" />
<ClInclude Include="..\..\..\encoder\core\inc\memory_align.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mgs_layer_encode.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mt_defs.h" />
<ClInclude Include="..\..\..\encoder\core\inc\mv_pred.h" />
<ClInclude Include="..\..\..\encoder\core\inc\nal_encap.h" />
<ClInclude Include="..\..\..\encoder\core\inc\nal_prefix.h" />
<ClInclude Include="..\..\..\encoder\core\inc\param_svc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\parameter_sets.h" />
<ClInclude Include="..\..\..\encoder\core\inc\picture.h" />
<ClInclude Include="..\..\..\encoder\core\inc\picture_handle.h" />
<ClInclude Include="..\..\..\encoder\core\inc\property.h" />
<ClInclude Include="..\..\..\encoder\core\inc\rc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\ref_list_mgr_svc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\sample.h" />
<ClInclude Include="..\..\..\encoder\core\inc\set_mb_syn_cavlc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\slice.h" />
<ClInclude Include="..\..\..\encoder\core\inc\slice_multi_threading.h" />
<ClInclude Include="..\..\..\encoder\core\inc\stat.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_base_layer_md.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_frame.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_golomb.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_macroblock.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_enc_slice_segment.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_encode_mb.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_encode_slice.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_mode_decision.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_motion_estimate.h" />
<ClInclude Include="..\..\..\encoder\core\inc\svc_set_mb_syn_cavlc.h" />
<ClInclude Include="..\..\..\encoder\core\inc\trace.h" />
<ClInclude Include="..\..\..\encoder\core\inc\typedefs.h" />
<ClInclude Include="..\..\..\encoder\core\inc\utils.h" />
<ClInclude Include="..\..\..\encoder\core\inc\vlc_encoder.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_common_basis.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_const.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_func_ptr_def.h" />
<ClInclude Include="..\..\..\WelsThreadLib\api\WelsThreadLib.h" />
<ClInclude Include="..\..\..\encoder\core\inc\IWelsVP.h" />
<ClInclude Include="..\..\..\encoder\core\inc\wels_preprocess.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\encoder\core\asm\asm_inc.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\coeff.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\cpuid.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\dct.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\deblock.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\expand_picture.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\intra_pred.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\intra_pred_util.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\mb_copy.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\mc_chroma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\mc_luma.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\memzero.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\quant.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\satd_sad.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\score.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\encoder\core\asm\vaa.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nasm -I%(RootDir)%(Directory) -f win32 -O3 -DPREFIX -o $(IntDir)%(Filename).obj %(FullPath)
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>

View File

@ -0,0 +1,139 @@
# Microsoft Developer Studio Project File - Name="WelsEncPlus" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=WelsEncPlus - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "WelsEncPlus.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "WelsEncPlus.mak" CFG="WelsEncPlus - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "WelsEncPlus - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "WelsEncPlus - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=xicl6.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "WelsEncPlus - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\..\..\bin\Release"
# PROP Intermediate_Dir "..\..\..\obj\encoder\plus\Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WELSENCPLUS_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Zd /O2 /I "..\..\..\encoder\plus\inc" /I "..\..\..\encoder\core\inc" /I "..\..\..\api\svc" /I "..\..\..\WelsThreadLib\api" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WELSENCPLUS_EXPORTS" /D "ENCODER_CORE" /D "HAVE_CACHE_LINE_ALIGN" /FD /c
# SUBTRACT CPP /X /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x804 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib welsecore.lib /nologo /dll /map:"..\..\..\..\..\maps\Release/welsenc.map" /machine:I386 /out:"..\..\..\..\..\bin\Release\welsenc.dll" /libpath:"..\..\..\..\..\bin\Release" /MAPINFO:lines /MAPINFO:exports
# SUBTRACT LINK32 /pdb:none /debug
!ELSEIF "$(CFG)" == "WelsEncPlus - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\..\..\bin\Debug"
# PROP Intermediate_Dir "..\..\..\obj\encoder\plus\Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WELSENCPLUS_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\encoder\plus\inc" /I "..\..\..\encoder\core\inc" /I "..\..\..\api\svc" /I "..\..\..\WelsThreadLib\api" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WELSENCPLUS_EXPORTS" /D "ENCODER_CORE" /D "HAVE_MMX" /D "HAVE_CACHE_LINE_ALIGN" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x804 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\..\..\bin\Debug\welsenc.dll" /pdbtype:sept
# SUBTRACT LINK32 /nodefaultlib
!ENDIF
# Begin Target
# Name "WelsEncPlus - Win32 Release"
# Name "WelsEncPlus - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\..\encoder\plus\src\DllEntry.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\encoder\plus\src\welsEncoderExt.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\encoder\plus\src\welsCodecTrace.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\encoder\plus\src\wels_enc_export.def
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\..\common\inc\mem_align.h
# End Source File
# Begin Source File
SOURCE=..\..\..\encoder\plus\inc\welsEncoderExt.h
# End Source File
# Begin Source File
SOURCE=..\..\..\encoder\plus\inc\welsCodecTrace.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=..\..\..\encoder\plus\res\welsenc.rc
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,344 @@
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="WelsEncPlus"
ProjectGUID="{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}"
RootNamespace="WelsEncPlus"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Debug"
IntermediateDirectory=".\..\..\..\obj\encoder\plus\Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\..\..\bin\Debug/WelsEncPlus.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\encoder\plus\inc;..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSENCPLUS_EXPORTS;ENCODER_CORE;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\..\..\..\obj\encoder\plus\Debug/WelsEncPlus.pch"
AssemblerListingLocation=".\..\..\..\obj\encoder\plus\Debug/"
ObjectFile=".\..\..\..\obj\encoder\plus\Debug/"
ProgramDataBaseFileName=".\..\..\..\obj\encoder\plus\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\welsecore.lib"
OutputFile="$(OutDir)\welsenc.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\libs"
ModuleDefinitionFile="..\..\..\encoder\plus\src\wels_enc_export.def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\welsenc.pdb"
GenerateMapFile="true"
MapFileName="$(OutDir)\welsenc.map"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
ImportLibrary="$(OutDir)\welsenc.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)/WelsEncPlus.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Release"
IntermediateDirectory=".\..\..\..\obj\encoder\plus\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\..\..\..\..\..\bin\Release/WelsEncPlus.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
FavorSizeOrSpeed="1"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\..\..\encoder\plus\inc;..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSENCPLUS_EXPORTS;ENCODER_CORE;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\..\..\..\obj\encoder\plus\Release/WelsEncPlus.pch"
AssemblerListingLocation=".\..\..\..\obj\encoder\plus\Release/"
ObjectFile=".\..\..\..\obj\encoder\plus\Release/"
ProgramDataBaseFileName=".\..\..\..\obj\encoder\plus\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MAPINFO:exports /LTCG"
AdditionalDependencies="$(OutDir)\welsecore.lib"
OutputFile="$(OutDir)\welsenc.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\libs"
ModuleDefinitionFile="..\..\..\encoder\plus\src\wels_enc_export.def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\welsenc.pdb"
GenerateMapFile="false"
MapFileName=""
MapExports="false"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
ImportLibrary="$(OutDir)\welsenc.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)/WelsEncPlus.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\encoder\plus\src\DllEntry.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\encoder\plus\src\wels_enc_export.def"
>
</File>
<File
RelativePath="..\..\..\encoder\plus\src\welsCodecTrace.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\encoder\plus\src\welsEncoderExt.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\encoder\plus\inc\welsCodecTrace.h"
>
</File>
<File
RelativePath="..\..\..\encoder\plus\inc\welsEncoderExt.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="..\..\..\encoder\plus\res\welsenc.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\Project\svc_perf_opt_b\codec\Wels\project\encoder\plus\res"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\Project\svc_perf_opt_b\codec\Wels\project\encoder\plus\res"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}</ProjectGuid>
<RootNamespace>WelsEncPlus</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\obj\encoder\plus\Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\obj\encoder\plus\Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">welsenc</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">welsenc</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Debug/WelsEncPlus.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\encoder\plus\inc;..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSENCPLUS_EXPORTS;ENCODER_CORE;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\plus\Debug/WelsEncPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\plus\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\plus\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\plus\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>welsecore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsenc.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\encoder\plus\src\wels_enc_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsenc.pdb</ProgramDatabaseFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsenc.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\..\..\..\..\bin\Debug/WelsEncPlus.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Release/WelsEncPlus.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\..\..\encoder\plus\inc;..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSENCPLUS_EXPORTS;ENCODER_CORE;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\plus\Release/WelsEncPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\plus\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\plus\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\plus\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalOptions>/MAPINFO:exports /LTCG %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>welsecore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsenc.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\encoder\plus\src\wels_enc_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsenc.pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(OutDir)\welsenc.map</MapFileName>
<MapExports>true</MapExports>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsenc.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\..\..\..\..\bin\Release/WelsEncPlus.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\encoder\plus\src\DllEntry.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\encoder\plus\src\welsCodecTrace.cpp" />
<ClCompile Include="..\..\..\encoder\plus\src\welsEncoderExt.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\encoder\plus\src\wels_enc_export.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\common\inc\mem_align.h" />
<ClInclude Include="..\..\..\encoder\plus\inc\welsCodecTrace.h" />
<ClInclude Include="..\..\..\encoder\plus\inc\welsEncoderExt.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\encoder\plus\res\welsenc.rc">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\Project\svc_perf_opt_b\codec\Wels\project\encoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\Project\svc_perf_opt_b\codec\Wels\project\encoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="WelsEncCore.vcxproj">
<Project>{59208004-1774-4816-ac24-31ff44c324b4}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}</ProjectGuid>
<RootNamespace>WelsEncPlus</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir>.\..\..\..\obj\encoder\plus\Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>welsenc</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir>.\..\..\..\obj\encoder\plus\Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>welsenc</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Debug/WelsEncPlus.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\encoder\plus\inc;..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WELSENCPLUS_EXPORTS;ENCODER_CORE;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\plus\Debug/WelsEncPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\plus\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\plus\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\plus\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>$(OutDir)\welsecore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsenc.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\encoder\plus\src\wels_enc_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsenc.pdb</ProgramDatabaseFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsenc.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ProfileGuidedDatabase>$(OutDir)\welsenc.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsenc.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\..\..\..\..\..\bin\Release/WelsEncPlus.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\..\..\encoder\plus\inc;..\..\..\encoder\core\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WELSENCPLUS_EXPORTS;ENCODER_CORE;HAVE_CACHE_LINE_ALIGN;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encoder\plus\Release/WelsEncPlus.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encoder\plus\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encoder\plus\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encoder\plus\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalOptions>/MAPINFO:exports /LTCG %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>$(OutDir)\welsecore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)\welsenc.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\..\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>..\..\..\encoder\plus\src\wels_enc_export.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\welsenc.pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(OutDir)\welsenc.map</MapFileName>
<MapExports>true</MapExports>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<ImportLibrary>$(OutDir)\welsenc.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ProfileGuidedDatabase>$(OutDir)\welsenc.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\welsenc.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\encoder\plus\src\DllEntry.cpp" />
<ClCompile Include="..\..\..\encoder\plus\src\welsCodecTrace.cpp" />
<ClCompile Include="..\..\..\encoder\plus\src\welsEncoderExt.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\encoder\plus\src\wels_enc_export.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\common\inc\mem_align.h" />
<ClInclude Include="..\..\..\encoder\plus\inc\welsEncoderExt.h" />
<ClInclude Include="..\..\..\encoder\plus\inc\welsCodecTrace.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\encoder\plus\res\welsenc.rc">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\Project\svc_perf_opt_b\codec\Wels\project\encoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\Project\svc_perf_opt_b\codec\Wels\project\encoder\plus\res;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,59 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "WelsEncCore"=.\WelsEncCore.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "WelsEncPlus"=.\WelsEncPlus.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name WelsEncCore
End Project Dependency
}}}
###############################################################################
Project: "encConsole"=.\encConsole.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name WelsEncPlus
End Project Dependency
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -0,0 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsEncCore", "WelsEncCore.vcproj", "{59208004-1774-4816-AC24-31FF44C324B4}"
ProjectSection(ProjectDependencies) = postProject
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562} = {E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsEncPlus", "WelsEncPlus.vcproj", "{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}"
ProjectSection(ProjectDependencies) = postProject
{59208004-1774-4816-AC24-31FF44C324B4} = {59208004-1774-4816-AC24-31FF44C324B4}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encConsole", "encConsole.vcproj", "{8509E2A8-2CBD-49E2-B564-3EFF1E927459}"
ProjectSection(ProjectDependencies) = postProject
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F} = {1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562} = {E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsVP", "..\..\..\..\processing\build\win32\WelsVP_2008.vcproj", "{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{59208004-1774-4816-AC24-31FF44C324B4}.Debug|Win32.ActiveCfg = Debug|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Debug|Win32.Build.0 = Debug|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Release|Win32.ActiveCfg = Release|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Release|Win32.Build.0 = Release|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Debug|Win32.ActiveCfg = Debug|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Debug|Win32.Build.0 = Debug|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Release|Win32.ActiveCfg = Release|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Release|Win32.Build.0 = Release|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Debug|Win32.ActiveCfg = Debug|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Debug|Win32.Build.0 = Debug|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Release|Win32.ActiveCfg = Release|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Release|Win32.Build.0 = Release|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Debug|Win32.ActiveCfg = Debug|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Debug|Win32.Build.0 = Debug|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Release|Win32.ActiveCfg = Release|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsEncCore_2010", "WelsEncCore_2010.vcxproj", "{59208004-1774-4816-AC24-31FF44C324B4}"
ProjectSection(ProjectDependencies) = postProject
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562} = {E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsEncPlus_2010", "WelsEncPlus_2010.vcxproj", "{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encConsole_2010", "encConsole_2010.vcxproj", "{8509E2A8-2CBD-49E2-B564-3EFF1E927459}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsVP_2010", "..\..\..\..\processing\build\win32\WelsVP_2010.vcxproj", "{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{59208004-1774-4816-AC24-31FF44C324B4}.Debug|Win32.ActiveCfg = Debug|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Debug|Win32.Build.0 = Debug|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Release|Win32.ActiveCfg = Release|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Release|Win32.Build.0 = Release|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Debug|Win32.ActiveCfg = Debug|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Debug|Win32.Build.0 = Debug|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Release|Win32.ActiveCfg = Release|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Release|Win32.Build.0 = Release|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Debug|Win32.ActiveCfg = Debug|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Debug|Win32.Build.0 = Debug|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Release|Win32.ActiveCfg = Release|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Release|Win32.Build.0 = Release|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Debug|Win32.ActiveCfg = Debug|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Debug|Win32.Build.0 = Debug|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Release|Win32.ActiveCfg = Release|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,44 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsEncPlus_2012", "WelsEncPlus_2012.vcxproj", "{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}"
ProjectSection(ProjectDependencies) = postProject
{59208004-1774-4816-AC24-31FF44C324B4} = {59208004-1774-4816-AC24-31FF44C324B4}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsEncCore_2012", "WelsEncCore_2012.vcxproj", "{59208004-1774-4816-AC24-31FF44C324B4}"
ProjectSection(ProjectDependencies) = postProject
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562} = {E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WelsVP_2012", "..\..\..\..\processing\build\win32\WelsVP_2012.vcxproj", "{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encConsole_2012", "encConsole_2012.vcxproj", "{8509E2A8-2CBD-49E2-B564-3EFF1E927459}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Debug|Win32.ActiveCfg = Debug|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Debug|Win32.Build.0 = Debug|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Release|Win32.ActiveCfg = Release|Win32
{1E7B4E9A-986E-4167-8C70-6E4F60EAEE7F}.Release|Win32.Build.0 = Release|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Debug|Win32.ActiveCfg = Debug|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Debug|Win32.Build.0 = Debug|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Release|Win32.ActiveCfg = Release|Win32
{59208004-1774-4816-AC24-31FF44C324B4}.Release|Win32.Build.0 = Release|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Debug|Win32.ActiveCfg = Debug|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Debug|Win32.Build.0 = Debug|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Release|Win32.ActiveCfg = Release|Win32
{E8DFAFA1-8DAC-4127-8D27-FBD5819EE562}.Release|Win32.Build.0 = Release|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Debug|Win32.ActiveCfg = Debug|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Debug|Win32.Build.0 = Debug|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Release|Win32.ActiveCfg = Release|Win32
{8509E2A8-2CBD-49E2-B564-3EFF1E927459}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,127 @@
# Microsoft Developer Studio Project File - Name="encConsole" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=encConsole - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "encConsole.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "encConsole.mak" CFG="encConsole - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "encConsole - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "encConsole - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "encConsole - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\..\..\bin\Release"
# PROP Intermediate_Dir "..\..\..\obj\encConsole\Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\console\enc\inc" /I "..\..\..\api\svc" /I "..\..\..\encoder\core\inc" /I "..\..\..\common\inc" /I "..\..\..\WelsThreadLib\api" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "ENCODER_CORE" /YX /FD /c
# ADD BASE RSC /l 0x804 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\bin"
# SUBTRACT LINK32 /debug
!ELSEIF "$(CFG)" == "encConsole - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\..\..\bin\Debug"
# PROP Intermediate_Dir "..\..\..\obj\encConsole\Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\console\enc\inc" /I "..\..\..\api\svc" /I "..\..\..\encoder\core\inc" /I "..\..\..\common\inc" /I "..\..\..\WelsThreadLib\api" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "ENCODER_CORE" /YX /FD /GZ /c
# ADD BASE RSC /l 0x804 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\bin"
!ENDIF
# Begin Target
# Name "encConsole - Win32 Release"
# Name "encConsole - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\..\console\enc\src\read_config.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\console\enc\src\welsenc.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\..\console\enc\inc\read_config.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File
SOURCE=..\..\..\bin\layer0.cfg
# End Source File
# Begin Source File
SOURCE=..\..\..\bin\layer1.cfg
# End Source File
# Begin Source File
SOURCE=..\..\..\bin\layer2.cfg
# End Source File
# Begin Source File
SOURCE=..\..\..\bin\welsenc.cfg
# End Source File
# End Target
# End Project

View File

@ -0,0 +1,278 @@
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="encConsole"
ProjectGUID="{8509E2A8-2CBD-49E2-B564-3EFF1E927459}"
RootNamespace="encConsole"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Debug"
IntermediateDirectory=".\..\..\..\obj\encConsole\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\..\..\..\..\..\bin\Debug/encConsole.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\console\enc\inc,..\..\..\api\svc,..\..\..\WelsThreadLib\api,..\..\..\encoder\core\inc,..\..\..\common\inc"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;ENCODER_CORE;MT_ENABLED;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\..\..\..\obj\encConsole\Debug/encConsole.pch"
AssemblerListingLocation=".\..\..\..\obj\encConsole\Debug/"
ObjectFile=".\..\..\..\obj\encConsole\Debug/"
ProgramDataBaseFileName=".\..\..\..\obj\encConsole\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\welsenc.lib"
OutputFile="$(OutDir)\encConsole.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\encConsole.pdb"
GenerateMapFile="true"
MapFileName="$(OutDir)\encConsole.map"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\encConsole.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\..\..\..\bin\win32\Release"
IntermediateDirectory=".\..\..\..\obj\encConsole\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\..\..\..\..\..\bin\Release/encConsole.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\console\enc\inc,..\..\..\api\svc,..\..\..\WelsThreadLib\api,..\..\..\encoder\core\inc,..\..\..\common\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;ENCODER_CORE;X86_ASM;MT_ENABLED;"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\..\..\..\obj\encConsole\Release/encConsole.pch"
AssemblerListingLocation=".\..\..\..\obj\encConsole\Release/"
ObjectFile=".\..\..\..\obj\encConsole\Release/"
ProgramDataBaseFileName=".\..\..\..\obj\encConsole\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/LTCG"
AdditionalDependencies="$(OutDir)\welsenc.lib"
OutputFile="$(OutDir)\encConsole.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\encConsole.pdb"
GenerateMapFile="false"
MapExports="false"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\encConsole.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\console\enc\src\read_config.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\console\enc\src\welsenc.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\..\console\enc\inc\read_config.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8509E2A8-2CBD-49E2-B564-3EFF1E927459}</ProjectGuid>
<RootNamespace>encConsole</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\..\..\..\obj\encConsole\Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\..\..\..\obj\encConsole\Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">encConsole</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">encConsole</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\..\bin\Debug/encConsole.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\console\enc\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;..\..\..\encoder\core\inc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;ENCODER_CORE;X86_ASM;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encConsole\Debug/encConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encConsole\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encConsole\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encConsole\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\encConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\encConsole.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;.\..\..\..\..\bin\win32\Debug\welsenc.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\..\..\..\..\bin\Debug/encConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\..\bin\Release/encConsole.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\console\enc\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;..\..\..\encoder\core\inc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ENCODER_CORE;X86_ASM;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encConsole\Release/encConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encConsole\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encConsole\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encConsole\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)\encConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\encConsole.pdb</ProgramDatabaseFile>
<GenerateMapFile>false</GenerateMapFile>
<MapExports>false</MapExports>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;.\..\..\..\..\bin\win32\Release\welsenc.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\..\..\..\..\bin\Release/encConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\console\enc\src\read_config.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\..\console\enc\src\welsenc.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\console\enc\inc\read_config.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="WelsEncPlus.vcxproj">
<Project>{1e7b4e9a-986e-4167-8c70-6e4f60eaee7f}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8509E2A8-2CBD-49E2-B564-3EFF1E927459}</ProjectGuid>
<RootNamespace>encConsole</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Debug</OutDir>
<IntDir>.\..\..\..\obj\encConsole\Debug</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>encConsole</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\..\..\..\..\bin\win32\Release</OutDir>
<IntDir>.\..\..\..\obj\encConsole\Release</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>encConsole</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\..\bin\Debug/encConsole.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\console\enc\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;..\..\..\encoder\core\inc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;ENCODER_CORE;X86_ASM;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encConsole\Debug/encConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encConsole\Debug/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encConsole\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encConsole\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<OutputFile>$(OutDir)\encConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\encConsole.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(OutDir)welsvp.lib;$(OutDir)welsenc.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MapFileName>$(OutDir)\encConsole.map</MapFileName>
<ProfileGuidedDatabase>$(OutDir)\encConsole.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\encConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<TypeLibraryName>.\..\..\..\..\..\bin\Release/encConsole.tlb</TypeLibraryName>
<HeaderFileName />
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..\console\enc\inc;..\..\..\api\svc;..\..\..\WelsThreadLib\api;..\..\..\encoder\core\inc;..\..\..\common\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ENCODER_CORE;X86_ASM;MT_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\..\..\..\obj\encConsole\Release/encConsole.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\..\..\..\obj\encConsole\Release/</AssemblerListingLocation>
<ObjectFileName>.\..\..\..\obj\encConsole\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\..\..\..\obj\encConsole\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)\encConsole.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\..\..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\encConsole.pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapExports>false</MapExports>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(OutDir)welsvp.lib;$(OutDir)welsenc.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MapFileName>$(OutDir)\encConsole.map</MapFileName>
<ProfileGuidedDatabase>$(OutDir)\encConsole.pgd</ProfileGuidedDatabase>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\encConsole.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\console\enc\src\read_config.cpp" />
<ClCompile Include="..\..\..\console\enc\src\welsenc.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\console\enc\inc\read_config.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="WelsEncPlus.vcxproj">
<Project>{1e7b4e9a-986e-4167-8c70-6e4f60eaee7f}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,143 @@
/*!
* \copy
* Copyright (c) 2010-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* \file d3d9_utils.h
*
* \brief interface of d3d9 render module
*
* \date Created 12/14/2010
*
* \description : 1. Rendering in Vista and upper : D3D9Ex method, support host memory / shared surface input
* 2. Rendering in XP : D3D9 method w/o device lost handling, support host memory input
* 3. File Dump : support host memory / shared surface input
*
*************************************************************************************
*/
#ifndef WELS_D3D9_UTILS_H__
#define WELS_D3D9_UTILS_H__
//#pragma once // do not use this due cross platform, esp for Solaris
#include <stdio.h>
#include "codec_def.h"
#if defined(_MSC_VER) && (_MSC_VER>=1500) // vs2008 and upper
#define ENABLE_DISPLAY_MODULE // enable/disable the render feature
#endif
#ifdef ENABLE_DISPLAY_MODULE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <d3d9.h>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class CD3D9Utils
{
public:
CD3D9Utils();
~CD3D9Utils();
public:
HRESULT Init(BOOL bWindowed);
HRESULT Uninit(void);
HRESULT Process(void *pDst[3], SBufferInfo *Info, FILE *pFile = NULL);
private:
HRESULT InitResource(void *pSharedHandle, SBufferInfo *pInfo);
HRESULT Render(void *pDst[3], SBufferInfo *pInfo);
HRESULT Dump(void *pDst[3], SBufferInfo *pInfo, FILE *pFile);
private:
HMODULE m_hDll;
HWND m_hWnd;
unsigned char *m_pDumpYUV;
BOOL m_bInitDone;
LPDIRECT3D9 m_lpD3D9;
LPDIRECT3DDEVICE9 m_lpD3D9Device;
D3DPRESENT_PARAMETERS m_d3dpp;
LPDIRECT3DSURFACE9 m_lpD3D9RawSurfaceShare;
};
class CD3D9ExUtils
{
public:
CD3D9ExUtils();
~CD3D9ExUtils();
public:
HRESULT Init(BOOL bWindowed);
HRESULT Uninit(void);
HRESULT Process(void *dst[3], SBufferInfo *Info, FILE *fp = NULL);
private:
HRESULT InitResource(void *pSharedHandle, SBufferInfo *Info);
HRESULT Render(void *pDst[3], SBufferInfo *Info);
HRESULT Dump(void *pDst[3], SBufferInfo *Info, FILE *fp);
private:
HMODULE m_hDll;
HWND m_hWnd;
unsigned char *m_pDumpYUV;
BOOL m_bInitDone;
LPDIRECT3D9EX m_lpD3D9;
LPDIRECT3DDEVICE9EX m_lpD3D9Device;
D3DPRESENT_PARAMETERS m_d3dpp;
LPDIRECT3DSURFACE9 m_lpD3D9RawSurfaceShare;
};
#endif
typedef enum
{
OS_UNSUPPORTED = 0,
OS_XP,
OS_VISTA_UPPER
};
class CUtils
{
public:
CUtils();
~CUtils();
int Process(void *dst[3], SBufferInfo *Info, FILE *fp);
private:
int CheckOS(void);
private:
int iOSType;
void *hHandle;
};
#endif//WELS_D3D9_UTILS_H__

View File

@ -0,0 +1,53 @@
/*!
* \copy
* Copyright (c) 2011-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* dec_console.h
* h264decConsole
*
* Created on 11-3-15.
*
*/
#pragma once
#include "code_api.h"
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
bool load_bundle_welsdec();
void free_bundle_welsdec();
bool get_functions_address_free_decoder(ISVCDecoder* pDecoder);
bool get_functions_address_create_decoder(ISVCDecoder** ppDecoder);

View File

@ -0,0 +1,66 @@
/*!
* \copy
* Copyright (c) 2008-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* read_config.h
*
* Abstract
* Class for reading parameter settings in a configure file.
*
* History
* 08/18/2008 Created
*
*****************************************************************************/
#ifndef READ_CONFIG_H__
#define READ_CONFIG_H__
#include <stdlib.h>
#include <string>
using namespace std;
class CReadConfig
{
public:
CReadConfig( const char *kpConfigFileName );
virtual ~CReadConfig();
long ReadLine( string* val, const int kiValSize = 4 );
const bool EndOfFile();
const int GetLines();
const bool ExistFile();
const string& GetFileName();
private:
FILE *m_pCfgFile;
string m_strCfgFileName;
unsigned long m_ulLines;
};
#endif // READ_CONFIG_H__

View File

@ -0,0 +1,778 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "d3d9_utils.h"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Write2File(FILE *pFp, unsigned char* pData[3], int iStride[2], int iWidth, int iHeight);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef ENABLE_DISPLAY_MODULE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define IDM_ABOUT 104
#define IDM_EXIT 105
#define IDI_TESTSHARESURFACE 107
#define IDI_SMALL 108
#define IDC_TESTSHARESURFACE 109
#define NV12_FORMAT MAKEFOURCC('N','V','1','2')
typedef struct
{
UINT uiWidth;
UINT uiHeight;
D3DFORMAT D3Dformat;
D3DPOOL D3DPool;
} SHandleInfo;
#define SAFE_RELEASE(p) if(p) { (p)->Release(); (p) = NULL; }
#define SAFE_FREE(p) if(p) { free (p); (p) = NULL; }
HRESULT Dump2YUV(void *pDst[3], void *pSurface, int iWidth, int iHeight, int iStride[2]);
HRESULT Dump2Surface(void *pDst[3], void *pSurface, int iWidth, int iHeight, int iStride[2]);
HRESULT InitWindow(HWND *hWnd);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
typedef HRESULT (WINAPI *pFnCreateD3D9Ex) (UINT SDKVersion, IDirect3D9Ex** );
typedef LPDIRECT3D9 (WINAPI *pFnCreateD3D9)(UINT SDKVersion);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CD3D9Utils::CD3D9Utils()
{
m_hDll = NULL;
m_hWnd = NULL;
m_pDumpYUV = NULL;
m_bInitDone = FALSE;
m_lpD3D9 = NULL;
m_lpD3D9Device = NULL;
m_lpD3D9RawSurfaceShare = NULL;
// coverity scan uninitial
ZeroMemory(&m_d3dpp, sizeof(m_d3dpp));
}
CD3D9Utils::~CD3D9Utils()
{
Uninit();
}
HRESULT CD3D9Utils::Init(BOOL bWindowed)
{
if (m_bInitDone)
return S_OK;
m_hDll = LoadLibrary(TEXT("d3d9.dll"));
pFnCreateD3D9 pCreateD3D9 = NULL;
if(m_hDll)
pCreateD3D9 = (pFnCreateD3D9) GetProcAddress(m_hDll, TEXT("Direct3DCreate9"));
else
return E_FAIL;
m_lpD3D9 = pCreateD3D9(D3D_SDK_VERSION);
return bWindowed ? InitWindow(&m_hWnd) : S_OK;
}
HRESULT CD3D9Utils::Uninit()
{
SAFE_RELEASE(m_lpD3D9RawSurfaceShare);
SAFE_RELEASE(m_lpD3D9Device);
SAFE_RELEASE(m_lpD3D9);
SAFE_FREE(m_pDumpYUV);
if(m_hDll)
{
FreeLibrary(m_hDll);
m_hDll = NULL;
}
return S_OK;
}
HRESULT CD3D9Utils::Process(void *pDst[3], SBufferInfo *pInfo, FILE *pFp)
{
HRESULT hResult = E_FAIL;
if (pDst == NULL || pInfo == NULL)
return hResult;
BOOL bWindowed = pFp ? FALSE : TRUE;
BOOL bNeedD3D9 = !(!bWindowed && pInfo->eBufferProperty == BUFFER_HOST);
if (!m_bInitDone)
m_bInitDone = !bNeedD3D9;
if (!m_bInitDone)
{
hResult = Init(bWindowed);
if (SUCCEEDED(hResult))
m_bInitDone = TRUE;
}
if (m_bInitDone)
{
if (bWindowed)
{
hResult = Render(pDst, pInfo);
Sleep(30);
}
else if (pFp)
{
hResult = Dump(pDst, pInfo, pFp);
Sleep(0);
}
}
return hResult;
}
HRESULT CD3D9Utils::Render(void *pDst[3], SBufferInfo *pInfo)
{
HRESULT hResult = E_FAIL;
EBufferProperty eBufferProperty = pInfo->eBufferProperty;
if (eBufferProperty == BUFFER_HOST)
{
hResult = InitResource(NULL, pInfo);
if (SUCCEEDED(hResult))
hResult = Dump2Surface(pDst, m_lpD3D9RawSurfaceShare, pInfo->UsrData.sSystemBuffer.iWidth, pInfo->UsrData.sSystemBuffer.iHeight, pInfo->UsrData.sSystemBuffer.iStride);
}
if (SUCCEEDED(hResult))
{
IDirect3DSurface9 *pBackBuffer = NULL;
hResult = m_lpD3D9Device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);
hResult = m_lpD3D9Device->StretchRect(m_lpD3D9RawSurfaceShare, NULL, pBackBuffer, NULL, D3DTEXF_NONE);
hResult = m_lpD3D9Device->Present(0, 0, NULL, NULL);
}
return hResult;
}
HRESULT CD3D9Utils::Dump(void *pDst[3], SBufferInfo *pInfo, FILE *pFp)
{
HRESULT hResult = E_FAIL;
EBufferProperty eBufferProperty = pInfo->eBufferProperty;
int iStride[2];
int iWidth;
int iHeight;
iWidth = pInfo->UsrData.sSystemBuffer.iWidth;
iHeight = pInfo->UsrData.sSystemBuffer.iHeight;
iStride[0] = pInfo->UsrData.sSystemBuffer.iStride[0];
iStride[1] = pInfo->UsrData.sSystemBuffer.iStride[1];
if (pDst[0] && pDst[1] && pDst[2])
Write2File(pFp, (unsigned char **)pDst, iStride, iWidth, iHeight);
return hResult;
}
HRESULT CD3D9Utils::InitResource(void *pSharedHandle, SBufferInfo *pInfo)
{
HRESULT hResult = S_OK;
// coverity scan uninitial
int iWidth = 0;
int iHeight = 0;
D3DFORMAT D3Dformat = (D3DFORMAT)D3DFMT_UNKNOWN;
D3DPOOL D3Dpool = (D3DPOOL)D3DPOOL_DEFAULT;
if (pInfo == NULL)
return E_FAIL;
if (m_lpD3D9Device == NULL && m_lpD3D9RawSurfaceShare == NULL)
{
HMONITOR hMonitorWnd = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONULL);
UINT uiAdapter = D3DADAPTER_DEFAULT;
UINT uiCnt = m_lpD3D9->GetAdapterCount();
for(UINT i=0; i<uiCnt; i++)
{
HMONITOR hMonitor = m_lpD3D9->GetAdapterMonitor(i);
if(hMonitor == hMonitorWnd)
{
uiAdapter = i;
break;
}
}
D3DDISPLAYMODE D3DDisplayMode;
hResult = m_lpD3D9->GetAdapterDisplayMode(uiAdapter, &D3DDisplayMode);
D3DDEVTYPE D3DDevType = D3DDEVTYPE_HAL;
DWORD dwBehaviorFlags = D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED;
ZeroMemory(&m_d3dpp, sizeof(m_d3dpp));
m_d3dpp.Flags = D3DPRESENTFLAG_VIDEO;
m_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
m_d3dpp.BackBufferFormat = D3DDisplayMode.Format;
m_d3dpp.Windowed = TRUE;
m_d3dpp.hDeviceWindow = m_hWnd;
m_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
hResult = m_lpD3D9->CreateDevice(uiAdapter, D3DDevType, NULL, dwBehaviorFlags, &m_d3dpp, &m_lpD3D9Device);
if (pInfo->eBufferProperty == BUFFER_HOST)
{
iWidth = pInfo->UsrData.sSystemBuffer.iWidth;
iHeight = pInfo->UsrData.sSystemBuffer.iHeight;
D3Dformat = (D3DFORMAT)NV12_FORMAT;
D3Dpool = (D3DPOOL)D3DPOOL_DEFAULT;
}
hResult = m_lpD3D9Device->CreateOffscreenPlainSurface(iWidth, iHeight, (D3DFORMAT)D3Dformat, (D3DPOOL)D3Dpool, &m_lpD3D9RawSurfaceShare, NULL);
}
if (m_lpD3D9Device == NULL || m_lpD3D9RawSurfaceShare == NULL)
hResult = E_FAIL;
return hResult;
}
CD3D9ExUtils::CD3D9ExUtils()
{
m_hDll = NULL;
m_hWnd = NULL;
m_pDumpYUV = NULL;
m_bInitDone = FALSE;
m_lpD3D9 = NULL;
m_lpD3D9Device = NULL;
m_lpD3D9RawSurfaceShare = NULL;
// coverity scan uninitial
ZeroMemory(&m_d3dpp, sizeof(m_d3dpp));
}
CD3D9ExUtils::~CD3D9ExUtils()
{
Uninit();
}
HRESULT CD3D9ExUtils::Init(BOOL bWindowed)
{
if (m_bInitDone)
return S_OK;
m_hDll = LoadLibrary(TEXT("d3d9.dll"));
pFnCreateD3D9Ex pCreateD3D9Ex = NULL;
if(m_hDll)
pCreateD3D9Ex = (pFnCreateD3D9Ex) GetProcAddress(m_hDll, TEXT("Direct3DCreate9Ex"));
else
return E_FAIL;
pCreateD3D9Ex(D3D_SDK_VERSION, &m_lpD3D9);
return bWindowed ? InitWindow(&m_hWnd) : S_OK;
}
HRESULT CD3D9ExUtils::Uninit()
{
SAFE_RELEASE(m_lpD3D9RawSurfaceShare);
SAFE_RELEASE(m_lpD3D9Device);
SAFE_RELEASE(m_lpD3D9);
SAFE_FREE(m_pDumpYUV);
if(m_hDll)
{
FreeLibrary(m_hDll);
m_hDll = NULL;
}
return S_OK;
}
HRESULT CD3D9ExUtils::Process(void *pDst[3], SBufferInfo *pInfo, FILE *pFp)
{
HRESULT hResult = E_FAIL;
if (pDst == NULL || pInfo == NULL)
return hResult;
BOOL bWindowed = pFp ? FALSE : TRUE;
BOOL bNeedD3D9 = !(!bWindowed && pInfo->eBufferProperty == BUFFER_HOST);
if (!m_bInitDone)
m_bInitDone = !bNeedD3D9;
if (!m_bInitDone)
{
hResult = Init(bWindowed);
if (SUCCEEDED(hResult))
m_bInitDone = TRUE;
}
if (m_bInitDone)
{
if (bWindowed)
{
hResult = Render(pDst, pInfo);
Sleep(30); // set a simple time controlling with default of 30fps
}
else if (pFp)
{
hResult = Dump(pDst, pInfo, pFp);
Sleep(0);
}
}
return hResult;
}
HRESULT CD3D9ExUtils::Render(void *pDst[3], SBufferInfo *pInfo)
{
HRESULT hResult = E_FAIL;
EBufferProperty eBufferProperty = pInfo->eBufferProperty;
if (eBufferProperty == BUFFER_HOST)
{
hResult = InitResource(NULL, pInfo);
if (SUCCEEDED(hResult))
hResult = Dump2Surface(pDst, m_lpD3D9RawSurfaceShare, pInfo->UsrData.sSystemBuffer.iWidth, pInfo->UsrData.sSystemBuffer.iHeight, pInfo->UsrData.sSystemBuffer.iStride);
}
else if (eBufferProperty == BUFFER_DEVICE)
{
VOID * pSharedHandle = pDst[0];
hResult = InitResource(pSharedHandle, pInfo);
}
if (SUCCEEDED(hResult))
{
IDirect3DSurface9 *pBackBuffer = NULL;
hResult = m_lpD3D9Device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);
hResult = m_lpD3D9Device->StretchRect(m_lpD3D9RawSurfaceShare, NULL, pBackBuffer, NULL, D3DTEXF_NONE);
hResult = m_lpD3D9Device->PresentEx(0, 0, NULL, NULL, 0);
}
return hResult;
}
HRESULT CD3D9ExUtils::Dump(void *pDst[3], SBufferInfo *pInfo, FILE *pFp)
{
HRESULT hResult = E_FAIL;
EBufferProperty eBufferProperty = pInfo->eBufferProperty;
int iStride[2];
int iWidth;
int iHeight;
if (eBufferProperty != BUFFER_HOST)
{
iWidth = pInfo->UsrData.sVideoBuffer.iSurfaceWidth;
iHeight = pInfo->UsrData.sVideoBuffer.iSurfaceHeight;
iStride[0] = iWidth;
iStride[1] = iWidth / 2;
if (m_pDumpYUV == NULL)
{
m_pDumpYUV = (unsigned char *)malloc(iWidth * iHeight * 3 / 2 * sizeof(unsigned char));
}
if (m_pDumpYUV)
{
void *pSurface = pDst[1];
pDst[0] = m_pDumpYUV;
pDst[1] = m_pDumpYUV + iHeight * iStride[0] * sizeof(unsigned char);
pDst[2] = m_pDumpYUV + iHeight * iStride[0] * 5 / 4 * sizeof(unsigned char);
hResult = Dump2YUV(pDst, pSurface, iWidth, iHeight, iStride);
}
}
else
{
iWidth = pInfo->UsrData.sSystemBuffer.iWidth;
iHeight = pInfo->UsrData.sSystemBuffer.iHeight;
iStride[0] = pInfo->UsrData.sSystemBuffer.iStride[0];
iStride[1] = pInfo->UsrData.sSystemBuffer.iStride[1];
}
if (pDst[0] && pDst[1] && pDst[2])
Write2File(pFp, (unsigned char **)pDst, iStride, iWidth, iHeight);
return hResult;
}
HRESULT CD3D9ExUtils::InitResource(void *pSharedHandle, SBufferInfo *pInfo)
{
HRESULT hResult = S_OK;
int iWidth;
int iHeight;
D3DFORMAT D3Dformat;
D3DPOOL D3Dpool;
if (pInfo == NULL)
return E_FAIL;
if (m_lpD3D9Device == NULL && m_lpD3D9RawSurfaceShare == NULL)
{
HMONITOR hMonitorWnd = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONULL);
UINT uiAdapter = D3DADAPTER_DEFAULT;
UINT uiCnt = m_lpD3D9->GetAdapterCount();
for(UINT i=0; i<uiCnt; i++)
{
HMONITOR hMonitor = m_lpD3D9->GetAdapterMonitor(i);
if(hMonitor == hMonitorWnd)
{
uiAdapter = i;
break;
}
}
D3DDISPLAYMODEEX D3DDisplayMode;
D3DDisplayMode.Size = sizeof(D3DDISPLAYMODEEX);
hResult = m_lpD3D9->GetAdapterDisplayModeEx(uiAdapter, &D3DDisplayMode, NULL);
D3DDEVTYPE D3DDevType = D3DDEVTYPE_HAL;
DWORD dwBehaviorFlags = D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED;
ZeroMemory(&m_d3dpp, sizeof(m_d3dpp));
m_d3dpp.Flags = D3DPRESENTFLAG_VIDEO;
m_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
m_d3dpp.BackBufferFormat = D3DDisplayMode.Format;
m_d3dpp.Windowed = TRUE;
m_d3dpp.hDeviceWindow = m_hWnd;
m_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
hResult = m_lpD3D9->CreateDeviceEx(uiAdapter, D3DDevType, NULL, dwBehaviorFlags, &m_d3dpp, NULL, &m_lpD3D9Device);
if (pInfo->eBufferProperty == BUFFER_HOST)
{
iWidth = pInfo->UsrData.sSystemBuffer.iWidth;
iHeight = pInfo->UsrData.sSystemBuffer.iHeight;
D3Dformat = (D3DFORMAT)NV12_FORMAT;
D3Dpool = (D3DPOOL)D3DPOOL_DEFAULT;
}
else
{
iWidth = pInfo->UsrData.sVideoBuffer.iSurfaceWidth;
iHeight = pInfo->UsrData.sVideoBuffer.iSurfaceHeight;
D3Dformat = (D3DFORMAT)pInfo->UsrData.sVideoBuffer.D3Dformat;
D3Dpool = (D3DPOOL)pInfo->UsrData.sVideoBuffer.D3DPool;
}
hResult = m_lpD3D9Device->CreateOffscreenPlainSurface(iWidth, iHeight, (D3DFORMAT)D3Dformat, (D3DPOOL)D3Dpool, &m_lpD3D9RawSurfaceShare, &pSharedHandle);
}
if (m_lpD3D9Device == NULL || m_lpD3D9RawSurfaceShare == NULL)
hResult = E_FAIL;
return hResult;
}
HRESULT Dump2YUV(void *pDst[3], void *pSurface, int iWidth, int iHeight, int iStride[2])
{
HRESULT hResult = E_FAIL;
if (!pDst[0] || !pDst[1] || !pDst[2] || !pSurface)
return hResult;
IDirect3DSurface9 *pSurfaceData = (IDirect3DSurface9 *)pSurface;
D3DLOCKED_RECT sD3DLockedRect = {0};
hResult = pSurfaceData->LockRect(&sD3DLockedRect, NULL, 0);
unsigned char * pInY = (unsigned char *)sD3DLockedRect.pBits;
unsigned char * pOutY = (unsigned char *)pDst[0];
int iInStride = sD3DLockedRect.Pitch;
int iOutStride = iStride[0];
for (int j=0; j<iHeight; j++)
memcpy(pOutY+j*iOutStride, pInY+j*iInStride, iWidth);//confirmed_safe_unsafe_usage
unsigned char * pOutV = (unsigned char *)pDst[1];
unsigned char * pOutU = (unsigned char *)pDst[2];
unsigned char * pInC = pInY + iInStride * iHeight;
iOutStride = iStride[1];
for (int i=0; i<iHeight/2; i++)
{
for (int j=0; j<iWidth; j+=2)
{
pOutV[i*iOutStride+j/2] = pInC[i*iInStride+j ];
pOutU[i*iOutStride+j/2] = pInC[i*iInStride+j+1];
}
}
pSurfaceData->UnlockRect();
return hResult;
}
HRESULT Dump2Surface(void *pDst[3], void *pSurface, int iWidth, int iHeight, int iStride[2])
{
HRESULT hResult = E_FAIL;
if (!pDst[0] || !pDst[1] || !pDst[2] || !pSurface)
return hResult;
IDirect3DSurface9 *pSurfaceData = (IDirect3DSurface9 *)pSurface;
D3DLOCKED_RECT sD3DLockedRect = {0};
hResult = pSurfaceData->LockRect(&sD3DLockedRect, NULL, 0);
unsigned char * pInY = (unsigned char *)pDst[0];
unsigned char * pOutY = (unsigned char *)sD3DLockedRect.pBits;
int iOutStride = sD3DLockedRect.Pitch;
for (int j=0; j<iHeight; j++)
memcpy(pOutY+j*iOutStride, pInY+j*iStride[0], iWidth);//confirmed_safe_unsafe_usage
unsigned char * pInV = (unsigned char *)pDst[1];
unsigned char * pInU = (unsigned char *)pDst[2];
unsigned char * pOutC = pOutY + iOutStride * iHeight;
for (int i=0; i<iHeight/2; i++)
{
for (int j=0; j<iWidth; j+=2)
{
pOutC[i*iOutStride+j ] = pInV[i*iStride[1]+j/2];
pOutC[i*iOutStride+j+1] = pInU[i*iStride[1]+j/2];
}
}
pSurfaceData->UnlockRect();
return hResult;
}
HRESULT InitWindow(HWND *hWnd)
{
const TCHAR kszWindowTitle[] = TEXT("Wels Decoder Application");
const TCHAR kszWindowClass[] = TEXT("Wels Decoder Class");
WNDCLASSEX sWndClassEx = {0};
sWndClassEx.cbSize = sizeof(WNDCLASSEX);
sWndClassEx.style = CS_HREDRAW | CS_VREDRAW;
sWndClassEx.lpfnWndProc = (WNDPROC)WndProc;
sWndClassEx.cbClsExtra = 0;
sWndClassEx.cbWndExtra = 0;
sWndClassEx.hInstance = GetModuleHandle(NULL);
sWndClassEx.hIcon = LoadIcon(sWndClassEx.hInstance, (LPCTSTR)IDI_TESTSHARESURFACE);
sWndClassEx.hCursor = LoadCursor(NULL, IDC_ARROW);
sWndClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
sWndClassEx.lpszMenuName = (LPCSTR)IDC_TESTSHARESURFACE;
sWndClassEx.lpszClassName = kszWindowClass;
sWndClassEx.hIconSm = LoadIcon(sWndClassEx.hInstance, (LPCTSTR)IDI_SMALL);
if (!RegisterClassEx(&sWndClassEx))
return E_FAIL;
HWND hTmpWnd = CreateWindow(kszWindowClass, kszWindowTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, sWndClassEx.hInstance, NULL);
*hWnd = hTmpWnd;
if (!hTmpWnd)
return E_FAIL;
ShowWindow(hTmpWnd, SW_SHOWDEFAULT);
UpdateWindow(hTmpWnd);
return S_OK;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
INT wmId, wmEvent;
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
switch (wmId)
{
case IDM_ABOUT:
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
ValidateRect(hWnd , NULL);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
#endif
CUtils::CUtils()
{
hHandle = NULL;
iOSType = CheckOS();
#ifdef ENABLE_DISPLAY_MODULE
if (iOSType == OS_XP)
hHandle = (void *) new CD3D9Utils;
else if (iOSType == OS_VISTA_UPPER)
hHandle = (void *) new CD3D9ExUtils;
#endif
if (hHandle == NULL)
iOSType = OS_UNSUPPORTED;
}
CUtils::~CUtils()
{
#ifdef ENABLE_DISPLAY_MODULE
if (hHandle)
{
if (iOSType == OS_XP)
{
CD3D9Utils *hTmp = (CD3D9Utils *) hHandle;
delete hTmp;
}
else if (iOSType == OS_VISTA_UPPER)
{
CD3D9ExUtils *hTmp = (CD3D9ExUtils *) hHandle;
delete hTmp;
}
hHandle = NULL;
}
#endif
}
int CUtils::Process(void *pDst[3], SBufferInfo *pInfo, FILE *pFp)
{
int iRet = 0;
if (iOSType == OS_UNSUPPORTED)
{
if (pFp && pDst[0] && pDst[1] && pDst[2] && pInfo)
{
int iStride[2];
int iWidth = pInfo->UsrData.sSystemBuffer.iWidth;
int iHeight= pInfo->UsrData.sSystemBuffer.iHeight;
iStride[0] = pInfo->UsrData.sSystemBuffer.iStride[0];
iStride[1] = pInfo->UsrData.sSystemBuffer.iStride[1];
Write2File(pFp, (unsigned char **)pDst, iStride, iWidth, iHeight);
}
}
#ifdef ENABLE_DISPLAY_MODULE
else
{
MSG msg;
ZeroMemory( &msg, sizeof(msg) );
while( msg.message != WM_QUIT )
{
if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
else
{
HRESULT hResult = S_OK;
if (iOSType == OS_XP)
hResult = ((CD3D9Utils *)hHandle)->Process(pDst, pInfo, pFp);
else if (iOSType == OS_VISTA_UPPER)
hResult = ((CD3D9ExUtils *)hHandle)->Process(pDst, pInfo, pFp);
iRet = !SUCCEEDED(hResult);
break;
}
}
}
#endif
return iRet;
}
int CUtils::CheckOS()
{
int iType = OS_UNSUPPORTED;
#ifdef ENABLE_DISPLAY_MODULE
OSVERSIONINFOEX osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
if( !GetVersionEx ((OSVERSIONINFO *) &osvi) )
{
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (! GetVersionEx ( (OSVERSIONINFO *) &osvi) )
return iType;
}
switch (osvi.dwPlatformId)
{
case VER_PLATFORM_WIN32_NT:
if (osvi.dwMajorVersion >= 6)
iType = OS_VISTA_UPPER;
else if (osvi.dwMajorVersion == 5)
iType = OS_XP;
break;
default:
break;
}
#endif
return iType;
}
void Write2File(FILE *pFp, unsigned char* pData[3], int iStride[2], int iWidth, int iHeight)
{
int i;
unsigned char *pPtr = NULL;
pPtr = pData[0];
for( i=0; i<iHeight; i++ )
{
fwrite(pPtr, 1, iWidth, pFp);
pPtr += iStride[0];
}
iHeight = iHeight/2;
iWidth = iWidth/2;
pPtr = pData[1];
for( i=0; i<iHeight; i++ )
{
fwrite(pPtr, 1, iWidth, pFp);
pPtr += iStride[1];
}
pPtr = pData[2];
for( i=0; i<iHeight; i++ )
{
fwrite(pPtr, 1, iWidth, pFp);
pPtr += iStride[1];
}
}

View File

@ -0,0 +1,547 @@
/*!
* \copy
* Copyright (c) 2004-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* h264dec.cpp: Wels Decoder Console Implementation file
*/
#if defined (WIN32)
#include <windows.h>
#include <tchar.h>
#else
#include <string.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include "codec_def.h"
#include "codec_app_def.h"
#include "codec_api.h"
#include "read_config.h"
#include "../../decoder/core/inc/typedefs.h"
#include "../../decoder/core/inc/measure_time.h"
#include "d3d9_utils.h"
typedef long (*PCreateDecoderFunc) (ISVCDecoder** ppDecoder);
typedef void_t (*PDestroyDecoderFunc)(ISVCDecoder* pDecoder);
#if defined(__APPLE__)
#include "dec_console.h"
#endif
using namespace std;
//using namespace WelsDec;
//#define STICK_STREAM_SIZE // For Demo interfaces test with track file of integrated frames
void_t H264DecodeInstance( ISVCDecoder* pDecoder, const char* kpH264FileName, const char* kpOuputFileName, int32_t& iWidth, int32_t& iHeight, void_t* pOptionFileName )
{
FILE *pH264File = NULL;
FILE *pYuvFile = NULL;
FILE *pOptionFile = NULL;
int64_t iStart = 0, iEnd = 0, iTotal = 0;
int32_t iSliceSize;
int32_t iSliceIndex = 0;
uint8_t* pBuf = NULL;
uint8_t uiStartCode[4] = {0, 0, 0, 1};
void_t *pData[3] = {NULL};
uint8_t *pDst[3] = {NULL};
SBufferInfo sDstBufInfo;
int32_t iBufPos = 0;
int32_t iFileSize;
int32_t i = 0;
int32_t iLastWidth = 0, iLastHeight = 0;
int32_t iFrameCount = 0;
int32_t iEndOfStreamFlag = 0;
int32_t iColorFormat = videoFormatInternal;
static int32_t iFrameNum = 0;
EDecodeMode eDecoderMode = AUTO_MODE;
EBufferProperty eOutputProperty = BUFFER_DEVICE;
CUtils cOutputModule;
double dElapsed = 0;
if (pDecoder == NULL) return;
if (kpH264FileName)
{
pH264File = fopen(kpH264FileName,"rb");
if (pH264File == NULL){
fprintf(stderr, "Can not open h264 source file, check its legal path related please..\n");
return;
}
fprintf(stderr, "H264 source file name: %s..\n",kpH264FileName);
}
else
{
fprintf(stderr, "Can not find any h264 bitstream file to read..\n");
fprintf(stderr, "----------------decoder return------------------------\n" );
return;
}
if (kpOuputFileName){
pYuvFile = fopen(kpOuputFileName, "wb");
if (pYuvFile == NULL){
fprintf(stderr, "Can not open yuv file to output result of decoding..\n");
// any options
//return; // can let decoder work in quiet mode, no writing any output
}
else
fprintf(stderr, "Sequence output file name: %s..\n", kpOuputFileName);
}
else{
fprintf(stderr, "Can not find any output file to write..\n");
// any options
}
if (pOptionFileName){
pOptionFile = fopen((char*)pOptionFileName, "wb");
if ( pOptionFile == NULL ){
fprintf(stderr, "Can not open optional file for write..\n");
}
else
fprintf(stderr, "Extra optional file: %s..\n", (char*)pOptionFileName);
}
printf( "------------------------------------------------------\n" );
fseek(pH264File, 0L, SEEK_END);
iFileSize = ftell(pH264File);
if (iFileSize<=0) {
fprintf(stderr, "Current Bit Stream File is too small, read error!!!!\n");
goto label_exit;
}
fseek(pH264File, 0L, SEEK_SET);
pBuf = new uint8_t[iFileSize+4];
if (pBuf == NULL){
fprintf(stderr, "new buffer failed!\n");
goto label_exit;
}
fread(pBuf, 1, iFileSize, pH264File);
memcpy(pBuf+iFileSize, &uiStartCode[0], 4);//confirmed_safe_unsafe_usage
if( pDecoder->SetOption( DECODER_OPTION_DATAFORMAT, &iColorFormat ) ){
fprintf(stderr, "SetOption() failed, opt_id : %d ..\n", DECODER_OPTION_DATAFORMAT);
goto label_exit;
}
if( pDecoder->SetOption( DECODER_OPTION_MODE, &eDecoderMode ) ){
fprintf(stderr, "SetOption() failed, opt_id : %d ..\n", DECODER_OPTION_MODE);
goto label_exit;
}
// set the output buffer property
if(pYuvFile)
{
pDecoder->SetOption( DECODER_OPTION_OUTPUT_PROPERTY, &eOutputProperty );
}
#if defined ( STICK_STREAM_SIZE )
FILE *fpTrack = fopen("3.len", "rb");
#endif// STICK_STREAM_SIZE
while ( true ) {
if ( iBufPos >= iFileSize ){
iEndOfStreamFlag = true;
if ( iEndOfStreamFlag )
pDecoder->SetOption( DECODER_OPTION_END_OF_STREAM, (void_t*)&iEndOfStreamFlag );
break;
}
#if defined ( STICK_STREAM_SIZE )
if ( fpTrack )
fread(&iSliceSize, 1, sizeof(int32_t), fpTrack);
#else
for (i=0; i<iFileSize; i++) {
if (pBuf[iBufPos+i]==0 && pBuf[iBufPos+i+1]==0 && pBuf[iBufPos+i+2]==0 &&
pBuf[iBufPos+i+3]==1 && i>0) {
break;
}
}
iSliceSize = i;
#endif
//for coverage test purpose
int32_t iOutputColorFormat;
pDecoder->GetOption(DECODER_OPTION_DATAFORMAT, &iOutputColorFormat);
int32_t iEndOfStreamFlag;
pDecoder->GetOption(DECODER_OPTION_END_OF_STREAM, &iEndOfStreamFlag);
int32_t iCurIdrPicId;
pDecoder->GetOption(DECODER_OPTION_IDR_PIC_ID, &iCurIdrPicId);
int32_t iFrameNum;
pDecoder->GetOption(DECODER_OPTION_FRAME_NUM, &iFrameNum);
int32_t bCurAuContainLtrMarkSeFlag;
pDecoder->GetOption(DECODER_OPTION_LTR_MARKING_FLAG, &bCurAuContainLtrMarkSeFlag);
int32_t iFrameNumOfAuMarkedLtr;
pDecoder->GetOption(DECODER_OPTION_LTR_MARKED_FRAME_NUM, &iFrameNumOfAuMarkedLtr);
int32_t iFeedbackVclNalInAu;
pDecoder->GetOption(DECODER_OPTION_VCL_NAL, &iFeedbackVclNalInAu);
int32_t iFeedbackTidInAu;
pDecoder->GetOption(DECODER_OPTION_TEMPORAL_ID, &iFeedbackTidInAu);
int32_t iSetMode;
pDecoder->GetOption(DECODER_OPTION_MODE, &iSetMode);
int32_t iDeviceInfo;
pDecoder->GetOption(DECODER_OPTION_DEVICE_INFO, &iDeviceInfo);
//~end for
iStart = WelsTime();
pData[0] = NULL;
pData[1] = NULL;
pData[2] = NULL;
memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
pDecoder->DecodeFrame( pBuf + iBufPos, iSliceSize, pData, &sDstBufInfo );
if(sDstBufInfo.iBufferStatus == 1)
{
pDst[0] = (uint8_t *)pData[0];
pDst[1] = (uint8_t *)pData[1];
pDst[2] = (uint8_t *)pData[2];
}
iEnd = WelsTime();
iTotal += iEnd - iStart;
if ( (sDstBufInfo.iBufferStatus==1) )
{
iFrameNum++;
cOutputModule.Process((void_t **)pDst, &sDstBufInfo, pYuvFile);
if (sDstBufInfo.eBufferProperty == BUFFER_HOST)
{
iWidth = sDstBufInfo.UsrData.sSystemBuffer.iWidth;
iHeight = sDstBufInfo.UsrData.sSystemBuffer.iHeight;
}
else
{
iWidth = sDstBufInfo.UsrData.sVideoBuffer.iSurfaceWidth;
iHeight = sDstBufInfo.UsrData.sVideoBuffer.iSurfaceHeight;
}
if ( pOptionFile != NULL )
{
if ( iWidth != iLastWidth && iHeight != iLastHeight )
{
fwrite(&iFrameCount, sizeof(iFrameCount), 1, pOptionFile);
fwrite(&iWidth , sizeof(iWidth) , 1, pOptionFile);
fwrite(&iHeight, sizeof(iHeight), 1, pOptionFile);
iLastWidth = iWidth;
iLastHeight = iHeight;
}
}
++ iFrameCount;
}
iBufPos += iSliceSize;
++ iSliceIndex;
}
// Get pending last frame
pData[0] = NULL;
pData[1] = NULL;
pData[2] = NULL;
memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
pDecoder->DecodeFrame( NULL, 0, pData, &sDstBufInfo );
if(sDstBufInfo.iBufferStatus == 1)
{
pDst[0] = (uint8_t *)pData[0];
pDst[1] = (uint8_t *)pData[1];
pDst[2] = (uint8_t *)pData[2];
}
if ((sDstBufInfo.iBufferStatus==1))
{
cOutputModule.Process((void_t **)pDst, &sDstBufInfo, pYuvFile);
if (sDstBufInfo.eBufferProperty == BUFFER_HOST)
{
iWidth = sDstBufInfo.UsrData.sSystemBuffer.iWidth;
iHeight = sDstBufInfo.UsrData.sSystemBuffer.iHeight;
}
else
{
iWidth = sDstBufInfo.UsrData.sVideoBuffer.iSurfaceWidth;
iHeight = sDstBufInfo.UsrData.sVideoBuffer.iSurfaceHeight;
}
if ( pOptionFile != NULL )
{
/* Anyway, we need write in case of final frame decoding */
fwrite(&iFrameCount, sizeof(iFrameCount), 1, pOptionFile);
fwrite(&iWidth , sizeof(iWidth) , 1, pOptionFile);
fwrite(&iHeight, sizeof(iHeight), 1, pOptionFile);
iLastWidth = iWidth;
iLastHeight = iHeight;
}
++ iFrameCount;
}
#if defined ( STICK_STREAM_SIZE )
if ( fpTrack ){
fclose( fpTrack );
fpTrack = NULL;
}
#endif// STICK_STREAM_SIZE
dElapsed = iTotal / 1e6;
fprintf( stderr, "-------------------------------------------------------\n" );
fprintf( stderr, "iWidth: %d\nheight: %d\nFrames: %d\ndecode time: %f sec\nFPS: %f fps\n",
iWidth, iHeight, iFrameCount, dElapsed, (iFrameCount * 1.0)/dElapsed );
fprintf( stderr, "-------------------------------------------------------\n" );
// coverity scan uninitial
label_exit:
if (pBuf)
{
delete[] pBuf;
pBuf = NULL;
}
if ( pH264File )
{
fclose(pH264File);
pH264File = NULL;
}
if ( pYuvFile )
{
fclose(pYuvFile);
pYuvFile = NULL;
}
if ( pOptionFile )
{
fclose(pOptionFile);
pOptionFile = NULL;
}
}
#if !defined(__APPLE__)
int32_t main(int32_t iArgC, char* pArgV[])
#else
int32_t DecoderMain(int32_t iArgC, char * pArgV[])
#endif
{
ISVCDecoder *pDecoder = NULL;
SDecodingParam sDecParam = {0};
string strInputFile(""), strOutputFile(""), strOptionFile("");
sDecParam.sVideoProperty.size = sizeof( sDecParam.sVideoProperty );
if (iArgC < 2)
{
printf( "usage 1: h264dec.exe welsdec.cfg\n" );
printf( "usage 2: h264dec.exe welsdec.264 out.yuv\n" );
printf( "usage 3: h264dec.exe welsdec.264\n" );
return 1;
}
else if (iArgC == 2)
{
if (strstr(pArgV[1], ".cfg")) // read config file //confirmed_safe_unsafe_usage
{
CReadConfig cReadCfg(pArgV[1]);
string strTag[4];
string strReconFile("");
if ( !cReadCfg.ExistFile() ){
printf("Specified file: %s not exist, maybe invalid path or parameter settting.\n", cReadCfg.GetFileName().c_str());
return 1;
}
memset(&sDecParam, 0, sizeof(sDecParam));
while ( !cReadCfg.EndOfFile() ){
long nRd = cReadCfg.ReadLine(&strTag[0]);
if (nRd > 0){
if (strTag[0].compare("InputFile") == 0){
strInputFile = strTag[1];
}
else if (strTag[0].compare("OutputFile") == 0){
strOutputFile = strTag[1];
}
else if (strTag[0].compare("RestructionFile") == 0){
strReconFile = strTag[1];
int32_t iLen = strReconFile.length();
sDecParam.pFileNameRestructed = new char[iLen + 1];
if (sDecParam.pFileNameRestructed != NULL){
sDecParam.pFileNameRestructed[iLen] = 0;
}
strncpy(sDecParam.pFileNameRestructed, strReconFile.c_str(), iLen);//confirmed_safe_unsafe_usage
}
else if (strTag[0].compare("TargetDQID") == 0){
sDecParam.uiTargetDqLayer = (uint8_t)atol(strTag[1].c_str());
}
else if (strTag[0].compare("OutColorFormat") == 0){
sDecParam.iOutputColorFormat = atol(strTag[1].c_str());
}
else if (strTag[0].compare("ErrorConcealmentFlag") == 0){
sDecParam.uiEcActiveFlag = (uint8_t)atol(strTag[1].c_str());
}
else if (strTag[0].compare("CPULoad") == 0){
sDecParam.uiCpuLoad = (uint32_t)atol(strTag[1].c_str());
}
else if (strTag[0].compare("VideoBitstreamType") == 0){
sDecParam.sVideoProperty.eVideoBsType = (VIDEO_BITSTREAM_TYPE)atol(strTag[1].c_str());
}
}
}
if (strOutputFile.empty())
{
printf( "No output file specified in configuration file.\n" );
return 1;
}
}
else if (strstr(pArgV[1], ".264")) // no output dump yuv file, just try to render the decoded pictures //confirmed_safe_unsafe_usage
{
strInputFile = pArgV[1];
memset(&sDecParam, 0, sizeof(sDecParam));
sDecParam.iOutputColorFormat = videoFormatI420;
sDecParam.uiTargetDqLayer = (uint8_t)-1;
sDecParam.uiEcActiveFlag = 1;
sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
}
}
else //iArgC > 2
{
strInputFile = pArgV[1];
strOutputFile = pArgV[2];
memset(&sDecParam, 0, sizeof(sDecParam));
sDecParam.iOutputColorFormat = videoFormatI420;
sDecParam.uiTargetDqLayer = (uint8_t)-1;
sDecParam.uiEcActiveFlag = 1;
sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
if (iArgC > 3)
strOptionFile = pArgV[3];
if (strOutputFile.empty())
{
printf( "No output file specified in configuration file.\n" );
return 1;
}
}
if (strInputFile.empty())
{
printf( "No input file specified in configuration file.\n" );
return 1;
}
#if defined(_MSC_VER)
HMODULE hModule = LoadLibraryA(".\\welsdec.dll");
PCreateDecoderFunc pCreateDecoderFunc = NULL;
PDestroyDecoderFunc pDestroyDecoderFunc = NULL;
pCreateDecoderFunc = (PCreateDecoderFunc)::GetProcAddress(hModule, "CreateDecoder");
pDestroyDecoderFunc = (PDestroyDecoderFunc)::GetProcAddress(hModule, "DestroyDecoder");
if ((hModule != NULL) && (pCreateDecoderFunc != NULL) && (pDestroyDecoderFunc != NULL))
{
printf("load library sw function successfully\n");
if ( pCreateDecoderFunc( &pDecoder ) || (NULL == pDecoder) )
{
printf( "Create Decoder failed.\n" );
return 1;
}
}
else
{
printf("load library sw function failed\n");
return 1;
}
#elif defined(__APPLE__)
bool flag_load_bundle = load_bundle_welsdec();
get_functions_address_create_decoder(&pDecoder);
if (flag_load_bundle == false) {
printf( "Create Decoder failed.\n" );
return NULL;
}
#else
if ( CreateDecoder( &pDecoder ) || (NULL == pDecoder) )
{
printf( "Create Decoder failed.\n" );
return 1;
}
#endif
if ( pDecoder->Initialize( &sDecParam, INIT_TYPE_PARAMETER_BASED ) )
{
printf( "Decoder initialization failed.\n" );
return 1;
}
int32_t iWidth = 0;
int32_t iHeight= 0;
H264DecodeInstance( pDecoder, strInputFile.c_str(), strOutputFile.c_str(), iWidth, iHeight, (!strOptionFile.empty() ? (void_t*)(const_cast<char*>(strOptionFile.c_str())) : NULL) );
if (sDecParam.pFileNameRestructed != NULL){
delete []sDecParam.pFileNameRestructed;
sDecParam.pFileNameRestructed = NULL;
}
if ( pDecoder ){
pDecoder->Unintialize();
#if defined(_MSC_VER)
pDestroyDecoderFunc( pDecoder );
#elif defined(__APPLE__)
get_functions_address_free_decoder(pDecoder);
#else
DestroyDecoder(pDecoder);
#endif
}
return 0;
}

View File

@ -0,0 +1,269 @@
/*!
* \copy
* Copyright (c) 2011-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file load_bundle_functions.cpp
*
* \brief load bundle and function on Mac platform
*
* \date Created on 03/15/2011
*
* \description : 1. Load bundle: welsdec.bundle
* 2. Load address of function
* 3. Create or destroy decoder
*
*************************************************************************************
*/
#include <string.h>
#include <Carbon/Carbon.h>
#include <CoreFoundation/CFBundle.h>
#include <dlfcn.h>
#include <string>
#include "dec_console.h"
#include "codec_api.h"
typedef long (*LPCreateWelsCSDecoder)(ISVCDecoder** ppDecoder);
typedef void (*LPDestroyWelsCSDecoder)(ISVCDecoder* pDecoder);
typedef long (*LPCreateVHDController)();
typedef void (*LPDestroyVHDController)();
CFBundleRef g_at264Module = nil;
const char H264DecoderDLL[] = "welsdec.bundle";
CFBundleRef g_at264ModuleHWD = nil;
////////////////////////////////////////////////////////////////////////////////////////
int GetCurrentModulePath(char* lpModulePath, const int iPathMax)
{
if(lpModulePath == NULL || iPathMax <= 0)
{
return -1;
}
memset(lpModulePath, 0, iPathMax);
char cCurrentPath[PATH_MAX];
memset(cCurrentPath, 0, PATH_MAX);
Dl_info dlInfo;
static int sDummy;
dladdr((void*)&sDummy, &dlInfo);
strlcpy(cCurrentPath, dlInfo.dli_fname, PATH_MAX);
#if defined(__apple__)
// whether is self a framework ?
int locateNumber = 1;
struct FSRef currentPath;
OSStatus iStatus = FSPathMakeRef((unsigned char*)cCurrentPath, &currentPath, NULL);
if(noErr == iStatus)
{
LSItemInfoRecord info;
iStatus = LSCopyItemInfoForRef(&currentPath, kLSRequestExtension, &info);
if(noErr == iStatus && NULL == info.extension)
{
locateNumber = 4;
}
}
#else
int locateNumber = 1;
#endif
std::string strPath(cCurrentPath);
int pos = std::string::npos;
for(int i = 0; i < locateNumber; i++)
{
pos = strPath.rfind('/');
if(std::string::npos == pos)
{
break;
}
strPath.erase(pos);
}
if(std::string::npos == pos)
{
return -2;
}
cCurrentPath[pos] = 0;
strlcpy(lpModulePath, cCurrentPath, iPathMax);
strlcat(lpModulePath, "/", iPathMax);
return 0;
}
CFBundleRef LoadBundle(const char* lpBundlePath)
{
if(lpBundlePath == NULL)
{
return NULL;
}
CFStringRef bundlePath = CFStringCreateWithCString(kCFAllocatorSystemDefault, lpBundlePath, CFStringGetSystemEncoding());
if(NULL == bundlePath)
{
return NULL;
}
CFURLRef bundleURL = CFURLCreateWithString(kCFAllocatorSystemDefault, bundlePath, NULL);
if(NULL == bundleURL)
{
return NULL;
}
#endif
// 2.get bundle ref
CFBundleRef bundleRef = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL);
CFRelease(bundleURL);
if(NULL != bundleRef)
{
}
return bundleRef;
}
void* GetProcessAddress(CFBundleRef bundleRef, const char* lpProcName)
{
void *processAddress = NULL;
if(NULL != bundleRef)
{
CFStringRef cfProcName = CFStringCreateWithCString(kCFAllocatorSystemDefault, lpProcName, CFStringGetSystemEncoding());
processAddress = CFBundleGetFunctionPointerForName(bundleRef, cfProcName);
CFRelease(cfProcName);
}
return processAddress;
}
////////////////////////
bool load_bundle_welsdec()
{
char achPath[512] = {0};
GetCurrentModulePath(achPath, 512);
strlcat(achPath, H264DecoderDLL, 512);
g_at264Module = LoadBundle(achPath);
if (g_at264Module == NULL)
return false;
return true;
}
void free_bundle_welsdec()
{
if(g_at264Module != NULL)
{
CFBundleUnloadExecutable(g_at264Module);
}
}
bool get_functions_address_create_decoder(ISVCDecoder** ppDecoder)
{
if(!g_at264Module)
return false;
LPCreateWelsCSDecoder pfuncCreateSWDec =
(LPCreateWelsCSDecoder)GetProcessAddress(g_at264Module, "CreateSVCDecoder");
LPCreateVHDController pfuncCreateHWDec =
(LPCreateVHDController)GetProcessAddress(g_at264Module, "CreateSVCVHDController");
if(pfuncCreateSWDec != NULL)
{
pfuncCreateSWDec( ppDecoder );
}
else
{
return false;
}
if(pfuncCreateHWDec != NULL)
{
pfuncCreateHWDec();
}
else
{
return false;
}
return true;
}
bool get_functions_address_free_decoder(ISVCDecoder* pDecoder)
{
if(!g_at264Module)
return false;
LPDestroyWelsCSDecoder pfuncDestroySWDec =
(LPDestroyWelsCSDecoder)GetProcessAddress(g_at264Module, "DestroySVCDecoder");
LPDestroyVHDController pfuncDestroyHWDec =
(LPDestroyVHDController)GetProcessAddress(g_at264Module, "DestroySVCVHDController");
if(pfuncDestroySWDec != NULL)
{
pfuncDestroySWDec( pDecoder );
}
else
{
return false;
}
if(pfuncDestroyHWDec != NULL)
{
pfuncDestroyHWDec();
}
else
{
return false;
}
return true;
}

View File

@ -0,0 +1,128 @@
/*!
* \copy
* Copyright (c) 2008-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* read_config.h
*
* Abstract
* Class for reading parameter settings in a configure file.
*
* History
* 08/18/2008 Created
*
*****************************************************************************/
#if !defined(WIN32)
#include <string.h>
#include <stdio.h>
#endif
#include "read_config.h"
CReadConfig::CReadConfig( const char *kpConfigFileName )
: m_pCfgFile(0)
, m_strCfgFileName(kpConfigFileName)
, m_ulLines(0)
{
if ( strlen(kpConfigFileName) > 0 ){ // FIXME: To check validation in configure file name
m_pCfgFile = fopen(kpConfigFileName, "r");
}
}
CReadConfig::~CReadConfig()
{
if ( m_pCfgFile ){
fclose( m_pCfgFile );
m_pCfgFile = NULL;
}
}
long CReadConfig::ReadLine( string* pStr, const int kiValSize/* = 4*/ )
{
if ( m_pCfgFile == NULL || pStr == NULL || kiValSize <= 1)
return 0;
string *strTags = &pStr[0];
int iTagNum = 0, iNum = 0;
bool bCommentFlag = false;
while (iNum < kiValSize) {
pStr[iNum] = "";
++ iNum;
}
do {
const char kChar = (char)fgetc(m_pCfgFile);
if ( kChar == '\n' || feof(m_pCfgFile) ){
++ m_ulLines;
break;
}
if ( kChar == '#' )
bCommentFlag = true;
if ( !bCommentFlag ){
if ( kChar == '\t' || kChar == ' ' ){
if ( iTagNum >= kiValSize )
break;
if ( !(*strTags).empty() ){
++ iTagNum;
strTags = &pStr[iTagNum];
}
}
else
*strTags += kChar;
}
} while(true);
return 1+iTagNum;
}
const bool CReadConfig::EndOfFile()
{
if (m_pCfgFile == NULL)
return true;
return feof(m_pCfgFile) ? true : false;
}
const int CReadConfig::GetLines()
{
return m_ulLines;
}
const bool CReadConfig::ExistFile()
{
return (m_pCfgFile != NULL);
}
const string& CReadConfig::GetFileName()
{
return m_strCfgFileName;
}

View File

@ -0,0 +1,82 @@
/*!
* \copy
* Copyright (c) 2008-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* read_config.h
*
* Abstract
* Class for reading parameter settings in a configure file.
*
* History
* 08/18/2008 Created
*
*****************************************************************************/
#ifndef READ_CONFIG_H__
#define READ_CONFIG_H__
#include <stdlib.h>
#include <string>
#include "wels_const.h"
using namespace std;
typedef struct tagFilesSet
{
string strBsFile;
string strSeqFile; // for cmd lines
struct
{
string strLayerCfgFile;
string strSeqFile;
} sSpatialLayers[MAX_DEPENDENCY_LAYER];
} SFilesSet;
class CReadConfig
{
public:
CReadConfig();
CReadConfig( const char *pConfigFileName );
CReadConfig( const string& pConfigFileName );
virtual ~CReadConfig();
void Openf(const char * strFile);
long ReadLine( string* strVal, const int iValSize = 4 );
const bool EndOfFile();
const int GetLines();
const bool ExistFile();
const string& GetFileName();
private:
FILE *m_pCfgFile;
string m_strCfgFileName;
unsigned long m_iLines;
};
#endif // READ_CONFIG_H__

View File

@ -0,0 +1,149 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <string.h>
#include <Carbon/Carbon.h>
#include <CoreFoundation/CFBundle.h>
#include <dlfcn.h>
#include <string>
#include "bundleloader.h"
#include "codec_api.h"
typedef long (*LPCreateWelsCSEncoder)(ISVCEncoder** ppEncoder);
typedef void (*LPDestroyWelsCSEncoder)(ISVCEncoder* pEncoder);
CFBundleRef g_at264Module = nil;
const char H264EncoderDLL[] = "welsenc.bundle";
int WelsEncGetCurrentModulePath(char* lpModulePath, const int iPathMax)
{
if(lpModulePath == NULL || iPathMax <= 0)
{
return -1;
}
memset(lpModulePath, 0, iPathMax);
char cCurrentPath[PATH_MAX];
memset(cCurrentPath, 0, PATH_MAX);
Dl_info dlInfo;
static int sDummy;
dladdr((void*)&sDummy, &dlInfo);
strlcpy(cCurrentPath, dlInfo.dli_fname, PATH_MAX);
int locateNumber = 1;
std::string strPath(cCurrentPath);
int pos = std::string::npos;
for(int i = 0; i < locateNumber; i++)
{
pos = strPath.rfind('/');
if(std::string::npos == pos)
{
break;
}
strPath.erase(pos);
}
if(std::string::npos == pos)
{
return -2;
}
cCurrentPath[pos] = 0;
strlcpy(lpModulePath, cCurrentPath, iPathMax);
strlcat(lpModulePath, "/", iPathMax);
return 0;
}
int32_t WelsEncBundleLoad()
{
char achPath[512] = {0};
WelsEncGetCurrentModulePath(achPath, 512);
strlcat(achPath, H264EncoderDLL, 512);
g_at264Module = LoadBundle(achPath);
if (g_at264Module == NULL)
return 1;
else
return 0;
}
void WelsEncBundleFree()
{
if(g_at264Module != NULL)
{
CFBundleUnloadExecutable(g_at264Module);
}
}
int32_t WelsEncBundleCreateEncoder(ISVCEncoder** ppEncoder)
{
if(!g_at264Module)
return 1;
LPCreateWelsCSEncoder pfuncCreateCSEnc =
(LPCreateWelsCSEncoder)GetProcessAddress(g_at264Module, "CreateSVCEncoder");
if(pfuncCreateCSEnc != NULL)
{
return (pfuncCreateCSEnc( ppEncoder ));
}
return 1;
}
int32_t WelsEncBundleDestroyEncoder(ISVCEncoder* pEncoder)
{
if(!g_at264Module)
return 1;
LPDestroyWelsCSEncoder pfuncDestroyCSEnc =
(LPDestroyWelsCSEncoder)GetProcessAddress(g_at264Module, "DestroySVCEncoder");
if(pfuncDestroyCSEnc != NULL){
pfuncDestroyCSEnc( pEncoder );
return 0;
}
else
return 1;
}

View File

@ -0,0 +1,160 @@
/*!
* \copy
* Copyright (c) 2008-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* read_config.h
*
* Abstract
* Class for reading parameter settings in a configure file.
*
* History
* 08/18/2008 Created
*
*****************************************************************************/
#include <stdio.h>
#include <string.h>
#include "read_config.h"
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996)
#endif
CReadConfig::CReadConfig()
: m_pCfgFile( NULL )
, m_strCfgFileName("")
, m_iLines( 0 )
{
}
CReadConfig::CReadConfig( const char *kpConfigFileName )
: m_pCfgFile(0)
, m_strCfgFileName(kpConfigFileName)
, m_iLines(0)
{
if ( strlen(kpConfigFileName) > 0 ){ // confirmed_safe_unsafe_usage
m_pCfgFile = fopen(kpConfigFileName, "r");
}
}
CReadConfig::CReadConfig( const string& kpConfigFileName )
: m_pCfgFile(0)
, m_strCfgFileName(kpConfigFileName)
, m_iLines(0)
{
if ( kpConfigFileName.length() > 0 )
{
m_pCfgFile = fopen(kpConfigFileName.c_str(), "r");
}
}
CReadConfig::~CReadConfig()
{
if ( m_pCfgFile ){
fclose( m_pCfgFile );
m_pCfgFile = NULL;
}
}
void CReadConfig::Openf(const char *kpStrFile)
{
if ( kpStrFile != NULL && strlen(kpStrFile) > 0 ) // confirmed_safe_unsafe_usage
{
m_strCfgFileName = kpStrFile;
m_pCfgFile = fopen(kpStrFile, "r");
}
}
long CReadConfig::ReadLine( string* pVal, const int kiValSize/* = 4*/ )
{
if ( m_pCfgFile == NULL || pVal == NULL || kiValSize <= 1)
return 0;
string *strTags = &pVal[0];
int nTagNum = 0, n = 0;
bool bCommentFlag = false;
while (n < kiValSize) {
pVal[n] = "";
++ n;
}
do {
const char kCh = (char)fgetc(m_pCfgFile);
if ( kCh == '\n' || feof(m_pCfgFile) ){
++ m_iLines;
break;
}
if ( kCh == '#' )
bCommentFlag = true;
if ( !bCommentFlag ){
if ( kCh == '\t' || kCh == ' ' ){
if ( nTagNum >= kiValSize )
break;
if ( !(*strTags).empty() ){
++ nTagNum;
strTags = &pVal[nTagNum];
}
}
else
*strTags += kCh;
}
} while(true);
return 1+nTagNum;
}
const bool CReadConfig::EndOfFile()
{
if (m_pCfgFile == NULL)
return true;
return feof(m_pCfgFile) ? true : false;
}
const int CReadConfig::GetLines()
{
return m_iLines;
}
const bool CReadConfig::ExistFile()
{
return (m_pCfgFile != NULL);
}
const string& CReadConfig::GetFileName()
{
return m_strCfgFileName;
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,235 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* sse2inc.asm
;*
;* Abstract
;* macro and constant
;*
;* History
;* 8/5/2009 Created
;*
;*
;*************************************************************************/
;***********************************************************************
; Options, for DEBUG
;***********************************************************************
%if 1
%define MOVDQ movdqa
%else
%define MOVDQ movdqu
%endif
%if 1
%define WELSEMMS emms
%else
%define WELSEMMS
%endif
BITS 32
;***********************************************************************
; Macros
;***********************************************************************
%macro WELS_EXTERN 1
%ifdef PREFIX
global _%1
%define %1 _%1
%else
global %1
%endif
%endmacro
%macro WELS_AbsW 2
pxor %2, %2
psubw %2, %1
pmaxsw %1, %2
%endmacro
%macro MMX_XSwap 4
movq %4, %2
punpckh%1 %4, %3
punpckl%1 %2, %3
%endmacro
; pOut mm1, mm4, mm5, mm3
%macro MMX_Trans4x4W 5
MMX_XSwap wd, %1, %2, %5
MMX_XSwap wd, %3, %4, %2
MMX_XSwap dq, %1, %3, %4
MMX_XSwap dq, %5, %2, %3
%endmacro
;for TRANSPOSE
%macro SSE2_XSawp 4
movdqa %4, %2
punpckl%1 %2, %3
punpckh%1 %4, %3
%endmacro
; in: xmm1, xmm2, xmm3, xmm4 pOut: xmm1, xmm4, xmm5, mm3
%macro SSE2_Trans4x4D 5
SSE2_XSawp dq, %1, %2, %5
SSE2_XSawp dq, %3, %4, %2
SSE2_XSawp qdq, %1, %3, %4
SSE2_XSawp qdq, %5, %2, %3
%endmacro
;in: xmm0, xmm1, xmm2, xmm3 pOut: xmm0, xmm1, xmm3, xmm4
%macro SSE2_TransTwo4x4W 5
SSE2_XSawp wd, %1, %2, %5
SSE2_XSawp wd, %3, %4, %2
SSE2_XSawp dq, %1, %3, %4
SSE2_XSawp dq, %5, %2, %3
SSE2_XSawp qdq, %1, %5, %2
SSE2_XSawp qdq, %4, %3, %5
%endmacro
;in: m1, m2, m3, m4, m5, m6, m7, m8
;pOut: m5, m3, m4, m8, m6, m2, m7, m1
%macro SSE2_TransTwo8x8B 9
movdqa %9, %8
SSE2_XSawp bw, %1, %2, %8
SSE2_XSawp bw, %3, %4, %2
SSE2_XSawp bw, %5, %6, %4
movdqa %6, %9
movdqa %9, %4
SSE2_XSawp bw, %7, %6, %4
SSE2_XSawp wd, %1, %3, %6
SSE2_XSawp wd, %8, %2, %3
SSE2_XSawp wd, %5, %7, %2
movdqa %7, %9
movdqa %9, %3
SSE2_XSawp wd, %7, %4, %3
SSE2_XSawp dq, %1, %5, %4
SSE2_XSawp dq, %6, %2, %5
SSE2_XSawp dq, %8, %7, %2
movdqa %7, %9
movdqa %9, %5
SSE2_XSawp dq, %7, %3, %5
SSE2_XSawp qdq, %1, %8, %3
SSE2_XSawp qdq, %4, %2, %8
SSE2_XSawp qdq, %6, %7, %2
movdqa %7, %9
movdqa %9, %1
SSE2_XSawp qdq, %7, %5, %1
movdqa %5, %9
%endmacro
;xmm0, xmm6, xmm7, [eax], [ecx]
;xmm7 = 0, eax = pix1, ecx = pix2, xmm0 save the result
%macro SSE2_LoadDiff8P 5
movq %1, %4
punpcklbw %1, %3
movq %2, %5
punpcklbw %2, %3
psubw %1, %2
%endmacro
; m2 = m1 + m2, m1 = m1 - m2
%macro SSE2_SumSub 3
movdqa %3, %2
paddw %2, %1
psubw %1, %3
%endmacro
%macro butterfly_1to16_sse 3 ; xmm? for dst, xmm? for tmp, one byte for pSrc [generic register name: a/b/c/d]
mov %3h, %3l
movd %1, e%3x ; i.e, 1% = eax (=b0)
pshuflw %2, %1, 00h ; ..., b0 b0 b0 b0 b0 b0 b0 b0
pshufd %1, %2, 00h ; b0 b0 b0 b0, b0 b0 b0 b0, b0 b0 b0 b0, b0 b0 b0 b0
%endmacro
;copy a dw into a xmm for 8 times
%macro SSE2_Copy8Times 2
movd %1, %2
punpcklwd %1, %1
pshufd %1, %1, 0
%endmacro
;copy a db into a xmm for 16 times
%macro SSE2_Copy16Times 2
movd %1, %2
pshuflw %1, %1, 0
punpcklqdq %1, %1
packuswb %1, %1
%endmacro
;***********************************************************************
;preprocessor constants
;***********************************************************************
;dw 32,32,32,32,32,32,32,32 for xmm
;dw 32,32,32,32 for mm
%macro WELS_DW32 1
pcmpeqw %1,%1
psrlw %1,15
psllw %1,5
%endmacro
;dw 1, 1, 1, 1, 1, 1, 1, 1 for xmm
;dw 1, 1, 1, 1 for mm
%macro WELS_DW1 1
pcmpeqw %1,%1
psrlw %1,15
%endmacro
;all 0 for xmm and mm
%macro WELS_Zero 1
pxor %1, %1
%endmacro
;dd 1, 1, 1, 1 for xmm
;dd 1, 1 for mm
%macro WELS_DD1 1
pcmpeqw %1,%1
psrld %1,31
%endmacro
;dB 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
%macro WELS_DB1 1
pcmpeqw %1,%1
psrlw %1,15
packuswb %1,%1
%endmacro

View File

@ -0,0 +1,413 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* block_add.asm
;*
;* Abstract
;* add block
;*
;* History
;* 09/21/2009 Created
;*
;*
;*************************************************************************/
%include "asm_inc.asm"
BITS 32
;*******************************************************************************
; Macros and other preprocessor constants
;*******************************************************************************
%macro BLOCK_ADD_16_SSE2 4
movdqa xmm0, [%2]
movdqa xmm1, [%3]
movdqa xmm2, [%3+10h]
movdqa xmm6, xmm0
punpcklbw xmm0, xmm7
punpckhbw xmm6, xmm7
paddw xmm0, xmm1
paddw xmm6, xmm2
packuswb xmm0, xmm6
movdqa [%1], xmm0
lea %2, [%2+%4]
lea %3, [%3+%4*2]
lea %1, [%1+%4]
%endmacro
%macro BLOCK_ADD_8_MMXEXT 4
movq mm0, [%2]
movq mm1, [%3]
movq mm2, [%3+08h]
movq mm6, mm0
punpcklbw mm0, mm7
punpckhbw mm6, mm7
paddw mm0, mm1
paddw mm6, mm2
packuswb mm0, mm6
movq [%1], mm0
lea %2, [%2+%4]
lea %3, [%3+%4*2]
lea %1, [%1+%4]
%endmacro
%macro BLOCK_ADD_16_STRIDE_SSE2 5
movdqa xmm0, [%2]
movdqa xmm1, [%3]
movdqa xmm2, [%3+10h]
movdqa xmm6, xmm0
punpcklbw xmm0, xmm7
punpckhbw xmm6, xmm7
paddw xmm0, xmm1
paddw xmm6, xmm2
packuswb xmm0, xmm6
movdqa [%1], xmm0
lea %2, [%2+%4]
lea %3, [%3+%5*2]
lea %1, [%1+%4]
%endmacro
%macro BLOCK_ADD_8_STRIDE_MMXEXT 5
movq mm0, [%2]
movq mm1, [%3]
movq mm2, [%3+08h]
movq mm6, mm0
punpcklbw mm0, mm7
punpckhbw mm6, mm7
paddw mm0, mm1
paddw mm6, mm2
packuswb mm0, mm6
movq [%1], mm0
lea %2, [%2+%4]
lea %3, [%3+%5*2]
lea %1, [%1+%4]
%endmacro
%macro BLOCK_ADD_8_STRIDE_2_LINES_SSE2 5
movdqa xmm1, [%3]
movq xmm0, [%2]
punpcklbw xmm0, xmm7
paddw xmm0, xmm1
packuswb xmm0, xmm7
movq [%1], xmm0
movdqa xmm3, [%3+%5*2]
movq xmm2, [%2+%4]
punpcklbw xmm2, xmm7
paddw xmm2, xmm3
packuswb xmm2, xmm7
movq [%1+%4], xmm2
lea %1, [%1+%4*2]
lea %2, [%2+%4*2]
lea %3, [%3+%5*4]
%endmacro
%macro CHECK_DATA_16_ZERO_SSE4 3
mov eax, 0h
movdqa xmm0, [%1]
movdqa xmm1, [%1+10h]
mov ebx, [ecx]
por xmm0, xmm1
ptest xmm7, xmm0
cmovae eax, %3
add %1, 20h
add ecx, 04h
mov byte [%2+ebx], al
%endmacro
%macro CHECK_RS_4x4_BLOCK_2_ZERO_SSE4 5
movdqa xmm0, [%1]
movdqa xmm1, [%1+%3]
movdqa xmm2, [%1+%3*2]
movdqa xmm3, [%1+%4]
mov eax, 0h
mov ebx, 0h
movdqa xmm4, xmm0
movdqa xmm5, xmm2
punpcklqdq xmm0, xmm1
punpckhqdq xmm4, xmm1
punpcklqdq xmm2, xmm3
punpckhqdq xmm5, xmm3
por xmm0, xmm2
por xmm4, xmm5
ptest xmm7, xmm0
cmovae eax, %5
ptest xmm7, xmm4
cmovae ebx, %5
mov byte [%2], al
mov byte [%2+1], bl
%endmacro
%macro DATA_COPY_16x2_SSE2 3
movdqa xmm0, [%1]
movdqa xmm1, [%1+10h]
movdqa xmm2, [%1+%3]
movdqa xmm3, [%1+%3+10h]
movdqa [%2], xmm0
movdqa [%2+10h], xmm1
movdqa [%2+20h], xmm2
movdqa [%2+30h], xmm3
lea %1, [%1+%3*2]
lea %2, [%2+40h]
%endmacro
%macro DATA_COPY_8x4_SSE2 4
movdqa xmm0, [%1]
movdqa xmm1, [%1+%3]
movdqa xmm2, [%1+%3*2]
movdqa xmm3, [%1+%4]
movdqa [%2], xmm0
movdqa [%2+10h], xmm1
movdqa [%2+20h], xmm2
movdqa [%2+30h], xmm3
lea %1, [%1+%3*4]
lea %2, [%2+40h]
%endmacro
%macro CHECK_DATA_16_ZERO_SSE2 3
mov eax, 0h
movdqa xmm0, [%1]
movdqa xmm1, [%1+10h]
mov ebx, [ecx]
pcmpeqw xmm0, xmm7
pcmpeqw xmm1, xmm7
packsswb xmm0, xmm1
pmovmskb edx, xmm0
sub edx, 0ffffh
cmovb eax, ebp
add ecx, 4
add %1, 20h
mov byte [%2+ebx], al
%endmacro
%macro CHECK_RS_4x4_BLOCK_2_ZERO_SSE2 5
movdqa xmm0, [%1]
movdqa xmm1, [%1 + %3]
movdqa xmm2, [%1 + %3*2]
movdqa xmm3, [%1 + %4]
movdqa xmm4, xmm0
movdqa xmm5, xmm2
punpcklqdq xmm0, xmm1
punpckhqdq xmm4, xmm1
punpcklqdq xmm2, xmm3
punpckhqdq xmm5, xmm3
pcmpeqw xmm0, xmm7
pcmpeqw xmm2, xmm7
pcmpeqw xmm4, xmm7
pcmpeqw xmm5, xmm7
packsswb xmm0, xmm2
packsswb xmm4, xmm5
pmovmskb eax, xmm0
pmovmskb ebx, xmm4
sub eax, 0ffffh
mov eax, 0
cmovb eax, %5
sub ebx, 0ffffh
mov ebx, 0
cmovb ebx, %5
mov byte [%2], al
mov byte [%2+1], bl
%endmacro
;*******************************************************************************
; Data
;*******************************************************************************
%ifdef FORMAT_COFF
SECTION .rodata data
%else
SECTION .rodata align=16
%endif
ALIGN 16
SubMbScanIdx:
dd 0x0, 0x1, 0x4, 0x5,
dd 0x2, 0x3, 0x6, 0x7,
dd 0x8, 0x9, 0xc, 0xd,
dd 0xa, 0xb, 0xe, 0xf,
dd 0x10, 0x11, 0x14, 0x15,
dd 0x12, 0x13, 0x16, 0x17,
;*******************************************************************************
; Code
;*******************************************************************************
SECTION .text
WELS_EXTERN WelsResBlockZero16x16_sse2
ALIGN 16
;*******************************************************************************
; void_t WelsResBlockZero16x16_sse2(int16_t* pBlock,int32_t iStride)
;*******************************************************************************
WelsResBlockZero16x16_sse2:
push esi
mov esi, [esp+08h]
mov ecx, [esp+0ch]
lea ecx, [ecx*2]
lea eax, [ecx*3]
pxor xmm7, xmm7
; four lines
movdqa [esi], xmm7
movdqa [esi+10h], xmm7
movdqa [esi+ecx], xmm7
movdqa [esi+ecx+10h], xmm7
movdqa [esi+ecx*2], xmm7
movdqa [esi+ecx*2+10h], xmm7
movdqa [esi+eax], xmm7
movdqa [esi+eax+10h], xmm7
; four lines
lea esi, [esi+ecx*4]
movdqa [esi], xmm7
movdqa [esi+10h], xmm7
movdqa [esi+ecx], xmm7
movdqa [esi+ecx+10h], xmm7
movdqa [esi+ecx*2], xmm7
movdqa [esi+ecx*2+10h], xmm7
movdqa [esi+eax], xmm7
movdqa [esi+eax+10h], xmm7
; four lines
lea esi, [esi+ecx*4]
movdqa [esi], xmm7
movdqa [esi+10h], xmm7
movdqa [esi+ecx], xmm7
movdqa [esi+ecx+10h], xmm7
movdqa [esi+ecx*2], xmm7
movdqa [esi+ecx*2+10h], xmm7
movdqa [esi+eax], xmm7
movdqa [esi+eax+10h], xmm7
; four lines
lea esi, [esi+ecx*4]
movdqa [esi], xmm7
movdqa [esi+10h], xmm7
movdqa [esi+ecx], xmm7
movdqa [esi+ecx+10h], xmm7
movdqa [esi+ecx*2], xmm7
movdqa [esi+ecx*2+10h], xmm7
movdqa [esi+eax], xmm7
movdqa [esi+eax+10h], xmm7
pop esi
ret
WELS_EXTERN WelsResBlockZero8x8_sse2
ALIGN 16
;*******************************************************************************
; void_t WelsResBlockZero8x8_sse2(int16_t * pBlock, int32_t iStride)
;*******************************************************************************
WelsResBlockZero8x8_sse2:
push esi
mov esi, [esp+08h]
mov ecx, [esp+0ch]
lea ecx, [ecx*2]
lea eax, [ecx*3]
pxor xmm7, xmm7
movdqa [esi], xmm7
movdqa [esi+ecx], xmm7
movdqa [esi+ecx*2], xmm7
movdqa [esi+eax], xmm7
lea esi, [esi+ecx*4]
movdqa [esi], xmm7
movdqa [esi+ecx], xmm7
movdqa [esi+ecx*2], xmm7
movdqa [esi+eax], xmm7
pop esi
ret

View File

@ -0,0 +1,169 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* cpu_mmx.asm
;*
;* Abstract
;* verify cpuid feature support and cpuid detection
;*
;* History
;* 04/29/2009 Created
;*
;*************************************************************************/
bits 32
;******************************************************************************************
; Macros
;******************************************************************************************
%macro WELS_EXTERN 1
%ifdef PREFIX
global _%1
%define %1 _%1
%else
global %1
%endif
%endmacro
;******************************************************************************************
; Code
;******************************************************************************************
SECTION .text
; refer to "The IA-32 Intel(R) Architecture Software Developers Manual, Volume 2A A-M"
; section CPUID - CPU Identification
WELS_EXTERN WelsCPUIdVerify
ALIGN 16
;******************************************************************************************
; int32_t WelsCPUIdVerify()
;******************************************************************************************
WelsCPUIdVerify:
pushfd ; decrease the SP by 4 and load EFLAGS register onto stack, pushfd 32 bit and pushf for 16 bit
pushfd ; need push 2 EFLAGS, one for processing and the another one for storing purpose
pop ecx ; get EFLAGS to bit manipulation
mov eax, ecx ; store into ecx followed
xor eax, 00200000h ; get ID flag (bit 21) of EFLAGS to directly indicate cpuid support or not
xor eax, ecx ; get the ID flag bitwise, eax - 0: not support; otherwise: support
popfd ; store back EFLAGS and keep unchanged for system
ret
WELS_EXTERN WelsCPUId
ALIGN 16
;****************************************************************************************************
; void WelsCPUId( int32_t index, int32_t *uiFeatureA, int32_t *uiFeatureB, int32_t *uiFeatureC, int32_t *uiFeatureD )
;****************************************************************************************************
WelsCPUId:
push ebx
push edi
mov eax, [esp+12] ; operating index
cpuid ; cpuid
; processing various information return
mov edi, [esp+16]
mov [edi], eax
mov edi, [esp+20]
mov [edi], ebx
mov edi, [esp+24]
mov [edi], ecx
mov edi, [esp+28]
mov [edi], edx
pop edi
pop ebx
ret
WELS_EXTERN WelsCPUSupportAVX
; need call after cpuid=1 and eax, ecx flag got then
ALIGN 16
;****************************************************************************************************
; int32_t WelsCPUSupportAVX( uint32_t eax, uint32_t ecx )
;****************************************************************************************************
WelsCPUSupportAVX:
mov eax, [esp+4]
mov ecx, [esp+8]
; refer to detection of AVX addressed in INTEL AVX manual document
and ecx, 018000000H
cmp ecx, 018000000H ; check both OSXSAVE and AVX feature flags
jne avx_not_supported
; processor supports AVX instructions and XGETBV is enabled by OS
mov ecx, 0 ; specify 0 for XFEATURE_ENABLED_MASK register
XGETBV ; result in EDX:EAX
and eax, 06H
cmp eax, 06H ; check OS has enabled both XMM and YMM state support
jne avx_not_supported
mov eax, 1
ret
avx_not_supported:
mov eax, 0
ret
WELS_EXTERN WelsCPUSupportFMA
; need call after cpuid=1 and eax, ecx flag got then
ALIGN 16
;****************************************************************************************************
; int32_t WelsCPUSupportFMA( uint32_t eax, uint32_t ecx )
;****************************************************************************************************
WelsCPUSupportFMA:
mov eax, [esp+4]
mov ecx, [esp+8]
; refer to detection of FMA addressed in INTEL AVX manual document
and ecx, 018001000H
cmp ecx, 018001000H ; check OSXSAVE, AVX, FMA feature flags
jne fma_not_supported
; processor supports AVX,FMA instructions and XGETBV is enabled by OS
mov ecx, 0 ; specify 0 for XFEATURE_ENABLED_MASK register
XGETBV ; result in EDX:EAX
and eax, 06H
cmp eax, 06H ; check OS has enabled both XMM and YMM state support
jne fma_not_supported
mov eax, 1
ret
fma_not_supported:
mov eax, 0
ret
WELS_EXTERN WelsEmms
ALIGN 16
;******************************************************************************************
; void WelsEmms()
;******************************************************************************************
WelsEmms:
emms ; empty mmx technology states
ret

View File

@ -0,0 +1,129 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* ?Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* ?Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* dct.asm
;*
;* Abstract
;* WelsDctFourT4_sse2
;*
;* History
;* 8/4/2009 Created
;*
;*
;*************************************************************************/
%include "asm_inc.asm"
BITS 32
;*******************************************************************************
; Macros and other preprocessor constants
;*******************************************************************************
%macro MMX_SumSubDiv2 3
movq %3, %2
psraw %3, $1
paddw %3, %1
psraw %1, $1
psubw %1, %2
%endmacro
%macro MMX_SumSub 3
movq %3, %2
psubw %2, %1
paddw %1, %3
%endmacro
%macro MMX_IDCT 6
MMX_SumSub %4, %5, %6
MMX_SumSubDiv2 %3, %2, %1
MMX_SumSub %1, %4, %6
MMX_SumSub %3, %5, %6
%endmacro
%macro MMX_StoreDiff4P 5
movd %2, %5
punpcklbw %2, %4
paddw %1, %3
psraw %1, $6
paddsw %1, %2
packuswb %1, %2
movd %5, %1
%endmacro
;*******************************************************************************
; Code
;*******************************************************************************
SECTION .text
WELS_EXTERN IdctResAddPred_mmx
ALIGN 16
;*******************************************************************************
; void_t __cdecl IdctResAddPred_mmx( uint8_t *pPred, const int32_t kiStride, int16_t *pRs )
;*******************************************************************************
IdctResAddPred_mmx:
%define pushsize 0
%define pPred esp+pushsize+4
%define kiStride esp+pushsize+8
%define pRs esp+pushsize+12
mov eax, [pRs ]
mov edx, [pPred ]
mov ecx, [kiStride]
movq mm0, [eax+ 0]
movq mm1, [eax+ 8]
movq mm2, [eax+16]
movq mm3, [eax+24]
MMX_Trans4x4W mm0, mm1, mm2, mm3, mm4
MMX_IDCT mm1, mm2, mm3, mm4, mm0, mm6
MMX_Trans4x4W mm1, mm3, mm0, mm4, mm2
MMX_IDCT mm3, mm0, mm4, mm2, mm1, mm6
WELS_Zero mm7
WELS_DW32 mm6
MMX_StoreDiff4P mm3, mm0, mm6, mm7, [edx]
MMX_StoreDiff4P mm4, mm0, mm6, mm7, [edx+ecx]
lea edx, [edx+2*ecx]
MMX_StoreDiff4P mm1, mm0, mm6, mm7, [edx]
MMX_StoreDiff4P mm2, mm0, mm6, mm7, [edx+ecx]
%undef pushsize
%undef pPred
%undef kiStride
%undef pRs
emms
ret

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,655 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* expand_picture.asm
;*
;* Abstract
;* mmxext/sse for expand_frame
;*
;* History
;* 09/25/2009 Created
;*
;*
;*************************************************************************/
%include "asm_inc.asm"
BITS 32
;***********************************************************************
; Macros and other preprocessor constants
;***********************************************************************
;***********************************************************************
; Local Data (Read Only)
;***********************************************************************
;SECTION .rodata pData align=16
;***********************************************************************
; Various memory constants (trigonometric values or rounding values)
;***********************************************************************
;%define PADDING_SIZE_ASM 32 ; PADDING_LENGTH
;***********************************************************************
; Code
;***********************************************************************
SECTION .text
;WELS_EXTERN expand_picture_luma_mmx
;WELS_EXTERN expand_picture_chroma_mmx
WELS_EXTERN ExpandPictureLuma_sse2
WELS_EXTERN ExpandPictureChromaAlign_sse2 ; for chroma alignment
WELS_EXTERN ExpandPictureChromaUnalign_sse2 ; for chroma unalignment
;;;;;;;expanding result;;;;;;;
;aaaa|attttttttttttttttb|bbbb
;aaaa|attttttttttttttttb|bbbb
;aaaa|attttttttttttttttb|bbbb
;aaaa|attttttttttttttttb|bbbb
;----------------------------
;aaaa|attttttttttttttttb|bbbb
;llll|l r|rrrr
;llll|l r|rrrr
;llll|l r|rrrr
;llll|l r|rrrr
;llll|l r|rrrr
;cccc|ceeeeeeeeeeeeeeeed|dddd
;----------------------------
;cccc|ceeeeeeeeeeeeeeeed|dddd
;cccc|ceeeeeeeeeeeeeeeed|dddd
;cccc|ceeeeeeeeeeeeeeeed|dddd
;cccc|ceeeeeeeeeeeeeeeed|dddd
%macro mov_line_8x4_mmx 3 ; dst, stride, mm?
movq [%1], %3
movq [%1+%2], %3
lea %1, [%1+2*%2]
movq [%1], %3
movq [%1+%2], %3
lea %1, [%1+2*%2]
%endmacro
%macro mov_line_end8x4_mmx 3 ; dst, stride, mm?
movq [%1], %3
movq [%1+%2], %3
lea %1, [%1+2*%2]
movq [%1], %3
movq [%1+%2], %3
lea %1, [%1+%2]
%endmacro
%macro mov_line_16x4_sse2 4 ; dst, stride, xmm?, u/a
movdq%4 [%1], %3 ; top(bottom)_0
movdq%4 [%1+%2], %3 ; top(bottom)_1
lea %1, [%1+2*%2]
movdq%4 [%1], %3 ; top(bottom)_2
movdq%4 [%1+%2], %3 ; top(bottom)_3
lea %1, [%1+2*%2]
%endmacro
%macro mov_line_end16x4_sse2 4 ; dst, stride, xmm?, u/a
movdq%4 [%1], %3 ; top(bottom)_0
movdq%4 [%1+%2], %3 ; top(bottom)_1
lea %1, [%1+2*%2]
movdq%4 [%1], %3 ; top(bottom)_2
movdq%4 [%1+%2], %3 ; top(bottom)_3
lea %1, [%1+%2]
%endmacro
%macro mov_line_32x4_sse2 3 ; dst, stride, xmm?
movdqa [%1], %3 ; top(bottom)_0
movdqa [%1+16], %3 ; top(bottom)_0
movdqa [%1+%2], %3 ; top(bottom)_1
movdqa [%1+%2+16], %3 ; top(bottom)_1
lea %1, [%1+2*%2]
movdqa [%1], %3 ; top(bottom)_2
movdqa [%1+16], %3 ; top(bottom)_2
movdqa [%1+%2], %3 ; top(bottom)_3
movdqa [%1+%2+16], %3 ; top(bottom)_3
lea %1, [%1+2*%2]
%endmacro
%macro mov_line_end32x4_sse2 3 ; dst, stride, xmm?
movdqa [%1], %3 ; top(bottom)_0
movdqa [%1+16], %3 ; top(bottom)_0
movdqa [%1+%2], %3 ; top(bottom)_1
movdqa [%1+%2+16], %3 ; top(bottom)_1
lea %1, [%1+2*%2]
movdqa [%1], %3 ; top(bottom)_2
movdqa [%1+16], %3 ; top(bottom)_2
movdqa [%1+%2], %3 ; top(bottom)_3
movdqa [%1+%2+16], %3 ; top(bottom)_3
lea %1, [%1+%2]
%endmacro
%macro exp_top_bottom_sse2 1 ; iPaddingSize [luma(32)/chroma(16)]
; ebx [width/16(8)]
; esi [pSrc+0], edi [pSrc-1], ecx [-stride], 32(16) ; top
; eax [pSrc+(h-1)*stride], ebp [pSrc+(h+31)*stride], 32(16) ; bottom
%if %1 == 32 ; for luma
sar ebx, 04h ; width / 16(8) pixels
.top_bottom_loops:
; top
movdqa xmm0, [esi] ; first line of picture pData
mov_line_16x4_sse2 edi, ecx, xmm0, a ; dst, stride, xmm?
mov_line_16x4_sse2 edi, ecx, xmm0, a
mov_line_16x4_sse2 edi, ecx, xmm0, a
mov_line_16x4_sse2 edi, ecx, xmm0, a
mov_line_16x4_sse2 edi, ecx, xmm0, a ; dst, stride, xmm?
mov_line_16x4_sse2 edi, ecx, xmm0, a
mov_line_16x4_sse2 edi, ecx, xmm0, a
mov_line_end16x4_sse2 edi, ecx, xmm0, a
; bottom
movdqa xmm1, [eax] ; last line of picture pData
mov_line_16x4_sse2 ebp, ecx, xmm1, a ; dst, stride, xmm?
mov_line_16x4_sse2 ebp, ecx, xmm1, a
mov_line_16x4_sse2 ebp, ecx, xmm1, a
mov_line_16x4_sse2 ebp, ecx, xmm1, a
mov_line_16x4_sse2 ebp, ecx, xmm1, a ; dst, stride, xmm?
mov_line_16x4_sse2 ebp, ecx, xmm1, a
mov_line_16x4_sse2 ebp, ecx, xmm1, a
mov_line_end16x4_sse2 ebp, ecx, xmm1, a
lea esi, [esi+16] ; top pSrc
lea edi, [edi+16] ; top dst
lea eax, [eax+16] ; bottom pSrc
lea ebp, [ebp+16] ; bottom dst
neg ecx ; positive/negative stride need for next loop?
dec ebx
jnz near .top_bottom_loops
%elif %1 == 16 ; for chroma ??
mov edx, ebx
sar ebx, 04h ; (width / 16) pixels
.top_bottom_loops:
; top
movdqa xmm0, [esi] ; first line of picture pData
mov_line_16x4_sse2 edi, ecx, xmm0, a ; dst, stride, xmm?
mov_line_16x4_sse2 edi, ecx, xmm0, a
mov_line_16x4_sse2 edi, ecx, xmm0, a
mov_line_end16x4_sse2 edi, ecx, xmm0, a
; bottom
movdqa xmm1, [eax] ; last line of picture pData
mov_line_16x4_sse2 ebp, ecx, xmm1, a ; dst, stride, xmm?
mov_line_16x4_sse2 ebp, ecx, xmm1, a
mov_line_16x4_sse2 ebp, ecx, xmm1, a
mov_line_end16x4_sse2 ebp, ecx, xmm1, a
lea esi, [esi+16] ; top pSrc
lea edi, [edi+16] ; top dst
lea eax, [eax+16] ; bottom pSrc
lea ebp, [ebp+16] ; bottom dst
neg ecx ; positive/negative stride need for next loop?
dec ebx
jnz near .top_bottom_loops
; for remaining 8 bytes
and edx, 0fh ; any 8 bytes left?
test edx, edx
jz near .to_be_continued ; no left to exit here
; top
movq mm0, [esi] ; remained 8 byte
mov_line_8x4_mmx edi, ecx, mm0 ; dst, stride, mm?
mov_line_8x4_mmx edi, ecx, mm0 ; dst, stride, mm?
mov_line_8x4_mmx edi, ecx, mm0 ; dst, stride, mm?
mov_line_end8x4_mmx edi, ecx, mm0 ; dst, stride, mm?
; bottom
movq mm1, [eax]
mov_line_8x4_mmx ebp, ecx, mm1 ; dst, stride, mm?
mov_line_8x4_mmx ebp, ecx, mm1 ; dst, stride, mm?
mov_line_8x4_mmx ebp, ecx, mm1 ; dst, stride, mm?
mov_line_end8x4_mmx ebp, ecx, mm1 ; dst, stride, mm?
WELSEMMS
.to_be_continued:
%endif
%endmacro
%macro exp_left_right_sse2 2 ; iPaddingSize [luma(32)/chroma(16)], u/a
; ecx [height]
; esi [pSrc+0], edi [pSrc-32], edx [stride], 32(16) ; left
; ebx [pSrc+(w-1)], ebp [pSrc+w], 32(16) ; right
; xor eax, eax ; for pixel pData (uint8_t) ; make sure eax=0 at least high 24 bits of eax = 0
%if %1 == 32 ; for luma
.left_right_loops:
; left
mov al, byte [esi] ; pixel pData for left border
butterfly_1to16_sse xmm0, xmm1, a ; dst, tmp, pSrc [generic register name: a/b/c/d]
movdqa [edi], xmm0
movdqa [edi+16], xmm0
; right
mov al, byte [ebx]
butterfly_1to16_sse xmm1, xmm2, a ; dst, tmp, pSrc [generic register name: a/b/c/d]
movdqa [ebp], xmm1
movdqa [ebp+16], xmm1
lea esi, [esi+edx] ; left pSrc
lea edi, [edi+edx] ; left dst
lea ebx, [ebx+edx] ; right pSrc
lea ebp, [ebp+edx] ; right dst
dec ecx
jnz near .left_right_loops
%elif %1 == 16 ; for chroma ??
.left_right_loops:
; left
mov al, byte [esi] ; pixel pData for left border
butterfly_1to16_sse xmm0, xmm1, a ; dst, tmp, pSrc [generic register name: a/b/c/d]
movdqa [edi], xmm0
; right
mov al, byte [ebx]
butterfly_1to16_sse xmm1, xmm2, a ; dst, tmp, pSrc [generic register name: a/b/c/d]
movdq%2 [ebp], xmm1 ; might not be aligned 16 bytes in case chroma planes
lea esi, [esi+edx] ; left pSrc
lea edi, [edi+edx] ; left dst
lea ebx, [ebx+edx] ; right pSrc
lea ebp, [ebp+edx] ; right dst
dec ecx
jnz near .left_right_loops
%endif
%endmacro
%macro exp_cross_sse2 2 ; iPaddingSize [luma(32)/chroma(16)], u/a
; top-left: (x)mm3, top-right: (x)mm4, bottom-left: (x)mm5, bottom-right: (x)mm6
; edi: TL, ebp: TR, eax: BL, ebx: BR, ecx, -stride
%if %1 == 32 ; luma
; TL
mov_line_32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
mov_line_32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
mov_line_32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
mov_line_32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
mov_line_32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
mov_line_32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
mov_line_32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
mov_line_end32x4_sse2 edi, ecx, xmm3 ; dst, stride, xmm?
; TR
mov_line_32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
mov_line_32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
mov_line_32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
mov_line_32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
mov_line_32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
mov_line_32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
mov_line_32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
mov_line_end32x4_sse2 ebp, ecx, xmm4 ; dst, stride, xmm?
; BL
mov_line_32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
mov_line_32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
mov_line_32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
mov_line_32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
mov_line_32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
mov_line_32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
mov_line_32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
mov_line_end32x4_sse2 eax, ecx, xmm5 ; dst, stride, xmm?
; BR
mov_line_32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
mov_line_32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
mov_line_32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
mov_line_32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
mov_line_32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
mov_line_32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
mov_line_32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
mov_line_end32x4_sse2 ebx, ecx, xmm6 ; dst, stride, xmm?
%elif %1 == 16 ; chroma
; TL
mov_line_16x4_sse2 edi, ecx, xmm3, a ; dst, stride, xmm?
mov_line_16x4_sse2 edi, ecx, xmm3, a ; dst, stride, xmm?
mov_line_16x4_sse2 edi, ecx, xmm3, a ; dst, stride, xmm?
mov_line_end16x4_sse2 edi, ecx, xmm3, a ; dst, stride, xmm?
; TR
mov_line_16x4_sse2 ebp, ecx, xmm4, %2 ; dst, stride, xmm?
mov_line_16x4_sse2 ebp, ecx, xmm4, %2 ; dst, stride, xmm?
mov_line_16x4_sse2 ebp, ecx, xmm4, %2 ; dst, stride, xmm?
mov_line_end16x4_sse2 ebp, ecx, xmm4, %2 ; dst, stride, xmm?
; BL
mov_line_16x4_sse2 eax, ecx, xmm5, a ; dst, stride, xmm?
mov_line_16x4_sse2 eax, ecx, xmm5, a ; dst, stride, xmm?
mov_line_16x4_sse2 eax, ecx, xmm5, a ; dst, stride, xmm?
mov_line_end16x4_sse2 eax, ecx, xmm5, a ; dst, stride, xmm?
; BR
mov_line_16x4_sse2 ebx, ecx, xmm6, %2 ; dst, stride, xmm?
mov_line_16x4_sse2 ebx, ecx, xmm6, %2 ; dst, stride, xmm?
mov_line_16x4_sse2 ebx, ecx, xmm6, %2 ; dst, stride, xmm?
mov_line_end16x4_sse2 ebx, ecx, xmm6, %2 ; dst, stride, xmm?
%endif
%endmacro
ALIGN 16
;***********************************************************************----------------
; void ExpandPictureLuma_sse2( uint8_t *pDst,
; const int32_t kiStride,
; const int32_t kiWidth,
; const int32_t kiHeight );
;***********************************************************************----------------
ExpandPictureLuma_sse2:
push ebx
push edx
push esi
push edi
push ebp
; for both top and bottom border
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; pDst
mov edx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov eax, [esp+36] ; kiHeight
; also prepare for cross border pData top-left: xmm3
; xor ecx, ecx
mov cl, byte [esi]
butterfly_1to16_sse xmm3, xmm4, c ; pDst, tmp, pSrc [generic register name: a/b/c/d]
; load top border
mov ecx, edx ; kiStride
neg ecx ; -kiStride
lea edi, [esi+ecx] ; last line of top border
; load bottom border
dec eax ; h-1
imul eax, edx ; (h-1)*kiStride
lea eax, [esi+eax] ; last line of picture pData
sal edx, 05h ; 32*kiStride
lea ebp, [eax+edx] ; last line of bottom border, (h-1)*stride + 32 * stride
; also prepare for cross border pData: bottom-left with xmm5, bottom-right xmm6
dec ebx ; kiWidth-1
lea ebx, [eax+ebx] ; dst[w-1][h-1]
; xor edx, edx
mov dl, byte [eax] ; bottom-left
butterfly_1to16_sse xmm5, xmm6, d ; dst, tmp, pSrc [generic register name: a/b/c/d]
mov dl, byte [ebx] ; bottom-right
butterfly_1to16_sse xmm6, xmm4, d ; dst, tmp, pSrc [generic register name: a/b/c/d]
; for top & bottom expanding
mov ebx, [esp+32] ; kiWidth
exp_top_bottom_sse2 32
; for both left and right border
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; p_dst: left border pSrc
mov edx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov ecx, [esp+36] ; kiHeight
; load left border
mov eax, -32 ; luma=-32, chroma=-16
lea edi, [esi+eax] ; left border dst
dec ebx
lea ebx, [esi+ebx] ; right border pSrc, (p_dst + width - 1)
lea ebp, [ebx+1] ; right border dst
; prepare for cross border pData: top-right with xmm4
; xor eax, eax
mov al, byte [ebx] ; top-right
butterfly_1to16_sse xmm4, xmm0, a ; pDst, tmp, pSrc [generic register name: a/b/c/d]
; for left & right border expanding
exp_left_right_sse2 32, a
; for cross border [top-left, top-right, bottom-left, bottom-right]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; pDst
mov ecx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov edx, [esp+36] ; kiHeight
; have done xmm3,..,xmm6 cross pData initialization above, perform pading as below, To be continued..
mov eax, -32 ; luma=-32, chroma=-16
neg ecx ; -stride
lea edi, [esi+eax]
lea edi, [edi+ecx] ; last line of top-left border
lea ebp, [esi+ebx]
lea ebp, [ebp+ecx] ; last line of top-right border
add edx, 32 ; height+32(16), luma=32, chroma=16
mov ecx, [esp+28] ; kiStride
imul edx, ecx ; (height+32(16)) * stride
lea eax, [edi+edx] ; last line of bottom-left border
lea ebx, [ebp+edx] ; last line of bottom-right border
neg ecx ; -kiStride
; for left & right border expanding
exp_cross_sse2 32, a
; sfence ; commit cache write back memory
pop ebp
pop edi
pop esi
pop edx
pop ebx
ret
ALIGN 16
;***********************************************************************----------------
; void ExpandPictureChromaAlign_sse2( uint8_t *pDst,
; const int32_t kiStride,
; const int32_t kiWidth,
; const int32_t kiHeight );
;***********************************************************************----------------
ExpandPictureChromaAlign_sse2:
push ebx
push edx
push esi
push edi
push ebp
; for both top and bottom border
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; pDst
mov edx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov eax, [esp+36] ; kiHeight
; also prepare for cross border pData top-left: xmm3
; xor ecx, ecx
mov cl, byte [esi]
butterfly_1to16_sse xmm3, xmm4, c ; pDst, tmp, pSrc [generic register name: a/b/c/d]
; load top border
mov ecx, edx ; kiStride
neg ecx ; -kiStride
lea edi, [esi+ecx] ; last line of top border
; load bottom border
dec eax ; h-1
imul eax, edx ; (h-1)*kiStride
lea eax, [esi+eax] ; last line of picture pData
sal edx, 04h ; 16*kiStride
lea ebp, [eax+edx] ; last line of bottom border, (h-1)*kiStride + 16 * kiStride
; also prepare for cross border pData: bottom-left with xmm5, bottom-right xmm6
dec ebx ; kiWidth-1
lea ebx, [eax+ebx] ; pDst[w-1][h-1]
; xor edx, edx
mov dl, byte [eax] ; bottom-left
butterfly_1to16_sse xmm5, xmm6, d ; dst, tmp, pSrc [generic register name: a/b/c/d]
mov dl, byte [ebx] ; bottom-right
butterfly_1to16_sse xmm6, xmm4, d ; dst, tmp, pSrc [generic register name: a/b/c/d]
; for top & bottom expanding
mov ebx, [esp+32] ; kiWidth
exp_top_bottom_sse2 16
; for both left and right border
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; pDst: left border pSrc
mov edx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov ecx, [esp+36] ; kiHeight
; load left border
mov eax, -16 ; luma=-32, chroma=-16
lea edi, [esi+eax] ; left border dst
dec ebx
lea ebx, [esi+ebx] ; right border pSrc, (p_dst + width - 1)
lea ebp, [ebx+1] ; right border dst
; prepare for cross border pData: top-right with xmm4
; xor eax, eax
mov al, byte [ebx] ; top-right
butterfly_1to16_sse xmm4, xmm0, a ; pDst, tmp, pSrc [generic register name: a/b/c/d]
; for left & right border expanding
exp_left_right_sse2 16, a
; for cross border [top-left, top-right, bottom-left, bottom-right]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; pDst
mov ecx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov edx, [esp+36] ; kiHeight
; have done xmm3,..,xmm6 cross pData initialization above, perform pading as below, To be continued..
mov eax, -16 ; chroma=-16
neg ecx ; -stride
lea edi, [esi+eax]
lea edi, [edi+ecx] ; last line of top-left border
lea ebp, [esi+ebx]
lea ebp, [ebp+ecx] ; last line of top-right border
mov ecx, [esp+28] ; kiStride
add edx, 16 ; height+16, luma=32, chroma=16
imul edx, ecx ; (kiHeight+16) * kiStride
lea eax, [edi+edx] ; last line of bottom-left border
lea ebx, [ebp+edx] ; last line of bottom-right border
neg ecx ; -kiStride
; for left & right border expanding
exp_cross_sse2 16, a
; sfence ; commit cache write back memory
pop ebp
pop edi
pop esi
pop edx
pop ebx
ret
ALIGN 16
;***********************************************************************----------------
; void ExpandPictureChromaUnalign_sse2( uint8_t *pDst,
; const int32_t kiStride,
; const int32_t kiWidth,
; const int32_t kiHeight );
;***********************************************************************----------------
ExpandPictureChromaUnalign_sse2:
push ebx
push edx
push esi
push edi
push ebp
; for both top and bottom border
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; pDst
mov edx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov eax, [esp+36] ; kiHeight
; also prepare for cross border pData top-left: xmm3
; xor ecx, ecx
mov cl, byte [esi]
butterfly_1to16_sse xmm3, xmm4, c ; pDst, tmp, pSrc [generic register name: a/b/c/d]
; load top border
mov ecx, edx ; kiStride
neg ecx ; -kiStride
lea edi, [esi+ecx] ; last line of top border
; load bottom border
dec eax ; h-1
imul eax, edx ; (h-1)*kiStride
lea eax, [esi+eax] ; last line of picture pData
sal edx, 04h ; 16*kiStride
lea ebp, [eax+edx] ; last line of bottom border, (h-1)*kiStride + 16 * kiStride
; also prepare for cross border pData: bottom-left with xmm5, bottom-right xmm6
dec ebx ; kiWidth-1
lea ebx, [eax+ebx] ; dst[w-1][h-1]
; xor edx, edx
mov dl, byte [eax] ; bottom-left
butterfly_1to16_sse xmm5, xmm6, d ; dst, tmp, pSrc [generic register name: a/b/c/d]
mov dl, byte [ebx] ; bottom-right
butterfly_1to16_sse xmm6, xmm4, d ; dst, tmp, pSrc [generic register name: a/b/c/d]
; for top & bottom expanding
mov ebx, [esp+32] ; kiWidth
exp_top_bottom_sse2 16
; for both left and right border
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; p_dst: left border pSrc
mov edx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov ecx, [esp+36] ; kiHeight
; load left border
mov eax, -16 ; luma=-32, chroma=-16
lea edi, [esi+eax] ; left border dst
dec ebx
lea ebx, [esi+ebx] ; right border pSrc, (p_dst + width - 1)
lea ebp, [ebx+1] ; right border dst
; prepare for cross border pData: top-right with xmm4
; xor eax, eax
mov al, byte [ebx] ; top-right
butterfly_1to16_sse xmm4, xmm0, a ; dst, tmp, pSrc [generic register name: a/b/c/d]
; for left & right border expanding
exp_left_right_sse2 16, u
; for cross border [top-left, top-right, bottom-left, bottom-right]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov esi, [esp+24] ; p_dst
mov ecx, [esp+28] ; kiStride
mov ebx, [esp+32] ; kiWidth
mov edx, [esp+36] ; kiHeight
; have done xmm3,..,xmm6 cross pData initialization above, perform pading as below, To be continued..
neg ecx ; -kiStride
mov eax, -16 ; chroma=-16
lea edi, [esi+eax]
lea edi, [edi+ecx] ; last line of top-left border
lea ebp, [esi+ebx]
lea ebp, [ebp+ecx] ; last line of top-right border
mov ecx, [esp+28] ; kiStride
add edx, 16 ; kiHeight+16, luma=32, chroma=16
imul edx, ecx ; (kiHeight+16) * kiStride
lea eax, [edi+edx] ; last line of bottom-left border
lea ebx, [ebp+edx] ; last line of bottom-right border
neg ecx ; -kiStride
; for left & right border expanding
exp_cross_sse2 16, u
; sfence ; commit cache write back memory
pop ebp
pop edi
pop esi
pop edx
pop ebx
ret

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,330 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* mb_copy.asm
;*
;* Abstract
;* mb_copy and mb_copy1
;*
;* History
;* 15/09/2009 Created
;* 12/28/2009 Modified with larger throughput
;* 12/29/2011 Tuned WelsCopy16x16NotAligned_sse2, added UpdateMbMv_sse2 WelsCopy16x8NotAligned_sse2,
;* WelsCopy16x8_mmx, WelsCopy8x16_mmx etc;
;*
;*
;*********************************************************************************************/
%include "asm_inc.asm"
BITS 32
;*******************************************************************************
; Macros and other preprocessor constants
;*******************************************************************************
;*******************************************************************************
; Local Data (Read Only)
;*******************************************************************************
;SECTION .rodata data align=16
;*******************************************************************************
; Various memory constants (trigonometric values or rounding values)
;*******************************************************************************
ALIGN 16
;*******************************************************************************
; Code
;*******************************************************************************
SECTION .text
WELS_EXTERN PixelAvgWidthEq4_mmx
WELS_EXTERN PixelAvgWidthEq8_mmx
WELS_EXTERN PixelAvgWidthEq16_sse2
WELS_EXTERN McCopyWidthEq4_mmx
WELS_EXTERN McCopyWidthEq8_mmx
WELS_EXTERN McCopyWidthEq16_sse2
ALIGN 16
;*******************************************************************************
; void_t PixelAvgWidthEq4_mmx( uint8_t *pDst, int iDstStride,
; uint8_t *pSrcA, int iSrcAStride,
; uint8_t *pSrcB, int iSrcBStride,
; int iHeight );
;*******************************************************************************
PixelAvgWidthEq4_mmx:
push esi
push edi
push ebp
push ebx
mov edi, [esp+20] ; pDst
mov eax, [esp+24] ; iDstStride
mov esi, [esp+28] ; pSrcA
mov ecx, [esp+32] ; iSrcAStride
mov ebp, [esp+36] ; pSrcB
mov edx, [esp+40] ; iSrcBStride
mov ebx, [esp+44] ; iHeight
ALIGN 4
.height_loop:
movd mm0, [ebp]
pavgb mm0, [esi]
movd [edi], mm0
dec ebx
lea edi, [edi+eax]
lea esi, [esi+ecx]
lea ebp, [ebp+edx]
jne .height_loop
WELSEMMS
pop ebx
pop ebp
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void_t PixelAvgWidthEq8_mmx( uint8_t *pDst, int iDstStride,
; uint8_t *pSrcA, int iSrcAStride,
; uint8_t *pSrcB, int iSrcBStride,
; int iHeight );
;*******************************************************************************
PixelAvgWidthEq8_mmx:
push esi
push edi
push ebp
push ebx
mov edi, [esp+20] ; pDst
mov eax, [esp+24] ; iDstStride
mov esi, [esp+28] ; pSrcA
mov ecx, [esp+32] ; iSrcAStride
mov ebp, [esp+36] ; pSrcB
mov edx, [esp+40] ; iSrcBStride
mov ebx, [esp+44] ; iHeight
ALIGN 4
.height_loop:
movq mm0, [esi]
pavgb mm0, [ebp]
movq [edi], mm0
movq mm0, [esi+ecx]
pavgb mm0, [ebp+edx]
movq [edi+eax], mm0
lea esi, [esi+2*ecx]
lea ebp, [ebp+2*edx]
lea edi, [edi+2*eax]
sub ebx, 2
jnz .height_loop
WELSEMMS
pop ebx
pop ebp
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void_t PixelAvgWidthEq16_sse2( uint8_t *pDst, int iDstStride,
; uint8_t *pSrcA, int iSrcAStride,
; uint8_t *pSrcB, int iSrcBStride,
; int iHeight );
;*******************************************************************************
PixelAvgWidthEq16_sse2:
push esi
push edi
push ebp
push ebx
mov edi, [esp+20] ; pDst
mov eax, [esp+24] ; iDstStride
mov esi, [esp+28] ; pSrcA
mov ecx, [esp+32] ; iSrcAStride
mov ebp, [esp+36] ; pSrcB
mov edx, [esp+40] ; iSrcBStride
mov ebx, [esp+44] ; iHeight
ALIGN 4
.height_loop:
movdqu xmm0, [esi]
pavgb xmm0, [ebp]
movdqu [edi], xmm0
movdqu xmm0, [esi+ecx]
pavgb xmm0, [ebp+edx]
movdqu [edi+eax], xmm0
movdqu xmm0, [esi+2*ecx]
pavgb xmm0, [ebp+2*edx]
movdqu [edi+2*eax], xmm0
lea esi, [esi+2*ecx]
lea ebp, [ebp+2*edx]
lea edi, [edi+2*eax]
movdqu xmm0, [esi+ecx]
pavgb xmm0, [ebp+edx]
movdqu [edi+eax], xmm0
lea esi, [esi+2*ecx]
lea ebp, [ebp+2*edx]
lea edi, [edi+2*eax]
sub ebx, 4
jne .height_loop
WELSEMMS
pop ebx
pop ebp
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void_t McCopyWidthEq4_mmx( uint8_t *pSrc, int iSrcStride,
; uint8_t *pDst, int iDstStride, int iHeight )
;*******************************************************************************
McCopyWidthEq4_mmx:
push esi
push edi
push ebx
mov esi, [esp+16]
mov eax, [esp+20]
mov edi, [esp+24]
mov ecx, [esp+28]
mov edx, [esp+32]
ALIGN 4
.height_loop:
mov ebx, [esi]
mov [edi], ebx
add esi, eax
add edi, ecx
dec edx
jnz .height_loop
WELSEMMS
pop ebx
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void_t McCopyWidthEq8_mmx( uint8_t *pSrc, int iSrcStride,
; uint8_t *pDst, int iDstStride, int iHeight )
;*******************************************************************************
McCopyWidthEq8_mmx:
push esi
push edi
mov esi, [esp+12]
mov eax, [esp+16]
mov edi, [esp+20]
mov ecx, [esp+24]
mov edx, [esp+28]
ALIGN 4
.height_loop:
movq mm0, [esi]
movq [edi], mm0
add esi, eax
add edi, ecx
dec edx
jnz .height_loop
WELSEMMS
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void_t McCopyWidthEq16_sse2( uint8_t *pSrc, int iSrcStride, uint8_t *pDst, int iDstStride, int iHeight )
;*******************************************************************************
;read unaligned memory
%macro SSE_READ_UNA 2
movq %1, [%2]
movhps %1, [%2+8]
%endmacro
;write unaligned memory
%macro SSE_WRITE_UNA 2
movq [%1], %2
movhps [%1+8], %2
%endmacro
McCopyWidthEq16_sse2:
push esi
push edi
mov esi, [esp+12] ; pSrc
mov eax, [esp+16] ; iSrcStride
mov edi, [esp+20] ; pDst
mov edx, [esp+24] ; iDstStride
mov ecx, [esp+28] ; iHeight
ALIGN 4
.height_loop:
SSE_READ_UNA xmm0, esi
SSE_READ_UNA xmm1, esi+eax
SSE_WRITE_UNA edi, xmm0
SSE_WRITE_UNA edi+edx, xmm1
sub ecx, 2
lea esi, [esi+eax*2]
lea edi, [edi+edx*2]
jnz .height_loop
pop edi
pop esi
ret

View File

@ -0,0 +1,317 @@
;*!
;* \copy
;* Copyright (c) 2004-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* mc_chroma.asm
;*
;* Abstract
;* mmx motion compensation for chroma
;*
;* History
;* 10/13/2004 Created
;*
;*
;*************************************************************************/
%include "asm_inc.asm"
BITS 32
;***********************************************************************
; Local Data (Read Only)
;***********************************************************************
SECTION .rodata align=16
;***********************************************************************
; Various memory constants (trigonometric values or rounding values)
;***********************************************************************
ALIGN 16
h264_d0x20_sse2:
dw 32,32,32,32,32,32,32,32
ALIGN 16
h264_d0x20_mmx:
dw 32,32,32,32
;=============================================================================
; Code
;=============================================================================
SECTION .text
ALIGN 16
;*******************************************************************************
; void McChromaWidthEq4_mmx( uint8_t *src,
; int32_t iSrcStride,
; uint8_t *pDst,
; int32_t iDstStride,
; uint8_t *pABCD,
; int32_t iHeigh );
;*******************************************************************************
WELS_EXTERN McChromaWidthEq4_mmx
McChromaWidthEq4_mmx:
push esi
push edi
push ebx
mov eax, [esp +12 + 20]
movd mm3, [eax]
WELS_Zero mm7
punpcklbw mm3, mm3
movq mm4, mm3
punpcklwd mm3, mm3
punpckhwd mm4, mm4
movq mm5, mm3
punpcklbw mm3, mm7
punpckhbw mm5, mm7
movq mm6, mm4
punpcklbw mm4, mm7
punpckhbw mm6, mm7
mov esi, [esp +12+ 4]
mov eax, [esp + 12 + 8]
mov edi, [esp + 12 + 12]
mov edx, [esp + 12 + 16]
mov ecx, [esp + 12 + 24]
lea ebx, [esi + eax]
movd mm0, [esi]
movd mm1, [esi+1]
punpcklbw mm0, mm7
punpcklbw mm1, mm7
.xloop:
pmullw mm0, mm3
pmullw mm1, mm5
paddw mm0, mm1
movd mm1, [ebx]
punpcklbw mm1, mm7
movq mm2, mm1
pmullw mm1, mm4
paddw mm0, mm1
movd mm1, [ebx+1]
punpcklbw mm1, mm7
movq mm7, mm1
pmullw mm1,mm6
paddw mm0, mm1
movq mm1,mm7
paddw mm0, [h264_d0x20_mmx]
psrlw mm0, 6
WELS_Zero mm7
packuswb mm0, mm7
movd [edi], mm0
movq mm0, mm2
lea edi, [edi +edx ]
lea ebx, [ebx + eax]
dec ecx
jnz near .xloop
WELSEMMS
pop ebx
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void McChromaWidthEq8_sse2( uint8_t *pSrc,
; int32_t iSrcStride,
; uint8_t *pDst,
; int32_t iDstStride,
; uint8_t *pABCD,
; int32_t iheigh );
;*******************************************************************************
WELS_EXTERN McChromaWidthEq8_sse2
McChromaWidthEq8_sse2:
push esi
push edi
push ebx
mov eax, [esp +12 + 20]
movd xmm3, [eax]
WELS_Zero xmm7
punpcklbw xmm3, xmm3
punpcklwd xmm3, xmm3
movdqa xmm4, xmm3
punpckldq xmm3, xmm3
punpckhdq xmm4, xmm4
movdqa xmm5, xmm3
movdqa xmm6, xmm4
punpcklbw xmm3, xmm7
punpckhbw xmm5, xmm7
punpcklbw xmm4, xmm7
punpckhbw xmm6, xmm7
mov esi, [esp +12+ 4]
mov eax, [esp + 12 + 8]
mov edi, [esp + 12 + 12]
mov edx, [esp + 12 + 16]
mov ecx, [esp + 12 + 24]
lea ebx, [esi + eax]
movq xmm0, [esi]
movq xmm1, [esi+1]
punpcklbw xmm0, xmm7
punpcklbw xmm1, xmm7
.xloop:
pmullw xmm0, xmm3
pmullw xmm1, xmm5
paddw xmm0, xmm1
movq xmm1, [ebx]
punpcklbw xmm1, xmm7
movdqa xmm2, xmm1
pmullw xmm1, xmm4
paddw xmm0, xmm1
movq xmm1, [ebx+1]
punpcklbw xmm1, xmm7
movdqa xmm7, xmm1
pmullw xmm1, xmm6
paddw xmm0, xmm1
movdqa xmm1,xmm7
paddw xmm0, [h264_d0x20_sse2]
psrlw xmm0, 6
WELS_Zero xmm7
packuswb xmm0, xmm7
movq [edi], xmm0
movdqa xmm0, xmm2
lea edi, [edi +edx ]
lea ebx, [ebx + eax]
dec ecx
jnz near .xloop
pop ebx
pop edi
pop esi
ret
ALIGN 16
;***********************************************************************
; void McChromaWidthEq8_ssse3( uint8_t *pSrc,
; int32_t iSrcStride,
; uint8_t *pDst,
; int32_t iDstStride,
; uint8_t *pABCD,
; int32_t iHeigh);
;***********************************************************************
WELS_EXTERN McChromaWidthEq8_ssse3
McChromaWidthEq8_ssse3:
push ebx
push esi
push edi
mov eax, [esp + 12 + 20]
pxor xmm7, xmm7
movd xmm5, [eax]
punpcklwd xmm5, xmm5
punpckldq xmm5, xmm5
movdqa xmm6, xmm5
punpcklqdq xmm5, xmm5
punpckhqdq xmm6, xmm6
mov eax, [esp + 12 + 4]
mov edx, [esp + 12 + 8]
mov esi, [esp + 12 + 12]
mov edi, [esp + 12 + 16]
mov ecx, [esp + 12 + 24]
sub esi, edi
sub esi, edi
movdqa xmm7, [h264_d0x20_sse2]
movdqu xmm0, [eax]
movdqa xmm1, xmm0
psrldq xmm1, 1
punpcklbw xmm0, xmm1
.hloop_chroma:
lea esi, [esi+2*edi]
movdqu xmm2, [eax+edx]
movdqa xmm3, xmm2
psrldq xmm3, 1
punpcklbw xmm2, xmm3
movdqa xmm4, xmm2
pmaddubsw xmm0, xmm5
pmaddubsw xmm2, xmm6
paddw xmm0, xmm2
paddw xmm0, xmm7
psrlw xmm0, 6
packuswb xmm0, xmm0
movq [esi],xmm0
lea eax, [eax+2*edx]
movdqu xmm2, [eax]
movdqa xmm3, xmm2
psrldq xmm3, 1
punpcklbw xmm2, xmm3
movdqa xmm0, xmm2
pmaddubsw xmm4, xmm5
pmaddubsw xmm2, xmm6
paddw xmm4, xmm2
paddw xmm4, xmm7
psrlw xmm4, 6
packuswb xmm4, xmm4
movq [esi+edi],xmm4
sub ecx, 2
jnz .hloop_chroma
pop edi
pop esi
pop ebx
ret

View File

@ -0,0 +1,615 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* mc_luma.asm
;*
;* Abstract
;* sse2 motion compensation
;*
;* History
;* 17/08/2009 Created
;*
;*
;*************************************************************************/
%include "asm_inc.asm"
BITS 32
;*******************************************************************************
; Local Data (Read Only)
;*******************************************************************************
SECTION .rodata align=16
;*******************************************************************************
; Various memory constants (trigonometric values or rounding values)
;*******************************************************************************
ALIGN 16
h264_w0x10:
dw 16, 16, 16, 16
;*******************************************************************************
; Code
;*******************************************************************************
SECTION .text
WELS_EXTERN McHorVer20WidthEq4_mmx
ALIGN 16
;*******************************************************************************
; void_t McHorVer20WidthEq4_mmx( uint8_t *pSrc,
; int iSrcStride,
; uint8_t *pDst,
; int iDstStride,
; int iHeight)
;*******************************************************************************
McHorVer20WidthEq4_mmx:
push esi
push edi
mov esi, [esp+12]
mov eax, [esp+16]
mov edi, [esp+20]
mov ecx, [esp+24]
mov edx, [esp+28]
sub esi, 2
WELS_Zero mm7
movq mm6, [h264_w0x10]
.height_loop:
movd mm0, [esi]
punpcklbw mm0, mm7
movd mm1, [esi+5]
punpcklbw mm1, mm7
movd mm2, [esi+1]
punpcklbw mm2, mm7
movd mm3, [esi+4]
punpcklbw mm3, mm7
movd mm4, [esi+2]
punpcklbw mm4, mm7
movd mm5, [esi+3]
punpcklbw mm5, mm7
paddw mm2, mm3
paddw mm4, mm5
psllw mm4, 2
psubw mm4, mm2
paddw mm0, mm1
paddw mm0, mm4
psllw mm4, 2
paddw mm0, mm4
paddw mm0, mm6
psraw mm0, 5
packuswb mm0, mm7
movd [edi], mm0
add esi, eax
add edi, ecx
dec edx
jnz .height_loop
WELSEMMS
pop edi
pop esi
ret
;*******************************************************************************
; Macros and other preprocessor constants
;*******************************************************************************
%macro SSE_LOAD_8P 3
movq %1, %3
punpcklbw %1, %2
%endmacro
%macro FILTER_HV_W8 9
paddw %1, %6
movdqa %8, %3
movdqa %7, %2
paddw %1, [h264_w0x10_1]
paddw %8, %4
paddw %7, %5
psllw %8, 2
psubw %8, %7
paddw %1, %8
psllw %8, 2
paddw %1, %8
psraw %1, 5
WELS_Zero %8
packuswb %1, %8
movq %9, %1
%endmacro
;*******************************************************************************
; Local Data (Read Only)
;*******************************************************************************
SECTION .rodata align=16
;*******************************************************************************
; Various memory constants (trigonometric values or rounding values)
;*******************************************************************************
ALIGN 16
h264_w0x10_1:
dw 16, 16, 16, 16, 16, 16, 16, 16
ALIGN 16
h264_mc_hc_32:
dw 32, 32, 32, 32, 32, 32, 32, 32
;*******************************************************************************
; Code
;*******************************************************************************
SECTION .text
WELS_EXTERN McHorVer22Width8HorFirst_sse2
WELS_EXTERN McHorVer22VerLast_sse2
WELS_EXTERN McHorVer02WidthEq8_sse2
WELS_EXTERN McHorVer20WidthEq8_sse2
WELS_EXTERN McHorVer20WidthEq16_sse2
ALIGN 16
;***********************************************************************
; void_t McHorVer22Width8HorFirst_sse2(int16_t *pSrc,
; int16_t iSrcStride,
; uint8_t *pDst,
; int32_t iDstStride
; int32_t iHeight
; )
;***********************************************************************
McHorVer22Width8HorFirst_sse2:
push esi
push edi
push ebx
mov esi, [esp+16] ;pSrc
mov eax, [esp+20] ;iSrcStride
mov edi, [esp+24] ;pDst
mov edx, [esp+28] ;iDstStride
mov ebx, [esp+32] ;iHeight
pxor xmm7, xmm7
sub esi, eax ;;;;;;;;need more 5 lines.
sub esi, eax
.yloop_width_8:
movq xmm0, [esi]
punpcklbw xmm0, xmm7
movq xmm1, [esi+5]
punpcklbw xmm1, xmm7
movq xmm2, [esi+1]
punpcklbw xmm2, xmm7
movq xmm3, [esi+4]
punpcklbw xmm3, xmm7
movq xmm4, [esi+2]
punpcklbw xmm4, xmm7
movq xmm5, [esi+3]
punpcklbw xmm5, xmm7
paddw xmm2, xmm3
paddw xmm4, xmm5
psllw xmm4, 2
psubw xmm4, xmm2
paddw xmm0, xmm1
paddw xmm0, xmm4
psllw xmm4, 2
paddw xmm0, xmm4
movdqa [edi], xmm0
add esi, eax
add edi, edx
dec ebx
jnz .yloop_width_8
pop ebx
pop edi
pop esi
ret
ALIGN 16
;***********************************************************************
;void_t McHorVer22VerLast_sse2(
; uint8_t *pSrc,
; int32_t pSrcStride,
; uint8_t * pDst,
; int32_t iDstStride,
; int32_t iWidth,
; int32_t iHeight);
;***********************************************************************
%macro FILTER_VER 9
paddw %1, %6
movdqa %7, %2
movdqa %8, %3
paddw %7, %5
paddw %8, %4
psubw %1, %7
psraw %1, 2
paddw %1, %8
psubw %1, %7
psraw %1, 2
paddw %8, %1
paddw %8, [h264_mc_hc_32]
psraw %8, 6
packuswb %8, %8
movq %9, %8
%endmacro
McHorVer22VerLast_sse2:
push esi
push edi
push ebx
push ebp
mov esi, [esp+20]
mov eax, [esp+24]
mov edi, [esp+28]
mov edx, [esp+32]
mov ebx, [esp+36]
mov ecx, [esp+40]
shr ebx, 3
.width_loop:
movdqa xmm0, [esi]
movdqa xmm1, [esi+eax]
lea esi, [esi+2*eax]
movdqa xmm2, [esi]
movdqa xmm3, [esi+eax]
lea esi, [esi+2*eax]
movdqa xmm4, [esi]
movdqa xmm5, [esi+eax]
FILTER_VER xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [edi]
dec ecx
lea esi, [esi+2*eax]
movdqa xmm6, [esi]
movdqa xmm0, xmm1
movdqa xmm1, xmm2
movdqa xmm2, xmm3
movdqa xmm3, xmm4
movdqa xmm4, xmm5
movdqa xmm5, xmm6
add edi, edx
sub esi, eax
.start:
FILTER_VER xmm0,xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [edi]
dec ecx
jz near .x_loop_dec
lea esi, [esi+2*eax]
movdqa xmm6, [esi]
FILTER_VER xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0,[edi+edx]
dec ecx
jz near .x_loop_dec
lea edi, [edi+2*edx]
movdqa xmm7, [esi+eax]
FILTER_VER xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, [edi]
dec ecx
jz near .x_loop_dec
lea esi, [esi+2*eax]
movdqa xmm0, [esi]
FILTER_VER xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2,[edi+edx]
dec ecx
jz near .x_loop_dec
lea edi, [edi+2*edx]
movdqa xmm1, [esi+eax]
FILTER_VER xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,[edi]
dec ecx
jz near .x_loop_dec
lea esi, [esi+2*eax]
movdqa xmm2, [esi]
FILTER_VER xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,[edi+edx]
dec ecx
jz near .x_loop_dec
lea edi, [edi+2*edx]
movdqa xmm3, [esi+eax]
FILTER_VER xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,xmm5,[edi]
dec ecx
jz near .x_loop_dec
lea esi, [esi+2*eax]
movdqa xmm4, [esi]
FILTER_VER xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,xmm5,xmm6, [edi+edx]
dec ecx
jz near .x_loop_dec
lea edi, [edi+2*edx]
movdqa xmm5, [esi+eax]
jmp near .start
.x_loop_dec:
dec ebx
jz near .exit
mov esi, [esp+20]
mov edi, [esp+28]
mov ecx, [esp+40]
add esi, 16
add edi, 8
jmp .width_loop
.exit:
pop ebp
pop ebx
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void_t McHorVer20WidthEq8_sse2( uint8_t *pSrc,
; int iSrcStride,
; uint8_t *pDst,
; int iDstStride,
; int iHeight,
; );
;*******************************************************************************
McHorVer20WidthEq8_sse2:
push esi
push edi
mov esi, [esp + 12] ;pSrc
mov eax, [esp + 16] ;iSrcStride
mov edi, [esp + 20] ;pDst
mov ecx, [esp + 28] ;iHeight
mov edx, [esp + 24] ;iDstStride
lea esi, [esi-2] ;pSrc -= 2;
pxor xmm7, xmm7
movdqa xmm6, [h264_w0x10_1]
.y_loop:
movq xmm0, [esi]
punpcklbw xmm0, xmm7
movq xmm1, [esi+5]
punpcklbw xmm1, xmm7
movq xmm2, [esi+1]
punpcklbw xmm2, xmm7
movq xmm3, [esi+4]
punpcklbw xmm3, xmm7
movq xmm4, [esi+2]
punpcklbw xmm4, xmm7
movq xmm5, [esi+3]
punpcklbw xmm5, xmm7
paddw xmm2, xmm3
paddw xmm4, xmm5
psllw xmm4, 2
psubw xmm4, xmm2
paddw xmm0, xmm1
paddw xmm0, xmm4
psllw xmm4, 2
paddw xmm0, xmm4
paddw xmm0, xmm6
psraw xmm0, 5
packuswb xmm0, xmm7
movq [edi], xmm0
lea edi, [edi+edx]
lea esi, [esi+eax]
dec ecx
jnz near .y_loop
pop edi
pop esi
ret
ALIGN 16
;*******************************************************************************
; void_t McHorVer20WidthEq16_sse2( uint8_t *pSrc,
; int iSrcStride,
; uint8_t *pDst,
; int iDstStride,
; int iHeight,
; );
;*******************************************************************************
McHorVer20WidthEq16_sse2:
push esi
push edi
mov esi, [esp + 12] ;pSrc
mov eax, [esp + 16] ;iSrcStride
mov edi, [esp + 20] ;pDst
mov ecx, [esp + 28] ;iHeight
mov edx, [esp + 24] ;iDstStride
lea esi, [esi-2] ;pSrc -= 2;
pxor xmm7, xmm7
movdqa xmm6, [h264_w0x10_1]
.y_loop:
movq xmm0, [esi]
punpcklbw xmm0, xmm7
movq xmm1, [esi+5]
punpcklbw xmm1, xmm7
movq xmm2, [esi+1]
punpcklbw xmm2, xmm7
movq xmm3, [esi+4]
punpcklbw xmm3, xmm7
movq xmm4, [esi+2]
punpcklbw xmm4, xmm7
movq xmm5, [esi+3]
punpcklbw xmm5, xmm7
paddw xmm2, xmm3
paddw xmm4, xmm5
psllw xmm4, 2
psubw xmm4, xmm2
paddw xmm0, xmm1
paddw xmm0, xmm4
psllw xmm4, 2
paddw xmm0, xmm4
paddw xmm0, xmm6
psraw xmm0, 5
packuswb xmm0, xmm7
movq [edi], xmm0
movq xmm0, [esi+8]
punpcklbw xmm0, xmm7
movq xmm1, [esi+5+8]
punpcklbw xmm1, xmm7
movq xmm2, [esi+1+8]
punpcklbw xmm2, xmm7
movq xmm3, [esi+4+8]
punpcklbw xmm3, xmm7
movq xmm4, [esi+2+8]
punpcklbw xmm4, xmm7
movq xmm5, [esi+3+8]
punpcklbw xmm5, xmm7
paddw xmm2, xmm3
paddw xmm4, xmm5
psllw xmm4, 2
psubw xmm4, xmm2
paddw xmm0, xmm1
paddw xmm0, xmm4
psllw xmm4, 2
paddw xmm0, xmm4
paddw xmm0, xmm6
psraw xmm0, 5
packuswb xmm0, xmm7
movq [edi+8], xmm0
lea edi, [edi+edx]
lea esi, [esi+eax]
dec ecx
jnz near .y_loop
pop edi
pop esi
ret
;*******************************************************************************
; void_t McHorVer02WidthEq8_sse2( uint8_t *pSrc,
; int iSrcStride,
; uint8_t *pDst,
; int iDstStride,
; int iHeight )
;*******************************************************************************
ALIGN 16
McHorVer02WidthEq8_sse2:
push esi
push edi
mov esi, [esp + 12] ;pSrc
mov edx, [esp + 16] ;iSrcStride
mov edi, [esp + 20] ;pDst
mov eax, [esp + 24] ;iDstStride
mov ecx, [esp + 28] ;iHeight
sub esi, edx
sub esi, edx
WELS_Zero xmm7
SSE_LOAD_8P xmm0, xmm7, [esi]
SSE_LOAD_8P xmm1, xmm7, [esi+edx]
lea esi, [esi+2*edx]
SSE_LOAD_8P xmm2, xmm7, [esi]
SSE_LOAD_8P xmm3, xmm7, [esi+edx]
lea esi, [esi+2*edx]
SSE_LOAD_8P xmm4, xmm7, [esi]
SSE_LOAD_8P xmm5, xmm7, [esi+edx]
.start:
FILTER_HV_W8 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [edi]
dec ecx
jz near .xx_exit
lea esi, [esi+2*edx]
SSE_LOAD_8P xmm6, xmm7, [esi]
FILTER_HV_W8 xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [edi+eax]
dec ecx
jz near .xx_exit
lea edi, [edi+2*eax]
SSE_LOAD_8P xmm7, xmm0, [esi+edx]
FILTER_HV_W8 xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, [edi]
dec ecx
jz near .xx_exit
lea esi, [esi+2*edx]
SSE_LOAD_8P xmm0, xmm1, [esi]
FILTER_HV_W8 xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, [edi+eax]
dec ecx
jz near .xx_exit
lea edi, [edi+2*eax]
SSE_LOAD_8P xmm1, xmm2, [esi+edx]
FILTER_HV_W8 xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3, [edi]
dec ecx
jz near .xx_exit
lea esi, [esi+2*edx]
SSE_LOAD_8P xmm2, xmm3, [esi]
FILTER_HV_W8 xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3, xmm4, [edi+eax]
dec ecx
jz near .xx_exit
lea edi, [edi+2*eax]
SSE_LOAD_8P xmm3, xmm4, [esi+edx]
FILTER_HV_W8 xmm6, xmm7, xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, [edi]
dec ecx
jz near .xx_exit
lea esi, [esi+2*edx]
SSE_LOAD_8P xmm4, xmm5, [esi]
FILTER_HV_W8 xmm7, xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, [edi+eax]
dec ecx
jz near .xx_exit
lea edi, [edi+2*eax]
SSE_LOAD_8P xmm5, xmm6, [esi+edx]
jmp near .start
.xx_exit:
pop edi
pop esi
ret

View File

@ -0,0 +1,135 @@
;*!
;* \copy
;* Copyright (c) 2009-2013, Cisco Systems
;* All rights reserved.
;*
;* Redistribution and use in source and binary forms, with or without
;* modification, are permitted provided that the following conditions
;* are met:
;*
;* * Redistributions of source code must retain the above copyright
;* notice, this list of conditions and the following disclaimer.
;*
;* * Redistributions in binary form must reproduce the above copyright
;* notice, this list of conditions and the following disclaimer in
;* the documentation and/or other materials provided with the
;* distribution.
;*
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;* POSSIBILITY OF SUCH DAMAGE.
;*
;*
;* memzero.asm
;*
;* Abstract
;*
;*
;* History
;* 9/16/2009 Created
;*
;*
;*************************************************************************/
BITS 32
%include "asm_inc.asm"
;***********************************************************************
; Code
;***********************************************************************
SECTION .text
ALIGN 16
;***********************************************************************
;_inline void __cdecl WelsPrefetchZero_mmx(int8_t const*_A);
;***********************************************************************
WELS_EXTERN WelsPrefetchZero_mmx
WelsPrefetchZero_mmx:
mov eax,[esp+4]
prefetchnta [eax]
ret
ALIGN 16
;***********************************************************************
; void WelsSetMemZeroAligned64_sse2(void *dst, int32_t size)
;***********************************************************************
WELS_EXTERN WelsSetMemZeroAligned64_sse2
WelsSetMemZeroAligned64_sse2:
mov eax, [esp + 4] ; dst
mov ecx, [esp + 8]
neg ecx
pxor xmm0, xmm0
.memzeroa64_sse2_loops:
movdqa [eax], xmm0
movdqa [eax+16], xmm0
movdqa [eax+32], xmm0
movdqa [eax+48], xmm0
add eax, 0x40
add ecx, 0x40
jnz near .memzeroa64_sse2_loops
ret
ALIGN 16
;***********************************************************************
; void WelsSetMemZeroSize64_mmx(void *dst, int32_t size)
;***********************************************************************
WELS_EXTERN WelsSetMemZeroSize64_mmx
WelsSetMemZeroSize64_mmx:
mov eax, [esp + 4] ; dst
mov ecx, [esp + 8]
neg ecx
pxor mm0, mm0
.memzero64_mmx_loops:
movq [eax], mm0
movq [eax+8], mm0
movq [eax+16], mm0
movq [eax+24], mm0
movq [eax+32], mm0
movq [eax+40], mm0
movq [eax+48], mm0
movq [eax+56], mm0
add eax, 0x40
add ecx, 0x40
jnz near .memzero64_mmx_loops
WELSEMMS
ret
ALIGN 16
;***********************************************************************
; void WelsSetMemZeroSize8_mmx(void *dst, int32_t size)
;***********************************************************************
WELS_EXTERN WelsSetMemZeroSize8_mmx
WelsSetMemZeroSize8_mmx:
mov eax, [esp + 4] ; dst
mov ecx, [esp + 8] ; size
neg ecx
pxor mm0, mm0
.memzero8_mmx_loops:
movq [eax], mm0
add eax, 0x08
add ecx, 0x08
jnz near .memzero8_mmx_loops
WELSEMMS
ret

View File

@ -0,0 +1,67 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file common.h
*
* \brief common flag definitions
*
* \date 7/6/2009 Created
*************************************************************************************
*/
#ifndef WELS_AS264_COMMON_H__
#define WELS_AS264_COMMON_H__
#define NO_WAITING_AU //slice level decoding
#define LONG_TERM_REF //for app
#if defined(__cplusplus)
extern "C" {
#endif//__cplusplus
#ifdef X86_ASM
void MemZeroUnalign32Bytes(void *pSrc);
void MemZeroAlign32Bytes(void *pSrc);
void MemZeroUnalign16Bytes(void *pSrc);
void MemZeroAlign16Bytes(void *pSrc);
void MemZeroAlign128Bytes(void *pSrc);
void MemZeroUnalign128Bytes(void *pSrc);
void MemZeroAlign256Bytes(void *pSrc);
void MemZeroAlign240Bytes(void *pSrc);
void MmPrefetch0(char const *kpA);
#endif// X86_ASM
#if defined(__cplusplus)
}
#endif//__cplusplus
#endif // WELS_AS264_COMMON_H__

View File

@ -0,0 +1,158 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* \file au_parser.h
*
* \brief Interfaces introduced in Access Unit level based parser
*
* \date 03/10/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_ACCESS_UNIT_PARSER_H__
#define WELS_ACCESS_UNIT_PARSER_H__
#include "typedefs.h"
#include "wels_common_basis.h"
#include "nal_prefix.h"
#include "dec_frame.h"
#include "bit_stream.h"
#include "parameter_sets.h"
#include "decoder_context.h"
namespace WelsDec {
/*!
*************************************************************************************
* \brief Start Code Prefix (0x 00 00 00 01) detection
*
* \param pBuf bitstream payload buffer
* \param pOffset offset between NAL rbsp and original bitsteam that
* start code prefix is seperated from.
* \param iBufSize count size of buffer
*
* \return RBSP buffer of start code prefix exclusive
*
* \note N/A
*************************************************************************************
*/
uint8_t* DetectStartCodePrefix( const uint8_t *kpBuf, int32_t *pOffset, int32_t iBufSize );
/*!
*************************************************************************************
* \brief to parse network abstraction layer unit,
* escape emulation_prevention_three_byte within it
former name is parse_nal
*
* \param pCtx decoder context
* \param pNalUnitHeader parsed result of NAL Unit Header to output
* \param pSrcRbsp bitstream buffer to input
* \param iSrcRbspLen length size of bitstream buffer payload
* \param pSrcNal
* \param iSrcNalLen
* \param pConsumedBytes consumed bytes during parsing
*
* \return decoded bytes payload, might be (pSrcRbsp+1) if no escapes
*
* \note N/A
*************************************************************************************
*/
uint8_t* ParseNalHeader( PWelsDecoderContext pCtx, SNalUnitHeader *pNalUnitHeader, uint8_t *pSrcRbsp, int32_t iSrcRbspLen, uint8_t *pSrcNal, int32_t iSrcNalLen, int32_t* pConsumedBytes );
int32_t ParseNonVclNal( PWelsDecoderContext pCtx, uint8_t *pRbsp, const int32_t kiSrcLen );
void_t ParseRefBasePicMarking ( PBitStringAux pBs, PRefBasePicMarking pRefBasePicMarking );
void_t ParsePrefixNalUnit ( PWelsDecoderContext pCtx, PBitStringAux pBs );
bool_t CheckAccessUnitBoundary( const PNalUnit kpCurNal, const PNalUnit kpLastNal, const PSps kpSps );
bool_t CheckAccessUnitBoundaryExt( PNalUnitHeaderExt pLastNalHdrExt, PNalUnitHeaderExt pCurNalHeaderExt, PSliceHeader pLastSliceHeader, PSliceHeader pCurSliceHeader );
/*!
*************************************************************************************
* \brief to parse Sequence Parameter Set (SPS)
*
* \param pCtx Decoder context
* \param pBsAux bitstream reader auxiliary
* \param pPicWidth picture width current Sps represented
* \param pPicHeight picture height current Sps represented
*
* \return 0 - successed
* 1 - failed
*
* \note Call it in case eNalUnitType is SPS.
*************************************************************************************
*/
int32_t ParseSps( PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t *pPicWidth, int32_t *pPicHeight );
/*!
*************************************************************************************
* \brief to parse Picture Parameter Set (PPS)
*
* \param pCtx Decoder context
* \param pPpsList pps list
* \param pBsAux bitstream reader auxiliary
*
* \return 0 - successed
* 1 - failed
*
* \note Call it in case eNalUnitType is PPS.
*************************************************************************************
*/
int32_t ParsePps( PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux );
/*!
*************************************************************************************
* \brief to parse SEI message payload
*
* \param pSei sei message to be parsed output
* \param pBsAux bitstream reader auxiliary
*
* \return 0 - successed
* 1 - failed
*
* \note Call it in case eNalUnitType is NAL_UNIT_SEI.
*************************************************************************************
*/
int32_t ParseSei( void_t *pSei, PBitStringAux pBsAux ); // reserved Sei_Msg type
/*!
*************************************************************************************
* \brief reset fmo list due to got Sps now
*
* \param pCtx decoder context
*
* \return count number of fmo context units are reset
*************************************************************************************
*/
int32_t ResetFmoList( PWelsDecoderContext pCtx );
} // namespace WelsDec
#endif//WELS_ACCESS_UNIT_PARSER_H__

View File

@ -0,0 +1,77 @@
/*!
* \copy
* Copyright (c) 2004-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//bit_stream.h - bit-stream reading and / writing auxiliary data
#ifndef WELS_BIT_STREAM_H__
#define WELS_BIT_STREAM_H__
#include "typedefs.h"
namespace WelsDec {
/*
* Bit-stream auxiliary reading / writing
*/
typedef struct TagBitStringAux {
uint8_t *pStartBuf; // buffer to start position
uint8_t *pEndBuf; // buffer + length
int32_t iBits; // count bits of overall bitstreaming input
int32_t iIndex; //only for cavlc usage
uint8_t *pCurBuf; // current reading position
uint32_t uiCurBits;
int32_t iLeftBits; // count number of available bits left ([1, 8]),
// need pointer to next byte start position in case 0 bit left then 8 instead
}SBitStringAux, *PBitStringAux;
//#pragma pack()
/*!
* \brief input bits for decoder or initialize bitstream writing in encoder
*
* \param pBitString Bit string auxiliary pointer
* \param kpBuf bit-stream buffer
* \param kiSize size in bits for decoder; size in bytes for encoder
*
* \return size of buffer data in byte; failed in -1 return
*/
int32_t InitBits( PBitStringAux pBitString, const uint8_t *kpBuf, const int32_t kiSize );
void_t InitReadBits( PBitStringAux pBitString );
uint32_t EndianFix(uint32_t uiX);
} // namespace WelsDec
#endif//WELS_BIT_STREAM_H__

View File

@ -0,0 +1,80 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file cpu.h
*
* \brief CPU feature compatibility detection
*
* \date 04/29/2009 Created
*
*************************************************************************************
*/
#if !defined(WELS_CPU_DETECTION_H__)
#define WELS_CPU_DETECTION_H__
#include "typedefs.h"
namespace WelsDec {
#if defined(__cplusplus)
extern "C" {
#endif//__cplusplus
#if defined(X86_ASM)
/*
* cpuid support verify routine
* return 0 if cpuid is not supported by cpu
*/
int32_t WelsCPUIdVerify();
void_t WelsCPUId( uint32_t uiIndex, uint32_t *pFeatureA, uint32_t *pFeatureB, uint32_t *pFeatureC, uint32_t *pFeatureD );
int32_t WelsCPUSupportAVX( uint32_t eax, uint32_t ecx );
int32_t WelsCPUSupportFMA( uint32_t eax, uint32_t ecx );
void_t WelsEmms();
uint32_t WelsCPUFeatureDetect( int32_t *pNumberOfLogicProcessors );
/*
* clear FPU registers states for potential float based calculation if support
*/
void WelsCPURestore( const uint32_t kuiCPU );
#endif
#if defined(__cplusplus)
}
#endif//__cplusplus
} // namespace WelsDec
#endif//WELS_CPU_DETECTION_H__

View File

@ -0,0 +1,80 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file cpu_core.h
*
* \brief cpu core feature detection
*
* \date 4/24/2009 Created
*
*************************************************************************************
*/
#if !defined(WELS_CPU_CORE_FEATURE_DETECTION_H__)
#define WELS_CPU_CORE_FEATURE_DETECTION_H__
/*
* WELS CPU feature flags
*/
#define WELS_CPU_MMX 0x00000001 /* mmx */
#define WELS_CPU_MMXEXT 0x00000002 /* mmx-ext*/
#define WELS_CPU_SSE 0x00000004 /* sse */
#define WELS_CPU_SSE2 0x00000008 /* sse 2 */
#define WELS_CPU_SSE3 0x00000010 /* sse 3 */
#define WELS_CPU_SSE41 0x00000020 /* sse 4.1 */
#define WELS_CPU_3DNOW 0x00000040 /* 3dnow! */
#define WELS_CPU_3DNOWEXT 0x00000080 /* 3dnow! ext */
#define WELS_CPU_ALTIVEC 0x00000100 /* altivec */
#define WELS_CPU_SSSE3 0x00000200 /* ssse3 */
#define WELS_CPU_SSE42 0x00000400 /* sse 4.2 */
/* CPU features application extensive */
#define WELS_CPU_AVX 0x00000800 /* Advanced Vector eXtentions */
#define WELS_CPU_FPU 0x00001000 /* x87-FPU on chip */
#define WELS_CPU_HTT 0x00002000 /* Hyper-Threading Technology (HTT), Multi-threading enabled feature:
physical processor package is capable of supporting more than one logic processor
*/
#define WELS_CPU_CMOV 0x00004000 /* Conditional Move Instructions,
also if x87-FPU is present at indicated by the CPUID.FPU feature bit, then FCOMI and FCMOV are supported
*/
#define WELS_CPU_MOVBE 0x00008000 /* MOVBE instruction */
#define WELS_CPU_AES 0x00010000 /* AES instruction extensions */
#define WELS_CPU_FMA 0x00020000 /* AVX VEX FMA instruction sets */
#define WELS_CPU_CACHELINE_16 0x10000000 /* CacheLine Size 16 */
#define WELS_CPU_CACHELINE_32 0x20000000 /* CacheLine Size 32 */
#define WELS_CPU_CACHELINE_64 0x40000000 /* CacheLine Size 64 */
#define WELS_CPU_CACHELINE_128 0x80000000 /* CacheLine Size 128 */
/*
* Interfaces for CPU core feature detection as below
*/
#endif//WELS_CPU_CORE_FEATURE_DETECTION_H__

View File

@ -0,0 +1,104 @@
/*!
* \copy
* Copyright (c) 2010-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file crt_util_safe_x.h
*
* \brief Safe CRT like util for cross platfroms support
*
* \date 06/04/2010 Created
*
*************************************************************************************
*/
#ifndef WELS_CRT_UTIL_SAFE_CROSS_PLATFORMS_H__
#define WELS_CRT_UTIL_SAFE_CROSS_PLATFORMS_H__
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#if defined(WIN32)
#include <windows.h>
#include <sys/types.h>
#include <sys/timeb.h>
#else
#include <sys/timeb.h>
#include <sys/time.h>
#include "typedefs.h"
#endif//WIN32
#include "typedefs.h"
namespace WelsDec {
#ifdef __cplusplus
extern "C" {
#endif
#define WELS_FILE_SEEK_SET SEEK_SET
#define WELS_FILE_SEEK_CUR SEEK_CUR
#define WESL_FILE_SEEK_END SEEK_END
typedef FILE WelsFileHandle;
#ifdef WIN32
typedef struct _timeb SWelsTime;
#else
typedef struct timeb SWelsTime;
#endif
int32_t WelsSnprintf( str_t * buffer, int32_t sizeOfBuffer, const str_t * format, ... );
str_t * WelsStrncpy(str_t * dest, int32_t sizeInBytes, const str_t * src, int32_t count);
str_t * WelsStrcat(str_t * dest, int32_t sizeInBytes, str_t * src);
int32_t WelsStrnlen(const str_t * str, int32_t maxlen);
int32_t WelsVsprintf(str_t * buffer, int32_t sizeOfBuffer, const str_t * format, va_list argptr);
WelsFileHandle * WelsFopen(const str_t * filename, const str_t * mode);
int32_t WelsFclose(WelsFileHandle * fp);
int32_t WelsFread(void * buffer, int32_t size, int32_t count, WelsFileHandle * fp);
int32_t WelsFwrite(const void * buffer, int32_t size, int32_t count, WelsFileHandle * fp);
int32_t WelsFseek(WelsFileHandle * fp, int32_t offset, int32_t origin);
int32_t WelsFflush(WelsFileHandle * fp);
int32_t WelsGetTimeOfDay(SWelsTime * tp);
int32_t WelsStrftime(str_t * buffer, int32_t size, const str_t * format, const SWelsTime * tp);
uint16_t WelsGetMillsecond(const SWelsTime * tp);
#ifdef __cplusplus
}
#endif
} // namespace WelsDec
#endif//WELS_CRT_UTIL_SAFE_CROSS_PLATFORMS_H__

View File

@ -0,0 +1,128 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file deblocking.h
*
* \brief Interfaces introduced in frame deblocking filtering
*
* \date 05/14/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_DEBLOCKING_H__
#define WELS_DEBLOCKING_H__
#include "decoder_context.h"
//#pragma pack(1)
namespace WelsDec {
/*!
* \brief deblocking module initialize
*
* \param pf
* cpu
*
* \return NONE
*/
void_t DeblockingInit( PDeblockingFunc pDeblockingFunc, int32_t iCpu );
/*!
* \brief deblocking filtering target slice
*
* \param dec Wels decoder context
*
* \return NONE
*/
void_t WelsDeblockingFilterSlice( PWelsDecoderContext pCtx, PDeblockingFilterMbFunc pDeblockMb );
/*!
* \brief pixel deblocking filtering
*
* \param filter deblocking filter
* \param pix pixel value
* \param stride frame stride
* \param bs boundary strength
*
* \return NONE
*/
uint32_t DeblockingBsMarginalMBAvcbase( PDqLayer pCurDqLayer, int32_t iEdge, int32_t iNeighMb, int32_t iMbXy);
int32_t DeblockingAvailableNoInterlayer( PDqLayer pCurDqLayer, int32_t iFilterIdc );
void_t DeblockingIntraMb( PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag );
void_t DeblockingInterMb( PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_t nBS[2][4][4], int32_t iBoundryFlag );
void_t WelsDeblockingMb( PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag );
void_t DeblockLumaLt4V_c( uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *pTc );
void_t DeblockLumaEq4V_c( uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta );
void_t DeblockLumaLt4H_c( uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *pTc );
void_t DeblockLumaEq4H_c( uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta );
void_t DeblockChromaLt4V_c( uint8_t *pPixCb, uint8_t *pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *pTc );
void_t DeblockChromaEq4V_c( uint8_t *pPixCb, uint8_t *pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta );
void_t DeblockChromaLt4H_c( uint8_t *pPixCb, uint8_t *pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *pTc );
void_t DeblockChromaEq4H_c( uint8_t *pPixCb, uint8_t *pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta );
#if defined(__cplusplus)
extern "C" {
#endif//__cplusplus
#ifdef X86_ASM
void DeblockLumaLt4V_sse2( uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *pTc );
void DeblockLumaEq4V_sse2( uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta );
void DeblockLumaTransposeH2V_sse2(uint8_t * pPixY, int32_t iStride, uint8_t * pDst);
void DeblockLumaTransposeV2H_sse2(uint8_t * pPixY, int32_t iStride, uint8_t * pSrc);
void DeblockLumaLt4H_sse2(uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *pTc);
void DeblockLumaEq4H_sse2(uint8_t *pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta);
void DeblockChromaEq4V_sse2(uint8_t * pPixCb, uint8_t * pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta);
void DeblockChromaLt4V_sse2(uint8_t * pPixCb, uint8_t * pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t * pTC);
void DeblockChromaEq4H_sse2(uint8_t * pPixCb, uint8_t * pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta);
void DeblockChromaLt4H_sse2(uint8_t * pPixCb, uint8_t * pPixCr, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t * pTC);
#endif
#if defined(__cplusplus)
}
#endif//__cplusplus
} // namespace WelsDec
//#pragma pack()
#endif //WELS_DEBLOCKING_H__

View File

@ -0,0 +1,143 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//dec_frame.h
#ifndef WELS_DEC_FRAME_H__
#define WELS_DEC_FRAME_H__
#include "typedefs.h"
#include "wels_const.h"
#include "wels_common_basis.h"
#include "parameter_sets.h"
#include "nal_prefix.h"
#include "slice.h"
#include "picture.h"
#include "bit_stream.h"
#include "fmo.h"
namespace WelsDec {
///////////////////////////////////DQ Layer level///////////////////////////////////
typedef struct TagDqLayer SDqLayer;
typedef SDqLayer* PDqLayer;
typedef struct TagLayerInfo{
SNalUnitHeaderExt sNalHeaderExt;
SSlice sSliceInLayer; // Here Slice identify to Frame on concept
PSubsetSps pSubsetSps; // current pSubsetSps used, memory alloc in external
PSps pSps; // current sps based avc used, memory alloc in external
PPps pPps; // current pps used
} SLayerInfo, *PLayerInfo;
/* Layer Representation */
struct TagDqLayer{
SLayerInfo sLayerInfo;
uint8_t *pCsData[3]; // pointer to reconstructed picture data
int32_t iCsStride[3]; // Cs stride
PBitStringAux pBitStringAux; // pointer to SBitStringAux
PFmo pFmo; // Current fmo context pointer used
int8_t *pMbType;
int32_t *pSliceIdc; // using int32_t for slice_idc
int16_t (*pMv[LIST_A])[MB_BLOCK4x4_NUM][MV_A];
int8_t (*pRefIndex[LIST_A])[MB_BLOCK4x4_NUM];
int8_t *pLumaQp;
int8_t *pChromaQp;
int8_t *pCbp;
int8_t (*pNzc)[24];
int8_t (*pNzcRs)[24];
int8_t *pResidualPredFlag;
int8_t *pInterPredictionDoneFlag;
int16_t (*pScaledTCoeff)[MB_COEFF_LIST_SIZE];
int8_t (*pIntraPredMode)[8]; //0~3 top4x4 ; 4~6 left 4x4; 7 intra16x16
int8_t (*pIntra4x4FinalMode)[MB_BLOCK4x4_NUM];
int8_t *pChromaPredMode;
//uint8_t (*motion_pred_flag[LIST_A])[MB_PARTITION_SIZE]; // 8x8
int8_t (*pSubMbType)[MB_SUB_PARTITION_SIZE];
int32_t iLumaStride;
int32_t iChromaStride;
uint8_t *pPred[3];
int32_t iMbX;
int32_t iMbY;
int32_t iMbXyIndex;
int32_t iMbWidth; // MB width of this picture, equal to sSps.iMbWidth
int32_t iMbHeight; // MB height of this picture, equal to sSps.iMbHeight;
/* Common syntax elements across all slices of a DQLayer */
int32_t iSliceIdcBackup;
uint32_t uiSpsId;
uint32_t uiPpsId;
uint32_t uiDisableInterLayerDeblockingFilterIdc;
int32_t iInterLayerSliceAlphaC0Offset;
int32_t iInterLayerSliceBetaOffset;
//SPosOffset sScaledRefLayer;
int32_t iSliceGroupChangeCycle;
PRefPicListReorderSyn pRefPicListReordering;
PRefPicMarking pRefPicMarking; // Decoded reference picture marking syntaxs
PRefBasePicMarking pRefPicBaseMarking;
PPicture pRef; // reference picture pointer
PPicture pDec; // reconstruction picture pointer for layer
bool_t bStoreRefBasePicFlag; // iCurTid == 0 && iCurQid = 0 && bEncodeKeyPic = 1
bool_t bTCoeffLevelPredFlag;
bool_t bConstrainedIntraResamplingFlag;
uint8_t uiRefLayerDqId;
uint8_t uiRefLayerChromaPhaseXPlus1Flag;
uint8_t uiRefLayerChromaPhaseYPlus1;
uint8_t uiLayerDqId; // dq_id of current layer
bool_t bUseRefBasePicFlag; // whether reference pic or reference base pic is referred?
};
typedef struct TagGpuAvcLayer{
SLayerInfo sLayerInfo;
PBitStringAux pBitStringAux; // pointer to SBitStringAux
int8_t *pMbType;
int32_t *pSliceIdc; // using int32_t for slice_idc
int8_t *pLumaQp;
int8_t *pCbp;
int8_t (*pNzc)[24];
int8_t (*pIntraPredMode)[8]; //0~3 top4x4 ; 4~6 left 4x4; 7 intra16x16
int32_t iMbX;
int32_t iMbY;
int32_t iMbXyIndex;
int32_t iMbWidth; // MB width of this picture, equal to sSps.iMbWidth
int32_t iMbHeight; // MB height of this picture, equal to sSps.iMbHeight;
}SGpuAvcDqLayer, *PGpuAvcDqLayer;
///////////////////////////////////////////////////////////////////////
} // namespace WelsDec
#endif//WELS_DEC_FRAME_H__

View File

@ -0,0 +1,243 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file golomb.h
*
* \brief Exponential Golomb entropy coding/decoding routine
*
* \date 03/13/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_EXPONENTIAL_GOLOMB_ENTROPY_CODING_H__
#define WELS_EXPONENTIAL_GOLOMB_ENTROPY_CODING_H__
#include "typedefs.h"
#include "bit_stream.h"
#include "macros.h"
//#include <assert.h>
#include "ls_defines.h"
namespace WelsDec {
#define GET_WORD(iCurBits, pBufPtr, iLeftBits) { \
iCurBits |= ((pBufPtr[0] << 8) | pBufPtr[1]) << (iLeftBits); \
iLeftBits -= 16; \
pBufPtr +=2; \
}
#define NEED_BITS(iCurBits, pBufPtr, iLeftBits) { \
if( iLeftBits > 0 ) { \
GET_WORD(iCurBits, pBufPtr, iLeftBits); \
} \
}
#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits) { \
iCurBits <<= (iNumBits); \
iLeftBits += (iNumBits); \
NEED_BITS(iCurBits, pBufPtr, iLeftBits); \
}
static inline int32_t ShowBits( PBitStringAux pBs, int32_t iNumBits )
{
return UBITS( pBs->uiCurBits, iNumBits );
}
static inline void_t FlushBits( PBitStringAux pBs, int32_t iNumBits )
{
DUMP_BITS( pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iNumBits );
}
static inline int32_t BsGetBits( PBitStringAux pBs, int32_t iNumBits )
{
int32_t iRc = UBITS( pBs->uiCurBits, iNumBits );
DUMP_BITS( pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iNumBits );
return iRc;
}
/*
* Exponential Golomb codes decoding routines
*/
// for data sharing cross modules and try to reduce size of binary generated, 12/10/2009
extern const uint8_t g_kuiIntra4x4CbpTable[48];
extern const uint8_t g_kuiInterCbpTable[48];
extern const uint8_t g_kuiLeadingZeroTable[256];
static const uint32_t g_kuiPrefix8BitsTable[16] =
{
0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
};
static inline uint32_t GetPrefixBits(uint32_t uiValue)
{
uint32_t iNumBit = 0;
if (uiValue & 0xffff0000)
{
uiValue >>= 16;
iNumBit += 16;
}
if (uiValue & 0xff00)
{
uiValue >>= 8;
iNumBit += 8;
}
if (uiValue & 0xf0)
{
uiValue >>= 4;
iNumBit += 4;
}
iNumBit += g_kuiPrefix8BitsTable[uiValue];
return (32-iNumBit);
}
/*
* Read one bit from bit stream followed
*/
static inline uint32_t BsGetOneBit(PBitStringAux pBs)
{
return ( BsGetBits(pBs, 1) );
}
static inline int32_t GetLeadingZeroBits( uint32_t iCurBits ) //<=16 bits
{
int32_t iValue;
iValue = UBITS( iCurBits, 8 );//ShowBits( bs, 8 );
if( iValue )
{
return g_kuiLeadingZeroTable[iValue];
}
iValue = UBITS( iCurBits, 16 );//ShowBits( bs, 16 );
if( iValue )
{
return (g_kuiLeadingZeroTable[iValue] + 8);
}
//ASSERT(FALSE); // should not go here
return -1;
}
static inline uint32_t BsGetUe( PBitStringAux pBs )
{
uint32_t iValue = 0;
int32_t iLeadingZeroBits = GetLeadingZeroBits( pBs->uiCurBits );
if ( iLeadingZeroBits == -1 ) //bistream error
{
return 0xffffffff;//-1
}
DUMP_BITS( pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1 );
if( iLeadingZeroBits )
{
iValue = UBITS( pBs->uiCurBits, iLeadingZeroBits );
DUMP_BITS( pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits );
}
return ((1<<iLeadingZeroBits) - 1 + iValue);
}
/*
* Read signed exp golomb codes
*/
static inline int32_t BsGetSe(PBitStringAux pBs)
{
uint32_t uiCodeNum;
uiCodeNum = BsGetUe( pBs );
if(uiCodeNum&0x01)
{
return (int32_t)((uiCodeNum+1)>>1);
}
else
{
return NEG_NUM( (int32_t)(uiCodeNum>>1) );
}
}
/*
* Read truncated exp golomb codes
*/
static inline uint32_t BsGetTe(PBitStringAux pBs, uint8_t uiRange)
{
if ( 1 == uiRange )
{
return BsGetOneBit(pBs)^1;
}
else
{
return BsGetUe(pBs);
}
}
/*
* Get unsigned truncated exp golomb code.
*/
static inline int32_t BsGetTe0(PBitStringAux pBs, int32_t iRange)
{
if(iRange==1)
return 0;
else if(iRange==2)
return BsGetOneBit(pBs)^1;
else
return BsGetUe(pBs);
}
/*
* Get number of trailing bits
*/
static inline int32_t BsGetTrailingBits( uint8_t *pBuf )
{
// TODO
uint32_t uiValue = *pBuf;
int32_t iRetNum = 1;
do
{
if (uiValue&1)
return iRetNum;
uiValue >>= 1;
++ iRetNum;
} while(iRetNum < 9);
return 0;
}
} // namespace WelsDec
#endif//WELS_EXPONENTIAL_GOLOMB_ENTROPY_CODING_H__

View File

@ -0,0 +1,61 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_DECODE_MB_AUX_H__
#define WELS_DECODE_MB_AUX_H__
#include "typedefs.h"
#include "macros.h"
namespace WelsDec {
void_t InitDctClipTable(void_t);
void_t IdctResAddPred_c(uint8_t *pPred, const int32_t kiStride, int16_t *pRs);
#if defined(__cplusplus)
extern "C" {
#endif//__cplusplus
#if defined(X86_ASM)
void_t IdctResAddPred_mmx(uint8_t *pPred, const int32_t kiStride, int16_t *pRs);
#endif//X86_ASM
#if defined(__cplusplus)
}
#endif//__cplusplus
void_t GetI4LumaIChromaAddrTable(int32_t *pBlockOffset, const int32_t kiYStride, const int32_t kiUVStride);
} // namespace WelsDec
#endif//WELS_DECODE_MB_AUX_H__

View File

@ -0,0 +1,90 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_DECODE_SLICE_H__
#define WELS_DECODE_SLICE_H__
#include "decoder_context.h"
namespace WelsDec {
void_t WelsBlockInit(int16_t* pBlock, int32_t iWidth, int32_t iHeight, int32_t iStride, uint8_t uiVal);
int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx);
int32_t WelsDecodeMbCavlcISlice (PWelsDecoderContext pCtx, PNalUnit pNalCur);
int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx);
int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur);
typedef int32_t (*PWelsDecMbCavlcFunc) (PWelsDecoderContext pCtx, PNalUnit pNalCur);
int32_t WelsTargetSliceConstruction(PWelsDecoderContext pCtx); //construction based on slice
int32_t WelsDecodeSlice(PWelsDecoderContext pCtx, bool_t bFirstSliceInLayer, PNalUnit pNalCur);
int32_t WelsTargetMbConstruction(PWelsDecoderContext pCtx);
int32_t WelsMbIntraPredictionConstruction(PWelsDecoderContext pCtx, PDqLayer pCurLayer, bool_t bOutput);
int32_t WelsMbInterSampleConstruction( PWelsDecoderContext pCtx, PDqLayer pCurLayer,
uint8_t* pDstY, uint8_t* pDstU, uint8_t* pDstV, int32_t iStrideL, int32_t iStrideC );
int32_t WelsMbInterConstruction(PWelsDecoderContext pCtx, PDqLayer pCurLayer);
void_t WelsLumaDcDequantIdct(int16_t *pBlock, int32_t iQp);
int32_t WelsMbInterPrediction (PWelsDecoderContext pCtx, PDqLayer pCurLayer);
void_t WelsMbCopy( uint8_t *pDst, int32_t iStrideDst, uint8_t *pSrc, int32_t iStrideSrc,
int32_t iHeight, int32_t iWidth );
void_t WelsChromaDcIdct( int16_t *pBlock );
#ifdef __cplusplus
extern "C" {
#endif//__cplusplus
#ifdef X86_ASM
void_t WelsResBlockZero16x16_sse2 (int16_t* pBlock, int32_t iStride);
void_t WelsResBlockZero8x8_sse2 (int16_t* pBlock, int32_t iStride);
#endif
#ifdef __cplusplus
}
#endif//__cplusplus
void_t WelsBlockZero16x16_c(int16_t * pBlock, int32_t iStride);
void_t WelsBlockZero8x8_c (int16_t * pBlock, int32_t iStride);
void_t SetNonZeroCount_c (int16_t * pBlock, int8_t * pNonZeroCount);
void_t WelsBlockFuncInit(SBlockFunc *pFunc, int32_t iCpu);
} // namespace WelsDec
#endif //WELS_DECODE_SLICE_H__

View File

@ -0,0 +1,151 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file decoder.h
*
* \brief Interfaces introduced in decoder system architecture
*
* \date 03/10/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_DECODER_SYSTEM_ARCHITECTURE_H__
#define WELS_DECODER_SYSTEM_ARCHITECTURE_H__
#include "typedefs.h"
#include "decoder_context.h"
namespace WelsDec {
#ifdef __cplusplus
extern "C" {
#endif//__cplusplus
/*!
* \brief configure decoder parameters
*/
int32_t DecoderConfigParam ( PWelsDecoderContext pCtx, const void_t* kpParam );
/*!
*************************************************************************************
* \brief Initialize Wels decoder parameters and memory
*
* \param pCtx input context to be initialized at first stage
* \param pTraceHandle handle for trace
* \param pLo log info pointer
*
* \return 0 - successed
* \return 1 - failed
*
* \note N/A
*************************************************************************************
*/
int32_t WelsInitDecoder( PWelsDecoderContext pCtx, void_t * pTraceHandle, PWelsLogCallbackFunc pLog );
/*!
*************************************************************************************
* \brief Uninitialize Wels decoder parameters and memory
*
* \param pCtx input context to be uninitialized at release stage
*
* \return NONE
*
* \note N/A
*************************************************************************************
*/
void_t WelsEndDecoder( PWelsDecoderContext pCtx );
/*!
*************************************************************************************
* \brief First entrance to decoding core interface.
*
* \param pCtx decoder context
* \param pBufBs bit streaming buffer
* \param kBsLen size in bytes length of bit streaming buffer input
* \param ppDst picture payload data to be output
* \param pDstBufInfo buf information of ouput data
*
* \return 0 - successed
* \return 1 - failed
*
* \note N/A
*************************************************************************************
*/
int32_t WelsDecodeBs( PWelsDecoderContext pCtx, const uint8_t *kpBsBuf, const int32_t kiBsLen,
uint8_t **ppDst, SBufferInfo* pDstBufInfo);
/*
* request memory blocks for decoder avc part
*/
int32_t WelsRequestMem( PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight );
/*
* free memory blocks in avc
*/
void_t WelsFreeMem( PWelsDecoderContext pCtx );
/*
* set colorspace format in decoder
*/
int32_t DecoderSetCsp(PWelsDecoderContext pCtx, const int32_t kiColorFormat);
/*!
* \brief make sure synchonozization picture resolution (get from slice header) among different parts (i.e, memory related and so on)
* over decoder internal
* ( MB coordinate and parts of data within decoder context structure )
* \param pCtx Wels decoder context
* \param iMbWidth MB width
* \pram iMbHeight MB height
* \return 0 - successful; none 0 - something wrong
*/
int32_t SyncPictureResolutionExt( PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight );
/*!
* \brief update maximal picture width and height if applicable when receiving a SPS NAL
*/
void_t UpdateMaxPictureResolution( PWelsDecoderContext pCtx, const int32_t kiCurWidth, const int32_t kiCurHeight );
void_t AssignFuncPointerForRec( PWelsDecoderContext pCtx );
void_t ResetParameterSetsState( PWelsDecoderContext pCtx );
void_t GetVclNalTemporalId( PWelsDecoderContext pCtx );//get the info that whether or not have VCL NAL in current AU,
//and if YES, get the temporal ID
#ifdef __cplusplus
}
#endif//__cplusplus
} // namespace WelsDec
#endif//WELS_DECODER_SYSTEM_ARCHITECTURE_H__

View File

@ -0,0 +1,340 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file decoder_context.h
*
* \brief mainly interface introduced in Wels decoder side
*
* \date 3/4/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_DECODER_FRAMEWORK_H__
#define WELS_DECODER_FRAMEWORK_H__
#include "typedefs.h"
#include "utils.h"
#include "wels_const.h"
#include "wels_common_basis.h"
#include "codec_app_def.h"
#include "parameter_sets.h"
#include "nalu.h"
#include "dec_frame.h"
#include "pic_queue.h"
#include "vlc_decoder.h"
#include "fmo.h"
#include "as264_common.h" // for LONG_TERM_REF macro,can be delete if not need this macro
#include "crt_util_safe_x.h"
#include "mb_cache.h"
namespace WelsDec {
#ifndef MOSAIC_AVOID_BASED_ON_SPS_PPS_ID
//#define MOSAIC_AVOID_BASED_ON_SPS_PPS_ID
#endif //MOSAIC_AVOID_BASED_ON_SPS_PPS_ID
typedef struct TagDataBuffer
{
uint8_t* pHead;
uint8_t* pEnd;
uint8_t* pStartPos;
uint8_t* pCurPos;
}SDataBuffer;
//#ifdef __cplusplus
//extern "C" {
//#endif//__cplusplus
//#pragma pack(1)
/*
* Need move below structures to function pointer to seperate module/file later
*/
//typedef int32_t (*rec_mb) (Mb *cur_mb, PWelsDecoderContext pCtx);
/*typedef for get intra predictor func pointer*/
typedef void_t (*PGetIntraPredFunc)(uint8_t *pPred, const int32_t kiLumaStride);
typedef void_t (*PIdctResAddPredFunc)(uint8_t *pPred, const int32_t kiStride, int16_t *pRs);
typedef void_t (*PExpandPictureFunc)( uint8_t *pDst, const int32_t kiStride, const int32_t kiPicWidth, const int32_t kiPicHeight );
/**/
typedef struct TagRefPic {
PPicture pRefList[LIST_A][MAX_REF_PIC_COUNT]; // reference picture marking plus FIFO scheme
PPicture pShortRefList[LIST_A][MAX_SHORT_REF_COUNT];
PPicture pLongRefList[LIST_A][MAX_LONG_REF_COUNT];
uint8_t uiRefCount[LIST_A];
uint8_t uiShortRefCount[LIST_A];
uint8_t uiLongRefCount[LIST_A]; // dependend on ref pic module
int32_t iMaxLongTermFrameIdx;
} SRefPic, *PRefPic;
typedef void_t (*PWelsMcFunc) (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight);
typedef struct TagMcFunc{
PWelsMcFunc pMcLumaFunc;
PWelsMcFunc pMcChromaFunc;
}SMcFunc;
//deblock module defination
struct TagDeblockingFunc;
typedef struct tagDeblockingFilter {
uint8_t *pCsData[3]; // pointer to reconstructed picture data
int32_t iCsStride[2]; // Cs stride
ESliceType eSliceType;
int8_t iSliceAlphaC0Offset;
int8_t iSliceBetaOffset;
int8_t iChromaQP;
int8_t iLumaQP;
struct TagDeblockingFunc *pLoopf;
}SDeblockingFilter, *PDeblockingFilter;
typedef void_t (*PDeblockingFilterMbFunc)( PDqLayer pCurDqLayer, PDeblockingFilter filter, int32_t boundry_flag );
typedef void_t (*PLumaDeblockingLT4Func)( uint8_t *iSampleY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *iTc );
typedef void_t (*PLumaDeblockingEQ4Func)( uint8_t *iSampleY, int32_t iStride, int32_t iAlpha, int32_t iBeta );
typedef void_t (*PChromaDeblockingLT4Func)( uint8_t *iSampleCb, uint8_t *iSampleCr, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t *iTc );
typedef void_t (*PChromaDeblockingEQ4Func)( uint8_t *iSampleCb, uint8_t *iSampleCr, int32_t iStride, int32_t iAlpha, int32_t iBeta );
typedef struct TagDeblockingFunc {
PLumaDeblockingLT4Func pfLumaDeblockingLT4Ver;
PLumaDeblockingEQ4Func pfLumaDeblockingEQ4Ver;
PLumaDeblockingLT4Func pfLumaDeblockingLT4Hor;
PLumaDeblockingEQ4Func pfLumaDeblockingEQ4Hor;
PChromaDeblockingLT4Func pfChromaDeblockingLT4Ver;
PChromaDeblockingEQ4Func pfChromaDeblockingEQ4Ver;
PChromaDeblockingLT4Func pfChromaDeblockingLT4Hor;
PChromaDeblockingEQ4Func pfChromaDeblockinEQ4Hor;
} SDeblockingFunc, *PDeblockingFunc;
typedef void_t (*PWelsBlockAddStrideFunc)(uint8_t *pDest, uint8_t *pPred, int16_t *pRes, int32_t iPredStride, int32_t iResStride);
typedef void_t (*PWelsBlockZeroFunc) (int16_t* pBlock, int32_t iStride);
typedef void_t (*PWelsNonZeroCountFunc) (int16_t *pBlock, int8_t *pNonZeroCount);
typedef void_t (*PWelsSimpleIdct4x4AddFunc) (int16_t *pDest, int16_t *pSrc, int32_t iStride);
typedef struct TagBlockFunc {
PWelsBlockZeroFunc pWelsBlockZero16x16Func;
PWelsBlockZeroFunc pWelsBlockZero8x8Func;
PWelsNonZeroCountFunc pWelsSetNonZeroCountFunc;
} SBlockFunc;
typedef void_t ( *PWelsFillNeighborMbInfoIntra4x4Func )( PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode, PDqLayer pCurLayer );
typedef int32_t (*PWelsParseIntra4x4ModeFunc) ( PNeighAvail pNeighAvail, int8_t* pIntraPredMode, PBitStringAux pBs, PDqLayer pCurDqLayer);
typedef int32_t (*PWelsParseIntra16x16ModeFunc) ( PNeighAvail pNeighAvail, PBitStringAux pBs, PDqLayer pCurDqLayer);
typedef struct TagExpandPicFunc{
PExpandPictureFunc pExpandLumaPicture;
PExpandPictureFunc pExpandChromaPicture[2];
}SExpandPicFunc;
/*
* SWelsDecoderContext: to maintail all modules data over decoder@framework
*/
typedef struct TagWelsDecoderContext {
// Input
void_t *pArgDec; // structured arguments for decoder, reserved here for extension in the future
SDataBuffer sRawData;
// Configuration
SDecodingParam *pParam;
uint32_t uiCpuFlag; // CPU compatibility detected
int32_t iDecoderMode; // indicate decoder running mode
int32_t iSetMode; // indicate decoder mode set from upper layer, this is read-only for decoder internal
int32_t iDecoderOutputProperty; // indicate the output buffer property
int32_t iModeSwitchType; // 1: optimal decision; 2: forced switch to the other mode; 0: no switch
int32_t iOutputColorFormat; // color space format to be outputed
VIDEO_BITSTREAM_TYPE eVideoType; //indicate the type of video to decide whether or not to do qp_delta error detection.
bool_t bErrorResilienceFlag; // error resilience flag
bool_t bHaveGotMemory; // global memory for decoder context related ever requested?
int32_t iImgWidthInPixel; // width of image in pixel reconstruction picture to be output
int32_t iImgHeightInPixel;// height of image in pixel reconstruction picture to be output
int32_t iMaxWidthInSps; // maximal width of pixel in SPS sets
int32_t iMaxHeightInSps; // maximal height of pixel in SPS sets
// Derived common elements
SNalUnitHeader sCurNalHead;
ESliceType eSliceType; // Slice type
int32_t iFrameNum;
int32_t iPrevFrameNum; // frame number of previous frame well decoded for non-truncated mode yet
bool_t bLastHasMmco5; //
int32_t iErrorCode; // error code return while decoding in case packets lost
SFmo sFmoList[MAX_PPS_COUNT]; // list for FMO storage
PFmo pFmo; // current fmo context after parsed slice_header
int32_t iActiveFmoNum; // active count number of fmo context in list
/*needed info by decode slice level and mb level*/
int32_t iDecBlockOffsetArray[24]; // address talbe for sub 4x4 block in intra4x4_mb, so no need to caculta the address every time.
struct
{
int8_t *pMbType[LAYER_NUM_EXCHANGEABLE]; /* mb type */
int16_t (*pMv[LAYER_NUM_EXCHANGEABLE][LIST_A])[MB_BLOCK4x4_NUM][MV_A]; //[LAYER_NUM_EXCHANGEABLE MB_BLOCK4x4_NUM*]
int8_t (*pRefIndex[LAYER_NUM_EXCHANGEABLE][LIST_A])[MB_BLOCK4x4_NUM];
int8_t *pLumaQp[LAYER_NUM_EXCHANGEABLE]; /*mb luma_qp*/
int8_t *pChromaQp[LAYER_NUM_EXCHANGEABLE]; /*mb chroma_qp*/
int8_t (*pNzc[LAYER_NUM_EXCHANGEABLE])[24];
int8_t (*pNzcRs[LAYER_NUM_EXCHANGEABLE])[24];
int16_t (*pScaledTCoeff[LAYER_NUM_EXCHANGEABLE])[MB_COEFF_LIST_SIZE]; /*need be aligned*/
int8_t (*pIntraPredMode[LAYER_NUM_EXCHANGEABLE])[8]; //0~3 top4x4 ; 4~6 left 4x4; 7 intra16x16
int8_t (*pIntra4x4FinalMode[LAYER_NUM_EXCHANGEABLE])[MB_BLOCK4x4_NUM];
int8_t *pChromaPredMode[LAYER_NUM_EXCHANGEABLE];
int8_t *pCbp[LAYER_NUM_EXCHANGEABLE];
uint8_t (*pMotionPredFlag[LAYER_NUM_EXCHANGEABLE][LIST_A])[MB_PARTITION_SIZE]; // 8x8
int8_t (*pSubMbType[LAYER_NUM_EXCHANGEABLE])[MB_SUB_PARTITION_SIZE];
int32_t *pSliceIdc[LAYER_NUM_EXCHANGEABLE]; // using int32_t for slice_idc
int8_t *pResidualPredFlag[LAYER_NUM_EXCHANGEABLE];
int8_t *pInterPredictionDoneFlag[LAYER_NUM_EXCHANGEABLE];
int16_t iMbWidth;
int16_t iMbHeight;
}sMb;
// reconstruction picture
PPicture pDec; //pointer to current picture being reconstructed
// reference pictures
SRefPic sRefPic;
SVlcTable sVlcTable; // vlc table
SBitStringAux sBs;
/* Global memory external */
SPosOffset sFrameCrop;
#ifdef MOSAIC_AVOID_BASED_ON_SPS_PPS_ID
int32_t iSpsTotalNum; //the number of SPS in current IDR interval
int32_t iSubspsTotalNum; //the number of subsps in current IDR interval
int32_t iPpsTotalNum; //the number of PPS in current IDR interval.
#endif //MOSAIC_AVOID_BASED_ON_SPS_PPS_ID
SSps sSpsBuffer[MAX_SPS_COUNT];
SPps sPpsBuffer[MAX_PPS_COUNT];
PSliceHeader pSliceHeader;
PPicBuff pPicBuff[LIST_A]; // Initially allocated memory for pictures which are used in decoding.
int32_t iPicQueueNumber;
SSubsetSps sSubsetSpsBuffer[MAX_SPS_COUNT];
SNalUnit sPrefixNal;
PAccessUnit pAccessUnitList; // current access unit list to be performed
PSps pSps; // used by current AU
PPps pPps; // used by current AU
// Memory for pAccessUnitList is dynamically held till decoder destruction.
PDqLayer pCurDqLayer; // current DQ layer representation, also carry reference base layer if applicable
PDqLayer pDqLayersList[LAYER_NUM_EXCHANGEABLE]; // DQ layers list with memory allocated
uint8_t *pCsListXchg[LAYER_NUM_EXCHANGEABLE][3]; // Constructed picture buffer: 0- cur layer, 1- ref layer;
int16_t *pRsListXchg[LAYER_NUM_EXCHANGEABLE][3];// Residual picture buffer: 0- cur layer, 1- ref layer;
int32_t iCsStride[3]; // strides for Cs
int32_t iRsStride[3]; // strides for Rs
int32_t iPicWidthReq; // picture width have requested the memory
int32_t iPicHeightReq; // picture height have requested the memory
uint8_t uiTargetDqId; // maximal DQ ID in current access unit, meaning target layer ID
bool_t bAvcBasedFlag; // For decoding bitstream:
bool_t bEndOfStreamFlag; // Flag on end of stream requested by external application layer
bool_t bInitialDqLayersMem; // dq layers related memory is available?
bool_t bOnlyOneLayerInCurAuFlag; //only one layer in current AU: 1
// for EC parameter sets
bool_t bSpsExistAheadFlag; // whether does SPS NAL exist ahead of sequence?
bool_t bSubspsExistAheadFlag;// whether does Subset SPS NAL exist ahead of sequence?
bool_t bPpsExistAheadFlag; // whether does PPS NAL exist ahead of sequence?
bool_t bSpsAvailFlags[MAX_SPS_COUNT];
bool_t bSubspsAvailFlags[MAX_SPS_COUNT];
bool_t bPpsAvailFlags[MAX_PPS_COUNT];
bool_t bReferenceLostAtT0Flag;
#ifdef LONG_TERM_REF
bool_t bParamSetsLostFlag; //sps or pps do not exist or not correct
bool_t bCurAuContainLtrMarkSeFlag; //current AU has the LTR marking syntax element, mark the previous frame or self
int32_t iFrameNumOfAuMarkedLtr; //if bCurAuContainLtrMarkSeFlag==true, SHOULD set this variable
uint16_t uiCurIdrPicId;
#endif
PGetIntraPredFunc pGetI16x16LumaPredFunc[7]; //h264_predict_copy_16x16;
PGetIntraPredFunc pGetI4x4LumaPredFunc[14]; // h264_predict_4x4_t
PGetIntraPredFunc pGetIChromaPredFunc[7]; // h264_predict_8x8_t
PIdctResAddPredFunc pIdctResAddPredFunc;
SMcFunc sMcFunc;
/* For Deblocking */
SDeblockingFunc sDeblockingFunc;
SExpandPicFunc sExpandPicFunc;
/* For Block */
SBlockFunc sBlockFunc;
/* For EC */
int32_t iCurSeqIntervalTargetDependId;
int32_t iCurSeqIntervalMaxPicWidth;
int32_t iCurSeqIntervalMaxPicHeight;
PWelsFillNeighborMbInfoIntra4x4Func pFillInfoCacheIntra4x4Func;
PWelsParseIntra4x4ModeFunc pParseIntra4x4ModeFunc;
PWelsParseIntra16x16ModeFunc pParseIntra16x16ModeFunc;
//feedback whether or not have VCL in current AU, and the temporal ID
int32_t iFeedbackVclNalInAu;
int32_t iFeedbackTidInAu;
bool_t bAuReadyFlag; // TRUE: one au is ready for decoding; FALSE: default value
//trace handle
void_t * pTraceHandle;
#ifdef NO_WAITING_AU
//Save the last nal header info
SNalUnitHeaderExt sLastNalHdrExt;
SSliceHeader sLastSliceHeader;
#endif
}SWelsDecoderContext, *PWelsDecoderContext;
//#pragma pack()
//#ifdef __cplusplus
//}
//#endif//__cplusplus
} // namespace WelsDec
#endif//WELS_DECODER_FRAMEWORK_H__

View File

@ -0,0 +1,138 @@
/*!
* \copy
* Copyright (c) 2008-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* decoder_core.h
*
* Abstract
* Encapsulative core interfaces
*
* History
* 07/10/2008 Created
*
*****************************************************************************/
#ifndef WELS_DECODER_CORE_H__
#define WELS_DECODER_CORE_H__
#include "typedefs.h"
#include "wels_common_basis.h"
#include "decoder_context.h"
#include "codec_def.h"
namespace WelsDec {
/*
* WelsInitMemory
* Memory request for introduced data
* Especially for:
* rbsp_au_buffer, cur_dq_layer_ptr and ref_dq_layer_ptr in MB info cache.
* return:
* 0 - success; otherwise returned error_no defined in error_no.h.
*/
int32_t WelsInitMemory( PWelsDecoderContext pCtx );
/*
* WelsFreeMemory
* Free memory introduced in WelsInitMemory at destruction of decoder.
*
*/
void_t WelsFreeMemory( PWelsDecoderContext pCtx );
/*!
* \brief request memory when maximal picture width and height are available
*/
int32_t InitialDqLayersContext ( PWelsDecoderContext pCtx, const int32_t kiMaxWidth, const int32_t kiMaxHeight );
/*!
* \brief free dq layer context memory related
*/
void_t UninitialDqLayersContext ( PWelsDecoderContext pCtx );
/*
* DecodeNalHeaderExt
* Trigger condition: NAL_UNIT_TYPE = NAL_UNIT_PREFIX or NAL_UNIT_CODED_SLICE_EXT
* Parameter:
* pNal: target NALUnit ptr
* pSrc: NAL Unit bitstream
*/
void_t DecodeNalHeaderExt( PNalUnit pNal, uint8_t* pSrc );
/*
* ParseSliceHeaderSyntaxs
* Parse slice header of bitstream
*/
int32_t ParseSliceHeaderSyntaxs ( PWelsDecoderContext pCtx, PBitStringAux pBs, const bool_t kbExtensionFlag );
/*
* Copy relative syntax elements of NALUnitHeaderExt, sRefPicBaseMarking and bStoreRefBasePicFlag in prefix nal unit.
* pSrc: mark as decoded prefix NAL
* pDst: succeeded VCL NAL based AVC (I/P Slice)
*/
bool_t PrefetchNalHeaderExtSyntax ( PWelsDecoderContext pCtx, PNalUnit const kpDst, PNalUnit const kpSrc);
/*
* ConstructAccessUnit
* construct an access unit for given input bitstream, maybe partial NAL Unit, one or more Units are involved to
* joint a collective access unit.
* parameter\
* buf: bitstream data buffer
* bit_len: size in bit length of data
* buf_len: size in byte length of data
* coded_au: mark an Access Unit decoding finished
* return:
* 0 - success; otherwise returned error_no defined in error_no.h
*/
int32_t ConstructAccessUnit( PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo *pDstInfo);
/*
* DecodeCurrentAccessUnit
* Decode current access unit when current AU is completed.
*/
int32_t DecodeCurrentAccessUnit( PWelsDecoderContext pCtx, uint8_t **ppDst, int32_t *iDstLen, int32_t *pWidth, int32_t *pHeight, SBufferInfo *pDstInfo );
/*
* Prepare current dq layer context initialization.
*/
void_t WelsDqLayerDecodeStart ( PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps );
int32_t WelsDecodeAccessUnitStart ( PWelsDecoderContext pCtx );
void_t WelsDecodeAccessUnitEnd ( PWelsDecoderContext pCtx );
void_t ForceResetCurrentAccessUnit( PAccessUnit pAu );
void_t ForceClearCurrentNal( PAccessUnit pAu );
} // namespace WelsDec
#endif//WELS_DECODER_CORE_H__

View File

@ -0,0 +1,171 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file error_code.h
*
* \brief Error codes used in Wels decoder side
*
* \date 3/4/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_ERROR_CODE_H__
#define WELS_ERROR_CODE_H__
namespace WelsDec {
typedef enum TagWelsErr
{
ERR_NONE = 0,
ERR_INVALID_PARAMETERS = 1,
ERR_MALLOC_FAILED = 2,
ERR_API_FAILED = 3,
ERR_BOUND = 31,
}EWelsErr;
/*
* Specified error format:
* ERR_NO = (ERR_LEVEL_FROM (HIGH WORD) << 16) | (ERR_INFO_FROM (LOW WORD))
*
*/
#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
/* ERR_LEVEL */
//-----------------------------------------------------------------------------------------------------------
enum{
ERR_LEVEL_ACCESS_UNIT = 1,
ERR_LEVEL_NAL_UNIT_HEADER,
ERR_LEVEL_PREFIX_NAL,
ERR_LEVEL_PARAM_SETS,
ERR_LEVEL_SLICE_HEADER,
ERR_LEVEL_SLICE_DATA,
ERR_LEVEL_MB_DATA,
};
//-----------------------------------------------------------------------------------------------------------
/* More detailed error information, maximal value is 65535 */
//-----------------------------------------------------------------------------------------------------------
#define ERR_INFO_COMMON_BASE 1
#define ERR_INFO_SYNTAX_BASE 1001
#define ERR_INFO_LOGIC_BASE 10001
enum{
/* Error from common system level: 1-1000 */
ERR_INFO_OUT_OF_MEMORY = ERR_INFO_COMMON_BASE,
ERR_INFO_INVALID_ACCESS,
ERR_INFO_INVALID_PTR,
ERR_INFO_INVALID_PARAM,
ERR_INFO_FILE_NO_FOUND,
ERR_INFO_PATH_NO_FOUND,
ERR_INFO_ACCESS_DENIED,
ERR_INFO_NOT_READY,
ERR_INFO_WRITE_FAULT,
ERR_INFO_READ_FAULT,
/* Error from H.264 syntax elements parser: 1001-10000 */
ERR_INFO_NO_PREFIX_CODE = ERR_INFO_SYNTAX_BASE, // No start prefix code indication
ERR_INFO_NO_PARAM_SETS, // No SPS and/ PPS before sequence header
ERR_INFO_PARAM_SETS_NOT_INTEGRATED, // Parameters sets (sps/pps) are not integrated at all before to decode VCL nal
ERR_INFO_SPS_ID_OVERFLOW,
ERR_INFO_PPS_ID_OVERFLOW,
ERR_INFO_INVALID_PROFILE_IDC,
ERR_INFO_UNMATCHED_LEVEL_IDC,
ERR_INFO_INVALID_POC_TYPE,
ERR_INFO_REF_COUNT_OVERFLOW,
ERR_INFO_CROPPING_NO_SUPPORTED,
ERR_INFO_INVALID_SLICEGROUP,
ERR_INFO_INVALID_SLICEGROUP_MAP_TYPE,
ERR_INFO_INVALID_FRAME_NUM,
ERR_INFO_FMO_INIT_FAIL,
ERR_INFO_SLICE_TYPE_OVERFLOW,
ERR_INFO_INVALID_QP,
ERR_INFO_INVALID_DBLOCKING_IDC,
ERR_INFO_INVALID_MB_TYPE,
ERR_INFO_INVALID_SUB_MB_TYPE,
ERR_INFO_UNAVAILABLE_TOP_BLOCK_FOR_INTRA,
ERR_INFO_UNAVAILABLE_LEFT_BLOCK_FOR_INTRA,
ERR_INFO_INVALID_REF_INDEX,
ERR_INFO_INVALID_CBP,
ERR_INFO_DQUANT_OUT_OF_RANGE,
ERR_INFO_CAVLC_INVALID_PREFIX,
ERR_INFO_CAVLC_INVALID_TOTAL_COEFF,
ERR_INFO_CAVLC_INVALID_ZERO_LEFT,
ERR_INFO_MV_OUT_OF_RANGE,
ERR_INFO_INVALID_I4x4_PRED_MODE,
ERR_INFO_INVALID_I16x16_PRED_MODE,
ERR_INFO_INVALID_I_CHROMA_PRED_MODE,
ERR_INFO_UNSUPPORTED_NON_BASELINE,
ERR_INFO_UNSUPPORTED_FMOTYPE,
ERR_INFO_UNSUPPORTED_MBAFF,
ERR_INFO_UNSUPPORTED_ILP,
ERR_INFO_UNSUPPORTED_CABAC_EL,
ERR_INFO_UNSUPPORTED_SPSI,
ERR_INFO_UNSUPPORTED_MGS,
ERR_INFO_UNSUPPORTED_BIPRED,
ERR_INFO_UNSUPPORTED_WP,
ERR_INFO_FRAMES_LOST,
ERR_INFO_DEPENDENCY_SPATIAL_LAYER_LOST,
ERR_INFO_DEPENDENCY_QUALIT_LAYER_LOST,
ERR_INFO_REFERENCE_PIC_LOST,
ERR_INFO_INVALID_REORDERING,
ERR_INFO_INVALID_MARKING,
ERR_INFO_FMO_NOT_SUPPORTED_IN_BASE_LAYER,
ERR_INFO_INVALID_ESS,
ERR_INFO_INVALID_SLICE_TYPE,
ERR_INFO_INVALID_REF_MARKING,
ERR_INFO_INVALID_REF_REORDERING,
/* Error from corresponding logic, 10001-65535 */
ERR_INFO_NO_IDR_PIC = ERR_INFO_LOGIC_BASE, // NO IDR picture available before sequence header
ERR_INFO_EC_NO_NEIGHBOUR_MBS,
ERR_INFO_EC_UNEXPECTED_MB_TYPE,
ERR_INFO_EC_NO_ENOUGH_NEIGHBOUR_MBS,
//for LTR
ERR_INFO_INVALID_MMCO_OPCODE_BASE,
ERR_INFO_INVALID_MMCO_SHORT2UNUSED,
EER_INFO_INVALID_MMCO_LONG2UNUSED,
ERR_INFO_INVALID_MMCO_SHOART2LONG,
ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW,
ERR_INFO_INVALID_MMCO_REF_NUM_NOT_ENOUGH,
ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX,
};
//-----------------------------------------------------------------------------------------------------------
} // namespace WelsDec
#endif//WELS_ERROR_CODE_H__

View File

@ -0,0 +1,78 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file expand_pic.h
*
* \brief Interface for expanding reconstructed picture to be used for reference
*
* \date 06/08/2009 Created
*************************************************************************************
*/
#ifndef WELS_EXPAND_PIC_H__
#define WELS_EXPAND_PIC_H__
#include "decoder_context.h"
#include "picture.h"
namespace WelsDec {
void_t ExpandReferencingPicture(PPicture pPic, PExpandPictureFunc pExpandPictureLuma, PExpandPictureFunc pExpandPictureChroma[2]);
#if defined(__cplusplus)
extern "C" {
#endif//__cplusplus
#if defined(X86_ASM)
void_t ExpandPictureLuma_sse2( uint8_t *pDst,
const int32_t kiStride,
const int32_t kiPicWidth,
const int32_t kiPicHeight );
void_t ExpandPictureChromaAlign_sse2( uint8_t *pDst,
const int32_t kiStride,
const int32_t kiPicWidth,
const int32_t kiPicHeight );
void_t ExpandPictureChromaUnalign_sse2( uint8_t *pDst,
const int32_t kiStride,
const int32_t kiPicWidth,
const int32_t kiPicHeight );
#endif//X86_ASM
#if defined(__cplusplus)
}
#endif//__cplusplus
//
void_t InitExpandPictureFunc( SExpandPicFunc *pExpandPicFunc, const uint32_t kuiCpuFlags );
} // namespace WelsDec
#endif//WELS_EXPAND_PIC_H__

View File

@ -0,0 +1,113 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file fmo.h
*
* \brief Flexible Macroblock Ordering implementation
*
* \date 2/4/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_FLEXIBLE_MACROBLOCK_ORDERING_H__
#define WELS_FLEXIBLE_MACROBLOCK_ORDERING_H__
#include "typedefs.h"
#include "wels_const.h"
#include "parameter_sets.h"
namespace WelsDec {
#ifndef MB_XY_T
#define MB_XY_T int16_t
#endif//MB_XY_T
/*!
* \brief Wels Flexible Macroblock Ordering (FMO)
*/
typedef struct TagFmo{
uint8_t *pMbAllocMap;
int32_t iCountMbNum;
int32_t iSliceGroupCount;
int32_t iSliceGroupType;
bool_t bActiveFlag;
uint8_t uiReserved[3]; // reserved padding bytes
} SFmo, *PFmo;
/*!
* \brief Initialize Wels Flexible Macroblock Ordering (FMO)
*
* \param pFmo Wels fmo to be initialized
* \param pPps PPps
* \param kiMbWidth mb width
* \param kiMbHeight mb height
*
* \return 0 - successful; none 0 - failed;
*/
int32_t InitFmo( PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t kiMbHeight );
/*!
* \brief Uninitialize Wels Flexible Macroblock Ordering (FMO) list
*
* \param pFmo Wels base fmo ptr to be uninitialized
* \param kiCnt count number of PPS per list
* \param kiAvail count available number of PPS in list
*
* \return NONE
*/
void_t UninitFmoList( PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail );
/*!
* \brief update/insert FMO parameter unit
*
* \param pFmo FMO context
* \param pSps PSps
* \param pPps PPps
* \param pActiveFmoNum int32_t* [in/out]
*
* \return true - update/insert successfully; false - failed;
*/
bool_t FmoParamUpdate( PFmo pFmo, PSps pSps, PPps pPps, int32_t *pActiveFmoNum );
/*!
* \brief Get successive mb to be processed with given current mb_xy
*
* \param pFmo Wels fmo context
* \param iMbXy current mb_xy
*
* \return iNextMb - successful; -1 - failed;
*/
MB_XY_T FmoNextMb( PFmo pFmo, const MB_XY_T kiMbXy );
} // namespace WelsDec
#endif//WELS_FLEXIBLE_MACROBLOCK_ORDERING_H__

View File

@ -0,0 +1,121 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file get_intra_predictor.h
*
* \brief interfaces for get intra predictor about 16x16, 4x4, chroma.
*
* \date 4/2/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_GET_INTRA_PREDICTOR_H__
#define WELS_GET_INTRA_PREDICTOR_H__
#include "typedefs.h"
//#pragma pack(1)
namespace WelsDec {
void_t WelsI4x4LumaPredV_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredH_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDc_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDcLeft_c(uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDcTop_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDcNA_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDDL_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDDLTop_c(uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDDR_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredVL_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredVLTop_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredVR_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredHU_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredHD_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredV_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredH_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredPlane_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDc_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDcLeft_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDcTop_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDcNA_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredV_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredH_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredPlane_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredDc_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredDcTop_c (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredDcLeft_c(uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredDcNA_c (uint8_t *pPred, const int32_t kiStride);
#if defined(__cplusplus)
extern "C" {
#endif//__cplusplus
#if defined(X86_ASM)
void_t WelsI16x16LumaPredPlane_sse2(uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredH_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredV_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredDc_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredDcTop_sse2(uint8_t *pPred, const int32_t kiStride);
void_t WelsI16x16LumaPredDcNA_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDcTop_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredPlane_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDc_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredH_mmx (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredV_mmx (uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDcLeft_mmx(uint8_t *pPred, const int32_t kiStride);
void_t WelsIChromaPredDcNA_mmx (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredH_sse2 (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDc_sse2(uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDDR_mmx(uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredHD_mmx (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredHU_mmx (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredVR_mmx (uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredDDL_mmx(uint8_t *pPred, const int32_t kiStride);
void_t WelsI4x4LumaPredVL_mmx (uint8_t *pPred, const int32_t kiStride);
#endif//X86_ASM
#if defined(__cplusplus)
}
#endif//__cplusplus
} // namespace WelsDec
//#pragma pack()
#endif //WELS_GET_INTRA_PREDICTOR_H__

View File

@ -0,0 +1,86 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef ___LD_ST_MACROS___
#define ___LD_ST_MACROS___
#include "typedefs.h"
#ifdef __GNUC__
struct tagUnaligned_64 { uint64_t l; } __attribute__((packed));
struct tagUnaligned_32 { uint32_t l; } __attribute__((packed));
struct tagUnaligned_16 { uint16_t l; } __attribute__((packed));
#define LD16(a) (((struct tagUnaligned_16 *) (a))->l)
#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
#define LD64(a) (((struct tagUnaligned_64 *) (a))->l)
//#define _USE_STRUCT_INT_CVT
// #ifdef _USE_STRUCT_INT_CVT
#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
// #else
// inline void_t __ST16(void_t *dst, uint16_t v) { memcpy(dst, &v, 2); }
// inline void_t __ST32(void_t *dst, uint32_t v) { memcpy(dst, &v, 4); }
//inline void_t __ST64(void_t *dst, uint64_t v) { memcpy(dst, &v, 8); }
// #endif
#else
//#define INTD16(a) (*((int16_t*)(a)))
//#define INTD32(a) (*((int32_t*)(a)))
//#define INTD64(a) (*((int64_t*)(a)))
#define LD16(a) (*((uint16_t*)(a)))
#define LD32(a) (*((uint32_t*)(a)))
#define LD64(a) (*((uint64_t*)(a)))
#define ST16(a, b) *((uint16_t*)(a)) = (b)
#define ST32(a, b) *((uint32_t*)(a)) = (b)
#define ST64(a, b) *((uint64_t*)(a)) = (b)
#endif /* !__GNUC__ */
#ifndef INTD16
#define INTD16 LD16
#endif//INTD16
#ifndef INTD32
#define INTD32 LD32
#endif//INTD32
#ifndef INTD64
#define INTD64 LD64
#endif//INTD64
#endif//___LD_ST_MACROS___

View File

@ -0,0 +1,306 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file macros.h
*
* \brief MACRO based tool utilization
*
* \date 3/13/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_MACRO_UTILIZATIONS_H__
#define WELS_MACRO_UTILIZATIONS_H__
#include <math.h>
#include <assert.h>
#include "typedefs.h"
namespace WelsDec {
/*
* FORCE_STACK_ALIGN_1D: force 1 dimension local data aligned in stack
* _tp: type
* _nm: var name
* _sz: size
* _al: align bytes
* auxiliary var: _nm ## _tEmP
*/
#define FORCE_STACK_ALIGN_1D(_tp, _nm, _sz, _al) \
_tp _nm ## _tEmP[(_sz)+(_al)-1]; \
_tp *_nm = _nm ## _tEmP + ((_al)-1) - (((int32_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp))
#define ENFORCE_STACK_ALIGN_2D(_tp, _nm, _cx, _cy, _al) \
assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
_tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
_tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
_nm ## _tEmP_al -= (((int32_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
_tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
///////////// from encoder
#if defined(_MSC_VER)
#define inline __inline
#define __FASTCALL __fastcall
// #define __align8(t,v) __declspec(align(8)) t v
#define __align16(t,v) __declspec(align(16)) t v
#elif defined(__GNUC__)
#if !defined(MAC_POWERPC) && !defined(UNIX) && !defined(ANDROID_NDK) && !defined(APPLE_IOS)
#define __FASTCALL __attribute__ ((fastcall))// linux, centos, mac_x86 can be used
#else
#define __FASTCALL // mean NULL for mac_ppc, solaris(sparc/x86)
#endif//MAC_POWERPC
// #define __align8(t,v) t v __attribute__ ((aligned (8)))
#define __align16(t,v) t v __attribute__ ((aligned (16)))
#if defined(APPLE_IOS)
#define inline //For iOS platform
#endif
#endif//_MSC_VER
#if !defined(SIZEOFRGB24)
#define SIZEOFRGB24(cx, cy) (3 * (cx) * (cy))
#endif//SIZEOFRGB24
#if !defined(SIZEOFRGB32)
#define SIZEOFRGB32(cx, cy) (4 * (cx) * (cy))
#endif//SIZEOFRGB32
#if 1
#ifndef WELS_ALIGN
#define WELS_ALIGN(x, n) (((x)+(n)-1)&~((n)-1))
#endif//WELS_ALIGN
#ifndef WELS_MAX
#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
#endif//WELS_MAX
#ifndef WELS_MIN
#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
#endif//WELS_MIN
#else
#ifndef WELS_ALIGN
#define WELS_ALIGN(x, n) (((x)+(n)-1)&~((n)-1))
#endif//WELS_ALIGN
#ifndef WELS_MAX
#define WELS_MAX(x, y) ((x) - (((x)-(y))&(((x)-(y))>>31)))
#endif//WELS_MAX
#ifndef WELS_MIN
#define WELS_MIN(x, y) ((y) + (((x)-(y))&(((x)-(y))>>31)))
#endif//WELS_MIN
#endif
#ifndef WELS_CEIL
#define WELS_CEIL(x) ceil(x) // FIXME: low complexity instead of math library used
#endif//WELS_CEIL
#ifndef WELS_FLOOR
#define WELS_FLOOR(x) floor(x) // FIXME: low complexity instead of math library used
#endif//WELS_FLOOR
#ifndef WELS_ROUND
#define WELS_ROUND(x) ((int32_t)(0.5f+(x)))
#endif//WELS_ROUND
#define WELS_NON_ZERO_COUNT_AVERAGE(nC,nA,nB) { \
nC = nA + nB + 1; \
nC >>= (uint8_t)( nA != -1 && nB != -1); \
nC += (uint8_t)(nA == -1 && nB == -1); \
}
static __inline int32_t CeilLog2( int32_t i )
{
int32_t s = 0; i--;
while( i > 0 )
{
s++;
i >>= 1;
}
return s;
}
/*
the second path will degrades the performance
*/
#if 1
static inline int32_t WelsMedian(int32_t iX, int32_t iY, int32_t iZ)
{
int32_t iMin = iX, iMax = iX;
if ( iY < iMin )
iMin = iY;
else
iMax = iY;
if ( iZ < iMin )
iMin = iZ;
else if ( iZ > iMax )
iMax = iZ;
return (iX + iY + iZ) - (iMin + iMax);
}
#else
static inline int32_t WelsMedian(int32_t iX, int32_t iY, int32_t iZ)
{
int32_t iTmp = (iX-iY)&((iX-iY)>>31);
iX -= iTmp;
iY += iTmp;
iY -= (iY-iZ)&((iY-iZ)>>31);
iY += (iX-iY)&((iX-iY)>>31);
return iY;
}
#endif
#ifndef NEG_NUM
//#define NEG_NUM( num ) (-num)
#define NEG_NUM(iX) (1+(~(iX)))
#endif// NEG_NUM
#ifndef WELS_CLIP1
//#define WELS_CLIP1(x) (x & ~255) ? (-x >> 31) : x
#define WELS_CLIP1(iX) (((iX) & ~255) ? (-(iX) >> 31) : (iX)) //iX not only a value but also can be an expression
#endif//WELS_CLIP1
#ifndef WELS_SIGN
#define WELS_SIGN(iX) ((int32_t)(iX) >> 31)
#endif //WELS_SIGN
#ifndef WELS_ABS
#define WELS_ABS(iX) ((WELS_SIGN(iX) ^ (int32_t)(iX)) - WELS_SIGN(iX))
#endif //WELS_ABS
// WELS_CLIP3
#ifndef WELS_CLIP3
#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
#endif //WELS_CLIP3
/*
* Description: to check variable validation and return the specified result
* iResult: value to be return
* bCaseIf: negative condition to be verified
*/
#ifndef WELS_VERIFY_RETURN_IF
#define WELS_VERIFY_RETURN_IF(iResult, bCaseIf) \
if ( bCaseIf ){ \
return iResult; \
}
#endif//#if WELS_VERIFY_RETURN_IF
/*
* Description: to check variable validation and return the specified result
* with correspoinding process advance.
* result: value to be return
* case_if: negative condition to be verified
* proc: process need perform
*/
#ifndef WELS_VERIFY_RETURN_PROC_IF
#define WELS_VERIFY_RETURN_PROC_IF(iResult, bCaseIf, fProc) \
if ( bCaseIf ){ \
fProc; \
return iResult; \
}
#endif//#if WELS_VERIFY_RETURN_PROC_IF
/*
* Description: to check variable validation and return
* case_if: negtive condition to be verified
* return: NONE
*/
#ifndef WELS_VERIFY_IF
#define WELS_VERIFY_IF(bCaseIf) \
if ( bCaseIf ){ \
return; \
}
#endif//#if WELS_VERIFY_IF
/*
* Description: to check variable validation and return with correspoinding process advance.
* case_if: negtive condition to be verified
* proc: process need preform
* return: NONE
*/
#ifndef WELS_VERIFY_PROC_IF
#define WELS_VERIFY_PROC_IF(bCaseIf, fProc) \
if ( bCaseIf ){ \
fProc; \
return; \
}
#endif//#if WELS_VERIFY_IF
/*
* Description: to safe free a ptr with free function pointer
* p: pointer to be destroyed
* free_fn: free function pointer used
*/
#ifndef WELS_SAFE_FREE_P
#define WELS_SAFE_FREE_P(pPtr, fFreeFunc) \
do{ \
if ( NULL != (pPtr) ){ \
fFreeFunc( (pPtr) ); \
(pPtr) = NULL; \
} \
}while( 0 );
#endif//#if WELS_SAFE_FREE_P
/*
* Description: to safe free an array ptr with free function pointer
* arr: pointer to an array, something like "**p";
* num: number of elements in array
* free_fn: free function pointer
*/
#ifndef WELS_SAFE_FREE_ARR
#define WELS_SAFE_FREE_ARR(pArray, iNum, fFreeFunc) \
do{ \
if ( NULL != (pArray) ){ \
int32_t iIdx = 0; \
while( iIdx < iNum ){ \
if ( NULL != (pArray)[iIdx] ){ \
fFreeFunc( (pArray)[iIdx] ); \
(pArray)[iIdx] = NULL; \
} \
++ iIdx; \
} \
fFreeFunc((pArray)); \
(pArray) = NULL; \
} \
}while( 0 );
#endif//#if WELS_SAFE_FREE_ARR
} // namespace WelsDec
#endif//WELS_MACRO_UTILIZATIONS_H__

View File

@ -0,0 +1,81 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file manage_dec_ref.h
*
* Abstract
* Interface for managing reference picture
*
* History
* 08/14/2009 Created
*
*****************************************************************************/
#ifndef WELS_MANAGE_DEC_REF_H__
#define WELS_MANAGE_DEC_REF_H__
#include "typedefs.h"
#include "decoder_context.h"
namespace WelsDec {
typedef enum TagRemoveFlag{
REMOVE_TARGET = 0,
REMOVE_BASE = 1,
REMOVE_BASE_FIRST = 2
}ERemoveFlag;
void_t WelsResetRefPic (PWelsDecoderContext pCtx);
int32_t WelsInitRefList (PWelsDecoderContext pCtx, int32_t iPoc);
int32_t WelsReorderRefList(PWelsDecoderContext pCtx);
int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, const bool_t kbRefBaseMarkingFlag);
static PPicture WelsDelShortFromList (PRefPic pRefPic, int32_t iFrameNum, ERemoveFlag eRemoveFlag);
static PPicture WelsDelLongFromList (PRefPic pRefPic, uint32_t uiLongTermFrameIdx, ERemoveFlag eRemoveFlag);
static PPicture WelsDelShortFromListSetUnref(PRefPic pRefPic, int32_t iFrameNum, ERemoveFlag eRemoveFlag);
static PPicture WelsDelLongFromListSetUnref (PRefPic pRefPic, uint32_t uiLongTermFrameIdx, ERemoveFlag eRemoveFlag);
static int32_t MMCOBase (PWelsDecoderContext pCtx, PRefBasePicMarking pRefPicBaseMarking);
static int32_t MMCO (PWelsDecoderContext pCtx, PRefPicMarking pRefPicMarking);
static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, bool_t bRefBasePic,
int32_t iShortFrameNum, uint32_t uiLongTermPicNum, int32_t iLongTermFrameIdx, int32_t iMaxLongTermFrameIdx);
static int32_t SlidingWindow(PWelsDecoderContext pCtx);
static int32_t AddShortTermToList(PRefPic pRefPic, PPicture pPic);
static int32_t AddLongTermToList (PRefPic pRefPic, PPicture pPic, int32_t iLongTermFrameIdx);
static int32_t AssignLongTermIdx (PRefPic pRefPic, int32_t iFrameNum, int32_t iLongTermFrameIdx);
static int32_t MarkAsLongTerm (PRefPic pRefPic, int32_t iFrameNum, int32_t iLongTermFrameIdx);
} // namespace WelsDec
#endif//WELS_MANAGE_DEC_REF_H__

View File

@ -0,0 +1,84 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//mb_cache.h
#ifndef WELS_MACROBLOCK_CACHE_H__
#define WELS_MACROBLOCK_CACHE_H__
#include "typedefs.h"
namespace WelsDec {
//#pragma pack(1)
#define REF_NOT_AVAIL -2
#define REF_NOT_IN_LIST -1 //intra
/*
* MB Cache information, such one cache should be defined within a slice
*/
/*
* Cache for Luma Cache for Chroma(Cb, Cr)
*
* TL T T T T TL T T
* L - - - - L - -
* L - - - - L - - TR
* L - - - -
* L - - - - TR
*
*/
////////////////////////mapping scan index////////////////////////
// for data sharing cross modules and try to reduce size of binary generated
extern const uint8_t g_kuiMbNonZeroCountIdx[24];
extern const uint8_t g_kuiCache30ScanIdx[16];
extern const uint8_t g_kuiCacheNzcScanIdx[24];
extern const uint8_t g_kuiScan4[16];
typedef struct TagNeighborAvail
{
int32_t iTopAvail;
int32_t iLeftAvail;
int32_t iRightTopAvail;
int32_t iLeftTopAvail; //used for check intra_pred_mode avail or not //1: avail; 0: unavail
int32_t iLeftType;
int32_t iTopType;
int32_t iLeftTopType;
int32_t iRightTopType;
}SNeighAvail, *PNeighAvail;
} // namespace WelsDec
#endif//WELS_MACROBLOCK_CACHE_H__

View File

@ -0,0 +1,79 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_MC_H__
#define WELS_MC_H__
#include "wels_const.h"
#include "macros.h"
#include "decoder_context.h"
namespace WelsDec {
void_t InitMcFunc(SMcFunc *pMcFunc, int32_t iCpu);
#if defined(__cplusplus)
extern "C" {
#endif//__cplusplus
//***************************************************************************//
// MMXEXT definition //
//***************************************************************************//
#if defined(X86_ASM)
typedef void_t (*PMcChromaWidthExtFunc)( uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, const uint8_t *kpABCD, int32_t iHeight );
extern void_t McHorVer20WidthEq4_mmx (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t McChromaWidthEq4_mmx (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, const uint8_t *kpABCD, int32_t iHeight );
extern void_t McCopyWidthEq4_mmx (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t McCopyWidthEq8_mmx (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t PixelAvgWidthEq4_mmx (uint8_t *pDst, int32_t iDstStride, uint8_t *pSrcA, int32_t iSrcAStride, uint8_t *pSrcB, int32_t iSrcBStride, int32_t iHeight);
extern void_t PixelAvgWidthEq8_mmx (uint8_t *pDst, int32_t iDstStride, uint8_t *pSrcA, int32_t iSrcAStride, uint8_t *pSrcB, int32_t iSrcBStride, int32_t iHeight);
//***************************************************************************//
// SSE2 definition //
//***************************************************************************//
extern void_t McChromaWidthEq8_sse2 (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, const uint8_t* kpABCD, int32_t iHeight );
extern void_t McCopyWidthEq16_sse2 (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t McHorVer20WidthEq8_sse2 (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t McHorVer20WidthEq16_sse2(uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t McHorVer02WidthEq8_sse2 (uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t McHorVer22Width8HorFirst_sse2(uint8_t *pSrc, int32_t iSrcStride, uint8_t *pDst, int32_t iDstStride, int32_t iHeight);
extern void_t McHorVer22VerLast_sse2(uint8_t * pTap, int32_t iTapStride, uint8_t * pDst,int32_t iDstStride,int32_t iWidth,int32_t iHeight);
extern void_t PixelAvgWidthEq16_sse2 (uint8_t *pDst, int32_t iDstStride, uint8_t *pSrcA, int32_t iSrcAStride, uint8_t *pSrcB, int32_t iSrcBStride, int32_t iHeight);
#endif //X86_ASM
#if defined(__cplusplus)
}
#endif//__cplusplus
} // namespace WelsDec
#endif//WELS_MC_H__

View File

@ -0,0 +1,100 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file measure_time.h
*
* \brief time cost measure utilization
*
* \date 04/28/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_TIME_COST_MEASURE_UTIL_H__
#define WELS_TIME_COST_MEASURE_UTIL_H__
#include <stdlib.h>
#if !(defined(_MSC_VER) || defined(__MINGW32__))
#include <sys/time.h>
#else
#include "typedefs.h"
//#include <sys/types.h>
#include <sys/timeb.h>
#endif
#include <time.h>
#if defined(WIN32)
#include <windows.h>
#endif//#if WIN32
#ifdef __cplusplus
extern "C" {
#endif//__cplusplus
/*!
* \brief time cost measure utilization
* \param void_t
* \return time elapsed since run (unit: microsecond)
*/
int64_t WelsTime( void_t )
{
#if !(defined(_MSC_VER) || defined(__MINGW32__))
struct timeval tv_date;
gettimeofday( &tv_date, NULL );
return( (int64_t) tv_date.tv_sec * 1000000 + (int64_t) tv_date.tv_usec );
#else
#if defined (WIN32)
static int64_t iMtimeFreq = 0;
int64_t iMtimeCur = 0;
int64_t iResult = 0;
if ( !iMtimeFreq ){
QueryPerformanceFrequency((LARGE_INTEGER *)&iMtimeFreq);
if ( !iMtimeFreq )
iMtimeFreq = 1;
}
QueryPerformanceCounter((LARGE_INTEGER *)&iMtimeCur);
iResult = (int64_t)((double)iMtimeCur * 1e6 / (double)iMtimeFreq + 0.5);
return iResult;
#else
struct _timeb sTime;
_ftime(&sTime);
return ((int64_t)sTime.time * (1000) + (int64_t)sTime.millitm) * (1000);
#endif//#if WIN32
#endif//!(defined(_MSC_VER) || defined(__MINGW32__))
}
#ifdef __cplusplus
}
#endif
#endif//WELS_TIME_COST_MEASURE_UTIL_H__

View File

@ -0,0 +1,92 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* memory alignment utilization
*/
#ifndef WELS_MEM_ALIGN_H__
#define WELS_MEM_ALIGN_H__
#include <stdlib.h>
#include <string.h>
#include "utils.h"
namespace WelsDec {
//#define CACHE_LINE 64
#ifdef __cplusplus
extern "C" {
#endif//__cplusplus
/*!
*************************************************************************************
* \brief malloc with zero filled utilization in Wels
*
* \param kuiSize size of memory block required
*
* \return allocated memory pointer exactly, failed in case of NULL return
*
* \note N/A
*************************************************************************************
*/
void_t * WelsMalloc( const uint32_t kuiSize, const str_t *kpTag );
/*!
*************************************************************************************
* \brief free utilization in Wels
*
* \param pPtr data pointer to be free.
* i.e, uint8_t *pPtr = actual data to be free, argv = &pPtr.
*
* \return NONE
*
* \note N/A
*************************************************************************************
*/
void_t WelsFree( void_t * pPtr, const str_t *kpTag );
#define WELS_SAFE_FREE(pPtr, pTag) if (pPtr) { WelsFree(pPtr, pTag); pPtr = NULL; }
/*
* memory operation routines
*/
#ifdef __cplusplus
}
#endif//__cplusplus
} // namespace WelsDec
#endif //WELS_MEM_ALIGN_H__

View File

@ -0,0 +1,65 @@
/*!
* \copy
* Copyright (c) 2008-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* memmgr_nal_unit.h
*
* Abstract
* memory manager utils for NAL Unit list available
*
* History
* 07/10/2008 Created
*
*****************************************************************************/
#ifndef WELS_MEMORY_MANAGER_NAL_UNIT_H__
#define WELS_MEMORY_MANAGER_NAL_UNIT_H__
#include "typedefs.h"
#include "wels_common_basis.h"
#include "nalu.h"
namespace WelsDec {
int32_t MemInitNalList(PAccessUnit *ppAu, const uint32_t kuiSize);
int32_t MemFreeNalList(PAccessUnit *ppAu);
/*
* MemGetNextNal
* Get next NAL Unit for using.
* Need expand NAL Unit list if exceeding count number of available NAL Units withing an Access Unit
*/
PNalUnit MemGetNextNal(PAccessUnit *ppAu);
} // namespace WelsDec
#endif//WELS_MEMORY_MANAGER_NAL_UNIT_H__

View File

@ -0,0 +1,98 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file mv_pred.h
*
* \brief Get MV predictor and update motion vector of mb cache
*
* \date 05/22/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_MV_PRED_H__
#define WELS_MV_PRED_H__
#include "dec_frame.h"
namespace WelsDec {
/*!
* \brief update mv and ref_index cache for current MB, only for P_16x16 (SKIP inclusive)
* \param
* \param
*/
void_t UpdateP16x16MotionInfo(PDqLayer pCurDqLayer, int8_t iRef, int16_t iMVs[2]);
/*!
* \brief update mv and ref_index cache for current MB, only for P_16x8
* \param
* \param
*/
void_t UpdateP16x8MotionInfo(PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]);
/*!
* \brief update mv and ref_index cache for current MB, only for P_8x16
* \param
* \param
*/
void_t UpdateP8x16MotionInfo(PDqLayer pCurDqLayer, int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]);
/*!
* \brief get the motion predictor for 4*4 or 8*8 or 16*16 block
* \param
* \param output mvp_x and mvp_y
*/
void_t PredMv(int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
int32_t iPartIdx, int32_t iPartWidth, int8_t iRef, int16_t iMVP[2]);
/*!
* \brief get the motion predictor for inter16x8 MB
* \param
* \param output mvp_x and mvp_y
*/
void_t PredInter16x8Mv(int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]);
/*!
* \brief get the motion predictor for inter8x16 MB
* \param
* \param output mvp_x and mvp_y
*/
void_t PredInter8x16Mv(int16_t iMotionVector[LIST_A][30][MV_A], int8_t iRefIndex[LIST_A][30],
int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]);
} // namespace WelsDec
#endif//WELS_MV_PRED_H__

View File

@ -0,0 +1,89 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//nal_prefix.h - definitions for NAL Unit Header(/Ext) and PrefixNALUnit
#ifndef WELS_NAL_UNIT_PREFIX_H__
#define WELS_NAL_UNIT_PREFIX_H__
#include "typedefs.h"
#include "wels_common_basis.h"
#include "slice.h"
namespace WelsDec {
//#pragma pack(1)
///////////////////////////////////NAL Unit prefix/headers///////////////////////////////////
/* NAL Unix Header in AVC, refer to Page 56 in JVT X201wcm */
typedef struct TagNalUnitHeader{
uint8_t uiForbiddenZeroBit;
uint8_t uiNalRefIdc;
ENalUnitType eNalUnitType;
uint8_t uiReservedOneByte; // only padding usage
}SNalUnitHeader, *PNalUnitHeader;
/* NAL Unit Header in scalable extension syntax, refer to Page 390 in JVT X201wcm */
typedef struct TagNalUnitHeaderExt{
SNalUnitHeader sNalUnitHeader;
// uint8_t reserved_one_bit;
bool_t bIdrFlag;
uint8_t uiPriorityId;
int8_t iNoInterLayerPredFlag; // change as int8_t to support 3 values probably in encoder
uint8_t uiDependencyId;
uint8_t uiQualityId;
uint8_t uiTemporalId;
bool_t bUseRefBasePicFlag;
bool_t bDiscardableFlag;
bool_t bOutputFlag;
uint8_t uiReservedThree2Bits;
// Derived variable(s)
uint8_t uiLayerDqId;
bool_t bNalExtFlag;
}SNalUnitHeaderExt, *PNalUnitHeaderExt;
/* Prefix NAL Unix syntax, refer to Page 392 in JVT X201wcm */
typedef struct TagPrefixNalUnit{
SRefBasePicMarking sRefPicBaseMarking;
bool_t bStoreRefBasePicFlag;
bool_t bPrefixNalUnitAdditionalExtFlag;
bool_t bPrefixNalUnitExtFlag;
}SPrefixNalUnit, *PPrefixNalUnit;
//#pragma pack()
} // namespace WelsDec
#endif//WELS_NAL_UNIT_PREFIX_H__

View File

@ -0,0 +1,79 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//nalu.h: NAL Unit definition
#ifndef WELS_NAL_UNIT_H__
#define WELS_NAL_UNIT_H__
#include "typedefs.h"
#include "wels_common_basis.h"
#include "nal_prefix.h"
#include "bit_stream.h"
namespace WelsDec {
///////////////////////////////////NAL UNIT level///////////////////////////////////
/* NAL Unit Structure */
typedef struct TagNalUnit{
SNalUnitHeaderExt sNalHeaderExt;
union{
struct SVclNal{
SSliceHeaderExt sSliceHeaderExt;
SBitStringAux sSliceBitsRead;
uint8_t *pNalPos; // save the address of slice nal for GPU function
int32_t iNalLength; // save the nal length for GPU function
bool_t bSliceHeaderExtFlag;
} sVclNal;
SPrefixNalUnit sPrefixNal;
} sNalData;
}SNalUnit, *PNalUnit;
///////////////////////////////////ACCESS Unit level///////////////////////////////////
/* Access Unit structure */
typedef struct TagAccessUnits{
PNalUnit *pNalUnitsList; // list of NAL Units pointer in this AU
uint32_t uiAvailUnitsNum; // Number of NAL Units available in each AU list based current bitstream,
uint32_t uiActualUnitsNum; // actual number of NAL units belong to current au
// While available number exceeds count size below, need realloc extra NAL Units for list space.
uint32_t uiCountUnitsNum; // Count size number of malloced NAL Units in each AU list
uint32_t uiStartPos;
uint32_t uiEndPos;
bool_t bCompletedAuFlag; // Indicate whether it is a completed AU
}SAccessUnit, *PAccessUnit;
} // namespace WelsDec
#endif//WELS_NAL_UNIT_H__

View File

@ -0,0 +1,173 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_PARAMETER_SETS_H__
#define WELS_PARAMETER_SETS_H__
#include "typedefs.h"
#include "wels_const.h"
#include "wels_common_basis.h"
namespace WelsDec {
//#pragma pack(1)
/* Sequence Parameter Set, refer to Page 57 in JVT X201wcm */
typedef struct TagSps{
int32_t iSpsId;
uint32_t iMbWidth;
uint32_t iMbHeight;
uint32_t uiTotalMbCount; //used in decode_slice_data()
uint32_t uiLog2MaxFrameNum;
uint32_t uiPocType;
/* POC type 0 */
int32_t iLog2MaxPocLsb;
/* POC type 1 */
int32_t iOffsetForNonRefPic;
int32_t iOffsetForTopToBottomField;
int32_t iNumRefFramesInPocCycle;
int8_t iOffsetForRefFrame[256];
int32_t iNumRefFrames;
SPosOffset sFrameCrop;
ProfileIdc uiProfileIdc;
uint8_t uiLevelIdc;
uint8_t uiChromaFormatIdc;
uint8_t uiChromaArrayType;
uint8_t uiBitDepthLuma;
uint8_t uiBitDepthChroma;
/* TO BE CONTINUE: POC type 1 */
bool_t bDeltaPicOrderAlwaysZeroFlag;
bool_t bGapsInFrameNumValueAllowedFlag;
bool_t bFrameMbsOnlyFlag;
bool_t bMbaffFlag; // MB Adapative Frame Field
bool_t bDirect8x8InferenceFlag;
bool_t bFrameCroppingFlag;
bool_t bVuiParamPresentFlag;
// bool_t bTimingInfoPresentFlag;
// bool_t bFixedFrameRateFlag;
bool_t bConstraintSet0Flag;
bool_t bConstraintSet1Flag;
bool_t bConstraintSet2Flag;
bool_t bConstraintSet3Flag;
bool_t bSeparateColorPlaneFlag;
bool_t bQpPrimeYZeroTransfBypassFlag;
bool_t bSeqScalingMatrixPresentFlag;
bool_t bSeqScalingListPresentFlag[12];
}SSps, *PSps;
/* Sequence Parameter Set extension syntax, refer to Page 58 in JVT X201wcm */
//typedef struct TagSpsExt{
// uint32_t iSpsId;
// uint32_t uiAuxFormatIdc;
// int32_t iAlphaOpaqueValue;
// int32_t iAlphaTransparentValue;
// uint8_t uiBitDepthAux;
// bool_t bAlphaIncrFlag;
// bool_t bAdditionalExtFlag;
//}SSpsExt, *PSpsExt;
/* Sequence Parameter Set extension syntax, refer to Page 391 in JVT X201wcm */
typedef struct TagSpsSvcExt{
SPosOffset sSeqScaledRefLayer;
uint8_t uiExtendedSpatialScalability; // ESS
uint8_t uiChromaPhaseXPlus1Flag;
uint8_t uiChromaPhaseYPlus1;
uint8_t uiSeqRefLayerChromaPhaseXPlus1Flag;
uint8_t uiSeqRefLayerChromaPhaseYPlus1;
bool_t bInterLayerDeblockingFilterCtrlPresentFlag;
bool_t bSeqTCoeffLevelPredFlag;
bool_t bAdaptiveTCoeffLevelPredFlag;
bool_t bSliceHeaderRestrictionFlag;
}SSpsSvcExt, *PSpsSvcExt;
/* Subset sequence parameter set syntax, refer to Page 391 in JVT X201wcm */
typedef struct TagSubsetSps{
SSps sSps;
SSpsSvcExt sSpsSvcExt;
bool_t bSvcVuiParamPresentFlag;
bool_t bAdditionalExtension2Flag;
bool_t bAdditionalExtension2DataFlag;
}SSubsetSps, *PSubsetSps;
/* Picture parameter set syntax, refer to Page 59 in JVT X201wcm */
typedef struct TagPps{
int32_t iSpsId;
int32_t iPpsId;
uint32_t uiNumSliceGroups;
uint32_t uiSliceGroupMapType;
/* slice_group_map_type = 0 */
uint32_t uiRunLength[MAX_SLICEGROUP_IDS];
/* slice_group_map_type = 2 */
uint32_t uiTopLeft[MAX_SLICEGROUP_IDS];
uint32_t uiBottomRight[MAX_SLICEGROUP_IDS];
/* slice_group_map_type = 3, 4 or 5 */
uint32_t uiSliceGroupChangeRate;
/* slice_group_map_type = 6 */
uint32_t uiPicSizeInMapUnits;
uint32_t uiSliceGroupId[MAX_SLICEGROUP_IDS];
uint32_t uiNumRefIdxL0Active;
uint32_t uiNumRefIdxL1Active;
int32_t iPicInitQp;
int32_t iPicInitQs;
int32_t iChromaQpIndexOffset;
bool_t bEntropyCodingModeFlag;
bool_t bPicOrderPresentFlag;
/* slice_group_map_type = 3, 4 or 5 */
bool_t bSliceGroupChangeDirectionFlag;
bool_t bDeblockingFilterControlPresentFlag;
bool_t bConstainedIntraPredFlag;
bool_t bRedundantPicCntPresentFlag;
bool_t bWeightedPredFlag;
uint8_t uiWeightedBipredIdc;
} SPps, *PPps;
//#pragma pack()
} // namespace WelsDec
#endif //WELS_PARAMETER_SETS_H__

View File

@ -0,0 +1,213 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file parse_mb_syn_cavlc.h
*
* \brief Parsing all syntax elements of mb and decoding residual with cavlc
*
* \date 03/17/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_PARSE_MB_SYN_CAVLC_H__
#define WELS_PARSE_MB_SYN_CAVLC_H__
#include "wels_common_basis.h"
#include "decoder_context.h"
#include "dec_frame.h"
#include "slice.h"
namespace WelsDec {
#define I16_LUMA_DC 1
#define I16_LUMA_AC 2
#define LUMA_DC_AC 3
#define CHROMA_DC 4
#define CHROMA_AC 5
typedef struct TagReadBitsCache
{
uint32_t uiCache32Bit;
uint8_t uiRemainBits;
uint8_t *pBuf;
}SReadBitsCache;
#define SHIFT_BUFFER(pBitsCache) { pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits)); }
#define POP_BUFFER(pBitsCache, iCount) { pBitsCache->uiCache32Bit <<= iCount; pBitsCache->uiRemainBits -= iCount; }
static const uint8_t g_kuiZigzagScan[16]={//4*4block residual zig-zag scan order
0, 1, 4, 8,
5, 2, 3, 6,
9, 12, 13, 10,
7, 11, 14, 15,
};
typedef struct TagI16PredInfo{
int8_t iPredMode;
int8_t iLeftAvail;
int8_t iTopAvail;
int8_t iLeftTopAvail;
} SI16PredInfo;
static const SI16PredInfo g_ksI16PredInfo[4] = {
{I16_PRED_V, 0, 1, 0},
{I16_PRED_H, 1, 0, 0},
{ 0, 0, 0, 0},
{I16_PRED_P, 1, 1, 1},
};
static const SI16PredInfo g_ksChromaPredInfo[4] = {
{ 0, 0, 0, 0},
{C_PRED_H, 1, 0, 0},
{C_PRED_V, 0, 1, 0},
{C_PRED_P, 1, 1, 1},
};
typedef struct TagI4PredInfo {
int8_t iPredMode;
int8_t iLeftAvail;
int8_t iTopAvail;
int8_t iLeftTopAvail;
// int8_t right_top_avail; //when right_top unavailable but top avail, we can pad the right-top with the rightmost pixel of top
} SI4PredInfo;
static const SI4PredInfo g_ksI4PredInfo[9] = {
{ I4_PRED_V, 0, 1, 0},
{ I4_PRED_H, 1, 0, 0},
{ 0, 0, 0, 0},
{I4_PRED_DDL, 0, 1, 0},
{I4_PRED_DDR, 1, 1, 1},
{ I4_PRED_VR, 1, 1, 1},
{ I4_PRED_HD, 1, 1, 1},
{ I4_PRED_VL, 0, 1, 0},
{ I4_PRED_HU, 1, 0, 0},
};
static const uint8_t g_kuiI16CbpTable[6] = {0, 16, 32, 15, 31, 47}; //reference to JM
typedef struct TagPartMbInfo{
MbType iType;
int8_t iPartCount; //P_16*16, P_16*8, P_8*16, P_8*8 based on 8*8 block; P_8*4, P_4*8, P_4*4 based on 4*4 block
int8_t iPartWidth; //based on 4*4 block
} SPartMbInfo;
static const SPartMbInfo g_ksInterMbTypeInfo[5]={
{MB_TYPE_16x16, 1, 4},
{MB_TYPE_16x8, 2, 4},
{MB_TYPE_8x16, 2, 2},
{MB_TYPE_8x8, 4, 4},
{MB_TYPE_8x8_REF0, 4, 4}, //ref0--ref_idx not present in bit-stream and default as 0
};
static const SPartMbInfo g_ksInterSubMbTypeInfo[4]={
{SUB_MB_TYPE_8x8, 1, 2},
{SUB_MB_TYPE_8x4, 2, 2},
{SUB_MB_TYPE_4x8, 2, 1},
{SUB_MB_TYPE_4x4, 4, 1},
};
void_t GetNeighborAvailMbType (PNeighAvail pNeighAvail, PDqLayer pCurLayer);
void_t WelsFillCacheNonZeroCount (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, PDqLayer pCurLayer);
void_t WelsFillCacheConstrain0Intra4x4(PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode, PDqLayer pCurLayer);
void_t WelsFillCacheConstrain1Intra4x4(PNeighAvail pNeighAvail, uint8_t* pNonZeroCount, int8_t* pIntraPredMode, PDqLayer pCurLayer);
void_t WelsFillCacheInter (PNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
int16_t iMvArray[LIST_A][30][MV_A], int8_t iRefIdxArray[LIST_A][30], PDqLayer pCurLayer);
void_t PredPSkipMvFromNeighbor (PDqLayer pCurLayer, int16_t iMvp[2]);
/*!
* \brief check iPredMode for intra16x16 eligible or not
* \param input : current iPredMode
* \param output: 0 indicating decoding correctly; -1 means error occurence
*/
int32_t CheckIntra16x16PredMode(uint8_t uiSampleAvail, int8_t* pMode);
/*!
* \brief check iPredMode for intra4x4 eligible or not
* \param input : current iPredMode
* \param output: 0 indicating decoding correctly; -1 means error occurence
*/
int32_t CheckIntra4x4PredMode(int32_t* pSampleAvail, int8_t* pMode, int32_t iIndex);
/*!
* \brief check iPredMode for chroma eligible or not
* \param input : current iPredMode
* \param output: 0 indicating decoding correctly; -1 means error occurence
*/
int32_t CheckIntraChromaPredMode(uint8_t uiSampleAvail, int8_t* pMode);
/*!
* \brief predict the mode of intra4x4
* \param input : current intra4x4 block index
* \param output: mode index
*/
int32_t PredIntra4x4Mode(int8_t* pIntraPredMode, int32_t iIdx4);
void_t BsStartCavlc( PBitStringAux pBs );
void_t BsEndCavlc( PBitStringAux pBs );
int32_t WelsResidualBlockCavlc( SVlcTable* pVlcTable,
uint8_t* pNonZeroCountCache,
PBitStringAux pBs,
/*int16_t* coeff_level,*/
int32_t iIndex,
int32_t iMaxNumCoeff,
const uint8_t *kpZigzagTable,
int32_t iResidualProperty,
/*short *tCoeffLevel,*/
int16_t *pTCoeff,
int32_t iMbMode,
uint8_t uiQp,
PWelsDecoderContext pCtx);
/*!
* \brief parsing intra mode
* \param input : current mb, bit-stream
* \param output: 0 indicating decoding correctly; -1 means error
*/
int32_t ParseIntra4x4ModeConstrain0 (PNeighAvail pNeighAvail, int8_t* pIntraPredMode, PBitStringAux pBs, PDqLayer pCurDqLayer);
int32_t ParseIntra4x4ModeConstrain1 (PNeighAvail pNeighAvail, int8_t* pIntraPredMode, PBitStringAux pBs, PDqLayer pCurDqLayer);
int32_t ParseIntra16x16ModeConstrain0(PNeighAvail pNeighAvail, PBitStringAux pBs, PDqLayer pCurDqLayer);
int32_t ParseIntra16x16ModeConstrain1(PNeighAvail pNeighAvail, PBitStringAux pBs, PDqLayer pCurDqLayer);
/*!
* \brief parsing inter info (including ref_index and mvd)
* \param input : decoding context, current mb, bit-stream
* \param output: 0 indicating decoding correctly; -1 means error
*/
int32_t ParseInterInfo(PWelsDecoderContext pCtx, int16_t iMvArray[LIST_A][30][MV_A], int8_t iRefIdxArray[LIST_A][30], PBitStringAux pBs);
//#pragma pack()
} // namespace WelsDec
#endif//WELS_PARSE_MB_SYN_CAVLC_H__

View File

@ -0,0 +1,63 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//pic_queue.h
#ifndef WELS_PICTURE_QUEUE_H__
#define WELS_PICTURE_QUEUE_H__
#include "picture.h"
//#pragma pack(1)
namespace WelsDec {
#define PICTURE_RESOLUTION_ALIGNMENT 32
typedef struct TagPicBuff{
PPicture* ppPic;
int32_t iCapacity; // capacity size of queue
int32_t iCurrentIdx;
}SPicBuff, *PPicBuff;
/*
* Interfaces
*/
PPicture PrefetchPic( PPicBuff pPicBuff ); // To get current node applicable
} // namespace WelsDec
//#pragma pack()
#endif//WELS_PICTURE_QUEUE_H__

View File

@ -0,0 +1,87 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//picture.h - reconstruction picture/ reference picture/ residual picture are declared here
#ifndef WELS_PICTURE_H__
#define WELS_PICTURE_H__
#include "typedefs.h"
//#pragma pack(1)
namespace WelsDec {
/*
* Reconstructed Picture definition
* It is used to express reference picture, also consequent reconstruction picture for output
*/
typedef struct TagPicture{
/************************************payload data*********************************/
uint8_t *pBuffer[4]; // pointer to the first allocated byte, basical offset of buffer, dimension:
uint8_t *pData[4]; // pointer to picture planes respectively
int32_t iLinesize[4];// linesize of picture planes respectively used currently
int32_t iPlanes; // How many planes are introduced due to color space format?
// picture information
/*******************************from other standard syntax****************************/
/*from sps*/
int32_t iWidthInPixel; // picture width in pixel
int32_t iHeightInPixel;// picture height in pixel
/*from slice header*/
int32_t iFramePoc; // frame POC
/*******************************sef_definition for misc use****************************/
bool_t bUsedAsRef; //for ref pic management
bool_t bIsLongRef; // long term reference frame flag //for ref pic management
uint8_t uiRefCount;
bool_t bAvailableFlag; // indicate whether it is available in this picture memory block.
/*******************************for future use****************************/
uint8_t uiTemporalId;
uint8_t uiSpatialId;
uint8_t uiQualityId;
bool_t bRefBaseFlag;
int32_t iFrameNum; // frame number //for ref pic management
int32_t iLongTermFrameIdx; //id for long term ref pic
int32_t iTotalNumMbRec; //show how many MB constructed
int32_t iSpsId; //against mosaic caused by cross-IDR interval reference.
int32_t iPpsId;
}SPicture, *PPicture; // "Picture" declaration is comflict with Mac system
} // namespace WelsDec
//#pragma pack()
#endif//WELS_PICTURE_H__

View File

@ -0,0 +1,76 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file rec_mb.h
*
* \brief interfaces for all macroblock decoding process after mb syntax parsing and residual decoding with cavlc.
*
* \date 3/4/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_REC_MB_H__
#define WELS_REC_MB_H__
#include "typedefs.h"
#include "wels_common_basis.h"
#include "error_code.h"
#include "decoder_context.h"
//#pragma pack(1)
namespace WelsDec {
void_t WelsFillRecNeededMbInfo(PWelsDecoderContext pCtx, bool_t bOutput, PDqLayer pCurLayer);
int32_t RecI4x4Mb (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t *pScoeffLevel, PDqLayer pDqLayer);
int32_t RecI4x4Luma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t *pScoeffLevel, PDqLayer pDqLayer);
int32_t RecI4x4Chroma(int32_t iMBXY, PWelsDecoderContext pCtx, int16_t *pScoeffLevel, PDqLayer pDqLayer);
int32_t RecI16x16Mb (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t *pScoeffLevel, PDqLayer pDqLayer);
int32_t RecChroma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t *pScoeffLevel, PDqLayer pDqLayer);
void_t GetInterPred (uint8_t *pPredY, uint8_t *pPredCb, uint8_t *pPredCr, PWelsDecoderContext pCtx);
void_t FillBufForMc(uint8_t *pBuf, int32_t iBufStride, uint8_t *pSrc, int32_t iSrcStride, int32_t iSrcOffset,
int32_t iBlockWidth, int32_t iBlockHeight, int32_t iSrcX, int32_t iSrcY, int32_t iPicWidth, int32_t iPicHeight);
} // namespace WelsDec
//#pragma pack()
#endif //WELS_REC_MB_H__

View File

@ -0,0 +1,207 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//wels_slice.h
#ifndef WELS_SLICE_H__
#define WELS_SLICE_H__
#include "typedefs.h"
#include "wels_const.h"
#include "wels_common_basis.h"
#include "picture.h"
#include "parameter_sets.h"
//#pragma pack(1)
namespace WelsDec {
/*
* Reference picture list reordering syntax, refer to page 64 in JVT X201wcm
*/
typedef struct TagRefPicListReorderSyntax {
struct {
uint32_t uiAbsDiffPicNumMinus1;
uint16_t uiLongTermPicNum;
uint16_t uiReorderingOfPicNumsIdc;
} sReorderingSyn[LIST_A][MAX_REF_PIC_COUNT];
bool_t bRefPicListReorderingFlag[LIST_A];
}SRefPicListReorderSyn, *PRefPicListReorderSyn;
/*
* Prediction weight table syntax, refer to page 65 in JVT X201wcm
*/
typedef struct TagPredWeightTabSyntax{
uint32_t uiLumaLog2WeightDenom;
uint32_t uiChromaLog2WeightDenom;
struct{
int32_t iLumaWeight[MAX_REF_PIC_COUNT];
int32_t iLumaOffset[MAX_REF_PIC_COUNT];
int32_t iChromaWeight[MAX_REF_PIC_COUNT][2];
int32_t iChromaOffset[MAX_REF_PIC_COUNT][2];
bool_t bLumaWeightFlag;
bool_t bChromaWeightFlag;
}sPredList[LIST_A];
}SPredWeightTabSyn;
/* Decoded reference picture marking syntax, refer to Page 66 in JVT X201wcm */
typedef struct TagRefPicMarking {
struct {
uint32_t uiMmcoType;
int32_t iShortFrameNum;
int32_t iDiffOfPicNum;
uint32_t uiLongTermPicNum;
int32_t iLongTermFrameIdx;
int32_t iMaxLongTermFrameIdx;
} sMmcoRef[MAX_MMCO_COUNT];
bool_t bNoOutputOfPriorPicsFlag;
bool_t bLongTermRefFlag;
bool_t bAdaptiveRefPicMarkingModeFlag;
} SRefPicMarking, *PRefPicMarking;
/* Decode reference base picture marking syntax in Page 396 of JVT X201wcm */
typedef struct TagRefBasePicMarkingSyn {
struct {
uint32_t uiMmcoType;
int32_t iShortFrameNum;
uint32_t uiDiffOfPicNums;
uint32_t uiLongTermPicNum; //should uint32_t, cover larger range of iFrameNum.
} mmco_base[MAX_MMCO_COUNT]; // MAX_REF_PIC for reference picture based on frame
bool_t bAdaptiveRefBasePicMarkingModeFlag;
} SRefBasePicMarking, *PRefBasePicMarking;
/* Header of slice syntax elements, refer to Page 63 in JVT X201wcm */
typedef struct TagSliceHeaders{
/*****************************slice header syntax and generated****************************/
int32_t iFirstMbInSlice;
int32_t iFrameNum;
int32_t iPicOrderCntLsb;
int32_t iDeltaPicOrderCntBottom;
int32_t iDeltaPicOrderCnt[2];
int32_t iRedundantPicCnt;
int32_t uiRefCount[LIST_A];
int32_t iSliceQpDelta; //no use for iSliceQp is used directly
int32_t iSliceQp;
int32_t iSliceQsDelta; // For SP/SI slices
uint32_t uiDisableDeblockingFilterIdc;
int32_t iSliceAlphaC0Offset;
int32_t iSliceBetaOffset;
int32_t iSliceGroupChangeCycle;
PSps pSps;
PPps pPps;
int32_t iSpsId;
int32_t iPpsId;
/*********************got from other layer for efficency if possible*********************/
SRefPicListReorderSyn pRefPicListReordering; // Reference picture list reordering syntaxs
SPredWeightTabSyn sPredWeightTable;
int32_t iCabacInitIdc;
int32_t iMbWidth; //from?
int32_t iMbHeight; //from?
SRefPicMarking sRefMarking; // Decoded reference picture marking syntaxs
uint16_t uiIdrPicId;
ESliceType eSliceType;
bool_t bNumRefIdxActiveOverrideFlag;
bool_t bFieldPicFlag; //not supported in base profile
bool_t bBottomFiledFlag; //not supported in base profile
uint8_t uiPadding1Byte;
bool_t bSpForSwitchFlag; // For SP/SI slices
int16_t iPadding2Bytes;
}SSliceHeader, *PSliceHeader;
/* Slice header in scalable extension syntax, refer to Page 394 in JVT X201wcm */
typedef struct TagSliceHeaderExt{
SSliceHeader sSliceHeader;
PSubsetSps pSubsetSps;
uint32_t uiNumMbsInSlice;
uint32_t uiDisableInterLayerDeblockingFilterIdc;
int32_t iInterLayerSliceAlphaC0Offset;
int32_t iInterLayerSliceBetaOffset;
//SPosOffset sScaledRefLayer;
int32_t iScaledRefLayerPicWidthInSampleLuma;
int32_t iScaledRefLayerPicHeightInSampleLuma;
SRefBasePicMarking sRefBasePicMarking;
bool_t bBasePredWeightTableFlag;
bool_t bStoreRefBasePicFlag;
bool_t bConstrainedIntraResamplingFlag;
bool_t bSliceSkipFlag;
bool_t bAdaptiveBaseModeFlag;
bool_t bDefaultBaseModeFlag;
bool_t bAdaptiveMotionPredFlag;
bool_t bDefaultMotionPredFlag;
bool_t bAdaptiveResidualPredFlag;
bool_t bDefaultResidualPredFlag;
bool_t bTCoeffLevelPredFlag;
uint8_t uiRefLayerChromaPhaseXPlus1Flag;
uint8_t uiRefLayerChromaPhaseYPlus1;
uint8_t uiRefLayerDqId;
uint8_t uiScanIdxStart;
uint8_t uiScanIdxEnd;
}SSliceHeaderExt, *PSliceHeaderExt;
typedef struct TagSlice{
/*******************************slice_header****************************/
SSliceHeaderExt sSliceHeaderExt;
/*******************************use for future****************************/
// for Macroblock coding within slice
int32_t iLastMbQp; // stored qp for last mb coded, maybe more efficient for mb skip detection etc.
/*******************************slice_data****************************/
/*slice_data_ext()*/
int32_t iMbSkipRun;
int32_t iTotalMbInCurSlice; //record the total number of MB in current slice.
/*slice_data_ext() generate*/
/*******************************misc use****************************/
bool_t bSliceHeaderExtFlag; // Indicate which slice header is used, avc or ext?
/*************got from other layer for effiency if possible***************/
/*from lower layer: slice header*/
uint8_t eSliceType;
uint8_t uiPadding[2];
}SSlice, *PSlice;
} // namespace WelsDec
//#pragma pack()
#endif//WELS_SLICE_H__

View File

@ -0,0 +1,91 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
// typedef.h
#ifndef WELS_TYPE_DEFINES_H__
#define WELS_TYPE_DEFINES_H__
#include <limits.h>
////////////////////////////////////////////////////////////////////////////
// NOTICE : ALL internal implement MUST use the data type defined as below
// ONLY except with the interface file !!!!!
////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER
#include <stdint.h>
#else
// FIXME: all singed type should be declared explicit, for example, int8_t should be declared as signed char.
typedef signed char int8_t ;
typedef unsigned char uint8_t ;
typedef short int16_t ;
typedef unsigned short uint16_t;
typedef int int32_t ;
typedef unsigned int uint32_t;
typedef __int64 int64_t ;
typedef unsigned __int64 uint64_t;
#endif // _MSC_VER defined
// FIXME: all string type should be declared explicit as char.
typedef char str_t;
typedef float real32_t;
#ifdef PESN
#undef PESN
#endif//PESN
#define PESN (0.000001f) // (1e-6) // desired float precision
#ifndef NULL
#define NULL 0
#endif
typedef bool bool_t;
typedef int32_t BOOL_T;
#ifndef FALSE
#define FALSE ((int32_t)0)
#endif//FALSE
#ifndef TRUE
#define TRUE ((int32_t)1)
#endif//TRUE
#ifndef void_t
#define void_t void
#endif
#endif //WELS_TYPE_DEFINES_H__

View File

@ -0,0 +1,99 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file utils.h
*
* \brief Tool kits for decoder
* ( malloc, realloc, free, log output and PSNR calculation and so on )
*
* \date 03/10/2009 Created
*
*************************************************************************************
*/
#ifndef WELS_UTILS_H__
#define WELS_UTILS_H__
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "typedefs.h"
namespace WelsDec {
#ifdef __cplusplus
extern "C" {
#endif//__cplusplus
// cache line size
extern uint32_t g_uiCacheLineSize;
/*
* Function pointer declaration for various tool sets
*/
// wels log output
typedef void_t (*PWelsLogCallbackFunc)(void_t *pPtr, const int32_t kiLevel, const char *kpFmt, va_list pArgv);
extern PWelsLogCallbackFunc g_pLog;
#ifdef __GNUC__
extern void_t WelsLog(void_t *pPtr, int32_t iLevel, const char *kpFmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
#else
extern void_t WelsLog(void_t *pPtr, int32_t iLevel, const char *kpFmt, ...);
#endif
#define DECODER_MODE_NAME(a) ((a == SW_MODE)?"SW_MODE":((a == GPU_MODE)?"GPU_MODE":((a == AUTO_MODE)?"AUTO_MODE":"SWITCH_MODE")))
#define OUTPUT_PROPERTY_NAME(a) ((a == 0)?"system_memory":"video_memory")
#define BUFFER_STATUS_NAME(a) ((a == 0)?"unvalid":"valid")
/*
* Log output routines
*/
typedef int32_t WelsLogLevel;
enum{
WELS_LOG_QUIET = 0x00, // Quiet mode
WELS_LOG_ERROR = 1 << 0, // Error log level
WELS_LOG_WARNING = 1 << 1, // Warning log level
WELS_LOG_INFO = 1 << 2, // Information log level
WELS_LOG_DEBUG = 1 << 3, // Debug log level
WELS_LOG_RESV = 1 << 4, // Resversed log level
WELS_LOG_LEVEL_COUNT= 5,
WELS_LOG_DEFAULT = WELS_LOG_ERROR | WELS_LOG_WARNING | WELS_LOG_INFO | WELS_LOG_DEBUG // Default log level in Wels codec
};
#ifdef __cplusplus
}
#endif//__cplusplus
} // namespace WelsDec
#endif//WELS_UTILS_H__

View File

@ -0,0 +1,176 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WELS_VLC_DECODER_H__
#define WELS_VLC_DECODER_H__
#include "bit_stream.h"
#include "dec_golomb.h"
namespace WelsDec {
typedef struct TagVlcTable
{
const uint8_t (*kpCoeffTokenVlcTable[4][8])[2];
const uint8_t (*kpChromaCoeffTokenVlcTable)[2];
const uint8_t (*kpZeroTable[7])[2];
const uint8_t (*kpTotalZerosTable[2][15])[2];
}SVlcTable;
// for data sharing cross modules and try to reduce size of binary generated
extern const uint8_t g_kuiVlcChromaTable[256][2];
extern const uint8_t g_kuiVlcTable_0[256][2];
extern const uint8_t g_kuiVlcTable_0_0[256][2];
extern const uint8_t g_kuiVlcTable_0_1[4][2];
extern const uint8_t g_kuiVlcTable_0_2[2][2];
extern const uint8_t g_kuiVlcTable_0_3[2][2];
extern const uint8_t g_kuiVlcTable_1[256][2];
extern const uint8_t g_kuiVlcTable_1_0[64][2];
extern const uint8_t g_kuiVlcTable_1_1[8][2];
extern const uint8_t g_kuiVlcTable_1_2[2][2];
extern const uint8_t g_kuiVlcTable_1_3[2][2];
extern const uint8_t g_kuiVlcTable_2[256][2];
extern const uint8_t g_kuiVlcTable_2_0[4][2];
extern const uint8_t g_kuiVlcTable_2_1[4][2];
extern const uint8_t g_kuiVlcTable_2_2[4][2];
extern const uint8_t g_kuiVlcTable_2_3[4][2];
extern const uint8_t g_kuiVlcTable_2_4[2][2];
extern const uint8_t g_kuiVlcTable_2_5[2][2];
extern const uint8_t g_kuiVlcTable_2_6[2][2];
extern const uint8_t g_kuiVlcTable_2_7[2][2];
extern const uint8_t g_kuiVlcTable_3[64][2];
extern const uint8_t g_kuiVlcTableNeedMoreBitsThread[3];
extern const uint8_t g_kuiVlcTableMoreBitsCount0[4];
extern const uint8_t g_kuiVlcTableMoreBitsCount1[4];
extern const uint8_t g_kuiVlcTableMoreBitsCount2[8];
extern const uint8_t g_kuiNcMapTable[17];
extern const uint8_t g_kuiVlcTrailingOneTotalCoeffTable[62][2];
extern const uint8_t g_kuiTotalZerosTable0[512][2];
extern const uint8_t g_kuiTotalZerosTable1[64][2];
extern const uint8_t g_kuiTotalZerosTable2[64][2];
extern const uint8_t g_kuiTotalZerosTable3[32][2];
extern const uint8_t g_kuiTotalZerosTable4[32][2];
extern const uint8_t g_kuiTotalZerosTable5[64][2];
extern const uint8_t g_kuiTotalZerosTable6[64][2];
extern const uint8_t g_kuiTotalZerosTable7[64][2];
extern const uint8_t g_kuiTotalZerosTable8[64][2];
extern const uint8_t g_kuiTotalZerosTable9[32][2];
extern const uint8_t g_kuiTotalZerosTable10[16][2];
extern const uint8_t g_kuiTotalZerosTable11[16][2];
extern const uint8_t g_kuiTotalZerosTable12[8][2];
extern const uint8_t g_kuiTotalZerosTable13[4][2];
extern const uint8_t g_kuiTotalZerosTable14[2][2];
extern const uint8_t g_kuiTotalZerosBitNumMap[15];
extern const uint8_t g_kuiTotalZerosChromaTable0[8][2];
extern const uint8_t g_kuiTotalZerosChromaTable1[4][2];
extern const uint8_t g_kuiTotalZerosChromaTable2[2][2];
extern const uint8_t g_kuiTotalZerosBitNumChromaMap[3];
extern const uint8_t g_kuiZeroLeftTable0[2][2];
extern const uint8_t g_kuiZeroLeftTable1[4][2];
extern const uint8_t g_kuiZeroLeftTable2[4][2];
extern const uint8_t g_kuiZeroLeftTable3[8][2];
extern const uint8_t g_kuiZeroLeftTable4[8][2];
extern const uint8_t g_kuiZeroLeftTable5[8][2];
extern const uint8_t g_kuiZeroLeftTable6[8][2];
extern const uint8_t g_kuiZeroLeftBitNumMap[16];
#ifdef WIN32
//TODO need linux version
#define WELS_GET_PREFIX_BITS(inval,outval){\
__asm xor eax, eax\
__asm bsr eax, inval\
__asm sub eax, 32\
__asm neg eax\
__asm mov outval, eax\
}
#endif
static inline void_t InitVlcTable(SVlcTable * pVlcTable)
{
pVlcTable->kpChromaCoeffTokenVlcTable = g_kuiVlcChromaTable;
pVlcTable->kpCoeffTokenVlcTable[0][0] = g_kuiVlcTable_0;
pVlcTable->kpCoeffTokenVlcTable[0][1] = g_kuiVlcTable_1;
pVlcTable->kpCoeffTokenVlcTable[0][2] = g_kuiVlcTable_2;
pVlcTable->kpCoeffTokenVlcTable[0][3] = g_kuiVlcTable_3;
pVlcTable->kpCoeffTokenVlcTable[1][0] = g_kuiVlcTable_0_0;
pVlcTable->kpCoeffTokenVlcTable[1][1] = g_kuiVlcTable_0_1;
pVlcTable->kpCoeffTokenVlcTable[1][2] = g_kuiVlcTable_0_2;
pVlcTable->kpCoeffTokenVlcTable[1][3] = g_kuiVlcTable_0_3;
pVlcTable->kpCoeffTokenVlcTable[2][0] = g_kuiVlcTable_1_0;
pVlcTable->kpCoeffTokenVlcTable[2][1] = g_kuiVlcTable_1_1;
pVlcTable->kpCoeffTokenVlcTable[2][2] = g_kuiVlcTable_1_2;
pVlcTable->kpCoeffTokenVlcTable[2][3] = g_kuiVlcTable_1_3;
pVlcTable->kpCoeffTokenVlcTable[3][0] = g_kuiVlcTable_2_0;
pVlcTable->kpCoeffTokenVlcTable[3][1] = g_kuiVlcTable_2_1;
pVlcTable->kpCoeffTokenVlcTable[3][2] = g_kuiVlcTable_2_2;
pVlcTable->kpCoeffTokenVlcTable[3][3] = g_kuiVlcTable_2_3;
pVlcTable->kpCoeffTokenVlcTable[3][4] = g_kuiVlcTable_2_4;
pVlcTable->kpCoeffTokenVlcTable[3][5] = g_kuiVlcTable_2_5;
pVlcTable->kpCoeffTokenVlcTable[3][6] = g_kuiVlcTable_2_6;
pVlcTable->kpCoeffTokenVlcTable[3][7] = g_kuiVlcTable_2_7;
pVlcTable->kpZeroTable[0] = g_kuiZeroLeftTable0;
pVlcTable->kpZeroTable[1] = g_kuiZeroLeftTable1;
pVlcTable->kpZeroTable[2] = g_kuiZeroLeftTable2;
pVlcTable->kpZeroTable[3] = g_kuiZeroLeftTable3;
pVlcTable->kpZeroTable[4] = g_kuiZeroLeftTable4;
pVlcTable->kpZeroTable[5] = g_kuiZeroLeftTable5;
pVlcTable->kpZeroTable[6] = g_kuiZeroLeftTable6;
pVlcTable->kpTotalZerosTable[0][0] = g_kuiTotalZerosTable0;
pVlcTable->kpTotalZerosTable[0][1] = g_kuiTotalZerosTable1;
pVlcTable->kpTotalZerosTable[0][2] = g_kuiTotalZerosTable2;
pVlcTable->kpTotalZerosTable[0][3] = g_kuiTotalZerosTable3;
pVlcTable->kpTotalZerosTable[0][4] = g_kuiTotalZerosTable4;
pVlcTable->kpTotalZerosTable[0][5] = g_kuiTotalZerosTable5;
pVlcTable->kpTotalZerosTable[0][6] = g_kuiTotalZerosTable6;
pVlcTable->kpTotalZerosTable[0][7] = g_kuiTotalZerosTable7;
pVlcTable->kpTotalZerosTable[0][8] = g_kuiTotalZerosTable8;
pVlcTable->kpTotalZerosTable[0][9] = g_kuiTotalZerosTable9;
pVlcTable->kpTotalZerosTable[0][10] = g_kuiTotalZerosTable10;
pVlcTable->kpTotalZerosTable[0][11] = g_kuiTotalZerosTable11;
pVlcTable->kpTotalZerosTable[0][12] = g_kuiTotalZerosTable12;
pVlcTable->kpTotalZerosTable[0][13] = g_kuiTotalZerosTable13;
pVlcTable->kpTotalZerosTable[0][14] = g_kuiTotalZerosTable14;
pVlcTable->kpTotalZerosTable[1][0] = g_kuiTotalZerosChromaTable0;
pVlcTable->kpTotalZerosTable[1][1] = g_kuiTotalZerosChromaTable1;
pVlcTable->kpTotalZerosTable[1][2] = g_kuiTotalZerosChromaTable2;
}
} // namespace WelsDec
#endif//WELS_VLC_DECODER_H__

View File

@ -0,0 +1,298 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//wels_common_basis.h
#ifndef WELS_COMMON_BASIS_H__
#define WELS_COMMON_BASIS_H__
#include "typedefs.h"
#include "macros.h"
namespace WelsDec {
// for data sharing cross modules and try to reduce size of binary generated
extern const uint8_t g_kuiChromaQp[52];
/*common use table*/
extern const uint8_t g_kuiScan8[24];
extern const uint8_t g_kuiLumaDcZigzagScan[16];
extern const uint8_t g_kuiChromaDcScan[4];
extern __align16( const uint16_t, g_kuiDequantCoeff[52][8]);
/* Profile IDC */
typedef uint8_t ProfileIdc;
enum{
PRO_BASELINE = 66,
PRO_MAIN = 77,
PRO_EXTENDED = 88,
PRO_HIGH = 100,
PRO_HIGH10 = 110,
PRO_HIGH422 = 122,
PRO_HIGH444 = 144,
PRO_CAVLC444 = 244,
PRO_SCALABLE_BASELINE = 83,
PRO_SCALABLE_HIGH = 86,
};
/*
* NAL Unit Type (5 Bits)
*/
typedef enum TagNalUnitType
{
NAL_UNIT_UNSPEC_0 = 0,
NAL_UNIT_CODED_SLICE = 1,
NAL_UNIT_CODED_SLICE_DPA = 2,
NAL_UNIT_CODED_SLICE_DPB = 3,
NAL_UNIT_CODED_SLICE_DPC = 4,
NAL_UNIT_CODED_SLICE_IDR = 5,
NAL_UNIT_SEI = 6,
NAL_UNIT_SPS = 7,
NAL_UNIT_PPS = 8,
NAL_UNIT_AU_DELIMITER = 9,
NAL_UNIT_END_OF_SEQ = 10,
NAL_UNIT_END_OF_STR = 11,
NAL_UNIT_FILLER_DATA = 12,
NAL_UNIT_SPS_EXT = 13,
NAL_UNIT_PREFIX = 14,
NAL_UNIT_SUBSET_SPS = 15,
NAL_UNIT_RESV_16 = 16,
NAL_UNIT_RESV_17 = 17,
NAL_UNIT_RESV_18 = 18,
NAL_UNIT_AUX_CODED_SLICE = 19,
NAL_UNIT_CODED_SLICE_EXT = 20,
NAL_UNIT_RESV_21 = 21,
NAL_UNIT_RESV_22 = 22,
NAL_UNIT_RESV_23 = 23,
NAL_UNIT_UNSPEC_24 = 24,
NAL_UNIT_UNSPEC_25 = 25,
NAL_UNIT_UNSPEC_26 = 26,
NAL_UNIT_UNSPEC_27 = 27,
NAL_UNIT_UNSPEC_28 = 28,
NAL_UNIT_UNSPEC_29 = 29,
NAL_UNIT_UNSPEC_30 = 30,
NAL_UNIT_UNSPEC_31 = 31
}ENalUnitType;
static const uint8_t g_kuiEmulationPreventionThreeByte = 0x03;
/*
* NAL Reference IDC (2 Bits)
*/
typedef uint8_t NalRefIdc;
enum{
NRI_PRI_LOWEST = 0,
NRI_PRI_LOW = 1,
NRI_PRI_HIGH = 2,
NRI_PRI_HIGHEST = 3
};
/*
* VCL TYPE
*/
typedef uint8_t VclType;
enum{
NON_VCL = 0,
VCL = 1,
NOT_APP = 2
};
/*
* vcl type map for given NAL unit type and corresponding H264 type
*/
extern const VclType g_kuiVclTypeMap[32][2];
#define IS_VCL_NAL(t, ext_idx) (g_kuiVclTypeMap[t][ext_idx] == VCL)
#define IS_PARAM_SETS_NALS(t) ( (t) == NAL_UNIT_SPS || (t) == NAL_UNIT_PPS || (t) == NAL_UNIT_SUBSET_SPS )
#define IS_SPS_NAL(t) ( (t) == NAL_UNIT_SPS )
#define IS_SUBSET_SPS_NAL(t) ( (t) == NAL_UNIT_SUBSET_SPS )
#define IS_PPS_NAL(t) ( (t) == NAL_UNIT_PPS )
#define IS_SEI_NAL(t) ( (t) == NAL_UNIT_SEI )
#define IS_PREFIX_NAL(t) ( (t) == NAL_UNIT_PREFIX )
#define IS_SUBSET_SPS_USED(t) ( (t) == NAL_UNIT_SUBSET_SPS || (t) == NAL_UNIT_CODED_SLICE_EXT )
#define IS_VCL_NAL_AVC_BASE(t) ( (t) == NAL_UNIT_CODED_SLICE || (t) == NAL_UNIT_CODED_SLICE_IDR )
#define IS_NEW_INTRODUCED_NAL(t) ( (t) == NAL_UNIT_PREFIX || (t) == NAL_UNIT_CODED_SLICE_EXT )
/* Base Slice Types
* Invalid in case of eSliceType exceeds 9,
* Need trim when eSliceType > 4 as fixed SliceType(eSliceType-4),
* meaning mapped version after eSliceType minus 4.
*/
typedef enum TagSliceType{
P_SLICE = 0,
B_SLICE = 1,
I_SLICE = 2,
SP_SLICE= 3,
SI_SLICE= 4,
UNKNOWN_SLICE= 5
}ESliceType;
/* Slice Types in scalable extension */
typedef uint8_t SliceTypeExt;
enum{
EP_SLICE = 0, // EP_SLICE: 0, 5
EB_SLICE = 1, // EB_SLICE: 1, 6
EI_SLICE = 2 // EI_SLICE: 2, 7
};
/* List Index */
typedef uint8_t ListIndex;
enum{
LIST_0 = 0,
LIST_1 = 1,
LIST_A = 2
};
/* Picture Size */
typedef struct TagPictureSize{
int32_t iWidth;
int32_t iHeight;
}SPictureSize;
/* Motion Vector components */
typedef uint8_t MvComp;
enum{
MV_X = 0,
MV_Y = 1,
MV_A = 2
};
/* Chroma Components */
typedef uint8_t ChromaComp;
enum{
CHROMA_CB = 0,
CHROMA_CR = 1,
CHROMA_A = 2
};
/* Position Offset structure */
typedef struct TagPosOffset{
int32_t iLeftOffset;
int32_t iTopOffset;
int32_t iRightOffset;
int32_t iBottomOffset;
}SPosOffset;
enum EMbPosition //
{
MB_LEFT = 0x01, // A
MB_TOP = 0x02, // B
MB_TOPRIGHT = 0x04, // C
MB_TOPLEFT = 0x08, // D,
MB_PRIVATE = 0x10,
};
/* MB Type & Sub-MB Type */
typedef int32_t MbType;
typedef int32_t SubMbType;
#define MB_TYPE_INTRA4x4 0x01
#define MB_TYPE_INTRA16x16 0x02
#define MB_TYPE_INTRA8x8 0x03
#define MB_TYPE_INTRA_PCM 0x04
#define MB_TYPE_INTRA_BL 0x05// I_BL new MB type
#define MB_TYPE_16x16 0x06
#define MB_TYPE_16x8 0x07
#define MB_TYPE_8x16 0x08
#define MB_TYPE_8x8 0x09
#define MB_TYPE_8x8_REF0 0x0a
#define SUB_MB_TYPE_8x8 0x0b
#define SUB_MB_TYPE_8x4 0x0c
#define SUB_MB_TYPE_4x8 0x0d
#define SUB_MB_TYPE_4x4 0x0e
#define MB_TYPE_SKIP 0x0f
#define MB_TYPE_DIRECT2 0x10
#define not_available 0x20
#define IS_INTRA4x4(type) ( MB_TYPE_INTRA4x4 == (type) )
#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
#define IS_INTRA(type) ( (type) > 0 && (type) < 5 )
#define IS_INTER(type) ( (type) > 5 && (type) < 16 )
#define IS_I_BL(type) ( (type) == MB_TYPE_INTRA_BL )
#define IS_SUB8x8(type) (MB_TYPE_8x8 == (type) || MB_TYPE_8x8_REF0 == (type))
/*
* Memory Management Control Operation (MMCO) code
*/
enum{
MMCO_END =0,
MMCO_SHORT2UNUSED =1,
MMCO_LONG2UNUSED =2,
MMCO_SHORT2LONG =3,
MMCO_SET_MAX_LONG =4,
MMCO_RESET =5,
MMCO_LONG =6
};
/////////intra16x16 Luma
#define I16_PRED_V 0
#define I16_PRED_H 1
#define I16_PRED_DC 2
#define I16_PRED_P 3
#define I16_PRED_DC_L 4
#define I16_PRED_DC_T 5
#define I16_PRED_DC_128 6
//////////intra4x4 Luma
#define I4_PRED_V 0
#define I4_PRED_H 1
#define I4_PRED_DC 2
#define I4_PRED_DDL 3 //diagonal_down_left
#define I4_PRED_DDR 4 //diagonal_down_right
#define I4_PRED_VR 5 //vertical_right
#define I4_PRED_HD 6 //horizon_down
#define I4_PRED_VL 7 //vertical_left
#define I4_PRED_HU 8 //horizon_up
#define I4_PRED_DC_L 9
#define I4_PRED_DC_T 10
#define I4_PRED_DC_128 11
#define I4_PRED_DDL_TOP 12 //right-top replacing by padding rightmost pixel of top
#define I4_PRED_VL_TOP 13 //right-top replacing by padding rightmost pixel of top
//////////intra Chroma
#define C_PRED_DC 0
#define C_PRED_H 1
#define C_PRED_V 2
#define C_PRED_P 3
#define C_PRED_DC_L 4
#define C_PRED_DC_T 5
#define C_PRED_DC_128 6
} // namespace WelsDec
#endif//WELS_COMMON_BASIS_H__

View File

@ -0,0 +1,104 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
//wels_const.h
#ifndef WELS_CONSTANCE_H__
#define WELS_CONSTANCE_H__
// Miscellaneous sizing infos
#ifndef MAX_FNAME_LEN
#define MAX_FNAME_LEN 256 // maximal length of file name in char size
#endif//MAX_FNAME_LEN
#ifndef WELS_LOG_BUF_SIZE
#define WELS_LOG_BUF_SIZE 4096
#endif//WELS_LOG_BUF_SIZE
#ifndef MAX_TRACE_LOG_SIZE
#define MAX_TRACE_LOG_SIZE (50 * (1<<20)) // max trace log size: 50 MB, overwrite occur if log file size exceeds this size
#endif//MAX_TRACE_LOG_SIZE
/* MB width in pixels for specified colorspace I420 usually used in codec */
#define MB_WIDTH_LUMA 16
#define MB_WIDTH_CHROMA (MB_WIDTH_LUMA>>1)
/* MB height in pixels for specified colorspace I420 usually used in codec */
#define MB_HEIGHT_LUMA 16
#define MB_HEIGHT_CHROMA (MB_HEIGHT_LUMA>>1)
/* Some list size */
#define MB_COEFF_LIST_SIZE (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
#define MB_PARTITION_SIZE 4 // Macroblock partition size in 8x8 sub-blocks
#define MB_SUB_PARTITION_SIZE 4 // Sub partition size in a 8x8 sub-block
#define MB_BLOCK4x4_NUM 16
#define MB_BLOCK8x8_NUM 4
#define NAL_UNIT_HEADER_EXT_SIZE 3 // Size of NAL unit header for extension in byte
#define MAX_SPS_COUNT 32 // Count number of SPS
#define MAX_PPS_COUNT 256 // Count number of PPS
#define MAX_FRAME_RATE 30 // maximal frame rate to support
#define MIN_FRAME_RATE 1 // minimal frame rate need support
#define MAX_REF_PIC_COUNT 16 // MAX Short + Long reference pictures
#define MIN_REF_PIC_COUNT 1 // minimal count number of reference pictures, 1 short + 2 key reference based?
#define MAX_SHORT_REF_COUNT 16 // maximal count number of short reference pictures
#define MAX_LONG_REF_COUNT 16 // maximal count number of long reference pictures
#define MAX_MMCO_COUNT 66
#define MAX_SLICEGROUP_IDS 8 // Count number of Slice Groups
#define ALIGN_RBSP_LEN_FIX 4
#define PADDING_LENGTH 32 // reference extension
#define BASE_QUALITY_ID 0
//#define BASE_DEPENDENCY_ID 0
#define BASE_DQ_ID 0
#define MAX_DQ_ID ((uint8_t)-1)
//#define MAX_LAYER_NUM (MAX_DEPENDENCY_LAYER * MAX_TEMPORAL_LEVEL * MAX_QUALITY_LEVEL) // Layer number of Three-tuple
#define LAYER_NUM_EXCHANGEABLE 1
#define MAX_NAL_UNIT_NUM_IN_AU 32 // predefined maximal number of NAL Units in an access unit
#define MAX_ACCESS_UINT_CAPACITY 1048576 // Maximal AU capacity in bytes: (1<<20) = 1024 KB predefined
enum {
BASE_MB = 0,
NON_AVC_REWRITE_ENHANCE_MB =1,
AVC_REWRITE_ENHANCE_MB = 2
};
#endif//WELS_CONSTANCE_H__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,123 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file bit_stream.cpp
*
* \brief Reading / writing bit-stream
*
* \date 03/10/2009 Created
*
*************************************************************************************
*/
#include "bit_stream.h"
#include "macros.h"
namespace WelsDec {
#ifdef WORDS_BIGENDIAN
inline uint32_t EndianFix(uint32_t uiX)
{
return uiX;
}
#else //WORDS_BIGENDIAN
#ifdef _MSC_VER
inline uint32_t EndianFix(uint32_t uiX)
{
__asm
{
mov eax, uiX
bswap eax
mov uiX, eax
}
return uiX;
}
#else //_MSC_VER
inline uint32_t EndianFix(uint32_t uiX)
{
#ifdef ARM_ARCHv7
__asm__ __volatile__("rev %0, %0":"+r"(uiX)); //Just for the ARMv7
#elif defined (X86_ARCH)
__asm__ __volatile__("bswap %0":"+r"(uiX));
#else
uiX = ((uiX & 0xff000000)>> 24) | ((uiX & 0xff0000) >> 8) |
((uiX & 0xff00) << 8) | ((uiX&0xff) << 24);
#endif
return uiX;
}
#endif //_MSC_VER
#endif //WORDS_BIGENDIAN
inline uint32_t GetValue4Bytes( uint8_t* pDstNal )
{
uint32_t uiValue = 0;
uiValue = (pDstNal[0]<<24) | (pDstNal[1]<<16) | (pDstNal[2]<<8) | (pDstNal[3]);
return uiValue;
}
void_t InitReadBits( PBitStringAux pBitString )
{
pBitString->uiCurBits = GetValue4Bytes( pBitString->pCurBuf );
pBitString->pCurBuf += 4;
pBitString->iLeftBits = -16;
}
/*!
* \brief input bits for decoder or initialize bitstream writing in encoder
*
* \param pBitString Bit string auxiliary pointer
* \param kpBuf bit-stream buffer
* \param kiSize size in bits for decoder; size in bytes for encoder
*
* \return size of buffer data in byte; failed in -1 return
*/
int32_t InitBits( PBitStringAux pBitString, const uint8_t *kpBuf, const int32_t kiSize )
{
const int32_t kiSizeBuf = (kiSize + 7) >> 3;
uint8_t *pTmp = (uint8_t *)kpBuf;
if ( NULL == pTmp )
return -1;
pBitString->pStartBuf = pTmp; // buffer to start position
pBitString->pEndBuf = pTmp + kiSizeBuf; // buffer + length
pBitString->iBits = kiSize; // count bits of overall bitstreaming inputindex;
pBitString->pCurBuf = pBitString->pStartBuf;
InitReadBits( pBitString );
return kiSizeBuf;
}
} // namespace WelsDec

View File

@ -0,0 +1,211 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file cpu.cpp
*
* \brief CPU compatibility detection
*
* \date 04/29/2009 Created
*
*************************************************************************************
*/
#include <string.h>
#include "cpu.h"
#include "cpu_core.h"
namespace WelsDec {
#define CPU_Vender_AMD "AuthenticAMD"
#define CPU_Vender_INTEL "GenuineIntel"
#define CPU_Vender_CYRIX "CyrixInstead"
#if defined(X86_ASM)
uint32_t WelsCPUFeatureDetect( int32_t *pNumberOfLogicProcessors )
{
uint32_t uiCPU = 0;
uint32_t uiFeatureA = 0, uiFeatureB = 0, uiFeatureC = 0, uiFeatureD = 0;
int32_t CacheLineSize = 0;
int8_t chVenderName[16] = { 0 };
if( !WelsCPUIdVerify() )
{
/* cpuid is not supported in cpu */
return 0;
}
WelsCPUId( 0, &uiFeatureA, (uint32_t*)&chVenderName[0],(uint32_t*)&chVenderName[8],(uint32_t*)&chVenderName[4] );
if( uiFeatureA == 0 )
{
/* maximum input value for basic cpuid information */
return 0;
}
WelsCPUId( 1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD );
if( (uiFeatureD & 0x00800000) == 0 )
{
/* Basic MMX technology is not support in cpu, mean nothing for us so return here */
return 0;
}
uiCPU = WELS_CPU_MMX;
if( uiFeatureD & 0x02000000 )
{
/* SSE technology is identical to AMD MMX extensions */
uiCPU |= WELS_CPU_MMXEXT|WELS_CPU_SSE;
}
if( uiFeatureD & 0x04000000 )
{
/* SSE2 support here */
uiCPU |= WELS_CPU_SSE2;
}
if ( uiFeatureD & 0x00000001 )
{
/* x87 FPU on-chip checking */
uiCPU |= WELS_CPU_FPU;
}
if ( uiFeatureD & 0x00008000 )
{
/* CMOV instruction checking */
uiCPU |= WELS_CPU_CMOV;
}
if ( !strcmp((const str_t*)chVenderName,CPU_Vender_INTEL) ) // confirmed_safe_unsafe_usage
{
if ( uiFeatureD & 0x10000000 )
{
/* Multi-Threading checking: contains of multiple logic processors */
uiCPU |= WELS_CPU_HTT;
}
}
if( uiFeatureC & 0x00000001 ){
/* SSE3 support here */
uiCPU |= WELS_CPU_SSE3;
}
if( uiFeatureC & 0x00000200 ){
/* SSSE3 support here */
uiCPU |= WELS_CPU_SSSE3;
}
if( uiFeatureC & 0x00080000 ){
/* SSE4.1 support here, 45nm Penryn processor */
uiCPU |= WELS_CPU_SSE41;
}
if( uiFeatureC & 0x00100000 ){
/* SSE4.2 support here, next generation Nehalem processor */
uiCPU |= WELS_CPU_SSE42;
}
if ( WelsCPUSupportAVX( uiFeatureA, uiFeatureC ) )
{
/* AVX supported */
uiCPU |= WELS_CPU_AVX;
}
if ( WelsCPUSupportFMA( uiFeatureA, uiFeatureC ) )
{
/* AVX FMA supported */
uiCPU |= WELS_CPU_FMA;
}
if ( uiFeatureC & 0x02000000 )
{
/* AES checking */
uiCPU |= WELS_CPU_AES;
}
if ( uiFeatureC & 0x00400000 )
{
/* MOVBE checking */
uiCPU |= WELS_CPU_MOVBE;
}
if ( pNumberOfLogicProcessors != NULL )
{
// HTT enabled on chip
*pNumberOfLogicProcessors = (uiFeatureB & 0x00ff0000) >> 16; // feature bits: 23-16 on returned EBX
}
WelsCPUId( 0x80000000, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD );
if( (!strcmp((const str_t*)chVenderName,CPU_Vender_AMD)) && (uiFeatureA>=0x80000001) ){ // confirmed_safe_unsafe_usage
WelsCPUId(0x80000001, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD );
if( uiFeatureD&0x00400000 ){
uiCPU |= WELS_CPU_MMXEXT;
}
if( uiFeatureD&0x80000000 ){
uiCPU |= WELS_CPU_3DNOW;
}
}
if( !strcmp((const str_t*)chVenderName,CPU_Vender_INTEL) ){ // confirmed_safe_unsafe_usage
int32_t family, model;
WelsCPUId(1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
family = ((uiFeatureA>>8)&0xf) + ((uiFeatureA>>20)&0xff);
model = ((uiFeatureA>>4)&0xf) + ((uiFeatureA>>12)&0xf0);
if( (family==6) && (model==9 || model==13 || model==14) ){
uiCPU &= ~(WELS_CPU_SSE2|WELS_CPU_SSE3);
}
}
// get cache line size
if( (!strcmp((const str_t*)chVenderName,CPU_Vender_INTEL)) || !(strcmp((const str_t*)chVenderName,CPU_Vender_CYRIX)) ){ // confirmed_safe_unsafe_usage
WelsCPUId(1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
CacheLineSize = (uiFeatureB&0xff00)>>5; // ((clflush_line_size >> 8) << 3), CLFLUSH_line_size * 8 = CacheLineSize_in_byte
if( CacheLineSize == 128 ){
uiCPU |= WELS_CPU_CACHELINE_128;
}
else if( CacheLineSize == 64 ){
uiCPU |= WELS_CPU_CACHELINE_64;
}
else if( CacheLineSize == 32 ){
uiCPU |= WELS_CPU_CACHELINE_32;
}
else if( CacheLineSize == 16 ){
uiCPU |= WELS_CPU_CACHELINE_16;
}
}
return uiCPU;
}
void WelsCPURestore( const uint32_t kuiCPU )
{
if( kuiCPU & (WELS_CPU_MMX|WELS_CPU_MMXEXT|WELS_CPU_3DNOW|WELS_CPU_3DNOWEXT) )
{
WelsEmms();
}
}
#endif
} // namespace WelsDec

Some files were not shown because too many files have changed in this diff Show More