[FFmpeg-devel] [PATCH] add ff_static_sine_window_init

Michael Niedermayer michaelni
Thu Oct 22 22:46:28 CEST 2009


On Thu, Oct 15, 2009 at 10:28:39PM +0200, Reimar D?ffinger wrote:
> Hello,
> this patch adds a special function to initialize the static ff_sine_*
> arrays.
> It makes the code slightly simpler and makes it easier to hardcode the
> tables later (it's messy to make ff_sine_window_init a nop when used on
> the hardcoded tables but not otherwise).

>  aac.c           |    4 ++--
>  aacenc.c        |    4 ++--
>  atrac1.c        |    2 +-
>  dsputil.h       |    5 +++++
>  mdct.c          |    5 +++++
>  nellymoserdec.c |    2 +-
>  twinvq.c        |    6 +++---
>  wma.c           |    4 +---
>  wmaprodec.c     |    3 +--
>  9 files changed, 

> 21 insertions(+), 14 deletions(-)

i wouldnt call that slightly simpler, but rather slightly bigger
also i think the previous code is clearer.
With the new, one unfamiliar
with the code (which is everyone a month after working with it)
will not know which table is initialized if its not a argument of the
function.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091022/0df5ed6e/attachment.pgp>



More information about the ffmpeg-devel mailing list