Video data processing method, module, chip and storage medium
By performing error detection during the compression and decoding process of video raw data, reference compressed data of reference frames and positions are obtained, and compressed data of error positions are replaced, the quality degradation caused by video decoding errors in the prior art is solved and the video quality is improved.
Patent Information
- Application Number
- CN202110186240.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-02-08
AI Technical Summary
When decoding the compressed video code stream, the prior art fails to effectively mask the decoding error, resulting in a degradation of video quality.
By compressing the original video data, and detecting the error frame and position during the decoding process, obtaining the reference compressed data of the reference frame and reference position, and replacing the compressed data of the error position with the reference compressed data for real-time decoding.
It improves the picture texture of the video, improves the viewer's video quality experience, and uses visual pause to make the image information at the wrong position not abrupt during the video playback.
Smart Images

Figure CN114915842B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of video image processing, and in particular, to a video data processing method, module, chip, and storage medium. Background Art
[0002] With the progress of high-definition digital video and image processing technology and the increasing requirements for the visual quality of videos and images, high-definition digital videos and images have entered daily life. At the same time, the amount of video and image data has increased sharply. To facilitate data transmission and storage, efficient compression of data is a common method.
[0003] A decoder is a hardware device that restores an audio-visual code stream to a digital signal, which requires a large memory read / write bandwidth and space. Higher-specification videos or higher-bitrate code streams are likely to occupy more memory read / write bandwidth and space during decoding. To reduce the memory read / write bandwidth and space occupied by the decoder, real-time compression of the standard code stream can greatly reduce the memory read / write bandwidth and space occupied by the decoder.
[0004] However, there are problems in the process of decoding the compressed code stream in the prior art. Summary of the Invention
[0005] The problem solved by the embodiments of the present invention is to provide a video data processing method, module, chip, and storage medium for improving video quality.
[0006] To solve the above problem, an embodiment of the present invention provides a video data processing method for processing the original data of a video, including: compressing the original data of the video to form compressed data; decoding the compressed data and detecting the decoding process to obtain an error frame and an error position; obtaining a reference frame based on the error frame; obtaining a reference position of the reference frame based on the error position; obtaining reference compressed data corresponding to the reference position; replacing the compressed data corresponding to the error position of the error frame with the reference compressed data; and decoding the replaced compressed data.
[0007] Accordingly, an embodiment of the present invention further provides a video data processing module for processing the original data of a video, which is characterized by including: a compression module adapted to compress the original data of the video to form compressed data; a decoder adapted to decode the compressed data; a detection module adapted to detect the decoding process to obtain error frames and error positions; a calculation module adapted to obtain a reference frame based on the error frames; and adapted to obtain a reference position of the reference frame based on the error positions; and adapted to obtain reference compressed data corresponding to the reference position; and adapted to use the reference compressed data to replace the compressed data corresponding to the error position of the error frame; and adapted to transmit the replaced compressed data to the decoder for decoding.
[0008] Accordingly, an embodiment of the present invention further provides a chip, including the foregoing video data processing module.
[0009] Accordingly, an embodiment of the present invention further provides a storage medium storing one or more computer instructions for implementing the foregoing video data processing method.
[0010] Compared with the prior art, the technical solution of the embodiment of the present invention has the following advantages:
[0011] An embodiment of the present invention provides a video data processing method. After detecting the decoding process of the compressed data to obtain error frames and error positions, a reference frame is obtained based on the error frames; a reference position of the reference frame is obtained based on the error positions; reference compressed data corresponding to the reference position is obtained, the reference compressed data is used to replace the compressed data corresponding to the error position of the error frame, and the replaced compressed data is decoded. That is to say, the embodiment of the present invention uses the reference compressed data corresponding to the reference position to replace the compressed data at the error position and decodes the replaced compressed data in real time, so that the image information at the reference position can replace the image information at the error position in real time. During the video playback process, using the phenomenon of persistence of vision, the viewer will not feel abrupt about the image information after the replacement at the error position, which is beneficial to improving the picture quality of the video and enhancing the viewer's perception of the video picture quality.
[0012] In an alternative embodiment, the step of compressing the original data of the video to form compressed data includes: extracting the volume data from the original data; storing the volume data; and obtaining the head address information corresponding to the volume data according to the storage address and storage length of the volume data. In the embodiment of the present invention, the head address information and the volume data are stored separately. Subsequently, during the decoding process of the compressed data, the head address information corresponding to the error position of the error frame is detected and obtained. After obtaining the head address information corresponding to the reference position of the reference frame based on the head address information of the error position, the reference volume data corresponding to the head address information of the reference position can be quickly obtained, greatly improving the addressing efficiency, facilitating real-time decoding, and playing a role in covering the decoding error position in real time, thereby improving the video quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a schematic flowchart of the video data processing method according to the embodiment of the present invention;
[0014] Figure 2 is a schematic flowchart of forming compressed data in step 1 according to the embodiment of the present invention;
[0015] Figure 3 is a schematic diagram of the volume data stored in 4Kpage(m) in step 1 according to the embodiment of the present invention;
[0016] Figure 4 is a schematic diagram of the volume data stored in 4Kpage(m + 1) in step 1 according to the embodiment of the present invention;
[0017] Figure 5 is a schematic diagram of the head address information stored in a 4K page in step 1 according to the embodiment of the present invention;
[0018] Figure 6 is a schematic diagram of the first head address information and the first head address information in the error frame in step 4 according to the embodiment of the present invention;
[0019] Figure 7 is a schematic diagram of the first head address information and the second head address information in the reference frame in step 4 according to the embodiment of the present invention;
[0020] Figure 8 is a schematic flowchart of step 6 according to the embodiment of the present invention;
[0021] Figure 9 is a functional block diagram of the video data processing module according to the embodiment of the present invention;
[0022] Figure 10 is Figure 9 the functional block diagram of the compression module in
[0023] Figure 11 is Figure 9 the functional block diagram of the detection module in
[0024] Figure 12 is Figure 9 The functional block diagram of the calculation module in Detailed implementation manners
[0025] As can be seen from the background art, there are problems in the process of decoding the compressed bitstream in the prior art.
[0026] Specifically, the data redundancy after compression is greatly reduced. After transmission through an unreliable channel, errors may occur; errors will occur after decoding by the decoder, affecting the video quality. However, the errors occurring in the decoding of the compressed bitstream are more obvious than those in the decoding of the standard bitstream, and error concealment needs to be performed on the decoding errors caused by the compressed data errors.
[0027] The prior art does not perform error concealment on the decoding errors caused by the possible errors in the compressed bitstream data. Because the video error position is very obvious after the bitstream is compressed and decoded, the video quality is lower than that of the video with decoding errors in single compression, and without error concealment measures, the video quality will seriously decline.
[0028] The embodiment of the present invention provides a video data processing method for processing the original data of a video, including: compressing the original data of the video to form compressed data; decoding the compressed data and detecting the decoding process to obtain an error frame and an error position; obtaining a reference frame based on the error frame; obtaining a reference position of the reference frame based on the error position; obtaining reference compressed data corresponding to the reference position; using the reference compressed data to replace the compressed data corresponding to the error position of the error frame; and decoding the replaced compressed data.
[0029] To solve the above technical problems, an embodiment of the present invention provides a video data processing method, module, chip, and storage medium. The video data processing method detects the decoding process of the compressed data. After obtaining the error frame and error position, a reference frame is obtained based on the error frame; a reference position of the reference frame is obtained based on the error position; the reference compressed data corresponding to the reference position is obtained, and the compressed data corresponding to the error position of the error frame is replaced with the reference compressed data, and the replaced compressed data is decoded. That is to say, in the embodiment of the present invention, the compressed data corresponding to the reference position is used to replace the compressed data at the error position, and the replaced compressed data is decoded in real time, so that the image information at the reference position can replace the image information at the error position in real time. During the video playback process, using the Persistence of vision, the viewer will not feel abrupt about the image information after the replacement at the error position, which is beneficial to improving the picture quality of the video and enhancing the viewer's perception of the video picture quality.
[0030] Reference Figure 1 , which is a schematic flowchart of the video data processing method according to an embodiment of the present invention. The video data processing method is used to process the original data of the video.
[0031] The original data of the video includes color information and redundant information. Since there is a large amount of data redundancy in the original data of the video, there is a large amount of space that can be compressed. Specifically, the color information refers to the color space (YUV); the redundant information includes: temporal redundancy, spatial redundancy, coding redundancy, and visual redundancy information.
[0032] In this embodiment, the format of the video includes MPEG-1, MPEG-2, or MPEG-4, etc. MPEG1 needs to comply with ISO / IEC11172, and MPEG2 needs to comply with ISO / IEC13818.
[0033] Specifically, the step of providing the original data of the video includes: encoding and compressing the video data to form bitstream data.
[0034] The video data is a pixel representation form of dynamic images, with a huge amount of data. The storage space and transmission bandwidth are completely unable to meet the requirements of storage and transmission. The purpose of encoding and compressing the video data is to facilitate transmission through data compression. Specifically, generally, the amount of data after encoding and compression is about 5% of that before compression. In addition, encoding and compression can also make the information in the video data be represented by a bitstream in a specified form according to certain rules.
[0035] Specifically, during the process of encoding and compressing video data, the encoding and compression standards adopted include: AV1, H.264 / AVC, H.265 / HEVC, AVS2, VP9, etc. As an example, H.265 / HEVC is used to encode and compress video data. It has high resolution and can transmit higher-quality network videos under limited bandwidth. Compared with H.264 / AVC, it only requires half of the original bandwidth to play videos of the same quality, can improve compression efficiency, improve robustness and error recovery ability, reduce real-time latency, reduce channel acquisition time and random access latency, and reduce complexity, etc.
[0036] The step of providing the original data of the video further includes: decoding the bitstream data to form the original data of the video.
[0037] Decoding the bitstream data to form the original data of the video prepares for subsequent compression of the original data of the video to form compressed data.
[0038] It should be noted that after the video data is encoded and compressed, bitstream data is formed. The bitstream data is represented in a specified form according to the type of data. After the bitstream data is decoded to form the original data of the video, the original data of the video is arranged according to a certain syntax according to the content of the data. For example, the color information and redundant information in the original data have different syntaxes, which is convenient for extracting useful data information during subsequent data compression.
[0039] As Figure 2 shown, step S1 is executed to compress the original data of the video to form compressed data.
[0040] Compressing the original data of the video to form compressed data. Compared with the original data of the video, the amount of the compressed data is reduced, the occupied storage space is small, the bandwidth required during the transmission process is small, which facilitates the transmission and storage of data. Correspondingly, when the decoder is subsequently used to restore the compressed data into a digital signal to generate multiple frames of dynamic images, the occupied memory read / write bandwidth and space are small.
[0041] In this embodiment, the compression protocol includes a compression algorithm. In the step of compressing the original data of the video through the compression protocol to form compressed data, according to the compression algorithm of the compression protocol, the original data of the video is divided into multiple frames, each frame of the image is divided into multiple units, and each unit is divided into multiple compression blocks (block).
[0042] In this embodiment, the size of the compression block is associated with the bandwidth of the hardware and also depends on the output of the Loop Filter. As an example, the compression block is 64 pixels × 64 pixels.
[0043] Combined reference Figure 2 In this embodiment, the steps of compressing the original data of the video to form compressed data include:
[0044] Step S11, extract the volume data (Body) in the original data.
[0045] Extract the volume data in the original data for subsequent storage at the first position in the memory.
[0046] The steps of extracting the volume data in the original data include: extracting the color data in the original data; performing tree coding and rearrangement on the extracted color data as the volume data. The proportion of the color data in the quantity of the original data is small, and correspondingly, the data volume of the volume data is small, and the storage space and transmission bandwidth required for the volume data are small.
[0047] In this embodiment, the color information and redundant information in the original data have different grammars. In the process of extracting the volume data, it is the process of judging the color data according to the grammar differences between the color information and redundant information. In other embodiments, the volume data in the original data can also be extracted by means of data transformation of the original data.
[0048] Step S12, store the volume data.
[0049] Store the volume data for subsequent decoding of the volume data and restoring it to dynamic image pixels.
[0050] In the steps of forming the compressed data, the volume data is stored in the first position in the memory.
[0051] In this embodiment, a paged memory management unit (Memory Management Unit, MMU) is used to divide the memory into 4K pages. Specifically, the volume data is stored in 4K pages. The 4K pages are relatively large, and correspondingly, the memory occupied by the page table is small. In the case of the same number of entries in the Translation Look-aside Buffer (TLB), a larger memory can be tracked, improving the hit rate of the address translation cache; similarly, the number of writes to the disk can be reduced, improving disk I / O; in addition, the number of accesses to the buddy system can be reduced, improving cache utilization. In other embodiments, 8K pages can also be used for storage.
[0052] During the process of storing volume data, the paging memory management unit will preferentially allocate a blank 4K page with a physical address smaller than the current physical address. Therefore, the physical addresses of two adjacent 4K pages in sorting (such as 4K page(m) and 4K page(m + 1)) can be continuous or discontinuous, thus achieving the effect of making full use of and saving memory space.
[0053] As an example, the volume data is stored in units of 32 pixels × 4 pixels. The larger the area of the storage unit, the greater the power consumption of the corresponding fabricated chip during operation. The smaller the area of the storage unit, the lower the power consumption of the corresponding fabricated chip during operation. Considering the area and power consumption design requirements of the subsequent fabricated chip, and also considering that the loop filter in the subsequent processing module usually outputs 4 rows, the volume data is stored in units of 32 pixels × 4 pixels. In other embodiments, the length and width of the volume data can also be other values. For example: 64 pixels × 4 pixels.
[0054] In this embodiment, in the step of storing the volume data, 32 bits are used as the storage unit. 4K is 4096 bits. Dividing 4K by 32 bits can result in 128 storage units. It should be noted that the data volume of each volume data is different, and usually the data volume of the volume data occupies 1 to 8 storage units. In other embodiments, in the step of storing the volume data, 64 bits can also be used as the storage unit.
[0055] In this embodiment, the volume data is continuously stored at the first position in the memory. The continuous storage of the volume data at the first position in the memory is beneficial to saving memory space. Specifically, the volume data is continuously stored in a 4K page.
[0056] As Figure 3 shown, as a schematic, the continuous storage of the volume data at the first position in the memory is schematically illustrated.
[0057] The first volume data in 4K page(m) is Body(x). Body(x) starts to be stored from the first storage unit of the 4K page. The shown data volume of Body(x) occupies 5 storage units in the first row of 4K page(m). Body(x + 1) is the next volume data of Body(x). Since the principle of volume data storage is continuous storage, Body(x + 1) is stored immediately after Body(x), that is, Body(x + 1) starts to be stored from the sixth storage unit in the first row of 4K page(m).
[0058] In this embodiment, during the continuous storage of in-vivo data, when the space of the current 4K page is not sufficient to store the Body, it will continue to be stored in the next 4K page. Subsequently, after storing the in-vivo data at the first position in the memory, the header address information corresponding to the in-vivo data will be obtained according to the storage address and storage length of the in-vivo data. Since the 4K page is divided by the paged memory management unit (MMU) in the memory, if an in-vivo data is continuously stored in two 4K pages during the storage process, correspondingly, one in-vivo data corresponds to two header address information Headers, which will waste memory space, and in the subsequent decoding process, two header address information need to be read to obtain the data volume of the in-vivo data of a storage unit, which is likely to slow down the decoding rate. Therefore, the in-vivo data is stored in one 4K page, and correspondingly, only one header address information will be generated. In the subsequent decoding process, by reading one header address information, the data information of one in-vivo data can be obtained, which is beneficial to improving the decoded data.
[0059] Specifically, the step of storing the in-vivo data at the first position in the memory includes: determining whether the remaining space of the first 4K page can accommodate the in-vivo data; when it is determined that the remaining space of the first 4K page can accommodate the in-vivo data, writing the in-vivo data into the remaining space of the first 4K page; when it is determined that the remaining space of the first 4K page cannot accommodate the in-vivo data, writing the in-vivo data into the space of the second 4K page.
[0060] As an example, such as Figure 3 and Figure 4 , during the storage process of the in-vivo data, after the in-vivo data Body(y) is stored, if there are still 3 pixel units of 32 pixels × 4 pixels available for storing the in-vivo data in the 4K page(m), and the data volume of Body(y + 1) is more than 3 pixel units of 32 pixels × 4 pixels, then it will be stored in the page of 4K page(m + 1).
[0061] Step S13, obtain the header address information (Header) corresponding to the in-vivo data according to the storage address and storage length of the in-vivo data.
[0062] The header address information includes the storage address and storage length of the corresponding in-vivo data, which is convenient for subsequently being able to quickly read the in-vivo data corresponding to the header address information according to the header address information and improve the addressing efficiency.
[0063] It should be noted that the header address information is stored at the second position in the memory. Specifically, the header address information is stored in the 4K page.
[0064] In an embodiment of the present invention, the second position of the memory and the first position of the memory are in different regions of the memory. The head address information and the body data are stored separately. Subsequently, during the decoding process of the compressed data, the head address information corresponding to the error position of the error frame is obtained through detection. After obtaining the head address information corresponding to the reference position of the reference frame based on the head address information of the error position, the reference body data corresponding to the obtained head address information of the reference position can be quickly obtained, greatly improving the addressing efficiency, facilitating real-time decoding, playing the role of covering the error position of the decoding in real time, and improving the video quality.
[0065] In this embodiment, the step of storing the head address information in the second position of the memory includes: the head address information is stored in a matrix arrangement of every two columns and 16 rows per column. As an example, as Figure 5 shown by the dashed box in the figure, the zeroth head address information and the first head address information are located in the first row, the second head address information and the third head address information are located in the second row, and the second head address information is below the zeroth head address information, and the third head address information is below the first head address information, arranged in this way. Since in the step of storing the body data, most of the compression blocks of the units are 64 pixels × 64 pixels, therefore, the head address information is stored in a matrix arrangement of every two columns and 16 rows per column. During the decoding process, the widths of two body data add up to 64 pixels, and the heights of 16 body data add up to 64 pixels, which can form 64 pixels × 64 pixels. Specifically, it is beneficial to improve the decoding efficiency during the decoding process.
[0066] In this embodiment, the memory space occupied by each piece of head address information is 32bit.
[0067] Execute step S2 to decode the compressed data and detect the decoded data to obtain the error frame and the error position.
[0068] The dynamic image pixels of the video are obtained by decoding the compressed data.
[0069] The step of decoding the compressed data includes: sequentially reading the body data corresponding to the head address information and decoding the body data. Since the body data and the head address information are in one-to-one correspondence, the body data corresponding to the head address information can be quickly read according to the head address information, and the addressing efficiency is relatively high.
[0070] In this embodiment, a decoder is used to decode the compressed data. The decoder can decode the bitstreams conforming to protocols such as H.265 protocol, VP9 protocol, AV1 protocol, or AVS2 protocol.
[0071] In this embodiment, during the process of decoding the compressed data, the resolution data of the video, the number of decoded frames, and the leading address information corresponding to each frame are obtained.
[0072] The resolution of the video prepares for subsequent acquisition of the reference position. The resolution data of the video is information that originally exists in the original data of the video. During the process of using a decoder to decode the compressed data, the information of the video resolution can be obtained.
[0073] The number of decoded frames and the leading address information corresponding to each frame are used for subsequent acquisition of reference frames and reference positions. During the process of using a decoder to decode the compressed data, the number of decoded frames and the leading address information corresponding to each frame can be obtained.
[0074] Specifically, during the process of decoding the compressed data, the leading address information of each frame is read according to the decoder.
[0075] In this embodiment, the leading address information refers to the leading address information corresponding to the compression of the first 32 pixels × 4 pixels in each frame of the image.
[0076] In this embodiment, the steps of detecting the decoding process to obtain error frames and error positions include: when decoding the volume data corresponding to the first leading address information x1, a decoding error occurs, and the first leading address information x1 is used as the error position; among the leading address information of the decoded frames, the leading address information closest to the first leading address information x1 is used as the first leading address information x0, and the error frame is obtained based on the first leading address information x0.
[0077] In this embodiment, in the steps of detecting the decoding process of the compressed data, one or more of microcode detection, hardware decoder detection, position information detection, and number detection are used.
[0078] The microcode detection is used to detect syntax errors in the Header, for example: address mismatch, or read length exceeding the 4K boundary.
[0079] The hardware decoder detection is used to detect errors where the macroblock does not conform to the standard, for example, the standard is 32x4 pixel compression but is decoded into other sizes.
[0080] The position information detection and number detection are used to determine whether errors occur in the position and number of the decoded macroblocks.
[0081] Execute step S3 to obtain a reference frame based on the error frame. Obtaining the reference frame is used to obtain the reference position of the reference frame according to the error position subsequently.
[0082] In this embodiment, the reference frame includes the previous frame of the error frame. The decoded compressed data is converted into a video. Video playback is based on the visual pause phenomenon of humans. The video is composed of multiple frames of images, and the changes between adjacent frames of images are small. Therefore, the previous frame of the error frame is selected as the reference frame. The difference in image information between the reference frame position and the error position is small, resulting in a high degree of restoration of the image at the error position, which is beneficial to improving the video quality.
[0083] Specifically, the step of obtaining the reference frame based on the error frame includes: taking the leading address information adjacent to the first leading address information x0 in the decoded leading address information as the second leading address information y0, and the frame where the second leading address information y0 is located is the reference frame.
[0084] In other embodiments, the reference frame may further include the second frame in front of the error frame.
[0085] Execute step S4, as Figure 6 and Figure 7 shown, obtain the reference position of the reference frame based on the error position.
[0086] Obtaining the reference position of the reference frame is for subsequent obtaining of the reference compressed data corresponding to the reference position.
[0087] Specifically, the step of obtaining the reference position of the reference frame based on the error position includes: according to the positional relationship between the first head address information x1 (as Figure 6 shown), the first leading address information x0 (as Figure 6 shown), and in combination with the second leading address information y0 (as Figure 7 shown), obtain the second head address information y1 (as Figure 7 shown) corresponding to the first head address information x1 in the reference frame, and the second head address information y1 is used as the reference position.
[0088] Specifically, the relationship between the first head address information x1, the first leading address information x0, the second head address information y1, and the second leading address information y0 is:
[0089] x1 - x0 = y1 - y0;
[0090] Correspondingly, the second head address information y1 = y0 + x1 - x0.
[0091] Execute step S5: Obtain the reference compressed data corresponding to the reference position.
[0092] The reference compressed data refers to the reference body data corresponding to the reference position, and the reference body data is subsequently used to replace the compressed data corresponding to the error position.
[0093] In this embodiment, the step of obtaining the reference compression data corresponding to the reference position includes: obtaining the reference volume data corresponding to the second head address information y1.
[0094] The head address information corresponds to the volume data. Accordingly, the reference volume data corresponding to the second head address information y1 can be quickly called according to the second head address information y1, reducing the amount of data processed during the addressing process, greatly improving the addressing efficiency, performing real-time decoding, and playing a role in covering the error position in real time, which can improve the imaging quality of the video.
[0095] Execute step S6: Replace the compression data corresponding to the error position of the error frame with the reference compression data.
[0096] In the embodiment of the present invention, the compression data at the error position is replaced with the reference compression data corresponding to the reference position, and the replaced compression data is decoded in real time, so that the image information at the reference position can replace the image information at the error position in real time. During the video playback process, due to the persistence of vision, the viewer will not feel abrupt about the image information after the error position is replaced, which is beneficial to improving the picture texture of the video and enhancing the viewer's perception of the video picture quality.
[0097] Specifically, in combination with the reference Figure 8 , execute step S6 to replace the compression data corresponding to the error position of the error frame with the reference compression data. Step S6 includes:
[0098] Step S61, sequentially store the reference volume data into a first-in first-out queue (FIFO). First-in first-out (FIFO) means that the first instruction entered is completed and retired first, and then the second instruction is executed.
[0099] Step S62, sequentially write the reference volume data in the first-in first-out queue into the memory.
[0100] Specifically, the reference volume data is sequentially written into the first position in the memory, which can make full use of the memory space and achieve the effect of saving the memory space.
[0101] Step S63, generate the third head address information x3 according to the storage address of the reference volume data in the memory and the storage length of the volume data.
[0102] The third head address information x3 is used to subsequently overwrite the first head address information x1.
[0103] Step S64, overwrite the first head address information x1 with the third head address information.
[0104] The third head address information covers the first head address information x1. During subsequent decoding, the reference body data corresponding to the third head address information will be called accordingly and decoded into data information.
[0105] Execute step S7 to decode the replaced compressed data.
[0106] Perform real-time decoding on the replaced compressed data, so that the image information at the reference position can replace the image information at the wrong position in real time. During video playback, it is beneficial to improve the picture quality of the video and enhance the viewer's perception of the video picture quality.
[0107] In this embodiment, the decoder is used to decode the replaced compressed data. The decoder can decode reference compressed data conforming to the H.265 protocol, VP9 protocol, AV1 protocol, or AVS2 protocol.
[0108] The decoder decodes the replaced compressed data by calling the third head address information x3.
[0109] It should be noted that the video data processing method further includes: after decoding the replaced compressed data, detecting the decoding process of the replaced compressed data.
[0110] Detecting the decoding process of the replaced compressed data to ensure that the decoded video has high image quality.
[0111] In the step of detecting the decoding process of the replaced compressed data, if no problem occurs, decode the body data corresponding to the next head address information.
[0112] During the process of detecting the decoding process of the replaced compressed data, if a problem occurs, perform steps S1 to S7 of the video processing method again until no problem occurs in the decoding process.
[0113] Correspondingly, an embodiment of the present invention further provides a video data processing module. Refer to Figure 9 It is a functional block diagram of the video data processing module according to the embodiment of the present invention.
[0114] A video data processing module is used to process the original data of a video. The video data processing module includes: a compression module 10 adapted to compress the original data of the video to form compressed data; a decoder 20 adapted to decode the compressed data; a detection module 30 for detecting the decoding process to obtain error frames and error positions; a calculation module 40 adapted to obtain a reference frame based on the error frames; and adapted to obtain a reference position of the reference frame based on the error positions; and adapted to obtain reference compressed data corresponding to the reference position; and adapted to use the reference compressed data to replace the compressed data corresponding to the error position of the error frame; and adapted to transmit the replaced compressed data to the decoder for decoding.
[0115] In this embodiment, the compressed data at the error position is replaced with the reference compressed data corresponding to the reference position, and the replaced compressed data is decoded in real time, so that the image information at the reference position can replace the image information at the error position in real time. During the video playback process, due to the persistence of vision, the viewer will not feel abrupt about the image information after replacement at the error position, which is beneficial to improving the picture quality of the video and enhancing the viewer's perception of the video picture quality.
[0116] The original data of the video contains color information and redundant information. Since there is a large amount of data redundancy in the original data of the video, there is a large amount of space that can be compressed. Specifically, the color information refers to the color space (YUV); the redundant information includes: temporal redundancy, spatial redundancy, coding redundancy, and visual redundancy information.
[0117] The original data of the video is arranged according to a certain syntax according to the content of the data. For example, the color information, redundant information, and tree coding information in the original data have different syntaxes, which is convenient for extracting useful data information during subsequent data compression.
[0118] The compression module 10 is adapted to compress the original data of the video to form compressed data.
[0119] The compression module 10 compresses the original data of the video to form compressed data. Compared with the original data of the video, the amount of data of the compressed data is reduced, the occupied storage space is small, and the bandwidth required during the transmission process is small, which facilitates the transmission and storage of data. Correspondingly, when the decoder is subsequently used to restore the compressed data into a digital signal to generate multiple frames of dynamic images, the occupied memory read / write bandwidth and space are small.
[0120] The compression protocol includes a compression algorithm. In the step of compressing the original data of the video through the compression protocol to form compressed data, according to the compression algorithm of the compression protocol, the original data of the video is divided into multiple frames, each frame of the image is divided into multiple units, and each unit is divided into multiple compression blocks (block).
[0121] In this embodiment, the size of the compression block is associated with the bandwidth of the hardware and also depends on the output of the Loop Filter. As an example, the compression block is 64 pixels × 64 pixels.
[0122] As Figure 10 shown, the compression module 10 includes: an extraction unit 11 adapted to extract the volume data from the original data.
[0123] The extraction unit 11 performs tree coding and rearrangement on the original data of the video as volume data. The volume data in the original data is extracted for subsequent storage at the first location in the memory.
[0124] The volume data includes: color data after tree coding and rearrangement.
[0125] The proportion of the color data in the original data is small, and correspondingly, the data volume of the volume data is small, and the storage space and transmission bandwidth required for the volume data are small.
[0126] In this embodiment, the color information and redundant information in the original data have different grammars in tree coding. In the process of extracting the volume data, the color data is determined according to the grammar differences between the color information and the redundant information. In other embodiments, the volume data in the original data can also be extracted by performing data transformation on the original data.
[0127] As Figure 10 shown, the compression module 10 includes: a volume data storage unit 12 adapted to store the volume data.
[0128] The volume data storage unit 12 stores the volume data for subsequent decoding of the volume data and restoring it to dynamic image pixels.
[0129] In this embodiment, the volume data is stored at the first location in the memory. Specifically, the volume data is stored at the first location in the memory through a central processing unit (CPU) and a bus.
[0130] In this embodiment, a paged memory management unit (MMU) is used to divide the memory into 4K pages. Specifically, the volume data is stored in 4K pages. Since the 4K pages are relatively large, the memory occupied by the corresponding page table is small. With the same number of entries in the Translation Look-aside Buffer (TLB), a larger memory can be tracked, improving the hit rate of the translation look-aside buffer. Similarly, the number of writes to the disk can be reduced, improving disk I / O. In addition, the number of accesses to the buddy system can be reduced, improving cache utilization. In other embodiments, 8K pages can also be used for storage.
[0131] During the process of storing the volume data, the paged memory management unit will preferentially allocate a blank 4K page with a physical address less than the current physical address. Therefore, the physical addresses of two adjacent 4K pages (such as 4K page (m) and 4K page (m + 1)) in the sorting can be either continuous or discontinuous, thus achieving the effect of fully utilizing and saving memory space.
[0132] As an example, the volume data is stored in units of 32 pixels × 4 pixels. The larger the area of the storage unit, the greater the power consumption of the chip during operation. The smaller the area of the storage unit, the smaller the power consumption of the chip during operation. Considering the area and power consumption design requirements of the subsequent fabricated chip, and taking into account that the loop filter in the subsequent processing module usually outputs 4 rows, the volume data is stored in units of 32 pixels × 4 pixels. In other embodiments, the length and width of the volume data can also be other values. For example: 64 pixels × 4 pixels.
[0133] In this embodiment, in the step of storing the volume data, the storage unit is 32 bits. Since 4K is 4096 bits, dividing 4K into 32-bit units can result in 128 storage units. It should be noted that the amount of data contained in each volume data is different, and usually the amount of data of the volume data occupies 1 to 8 storage units. In other embodiments, in the step of storing the volume data, the storage unit can also be 64 bits.
[0134] In this embodiment, the volume data is continuously stored at the first position in the memory. Continuously storing the volume data at the first position in the memory is beneficial to saving memory space. Specifically, the volume data is continuously stored in 4K pages.
[0135] Combined Figure 3 , as an illustration, a schematic diagram of continuously storing the volume data at the first position in the memory is shown.
[0136] The first body data in the 4K page (m) is Body(x). Body(x) starts storing from the first storage unit of the 4K page, and the data volume of the shown Body(x) occupies 5 storage units in the first row of the 4K page (m). Body(x + 1) is the next body data of Body(x). Because the principle of body data storage is continuous storage, Body(x + 1) is stored immediately after Body(x), that is, Body(x + 1) starts storing from the sixth storage unit in the first row of the 4K page (m).
[0137] In this embodiment, during the continuous storage of body data, when the space of the current 4K page is not enough to hold the Body, it will continue to be stored in the next 4K page.
[0138] After storing the body data in the first position of the memory, the head address information corresponding to the body data will be obtained according to the storage address and storage length of the body data. Since the 4K page is divided by the paged memory management unit (MMU), if a body data is continuously stored in two 4K pages during the storage of body data, correspondingly, a body data corresponds to two head address information Headers, which will waste memory space, and in the subsequent decoding process, two head address information need to be read to obtain the data volume of the body data of a storage unit, which is likely to slow down the decoding rate. Therefore, the body data is stored in one 4K page, and correspondingly, only one head address information will be generated. In the subsequent decoding process, by reading one head address information, the data information of a body data can be obtained, which is beneficial to improving the decoded data.
[0139] The body data storage unit 12 includes: a judgment subunit 121 for judging whether the remaining space of the first 4K page can accommodate the reference body data; a writing subunit 122 for writing the reference body data into the remaining space of the first 4K page when it is judged that the remaining space of the first 4K page can accommodate the reference body data; and for writing the reference body data into the space of the second 4K page when it is judged that the remaining space of the first 4K page cannot accommodate the reference body data.
[0140] As an example, in combination with Figure 3 and Figure 4 , during the storage of body data, after the body data (y) is stored, if there are still 3 pixel units of 32 pixels × 4 pixels available for storing body data in the 4K page (m), and the data volume of Body(y + 1) is more than 3 pixel units of 32 pixels × 4 pixels, then it will be stored in the page of the 4K page (m + 1).
[0141] Such as Figure 10As shown, the compression module 10 includes: a header address information acquisition unit 13, adapted to obtain the header address information (Header) corresponding to the volume data according to the storage address and storage length of the volume data.
[0142] The header address information includes the storage address and storage length of the corresponding volume data, which facilitates the subsequent rapid reading of the volume data corresponding to the header address information according to the header address information, improving the addressing efficiency.
[0143] It should be noted that the header address information is stored in the second position of the memory. In this embodiment, the header address information is stored in a 4K page.
[0144] In the embodiment of the present invention, the second position of the memory and the first position of the memory are in different regions of the memory. The header address information and the volume data are stored separately. Subsequently, during the decoding process of the compressed data, the header address information corresponding to the error position of the error frame is detected, and after obtaining the header address information corresponding to the reference position of the reference frame according to the header address information of the error position, the reference volume data corresponding to the header address information corresponding to the reference position can be quickly obtained, greatly improving the addressing efficiency, which is beneficial to realizing real-time decoding and masking the error position of the decoding error in real time, thereby improving the video quality.
[0145] In this embodiment, the header address information is stored in a matrix arrangement of every two columns and 16 rows per column. As an example, as Figure 5 shown by the dashed box in the figure, the zeroth header address information and the first header address information are located in the first row, the second header address information and the third header address information are located in the second row, and the second header address information is located below the zeroth header address information, and the third header address information is located below the first header address information, arranged in this way. Because in the step of storing the volume data, most of the compression blocks of the units are 64 pixels × 64 pixels, therefore, the header address information is stored in a matrix arrangement of every two columns and 16 rows per column. During the decoding process, the widths of two volume data add up to 64 pixels, and the heights of 16 volume data add up to 64 pixels, which can form 64 pixels × 64 pixels. Specifically, it is beneficial to improve the decoding efficiency during the decoding process.
[0146] In this embodiment, the memory space occupied by each header address information is 32bit.
[0147] A decoder 20, adapted to decode the compressed data. The decoder 20 decodes the compressed data to obtain the dynamic image pixels of the video.
[0148] The decoder 20 is adapted to sequentially read the volume data corresponding to the header address information and decode the volume data. Since the volume data and the header address information are in one-to-one correspondence, the volume data corresponding to the header address information can be quickly read according to the header address information, and the addressing efficiency is relatively high.
[0149] In this embodiment, the decoder 20 is used to decode the compressed data. The decoder 20 can decode bitstreams conforming to protocols such as the H.265 protocol, VP9 protocol, AV1 protocol, or AVS2 protocol.
[0150] In this embodiment, the decoder 20 is adapted to obtain the resolution data of the video, the number of decoded frames, and the first header address information corresponding to each frame.
[0151] The resolution of the video prepares for the subsequent calculation module 40 to obtain the reference position. The resolution data of the video is information that originally exists in the original data of the video. During the process of using the decoder 20 to decode the compressed data, the information of the video resolution can be obtained.
[0152] The number of decoded frames and the first header address information corresponding to each frame are used to obtain the reference frame and the reference position subsequently. During the process of using the decoder 20 to decode the compressed data, the number of decoded frames and the first header address information corresponding to each frame can be obtained.
[0153] Specifically, during the process of decoding the compressed data, the first header address information of each frame is read according to the decoder 20 and the bus.
[0154] In this embodiment, the first header address information refers to the header address information corresponding to the compression of the first 32 pixels × 4 pixels in each frame of the image.
[0155] The detection module 30 is adapted to detect the decoding process and obtain the error frames and error positions.
[0156] The error frames are used to obtain the reference frames subsequently, and the error positions and error frames are used to obtain the reference positions of the reference frames subsequently.
[0157] As Figure 11 shown, the detection module 30 includes an error frame acquisition unit 41 and an error position acquisition unit 42: The error position acquisition unit 41 is adapted to, when decoding the volume data corresponding to the first header address information x1, an error occurs in the decoding, and the first header address information x1 is used as the error position; the error frame acquisition unit 42 is adapted to use the first header address information closest to the first header address information x1 among the first header address information of the decoded frames as the first first header address information x0, and obtain the error frame according to the first first header address information x0.
[0158] In this embodiment, the detections performed by the detection module 30 include one or more of: microcode detection, hardware decoder detection, position information detection, and quantity detection.
[0159] The microcode detection is used to detect syntax errors in the Header, such as: address mismatch, or read length exceeding the 4K boundary.
[0160] The hardware decoder detection is used to detect errors where the macroblock does not conform to the standard, such as when the standard is compression of 32x4 pixels but is decoded into other sizes.
[0161] The position information detection and quantity detection are used to determine whether there are errors in the position and quantity of the decoded macroblocks.
[0162] It should be noted that if no error is found during the process of the detection module 30 detecting the decoding process, the decoding of the next head address information continues.
[0163] As Figure 12 shown, the calculation module 40 includes: a reference frame acquisition unit 51, adapted to acquire a reference frame based on the error frame; a reference position acquisition unit 52, adapted to acquire a reference position of the reference frame based on the error position; a reference compressed data acquisition unit 53, adapted to acquire reference compressed data corresponding to the reference position; and a data replacement unit 54, adapted to replace the compressed data corresponding to the error position of the error frame with the reference compressed data.
[0164] In the embodiment of the present invention, the compressed data at the error position is replaced with the reference compressed data corresponding to the reference position, and the replaced compressed data is decoded, so that the image information at the reference position can replace the image information at the error position. During video playback, using the phenomenon of persistence of vision, real-time decoding and real-time masking of the decoded error position are achieved. The viewer will not feel abrupt about the image information after the replacement at the error position, which is beneficial to improving the picture quality of the video and enhancing the viewer's perception of the video picture quality.
[0165] The reference frame acquisition unit 51 is adapted to acquire the reference frame to prepare for subsequently acquiring the reference position of the reference frame according to the error position.
[0166] In this embodiment, the reference frame includes the previous frame of the error frame. The decoded compressed data is converted into a video. Video playback is based on the visual pause phenomenon of humans. The video is composed of multiple frames of images, and the changes between adjacent frames are relatively small. Therefore, the previous frame of the error frame is selected as the reference frame. Correspondingly, the difference in image information between the reference frame position and the error position is relatively small, resulting in a relatively high degree of image restoration at the error position, which is beneficial to improving the video quality.
[0167] Specifically, the reference frame acquisition unit 51 is adapted to use, as the second first header address information y0, the first header address information adjacent to the first first header address information x0 in the first completed header address information, and the frame where the second first header address information y0 is located is the reference frame.
[0168] In other embodiments, the reference frame may further include the second frame in front of the error frame
[0169] The reference position acquisition unit 52 is adapted to obtain the reference position of the reference frame based on the error position.
[0170] The reference position of the reference frame is used to obtain the reference compressed data corresponding to the reference position.
[0171] Specifically, the reference position acquisition unit 52 is adapted to obtain, based on the positional relationship between the first header address information x1 (as shown in Figure 6 ), the first first header address information x0 (as shown in Figure 6 ), and in combination with the second first header address information y0 (as shown in Figure 7 ), the second header address information y1 (as shown in Figure 7 ) corresponding to the first header address information x1 in the reference frame, and the second header address information y1 is used as the reference position.
[0172] Specifically, the relationship between the first header address information x1, the first first header address information x0, the second header address information y1, and the second first header address information y0 is:
[0173] x1 - x0 = y1 - y0;
[0174] Correspondingly, the second header address information y1 = y0 + x1 - x0.
[0175] The reference compressed data acquisition unit 53 is adapted to obtain the reference compressed data corresponding to the reference position.
[0176] The reference compressed data refers to the reference volume data corresponding to the reference position, and the reference volume data is the compressed data for later replacing the compressed data corresponding to the error position of the error frame.
[0177] Referring to the reference compressed data acquisition unit 53, it is adapted to acquire reference volume data corresponding to the second head address information y1.
[0178] The head address information corresponds to the volume data. Correspondingly, according to the second head address information y1, the reference volume data corresponding to the second head address information y1 can be quickly called, reducing the amount of data processed during the addressing process, greatly improving the addressing efficiency, performing real-time decoding, and masking the position of the decoding error in real time, which can improve the imaging quality of the video.
[0179] In this embodiment, the central processing unit is used to read the reference compressed data corresponding to the second head address information y1 through the bus.
[0180] The data replacement unit 54 is adapted to use the reference compressed data to replace the compressed data corresponding to the error position of the error frame.
[0181] In the embodiment of the present invention, the compressed data at the error position is replaced by the reference compressed data corresponding to the reference position, and the replaced compressed data is decoded in real time, so that the image information at the reference position can replace the image information at the error position in real time. During the video playback process, using the phenomenon of persistence of vision, the viewer will not feel abrupt about the image information after the replacement at the error position, which is beneficial to improving the picture texture of the video and enhancing the viewer's perception of the video picture quality.
[0182] As Figure 12 shown, the data replacement unit 54 includes: a reference volume data storage unit 541, which is adapted to sequentially store the reference volume data into a first-in-first-out queue. First-in-first-out (FIFO) means that the first instruction entered is completed and retired first, and then the second instruction is executed.
[0183] The data replacement unit 54 includes: a reference volume data writing unit 542, which is adapted to sequentially write the reference volume data in the first-in-first-out queue into the memory.
[0184] Specifically, the reference volume data is sequentially written into the first position in the memory, which can make full use of the memory space and achieve the effect of saving the memory space.
[0185] The data replacement unit 54 includes: a third head address information acquisition unit 543, which is adapted to generate third head address information x3 according to the storage address and storage length of the reference volume data in the memory.
[0186] The third head address information x3 is used to subsequently overwrite the first head address information x1.
[0187] The data replacement unit 54 includes: a covering unit 544, which is adapted to use the third head address information x3 to cover the first head address information x1.
[0188] The third head address information x3 covers the first head address information x1. In the subsequent decoding process, the reference body data corresponding to the third head address information x3 will be called accordingly and decoded into data information.
[0189] In this embodiment, the replaced compressed data is transmitted to the decoder 20 through the bus for decoding.
[0190] The decoder 20 is also adapted to decode the replaced compressed data.
[0191] The replaced compressed data is decoded in real time, so that the image information at the reference position can replace the image information at the wrong position in real time. During the video playback process, it is beneficial to improve the picture texture of the video and the quality perception of the viewer for the video picture.
[0192] In this embodiment, the decoder 20 is used to decode the replaced compressed data. The decoder 20 can decode the reference compressed data conforming to the H.265 protocol, VP9 protocol, AV1 protocol or AVS2 protocol.
[0193] The decoder 20 calls the replaced compressed data according to the third head address information x3 for decoding.
[0194] It should be noted that the video data processing method further includes: after decoding the replaced compressed data, detecting the decoding process of the replaced compressed data.
[0195] Detecting the decoding process of the replaced compressed data to ensure that the image quality of the decoded video is relatively high.
[0196] Detecting the decoding process of the replaced compressed data. If there is no problem, decoding the body data corresponding to the next head address information.
[0197] During the process of detecting the decoding process of the replaced compressed data, if there is a problem, the video processing module is used again for processing until there is no problem in the decoding process.
[0198] Correspondingly, an embodiment of the present invention further provides a chip, which includes the aforementioned video data processing module. For the video data processing module, please refer to the introduction in the foregoing part and will not be elaborated here.
[0199] Accordingly, an embodiment of the present invention further provides a storage medium storing one or more computer instructions for implementing the video data processing method provided by the embodiment of the present invention.
[0200] The storage medium is a computer-readable storage medium, which may be various media capable of storing program codes, such as a read-only memory (ROM), a random access memory (RAM), a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc.
[0201] The above embodiments of the present invention are combinations of elements and features of the present invention. Unless otherwise mentioned, the elements or features may be considered optional. Each element or feature may be practiced without combination with other elements or features. In addition, embodiments of the present invention may be constructed by combining some elements and / or features. The operation sequences described in the embodiments of the present invention may be rearranged. Some configurations of any embodiment may be included in another embodiment and replaced by corresponding configurations of another embodiment. It is obvious to those skilled in the art that claims without explicit reference relationships to each other in the appended claims may be combined into embodiments of the present invention or included as new claims in modifications after the filing of this application.
[0202] Embodiments of the present invention can be implemented by various means such as hardware, firmware, software, or combinations thereof. In a hardware configuration, the method according to an exemplary embodiment of the present invention can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, etc.
[0203] In a firmware or software configuration, embodiments of the present invention may be implemented in the form of modules, procedures, functions, etc. The software code may be stored in a memory unit and executed by a processor. The memory unit is located inside or outside the processor and can send data to and receive data from the processor via various known means.
[0204] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A video data processing method for processing the original data of a video, characterized in that, Including: Compressing the original data of the video to form compressed data. The steps of compressing the original data of the video to form compressed data include: extracting the volume data from the original data; storing the volume data; obtaining the header address information corresponding to the volume data according to the storage address and storage length of the volume data; The step of extracting the volume data from the original data includes: extracting the color data from the original data; performing tree coding and rearrangement on the extracted color data as the volume data. Decoding the compressed data and detecting the decoding process to obtain error frames and error positions. The steps of detecting the decoding process to obtain error frames and error positions include: when decoding to the volume data corresponding to the first header address information, an error occurs in the decoding, and the first header address information is used as the error position; decoding the compressed data to obtain the dynamic image pixels of the video. Obtaining a reference frame based on the error frame. Obtaining the reference position of the reference frame based on the error position. Obtaining the reference compressed data corresponding to the reference position. Using the reference compressed data to replace the compressed data corresponding to the error position of the error frame. Decoding the replaced compressed data so that the image information at the reference position can replace the image information at the error position in real time.
2. The video data processing method according to claim 1, wherein In the step of forming the compressed data, the volume data is stored in the first position of the memory, and the header address information is stored in the second position of the memory. The second position of the memory is different from the first position of the memory.
3. The video data processing method according to claim 1, wherein In the step of storing the volume data in the first position of the memory, the memory is a 4K page. The step of storing the volume data in the first position of the memory includes: judging whether the remaining space of the first 4K page can accommodate the volume data. When judging that the remaining space of the first 4K page can accommodate the volume data, writing the volume data into the remaining space of the first 4K page. When judging that the remaining space of the first 4K page cannot accommodate the volume data, writing the volume data into the second 4K page.
4. The video data processing method according to claim 2, wherein The step of storing the header address information in the second position of the memory includes: storing the header address information in a matrix arrangement of every two columns and 16 rows per column.
5. The video data processing method according to claim 1, wherein During the process of decoding the compressed data, obtaining the resolution data of the video, the number of decoded complete frames, and the first header address information corresponding to each frame.
6. The video data processing method according to claim 5, characterized in that, The step of decoding the compressed data includes: sequentially reading the volume data corresponding to the header address information and decoding the volume data.
7. The video data processing method according to claim 6, wherein The steps of detecting the decoding process to obtain error frames and error positions further include: Taking the first earliest header address information closest to the first header address information among the decoded earliest header address information as the first earliest header address information, and obtaining the error frame based on the first earliest header address information.
8. The video data processing method according to claim 7, wherein, The step of obtaining a reference frame based on the error frame includes: Taking the earliest header address information adjacent to the first earliest header address information among the decoded earliest header address information as the second earliest header address information, and the frame where the second earliest header address information is located is the reference frame.
9. The video data processing method according to claim 8, wherein The steps of obtaining the reference position of the reference frame based on the error position include: Based on the positional relationship between the first head address information and the first leading head address information, and in combination with the second leading head address information, obtain the second head address information in the reference frame corresponding to the first head address information; The steps of obtaining the reference compressed data corresponding to the reference position include: obtaining the reference volume data corresponding to the second head address information.
10. The video data processing method according to claim 9, wherein, The steps of using the reference compressed data to replace the compressed data corresponding to the error position of the error frame include: Sequentially store the reference volume data into a first-in-first-out queue; Sequentially write the reference volume data in the first-in-first-out queue into the memory; Generate the third head address information according to the storage address of the reference volume data in the memory and the storage length of the volume data; Use the third head address information to overwrite the first head address information.
11. The video data processing method according to claim 1, wherein In the steps of detecting the decoding process of the compressed data, one or more of microcode detection, hardware decoder detection, position information detection, and number detection are adopted.
12. A video data processing module for processing the original data of a video, characterized in that, Include: A compression module, adapted to compress the original data of the video to form compressed data. The compression module includes: an extraction unit, adapted to extract the volume data from the original data; a volume data storage unit, adapted to store the volume data; a head address information acquisition unit, adapted to obtain the head address information corresponding to the volume data according to the storage address and storage length of the volume data; the volume data includes color data after tree coding and rearrangement; A decoder, adapted to decode the compressed data to obtain the dynamic image pixels of the video; A detection module, adapted to detect the decoding process and obtain the error frame and the error position; the detection module includes an error position acquisition unit, which is adapted to decode the volume data corresponding to the first head address information and an error occurs during decoding, and the first head address information is used as the error position; A calculation module, adapted to obtain a reference frame based on the error frame; and adapted to obtain the reference position of the reference frame based on the error position; and adapted to obtain the reference compressed data corresponding to the reference position; and adapted to use the reference compressed data to replace the compressed data corresponding to the error position of the error frame; and adapted to transmit the replaced compressed data to the decoder for decoding, so that the image information at the reference position can replace the image information at the error position in real time.
13. The video data processing module according to claim 12, wherein The volume data is stored in the first position of the memory, the head address information is stored in the second position of the memory, and the second position of the memory is different from the first position of the memory.
14. The video data processing module according to claim 12, characterized in that, The volume data is stored in the memory, and the memory includes 4K pages; The volume data storage unit includes: A judgment subunit, used to judge whether the remaining space of the first 4K page can accommodate the reference volume data; a writing subunit, used to write the reference volume data into the remaining space of the first 4K page when it is judged that the remaining space of the first 4K page can accommodate the reference volume data; and is also used to write the reference volume data into the space of the second 4K page when it is judged that the remaining space of the first 4K page cannot accommodate the reference volume data.
15. The video data processing module according to claim 12, characterized in that, The head address information is stored in a matrix arrangement with every two columns and 16 rows in each column.
16. The video data processing module according to claim 12, characterized in that, The decoder is adapted to obtain the resolution data of the video, the number of decoded complete frames, and the first head address information corresponding to each frame.
17. The video data processing module according to claim 16, wherein The decoder is adapted to sequentially read the body data corresponding to the head address information and decode the body data.
18. The video data processing module according to claim 17, characterized in that, The detection module further includes an error frame acquisition unit, which is adapted to use, as the first earliest head address information, the earliest head address information closest to the first head address information among the earliest head address information of the decoded complete frames, and obtain the error frame based on the first earliest head address information.
19. The video data processing module according to claim 18, wherein The calculation module includes a reference frame acquisition unit, which is adapted to use, as the second earliest head address information, the earliest head address information adjacent to the first earliest head address information among the earliest head address information of the decoded complete frames, and the frame where the second earliest head address information is located is the reference frame.
20. The video data processing module according to claim 19, characterized in that, The calculation module includes a reference position acquisition unit, which is adapted to obtain, according to the positional relationship between the first head address information and the first earliest head address information and in combination with the second earliest head address information, the second head address information corresponding to the first head address information in the reference frame; The calculation module includes the reference compressed data acquisition unit, which is adapted to acquire the reference body data corresponding to the second head address information.
21. The video data processing module according to claim 20, wherein The calculation module includes a data replacement unit, which includes: a reference body data storage unit, which is adapted to sequentially store the reference body data into a first-in-first-out queue; a reference body data writing unit, which is adapted to sequentially write the reference body data in the first-in-first-out queue into the memory; a third head address information acquisition unit, which is adapted to generate third head address information according to the storage address of the reference body data in the memory and the storage length of the body data; an overwrite unit, which is adapted to overwrite the first head address information with the third head address information.
22. The video data processing module according to claim 12, wherein The detection adopted by the detection module includes one or more of: microcode detection, hardware decoder detection, position information detection, and number detection.
23. A chip, characterized in that: including: The video data processing module according to any one of claims 12 to 22.
24. A storage medium, characterized in that, The storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the video data processing method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Video data recovery method and device
CN109120943A