[FFmpeg-devel] [PATCH] Arithmetic decoding in ALS
Sat Feb 6 03:39:34 CET 2010
On Tue, Jan 26, 2010 at 01:44:46AM +0100, Thilo Borgmann wrote:
> Am 25.01.10 12:16, schrieb Michael Niedermayer:
> > On Tue, Jan 19, 2010 at 11:54:50PM +0100, Thilo Borgmann wrote:
> >> Am 19.01.10 19:37, schrieb Michael Niedermayer:
> >>> On Thu, Jan 14, 2010 at 03:20:04PM +0100, Thilo Borgmann wrote:
> >>> [...]
> >>>> The size of the luts might be further reduced if the shifted symbol
> >>>> would be stored and use a smaller type than uint for the luts. Then, the
> >>>> stored symbol would have to be shifted back before usage, but this again
> >>>> costs many << operations (one for each sample in the file). Useful?
> >>> I think this is a good idea, the luts look a little large to me
> >> 3509969 dezicycles in bgmc NO shift & unsigned int, 512 runs, 0 skips
> >> ->
> >> 3738521 dezicycles in bgmc DO shift & uint8_t, 512 runs, 0 skips
> > that seems like a quite big speedloss :/
> > have you checked that the code work? (same number of iterations in
> > the loop?)
> Yes, identical.
> >> Also I made the luts non-static what should make them thread safe,
> >> doesn't it?
> > no, if you write from 2 threads different data into a common place you
> > need thread synchronization.
> > What works is writing the same data or writing from just one thread.
> > In practice that means each byte in each lut can only be in one of 2
> > states, uninitialized and a single constant value. Another way to see
> > it is that all static and global tables must be constant or you need
> > thread sync / only a single thread writing
> Ok yes, I deserved being remembered of the basics.
> So I made them reside in the user/thread domain - hopefully. Although,
> this also costs a little. Having some buffers fixed/global and one for
> big delta values would be possible, but I doubt that the corresponding
> complication would be worth it regarding a speed loss of ~2%:
> 1194966 dezicycles in GLOBAL LUT, 2047 runs, 1 skips
> 1191424 dezicycles in GLOBAL LUT, 2048 runs, 0 skips
> 1229276 dezicycles in USR LUT, 2046 runs, 2 skips
> 1239760 dezicycles in USR LUT, 2048 runs, 0 skips
> Revision 5 attached.
Well, you are maintainer of this code, a quick looks doesnt point at
serious issue ....
so if noone else wants to review it/has suggestions for improvments,
i think you can apply
(iam too lazy & busy for optimizing ALS ATM, and that can be done later
in svn anyway ...)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 1
"Used only once" - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel