~ubuntu-branches/ubuntu/wily/libde265/wily

« back to all changes in this revision

Viewing changes to libde265/encoder/algo/cb-interpartmode.h

  • Committer: Package Import Robot
  • Author(s): Joachim Bauch
  • Date: 2015-07-16 11:07:46 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150716110746-76vsv24j3yux7tnu
Tags: 1.0.2-1
* Imported Upstream version 1.0.2
* Added new files to copyright information.
* Only export decoder API and update symbols for new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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/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"
 
37
 
 
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"
 
42
 
 
43
 
 
44
// ========== CB Intra/Inter decision ==========
 
45
 
 
46
class Algo_CB_InterPartMode : public Algo_CB
 
47
{
 
48
 public:
 
49
  virtual ~Algo_CB_InterPartMode() { }
 
50
 
 
51
  void setChildAlgo(Algo_PB* algo) { mChildAlgo = algo; }
 
52
 
 
53
 protected:
 
54
  Algo_PB* mChildAlgo;
 
55
 
 
56
  enc_cb* codeAllPBs(encoder_context*,
 
57
                     context_model_table&,
 
58
                     enc_cb* cb);
 
59
};
 
60
 
 
61
 
 
62
 
 
63
 
 
64
class option_InterPartMode : public choice_option<enum PartMode> // choice_option
 
65
{
 
66
 public:
 
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);
 
76
  }
 
77
};
 
78
 
 
79
class Algo_CB_InterPartMode_Fixed : public Algo_CB_InterPartMode
 
80
{
 
81
 public:
 
82
  struct params
 
83
  {
 
84
    params() {
 
85
      partMode.set_ID("CB-InterPartMode-Fixed-partMode");
 
86
    }
 
87
 
 
88
    option_InterPartMode partMode;
 
89
  };
 
90
 
 
91
  void registerParams(config_parameters& config) {
 
92
    config.add_option(&mParams.partMode);
 
93
  }
 
94
 
 
95
  void setParams(const params& p) { mParams=p; }
 
96
 
 
97
  virtual enc_cb* analyze(encoder_context*,
 
98
                          context_model_table&,
 
99
                          enc_cb* cb);
 
100
 
 
101
 private:
 
102
  params mParams;
 
103
};
 
104
 
 
105
#endif