MCPcopy Create free account
hub / github.com/FFMS/ffms2 / ResizerNameToSWSResizer

Function ResizerNameToSWSResizer

src/core/utils.cpp:112–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112int ResizerNameToSWSResizer(const char *ResizerName) {
113 if (!ResizerName)
114 return 0;
115 std::string s = ResizerName;
116 std::transform(s.begin(), s.end(), s.begin(), toupper);
117 if (s == "FAST_BILINEAR")
118 return SWS_FAST_BILINEAR;
119 if (s == "BILINEAR")
120 return SWS_BILINEAR;
121 if (s == "BICUBIC")
122 return SWS_BICUBIC;
123 if (s == "X")
124 return SWS_X;
125 if (s == "POINT")
126 return SWS_POINT;
127 if (s == "AREA")
128 return SWS_AREA;
129 if (s == "BICUBLIN")
130 return SWS_BICUBLIN;
131 if (s == "GAUSS")
132 return SWS_GAUSS;
133 if (s == "SINC")
134 return SWS_SINC;
135 if (s == "LANCZOS")
136 return SWS_LANCZOS;
137 if (s == "SPLINE")
138 return SWS_SPLINE;
139 return 0;
140}
141
142bool IsSamePath(const char *p1, const char *p2) {
143 // assume windows is the only OS with a case insensitive filesystem and ignore all path complications

Callers 2

InitOutputFormatMethod · 0.85
InitOutputFormatMethod · 0.85

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected