KhronosGroup / OpenVX-sample-impl

OpenVX sample implementation
Apache License 2.0
138 stars 47 forks source link

bug in vxCreateThresholdForImage() ? #20

Open daunclestone opened 4 years ago

daunclestone commented 4 years ago

when it detects bad thresh_type, bad input_format or bad output_format it calls threshold = (vx_threshold )ownGetErrorObject(context, VX_ERROR_INVALID_TYPE); but afterwards it will overwrite 'threshold' with the following call threshold = (vx_threshold)ownCreateReference(context, VX_TYPE_THRESHOLD, VX_EXTERNAL, &context->base);

is it a bug? this behavior is different from that of vxCreateThreshold(). In vxCreateThreshold() when it detects bad data_type or threshold_type, it will call threshold = (vx_threshold )ownGetErrorObject(context, VX_ERROR_INVALID_TYPE); and subsequently return that 'threshold' object.