Merge pull request #25922 from sarbes/shader-cleanup
[xbmc.git] / xbmc / pictures / PictureScalingAlgorithm.h
blobd5aa5436e53ae1d9dc2e28da38ec86abfa0bc889
1 /*
2 * Copyright (C) 2015-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include <map>
12 #include <string>
14 class CPictureScalingAlgorithm
16 public:
17 typedef enum Algorithm
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;
33 static Algorithm Default;
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);
40 private:
41 CPictureScalingAlgorithm();
43 typedef struct ScalingAlgorithm
45 std::string name;
46 int swscale;
47 } ScalingAlgorithm;
49 typedef std::map<CPictureScalingAlgorithm::Algorithm, CPictureScalingAlgorithm::ScalingAlgorithm> AlgorithmMap;
50 static AlgorithmMap m_algorithms;