GCC Code Coverage Report


Directory: avs_core/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 0.0% 0 / 0 / 8
Functions: 0.0% 0 / 0 / 4
Branches: 0.0% 0 / 0 / 8

filters/misc.h
Line Branch Exec Source
1 // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al.
2 // http://avisynth.nl
3
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
17 // http://www.gnu.org/copyleft/gpl.html .
18 //
19 // Linking Avisynth statically or dynamically with other modules is making a
20 // combined work based on Avisynth. Thus, the terms and conditions of the GNU
21 // General Public License cover the whole combination.
22 //
23 // As a special exception, the copyright holders of Avisynth give you
24 // permission to link Avisynth with independent modules that communicate with
25 // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
26 // terms of these independent modules, and to copy and distribute the
27 // resulting combined work under terms of your choice, provided that
28 // every copy of the combined work is accompanied by a complete copy of
29 // the source code of Avisynth (the version of Avisynth used to produce the
30 // combined work), being distributed under the terms of the GNU General
31 // Public License plus this exception. An independent module is a module
32 // which is not derived from or based on Avisynth, such as 3rd-party filters,
33 // import and export plugins, or graphical user interfaces.
34
35 #ifndef __Misc_H__
36 #define __Misc_H__
37
38
39 #include <avisynth.h>
40
41
42 /********************************************************************
43 ********************************************************************/
44
45
46 class FixLuminance : public GenericVideoFilter
47 /**
48 * Class to progressively darken the top of a YUY2 clip to compensate for bad VCRs
49 **/
50 {
51 public:
52 FixLuminance(PClip _child, int _vertex, int _slope, IScriptEnvironment* env);
53 PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) override;
54
55 int __stdcall SetCacheHints(int cachehints, int frame_range) override {
56 AVS_UNUSED(frame_range);
57 return cachehints == CACHE_GET_MTMODE ? MT_NICE_FILTER : 0;
58 }
59
60 static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
61
62 private:
63 const int vertex, slope;
64 };
65
66
67 class FixBrokenChromaUpsampling : public GenericVideoFilter
68 /**
69 * Class to correct for the incorrect chroma upsampling done by the MS DV codec
70 **/
71 {
72 public:
73 FixBrokenChromaUpsampling(PClip _clip, IScriptEnvironment* env);
74 PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) override;
75
76 int __stdcall SetCacheHints(int cachehints, int frame_range) override {
77 AVS_UNUSED(frame_range);
78 return cachehints == CACHE_GET_MTMODE ? MT_NICE_FILTER : 0;
79 }
80
81 static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
82 };
83
84
85 class PeculiarBlend : public GenericVideoFilter
86 /**
87 * Class to remove nasty telecining effect (see docs)
88 **/
89 {
90 public:
91 PeculiarBlend(PClip _child, int _cutoff, IScriptEnvironment* env);
92 PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) override;
93
94 int __stdcall SetCacheHints(int cachehints, int frame_range) override {
95 AVS_UNUSED(frame_range);
96 return cachehints == CACHE_GET_MTMODE ? MT_NICE_FILTER : 0;
97 }
98
99 static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
100
101 private:
102 const int cutoff;
103 };
104
105
106 class SkewRows : public GenericVideoFilter
107 /**
108 * Class to recast the row alignment of a frame
109 **/
110 {
111 public:
112 SkewRows(PClip _child, int skew, IScriptEnvironment* env);
113 PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) override;
114
115 int __stdcall SetCacheHints(int cachehints, int frame_range) override {
116 AVS_UNUSED(frame_range);
117 return cachehints == CACHE_GET_MTMODE ? MT_NICE_FILTER : 0;
118 }
119
120 static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
121 };
122
123
124 #endif // __Misc_H__
125