当前位置:网站首页>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
边栏推荐
- JS calculation time difference
- 开关电源设计分享及电源设计技巧图解
- Codeforces Round #783 (Div. 2) D题解
- c#:泛型反射
- Openlayers draw rectangle
- SQL server requires to query the information of all employees with surname 'Wang'
- Why is PostgreSQL about to surpass SQL Server?
- SSDB foundation 3
- 2022.04.23 (the best time for lc_714_to buy and sell stocks, including handling charges)
- SSDB基础2
猜你喜欢

Simplified path (force buckle 71)

I just want to leave a note for myself

FTP, SSH Remote Access and control

Why is PostgreSQL about to surpass SQL Server?

Sword finger offer II 116 Number of provinces - spatial complexity O (n), time complexity O (n)
![[报告] Microsoft :Application of deep learning methods in speech enhancement](/img/29/2d2addd826359fdb0920e06ebedd29.png)
[报告] Microsoft :Application of deep learning methods in speech enhancement

On the forced conversion of C language pointer

mysql通过binlog恢复或回滚数据

【C语言进阶11——字符和字符串函数及其模拟实现(2))】

Wechat applet part of the mobile phone Preview PDF did not respond
随机推荐
中金财富怎么样?在上边开户安全吗
Use of kotlin collaboration in the project
2022.04.23 (lc_763_divided into letter interval)
SQL server requires to query the information of all employees with surname 'Wang'
JS controls the file type and size when uploading files
js 计算时间差
Using bafayun to control the computer
Is it safe to open an account in Bohai futures.
Raspberry pie uses root operation, and the graphical interface uses its own file manager
Coolweather is revised and connected to the wind weather interface to realize the broken line diagram of temperature
c#:泛型反射
Raspberry pie 18b20 temperature
arcMap 发布切片服务
高层次人才一站式服务平台开发 人才综合服务平台系统
Regular expressions for judging positive integers
2022.04.23(LC_714_买卖股票的最佳时机含手续费)
JVM的类加载过程
Parsing headless jsonarray arrays
剑指 Offer II 116. 省份数量-空间复杂度O(n),时间复杂度O(n)
Solve the problem of invalid listview Click