Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/psx/octoshock/video/Deinterlacer.h
2 views
1
/* Mednafen - Multi-system Emulator
2
*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation; either version 2 of the License, or
6
* (at your option) any later version.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*/
17
18
#ifndef __MDFN_DEINTERLACER_H
19
#define __MDFN_DEINTERLACER_H
20
21
#include <vector>
22
23
class Deinterlacer
24
{
25
public:
26
27
Deinterlacer();
28
~Deinterlacer();
29
30
enum
31
{
32
DEINT_BOB_OFFSET = 0, // Code will fall-through to this case under certain conditions, too.
33
DEINT_BOB,
34
DEINT_WEAVE,
35
};
36
37
void SetType(unsigned t);
38
inline unsigned GetType(void)
39
{
40
return(DeintType);
41
}
42
43
void Process(MDFN_Surface *surface, MDFN_Rect &DisplayRect, int32 *LineWidths, const bool field);
44
45
void ClearState(void);
46
47
private:
48
49
template<typename T>
50
void InternalProcess(MDFN_Surface *surface, MDFN_Rect &DisplayRect, int32 *LineWidths, const bool field);
51
52
MDFN_Surface *FieldBuffer;
53
std::vector<int32> LWBuffer;
54
bool StateValid;
55
MDFN_Rect PrevDRect;
56
unsigned DeintType;
57
};
58
59
#endif
60
61