[FFmpeg-devel] ffmpeg on SH4
Luca Barbato
lu_zero
Mon Dec 10 12:49:13 CET 2007
Tamas Selmeci wrote:
> Hello,
>
> Diego Biurrun wrote:
>
>> Please send us the patch.
>
> Included as inline.
Mangled a bit.
>
>> For the rest of the problems, please ask on the ffmpeg-user, it is
>> offtopic here.
>
> OK. But now the -fno-strict-aliasing seems to solve the problem...
Hmm, has sh4 strict alignment requirements?
>
> #define DEF_OLD_QPEL(name)\
> -void ff_put_ ## name (uint8_t *dst/*align width (8 or 16)*/,
> uint8_t *src/*align 1*/, int stride);\
> -void ff_put_no_rnd_ ## name (uint8_t *dst/*align width (8 or 16)*/,
> uint8_t *src/*align 1*/, int stride);\
> -void ff_avg_ ## name (uint8_t *dst/*align width (8 or 16)*/,
> uint8_t *src/*align 1*/, int stride);
> +static void ff_put_ ## name (uint8_t *dst/*align width (8 or
> 16)*/, uint8_t *src/*align 1*/, int stride);\
> +static void ff_put_no_rnd_ ## name (uint8_t *dst/*align width (8 or
> 16)*/, uint8_t *src/*align 1*/, int stride);\
> +static void ff_avg_ ## name (uint8_t *dst/*align width (8 or
> 16)*/, uint8_t *src/*align 1*/, int stride);
what is supposed to fix?
> diff -pru orig/ffmpeg/libavcodec/sh4/dsputil_align.c
> hacked/ffmpeg/libavcodec/sh4/dsputil_align.c
> --- orig/ffmpeg/libavcodec/sh4/dsputil_align.c 2007-12-04
> 08:16:23.000000000 +0100
> +++ hacked/ffmpeg/libavcodec/sh4/dsputil_align.c 2007-12-04
> 11:44:40.000000000 +0100
> @@ -262,13 +262,20 @@ if (sz==16) { \
> static void op##_##rnd##_pixels##sz##_##xy (uint8_t * dest, const
> uint8_t * ref, \
> const int stride, int height) \
> { \
> + /* This eliminates "undefined reference to no_rnd_avg2" \
> + and such messages, but may seriously damaga video decoding \
> + functionality... */ \
> + return; \
> +}
> +
> +/*
> switch((int)ref&3) { \
> case 0:OP_N##0(sz,rnd##_##avgfunc); return; \
> case 1:OP_N(1,sz,rnd##_##avgfunc); return; \
> case 2:OP_N(2,sz,rnd##_##avgfunc); return; \
> case 3:OP_N(3,sz,rnd##_##avgfunc); return; \
> } \
> -}
> +*/
Why that is happening? anyway you should have those function surrounded
by some macro refs so they will get disabled if you aren't using avformat.
> static void memzero_align8(void *dst,size_t size)
> {
> #if defined(__SH4__) || defined(__SH4_SINGLE__) ||
> defined(__SH4_SINGLE_ONLY__)
> - (char*)dst+=size;
> + dst+=size;
doesn't sound correct at all.
> -#if 1
> +#if 0
> //optimized
>
> void idct_sh4(DCTELEM *block)
same.
--
Luca Barbato
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list