3
* Copyright (c) 2013-2014 struktur AG, Dirk Farin <farin@struktur.de>
5
* Authors: Dirk Farin <farin@struktur.de>
7
* This file is part of libde265.
9
* libde265 is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU Lesser General Public License as
11
* published by the Free Software Foundation, either version 3 of
12
* the License, or (at your option) any later version.
14
* libde265 is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU Lesser General Public License for more details.
19
* You should have received a copy of the GNU Lesser General Public License
20
* along with libde265. If not, see <http://www.gnu.org/licenses/>.
23
#ifndef CB_INTERPARTMODE_H
24
#define CB_INTERPARTMODE_H
26
#include "libde265/nal-parser.h"
27
#include "libde265/decctx.h"
28
#include "libde265/encoder/encode.h"
29
#include "libde265/slice.h"
30
#include "libde265/scan.h"
31
#include "libde265/intrapred.h"
32
#include "libde265/transform.h"
33
#include "libde265/fallback-dct.h"
34
#include "libde265/quality.h"
35
#include "libde265/fallback.h"
36
#include "libde265/configparam.h"
38
#include "libde265/encoder/algo/algo.h"
39
#include "libde265/encoder/algo/tb-intrapredmode.h"
40
#include "libde265/encoder/algo/tb-split.h"
41
#include "libde265/encoder/algo/cb-intrapartmode.h"
44
// ========== CB Intra/Inter decision ==========
46
class Algo_CB_InterPartMode : public Algo_CB
49
virtual ~Algo_CB_InterPartMode() { }
51
void setChildAlgo(Algo_PB* algo) { mChildAlgo = algo; }
56
enc_cb* codeAllPBs(encoder_context*,
64
class option_InterPartMode : public choice_option<enum PartMode> // choice_option
67
option_InterPartMode() {
68
add_choice("2Nx2N", PART_2Nx2N, true);
69
add_choice("NxN", PART_NxN);
70
add_choice("Nx2N", PART_Nx2N);
71
add_choice("2NxN", PART_2NxN);
72
add_choice("2NxnU", PART_2NxnU);
73
add_choice("2NxnD", PART_2NxnD);
74
add_choice("nLx2N", PART_nLx2N);
75
add_choice("nRx2N", PART_nRx2N);
79
class Algo_CB_InterPartMode_Fixed : public Algo_CB_InterPartMode
85
partMode.set_ID("CB-InterPartMode-Fixed-partMode");
88
option_InterPartMode partMode;
91
void registerParams(config_parameters& config) {
92
config.add_option(&mParams.partMode);
95
void setParams(const params& p) { mParams=p; }
97
virtual enc_cb* analyze(encoder_context*,