# HG changeset patch # User rfelker # Date 1144562640 0 # Node ID 183e3eb0824a39967139191f4584a4ff74dbf492 # Parent 9ff165550d753961bbbf57c4ed85a3acab099191 100l to loren. at least this fixes the compile error, but the code is still broken (decoding buggy/crashing) diff -r 9ff165550d75 -r 183e3eb0824a h263.c --- a/h263.c Fri Apr 07 21:08:34 2006 +0000 +++ b/h263.c Sun Apr 09 06:04:00 2006 +0000 @@ -553,11 +553,10 @@ #endif //CONFIG_ENCODERS +#define tab_size (sizeof(s->direct_scale_mv[0])/sizeof(int16_t)) +#define tab_bias (tab_size/2) + static void ff_mpeg4_init_direct_mv(MpegEncContext *s){ - //FIXME table is stored in MpegEncContext for thread-safety, - // but a static array would be faster - static const int tab_size = sizeof(s->direct_scale_mv[0])/sizeof(int16_t); - static const int tab_bias = (tab_size/2); int i; for(i=0; idirect_scale_mv[0][i] = (i-tab_bias)*s->pb_time/s->pp_time; @@ -566,8 +565,6 @@ } static inline void ff_mpeg4_set_one_direct_mv(MpegEncContext *s, int mx, int my, int i){ - static const int tab_size = sizeof(s->direct_scale_mv[0])/sizeof(int16_t); - static const int tab_bias = (tab_size/2); int xy= s->block_index[i]; uint16_t time_pp= s->pp_time; uint16_t time_pb= s->pb_time; @@ -595,6 +592,9 @@ } } +#undef tab_size +#undef tab_bias + /** * * @return the mb_type