summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xine-utils/color.c90
-rw-r--r--src/xine-utils/copy.c8
-rw-r--r--src/xine-utils/xine_buffer.c12
-rw-r--r--src/xine-utils/xine_buffer.h12
-rw-r--r--src/xine-utils/xineutils.h32
5 files changed, 77 insertions, 77 deletions
diff --git a/src/xine-utils/color.c b/src/xine-utils/color.c
index 46a7a2ca0..992f0bcc7 100644
--- a/src/xine-utils/color.c
+++ b/src/xine-utils/color.c
@@ -61,7 +61,7 @@
* instructions), these macros will automatically map to those special
* instructions.
*
- * $Id: color.c,v 1.27 2005/07/03 20:22:10 miguelfreitas Exp $
+ * $Id: color.c,v 1.28 2006/02/14 19:12:16 dsalt Exp $
*/
#include "xine_internal.h"
@@ -130,25 +130,25 @@ int v_r_table[256];
int v_g_table[256];
int v_b_table[256];
-void (*yuv444_to_yuy2) (yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch);
+void (*yuv444_to_yuy2) (const yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch);
void (*yuv9_to_yv12)
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
int width, int height);
void (*yuv411_to_yv12)
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
int width, int height);
void (*yv12_to_yuy2)
- (unsigned char *y_src, int y_src_pitch,
- unsigned char *u_src, int u_src_pitch,
- unsigned char *v_src, int v_src_pitch,
+ (const unsigned char *y_src, int y_src_pitch,
+ const unsigned char *u_src, int u_src_pitch,
+ const unsigned char *v_src, int v_src_pitch,
unsigned char *yuy2_map, int yuy2_pitch,
int width, int height, int progressive);
void (*yuy2_to_yv12)
- (unsigned char *yuy2_map, int yuy2_pitch,
+ (const unsigned char *yuy2_map, int yuy2_pitch,
unsigned char *y_dst, int y_dst_pitch,
unsigned char *u_dst, int u_dst_pitch,
unsigned char *v_dst, int v_dst_pitch,
@@ -201,7 +201,7 @@ void free_yuv_planes(yuv_planes_t *yuv_planes) {
*
* YUY2 map: Y0 U0 Y1 V1 Y2 U2 Y3 V3
*/
-static void yuv444_to_yuy2_c(yuv_planes_t *yuv_planes, unsigned char *yuy2_map,
+static void yuv444_to_yuy2_c(const yuv_planes_t *yuv_planes, unsigned char *yuy2_map,
int pitch) {
int row_ptr, pixel_ptr;
@@ -315,7 +315,7 @@ static void yuv444_to_yuy2_c(yuv_planes_t *yuv_planes, unsigned char *yuy2_map,
* enough.
*
*/
-static void yuv444_to_yuy2_mmx(yuv_planes_t *yuv_planes, unsigned char *yuy2_map,
+static void yuv444_to_yuy2_mmx(const yuv_planes_t *yuv_planes, unsigned char *yuy2_map,
int pitch) {
#if defined(ARCH_X86) || defined(ARCH_X86_64)
int h, i, j, k;
@@ -463,7 +463,7 @@ static void yuv444_to_yuy2_mmx(yuv_planes_t *yuv_planes, unsigned char *yuy2_map
#endif
}
-static void hscale_chroma_line (unsigned char *dst, unsigned char *src,
+static void hscale_chroma_line (unsigned char *dst, const unsigned char *src,
int width) {
unsigned int n1, n2;
@@ -483,7 +483,7 @@ static void hscale_chroma_line (unsigned char *dst, unsigned char *src,
}
static void vscale_chroma_line (unsigned char *dst, int pitch,
- unsigned char *src1, unsigned char *src2, int width) {
+ const unsigned char *src1, const unsigned char *src2, int width) {
unsigned int t1, t2;
unsigned int n1, n2, n3, n4;
@@ -495,8 +495,8 @@ static void vscale_chroma_line (unsigned char *dst, int pitch,
/* process blocks of 4 pixels */
for (x=0; x < (width / 4); x++) {
- n1 = *((unsigned int *) src1); src1 = (unsigned char *)(((unsigned int *) src1) + 1);
- n2 = *((unsigned int *) src2); src2 = (unsigned char *)(((unsigned int *) src2) + 1);
+ n1 = *((unsigned int *) src1); src1 = (const unsigned char *)(((const unsigned int *) src1) + 1);
+ n2 = *((unsigned int *) src2); src2 = (const unsigned char *)(((const unsigned int *) src2) + 1);
n3 = (n1 & 0xFF00FF00) >> 8;
n4 = (n2 & 0xFF00FF00) >> 8;
n1 &= 0x00FF00FF;
@@ -525,7 +525,7 @@ static void vscale_chroma_line (unsigned char *dst, int pitch,
}
}
-static void upsample_c_plane_c(unsigned char *src, int src_width,
+static void upsample_c_plane_c(const unsigned char *src, int src_width,
int src_height, unsigned char *dest,
unsigned int src_pitch, unsigned int dest_pitch) {
@@ -570,9 +570,9 @@ static void upsample_c_plane_c(unsigned char *src, int src_width,
*
*/
static void yuv9_to_yv12_c
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
int width, int height) {
int y;
@@ -599,9 +599,9 @@ static void yuv9_to_yv12_c
*
*/
static void yuv411_to_yv12_c
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
int width, int height) {
int y;
@@ -670,18 +670,18 @@ static void yuv411_to_yv12_c
* changed to support interlaced frames and use simple mean interpolation [MF]
*****************************************************************************/
static void yv12_to_yuy2_c
- (unsigned char *y_src, int y_src_pitch,
- unsigned char *u_src, int u_src_pitch,
- unsigned char *v_src, int v_src_pitch,
+ (const unsigned char *y_src, int y_src_pitch,
+ const unsigned char *u_src, int u_src_pitch,
+ const unsigned char *v_src, int v_src_pitch,
unsigned char *yuy2_map, int yuy2_pitch,
int width, int height, int progressive) {
uint8_t *p_line1, *p_line2 = yuy2_map;
- uint8_t *p_y1, *p_y2 = y_src;
- uint8_t *p_u = u_src;
- uint8_t *p_v = v_src;
- uint8_t *p_u2 = u_src + u_src_pitch;
- uint8_t *p_v2 = v_src + v_src_pitch;
+ const uint8_t *p_y1, *p_y2 = y_src;
+ const uint8_t *p_u = u_src;
+ const uint8_t *p_v = v_src;
+ const uint8_t *p_u2 = u_src + u_src_pitch;
+ const uint8_t *p_v2 = v_src + v_src_pitch;
int i_x, i_y;
@@ -825,18 +825,18 @@ do {
#endif
static void yv12_to_yuy2_mmxext
- (unsigned char *y_src, int y_src_pitch,
- unsigned char *u_src, int u_src_pitch,
- unsigned char *v_src, int v_src_pitch,
+ (const unsigned char *y_src, int y_src_pitch,
+ const unsigned char *u_src, int u_src_pitch,
+ const unsigned char *v_src, int v_src_pitch,
unsigned char *yuy2_map, int yuy2_pitch,
int width, int height, int progressive ) {
#if defined(ARCH_X86) || defined(ARCH_X86_64)
uint8_t *p_line1, *p_line2 = yuy2_map;
- uint8_t *p_y1, *p_y2 = y_src;
- uint8_t *p_u = u_src;
- uint8_t *p_v = v_src;
- uint8_t *p_u2 = u_src + u_src_pitch;
- uint8_t *p_v2 = v_src + v_src_pitch;
+ const uint8_t *p_y1, *p_y2 = y_src;
+ const uint8_t *p_u = u_src;
+ const uint8_t *p_v = v_src;
+ const uint8_t *p_u2 = u_src + u_src_pitch;
+ const uint8_t *p_v2 = v_src + v_src_pitch;
int i_x, i_y;
@@ -963,13 +963,13 @@ static void yv12_to_yuy2_mmxext
*p_v++ = (*p_line1++ + *p_line2++)>>1;
static void yuy2_to_yv12_c
- (unsigned char *yuy2_map, int yuy2_pitch,
+ (const unsigned char *yuy2_map, int yuy2_pitch,
unsigned char *y_dst, int y_dst_pitch,
unsigned char *u_dst, int u_dst_pitch,
unsigned char *v_dst, int v_dst_pitch,
int width, int height) {
- uint8_t *p_line1, *p_line2 = yuy2_map;
+ const uint8_t *p_line1, *p_line2 = yuy2_map;
uint8_t *p_y1, *p_y2 = y_dst;
uint8_t *p_u = u_dst;
uint8_t *p_v = v_dst;
@@ -1056,13 +1056,13 @@ do {
#endif
static void yuy2_to_yv12_mmxext
- (unsigned char *yuy2_map, int yuy2_pitch,
+ (const unsigned char *yuy2_map, int yuy2_pitch,
unsigned char *y_dst, int y_dst_pitch,
unsigned char *u_dst, int u_dst_pitch,
unsigned char *v_dst, int v_dst_pitch,
int width, int height) {
#if defined(ARCH_X86) || defined(ARCH_X86_64)
- uint8_t *p_line1, *p_line2 = yuy2_map;
+ const uint8_t *p_line1, *p_line2 = yuy2_map;
uint8_t *p_y1, *p_y2 = y_dst;
uint8_t *p_u = u_dst;
uint8_t *p_v = v_dst;
diff --git a/src/xine-utils/copy.c b/src/xine-utils/copy.c
index bcf4f350d..1a609ed89 100644
--- a/src/xine-utils/copy.c
+++ b/src/xine-utils/copy.c
@@ -28,9 +28,9 @@
#include "xineutils.h"
void yv12_to_yv12
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y_dst_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u_dst_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v_dst_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y_dst_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u_dst_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v_dst_pitch,
int width, int height) {
int y, half_width = width / 2;
@@ -65,7 +65,7 @@ void yv12_to_yv12
}
void yuy2_to_yuy2
- (unsigned char *src, int src_pitch,
+ (const unsigned char *src, int src_pitch,
unsigned char *dst, int dst_pitch,
int width, int height) {
diff --git a/src/xine-utils/xine_buffer.c b/src/xine-utils/xine_buffer.c
index 7d421590a..8dafd23f1 100644
--- a/src/xine-utils/xine_buffer.c
+++ b/src/xine-utils/xine_buffer.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_buffer.c,v 1.8 2003/12/09 00:02:39 f1rmb Exp $
+ * $Id: xine_buffer.c,v 1.9 2006/02/14 19:12:16 dsalt Exp $
*
*
* generic dynamic buffer functions. The goals
@@ -199,7 +199,7 @@ void *_xine_buffer_copyin(void *buf, int index, const void *data, int len) {
* no checks are made in data. It is treated as an ordinary
* user-malloced data chunk.
*/
-void xine_buffer_copyout(void *buf, int index, void *data, int len) {
+void xine_buffer_copyout(const void *buf, int index, void *data, int len) {
#ifdef CHECKS
if (!buf || !data) {
@@ -247,7 +247,7 @@ void *_xine_buffer_set(void *buf, int index, uint8_t b, int len) {
*/
#define xine_buffer_strcat(buf,data) \
buf=_xine_buffer_strcat(buf,data)
-void *_xine_buffer_strcat(void *buf, char *data) {
+void *_xine_buffer_strcat(void *buf, const char *data) {
#ifdef CHECKS
if (!buf || !data) {
@@ -269,7 +269,7 @@ void *_xine_buffer_strcat(void *buf, char *data) {
*/
#define xine_buffer_strcpy(buf,index,data) \
buf=_xine_buffer_strcpy(buf,index,data)
-void *_xine_buffer_strcpy(void *buf, int index, char *data) {
+void *_xine_buffer_strcpy(void *buf, int index, const char *data) {
#ifdef CHECKS
if (!buf || !data) {
@@ -291,7 +291,7 @@ void *_xine_buffer_strcpy(void *buf, int index, char *data) {
* note, that the returned pointer cannot be used
* in any other xine_buffer_* functions.
*/
-char *xine_buffer_strchr(void *buf, int ch) {
+char *xine_buffer_strchr(const void *buf, int ch) {
#ifdef CHECKS
if (!buf) {
lprintf("warning: got NULL pointer\n");
@@ -306,7 +306,7 @@ char *xine_buffer_strchr(void *buf, int ch) {
/*
* get allocated memory size
*/
-int xine_buffer_get_size(void *buf) {
+int xine_buffer_get_size(const void *buf) {
#ifdef CHECKS
if (!buf) {
diff --git a/src/xine-utils/xine_buffer.h b/src/xine-utils/xine_buffer.h
index 80f09a77e..2cb7dfe72 100644
--- a/src/xine-utils/xine_buffer.h
+++ b/src/xine-utils/xine_buffer.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_buffer.h,v 1.4 2004/09/26 22:54:53 valtri Exp $
+ * $Id: xine_buffer.h,v 1.5 2006/02/14 19:12:16 dsalt Exp $
*
*
* generic dynamic buffer functions. The goals
@@ -90,7 +90,7 @@ void *_xine_buffer_copyin(void *buf, int index, const void *data, int len);
* no checks are made in data. It is treated as an ordinary
* user-malloced data chunk.
*/
-void xine_buffer_copyout(void *buf, int index, void *data, int len);
+void xine_buffer_copyout(const void *buf, int index, void *data, int len);
/*
* set len bytes in buf+index to b.
@@ -105,26 +105,26 @@ void *_xine_buffer_set(void *buf, int index, uint8_t b, int len);
*/
#define xine_buffer_strcat(buf,data) \
buf=_xine_buffer_strcat(buf,data)
-void *_xine_buffer_strcat(void *buf, char *data);
+void *_xine_buffer_strcat(void *buf, const char *data);
/*
* copies given string to buf+index
*/
#define xine_buffer_strcpy(buf,index,data) \
buf=_xine_buffer_strcpy(buf,index,data)
-void *_xine_buffer_strcpy(void *buf, int index, char *data);
+void *_xine_buffer_strcpy(void *buf, int index, const char *data);
/*
* returns a pointer to the first occurence of ch.
* note, that the returned pointer cannot be used
* in any other xine_buffer_* functions.
*/
-char *xine_buffer_strchr(void *buf, int ch);
+char *xine_buffer_strchr(const void *buf, int ch);
/*
* get allocated memory size
*/
-int xine_buffer_get_size(void *buf);
+int xine_buffer_get_size(const void *buf);
/*
* ensures a specified buffer size if the user want to
diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h
index d54509123..4f3542154 100644
--- a/src/xine-utils/xineutils.h
+++ b/src/xine-utils/xineutils.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xineutils.h,v 1.99 2006/01/28 17:09:59 tmattern Exp $
+ * $Id: xineutils.h,v 1.100 2006/02/14 19:12:16 dsalt Exp $
*
*/
#ifndef XINEUTILS_H
@@ -711,25 +711,25 @@ void init_yuv_planes(yuv_planes_t *yuv_planes, int width, int height);
void free_yuv_planes(yuv_planes_t *yuv_planes);
extern void (*yuv444_to_yuy2)
- (yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch);
+ (const yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch);
extern void (*yuv9_to_yv12)
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
int width, int height);
extern void (*yuv411_to_yv12)
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch,
int width, int height);
extern void (*yv12_to_yuy2)
- (unsigned char *y_src, int y_src_pitch,
- unsigned char *u_src, int u_src_pitch,
- unsigned char *v_src, int v_src_pitch,
+ (const unsigned char *y_src, int y_src_pitch,
+ const unsigned char *u_src, int u_src_pitch,
+ const unsigned char *v_src, int v_src_pitch,
unsigned char *yuy2_map, int yuy2_pitch,
int width, int height, int progressive);
extern void (*yuy2_to_yv12)
- (unsigned char *yuy2_map, int yuy2_pitch,
+ (const unsigned char *yuy2_map, int yuy2_pitch,
unsigned char *y_dst, int y_dst_pitch,
unsigned char *u_dst, int u_dst_pitch,
unsigned char *v_dst, int v_dst_pitch,
@@ -782,12 +782,12 @@ extern int v_b_table[256];
/* frame copying functions */
extern void yv12_to_yv12
- (unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y_dst_pitch,
- unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u_dst_pitch,
- unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v_dst_pitch,
+ (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y_dst_pitch,
+ const unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u_dst_pitch,
+ const unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v_dst_pitch,
int width, int height);
extern void yuy2_to_yuy2
- (unsigned char *src, int src_pitch,
+ (const unsigned char *src, int src_pitch,
unsigned char *dst, int dst_pitch,
int width, int height);