[FFmpeg-devel] ffmpeg on SH4
Tamas Selmeci
tselmeci
Mon Dec 10 13:45:49 CET 2007
Luca Barbato wrote:
>> #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?
Without static the compiler (sh4-linux-gcc from STLinux-2.2, gcc-4.1.1)
complained: "static declaration of ?ff_avg_qpel16_mc33_old_c? follows
non-static declaration..."
>> + /* 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.
Yes, those functions should be generated from macros, but I was unable
to locate why avgfunc generates problems on SH4. And libavformat mustn't
be disabled, since that's the package we really need, not libavcodec.
>> 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.
As far as I can remember, this part of the original code compiles well
with gcc-3.x.
>> -#if 1
>> +#if 0
>> //optimized
>>
>> void idct_sh4(DCTELEM *block)
>
> same.
I don't need IDCT for containers... I think this code works, but
unoptimized.
Bye
--
Tamas Selmeci
More information about the ffmpeg-devel
mailing list