摘要: CAMEvent是Baseclasses提供的对windows自带的event的一种包装. 实现如下: 创建时一般采用CAMEvent Test(TRUE)的方式创建,如果参数为TRUE则m_hEvent是一个手动重置事件,如果参数为FALSE或者默认则m_hEvent是一个自动重置事件,一般会采用 阅读全文
posted @ 2016-07-19 14:25 史力普神 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 关于YUV格式的讲解,网上有很多,主要有以下几种格式: 1)打包(packed)格式.将YUV分量存放在同一个数组中,通常是几个相邻的像素组成一个宏像素(macro-pixel): MEDIASUBTYPE_YUY2 YUY2格式,以4:2:2方式打包(比较常用的,默认的4:2:2的格式) MEDI 阅读全文
posted @ 2015-12-17 18:21 史力普神 阅读(288) 评论(0) 推荐(0) 编辑
摘要: (1)https://www.cs.uaf.edu/2009/fall/cs301/lecture/11_13_sse_intrinsics.html(2)http://pan.baidu.com/s/1hq1Q6yg第二个链接是百度云盘的一个文档。配合第一个链接和这个文档,基本上就完成入门了。 阅读全文
posted @ 2014-12-04 10:17 史力普神 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 先来几个链接:(1)https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/Vector-Extensions.html(2)https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html(3)https://gc... 阅读全文
posted @ 2014-12-04 10:02 史力普神 阅读(587) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 3 int main(void) 4 { 5 int foo = 10, bar = 15; 6 printf("foo=%d, ", foo); 7 printf("bar=%d\n", bar); 8 ... 阅读全文
posted @ 2014-11-21 10:58 史力普神 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 结构体:struct Node{ int to; LL cost; int next;}edge[2*MAX];邻接表的建立:void add_edge(int from,int to,LL cost){ tot++; edge[tot].to=to; edge[tot].cost=cost; edge[tot].next=head[from]; head[from]=tot;}spfa算法:void spfa(){ for(int i=1;i<=v;i++) { dis[i]=-1; } dis[1]=0;... 阅读全文
posted @ 2012-11-21 18:19 史力普神 阅读(175) 评论(0) 推荐(0) 编辑
摘要: POJ 1274:http://poj.org/problem?id=1274匈牙利算法我是看了一个代码后才明白的,原来看算法导论讲的云里雾里,搞不明白,还是代码实现能力太差。数据结构:int n, m, ans; //n个待匹配点去匹配m个点int link[Max]; //link[i]=x记录当前与i节点相连的节点xbool mat[Max][Max]; // mat[i][j]表示奶牛i能否匹配圈j。bool vis[Max]; // 标记点是否被访问DFS搜索为点u寻找匹配点:boo... 阅读全文
posted @ 2012-10-01 14:10 史力普神 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3414这道题和POJ 1606:http://poj.org/problem?id=1606很像,几乎一模一样,但是本题增加了对无解情况的输出。那么什么情况下会无解呢?定义bool 数组标记每一个状态,搜索过的就不在搜了。这样一直下去,无解时队列会清空(front==rear)或(Q.empty())。队列空了还无解,本题就无解了。 阅读全文
posted @ 2012-09-26 19:19 史力普神 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1655Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6769Accepted: 2718DescriptionConsider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a 阅读全文
posted @ 2012-09-26 17:57 史力普神 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1564DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1, 1], then there are four different sums that equal 4: 4, 3+1, 2+2, and 2 阅读全文
posted @ 2012-09-26 12:59 史力普神 阅读(201) 评论(0) 推荐(0) 编辑