/* Mednafen - Multi-system Emulator1*2* This program is free software; you can redistribute it and/or modify3* it under the terms of the GNU General Public License as published by4* the Free Software Foundation; either version 2 of the License, or5* (at your option) any later version.6*7* This program is distributed in the hope that it will be useful,8* but WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10* GNU General Public License for more details.11*12* You should have received a copy of the GNU General Public License13* along with this program; if not, write to the Free Software14* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA15*/1617#ifndef __MDFN_DEINTERLACER_H18#define __MDFN_DEINTERLACER_H1920#include <vector>2122class Deinterlacer23{24public:2526Deinterlacer();27~Deinterlacer();2829enum30{31DEINT_BOB_OFFSET = 0, // Code will fall-through to this case under certain conditions, too.32DEINT_BOB,33DEINT_WEAVE,34};3536void SetType(unsigned t);37inline unsigned GetType(void)38{39return(DeintType);40}4142void Process(MDFN_Surface *surface, MDFN_Rect &DisplayRect, int32 *LineWidths, const bool field);4344void ClearState(void);4546private:4748template<typename T>49void InternalProcess(MDFN_Surface *surface, MDFN_Rect &DisplayRect, int32 *LineWidths, const bool field);5051MDFN_Surface *FieldBuffer;52std::vector<int32> LWBuffer;53bool StateValid;54MDFN_Rect PrevDRect;55unsigned DeintType;56};5758#endif596061