diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libffmpeg/diff_to_ffmpeg_cvs.txt | 9 | ||||
-rw-r--r-- | src/libffmpeg/libavcodec/mlib/dsputil_mlib.c | 50 | ||||
-rw-r--r-- | src/libxineadec/nosefart/memguard.c | 15 | ||||
-rw-r--r-- | src/post/goom/filters.c | 23 | ||||
-rw-r--r-- | src/post/goom/filters.h | 23 | ||||
-rw-r--r-- | src/post/goom/goom_core.c | 10 |
6 files changed, 81 insertions, 49 deletions
diff --git a/src/libffmpeg/diff_to_ffmpeg_cvs.txt b/src/libffmpeg/diff_to_ffmpeg_cvs.txt index 348b9a315..b70c44797 100644 --- a/src/libffmpeg/diff_to_ffmpeg_cvs.txt +++ b/src/libffmpeg/diff_to_ffmpeg_cvs.txt @@ -526,6 +526,15 @@ retrieving revision 1.14 diff -u -r1.14 dsputil_mlib.c --- mlib/dsputil_mlib.c 11 Oct 2003 16:43:51 -0000 1.14 +++ mlib/dsputil_mlib.c 1 Feb 2004 04:42:48 -0000 +@@ -20,6 +20,8 @@ + #include "../dsputil.h" + #include "../mpegvideo.h" + ++#include "../../../xine-utils/xineutils.h" ++ + #include <mlib_types.h> + #include <mlib_status.h> + #include <mlib_sys.h> @@ -419,6 +419,7 @@ void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx) diff --git a/src/libffmpeg/libavcodec/mlib/dsputil_mlib.c b/src/libffmpeg/libavcodec/mlib/dsputil_mlib.c index 6cd8bfe97..278682534 100644 --- a/src/libffmpeg/libavcodec/mlib/dsputil_mlib.c +++ b/src/libffmpeg/libavcodec/mlib/dsputil_mlib.c @@ -20,6 +20,8 @@ #include "../dsputil.h" #include "../mpegvideo.h" +#include "../../../xine-utils/xineutils.h" + #include <mlib_types.h> #include <mlib_status.h> #include <mlib_sys.h> @@ -60,7 +62,7 @@ static void add_pixels_clamped_mlib(const DCTELEM *block, uint8_t *pixels, int l /* put block, width 16 pixel, height 8/16 */ -static void put_pixels16_mlib (uint8_t * dest, const uint8_t * ref, +static void put_pixels16_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -77,7 +79,7 @@ static void put_pixels16_mlib (uint8_t * dest, const uint8_t * ref, } } -static void put_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, +static void put_pixels16_x2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -94,7 +96,7 @@ static void put_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, } } -static void put_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref, +static void put_pixels16_y2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -130,7 +132,7 @@ static void put_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref, /* put block, width 8 pixel, height 4/8/16 */ -static void put_pixels8_mlib (uint8_t * dest, const uint8_t * ref, +static void put_pixels8_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -151,7 +153,7 @@ static void put_pixels8_mlib (uint8_t * dest, const uint8_t * ref, } } -static void put_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, +static void put_pixels8_x2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -172,7 +174,7 @@ static void put_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, } } -static void put_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref, +static void put_pixels8_y2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -216,7 +218,7 @@ static void put_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref, /* average block, width 16 pixel, height 8/16 */ -static void avg_pixels16_mlib (uint8_t * dest, const uint8_t * ref, +static void avg_pixels16_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -233,7 +235,7 @@ static void avg_pixels16_mlib (uint8_t * dest, const uint8_t * ref, } } -static void avg_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, +static void avg_pixels16_x2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -250,7 +252,7 @@ static void avg_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, } } -static void avg_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref, +static void avg_pixels16_y2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -286,7 +288,7 @@ static void avg_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref, /* average block, width 8 pixel, height 4/8/16 */ -static void avg_pixels8_mlib (uint8_t * dest, const uint8_t * ref, +static void avg_pixels8_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -307,7 +309,7 @@ static void avg_pixels8_mlib (uint8_t * dest, const uint8_t * ref, } } -static void avg_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, +static void avg_pixels8_x2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -328,7 +330,7 @@ static void avg_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, } } -static void avg_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref, +static void avg_pixels8_y2_mlib(uint8_t * dest, const uint8_t * ref, int stride, int height) { switch (height) { @@ -384,9 +386,9 @@ static void ff_idct_put_mlib(uint8_t *dest, int line_size, DCTELEM *data) int i; uint8_t *cm = cropTbl + MAX_NEG_CROP; - mlib_VideoIDCT8x8_S16_S16 (data, data); + mlib_VideoIDCT8x8_S16_S16(data, data); - for(i=0;i<8;i++) { + for (i=0;i<8;i++) { dest[0] = cm[data[0]]; dest[1] = cm[data[1]]; dest[2] = cm[data[2]]; @@ -403,18 +405,18 @@ static void ff_idct_put_mlib(uint8_t *dest, int line_size, DCTELEM *data) static void ff_idct_add_mlib(uint8_t *dest, int line_size, DCTELEM *data) { - mlib_VideoIDCT8x8_S16_S16 (data, data); + mlib_VideoIDCT8x8_S16_S16(data, data); mlib_VideoAddBlock_U8_S16(dest, (mlib_s16 *)data, line_size); } -static void ff_idct_mlib(uint8_t *dest, int line_size, DCTELEM *data) +static void ff_idct_mlib(DCTELEM *data) { - mlib_VideoIDCT8x8_S16_S16 (data, data); + mlib_VideoIDCT8x8_S16_S16(data, data); } static void ff_fdct_mlib(DCTELEM *data) { - mlib_VideoDCT8x8_S16_S16 (data, data); + mlib_VideoDCT8x8_S16_S16(data, data); } void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx) @@ -452,15 +454,15 @@ void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx) void MPV_common_init_mlib(MpegEncContext *s) { if (xine_mm_accel() & MM_ACCEL_MLIB) { - if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){ + if ((s->avctx->dct_algo == FF_DCT_AUTO) || (s->avctx->dct_algo==FF_DCT_MLIB)) { s->dsp.fdct = ff_fdct_mlib; } - if(s->avctx->idct_algo==FF_IDCT_AUTO || s->avctx->idct_algo==FF_IDCT_MLIB){ - s->dsp.idct_put= ff_idct_put_mlib; - s->dsp.idct_add= ff_idct_add_mlib; - s->dsp.idct = ff_idct_mlib; - s->dsp.idct_permutation_type= FF_NO_IDCT_PERM; + if ((s->avctx->idct_algo == FF_IDCT_AUTO) || (s->avctx->idct_algo == FF_IDCT_MLIB)) { + s->dsp.idct = ff_idct_mlib; + s->dsp.idct_put = ff_idct_put_mlib; + s->dsp.idct_add = ff_idct_add_mlib; + s->dsp.idct_permutation_type = FF_NO_IDCT_PERM; } } } diff --git a/src/libxineadec/nosefart/memguard.c b/src/libxineadec/nosefart/memguard.c index 2b29b7d0c..35b3ef6ba 100644 --- a/src/libxineadec/nosefart/memguard.c +++ b/src/libxineadec/nosefart/memguard.c @@ -22,7 +22,7 @@ ** memory allocation wrapper routines ** ** NOTE: based on code (c) 1998 the Retrocade group -** $Id: memguard.c,v 1.3 2004/02/19 02:50:25 rockyb Exp $ +** $Id: memguard.c,v 1.4 2004/02/20 19:53:39 komadori Exp $ */ #include "types.h" @@ -33,7 +33,15 @@ #include <string.h> #include <stdlib.h> -#include <stdint.h> + +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif + #include "memguard.h" #include "log.h" @@ -364,6 +372,9 @@ void mem_checkblocks(void) /* ** $Log: memguard.c,v $ +** Revision 1.4 2004/02/20 19:53:39 komadori +** Fixed detection of linux framebuffer support. Included xineutils.h in dsputil_mlib.c and added to diff_to_ffmpeg_cvs.txt. Fixed function prototype in dsputil_mlib.c (should be sent back to ffmpeg-dev at some point). Fixed includes in nosefart. Fixed nested comments and includes in goom. +** ** Revision 1.3 2004/02/19 02:50:25 rockyb ** Mandrake patches from ** http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/SPECS/xine-lib/ diff --git a/src/post/goom/filters.c b/src/post/goom/filters.c index 5cc5e1af0..9ba2be3dc 100644 --- a/src/post/goom/filters.c +++ b/src/post/goom/filters.c @@ -12,13 +12,21 @@ //#define _DEBUG_PIXEL; +#include <stdlib.h> +#include <stdio.h> +#include <math.h> + +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif + #include "filters.h" #include "graphic.h" #include "goom_tools.h" -#include <stdlib.h> -#include <math.h> -#include <stdio.h> -#include <stdint.h> #ifdef HAVE_MMX #define USE_ASM @@ -726,7 +734,7 @@ zoomFilterFastRGB (Uint * pix1, } /* if (interlace_start>=0) { - /* creation de la nouvelle destination * + * creation de la nouvelle destination * for (y = interlace_start; y < prevY; y+=INTERLACE_INCR) { Uint premul_y_prevX = y * prevX * 2; for (x = 0; x < prevX; x++) { @@ -736,13 +744,13 @@ zoomFilterFastRGB (Uint * pix1, calculatePXandPY (x, y, &px, &py); - /* if (py>ay<<16) + * if (py>ay<<16) py = iRAND (32); if (px>ax<<16) px = iRAND (32); * - /* + * if ((px == x << 4) && (py == y << 4)) { if (x > middleX) py += 2; @@ -765,7 +773,6 @@ zoomFilterFastRGB (Uint * pix1, if (interlace_start == 0) interlace_start = -1; } - */ if (interlace_start>=0) { diff --git a/src/post/goom/filters.h b/src/post/goom/filters.h index f3f0c1957..935d13574 100644 --- a/src/post/goom/filters.h +++ b/src/post/goom/filters.h @@ -8,22 +8,17 @@ typedef struct { - int vitesse; /* 128 = vitesse nule... * * 256 = en arriere - * hyper vite.. * * 0 = en avant hype vite. */ + int vitesse; /* 128 = vitesse nule... * * 256 = en arriere * hyper vite.. * * 0 = en avant hype vite. */ unsigned char pertedec; unsigned char sqrtperte; - int middleX, middleY; /* milieu de l'effet */ - char reverse; /* inverse la vitesse */ - char mode; /* type d'effet à appliquer (cf les #define) - * * * * * /** @since June 2001 */ - int hPlaneEffect; /* deviation horitontale */ - int vPlaneEffect; /* deviation verticale */ - /** @since April 2002 */ - int waveEffect; /* applique une "surcouche" de wave effect */ - int hypercosEffect; /* applique une "surcouche de hypercos effect - */ - - char noisify; /* ajoute un bruit a la transformation */ + int middleX, middleY; /* milieu de l'effet */ + char reverse; /* inverse la vitesse */ + char mode; /* type d'effet à appliquer (cf les #define) */ /** @since June 2001 */ + int hPlaneEffect; /* deviation horitontale */ + int vPlaneEffect; /* deviation verticale */ /** @since April 2002 */ + int waveEffect; /* applique une "surcouche" de wave effect */ + int hypercosEffect; /* applique une "surcouche de hypercos effect */ + char noisify; /* ajoute un bruit a la transformation */ } ZoomFilterData; diff --git a/src/post/goom/goom_core.c b/src/post/goom/goom_core.c index c2a901780..1cda9f744 100644 --- a/src/post/goom/goom_core.c +++ b/src/post/goom/goom_core.c @@ -1,7 +1,15 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#include <stdint.h> + +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif + #include "goom_core.h" #include "goom_tools.h" #include "filters.h" |