From 6b6409d91019b441d426216250d63edea28ee6fa Mon Sep 17 00:00:00 2001 From: qianlong Date: Wed, 26 Aug 2020 11:48:01 +0800 Subject: [PATCH] DecodeAndCropAndResizeJepg do not support odd size --- .../dataset/kernels/image/soft_dvpp/utils/soft_dp.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_dp.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_dp.cc index b83c333cf2a..99fe5e7542b 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_dp.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_dp.cc @@ -31,7 +31,7 @@ uint32_t DecodeAndResizeJpeg(SoftDpProcsessInfo *soft_dp_process_info) { return checkParamErr; } if (soft_dp_process_info->output_width % 2 == 1 || soft_dp_process_info->output_height % 2 == 1) { - API_LOGE("odd width and height dose not support"); + API_LOGE("odd width and height dose not support in resize interface"); return checkParamErr; } VpcInfo vpc_input_info; @@ -65,6 +65,10 @@ uint32_t DecodeAndCropAndResizeJpeg(SoftDpProcsessInfo *soft_dp_process_info, co API_LOGE("The input buffer or out buffer is null or size is 0"); return checkParamErr; } + if (soft_dp_process_info->output_width % 2 == 1 || soft_dp_process_info->output_height % 2 == 1) { + API_LOGE("odd width and height dose not support in crop and resize interface"); + return checkParamErr; + } VpcInfo vpc_input_info; SoftJpegd soft_handler;