#ifndef SWSCALE_INTERNAL_H
#define SWSCALE_INTERNAL_H
+#ifdef HAVE_ALTIVEC_H
+#include <altivec.h>
+#endif
+
+#ifdef CONFIG_DARWIN
+#define AVV(x...) (x)
+#else
+#define AVV(x...) {x}
+#endif
+
#include "../mp_msg.h"
#define MSG_WARN(args...) mp_msg(MSGT_SWS,MSGL_WARN, ##args )
int chrIntHSubSample, chrIntVSubSample;
int chrDstHSubSample, chrDstVSubSample;
int vChrDrop;
+ int sliceDir;
+ double param[2];
int16_t **lumPixBuf;
int16_t **chrPixBuf;
int vLumBufSize;
int vChrBufSize;
- uint8_t __attribute__((aligned(32))) funnyYCode[10000];
- uint8_t __attribute__((aligned(32))) funnyUVCode[10000];
+ uint8_t *funnyYCode;
+ uint8_t *funnyUVCode;
int32_t *lumMmx2FilterPos;
int32_t *chrMmx2FilterPos;
int16_t *lumMmx2Filter;
#define V_OFFSET "10*8"
#define LUM_MMX_FILTER_OFFSET "11*8"
#define CHR_MMX_FILTER_OFFSET "11*8+4*4*256"
-#define DSTW_OFFSET "11*8+4*4*256*2"
+#define DSTW_OFFSET "11*8+4*4*256*2" //do not change, its hardcoded in the asm
#define ESP_OFFSET "11*8+4*4*256*2+4"
+#define VROUNDER_OFFSET "11*8+4*4*256*2+8"
uint64_t redDither __attribute__((aligned(8)));
uint64_t greenDither __attribute__((aligned(8)));
int32_t chrMmxFilter[4*MAX_FILTER_SIZE];
int dstW;
int esp;
+ uint64_t vRounder __attribute__((aligned(8)));
+
+#ifdef HAVE_ALTIVEC
+
+ vector signed short CY;
+ vector signed short CRV;
+ vector signed short CBU;
+ vector signed short CGU;
+ vector signed short CGV;
+ vector signed short OY;
+ vector unsigned short CSHIFT;
+
+#endif
+
} SwsContext;
//FIXME check init (where 0)