<div dir="ltr">Please ignore the previous patch as there was one minor error.<div>I will resend the patch.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 31, 2013 at 3:07 PM, <span dir="ltr"><<a href="mailto:kavitha@multicorewareinc.com" target="_blank">kavitha@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Kavitha Sampath <<a href="mailto:kavitha@multicorewareinc.com">kavitha@multicorewareinc.com</a>><br>
# Date 1383210232 -19800<br>
# Thu Oct 31 14:33:52 2013 +0530<br>
# Node ID b7f2aac2b3fe85677534b494d368b2f2606a921f<br>
# Parent 0666d56aaa4259590dffdd5aa3bc7859c4763931<br>
refactor: (common files)check need of signed/unsigned int<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComLoopFilter.cpp<br>
--- a/source/Lib/TLibCommon/TComLoopFilter.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComLoopFilter.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -528,7 +528,7 @@<br>
Pel* src = reconYuv->getLumaAddr(cu->getAddr(), absZOrderIdx);<br>
Pel* tmpsrc = src;<br>
<br>
- int stride = reconYuv->getStride();<br>
+ intptr_t stride = reconYuv->getStride();<br>
int qp = 0;<br>
int qpP = 0;<br>
int qpQ = 0;<br>
@@ -637,7 +637,7 @@<br>
void TComLoopFilter::xEdgeFilterChroma(TComDataCU* cu, uint32_t absZOrderIdx, uint32_t depth, int dir, int edge)<br>
{<br>
TComPicYuv* reconYuv = cu->getPic()->getPicYuvRec();<br>
- int stride = reconYuv->getCStride();<br>
+ intptr_t stride = reconYuv->getCStride();<br>
Pel* srcCb = reconYuv->getCbAddr(cu->getAddr(), absZOrderIdx);<br>
Pel* srcCr = reconYuv->getCrAddr(cu->getAddr(), absZOrderIdx);<br>
int qp = 0;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPattern.cpp<br>
--- a/source/Lib/TLibCommon/TComPattern.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPattern.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -68,7 +68,7 @@<br>
\param offsetAbove neighbor offset (above)<br>
*/<br>
void TComPatternParam::setPatternParamPel(Pel* texture, int roiWidth, int roiHeight,<br>
- int stride, int offsetLeft, int offsetAbove)<br>
+ intptr_t stride, int offsetLeft, int offsetAbove)<br>
{<br>
m_patternOrigin = texture;<br>
m_roiWidth = roiWidth;<br>
@@ -121,7 +121,7 @@<br>
// Public member functions (TComPattern)<br>
// ====================================================================================================================<br>
<br>
-void TComPattern::initPattern(Pel* y, Pel* cb, Pel* cr, int roiWidth, int roiHeight, int stride,<br>
+void TComPattern::initPattern(Pel* y, Pel* cb, Pel* cr, int roiWidth, int roiHeight, intptr_t stride,<br>
int offsetLeft, int offsetAbove)<br>
{<br>
m_patternY.setPatternParamPel(y, roiWidth, roiHeight, stride, offsetLeft, offsetAbove);<br>
@@ -157,7 +157,7 @@<br>
}<br>
<br>
void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf,<br>
- int strideOrig, int heightOrig)<br>
+ intptr_t strideOrig, int heightOrig)<br>
{<br>
Pel* roiOrigin;<br>
Pel* adiTemp;<br>
@@ -167,7 +167,7 @@<br>
uint32_t cuHeight2 = cuHeight << 1;<br>
uint32_t width;<br>
uint32_t height;<br>
- int picStride = cu->getPic()->getStride();<br>
+ intptr_t picStride = cu->getPic()->getStride();<br>
int unitSize = 0;<br>
int numUnitsInCU = 0;<br>
int totalUnits = 0;<br>
@@ -287,7 +287,7 @@<br>
}<br>
<br>
// Overloaded initialization of ADI buffers to support buffered references for xpredIntraAngBufRef<br>
-void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf, int strideOrig, int heightOrig,<br>
+void TComPattern::initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf, intptr_t strideOrig, int heightOrig,<br>
Pel* refAbove, Pel* refLeft, Pel* refAboveFlt, Pel* refLeftFlt)<br>
{<br>
initAdiPattern(cu, zOrderIdxInPart, partDepth, adiBuf, strideOrig, heightOrig);<br>
@@ -312,7 +312,7 @@<br>
}<br>
}<br>
<br>
-void TComPattern::initAdiPatternChroma(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf, int strideOrig, int heightOrig)<br>
+void TComPattern::initAdiPatternChroma(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf, intptr_t strideOrig, int heightOrig)<br>
{<br>
Pel* roiOrigin;<br>
Pel* adiTemp;<br>
@@ -320,7 +320,7 @@<br>
uint32_t cuHeight = cu->getHeight(0) >> partDepth;<br>
uint32_t width;<br>
uint32_t height;<br>
- int picStride = cu->getPic()->getCStride();<br>
+ intptr_t picStride = cu->getPic()->getCStride();<br>
<br>
int unitSize = 0;<br>
int numUnitsInCU = 0;<br>
@@ -370,7 +370,7 @@<br>
cuWidth, cuHeight, width, height, picStride);<br>
}<br>
<br>
-void TComPattern::fillReferenceSamples(Pel* roiOrigin, Pel* adiTemp, bool* bNeighborFlags, int numIntraNeighbor, int unitSize, int numUnitsInCU, int totalUnits, uint32_t cuWidth, uint32_t cuHeight, uint32_t width, uint32_t height, int picStride)<br>
+void TComPattern::fillReferenceSamples(Pel* roiOrigin, Pel* adiTemp, bool* bNeighborFlags, int numIntraNeighbor, int unitSize, int numUnitsInCU, int totalUnits, uint32_t cuWidth, uint32_t cuHeight, uint32_t width, uint32_t height, intptr_t picStride)<br>
{<br>
Pel* piRoiTemp;<br>
int i, j;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPattern.h<br>
--- a/source/Lib/TLibCommon/TComPattern.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPattern.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -66,7 +66,7 @@<br>
<br>
int m_roiWidth;<br>
int m_roiHeight;<br>
- int m_patternStride;<br>
+ intptr_t m_patternStride;<br>
<br>
/// return starting position of buffer<br>
Pel* getPatternOrigin() { return m_patternOrigin; }<br>
@@ -78,7 +78,7 @@<br>
}<br>
<br>
/// set parameters from Pel buffer for accessing neighboring pixels<br>
- void setPatternParamPel(Pel* piTexture, int roiWidth, int roiHeight, int stride,<br>
+ void setPatternParamPel(Pel* piTexture, int roiWidth, int roiHeight, intptr_t stride,<br>
int offsetLeft, int offsetAbove);<br>
<br>
/// set parameters of one color component from CU data for accessing neighboring pixels<br>
@@ -106,7 +106,7 @@<br>
<br>
int getROIYHeight() { return m_patternY.m_roiHeight; }<br>
<br>
- int getPatternLStride() { return m_patternY.m_patternStride; }<br>
+ intptr_t getPatternLStride() { return m_patternY.m_patternStride; }<br>
<br>
// access functions of ADI buffers<br>
Pel* getAdiOrgBuf(int cuWidth, int cuHeight, Pel* adiBuf);<br>
@@ -120,11 +120,11 @@<br>
// -------------------------------------------------------------------------------------------------------------------<br>
<br>
/// set parameters from Pel buffers for accessing neighboring pixels<br>
- void initPattern(Pel* y, Pel* cb, Pel* cr, int roiWidth, int roiHeight, int stride,<br>
+ void initPattern(Pel* y, Pel* cb, Pel* cr, int roiWidth, int roiHeight, intptr_t stride,<br>
int offsetLeft, int offsetAbove);<br>
<br>
void initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf,<br>
- int strideOrig, int heightOrig, Pel* refAbove, Pel* refLeft,<br>
+ intptr_t strideOrig, int heightOrig, Pel* refAbove, Pel* refLeft,<br>
Pel* refAboveFlt, Pel* refLeftFlt);<br>
<br>
/// set parameters from CU data for accessing neighboring pixels<br>
@@ -132,16 +132,16 @@<br>
<br>
/// set luma parameters from CU data for accessing ADI data<br>
void initAdiPattern(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth, Pel* adiBuf,<br>
- int strideOrig, int heightOrig);<br>
+ intptr_t strideOrig, int heightOrig);<br>
<br>
/// set chroma parameters from CU data for accessing ADI data<br>
void initAdiPatternChroma(TComDataCU* cu, uint32_t zOrderIdxInPart, uint32_t partDepth,<br>
- Pel* adiBuf, int strideOrig, int heightOrig);<br>
+ Pel* adiBuf, intptr_t strideOrig, int heightOrig);<br>
<br>
private:<br>
<br>
/// padding of unavailable reference samples for intra prediction<br>
- void fillReferenceSamples(Pel* roiOrigin, Pel* adiTemp, bool* bNeighborFlags, int numIntraNeighbor, int unitSize, int numUnitsInCU, int totalUnits, uint32_t cuWidth, uint32_t cuHeight, uint32_t width, uint32_t height, int picStride);<br>
+ void fillReferenceSamples(Pel* roiOrigin, Pel* adiTemp, bool* bNeighborFlags, int numIntraNeighbor, int unitSize, int numUnitsInCU, int totalUnits, uint32_t cuWidth, uint32_t cuHeight, uint32_t width, uint32_t height, intptr_t picStride);<br>
<br>
/// constrained intra prediction<br>
bool isAboveLeftAvailable(TComDataCU* cu, uint32_t partIdxLT);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPic.h<br>
--- a/source/Lib/TLibCommon/TComPic.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPic.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -147,9 +147,9 @@<br>
<br>
uint32_t getParPelY(UChar partIdx) { return getParPelX(partIdx); }<br>
<br>
- int getStride() { return m_reconPicYuv->getStride(); }<br>
+ intptr_t getStride() { return m_reconPicYuv->getStride(); }<br>
<br>
- int getCStride() { return m_reconPicYuv->getCStride(); }<br>
+ intptr_t getCStride() { return m_reconPicYuv->getCStride(); }<br>
<br>
Window& getConformanceWindow() { return m_conformanceWindow; }<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPicYuv.cpp<br>
--- a/source/Lib/TLibCommon/TComPicYuv.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPicYuv.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -224,7 +224,7 @@<br>
::memcpy(destPicYuv->getBufV(), m_picBufV, sizeof(Pel) * ((m_picWidth >> 1) + (m_chromaMarginX << 1)) * ((m_picHeight >> 1) + (m_chromaMarginY << 1)));<br>
}<br>
<br>
-void TComPicYuv::xExtendPicCompBorder(Pel* recon, int stride, int width, int height, int iMarginX, int iMarginY)<br>
+void TComPicYuv::xExtendPicCompBorder(Pel* recon, intptr_t stride, int width, int height, int iMarginX, int iMarginY)<br>
{<br>
int x, y;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPicYuv.h<br>
--- a/source/Lib/TLibCommon/TComPicYuv.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPicYuv.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -89,8 +89,8 @@<br>
int m_lumaMarginY;<br>
int m_chromaMarginX;<br>
int m_chromaMarginY;<br>
- int m_stride;<br>
- int m_strideC;<br>
+ intptr_t m_stride;<br>
+ intptr_t m_strideC;<br>
<br>
int m_numCuInWidth;<br>
int m_numCuInHeight;<br>
@@ -98,7 +98,7 @@<br>
TComPicYuv();<br>
virtual ~TComPicYuv();<br>
<br>
- void xExtendPicCompBorder(Pel* recon, int stride, int width, int height, int marginX, int marginY);<br>
+ void xExtendPicCompBorder(Pel* recon, intptr_t stride, int width, int height, int marginX, int marginY);<br>
<br>
// ------------------------------------------------------------------------------------------------<br>
// Memory management<br>
@@ -118,9 +118,9 @@<br>
<br>
int getHeight() { return m_picHeight; }<br>
<br>
- int getStride() { return m_stride; }<br>
+ intptr_t getStride() { return m_stride; }<br>
<br>
- int getCStride() { return m_strideC; }<br>
+ intptr_t getCStride() { return m_strideC; }<br>
<br>
int getLumaMarginX() { return m_lumaMarginX; }<br>
<br>
@@ -178,11 +178,11 @@<br>
void dump(char* pFileName, bool bAdd = false);<br>
}; // END CLASS DEFINITION TComPicYuv<br>
<br>
-void updateChecksum(const Pel* plane, uint32_t& checksumVal, uint32_t height, uint32_t width, uint32_t stride, int row, uint32_t cu_Height);<br>
-void updateCRC(const Pel* plane, uint32_t& crcVal, uint32_t height, uint32_t width, uint32_t stride);<br>
+void updateChecksum(const Pel* plane, uint32_t& checksumVal, uint32_t height, uint32_t width, intptr_t stride, int row, uint32_t cu_Height);<br>
+void updateCRC(const Pel* plane, uint32_t& crcVal, uint32_t height, uint32_t width, intptr_t stride);<br>
void crcFinish(uint32_t& crc, UChar digest[16]);<br>
void checksumFinish(uint32_t& checksum, UChar digest[16]);<br>
-void updateMD5Plane(MD5Context& md5, const Pel* plane, uint32_t width, uint32_t height, uint32_t stride);<br>
+void updateMD5Plane(MD5Context& md5, const Pel* plane, uint32_t width, uint32_t height, intptr_t stride);<br>
}<br>
//! \}<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPicYuvMD5.cpp<br>
--- a/source/Lib/TLibCommon/TComPicYuvMD5.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPicYuvMD5.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -66,7 +66,7 @@<br>
* is adjusted to OUTBIT_BITDEPTH_DIV8.<br>
*/<br>
template<uint32_t OUTPUT_BITDEPTH_DIV8><br>
-static void md5_plane(MD5Context& md5, const Pel* plane, uint32_t width, uint32_t height, uint32_t stride)<br>
+static void md5_plane(MD5Context& md5, const Pel* plane, uint32_t width, uint32_t height, intptr_t stride)<br>
{<br>
/* N is the number of samples to process per md5 update.<br>
* All N samples must fit in buf */<br>
@@ -88,7 +88,7 @@<br>
}<br>
}<br>
<br>
-void updateCRC(const Pel* plane, uint32_t& crcVal, uint32_t height, uint32_t width, uint32_t stride)<br>
+void updateCRC(const Pel* plane, uint32_t& crcVal, uint32_t height, uint32_t width, intptr_t stride)<br>
{<br>
uint32_t crcMsb;<br>
uint32_t bitVal;<br>
@@ -132,7 +132,7 @@<br>
digest[1] = crcVal & 0xff;<br>
}<br>
<br>
-void updateChecksum(const Pel* plane, uint32_t& checksumVal, uint32_t height, uint32_t width, uint32_t stride, int row, uint32_t cuHeight)<br>
+void updateChecksum(const Pel* plane, uint32_t& checksumVal, uint32_t height, uint32_t width, intptr_t stride, int row, uint32_t cuHeight)<br>
{<br>
UChar xor_mask;<br>
<br>
@@ -159,7 +159,7 @@<br>
digest[3] = checksum & 0xff;<br>
}<br>
<br>
-void updateMD5Plane(MD5Context& md5, const Pel* plane, uint32_t width, uint32_t height, uint32_t stride)<br>
+void updateMD5Plane(MD5Context& md5, const Pel* plane, uint32_t width, uint32_t height, intptr_t stride)<br>
{<br>
/* choose an md5_plane packing function based on the system bitdepth */<br>
typedef void (*MD5PlaneFunc)(MD5Context&, const Pel*, uint32_t, uint32_t, uint32_t);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPrediction.cpp<br>
--- a/source/Lib/TLibCommon/TComPrediction.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPrediction.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -148,7 +148,7 @@<br>
// Public member functions<br>
// ====================================================================================================================<br>
<br>
-void TComPrediction::predIntraLumaAng(uint32_t dirMode, Pel* dst, uint32_t stride, int size)<br>
+void TComPrediction::predIntraLumaAng(uint32_t dirMode, Pel* dst, intptr_t stride, int size)<br>
{<br>
assert(g_convertToBit[size] >= 0); // 4x 4<br>
assert(g_convertToBit[size] <= 5); // 128x128<br>
@@ -196,7 +196,7 @@<br>
}<br>
<br>
// Angular chroma<br>
-void TComPrediction::predIntraChromaAng(Pel* src, uint32_t dirMode, Pel* dst, uint32_t stride, int width)<br>
+void TComPrediction::predIntraChromaAng(Pel* src, uint32_t dirMode, Pel* dst, intptr_t stride, int width)<br>
{<br>
// Create the prediction<br>
Pel refAbv[3 * MAX_CU_SIZE];<br>
@@ -469,12 +469,12 @@<br>
* \param height Height of block<br>
* \param dstPic Pointer to destination picture<br>
*/<br>
-void TComPrediction::xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TComYuv *dstPic)<br>
+void TComPrediction::xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TComYuv *dstPic)<br>
{<br>
- int dstStride = dstPic->getStride();<br>
+ intptr_t dstStride = dstPic->getStride();<br>
Pel *dst = dstPic->getLumaAddr(partAddr);<br>
<br>
- int srcStride = refPic->getStride();<br>
+ intptr_t srcStride = refPic->getStride();<br>
int srcOffset = (mv->x >> 2) + (mv->y >> 2) * srcStride;<br>
Pel* src = refPic->getLumaAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + srcOffset;<br>
<br>
@@ -504,13 +504,13 @@<br>
}<br>
<br>
//Motion compensated block for biprediction<br>
-void TComPrediction::xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TShortYUV *dstPic)<br>
+void TComPrediction::xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TShortYUV *dstPic)<br>
{<br>
- int refStride = refPic->getStride();<br>
+ intptr_t refStride = refPic->getStride();<br>
int refOffset = (mv->x >> 2) + (mv->y >> 2) * refStride;<br>
Pel *ref = refPic->getLumaAddr(cu->getAddr(), cu->getZorderIdxInCU() + partAddr) + refOffset;<br>
<br>
- int dstStride = dstPic->m_width;<br>
+ intptr_t dstStride = dstPic->m_width;<br>
int16_t *dst = dstPic->getLumaAddr(partAddr);<br>
<br>
int xFrac = mv->x & 0x3;<br>
@@ -550,10 +550,10 @@<br>
* \param dstPic Pointer to destination picture<br>
* \param bi Flag indicating whether bipred is used<br>
*/<br>
-void TComPrediction::xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TComYuv *dstPic)<br>
+void TComPrediction::xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TComYuv *dstPic)<br>
{<br>
- int refStride = refPic->getCStride();<br>
- int dstStride = dstPic->getCStride();<br>
+ intptr_t refStride = refPic->getCStride();<br>
+ intptr_t dstStride = dstPic->getCStride();<br>
<br>
int refOffset = (mv->x >> 3) + (mv->y >> 3) * refStride;<br>
<br>
@@ -585,7 +585,7 @@<br>
}<br>
else<br>
{<br>
- int extStride = cxWidth;<br>
+ intptr_t extStride = cxWidth;<br>
int filterSize = NTAPS_CHROMA;<br>
int halfFilterSize = (filterSize >> 1);<br>
<br>
@@ -598,10 +598,10 @@<br>
}<br>
<br>
// Generate motion compensated block when biprediction<br>
-void TComPrediction::xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TShortYUV *dstPic)<br>
+void TComPrediction::xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TShortYUV *dstPic)<br>
{<br>
- int refStride = refPic->getCStride();<br>
- int dstStride = dstPic->m_cwidth;<br>
+ intptr_t refStride = refPic->getCStride();<br>
+ intptr_t dstStride = dstPic->m_cwidth;<br>
<br>
int refOffset = (mv->x >> 3) + (mv->y >> 3) * refStride;<br>
<br>
@@ -633,7 +633,7 @@<br>
}<br>
else<br>
{<br>
- int extStride = cxWidth;<br>
+ intptr_t extStride = cxWidth;<br>
int filterSize = NTAPS_CHROMA;<br>
int halfFilterSize = (filterSize >> 1);<br>
primitives.ipfilter_ps[FILTER_H_P_S_4](refCb - (halfFilterSize - 1) * refStride, refStride, m_immedVals, extStride, cxWidth, cxHeight + filterSize - 1, g_chromaFilter[xFrac]);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComPrediction.h<br>
--- a/source/Lib/TLibCommon/TComPrediction.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComPrediction.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -65,7 +65,7 @@<br>
<br>
Pel* m_predBuf;<br>
Pel* m_predAllAngsBuf;<br>
- int m_predBufStride;<br>
+ intptr_t m_predBufStride;<br>
int m_predBufHeight;<br>
<br>
// references sample for IntraPrediction<br>
@@ -79,22 +79,22 @@<br>
/* This holds intermediate values for filtering operations which need to maintain short precision */<br>
TShortYUV m_filteredBlockTmp[4];<br>
<br>
- int16_t* m_immedVals;<br>
+ int16_t* . m_immedVals;<br>
Pel* m_lumaRecBuffer; ///< array for down-sampled reconstructed luma sample<br>
- int m_lumaRecStride; ///< stride of m_lumaRecBuffer<br>
+ intptr_t m_lumaRecStride; ///< stride of m_lumaRecBuffer<br>
<br>
// motion compensation functions<br>
void xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TComYuv* outPredYuv, bool bLuma = true, bool bChroma = true);<br>
void xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TShortYUV* outPredYuv, bool bLuma = true, bool bChroma = true);<br>
- void xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TComYuv *dstPic);<br>
- void xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TShortYUV *dstPic);<br>
- void xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TComYuv *dstPic);<br>
- void xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, int width, int height, TShortYUV *dstPic);<br>
+ void xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TComYuv *dstPic);<br>
+ void xPredInterLumaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TShortYUV *dstPic);<br>
+ void xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TComYuv *dstPic);<br>
+ void xPredInterChromaBlk(TComDataCU *cu, TComPicYuv *refPic, uint32_t partAddr, MV *mv, uint32_t width, uint32_t height, TShortYUV *dstPic);<br>
<br>
void xPredInterBi(TComDataCU* cu, uint32_t partAddr, int width, int height, TComYuv*& outPredYuv, bool bLuma = true, bool bChroma = true);<br>
void xWeightedAverage(TComYuv* srcYuv0, TComYuv* srcYuv1, int refIdx0, int refIdx1, uint32_t partAddr, int width, int height, TComYuv*& outDstYuv, bool bLuma = true, bool bChroma = true);<br>
<br>
- void xGetLLSPrediction(TComPattern* pcPattern, int* src0, int srcstride, Pel* dst0, int dststride, uint32_t width, uint32_t height, uint32_t ext0);<br>
+ void xGetLLSPrediction(TComPattern* pcPattern, int* src0, intptr_t srcstride, Pel* dst0, intptr_t dststride, uint32_t width, uint32_t height, uint32_t ext0);<br>
<br>
bool xCheckIdenticalMotion(TComDataCU* cu, uint32_t PartAddr);<br>
<br>
@@ -114,12 +114,12 @@<br>
void getMvPredAMVP(TComDataCU* cu, uint32_t partIdx, uint32_t partAddr, int picList, MV& mvPred);<br>
<br>
// Angular Intra<br>
- void predIntraLumaAng(uint32_t dirMode, Pel* pred, uint32_t stride, int width);<br>
- void predIntraChromaAng(Pel* src, uint32_t dirMode, Pel* pred, uint32_t stride, int width);<br>
+ void predIntraLumaAng(uint32_t dirMode, Pel* pred, intptr_t stride, int width);<br>
+ void predIntraChromaAng(Pel* src, uint32_t dirMode, Pel* pred, intptr_t stride, int width);<br>
<br>
Pel* getPredicBuf() { return m_predBuf; }<br>
<br>
- int getPredicBufWidth() { return m_predBufStride; }<br>
+ intptr_t getPredicBufWidth() { return m_predBufStride; }<br>
<br>
int getPredicBufHeight() { return m_predBufHeight; }<br>
};<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComRom.cpp<br>
--- a/source/Lib/TLibCommon/TComRom.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComRom.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -94,7 +94,7 @@<br>
// Data structure related table & variable<br>
// ====================================================================================================================<br>
<br>
-int g_bitDepth = 8;<br>
+uint32_t g_bitDepth = 8;<br>
uint32_t g_maxCUWidth = MAX_CU_SIZE;<br>
uint32_t g_maxCUHeight = MAX_CU_SIZE;<br>
uint32_t g_maxCUDepth = MAX_CU_DEPTH;<br>
@@ -106,9 +106,9 @@<br>
<br>
uint32_t g_puOffset[8] = { 0, 8, 4, 4, 2, 10, 1, 5 };<br>
<br>
-void initZscanToRaster(int maxDepth, int depth, uint32_t startVal, uint32_t*& curIdx)<br>
+void initZscanToRaster(uint32_t maxDepth, int depth, uint32_t startVal, uint32_t*& curIdx)<br>
{<br>
- int stride = 1 << (maxDepth - 1);<br>
+ intptr_t stride = 1 << (maxDepth - 1);<br>
<br>
if (depth == maxDepth)<br>
{<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComRom.h<br>
--- a/source/Lib/TLibCommon/TComRom.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComRom.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -76,7 +76,7 @@<br>
extern uint32_t g_zscanToRaster[MAX_NUM_SPU_W * MAX_NUM_SPU_W];<br>
extern uint32_t g_rasterToZscan[MAX_NUM_SPU_W * MAX_NUM_SPU_W];<br>
<br>
-void initZscanToRaster(int maxDepth, int depth, uint32_t startVal, uint32_t*& curIdx);<br>
+void initZscanToRaster(uint32_t maxDepth, int depth, uint32_t startVal, uint32_t*& curIdx);<br>
void initRasterToZscan(uint32_t maxCUWidth, uint32_t maxCUHeight, uint32_t maxCUDepth);<br>
<br>
// conversion of partition index to picture pel position<br>
@@ -155,7 +155,7 @@<br>
// Bit-depth<br>
// ====================================================================================================================<br>
<br>
-extern int g_bitDepth;<br>
+extern uint32_t g_bitDepth;<br>
<br>
/** clip x, such that 0 <= x <= #g_maxLumaVal */<br>
template<typename T><br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp<br>
--- a/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -525,7 +525,7 @@<br>
int x, y;<br>
TComDataCU *tmpCu = m_pic->getCU(addr);<br>
Pel* rec;<br>
- int stride;<br>
+ intptr_t stride;<br>
int lcuWidth = m_maxCUWidth;<br>
int lcuHeight = m_maxCUHeight;<br>
uint32_t lpelx = tmpCu->getCUPelX();<br>
@@ -850,7 +850,7 @@<br>
int addr;<br>
int frameWidthInCU = m_pic->getFrameWidthInCU();<br>
int frameHeightInCU = m_pic->getFrameHeightInCU();<br>
- int stride;<br>
+ intptr_t stride;<br>
Pel *tmpUSwap;<br>
int sChroma = (yCbCr == 0) ? 0 : 1;<br>
bool mergeLeftFlag;<br>
@@ -1020,7 +1020,7 @@<br>
int idxX;<br>
int addr;<br>
int frameWidthInCU = m_pic->getFrameWidthInCU();<br>
- int stride;<br>
+ intptr_t stride;<br>
Pel *tmpUSwap;<br>
int sChroma = (yCbCr == 0) ? 0 : 1;<br>
bool mergeLeftFlag;<br>
@@ -1339,7 +1339,7 @@<br>
TComPicYuv* pcPicYuvRec = cu->getPic()->getPicYuvRec();<br>
Pel* src;<br>
Pel* pcm;<br>
- uint32_t stride;<br>
+ intptr_t stride;<br>
uint32_t width;<br>
uint32_t height;<br>
uint32_t pcmLeftShiftBit;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComTrQuant.cpp<br>
--- a/source/Lib/TLibCommon/TComTrQuant.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -129,7 +129,7 @@<br>
}<br>
<br>
// To minimize the distortion only. No rate is considered.<br>
-void TComTrQuant::signBitHidingHDQ(TCoeff* qCoef, TCoeff* coef, uint32_t const *scan, int32_t* deltaU, int width, int height)<br>
+void TComTrQuant::signBitHidingHDQ(TCoeff* qCoef, TCoeff* coef, uint32_t const *scan, int32_t* deltaU, uint32_t width, uint32_t height)<br>
{<br>
int lastCG = -1;<br>
int absSum = 0;<br>
@@ -252,7 +252,7 @@<br>
} // TU loop<br>
}<br>
<br>
-uint32_t TComTrQuant::xQuant(TComDataCU* cu, int32_t* coef, TCoeff* qCoef, int width, int height,<br>
+uint32_t TComTrQuant::xQuant(TComDataCU* cu, int32_t* coef, TCoeff* qCoef, uint32_t width, uint32_t height,<br>
TextType ttype, uint32_t absPartIdx, int32_t *lastPos)<br>
{<br>
uint32_t acSum = 0;<br>
@@ -320,7 +320,7 @@<br>
int qbits = QUANT_SHIFT + cQpBase.m_per + transformShift;<br>
add = (cu->getSlice()->getSliceType() == I_SLICE ? 171 : 85) << (qbits - 9);<br>
<br>
- int numCoeff = width * height;<br>
+ uint32_t numCoeff = width * height;<br>
acSum += primitives.quant(coef, quantCoeff, deltaU, qCoef, qbits, add, numCoeff, lastPos);<br>
<br>
if (cu->getSlice()->getPPS()->getSignHideFlag() && acSum >= 2)<br>
@@ -340,7 +340,7 @@<br>
<br>
uint32_t TComTrQuant::transformNxN(TComDataCU* cu,<br>
int16_t* residual,<br>
- uint32_t stride,<br>
+ intptr_t stride,<br>
TCoeff* coeff,<br>
uint32_t width,<br>
uint32_t height,<br>
@@ -388,7 +388,7 @@<br>
return xQuant(cu, m_tmpCoeff, coeff, width, height, ttype, absPartIdx, lastPos);<br>
}<br>
<br>
-void TComTrQuant::invtransformNxN(bool transQuantBypass, uint32_t mode, int16_t* residual, uint32_t stride, TCoeff* coeff, uint32_t width, uint32_t height, int scalingListType, bool useTransformSkip, int lastPos)<br>
+void TComTrQuant::invtransformNxN(bool transQuantBypass, uint32_t mode, int16_t* residual, intptr_t stride, TCoeff* coeff, uint32_t width, uint32_t height, int scalingListType, bool useTransformSkip, int lastPos)<br>
{<br>
if (transQuantBypass)<br>
{<br>
@@ -450,7 +450,7 @@<br>
* \param stride stride of input residual data<br>
* \param size transform size (size x size)<br>
*/<br>
-void TComTrQuant::xTransformSkip(int16_t* resiBlock, uint32_t stride, int32_t* coeff, int width, int height)<br>
+void TComTrQuant::xTransformSkip(int16_t* resiBlock, intptr_t stride, int32_t* coeff, int width, int height)<br>
{<br>
assert(width == height);<br>
uint32_t log2TrSize = g_convertToBit[width] + 2;<br>
@@ -483,7 +483,7 @@<br>
* \param stride stride of input residual data<br>
* \param size transform size (size x size)<br>
*/<br>
-void TComTrQuant::xITransformSkip(int32_t* coef, int16_t* residual, uint32_t stride, int width, int height)<br>
+void TComTrQuant::xITransformSkip(int32_t* coef, int16_t* residual, intptr_t stride, int width, int height)<br>
{<br>
assert(width == height);<br>
uint32_t log2TrSize = g_convertToBit[width] + 2;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComTrQuant.h<br>
--- a/source/Lib/TLibCommon/TComTrQuant.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComTrQuant.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -127,10 +127,10 @@<br>
void init(uint32_t maxTrSize, int useRDOQ, int useRDOQTS, int useTransformSkipFast);<br>
<br>
// transform & inverse transform functions<br>
- uint32_t transformNxN(TComDataCU* cu, int16_t* residual, uint32_t stride, TCoeff* coeff, uint32_t width, uint32_t height,<br>
+ uint32_t transformNxN(TComDataCU* cu, int16_t* residual, intptr_t stride, TCoeff* coeff, uint32_t width, uint32_t height,<br>
TextType ttype, uint32_t absPartIdx, int32_t* lastPos, bool useTransformSkip = false);<br>
<br>
- void invtransformNxN(bool transQuantBypass, uint32_t mode, int16_t* residual, uint32_t stride, TCoeff* coeff, uint32_t width, uint32_t height, int scalingListType, bool useTransformSkip = false, int lastPos = MAX_INT);<br>
+ void invtransformNxN(bool transQuantBypass, uint32_t mode, int16_t* residual, intptr_t stride, TCoeff* coeff, uint32_t width, uint32_t height, int scalingListType, bool useTransformSkip = false, int lastPos = MAX_INT);<br>
<br>
// Misc functions<br>
void setQPforQuant(int qpy, TextType ttype, int qpBdOffset, int chromaQPOffset);<br>
@@ -190,11 +190,11 @@<br>
<br>
private:<br>
<br>
- void xTransformSkip(int16_t* resiBlock, uint32_t stride, int32_t* coeff, int width, int height);<br>
+ void xTransformSkip(int16_t* resiBlock, intptr_t stride, int32_t* coeff, int width, int height);<br>
<br>
- void signBitHidingHDQ(TCoeff* qcoeff, TCoeff* coeff, const uint32_t* scan, int32_t* deltaU, int width, int height);<br>
+ void signBitHidingHDQ(TCoeff* qcoeff, TCoeff* coeff, const uint32_t* scan, int32_t* deltaU, uint32_t width, uint32_t height);<br>
<br>
- uint32_t xQuant(TComDataCU* cu, int32_t* src, TCoeff* dst, int width, int height, TextType ttype, uint32_t absPartIdx, int32_t *lastPos);<br>
+ uint32_t xQuant(TComDataCU* cu, int32_t* src, TCoeff* dst, uint32_t width, uint32_t height, TextType ttype, uint32_t absPartIdx, int32_t *lastPos);<br>
<br>
// RDOQ functions<br>
uint32_t xRateDistOptQuant(TComDataCU* cu, int32_t* srcCoeff, TCoeff* dstCoeff, uint32_t width, uint32_t height, TextType ttype, uint32_t absPartIdx, int32_t *lastPos);<br>
@@ -217,7 +217,7 @@<br>
<br>
inline uint32_t xGetIEPRate() const { return 32768; } ///< Get the cost of an equal probable bit<br>
<br>
- void xITransformSkip(int32_t* coeff, int16_t* residual, uint32_t stride, int width, int height);<br>
+ void xITransformSkip(int32_t* coeff, int16_t* residual, intptr_t stride, int width, int height);<br>
};<br>
}<br>
//! \}<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComWeightPrediction.cpp<br>
--- a/source/Lib/TLibCommon/TComWeightPrediction.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComWeightPrediction.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -106,9 +106,9 @@<br>
int round = shift ? (1 << (shift - 1)) * bRound : 0;<br>
int w1 = wp1[0].w;<br>
<br>
- uint32_t src0Stride = srcYuv0->getStride();<br>
- uint32_t src1Stride = srcYuv1->getStride();<br>
- uint32_t dststride = outDstYuv->getStride();<br>
+ intptr_t src0Stride = srcYuv0->getStride();<br>
+ intptr_t src1Stride = srcYuv1->getStride();<br>
+ intptr_t dststride = outDstYuv->getStride();<br>
<br>
for (y = height - 1; y >= 0; y--)<br>
{<br>
@@ -141,9 +141,9 @@<br>
int round = shift ? (1 << (shift - 1)) : 0;<br>
int w1 = wp1[1].w;<br>
<br>
- uint32_t src0Stride = srcYuv0->getCStride();<br>
- uint32_t src1Stride = srcYuv1->getCStride();<br>
- uint32_t dststride = outDstYuv->getCStride();<br>
+ intptr_t src0Stride = srcYuv0->getCStride();<br>
+ intptr_t src1Stride = srcYuv1->getCStride();<br>
+ intptr_t dststride = outDstYuv->getCStride();<br>
<br>
width >>= 1;<br>
height >>= 1;<br>
@@ -205,7 +205,7 @@<br>
int x, y;<br>
<br>
int w0, w1, offset, shiftNum, shift, round;<br>
- uint32_t src0Stride, src1Stride, dststride;<br>
+ intptr_t src0Stride, src1Stride, dststride;<br>
<br>
int16_t* srcY0 = srcYuv0->getLumaAddr(partUnitIdx);<br>
int16_t* srcU0 = srcYuv0->getCbAddr(partUnitIdx);<br>
@@ -326,7 +326,7 @@<br>
int x, y;<br>
<br>
int w0, offset, shiftNum, shift, round;<br>
- uint32_t src0Stride, dststride;<br>
+ intptr_t src0Stride, dststride;<br>
<br>
Pel* srcY0 = srcYuv0->getLumaAddr(partUnitIdx);<br>
Pel* srcU0 = srcYuv0->getCbAddr(partUnitIdx);<br>
@@ -441,7 +441,7 @@<br>
Pel* dstV = outDstYuv->getCrAddr(partUnitIdx);<br>
<br>
int w0, offset, shiftNum, shift, round;<br>
- uint32_t srcStride, dstStride;<br>
+ intptr_t srcStride, dstStride;<br>
<br>
if (bLuma)<br>
{<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TComYuv.cpp<br>
--- a/source/Lib/TLibCommon/TComYuv.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TComYuv.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -110,8 +110,8 @@<br>
Pel* src = getLumaAddr(partIdx, width);<br>
Pel* dst = destPicYuv->getLumaAddr(cuAddr, absZOrderIdx);<br>
<br>
- uint32_t srcstride = getStride();<br>
- uint32_t dststride = destPicYuv->getStride();<br>
+ intptr_t srcstride = getStride();<br>
+ intptr_t dststride = destPicYuv->getStride();<br>
<br>
primitives.blockcpy_pp(width, height, dst, dststride, src, srcstride);<br>
}<br>
@@ -128,8 +128,8 @@<br>
Pel* dstU = destPicYuv->getCbAddr(cuAddr, absZOrderIdx);<br>
Pel* dstV = destPicYuv->getCrAddr(cuAddr, absZOrderIdx);<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = destPicYuv->getCStride();<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = destPicYuv->getCStride();<br>
<br>
primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);<br>
primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);<br>
@@ -146,8 +146,8 @@<br>
Pel* dst = m_bufY;<br>
Pel* src = srcPicYuv->getLumaAddr(cuAddr, absZOrderIdx);<br>
<br>
- uint32_t dststride = getStride();<br>
- uint32_t srcstride = srcPicYuv->getStride();<br>
+ intptr_t dststride = getStride();<br>
+ intptr_t srcstride = srcPicYuv->getStride();<br>
<br>
primitives.blockcpy_pp(m_width, m_height, dst, dststride, src, srcstride);<br>
}<br>
@@ -159,8 +159,8 @@<br>
Pel* srcU = srcPicYuv->getCbAddr(cuAddr, absZOrderIdx);<br>
Pel* srcV = srcPicYuv->getCrAddr(cuAddr, absZOrderIdx);<br>
<br>
- uint32_t dststride = getCStride();<br>
- uint32_t srcstride = srcPicYuv->getCStride();<br>
+ intptr_t dststride = getCStride();<br>
+ intptr_t srcstride = srcPicYuv->getCStride();<br>
<br>
primitives.blockcpy_pp(m_cwidth, m_cheight, dstU, dststride, srcU, srcstride);<br>
primitives.blockcpy_pp(m_cwidth, m_cheight, dstV, dststride, srcV, srcstride);<br>
@@ -177,8 +177,8 @@<br>
Pel* src = m_bufY;<br>
Pel* dst = dstPicYuv->getLumaAddr(uiDstPartIdx);<br>
<br>
- uint32_t srcstride = getStride();<br>
- uint32_t dststride = dstPicYuv->getStride();<br>
+ intptr_t srcstride = getStride();<br>
+ intptr_t dststride = dstPicYuv->getStride();<br>
<br>
primitives.blockcpy_pp(m_width, m_height, dst, dststride, src, srcstride);<br>
}<br>
@@ -190,8 +190,8 @@<br>
Pel* dstU = dstPicYuv->getCbAddr(uiDstPartIdx);<br>
Pel* dstV = dstPicYuv->getCrAddr(uiDstPartIdx);<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->getCStride();<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->getCStride();<br>
<br>
primitives.blockcpy_pp(m_cwidth, m_cheight, dstU, dststride, srcU, srcstride);<br>
primitives.blockcpy_pp(m_cwidth, m_cheight, dstV, dststride, srcV, srcstride);<br>
@@ -208,8 +208,8 @@<br>
Pel* src = getLumaAddr(partIdx);<br>
Pel* dst = dstPicYuv->getLumaAddr(0);<br>
<br>
- uint32_t srcstride = getStride();<br>
- uint32_t dststride = dstPicYuv->getStride();<br>
+ intptr_t srcstride = getStride();<br>
+ intptr_t dststride = dstPicYuv->getStride();<br>
<br>
uint32_t height = dstPicYuv->getHeight();<br>
uint32_t width = dstPicYuv->getWidth();<br>
@@ -224,8 +224,8 @@<br>
Pel* dstU = dstPicYuv->getCbAddr(0);<br>
Pel* dstV = dstPicYuv->getCrAddr(0);<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->getCStride();<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->getCStride();<br>
<br>
uint32_t uiCHeight = dstPicYuv->getCHeight();<br>
uint32_t uiCWidth = dstPicYuv->getCWidth();<br>
@@ -257,8 +257,8 @@<br>
<br>
if (src == dst) return;<br>
<br>
- uint32_t srcstride = getStride();<br>
- uint32_t dststride = dstPicYuv->getStride();<br>
+ intptr_t srcstride = getStride();<br>
+ intptr_t dststride = dstPicYuv->getStride();<br>
<br>
primitives.blockcpy_pp(width, height, dst, dststride, src, srcstride);<br>
}<br>
@@ -268,8 +268,8 @@<br>
Pel* src = getLumaAddr(partIdx);<br>
int16_t* dst = dstPicYuv->getLumaAddr(partIdx);<br>
<br>
- uint32_t srcstride = getStride();<br>
- uint32_t dststride = dstPicYuv->m_width;<br>
+ intptr_t srcstride = getStride();<br>
+ intptr_t dststride = dstPicYuv->m_width;<br>
<br>
primitives.blockcpy_sp(width, height, dst, dststride, src, srcstride);<br>
}<br>
@@ -283,8 +283,8 @@<br>
<br>
if (srcU == dstU && srcV == dstV) return;<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->getCStride();<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->getCStride();<br>
<br>
primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);<br>
primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);<br>
@@ -297,8 +297,8 @@<br>
int16_t* dstU = dstPicYuv->getCbAddr(partIdx);<br>
int16_t* dstV = dstPicYuv->getCrAddr(partIdx);<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->m_cwidth;<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->m_cwidth;<br>
<br>
primitives.blockcpy_sp(width, height, dstU, dststride, srcU, srcstride);<br>
primitives.blockcpy_sp(width, height, dstV, dststride, srcV, srcstride);<br>
@@ -311,8 +311,8 @@<br>
Pel* srcU = getCbAddr(partIdx);<br>
Pel* dstU = dstPicYuv->getCbAddr(partIdx);<br>
if (srcU == dstU) return;<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->getCStride();<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->getCStride();<br>
primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);<br>
}<br>
else if (chromaId == 1)<br>
@@ -320,8 +320,8 @@<br>
Pel* srcV = getCrAddr(partIdx);<br>
Pel* dstV = dstPicYuv->getCrAddr(partIdx);<br>
if (srcV == dstV) return;<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->getCStride();<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->getCStride();<br>
primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);<br>
}<br>
else<br>
@@ -331,8 +331,8 @@<br>
Pel* dstU = dstPicYuv->getCbAddr(partIdx);<br>
Pel* dstV = dstPicYuv->getCrAddr(partIdx);<br>
if (srcU == dstU && srcV == dstV) return;<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->getCStride();<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->getCStride();<br>
primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);<br>
primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);<br>
}<br>
@@ -345,8 +345,8 @@<br>
Pel* srcU = getCbAddr(partIdx);<br>
int16_t* dstU = dstPicYuv->getCbAddr(partIdx);<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->m_cwidth;<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->m_cwidth;<br>
<br>
primitives.blockcpy_sp(width, height, dstU, dststride, srcU, srcstride);<br>
}<br>
@@ -355,8 +355,8 @@<br>
Pel* srcV = getCrAddr(partIdx);<br>
int16_t* dstV = dstPicYuv->getCrAddr(partIdx);<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->m_cwidth;<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->m_cwidth;<br>
<br>
primitives.blockcpy_sp(width, height, dstV, dststride, srcV, srcstride);<br>
}<br>
@@ -367,8 +367,8 @@<br>
int16_t* dstU = dstPicYuv->getCbAddr(partIdx);<br>
int16_t* dstV = dstPicYuv->getCrAddr(partIdx);<br>
<br>
- uint32_t srcstride = getCStride();<br>
- uint32_t dststride = dstPicYuv->m_cwidth;<br>
+ intptr_t srcstride = getCStride();<br>
+ intptr_t dststride = dstPicYuv->m_cwidth;<br>
<br>
primitives.blockcpy_sp(width, height, dstU, dststride, srcU, srcstride);<br>
primitives.blockcpy_sp(width, height, dstV, dststride, srcV, srcstride);<br>
@@ -393,9 +393,9 @@<br>
Pel* src1 = srcYuv1->getLumaAddr(trUnitIdx, partSize);<br>
Pel* dst = getLumaAddr(trUnitIdx, partSize);<br>
<br>
- uint32_t src0Stride = srcYuv0->getStride();<br>
- uint32_t src1Stride = srcYuv1->getStride();<br>
- uint32_t dststride = getStride();<br>
+ intptr_t src0Stride = srcYuv0->getStride();<br>
+ intptr_t src1Stride = srcYuv1->getStride();<br>
+ intptr_t dststride = getStride();<br>
<br>
primitives.pixeladd_pp(partSize, partSize, dst, dststride, src0, src1, src0Stride, src1Stride);<br>
}<br>
@@ -408,9 +408,9 @@<br>
int16_t* src1 = srcYuv1->getLumaAddr(trUnitIdx, partSize);<br>
Pel* dst = getLumaAddr(trUnitIdx, partSize);<br>
<br>
- uint32_t src0Stride = srcYuv0->getStride();<br>
- uint32_t src1Stride = srcYuv1->m_width;<br>
- uint32_t dststride = getStride();<br>
+ intptr_t src0Stride = srcYuv0->getStride();<br>
+ intptr_t src1Stride = srcYuv1->m_width;<br>
+ intptr_t dststride = getStride();<br>
<br>
for (y = partSize - 1; y >= 0; y--)<br>
{<br>
@@ -434,9 +434,9 @@<br>
Pel* dstU = getCbAddr(trUnitIdx, partSize);<br>
Pel* dstV = getCrAddr(trUnitIdx, partSize);<br>
<br>
- uint32_t src0Stride = srcYuv0->getCStride();<br>
- uint32_t src1Stride = srcYuv1->getCStride();<br>
- uint32_t dststride = getCStride();<br>
+ intptr_t src0Stride = srcYuv0->getCStride();<br>
+ intptr_t src1Stride = srcYuv1->getCStride();<br>
+ intptr_t dststride = getCStride();<br>
<br>
primitives.pixeladd_pp(partSize, partSize, dstU, dststride, srcU0, srcU1, src0Stride, src1Stride);<br>
primitives.pixeladd_pp(partSize, partSize, dstV, dststride, srcV0, srcV1, src0Stride, src1Stride);<br>
@@ -453,9 +453,9 @@<br>
Pel* dstU = getCbAddr(trUnitIdx, partSize);<br>
Pel* dstV = getCrAddr(trUnitIdx, partSize);<br>
<br>
- uint32_t src0Stride = srcYuv0->getCStride();<br>
- uint32_t src1Stride = srcYuv1->m_cwidth;<br>
- uint32_t dststride = getCStride();<br>
+ intptr_t src0Stride = srcYuv0->getCStride();<br>
+ intptr_t src1Stride = srcYuv1->m_cwidth;<br>
+ intptr_t dststride = getCStride();<br>
<br>
for (y = partSize - 1; y >= 0; y--)<br>
{<br>
@@ -488,9 +488,9 @@<br>
Pel* src1 = srcYuv1->getLumaAddr(trUnitIdx, partSize);<br>
Pel* dst = getLumaAddr(trUnitIdx, partSize);<br>
<br>
- int src0Stride = srcYuv0->getStride();<br>
- int src1Stride = srcYuv1->getStride();<br>
- int dststride = getStride();<br>
+ intptr_t src0Stride = srcYuv0->getStride();<br>
+ intptr_t src1Stride = srcYuv1->getStride();<br>
+ intptr_t dststride = getStride();<br>
<br>
for (y = partSize - 1; y >= 0; y--)<br>
{<br>
@@ -516,9 +516,9 @@<br>
Pel* dstU = getCbAddr(trUnitIdx, partSize);<br>
Pel* dstV = getCrAddr(trUnitIdx, partSize);<br>
<br>
- int src0Stride = srcYuv0->getCStride();<br>
- int src1Stride = srcYuv1->getCStride();<br>
- int dststride = getCStride();<br>
+ intptr_t src0Stride = srcYuv0->getCStride();<br>
+ intptr_t src1Stride = srcYuv1->getCStride();<br>
+ intptr_t dststride = getCStride();<br>
<br>
for (y = partSize - 1; y >= 0; y--)<br>
{<br>
@@ -540,7 +540,7 @@<br>
void TComYuv::addAvg(TComYuv* srcYuv0, TComYuv* srcYuv1, uint32_t partUnitIdx, uint32_t width, uint32_t height, bool bLuma, bool bChroma)<br>
{<br>
int x, y;<br>
- uint32_t src0Stride, src1Stride, dststride;<br>
+ intptr_t src0Stride, src1Stride, dststride;<br>
int shiftNum, offset;<br>
<br>
Pel* srcY0 = srcYuv0->getLumaAddr(partUnitIdx);<br>
@@ -616,7 +616,7 @@<br>
void TComYuv::addAvg(TShortYUV* srcYuv0, TShortYUV* srcYuv1, uint32_t partUnitIdx, uint32_t width, uint32_t height, bool bLuma, bool bChroma)<br>
{<br>
int x, y;<br>
- uint32_t src0Stride, src1Stride, dststride;<br>
+ intptr_t src0Stride, src1Stride, dststride;<br>
int shiftNum, offset;<br>
<br>
int16_t* srcY0 = srcYuv0->getLumaAddr(partUnitIdx);<br>
@@ -704,8 +704,8 @@<br>
Pel* dstU = getCbAddr(partIdx);<br>
Pel* dstV = getCrAddr(partIdx);<br>
<br>
- int srcstride = srcYuv->getStride();<br>
- int dststride = getStride();<br>
+ intptr_t srcstride = srcYuv->getStride();<br>
+ intptr_t dststride = getStride();<br>
<br>
for (y = height - 1; y >= 0; y--)<br>
{<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibCommon/TypeDef.h<br>
--- a/source/Lib/TLibCommon/TypeDef.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibCommon/TypeDef.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -73,7 +73,7 @@<br>
#if HIGH_BIT_DEPTH<br>
typedef UShort Pel; // 16-bit pixel type<br>
#define X265_DEPTH x265::g_bitDepth // runtime configurable bit depth<br>
-extern int g_bitDepth;<br>
+extern uint32_t g_bitDepth;<br>
#else<br>
typedef UChar Pel; // 8-bit pixel type<br>
#define X265_DEPTH 8 // compile time configurable bit depth<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibEncoder/TEncCu.cpp<br>
--- a/source/Lib/TLibEncoder/TEncCu.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/TEncCu.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -1758,7 +1758,7 @@<br>
<br>
Pel* srcY = fencYuv->getLumaAddr(0, width);<br>
Pel* dstY = cu->getPCMSampleY();<br>
- uint32_t srcStride = fencYuv->getStride();<br>
+ intptr_t srcStride = fencYuv->getStride();<br>
<br>
for (int y = 0; y < height; y++)<br>
{<br>
@@ -1777,7 +1777,7 @@<br>
Pel* dstCb = cu->getPCMSampleCb();<br>
Pel* dstCr = cu->getPCMSampleCr();<br>
<br>
- uint32_t srcStrideC = fencYuv->getCStride();<br>
+ intptr_t srcStrideC = fencYuv->getCStride();<br>
uint32_t heightC = height >> 1;<br>
uint32_t widthC = width >> 1;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp<br>
--- a/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -553,7 +553,7 @@<br>
* \param height block height<br>
* \param bBorderAvail availabilities of block border pixels<br>
*/<br>
-void TEncSampleAdaptiveOffset::calcSaoStatsBlock(Pel* recStart, Pel* orgStart, int stride, Int64** stats, Int64** counts, uint32_t width, uint32_t height, bool* bBorderAvail, int yCbCr)<br>
+void TEncSampleAdaptiveOffset::calcSaoStatsBlock(Pel* recStart, Pel* orgStart, intptr_t stride, Int64** stats, Int64** counts, uint32_t width, uint32_t height, bool* bBorderAvail, int yCbCr)<br>
{<br>
Int64 *stat, *count;<br>
int classIdx, posShift, startX, endX, startY, endY, signLeft, signRight, signDown, signDown1;<br>
@@ -812,7 +812,7 @@<br>
<br>
Pel* fenc;<br>
Pel* pRec;<br>
- int stride;<br>
+ intptr_t stride;<br>
int iLcuHeight = pTmpSPS->getMaxCUHeight();<br>
int iLcuWidth = pTmpSPS->getMaxCUWidth();<br>
uint32_t lpelx = pTmpCu->getCUPelX();<br>
@@ -1084,7 +1084,7 @@<br>
<br>
Pel* fenc;<br>
Pel* pRec;<br>
- int stride;<br>
+ intptr_t stride;<br>
int lcuHeight = pTmpSPS->getMaxCUHeight();<br>
int lcuWidth = pTmpSPS->getMaxCUWidth();<br>
uint32_t rPelX;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h<br>
--- a/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -101,7 +101,7 @@<br>
void disablePartTree(SAOQTPart *psQTPart, int partIdx);<br>
void getSaoStats(SAOQTPart *psQTPart, int yCbCr);<br>
void calcSaoStatsCu(int addr, int partIdx, int yCbCr);<br>
- void calcSaoStatsBlock(Pel* recStart, Pel* orgStart, int stride, Int64** stats, Int64** counts, uint32_t width, uint32_t height, bool* bBorderAvail, int yCbCr);<br>
+ void calcSaoStatsBlock(Pel* recStart, Pel* orgStart, intptr_t stride, Int64** stats, Int64** counts, uint32_t width, uint32_t height, bool* bBorderAvail, int yCbCr);<br>
void calcSaoStatsRowCus_BeforeDblk(TComPic* pic, int idxY);<br>
void destroyEncBuffer();<br>
void createEncBuffer();<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibEncoder/TEncSearch.cpp<br>
--- a/source/Lib/TLibEncoder/TEncSearch.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -417,7 +417,7 @@<br>
uint32_t fullDepth = cu->getDepth(0) + trDepth;<br>
uint32_t width = cu->getWidth(0) >> trDepth;<br>
uint32_t height = cu->getHeight(0) >> trDepth;<br>
- uint32_t stride = fencYuv->getStride();<br>
+ intptr_t stride = fencYuv->getStride();<br>
Pel* fenc = fencYuv->getLumaAddr(absPartIdx);<br>
Pel* pred = predYuv->getLumaAddr(absPartIdx);<br>
int16_t* residual = resiYuv->getLumaAddr(absPartIdx);<br>
@@ -429,11 +429,11 @@<br>
TCoeff* coeff = m_qtTempCoeffY[qtLayer] + numCoeffPerInc * absPartIdx;<br>
<br>
int16_t* reconQt = m_qtTempTComYuv[qtLayer].getLumaAddr(absPartIdx);<br>
- uint32_t reconQtStride = m_qtTempTComYuv[qtLayer].m_width;<br>
+ intptr_t reconQtStride = m_qtTempTComYuv[qtLayer].m_width;<br>
<br>
uint32_t zorder = cu->getZorderIdxInCU() + absPartIdx;<br>
Pel* reconIPred = cu->getPic()->getPicYuvRec()->getLumaAddr(cu->getAddr(), zorder);<br>
- uint32_t reconIPredStride = cu->getPic()->getPicYuvRec()->getStride();<br>
+ intptr_t reconIPredStride = cu->getPic()->getPicYuvRec()->getStride();<br>
bool useTransformSkip = cu->getTransformSkip(absPartIdx, TEXT_LUMA);<br>
<br>
//===== init availability pattern =====<br>
@@ -532,7 +532,7 @@<br>
uint32_t chromaPredMode = cu->getChromaIntraDir(absPartIdx);<br>
uint32_t width = cu->getWidth(0) >> (trDepth + 1);<br>
uint32_t height = cu->getHeight(0) >> (trDepth + 1);<br>
- uint32_t stride = fencYuv->getCStride();<br>
+ intptr_t stride = fencYuv->getCStride();<br>
Pel* fenc = (chromaId > 0 ? fencYuv->getCrAddr(absPartIdx) : fencYuv->getCbAddr(absPartIdx));<br>
Pel* pred = (chromaId > 0 ? predYuv->getCrAddr(absPartIdx) : predYuv->getCbAddr(absPartIdx));<br>
int16_t* residual = (chromaId > 0 ? resiYuv->getCrAddr(absPartIdx) : resiYuv->getCbAddr(absPartIdx));<br>
@@ -542,11 +542,11 @@<br>
uint32_t numCoeffPerInc = (cu->getSlice()->getSPS()->getMaxCUWidth() * cu->getSlice()->getSPS()->getMaxCUHeight() >> (cu->getSlice()->getSPS()->getMaxCUDepth() << 1)) >> 2;<br>
TCoeff* coeff = (chromaId > 0 ? m_qtTempCoeffCr[qtlayer] : m_qtTempCoeffCb[qtlayer]) + numCoeffPerInc * absPartIdx;<br>
int16_t* reconQt = (chromaId > 0 ? m_qtTempTComYuv[qtlayer].getCrAddr(absPartIdx) : m_qtTempTComYuv[qtlayer].getCbAddr(absPartIdx));<br>
- uint32_t reconQtStride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
+ intptr_t reconQtStride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
<br>
uint32_t zorder = cu->getZorderIdxInCU() + absPartIdx;<br>
Pel* reconIPred = (chromaId > 0 ? cu->getPic()->getPicYuvRec()->getCrAddr(cu->getAddr(), zorder) : cu->getPic()->getPicYuvRec()->getCbAddr(cu->getAddr(), zorder));<br>
- uint32_t reconIPredStride = cu->getPic()->getPicYuvRec()->getCStride();<br>
+ intptr_t reconIPredStride = cu->getPic()->getPicYuvRec()->getCStride();<br>
bool useTransformSkipChroma = cu->getTransformSkip(absPartIdx, ttype);<br>
<br>
//===== update chroma mode =====<br>
@@ -948,9 +948,9 @@<br>
uint32_t qtLayer = cu->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() - trSizeLog2;<br>
uint32_t zorder = cu->getZorderIdxInCU() + absPartIdx;<br>
int16_t* src = m_qtTempTComYuv[qtLayer].getLumaAddr(absPartIdx);<br>
- uint32_t srcstride = m_qtTempTComYuv[qtLayer].m_width;<br>
+ intptr_t srcstride = m_qtTempTComYuv[qtLayer].m_width;<br>
Pel* dst = cu->getPic()->getPicYuvRec()->getLumaAddr(cu->getAddr(), zorder);<br>
- uint32_t dststride = cu->getPic()->getPicYuvRec()->getStride();<br>
+ intptr_t dststride = cu->getPic()->getPicYuvRec()->getStride();<br>
primitives.blockcpy_ps(width, height, dst, dststride, src, srcstride);<br>
<br>
if (!bLumaOnly)<br>
@@ -1126,9 +1126,9 @@<br>
<br>
uint32_t zOrder = cu->getZorderIdxInCU() + absPartIdx;<br>
Pel* reconIPred = cu->getPic()->getPicYuvRec()->getLumaAddr(cu->getAddr(), zOrder);<br>
- uint32_t reconIPredStride = cu->getPic()->getPicYuvRec()->getStride();<br>
+ intptr_t reconIPredStride = cu->getPic()->getPicYuvRec()->getStride();<br>
int16_t* reconQt = m_qtTempTComYuv[qtlayer].getLumaAddr(absPartIdx);<br>
- uint32_t reconQtStride = m_qtTempTComYuv[qtlayer].m_width;<br>
+ intptr_t reconQtStride = m_qtTempTComYuv[qtlayer].m_width;<br>
uint32_t width = cu->getWidth(0) >> trDepth;<br>
uint32_t height = cu->getHeight(0) >> trDepth;<br>
primitives.blockcpy_ps(width, height, reconIPred, reconIPredStride, reconQt, reconQtStride);<br>
@@ -1249,8 +1249,8 @@<br>
uint32_t zorder = cu->getZorderIdxInCU() + absPartIdx;<br>
uint32_t width = cu->getWidth(0) >> (trDepth + 1);<br>
uint32_t height = cu->getHeight(0) >> (trDepth + 1);<br>
- uint32_t reconQtStride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
- uint32_t reconIPredStride = cu->getPic()->getPicYuvRec()->getCStride();<br>
+ intptr_t reconQtStride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
+ intptr_t reconIPredStride = cu->getPic()->getPicYuvRec()->getCStride();<br>
<br>
if (stateU0V1Both2 == 0 || stateU0V1Both2 == 2)<br>
{<br>
@@ -1473,7 +1473,7 @@<br>
{<br>
uint32_t width = cu->getWidth(0) >> 1;<br>
uint32_t height = cu->getHeight(0) >> 1;<br>
- uint32_t stride = fencYuv->getCStride();<br>
+ intptr_t stride = fencYuv->getCStride();<br>
Pel* fencU = fencYuv->getCbAddr(0);<br>
Pel* fencV = fencYuv->getCrAddr(0);<br>
Pel* predU = predYuv->getCbAddr(0);<br>
@@ -1552,7 +1552,7 @@<br>
int numModesAvailable = 35; //total number of Intra modes<br>
Pel* fenc = fencYuv->getLumaAddr(pu, width);<br>
Pel* pred = predYuv->getLumaAddr(pu, width);<br>
- uint32_t stride = predYuv->getStride();<br>
+ intptr_t stride = predYuv->getStride();<br>
uint32_t rdModeList[FAST_UDI_MAX_RDMODE_NUM];<br>
int numModesForFullRD = g_intraModeNumFast[widthBit];<br>
int log2SizeMinus2 = g_convertToBit[width];<br>
@@ -1817,9 +1817,9 @@<br>
uint32_t compHeight = cu->getHeight(0) >> initTrDepth;<br>
uint32_t zorder = cu->getZorderIdxInCU() + partOffset;<br>
Pel* dst = cu->getPic()->getPicYuvRec()->getLumaAddr(cu->getAddr(), zorder);<br>
- uint32_t dststride = cu->getPic()->getPicYuvRec()->getStride();<br>
+ intptr_t dststride = cu->getPic()->getPicYuvRec()->getStride();<br>
Pel* src = reconYuv->getLumaAddr(partOffset);<br>
- uint32_t srcstride = reconYuv->getStride();<br>
+ intptr_t srcstride = reconYuv->getStride();<br>
primitives.blockcpy_pp(compWidth, compHeight, dst, dststride, src, srcstride);<br>
<br>
if (!bLumaOnly && !bSkipChroma)<br>
@@ -1954,10 +1954,10 @@<br>
* \param ttText texture component type<br>
* \returns void<br>
*/<br>
-void TEncSearch::xEncPCM(TComDataCU* cu, uint32_t absPartIdx, Pel* fenc, Pel* pcm, Pel* pred, int16_t* resi, Pel* recon, uint32_t stride, uint32_t width, uint32_t height, TextType eText)<br>
+void TEncSearch::xEncPCM(TComDataCU* cu, uint32_t absPartIdx, Pel* fenc, Pel* pcm, Pel* pred, int16_t* resi, Pel* recon, intptr_t stride, uint32_t width, uint32_t height, TextType eText)<br>
{<br>
uint32_t x, y;<br>
- uint32_t reconStride;<br>
+ intptr_t reconStride;<br>
Pel* pcmTmp = pcm;<br>
Pel* reconPic;<br>
int shiftPcm;<br>
@@ -2036,8 +2036,8 @@<br>
uint32_t depth = cu->getDepth(0);<br>
uint32_t width = cu->getWidth(0);<br>
uint32_t height = cu->getHeight(0);<br>
- uint32_t stride = predYuv->getStride();<br>
- uint32_t strideC = predYuv->getCStride();<br>
+ intptr_t stride = predYuv->getStride();<br>
+ intptr_t strideC = predYuv->getCStride();<br>
uint32_t widthC = width >> 1;<br>
uint32_t heightC = height >> 1;<br>
uint32_t distortion = 0;<br>
@@ -2350,7 +2350,7 @@<br>
satdCost = primitives.satd[partEnum](pu, fenc->getStride(), avg, roiWidth);<br>
x265_emms();<br>
<br>
- unsigned int bitsZero0, bitsZero1;<br>
+ uint32_t bitsZero0, bitsZero1;<br>
m_me.setMVP(mvPredBi[0][refIdxBidir[0]]);<br>
bitsZero0 = bits[0] - m_me.bitcost(mv[0]) + m_me.bitcost(mvzero);<br>
<br>
@@ -3122,7 +3122,7 @@<br>
if (!absSumY)<br>
{<br>
int16_t *ptr = m_qtTempTComYuv[qtlayer].getLumaAddr(absTUPartIdx);<br>
- const uint32_t stride = m_qtTempTComYuv[qtlayer].m_width;<br>
+ const intptr_t stride = m_qtTempTComYuv[qtlayer].m_width;<br>
<br>
assert(trWidth == trHeight);<br>
primitives.blockfill_s[(int)g_convertToBit[trWidth]](ptr, stride, 0);<br>
@@ -3196,7 +3196,7 @@<br>
if (!absSumU)<br>
{<br>
int16_t *ptr = m_qtTempTComYuv[qtlayer].getCbAddr(absTUPartIdxC);<br>
- const uint32_t stride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
+ const intptr_t stride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
<br>
assert(trWidthC == trHeightC);<br>
primitives.blockfill_s[(int)g_convertToBit[trWidthC]](ptr, stride, 0);<br>
@@ -3262,7 +3262,7 @@<br>
if (!absSumV)<br>
{<br>
int16_t *ptr = m_qtTempTComYuv[qtlayer].getCrAddr(absTUPartIdxC);<br>
- const uint32_t stride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
+ const intptr_t stride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
<br>
assert(trWidthC == trHeightC);<br>
primitives.blockfill_s[(int)g_convertToBit[trWidthC]](ptr, stride, 0);<br>
@@ -3282,7 +3282,7 @@<br>
UInt64 singleCostY = MAX_INT64;<br>
<br>
int16_t *curResiY = m_qtTempTComYuv[qtlayer].getLumaAddr(absTUPartIdx);<br>
- uint32_t resiStride = m_qtTempTComYuv[qtlayer].m_width;<br>
+ intptr_t resiStride = m_qtTempTComYuv[qtlayer].m_width;<br>
<br>
TCoeff bestCoeffY[32 * 32];<br>
memcpy(bestCoeffY, coeffCurY, sizeof(TCoeff) * numSamplesLuma);<br>
@@ -3358,7 +3358,7 @@<br>
<br>
int16_t *curResiU = m_qtTempTComYuv[qtlayer].getCbAddr(absTUPartIdxC);<br>
int16_t *curResiV = m_qtTempTComYuv[qtlayer].getCrAddr(absTUPartIdxC);<br>
- uint32_t stride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
+ intptr_t stride = m_qtTempTComYuv[qtlayer].m_cwidth;<br>
<br>
TCoeff bestCoeffU[32 * 32], bestCoeffV[32 * 32];<br>
memcpy(bestCoeffU, coeffCurU, sizeof(TCoeff) * numSamplesChroma);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibEncoder/TEncSearch.h<br>
--- a/source/Lib/TLibEncoder/TEncSearch.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/TEncSearch.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -152,7 +152,7 @@<br>
/// set ME search range<br>
void setAdaptiveSearchRange(int dir, int refIdx, int merange) { m_adaptiveRange[dir][refIdx] = merange; }<br>
<br>
- void xEncPCM(TComDataCU* cu, uint32_t absPartIdx, Pel* fenc, Pel* pcm, Pel* pred, int16_t* residual, Pel* recon, uint32_t stride,<br>
+ void xEncPCM(TComDataCU* cu, uint32_t absPartIdx, Pel* fenc, Pel* pcm, Pel* pred, int16_t* residual, Pel* recon, intptr_t stride,<br>
uint32_t width, uint32_t height, TextType ttype);<br>
<br>
void IPCMSearch(TComDataCU* cu, TComYuv* fencYuv, TComYuv* predYuv, TShortYUV* resiYuv, TComYuv* reconYuv);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibEncoder/WeightPredAnalysis.cpp<br>
--- a/source/Lib/TLibEncoder/WeightPredAnalysis.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/WeightPredAnalysis.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -289,8 +289,8 @@<br>
{<br>
Pel* fenc = pic->getLumaAddr();<br>
Pel* fref = slice->getRefPic(list, refIdxTmp)->getPicYuvOrg()->getLumaAddr();<br>
- int orgStride = pic->getStride();<br>
- int refStride = slice->getRefPic(list, refIdxTmp)->getPicYuvOrg()->getStride();<br>
+ intptr_t orgStride = pic->getStride();<br>
+ intptr_t refStride = slice->getRefPic(list, refIdxTmp)->getPicYuvOrg()->getStride();<br>
<br>
// calculate SAD costs with/without wp for luma<br>
SADWP = this->xCalcSADvalueWP(X265_DEPTH, fenc, fref, width, height, orgStride, refStride, denom, weightPredTable[list][refIdxTmp][0].inputWeight, weightPredTable[list][refIdxTmp][0].inputOffset);<br>
@@ -338,7 +338,7 @@<br>
Int64 WeightPredAnalysis::xCalcDCValueSlice(TComSlice *slice, Pel *pels, int32_t *sample)<br>
{<br>
TComPicYuv* pic = slice->getPic()->getPicYuvOrg();<br>
- int stride = pic->getStride();<br>
+ intptr_t stride = pic->getStride();<br>
<br>
*sample = 0;<br>
int width = pic->getWidth();<br>
@@ -358,7 +358,7 @@<br>
Int64 WeightPredAnalysis::xCalcACValueSlice(TComSlice *slice, Pel *pels, Int64 dc)<br>
{<br>
TComPicYuv* pic = slice->getPic()->getPicYuvOrg();<br>
- int stride = pic->getStride();<br>
+ intptr_t stride = pic->getStride();<br>
<br>
int width = pic->getWidth();<br>
int height = pic->getHeight();<br>
@@ -376,7 +376,7 @@<br>
Int64 WeightPredAnalysis::xCalcDCValueUVSlice(TComSlice *slice, Pel *pels, int32_t *sample)<br>
{<br>
TComPicYuv* pic = slice->getPic()->getPicYuvOrg();<br>
- int cstride = pic->getCStride();<br>
+ intptr_t cstride = pic->getCStride();<br>
<br>
*sample = 0;<br>
int width = pic->getWidth() >> 1;<br>
@@ -396,7 +396,7 @@<br>
Int64 WeightPredAnalysis::xCalcACValueUVSlice(TComSlice *slice, Pel *pels, Int64 dc)<br>
{<br>
TComPicYuv* pic = slice->getPic()->getPicYuvOrg();<br>
- int cstride = pic->getCStride();<br>
+ intptr_t cstride = pic->getCStride();<br>
<br>
int width = pic->getWidth() >> 1;<br>
int height = pic->getHeight() >> 1;<br>
@@ -412,7 +412,7 @@<br>
* \param int stride<br>
* \returns Int64<br>
*/<br>
-Int64 WeightPredAnalysis::xCalcDCValue(Pel *pels, int width, int height, int stride)<br>
+Int64 WeightPredAnalysis::xCalcDCValue(Pel *pels, int width, int height, intptr_t stride)<br>
{<br>
int x, y;<br>
Int64 dc = 0;<br>
@@ -434,11 +434,11 @@<br>
* \param Pel *pels<br>
* \param int width<br>
* \param int height<br>
- * \param int stride<br>
+ * \param intptr_t stride<br>
* \param int dc<br>
* \returns Int64<br>
*/<br>
-Int64 WeightPredAnalysis::xCalcACValue(Pel *pels, int width, int height, int stride, Int64 dc)<br>
+Int64 WeightPredAnalysis::xCalcACValue(Pel *pels, int width, int height, intptr_t stride, Int64 dc)<br>
{<br>
int x, y;<br>
Int64 ac = 0;<br>
@@ -461,14 +461,14 @@<br>
* \param Pel *refPel<br>
* \param int width<br>
* \param int height<br>
- * \param int orgStride<br>
- * \param int refStride<br>
+ * \param intptr_t orgStride<br>
+ * \param intptr_t refStride<br>
* \param int denom<br>
* \param int inputWeight<br>
* \param int inputOffset<br>
* \returns Int64<br>
*/<br>
-Int64 WeightPredAnalysis::xCalcSADvalueWP(int bitDepth, Pel *orgPel, Pel *refPel, int width, int height, int orgStride, int refStride, int denom, int inputWeight, int inputOffset)<br>
+Int64 WeightPredAnalysis::xCalcSADvalueWP(int bitDepth, Pel *orgPel, Pel *refPel, int width, int height, intptr_t orgStride, intptr_t refStride, int denom, int inputWeight, int inputOffset)<br>
{<br>
int x, y;<br>
Int64 sad = 0;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/Lib/TLibEncoder/WeightPredAnalysis.h<br>
--- a/source/Lib/TLibEncoder/WeightPredAnalysis.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/Lib/TLibEncoder/WeightPredAnalysis.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -55,9 +55,9 @@<br>
Int64 xCalcACValueUVSlice(TComSlice *slice, Pel *pels, Int64 dc);<br>
Int64 xCalcSADvalueWPSlice(TComSlice *slice, Pel *orgPel, Pel *refPel, int denom, int inputWeight, int inputOffset);<br>
<br>
- Int64 xCalcDCValue(Pel *pels, int width, int height, int stride);<br>
- Int64 xCalcACValue(Pel *pels, int width, int height, int stride, Int64 iDC);<br>
- Int64 xCalcSADvalueWP(int bitDepth, Pel *orgPel, Pel *refPel, int width, int height, int orgStride, int refStride, int denom, int inputWeight, int inputOffset);<br>
+ Int64 xCalcDCValue(Pel *pels, int width, int height, intptr_t stride);<br>
+ Int64 xCalcACValue(Pel *pels, int width, int height, intptr_t stride, Int64 iDC);<br>
+ Int64 xCalcSADvalueWP(int bitDepth, Pel *orgPel, Pel *refPel, int width, int height, intptr_t orgStride, intptr_t refStride, int denom, int inputWeight, int inputOffset);<br>
bool xSelectWP(TComSlice * slice, wpScalingParam weightPredTable[2][MAX_NUM_REF][3], int denom);<br>
bool xUpdatingWPParameters(TComSlice* slice, int log2Denom);<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/TShortYUV.cpp<br>
--- a/source/common/TShortYUV.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/TShortYUV.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -43,7 +43,7 @@<br>
TShortYUV::~TShortYUV()<br>
{}<br>
<br>
-void TShortYUV::create(unsigned int width, unsigned int height)<br>
+void TShortYUV::create(uint32_t width, uint32_t height)<br>
{<br>
m_bufY = (int16_t*)X265_MALLOC(int16_t, width * height);<br>
m_bufCb = (int16_t*)X265_MALLOC(int16_t, width * height >> 2);<br>
@@ -73,30 +73,30 @@<br>
::memset(m_bufCr, 0, (m_cwidth * m_cheight) * sizeof(int16_t));<br>
}<br>
<br>
-void TShortYUV::subtract(TComYuv* srcYuv0, TComYuv* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)<br>
+void TShortYUV::subtract(TComYuv* srcYuv0, TComYuv* srcYuv1, uint32_t trUnitIdx, uint32_t partSize)<br>
{<br>
subtractLuma(srcYuv0, srcYuv1, trUnitIdx, partSize);<br>
subtractChroma(srcYuv0, srcYuv1, trUnitIdx, partSize >> 1);<br>
}<br>
<br>
-void TShortYUV::subtractLuma(TComYuv* srcYuv0, TComYuv* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)<br>
+void TShortYUV::subtractLuma(TComYuv* srcYuv0, TComYuv* srcYuv1, uint32_t trUnitIdx, uint32_t partSize)<br>
{<br>
- int x = partSize, y = partSize;<br>
+ uint32_t x = partSize, y = partSize;<br>
<br>
Pel* src0 = srcYuv0->getLumaAddr(trUnitIdx, partSize);<br>
Pel* src1 = srcYuv1->getLumaAddr(trUnitIdx, partSize);<br>
int16_t* dst = getLumaAddr(trUnitIdx, partSize);<br>
<br>
- int src0Stride = srcYuv0->getStride();<br>
- int src1Stride = srcYuv1->getStride();<br>
- int dstStride = m_width;<br>
+ intptr_t src0Stride = srcYuv0->getStride();<br>
+ intptr_t src1Stride = srcYuv1->getStride();<br>
+ intptr_t dstStride = m_width;<br>
<br>
primitives.pixelsub_sp(x, y, dst, dstStride, src0, src1, src0Stride, src1Stride);<br>
}<br>
<br>
-void TShortYUV::subtractChroma(TComYuv* srcYuv0, TComYuv* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)<br>
+void TShortYUV::subtractChroma(TComYuv* srcYuv0, TComYuv* srcYuv1, uint32_t trUnitIdx, uint32_t partSize)<br>
{<br>
- int x = partSize, y = partSize;<br>
+ uint32_t x = partSize, y = partSize;<br>
<br>
Pel* srcU0 = srcYuv0->getCbAddr(trUnitIdx, partSize);<br>
Pel* srcU1 = srcYuv1->getCbAddr(trUnitIdx, partSize);<br>
@@ -105,15 +105,15 @@<br>
int16_t* dstU = getCbAddr(trUnitIdx, partSize);<br>
int16_t* dstV = getCrAddr(trUnitIdx, partSize);<br>
<br>
- int src0Stride = srcYuv0->getCStride();<br>
- int src1Stride = srcYuv1->getCStride();<br>
- int dstStride = m_cwidth;<br>
+ intptr_t src0Stride = srcYuv0->getCStride();<br>
+ intptr_t src1Stride = srcYuv1->getCStride();<br>
+ intptr_t dstStride = m_cwidth;<br>
<br>
primitives.pixelsub_sp(x, y, dstU, dstStride, srcU0, srcU1, src0Stride, src1Stride);<br>
primitives.pixelsub_sp(x, y, dstV, dstStride, srcV0, srcV1, src0Stride, src1Stride);<br>
}<br>
<br>
-void TShortYUV::addClip(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)<br>
+void TShortYUV::addClip(TShortYUV* srcYuv0, TShortYUV* srcYuv1, uint32_t trUnitIdx, uint32_t partSize)<br>
{<br>
addClipLuma(srcYuv0, srcYuv1, trUnitIdx, partSize);<br>
addClipChroma(srcYuv0, srcYuv1, trUnitIdx, partSize >> 1);<br>
@@ -123,20 +123,20 @@<br>
#pragma warning (disable: 4244)<br>
#endif<br>
<br>
-void TShortYUV::addClipLuma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)<br>
+void TShortYUV::addClipLuma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, uint32_t trUnitIdx, uint32_t partSize)<br>
{<br>
int16_t* src0 = srcYuv0->getLumaAddr(trUnitIdx, partSize);<br>
int16_t* src1 = srcYuv1->getLumaAddr(trUnitIdx, partSize);<br>
int16_t* dst = getLumaAddr(trUnitIdx, partSize);<br>
<br>
- unsigned int src0Stride = srcYuv0->m_width;<br>
- unsigned int src1Stride = srcYuv1->m_width;<br>
- unsigned int dstStride = m_width;<br>
+ intptr_t src0Stride = srcYuv0->m_width;<br>
+ intptr_t src1Stride = srcYuv1->m_width;<br>
+ intptr_t dstStride = m_width;<br>
<br>
primitives.pixeladd_ss(partSize, partSize, dst, dstStride, src0, src1, src0Stride, src1Stride);<br>
}<br>
<br>
-void TShortYUV::addClipChroma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)<br>
+void TShortYUV::addClipChroma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, uint32_t trUnitIdx, uint32_t partSize)<br>
{<br>
int16_t* srcU0 = srcYuv0->getCbAddr(trUnitIdx, partSize);<br>
int16_t* srcU1 = srcYuv1->getCbAddr(trUnitIdx, partSize);<br>
@@ -145,9 +145,9 @@<br>
int16_t* dstU = getCbAddr(trUnitIdx, partSize);<br>
int16_t* dstV = getCrAddr(trUnitIdx, partSize);<br>
<br>
- unsigned int src0Stride = srcYuv0->m_cwidth;<br>
- unsigned int src1Stride = srcYuv1->m_cwidth;<br>
- unsigned int dstStride = m_cwidth;<br>
+ intptr_t src0Stride = srcYuv0->m_cwidth;<br>
+ intptr_t src1Stride = srcYuv1->m_cwidth;<br>
+ intptr_t dstStride = m_cwidth;<br>
<br>
primitives.pixeladd_ss(partSize, partSize, dstU, dstStride, srcU0, srcU1, src0Stride, src1Stride);<br>
primitives.pixeladd_ss(partSize, partSize, dstV, dstStride, srcV0, srcV1, src0Stride, src1Stride);<br>
@@ -157,28 +157,28 @@<br>
#pragma warning (default: 4244)<br>
#endif<br>
<br>
-void TShortYUV::copyPartToPartYuv(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)<br>
+void TShortYUV::copyPartToPartYuv(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)<br>
{<br>
copyPartToPartLuma(dstPicYuv, partIdx, width, height);<br>
copyPartToPartChroma(dstPicYuv, partIdx, width >> 1, height >> 1);<br>
}<br>
<br>
-void TShortYUV::copyPartToPartYuv(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)<br>
+void TShortYUV::copyPartToPartYuv(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)<br>
{<br>
copyPartToPartLuma(dstPicYuv, partIdx, width, height);<br>
copyPartToPartChroma(dstPicYuv, partIdx, width >> 1, height >> 1);<br>
}<br>
<br>
-void TShortYUV::copyPartToPartLuma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)<br>
+void TShortYUV::copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)<br>
{<br>
int16_t* src = getLumaAddr(partIdx);<br>
int16_t* dst = dstPicYuv->getLumaAddr(partIdx);<br>
<br>
if (src == dst) return;<br>
<br>
- unsigned int srcStride = m_width;<br>
- unsigned int dstStride = dstPicYuv->m_width;<br>
- for (unsigned int y = height; y != 0; y--)<br>
+ intptr_t srcStride = m_width;<br>
+ intptr_t dstStride = dstPicYuv->m_width;<br>
+ for (uint32_t y = height; y != 0; y--)<br>
{<br>
::memcpy(dst, src, width * sizeof(int16_t));<br>
src += srcStride;<br>
@@ -186,18 +186,18 @@<br>
}<br>
}<br>
<br>
-void TShortYUV::copyPartToPartLuma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)<br>
+void TShortYUV::copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)<br>
{<br>
int16_t* src = getLumaAddr(partIdx);<br>
Pel* dst = dstPicYuv->getLumaAddr(partIdx);<br>
<br>
- unsigned int srcStride = m_width;<br>
- unsigned int dstStride = dstPicYuv->getStride();<br>
+ intptr_t srcStride = m_width;<br>
+ intptr_t dstStride = dstPicYuv->getStride();<br>
<br>
primitives.blockcpy_ps(width, height, dst, dstStride, src, srcStride);<br>
}<br>
<br>
-void TShortYUV::copyPartToPartChroma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)<br>
+void TShortYUV::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)<br>
{<br>
int16_t* srcU = getCbAddr(partIdx);<br>
int16_t* srcV = getCrAddr(partIdx);<br>
@@ -206,9 +206,9 @@<br>
<br>
if (srcU == dstU && srcV == dstV) return;<br>
<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->m_cwidth;<br>
- for (unsigned int y = height; y != 0; y--)<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->m_cwidth;<br>
+ for (uint32_t y = height; y != 0; y--)<br>
{<br>
::memcpy(dstU, srcU, width * sizeof(int16_t));<br>
::memcpy(dstV, srcV, width * sizeof(int16_t));<br>
@@ -219,21 +219,21 @@<br>
}<br>
}<br>
<br>
-void TShortYUV::copyPartToPartChroma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)<br>
+void TShortYUV::copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)<br>
{<br>
int16_t* srcU = getCbAddr(partIdx);<br>
int16_t* srcV = getCrAddr(partIdx);<br>
Pel* dstU = dstPicYuv->getCbAddr(partIdx);<br>
Pel* dstV = dstPicYuv->getCrAddr(partIdx);<br>
<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->getCStride();<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->getCStride();<br>
<br>
primitives.blockcpy_ps(width, height, dstU, dstStride, srcU, srcStride);<br>
primitives.blockcpy_ps(width, height, dstV, dstStride, srcV, srcStride);<br>
}<br>
<br>
-void TShortYUV::copyPartToPartChroma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height, unsigned int chromaId)<br>
+void TShortYUV::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId)<br>
{<br>
if (chromaId == 0)<br>
{<br>
@@ -243,9 +243,9 @@<br>
{<br>
return;<br>
}<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->m_cwidth;<br>
- for (unsigned int y = height; y != 0; y--)<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->m_cwidth;<br>
+ for (uint32_t y = height; y != 0; y--)<br>
{<br>
::memcpy(dstU, srcU, width * sizeof(int16_t));<br>
srcU += srcStride;<br>
@@ -257,9 +257,9 @@<br>
int16_t* srcV = getCrAddr(partIdx);<br>
int16_t* dstV = dstPicYuv->getCrAddr(partIdx);<br>
if (srcV == dstV) return;<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->m_cwidth;<br>
- for (unsigned int y = height; y != 0; y--)<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->m_cwidth;<br>
+ for (uint32_t y = height; y != 0; y--)<br>
{<br>
::memcpy(dstV, srcV, width * sizeof(int16_t));<br>
srcV += srcStride;<br>
@@ -273,9 +273,9 @@<br>
int16_t* dstU = dstPicYuv->getCbAddr(partIdx);<br>
int16_t* dstV = dstPicYuv->getCrAddr(partIdx);<br>
if (srcU == dstU && srcV == dstV) return;<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->m_cwidth;<br>
- for (unsigned int y = height; y != 0; y--)<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->m_cwidth;<br>
+ for (uint32_t y = height; y != 0; y--)<br>
{<br>
::memcpy(dstU, srcU, width * sizeof(int16_t));<br>
::memcpy(dstV, srcV, width * sizeof(int16_t));<br>
@@ -287,22 +287,22 @@<br>
}<br>
}<br>
<br>
-void TShortYUV::copyPartToPartChroma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height, unsigned int chromaId)<br>
+void TShortYUV::copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId)<br>
{<br>
if (chromaId == 0)<br>
{<br>
int16_t* srcU = getCbAddr(partIdx);<br>
Pel* dstU = dstPicYuv->getCbAddr(partIdx);<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->getCStride();<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->getCStride();<br>
primitives.blockcpy_ps(width, height, dstU, dstStride, srcU, srcStride);<br>
}<br>
else if (chromaId == 1)<br>
{<br>
int16_t* srcV = getCrAddr(partIdx);<br>
Pel* dstV = dstPicYuv->getCrAddr(partIdx);<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->getCStride();<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->getCStride();<br>
primitives.blockcpy_ps(width, height, dstV, dstStride, srcV, srcStride);<br>
}<br>
else<br>
@@ -312,8 +312,8 @@<br>
Pel* dstU = dstPicYuv->getCbAddr(partIdx);<br>
Pel* dstV = dstPicYuv->getCrAddr(partIdx);<br>
<br>
- unsigned int srcStride = m_cwidth;<br>
- unsigned int dstStride = dstPicYuv->getCStride();<br>
+ intptr_t srcStride = m_cwidth;<br>
+ intptr_t dstStride = dstPicYuv->getCStride();<br>
primitives.blockcpy_ps(width, height, dstU, dstStride, srcU, srcStride);<br>
primitives.blockcpy_ps(width, height, dstV, dstStride, srcV, srcStride);<br>
}<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/TShortYUV.h<br>
--- a/source/common/TShortYUV.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/TShortYUV.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -37,7 +37,7 @@<br>
{<br>
private:<br>
<br>
- static int getAddrOffset(unsigned int idx, unsigned int width)<br>
+ static int getAddrOffset(uint32_t idx, uint32_t width)<br>
{<br>
int blkX = g_rasterToPelX[g_zscanToRaster[idx]];<br>
int blkY = g_rasterToPelY[g_zscanToRaster[idx]];<br>
@@ -45,7 +45,7 @@<br>
return blkX + blkY * width;<br>
}<br>
<br>
- static int getAddrOffset(unsigned int idx, unsigned int size, unsigned int width)<br>
+ static int getAddrOffset(uint32_t idx, uint32_t size, uint32_t width)<br>
{<br>
int blkX = (idx * size) & (width - 1);<br>
int blkY = (idx * size) & ~(width - 1);<br>
@@ -59,15 +59,15 @@<br>
int16_t* m_bufCb;<br>
int16_t* m_bufCr;<br>
<br>
- unsigned int m_width;<br>
- unsigned int m_height;<br>
- unsigned int m_cwidth;<br>
- unsigned int m_cheight;<br>
+ uint32_t m_width;<br>
+ uint32_t m_height;<br>
+ uint32_t m_cwidth;<br>
+ uint32_t m_cheight;<br>
<br>
TShortYUV();<br>
virtual ~TShortYUV();<br>
<br>
- void create(unsigned int width, unsigned int height);<br>
+ void create(uint32_t width, uint32_t height);<br>
void destroy();<br>
void clear();<br>
<br>
@@ -78,36 +78,36 @@<br>
int16_t* getCrAddr() { return m_bufCr; }<br>
<br>
// Access starting position of YUV partition unit buffer<br>
- int16_t* getLumaAddr(unsigned int partUnitIdx) { return m_bufY + getAddrOffset(partUnitIdx, m_width); }<br>
+ int16_t* getLumaAddr(uint32_t partUnitIdx) { return m_bufY + getAddrOffset(partUnitIdx, m_width); }<br>
<br>
- int16_t* getCbAddr(unsigned int partUnitIdx) { return m_bufCb + (getAddrOffset(partUnitIdx, m_cwidth) >> 1); }<br>
+ int16_t* getCbAddr(uint32_t partUnitIdx) { return m_bufCb + (getAddrOffset(partUnitIdx, m_cwidth) >> 1); }<br>
<br>
- int16_t* getCrAddr(unsigned int partUnitIdx) { return m_bufCr + (getAddrOffset(partUnitIdx, m_cwidth) >> 1); }<br>
+ int16_t* getCrAddr(uint32_t partUnitIdx) { return m_bufCr + (getAddrOffset(partUnitIdx, m_cwidth) >> 1); }<br>
<br>
// Access starting position of YUV transform unit buffer<br>
- int16_t* getLumaAddr(unsigned int partIdx, unsigned int size) { return m_bufY + getAddrOffset(partIdx, size, m_width); }<br>
+ int16_t* getLumaAddr(uint32_t partIdx, uint32_t size) { return m_bufY + getAddrOffset(partIdx, size, m_width); }<br>
<br>
- int16_t* getCbAddr(unsigned int partIdx, unsigned int size) { return m_bufCb + getAddrOffset(partIdx, size, m_cwidth); }<br>
+ int16_t* getCbAddr(uint32_t partIdx, uint32_t size) { return m_bufCb + getAddrOffset(partIdx, size, m_cwidth); }<br>
<br>
- int16_t* getCrAddr(unsigned int partIdx, unsigned int size) { return m_bufCr + getAddrOffset(partIdx, size, m_cwidth); }<br>
+ int16_t* getCrAddr(uint32_t partIdx, uint32_t size) { return m_bufCr + getAddrOffset(partIdx, size, m_cwidth); }<br>
<br>
- void subtractLuma(TComYuv* srcYuv0, TComYuv* srcYuv1, unsigned int trUnitIdx, unsigned int partSize);<br>
- void subtractChroma(TComYuv* srcYuv0, TComYuv* srcYuv1, unsigned int trUnitIdx, unsigned int partSize);<br>
- void subtract(TComYuv* srcYuv0, TComYuv* srcYuv1, unsigned int trUnitIdx, unsigned int partSize);<br>
+ void subtractLuma(TComYuv* srcYuv0, TComYuv* srcYuv1, uint32_t trUnitIdx, uint32_t partSize);<br>
+ void subtractChroma(TComYuv* srcYuv0, TComYuv* srcYuv1, uint32_t trUnitIdx, uint32_t partSize);<br>
+ void subtract(TComYuv* srcYuv0, TComYuv* srcYuv1, uint32_t trUnitIdx, uint32_t partSize);<br>
<br>
- void addClip(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned int trUnitIdx, unsigned int partSize);<br>
- void addClipLuma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned int trUnitIdx, unsigned int partSize);<br>
- void addClipChroma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned int trUnitIdx, unsigned int partSize);<br>
+ void addClip(TShortYUV* srcYuv0, TShortYUV* srcYuv1, uint32_t trUnitIdx, uint32_t partSize);<br>
+ void addClipLuma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, uint32_t trUnitIdx, uint32_t partSize);<br>
+ void addClipChroma(TShortYUV* srcYuv0, TShortYUV* srcYuv1, uint32_t trUnitIdx, uint32_t partSize);<br>
<br>
- void copyPartToPartYuv(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height);<br>
- void copyPartToPartLuma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height);<br>
- void copyPartToPartChroma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height);<br>
- void copyPartToPartChroma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int iWidth, unsigned int iHeight, unsigned int chromaId);<br>
+ void copyPartToPartYuv(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);<br>
+ void copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);<br>
+ void copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);<br>
+ void copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t iWidth, uint32_t iHeight, uint32_t chromaId);<br>
<br>
- void copyPartToPartYuv(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height);<br>
- void copyPartToPartLuma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height);<br>
- void copyPartToPartChroma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height);<br>
- void copyPartToPartChroma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height, unsigned int chromaId);<br>
+ void copyPartToPartYuv(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);<br>
+ void copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);<br>
+ void copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);<br>
+ void copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId);<br>
};<br>
}<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/common.cpp<br>
--- a/source/common/common.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/common.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -247,17 +247,17 @@<br>
return 1;<br>
}<br>
<br>
-int x265_check_params(x265_param *param)<br>
+uint32_t x265_check_params(x265_param *param)<br>
{<br>
#define CHECK(expr, msg) check_failed |= _confirm(param, expr, msg)<br>
- int check_failed = 0; /* abort if there is a fatal configuration problem */<br>
+ uint32_t check_failed = 0; /* abort if there is a fatal configuration problem */<br>
uint32_t maxCUDepth = (uint32_t)g_convertToBit[param->maxCUSize];<br>
uint32_t tuQTMaxLog2Size = maxCUDepth + 2 - 1;<br>
uint32_t tuQTMinLog2Size = 2; //log2(4)<br>
<br>
CHECK(param->internalBitDepth > x265_max_bit_depth,<br>
"InternalBitDepth must be <= x265_max_bit_depth");<br>
- CHECK(param->rc.qp < -6 * (param->internalBitDepth - 8) || param->rc.qp > 51,<br>
+ CHECK(param->rc.qp < -6 * (int)(param->internalBitDepth - 8) || param->rc.qp > 51,<br>
"QP exceeds supported range (-QpBDOffsety to 51)");<br>
CHECK(param->frameRate <= 0,<br>
"Frame rate must be more than 1");<br>
@@ -456,7 +456,7 @@<br>
int valuewasnull;<br>
<br>
/* Enable or Disable - default is Enable */<br>
- int bvalue = 1;<br>
+ uint32_t bvalue = 1;<br>
<br>
if (!name)<br>
return X265_PARAM_BAD_NAME;<br>
@@ -476,42 +476,45 @@<br>
<br>
#define OPT(STR) else if (!strcmp(name, STR))<br>
if (0) ;<br>
+<br>
+#define CHECKSIGN(VAL, PARAM) if (atoi(VAL) >= 0) p->PARAM = (uint32_t)atoi(VAL); else return X265_PARAM_BAD_VALUE;<br>
+<br>
OPT("fps")<br>
- p->frameRate = atoi(value);<br>
+ CHECKSIGN(value, frameRate)<br>
OPT("csv")<br>
p->csvfn = value;<br>
OPT("threads")<br>
- p->poolNumThreads = atoi(value);<br>
+ CHECKSIGN(value, poolNumThreads)<br>
OPT("frame-threads")<br>
- p->frameNumThreads = atoi(value);<br>
+ CHECKSIGN(value, frameNumThreads)<br>
OPT("log")<br>
p->logLevel = atoi(value);<br>
OPT("wpp")<br>
p->bEnableWavefront = bvalue;<br>
OPT("ctu")<br>
- p->maxCUSize =(uint32_t) atoi(value);<br>
+ CHECKSIGN(value, maxCUSize)<br>
OPT("tu-intra-depth")<br>
- p->tuQTMaxIntraDepth = (uint32_t) atoi(value);<br>
+ CHECKSIGN(value, tuQTMaxIntraDepth)<br>
OPT("tu-inter-depth")<br>
- p->tuQTMaxInterDepth =(uint32_t) atoi(value);<br>
+ CHECKSIGN(value, tuQTMaxInterDepth)<br>
OPT("me")<br>
- p->searchMethod = atoi(value);<br>
+ CHECKSIGN(value, searchMethod)<br>
OPT("subme")<br>
- p->subpelRefine = atoi(value);<br>
+ CHECKSIGN(value, subpelRefine)<br>
OPT("merange")<br>
- p->searchRange = atoi(value);<br>
+ CHECKSIGN(value, searchRange)<br>
OPT("rect")<br>
p->bEnableRectInter = bvalue;<br>
OPT("amp")<br>
p->bEnableAMP = bvalue;<br>
OPT("max-merge")<br>
- p->maxNumMergeCand = (uint32_t)atoi(value);<br>
+ CHECKSIGN(value, maxNumMergeCand)<br>
OPT("early-skip")<br>
p->bEnableEarlySkip = bvalue;<br>
OPT("fast-cbf")<br>
p->bEnableCbfFastMode = bvalue;<br>
OPT("rdpenalty")<br>
- p->rdPenalty = atoi(value);<br>
+ CHECKSIGN(value, rdPenalty)<br>
OPT("tskip")<br>
p->bEnableTransformSkip = bvalue;<br>
OPT("no-tskip-fast")<br>
@@ -523,7 +526,7 @@<br>
OPT("constrained-intra")<br>
p->bEnableConstrainedIntra = bvalue;<br>
OPT("refresh")<br>
- p->decodingRefreshType = atoi(value);<br>
+ CHECKSIGN(value, decodingRefreshType)<br>
OPT("keyint")<br>
p->keyframeMax = atoi(value);<br>
OPT("rc-lookahead")<br>
@@ -533,13 +536,13 @@<br>
OPT("bframe-bias")<br>
p->bFrameBias = atoi(value);<br>
OPT("b-adapt")<br>
- p->bFrameAdaptive = atoi(value);<br>
+ CHECKSIGN(value, bFrameAdaptive)<br>
OPT("ref")<br>
p->maxNumReferences = atoi(value);<br>
OPT("weightp")<br>
p->bEnableWeightedPred = bvalue;<br>
OPT("bitrate")<br>
- p->rc.bitrate = atoi(value);<br>
+ CHECKSIGN(value, rc.bitrate)<br>
OPT("qp")<br>
p->rc.qp = atoi(value);<br>
OPT("cbqpoffs")<br>
@@ -547,7 +550,7 @@<br>
OPT("crqpoffs")<br>
p->crQpOffset = atoi(value);<br>
OPT("rd")<br>
- p->rdLevel = atoi(value);<br>
+ CHECKSIGN(value, rdLevel)<br>
OPT("signhide")<br>
p->bEnableSignHiding = bvalue;<br>
OPT("lft")<br>
@@ -555,17 +558,18 @@<br>
OPT("sao")<br>
p->bEnableSAO = bvalue;<br>
OPT("sao-lcu-bounds")<br>
- p->saoLcuBoundary = atoi(value);<br>
+ CHECKSIGN(value, saoLcuBoundary)<br>
OPT("sao-lcu-opt")<br>
- p->saoLcuBasedOptimization = atoi(value);<br>
+ CHECKSIGN(value, saoLcuBasedOptimization)<br>
OPT("ssim")<br>
p->bEnableSsim = bvalue;<br>
OPT("psnr")<br>
p->bEnablePsnr = bvalue;<br>
OPT("hash")<br>
- p->decodedPictureHashSEI = atoi(value);<br>
+ CHECKSIGN(value, decodedPictureHashSEI)<br>
else<br>
return X265_PARAM_BAD_NAME;<br>
+#undef CHECKSIGN<br>
#undef OPT<br>
<br>
berror |= valuewasnull;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/common.h<br>
--- a/source/common/common.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/common.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -112,7 +112,7 @@<br>
/* defined in common.cpp */<br>
int64_t x265_mdate(void);<br>
void x265_log(x265_param *param, int level, const char *fmt, ...);<br>
-int x265_check_params(x265_param *param);<br>
+uint32_t x265_check_params(x265_param *param);<br>
void x265_print_params(x265_param *param);<br>
int x265_set_globals(x265_param *param);<br>
int x265_exp2fix8(double x);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/dct.cpp<br>
--- a/source/common/dct.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/dct.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -42,7 +42,7 @@<br>
<br>
// Fast DST Algorithm. Full matrix multiplication for DST and Fast DST algorithm<br>
// give identical results<br>
-void fastForwardDst(int16_t *block, int16_t *coeff, int shift) // input block, output coeff<br>
+void fastForwardDst(int16_t *block, int16_t *coeff, uint32_t shift) // input block, output coeff<br>
{<br>
int c[4];<br>
int rnd_factor = 1 << (shift - 1);<br>
@@ -62,7 +62,7 @@<br>
}<br>
}<br>
<br>
-void inversedst(int16_t *tmp, int16_t *block, int shift) // input tmp, output block<br>
+void inversedst(int16_t *tmp, int16_t *block, uint32_t shift) // input tmp, output block<br>
{<br>
int i, c[4];<br>
int rnd_factor = 1 << (shift - 1);<br>
@@ -82,9 +82,9 @@<br>
}<br>
}<br>
<br>
-void partialButterfly16(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterfly16(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j, k;<br>
+ uint32_t j, k;<br>
int E[8], O[8];<br>
int EE[4], EO[4];<br>
int EEE[2], EEO[2];<br>
@@ -135,9 +135,9 @@<br>
}<br>
}<br>
<br>
-void partialButterfly32(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterfly32(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j, k;<br>
+ uint32_t j, k;<br>
int E[16], O[16];<br>
int EE[8], EO[8];<br>
int EEE[4], EEO[4];<br>
@@ -204,9 +204,9 @@<br>
}<br>
}<br>
<br>
-void partialButterfly8(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterfly8(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j, k;<br>
+ uint32_t j, k;<br>
int E[4], O[4];<br>
int EE[2], EO[2];<br>
int add = 1 << (shift - 1);<br>
@@ -241,9 +241,9 @@<br>
}<br>
}<br>
<br>
-void partialButterflyInverse4(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterflyInverse4(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j;<br>
+ uint32_t j;<br>
int E[2], O[2];<br>
int add = 1 << (shift - 1);<br>
<br>
@@ -266,9 +266,9 @@<br>
}<br>
}<br>
<br>
-void partialButterflyInverse8(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterflyInverse8(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j, k;<br>
+ uint32_t j, k;<br>
int E[4], O[4];<br>
int EE[2], EO[2];<br>
int add = 1 << (shift - 1);<br>
@@ -302,9 +302,9 @@<br>
}<br>
}<br>
<br>
-void partialButterflyInverse16(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterflyInverse16(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j, k;<br>
+ uint32_t j, k;<br>
int E[8], O[8];<br>
int EE[4], EO[4];<br>
int EEE[2], EEO[2];<br>
@@ -353,9 +353,9 @@<br>
}<br>
}<br>
<br>
-void partialButterflyInverse32(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterflyInverse32(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j, k;<br>
+ uint32_t j, k;<br>
int E[16], O[16];<br>
int EE[8], EO[8];<br>
int EEE[4], EEO[4];<br>
@@ -417,9 +417,9 @@<br>
}<br>
}<br>
<br>
-void partialButterfly4(int16_t *src, int16_t *dst, int shift, int line)<br>
+void partialButterfly4(int16_t *src, int16_t *dst, uint32_t shift, uint32_t line)<br>
{<br>
- int j;<br>
+ uint32_t j;<br>
int E[2], O[2];<br>
int add = 1 << (shift - 1);<br>
<br>
@@ -443,8 +443,8 @@<br>
<br>
void dst4_c(int16_t *src, int32_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 1;<br>
- const int shift_2nd = 8;<br>
+ const uint32_t shift_1st = 1;<br>
+ const uint32_t shift_2nd = 8;<br>
<br>
ALIGN_VAR_32(int16_t, coef[4 * 4]);<br>
ALIGN_VAR_32(int16_t, block[4 * 4]);<br>
@@ -458,9 +458,9 @@<br>
fastForwardDst(coef, block, shift_2nd);<br>
<br>
#define N (4)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
dst[i * N + j] = block[i * N + j];<br>
}<br>
@@ -471,13 +471,13 @@<br>
<br>
void dct4_c(int16_t *src, int32_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 1;<br>
- const int shift_2nd = 8;<br>
+ const uint32_t shift_1st = 1;<br>
+ const uint32_t shift_2nd = 8;<br>
<br>
ALIGN_VAR_32(int16_t, coef[4 * 4]);<br>
ALIGN_VAR_32(int16_t, block[4 * 4]);<br>
<br>
- for (int i = 0; i < 4; i++)<br>
+ for (uint32_t i = 0; i < 4; i++)<br>
{<br>
memcpy(&block[i * 4], &src[i * stride], 4 * sizeof(int16_t));<br>
}<br>
@@ -485,9 +485,9 @@<br>
partialButterfly4(block, coef, shift_1st, 4);<br>
partialButterfly4(coef, block, shift_2nd, 4);<br>
#define N (4)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
dst[i * N + j] = block[i * N + j];<br>
}<br>
@@ -498,13 +498,13 @@<br>
<br>
void dct8_c(int16_t *src, int32_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 2;<br>
- const int shift_2nd = 9;<br>
+ const uint32_t shift_1st = 2;<br>
+ const uint32_t shift_2nd = 9;<br>
<br>
ALIGN_VAR_32(int16_t, coef[8 * 8]);<br>
ALIGN_VAR_32(int16_t, block[8 * 8]);<br>
<br>
- for (int i = 0; i < 8; i++)<br>
+ for (uint32_t i = 0; i < 8; i++)<br>
{<br>
memcpy(&block[i * 8], &src[i * stride], 8 * sizeof(int16_t));<br>
}<br>
@@ -513,9 +513,9 @@<br>
partialButterfly8(coef, block, shift_2nd, 8);<br>
<br>
#define N (8)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
dst[i * N + j] = block[i * N + j];<br>
}<br>
@@ -526,13 +526,13 @@<br>
<br>
void dct16_c(int16_t *src, int32_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 3;<br>
- const int shift_2nd = 10;<br>
+ const uint32_t shift_1st = 3;<br>
+ const uint32_t shift_2nd = 10;<br>
<br>
ALIGN_VAR_32(int16_t, coef[16 * 16]);<br>
ALIGN_VAR_32(int16_t, block[16 * 16]);<br>
<br>
- for (int i = 0; i < 16; i++)<br>
+ for (uint32_t i = 0; i < 16; i++)<br>
{<br>
memcpy(&block[i * 16], &src[i * stride], 16 * sizeof(int16_t));<br>
}<br>
@@ -541,9 +541,9 @@<br>
partialButterfly16(coef, block, shift_2nd, 16);<br>
<br>
#define N (16)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
dst[i * N + j] = block[i * N + j];<br>
}<br>
@@ -554,8 +554,8 @@<br>
<br>
void dct32_c(int16_t *src, int32_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 4;<br>
- const int shift_2nd = 11;<br>
+ const uint32_t shift_1st = 4;<br>
+ const uint32_t shift_2nd = 11;<br>
<br>
ALIGN_VAR_32(int16_t, coef[32 * 32]);<br>
ALIGN_VAR_32(int16_t, block[32 * 32]);<br>
@@ -569,9 +569,9 @@<br>
partialButterfly32(coef, block, shift_2nd, 32);<br>
<br>
#define N (32)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
dst[i * N + j] = block[i * N + j];<br>
}<br>
@@ -582,16 +582,16 @@<br>
<br>
void idst4_c(int32_t *src, int16_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 7;<br>
- const int shift_2nd = 12;<br>
+ const uint32_t shift_1st = 7;<br>
+ const uint32_t shift_2nd = 12;<br>
<br>
ALIGN_VAR_32(int16_t, coef[4 * 4]);<br>
ALIGN_VAR_32(int16_t, block[4 * 4]);<br>
<br>
#define N (4)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
block[i * N + j] = (int16_t)src[i * N + j];<br>
}<br>
@@ -602,7 +602,7 @@<br>
inversedst(block, coef, shift_1st); // Forward DST BY FAST ALGORITHM, block input, coef output<br>
inversedst(coef, block, shift_2nd); // Forward DST BY FAST ALGORITHM, coef input, coeff output<br>
<br>
- for (int i = 0; i < 4; i++)<br>
+ for (uint32_t i = 0; i < 4; i++)<br>
{<br>
memcpy(&dst[i * stride], &block[i * 4], 4 * sizeof(int16_t));<br>
}<br>
@@ -610,16 +610,16 @@<br>
<br>
void idct4_c(int32_t *src, int16_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 7;<br>
- const int shift_2nd = 12;<br>
+ const uint32_t shift_1st = 7;<br>
+ const uint32_t shift_2nd = 12;<br>
<br>
ALIGN_VAR_32(int16_t, coef[4 * 4]);<br>
ALIGN_VAR_32(int16_t, block[4 * 4]);<br>
<br>
#define N (4)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
block[i * N + j] = (int16_t)src[i * N + j];<br>
}<br>
@@ -630,7 +630,7 @@<br>
partialButterflyInverse4(block, coef, shift_1st, 4); // Forward DST BY FAST ALGORITHM, block input, coef output<br>
partialButterflyInverse4(coef, block, shift_2nd, 4); // Forward DST BY FAST ALGORITHM, coef input, coeff output<br>
<br>
- for (int i = 0; i < 4; i++)<br>
+ for (uint32_t i = 0; i < 4; i++)<br>
{<br>
memcpy(&dst[i * stride], &block[i * 4], 4 * sizeof(int16_t));<br>
}<br>
@@ -638,16 +638,16 @@<br>
<br>
void idct8_c(int32_t *src, int16_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 7;<br>
- const int shift_2nd = 12;<br>
+ const uint32_t shift_1st = 7;<br>
+ const uint32_t shift_2nd = 12;<br>
<br>
ALIGN_VAR_32(int16_t, coef[8 * 8]);<br>
ALIGN_VAR_32(int16_t, block[8 * 8]);<br>
<br>
#define N (8)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
block[i * N + j] = (int16_t)src[i * N + j];<br>
}<br>
@@ -657,7 +657,7 @@<br>
<br>
partialButterflyInverse8(block, coef, shift_1st, 8);<br>
partialButterflyInverse8(coef, block, shift_2nd, 8);<br>
- for (int i = 0; i < 8; i++)<br>
+ for (uint32_t i = 0; i < 8; i++)<br>
{<br>
memcpy(&dst[i * stride], &block[i * 8], 8 * sizeof(int16_t));<br>
}<br>
@@ -665,16 +665,16 @@<br>
<br>
void idct16_c(int32_t *src, int16_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 7;<br>
- const int shift_2nd = 12;<br>
+ const uint32_t shift_1st = 7;<br>
+ const uint32_t shift_2nd = 12;<br>
<br>
ALIGN_VAR_32(int16_t, coef[16 * 16]);<br>
ALIGN_VAR_32(int16_t, block[16 * 16]);<br>
<br>
#define N (16)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
block[i * N + j] = (int16_t)src[i * N + j];<br>
}<br>
@@ -684,7 +684,7 @@<br>
<br>
partialButterflyInverse16(block, coef, shift_1st, 16);<br>
partialButterflyInverse16(coef, block, shift_2nd, 16);<br>
- for (int i = 0; i < 16; i++)<br>
+ for (uint32_t i = 0; i < 16; i++)<br>
{<br>
memcpy(&dst[i * stride], &block[i * 16], 16 * sizeof(int16_t));<br>
}<br>
@@ -692,16 +692,16 @@<br>
<br>
void idct32_c(int32_t *src, int16_t *dst, intptr_t stride)<br>
{<br>
- const int shift_1st = 7;<br>
- const int shift_2nd = 12;<br>
+ const uint32_t shift_1st = 7;<br>
+ const uint32_t shift_2nd = 12;<br>
<br>
ALIGN_VAR_32(int16_t, coef[32 * 32]);<br>
ALIGN_VAR_32(int16_t, block[32 * 32]);<br>
<br>
#define N (32)<br>
- for (int i = 0; i < N; i++)<br>
+ for (uint32_t i = 0; i < N; i++)<br>
{<br>
- for (int j = 0; j < N; j++)<br>
+ for (uint32_t j = 0; j < N; j++)<br>
{<br>
block[i * N + j] = (int16_t)src[i * N + j];<br>
}<br>
@@ -712,13 +712,13 @@<br>
partialButterflyInverse32(block, coef, shift_1st, 32);<br>
partialButterflyInverse32(coef, block, shift_2nd, 32);<br>
<br>
- for (int i = 0; i < 32; i++)<br>
+ for (uint32_t i = 0; i < 32; i++)<br>
{<br>
memcpy(&dst[i * stride], &block[i * 32], 32 * sizeof(int16_t));<br>
}<br>
}<br>
<br>
-void dequant_c(const int32_t* quantCoef, int32_t* coef, int width, int height, int per, int rem, bool useScalingList, unsigned int log2TrSize, int32_t *dequantCoef)<br>
+void dequant_c(const int32_t* quantCoef, int32_t* coef, uint32_t width, uint32_t height, int per, int rem, bool useScalingList, uint32_t log2TrSize, int32_t *dequantCoef)<br>
{<br>
int invQuantScales[6] = { 40, 45, 51, 57, 64, 72 };<br>
<br>
@@ -742,7 +742,7 @@<br>
{<br>
add = 1 << (shift - per - 1);<br>
<br>
- for (int n = 0; n < width * height; n++)<br>
+ for (uint32_t n = 0; n < width * height; n++)<br>
{<br>
clipQCoef = Clip3(-32768, 32767, quantCoef[n]);<br>
coeffQ = ((clipQCoef * dequantCoef[n]) + add) >> (shift - per);<br>
@@ -751,7 +751,7 @@<br>
}<br>
else<br>
{<br>
- for (int n = 0; n < width * height; n++)<br>
+ for (uint32_t n = 0; n < width * height; n++)<br>
{<br>
clipQCoef = Clip3(-32768, 32767, quantCoef[n]);<br>
coeffQ = Clip3(-32768, 32767, clipQCoef * dequantCoef[n]);<br>
@@ -764,7 +764,7 @@<br>
add = 1 << (shift - 1);<br>
int scale = invQuantScales[rem] << per;<br>
<br>
- for (int n = 0; n < width * height; n++)<br>
+ for (uint32_t n = 0; n < width * height; n++)<br>
{<br>
clipQCoef = Clip3(-32768, 32767, quantCoef[n]);<br>
coeffQ = (clipQCoef * scale + add) >> shift;<br>
@@ -773,12 +773,12 @@<br>
}<br>
}<br>
<br>
-uint32_t quant_c(int32_t* coef, int32_t* quantCoeff, int32_t* deltaU, int32_t* qCoef, int qBits, int add, int numCoeff, int32_t* lastPos)<br>
+uint32_t quant_c(int32_t* coef, int32_t* quantCoeff, int32_t* deltaU, int32_t* qCoef, int qBits, int add, uint32_t numCoeff, int32_t* lastPos)<br>
{<br>
int qBits8 = qBits - 8;<br>
uint32_t acSum = 0;<br>
<br>
- for (int blockpos = 0; blockpos < numCoeff; blockpos++)<br>
+ for (uint32_t blockpos = 0; blockpos < numCoeff; blockpos++)<br>
{<br>
int level;<br>
int sign;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/intrapred.cpp<br>
--- a/source/common/intrapred.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/intrapred.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -44,7 +44,7 @@<br>
namespace {<br>
pixel predIntraGetPredValDC(pixel* above, pixel* left, intptr_t width)<br>
{<br>
- int w, sum = 0;<br>
+ uint32_t w, sum = 0;<br>
pixel pDcVal;<br>
<br>
for (w = 0; w < width; w++)<br>
@@ -62,7 +62,7 @@<br>
return pDcVal;<br>
}<br>
<br>
-void DCPredFiltering(pixel* above, pixel* left, pixel* dst, intptr_t dststride, int width, int height)<br>
+void DCPredFiltering(pixel* above, pixel* left, pixel* dst, intptr_t dststride, uint32_t width, uint32_t height)<br>
{<br>
intptr_t x, y, dstride2;<br>
<br>
@@ -80,10 +80,10 @@<br>
}<br>
}<br>
<br>
-void PredIntraDC(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, int width, int bFilter)<br>
+void PredIntraDC(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, uint32_t width, int bFilter)<br>
{<br>
- int k, l;<br>
- int blkSize = width;<br>
+ uint32_t k, l;<br>
+ uint32_t blkSize = width;<br>
<br>
// Do the DC prediction<br>
pixel dcval = (pixel)predIntraGetPredValDC(above, left, width);<br>
@@ -102,19 +102,19 @@<br>
}<br>
}<br>
<br>
-void PredIntraPlanar(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, int width)<br>
+void PredIntraPlanar(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, uint32_t width)<br>
{<br>
//assert(width == height);<br>
<br>
- int k, l;<br>
+ uint32_t k, l;<br>
pixel bottomLeft, topRight;<br>
int horPred;<br>
// OPT_ME: when width is 64, the shift1D is 8, then the dynamic range is 17 bits or [-65280, 65280], so we have to use 32 bits here<br>
int32_t leftColumn[MAX_CU_SIZE + 1], topRow[MAX_CU_SIZE + 1];<br>
// CHECK_ME: dynamic range is 9 bits or 15 bits(I assume max input bit_depth is 14 bits)<br>
int16_t bottomRow[MAX_CU_SIZE], rightColumn[MAX_CU_SIZE];<br>
- int blkSize = width;<br>
- int offset2D = width;<br>
+ uint32_t blkSize = width;<br>
+ uint32_t offset2D = width;<br>
int shift1D = g_convertToBit[width] + 2;<br>
int shift2D = shift1D + 1;<br>
<br>
@@ -139,7 +139,7 @@<br>
// Generate prediction signal<br>
for (k = 0; k < blkSize; k++)<br>
{<br>
- horPred = leftColumn[k] + offset2D;<br>
+ horPred = leftColumn[k] + (int32_t)offset2D;<br>
for (l = 0; l < blkSize; l++)<br>
{<br>
horPred += rightColumn[k];<br>
@@ -149,17 +149,17 @@<br>
}<br>
}<br>
<br>
-void PredIntraAngBufRef(pixel* dst, int dstStride, int width, int dirMode, bool bFilter, pixel *refLeft, pixel *refAbove)<br>
+void PredIntraAngBufRef(pixel* dst, intptr_t dstStride, uint32_t width, uint32_t dirMode, bool bFilter, pixel *refLeft, pixel *refAbove)<br>
{<br>
int k, l;<br>
- int blkSize = width;<br>
+ int blkSize = (int)width;<br>
<br>
// Map the mode index to main prediction direction and angle<br>
assert(dirMode > 1); //no planar and dc<br>
bool modeHor = (dirMode < 18);<br>
bool modeVer = !modeHor;<br>
int intraPredAngle = modeVer ? (int)dirMode - VER_IDX : modeHor ? -((int)dirMode - HOR_IDX) : 0;<br>
- int absAng = abs(intraPredAngle);<br>
+ uint32_t absAng = abs(intraPredAngle);<br>
int signAng = intraPredAngle < 0 ? -1 : 1;<br>
<br>
// Set bitshifts and scale the angle parameter to block size<br>
@@ -262,10 +262,10 @@<br>
}<br>
}<br>
<br>
-template<int size><br>
+template<uint32_t size><br>
void PredIntraAngs_C(pixel *Dst0, pixel *pAbove0, pixel *pLeft0, pixel *pAbove1, pixel *pLeft1, bool bLuma)<br>
{<br>
- int iMode;<br>
+ uint32_t iMode;<br>
<br>
for (iMode = 2; iMode <= 34; iMode++)<br>
{<br>
@@ -281,9 +281,9 @@<br>
if (modeHor)<br>
{<br>
pixel tmp;<br>
- for (int k = 0; k < size - 1; k++)<br>
+ for (uint32_t k = 0; k < size - 1; k++)<br>
{<br>
- for (int l = k + 1; l < size; l++)<br>
+ for (uint32_t l = k + 1; l < size; l++)<br>
{<br>
tmp = dst[k * size + l];<br>
dst[k * size + l] = dst[l * size + k];<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/ipfilter.cpp<br>
--- a/source/common/ipfilter.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/ipfilter.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -150,7 +150,7 @@<br>
}<br>
}<br>
<br>
-template<int N><br>
+template<uint32_t N><br>
void filterVertical_ps_c(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int width, int height, int16_t const *c)<br>
{<br>
int headRoom = IF_INTERNAL_PREC - X265_DEPTH;<br>
@@ -186,7 +186,7 @@<br>
}<br>
}<br>
<br>
-template<int N><br>
+template<uint32_t N><br>
void filterHorizontal_ps_c(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int width, int height, int16_t const *coeff)<br>
{<br>
int headRoom = IF_INTERNAL_PREC - X265_DEPTH;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/lowres.cpp<br>
--- a/source/common/lowres.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/lowres.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -27,7 +27,7 @@<br>
<br>
using namespace x265;<br>
<br>
-void Lowres::create(TComPic *pic, int bframes, int32_t *aqMode)<br>
+void Lowres::create(TComPic *pic, uint32_t bframes, int32_t *aqMode)<br>
{<br>
TComPicYuv *orig = pic->getPicYuvOrg();<br>
<br>
@@ -54,7 +54,7 @@<br>
}<br>
<br>
/* allocate lowres buffers */<br>
- for (int i = 0; i < 4; i++)<br>
+ for (uint32_t i = 0; i < 4; i++)<br>
{<br>
buffer[i] = (Pel*)X265_MALLOC(Pel, lumaStride * (lines + 2 * orig->getLumaMarginY()));<br>
}<br>
@@ -67,16 +67,16 @@<br>
<br>
intraCost = (int32_t*)X265_MALLOC(int, cuCount);<br>
<br>
- for (int i = 0; i < bframes + 2; i++)<br>
+ for (uint32_t i = 0; i < bframes + 2; i++)<br>
{<br>
- for (int j = 0; j < bframes + 2; j++)<br>
+ for (uint32_t j = 0; j < bframes + 2; j++)<br>
{<br>
rowSatds[i][j] = (int32_t*)X265_MALLOC(int, cuHeight);<br>
lowresCosts[i][j] = (uint16_t*)X265_MALLOC(uint16_t, cuCount);<br>
}<br>
}<br>
<br>
- for (int i = 0; i < bframes + 1; i++)<br>
+ for (uint32_t i = 0; i < bframes + 1; i++)<br>
{<br>
lowresMvs[0][i] = (MV*)X265_MALLOC(MV, cuCount);<br>
lowresMvs[1][i] = (MV*)X265_MALLOC(MV, cuCount);<br>
@@ -85,25 +85,25 @@<br>
}<br>
}<br>
<br>
-void Lowres::destroy(int bframes)<br>
+void Lowres::destroy(uint32_t bframes)<br>
{<br>
- for (int i = 0; i < 4; i++)<br>
+ for (uint32_t i = 0; i < 4; i++)<br>
{<br>
X265_FREE(buffer[i]);<br>
}<br>
<br>
X265_FREE(intraCost);<br>
<br>
- for (int i = 0; i < bframes + 2; i++)<br>
+ for (uint32_t i = 0; i < bframes + 2; i++)<br>
{<br>
- for (int j = 0; j < bframes + 2; j++)<br>
+ for (uint32_t j = 0; j < bframes + 2; j++)<br>
{<br>
X265_FREE(rowSatds[i][j]);<br>
X265_FREE(lowresCosts[i][j]);<br>
}<br>
}<br>
<br>
- for (int i = 0; i < bframes + 1; i++)<br>
+ for (uint32_t i = 0; i < bframes + 1; i++)<br>
{<br>
X265_FREE(lowresMvs[0][i]);<br>
X265_FREE(lowresMvs[1][i]);<br>
@@ -115,7 +115,7 @@<br>
}<br>
<br>
// (re) initialize lowres state<br>
-void Lowres::init(TComPicYuv *orig, int poc, int type, int bframes)<br>
+void Lowres::init(TComPicYuv *orig, int poc, int type, uint32_t bframes)<br>
{<br>
bScenecut = true;<br>
bIntraCalculated = false;<br>
@@ -130,27 +130,27 @@<br>
if (m_qpAqOffset && m_invQscaleFactor)<br>
memset(costEstAq, -1, sizeof(costEstAq));<br>
<br>
- for (int y = 0; y < bframes + 2; y++)<br>
+ for (uint32_t y = 0; y < bframes + 2; y++)<br>
{<br>
- for (int x = 0; x < bframes + 2; x++)<br>
+ for (uint32_t x = 0; x < bframes + 2; x++)<br>
{<br>
rowSatds[y][x][0] = -1;<br>
}<br>
}<br>
<br>
- for (int i = 0; i < bframes + 1; i++)<br>
+ for (uint32_t i = 0; i < bframes + 1; i++)<br>
{<br>
lowresMvs[0][i][0].x = 0x7FFF;<br>
lowresMvs[1][i][0].x = 0x7FFF;<br>
}<br>
<br>
- for (int i = 0; i < bframes + 2; i++)<br>
+ for (uint32_t i = 0; i < bframes + 2; i++)<br>
{<br>
intraMbs[i] = 0;<br>
}<br>
<br>
int y, extWidth = (orig->getWidth() + X265_LOWRES_CU_SIZE - 1);<br>
- int srcStride = orig->getStride();<br>
+ intptr_t srcStride = orig->getStride();<br>
int srcHeight = orig->getHeight();<br>
int srcWidth = orig->getWidth();<br>
Pel *src;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/lowres.h<br>
--- a/source/common/lowres.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/lowres.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -41,7 +41,7 @@<br>
int lines; // height of lowres frame in pixel lines<br>
int frameNum; // Presentation frame number<br>
int sliceType; // Slice type decided by lookahead<br>
- int leadingBframes; // number of leading B frames for P or I<br>
+ uint32_t leadingBframes; // number of leading B frames for P or I<br>
<br>
bool bIntraCalculated;<br>
bool bScenecut; // Set to false if the frame cannot possibly be part of a real scenecut.<br>
@@ -59,9 +59,9 @@<br>
int32_t *lowresMvCosts[2][X265_BFRAME_MAX + 1];<br>
MV *lowresMvs[2][X265_BFRAME_MAX + 1];<br>
<br>
- void create(TComPic *pic, int bframes, int32_t *aqMode);<br>
- void destroy(int bframes);<br>
- void init(TComPicYuv *orig, int poc, int sliceType, int bframes);<br>
+ void create(TComPic *pic, uint32_t bframes, int32_t *aqMode);<br>
+ void destroy(uint32_t bframes);<br>
+ void init(TComPicYuv *orig, int poc, int sliceType, uint32_t bframes);<br>
};<br>
}<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/md5.cpp<br>
--- a/source/common/md5.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/md5.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -31,15 +31,15 @@<br>
#ifndef ARCH_BIG_ENDIAN<br>
#define byteReverse(buf, len) /* Nothing */<br>
#else<br>
-static void byteReverse(uint8_t_t *buf, unsigned int nSize)<br>
+static void byteReverse(uint8_t_t *buf, uint32_t nSize)<br>
{<br>
- int i;<br>
+ uint32_t i;<br>
uint32_t tmp;<br>
<br>
for (i = 0; i < nSize; i++)<br>
{<br>
- tmp = ((unsigned int)buf[3] << 8 | buf[2]) << 16 |<br>
- ((unsigned int)buf[1] << 8 | buf[0]);<br>
+ tmp = ((uint32_t)buf[3] << 8 | buf[2]) << 16 |<br>
+ ((uint32_t)buf[1] << 8 | buf[0]);<br>
*(uint32_t*)buf = tmp;<br>
buf += 4;<br>
}<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/mv.h<br>
--- a/source/common/mv.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/mv.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -110,7 +110,7 @@<br>
<br>
bool isWeighted;<br>
bool isLowres;<br>
- int lumaStride;<br>
+ intptr_t lumaStride;<br>
int weight;<br>
int offset;<br>
int shift;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/pixel.cpp<br>
--- a/source/common/pixel.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/pixel.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -469,7 +469,7 @@<br>
}<br>
<br>
template<int blockSize><br>
-void getResidual(pixel *fenc, pixel *pred, int16_t *residual, int stride)<br>
+void getResidual(pixel *fenc, pixel *pred, int16_t *residual, intptr_t stride)<br>
{<br>
for (int uiY = 0; uiY < blockSize; uiY++)<br>
{<br>
@@ -485,7 +485,7 @@<br>
}<br>
<br>
template<int blockSize><br>
-void calcRecons(pixel* pred, int16_t* residual, pixel* recon, int16_t* recqt, pixel* recipred, int stride, int qtstride, int ipredstride)<br>
+void calcRecons(pixel* pred, int16_t* residual, pixel* recon, int16_t* recqt, pixel* recipred, intptr_t stride, int qtstride, int ipredstride)<br>
{<br>
for (int uiY = 0; uiY < blockSize; uiY++)<br>
{<br>
@@ -552,11 +552,11 @@<br>
}<br>
}<br>
<br>
-void pixelsub_sp_c(int bx, int by, int16_t *a, intptr_t dstride, pixel *b0, pixel *b1, intptr_t sstride0, intptr_t sstride1)<br>
+void pixelsub_sp_c(uint32_t bx, uint32_t by, int16_t *a, intptr_t dstride, pixel *b0, pixel *b1, intptr_t sstride0, intptr_t sstride1)<br>
{<br>
- for (int y = 0; y < by; y++)<br>
+ for (uint32_t y = 0; y < by; y++)<br>
{<br>
- for (int x = 0; x < bx; x++)<br>
+ for (uint32_t x = 0; x < bx; x++)<br>
{<br>
a[x] = (int16_t)(b0[x] - b1[x]);<br>
}<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/primitives.h<br>
--- a/source/common/primitives.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/primitives.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -173,15 +173,15 @@<br>
typedef void (*blockcpy_sp_t)(int bx, int by, int16_t *dst, intptr_t dstride, pixel *src, intptr_t sstride); // dst is aligned<br>
typedef void (*blockcpy_ps_t)(int bx, int by, pixel *dst, intptr_t dstride, int16_t *src, intptr_t sstride); // dst is aligned<br>
typedef void (*blockcpy_sc_t)(int bx, int by, int16_t *dst, intptr_t dstride, uint8_t *src, intptr_t sstride); // dst is aligned<br>
-typedef void (*pixelsub_sp_t)(int bx, int by, int16_t *dst, intptr_t dstride, pixel *src0, pixel *src1, intptr_t sstride0, intptr_t sstride1);<br>
+typedef void (*pixelsub_sp_t)(uint32_t bx, uint32_t by, int16_t *dst, intptr_t dstride, pixel *src0, pixel *src1, intptr_t sstride0, intptr_t sstride1);<br>
typedef void (*pixeladd_ss_t)(int bx, int by, int16_t *dst, intptr_t dstride, int16_t *src0, int16_t *src1, intptr_t sstride0, intptr_t sstride1);<br>
typedef void (*pixeladd_pp_t)(int bx, int by, pixel *dst, intptr_t dstride, pixel *src0, pixel *src1, intptr_t sstride0, intptr_t sstride1);<br>
typedef void (*pixelavg_pp_t)(pixel *dst, intptr_t dstride, pixel *src0, intptr_t sstride0, pixel *src1, intptr_t sstride1, int weight);<br>
typedef void (*blockfill_s_t)(int16_t *dst, intptr_t dstride, int16_t val);<br>
<br>
-typedef void (*intra_dc_t)(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, int width, int bFilter);<br>
-typedef void (*intra_planar_t)(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, int width);<br>
-typedef void (*intra_ang_t)(pixel* dst, int dstStride, int width, int dirMode, bool bFilter, pixel *refLeft, pixel *refAbove);<br>
+typedef void (*intra_dc_t)(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, uint32_t width, int bFilter);<br>
+typedef void (*intra_planar_t)(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, uint32_t width);<br>
+typedef void (*intra_ang_t)(pixel* dst, intptr_t dstStride, uint32_t width, uint32_t dirMode, bool bFilter, pixel *refLeft, pixel *refAbove);<br>
typedef void (*intra_allangs_t)(pixel *dst, pixel *above0, pixel *left0, pixel *above1, pixel *left1, bool bLuma);<br>
<br>
typedef void (*cvt16to32_shl_t)(int32_t *dst, int16_t *src, intptr_t, int, int);<br>
@@ -190,12 +190,12 @@<br>
<br>
typedef void (*dct_t)(int16_t *src, int32_t *dst, intptr_t stride);<br>
typedef void (*idct_t)(int32_t *src, int16_t *dst, intptr_t stride);<br>
-typedef void (*calcresidual_t)(pixel *fenc, pixel *pred, int16_t *residual, int stride);<br>
-typedef void (*calcrecon_t)(pixel* pred, int16_t* residual, pixel* recon, int16_t* reconqt, pixel *reconipred, int stride, int strideqt, int strideipred);<br>
+typedef void (*calcresidual_t)(pixel *fenc, pixel *pred, int16_t *residual, intptr_t stride);<br>
+typedef void (*calcrecon_t)(pixel* pred, int16_t* residual, pixel* recon, int16_t* reconqt, pixel *reconipred, intptr_t stride, int strideqt, int strideipred);<br>
typedef void (*transpose_t)(pixel* dst, pixel* src, intptr_t stride);<br>
-typedef uint32_t (*quant_t)(int32_t *coef, int32_t *quantCoeff, int32_t *deltaU, int32_t *qCoef, int qBits, int add, int numCoeff, int32_t* lastPos);<br>
-typedef void (*dequant_t)(const int32_t* src, int32_t* dst, int width, int height, int mcqp_miper, int mcqp_mirem, bool useScalingList,<br>
- unsigned int trSizeLog2, int32_t *dequantCoef);<br>
+typedef uint32_t (*quant_t)(int32_t *coef, int32_t *quantCoeff, int32_t *deltaU, int32_t *qCoef, int qBits, int add, uint32_t numCoeff, int32_t* lastPos);<br>
+typedef void (*dequant_t)(const int32_t* src, int32_t* dst, uint32_t width, uint32_t height, int mcqp_miper, int mcqp_mirem, bool useScalingList,<br>
+ uint32_t trSizeLog2, int32_t *dequantCoef);<br>
<br>
typedef void (*weightpUniPixel_t)(pixel *src, pixel *dst, intptr_t srcStride, intptr_t dstStride, int width, int height, int w0, int round, int shift, int offset);<br>
typedef void (*weightpUni_t)(int16_t *src, pixel *dst, intptr_t srcStride, intptr_t dstStride, int width, int height, int w0, int round, int shift, int offset);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/vec/blockcopy-sse3.cpp<br>
--- a/source/common/vec/blockcopy-sse3.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/vec/blockcopy-sse3.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -245,16 +245,16 @@<br>
}<br>
}<br>
<br>
-void pixelsub_sp(int bx, int by, int16_t *dst, intptr_t dstride, uint8_t *src0, uint8_t *src1, intptr_t sstride0, intptr_t sstride1)<br>
+void pixelsub_sp(uint32_t bx, uint32_t by, int16_t *dst, intptr_t dstride, uint8_t *src0, uint8_t *src1, intptr_t sstride0, intptr_t sstride1)<br>
{<br>
size_t aligncheck = (size_t)dst | (size_t)src0 | bx | sstride0 | sstride1 | dstride;<br>
<br>
if (!(aligncheck & 15))<br>
{<br>
// fast path, multiples of 16 pixel wide blocks<br>
- for (int y = 0; y < by; y++)<br>
+ for (uint32_t y = 0; y < by; y++)<br>
{<br>
- for (int x = 0; x < bx; x += 16)<br>
+ for (uint32_t x = 0; x < bx; x += 16)<br>
{<br>
__m128i word0, word1;<br>
__m128i word3, word4;<br>
@@ -280,9 +280,9 @@<br>
else<br>
{<br>
// slow path, irregular memory alignments or sizes<br>
- for (int y = 0; y < by; y++)<br>
+ for (uint32_t y = 0; y < by; y++)<br>
{<br>
- for (int x = 0; x < bx; x++)<br>
+ for (uint32_t x = 0; x < bx; x++)<br>
{<br>
dst[x] = (int16_t)(src0[x] - src1[x]);<br>
}<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/vec/dct-sse41.cpp<br>
--- a/source/common/vec/dct-sse41.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/vec/dct-sse41.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -46,7 +46,7 @@<br>
int32_t* qCoef,<br>
int qBits,<br>
int add,<br>
- int numCoeff,<br>
+ uint32_t numCoeff,<br>
int32_t* lastPos)<br>
{<br>
int qBits8 = qBits - 8;<br>
@@ -58,7 +58,7 @@<br>
__m128i posNext4 = _mm_set1_epi32(4);<br>
__m128i lastPos4 = _mm_set1_epi32(-1);<br>
<br>
- for (int blockpos = 0; blockpos < numCoeff; blockpos += 8)<br>
+ for (uint32_t blockpos = 0; blockpos < numCoeff; blockpos += 8)<br>
{<br>
__m128i maskZero;<br>
__m128i level1 = _mm_loadu_si128((__m128i*)(coef + blockpos));<br>
@@ -117,7 +117,7 @@<br>
return acSum;<br>
}<br>
<br>
-void dequant(const int32_t* quantCoef, int32_t* coef, int width, int height, int per, int rem, bool useScalingList, unsigned int log2TrSize, int32_t *deQuantCoef)<br>
+void dequant(const int32_t* quantCoef, int32_t* coef, uint32_t width, uint32_t height, int per, int rem, bool useScalingList, uint32_t log2TrSize, int32_t *deQuantCoef)<br>
{<br>
int invQuantScales[6] = { 40, 45, 51, 57, 64, 72 };<br>
<br>
@@ -140,7 +140,7 @@<br>
valueToAdd = 1 << (shift - per - 1);<br>
__m128i IAdd = _mm_set1_epi32(valueToAdd);<br>
<br>
- for (int n = 0; n < width * height; n = n + 8)<br>
+ for (uint32_t n = 0; n < width * height; n = n + 8)<br>
{<br>
__m128i quantCoef1, quantCoef2, deQuantCoef1, deQuantCoef2, quantCoef12, sign;<br>
<br>
@@ -168,7 +168,7 @@<br>
}<br>
else<br>
{<br>
- for (int n = 0; n < width * height; n = n + 8)<br>
+ for (uint32_t n = 0; n < width * height; n = n + 8)<br>
{<br>
__m128i quantCoef1, quantCoef2, deQuantCoef1, deQuantCoef2, quantCoef12, sign;<br>
<br>
@@ -211,7 +211,7 @@<br>
__m128i vScale = _mm_set1_epi32(scale);<br>
__m128i vAdd = _mm_set1_epi32(valueToAdd);<br>
<br>
- for (int n = 0; n < width * height; n = n + 8)<br>
+ for (uint32_t n = 0; n < width * height; n = n + 8)<br>
{<br>
__m128i quantCoef1, quantCoef2, quantCoef12, sign;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/vec/intra-sse41.cpp<br>
--- a/source/common/vec/intra-sse41.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/vec/intra-sse41.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -102,7 +102,7 @@<br>
}<br>
}<br>
<br>
-void intra_pred_dc(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, int width, int filter)<br>
+void intra_pred_dc(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, uint32_t width, int filter)<br>
{<br>
int sum;<br>
int logSize = g_convertToBit[width] + 2;<br>
@@ -611,7 +611,7 @@<br>
intra_pred_planar64_sse4,<br>
};<br>
<br>
-void intra_pred_planar(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, int width)<br>
+void intra_pred_planar(pixel* above, pixel* left, pixel* dst, intptr_t dstStride, uint32_t width)<br>
{<br>
int nLog2Size = g_convertToBit[width] + 2;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/vec/intra-ssse3.cpp<br>
--- a/source/common/vec/intra-ssse3.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/vec/intra-ssse3.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -152,7 +152,7 @@<br>
*(uint32_t*)(dst + (3 * dstStride)) = _mm_cvtsi128_si32(_mm_packus_epi16(row41, row41)); \<br>
}<br>
<br>
-void predIntraAng4_32(pixel* dst, int dstStride, pixel *refMain, int /*dirMode*/)<br>
+void predIntraAng4_32(pixel* dst, intptr_t dstStride, pixel *refMain, int /*dirMode*/)<br>
{<br>
__m128i tmp16_1;<br>
<br>
@@ -166,7 +166,7 @@<br>
*(uint32_t*)(dst + 3 * dstStride) = _mm_cvtsi128_si32(tmp16_1);<br>
}<br>
<br>
-void predIntraAng4_26(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_26(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -205,7 +205,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_21(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_21(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -240,7 +240,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_17(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_17(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -275,7 +275,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_13(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_13(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -306,7 +306,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_9(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_9(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -336,7 +336,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_5(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_5(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -361,7 +361,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_2(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_2(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -386,7 +386,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_2(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_m_2(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -411,7 +411,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_5(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_m_5(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -436,7 +436,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_9(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_m_9(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -466,7 +466,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_13(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_m_13(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -497,7 +497,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_17(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_m_17(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -532,7 +532,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_21(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_m_21(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -567,7 +567,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_26(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng4_m_26(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_4_START();<br>
<br>
@@ -606,7 +606,7 @@<br>
PRED_INTRA_ANGLE_4_END();<br>
}<br>
<br>
-void predIntraAng4_m_32(pixel* dst, int dstStride, pixel *refMain, int /*dirMode*/)<br>
+void predIntraAng4_m_32(pixel* dst, intptr_t dstStride, pixel *refMain, int /*dirMode*/)<br>
{<br>
__m128i tmp16_1;<br>
<br>
@@ -620,7 +620,7 @@<br>
*(uint32_t*)(dst + 3 * dstStride) = _mm_cvtsi128_si32(tmp16_1);<br>
}<br>
<br>
-typedef void (*predIntraAng4x4_func)(pixel* dst, int dstStride, pixel *refMain, int dirMode);<br>
+typedef void (*predIntraAng4x4_func)(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode);<br>
predIntraAng4x4_func predIntraAng4[] =<br>
{<br>
/* PredIntraAng4_0 is replaced with PredIntraAng4_2. For PredIntraAng4_0 we are going through default path in the<br>
@@ -660,7 +660,7 @@<br>
predIntraAng4_32<br>
};<br>
<br>
-void intraPredAng4x4(pixel* dst, int dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove, bool bFilter = true)<br>
+void intraPredAng4x4(pixel* dst, intptr_t dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove, bool bFilter = true)<br>
{<br>
assert(dirMode > 1); //no planar and dc<br>
static const int mode_to_angle_table[] = { 32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, -32, -26, -21, -17, -13, -9, -5, -2, 0, 2, 5, 9, 13, 17, 21, 26, 32 };<br>
@@ -859,7 +859,7 @@<br>
__m128i lowm, highm; \<br>
__m128i mask = _mm_set1_epi32(0x00FF00FF);<br>
<br>
-void predIntraAng8_32(pixel* dst, int dstStride, pixel *refMain, int /*dirMode*/)<br>
+void predIntraAng8_32(pixel* dst, intptr_t dstStride, pixel *refMain, int /*dirMode*/)<br>
{<br>
__m128i tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain + 2));<br>
_mm_storel_epi64((__m128i*)(dst), tmp16_1);<br>
@@ -879,7 +879,7 @@<br>
_mm_storel_epi64((__m128i*)(dst + 7 * dstStride), tmp16_1);<br>
}<br>
<br>
-void predIntraAng8_26(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng8_26(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
// Map the mode index to main prediction direction and angle<br>
bool modeHor = (dirMode < 18);<br>
@@ -949,7 +949,7 @@<br>
}<br>
}<br>
<br>
-void predIntraAng8_5(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng8_5(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_8_START();<br>
<br>
@@ -1038,7 +1038,7 @@<br>
}<br>
}<br>
<br>
-void predIntraAng8_2(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng8_2(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_8_START();<br>
<br>
@@ -1122,7 +1122,7 @@<br>
}<br>
}<br>
<br>
-void predIntraAng8_m_2(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng8_m_2(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_8_START();<br>
<br>
@@ -1206,7 +1206,7 @@<br>
}<br>
}<br>
<br>
-void predIntraAng8_m_5(pixel* dst, int dstStride, pixel *refMain, int dirMode)<br>
+void predIntraAng8_m_5(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode)<br>
{<br>
PRED_INTRA_ANGLE_8_START();<br>
<br>
@@ -1295,7 +1295,7 @@<br>
}<br>
}<br>
<br>
-typedef void (*predIntraAng8x8_func)(pixel* dst, int dstStride, pixel *refMain, int dirMode);<br>
+typedef void (*predIntraAng8x8_func)(pixel* dst, intptr_t dstStride, pixel *refMain, int dirMode);<br>
predIntraAng8x8_func predIntraAng8[] =<br>
{<br>
/* PredIntraAng8_0 is replaced with PredIntraAng8_2. For PredIntraAng8_0 we are going through default path<br>
@@ -1335,7 +1335,7 @@<br>
predIntraAng8_32<br>
};<br>
<br>
-void intraPredAng8x8(pixel* dst, int dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove, bool bFilter = true)<br>
+void intraPredAng8x8(pixel* dst, intptr_t dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove, bool bFilter = true)<br>
{<br>
int k;<br>
int blkSize = width;<br>
@@ -1561,7 +1561,7 @@<br>
BLND2_4(R3, R7); \<br>
BLND2_4(R4, R8);<br>
<br>
-void intraPredAng16x16(pixel* dst, int dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove, bool bFilter = true)<br>
+void intraPredAng16x16(pixel* dst, intptr_t dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove, bool bFilter = true)<br>
{<br>
int k;<br>
int blkSize = width;<br>
@@ -2154,7 +2154,7 @@<br>
PREDANG_CALCROW_HOR_MODE2(R6) \<br>
PREDANG_CALCROW_HOR_MODE2(R7) \<br>
<br>
-void intraPredAng32x32(pixel* dst, int dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove)<br>
+void intraPredAng32x32(pixel* dst, intptr_t dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove)<br>
{<br>
int k;<br>
int blkSize = width;<br>
@@ -3185,7 +3185,7 @@<br>
#undef MB4<br>
#undef CALC_BLND_8ROWS<br>
<br>
-void intra_pred_ang(pixel* dst, int dstStride, int width, int dirMode, bool bFilter, pixel *refLeft, pixel *refAbove)<br>
+void intra_pred_ang(pixel* dst, intptr_t dstStride, uint32_t width, uint32_t dirMode, bool bFilter, pixel *refLeft, pixel *refAbove)<br>
{<br>
switch (width)<br>
{<br>
@@ -3739,7 +3739,7 @@<br>
}<br>
}<br>
<br>
-void intraPredAng4x4(pixel* dst, int dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove)<br>
+void intraPredAng4x4(pixel* dst, intptr_t dstStride, int width, int dirMode, pixel *refLeft, pixel *refAbove)<br>
{<br>
int blkSize = width;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/vec/pixel-sse3.cpp<br>
--- a/source/common/vec/pixel-sse3.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/vec/pixel-sse3.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -305,7 +305,7 @@<br>
}<br>
}<br>
<br>
-void getResidual4(pixel *fenc, pixel *pred, int16_t *resi, int stride)<br>
+void getResidual4(pixel *fenc, pixel *pred, int16_t *resi, intptr_t stride)<br>
{<br>
__m128i T00, T01, T02;<br>
<br>
@@ -338,7 +338,7 @@<br>
_mm_storel_epi64((__m128i*)(resi + (3) * stride), T02);<br>
}<br>
<br>
-void getResidual8(pixel *fenc, pixel *pred, int16_t *resi, int stride)<br>
+void getResidual8(pixel *fenc, pixel *pred, int16_t *resi, intptr_t stride)<br>
{<br>
__m128i T00, T01, T02;<br>
<br>
@@ -399,7 +399,7 @@<br>
_mm_storeu_si128((__m128i*)(resi + (7) * stride), T02);<br>
}<br>
<br>
-void getResidual16(pixel *fenc, pixel *pred, int16_t *resi, int stride)<br>
+void getResidual16(pixel *fenc, pixel *pred, int16_t *resi, intptr_t stride)<br>
{<br>
__m128i T00, T01, T02, T03, T04;<br>
<br>
@@ -451,7 +451,7 @@<br>
RESIDUAL_16x4(12);<br>
}<br>
<br>
-void getResidual32(pixel *fenc, pixel *pred, int16_t *resi, int stride)<br>
+void getResidual32(pixel *fenc, pixel *pred, int16_t *resi, intptr_t stride)<br>
{<br>
__m128i T00, T01, T02, T03, T04;<br>
<br>
@@ -484,7 +484,7 @@<br>
}<br>
}<br>
<br>
-void getResidual64(pixel *fenc, pixel *pred, int16_t *resi, int stride)<br>
+void getResidual64(pixel *fenc, pixel *pred, int16_t *resi, intptr_t stride)<br>
{<br>
__m128i T00, T01, T02, T03, T04;<br>
<br>
@@ -497,7 +497,7 @@<br>
}<br>
}<br>
<br>
-void calcRecons4(pixel* pred, int16_t* resi, pixel* reco, int16_t* recQt, pixel* recIPred, int stride, int recstride, int predstride)<br>
+void calcRecons4(pixel* pred, int16_t* resi, pixel* reco, int16_t* recQt, pixel* recIPred, intptr_t stride, int recstride, int predstride)<br>
{<br>
for (int y = 0; y < 4; y++)<br>
{<br>
@@ -531,7 +531,7 @@<br>
}<br>
}<br>
<br>
-void calcRecons8(pixel* pred, int16_t* resi, pixel* reco, int16_t* recQt, pixel* recIPred, int stride, int recstride, int predstride)<br>
+void calcRecons8(pixel* pred, int16_t* resi, pixel* reco, int16_t* recQt, pixel* recIPred, intptr_t stride, int recstride, int predstride)<br>
{<br>
for (int y = 0; y < 8; y++)<br>
{<br>
@@ -566,7 +566,7 @@<br>
}<br>
<br>
template<int blockSize><br>
-void calcRecons(pixel* pred, int16_t* resi, pixel* reco, int16_t* recQt, pixel* recIPred, int stride, int recstride, int predstride)<br>
+void calcRecons(pixel* pred, int16_t* resi, pixel* reco, int16_t* recQt, pixel* recIPred, intptr_t stride, int recstride, int predstride)<br>
{<br>
for (int y = 0; y < blockSize; y++)<br>
{<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/version.cpp<br>
--- a/source/common/version.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/version.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -75,10 +75,10 @@<br>
<br>
#if HIGH_BIT_DEPTH<br>
#define BITDEPTH "16bpp"<br>
-const int x265_max_bit_depth = 8; // 12;<br>
+const uint32_t x265_max_bit_depth = 8; // 12;<br>
#else<br>
#define BITDEPTH "8bpp"<br>
-const int x265_max_bit_depth = 8;<br>
+const uint32_t x265_max_bit_depth = 8;<br>
#endif<br>
<br>
const char *x265_version_str = XSTR(X265_VERSION);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/wavefront.cpp<br>
--- a/source/common/wavefront.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/wavefront.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -31,7 +31,7 @@<br>
namespace x265 {<br>
// x265 private namespace<br>
<br>
-bool WaveFront::init(int numRows)<br>
+bool WaveFront::init(uint32_t numRows)<br>
{<br>
m_numRows = numRows;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/common/wavefront.h<br>
--- a/source/common/wavefront.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/common/wavefront.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -54,7 +54,7 @@<br>
virtual ~WaveFront();<br>
<br>
// If returns false, the frame must be encoded in series.<br>
- bool init(int numRows);<br>
+ bool init(uint32_t numRows);<br>
<br>
// Enqueue a row to be processed. A worker thread will later call ProcessRow(row)<br>
// This provider must be enqueued in the pool before enqueuing a row<br>
@@ -77,7 +77,7 @@<br>
<br>
// Start or resume encode processing of this row, must be implemented by<br>
// derived classes.<br>
- virtual void processRow(int row) = 0;<br>
+ virtual void processRow(uint32_t row) = 0;<br>
};<br>
} // end namespace x265<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/compat/getopt/getopt.c<br>
--- a/source/compat/getopt/getopt.c Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/compat/getopt/getopt.c Thu Oct 31 14:33:52 2013 +0530<br>
@@ -652,8 +652,8 @@<br>
for (p = longopts, option_index = 0; p->name; p++, option_index++)<br>
if (!strncmp (p->name, nextchar, nameend - nextchar))<br>
{<br>
- if ((unsigned int) (nameend - nextchar)<br>
- == (unsigned int) strlen (p->name))<br>
+ if ((uint32_t) (nameend - nextchar)<br>
+ == (uint32_t) strlen (p->name))<br>
{<br>
/* Exact match found. */<br>
pfound = p;<br>
@@ -844,7 +844,7 @@<br>
for (p = longopts, option_index = 0; p->name; p++, option_index++)<br>
if (!strncmp (p->name, nextchar, nameend - nextchar))<br>
{<br>
- if ((unsigned int) (nameend - nextchar) == strlen (p->name))<br>
+ if ((uint32_t) (nameend - nextchar) == strlen (p->name))<br>
{<br>
/* Exact match found. */<br>
pfound = p;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/bitcost.cpp<br>
--- a/source/encoder/bitcost.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/bitcost.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -31,7 +31,7 @@<br>
<br>
using namespace x265;<br>
<br>
-void BitCost::setQP(unsigned int qp)<br>
+void BitCost::setQP(uint32_t qp)<br>
{<br>
if (!s_costs[qp])<br>
{<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/bitcost.h<br>
--- a/source/encoder/bitcost.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/bitcost.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -38,7 +38,7 @@<br>
<br>
BitCost() : m_cost_mvx(0), m_cost_mvy(0), m_cost(0) {}<br>
<br>
- void setQP(unsigned int qp);<br>
+ void setQP(uint32_t qp);<br>
<br>
void setMVP(const MV& mvp) { m_mvp = mvp; m_cost_mvx = m_cost - mvp.x; m_cost_mvy = m_cost - mvp.y; }<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/compress.cpp<br>
--- a/source/encoder/compress.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/compress.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -102,7 +102,7 @@<br>
<br>
Pel* fenc = m_origYuv[depth]->getLumaAddr(0, width);<br>
Pel* pred = m_modePredYuv[5][depth]->getLumaAddr(0, width);<br>
- uint32_t stride = m_modePredYuv[5][depth]->getStride();<br>
+ intptr_t stride = m_modePredYuv[5][depth]->getStride();<br>
<br>
Pel *pAbove0 = m_search->refAbove + width - 1;<br>
Pel *pAbove1 = m_search->refAboveFlt + width - 1;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/dpb.cpp<br>
--- a/source/encoder/dpb.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/dpb.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -192,9 +192,9 @@<br>
}<br>
}<br>
<br>
-void DPB::computeRPS(int curPoc, bool isRAP, TComReferencePictureSet * rps, unsigned int maxDecPicBuffer)<br>
+void DPB::computeRPS(int curPoc, bool isRAP, TComReferencePictureSet * rps, uint32_t maxDecPicBuffer)<br>
{<br>
- unsigned int poci = 0, numNeg = 0, numPos = 0;<br>
+ uint32_t poci = 0, numNeg = 0, numPos = 0;<br>
<br>
TComPic* iterPic = m_picList.first();<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/dpb.h<br>
--- a/source/encoder/dpb.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/dpb.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -64,7 +64,7 @@<br>
<br>
protected:<br>
<br>
- void computeRPS(int curPoc, bool isRAP, TComReferencePictureSet * rps, unsigned int maxDecPicBuffer);<br>
+ void computeRPS(int curPoc, bool isRAP, TComReferencePictureSet * rps, uint32_t maxDecPicBuffer);<br>
<br>
void applyReferencePictureSet(TComReferencePictureSet *rps, int curPoc);<br>
void decodingRefreshMarking(int pocCurr, NalUnitType nalUnitType);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/encoder.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -89,7 +89,7 @@<br>
m_frameEncoder = new FrameEncoder[param.frameNumThreads];<br>
if (m_frameEncoder)<br>
{<br>
- for (int i = 0; i < param.frameNumThreads; i++)<br>
+ for (uint32_t i = 0; i < param.frameNumThreads; i++)<br>
{<br>
m_frameEncoder[i].setThreadPool(m_threadPool);<br>
}<br>
@@ -128,7 +128,7 @@<br>
{<br>
if (m_frameEncoder)<br>
{<br>
- for (int i = 0; i < param.frameNumThreads; i++)<br>
+ for (uint32_t i = 0; i < param.frameNumThreads; i++)<br>
{<br>
// Ensure frame encoder is idle before destroying it<br>
m_frameEncoder[i].getEncodedPicture(NULL);<br>
@@ -169,7 +169,7 @@<br>
if (m_frameEncoder)<br>
{<br>
int numRows = (param.sourceHeight + g_maxCUHeight - 1) / g_maxCUHeight;<br>
- for (int i = 0; i < param.frameNumThreads; i++)<br>
+ for (uint32_t i = 0; i < param.frameNumThreads; i++)<br>
{<br>
m_frameEncoder[i].init(this, numRows);<br>
}<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/frameencoder.h<br>
--- a/source/encoder/frameencoder.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/frameencoder.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -91,7 +91,7 @@<br>
WaveFront::enableRow(row * 2 + 1);<br>
}<br>
<br>
- void processRow(int row)<br>
+ void processRow(uint32_t row)<br>
{<br>
const int realRow = row >> 1;<br>
const int typeNum = row & 1;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/framefilter.cpp<br>
--- a/source/encoder/framefilter.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/framefilter.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -29,7 +29,7 @@<br>
<br>
using namespace x265;<br>
<br>
-static UInt64 computeSSD(pixel *fenc, pixel *rec, int stride, int width, int height);<br>
+static UInt64 computeSSD(pixel *fenc, pixel *rec, intptr_t stride, int width, int height);<br>
static float calculateSSIM(pixel *pix1, intptr_t stride1, pixel *pix2, intptr_t stride2, int width, int height, void *buf, int32_t *cnt);<br>
<br>
// **************************************************************************<br>
@@ -280,7 +280,7 @@<br>
TComPicYuv* recon = m_pic->getPicYuvRec();<br>
TComPicYuv* orig = m_pic->getPicYuvOrg();<br>
<br>
- int stride = recon->getStride();<br>
+ intptr_t stride = recon->getStride();<br>
int width = recon->getWidth() - m_cfg->m_pad[0];<br>
int height;<br>
<br>
@@ -306,8 +306,8 @@<br>
{<br>
pixel *rec = (pixel*)m_pic->getPicYuvRec()->getLumaAddr();<br>
pixel *org = (pixel*)m_pic->getPicYuvOrg()->getLumaAddr();<br>
- int stride1 = m_pic->getPicYuvOrg()->getStride();<br>
- int stride2 = m_pic->getPicYuvRec()->getStride();<br>
+ intptr_t stride1 = m_pic->getPicYuvOrg()->getStride();<br>
+ intptr_t stride2 = m_pic->getPicYuvRec()->getStride();<br>
int bEnd = ((row + 1) == (this->m_numRows - 1));<br>
int bStart = (row == 0);<br>
int minPixY = row * 64 - 4 * !bStart;<br>
@@ -326,7 +326,7 @@<br>
{<br>
uint32_t width = recon->getWidth();<br>
uint32_t height = recon->getCUHeight(row);<br>
- uint32_t stride = recon->getStride();<br>
+ intptr_t stride = recon->getStride();<br>
<br>
if (row == 0)<br>
{<br>
@@ -348,7 +348,7 @@<br>
{<br>
uint32_t width = recon->getWidth();<br>
uint32_t height = recon->getCUHeight(row);<br>
- uint32_t stride = recon->getStride();<br>
+ intptr_t stride = recon->getStride();<br>
if (row == 0)<br>
{<br>
m_pic->m_crc[0] = m_pic->m_crc[1] = m_pic->m_crc[2] = 0xffff;<br>
@@ -366,7 +366,7 @@<br>
{<br>
uint32_t width = recon->getWidth();<br>
uint32_t height = recon->getCUHeight(row);<br>
- uint32_t stride = recon->getStride();<br>
+ intptr_t stride = recon->getStride();<br>
uint32_t cuHeight = g_maxCUHeight;<br>
if (row == 0)<br>
{<br>
@@ -382,7 +382,7 @@<br>
}<br>
}<br>
<br>
-static UInt64 computeSSD(pixel *fenc, pixel *rec, int stride, int width, int height)<br>
+static UInt64 computeSSD(pixel *fenc, pixel *rec, intptr_t stride, int width, int height)<br>
{<br>
UInt64 ssd = 0;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/motion.cpp<br>
--- a/source/encoder/motion.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/motion.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -116,7 +116,7 @@<br>
X265_FREE(immedVal2);<br>
}<br>
<br>
-void MotionEstimate::setSourcePU(int offset, int width, int height)<br>
+void MotionEstimate::setSourcePU(int offset, uint32_t width, uint32_t height)<br>
{<br>
/* copy PU block into cache */<br>
primitives.blockcpy_pp(width, height, fenc, FENC_STRIDE, fencplane + offset, fencLumaStride);<br>
@@ -300,7 +300,7 @@<br>
MV & outQMv)<br>
{<br>
ALIGN_VAR_16(int, costs[16]);<br>
- size_t stride = ref->lumaStride;<br>
+ intptr_t stride = ref->lumaStride;<br>
pixel *fref = ref->fpelPlane + blockOffset;<br>
<br>
setMVP(qmvp);<br>
@@ -899,7 +899,7 @@<br>
{<br>
ALIGN_VAR_16(int, costs[16]);<br>
pixel *fref = ref->fpelPlane + blockOffset;<br>
- size_t stride = ref->lumaStride;<br>
+ intptr_t stride = ref->lumaStride;<br>
<br>
MV omv = bmv;<br>
int saved = bcost;<br>
@@ -1179,8 +1179,8 @@<br>
int yFrac = qmv.y & 0x3;<br>
<br>
assert(yFrac | xFrac);<br>
- int realWidth = blockwidth + (dir == 2);<br>
- int realHeight = blockheight + (dir == 1);<br>
+ uint32_t realWidth = blockwidth + (dir == 2);<br>
+ uint32_t realHeight = blockheight + (dir == 1);<br>
intptr_t realStride = FENC_STRIDE + (dir == 2);<br>
pixel *fref = ref->unweightedFPelPlane + blockOffset + (qmv.x >> 2) + (qmv.y >> 2) * ref->lumaStride;<br>
int shiftNum = IF_INTERNAL_PREC - X265_DEPTH;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/motion.h<br>
--- a/source/encoder/motion.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/motion.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -55,7 +55,7 @@<br>
pixel *subpelbuf;<br>
int16_t *immedVal;<br>
int16_t *immedVal2;<br>
- int blockwidth;<br>
+ uint32_t blockwidth;<br>
int blockheight;<br>
<br>
MotionEstimate& operator =(const MotionEstimate&);<br>
@@ -82,7 +82,7 @@<br>
fencLumaStride = luma;<br>
}<br>
<br>
- void setSourcePU(int offset, int pwidth, int pheight);<br>
+ void setSourcePU(int offset, uint32_t pwidth, uint32_t pheight);<br>
<br>
/* buf*() and motionEstimate() methods all use cached fenc pixels and thus<br>
* require setSourcePU() to be called prior. */<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/ratecontrol.cpp<br>
--- a/source/encoder/ratecontrol.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/ratecontrol.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -60,9 +60,9 @@<br>
}<br>
<br>
/* Find the energy of each block in Y/Cb/Cr plane */<br>
-static inline uint32_t acEnergyPlane(pixel* src, int srcStride, int bChroma)<br>
+static inline uint32_t acEnergyPlane(pixel* src, intptr_t srcStride, int bChroma)<br>
{<br>
- int blockStride = FENC_STRIDE >> 3;<br>
+ intptr_t blockStride = FENC_STRIDE >> 3;<br>
<br>
if (bChroma)<br>
{<br>
@@ -82,10 +82,10 @@<br>
pixel* srcLuma = pic->getPicYuvOrg()->getLumaAddr() ;<br>
pixel* srcCb = pic->getPicYuvOrg()->getCbAddr() ;<br>
pixel* srcCr = pic->getPicYuvOrg()->getCrAddr();<br>
- int frameStride = pic->getPicYuvOrg()->getStride();<br>
- int cStride = pic->getPicYuvOrg()->getCStride();<br>
- uint32_t blockOffsetLuma = block_x + (block_y * frameStride);<br>
- uint32_t blockOffsetChroma = (block_x >> 1) + ((block_y >> 1) * cStride);<br>
+ intptr_t frameStride = pic->getPicYuvOrg()->getStride();<br>
+ intptr_t cStride = pic->getPicYuvOrg()->getCStride();<br>
+ uint32_t blockOffsetLuma = block_x + (block_y * (uint32_t)frameStride);<br>
+ uint32_t blockOffsetChroma = (block_x >> 1) + ((block_y >> 1) * (uint32_t)cStride);<br>
var = acEnergyPlane(srcLuma + blockOffsetLuma, frameStride, 0);<br>
var += acEnergyPlane(srcCb + blockOffsetChroma, cStride, 1);<br>
var += acEnergyPlane(srcCr + blockOffsetChroma, cStride, 1);<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/reference.cpp<br>
--- a/source/encoder/reference.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/reference.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -89,7 +89,7 @@<br>
int height = ((rows - m_numWeightedRows) * g_maxCUHeight);<br>
if (rows == numRows)<br>
height = ((m_reconPic->getHeight() % g_maxCUHeight) ? (m_reconPic->getHeight() % g_maxCUHeight) : g_maxCUHeight);<br>
- size_t dstStride = lumaStride;<br>
+ intptr_t dstStride = lumaStride;<br>
<br>
// Computing weighted CU rows<br>
int shiftNum = IF_INTERNAL_PREC - X265_DEPTH;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/slicetype.cpp<br>
--- a/source/encoder/slicetype.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/slicetype.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -72,7 +72,7 @@<br>
heightInCU = ((cfg->param.sourceHeight / 2) + X265_LOWRES_CU_SIZE - 1) >> X265_LOWRES_CU_BITS;<br>
<br>
lhrows = new LookaheadRow[heightInCU];<br>
- for (int i = 0; i < heightInCU; i++)<br>
+ for (uint32_t i = 0; i < heightInCU; i++)<br>
{<br>
lhrows[i].widthInCU = widthInCU;<br>
lhrows[i].heightInCU = heightInCU;<br>
@@ -216,7 +216,7 @@<br>
fenc->costEstAq[b - p0][p1 - b] = 0;<br>
// TODO: use lowres MVs as motion candidates in full-res search<br>
<br>
- for (int i = 0; i < heightInCU; i++)<br>
+ for (uint32_t i = 0; i < heightInCU; i++)<br>
{<br>
lhrows[i].init();<br>
lhrows[i].me.setSourcePlane(fenc->lowresPlane[0], fenc->lumaStride);<br>
@@ -238,14 +238,14 @@<br>
}<br>
else<br>
{<br>
- for (int row = 0; row < heightInCU; row++)<br>
+ for (uint32_t row = 0; row < heightInCU; row++)<br>
{<br>
processRow(row);<br>
}<br>
}<br>
<br>
// Accumulate cost from each row<br>
- for (int row = 0; row < heightInCU; row++)<br>
+ for (uint32_t row = 0; row < heightInCU; row++)<br>
{<br>
score += lhrows[row].costEst;<br>
fenc->costEst[0][0] += lhrows[row].costIntra;<br>
@@ -295,7 +295,7 @@<br>
const int bBidir = (b < p1);<br>
const int cuXY = cux + cuy * widthInCU;<br>
const int cuSize = X265_LOWRES_CU_SIZE;<br>
- const int pelOffset = cuSize * cux + cuSize * cuy * fenc->lumaStride;<br>
+ const int pelOffset = cuSize * cux + cuSize * cuy * (int)fenc->lumaStride;<br>
<br>
// should this CU's cost contribute to the frame cost?<br>
const bool bFrameScoreCU = (cux > 0 && cux < widthInCU - 1 &&<br>
@@ -1072,7 +1072,7 @@<br>
return cost;<br>
}<br>
<br>
-void Lookahead::processRow(int row)<br>
+void Lookahead::processRow(uint32_t row)<br>
{<br>
int realrow = heightInCU - 1 - row;<br>
Lowres *fenc = frames[curb];<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/encoder/slicetype.h<br>
--- a/source/encoder/slicetype.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/encoder/slicetype.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -79,8 +79,8 @@<br>
Lowres *lastNonB;<br>
int numDecided;<br>
int lastKeyframe;<br>
- int widthInCU; // width of lowres frame in downscale CUs<br>
- int heightInCU; // height of lowres frame in downscale CUs<br>
+ uint32_t widthInCU; // width of lowres frame in downscale CUs<br>
+ uint32_t heightInCU; // height of lowres frame in downscale CUs<br>
<br>
PicList inputQueue; // input pictures in order received<br>
PicList outputQueue; // pictures to be encoded, in encode order<br>
@@ -109,7 +109,7 @@<br>
void slicetypePath(int length, char(*best_paths)[X265_LOOKAHEAD_MAX + 1]);<br>
int slicetypePathCost(char *path, int threshold);<br>
<br>
- void processRow(int row);<br>
+ void processRow(uint32_t row);<br>
};<br>
}<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/input/input.h<br>
--- a/source/input/input.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/input/input.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -49,15 +49,15 @@<br>
<br>
static Input* open(const char *filename, bool bForceY4m);<br>
<br>
- virtual void setDimensions(int width, int height) = 0;<br>
+ virtual void setDimensions(uint32_t width, uint32_t height) = 0;<br>
<br>
virtual void setBitDepth(uint32_t bitDepth) = 0;<br>
<br>
virtual float getRate() const = 0;<br>
<br>
- virtual int getWidth() const = 0;<br>
+ virtual uint32_t getWidth() const = 0;<br>
<br>
- virtual int getHeight() const = 0;<br>
+ virtual uint32_t getHeight() const = 0;<br>
<br>
virtual void startReader() = 0;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/input/y4m.h<br>
--- a/source/input/y4m.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/input/y4m.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -47,9 +47,9 @@<br>
<br>
uint32_t rateDenom;<br>
<br>
- int width;<br>
+ uint32_t width;<br>
<br>
- int height;<br>
+ uint32_t height;<br>
<br>
bool threadActive;<br>
<br>
@@ -78,15 +78,15 @@<br>
<br>
virtual ~Y4MInput();<br>
<br>
- void setDimensions(int, int) { /* ignore, warn */ }<br>
+ void setDimensions(uint32_t, uint32_t) { /* ignore, warn */ }<br>
<br>
void setBitDepth(uint32_t) { /* ignore, warn */ }<br>
<br>
float getRate() const { return ((float)rateNum) / rateDenom; }<br>
<br>
- int getWidth() const { return width; }<br>
+ uint32_t getWidth() const { return width; }<br>
<br>
- int getHeight() const { return height; }<br>
+ uint32_t getHeight() const { return height; }<br>
<br>
bool isEof() const { return (ifs && ifs->eof()); }<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/input/yuv.cpp<br>
--- a/source/input/yuv.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/input/yuv.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -42,7 +42,7 @@<br>
YUVInput::YUVInput(const char *filename)<br>
{<br>
#if defined ENABLE_THREAD<br>
- for (int i = 0; i < QUEUE_SIZE; i++)<br>
+ for (uint32_t i = 0; i < QUEUE_SIZE; i++)<br>
buf[i] = NULL;<br>
head = 0;<br>
tail = 0;<br>
@@ -123,7 +123,7 @@<br>
#endif<br>
}<br>
<br>
-void YUVInput::setDimensions(int w, int h)<br>
+void YUVInput::setDimensions(uint32_t w, uint32_t h)<br>
{<br>
width = w;<br>
height = h;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/input/yuv.h<br>
--- a/source/input/yuv.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/input/yuv.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -43,9 +43,9 @@<br>
{<br>
protected:<br>
<br>
- int width;<br>
+ uint32_t width;<br>
<br>
- int height;<br>
+ uint32_t height;<br>
<br>
uint32_t depth;<br>
<br>
@@ -79,15 +79,15 @@<br>
<br>
virtual ~YUVInput();<br>
<br>
- void setDimensions(int w, int h);<br>
+ void setDimensions(uint32_t w, uint32_t h);<br>
<br>
void setBitDepth(uint32_t bitDepth) { depth = bitDepth; }<br>
<br>
float getRate() const { return 0.0f; }<br>
<br>
- int getWidth() const { return width; }<br>
+ uint32_t getWidth() const { return width; }<br>
<br>
- int getHeight() const { return height; }<br>
+ uint32_t getHeight() const { return height; }<br>
<br>
bool isEof() const { return (ifs && ifs->eof()); }<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/output/output.cpp<br>
--- a/source/output/output.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/output/output.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -28,7 +28,7 @@<br>
<br>
using namespace x265;<br>
<br>
-Output* Output::open(const char *fname, int width, int height, uint32_t bitdepth, int rate)<br>
+Output* Output::open(const char *fname, uint32_t width, uint32_t height, uint32_t bitdepth, uint32_t rate)<br>
{<br>
const char * s = strrchr(fname, '.');<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/output/output.h<br>
--- a/source/output/output.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/output/output.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -39,7 +39,7 @@<br>
<br>
Output() {}<br>
<br>
- static Output* open(const char *fname, int width, int height, uint32_t bitdepth, int rate);<br>
+ static Output* open(const char *fname, uint32_t width, uint32_t height, uint32_t bitdepth, uint32_t rate);<br>
<br>
virtual bool isFail() const = 0;<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/output/y4m.cpp<br>
--- a/source/output/y4m.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/output/y4m.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -28,7 +28,7 @@<br>
using namespace x265;<br>
using namespace std;<br>
<br>
-Y4MOutput::Y4MOutput(const char *filename, int w, int h, int rate)<br>
+Y4MOutput::Y4MOutput(const char *filename, uint32_t w, uint32_t h, uint32_t rate)<br>
: width(w)<br>
, height(h)<br>
{<br>
@@ -58,9 +58,9 @@<br>
{<br>
// encoder gave us short pixels, downscale, then write<br>
uint16_t *Y = (uint16_t*)pic.planes[0];<br>
- for (int i = 0; i < height; i++)<br>
+ for (uint32_t i = 0; i < height; i++)<br>
{<br>
- for (int j = 0; j < width; j++)<br>
+ for (uint32_t j = 0; j < width; j++)<br>
{<br>
buf[j] = (char)Y[j];<br>
}<br>
@@ -69,9 +69,9 @@<br>
Y += pic.stride[0];<br>
}<br>
uint16_t *U = (uint16_t*)pic.planes[1];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
- for (int j = 0; j < width >> 1; j++)<br>
+ for (uint32_t j = 0; j < width >> 1; j++)<br>
{<br>
buf[j] = (char)U[j];<br>
}<br>
@@ -80,9 +80,9 @@<br>
U += pic.stride[1];<br>
}<br>
uint16_t *V = (uint16_t*)pic.planes[2];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
- for (int j = 0; j < width >> 1; j++)<br>
+ for (uint32_t j = 0; j < width >> 1; j++)<br>
{<br>
buf[j] = (char)V[j];<br>
}<br>
@@ -94,21 +94,21 @@<br>
else<br>
{<br>
char *Y = (char*)pic.planes[0];<br>
- for (int i = 0; i < height; i++)<br>
+ for (uint32_t i = 0; i < height; i++)<br>
{<br>
ofs.write(Y, width);<br>
Y += pic.stride[0];<br>
}<br>
<br>
char *U = (char*)pic.planes[1];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
ofs.write(U, width >> 1);<br>
U += pic.stride[1];<br>
}<br>
<br>
char *V = (char*)pic.planes[2];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
ofs.write(V, width >> 1);<br>
V += pic.stride[2];<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/output/y4m.h<br>
--- a/source/output/y4m.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/output/y4m.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -34,9 +34,9 @@<br>
{<br>
protected:<br>
<br>
- int width;<br>
+ uint32_t width;<br>
<br>
- int height;<br>
+ uint32_t height;<br>
<br>
std::ofstream ofs;<br>
<br>
@@ -48,7 +48,7 @@<br>
<br>
public:<br>
<br>
- Y4MOutput(const char *filename, int width, int height, int rate);<br>
+ Y4MOutput(const char *filename, uint32_t width, uint32_t height, uint32_t rate);<br>
<br>
virtual ~Y4MOutput();<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/output/yuv.cpp<br>
--- a/source/output/yuv.cpp Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/output/yuv.cpp Thu Oct 31 14:33:52 2013 +0530<br>
@@ -28,7 +28,7 @@<br>
using namespace x265;<br>
using namespace std;<br>
<br>
-YUVOutput::YUVOutput(const char *filename, int w, int h, uint32_t d)<br>
+YUVOutput::YUVOutput(const char *filename, uint32_t w, uint32_t h, uint32_t d)<br>
: width(w)<br>
, height(h)<br>
, depth(d)<br>
@@ -54,9 +54,9 @@<br>
{<br>
// encoder gave us short pixels, downscale, then write<br>
uint16_t *Y = (uint16_t*)pic.planes[0];<br>
- for (int i = 0; i < height; i++)<br>
+ for (uint32_t i = 0; i < height; i++)<br>
{<br>
- for (int j = 0; j < width; j++)<br>
+ for (uint32_t j = 0; j < width; j++)<br>
{<br>
buf[j] = (char)Y[j];<br>
}<br>
@@ -65,9 +65,9 @@<br>
Y += pic.stride[0];<br>
}<br>
uint16_t *U = (uint16_t*)pic.planes[1];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
- for (int j = 0; j < width >> 1; j++)<br>
+ for (uint32_t j = 0; j < width >> 1; j++)<br>
{<br>
buf[j] = (char)U[j];<br>
}<br>
@@ -76,9 +76,9 @@<br>
U += pic.stride[1];<br>
}<br>
uint16_t *V = (uint16_t*)pic.planes[2];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
- for (int j = 0; j < width >> 1; j++)<br>
+ for (uint32_t j = 0; j < width >> 1; j++)<br>
{<br>
buf[j] = (char)V[j];<br>
}<br>
@@ -91,21 +91,21 @@<br>
{<br>
// encoder pixels same size as output pixels, write them directly<br>
char *Y = (char*)pic.planes[0];<br>
- for (int i = 0; i < height; i++)<br>
+ for (uint32_t i = 0; i < height; i++)<br>
{<br>
ofs.write(Y, width * pixelbytes);<br>
Y += pic.stride[0] * pixelbytes;<br>
}<br>
<br>
char *U = (char*)pic.planes[1];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
ofs.write(U, (width >> 1) * pixelbytes);<br>
U += pic.stride[1] * pixelbytes;<br>
}<br>
<br>
char *V = (char*)pic.planes[2];<br>
- for (int i = 0; i < height >> 1; i++)<br>
+ for (uint32_t i = 0; i < height >> 1; i++)<br>
{<br>
ofs.write(V, (width >> 1) * pixelbytes);<br>
V += pic.stride[2] * pixelbytes;<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/output/yuv.h<br>
--- a/source/output/yuv.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/output/yuv.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -35,9 +35,9 @@<br>
{<br>
protected:<br>
<br>
- int width;<br>
+ uint32_t width;<br>
<br>
- int height;<br>
+ uint32_t height;<br>
<br>
uint32_t depth;<br>
<br>
@@ -47,7 +47,7 @@<br>
<br>
public:<br>
<br>
- YUVOutput(const char *filename, int width, int height, uint32_t bitdepth);<br>
+ YUVOutput(const char *filename, uint32_t width, uint32_t height, uint32_t bitdepth);<br>
<br>
virtual ~YUVOutput();<br>
<br>
diff -r 0666d56aaa42 -r b7f2aac2b3fe source/x265.h<br>
--- a/source/x265.h Mon Oct 28 16:13:05 2013 +0530<br>
+++ b/source/x265.h Thu Oct 31 14:33:52 2013 +0530<br>
@@ -130,7 +130,7 @@<br>
typedef struct<br>
{<br>
void* planes[3];<br>
- int stride[3];<br>
+ intptr_t stride[3];<br>
int bitDepth;<br>
int sliceType;<br>
int poc;<br>
@@ -245,18 +245,18 @@<br>
typedef struct<br>
{<br>
int logLevel;<br>
- int bEnableWavefront; ///< enable wavefront parallel processing<br>
- int poolNumThreads; ///< number of threads to allocate for thread pool<br>
- int frameNumThreads; ///< number of concurrently encoded frames<br>
+ uint32_t bEnableWavefront; ///< enable wavefront parallel processing<br>
+ uint32_t poolNumThreads; ///< number of threads to allocate for thread pool<br>
+ uint32_t frameNumThreads; ///< number of concurrently encoded frames<br>
<br>
- int internalBitDepth; ///< bit-depth at which the encoder operates<br>
+ uint32_t internalBitDepth; ///< bit-depth at which the encoder operates<br>
<br>
const char *csvfn; ///< csv log filename. logLevel >= 3 is frame logging, else one line per run<br>
<br>
// source specification<br>
- int frameRate; ///< source frame-rate in Hz<br>
- int sourceWidth; ///< source width in pixels<br>
- int sourceHeight; ///< source height in pixels<br>
+ uint32_t frameRate; ///< source frame-rate in Hz<br>
+ uint32_t sourceWidth; ///< source width in pixels<br>
+ uint32_t sourceHeight; ///< source height in pixels<br>
<br>
// coding unit (CU) definition<br>
uint32_t maxCUSize; ///< max. CU width and height in pixels<br>
@@ -265,60 +265,60 @@<br>
uint32_t tuQTMaxIntraDepth; ///< amount the TU is allow to recurse beyond the intra PU depth<br>
<br>
// coding structure<br>
- int decodingRefreshType; ///< Intra refresh type (0:none, 1:CDR, 2:IDR) default: 1<br>
+ uint32_t decodingRefreshType; ///< Intra refresh type (0:none, 1:CDR, 2:IDR) default: 1<br>
int keyframeMin; ///< Minimum intra period in frames<br>
int keyframeMax; ///< Maximum intra period in frames<br>
int bOpenGOP; ///< Enable Open GOP referencing<br>
int bframes; ///< Max number of consecutive B-frames<br>
int lookaheadDepth; ///< Number of frames to use for lookahead, determines encoder latency<br>
- int bFrameAdaptive; ///< 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling<br>
+ uint32_t bFrameAdaptive; ///< 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling<br>
int bFrameBias;<br>
int scenecutThreshold; ///< how aggressively to insert extra I frames<br>
<br>
// Intra coding tools<br>
- int bEnableConstrainedIntra; ///< enable constrained intra prediction (ignore inter predicted reference samples)<br>
- int bEnableStrongIntraSmoothing; ///< enable strong intra smoothing for 32x32 blocks where the reference samples are flat<br>
+ uint32_t bEnableConstrainedIntra; ///< enable constrained intra prediction (ignore inter predicted reference samples)<br>
+ uint32_t bEnableStrongIntraSmoothing; ///< enable strong intra smoothing for 32x32 blocks where the reference samples are flat<br>
<br>
// Inter coding tools<br>
- int searchMethod; ///< ME search method (DIA, HEX, UMH, STAR, FULL)<br>
- int subpelRefine; ///< amount of subpel work to perform (0 .. X265_MAX_SUBPEL_LEVEL)<br>
- int searchRange; ///< ME search range<br>
+ uint32_t searchMethod; ///< ME search method (DIA, HEX, UMH, STAR, FULL)<br>
+ uint32_t subpelRefine; ///< amount of subpel work to perform (0 .. X265_MAX_SUBPEL_LEVEL)<br>
+ uint32_t searchRange; ///< ME search range<br>
uint32_t maxNumMergeCand; ///< Max number of merge candidates<br>
- int bEnableWeightedPred; ///< enable weighted prediction in P slices<br>
+ uint32_t bEnableWeightedPred; ///< enable weighted prediction in P slices<br>
int bEnableWeightedBiPred; ///< enable bi-directional weighted prediction in B slices<br>
<br>
int bEnableAMP; ///< enable asymmetrical motion predictions<br>
- int bEnableRectInter; ///< enable rectangular inter modes 2NxN, Nx2N<br>
- int bEnableCbfFastMode; ///< enable use of Cbf flags for fast mode decision<br>
+ uint32_t bEnableRectInter; ///< enable rectangular inter modes 2NxN, Nx2N<br>
+ uint32_t bEnableCbfFastMode; ///< enable use of Cbf flags for fast mode decision<br>
int bEnableEarlySkip; ///< enable early skip (merge) detection<br>
int rdLevel; ///< Configure RDO work level<br>
- int bEnableRDO;<br>
- int bEnableRDOQ;<br>
- int bEnableSignHiding; ///< enable hiding one sign bit per TU via implicit signaling<br>
- int bEnableTransformSkip; ///< enable intra transform skipping<br>
- int bEnableTSkipFast; ///< enable fast intra transform skipping<br>
+ uint32_t bEnableRDO;<br>
+ uint32_t bEnableRDOQ;<br>
+ uint32_t bEnableSignHiding; ///< enable hiding one sign bit per TU via implicit signaling<br>
+ uint32_t bEnableTransformSkip; ///< enable intra transform skipping<br>
+ uint32_t bEnableTSkipFast; ///< enable fast intra transform skipping<br>
int bEnableRDOQTS; ///< enable RD optimized quantization when transform skip is selected<br>
int maxNumReferences; ///< maximum number of references a frame can have in L0<br>
<br>
// loop filter<br>
- int bEnableLoopFilter; ///< enable Loop Filter<br>
+ uint32_t bEnableLoopFilter; ///< enable Loop Filter<br>
<br>
// SAO loop filter<br>
- int bEnableSAO; ///< enable SAO filter<br>
- int saoLcuBoundary; ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas<br>
- int saoLcuBasedOptimization; ///< SAO LCU-based optimization<br>
+ uint32_t bEnableSAO; ///< enable SAO filter<br>
+ uint32_t saoLcuBoundary; ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas<br>
+ uint32_t saoLcuBasedOptimization; ///< SAO LCU-based optimization<br>
<br>
// coding quality<br>
int cbQpOffset; ///< Chroma Cb QP Offset (0:default)<br>
int crQpOffset; ///< Chroma Cr QP Offset (0:default)<br>
- int rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty)<br>
+ uint32_t rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty)<br>
<br>
// debugging<br>
- int decodedPictureHashSEI; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message<br>
+ uint32_t decodedPictureHashSEI; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message<br>
<br>
// quality metrics<br>
- int bEnablePsnr;<br>
- int bEnableSsim;<br>
+ uint32_t bEnablePsnr;<br>
+ uint32_t bEnableSsim;<br>
struct<br>
{<br>
int bitrate;<br>
@@ -376,7 +376,7 @@<br>
* x265_max_bit_depth is 12, the internal and input bit depths can be<br>
* either 8, 10, or 12. Note that the internal bit depth must be the same<br>
* for all encoders allocated in the same process. */<br>
-extern const int x265_max_bit_depth;<br>
+extern const uint32_t x265_max_bit_depth;<br>
<br>
/* x265_version_str:<br>
* A static string containing the version of this compiled x265 library */<br>
</blockquote></div><br></div>