#ifndef CB_INTERPARTMODE_H
#define CB_INTERPARTMODE_H
#include "libde265/nal-parser.h"
#include "libde265/decctx.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/algo.h"
#include "libde265/encoder/algo/tb-intrapredmode.h"
#include "libde265/encoder/algo/tb-split.h"
#include "libde265/encoder/algo/cb-intrapartmode.h"
class Algo_CB_InterPartMode : public Algo_CB
{
public:
virtual ~Algo_CB_InterPartMode() { }
void setChildAlgo(Algo_PB* algo) { mChildAlgo = algo; }
virtual const char* name() const { return "cb-interpartmode"; }
protected:
Algo_PB* mChildAlgo;
enc_cb* codeAllPBs(encoder_context*,
context_model_table&,
enc_cb* cb);
};
class option_InterPartMode : public choice_option<enum PartMode>
{
public:
option_InterPartMode() {
add_choice("2Nx2N", PART_2Nx2N, true);
add_choice("NxN", PART_NxN);
add_choice("Nx2N", PART_Nx2N);
add_choice("2NxN", PART_2NxN);
add_choice("2NxnU", PART_2NxnU);
add_choice("2NxnD", PART_2NxnD);
add_choice("nLx2N", PART_nLx2N);
add_choice("nRx2N", PART_nRx2N);
}
};
class Algo_CB_InterPartMode_Fixed : public Algo_CB_InterPartMode
{
public:
struct params
{
params() {
partMode.set_ID("CB-InterPartMode-Fixed-partMode");
}
option_InterPartMode partMode;
};
void registerParams(config_parameters& config) {
config.add_option(&mParams.partMode);
}
void setParams(const params& p) { mParams=p; }
virtual enc_cb* analyze(encoder_context*,
context_model_table&,
enc_cb* cb);
virtual const char* name() const { return "cb-interpartmode-fixed"; }
private:
params mParams;
};
#endif