kodi
PictureScalingAlgorithm.h
1 /*
2  * Copyright (C) 2015-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <map>
12 #include <string>
13 
15 {
16 public:
17  typedef enum Algorithm
18  {
19  NoAlgorithm,
20  FastBilinear,
21  Bilinear,
22  Bicubic,
23  Experimental,
24  NearestNeighbor,
25  AveragingArea,
26  Bicublin,
27  Gaussian,
28  Sinc,
29  Lanczos,
30  BicubicSpline
31  } Algorithm;
32 
33  static Algorithm Default;
34 
35  static Algorithm FromString(const std::string& scalingAlgorithm);
36  static std::string ToString(Algorithm scalingAlgorithm);
37  static int ToSwscale(const std::string& scalingAlgorithm);
38  static int ToSwscale(Algorithm scalingAlgorithm);
39 
40 private:
42 
43  typedef struct ScalingAlgorithm
44  {
45  std::string name;
46  int swscale;
47  } ScalingAlgorithm;
48 
49  typedef std::map<CPictureScalingAlgorithm::Algorithm, CPictureScalingAlgorithm::ScalingAlgorithm> AlgorithmMap;
50  static AlgorithmMap m_algorithms;
51 };
Definition: PictureScalingAlgorithm.h:14