资源简介
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语言实现)246881
- 下一篇:拼图游戏大型课程设计C# C++
相关资源
- C#实时监测usb设备的插拔情况,winfo
- VC++ USB接口编程(代码)
- detours2.1 VC6中编译方法及源代码及使用
- 基于LSB的图片数据隐藏c++类
- c++usb端口访问
- C++ USB HID
- 基于LSB的BMP文件信息隐藏
- Project1.rar
- USB 通讯 libusb-win32
- 周立功USBCAN函数库ControlCAN.dll最新版
- 指纹识别C++
- VC++编写USB接口通信程序
- c语言程序实现PC端通过USB端口与单片
- 即时检测USB设备插拔
- 用C语言编写的usb自动识别程序
- VC++ HIDAPI实现USB数据读写
- USB键盘驱动C++
- 基于MFC编写的读写USB_HID设备数据程序
- 节点大小平衡树(Size Balanced Tree c++和
- usb_hid_vc++6.0读写设备源码
- Visual Studio 2017 编译器MSBuild Tools 离线
- DBC的C++解析源码
- VC++ libusb实现USB数据读取
- USB_HID通信上位机程序VC6.0(真正类似
- RIGOL 编程手册
- ksj转opencv(USB相机图像数据转OPENCV)
- VerticalProgressBar
- usb3.0 msc
- STM32F1的USB键盘鼠标使用HAL库
- 上位机通过usb控制下位机上位机通过
评论
共有 条评论