摘要: 1.理解const*与*const 假设有一个ptr指针,它保存变量vbl的地址。 Type* ptr = &vbl; 当使用指针的时候就涉及到两个对象:指针本身以及本身所指的对象。这就意味着const有三个层级的保护。 1.1. 确保ptr指向唯一的内存 有两种写法 Type* const ptr 阅读全文
posted @ 2020-10-09 17:55 cyssmile 阅读(1422) 评论(0) 推荐(0) 编辑
摘要: #include <QTextStream> #include <QCoreApplication> #include <QStringList> int main(int argc, char* argv[]) { QCoreApplication app(argc, argv); QTextSt 阅读全文
posted @ 2020-10-09 17:23 cyssmile 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 我实现的思路是所有的格式先转成i420,然后进行crop resize 以及cvt的操作。 Get Fourcc code uint32_t Scaler::GetFOURCC(const Scaler::Buffer *src) { uint32_t fourcc = 0; switch (src 阅读全文
posted @ 2020-10-09 15:57 cyssmile 阅读(1316) 评论(0) 推荐(0) 编辑
摘要: ## 1 memcmp C 库函数 int memcmp(const void *str1, const void *str2, size_t n)) 把存储区 str1 和存储区 str2 的前 n 个字节进行比较。 #include <string.h> int memcmp(const voi 阅读全文
posted @ 2020-10-09 15:12 cyssmile 阅读(140) 评论(0) 推荐(0) 编辑
摘要: libyuv中FourCC定义在video_common.h中。 fourcc是一个32位的无符号的int数,下面这样的宏定义生成。 #ifdef __cplusplus #define FOURCC(a, b, c, d) \ ((static_cast<uint32_t>(a)) | (stat 阅读全文
posted @ 2020-10-09 14:49 cyssmile 阅读(399) 评论(0) 推荐(0) 编辑