@@ -1326,8 +1326,12 @@ int32_t TgenViewport::ERPSelectRegion(short inputWidth, short inputHeight, shor
13261326 float fPitch = m_codingSVideoInfo.viewPort .fPitch ;
13271327 float vFOV = m_codingSVideoInfo.viewPort .vFOV ;
13281328 float hFOV = m_codingSVideoInfo.viewPort .hFOV ;
1329+ #ifndef _ANDROID_NDK_OPTION_
13291330 float leftCol[m_tileNumRow] = {float (m_tileNumCol)};
13301331 float rightCol[m_tileNumRow] = {-1 };
1332+ #else
1333+ float leftCol[m_tileNumRow], rightCol[m_tileNumRow];
1334+ #endif
13311335 bool bHasOccupiedTile;
13321336 float horzStep = ERP_HORZ_ANGLE / (float )m_tileNumCol;
13331337 float vertStep = ERP_VERT_ANGLE / (float )m_tileNumRow;
@@ -1364,9 +1368,24 @@ int32_t TgenViewport::ERPSelectRegion(short inputWidth, short inputHeight, shor
13641368 centerCol = (clampAngle (fYaw , -ERP_HORZ_ANGLE / 2 , ERP_HORZ_ANGLE / 2 ) + ERP_HORZ_ANGLE / 2 ) / horzStep;
13651369 int32_t row, tileIdx;
13661370 float col;
1371+ #ifndef _ANDROID_NDK_OPTION_
13671372 float distanceLeftToCenter[m_tileNumRow] = {-1.0 };
13681373 float distanceRightToCenter[m_tileNumRow] = {-1.0 };
1374+ #else
1375+ float distanceLeftToCenter[m_tileNumRow], distanceRightToCenter[m_tileNumRow];
13691376
1377+ for (uint32_t i = 0 ; i < m_tileNumRow; i++) {
1378+ for (uint32_t j = 0 ; j < m_tileNumCol; j++) {
1379+ leftCol[i] = m_tileNumCol;
1380+ rightCol[i] = -1 ;
1381+ }
1382+ }
1383+
1384+ for (uint32_t i = 0 ; i < m_tileNumRow; i++) {
1385+ distanceLeftToCenter[i] = -1 ;
1386+ distanceRightToCenter[i] = -1 ;
1387+ }
1388+ #endif
13701389 /* Search in top vertical boundary */
13711390 for (float offsetAngle = hFOV/2 ; offsetAngle >= 0 ; offsetAngle -= HORZ_BOUNDING_STEP) {
13721391 pVertBoundaryPoint->alpha = clampAngle (pVertBoundaryPoint->alpha , -ERP_HORZ_ANGLE/2 , ERP_HORZ_ANGLE/2 ) + ERP_HORZ_ANGLE / 2 ;
0 commit comments