digiKam
cb-interpartmode.h
Go to the documentation of this file.
1 /*
2  * H.265 video codec.
3  * Copyright (c) 2013-2014 struktur AG, Dirk Farin <farin@struktur.de>
4  *
5  * Authors: Dirk Farin <farin@struktur.de>
6  *
7  * This file is part of libde265.
8  *
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.
13  *
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.
18  *
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/>.
21  */
22 
23 #ifndef CB_INTERPARTMODE_H
24 #define CB_INTERPARTMODE_H
25 
26 #include "libde265/nal-parser.h"
27 #include "libde265/decctx.h"
28 #include "libde265/slice.h"
29 #include "libde265/scan.h"
30 #include "libde265/intrapred.h"
31 #include "libde265/transform.h"
32 #include "libde265/fallback-dct.h"
33 #include "libde265/quality.h"
34 #include "libde265/fallback.h"
35 #include "libde265/configparam.h"
36 
41 
42 
43 // ========== CB Intra/Inter decision ==========
44 
46 {
47  public:
48  virtual ~Algo_CB_InterPartMode() { }
49 
50  void setChildAlgo(Algo_PB* algo) { mChildAlgo = algo; }
51 
52  virtual const char* name() const { return "cb-interpartmode"; }
53 
54  protected:
56 
59  enc_cb* cb);
60 };
61 
62 
63 
64 
65 class option_InterPartMode : public choice_option<enum PartMode> // choice_option
66 {
67  public:
69  add_choice("2Nx2N", PART_2Nx2N, true);
70  add_choice("NxN", PART_NxN);
71  add_choice("Nx2N", PART_Nx2N);
72  add_choice("2NxN", PART_2NxN);
73  add_choice("2NxnU", PART_2NxnU);
74  add_choice("2NxnD", PART_2NxnD);
75  add_choice("nLx2N", PART_nLx2N);
76  add_choice("nRx2N", PART_nRx2N);
77  }
78 };
79 
81 {
82  public:
83  struct params
84  {
85  params() {
86  partMode.set_ID("CB-InterPartMode-Fixed-partMode");
87  }
88 
90  };
91 
93  config.add_option(&mParams.partMode);
94  }
95 
96  void setParams(const params& p) { mParams=p; }
97 
100  enc_cb* cb);
101 
102  virtual const char* name() const { return "cb-interpartmode-fixed"; }
103 
104  private:
105  params mParams;
106 };
107 
108 #endif
Definition: cb-interpartmode.h:81
virtual const char * name() const
Definition: cb-interpartmode.h:102
virtual enc_cb * analyze(encoder_context *, context_model_table &, enc_cb *cb)
void registerParams(config_parameters &config)
Definition: cb-interpartmode.h:92
void setParams(const params &p)
Definition: cb-interpartmode.h:96
Definition: cb-interpartmode.h:46
virtual const char * name() const
Definition: cb-interpartmode.h:52
virtual ~Algo_CB_InterPartMode()
Definition: cb-interpartmode.h:48
void setChildAlgo(Algo_PB *algo)
Definition: cb-interpartmode.h:50
Algo_PB * mChildAlgo
Definition: cb-interpartmode.h:55
enc_cb * codeAllPBs(encoder_context *, context_model_table &, enc_cb *cb)
Definition: algo.h:67
Definition: algo.h:84
Definition: configparam.h:258
void add_choice(const std::string &s, enum PartMode id, bool default_value=false)
Definition: configparam.h:264
Definition: configparam.h:366
void LIBDE265_API add_option(option_base *o)
Definition: contextmodel.h:100
Definition: encoder-types.h:248
Definition: encoder-context.h:39
Definition: cb-interpartmode.h:66
option_InterPartMode()
Definition: cb-interpartmode.h:68
void set_ID(const char *name)
Definition: configparam.h:56
@ PART_2Nx2N
Definition: slice.h:76
@ PART_Nx2N
Definition: slice.h:78
@ PART_NxN
Definition: slice.h:79
@ PART_2NxnD
Definition: slice.h:81
@ PART_nLx2N
Definition: slice.h:82
@ PART_2NxN
Definition: slice.h:77
@ PART_2NxnU
Definition: slice.h:80
@ PART_nRx2N
Definition: slice.h:83
Definition: cb-interpartmode.h:84
params()
Definition: cb-interpartmode.h:85
option_InterPartMode partMode
Definition: cb-interpartmode.h:89