Special Usage Description
If both the KVSIP and open-source VSIP need to be used, dynamically link the VSIP.
To compile the VSIP dynamic library, perform the following steps:
- Download the open source VSIP library.
- Modify the c_VSIP_src/Makefile file.
- Open c_VSIP_src/Makefile.
vi c_VSIP_src/Makefile
- Change the value of CFLAGS, delete the -arch x86_64 parameter that specifies x86, and add the -fPIC option.
CFLAGS= -O3 -Wall -std=c89 -pedantic -fPIC
- Add the following content to line 13:
gcc --shared $(OBJECTS) -o libvsip.so

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open c_VSIP_src/Makefile.
- Modify Makefile.
- Open Makefile.
vi Makefile
- Change the value of CFLAGS and add the -fPIC option.
CFLAGS=-O3 -Wall -std=gnu99 -pedantic -fPIC
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Generate a dynamic library libvsip.so in the c_VSIP_src directory.
make
- Replace the Huawei-developed vsip.h file with the open source vsip.h file.
cp -rf ./c_VSIP_src/vsip.h /usr/local/include/KVSIP/
When calling this function library, you need to add the following compilation options:
gcc test.c -o test -I /usr/local/include/KVSIP/ -L /usr/local/lib/KVSIP/ -lkvsip_fft -lkvsip_fftf -lkvsip -lm -fPIC -L ./c_VSIP_src -lvsip -Wl,-rpath=./c_VSIP_src
Parent topic: Using the KVSIP