annotate ffmpeg/libavcodec/atrac1data.h @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 * Atrac 1 compatible decoder data
yading@10 3 * Copyright (c) 2009 Maxim Poliakovski
yading@10 4 * Copyright (c) 2009 Benjamin Larsson
yading@10 5 *
yading@10 6 * This file is part of FFmpeg.
yading@10 7 *
yading@10 8 * FFmpeg is free software; you can redistribute it and/or
yading@10 9 * modify it under the terms of the GNU Lesser General Public
yading@10 10 * License as published by the Free Software Foundation; either
yading@10 11 * version 2.1 of the License, or (at your option) any later version.
yading@10 12 *
yading@10 13 * FFmpeg is distributed in the hope that it will be useful,
yading@10 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 16 * Lesser General Public License for more details.
yading@10 17 *
yading@10 18 * You should have received a copy of the GNU Lesser General Public
yading@10 19 * License along with FFmpeg; if not, write to the Free Software
yading@10 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 21 */
yading@10 22
yading@10 23 /**
yading@10 24 * @file
yading@10 25 * Atrac 1 compatible decoder data
yading@10 26 */
yading@10 27
yading@10 28 #ifndef AVCODEC_ATRAC1DATA_H
yading@10 29 #define AVCODEC_ATRAC1DATA_H
yading@10 30
yading@10 31 #include <stdint.h>
yading@10 32
yading@10 33 static const uint8_t bfu_amount_tab1[8] = {20, 28, 32, 36, 40, 44, 48, 52};
yading@10 34 static const uint8_t bfu_amount_tab2[4] = { 0, 112, 176, 208};
yading@10 35 static const uint8_t bfu_amount_tab3[8] = { 0, 24, 36, 48, 72, 108, 132, 156};
yading@10 36
yading@10 37 /** number of BFUs in each QMF band */
yading@10 38 static const uint8_t bfu_bands_t[4] = {0, 20, 36, 52};
yading@10 39
yading@10 40 /** number of spectral lines in each BFU
yading@10 41 * block floating unit = group of spectral frequencies having the
yading@10 42 * same quantization parameters like word length and scale factor
yading@10 43 */
yading@10 44 static const uint8_t specs_per_bfu[52] = {
yading@10 45 8, 8, 8, 8, 4, 4, 4, 4, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, // low band
yading@10 46 6, 6, 6, 6, 7, 7, 7, 7, 9, 9, 9, 9, 10, 10, 10, 10, // midle band
yading@10 47 12, 12, 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20 // high band
yading@10 48 };
yading@10 49
yading@10 50 /** start position of each BFU in the MDCT spectrum for the long mode */
yading@10 51 static const uint16_t bfu_start_long[52] = {
yading@10 52 0, 8, 16, 24, 32, 36, 40, 44, 48, 56, 64, 72, 80, 86, 92, 98, 104, 110, 116, 122,
yading@10 53 128, 134, 140, 146, 152, 159, 166, 173, 180, 189, 198, 207, 216, 226, 236, 246,
yading@10 54 256, 268, 280, 292, 304, 316, 328, 340, 352, 372, 392, 412, 432, 452, 472, 492,
yading@10 55 };
yading@10 56
yading@10 57 /** start position of each BFU in the MDCT spectrum for the short mode */
yading@10 58 static const uint16_t bfu_start_short[52] = {
yading@10 59 0, 32, 64, 96, 8, 40, 72, 104, 12, 44, 76, 108, 20, 52, 84, 116, 26, 58, 90, 122,
yading@10 60 128, 160, 192, 224, 134, 166, 198, 230, 141, 173, 205, 237, 150, 182, 214, 246,
yading@10 61 256, 288, 320, 352, 384, 416, 448, 480, 268, 300, 332, 364, 396, 428, 460, 492
yading@10 62 };
yading@10 63
yading@10 64 #endif /* AVCODEC_ATRAC1DATA_H */