]> git.sesse.net Git - ffmpeg/commitdiff
dnn_interface.h: add enum DNNColorOrder
authorGuo, Yejun <yejun.guo@intel.com>
Mon, 8 Feb 2021 01:53:39 +0000 (09:53 +0800)
committerGuo, Yejun <yejun.guo@intel.com>
Thu, 18 Feb 2021 01:59:37 +0000 (09:59 +0800)
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

index 2fb9b15676157570b52e69118af22dccb8d86d4e..d3a0c58a6175496758d779efe97f0781b609bc04 100644 (file)
@@ -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{