#ifndef _COMMON_STRUCT_H_
#define _COMMON_STRUCT_H_

typedef struct PicInfo {
    int id;
    char picName[256];
    float *img;
    int c;
    int h;
    int w;
} PicInfo;

typedef struct IMGPixClassify {
    int r;
    int g;
    int b;
    /*other*/
    int pType;
} PixClassify;

struct Box {
    float bx;
    float by;
    float bw;
    float bh;
};

struct PredictBox {
    struct Box pBox;
    float confidence;
    int category;
    int nmsFlag;
    int boxIndex;
    float confidenceLoss;
};

struct DefaultBox {
    int id;
    struct Box mBox;
    float matchIOU;
    int matchGBoxIndex;
    float pBoxConfidence;
    float pBoxConfidenceLoss;
    int offsetToPredictBox;
    int flag;     // 0: INIT; 1: wait confirm postive; 2: confirm postive 3: confirm negative

    float sbx;    // the value is x for smooth_L1 = f(x) to Box cx
    float sby;    // the value is x for smooth_L1 = f(x) to Box cy
    float sbw;    // the value is x for smooth_L1 = f(x) to Box w
    float sbh;    // the value is x for smooth_L1 = f(x) to Box h
};

struct PicGroundTrueBox {
    struct Box *mBoxList;
    int *categoryList;
    int listNum;
};

struct WeightBlobHead {
    char IDStr[64];
    int type;
    long long num;
};

struct WeightBlob {
    struct WeightBlobHead head;
    float *wData;
};

struct RNNDataInfo {
    float *intputData;
    float *labelData;
    int batchCount;
    int mBatchNum;
    int dimSize;
    int seqNum;
};

struct BatchSeqStruct {
    int mBatchNum;
    int inputDim;
    int outputDim;
    
    int *inputBatch;
    int inputSeqNum;
        
    int *labelBatch;
    int labelSeqNum;
    
    int *labelSortLocation;
};

#endif
