This source file includes following definitions.
- option_ALGO_TB_RateEstimation
- add_choice
- add_choice
#ifndef TB_RATEESTIM_H
#define TB_RATEESTIM_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"
enum ALGO_TB_RateEstimation {
ALGO_TB_RateEstimation_None,
ALGO_TB_RateEstimation_Exact
};
class option_ALGO_TB_RateEstimation : public choice_option<enum ALGO_TB_RateEstimation>
{
public:
option_ALGO_TB_RateEstimation() {
add_choice("none" ,ALGO_TB_RateEstimation_None);
add_choice("exact",ALGO_TB_RateEstimation_Exact, true);
}
};
class Algo_TB_RateEstimation : public Algo
{
public:
virtual ~Algo_TB_RateEstimation() { }
virtual float encode_transform_unit(encoder_context* ectx,
context_model_table& ctxModel,
const enc_tb* tb, const enc_cb* cb,
int x0,int y0, int xBase,int yBase,
int log2TrafoSize, int trafoDepth, int blkIdx) = 0;
virtual const char* name() const { return "tb-rateestimation"; }
};
class Algo_TB_RateEstimation_None : public Algo_TB_RateEstimation
{
public:
virtual float encode_transform_unit(encoder_context* ectx,
context_model_table& ctxModel,
const enc_tb* tb, const enc_cb* cb,
int x0,int y0, int xBase,int yBase,
int log2TrafoSize, int trafoDepth, int blkIdx)
{
leaf(cb, NULL);
return 0.0f;
}
virtual const char* name() const { return "tb-rateestimation-none"; }
};
class Algo_TB_RateEstimation_Exact : public Algo_TB_RateEstimation
{
public:
virtual float encode_transform_unit(encoder_context* ectx,
context_model_table& ctxModel,
const enc_tb* tb, const enc_cb* cb,
int x0,int y0, int xBase,int yBase,
int log2TrafoSize, int trafoDepth, int blkIdx);
virtual const char* name() const { return "tb-rateestimation-exact"; }
};
#endif