I tried to use "UserBufferEncodingUnsigned8Bit" in SNPE 1.54.
I created the user buffer by referring to the following sample :
<SNPE_ROOT>/examples/NativeCpp/SampleCode/jni/CreateUserBuffer.cpp
But it was not created correctly, and I got this error :
error_code=240; error_message=Buffer element encoding not supported by API. Unimplemented encoding type UNSIGNED8BIT;
Can't I use "UserBufferEncodingUnsigned8Bit" in SNPE 1.54 or latest version?
The code is
userBufferEncoding = std::unique_ptr<zdl::DlSystem::UserBufferEncodingUnsigned8Bit>(new zdl::DlSystem::UserBufferEncodingUnsigned8Bit());
...
// create SNPE user buffer from the user-backed buffer
zdl::DlSystem::IUserBufferFactory& ubFactory = zdl::SNPE::SNPEFactory::getUserBufferFactory();snpeUserBackedBuffers.push_back(ubFactory.createUserBuffer(applicationBuffers.at(name).data(),bufSize,strides,userBufferEncoding.get()));
Dear customer,
Could you please try "UserBufferEncodingTfN"?