digiKam
tb-rateestim.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_RATEESTIM_H
24 #define TB_RATEESTIM_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 
39 
43 };
44 
45 class option_ALGO_TB_RateEstimation : public choice_option<enum ALGO_TB_RateEstimation>
46 {
47  public:
51  }
52 };
53 
54 
55 
57 {
58  public:
60 
62  context_model_table& ctxModel,
63  const enc_tb* tb, const enc_cb* cb,
64  int x0,int y0, int xBase,int yBase,
65  int log2TrafoSize, int trafoDepth, int blkIdx) = 0;
66 
67  virtual const char* name() const { return "tb-rateestimation"; }
68 };
69 
70 
72 {
73  public:
75  context_model_table& ctxModel,
76  const enc_tb* tb, const enc_cb* cb,
77  int x0,int y0, int xBase,int yBase,
78  int log2TrafoSize, int trafoDepth, int blkIdx)
79  {
80  leaf(cb, NULL);
81  return 0.0f;
82  }
83 
84  virtual const char* name() const { return "tb-rateestimation-none"; }
85 };
86 
87 
89 {
90  public:
92  context_model_table& ctxModel,
93  const enc_tb* tb, const enc_cb* cb,
94  int x0,int y0, int xBase,int yBase,
95  int log2TrafoSize, int trafoDepth, int blkIdx);
96 
97  virtual const char* name() const { return "tb-rateestimation-exact"; }
98 };
99 
100 
101 #endif
Definition: tb-rateestim.h:89
virtual const char * name() const
Definition: tb-rateestim.h:97
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)
Definition: tb-rateestim.h:72
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)
Definition: tb-rateestim.h:74
virtual const char * name() const
Definition: tb-rateestim.h:84
Definition: tb-rateestim.h:57
virtual ~Algo_TB_RateEstimation()
Definition: tb-rateestim.h:59
virtual const char * name() const
Definition: tb-rateestim.h:67
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
Definition: algo.h:46
void leaf(const enc_node *, const char *,...)
Definition: algo.h:61
Definition: configparam.h:258
void add_choice(const std::string &s, enum ALGO_TB_RateEstimation id, bool default_value=false)
Definition: configparam.h:264
Definition: contextmodel.h:100
Definition: encoder-types.h:248
Definition: encoder-types.h:135
Definition: encoder-context.h:39
Definition: tb-rateestim.h:46
option_ALGO_TB_RateEstimation()
Definition: tb-rateestim.h:48
ALGO_TB_RateEstimation
Definition: tb-rateestim.h:40
@ ALGO_TB_RateEstimation_None
Definition: tb-rateestim.h:41
@ ALGO_TB_RateEstimation_Exact
Definition: tb-rateestim.h:42