/*___________________________________________________________________________
| |
| Basics operators. |
|___________________________________________________________________________|
*/
/*___________________________________________________________________________
| |
| Include-Files |
|___________________________________________________________________________|
*/
#include <stdio.h>
#include <stdlib.h>
#include "typedef.h"
#include "basop.h"
/*___________________________________________________________________________
| |
| Local Functions |
|___________________________________________________________________________|
*/
Word16 sature(Word32 L_var1);
/*___________________________________________________________________________
| |
| Constants and Globals |
|___________________________________________________________________________|
*/
Flag Overflow =0;
Flag Carry =0;
/*___________________________________________________________________________
| |
| Functions |
|___________________________________________________________________________|
*/
/*___________________________________________________________________________
| |
| Function Name : sature |
| |
| Purpose : |
| |
| Limit the 32 bit input to the range of a 16 bit word. |
| |
| Inputs : |
| |
| L_var1 |
| 32 bit long signed integer (Word32) whose value falls in the |
| range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. |
| |
| Outputs : |
| |
| none |
| |
| Return Value : |
| |
| var_out |
| 16 bit short signed integer (Word16) whose value falls in the |
| range : 0xffff 8000 <= var_out <= 0x0000 7fff. |
|___________________________________________________________________________|
*/
Word16 sature(Word32 L_var1)
{
Word16 var_out;
if (L_var1 > 0X00007fffL) {
Overflow = 1;
var_out = MAX_16;
}
else {
if (L_var1 < (Word32)0xffff8000L) {
Overflow = 1;
var_out = MIN_16;
}
else {
Overflow = 0;
var_out = extract_l(L_var1);
}
}
return(var_out);
}
/*___________________________________________________________________________
| |
| Function Name : add |
| |
| Purpose : |
| |
| Performs the addition (var1+var2) with overflow control and saturation;|
| the 16 bit result is set at +32767 when overflow occurs or at -32768 |
| when underflow occurs. |
| |
| Complexity weight : 1 |
| |
| Inputs : |
| |
| var1 |
| 16 bit short signed integer (Word16) whose value falls in the |
| range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
| |
| var2 |
| 16 bit short signed integer (Word16) whose value falls in the |
| range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
| |
| Outputs : |
| |
| none |
| |
| Return Value : |
| |
| var_out |
| 16 bit short signed integer (Word16) whose value falls in the |
| range : 0xffff 8000 <= var_out <= 0x0000 7fff. |
|___________________________________________________________________________|
*/
Word16 add(Word16 var1,Word16 var2)
{
Word16 var_out;
Word32 L_somme;
L_somme = (Word32) var1 + (Word32) var2;
var_out = sature(L_somme);
return(var_out);
}
/*___________________________________________________________________________
| |
| Function Name : sub |
| |
| Purpose : |
| |
| Performs the subtraction (var1+var2) with overflow control and satu- |
| ration; the 16 bit result is set at +32767 when overflow occurs or at |
| -32768 when underflow occurs. |
| |
| Complexity weight : 1 |
| |
| Inputs : |
| |
| var1 |
| 16 bit short signed integer (Word16) whose value falls in the |
|
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
ARM上实现视频会议源代码(强烈推荐) (122个子文件)
libcodecarm.so.1.0 142KB
libcodecpc.so.1.0 126KB
libcodecarm.so.1 142KB
libcodecpc.so.1 126KB
ippSP_XSC30LNX_r.a 242KB
ippSC_XSC30LNX_r.a 187KB
makefile.arm 1008B
basop.c 104KB
tab_lbc.c 88KB
exc_lbc.c 71KB
g723codec.c 71KB
lsp.c 24KB
lpc.c 24KB
util_lbc.c 19KB
g723enc.c 17KB
util_cng.c 11KB
cod_cng.c 11KB
coder.c 8KB
decod.c 8KB
g723dec.c 7KB
tame.c 5KB
lbccodec.c 5KB
vad.c 4KB
dec_cng.c 3KB
g711codec.cpp 29KB
network_video_recv_thread.cpp 14KB
network_audio_recv_thread.cpp 14KB
video_test.cpp 13KB
main.cpp 10KB
jpeg_compress.cpp 9KB
avi.cpp 9KB
v4l.cpp 8KB
audio_cap.cpp 8KB
network_ctrl_recv_thread.cpp 8KB
network_video_send_thread.cpp 8KB
network_ctrl_send_thread.cpp 8KB
network_audio_send_thread.cpp 8KB
video_player.cpp 8KB
audio_player.cpp 7KB
network_ctrl.cpp 6KB
video_cap.cpp 5KB
network.cpp 4KB
audio_play_thread.cpp 3KB
video_cap_thread.cpp 2KB
audio_cap_thread.cpp 2KB
video_send.cpp 2KB
network_video_send.cpp 2KB
audio_send.cpp 2KB
network_audio_send.cpp 2KB
common.cpp 1KB
capture_event.cpp 672B
moc_audio_cap.cpp 0B
dep 1KB
Entries 3KB
Entries 1KB
Entries 568B
g723codec.h 10KB
cst_lbc.h 6KB
network.h 5KB
basop.h 3KB
avi.h 2KB
network_ctrl.h 2KB
exc_lbc.h 2KB
codecpc.h 2KB
network_audio_recv_thread.h 2KB
network_video_recv_thread.h 2KB
network_video_send_thread.h 2KB
network_audio_send_thread.h 2KB
network_ctrl_recv_thread.h 2KB
network_ctrl_send_thread.h 2KB
video_player.h 2KB
tab_lbc.h 2KB
coder_pc.h 1KB
audio_player.h 1KB
audio_cap.h 1KB
audio.h 1KB
util_lbc.h 1KB
lpc.h 918B
video.h 895B
g723enc.h 852B
video_cap_thread.h 840B
g723dec.h 839B
video_cap.h 832B
audio_cap_thread.h 830B
decod_pc.h 809B
capture_event.h 749B
audio_play_thread.h 738B
video_send.h 721B
coder_arm.h 698B
lsp.h 665B
audio_send.h 660B
lbccodec.h 655B
decod_arm.h 649B
common.h 647B
network_audio_send.h 647B
network_video_send.h 646B
v4l.h 598B
util_cng.h 596B
signal_def.h 458B
decod.h 388B
共 122 条
- 1
- 2
资源评论
- qidonggeng2020-11-06老掉牙的资源了还不清退?:)需要真正能用的全套视频会议源码(pc+移动+arm-linux)的\/我: pcptnet
- lijian82012-11-03基本还可以吧,ARM端有个ippxsc30的库文件,有些奇怪,是因为没有源代码?
Deniz
- 粉丝: 36
- 资源: 29
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功