REminiscence/scaler.h

41 lines
766 B
C
Raw Permalink Normal View History

2016-03-20 17:00:00 +01:00
/*
* REminiscence - Flashback interpreter
2019-10-27 17:00:00 +01:00
* Copyright (C) 2005-2019 Gregory Montoir (cyx@users.sourceforge.net)
2015-08-02 18:00:00 +02:00
*/
#ifndef SCALER_H__
#define SCALER_H__
2017-11-03 17:00:00 +01:00
#include <stdint.h>
typedef void (*ScaleProc32)(int factor, uint32_t *dst, int dstPitch, const uint32_t *src, int srcPitch, int w, int h);
enum ScalerType {
kScalerTypePoint,
kScalerTypeLinear,
kScalerTypeInternal,
kScalerTypeExternal,
2015-08-02 18:00:00 +02:00
};
2017-11-03 17:00:00 +01:00
#define SCALER_TAG 1
2015-08-02 18:00:00 +02:00
struct Scaler {
2017-11-03 17:00:00 +01:00
uint32_t tag;
2015-08-02 18:00:00 +02:00
const char *name;
2017-11-03 17:00:00 +01:00
int factorMin, factorMax;
ScaleProc32 scale;
2015-08-02 18:00:00 +02:00
};
2017-11-03 17:00:00 +01:00
extern const Scaler _internalScaler;
const Scaler *findScaler(const char *name);
2015-08-02 18:00:00 +02:00
2018-03-28 18:00:00 +02:00
#ifdef USE_STATIC_SCALER
extern const Scaler scaler_nearest;
extern const Scaler scaler_tv2x;
2019-10-27 17:00:00 +01:00
extern const Scaler scaler_xbr;
2018-03-28 18:00:00 +02:00
#endif
2015-08-02 18:00:00 +02:00
#endif // SCALER_H__