h264bitstream (read and write H.264 video bitstreams)

2023-11-12

1、编译安装参考源码包自带的说明文档

h264bitstream-0.2.0/README.md

 

sudo apt-get install build-essential libtool
autoreconf -i
./configure --prefix=$(pwd)/_install
make
make install

 

2、例子太啰嗦,精简了一下

h264_analyze.c

/* 
 * h264bitstream - a library for reading and writing H.264 video
 * Copyright (C) 2005-2007 Auroras Entertainment, LLC
 * 
 * Written by Alex Izvorski <aizvorski@gmail.com>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "h264_stream.h"

#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

#define BUFSIZE 32*1024*1024

int main(int argc, char *argv[])
{
    FILE* infile;

    uint8_t* buf = (uint8_t*)malloc( BUFSIZE );

    h264_stream_t* h = h264_new();

    if (argc < 2) { return EXIT_FAILURE; }

    int opt_verbose = 1;
    int opt_probe = 0;

    infile = fopen(argv[1], "rb");


    if (infile == NULL) { fprintf( stderr, "!! Error: could not open file: %s \n", strerror(errno)); exit(EXIT_FAILURE); }

    if (h264_dbgfile == NULL) { h264_dbgfile = stdout; }
    

    size_t rsz = 0;
    size_t sz = 0;
    int64_t off = 0;
    uint8_t* p = buf;

    int nal_start, nal_end;

    while (1)
    {
        rsz = fread(buf + sz, 1, BUFSIZE - sz, infile);
        if (rsz == 0)
        {
            if (ferror(infile)) { fprintf( stderr, "!! Error: read failed: %s \n", strerror(errno)); break; }
            break;  // if (feof(infile)) 
        }

        sz += rsz;

        while (find_nal_unit(p, sz, &nal_start, &nal_end) > 0)
        {
            if ( opt_verbose > 0 )
            {
               fprintf( h264_dbgfile, "!! Found NAL at offset %lld , size %lld  \n",
                      (long long int)(off + (p - buf) + nal_start),
                      (long long int)(nal_end - nal_start) );
            }

            p += nal_start;
            read_debug_nal_unit(h, p, nal_end - nal_start);

            if ( opt_probe && h->nal->nal_unit_type == NAL_UNIT_TYPE_SPS )
            {
                // print codec parameter, per RFC 6381.
                int constraint_byte = h->sps->constraint_set0_flag << 7;
                constraint_byte = h->sps->constraint_set1_flag << 6;
                constraint_byte = h->sps->constraint_set2_flag << 5;
                constraint_byte = h->sps->constraint_set3_flag << 4;
                constraint_byte = h->sps->constraint_set4_flag << 3;
                constraint_byte = h->sps->constraint_set4_flag << 3;

                fprintf( h264_dbgfile, "codec: avc1.%02X%02X%02X\n",h->sps->profile_idc, constraint_byte, h->sps->level_idc );

                // TODO: add more, move to h264_stream (?)
                break; // we've seen enough, bailing out.
            }

            if ( opt_verbose > 0 )
            {

            }

            p += (nal_end - nal_start);
            sz -= nal_end;
        }

        // if no NALs found in buffer, discard it
        if (p == buf) 
        {
            fprintf( stderr, "!! Did not find any NALs between offset %lld , size %lld , discarding \n",
                   (long long int)off, 
                   (long long int)off + sz);

            p = buf + sz;
            sz = 0;
        }

        memmove(buf, p, sz);
        off += p - buf;
        p = buf;
    }

    h264_free(h);
    free(buf);

    fclose(h264_dbgfile);
    fclose(infile);

    return 0;
}

编译

gcc h264_analyze.c -o h264_analyze -I $(pwd)/h264bitstream/include/h264bitstream -L $(pwd)/h264bitstream/lib -lh264bitstream

添加库文件环境变量

export LD_LIBRARY_PATH=$(pwd)/h264bitstream/lib:$LD_LIBRARY_PATH

运行

./h264_analyze JM_cqm_cabac.264

 

3、封装了个函数,方便集成

int get_h264_nalu(uint8_t* buf, size_t sz)

main.c

/* 
 * h264bitstream - a library for reading and writing H.264 video
 * Copyright (C) 2005-2007 Auroras Entertainment, LLC
 * 
 * Written by Alex Izvorski <aizvorski@gmail.com>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "h264_stream.h"

#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

#define BUFSIZE 1024*1024

void h264_nalu_cb(uint8_t* p,size_t sz)
{
    printf("h264 payload %x %x %x %x %x\n",p[0],p[1],p[2],p[3],p[4]);
}

int get_h264_nalu(uint8_t* buf, size_t sz)
{    
    h264_stream_t* h = h264_new();
   
    uint8_t* p = buf;

    int nal_start, nal_end;

    int n = 0;

    while (find_nal_unit(p, sz, &nal_start, &nal_end) > 0)
    {

        printf("!! Found NAL at offset %lld , size %lld  \n",
              (long long int)((p - buf) + nal_start),
              (long long int)(nal_end - nal_start) );  

        //export nalu data
        //printf("h264 payload %x %x %x %x %x\n",p[0],p[1],p[2],p[3],p[4]);
        char str[32];
        sprintf(str,"./h264_nalu_frame/test%d.264",n);         
        FILE *fp = fopen(str, "a+b");
        if(fp)
        {
         fwrite(p, nal_end, 1, fp);
         fclose(fp);
         fp = NULL;
        }
        n++;
        h264_nalu_cb(p, nal_end);      


        //debug
        p += nal_start;
        //read_debug_nal_unit(h, p, nal_end - nal_start);

        //next frame
        p += (nal_end - nal_start);
        sz -= nal_end;
    }

    h264_free(h);
    
    return 0;
}

int main(int argc, char *argv[])
{   
    uint8_t* buf = (uint8_t*)malloc( BUFSIZE );
    FILE* infile = fopen("test0.264", "rb");
    fread(buf,1,BUFSIZE,infile);
    get_h264_nalu(buf, BUFSIZE);
    fclose(infile);
    free(buf);
    return 0;
}

还是三步走

gcc main.c -o main -I $(pwd)/h264bitstream/include/h264bitstream -L $(pwd)/h264bitstream/lib -lh264bitstream

export LD_LIBRARY_PATH=$(pwd)/h264bitstream/lib:$LD_LIBRARY_PATH

./main

解析个 sps + pps + i + p*n

dong@ubuntu:~/doing/h264bitstream_demo$ ./build.sh
dong@ubuntu:~/doing/h264bitstream_demo$ ./main
!! Found NAL at offset 4 , size 15  
h264 payload 0 0 0 1 67
!! Found NAL at offset 23 , size 4  
h264 payload 0 0 0 1 68
!! Found NAL at offset 31 , size 23637  
h264 payload 0 0 0 1 65
!! Found NAL at offset 23672 , size 6052  
h264 payload 0 0 0 1 41
!! Found NAL at offset 29728 , size 15796  
h264 payload 0 0 0 1 41
!! Found NAL at offset 45528 , size 16669  
h264 payload 0 0 0 1 41
!! Found NAL at offset 62201 , size 14952  
h264 payload 0 0 0 1 41
!! Found NAL at offset 77157 , size 14291  
h264 payload 0 0 0 1 41
!! Found NAL at offset 91452 , size 14913  
h264 payload 0 0 0 1 41
!! Found NAL at offset 106369 , size 14420  
h264 payload 0 0 0 1 41
!! Found NAL at offset 120793 , size 14316  
h264 payload 0 0 0 1 41
!! Found NAL at offset 135113 , size 16304  
h264 payload 0 0 0 1 41
!! Found NAL at offset 151421 , size 14216  
h264 payload 0 0 0 1 41
!! Found NAL at offset 165641 , size 16108  
h264 payload 0 0 0 1 41
!! Found NAL at offset 181753 , size 14348  
h264 payload 0 0 0 1 41
!! Found NAL at offset 196105 , size 16092  
h264 payload 0 0 0 1 41
!! Found NAL at offset 212201 , size 14529  
h264 payload 0 0 0 1 41
!! Found NAL at offset 226734 , size 16852  
h264 payload 0 0 0 1 41
!! Found NAL at offset 243590 , size 14098  
h264 payload 0 0 0 1 41
!! Found NAL at offset 257692 , size 16018  
h264 payload 0 0 0 1 41
!! Found NAL at offset 273714 , size 14647  
h264 payload 0 0 0 1 41
!! Found NAL at offset 288365 , size 14792  
h264 payload 0 0 0 1 41
!! Found NAL at offset 303161 , size 13929  
h264 payload 0 0 0 1 41
!! Found NAL at offset 317094 , size 19153  
h264 payload 0 0 0 1 41
!! Found NAL at offset 336251 , size 13545  
h264 payload 0 0 0 1 41
!! Found NAL at offset 349800 , size 19024  
h264 payload 0 0 0 1 41
!! Found NAL at offset 368828 , size 14569  
h264 payload 0 0 0 1 41
!! Found NAL at offset 383401 , size 13160  
h264 payload 0 0 0 1 41
!! Found NAL at offset 396565 , size 19309  
h264 payload 0 0 0 1 41
!! Found NAL at offset 415878 , size 13847  
h264 payload 0 0 0 1 41
!! Found NAL at offset 429729 , size 13841  
h264 payload 0 0 0 1 41
!! Found NAL at offset 443574 , size 20354  
h264 payload 0 0 0 1 41
dong@ubuntu:~/doing/h264bitstream_demo$

 

4、去掉起始码

main.c

/* 
 * h264bitstream - a library for reading and writing H.264 video
 * Copyright (C) 2005-2007 Auroras Entertainment, LLC
 * 
 * Written by Alex Izvorski <aizvorski@gmail.com>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "h264_stream.h"

#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

#define BUFSIZE 1024*1024

void h264_nalu_cb(uint8_t* p,size_t sz)
{
    printf("h264 payload %x %x %x %x %x\n",p[0],p[1],p[2],p[3],p[4]);
}

int get_h264_nalu(uint8_t* buf, size_t sz)
{    
    h264_stream_t* h = h264_new();
   
    uint8_t* p = buf;

    int nal_start, nal_end;

    int n = 0;

    while (find_nal_unit(p, sz, &nal_start, &nal_end) > 0)
    {

        printf("!! Found NAL at offset %lld , size %lld  \n",
              (long long int)((p - buf) + nal_start),
              (long long int)(nal_end - nal_start) );  

        //printf("h264 payload %x %x %x %x %x\n",p[0],p[1],p[2],p[3],p[4]);


        //debug
        p += nal_start;
        //read_debug_nal_unit(h, p, nal_end - nal_start);

        //export nalu data
        char str[32];
        sprintf(str,"./h264_nalu_frame/test%d.264",n);         
        FILE *fp = fopen(str, "a+b");
        if(fp)
        {
         fwrite(p, nal_end - nal_start, 1, fp);
         fclose(fp);
         fp = NULL;
        }
        n++;
        h264_nalu_cb(p, nal_end - nal_start);

        //next frame
        p += (nal_end - nal_start);
        sz -= nal_end;
    }

    h264_free(h);
    
    return 0;
}

int main(int argc, char *argv[])
{   
    uint8_t* buf = (uint8_t*)malloc( BUFSIZE );
    FILE* infile = fopen("test0.264", "rb");
    fread(buf,1,BUFSIZE,infile);
    get_h264_nalu(buf, BUFSIZE);
    fclose(infile);
    free(buf);
    return 0;
}

 

demo附件包下载

https://files.cnblogs.com/files/dong1/h264bitstream_demo.zip

 

转载于:https://www.cnblogs.com/dong1/p/11457760.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

h264bitstream (read and write H.264 video bitstreams) 的相关文章

  • Java课程设计之学习成绩管理系统

    package System import java awt import java awt event import java io import javax swing import javax swing table Abstract
  • fork之后子进程到底复制了父进程什么

    fork之后子进程到底复制了父进程什么 发表于2015 4 3 9 54 08 2161人阅读 分类 操作系统 include
  • 终端连接控制(stty的编写)

    终端连接控制 stty的编写 一 背景 文件与目录在之前已经学习过了 文件中包含着数据 这些数据可以被读出 写入 也可以用以操作 但文件不仅仅是计算机唯一的数据来源 计算机的数据还可以来自于许多的外部设备 比如扫描仪 照相机 鼠标等输入设备
  • MySQL基础(非常全)

    MySQL基础 一 MySQL概述 1 什么是数据库 答 数据的仓库 如 在ATM的示例中我们创建了一个 db 目录 称其为数据库 2 什么是 MySQL Oracle SQLite Access MS SQL Server等 答 他们均是
  • 文件管理系统(操作系统)——9张思维导图

    文件管理系统 1 文件管理 1 1 一个文件的逻辑结构 比如一个文本txt文件 又或者Excel文件 在我们用户看来 它是长什么样的 这个就是逻辑结构 几个概念 逻辑结构 就是指在用户看来 单个文件内部的数据应该是如何组织起来的 物理结构
  • linux 如何创建卷组

    1 创建一个物理卷 Pvcreate dev sd1 dev sd2 dev sd3 dev sd4 2 用刚才创建的物理卷创建一个卷组 Vgcreate 卷组名 dev sd1 dev sd2 dev sd3 dev sd4 3 创建逻辑
  • unix环境高级编程——文件IO

    本期主题 unix环境高级编程 文件IO 文件IO 0 引言 1 文件描述符 2 IO编程中常用的API接口 1 open函数 2 close函数 3 read函数 4 write函数 5 lseek函数 3 函数sync fsync和fd
  • office2013 excel 打开时提示excel词典xllex.dll文件丢失或损坏

    今天打开Excel时 发现报错 xllex dll文件丢失或损坏 我用的是office2013 网上找了好多都是2007的dll文件 导入不了 于是乎重装office 问题解决 但还是把xllex dll烤出来做个备份吧 参考下面步骤即可
  • Windows 添加永久静态路由

    route add p 10 10 0 0 mask 255 255 0 0 10 10 6 1 p 参数 p 即 persistent 的意思 p 表示将路由表项永久加入系统注册表
  • win10 Enable developer Mode

    经过漫长的安装过程 win10终于装上了vs2015 rc 写个小程序试试 结果提示 根据提示打开 设置 更新 for developer 据说应该有这么个界面 但是这个界面根本出不来 直接闪退的说 翻 MSDN 终于翻出了解决方法 htt
  • 红帽7.9部署telnet服务

    升级ssh 为预防万一提前配置telnet服务 安装软件包 yum install telnet server yum install xinetd xinetd加入开机自启 systemctl enable xinetd service
  • 程序员的自我修养——链接、装载与库

    1 温故而知新 操作系统概念 北桥 连接高速芯片 系统调用接口 以软件中断的方式提供 如Linux使用0x80号中断作为系统调用接口 多任务系统 进程隔离 设备驱动 直接使用物理内存的弊端 地址空间不隔离 内存使用效率低 程序运行的地址不确
  • Elasticsearch 日志

    下载并安装 Filebeat 首次使用 Filebeat 请参阅入门指南 复制代码片段 curl L O https artifacts elastic co downloads beats filebeat filebeat 7 2 0
  • Linux alien命令

    一 简介 alien是一个用于在各种不同的Linux包格式相互转换的工具 其最常见的用法是将 rpm转换成 deb 或者反过来 二 安装 http toutiao com a6188997768449360129 三 实例 http www
  • Windows运行常用命令(win+R)

    1 calc 启动计算器 2 notepad 打开记事本 3 write 写字板 4 mspaint 画图板 5 snippingtool 截图工具 支持无规则截图 6 mplayer2 简易widnows media player 7 S
  • 图解五种磁盘调度算法, FCFS, SSTF, SCAN, C-SCAN, LOOK

    一 FCFS 调度 先来先服务 磁盘调度的最简单形式当然是先来先服务 FCFS 算法 虽然这种算法比较公平 但是它通常并不提供最快的服务 例如 考虑一个磁盘队列 其 I O 请求块的柱面的顺序如下 98 183 37 122 14 124
  • 【操作系统】王道考研 p42 段页式管理方式

    段页式管理方式 知识总览 分段 分页管理方式中最大的优缺点 关于段式管理会产生外部碎片 ps 分段管理中产生的外部碎片也可以用 紧凑 来解决 只是需要付出较大的时间代价 分段 分页 段页式管理 示意图 先分段 后分页 段页式管理的逻辑地址结
  • 磁盘调度算法笔记和练习题

    磁盘调度算法 先来先服务FCFS 最短寻道时间优先SSTF 扫描调度SCAN 练习题 先来先服务FCFS 最短寻道时间优先SSTF 扫描调度SCAN 它是一次只响应一个方向上的请求 这个方向上的请求都响应完了 再掉头处理另一个方向上的 有点
  • C#实现FTP文件夹下载功能【转载】

    网上有很多FTP单个文件下载的方法 前段时间需要用到一个FTP文件夹下载的功能 于是找了下网上的相关资料结合MSDN实现了一段FTP文件夹下载的代码 实现的思路主要是通过遍历获得文件夹下的所有文件 当然 文件夹下可能仍然存在文件夹 这样就需
  • 地址映射与共享

    跟踪地址映射过程 1 通过命令 dbg asm启动调试器 在linux 0 11运行test c文件 使其进入死循环 我们的任务就是找到i的地址并将其修改为0使test c程序退出循环 2 在命令行输入crit c使Boch暂停 一般会显示

随机推荐

  • C++每日一问:C++ 内存管理——内存泄漏及处理

    2 内存泄漏 2 1 C 中动态内存分配引发问题的解决方案 假设我们要开发一个String类 它可以方便地处理字符串数据 我们可以在类中声明一个数组 考虑到有时候字符串极长 我们可以把数组大小设为200 但一般的情况下又不需要这么多的空间
  • 唯一分解定理(分解质因子)

    唯一分解定理 每个大于一的自然数均可写为质数的积 而且这些素因子按大小排列之后 写法只有一种方式 最简单的写法 include
  • matlab绘制正弦函数、幅度调制初步、Inner matrix dimensions must agree错误

    以sin 2 f t 表达式来绘制正弦图像 必须给定数值序列才能绘制出图像 t必须给定一个数值序列 然后计算出 y sin 函数值序列 以t为横轴 y为纵轴 就绘制出了图像 先给出f 4 在这里是有几个周期 采样率Fs 100 matlab
  • flask从入门到精通,知识讲解+代码演示 day1

    flask从入门到精通 知识讲解 代码演示 day1 文章目录 flask从入门到精通 知识讲解 代码演示 day1 一 flask是什么 二 使用步骤 1 创造flask项目 2 初入flask 3 flask代码初运行 4 flask从
  • Spring Cloud实战(五)-声明式接口模块

    接着上一篇 Spring Cloud实战 四 配置中心 现在开始搭建api模块 一 声明式接口模块api 1 pom xml
  • 数学建模-相关性分析(Matlab)

    注意 代码文件仅供参考 一定不要直接用于自己的数模论文中 国赛对于论文的查重要求非常严格 代码雷同也算作抄袭 如何修改代码避免查重的方法 https www bilibili com video av59423231 清风数学建模 一 基础
  • GPU与GPGPU泛淡

    GPU与GPGPU泛淡 GPU Graphics Processing Unit 也即显卡 是一种专门在个人电脑 工作站 游戏机和一些移动设备 如平板电脑 智能手机等 上作图像运算工作的微处理器 它已经是个人PC和移动设备上不可或缺的芯片
  • C#数据类型之枚举类型

    一 枚举类型的定义 public enum 枚举名称 枚举数据类型 枚举的数据类型可以省略 默认类型为int 枚举项1 枚举项的值 枚举项的值是整数可以自己设置 枚举项2 枚举项3 例如 public enum month ushort 一
  • Clion + mysql (win/Mac + 本地/远程)

    新手教程 那些年我用clion操作mysql的一些经验教训 本文目录 使用clion自带的数据库工具 对数据库进行操作 连接本地数据库 建库 建表 编辑表格 修改字段名 查询数据 插入新的数据 sql常用语句 mysql版 win Clio
  • 口罩检测——数据准备(2)

    文章目录 前言 一 数据介绍 二 数据标注 三 数据转换 总结 前言 上一篇文章中小编讲解了口罩检测的环境要求 在这一篇文章中我们就正式进入项目的讲解 我们从数据准备开始 数据是模型快乐的源泉 没有高质量的数据 再好的模型也白搭 一 数据介
  • Flink消费Rabbit数据,写入HDFS - 使用 BucketingSink

    一 应用场景 Flink 消费 Kafka 数据进行实时处理 并将结果写入 HDFS 二 Bucketing File Sink 由于流数据本身是无界的 所以 流数据将数据写入到分桶 bucket 中 默认使用基于系统时间 yyyy MM
  • 通过 Tensorflow 的基础类,构建卷积神经网络,用于花朵图片的分类

    实验目的 通过 Tensorflow 的基础类 构建卷积神经网络 用于花朵图片的分类 实验环境 import tensorflow as tf print tf version output 2 3 0 实验步骤 一 数据获取和预处理 1
  • 第五章 静态资源 CDN 引入

    第五章 静态资源 CDN 引入 静态请求 CDN 用户将静态资源数据请求到ECS服务器 ECS服务器解析到阿里云的CDN中 CDN可以理解为一个无限大的内容磁盘缓存 本身没有文件存储 当用户访问 getItem 的一个静态资源文件的时候 会
  • 【线代】特征值、惯性指数、标准型、规范型的关系?等价、相似与合同?

    目录 1 两矩阵特征值相同 1 1 实对称矩阵A B的特征值相同 2 二次型的标准型 2 1 标准型唯一吗 2 2 标准型与秩 2 3 标准型与特征值 2 4 正交变换与特征值 2 5 两个二次型的标准型相同 3 规范型 3 1 规范型唯一
  • Qt Install Framework使用方法

    Qt程序的打包发布现在已经可以通过其发布的Installer Framework框架来完成 通过修改一些配置文件即可实现 首先 现在该框架官网提供1 3 0 1 4 0和1 5 0版本的下载 本文书写时 根据有新的谁他吗还用旧的准则 下载1
  • Spring----初识

    Spring 是一种轻量级开发框架 旨在提高开发人员的开发效率以及系统的可维护性 Spring 官网 Spring Home Spring 框架指的都是 Spring Framework 它是很多模块的集合 使用这些模块可以很方便地协助我们
  • Qt 设计师-Qt Designer基础控件介绍

    Layouts Vertical Layout 垂直布局 Horizontal Layout 水平布局 Gird Layout 栅格布局 FormLayout 表单布局 关于布局有很多博客写的很好就不再赘述了 本人常用Qt Designer
  • Laplace Smoothing

    拉普拉斯平滑 Laplace Smoothing 拉普拉斯平滑 Laplace Smoothing 又称为加 1 平滑 是比较常用的平滑方法 平滑方法的存在时为了解决零概率问题 一 为什么要做平滑 零概率问题 在计算事件的概率时 如果某个事
  • Python判断当前日期是否为工作日(交易日),智能去除周末节假日(功能已实现)

    一 首先安装chinesecalendar模块 pip install chinesecalendar 或 使用镜像安装到指定位置 pip install chinesecalendar target D bin x64 Lib site
  • h264bitstream (read and write H.264 video bitstreams)

    1 编译安装参考源码包自带的说明文档 h264bitstream 0 2 0 README md sudo apt get install build essential libtoolautoreconf i configure pref