digiKam
tb-split.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 TB_SPLIT_H
24 #define TB_SPLIT_H
25 
26 #include "libde265/nal-parser.h"
27 #include "libde265/decctx.h"
30 #include "libde265/slice.h"
31 #include "libde265/scan.h"
32 #include "libde265/intrapred.h"
33 #include "libde265/transform.h"
34 #include "libde265/fallback-dct.h"
35 #include "libde265/quality.h"
36 #include "libde265/fallback.h"
37 #include "libde265/configparam.h"
38 
42 
43 
44 // ========== TB split decision ==========
45 
46 class Algo_TB_Split : public Algo
47 {
48  public:
50  virtual ~Algo_TB_Split() { }
51 
54  const de265_image* input,
55  enc_tb* tb,
56  int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag) = 0;
57 
60 
61  protected:
63  context_model_table& ctxModel,
64  const de265_image* input,
65  enc_tb* tb,
66  enc_cb* cb,
67  int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag);
68 
71 };
72 
73 
74 
76  // numeric value specifies the maximum size for log2Tb for which the pruning is applied
81 };
82 
84 : public choice_option<enum ALGO_TB_Split_BruteForce_ZeroBlockPrune>
85 {
86  public:
92  }
93 };
94 
95 
97 {
98  public:
99  struct params
100  {
101  params() {
102  zeroBlockPrune.set_ID("TB-Split-BruteForce-ZeroBlockPrune");
103  }
104 
106  };
107 
108  void setParams(const params& p) { mParams=p; }
109 
111  config.add_option(&mParams.zeroBlockPrune);
112  }
113 
116  const de265_image* input,
117  enc_tb* tb,
118  int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag);
119 
120  const char* name() const { return "tb-split-bruteforce"; }
121 
122  private:
123  params mParams;
124 };
125 
126 #endif
Definition: tb-intrapredmode.h:85
Definition: tb-transform.h:52
Definition: tb-split.h:97
const char * name() const
Definition: tb-split.h:120
void registerParams(config_parameters &config)
Definition: tb-split.h:110
void setParams(const params &p)
Definition: tb-split.h:108
virtual enc_tb * analyze(encoder_context *, context_model_table &, const de265_image *input, enc_tb *tb, int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag)
Definition: tb-split.h:47
Algo_TB_Residual * mAlgo_TB_Residual
Definition: tb-split.h:70
Algo_TB_Split()
Definition: tb-split.h:49
void setAlgo_TB_Residual(Algo_TB_Residual *algo)
Definition: tb-split.h:59
Algo_TB_IntraPredMode * mAlgo_TB_IntraPredMode
Definition: tb-split.h:69
enc_tb * encode_transform_tree_split(encoder_context *ectx, context_model_table &ctxModel, const de265_image *input, enc_tb *tb, enc_cb *cb, int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag)
virtual ~Algo_TB_Split()
Definition: tb-split.h:50
virtual enc_tb * analyze(encoder_context *, context_model_table &, const de265_image *input, enc_tb *tb, int TrafoDepth, int MaxTrafoDepth, int IntraSplitFlag)=0
void setAlgo_TB_IntraPredMode(Algo_TB_IntraPredMode *algo)
Definition: tb-split.h:58
Definition: algo.h:46
Definition: configparam.h:258
void add_choice(const std::string &s, enum ALGO_TB_Split_BruteForce_ZeroBlockPrune 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-types.h:135
Definition: encoder-context.h:39
option_ALGO_TB_Split_BruteForce_ZeroBlockPrune()
Definition: tb-split.h:87
void set_ID(const char *name)
Definition: configparam.h:56
Definition: tb-split.h:100
params()
Definition: tb-split.h:101
option_ALGO_TB_Split_BruteForce_ZeroBlockPrune zeroBlockPrune
Definition: tb-split.h:105
Definition: image.h:222
ALGO_TB_Split_BruteForce_ZeroBlockPrune
Definition: tb-split.h:75
@ ALGO_TB_BruteForce_ZeroBlockPrune_all
Definition: tb-split.h:80
@ ALGO_TB_BruteForce_ZeroBlockPrune_off
Definition: tb-split.h:77
@ ALGO_TB_BruteForce_ZeroBlockPrune_8x8
Definition: tb-split.h:78
@ ALGO_TB_BruteForce_ZeroBlockPrune_8x8_16x16
Definition: tb-split.h:79