资源简介
sbc codec子带压缩编解码算法,是蓝牙音频系统里常见的压缩算法。本算法是国外人写的比较优良的C语言算法

代码片段和文件信息
/*
*
* Bluetooth low-complexity subband codec (SBC) library
*
* Copyright (C) 2004-2007 Marcel Holtmann
* Copyright (C) 2004-2005 Henryk Ploetz
* Copyright (C) 2005-2006 Brad Midgley
*
*
* This library 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.
*
* This library 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 this library; if not write to the Free Software
* Foundation Inc. 51 Franklin St Fifth Floor Boston MA 02110-1301 USA
*
*/
/* todo items:
use a log2 table for byte integer scale factors calculation (sum log2 results
for high and low bytes) fill bitpool by 16 bits instead of one at a time in
bits allocation/bitpool generation port to the dsp
*/
#ifdef HAVE_CONFIG_H
#include
#endif
#include
#include
#include
#include
#include
#include
#include
#include “sbc_math.h“
#include “sbc_tables.h“
#include “sbc.h“
#define SBC_SYNCWORD 0x9C
/* sampling frequency */
#define SBC_FS_16 0x00
#define SBC_FS_32 0x01
#define SBC_FS_44 0x02
#define SBC_FS_48 0x03
/* nrof_blocks */
#define SBC_NB_4 0x00
#define SBC_NB_8 0x01
#define SBC_NB_12 0x02
#define SBC_NB_16 0x03
/* channel mode */
#define SBC_CM_MONO 0x00
#define SBC_CM_DUAL_CHANNEL 0x01
#define SBC_CM_STEREO 0x02
#define SBC_CM_JOINT_STEREO 0x03
/* allocation mode */
#define SBC_AM_LOUDNESS 0x00
#define SBC_AM_SNR 0x01
/* subbands */
#define SBC_SB_4 0x00
#define SBC_SB_8 0x01
/* This structure contains an unpacked SBC frame.
Yes there is probably quite some unused space herein */
struct sbc_frame {
uint16_t sampling_frequency; /* in kHz */
uint8_t blocks;
enum {
MONO = SBC_CM_MONO
DUAL_CHANNEL = SBC_CM_DUAL_CHANNEL
STEREO = SBC_CM_STEREO
JOINT_STEREO = SBC_CM_JOINT_STEREO
} channel_mode;
uint8_t channels;
enum {
LOUDNESS = SBC_AM_LOUDNESS
SNR = SBC_AM_SNR
} allocation_method;
uint8_t subbands;
uint8_t bitpool;
uint8_t codesize;
uint8_t length;
/* bit number x set means joint stereo has been used in subband x */
uint8_t join;
/* only the lower 4 bits of every element are to be used */
uint8_t scale_factor[2][8];
/* raw integer subband samples in the frame */
uint16_t audio_sample[16][2][8];
int32_t sb_sample_f[16][2][8];
int32_t sb_sample[16][2][8]; /* modified subband samples */
int16_t pcm_sample[2][16*8]; /* original pcm audio samples */
};
struct sbc_decoder_st
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 403 2007-10-26 07:09 sbc_c\Makefile.am
文件 15954 2007-12-26 00:43 sbc_c\Makefile.in
文件 36626 2008-02-14 17:41 sbc_c\sbc.c
文件 1846 2008-02-14 17:06 sbc_c\sbc.h
文件 16384 2008-01-02 12:12 sbc_c\sbccode.IAB
文件 488 2008-01-02 12:12 sbc_c\sbccode.IAD
文件 4096 2008-01-02 12:12 sbc_c\sbccode.IMB
文件 368 2008-01-02 12:12 sbc_c\sbccode.IMD
文件 32 2008-01-05 11:48 sbc_c\sbccode.PFI
文件 776 2008-01-05 11:48 sbc_c\sbccode.PO
文件 3008 2008-01-02 12:12 sbc_c\sbccode.PR
文件 16704 2008-01-02 12:12 sbc_c\sbccode.PRI
文件 35772 2008-01-05 14:06 sbc_c\sbccode.PS
文件 6422 2008-01-05 14:06 sbc_c\sbccode.WK3
文件 5631 2008-01-05 11:10 sbc_c\sbcdec.c
文件 5555 2007-12-09 03:04 sbc_c\sbcenc.c
文件 6915 2008-01-03 12:07 sbc_c\sbcinfo.c
文件 8717 2007-12-09 03:04 sbc_c\sbctester.c
文件 2808 2008-02-15 10:11 sbc_c\sbc_math.h
文件 8413 2008-02-15 11:06 sbc_c\sbc_tables.h
目录 0 2014-03-24 16:26 sbc_c
----------- --------- ---------- ----- ----
176918 21
- 上一篇:词法分析器c语言实现
- 下一篇:拼图游戏大型课程设计C# C++
相关资源
- USB转LORA无线模块
- TC2.0DOSBOX
- qt进度条(RoundProgressBar)
- QT实现USB摄像头拍照
- usb键盘(MyUSB_HID_KEIL)
- usb之CDC(CDC_Standalone.rar)
- Linux那些事儿之我是USB core
- USB CAN Tool 源代码(LabVIEW 2011环境)
- VC6 USB开发源码
- stm32f103 USB键盘
- 猜数字游戏.sb3
- c++监控USB插拔状态源码
- USB识别 HID识别 MFC代码
- USB 完整bootloader项目,包括底层驱动和
- USB2.0接口数据采集卡
- 基于VC MFC的数据分析系统
- 基于C++的虚拟串口通讯
- USB双向通信上位机VC++程序
- hid usb 编程源码
- (LSB算法)数字水印的嵌入和提取V
- 基于CY7C68013A的USB2.0详细开发文档
- (LSB算法)数字水印的VC++实现
- USB视频设备采集图像VisualC++程序
- 基于C++的USB的数据传输的上位机程序
- 真正的usbview源代码
- vc++调用usb摄像头,进行拍照,保存为
- VC6.0+MFC+USBCAN上位机通信控制
- USB3300上位机端数据收发Demo最大速度
- vcMfcUsbPort完整上位机源码
- USB HID上位机源代码
评论
共有 条评论