diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2020-03-21 12:33:26 +0300 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2020-04-07 06:03:25 +0300 |
commit | 2114c4241891849323fd65e56f1ab6f70375a291 (patch) | |
tree | a386d31f06bbbe5d07da29d0f15846a88136a6f5 /libavfilter | |
parent | ca76a5ba1a35e317d0fb327fffe3ad9add6b7e61 (diff) |
avfilter/vf_dnn_processing.c: fix typo for the linesize of dnn data
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_dnn_processing.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c index fabe4f1d01..cf589acedf 100644 --- a/libavfilter/vf_dnn_processing.c +++ b/libavfilter/vf_dnn_processing.c @@ -329,7 +329,7 @@ static int copy_from_frame_to_dnn(DnnProcessingContext *ctx, const AVFrame *fram if (dnn_input->dt == DNN_FLOAT) { sws_scale(ctx->sws_gray8_to_grayf32, (const uint8_t **)frame->data, frame->linesize, 0, frame->height, (uint8_t * const*)(&dnn_input->data), - (const int [4]){frame->linesize[0] * sizeof(float), 0, 0, 0}); + (const int [4]){frame->width * 3 * sizeof(float), 0, 0, 0}); } else { av_assert0(dnn_input->dt == DNN_UINT8); av_image_copy_plane(dnn_input->data, bytewidth, @@ -369,7 +369,7 @@ static int copy_from_dnn_to_frame(DnnProcessingContext *ctx, AVFrame *frame) case AV_PIX_FMT_BGR24: if (dnn_output->dt == DNN_FLOAT) { sws_scale(ctx->sws_grayf32_to_gray8, (const uint8_t *[4]){(const uint8_t *)dnn_output->data, 0, 0, 0}, - (const int[4]){frame->linesize[0] * sizeof(float), 0, 0, 0}, + (const int[4]){frame->width * 3 * sizeof(float), 0, 0, 0}, 0, frame->height, (uint8_t * const*)frame->data, frame->linesize); } else { |