zoukankan      html  css  js  c++  java
  • FFMpeg学习笔记(1)--基础知识

    今天主要学习ffmpeg decoding部分的函数定义,这里涉及到AVCodecFilter,AVCodecFilterContext,色度图(chroma)等概念。

    在decoding部分,会有色度坐标和色度枚举值之间的转换,这里就涉及到色度坐标的概念。简单来说,颜色主要分为亮度和色度两部分;颜色是由三原色组成的,x表示红基色,y表示绿基色;详细的内容可以查看:色度图

    Encoding/Decoding整体理解:

    AVCodec代表实际的编解码器,AVCodecContext则代表编解码器相关的上下文,如果要进行实际的编解码,需要将AVCodecContext和AVCodec进行关联,才能开始编解码。

    解码顺序:

    1. 获得要解码的数据,AVPacket

    2. 找到相应的AVCodec: codec = avcodec_find_decoder(AVCodeID)

    3. 创建AVCodecContext, avcodec_alloc_context3(codec);

    4. 打开编解码器, avcodec_open2(context, codec, NULL);

    5. 创建目标AVFrame, decoded_frame = av_frame_alloc()

    6. 开始decode, avcodec_decode_audio4(context, decoded_frame, &got_frame, avpacket);

    Keep Practising as Kobe does!
  • 相关阅读:
    最小的K个数
    数组中出现次数超过一半的数字
    符串的排列
    二叉搜索树与双向链表
    复杂链表的复制
    String,StringBuilder,StringBuffer
    二叉树中和为某一值的路径
    二叉搜索树的后序遍历序列
    Java单例模式
    222. Count Complete Tree Nodes
  • 原文地址:https://www.cnblogs.com/lstj/p/3995489.html
Copyright © 2011-2022 走看看