Merge pull request #1367 from ruil2/rename

rename namespace and funciton name to avoid conflicts with old library
This commit is contained in:
huili2 2014-09-18 13:23:27 +08:00
commit c4a446b43a
8 changed files with 17 additions and 17 deletions

View File

@ -86,7 +86,7 @@ CWelsPreProcess::~CWelsPreProcess() {
int32_t CWelsPreProcess::WelsPreprocessCreate() {
if (m_pInterfaceVp == NULL) {
CreateVpInterface ((void**) &m_pInterfaceVp, WELSVP_INTERFACE_VERION);
WelsCreateVpInterface ((void**) &m_pInterfaceVp, WELSVP_INTERFACE_VERION);
if (!m_pInterfaceVp)
goto exit;
} else
@ -100,7 +100,7 @@ exit:
}
int32_t CWelsPreProcess::WelsPreprocessDestroy() {
DestroyVpInterface (m_pInterfaceVp, WELSVP_INTERFACE_VERION);
WelsDestroyVpInterface (m_pInterfaceVp, WELSVP_INTERFACE_VERION);
m_pInterfaceVp = NULL;
return 0;

View File

@ -300,8 +300,8 @@ class IWelsVP {
#endif
WELSVP_EXTERNC_BEGIN
EResult CreateVpInterface (void** ppCtx, int iVersion /*= WELSVP_INTERFACE_VERION*/);
EResult DestroyVpInterface (void* pCtx , int iVersion /*= WELSVP_INTERFACE_VERION*/);
EResult WelsCreateVpInterface (void** ppCtx, int iVersion /*= WELSVP_INTERFACE_VERION*/);
EResult WelsDestroyVpInterface (void* pCtx , int iVersion /*= WELSVP_INTERFACE_VERION*/);
WELSVP_EXTERNC_END
//////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -44,20 +44,20 @@
/* interface API implement */
EResult CreateVpInterface (void** ppCtx, int iVersion) {
EResult WelsCreateVpInterface (void** ppCtx, int iVersion) {
if (iVersion & 0x8000)
return nsWelsVP::CreateSpecificVpInterface ((IWelsVP**)ppCtx);
return WelsVP::CreateSpecificVpInterface ((IWelsVP**)ppCtx);
else if (iVersion & 0x7fff)
return nsWelsVP::CreateSpecificVpInterface ((IWelsVPc**)ppCtx);
return WelsVP::CreateSpecificVpInterface ((IWelsVPc**)ppCtx);
else
return RET_INVALIDPARAM;
}
EResult DestroyVpInterface (void* pCtx, int iVersion) {
EResult WelsDestroyVpInterface (void* pCtx, int iVersion) {
if (iVersion & 0x8000)
return nsWelsVP::DestroySpecificVpInterface ((IWelsVP*)pCtx);
return WelsVP::DestroySpecificVpInterface ((IWelsVP*)pCtx);
else if (iVersion & 0x7fff)
return nsWelsVP::DestroySpecificVpInterface ((IWelsVPc*)pCtx);
return WelsVP::DestroySpecificVpInterface ((IWelsVPc*)pCtx);
else
return RET_INVALIDPARAM;
}

View File

@ -47,7 +47,7 @@
#define WELSVP_EXTERN_C_BEGIN extern "C" {
#define WELSVP_EXTERN_C_END }
#define WELSVP_NAMESPACE_BEGIN namespace nsWelsVP {
#define WELSVP_NAMESPACE_BEGIN namespace WelsVP {
#define WELSVP_NAMESPACE_END }
// Get the stdint type definitions from typedefs.h in the common lib

View File

@ -9,7 +9,7 @@
#include "AdaptiveQuantization.h"
using namespace nsWelsVP;
using namespace WelsVP;
static void FillWithRandomData (uint8_t* p, int32_t Len) {
for (int32_t i = 0; i < Len; i++) {

View File

@ -6,7 +6,7 @@
#include "IWelsVP.h"
#include "downsample.h"
using namespace nsWelsVP;
using namespace WelsVP;
void DyadicBilinearDownsampler_ref (uint8_t* pDst, const int32_t kiDstStride,
uint8_t* pSrc, const int32_t kiSrcStride,

View File

@ -8,7 +8,7 @@
#include "ScrollDetectionFuncs.h"
#include "utils/DataGenerator.h"
using namespace nsWelsVP;
using namespace WelsVP;
#define ASSERT_MEMORY_FAIL2X(A, B) \
if (NULL == B) { \

View File

@ -6,7 +6,7 @@
#include "IWelsVP.h"
#include "vaacalculation.h"
using namespace nsWelsVP;
using namespace WelsVP;
void VAACalcSadSsd_ref (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
int32_t iPicStride,