KhronosGroup/OpenVX-sample-impl

bug in vxCreateThresholdForImage() ?

Opened this issue · 0 comments

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.