- 博客(230)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 windows下AV1的编译
参考 https://blog.youkuaiyun.com/qq_30945147/article/details/945972261.下载msys2:http://www.msys2.org/2. 在msys2终端中输入安装下列软件(可能需要下载多次)pacman -S mingw-w64-x86_64-cmake gcc mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-libwinpthread-git binutils coreutils yasm gi
2021-01-29 16:49:40
1393
原创 windows下x265编译
1.x265下载:http://ftp.videolan.org/pub/videolan/x265/2.cmake步骤:第一栏where is the code: E:/myvs/x265_3.2.1/source第二栏where to build the binaries: E:/myvs/x265_3.2.1/build/vc15-x86_64如果要开启汇编,勾选ENABLE_ASSEMBLY,需要下载nasm,下载地址:http://www.nasm.us/pub/nasm/releaseb
2021-01-28 23:59:35
693
原创 Linux下x264的编译,调试
参考了https://blog.youkuaiyun.com/wzxsjdt/article/details/41693025,感谢博主的分享需要源材料:codeblock,x264代码包,汇编解释器yasm1. x264下载:http://www.videolan.org/developers/x264.html2. yasm:http://yasm.tortall.net/Download.html,yasm解压文件夹下需要make./configuremakesudo make instal
2021-01-28 23:51:17
675
原创 码率控制CPB饱和度问题
在compressGOP中存在判断m_pcRateCtrl->getCpbSaturationEnabled(),在配置文件中默认关闭。如果m_pcRateCtrl->getCpbSaturationEnabled()开启,可以有效防止coded picture buffer (CPB)的上溢和下溢(JCTVC-U0132)。在码率控制中,有3个参数(R,B,F)。R:传输的比特率;B:CPB的尺寸;F:CPB的充盈度; 上溢和下溢对应的表示式为:其...
2021-01-23 19:11:47
408
1
原创 Tarjan求割点、割边,以及两点间的必经点、必经边
具体图文看https://www.cnblogs.com/nullzx/archive/2017/12/04/7968110.htmltarjan求割点,割点的判断分为根节点和非根节点判断:根节点:当有2个以上分支,必为割点;子节点:存在一子节点v,u->v若有low[v] >= dnf[u],即子节点不能访问到,则u为割点;题目:https://www.luogu.com.cn/problem/P3388#include<iostream>#includ..
2021-01-23 18:44:35
466
转载 HEVC中SAO--自适应样点补偿 详细分析解读
原文地址:http://blog.youkuaiyun.com/feixiang_john/article/details/8258452HEVC中SAO--自适应样点补偿: 本文分三个部分, 1.Sample Adaptive Offset原理, 2.SAO处理流程分析, 3.SAO意义何在!a)SAO原理: SAO是在DB之后进行, 输入是重建帧和原始帧数据, 输出是SAO数据和SAO后的重建帧.自适应样点补偿是一个自适应选择过程,在去块滤波后进行。下面是整个HEVC的编码框图, ...
2021-01-18 12:03:02
594
原创 HEVC DCT变换
注意,由于量化和反量化可能带来数值溢出,行反变换多右移1位 右移的存在精度补偿DCT正变换Void xTrMxN(Int bitDepth, TCoeff *block, TCoeff *coeff, Int iWidth, Int iHeight, Bool useDST, const Int maxLog2TrDynamicRange){ const Int TRANSFORM_MATRIX_SHIFT = g_transformMatrixShi...
2021-01-14 21:53:51
798
原创 关于数位DP的一些思考
题目:https://leetcode-cn.com/problems/1nzheng-shu-zhong-1chu-xian-de-ci-shu-lcof输入一个整数 n ,求1~n这n个整数的十进制表示中1出现的次数。例如,输入12,1~12这些整数中包含1 的数字有1、10、11和12,1一共出现了5次。int nums[20];int dp[20][2][20];//pos表示当前位置,从最高位开始处理//s表示在之前的pos,数位有无小于最高上限//ok表示当前状态下1的个.
2021-01-14 19:21:09
148
1
原创 HEVC merge列表建立
Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, UInt &numSpatialMergeCandidates, Int mrgCandIdx ) const#elseVoid TComDataCU::getIn.
2021-01-08 20:43:56
420
原创 HEVC帧间分像素插值
Void TEncSearch::xPatternSearchFracDIF( Bool bIsLosslessCoded, TComPattern* pcPatternKey, Pel* piRefY, .
2021-01-08 17:00:33
795
原创 HEVC帧内预测函数estIntraPredLumaQT
VoidTEncSearch::estIntraPredLumaQT(TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv, TComYuv* .
2021-01-08 15:19:39
419
原创 conda虚拟环境下gcc更新
感谢知乎https://www.zhihu.com/question/56272908本来可以直接更新,但没有root权限太恶心了....1.虚拟环境安装新版gcc,根据网站https://anaconda.org/search?q=gcc+查看安装指令(比如 gcc 7.3 conda install -c moussi gcc_impl_linux-64 )2.在虚拟环境my_env进行gcc的链接:ln -s /home/anconda3/envs/my_env/libexec/gc
2020-12-17 22:34:16
8468
3
原创 Pytorch DataLoader shuffle 验证
shuffle = False时,不打乱数据顺序;shuffle = True,随机打乱import numpy as npimport h5pyimport torchfrom torch.utils.data import DataLoader, Dataseth5f = h5py.File('train.h5', 'w');data1 = np.array([[1,2,3], [2,5,6], [3,5,6], .
2020-12-09 20:49:12
2343
2
原创 C++ 调用python文件
环境:Win10 + VS2017 + Anaconda3 + Python3.6注意:在Debug模式有可能编译错误,换成release就好。1.添加python3.6中对应的include和libs复制一份libs下的python36.lib,并重命名为python36_d.lib,添加到连接器输出配置完成,测试(来源:https://blog.youkuaiyun.com/qq_31342997/article/details/88368420):#include<iost..
2020-12-04 21:14:34
373
原创 C++ assert与try, catch
assert:根据判断条件,如果不满足则抛出异常,但仅限于Debug模式try, catch:Debug模式和Release模式均可。try, catch详细用法:https://blog.youkuaiyun.com/qq_40191710/article/details/81063878 https://www.jb51.net/article/80913.htm更新一下上面链接的代码 :-)C++的异常处理的基本思想大致可以概括为传统...
2020-10-27 21:08:02
2244
原创 POJ 1742 coins
https://vjudge.net/problem/POJ-1742背包问题,需要优化为二维 ,挑战程序设计P63#include<iostream>#include<algorithm>#include<queue>#include<cmath>#include<string>#include<map>#include<set>#include<vector>using namesp
2020-10-15 16:29:33
356
原创 tensorboard可视化错误 (dt - datetime.datetime.fromtimestamp(0)).total_seconds()), OSError: [Errno 22] Inv
环境:win10 + cpu版本tensorflow 1.13.1 with the newest event. "__main__", mod_spec) File "d:\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\Anaconda3\Scripts\tensorboard.exe\__main__.py", line 7, in <module>.
2020-10-14 12:24:19
577
2
原创 牛客 最长上升子序列
int lengthOfLIS(vector<int>& nums) { if (nums.size() == 0) return 0; int len = 1; vector<int> dp(nums.size(), 1); for (int i = 1; i < nums.size(); i++) { for (int j = 0; ...
2020-10-09 13:08:01
350
原创 HDU 1698 Just a Hook
http://acm.hdu.edu.cn/showproblem.php?pid=1698题意:给一个序列,初始值都是1,有多组测试数据,每个数据序列长度为n,有m个操作,每个操作给出x,y,c,表示把[x,y]区间的值改为c,最后询问序列总和
2020-09-30 14:50:09
158
原创 HDU 1754 I Hate It
http://acm.hdu.edu.cn/showproblem.php?pid=1754常规线段树,将tree中的求和改成求max就行。注意输入要循环,且判断EOF#include<iostream>#include<algorithm>#include<queue>#include<cstring>#include<map>#include<unordered_map>#include<set&g.
2020-09-30 13:33:24
156
原创 HDU 1166 敌兵布阵
http://acm.hdu.edu.cn/showproblem.php?pid=1166常规线段树操作#include<iostream>#include<algorithm>#include<queue>#include<cstring>#include<map>#include<unordered_map>#include<set>#include<unordered_set>#
2020-09-30 13:31:39
119
原创 HEVC帧内预测:xPredIntraAng
Void TComPrediction::xPredIntraAng( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pTrueDst, Int dstStrideTrue, UIn...
2020-09-16 13:19:42
230
原创 扩展欧几里得
逆元https://blog.youkuaiyun.com/LOOKQAQ/article/details/81282342扩展欧几里得https://blog.youkuaiyun.com/destiny1507/article/details/81750874//ax+by=gcd(a,b),求最小x和y。d是a、b的最大公因数void gcd(int a, int b, int &d, int &x, int &y) { if (!b) { d = a; x = 1;
2020-08-31 21:06:14
159
原创 选择排序,冒泡排序,插入排序,归并排序,快速排序模板
template<typename T>void selection_sort(vector<T>& a) { for (int i = 0; i < a.size() - 1; i++) { int min = i; for (int j = i + 1; j < a.size(); j++) if (a[j] < a[min]) min = j; swap(a[i], a[min]); }}template<.
2020-08-24 19:47:31
143
原创 C++ 虚函数的两个例子
虚函数是动态联编的eg1:class A{public: virtual void foo() { cout << "A::foo() is called" << endl; }};class B :public A{public: void foo() { cout << "B::foo() is called" << endl; }};int main(void){ A *a = new B(); a-.
2020-08-12 21:17:00
232
原创 HEVC Zscan和Raster下标转换
Zscan扫描顺序和Raster扫描顺序(图来自:https://www.codetd.com/article/4927566) Zscan Raster...
2020-07-13 16:09:06
415
原创 Anaconda3导入pycharm
https://blog.youkuaiyun.com/weixin_41923961/article/details/86584683
2020-07-13 14:24:55
266
原创 二分模板
//lower_bound,即>=target实现。跳出循环时,l==rint l = 0, r = nums.size();while (l < r) { int m = (l + r) >> 1; if (nums[m] < target) l = m + 1; else r = m;} //upper_bound,即> target实现。取边界ll = 0, r = nums.size() - 1;while (l <= r) {.
2020-07-05 23:56:05
171
原创 牛客网 翻转矩阵
#include<iostream>#include<algorithm>#include<string>using namespace std;int a[50][50];int m, n, k;int maxr = -1;void judge() { int temp = 0; for (int i = 0; i < n; i++...
2020-07-04 15:19:17
182
原创 VGG16识别fashion-mnist数据集
VGG16结构图注释:conv3-64指大小为3*3*3,64个卷积核参考VGG16利用keras构建模型,用fashion-mnist数据集训练模型。代码:import numpy as npimport matplotlib.pyplot as pltfrom sklearn.model_selection import train_test_splitfrom ker...
2020-07-04 13:16:31
1563
原创 JEM学习:candidateSearch
这个函数是帧间进行KL变换之前,在插值图像中找到当前块的预测块的相似块关键函数candidateSearch()函数调用了searchCandidateFromOnePicInteger();searchCandidateFromOnePicInteger()调用了xSetSearchRange();下面依次注释:candidateSearch()Void TComTr...
2020-07-04 13:14:57
281
原创 JEM学习: xcompressCU
1425 xCheckRDCostInter1444xCheckRDCostAffineMerge2Nx2N1449xCheckRDCostMerge2Nx2N1469xCheckRDCostMerge2Nx2NFRUC1496 xCheckRDCostInter 不做改进的SIZE_2Nx2N1538 xCheckRDCostInter 运动矢量产生的SIZE_2Nx...
2020-07-04 13:14:18
212
原创 UVA 10160
双递归结构:int dfs()多重判断是否return如:if(cnt == m ) return 一些改变操作dfs(cur + 1, cnt + 1 ) 含递增的变量恢复改变操作dfs(cur, cnt + 1 )#include<iostream>#include<numeric>#include<string.h>...
2020-07-04 13:12:01
174
转载 TComPicYuv、TComPic、TComPicSym、TComDataCU以及TComYuv的关系
TComPicYuv、TComPic、TComPicSym、TComDataCU以及TComYuv的关系 首先用一张图来描述它们之间的关系 1、HM首先使用TComPicYuv保存从文件中读取出来的YUV数据 2、利用TComPicYuv构造TComPic,并把YUV数据复制给他(TComPic包含了TComPicYuv成员) 3、TComPic表示一帧图像,包含了数据(T.
2020-07-04 10:01:33
476
原创 线段树模板
配合https://www.bilibili.com/video/av47331849食用#include<bits/stdc++.h> using namespace std;#define maxn 100000void build_tree(int arr[], int tree[], int node, int start, int end) { if (start == end) { tree[node] = arr[start]; return; }.
2020-06-30 21:59:23
201
原创 链式前向星
模板是这样的????const int maxn = 100000;int head[maxn], Next[maxn], to[maxn], edge[maxn],cnt;void add(int u, int v, int w){ Next[++cnt] = head[u]; to[cnt] = v; head[u] = cnt; edge[cnt] = w;}int main(){ int m,n,w; scanf("%d%d", &m, &n); for (
2020-06-20 20:25:54
170
原创 洛谷 P3375 【模板】KMP字符串匹配
https://www.luogu.com.cn/problem/solution/P3375参考洛谷大佬模板。#include<iostream>#include<algorithm>#include<vector>#include<cstdio>#include<queue>#include<cmath>#include<math.h>#include<string>#includ.
2020-06-17 10:21:08
199
原创 365. 水壶问题
记录一下,第一次遇到自定义unordered_set的hash函数 int x, y, z; struct node { int a, b; node(int x, int y) :a(x), b(y) {}; bool operator == (const node &nd) const { return nd.a == a && nd.b == b; } };.
2020-06-13 00:59:41
198
原创 POJ - 2387 Til the Cows Come Home
#include<iostream>#include<algorithm>#include<queue>#include<cmath>#include<math.h>#include<string>#include<string.h>#include<map>#include<set>#include<stack>#include<sstream>#in.
2020-06-10 16:50:58
267
原创 uva 12219 Common Subexpression Elimination
这道题写得极度痛苦。题都看了半天总结一下自己遇到的坑点:1.map<node,int>和map<*node,int>。由于需要重载<符号,map<*node,int>无法调用struct node中的<重载。2.hash=hash*27+s[p]-'a'+1中+1是必要的,如果不加,'aa','aaa'hash值为0,冲突#include<iostream>#include<algorithm>#inc...
2020-06-08 18:08:06
257
matlab中的cov(x,1)和实际计算结果不同
2018-11-03
TA创建的收藏夹 TA关注的收藏夹
TA关注的人