diff options
author | Linjie Fu <linjie.fu@intel.com> | 2020-03-18 12:23:10 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2020-03-19 14:27:23 +0800 |
commit | acc6f632b45f4b9eb0dc2572b3d95224022582cb (patch) | |
tree | 0ce842e12d1348fcd7a9dfb83a822f12fe7e5238 /libavfilter/vf_dnn_processing.c | |
parent | daa2fb9a8ca7d141ae4cf8ea1f22c0ffc36cbac7 (diff) | |
download | ffmpeg-acc6f632b45f4b9eb0dc2572b3d95224022582cb.tar.gz |
lavfi/vf_dnn_processing: Fix compile warning of mixed declarations and code
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter/vf_dnn_processing.c')
-rw-r--r-- | libavfilter/vf_dnn_processing.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c index 7f40f85dad..fabe4f1d01 100644 --- a/libavfilter/vf_dnn_processing.c +++ b/libavfilter/vf_dnn_processing.c @@ -418,10 +418,13 @@ static av_always_inline int isPlanarYUV(enum AVPixelFormat pix_fmt) static int copy_uv_planes(DnnProcessingContext *ctx, AVFrame *out, const AVFrame *in) { + const AVPixFmtDescriptor *desc; + int uv_height; + if (!ctx->sws_uv_scale) { av_assert0(in->height == out->height && in->width == out->width); - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(in->format); - int uv_height = AV_CEIL_RSHIFT(in->height, desc->log2_chroma_h); + desc = av_pix_fmt_desc_get(in->format); + uv_height = AV_CEIL_RSHIFT(in->height, desc->log2_chroma_h); for (int i = 1; i < 3; ++i) { int bytewidth = av_image_get_linesize(in->format, in->width, i); av_image_copy_plane(out->data[i], out->linesize[i], |