A method and system for receiving and displaying H.265 video based on a domestically produced GPU

By adopting an H.265 video reception and display method based on domestically produced GPUs, and using the DDS protocol, domestically produced GPU driver interface, and zero-copy technology, the problem of video stuttering and high latency caused by wireless link instability has been solved. This has achieved full-link localization and low-latency decoding, and improved the stability and independent controllability of the video stream.

CN123123580APending Publication Date: 2026-11-17CHINESE AERONAUTICAL RADIO ELECTRONICS RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610947408.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The instability of wireless links leads to video decoding stuttering, high latency, and poor reliability, as well as insufficient self-control due to reliance on foreign GPUs.

Method used

The method adopts H265 video reception and display based on domestic GPUs. It receives video data streams through the DDS protocol and performs packet loss prevention and frame integrity verification. Hardware decoding is performed using domestic GPU driver interfaces. YUV frame data is transmitted using zero-copy technology and multi-threaded rendering and display are performed using the FFmpeg library.

Benefits of technology

It achieves stable video decoding and low latency in harsh wireless environments, builds a fully domestically developed and controllable solution, reduces end-to-end latency, and improves the stability and availability of video streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123580A_ABST
    Figure CN123123580A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of video processing and wireless communication technology, specifically relating to an H.265 video receiving and display system and method based on a domestically produced GPU. The system includes: receiving H.265 video data streams from a wireless link via the DDS protocol, performing packet loss prevention and frame integrity verification, and outputting complete H.265 frames; calling the domestic GPU driver interface to perform hardware decoding of the complete H.265 frames, generating YUV frame data and temporarily storing it in video memory; during the decoding process, real-time detection of frame loss; determining frame loss when the increase in POC between the current frame and the previous frame in the same sequence is less than 1, and initiating grayscale processing to output solid color frame data; transferring the decoded YUV frame data from GPU video memory to a dual buffer in CPU memory using zero-copy technology; and calling the FFmpeg library to perform multi-threaded rendering and display of the YUV frame data in the CPU memory dual buffer. This invention, through end-to-end optimization, solves the problems of stuttering, high latency, and compatibility with domestically produced technologies in wireless video transmission, offering high real-time performance and independent controllability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of video processing and wireless communication technology, specifically relating to a method and system for receiving and displaying H.265 video based on a domestically produced GPU. Background Technology

[0002] The H.265 / HEVC encoding standard has become the mainstream format for high-definition wireless video transmission due to its high compression efficiency. However, the inherent instability of wireless channels (such as multipath fading, obstruction, and interference) leads to packet loss, out-of-order delivery, and burst delays, posing a severe challenge to the video processing chain at the receiving end.

[0003] Traditional solutions in wireless environments have the following drawbacks: 1. Software decoding resource conflict: On wireless terminal devices, the CPU needs to handle the network protocol stack, data packet assembly, and heavy H265 software decoding tasks simultaneously. This can easily lead to system overload and exacerbate video stuttering under high bitrate video conditions.

[0004] 2. Poor compatibility with general hardware decoding: The hardware decoding solutions of mainstream foreign GPUs cannot be adapted to the domestic GPU architecture, which prevents domestic terminal devices from realizing their hardware potential in scenarios such as wireless image transmission.

[0005] 3. Overly tight coupling between data packet assembly and decoding: In existing solutions, the network receiving thread and the decoding thread often do not coordinate well. Wireless packet loss can easily cause the decoder to wait or crash, and there is a lack of a mechanism to quickly recover from network jitter.

[0006] 4. Transmission efficiency bottleneck: Even if decoding is completed, the copying delay of the decoded frame from the GPU memory to the CPU memory becomes a significant bottleneck in applications that require low latency, such as wireless remote control and first-person perspective.

[0007] Domestic substitution needs: In the field of emergency response, public security and other outdoor wireless applications, there is an urgent need for an end-to-end independent and controllable solution that can handle everything from wireless network reception and stable packet assembly to efficient domestic hardware decoding and display. Summary of the Invention

[0008] This invention provides a method and system for receiving and displaying H.265 video based on a domestically produced GPU, in order to solve the technical problems of video decoding stuttering, high latency, poor reliability, and insufficient independent controllability caused by reliance on foreign GPUs in the existing technology under unstable wireless link environments.

[0009] A method for receiving and displaying H.265 video based on a domestically produced GPU, applied to a wireless link receiver, includes the following steps: The system receives H265 video data streams from the wireless link via the DDS protocol, performs packet loss prevention and frame integrity verification, and outputs complete H265 frames. The complete H265 frame is hardware decoded by calling the domestic GPU driver interface, generating YUV frame data and storing it in the video memory. During the decoding process, it is determined in real time whether a frame is lost. The judgment logic is that if the increase in POC between the current frame and the previous frame in the same sequence is less than 1, it is determined to be a frame loss. After a frame loss, graying processing is started, and pure color YUV frame data is output. The YUV frame data is transferred from the GPU memory to the CPU memory in a double buffer using zero-copy technology. The FFmpeg library is used to perform multi-threaded rendering and display of YUV frame data in the CPU memory double buffer.

[0010] Furthermore, the step of receiving H.265 video data streams from the wireless link via the DDS protocol and performing packet loss-resistant reassembly and frame integrity verification specifically includes: Configure the QoS policy for DDS; QoS policy configuration: (1) Reliability strategy: Fixed as RELIABLE to ensure reliable transmission of key frames; (2) Historical strategy: fixed as KEEP_LAST(100), statically cache a maximum of 100 data packets; (3) Resource constraints: Configure max_samples=100, max_instances=1, max_samples_per_instance=100 to strictly match the system's preset buffer capacity to avoid internal overflow of DDS; (4) Transmission delay budget: fixed at LatencyBudget=100ms to meet the basic latency requirements of real-time video.

[0011] The receiving end listens to a specified DDS topic and subscribes to the video stream; The system uses an adaptive circular buffer to sort, deduplicatize, reassemble NAL units, and check the integrity of received data packets. By checking timestamps and sequence numbers, it identifies and requests the retransmission of key frames or discards irreparable non-key frames. The system dynamically monitors the quality of the wireless link. When the link quality is poor, it automatically increases the buffer and triggers the reliable transmission mode of DDS. When the link quality is good, it decreases the buffer to reduce end-to-end latency.

[0012] Furthermore, the transfer of the YUV frame data from GPU memory to the dual buffer of CPU memory using zero-copy technology specifically includes: The zero-copy technology is either DMA (Direct Memory Access) or a shared memory mechanism between the GPU and CPU. Two CPU memory buffers are pre-registered as a dual buffer, and a state machine mechanism is used to manage the state of the dual buffers, which includes "ready", "transferring", and "processing". After the GPU finishes decoding, it writes the YUV data to the currently marked "ready" free buffer using zero-copy technology, and updates the status of the buffer to "processing" after the transmission is complete, while notifying the CPU. The CPU's FFmpeg rendering thread reads data from the buffer in the "processing" state, processes it, and resets its state to "ready" after processing is complete.

[0013] Furthermore, to address the potential dynamic resolution changes in wireless video, the data transmission module supports dynamic reconfiguration of DMA channels and memory mappings. Additionally, it strictly aligns the memory addresses of the dual buffers and utilizes large page memory to reduce TLB (Translation Lookaside Buffer) misses. The TLB is a cached mapping between virtual and physical addresses in the CPU. Large page memory significantly reduces the number of page table lookups for virtual-to-physical address translation by increasing the capacity of each page, thereby lowering the TLB miss rate and improving DMA data transmission efficiency and system real-time performance.

[0014] Data flow: GPU decodes and generates YUV frames -- zero-copy transfer to CPU double buffer -- FFmpeg rendering. When the resolution changes, if the DMA channel / memory mapping is still configured according to the original resolution, it will cause the copy from the video memory to the CPU to go out of bounds, the double buffer size will be mismatched, resulting in data truncation or memory leaks, alignment failure, and affecting DMA efficiency.

[0015] Resolution change handling logic: 1. The GPU detects a resolution change during decoding; 2. It sends a resolution change event to the zero-copy transfer module; 3. The module dynamically reconfigures the source address, destination address, and transfer length of the DMA channel, remaps the memory space of the CPU double buffer, and simultaneously realigns addresses and allocates large page memory.

[0016] Furthermore, the step of calling the FFmpeg library to perform multi-threaded rendering and display of YUV frame data in the CPU memory double buffer specifically includes: Initialize FFmpeg's custom AVIOContext and point its data source to a CPU-memory double buffer to achieve copy-free reading of YUV frame data; The sws_scale function is called in a multi-threaded manner to convert YUV data into the RGB format required by the display device, and then perform deinterlacing and color enhancement post-processing. RGB frames are rendered onto the display screen through FFmpeg's SDL2 or OpenGL output backend, and a frame rate synchronization mechanism is used to ensure smooth video playback.

[0017] Furthermore, the step of calling the domestic GPU driver interface to perform hardware decoding of the complete H265 frame specifically includes: Call jmwdec_init() to initialize the decoder instance and configure it for H265 format and expected resolution; The complete H265 frame data is submitted to the GPU memory using jmwdec_submit_frame(); Triggering jmwdec_decode_frame() starts the GPU hardware decoding engine, completing the decoding of the H265 bitstream into a YUV image.

[0018] A domestically developed H.265 video receiving and display system based on a domestically produced GPU, comprising: The wireless receiving and packet reassembly module receives H265 video data packets from the wireless link via the DDS protocol. It has a built-in anti-packet loss adaptive circular buffer, which is responsible for handling network jitter, out-of-order packets and packet loss, and reassembling complete H265 frames. The hardware decoding module is used to call the self-developed driver interface of the domestic GPU, submit the complete H265 frame output by the packet assembly module to the GPU for hardware decoding, generate YUV frame data and temporarily store it in the video memory. During the decoding process, the POC value is used to determine whether a frame is lost. When the POC increment value is less than 1, it is determined to be a frame loss, and graying processing is immediately started to output solid color frame data. The zero-copy data transfer module is used to map or transfer the decoded YUV frame data directly from the GPU memory to the dual buffers of the CPU memory using zero-copy technologies such as DMA and shared memory, as well as dual-buffering technology. The FFmpeg rendering and display module is used to call the FFmpeg library to read YUV frame data from the CPU memory double buffer, perform format conversion and scaling post-processing in a multi-threaded manner, and render and display it on the screen.

[0019] The domestically produced GPU is the Jingjia Micro JM930 series GPU, and the self-developed driver interface is libjmwdec.so.

[0020] Compared with the prior art, the beneficial effects that at least one technical solution adopted in the embodiments of this specification can achieve include at least: 1. End-to-End Wireless Optimization and Reliability Enhancement: Compared to existing solutions where the network receiving and decoding modules are too tightly coupled and the fault tolerance mechanism is weak, this invention combines the DDS protocol with an adaptive circular buffer to achieve intelligent packet reassembly and fault tolerance processing for wireless channel packet loss and jitter. In particular, this invention integrates a frame drop and graying mechanism based on POC values ​​within the GPU driver (rather than the application layer). This design is fundamentally different from the existing technology where errors are reported to the application layer after decoding failure and then processed by the application layer. This invention's mechanism can instantly determine frame drops and output alternative images at the driver layer, effectively preventing video screen tearing, stuttering, or decoder crashes caused by network instability. It achieves millisecond-level rapid fault tolerance recovery from network to display, significantly improving the stability and availability of the video stream.

[0021] 2. Achieving end-to-end localization and self-control: Unlike hardware decoding solutions that rely on foreign general-purpose GPUs (such as NVIDIA and AMD), this invention constructs a full-link localization solution from wireless reception to hardware decoding by deeply adapting the self-developed driver interface of domestic GPUs (such as Jingjia Micro JM930 series). This overcomes the technical bottleneck of domestic GPUs in the field of wireless real-time video processing and meets the urgent needs of key fields such as national defense and emergency response for self-control.

[0022] 3. Extremely low latency and high throughput: An optimized pipeline has been built, consisting of "DDS packet assembly - GPU hardware decoding - zero-copy transmission (double buffering) - FFmpeg multi-threaded rendering". The introduction of double-buffered zero-copy technology eliminates the latency bottleneck caused by traditional memory copying, and resolves multi-threaded read / write conflicts through state machine management, enabling GPU decoding and CPU rendering to run in parallel efficiently, significantly reducing end-to-end latency.

[0023] 4. Enhanced System Resource Utilization and Stability: Utilizing GPU hardware decoding completely frees up CPU resources, avoiding system overload caused by software decoding. FFmpeg's multi-threaded rendering optimization effectively addresses boundary issues, reduces exception handling, and improves rendering efficiency and overall system stability.

[0024] 5. Dynamic Adaptive Capability: The system can dynamically adjust the buffer size and transmission strategy according to the wireless link quality and video content, intelligently balancing latency, smoothness and power consumption in complex and ever-changing wireless environments. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a flowchart of the H265 video wireless reception, hardware decoding and display method based on a domestically produced GPU provided in an embodiment of the present invention; Figure 2 This is a system architecture diagram provided in an embodiment of the present invention, illustrating the end-to-end data processing process from the wireless channel to the final display; Figure 3 This is a flowchart of the interaction between packet loss prevention and GPU hardware decoding provided in the embodiments of the present invention, which particularly illustrates the packet loss processing and frame loss graying mechanism; Figure 4 This is a schematic diagram of the architecture and state machine management of GPU-CPU zero-copy double-buffered transmission provided in an embodiment of the present invention; Figure 5 This is a flowchart of the FFmpeg rendering and display call provided in an embodiment of the present invention; Figure 6 This is a structural block diagram of the computer device provided in the embodiments of the present invention; Figure 7 This is a structural block diagram of an H.265 video wireless receiving, hardware decoding and display device based on a domestically produced GPU, provided in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] In this embodiment of the invention, a method for H.265 video wireless reception, hardware decoding, and display based on a domestically produced GPU is provided, such as... Figure 1 As shown, the method includes: Step S101: Wireless video stream reception and packet loss prevention packet assembly.

[0029] The system receives H265 video data streams from the wireless link via the DDS protocol, performs packet loss prevention and frame integrity checks, and outputs complete H265 frames.

[0030] Step S102: GPU hardware decoding and frame drop graying processing.

[0031] The complete H265 frame is hardware-decoded using a domestic GPU driver interface, generating YUV frame data and storing it in video memory. During the decoding process, it is determined in real time whether a frame is lost. The determination logic is that if the increase in POC between the current frame and the previous frame in the same sequence is less than 1, it is determined to be a lost frame. After a frame is lost, graying processing is immediately started, and solid color frame data is output.

[0032] Step S103: GPU-CPU zero-copy data transfer.

[0033] By using zero-copy technology combined with a double-buffer mechanism, the decoded YUV frame data is transferred from GPU memory to CPU memory.

[0034] Step S104: FFmpeg multi-threaded rendering and display.

[0035] The FFmpeg library is used to perform multi-threaded rendering and display of YUV frame data in the CPU memory double buffer.

[0036] Depend on Figure 1 As shown in the flowchart, in this embodiment of the invention, stable, low-latency decoding and display of high-definition video streams in a wireless environment are achieved through end-to-end optimized design. The core innovation of this invention lies in the deep coupling and synergistic optimization of four key technical aspects, forming a highly efficient and robust processing pipeline. Specifically: First, addressing the characteristics of wireless channels, a DDS-based anti-packet loss reassembly mechanism and GPU driver-level frame drop and graying processing are adopted. This achieves seamless integration from network anomalies to display fault tolerance at the driver level, replacing the complex error handling logic at the application layer in traditional solutions and significantly improving video stability in harsh wireless environments. Second, through deep adaptation to the domestically developed GPU driver interface, the entire link from wireless reception to hardware decoding is domestically produced and controllable. Third, an end-to-end low-latency pipeline of "DDS packet reassembly - GPU hardware decoding - DMA zero-copy double buffering - FFmpeg rendering" is constructed, introducing double buffering technology and state machine management to solve the problem of empty frames in multi-threaded environments and significantly improve parallel processing capabilities. Fourth, FFmpeg multi-threaded rendering optimization is adopted to effectively address boundary issues and improve rendering efficiency and stability. Finally, the system has dynamic adaptive resource management capabilities, which can intelligently adjust caching strategies and transmission parameters according to link quality, optimally balancing latency, smoothness, and power consumption while ensuring video quality. This entire solution is particularly suitable for application scenarios with extremely high requirements for real-time performance, reliability, and independent controllability, such as UAV image transmission and emergency communication.

[0037] In practical implementation, taking a domestically produced embedded platform (Phytium FT-2000 / 4 processor platform) equipped with Jingjia Micro's JM930 GPU as an example, running the Kylin operating system, the system realizes the entire process from wireless video stream reception, GPU hardware decoding, zero-copy transmission to FFmpeg rendering and display.

[0038] 1. Wireless Reception and Packet Assembly Configuration DDS Subscription and QoS Configuration: Create a DDS DataReader and configure its QoS policy. Create the data reader by calling functions such as DDS_DomainParticipant_create_datareader. Key configurations include: setting the ReliabilityQosPolicy to DDS_RELIABLE_RELIABILITY_QOS to ensure critical video data is not lost; setting the DeadlineQosPolicy period to DDS_DURATION_MS(100) to meet real-time requirements; and setting an appropriate history depth to handle network jitter.

[0039] Adaptive Ring Buffer for Packet Loss Resistance: An adaptive ring buffer is initialized by calling `ringbuf_init(5 * MAX_FRAME_SIZE)`, with an initial size capable of holding 5 frames of H.265 data. This buffer is responsible for reassembling NAL units and verifying frame integrity for received, potentially out-of-order or lost data packets. Packet loss is identified by checking the timestamp and sequence number of the data packets. When a critical frame (I-frame) loss is detected, the DDS retransmission request mechanism is triggered; for non-critical frame losses, packets are discarded and recorded to ensure real-time performance. The system dynamically monitors the wireless link quality (e.g., signal-to-noise ratio, bit error rate). When link quality is poor, the buffer capacity is automatically increased to tolerate greater jitter; when link quality is good, the buffer size is reduced to decrease end-to-end latency.

[0040] 2. GPU decoder initialization and decoding Decoder initialization: The self-developed driver interface provided by the domestic GPU (such as the libjmwdec.so dynamic library) is called to initialize the decoder instance through jmwdec_init(&dec_handle, DEVICE_ID, CODEC_H265), and the decoder is configured to support H265 format and initial resolution (supporting subsequent dynamic resolution switching) through jmwdec_create_decoder(dec_handle, 1920, 1080).

[0041] Frame submission and decoding: The complete H265 frame data output by the packet assembly module is submitted to the GPU's video memory via jmwdec_submit_frame(dec_handle, complete_h265_frame, frame_size), and then jmwdec_decode_frame(dec_handle) is triggered to start the GPU's internal hardware decoding engine.

[0042] Frame Drop and Graying Handling: During the decoding process in the GPU driver layer, the POC values ​​of the previous and subsequent frames are calculated and compared in real time. The driver internally implements the following judgment logic: if (current_poc - previous_poc<1) { generate_gray_frame();}. If a frame drop is determined to have occurred, the graying process is automatically triggered, generating a solid color (such as gray) YUV frame data and outputting it to the video memory, thereby preventing invalid images such as screen tearing or black screen caused by decoding failure or frame discontinuity from interfering with the first-person perspective operation.

[0043] 3. Zero-copy data transfer and double buffering optimization Double buffer initialization: Two buffers (Buffer A and Buffer B) aligned to 4KB boundaries are pre-registered in CPU memory using `aligned_alloc(4096, buffer_size)`, with a suggestion to allocate HugePages to reduce TLB misses. The buffers are then registered to the GPU driver using the `jmwdec_register_dma_buffer` function. A state machine is initialized to manage the double buffer states, including "Ready," "Transferring," and "Processing."

[0044] DMA Zero-Copy Transfer: After GPU decoding is complete, `jmwdec_dma_transfer(dec_handle, buffer_a)` is immediately called to initiate a DMA zero-copy transfer. The GPU's DMA controller directly transfers the YUV frame data in video memory to a free buffer (e.g., Buffer A) that is currently in a "ready" state. During the transfer, the buffer's state is marked as "transferring"; after the transfer is complete, the state is updated to "processing," and the FFmpeg rendering thread is simultaneously notified that new data is ready.

[0045] Dynamic resolution adaptation: To address the dynamic changes in resolution caused by adaptive wireless video bandwidth, this module supports dynamic reconfiguration of DMA channels and memory mapping, ensuring that zero-copy transmission can still be carried out efficiently when switching between frames of different resolutions, and seamlessly connecting with the switching of dual buffers.

[0046] State machine management: The GPU decoder continuously initiates DMA write requests to the buffer currently marked as "ready".

[0047] The FFmpeg rendering thread reads data from the buffer currently marked as "processing" and processes it.

[0048] After the rendering thread finishes processing the data in a buffer, it resets its state to "ready" and waits for the GPU to write to it again.

[0049] This state machine mechanism effectively avoids race conditions between GPU writing and CPU reading, solves problems such as empty frames and data tearing that may occur in a multi-threaded environment, and achieves efficient parallelism between decoding and rendering.

[0050] 4. FFmpeg multi-threaded rendering and display Custom AVIOContext configuration: The `avio_alloc_context` function initializes FFmpeg's custom AVIOContext, and the custom `custom_read_func` points its data source to a CPU memory buffer that is in a "processing" state after zero-copy transfer. This configuration enables FFmpeg to read YUV frame data directly from the user-managed buffer without copying.

[0051] Multi-threaded format conversion and post-processing: The `sws_scale(sws_ctx, in_data, in_linesize, 0, height, out_data, out_linesize)` function is called in a multi-threaded manner to convert YUV data to the RGB format required by the display device. Post-processing operations such as deinterlacing and color enhancement can be performed in parallel. This multi-threaded design makes fuller use of multi-core CPU resources, processing different frames or different regions of the same frame in parallel, effectively reducing boundary anomalies and processing latency (rollback) caused by single-threaded processing bottlenecks.

[0052] SDL2 rendering and frame rate synchronization: Through FFmpeg's SDL2 output backend, functions such as SDL_UpdateTexture and SDL_RenderCopy are called to render the processed RGB frames onto the display screen. Utilizing SDL2's double buffering mechanism and frame rate synchronization mechanism (such as VSYNC), smooth and tear-free video playback is ensured.

[0053] Overlapping execution: Thanks to the dual-buffer architecture, the GPU's decoding process and the CPU's rendering process can be completely overlapped. That is, while the GPU is writing the next frame of data to Buffer A, FFmpeg can simultaneously read from Buffer B and render the current frame of data. This greatly reduces end-to-end processing latency, which is particularly suitable for applications with extremely high real-time requirements, such as first-person view drones and remote control.

[0054] In this embodiment, a computer device is provided, such as... Figure 6 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned H.265 video wireless reception, hardware decoding, and display methods based on domestically produced GPUs.

[0055] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that executes any of the above-described methods for H.265 video wireless reception, hardware decoding, and display based on a domestically produced GPU.

[0056] Based on the same inventive concept, this invention also provides an H.265 video wireless receiving, hardware decoding, and display device based on a domestically produced GPU, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the method, the implementation of the device can be referred to the implementation of the method, and repeated details will not be elaborated further.

[0057] Figure 7 This is a structural block diagram of an H.265 video wireless receiving, hardware decoding, and display device based on a domestically produced GPU, according to an embodiment of the present invention. Figure 7 As shown, the device includes: The wireless receiving and packet reassembly module 701 is used to receive H265 video data packets from the wireless link via the DDS protocol and reassemble complete H265 frames using an anti-packet loss adaptive circular buffer. The hardware decoding module 702 is used to call the self-developed driver interface of the domestic GPU, submit the complete H265 frame output by the packet assembly module to the GPU for hardware decoding, generate YUV frame data and temporarily store it in the video memory, and start graying processing when frame loss is detected. The zero-copy data transmission module 703 is used to efficiently transfer the decoded YUV frame data from the GPU memory to the dual buffers of the CPU memory using zero-copy technology and dual buffer technology. The FFmpeg rendering and display module 704 is used to call the FFmpeg library to read YUV frame data from the double buffer, perform format conversion and scaling post-processing in a multi-threaded manner, and render and display it on the screen.

[0058] This invention makes the following technical contributions: It proposes a complete wireless H.265 video processing solution based on domestically produced GPUs, effectively solving the challenges of stability, real-time performance, and independent controllability in wireless video transmission through end-to-end technological innovation. Specifically, the technical contributions of this invention are reflected in: constructing an end-to-end optimized pipeline from wireless reception to final display, wherein the deep integration of anti-packet loss packet assembly mechanism and GPU driver-level frame drop and graying processing ensures the continuity and reliability of video streams in harsh wireless environments; the deep adaptation of domestic GPU driver interfaces achieves end-to-end domestic independent controllability from the hardware layer to the application layer; the innovative zero-copy double-buffered architecture completely eliminates the performance bottleneck caused by traditional memory copying, minimizing end-to-end latency; FFmpeg multi-threaded rendering optimization significantly improves processing efficiency and system stability; and the dynamic adaptive resource management mechanism endows the system with intelligent optimization capabilities in different wireless environments. The entire solution demonstrates excellent performance in the field of wireless video transmission, providing important technical support for the development of my country's independent and controllable wireless video transmission technology.

[0059] Taking drone video transmission in complex environments as an example, the practical application effects of this invention are explained in detail: When a video transmission system operates in a complex environment, due to fluctuations in the quality of the wireless link, the traditional video transmission system experiences severe stuttering, screen tearing, and transmission interruptions.

[0060] After applying the technology of this invention: Packet loss mitigation: When wireless link quality deteriorates significantly, the DDS protocol's adaptive circular buffer automatically increases its depth to tolerate greater network jitter and actively requests retransmission of key frames using sequence numbers to ensure video integrity. The buffer dynamically adjusts based on link quality, expanding to 8 frames when link quality is poor and shrinking to 3 frames when quality is good to reduce latency.

[0061] Frame drop fault tolerance: During the period of worst link quality, the GPU decoder detects continuous abnormal POC values ​​(POC increase value <1), immediately starts graying processing, outputs a stable gray screen to replace the broken and distorted screen image, avoids the viewing experience being affected by abnormal images, and maintains the continuity of the video stream.

[0062] Low latency guarantee: Through DMA zero-copy double buffering technology, the end-to-end latency from video reception to display is controlled within 100ms. The state machine-managed double buffer effectively avoids read / write conflicts in a multi-threaded environment, ensuring parallel execution of GPU decoding and CPU rendering, resulting in smooth, stutter-free video playback.

[0063] Dynamic optimization: The system intelligently adjusts its transmission strategy based on changes in wireless link quality. It transmits 1080P high-definition video when link quality is good, automatically downgrading to 720P to prioritize smoothness when link quality is poor, and further optimizing the bitrate in extreme cases to ensure uninterrupted video playback.

[0064] Practical applications show that, after adopting this invention, under the same wireless environment, the video transmission integrity rate is increased from 65% to 95% of the traditional solution, the end-to-end latency is reduced by about 40%, and the time of screen tearing or distortion is reduced by 75%, effectively ensuring the stability and real-time performance of video transmission, and fully verifying the technical advantages and practical value of this invention.

[0065] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.

[0066] Table 1. Definitions of Important Functions and Parameters

[0067] The above detailed embodiments are a description of the present invention. It should not be considered that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, several simple deductions and substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the protection scope of the present invention.

Claims

1. A method for receiving and displaying H.265 video based on a domestically produced GPU, characterized in that, When applied to the receiver of a wireless link, the following steps are included: The system receives H265 video data streams from the wireless link via the DDS protocol, performs packet loss prevention and frame integrity verification, and outputs complete H265 frames. The complete H265 frame is hardware decoded by calling the domestic GPU driver interface, generating YUV frame data and storing it in the video memory. During the decoding process, it is determined in real time whether a frame is lost. The judgment logic is that if the increase in POC between the current frame and the previous frame in the same sequence is less than 1, it is determined to be a frame loss. After a frame loss, graying processing is started, and pure color YUV frame data is output. The YUV frame data is transferred from the GPU memory to the CPU memory in a double buffer using zero-copy technology. The FFmpeg library is used to perform multi-threaded rendering and display of YUV frame data in the CPU memory double buffer.

2. The method according to claim 1, characterized in that, The process of receiving H.265 video data streams from the wireless link via the DDS protocol and performing packet loss-resistant reassembly and frame integrity checks specifically includes: Configure the QoS policy for DDS; The receiving end listens to a specified DDS topic and subscribes to the video stream; The system uses an adaptive circular buffer to sort, deduplicatize, reassemble NAL units, and check the integrity of received data packets. By checking timestamps and sequence numbers, it identifies and requests the retransmission of key frames or discards irreparable non-key frames. The system dynamically monitors the quality of the wireless link. When the link quality is poor, it automatically increases the buffer and triggers the reliable transmission mode of DDS. When the link quality is good, it decreases the buffer.

3. The method according to claim 2, characterized in that, The process of calling the domestic GPU driver interface to perform hardware decoding of the complete H265 frame specifically includes: Call jmwdec_init() to initialize the decoder instance and configure it for H265 format and expected resolution; The complete H265 frame data is submitted to the GPU memory using jmwdec_submit_frame(); Triggering jmwdec_decode_frame() starts the GPU hardware decoding engine, completing the decoding of the H265 bitstream into a YUV image.

4. The method according to claim 3, characterized in that, The process of transferring the YUV frame data from GPU memory to CPU memory using zero-copy technology in a dual buffer specifically includes: Two CPU memory buffers are pre-registered as a dual buffer, and a state machine mechanism is used to manage the state of the dual buffers, which includes "ready", "transferring", and "processing". After the GPU finishes decoding, it writes the YUV data to the currently marked "ready" free buffer using zero-copy technology, and updates the status of the buffer to "processing" after the transmission is complete, while notifying the CPU. The CPU's FFmpeg rendering thread reads data from the buffer in the "processing" state, processes it, and resets its state to "ready" after processing is complete.

5. The method according to claim 4, characterized in that, The memory addresses of the dual buffers are strictly aligned, and large page memory is used to reduce TLB misses.

6. The method according to claim 5, characterized in that, The process of calling the FFmpeg library to perform multi-threaded rendering and display of YUV frame data in the CPU memory double buffer specifically includes: Initialize FFmpeg's custom AVIOContext and point its data source to a CPU-memory double buffer to achieve copy-free reading of YUV frame data; The sws_scale function is called in a multi-threaded manner to convert YUV data into the RGB format required by the display device, and then perform deinterlacing and color enhancement post-processing. RGB frames are rendered onto the display screen through FFmpeg's SDL2 or OpenGL output backend, and a frame rate synchronization mechanism is used to ensure smooth video playback.

7. An H.265 video receiving and display system based on a domestically produced GPU, characterized in that the system... include: The wireless receiving and packet reassembly module receives H265 video data packets from the wireless link via the DDS protocol, and has a built-in anti-packet loss adaptive circular buffer to reassemble complete H265 frames. The hardware decoding module calls the self-developed driver interface of the domestic GPU to submit the complete H265 frame output by the packet assembly module to the GPU for hardware decoding, generate YUV frame data and temporarily store it in the video memory. During the decoding process, the POC value is used to determine whether a frame is lost. When the POC increment value is less than 1, it is determined to be a frame loss, and graying processing is immediately started to output pure color YUV frame data. The zero-copy data transfer module is used for zero-copy technology to directly map or transfer the decoded YUV frame data from the GPU memory to the dual buffer of the CPU memory. The FFmpeg rendering and display module is used to call the FFmpeg library to read YUV frame data from the CPU memory double buffer, perform format conversion and scaling post-processing in a multi-threaded manner, and render and display it on the screen.

8. The system as described in claim 7, characterized in that, The domestically produced GPU is the Jingjia Micro JM930 series GPU, and the self-developed driver interface is libjmwdec.so.