Memory Multiplexing Queue for Video Frame Reuse
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing memory management techniques for video playback in web browsers result in large memory usage and low memory utilization due to frequent allocation and reclamation of memory addresses, especially for high-frame-rate video streams, leading to inefficient memory allocation and utilization.
Innovation Solution
Implementing a memory multiplexing queue that reuses memory addresses by adding rendered video frame data addresses to the queue, allowing for efficient allocation and re-allocation of memory addresses, reducing the need to open up new memory spaces for each piece of video frame data during playback.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If memory is allocated for each video frame data during playback, then video playback can be performed, but memory usage becomes large and memory utilization becomes low
Solution Approach 1:
The patent implements a memory multiplexing queue that recovers and reuses memory addresses of rendered video frames. When video frame data is rendered, its memory address is added to the multiplexing queue and can be reused for subsequent frames, effectively discarding the need for continuous new memory allocation and reducing overall memory usage while maintaining playback capability
Solution Approach 2:
The patent creates a multiplexing queue that stores copies of memory addresses from rendered frames. This queue acts as a buffer that allows the system to reference and reuse memory addresses without needing to maintain separate memory spaces for each frame, reducing the total memory quantity required
2Reliability
If memory is frequently allocated and reclaimed for video frames, then video playback can be performed, but memory utilization becomes low
Solution Approach 1:
The patent establishes a continuous memory recycling mechanism where rendered frame memory addresses are continuously added to the multiplexing queue and continuously available for reuse. This creates an unbroken cycle of memory allocation and reuse, eliminating the gaps and waste associated with frequent allocation and reclamation, thereby improving memory utilization while maintaining continuous playback
Solution Approach 2:
Instead of reclaiming memory through frequent allocation cycles, the system recovers memory addresses by adding them to a persistent multiplexing queue after rendering. This recovery mechanism ensures memory remains in use and is efficiently reused, improving productivity by reducing the frequency of allocation operations
3Reliability
If new memory space is opened for each video frame data, then video playback can be performed, but the number of memory addresses increases
Solution Approach 1:
The patent makes memory addresses universal by allowing the same memory address to serve multiple video frames sequentially. The multiplexing queue enables a single memory address to be reused across different frames and time periods, reducing the total number of unique memory addresses needed while maintaining full playback functionality
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
The present disclosure provides a memory management method and apparatus, an electronic device and a storage medium, and belongs to the technical field of networks. The method includes: allocating a first memory address to video frame data based on a memory multiplexing queue, wherein the memory multiplexing queue records a memory address of video frame data that has been rendered; storing the video frame data in a memory space indicated by the first memory address; rendering the video frame data by a main thread of a multimedia browsing application; and passing the first memory address to a child thread of the multimedia browsing application by the main thread, and adding the first memory address to the memory multiplexing queue by the child thread; or adding the first memory address to the memory multiplexing queue by the main thread.