forked from FFmpeg/FFmpeg
libavfilter/dnn: use avpriv_report_missing_feature for unsupported features
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
This commit is contained in:
parent
0d5fd4999a
commit
2d6af4a501
5 changed files with 11 additions and 13 deletions
|
@ -327,7 +327,7 @@ static DNNReturnType execute_model_native(const DNNModel *model, const char *inp
|
|||
if (nb_output != 1) {
|
||||
// currently, the filter does not need multiple outputs,
|
||||
// so we just pending the support until we really need it.
|
||||
av_log(ctx, AV_LOG_ERROR, "do not support multiple outputs\n");
|
||||
avpriv_report_missing_feature(ctx, "multiple outputs");
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -588,12 +588,12 @@ DNNReturnType ff_dnn_execute_model_ov(const DNNModel *model, const char *input_n
|
|||
if (nb_output != 1) {
|
||||
// currently, the filter does not need multiple outputs,
|
||||
// so we just pending the support until we really need it.
|
||||
av_log(ctx, AV_LOG_ERROR, "do not support multiple outputs\n");
|
||||
avpriv_report_missing_feature(ctx, "multiple outputs");
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
if (ctx->options.batch_size > 1) {
|
||||
av_log(ctx, AV_LOG_ERROR, "do not support batch mode for sync execution.\n");
|
||||
avpriv_report_missing_feature(ctx, "batch mode for sync execution");
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -424,7 +424,7 @@ static DNNReturnType add_conv_layer(TFModel *tf_model, TF_Operation *transpose_o
|
|||
op_desc = TF_NewOperation(tf_model->graph, "Sigmoid", name_buffer);
|
||||
break;
|
||||
default:
|
||||
av_log(ctx, AV_LOG_ERROR, "Unsupported convolutional activation function\n");
|
||||
avpriv_report_missing_feature(ctx, "convolutional activation function %d", params->activation);
|
||||
return DNN_ERROR;
|
||||
}
|
||||
input.oper = *cur_op;
|
||||
|
@ -750,7 +750,7 @@ static DNNReturnType execute_model_tf(const DNNModel *model, const char *input_n
|
|||
if (nb_output != 1) {
|
||||
// currently, the filter does not need multiple outputs,
|
||||
// so we just pending the support until we really need it.
|
||||
av_log(ctx, AV_LOG_ERROR, "do not support multiple outputs\n");
|
||||
avpriv_report_missing_feature(ctx, "multiple outputs");
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ DNNReturnType proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_
|
|||
struct SwsContext *sws_ctx;
|
||||
int bytewidth = av_image_get_linesize(frame->format, frame->width, 0);
|
||||
if (output->dt != DNN_FLOAT) {
|
||||
av_log(log_ctx, AV_LOG_ERROR, "do not support data type rather than DNN_FLOAT\n");
|
||||
avpriv_report_missing_feature(log_ctx, "data type rather than DNN_FLOAT");
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
|
@ -85,8 +85,7 @@ DNNReturnType proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_
|
|||
sws_freeContext(sws_ctx);
|
||||
return DNN_SUCCESS;
|
||||
default:
|
||||
av_log(log_ctx, AV_LOG_ERROR, "do not support frame format %s\n",
|
||||
av_get_pix_fmt_name(frame->format));
|
||||
avpriv_report_missing_feature(log_ctx, "%s", av_get_pix_fmt_name(frame->format));
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
|
@ -98,7 +97,7 @@ DNNReturnType proc_from_frame_to_dnn(AVFrame *frame, DNNData *input, void *log_c
|
|||
struct SwsContext *sws_ctx;
|
||||
int bytewidth = av_image_get_linesize(frame->format, frame->width, 0);
|
||||
if (input->dt != DNN_FLOAT) {
|
||||
av_log(log_ctx, AV_LOG_ERROR, "do not support data type rather than DNN_FLOAT\n");
|
||||
avpriv_report_missing_feature(log_ctx, "data type rather than DNN_FLOAT");
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
|
@ -158,8 +157,7 @@ DNNReturnType proc_from_frame_to_dnn(AVFrame *frame, DNNData *input, void *log_c
|
|||
sws_freeContext(sws_ctx);
|
||||
break;
|
||||
default:
|
||||
av_log(log_ctx, AV_LOG_ERROR, "do not support frame format %s\n",
|
||||
av_get_pix_fmt_name(frame->format));
|
||||
avpriv_report_missing_feature(log_ctx, "%s", av_get_pix_fmt_name(frame->format));
|
||||
return DNN_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ static int check_modelinput_inlink(const DNNData *model_input, const AVFilterLin
|
|||
return AVERROR(EIO);
|
||||
}
|
||||
if (model_input->dt != DNN_FLOAT) {
|
||||
av_log(ctx, AV_LOG_ERROR, "only support dnn models with input data type as float32.\n");
|
||||
avpriv_report_missing_feature(ctx, "data type rather than DNN_FLOAT");
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ static int check_modelinput_inlink(const DNNData *model_input, const AVFilterLin
|
|||
}
|
||||
return 0;
|
||||
default:
|
||||
av_log(ctx, AV_LOG_ERROR, "%s not supported.\n", av_get_pix_fmt_name(fmt));
|
||||
avpriv_report_missing_feature(ctx, "%s", av_get_pix_fmt_name(fmt));
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue