| OLD | NEW |
| 1 /* | 1 /* |
| 2 * NellyMoser audio decoder | 2 * NellyMoser audio decoder |
| 3 * Copyright (c) 2007 a840bda5870ba11f19698ff6eb9581dfb0f95fa5, | 3 * Copyright (c) 2007 a840bda5870ba11f19698ff6eb9581dfb0f95fa5, |
| 4 * 539459aeb7d425140b62a3ec7dbf6dc8e408a306, and | 4 * 539459aeb7d425140b62a3ec7dbf6dc8e408a306, and |
| 5 * 520e17cd55896441042b14df2566a6eb610ed444 | 5 * 520e17cd55896441042b14df2566a6eb610ed444 |
| 6 * Copyright (c) 2007 Loic Minier <lool at dooz.org> | 6 * Copyright (c) 2007 Loic Minier <lool at dooz.org> |
| 7 * Benjamin Larsson | 7 * Benjamin Larsson |
| 8 * | 8 * |
| 9 * Permission is hereby granted, free of charge, to any person obtaining a | 9 * Permission is hereby granted, free of charge, to any person obtaining a |
| 10 * copy of this software and associated documentation files (the "Software"), | 10 * copy of this software and associated documentation files (the "Software"), |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 * @file libavcodec/nellymoserdec.c | 29 * @file libavcodec/nellymoserdec.c |
| 30 * The 3 alphanumeric copyright notices are md5summed they are from the original | 30 * The 3 alphanumeric copyright notices are md5summed they are from the original |
| 31 * implementors. The original code is available from http://code.google.com/p/ne
lly2pcm/ | 31 * implementors. The original code is available from http://code.google.com/p/ne
lly2pcm/ |
| 32 */ | 32 */ |
| 33 | 33 |
| 34 #include "nellymoser.h" | 34 #include "nellymoser.h" |
| 35 #include "libavutil/lfg.h" | 35 #include "libavutil/lfg.h" |
| 36 #include "libavutil/random_seed.h" | 36 #include "libavutil/random_seed.h" |
| 37 #include "avcodec.h" | 37 #include "avcodec.h" |
| 38 #include "dsputil.h" | 38 #include "dsputil.h" |
| 39 #include "fft.h" |
| 39 | 40 |
| 40 #define ALT_BITSTREAM_READER_LE | 41 #define ALT_BITSTREAM_READER_LE |
| 41 #include "get_bits.h" | 42 #include "get_bits.h" |
| 42 | 43 |
| 43 | 44 |
| 44 typedef struct NellyMoserDecodeContext { | 45 typedef struct NellyMoserDecodeContext { |
| 45 AVCodecContext* avctx; | 46 AVCodecContext* avctx; |
| 46 DECLARE_ALIGNED_16(float,float_buf)[NELLY_SAMPLES]; | 47 DECLARE_ALIGNED(16, float,float_buf)[NELLY_SAMPLES]; |
| 47 float state[128]; | 48 float state[128]; |
| 48 AVLFG random_state; | 49 AVLFG random_state; |
| 49 GetBitContext gb; | 50 GetBitContext gb; |
| 50 int add_bias; | 51 int add_bias; |
| 51 float scale_bias; | 52 float scale_bias; |
| 52 DSPContext dsp; | 53 DSPContext dsp; |
| 53 FFTContext imdct_ctx; | 54 FFTContext imdct_ctx; |
| 54 DECLARE_ALIGNED_16(float,imdct_out)[NELLY_BUF_LEN * 2]; | 55 DECLARE_ALIGNED(16, float,imdct_out)[NELLY_BUF_LEN * 2]; |
| 55 } NellyMoserDecodeContext; | 56 } NellyMoserDecodeContext; |
| 56 | 57 |
| 57 static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *
audio, float *a_in) | 58 static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *
audio, float *a_in) |
| 58 { | 59 { |
| 59 int bot, top; | 60 int bot, top; |
| 60 | 61 |
| 61 bot = 0; | 62 bot = 0; |
| 62 top = NELLY_BUF_LEN-1; | 63 top = NELLY_BUF_LEN-1; |
| 63 | 64 |
| 64 while (bot < NELLY_BUF_LEN) { | 65 while (bot < NELLY_BUF_LEN) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 CODEC_TYPE_AUDIO, | 203 CODEC_TYPE_AUDIO, |
| 203 CODEC_ID_NELLYMOSER, | 204 CODEC_ID_NELLYMOSER, |
| 204 sizeof(NellyMoserDecodeContext), | 205 sizeof(NellyMoserDecodeContext), |
| 205 decode_init, | 206 decode_init, |
| 206 NULL, | 207 NULL, |
| 207 decode_end, | 208 decode_end, |
| 208 decode_tag, | 209 decode_tag, |
| 209 .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), | 210 .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), |
| 210 }; | 211 }; |
| 211 | 212 |
| OLD | NEW |