aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/imgconvert_template.h
diff options
context:
space:
mode:
authorDrew Hess <dhess@ilm.com>2003-09-29 15:44:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-09-29 15:44:59 +0000
commitda64ecc3e75733c0232c0d5205caff5b9fc53194 (patch)
tree3ac4976a8604fb50c30007a8198ca5396c36cd1a /libavcodec/imgconvert_template.h
parent6c8e0d4d46d6173c9226ff92c5995ab8138f444e (diff)
downloadffmpeg-da64ecc3e75733c0232c0d5205caff5b9fc53194.tar.gz
avcodec const correctness patch by (Drew Hess <dhess at ilm dot com>)
Originally committed as revision 2318 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imgconvert_template.h')
-rw-r--r--libavcodec/imgconvert_template.h47
1 files changed, 26 insertions, 21 deletions
diff --git a/libavcodec/imgconvert_template.h b/libavcodec/imgconvert_template.h
index 015b74f1e3..cd5a7313c3 100644
--- a/libavcodec/imgconvert_template.h
+++ b/libavcodec/imgconvert_template.h
@@ -21,10 +21,11 @@
#define RGB_OUT(d, r, g, b) RGBA_OUT(d, r, g, b, 0xff)
#endif
-static void glue(yuv420p_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
+static void glue(yuv420p_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
- uint8_t *y1_ptr, *y2_ptr, *cb_ptr, *cr_ptr, *d, *d1, *d2;
+ const uint8_t *y1_ptr, *y2_ptr, *cb_ptr, *cr_ptr;
+ uint8_t *d, *d1, *d2;
int w, y, cb, cr, r_add, g_add, b_add, width2;
uint8_t *cm = cropTbl + MAX_NEG_CROP;
unsigned int r, g, b;
@@ -114,10 +115,11 @@ static void glue(yuv420p_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
}
}
-static void glue(yuvj420p_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
+static void glue(yuvj420p_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
- uint8_t *y1_ptr, *y2_ptr, *cb_ptr, *cr_ptr, *d, *d1, *d2;
+ const uint8_t *y1_ptr, *y2_ptr, *cb_ptr, *cr_ptr;
+ uint8_t *d, *d1, *d2;
int w, y, cb, cr, r_add, g_add, b_add, width2;
uint8_t *cm = cropTbl + MAX_NEG_CROP;
unsigned int r, g, b;
@@ -207,7 +209,7 @@ static void glue(yuvj420p_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
}
}
-static void glue(RGB_NAME, _to_yuv420p)(AVPicture *dst, AVPicture *src,
+static void glue(RGB_NAME, _to_yuv420p)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
int wrap, wrap3, width2;
@@ -314,7 +316,7 @@ static void glue(RGB_NAME, _to_yuv420p)(AVPicture *dst, AVPicture *src,
}
}
-static void glue(RGB_NAME, _to_gray)(AVPicture *dst, AVPicture *src,
+static void glue(RGB_NAME, _to_gray)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const unsigned char *p;
@@ -340,7 +342,7 @@ static void glue(RGB_NAME, _to_gray)(AVPicture *dst, AVPicture *src,
}
}
-static void glue(gray_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
+static void glue(gray_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const unsigned char *p;
@@ -366,7 +368,7 @@ static void glue(gray_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
}
}
-static void glue(pal8_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
+static void glue(pal8_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const unsigned char *p;
@@ -409,7 +411,7 @@ static void glue(pal8_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
#if !defined(FMT_RGBA32) && defined(RGBA_OUT)
/* alpha support */
-static void glue(rgba32_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
+static void glue(rgba32_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const uint8_t *s;
@@ -439,7 +441,7 @@ static void glue(rgba32_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
}
}
-static void glue(RGB_NAME, _to_rgba32)(AVPicture *dst, AVPicture *src,
+static void glue(RGB_NAME, _to_rgba32)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const uint8_t *s;
@@ -469,7 +471,7 @@ static void glue(RGB_NAME, _to_rgba32)(AVPicture *dst, AVPicture *src,
#ifndef FMT_RGB24
-static void glue(rgb24_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
+static void glue(rgb24_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const uint8_t *s;
@@ -497,7 +499,7 @@ static void glue(rgb24_to_, RGB_NAME)(AVPicture *dst, AVPicture *src,
}
}
-static void glue(RGB_NAME, _to_rgb24)(AVPicture *dst, AVPicture *src,
+static void glue(RGB_NAME, _to_rgb24)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const uint8_t *s;
@@ -529,10 +531,11 @@ static void glue(RGB_NAME, _to_rgb24)(AVPicture *dst, AVPicture *src,
#ifdef FMT_RGB24
-static void yuv444p_to_rgb24(AVPicture *dst, AVPicture *src,
+static void yuv444p_to_rgb24(AVPicture *dst, const AVPicture *src,
int width, int height)
{
- uint8_t *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1;
+ const uint8_t *y1_ptr, *cb_ptr, *cr_ptr;
+ uint8_t *d, *d1;
int w, y, cb, cr, r_add, g_add, b_add;
uint8_t *cm = cropTbl + MAX_NEG_CROP;
unsigned int r, g, b;
@@ -561,10 +564,11 @@ static void yuv444p_to_rgb24(AVPicture *dst, AVPicture *src,
}
}
-static void yuvj444p_to_rgb24(AVPicture *dst, AVPicture *src,
+static void yuvj444p_to_rgb24(AVPicture *dst, const AVPicture *src,
int width, int height)
{
- uint8_t *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1;
+ const uint8_t *y1_ptr, *cb_ptr, *cr_ptr;
+ uint8_t *d, *d1;
int w, y, cb, cr, r_add, g_add, b_add;
uint8_t *cm = cropTbl + MAX_NEG_CROP;
unsigned int r, g, b;
@@ -593,7 +597,7 @@ static void yuvj444p_to_rgb24(AVPicture *dst, AVPicture *src,
}
}
-static void rgb24_to_yuv444p(AVPicture *dst, AVPicture *src,
+static void rgb24_to_yuv444p(AVPicture *dst, const AVPicture *src,
int width, int height)
{
int src_wrap, x, y;
@@ -625,7 +629,7 @@ static void rgb24_to_yuv444p(AVPicture *dst, AVPicture *src,
}
}
-static void rgb24_to_yuvj420p(AVPicture *dst, AVPicture *src,
+static void rgb24_to_yuvj420p(AVPicture *dst, const AVPicture *src,
int width, int height)
{
int wrap, wrap3, width2;
@@ -732,7 +736,7 @@ static void rgb24_to_yuvj420p(AVPicture *dst, AVPicture *src,
}
}
-static void rgb24_to_yuvj444p(AVPicture *dst, AVPicture *src,
+static void rgb24_to_yuvj444p(AVPicture *dst, const AVPicture *src,
int width, int height)
{
int src_wrap, x, y;
@@ -768,7 +772,7 @@ static void rgb24_to_yuvj444p(AVPicture *dst, AVPicture *src,
#if defined(FMT_RGB24) || defined(FMT_RGBA32)
-static void glue(RGB_NAME, _to_pal8)(AVPicture *dst, AVPicture *src,
+static void glue(RGB_NAME, _to_pal8)(AVPicture *dst, const AVPicture *src,
int width, int height)
{
const unsigned char *p;
@@ -816,7 +820,8 @@ static void glue(RGB_NAME, _to_pal8)(AVPicture *dst, AVPicture *src,
#ifdef RGBA_IN
-static int glue(get_alpha_info_, RGB_NAME)(AVPicture *src, int width, int height)
+static int glue(get_alpha_info_, RGB_NAME)(const AVPicture *src,
+ int width, int height)
{
const unsigned char *p;
int src_wrap, ret, x, y;