[XviD-devel] [BUG] Stable - Fix probably needed in unstable too
James Hauxwell
xvid-devel@xvid.org
Fri, 20 Dec 2002 07:39:10 -0000
I have some non-branching fast vlc's which I wrote. They use the BSR
instruction, and you need to format new tables. If anyone is interested
I can post an example of how to do it. Once you do one the rest are
easy, but just take a while to sort the tables, which is one thing I
just haven't got at the moment.
Jim
-----Original Message-----
From: xvid-devel-admin@xvid.org [mailto:xvid-devel-admin@xvid.org] On
Behalf Of suxen_drol@hotmail.com
Sent: 20 December 2002 06:07
To: xvid-devel@xvid.org
Subject: Re: [XviD-devel] [BUG] Stable - Fix probably needed in unstable
too
On Fri, 20 Dec 2002 00:07:11 +0100 Edouard Gomez <ed.gomez@wanadoo.fr>
wrote:
> I received 2 mails last week reporting me this bug. They got lost in
my
> "per month automatic" backup. The bug is quite simple, vlc_init is
> supposed to initialise arrays of 64*2048*2 == 524288 elements but
> intra_table and inter_table are only 524032 (? why that value ?)
>
> I don't know why but this bug was not detected by neither valgrind on
> GNU/linux nor Purify on Win32 platforms when declared as global
arrays.
> We already spoted that bug when declaring theese arrays as static but
> only on Win32. We thought it was MSVC compiler mistake and switched
back
> to global arrays.
>
> But of course this was wrong fix. The right one follows, please apply
to
> dev-api-3 if the code has not changed yet (skal's version?):
>
> <patch>
> diff -u -r1.34 src/bitstream/mbcoding.c
> --- mbcoding.c 26 Nov 2002 23:44:10 -0000 1.34
> +++ mbcoding.c 19 Dec 2002 22:58:26 -0000
> @@ -71,8 +71,8 @@
>
************************************************************************
****/
>
> /* msvc sp5+pp gets confused if they globals are made static */
> -VLC intra_table[524032];
> -VLC inter_table[524032];
> +static VLC intra_table[524288];
> +static VLC inter_table[524288];
>
> static VLC DCT3Dintra[4096];
> static VLC DCT3Dinter[4096];
> </patch>
>
> Thanks go to the 2 persons who told me we were wrong.
fix commited to dev-api-3 branches.
note: ive declared the arrays in the following form, which makes more
sense:
VLC intra_table[4*2048*64];
VLC inter_table[4*2048*64];
(these are really big arrays).
regarding vlcs. xvid currently used a rough mix of pre-calculated
tables,
and hardcoded tables (ie. borrowed from mpeg-4 implementations).
i'd prefer someday to have everything pre-calculated and init time.
skal: were you working on some extra fast vlc routines?
-- pete; life is like a box of ammo
_______________________________________________
XviD-devel mailing list
XviD-devel@xvid.org
http://list.xvid.org/mailman/listinfo/xvid-devel