Image decoding system with anomaly detection and self-recovery mechanism

CN122093566BActive Publication Date: 2026-10-20HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511762525.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-10-20
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

可靠性不足:多数图像解码硬件架构缺乏系统化的异常检测与自恢复机制

Benefits of technology

(1)本发明在对图像编码帧进行解码的同时,会检测解码过程中的异常信息,并将该异常信息附加到图像解码帧中,将异常信息字段发送至外部存储控制模块的同时也会发送给异常诊断模块,由异常诊断模块根据图像解码帧中的异常信息实时监控整个解码流程的状态,并在满足复位条件时依次对外部存储控制模块和解码模块进行复位,使这两个模块回到初始状态,有效避免解码过程中因异常导致的潜在风险与数据丢失,提升了解码系统的可靠性,在异常检测与异常恢复的过程中,正常的解码流程不中断,“无痕”地实现了异常状态的检测和处理。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093566B_ABST
    Figure CN122093566B_ABST
Patent Text Reader

Abstract

The application discloses an image decoding system with abnormality detection and self-recovery mechanism, and belongs to the technical field of image processing. The system receives compressed data and sends decoding data through an external interface, and buffers the compressed and decoded data through an external storage module; a decoding module reads the compressed data in units of frames to realize frame-by-frame decompression, realizes frame reset by combining a frame header flag signal and a decoding timeout mechanism, and realizes self-recovery of the frame period decoding state by clearing the residual decoding state of the previous frame; in the decoding, length information of a code stream is checked in real time, and the number of decoded pixels is counted, filling or discarding operation is performed according to abnormal number conditions to realize minimization of the decoding error range; an abnormality diagnosis module executes abnormal reset when the system abnormal state meets the reset condition according to the abnormality detection field of the decoding module. The application realizes detection and self-recovery of abnormal conditions without traces during decoding, and provides an efficient, stable and reliable decoding solution for scenes with strict real-time requirements such as streaming media and remote sensing satellite images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image decoding, and more specifically, relates to an image decoding system with anomaly detection and self-recovery mechanisms. Background Technology

[0002] In the wave of digitalization, the application of image data has permeated many fields such as streaming media transmission, telemedicine, industrial visual inspection, and virtual reality. As the core link connecting data transmission and terminal presentation, image decoding technology's real-time performance, reliability, and adaptability directly determine the quality of the application experience.

[0003] With the widespread adoption of technologies such as 4K / 8K ultra-high-definition video and VR panoramic imaging, the amount of image data is growing exponentially, and encoding formats are evolving towards more complex and efficient standards such as H.266 / VVC and AV1. This demands higher computational efficiency in the decoding process to meet real-time requirements (such as millisecond-level latency control in live streaming), but it also exposes the decoding process to more potential risks: noise and packet loss in the transmission link can lead to bitstream corruption, errors in syntax elements within complex encoding logic can cause decoding anomalies, and hardware fluctuations in terminal devices can cause computational deviations. If these problems are not addressed promptly, they can result in anything from image distortion and stuttering to decoding interruptions, directly impacting user experience in scenarios such as live streaming on demand and real-time conferencing, and even potentially leading to decision-making errors in fields such as industrial inspection, medical imaging, and remote sensing images.

[0004] Existing technologies have significant limitations in addressing the above challenges: Insufficient reliability: Most image decoding hardware architectures lack systematic anomaly detection and self-recovery mechanisms. Some solutions can only identify obvious errors through simple checksums, but cannot locate the root cause of the anomaly; even if anomalies are detected, they often rely on manual restarts or software intervention, making it difficult to achieve automated recovery and seriously affecting system availability.

[0005] Limited hardware compatibility: Existing decoding architectures are mostly designed for specific hardware (e.g., dedicated ASIC decoders only support fixed encoding formats, and GPU decoding solutions rely on specific driver interfaces), making cross-platform reuse difficult. When application scenarios require hardware switching (e.g., streaming media servers migrating from CPU clusters to GPU accelerated nodes, or terminal devices switching from general-purpose processors to low-power ASICs), the architecture must be redesigned, resulting in high development costs and long development cycles.

[0006] The "intrusiveness" and waste of resources in anomaly handling: Most anomaly detection and recovery solutions rely on software layer patches or additional hardware modules, which either require interrupting the main decoding process (such as pausing frame processing for error verification), leading to increased latency; or consume a large amount of computing resources (such as GPU computing power and CPU cache) due to algorithm redundancy (such as full frame re-detection and brute-force retries), which can easily cause performance bottlenecks in real-time decoding scenarios such as streaming media and remote sensing satellite images. Summary of the Invention

[0007] To address the shortcomings and improvement needs of existing technologies, this invention provides an image decoding system with anomaly detection and self-recovery mechanisms. Its purpose is to detect and process abnormal states "seamlessly" while decoding compressed bitstreams, thereby improving the reliability of the decoding process and ensuring its continuity.

[0008] To achieve the above objectives, the present invention provides an image decoding system with an anomaly detection and self-recovery mechanism, comprising: an external interface control module, an external storage control module, a decoding module, and an anomaly diagnosis module; The external interface control module is used to receive compressed bitstream data from external systems, parse out the image encoded frames according to the specified protocol, and then send the image encoded frames to the external storage control module. The external storage control module is used to cache image encoded frames from the external interface control module; The decoding module is used to read image encoded frames from the external storage control module in units of frames, decode them, encapsulate the decoded data into image decoded frames, and send the image decoded frames to the external storage control module; the image decoded frame includes a parameter header, decoded data, an anomaly detection field, and a parameter tail; The external storage control module is also used to cache image decoding frames from the decoding module; The external interface control module is also used to read image decoding frames from the external storage control module, encapsulate them according to a specified protocol, and send them to an external system. The decoding module is also used to perform anomaly detection during decoding, fill the image decoding frame with the detected anomaly information as an anomaly detection field, and send the anomaly detection field to the anomaly diagnosis module. The anomaly diagnosis module is used to determine the abnormal state of the system based on the anomaly detection field output by the decoding module. When the abnormal state meets the preset reset conditions, it issues an anomaly reset signal. The reset signal first clears the data and state cached by the external storage control module, and then the external storage control module synchronously generates an anomaly reset signal to the decoding module to clear the state of the decoding module.

[0009] Furthermore, the image-coded frame includes: frame header flags, frame header auxiliary information, N The smallest coding unit, frame tail auxiliary information, and frame tail flag;N It is a positive integer; Furthermore, the decoding module includes: The data read control module is used to read image encoded frames from the external storage control module in units of frames; The frame header and frame tail information parsing module is used to parse the information required for decoding and the information required by the external system from the auxiliary information of the frame header and frame tail of the image encoded frame; The preprocessing module before decoding is used to detect and correct errors in the valid data in the image encoding frame, and then divide it into the smallest encoding units to meet the input format requirements of the pixel restoration module; the smallest encoding unit includes compressed data and its auxiliary decoding information. The pixel restoration module is used to decompress each smallest coding unit using the decoding algorithm required by the output to obtain pixel data; The pixel reordering module is used to rearrange the pixel data obtained from decoding the image encoded frame according to the image format required for output, so as to obtain the decoded frame data. The decoding pixel framing module is used to add a parameter header, an anomaly detection field, and a parameter tail to the front and back of the rearranged decoding frame data to form a complete frame of decoding data. The anomaly detection module is used to detect anomalies that occur during frame header and frame tail information parsing, preprocessing before decoding, pixel restoration, and pixel reordering, and fill the detected anomalies into the anomaly detection field in the image decoding frame. And a data sending module, used to send the image decoding frame containing the anomaly detection field to the external storage control module, and send the anomaly detection field to the anomaly diagnosis module.

[0010] Furthermore, when the decoding module completes the decoding of the current image encoding frame or the decoding time of the current image encoding frame exceeds a preset timeout threshold, the data reading control module will automatically read a new image encoding frame from the external storage control module.

[0011] Furthermore, when the frame header and frame tail information parsing module detects a new image encoded frame, it will issue a frame reset signal to clear the state information remaining in the previous image encoded frame in the decoding module.

[0012] Furthermore, the pixel restoration module is used to count the amount of bitstream data consumed and the number of decoded pixels during the decoding process of the minimum coding unit. When the amount of bitstream data consumed reaches the reference bitstream data amount or the number of decoded pixels reaches the reference decoded pixel number corresponding to the minimum coding unit, a judgment is made: when the amount of bitstream data consumed reaches the reference bitstream number but the number of decoded pixels does not reach the reference decoded pixel number corresponding to the minimum coding unit, it is determined that the bitstream is lost, and the bitstream is filled to the reference decoded pixel number corresponding to the minimum coding unit according to the actual number of decoded pixels, and a decoding abnormality signal is triggered at the same time.

[0013] Furthermore, the pixel restoration module is used to count the amount of bitstream data consumed and the number of decoded pixels during the decoding process of the smallest coding unit. When the amount of bitstream data consumed reaches the reference bitstream data or the number of decoded pixels reaches the reference number of decoded pixels corresponding to the smallest coding unit, a judgment is made: when the number of decoded pixels reaches the reference number of decoded pixels corresponding to the smallest coding unit but the amount of bitstream data consumed does not reach the reference bitstream number, it is determined to be bitstream redundancy, the redundant bitstream is discarded, and a decoding abnormality signal is triggered at the same time.

[0014] Furthermore, the pixel reordering module is used to make a judgment after rearranging the pixels solved by the pixel restoration module: when the number of decoded pixels is less than the number of reference decoded pixels corresponding to the complete frame, it is determined that the number of decoded pixels is insufficient, and the number of pixels is filled according to the actual number of decoded pixels so that the number of pixels is equal to the number of reference decoded pixels corresponding to the complete frame.

[0015] Furthermore, the reset conditions include at least one of the following: The scale of the anomaly has reached a preset first threshold. The number of consecutive occurrences of a specified type of exception reaches a preset second threshold.

[0016] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects: (1) While decoding the image encoding frame, the present invention will detect abnormal information in the decoding process and attach the abnormal information to the image decoding frame. The abnormal information field is sent to the external storage control module and the abnormal diagnosis module at the same time. The abnormal diagnosis module monitors the status of the entire decoding process in real time according to the abnormal information in the image decoding frame, and resets the external storage control module and the decoding module in sequence when the reset condition is met, so that the two modules return to the initial state. This effectively avoids potential risks and data loss caused by abnormalities in the decoding process, improves the reliability of the decoding system, and ensures that the normal decoding process is not interrupted during the abnormal detection and recovery process, thus realizing the detection and processing of abnormal states "seamlessly".

[0017] (2) The present invention has modularly designed the decoding module. Based on the decoding process and the requirements for anomaly detection, the decoding module is divided into multiple functional sub-modules. Anomaly detection is performed on the processing of each sub-module. This enables fine-grained control of the compressed bitstream data stream and accurately captures the occurrence and type of anomalies, providing a reliable basis for anomaly recovery.

[0018] (3) The present invention sets a timeout mechanism. When the encoding time of the image encoding frame is too long (exceeding the preset timeout threshold), the processing of the current image encoding frame will be automatically terminated and a new image encoding frame will be automatically read from the external storage control module. This can avoid the decoding process of subsequent image encoding frames being affected by the single frame decoding abnormality, thereby improving the decoding quality and real-time performance.

[0019] (4) The present invention sets up a frame reset control logic. Based on the frame reset control logic, when the data reading control module in the decoding module detects a new image encoding frame, it will issue a frame reset signal to clear the state information left by the previous image encoding frame in the decoding module. This can avoid affecting the decoding process of the new image encoding frame, enhance the fault tolerance of the decoding system, facilitate adjustment and optimization, and ensure the consistency and stability of image quality.

[0020] (5) The present invention uses the smallest coding unit as the decoding unit, and for each smallest coding unit, it will detect the loss and redundancy of bitstream data. When bitstream data loss is detected, pixel filling will be performed. When bitstream data redundancy is detected, redundant bitstream data will be discarded. In this way, useful pixel information can be extracted to the maximum extent, the error propagation range can be minimized, and the decoding efficiency can be maximized.

[0021] (6) Based on the abnormal filling and discarding of the smallest coding unit, the present invention will further detect the loss of pixel data corresponding to the image coding frame, and will perform pixel filling when pixel data loss is detected, thereby further reducing the error propagation range and improving decoding efficiency.

[0022] Overall, the image decoding system with anomaly detection and self-recovery mechanism provided by this invention is a general and reliable image decoding hardware architecture. Its architecture design does not depend on specific hardware form and does not require reconstruction of core logic for different hardware, thus achieving unified decoding capability across devices. Attached Figure Description

[0023] Figure 1 This is a functional module architecture diagram of an image decoding system with anomaly detection and self-recovery mechanisms provided in an embodiment of the present invention.

[0024] Figure 2 This is a schematic diagram of the image decoding frame format provided in an embodiment of the present invention.

[0025] Figure 3 This is a schematic diagram of the image encoding frame format provided in an embodiment of the present invention.

[0026] Figure 4 This is a schematic diagram of the decoding module structure provided in an embodiment of the present invention.

[0027] Figure 5 This is a schematic diagram of frame-by-frame reading control provided in an embodiment of the present invention.

[0028] Figure 6 A flowchart illustrating the filling and discarding of the smallest coding unit data provided in an embodiment of the present invention.

[0029] Figure 7 This is a flowchart illustrating the filling process for single-frame decoding data provided in an embodiment of the present invention.

[0030] Figure 8 This is a schematic diagram of the hardware structure of an FPGA-based decoding system provided in an embodiment of the present invention.

[0031] Figure 9 The flowchart illustrates the operation of an image decoding system with anomaly detection and self-recovery mechanisms provided in this embodiment of the invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0033] In this invention, the terms "first," "second," etc. (if present) in the invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0034] To improve the reliability of the decoding system by seamlessly detecting and handling abnormal states while decoding compressed bitstreams, one embodiment of the present invention provides an image decoding system with anomaly detection and self-recovery mechanisms. This image decoding system is a general and reliable image decoding hardware architecture whose architecture design is not dependent on specific hardware forms and does not require reconstruction of core logic for different hardware, thus achieving unified decoding capabilities across devices. Figure 1 As shown, this embodiment includes: an external interface control module, an external storage control module, a decoding module, and an anomaly diagnosis module; The external interface control module is used to receive compressed bitstream data from external systems, parse out the image encoded frames according to the specified protocol, and then send the image encoded frames to the external storage control module. The external storage control module is used to cache image encoded frames from the external interface control module; The decoding module reads image encoded frames from the external storage control module frame by frame, decodes them, encapsulates the decoded data into image decoded frames, and sends the image decoded frames to the external storage control module. The format of the image decoded frame is as follows: Figure 2 As shown, it includes parameter header, decoded data, anomaly detection field, and parameter tail; The external storage control module is also used to cache image decoding frames from the decoding module; The external interface control module is also used to read image decoding frames from the external storage control module, encapsulate them according to a specified protocol, and send them to an external system. The decoding module is also used to perform anomaly detection during decoding, fill the image decoding frame with the detected anomaly information as an anomaly detection field, and send the anomaly detection field to the anomaly diagnosis module. The anomaly diagnosis module is used to determine the abnormal state of the system based on the anomaly detection field output by the decoding module. When the abnormal state meets the preset reset conditions, it issues an anomaly reset signal. The reset signal first clears the data and state cached by the external storage control module, and then the external storage control module synchronously generates an anomaly reset signal to the decoding module to clear the state of the decoding module.

[0035] This embodiment detects abnormal information during the decoding process while decoding the image encoded frame. This abnormal information is then appended to the image decoded frame. The abnormal detection field is sent to both the external storage control module and the abnormal diagnosis module. The abnormal diagnosis module monitors the status of the entire decoding process in real time based on the abnormal information in the image decoded frame. When a reset condition is met, it sequentially resets both the external storage control module and the decoding module, returning them to their initial states. This effectively avoids potential risks and data loss caused by abnormalities during decoding, improving the reliability of the decoding process. In the abnormal detection and recovery process, the abnormal detection and self-recovery mechanism is embedded in the decoding process in a lightweight manner, without interrupting the main decoding link or consuming excessive hardware resources (such as computing units and storage bandwidth). It seamlessly achieves the detection and processing of abnormal states, providing an efficient, stable, and reliable decoding solution for scenarios with stringent real-time requirements, such as streaming media and remote sensing satellite imagery.

[0036] The following provides a further explanation of the specific implementation of each module.

[0037] In this embodiment, the external interface control module is responsible for receiving compressed bitstream data and sending decoded data. This module encapsulates the data to be sent and parses the data to be received according to the external system protocol standard. Optionally, in this embodiment, the external interface control module interacts with the external system through a register group. In practical applications, the interface protocol for the external interface control module to interact with the external system can be selected from PCIE, CXL, NVME, PXIE, etc. Optionally, in this embodiment, the interface protocol for the external interface control module to interact with the external system is PCIE.

[0038] After the external interface control module parses the compressed bitstream data, the resulting image encoded frame format is as follows: Figure 3 As shown, this includes frame header flags, frame header auxiliary information, N The smallest coding unit, frame tail auxiliary information, and frame tail flag; N It is a positive integer. The frame header and frame tail flags are used to identify the start and end positions of a frame, respectively; the frame header auxiliary information includes information such as the compression mode (intra-frame compression, inter-frame compression), lossless (lossless, lossy) information, frame count, image size, and error correction coding method required for decoding; the frame tail auxiliary information includes information such as compression delay and compression ratio required by the external system; the smallest coding unit is a data block that can be independently encoded and decoded, including compressed data and its auxiliary decoding information.

[0039] In this embodiment, the external storage control module is responsible for caching the compressed data received from the external interface control module and the decoded data that needs to be sent to the external system through the external interface control module after decoding. This includes the storage and retrieval scheduling of multiple data streams, such as compressed bitstream data and decoded data. In practical applications, the external storage control module can be a DDR, SDRAM, RDRAM, or other devices. Optionally, in this embodiment, the external storage control module is specifically a DDR device.

[0040] In this embodiment, the structure of the decoding module is as follows: Figure 4 As shown, it includes: The data read control module is used to read image encoded frames from the external storage control module in units of frames; The frame header and frame tail information parsing module is used to parse the information required for decoding and the information required by the external system from the auxiliary information of the frame header and frame tail of the image encoded frame; the information required for decoding is used for subsequent decoding and framing. The preprocessing module before decoding is used to detect and correct errors in the valid data in the image encoding frame (correcting bit errors generated during transmission), and then divide it into the smallest encoding units to meet the input format requirements of the pixel reconstruction module; the smallest encoding unit includes compressed data and its auxiliary decoding information; The pixel restoration module is used to decompress each smallest coding unit using a preset decoding algorithm to obtain pixel data. The pixel restoration module contains two buffers: a compressed data buffer and an auxiliary decoding information buffer. After the smallest coding unit is input into the pixel restoration module, the compressed data and auxiliary decoding information are cached in the compressed data buffer and the auxiliary decoding information buffer, respectively. The pixel reordering module is used to rearrange the pixel data obtained from decoding the image encoded frame according to the image format required for output, so as to obtain the decoded frame data. The decoding pixel framing module is used to add a parameter header, an anomaly detection field, and a parameter tail to the front and back of the rearranged decoding frame data to form a complete frame of decoding data. The anomaly detection module is used to detect anomalies that occur during frame header and frame tail information parsing, preprocessing before decoding, pixel restoration, and pixel reordering. The detected anomalies are filled into the anomaly detection field in the image decoding frame, which facilitates the external system to identify and extract key state information and data generated during the decoding process. The system also includes a data sending module, which sends image decoding frames containing anomaly detection fields to the external storage control module and sends the anomaly detection fields to the anomaly diagnosis module. To avoid data loss, after the image decoding frames are assembled, they are first cached in the internal cache and then cached in the corresponding storage partition of the external storage control module. When the image decoding frames cached in the external storage control module reach the preset level, they are sent to the external system for further processing through the external interface control module.

[0041] Based on the above modular design of the decoding module, this embodiment further implements a pipelined design for the decoding process of the decoding module.

[0042] This embodiment, through the modular and pipelined design of the decoding module and by performing anomaly detection on the processing of each sub-module, enables fine-grained control of the compressed bitstream data stream and accurately captures the occurrence and type of anomalies, providing a reliable basis for anomaly recovery. In practical applications, anomalies that may occur during the parsing of frame header and tail information include: loss of frame header flag information and loss of frame header auxiliary information; anomalies that may occur during the preprocessing before decoding include: loss or duplication of minimum coding unit auxiliary decoding information; anomalies that may occur during pixel reconstruction include: decoding errors; and anomalies that may occur during pixel reordering include: insufficient decoded pixel data to complete a full frame.

[0043] To prevent the spread of abnormalities during the decoding process, this embodiment adopts a frame-by-frame compressed bitstream reading architecture: the decoding module reads the compressed bitstream data frame by frame. After reading one frame, it stops reading data and waits until decoding is complete and the data is output before reading the next frame of compressed bitstream data. Furthermore, to further improve the reliability of the decoding system, in this embodiment, the data reading control module in the decoding module, in addition to frame-by-frame reading and decoding, further incorporates a timeout mechanism, such as... Figure 5 As shown, when the decoding time of the current image encoding frame exceeds a preset timeout threshold, a new image encoding frame will be automatically read from the external storage control module. Based on this timeout mechanism, the decoding process of subsequent image encoding frames can be avoided due to decoding anomalies in a single frame, thus improving decoding quality and real-time performance.

[0044] To further optimize the decoding quality of the decoding system, this embodiment, based on the anomaly recovery mechanism, further incorporates frame reset control logic. While decoding the compressed bitstream frame by frame, it clears the abnormal states of each sub-module before decoding, ensuring they return to their initial state before the next compressed image frame. Specifically, after a compressed image frame is read into the decoding module by the data reading control module, the frame header and tail information parsing module in the decoding module identifies the start of frame decoding and triggers a reset signal. This resets subsequent key modules (including the pre-processing module, pixel restoration module, pixel reordering module, and decoded data framing module) to restore their initial states. After the frame reset, the decoding module begins decoding the currently valid compressed image frame.

[0045] In this embodiment, the decoding module is equipped with both data anomaly state filling and discarding mechanisms, including a single-frame data processing mechanism and a minimum coding unit data processing mechanism. It obtains the corresponding reference bitstream quantity and decoded pixel quantity by real-time detection of the bitstream quantity and decoded pixel quantity and extracting relevant auxiliary information. Discarding or filling is then performed based on the difference between the actual and theoretical values. Specifically, during minimum coding unit decoding, a state machine controls the reading of the compressed bitstream, such as... Figure 6 As shown, the number of compressed bitstreams consumed is counted. When the bitstream corresponding to the smallest coding unit is used up or the number of decoded pixels reaches the theoretical value, data judgment is initiated: If the bitstream data is insufficient, resulting in insufficient decoded pixels, decoded pixels are added to the data volume corresponding to the smallest coding unit, and then the next smallest coding unit is decoded; if the bitstream data is redundant, the excess bitstream is discarded, and then the next smallest coding unit is decoded; when the number of decoded pixels in the smallest coding unit reaches the theoretical value and the corresponding bitstream is just used up, the next smallest coding unit is directly decoded. After the decoded pixels are reordered, a state machine controls the process as follows: Figure 7As shown, when the number of decoded pixels is less than one frame, the data is padded to the size of one frame before decoding the next frame; when the number of decoded pixels is exactly one frame, the next frame is decoded directly.

[0046] The abnormal state filling and discarding mechanism for the minimum coding unit is implemented by the pixel restoration module. Accordingly, the pixel restoration module is also used to determine the loss of bitstream data when the number of pixels obtained by the minimum coding unit decompression is less than the number of reference bitstreams, or when the amount of bitstream data consumed during the minimum coding unit decoding process is less than the number of reference bitstreams, resulting in an incomplete number of corresponding decoded pixels. The module then fills the decompressed pixels with the actual number of decoded pixels to make the number of pixels equal to the number of reference decoded pixel bitstreams corresponding to the minimum coding unit. The pixel restoration module is also used to determine the redundancy of bitstream data when the amount of bitstream data consumed during the minimum coding unit decoding process is greater than the number of reference bitstreams, and discards the excess bitstream to avoid affecting the decoding of the next minimum coding unit.

[0047] The abnormal state filling mechanism for frames is implemented by the pixel reordering module. Accordingly, the pixel reordering module is used to determine that the number of decoded pixels is insufficient when the number of pixels solved by the pixel restoration module is less than the number of reference decoded pixels corresponding to the complete frame, and to fill the pixels according to the actual number of decoded pixels so that the number of pixels is equal to the number of reference decoded pixels corresponding to the complete frame.

[0048] In the above-mentioned abnormal state filling and discarding mechanism, the number of reference bitstreams of the smallest coding unit can be directly extracted from the auxiliary decoding information of the smallest coding unit, and the number of reference decoded pixels of the smallest coding unit and the number of reference decoded pixels of the complete frame can be calculated based on the information extracted from the auxiliary information of the frame header.

[0049] Through the above-described abnormal state filling and discarding mechanism, this embodiment can extract useful pixel information to the greatest extent and minimize the error propagation range to maximize decoding efficiency.

[0050] In this embodiment, the anomaly diagnosis module can detect the status of the decoding system in real time based on the anomaly information recorded in the anomaly detection field of the image decoding frame, and trigger an anomaly reset when the reset condition is met. As an optional implementation, in this embodiment, the reset condition is specifically that the number of consecutive occurrences of a specified type of anomaly reaches a preset threshold. At this time, it is determined that the transmission link is abnormal, and an anomaly reset is performed on the entire decoding process. The detailed process is as follows: when a large number of anomalies are detected, the FPGA sends an anomaly reset signal, first resetting the external storage control module, clearing the data and status cached in the storage control module, and after the external storage control module has completed the reset, the external storage control module generates a synchronous reset signal to reset the decoding module.

[0051] It is easy to understand that in some other embodiments, the reset condition may also be set to other conditions according to the actual decoding requirements, for example, to the condition that an error occurs during decoding of multiple consecutive frames (e.g., 5 consecutive frames).

[0052] As an optional implementation, the image decoding system with anomaly detection and self-recovery mechanism provided in this embodiment is implemented based on FPGA, and its hardware structure is as follows: Figure 8 As shown. It is easy to understand that in practical applications, this decoding system can also be implemented based on other platforms such as ASIC.

[0053] The decoding system provided in this embodiment has the following workflow: Figure 9 As shown, the process includes: S1: Receiving the compressed bitstream through the external interface control module. S2: Buffering the compressed bitstream received from the interface control module through the external storage control module. S3: The decoding module reads the compressed data buffered in the external storage in frames. S4: The decoding module first parses the frame header and trailer information, identifies the frame header flag signal, and then resets the frame, clearing the pre-decoding state and residual data. After frame reset, it sequentially undergoes pre-decoding preprocessing, pixel restoration, pixel reordering, decoding data framing, data buffering, and transmission. S5: During decoding, abnormal state detection is performed, and the detection information is buffered to form an abnormal detection field, which is sent to the framing module for framing output and the internal abnormal diagnosis module for abnormal judgment. S6: During the decoding process, the corresponding reference bitstream quantity and decoded pixel quantity are obtained by real-time detection of the bitstream quantity and decoded pixel quantity and real-time extraction of relevant auxiliary information. Discarding or filling operations are performed based on the difference between the actual and theoretical values. S7: The decompressed data is sent back to the external storage for buffering and then sent to the external system via the external interface. S8: The FPGA internal fault diagnosis module determines whether a fault reset is needed based on the fault field. If a fault reset is needed, it executes the following steps: first, it resets the storage control module; after the storage control module has been reset, it resets the decoding module. Then, it rereads the compressed bitstream and executes steps S1-S8 until all compressed images are decompressed.

[0054] In summary, this embodiment establishes an anomaly detection and self-recovery mechanism, which can report decoding status information in real time. When a large number of anomalies occur during decoding, the hardware automatically generates a reset signal to reset the entire decompression process, returning it to the initial decoding state. This effectively avoids potential risks and data loss caused by anomalies during decompression, improves decompression efficiency and quality, and enhances maintainability. It adopts a modular and pipelined design, sequentially performing frame header and trailer parsing, preprocessing before decoding, pixel restoration, pixel reordering, and decoding data framing on the compressed bitstream data. This enables the processing of compressed bitstream data... Fine-grained control of streaming data streams; a frame reset control logic is designed so that when a new frame of compressed image data arrives, all residual data and states from the previous frame's decompression process that might affect the decoding process of the current compressed image frame are cleared, and the decoding state inside the decoding module is restored to its initial state. This enhances fault tolerance, improves flexibility and scalability, facilitates adjustment and optimization, and ensures the consistency and stability of image quality; it is equipped with a data anomaly state filling and discarding mechanism, which can extract useful pixel information to the greatest extent and minimize the error propagation range to maximize decoding efficiency.

[0055] The system architecture provided in this embodiment does not depend on a specific hardware form and does not require reconstruction of the core logic for different hardware. It achieves unified decoding capabilities across devices, has strong versatility, and can be adapted to scenarios with core requirements such as "multiple terminals, multiple bitstreams, and high real-time performance," such as streaming media. It can not only cope with bitstream fluctuations and transmission anomalies in scenarios such as live streaming and video-on-demand, but also be compatible with the decoding capabilities of different terminal hardware, providing efficient, stable, and cross-platform decoding support for streaming media transmission.

[0056] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An image decoding system with anomaly detection and self-recovery mechanisms, characterized in that, include: External interface control module, external storage control module, decoding module, and anomaly diagnosis module; The external interface control module is used to receive compressed bitstream data from an external system, parse out the image encoded frame according to a specified protocol, and then send the image encoded frame to the external storage control module. The external storage control module is used to cache image encoded frames from the external interface control module; The decoding module is used to read image encoded frames from the external storage control module in units of frames, decode them, encapsulate the decoded data into image decoded frames, and send the image decoded frames to the external storage control module; the image decoded frame includes a parameter header, decoded data, an anomaly detection field, and a parameter tail; The external storage control module is also used to cache image decoding frames from the decoding module; The external interface control module is also used to read image decoding frames from the external storage control module, encapsulate them according to a specified protocol, and send them to an external system; The decoding module is also used to perform anomaly detection during decoding, fill the image decoding frame with an anomaly detection field composed of the detected anomaly information, and send the anomaly detection field to the anomaly diagnosis module. The anomaly diagnosis module is used to determine the abnormal state of the system based on the anomaly detection field output by the decoding module, and when the abnormal state meets the preset reset conditions, it issues an anomaly reset signal. The reset signal first clears the data and state cached by the external storage control module, and then the external storage control module synchronously generates an anomaly reset signal to the decoding module to clear the state of the decoding module.

2. The image decoding system with anomaly detection and self-recovery mechanism as described in claim 1, characterized in that, The image encoded frame includes: a frame header flag, frame header auxiliary information, N The smallest coding unit, frame tail auxiliary information, and frame tail flag; N It is a positive integer; Furthermore, the decoding module includes: The data reading control module is used to read image encoded frames from the external storage control module in units of frames; The frame header and frame tail information parsing module is used to parse the information required for decoding and the information required by the external system from the frame header auxiliary information and frame tail auxiliary information of the image encoded frame; The preprocessing module before decoding is used to detect and correct errors in the valid data in the image encoding frame, and then divide it into the smallest encoding units to meet the input format requirements of the pixel restoration module; the smallest encoding unit includes compressed data and its auxiliary decoding information. The pixel restoration module is used to decompress each smallest coding unit using a preset decoding algorithm to obtain pixel data; The pixel reordering module is used to rearrange the pixel data obtained from decoding the image encoded frame according to the image format required for output, so as to obtain the decoded frame data. The decoding pixel framing module is used to add a parameter header, an anomaly detection field, and a parameter tail to the front and back of the rearranged decoding frame data to form a complete frame of decoding data. An anomaly detection module is used to detect anomalies that occur during the parsing of frame header and tail information, the preprocessing before decoding, the pixel restoration, and the pixel reordering, and to fill the detected anomalies into the anomaly detection field in the image decoding frame. And a data sending module, used to send the image decoding frame containing the anomaly detection field to the external storage control module, and send the anomaly detection field to the anomaly diagnosis module.

3. The image decoding system with anomaly detection and self-recovery mechanism as described in claim 2, characterized in that, When the decoding module completes the decoding of the current image encoding frame or the decoding time of the current image encoding frame exceeds a preset timeout threshold, the data reading control module will automatically read a new image encoding frame from the external storage control module.

4. The image decoding system with anomaly detection and self-recovery mechanism as described in claim 3, characterized in that, When the frame header and frame tail information parsing module detects a new image encoded frame, it will issue a frame reset signal to clear the residual state information of the previous image encoded frame in the decoding module.

5. The image decoding system with anomaly detection and self-recovery mechanism as described in claim 2, characterized in that, The pixel restoration module is used to count the amount of bitstream data consumed and the number of decoded pixels during the decoding process of the minimum coding unit. When the amount of bitstream data consumed reaches the reference bitstream data or the number of decoded pixels reaches the reference number of decoded pixels corresponding to the minimum coding unit, a judgment is made. When the amount of bitstream data consumed reaches the reference bitstream number but the number of decoded pixels does not reach the reference number of decoded pixels corresponding to the minimum coding unit, it is determined that the bitstream is lost. The module then fills the reference number of decoded pixels corresponding to the minimum coding unit according to the actual number of decoded pixels, and triggers a decoding abnormality signal.

6. The image decoding system with anomaly detection and self-recovery mechanism as described in claim 5, characterized in that, The pixel restoration module is used to count the amount of bitstream data consumed and the number of decoded pixels during the decoding process of the minimum coding unit. When the amount of bitstream data consumed reaches the reference bitstream data or the number of decoded pixels reaches the reference number of decoded pixels corresponding to the minimum coding unit, a judgment is made: when the number of decoded pixels reaches the reference number of decoded pixels corresponding to the minimum coding unit but the amount of bitstream data consumed does not reach the reference bitstream number, it is determined to be bitstream redundancy, the redundant bitstream is discarded, and a decoding abnormality signal is triggered at the same time.

7. The image decoding system with anomaly detection and self-recovery mechanism as described in claim 6, characterized in that, The pixel reordering module is used to make a judgment after the pixels resolved by the pixel restoration module are rearranged and output: when the number of decoded pixels is less than the number of reference decoded pixels corresponding to the complete frame, it is determined that the number of decoded pixels is insufficient, and the number of pixels is filled according to the actual number of decoded pixels so that the number of pixels is equal to the number of reference decoded pixels corresponding to the complete frame.

8. The image decoding system with anomaly detection and self-recovery mechanism as described in claim 1 or 2, characterized in that, The reset condition includes at least one of the following: The scale of the anomaly has reached a preset first threshold. The number of consecutive occurrences of a specified type of exception reaches a preset second threshold.

Citation Information

Patent Citations

  • Video hardware decoder circuit, code stream analysis error detection control method and system

    CN116095346A

  • Device and method for processing video decoding error, decoding device and chip

    CN118233658A