博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
x265-1.7版本-common/frame.h注释
阅读量:2189 次
发布时间:2019-05-02

本文共 4166 字,大约阅读时间需要 13 分钟。

注:问号以及未注释部分 会在x265-1.8版本内更新 

/****************************************************************************** Copyright (C) 2013 x265 project** Author: Steve Borho 
** This program is free software; you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation; either version 2 of the License, or* (at your option) any later version.** This program 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 General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.** This program is also available under a commercial proprietary license.* For more information, contact us at license @ x265.com.*****************************************************************************/#ifndef X265_FRAME_H#define X265_FRAME_H#include "common.h"#include "lowres.h"#include "threading.h"namespace x265 {// private namespaceclass FrameData;class PicYuv;struct SPS;#define IS_REFERENCED(frame) (frame->m_lowres.sliceType != X265_TYPE_B) class Frame{public: //frame进出队列史:Lookahead.m_inputQueue -> Lookahead.m_outputQueue -> DPB.m_picList -> /* These two items will be NULL until the Frame begins to be encoded, at which point * it will be assigned a FrameData instance, which comes with a reconstructed image PicYuv */ FrameData* m_encData; PicYuv* m_reconPic; //存储重构帧数据 在allocEncodeData中获取内存 /* Data associated with x265_picture */ PicYuv* m_fencPic; //存储编码数据 在Encoder中获取数据(copyFromPicture),有具体空间 (周边扩边无意义值) int m_poc; //当前POC int64_t m_pts; //显示时间戳,在编码器内环里一般就是poc的值,用于标记显示的顺序user provided presentation time stamp int64_t m_reorderedPts; //编码序号 int64_t m_dts; //???解码时间戳(值一般等于:编码顺序-2) int32_t m_forceqp; // Force to use the qp specified in qp file void* m_userData; // user provided pointer passed in with this picture Lowres m_lowres; // 对应下采样信息1/2 bool m_lowresInit; // 是否初始化 lowres init complete (pre-analysis) bool m_bChromaExtended; // 色度块是否已经扩边,初始化为false 加权分析函数 weightAnalyse 会对其进行扩边 orig chroma planes motion extended for weight analysis /* Frame Parallelism - notification between FrameEncoders of available motion reference rows */ ThreadSafeInteger m_reconRowCount; // count of CTU rows completely reconstructed and extended for motion reference volatile uint32_t m_countRefEncoders; // 计数当前参考帧的被参考次数(DPB::prepareEncode 函数中将对应参考帧的被参考次数加一 在compressFrame()之后对应参考帧的被参考次数减一) // 输出帧的时候减一 创建帧的时候加一(也就是说是含有自身一次以防止被释放????? 从2开始计数) 初始化值为 0count of FrameEncoder threads monitoring m_reconRowCount Frame* m_next; // 当前所在队列下一帧PicList doubly linked list pointers Frame* m_prev; x265_param* m_param; // 当前所在队列中前一帧Points to the latest param set for the frame. x265_analysis_data m_analysisData; /** 函数功能 :初始化Frmae /* 调用范围 :只在Encoder::encode函数中被调用 * \返回值 :null */ Frame(); /** 函数功能 :申请原始帧m_fencPic与1/2下采样帧空间并将其初始化 /* 调用范围 :只在Encoder::encode函数中被调用 * \返回值 :申请空间成功为ture,否则为false */ bool create(x265_param *param); /** 函数功能 :申请重构帧内存并初始化为0,申请一帧CTU的存储空间,初始化CTU、初始化统计信息 /* 调用范围 :只在Encoder::encode函数中被调用 * \返回值 :申请空间成功为ture,否则为false */ bool allocEncodeData(x265_param *param, const SPS& sps); void reinit(const SPS& sps); /** 函数功能 :释放内存 /* 调用范围 :只在Encoder::encode、Lookahead::destroy()和~DPB()函数中被调用 * \返回值 :null */ void destroy();};}#endif // ifndef X265_FRAME_H

转载地址:http://lauub.baihongyu.com/

你可能感兴趣的文章
cs230 深度学习 Lecture 2 编程作业: Logistic Regression with a Neural Network mindset
查看>>
梯度消失问题与如何选择激活函数
查看>>
为什么需要 Mini-batch 梯度下降,及 TensorFlow 应用举例
查看>>
为什么在优化算法中使用指数加权平均
查看>>
什么是 Q-learning
查看>>
用一个小游戏入门深度强化学习
查看>>
5 分钟入门 Google 最强NLP模型:BERT
查看>>
初探Java设计模式4:一文带你掌握JDK中的设计模式
查看>>
初探Java设计模式5:一文了解Spring涉及到的9种设计模式
查看>>
Java集合详解1:一文读懂ArrayList,Vector与Stack使用方法和实现原理
查看>>
Java集合详解2:一文读懂Queue和LinkedList
查看>>
Java集合详解3:一文读懂Iterator,fail-fast机制与比较器
查看>>
Java集合详解4:一文读懂HashMap和HashTable的区别以及常见面试题
查看>>
Java集合详解5:深入理解LinkedHashMap和LRU缓存
查看>>
Java集合详解6:这次,从头到尾带你解读Java中的红黑树
查看>>
Java集合详解7:一文搞清楚HashSet,TreeSet与LinkedHashSet的异同
查看>>
Java集合详解8:Java集合类细节精讲,细节决定成败
查看>>
Java并发指南1:并发基础与Java多线程
查看>>
Java并发指南2:深入理解Java内存模型JMM
查看>>
Java并发指南3:并发三大问题与volatile关键字,CAS操作
查看>>