summaryrefslogtreecommitdiff
path: root/libavfilter/dnn
diff options
context:
space:
mode:
authorTing Fu <ting.fu@intel.com>2020-12-18 16:08:29 +0800
committerGuo, Yejun <yejun.guo@intel.com>2020-12-22 10:53:35 +0800
commit5dbabb020ed842889590045156c2b996f7aff4bd (patch)
tree3739c27d2dca75de6c7e14251dfb21828f81f1ea /libavfilter/dnn
parent5cae71d2b722d0beed4d46f189db42fbb57d877b (diff)
dnn: add NV12 pixel format support
Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter/dnn')
-rw-r--r--libavfilter/dnn/dnn_io_proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/dnn/dnn_io_proc.c b/libavfilter/dnn/dnn_io_proc.c
index c9b49be3bd..2744cb6502 100644
--- a/libavfilter/dnn/dnn_io_proc.c
+++ b/libavfilter/dnn/dnn_io_proc.c
@@ -64,6 +64,7 @@ DNNReturnType proc_from_dnn_to_frame(AVFrame *frame, DNNData *output, void *log_
case AV_PIX_FMT_YUV410P:
case AV_PIX_FMT_YUV411P:
case AV_PIX_FMT_GRAY8:
+ case AV_PIX_FMT_NV12:
sws_ctx = sws_getContext(frame->width,
frame->height,
AV_PIX_FMT_GRAYF32,
@@ -135,6 +136,7 @@ DNNReturnType proc_from_frame_to_dnn(AVFrame *frame, DNNData *input, void *log_c
case AV_PIX_FMT_YUV410P:
case AV_PIX_FMT_YUV411P:
case AV_PIX_FMT_GRAY8:
+ case AV_PIX_FMT_NV12:
sws_ctx = sws_getContext(frame->width,
frame->height,
AV_PIX_FMT_GRAY8,