当前位置:网站首页>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
边栏推荐
- 简化路径(力扣71)
- SQL server requires to query the information of all employees with surname 'Wang'
- Sogou cell thesaurus analysis (only extract words and word frequency)
- After opening the original normal project, the dependency package displays red and does not exist.
- Class loading process of JVM
- How about CICC wealth? Is it safe to open an account up there
- SSDB Foundation
- Oracle配置st_geometry
- c1000k TCP 连接上限测试1
- 高层次人才一站式服务平台开发 人才综合服务平台系统
猜你喜欢
12 examples to consolidate promise Foundation
Keysight has chosen what equipment to buy for you
SQL常用的命令
Simplified path (force buckle 71)
[record] typeerror: this getOptions is not a function
mysql_linux版本的下载及安装详解
MySQL restores or rolls back data through binlog
Esp01s with Arduino development environment
[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)题解
随机推荐
ArcMap publishing slicing service
Openharmony open source developer growth plan, looking for new open source forces that change the world!
腾讯云GPU最佳实践-使用jupyter pycharm远程开发训练
js上传文件时控制文件类型和大小
SQL of contention for system time plus time in ocrale database
【C语言进阶11——字符和字符串函数及其模拟实现(2))】
Modify the font size of hint in editext
C: generic reflection
Why is PostgreSQL about to surpass SQL Server?
开关电源设计分享及电源设计技巧图解
Oracle配置st_geometry
The type initializer for ‘Gdip‘ threw an exception
Matlab 2019 installation of deep learning toolbox model for googlenet network
openlayers 5.0 加载arcgis server 切片服务
Get a list of recent apps
该买什么设备,Keysight 给你挑好了
The flyer realizes page Jump through routing routes
在渤海期货办理开户安全吗。
MySQL学习第五弹——事务及其操作特性详解
Coolweather is revised and connected to the wind weather interface to realize the broken line diagram of temperature