diff --git a/source/Lib/TLibCommon/TComPicYuv.cpp b/source/Lib/TLibCommon/TComPicYuv.cpp
old mode 100755
new mode 100644
index a6e6d78..87c7168
a
|
b
|
|
96 | 96 | for(UInt comp=0; comp<getNumberValidComponents(); comp++) |
97 | 97 | { |
98 | 98 | const ComponentID ch=ComponentID(comp); |
99 | | m_apiPicBuf[comp] = (Pel*)xMalloc( Pel, getStride(ch) * getTotalHeight(ch)); |
100 | | m_piPicOrg[comp] = m_apiPicBuf[comp] + (m_marginY >> getComponentScaleY(ch)) * getStride(ch) + (m_marginX >> getComponentScaleX(ch)); |
| 99 | if ( m_apiPicBuf[comp] == NULL ) |
| 100 | { |
| 101 | m_apiPicBuf[comp] = (Pel*)xMalloc( Pel, getStride(ch) * getTotalHeight(ch)); |
| 102 | m_piPicOrg[comp] = m_apiPicBuf[comp] + (m_marginY >> getComponentScaleY(ch)) * getStride(ch) + (m_marginX >> getComponentScaleX(ch)); |
| 103 | } |
101 | 104 | } |
102 | 105 | // initialize pointers for unused components to NULL |
103 | 106 | for(UInt comp=getNumberValidComponents();comp<MAX_NUM_COMPONENT; comp++) |
… |
… |
|
106 | 109 | m_piPicOrg[comp] = NULL; |
107 | 110 | } |
108 | 111 | |
109 | | for(Int chan=0; chan<MAX_NUM_CHANNEL_TYPE; chan++) |
| 112 | for(UInt chan=0; chan<MAX_NUM_CHANNEL_TYPE; chan++) |
110 | 113 | { |
111 | | m_ctuOffsetInBuffer[chan] = NULL; |
112 | | m_subCuOffsetInBuffer[chan] = NULL; |
| 114 | if (m_ctuOffsetInBuffer[chan]) |
| 115 | { |
| 116 | delete[] m_ctuOffsetInBuffer[chan]; |
| 117 | m_ctuOffsetInBuffer[chan] = NULL; |
| 118 | } |
| 119 | if (m_subCuOffsetInBuffer[chan]) |
| 120 | { |
| 121 | delete[] m_subCuOffsetInBuffer[chan]; |
| 122 | m_subCuOffsetInBuffer[chan] = NULL; |
| 123 | } |
113 | 124 | } |
114 | 125 | } |
115 | 126 | |