#ifndef _MBDSTHARNESS_H_1
#define _MBDSTHARNESS_H_1 1
#include "testharness.h"
#include "primitives.h"
class MBDstHarness : public TestHarness
{
protected:
enum { ITERS = 128 };
enum { INCR = 16 };
enum { MAX_TU_SIZE = 32 * 32 };
enum { TEST_BUF_SIZE = MAX_TU_SIZE + ITERS * INCR };
enum { TEST_CASES = 3 };
ALIGN_VAR_32(int16_t, mbuf1[TEST_BUF_SIZE]);
int16_t mbufdct[TEST_BUF_SIZE];
int mbufidct[TEST_BUF_SIZE];
int16_t mshortbuf2[MAX_TU_SIZE];
int16_t mshortbuf3[MAX_TU_SIZE];
int mintbuf1[MAX_TU_SIZE];
int mintbuf2[MAX_TU_SIZE];
int mintbuf3[MAX_TU_SIZE];
int mintbuf4[MAX_TU_SIZE];
int16_t short_test_buff[TEST_CASES][TEST_BUF_SIZE];
int int_test_buff[TEST_CASES][TEST_BUF_SIZE];
int int_idct_test_buff[TEST_CASES][TEST_BUF_SIZE];
uint32_t mubuf1[MAX_TU_SIZE];
uint32_t mubuf2[MAX_TU_SIZE];
uint16_t mushortbuf1[MAX_TU_SIZE];
int16_t short_denoise_test_buff1[TEST_CASES][TEST_BUF_SIZE];
int16_t short_denoise_test_buff2[TEST_CASES][TEST_BUF_SIZE];
bool check_dequant_primitive(dequant_scaling_t ref, dequant_scaling_t opt);
bool check_dequant_primitive(dequant_normal_t ref, dequant_normal_t opt);
bool check_quant_primitive(quant_t ref, quant_t opt);
bool check_nquant_primitive(nquant_t ref, nquant_t opt);
bool check_dct_primitive(dct_t ref, dct_t opt, intptr_t width);
bool check_idct_primitive(idct_t ref, idct_t opt, intptr_t width);
bool check_count_nonzero_primitive(count_nonzero_t ref, count_nonzero_t opt);
bool check_denoise_dct_primitive(denoiseDct_t ref, denoiseDct_t opt);
public:
MBDstHarness();
const char *getName() const { return "transforms"; }
bool testCorrectness(const EncoderPrimitives& ref, const EncoderPrimitives& opt);
void measureSpeed(const EncoderPrimitives& ref, const EncoderPrimitives& opt);
};
#endif