Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit ab1bbe2

Browse files
luoying1234U1X6WK
authored andcommitted
Fix build error issue in android platform.
Signed-off-by: Luo, Ying <ying2.luo@intel.com>
1 parent 9b8569a commit ab1bbe2

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

src/360SCVP/360SCVPViewportImpl.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

src/360SCVP/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ else()
2323
ADD_DEFINITIONS("-fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Wall -Werror -g -c -fPIC -std=c++11")
2424
endif()
2525

26+
IF(USE_ANDROID_NDK)
27+
ADD_DEFINITIONS("-D_ANDROID_NDK_OPTION_")
28+
ENDIF()
29+
2630
INCLUDE_DIRECTORIES(/usr/local/include ./ ../utils ../plugins/360SCVP_Plugins/TileSelection_Plugins)
2731
LINK_DIRECTORIES(/usr/local/lib)
2832

0 commit comments

Comments
 (0)