r5558 - in trunk/libavcodec: dsputil.c utils.c
Author: gpoirier Date: Fri Jun 30 09:50:30 2006 New Revision: 5558 Modified: trunk/libavcodec/dsputil.c trunk/libavcodec/utils.c Log: Disable w53 and w97 cmp methods when snow encoder is disabled Patch by Diego 'Flameeyes' Petteno flameeyes AH gentoo PP org Original thread: Date: Jun 30, 2006 1:16 AM Subject: [Ffmpeg-devel] [PATCH] Disable w53 and w97 cmp methods when snow encoder is disabled Modified: trunk/libavcodec/dsputil.c ============================================================================== --- trunk/libavcodec/dsputil.c (original) +++ trunk/libavcodec/dsputil.c Fri Jun 30 09:50:30 2006 @@ -292,8 +292,8 @@ } -static inline int w_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int w, int h, int type){ #ifdef CONFIG_SNOW_ENCODER //dwt is in snow.c +static inline int w_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int w, int h, int type){ int s, i, j; const int dec_count= w==8 ? 3 : 4; int tmp[32*32]; @@ -360,7 +360,6 @@ } assert(s>=0); return s>>9; -#endif } static int w53_8_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){ @@ -386,6 +385,7 @@ int w97_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){ return w_c(v, pix1, pix2, line_size, 32, h, 0); } +#endif static void get_pixels_c(DCTELEM *restrict block, const uint8_t *pixels, int line_size) { @@ -3212,12 +3212,14 @@ case FF_CMP_NSSE: cmp[i]= c->nsse[i]; break; +#ifdef CONFIG_SNOW_ENCODER case FF_CMP_W53: cmp[i]= c->w53[i]; break; case FF_CMP_W97: cmp[i]= c->w97[i]; break; +#endif default: av_log(NULL, AV_LOG_ERROR,"internal error in cmp function selection\n"); } @@ -4021,10 +4023,12 @@ c->vsse[4]= vsse_intra16_c; c->nsse[0]= nsse16_c; c->nsse[1]= nsse8_c; +#ifdef CONFIG_SNOW_ENCODER c->w53[0]= w53_16_c; c->w53[1]= w53_8_c; c->w97[0]= w97_16_c; c->w97[1]= w97_8_c; +#endif c->add_bytes= add_bytes_c; c->diff_bytes= diff_bytes_c; Modified: trunk/libavcodec/utils.c ============================================================================== --- trunk/libavcodec/utils.c (original) +++ trunk/libavcodec/utils.c Fri Jun 30 09:50:30 2006 @@ -654,8 +654,10 @@ {"vsad", NULL, 0, FF_OPT_TYPE_CONST, FF_CMP_VSAD, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"vsse", NULL, 0, FF_OPT_TYPE_CONST, FF_CMP_VSSE, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"nsse", NULL, 0, FF_OPT_TYPE_CONST, FF_CMP_NSSE, INT_MIN, INT_MAX, V|E, "cmp_func"}, +#ifdef CONFIG_SNOW_ENCODER {"w53", NULL, 0, FF_OPT_TYPE_CONST, FF_CMP_W53, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"w97", NULL, 0, FF_OPT_TYPE_CONST, FF_CMP_W97, INT_MIN, INT_MAX, V|E, "cmp_func"}, +#endif {"dctmax", NULL, 0, FF_OPT_TYPE_CONST, FF_CMP_DCTMAX, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"chroma", NULL, 0, FF_OPT_TYPE_CONST, FF_CMP_CHROMA, INT_MIN, INT_MAX, V|E, "cmp_func"}, {"pre_dia_size", NULL, OFFSET(pre_dia_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
On Fri, 2006-06-30 at 09:50 +0200, gpoirier wrote:
Original thread: Date: Jun 30, 2006 1:16 AM Subject: [Ffmpeg-devel] [PATCH] Disable w53 and w97 cmp methods when snow encoder is disabled
Modified: trunk/libavcodec/dsputil.c
Moves w53_32_c etc under #ifdef CONFIG_SNOW_ENCODER, but their use in snow.c is not under any #ifdef.
On Tue, Jul 25, 2006 at 05:05:19PM +0300, Uoti Urpala wrote:
On Fri, 2006-06-30 at 09:50 +0200, gpoirier wrote:
Original thread: Date: Jun 30, 2006 1:16 AM Subject: [Ffmpeg-devel] [PATCH] Disable w53 and w97 cmp methods when snow encoder is disabled
Modified: trunk/libavcodec/dsputil.c
Moves w53_32_c etc under #ifdef CONFIG_SNOW_ENCODER, but their use in snow.c is not under any #ifdef.
.. and now this has bitten me .. libavcodec/libavcodec.a(snow.o)(.text+0xb422): In function `get_block_rd': /usr/src/mplayer/mplayer/libavcodec/snow.c:3129: undefined reference to `w53_32_c' libavcodec/libavcodec.a(snow.o)(.text+0xb456):/usr/src/mplayer/mplayer/libavcodec/snow.c:3127: undefined reference to `w97_32_c' libavcodec/libavcodec.a(snow.o)(.text+0x14374): In function `encode_init': /usr/src/mplayer/mplayer/libavcodec/snow.c:4064: undefined reference to `h263_encode_init' collect2: ld returned 1 exit status make: *** [mplayer] Error 1 Somehow it only got triggered when I built MPlayer with --enable-debug=3 and --disable-mencoder... Diego
Diego Biurrun wrote:
On Tue, Jul 25, 2006 at 05:05:19PM +0300, Uoti Urpala wrote:
On Fri, 2006-06-30 at 09:50 +0200, gpoirier wrote:
Original thread: Date: Jun 30, 2006 1:16 AM Subject: [Ffmpeg-devel] [PATCH] Disable w53 and w97 cmp methods when snow encoder is disabled Modified: trunk/libavcodec/dsputil.c Moves w53_32_c etc under #ifdef CONFIG_SNOW_ENCODER, but their use in snow.c is not under any #ifdef.
.. and now this has bitten me ..
libavcodec/libavcodec.a(snow.o)(.text+0xb422): In function `get_block_rd': /usr/src/mplayer/mplayer/libavcodec/snow.c:3129: undefined reference to `w53_32_c' libavcodec/libavcodec.a(snow.o)(.text+0xb456):/usr/src/mplayer/mplayer/libavcodec/snow.c:3127: undefined reference to `w97_32_c' libavcodec/libavcodec.a(snow.o)(.text+0x14374): In function `encode_init': /usr/src/mplayer/mplayer/libavcodec/snow.c:4064: undefined reference to `h263_encode_init' collect2: ld returned 1 exit status make: *** [mplayer] Error 1
Somehow it only got triggered when I built MPlayer with --enable-debug=3 and --disable-mencoder...
Yeah, I saw this problem too when I recently synced libavcodec in xine. But it only happened on x86 build; x86_64 still built fine. I worked around it by disabling the snow.c module. I am not sure our users are clamoring for Snow support yet. -- -Mike Melanson
Hi, On 8/5/06, Diego Biurrun <diego at biurrun.de> wrote:
On Tue, Jul 25, 2006 at 05:05:19PM +0300, Uoti Urpala wrote:
On Fri, 2006-06-30 at 09:50 +0200, gpoirier wrote:
Original thread: Date: Jun 30, 2006 1:16 AM Subject: [Ffmpeg-devel] [PATCH] Disable w53 and w97 cmp methods when snow encoder is disabled
Modified: trunk/libavcodec/dsputil.c
Moves w53_32_c etc under #ifdef CONFIG_SNOW_ENCODER, but their use in snow.c is not under any #ifdef.
.. and now this has bitten me ..
libavcodec/libavcodec.a(snow.o)(.text+0xb422): In function `get_block_rd': /usr/src/mplayer/mplayer/libavcodec/snow.c:3129: undefined reference to `w53_32_c' libavcodec/libavcodec.a(snow.o)(.text+0xb456):/usr/src/mplayer/mplayer/libavcodec/snow.c:3127: undefined reference to `w97_32_c' libavcodec/libavcodec.a(snow.o)(.text+0x14374): In function `encode_init': /usr/src/mplayer/mplayer/libavcodec/snow.c:4064: undefined reference to `h263_encode_init' collect2: ld returned 1 exit status make: *** [mplayer] Error 1
Somehow it only got triggered when I built MPlayer with --enable-debug=3 and --disable-mencoder...
I'll see what I can do.... On which machine does it break? your K6, your G4, or both? Guillaume -- Conditional branch execution in SIMD vector processors are patented! : http://www.freepatentsonline.com/4435758.html All ASM SIMD code writers are outlaws!
On Sun, Aug 06, 2006 at 10:51:30PM +0200, Guillaume POIRIER wrote:
On 8/5/06, Diego Biurrun <diego at biurrun.de> wrote:
On Tue, Jul 25, 2006 at 05:05:19PM +0300, Uoti Urpala wrote:
On Fri, 2006-06-30 at 09:50 +0200, gpoirier wrote:
Original thread: Date: Jun 30, 2006 1:16 AM Subject: [Ffmpeg-devel] [PATCH] Disable w53 and w97 cmp methods when snow encoder is disabled
Modified: trunk/libavcodec/dsputil.c
Moves w53_32_c etc under #ifdef CONFIG_SNOW_ENCODER, but their use in snow.c is not under any #ifdef.
.. and now this has bitten me ..
libavcodec/libavcodec.a(snow.o)(.text+0xb422): In function `get_block_rd': /usr/src/mplayer/mplayer/libavcodec/snow.c:3129: undefined reference to `w53_32_c' libavcodec/libavcodec.a(snow.o)(.text+0xb456):/usr/src/mplayer/mplayer/libavcodec/snow.c:3127: undefined reference to `w97_32_c' libavcodec/libavcodec.a(snow.o)(.text+0x14374): In function `encode_init': /usr/src/mplayer/mplayer/libavcodec/snow.c:4064: undefined reference to `h263_encode_init' collect2: ld returned 1 exit status make: *** [mplayer] Error 1
Somehow it only got triggered when I built MPlayer with --enable-debug=3 and --disable-mencoder...
I'll see what I can do.... On which machine does it break? your K6, your G4, or both?
Both. Try compiling MPlayer with --enable-debug=3, IIRC that triggers the bug. Diego
Hi, Diego Biurrun wrote:
On Sun, Aug 06, 2006 at 10:51:30PM +0200, Guillaume POIRIER wrote:
On 8/5/06, Diego Biurrun <diego at biurrun.de> wrote:
[..]
Somehow it only got triggered when I built MPlayer with --enable-debug=3 and --disable-mencoder... I'll see what I can do.... On which machine does it break? your K6, your G4, or both?
Both. Try compiling MPlayer with --enable-debug=3, IIRC that triggers the bug.
This problem is all the more interesting when you consider that it doesn't show up on any of GCC4 flavors I've been able to test with (4.2 snapshot, 4.1.1, 4.0.1, 4.0.3...) but it doesn't show up when compiling with GCC 3.3 (maybe other GCC3 flavors, but I've not been able to test other) I'll work out a patch following Michael's advice. Guillaume
Hi, Diego Biurrun wrote:
On Tue, Jul 25, 2006 at 05:05:19PM +0300, Uoti Urpala wrote:
On Fri, 2006-06-30 at 09:50 +0200, gpoirier wrote:
Original thread: Date: Jun 30, 2006 1:16 AM Subject: [Ffmpeg-devel] [PATCH] Disable w53 and w97 cmp methods when snow encoder is disabled
Modified: trunk/libavcodec/dsputil.c
Moves w53_32_c etc under #ifdef CONFIG_SNOW_ENCODER, but their use in snow.c is not under any #ifdef.
.. and now this has bitten me ..
libavcodec/libavcodec.a(snow.o)(.text+0xb422): In function `get_block_rd': /usr/src/mplayer/mplayer/libavcodec/snow.c:3129: undefined reference to `w53_32_c' libavcodec/libavcodec.a(snow.o)(.text+0xb456):/usr/src/mplayer/mplayer/libavcodec/snow.c:3127: undefined reference to `w97_32_c' libavcodec/libavcodec.a(snow.o)(.text+0x14374): In function `encode_init': /usr/src/mplayer/mplayer/libavcodec/snow.c:4064: undefined reference to `h263_encode_init' collect2: ld returned 1 exit status make: *** [mplayer] Error 1
Somehow it only got triggered when I built MPlayer with --enable-debug=3 and --disable-mencoder...
It should be fixed now. Feel free to stab me with red hot pokers if it isn't. Guillaume
participants (6)
-
diego@biurrun.de -
gpoirier@mplayerhq.hu -
mike@multimedia.cx -
poirierg@gmail.com -
subversion@mplayerhq.hu -
uoti.urpala@pp1.inet.fi