aboutsummaryrefslogtreecommitdiff
path: root/libswscale/x86
diff options
context:
space:
mode:
authorZuxy Meng2010-01-15 08:51:51 +0000
committerZuxy Meng2010-01-15 08:51:51 +0000
commita959e24780e4570061df034ddf0271992f3e6dc6 (patch)
treef982ad3bd25f48e65c8f31d92b4251a29c599ef8 /libswscale/x86
parent7c2de274e7ae6743cbd3f3f8b1aeebdf353cfdf5 (diff)
Const correctness for src pointer. Remove all constness related warnings in
libswscale. Originally committed as revision 30306 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/x86')
-rw-r--r--libswscale/x86/yuv2rgb_template.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libswscale/x86/yuv2rgb_template.c b/libswscale/x86/yuv2rgb_template.c
index bdc347e799..ba906899f0 100644
--- a/libswscale/x86/yuv2rgb_template.c
+++ b/libswscale/x86/yuv2rgb_template.c
@@ -134,9 +134,9 @@
__asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); \
for (y= 0; y<srcSliceH; y++ ) { \
uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0]; \
- uint8_t *py = src[0] + y*srcStride[0]; \
- uint8_t *pu = src[1] + (y>>1)*srcStride[1]; \
- uint8_t *pv = src[2] + (y>>1)*srcStride[2]; \
+ const uint8_t *py = src[0] + y*srcStride[0]; \
+ const uint8_t *pu = src[1] + (y>>1)*srcStride[1]; \
+ const uint8_t *pv = src[2] + (y>>1)*srcStride[2]; \
x86_reg index= -h_size/2; \
#define YUV2RGB_INIT \
@@ -179,7 +179,7 @@
__asm__ volatile (SFENCE"\n\t"EMMS); \
return srcSliceH; \
-static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuv420_rgb16)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, h_size;
@@ -236,7 +236,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr
YUV2RGB_OPERANDS
}
-static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuv420_rgb15)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, h_size;
@@ -396,7 +396,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr
"pxor %%mm4, %%mm4 \n\t"
#endif
-static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuv420_rgb24)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, h_size;
@@ -413,7 +413,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr
YUV2RGB_OPERANDS
}
-static inline int RENAME(yuv420_bgr24)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuv420_bgr24)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, h_size;
@@ -491,7 +491,7 @@ etc.
"pxor %%mm4, %%mm4;" /* zero mm4 */ \
"movq 8 (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ \
-static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuv420_rgb32)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, h_size;
@@ -508,7 +508,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr
YUV2RGB_OPERANDS
}
-static inline int RENAME(yuva420_rgb32)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuva420_rgb32)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
#if HAVE_7REGS
@@ -516,7 +516,7 @@ static inline int RENAME(yuva420_rgb32)(SwsContext *c, uint8_t* src[], int srcSt
YUV2RGB_LOOP(4)
- uint8_t *pa = src[3] + y*srcStride[3];
+ const uint8_t *pa = src[3] + y*srcStride[3];
YUV2RGB_INIT
YUV2RGB
"movq (%6, %0, 2), %%mm3;" /* Load 8 A A7 A6 A5 A4 A3 A2 A1 A0 */
@@ -527,7 +527,7 @@ static inline int RENAME(yuva420_rgb32)(SwsContext *c, uint8_t* src[], int srcSt
#endif
}
-static inline int RENAME(yuv420_bgr32)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuv420_bgr32)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
int y, h_size;
@@ -544,7 +544,7 @@ static inline int RENAME(yuv420_bgr32)(SwsContext *c, uint8_t* src[], int srcStr
YUV2RGB_OPERANDS
}
-static inline int RENAME(yuva420_bgr32)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+static inline int RENAME(yuva420_bgr32)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
#if HAVE_7REGS
@@ -552,7 +552,7 @@ static inline int RENAME(yuva420_bgr32)(SwsContext *c, uint8_t* src[], int srcSt
YUV2RGB_LOOP(4)
- uint8_t *pa = src[3] + y*srcStride[3];
+ const uint8_t *pa = src[3] + y*srcStride[3];
YUV2RGB_INIT
YUV2RGB
"movq (%6, %0, 2), %%mm3;" /* Load 8 A A7 A6 A5 A4 A3 A2 A1 A0 */