当前位置:网站首页>Speculation on the way to realize the smooth drag preview of video editing software
Speculation on the way to realize the smooth drag preview of video editing software
2022-04-23 19:13:00 【cjzcjl】
Discussion by situation :
One 、 Quick rough drag :
1、 With 10ms Is a unit of time , If you exceed a certain threshold while dragging the timeline ( For example, over 1 individual GOP), Only GOP The key frame of (I frame ), And first try to find data from the mapping table , If it cannot be found, decode it again . Because even if you render B、P frame , The human eye can't see , It's better to show I The frame is practical . And put what has been rendered I Frame put <pts, frame > In the mapping table of .
1.1、 if GOP The length exceeds a certain time threshold , Then you still need to render the image at the corresponding position in the threshold time point , In case of fast dragging for a long distance , When there should be image change, there is no image change .
1.2、 To prevent 1.1 and 1 The process shows that the thread needs to wait for the decoding process, which leads to the Caton problem , Near the current drag position GOP Will be made by (CPU The core number - 1) Number of sub threads to decode , And on the <pts, frame > In the mapping table .
Two 、 Slow precise drag :
1、 At this point, the user is likely to be in a GOP Drag frame by frame , if B、P The frame should also carry GOP Multiple frames are decoded together , It will lead to many times of useless work . In order to avoid time-consuming and useless work , It should point to a pts when , Just put the current operation GOP And nearby GOP The actual composite picture rendering of each frame in the , And put it in the mapping table , At present GOP When dragging in , It can be decoded only once , You can know from the mapping table that every PTS What should the corresponding picture look like .
3、 ... and 、 Technical scheme for saving memory :
The mapping table may grow as the user drags the timeline in more directions , It may eventually lead to insufficient physical memory . here , have access to MMAP Methods such as , Map a part of external memory to memory address , Use LRU principle , The tree structure of the mapping table is kept in memory , But the contents are used according to the number of times , Below threshold MMAP In the map , And replace the memory pointer in the mapping table with MMAP The pointer , Those above the threshold are put into memory , Delete MMAP Value , Realize the dynamic balance between the use of memory and external memory , In the way of sacrificing space for time , In order to ensure the drag efficiency at the same time , It is unlikely that the program cannot continue due to insufficient memory .
版权声明
本文为[cjzcjl]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210600588050.html
边栏推荐
- Raspberry pie uses root operation, and the graphical interface uses its own file manager
- 该买什么设备,Keysight 给你挑好了
- c#:泛型反射
- SSDB foundation 3
- White screen processing method of fulter startup page
- Partage de la conception de l'alimentation électrique de commutation et illustration des compétences en conception de l'alimentation électrique
- 8266 obtain 18b20 temperature
- FTP、ssh远程访问及控制
- 为何PostgreSQL即将超越SQL Server?
- mysql_linux版本的下載及安裝詳解
猜你喜欢
Partage de la conception de l'alimentation électrique de commutation et illustration des compétences en conception de l'alimentation électrique
[advanced level 11 of C language -- character and string functions and their simulation implementation (2)]
One of the reasons why the WebView web page cannot be opened (and some WebView problem records encountered by myself)
mysql通过binlog恢复或回滚数据
[report] Microsoft: application of deep learning methods in speech enhancement
2022.04.23 (lc_763_divided into letter interval)
微搭低代码零基础入门课(第三课)
2022.04.23(LC_763_划分字母区间)
White screen processing method of fulter startup page
arcMap 发布切片服务
随机推荐
One of the reasons why the WebView web page cannot be opened (and some WebView problem records encountered by myself)
Switching power supply design sharing and power supply design skills diagram
Customize the non slidable viewpage and how to use it
JS calculation time difference
Openlayers 5.0 reload the map when the map container size changes
[advanced level 11 of C language -- character and string functions and their simulation implementation (2)]
Eight bit binary multiplier VHDL
binlog2sql 工具安装使用及问题汇总
Transaction processing of SQL Server database
高层次人才一站式服务平台开发 人才综合服务平台系统
ArcMap publishing slicing service
ArcMap连接 arcgis server
[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born
2021-2022-2 ACM集训队每周程序设计竞赛(8)题解
mysql_linux版本的下載及安裝詳解
SSDB foundation 3
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
Class loading process of JVM
SSDB基础2
SQL Server database in clause and exists clause conversion