博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
指针数组学习
阅读量:4635 次
发布时间:2019-06-09

本文共 856 字,大约阅读时间需要 2 分钟。

int Rawdata_PreProcess(const void **in_frame, int n, int frame_size, void *out_frame){    const short **iframe = (const short **)in_frame;    short *oframe = (short *)out_frame;    int member = frame_size / sizeof(short);    for (int m = 0; m < member; m++) {        int sum = 0;        for(int i = 0; i < n; i++) {            short point = iframe[i][m];            printf("frame:%d, index:%d, value:%d\n", i, m, (int)point);            sum += point;        }        oframe[m] = sum / n;    }    return 0;}short frame1[4] = {
1, 4, 6, 7};short frame2[4] = {
3, 6, 2, 9};short frame3[4] = {
1, 5, 3, 4};short out[4];int main(void){ short *group[3] = {frame1, frame2, frame3}; Rawdata_PreProcess(group, 3, 8, out); printf("a:%d, b:%d, c:%d, d:%d\n", out[0], out[1], out[2], out[3]);}

 

转载于:https://www.cnblogs.com/hjj-fighting/p/10795542.html

你可能感兴趣的文章
读《大道至简》第六章感想
查看>>
ef linq 中判断实体中是否包含某集合
查看>>
金蝶K/3 BOS产品培训教案
查看>>
章三 链表
查看>>
react组件回顶部
查看>>
MyBatis if标签的用法
查看>>
VMware
查看>>
具体解释可变參数列表
查看>>
【LeetCode】Palindrome Partitioning 解题报告
查看>>
用vue-cli脚手架搭建一个仿网易云音乐的全家桶vue项目
查看>>
Solution for Concurrent number of AOS' for this application exceeds the licensed number
查看>>
从壹开始微服务 [ DDD ] 之一 ║ D3模式设计初探 与 我的计划书
查看>>
python 错误之SyntaxError: Missing parentheses in call to 'print'
查看>>
Windows Phone开发(16):样式和控件模板
查看>>
CSE 3100 Systems Programming
查看>>
洛谷 1604——B进制星球(高精度算法)
查看>>
IntelliJ IDEA 的Project structure说明
查看>>
处理 JSON null 和空数组及对象
查看>>
Java Security(JCE基本概念)
查看>>
服务注册发现consul之四: 分布式锁之四:基于Consul的KV存储和分布式信号量实现分布式锁...
查看>>