#include "libavcodec/qpeldsp.h"
#include "fpel.h"
-void ff_put_pixels8_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2,
+void ff_put_pixels8_l2_mmxext(uint8_t *dst,
+ const uint8_t *src1, const uint8_t *src2,
int dstStride, int src1Stride, int h);
-void ff_put_no_rnd_pixels8_l2_mmxext(uint8_t *dst, uint8_t *src1,
- uint8_t *src2, int dstStride,
- int src1Stride, int h);
-void ff_avg_pixels8_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2,
+void ff_put_no_rnd_pixels8_l2_mmxext(uint8_t *dst,
+ const uint8_t *src1, const uint8_t *src2,
+ int dstStride, int src1Stride, int h);
+void ff_avg_pixels8_l2_mmxext(uint8_t *dst,
+ const uint8_t *src1, const uint8_t *src2,
int dstStride, int src1Stride, int h);
-void ff_put_pixels16_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2,
+void ff_put_pixels16_l2_mmxext(uint8_t *dst,
+ const uint8_t *src1, const uint8_t *src2,
int dstStride, int src1Stride, int h);
-void ff_avg_pixels16_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2,
+void ff_avg_pixels16_l2_mmxext(uint8_t *dst,
+ const uint8_t *src1, const uint8_t *src2,
int dstStride, int src1Stride, int h);
-void ff_put_no_rnd_pixels16_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2,
+void ff_put_no_rnd_pixels16_l2_mmxext(uint8_t *dst,
+ const uint8_t *src1, const uint8_t *src2,
int dstStride, int src1Stride, int h);
-void ff_put_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride, int h);
-void ff_avg_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride, int h);
-void ff_put_no_rnd_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_no_rnd_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst,
+ const uint8_t *src,
int dstStride, int srcStride,
int h);
-void ff_put_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride, int h);
-void ff_avg_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride, int h);
-void ff_put_no_rnd_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_no_rnd_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst,
+ const uint8_t *src,
int dstStride, int srcStride,
int h);
-void ff_put_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride);
-void ff_avg_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride);
-void ff_put_no_rnd_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_no_rnd_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst,
+ const uint8_t *src,
int dstStride, int srcStride);
-void ff_put_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride);
-void ff_avg_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_avg_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, const uint8_t *src,
int dstStride, int srcStride);
-void ff_put_no_rnd_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
+void ff_put_no_rnd_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst,
+ const uint8_t *src,
int dstStride, int srcStride);
#define ff_put_no_rnd_pixels16_mmxext ff_put_pixels16_mmx
#define ff_put_no_rnd_pixels8_mmxext ff_put_pixels8_mmx
#define ff_put_pixels8_mmxext ff_put_pixels8_mmx
#define QPEL_OP(OPNAME, RND, MMX) \
-static void OPNAME ## qpel8_mc00_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc00_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
ff_ ## OPNAME ## pixels8_ ## MMX(dst, src, stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[8]; \
stride, stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc20_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
ff_ ## OPNAME ## mpeg4_qpel8_h_lowpass_ ## MMX(dst, src, stride, \
stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[8]; \
stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[8]; \
stride, stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc02_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, src, \
stride, stride); \
} \
\
-static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[8]; \
stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8, 8); \
} \
\
-static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8, 8); \
} \
\
-static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8, 8); \
} \
\
-static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8, 8); \
} \
\
-static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8, 8); \
} \
\
-static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8, 8); \
} \
\
-static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[8 + 9]; \
stride, 8); \
} \
\
-static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[9]; \
stride, 8); \
} \
\
-static void OPNAME ## qpel16_mc00_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc00_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
ff_ ## OPNAME ## pixels16_ ## MMX(dst, src, stride, 16); \
} \
\
-static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[32]; \
stride, 16); \
} \
\
-static void OPNAME ## qpel16_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc20_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
ff_ ## OPNAME ## mpeg4_qpel16_h_lowpass_ ## MMX(dst, src, \
stride, stride, 16);\
} \
\
-static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[32]; \
stride, stride, 16); \
} \
\
-static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[32]; \
stride, 16); \
} \
\
-static void OPNAME ## qpel16_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc02_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, src, \
stride, stride); \
} \
\
-static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t temp[32]; \
stride, stride, 16); \
} \
\
-static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[16 * 2 + 17 * 2]; \
stride, 16, 16); \
} \
\
-static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[16 * 2 + 17 * 2]; \
stride, 16, 16); \
} \
\
-static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[16 * 2 + 17 * 2]; \
stride, 16, 16); \
} \
\
-static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[16 * 2 + 17 * 2]; \
stride, 16, 16); \
} \
\
-static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[16 * 2 + 17 * 2]; \
stride, 16, 16); \
} \
\
-static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[16 * 2 + 17 * 2]; \
stride, 16, 16); \
} \
\
-static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[17 * 2]; \
stride, 16); \
} \
\
-static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[17 * 2]; \
stride, 16); \
} \
\
-static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \
+static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, \
+ const uint8_t *src, \
ptrdiff_t stride) \
{ \
uint64_t half[17 * 2]; \