• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/adpcm_data.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2003 The ffmpeg Project
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019  */
00020 
00026 #include <stdint.h>
00027 
00028 /* ff_adpcm_step_table[] and ff_adpcm_index_table[] are from the ADPCM
00029    reference source */
00030 /* This is the index table: */
00031 const int8_t ff_adpcm_index_table[16] = {
00032     -1, -1, -1, -1, 2, 4, 6, 8,
00033     -1, -1, -1, -1, 2, 4, 6, 8,
00034 };
00035 
00040 const int16_t ff_adpcm_step_table[89] = {
00041         7,     8,     9,    10,    11,    12,    13,    14,    16,    17,
00042        19,    21,    23,    25,    28,    31,    34,    37,    41,    45,
00043        50,    55,    60,    66,    73,    80,    88,    97,   107,   118,
00044       130,   143,   157,   173,   190,   209,   230,   253,   279,   307,
00045       337,   371,   408,   449,   494,   544,   598,   658,   724,   796,
00046       876,   963,  1060,  1166,  1282,  1411,  1552,  1707,  1878,  2066,
00047      2272,  2499,  2749,  3024,  3327,  3660,  4026,  4428,  4871,  5358,
00048      5894,  6484,  7132,  7845,  8630,  9493, 10442, 11487, 12635, 13899,
00049     15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
00050 };
00051 
00052 /* These are for MS-ADPCM */
00053 /* ff_adpcm_AdaptationTable[], ff_adpcm_AdaptCoeff1[], and
00054    ff_adpcm_AdaptCoeff2[] are from libsndfile */
00055 const int16_t ff_adpcm_AdaptationTable[] = {
00056     230, 230, 230, 230, 307, 409, 512, 614,
00057     768, 614, 512, 409, 307, 230, 230, 230
00058 };
00059 
00061 const uint8_t ff_adpcm_AdaptCoeff1[] = {
00062     64, 128, 0, 48, 60, 115, 98
00063 };
00064 
00066 const int8_t ff_adpcm_AdaptCoeff2[] = {
00067     0, -64, 0, 16, 0, -52, -58
00068 };
00069 
00070 const int16_t ff_adpcm_yamaha_indexscale[] = {
00071     230, 230, 230, 230, 307, 409, 512, 614,
00072     230, 230, 230, 230, 307, 409, 512, 614
00073 };
00074 
00075 const int8_t ff_adpcm_yamaha_difflookup[] = {
00076      1,  3,  5,  7,  9,  11,  13,  15,
00077     -1, -3, -5, -7, -9, -11, -13, -15
00078 };
Generated on Fri Feb 1 2013 14:34:29 for FFmpeg by doxygen 1.7.1