#ifndef TB_TRANSFORM_H
#define TB_TRANSFORM_H
#include "libde265/nal-parser.h"
#include "libde265/decctx.h"
#include "libde265/encoder/encoder-types.h"
#include "libde265/encoder/algo/algo.h"
#include "libde265/slice.h"
#include "libde265/scan.h"
#include "libde265/intrapred.h"
#include "libde265/transform.h"
#include "libde265/fallback-dct.h"
#include "libde265/quality.h"
#include "libde265/fallback.h"
#include "libde265/configparam.h"
#include "libde265/encoder/algo/tb-intrapredmode.h"
#include "libde265/encoder/algo/tb-rateestim.h"
void diff_blk(int16_t* out,int out_stride,
const uint8_t* a_ptr, int a_stride,
const uint8_t* b_ptr, int b_stride,
int blkSize);
class Algo_TB_Residual : public Algo
{
public:
Algo_TB_Residual() { }
virtual enc_tb* analyze(encoder_context*,
context_model_table&,
const de265_image* input,
enc_tb* tb,
int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag) = 0;
const char* name() const { return "residual-unknown"; }
};
class Algo_TB_Transform : public Algo_TB_Residual
{
public:
Algo_TB_Transform() : mAlgo_TB_RateEstimation(NULL) { }
virtual enc_tb* analyze(encoder_context*,
context_model_table&,
const de265_image* input,
enc_tb* parent,
int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag);
void setAlgo_TB_RateEstimation(Algo_TB_RateEstimation* algo) { mAlgo_TB_RateEstimation=algo; }
const char* name() const { return "residual-FDCT"; }
protected:
Algo_TB_RateEstimation* mAlgo_TB_RateEstimation;
};
#endif