diff mbox series

[FFmpeg-devel,05/10] dnn_interface.h: add enum DNNColorOrder

Message ID 20210210045826.14820-1-yejun.guo@intel.com
State Superseded
Headers show
Series [FFmpeg-devel,01/10] dnn_backend_openvino.c: fix mismatch between ffmpeg(NHWC) and openvino(NCHW) | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Guo, Yejun Feb. 10, 2021, 4:58 a.m. UTC
the data type and order together decide the color format, we could
not use AVPixelFormat directly because not all the possible formats
are covered by it.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
---
 libavfilter/dnn_interface.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavfilter/dnn_interface.h b/libavfilter/dnn_interface.h
index 2fb9b15676..d3a0c58a61 100644
--- a/libavfilter/dnn_interface.h
+++ b/libavfilter/dnn_interface.h
@@ -36,6 +36,11 @@  typedef enum {DNN_NATIVE, DNN_TF, DNN_OV} DNNBackendType;
 
 typedef enum {DNN_FLOAT = 1, DNN_UINT8 = 4} DNNDataType;
 
+typedef enum {
+    DCO_NONE,
+    DCO_BGR,
+} DNNColorOrder;
+
 typedef enum {
     DAST_FAIL,              // something wrong
     DAST_EMPTY_QUEUE,       // no more inference result to get
@@ -52,8 +57,10 @@  typedef enum {
 
 typedef struct DNNData{
     void *data;
-    DNNDataType dt;
     int width, height, channels;
+    // dt and order together decide the color format
+    DNNDataType dt;
+    DNNColorOrder order;
 } DNNData;
 
 typedef struct DNNModel{