#ifndef __DETECTALGORITHM_H__
#define __DETECTALGORITHM_H__

#include <array>
#include <cstdint>
#include <vector>

class DetectAlgorithmPrivate;

class DetectAlgorithm {
public:
    enum TrackState : int {
        Remove = -2,
        Hibernate = -1,
        PreTrack = 0,
        Confirmed = 1,
    };
    class Result {
    public:
        std::vector<int> leaveTrackers;
    };
    constexpr static uint32_t DetectWidth = 576;
    constexpr static uint32_t DetectHeight = 320;
    DetectAlgorithm();
    ~DetectAlgorithm();
    Result detect(const uint8_t *nv21ImageData, uint64_t frameIndex);
    void initialize();

private:
    DetectAlgorithmPrivate *m_d = nullptr;
    void *m_handle = nullptr;
    std::array<uint8_t, DetectWidth * DetectHeight * 3> m_rgbImageBuffer;
};

#endif // __DETECTALGORITHM_H__