| OLD | NEW |
| 1 /* | 1 /* |
| 2 * IMC compatible decoder | 2 * IMC compatible decoder |
| 3 * Copyright (c) 2002-2004 Maxim Poliakovski | 3 * Copyright (c) 2002-2004 Maxim Poliakovski |
| 4 * Copyright (c) 2006 Benjamin Larsson | 4 * Copyright (c) 2006 Benjamin Larsson |
| 5 * Copyright (c) 2006 Konstantin Shishkov | 5 * Copyright (c) 2006 Konstantin Shishkov |
| 6 * | 6 * |
| 7 * This file is part of FFmpeg. | 7 * This file is part of FFmpeg. |
| 8 * | 8 * |
| 9 * FFmpeg is free software; you can redistribute it and/or | 9 * FFmpeg is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 | 32 |
| 33 #include <math.h> | 33 #include <math.h> |
| 34 #include <stddef.h> | 34 #include <stddef.h> |
| 35 #include <stdio.h> | 35 #include <stdio.h> |
| 36 | 36 |
| 37 #define ALT_BITSTREAM_READER | 37 #define ALT_BITSTREAM_READER |
| 38 #include "avcodec.h" | 38 #include "avcodec.h" |
| 39 #include "get_bits.h" | 39 #include "get_bits.h" |
| 40 #include "dsputil.h" | 40 #include "dsputil.h" |
| 41 #include "fft.h" |
| 41 | 42 |
| 42 #include "imcdata.h" | 43 #include "imcdata.h" |
| 43 | 44 |
| 44 #define IMC_BLOCK_SIZE 64 | 45 #define IMC_BLOCK_SIZE 64 |
| 45 #define IMC_FRAME_ID 0x21 | 46 #define IMC_FRAME_ID 0x21 |
| 46 #define BANDS 32 | 47 #define BANDS 32 |
| 47 #define COEFFS 256 | 48 #define COEFFS 256 |
| 48 | 49 |
| 49 typedef struct { | 50 typedef struct { |
| 50 float old_floor[BANDS]; | 51 float old_floor[BANDS]; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 77 int skipFlagCount[BANDS]; ///< skipped coeffients per band | 78 int skipFlagCount[BANDS]; ///< skipped coeffients per band |
| 78 int skipFlags[COEFFS]; ///< skip coefficient decoding or not | 79 int skipFlags[COEFFS]; ///< skip coefficient decoding or not |
| 79 int codewords[COEFFS]; ///< raw codewords read from bitstream | 80 int codewords[COEFFS]; ///< raw codewords read from bitstream |
| 80 float sqrt_tab[30]; | 81 float sqrt_tab[30]; |
| 81 GetBitContext gb; | 82 GetBitContext gb; |
| 82 int decoder_reset; | 83 int decoder_reset; |
| 83 float one_div_log2; | 84 float one_div_log2; |
| 84 | 85 |
| 85 DSPContext dsp; | 86 DSPContext dsp; |
| 86 FFTContext fft; | 87 FFTContext fft; |
| 87 DECLARE_ALIGNED_16(FFTComplex, samples)[COEFFS/2]; | 88 DECLARE_ALIGNED(16, FFTComplex, samples)[COEFFS/2]; |
| 88 DECLARE_ALIGNED_16(float, out_samples)[COEFFS]; | 89 DECLARE_ALIGNED(16, float, out_samples)[COEFFS]; |
| 89 } IMCContext; | 90 } IMCContext; |
| 90 | 91 |
| 91 static VLC huffman_vlc[4][4]; | 92 static VLC huffman_vlc[4][4]; |
| 92 | 93 |
| 93 #define VLC_TABLES_SIZE 9512 | 94 #define VLC_TABLES_SIZE 9512 |
| 94 | 95 |
| 95 static const int vlc_offsets[17] = { | 96 static const int vlc_offsets[17] = { |
| 96 0, 640, 1156, 1732, 2308, 2852, 3396, 3924, | 97 0, 640, 1156, 1732, 2308, 2852, 3396, 3924, |
| 97 4452, 5220, 5860, 6628, 7268, 7908, 8424, 8936, VLC_TABLES_SIZE}; | 98 4452, 5220, 5860, 6628, 7268, 7908, 8424, 8936, VLC_TABLES_SIZE}; |
| 98 | 99 |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 AVCodec imc_decoder = { | 824 AVCodec imc_decoder = { |
| 824 .name = "imc", | 825 .name = "imc", |
| 825 .type = CODEC_TYPE_AUDIO, | 826 .type = CODEC_TYPE_AUDIO, |
| 826 .id = CODEC_ID_IMC, | 827 .id = CODEC_ID_IMC, |
| 827 .priv_data_size = sizeof(IMCContext), | 828 .priv_data_size = sizeof(IMCContext), |
| 828 .init = imc_decode_init, | 829 .init = imc_decode_init, |
| 829 .close = imc_decode_close, | 830 .close = imc_decode_close, |
| 830 .decode = imc_decode_frame, | 831 .decode = imc_decode_frame, |
| 831 .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), | 832 .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), |
| 832 }; | 833 }; |
| OLD | NEW |