Since we've been unable to run any of the Hexagon SDK dspCV examples on the Snapdragon 820 dev board, I'm attempting to to get some of the FastCV SDK examples running. The fastcv/samples folder contains three: fastcorner, fastcvdemo, and loadjpeg.
I was hopefully when I saw a Makefile in each folder so I started off using those on Linux. To build the JNI libs, it was at first odd that I had to fix some things in various Android.mk files such as LOCAL_C_INCLUDES and adding LOCAL_LDFLAGS to point to -L path/to/fastcv/lib/Android/lib32. Once I did this for all three projects they all were able to build their respective *.so files. Little did I know that this would be easy compared to getting the apk's to build.
I ultimately ended up using a generic build.gradle and set up the various links to AndroidManifest.xml, jniLibs, res, and java/com/qualcomm. I did have to revise some things like disabling the lint checks, but ultimately it could made an apk that included all the Java code and the respective JNI libs.
I know that the Getting Started guide says to use Eclipse ADT, but that was end-of-life'd by Google some time ago. The screenshots in that guide don't even match how Eclipse looks nowadays. If something goes wrong in that flow it just seems very hard to track down. By sticking to gradle and command-line tools I'm at least able to make the process scriptable and reproducible for my colleagues.
I haven't had much luck actually running the apk's though. With fastcorner, it just shows blackness once I hit the Play button. adb logcat oddly claims that aDSP initialization failed, then it claims it was successful :
01-01 00:41:45.309 4386 4386 E fastcv_lib_log: fastcvadsp_fcvQ6SessionInit failed
01-01 00:41:45.310 4386 4386 D fastcv_lib_log: Q6 initialized successfully. Q6 FastCV functions mode 2 are enabled.
With loadjpeg, there seemed to be some fundamental bugs in the app configuration. For some it built its object named libfastcvsample.so when it should have been named libloadjpeg.so. Second, it wouldn't even install an icon on the Android desktop so I had no way to run it. I had to edit AndroidManifest.xml and add an intent-filter with android.intent.category.LAUNCHER. I expect these limitations would have been there even if I had used an IDE. And once this was all done and I had a loadjpeg-release.apk I could run, judging from the code it doesn't actually display the jpeg so I can't tell if it's working. The only clue is that it locks things up for 800 ms each time which may have indicated the DSP is getting some use.
I haven't tried fastcvdemo yet, but given how similar it looks to fastcorner I think I would probably end up in the same realm of confusion.
Note that we do have a testsig-0xXXXXXX.so file installed on this Snapdragon 820 dev board, as we are able to run some primitive Hexagon DSP examples.
I guess my main question is: Have any of these three examples worked in recent times? Seeing the rather dated build flow with Eclipse ADT makes me wonder if these examples are maintained.
If these examples really should be working on Snapdragon 820, what should I change in my flow to see some meaningful output?
And if someone here has them running, perhaps you could send me a binary apk to run, and I could further narrow down the differences from there.
Hi,
Since you are trying to run sample program on Hexagon DSP, can you post your question to https://developer.qualcomm.com/software/hexagon-dsp-sdk forum? There should be DSP experts to help you.
Cheers,
-Jeff
Alright I have gone ahead and cross-posted at On the Hexagon DSP/Computer Vision subforum at https://developer.qualcomm.com/forum/qdn-forums/software/hexagon-dsp-sdk...
However, if anyone here has gotten the examples to run properly on a non-DSP context, i.e. CPU or GPU, I would be interested in hearing that as well.
Hi,
I have tried the fastcvDemo Sample in the FastCV and it is working for me. I am not sure about Android Studio, but I have compiled it over Linux and eclipse IDE. Also, the devnet library supports CPU and Venum Solution only. Can you please try this APK and let us know if you face any issues.
Thank You,
Krishanu
krishanu6690,
Thanks. Did you mean to attach the apk or include a link to it? I don't see any attachment in your reply.
So all of these examples are CPU-only? If so, why does it attempt to run fastcvadsp_fcvQ6SessionInit()? Or perhaps the FastCV library just always tests that initialization.