Skip to content
This repository was archived by the owner on Feb 16, 2019. It is now read-only.

Commit df9413b

Browse files
author
unknown
committed
release 0.9.1
1 parent c4e09f6 commit df9413b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2163
-1160
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required (VERSION 3.1)
21+
cmake_minimum_required (VERSION 2.8)
2222
project(amdovx)
2323

2424
add_subdirectory(openvx)

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ AMD OpenVX (beta preview) is a highly optimized open source implementation of th
44
#### Features
55
* The code is highly optimized for both x86 CPU and OpenCL for GPU
66
* Supported hardware spans the range from low power embedded APUs (like the new G series) to laptop, desktop and workstation graphics
7-
* Supports Windows and Linux
7+
* Supports Windows, Linux, and OS X
88
* Includes a “graph optimizer” that looks at the entire processing pipeline and removes/replaces/merges functions to improve performance and minimize bandwidth at runtime
99
* Scripting support allows for rapid prototyping, without re-compiling at production performance levels
1010
* Interoperates with the popular (open source library) OpenCV
@@ -18,13 +18,17 @@ Build this project to generate AMD OpenVX library and RUNVX executable.
1818
## Build Instructions
1919

2020
#### Pre-requisites
21-
* AMD APP SDK 3.0 [download](http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/).
21+
* CMake 2.8 or newer [download](http://cmake.org/download/).
2222
* OpenCV 3.0 [download](http://opencv.org/downloads.html).
23-
* CMake 3.1 or newer [download](http://cmake.org/download/).
2423
* OpenCV_DIR environment variable should point to OpenCV/build folder
24+
* CPU: SSE4.1 or above CPU, 64-bit.
25+
* GPU: Radeon R7 Series or above (Kaveri+ APU), Radeon 3xx Series or above (optional)
26+
* DRIVER: AMD Catalyst 15.7 or higher (version 15.20) with OpenCL 2.0 runtimes
27+
* AMD APP SDK 3.0 [download](http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/).
28+
* libssl-dev on linux (optional)
2529

2630
#### Build using Visual Studio Professional 2013 on 64-bit Windows 10/8.1/7
2731
* Use amdovx-core/amdovx.sln to build for x64 platform
2832

29-
#### Build using CMake on Linux (Ubuntu 15.10 64-bit)
33+
#### Build using CMake
3034
* Use CMake to configure and generate Makefile

openvx/CMakeLists.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020

21-
cmake_minimum_required (VERSION 3.1)
21+
cmake_minimum_required (VERSION 2.8)
2222
project (openvx)
2323

2424
set (CMAKE_CXX_STANDARD 11)
2525

26-
find_package(OpenCL)
26+
find_package(OpenCL QUIET)
2727

2828
include_directories(include ago api)
2929

@@ -63,7 +63,7 @@ list(APPEND SOURCES
6363
api/vx_nodes.cpp
6464
)
6565

66-
add_library(openvx STATIC ${SOURCES})
66+
add_library(openvx SHARED ${SOURCES})
6767

6868
if (OpenCL_FOUND)
6969
target_compile_definitions(openvx PUBLIC ENABLE_OPENCL=1)
@@ -73,10 +73,14 @@ else(OpenCL_FOUND)
7373
target_compile_definitions(openvx PUBLIC ENABLE_OPENCL=0)
7474
endif(OpenCL_FOUND)
7575

76-
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
77-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -mxop")
76+
if( POLICY CMP0054 )
77+
cmake_policy( SET CMP0054 OLD )
78+
endif()
79+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
80+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /DVX_API_ENTRY=__declspec(dllexport)")
81+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /DVX_API_ENTRY=__declspec(dllexport)")
82+
else()
83+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=c++11")
7884
target_link_libraries(openvx dl)
79-
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
80-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
81-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
8285
endif()
86+

openvx/ago/ago_drama.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,12 @@ int agoOptimizeDramaComputeGraphHierarchy(AgoGraph * graph)
309309
#endif
310310
if (data->outputUsageCount > 1) {
311311
vx_status status = VX_ERROR_MULTIPLE_WRITERS;
312-
agoAddLogEntry(&graph->ref, status, "ERROR: vxVerifyGraph: kernel %s: multiple writers for argument#%d (%s)\n", node->akernel->name, arg, data->name);
312+
agoAddLogEntry(&graph->ref, status, "ERROR: vxVerifyGraph: kernel %s: multiple writers for argument#%d (%s)\n", node->akernel->name, arg, data->name.c_str());
313313
return status;
314314
}
315315
else if (data->isVirtual && data->outputUsageCount == 0 && !data->isInitialized) {
316316
vx_status status = VX_ERROR_MULTIPLE_WRITERS;
317-
agoAddLogEntry(&graph->ref, status, "ERROR: vxVerifyGraph: kernel %s: no writer/initializer for virtual buffer at argument#%d (%s)\n", node->akernel->name, arg, data->name);
317+
agoAddLogEntry(&graph->ref, status, "ERROR: vxVerifyGraph: kernel %s: no writer/initializer for virtual buffer at argument#%d (%s)\n", node->akernel->name, arg, data->name.c_str());
318318
return status;
319319
}
320320
}

openvx/ago/ago_drama_remove.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,8 +1241,8 @@ int agoOptimizeDramaRemoveNodeMerge(AgoGraph * agraph)
12411241
}
12421242
// transfer configuration from rule to childnode
12431243
childnode->attr_affinity = attr_affinity;
1244-
childnode->attr_border_mode;
1245-
childnode->callback;
1244+
//childnode->attr_border_mode = attr_border_mode;
1245+
//childnode->callback = callback;
12461246
debug_printf("INFO: agoOptimizeDramaRemoveNodeMerge: added node %s\n", childnode->akernel->name);
12471247
// verify the node
12481248
if (agoVerifyNode(childnode)) {

openvx/ago/ago_haf_cpu_canny.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -589,12 +589,6 @@ int HafCpu_CannySuppThreshold_U8XY_U16_3x3
589589
}
590590
}
591591
*pxyStackTop = (vx_uint32)(pxyStack - xyStack);
592-
// printf("Number of points in XY stack: %d\n", *pxyStackTop);
593-
#if 0
594-
FILE *fp = fopen("c:\\temp\\norm.yuv", "wb");
595-
if (fp) fwrite(pDst, 1, 640 * 480, fp);
596-
fclose(fp);
597-
#endif
598592
return AGO_SUCCESS;
599593
}
600594

openvx/ago/ago_haf_cpu_geometric.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ int HafCpu_Remap_U8_U8_Nearest
134134
if (extra_pixels){
135135
unsigned char *pd = (unsigned char *)pdst;
136136
for (unsigned int i = 0; i < extra_pixels; i++, pMapY_X++){
137-
int x = (pMapY_X->x != 0xFFFF) ? (pMapY_X->x >> 3) + ((pMapY_X->x&7)>>2): 0;
138-
int y = (pMapY_X->y != 0xFFFF) ? (pMapY_X->y >> 3) + ((pMapY_X->y&7)>>2) : 0;
137+
int x = (pMapY_X->x != -1) ? (pMapY_X->x >> 3) + ((pMapY_X->x&7)>>2): 0;
138+
int y = (pMapY_X->y != -1) ? (pMapY_X->y >> 3) + ((pMapY_X->y&7)>>2) : 0;
139139
pd[i] = pSrcImage[y*srcImageStrideInBytes + x];
140140
}
141141
}
@@ -234,8 +234,8 @@ int HafCpu_Remap_U8_U8_Nearest_Constant
234234
if (extra_pixels){
235235
unsigned char *pd = (unsigned char *)pdst;
236236
for (unsigned int i = 0; i < extra_pixels; i++, pMapY_X++){
237-
int x = (pMapY_X->x != 0xFFFF) ? (pMapY_X->x >> 3) + ((pMapY_X->x & 7) >> 2) : border;
238-
int y = (pMapY_X->y != 0xFFFF) ? (pMapY_X->y >> 3) + ((pMapY_X->y & 7) >> 2) : border;
237+
int x = (pMapY_X->x != -1) ? (pMapY_X->x >> 3) + ((pMapY_X->x & 7) >> 2) : border;
238+
int y = (pMapY_X->y != -1) ? (pMapY_X->y >> 3) + ((pMapY_X->y & 7) >> 2) : border;
239239
pd[i] = pSrcImage[y*srcImageStrideInBytes + x];
240240
}
241241
}
@@ -1939,8 +1939,8 @@ ago_scale_matrix_t * matrix
19391939
(pSrcImage[M128I(mapx3).m128i_i32[2]] << 16) | (pSrcImage[M128I(mapx3).m128i_i32[3]] << 24);
19401940

19411941
}
1942-
while (x < dstWidth)
1943-
pDstImage[x] = pSrcImage[Xmap[x++] + yadd];
1942+
for (; x < dstWidth; x++)
1943+
pDstImage[x] = pSrcImage[Xmap[x] + yadd];
19441944

19451945
pDstImage += dstImageStrideInBytes;
19461946

@@ -1952,8 +1952,8 @@ ago_scale_matrix_t * matrix
19521952
{
19531953
unsigned int yadd = Ymap[y] * srcImageStrideInBytes;
19541954
x = 0;
1955-
while (x < dstWidth)
1956-
pDstImage[x] = pSrcImage[Xmap[x++] + yadd];
1955+
for (; x < dstWidth; x++)
1956+
pDstImage[x] = pSrcImage[Xmap[x] + yadd];
19571957
pDstImage += dstImageStrideInBytes;
19581958
}
19591959
}
@@ -2782,4 +2782,4 @@ int HafCpu_ScaleGaussianHalf_U8_U8_3x3
27822782
pDstImage += dstImageStrideInBytes;
27832783
}
27842784
return AGO_SUCCESS;
2785-
}
2785+
}

openvx/ago/ago_haf_cpu_opticalflow.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ vx_int32 winsz
196196
// calculate sharr derivatives Ix and Iy
197197
ComputeSharr(dataStrideInBytes, pScratch, oldPyramid[level].width, oldPyramid[level].height, oldPyramid[level].strideInBytes, oldPyramid[level].pImage, pScharrScratch);
198198
float ptScale = (float)(pow(pyramidScale, level));
199-
// printf("\nLevel : %d***************\n", level);
200199

201200
// do the Lukas Kanade tracking for each feature point
202201
for (unsigned int pt = 0; pt < keyPointCount; pt++){
@@ -535,13 +534,11 @@ vx_int32 winsz
535534
if (!level){
536535
newKeyPoint[pt].x = (vx_int32)(nextPt.x + halfWin - delta_dx + 0.5f);
537536
newKeyPoint[pt].y = (vx_int32)(nextPt.y + halfWin - delta_dy + 0.5f);
538-
//printf("Level: %d Key Point: %d x: %d y: %d\n", level, pt, newKeyPoint[pt].x, newKeyPoint[pt].y);
539537
}
540538
else
541539
{
542540
pNextPtArray[pt].x = (nextPt.x + halfWin - delta_dx);
543541
pNextPtArray[pt].y = (nextPt.y + halfWin - delta_dy);
544-
//printf("Level: %d Key Point: %d x: %d y: %d\n", level, pt, (int)pNextPtArray[pt].x, (int)pNextPtArray[pt].y);
545542
}
546543
}
547544
}

0 commit comments

Comments
 (0)