⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cookdata_fixpoint.h

📁 Fixptcook[1].tar.gz, 固点运算的rm格式音频编解码源代码
💻 H
字号:
/* * COOK compatible decoder fixed point data types and constants * Copyright (c) 2007 Ian Braithwaite * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * *//** * @file cookdata_fixpoint.h * Cook AKA RealAudio G2 compatible decoder * fixed point data types and constants */#include <stdint.h>typedef int32_t FIXP;           /* Fixed point variable type */typedef uint16_t FIXPU;         /* Fixed point fraction 0<=x<1 */typedef FIXP REAL_T;/** * Additional variables in COOKContext * for fixed point routines */typedef struct {    /* generatable tables */    /**     * Sine/cosine table.     *  x_i = 2^16 sin(i 2pi/8192), 2^16 cos(i 2pi/8192); i=0..1024     */    FIXPU sincos_lookup[2050];} realvars_t;#define cPI1_8 0xec83  /* cos( pi/8) 2^16 */#define cPI2_8 0xb505  /* cos(2pi/8) 2^16 */#define cPI3_8 0x61f8  /* cos(3pi/8) 2^16 */static const FIXPU pow128_tab[128] = {    /* x_i = 2^(15+i/128) */    0x8000, 0x80b2, 0x8165, 0x8219, 0x82ce, 0x8383, 0x843a, 0x84f2, 0x85ab,    0x8665, 0x871f, 0x87db, 0x8898, 0x8956, 0x8a15, 0x8ad5, 0x8b96, 0x8c58,    0x8d1b, 0x8ddf, 0x8ea4, 0x8f6b, 0x9032, 0x90fa, 0x91c4, 0x928e, 0x935a,    0x9427, 0x94f5, 0x95c4, 0x9694, 0x9765, 0x9838, 0x990c, 0x99e0, 0x9ab6,    0x9b8d, 0x9c65, 0x9d3f, 0x9e19, 0x9ef5, 0x9fd2, 0xa0b0, 0xa190, 0xa270,    0xa352, 0xa435, 0xa519, 0xa5ff, 0xa6e6, 0xa7ce, 0xa8b7, 0xa9a1, 0xaa8d,    0xab7a, 0xac69, 0xad58, 0xae49, 0xaf3b, 0xb02f, 0xb124, 0xb21a, 0xb312,    0xb40b, 0xb505, 0xb601, 0xb6fe, 0xb7fc, 0xb8fc, 0xb9fd, 0xbaff, 0xbc03,    0xbd09, 0xbe0f, 0xbf18, 0xc021, 0xc12c, 0xc239, 0xc347, 0xc456, 0xc567,    0xc67a, 0xc78d, 0xc8a3, 0xc9ba, 0xcad2, 0xcbec, 0xcd08, 0xce25, 0xcf43,    0xd063, 0xd185, 0xd2a8, 0xd3cd, 0xd4f3, 0xd61b, 0xd745, 0xd870, 0xd99d,    0xdacc, 0xdbfc, 0xdd2e, 0xde61, 0xdf96, 0xe0cd, 0xe205, 0xe340, 0xe47b,    0xe5b9, 0xe6f8, 0xe839, 0xe97c, 0xeac1, 0xec07, 0xed4f, 0xee99, 0xefe5,    0xf132, 0xf281, 0xf3d3, 0xf525, 0xf67a, 0xf7d1, 0xf929, 0xfa84, 0xfbe0,    0xfd3e, 0xfe9e};/* Set up types and include cook data. */ typedef FIXP Q_t[2];#define Q(x) {(FIXP)((float)(x) * (1<<28) + 0.5f), \              (FIXP)((float)(x) * (1<<28) * 0.707106781187f + 0.5f)}typedef FIXPU C_t;#define C(x) (FIXPU)((float)(x) * (1<<16) + 0.5f)#include "cookdata.h"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -