Decoding error block processing method and device, computer equipment and storage medium
By performing scene switching detection and attribute data statistics on the decoded frame during the video decoding process, determining the attribute characteristics of the decoded error block and performing recovery processing, the problem of inaccurate recovery of the decoded error block in the prior art is solved, and the video decoding quality is improved .
Patent Information
- Application Number
- CN202411625830.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art cannot effectively ensure the recovery accuracy of decoding error blocks during video decoding, resulting in large-scale screen spills.
By obtaining the image information to be processed in the current decoded frame, performing scene switching detection, counting attribute data, determining attribute characteristics of the decoded error block, and performing recovery processing based on these features.
It improves the accuracy of decoding error block recovery during video decoding, and reduces the occurrence of large-area screen spans.
Smart Images

Figure CN119402675A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video image processing, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for processing decoding error blocks. Background Art
[0002] The decoding error detection and decoding error image recovery algorithm of the video decoder triggers the corresponding error handling function of the decoder according to the type of decoding error detected. The decoding error block image recovery algorithm in the decoder is the key to affecting the quality of the decoding error block image. The video decoding sequence has the attribute of inter-decoding frame reference dependency, so the quality of the referenced decoded frame image will affect the quality of the decoded frame image with it as the reference frame.
[0003] At present, the relevant technology uses the same algorithm to recover decoding error blocks for different frames in the video, but there are differences between different types of frames. The relevant scheme cannot guarantee the accuracy of video decoding error block recovery, which may result in incomplete recovery of decoding error blocks, resulting in large-area screen distortion. Summary of the invention
[0004] Based on this, it is necessary to provide a decoding error block processing method, device, computer equipment, computer readable storage medium and computer program product that can improve the accuracy of decoding error block recovery during video decoding in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a method for processing a decoding error block, comprising:
[0006] Get the image information to be processed of the current decoded frame;
[0007] According to the image information to be processed, performing scene switching detection on the current decoded frame to obtain a current frame type;
[0008] In the case where the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of the decoding error block according to the attribute data;
[0009] The decoding error block is restored according to the attribute characteristics.
[0010] In one of the embodiments, performing scene switching detection on the current decoded frame according to the image information to be processed to obtain the current frame type includes:
[0011] Calculating a reference frequency of the current decoded frame according to the image information to be processed and image information corresponding to a subsequent decoded frame of the current decoded frame;
[0012] Using the current decoded frame as a reference frame, constructing a bitstream data set;
[0013] A scene switching detection is performed on the current decoded frame according to the reference frequency and the bitstream data set to obtain a current frame type.
[0014] In one of the embodiments, calculating the reference frequency of the current decoded frame according to the image information to be processed and the image information corresponding to the subsequent decoded frame of the current decoded frame includes:
[0015] Acquire a detection range threshold according to the image information to be processed;
[0016] According to the detection range threshold, acquiring image information corresponding to a plurality of subsequent decoded frames of the current decoded frame;
[0017] According to the image information, the number of times the current decoded frame is referenced by the subsequent decoded frame is counted, and the reference frequency of the current decoded frame is calculated.
[0018] In one embodiment, the counting of attribute data of the current decoded frame includes:
[0019] Calculating total area data of adjacent decoding blocks of a target decoding error block in the current decoding frame;
[0020] Calculate the characteristic area data of the adjacent decoding blocks that meet the target attribute characteristics;
[0021] The attribute data of the current decoding frame is obtained according to the total area data and the characteristic area data.
[0022] In one of the embodiments, the recovering the decoded error block according to the attribute characteristics includes:
[0023] Determining the texture property of the area where the decoding error block is located according to the property feature;
[0024] A corresponding processing mode is selected according to the texture attribute, and recovery processing is performed on the decoded error block.
[0025] In one of the embodiments, the texture attribute includes a texture complexity attribute and a texture smoothness attribute; the selecting a corresponding processing mode according to the texture attribute to perform recovery processing on the decoded error block includes:
[0026] In the case where the decoding error block exists in a region with complex texture attributes, the decoding error block is restored by using an intra-frame prediction filling mode;
[0027] In the case that the decoding error block exists in the texture smoothness attribute area, the decoding error block is restored by copying the image data of the decoded block.
[0028] In a second aspect, the present application further provides a decoding error block processing device, comprising:
[0029] An information acquisition module, used to acquire the image information to be processed of the current decoded frame;
[0030] A scene detection module, used to perform scene switching detection on the current decoded frame according to the image information to be processed, and obtain the current frame type;
[0031] a feature extraction module, configured to, when the current frame type is a scene switching frame, collect attribute data of the current decoded frame, and determine at least one attribute feature of the decoded error block according to the attribute data;
[0032] A decoding processing module is used to perform recovery processing on the decoding error block according to the attribute characteristics.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Get the image information to be processed of the current decoded frame;
[0035] According to the image information to be processed, performing scene switching detection on the current decoded frame to obtain a current frame type;
[0036] In the case where the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of the decoding error block according to the attribute data;
[0037] The decoding error block is restored according to the attribute characteristics.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0039] Get the image information to be processed of the current decoded frame;
[0040] According to the image information to be processed, performing scene switching detection on the current decoded frame to obtain a current frame type;
[0041] In the case where the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of the decoding error block according to the attribute data;
[0042] The decoding error block is restored according to the attribute characteristics.
[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0044] Get the image information to be processed of the current decoded frame;
[0045] According to the image information to be processed, performing scene switching detection on the current decoded frame to obtain a current frame type;
[0046] In the case where the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of the decoding error block according to the attribute data;
[0047] The decoding error block is restored according to the attribute characteristics.
[0048] The above-mentioned decoding error block processing method, device, computer equipment, storage medium and computer program product obtain the image information to be processed of the current decoding frame, perform scene switching detection on the current decoding frame, and obtain the current frame type. When the current frame type is a scene switching frame, the current decoding frame has the characteristic of a high probability of being referenced. The quality of the decoded image of the scene switching frame in the video largely determines the quality of the subsequent decoded frame image of the video sequence. Therefore, by counting the attribute data of the current decoding frame, determining at least one attribute feature of the decoding error block according to the attribute data, and then recovering the decoding error block according to the attribute feature, it is possible to more accurately perform decoding processing on the scene switching frame, thereby improving the accuracy of decoding error block recovery during video decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] FIG1 is an application environment diagram of a method for processing a decoding error block in one embodiment;
[0051] FIG2 is a schematic flow chart of a method for processing a decoding error block in one embodiment;
[0052] FIG3 is a schematic diagram of the relative position relationship between the current decoding block C and the adjacent blocks in one embodiment;
[0053] FIG4 is a schematic diagram of intra-frame angle prediction mode mapping in one embodiment;
[0054] FIG5 is a schematic diagram of the intra-frame copy block copy relationship in one embodiment;
[0055] FIG6 is a schematic flow chart of step S204 of a method for processing a decoding error block in one embodiment;
[0056] FIG7 is a structural block diagram of a decoding error block processing device according to an embodiment;
[0057] FIG8 is a diagram showing the internal structure of a computer device in one embodiment;
[0058] FIG. 9 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] The decoding error block processing method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network, and the terminal 102 can be used to obtain each frame image in the video to be processed. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store the image information to be processed of each frame to be decoded in the video, as well as the attribute data of each decoded frame. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can include a data processing module in the software part and a video decoder in the hardware part. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0061] In an exemplary embodiment, as shown in FIG2 , a method for processing decoding error blocks is provided, and the method is applied to the server 104 in FIG1 as an example for description, including the following steps S202 to S208. Among them:
[0062] Step S202, obtaining the image information to be processed of the current decoded frame.
[0063] The image information to be processed may include information such as the code stream size of the current decoded frame, the decoding block area, etc. Exemplarily, the server 104 may obtain the image information to be processed of the current decoded frame from the terminal 102 when a decoding error occurs.
[0064] Step S204: Perform scene switching detection on the current decoded frame according to the image information to be processed to obtain the current frame type.
[0065] Among them, the current frame type can be a scene switching type, in which case the current decoded frame is a scene switching frame. A scene switching frame refers to a decoded frame between two different scenes in a video during the video decoding process. This decoded frame contains complete picture information and is used to mark the beginning and end of the scene. When the video plays to a scene switching frame, the decoder can quickly obtain a complete image without relying on data from other frames. In a video stream, scene switching frames are used for smooth transitions, thereby reducing stuttering during playback and ensuring smooth switching of images; when a scene ends, the decoder will find the next scene switching frame and quickly load a new scene to achieve a seamless transition.
[0066] For example, when the reference frequency of the current decoded frame is relatively high, it can be considered that the probability of the current decoded frame being a scene switching frame in the video is also relatively high. The server 104 can determine whether the current decoded frame is a scene switching frame by obtaining a preset number of decoded frames subsequent to the current decoded frame.
[0067] Step S206: when the current frame type is a scene switching frame, the attribute data of the current decoded frame is counted, and at least one attribute feature of the decoding error block is determined according to the attribute data.
[0068] The attribute features can be used to characterize information such as texture features and motion features of the decoded block image scene. The attribute data can include the size of the coding unit, the current frame prediction mode, and the like.
[0069] Exemplarily, server 104 may calculate total area data of adjacent decoded blocks of a target decoded error block in a current decoded frame, calculate characteristic area data of adjacent decoded blocks that conform to target attribute characteristics, and obtain attribute data of the current decoded frame based on the total area data and the characteristic area data.
[0070] For example, the hardware video decoder of the server 104 can construct a scene switching frame decoding block attribute statistical model, firstly calculating the total area of the decoding block , and then calculate the attribute as The decoding block area , and then the calculated property is The area of adjacent decoding blocks , and finally calculate the area proportion of each statistical attribute .in, and Indicates the attribute category of the decoding block; the more commonly used decoding block attribute categories include the size of the coding unit, prediction mode, and other attributes that can reflect the texture and motion characteristics of the decoding block image scene.
[0071] Step S208: recover the decoded error block according to the attribute characteristics.
[0072] Exemplarily, the server 104 may determine the texture attribute of the area where the decoding error block is located according to the attribute characteristics, select a corresponding processing mode according to the texture attribute, and perform recovery processing on the decoding error block.
[0073] Wherein, the texture attribute may include a texture complexity attribute and a texture smoothness attribute. Exemplarily, when a decoding error block exists in a texture complexity attribute region, the decoding error block is recovered by adopting an intra-frame prediction filling mode; when a decoding error block exists in a texture smoothness attribute region, the decoding error block is recovered by copying image data of a decoded block.
[0074] Furthermore, the hardware video encoder of server 104 can construct a decoding error block processing model for the video scene switching frame, perform decoding error block intra-frame mode filling judgment, decoding error block region attribute judgment and decoding error block intra-frame filling mode selection, thereby selecting decoding error block intra-frame prediction filling or intra-frame block copy filling.
[0075] Exemplarily, the server 104 may use a decoding error block processing model of a video scene switching frame to perform intra-frame mode filling judgment of a decoding error block:
[0076]
[0077] in, " =1" indicates that the currently decoded frame detected is a scene switching frame. Indicates that the attribute is The area ratio of the decoding block, the above properties It can be intra prediction mode, Is an attribute The corresponding threshold of the decoding block area ratio. In other embodiments, other attributes (such as inter-frame prediction mode) can also be used as statistical attributes.
[0078] Exemplarily, the server 104 may use a decoding error block processing model of a video scene switching frame to determine the regional attribute of the decoding error block:
[0079]
[0080] in, =1 indicates the region category determined by attribute p, and The meaning is the same as above. The attribute p used for region attribute judgment in this article is the coding unit size. In other embodiments, other attributes (such as transform unit size, etc.) can also be used as statistical attributes. Indicates that the decoding error block is located in the texture smooth area; Indicates that the decoding error block is located in a complex texture area.
[0081] For example, the server 104 may adopt a decoding error block processing model of a video scene switching frame to select a decoding error block intraframe filling mode: if the decoding error block is located in a region with complex texture attributes, that is, =0, the server 104 triggers the hardware to perform traditional intra-frame prediction filling under this condition, and the intra-frame prediction mode of the current decoding block C is obtained according to whether the prediction mode of the adjacent block is available. For example, the relative position relationship between the current decoding block C and the adjacent block is shown in FIG3, and the method for obtaining the intra-frame prediction mode of the current decoding block C can be expressed as:
[0082]
[0083] For example, if the decoding error block is located in the texture smoothness attribute area, =1, the server 104 triggers the hardware to perform a copy operation of the decoded block image data under this condition to complete the filling of the decoded error block image data, and the image data copied by the current decoded block must be located in the decoded block area. The method for obtaining the decoded block used to fill the current decoded block C is: first check the availability of the adjacent blocks of the current decoded block C And get the intra prediction mode of available neighboring blocks ,according to The value of positions the copied image data block.
[0084] in, is the angle intra prediction mode, then according to The top, left, left-top, and right-top blocks are mapped at an angle of , and the mapped blocks are used as the starting replication blocks. The direction of the replication area is determined by and the relative position of the current decoding block C; in this embodiment, The mapping rule is shown in Figure 4. The range of the angle prediction mode in the figure is marked by thin lines, and the angle prediction mode is mapped to the adjacent block according to the interval. The interval value of the thin marking line is related to the decoding standard, and the interval marked with "Top", "Top-left", "Top-right", "Left", and "bottom-left" on the thin marking line indicates the relative position of the adjacent block and the current decoding block. If it is DC, Planar intra prediction mode, directly copy the current The image data of the block; if the current decoding block takes If it is the top adjacent block, the schematic diagram of the filling method of the decoding error block is shown in Figure 5.
[0085] In the above-mentioned decoding error block processing method, by obtaining the image information to be processed of the current decoding frame, the scene switching detection is performed on the current decoding frame to obtain the current frame type. When the current frame type is a scene switching frame, the current decoding frame has the characteristic of a high probability of being referenced. The quality of the decoded image of the scene switching frame in the video largely determines the quality of the subsequent decoded frame image of the video sequence. Therefore, by counting the attribute data of the current decoding frame, determining at least one attribute feature of the decoding error block according to the attribute data, and then recovering the decoding error block according to the attribute feature, the scene switching frame can be decoded more accurately, thereby improving the accuracy of decoding error block recovery during video decoding. In addition, the decoding block attribute statistical model is applicable to selecting the optimal image recovery mode for the decoding error block in any attribute decoding frame. It only needs to count the attribute information of the decoding block during the decoding process, does not involve complex calculation and storage logic, and has almost no effect on the performance of the hardware decoder.
[0086] In an exemplary embodiment, as shown in FIG6 , step S204 includes steps S302 to S306 . Among them:
[0087] Step S302: Calculate the reference frequency of the current decoded frame according to the image information to be processed and the image information corresponding to the subsequent decoded frame of the current decoded frame.
[0088] Exemplarily, the server 104 can obtain a detection range threshold based on the image information to be processed, and based on the detection range threshold, obtain image information corresponding to multiple subsequent decoded frames of the current decoded frame, and based on the image information, count the number of times the current decoded frame is referenced by subsequent decoded frames, and calculate the reference frequency of the current decoded frame.
[0089] For example, the server 104 can establish a scene switching frame detection model at the software level. The overall architecture mainly includes the following parts: The server 104 first needs to calculate the frequency of the current decoded frame being referenced. ; Next, construct a list of code stream sizes with the current frame as the reference frame ; Finally, calculate the probability that the current decoded frame is a scene switching frame .
[0090] Furthermore, the server 104 can set the parameters Used to specify the number of backward scanning frames, so as to scan backward decoded frames to calculate the number of times the current decoded frame is referenced , thereby calculating the frequency of the current frame being referenced .
[0091] Step S304: construct a bitstream data set using the current decoded frame as a reference frame.
[0092] For example, the server 104 may use the current decoded frame as a reference frame to construct a list of code stream sizes of the current frame as a reference frame. .
[0093] Step S306: Perform scene switching detection on the current decoded frame according to the reference frequency and the bitstream data set to obtain the current frame type.
[0094] For example, the server 104 may calculate the probability that the current decoded frame is a scene switching frame. :
[0095] >
[0096] > ,
[0097]
[0098]
[0099] in, Indicates the threshold of the number of times the current decoded frame is referenced. Indicates the size of the current decoded frame code stream. Indicates that the current decoded frame is detected to be a scene switch frame.
[0100] The above-mentioned scene switching frame detection model can be implemented and used alone at the software level, or used in conjunction with the decoding error detection and processing algorithms of different hardware decoders, to optimize the decoding error block image recovery scheme in the scene switching frame at a very low implementation cost, thereby improving the decoded image quality of the entire decoded video sequence.
[0101] In another exemplary embodiment, the server 104 obtains the image information to be processed of the current decoded frame, obtains the detection range threshold based on the image information to be processed, obtains the image information corresponding to multiple subsequent decoded frames of the current decoded frame based on the detection range threshold, and then counts the number of times the current decoded frame is referenced by the subsequent decoded frames based on the image information, and calculates the reference frequency of the current decoded frame.
[0102] Next, the server 104 uses the current decoded frame as a reference frame to construct a bitstream data set, and performs scene switching detection on the current decoded frame according to the reference frequency and the bitstream data set to obtain the current frame type.
[0103] When the current frame type is a scene switching frame, the server 104 calculates the total area data of the adjacent decoded blocks of the target decoded error block in the current decoded frame, calculates the characteristic area data of the adjacent decoded blocks that conform to the target attribute characteristics, and then obtains the attribute data of the current decoded frame based on the total area data and the characteristic area data, and determines at least one attribute characteristic of the decoded error block based on the attribute data, and finally recovers the decoded error block based on the attribute characteristics.
[0104] The server 104 determines the texture attribute of the area where the decoding error block is located based on the attribute characteristics. When the decoding error block exists in an area with complex texture attributes, the decoding error block is recovered by using the intra-frame prediction filling mode; when the decoding error block exists in an area with smooth texture attributes, the decoding error block is recovered by copying the image data of the decoded block.
[0105] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0106] Based on the same inventive concept, the embodiment of the present application also provides a decoding error block processing device for implementing the decoding error block processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more decoding error block processing device embodiments provided below can refer to the limitations of the decoding error block processing method above, and will not be repeated here.
[0107] In an exemplary embodiment, as shown in FIG7 , a decoding error block processing device is provided, comprising: an information acquisition module 702, a scene detection module 704, a feature extraction module 706 and a decoding processing module 708, wherein:
[0108] The information acquisition module 702 is used to acquire the image information to be processed of the current decoded frame;
[0109] The scene detection module 704 is used to perform scene switching detection on the current decoded frame according to the image information to be processed to obtain the current frame type;
[0110] The feature extraction module 706 is used to count the attribute data of the current decoded frame and determine at least one attribute feature of the decoding error block according to the attribute data when the current frame type is a scene switching frame;
[0111] The decoding processing module 708 is used to perform recovery processing on the decoding error block according to the attribute characteristics.
[0112] In one embodiment, the scene detection module 704 includes:
[0113] A frequency calculation unit, used to calculate the reference frequency of the current decoded frame according to the image information to be processed and the image information corresponding to the subsequent decoded frame of the current decoded frame;
[0114] A data processing unit, used to construct a bitstream data set using a current decoded frame as a reference frame;
[0115] The type determination unit is used to perform scene switching detection on the current decoded frame according to the reference frequency and the code stream data set to obtain the current frame type.
[0116] In one of the embodiments, the frequency calculation unit is specifically used to: obtain a detection range threshold based on the image information to be processed; obtain image information corresponding to multiple subsequent decoded frames of the current decoded frame based on the detection range threshold; count the number of times the current decoded frame is referenced by the subsequent decoded frames based on the image information, and calculate the reference frequency of the current decoded frame.
[0117] In one embodiment, the feature extraction module 706 is specifically used to: calculate the total area data of adjacent decoded blocks of the target decoded error block in the current decoded frame; calculate the characteristic area data of the adjacent decoded blocks that meet the target attribute characteristics; and obtain the attribute data of the current decoded frame based on the total area data and the characteristic area data.
[0118] In one embodiment, the decoding processing module 708 includes:
[0119] An attribute judgment unit, used for judging the texture attribute of the area where the decoding error block is located according to the attribute characteristics;
[0120] The recovery processing unit is used to select a corresponding processing mode according to the texture attribute and perform recovery processing on the decoded error block.
[0121] In one of the embodiments, the texture attributes include a texture complexity attribute and a texture smoothness attribute; the recovery processing unit is specifically used to: when the decoding error block exists in the texture complexity attribute area, use the intra-frame prediction filling mode to recover the decoding error block; when the decoding error block exists in the texture smoothness attribute area, use the method of copying the image data of the decoded block to recover the decoding error block.
[0122] Each module in the above decoding error block processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0123] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for the image information to be processed of each frame to be decoded in the video, as well as the attribute data of each decoded frame and other data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a decoding error block processing method is implemented.
[0124] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a decoding error block processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0125] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0126] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining image information to be processed of a current decoded frame; performing scene switching detection on the current decoded frame according to the image information to be processed to obtain a current frame type; when the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of a decoded error block according to the attribute data; and performing recovery processing on the decoded error block according to the attribute feature.
[0127] In one embodiment, when the processor executes the computer program, the following steps are further implemented: calculating the reference frequency of the current decoded frame based on the image information to be processed and the image information corresponding to the subsequent decoded frame of the current decoded frame; constructing a bitstream data set using the current decoded frame as a reference frame; and performing scene switching detection on the current decoded frame based on the reference frequency and the bitstream data set to obtain the current frame type.
[0128] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a detection range threshold based on the image information to be processed; obtaining image information corresponding to multiple subsequent decoded frames of the current decoded frame based on the detection range threshold; counting the number of times the current decoded frame is referenced by subsequent decoded frames based on the image information, and calculating the reference frequency of the current decoded frame.
[0129] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the total area data of the adjacent decoded blocks of the target decoded error block in the current decoded frame; calculating the characteristic area data of the adjacent decoded blocks that meet the target attribute characteristics; and obtaining the attribute data of the current decoded frame based on the total area data and the characteristic area data.
[0130] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the texture attribute of the area where the decoding error block is located according to the attribute characteristics; selecting the corresponding processing mode according to the texture attribute, and performing recovery processing on the decoding error block.
[0131] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the decoding error block exists in an area with complex texture properties, the decoding error block is recovered by using an intra-frame prediction filling mode; when the decoding error block exists in an area with smooth texture properties, the decoding error block is recovered by copying the image data of the decoded block.
[0132] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining image information to be processed of a current decoded frame; performing scene switching detection on the current decoded frame according to the image information to be processed to obtain a current frame type; when the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of a decoded error block according to the attribute data; and performing recovery processing on the decoded error block according to the attribute feature.
[0133] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the reference frequency of the current decoded frame based on the image information to be processed and the image information corresponding to the subsequent decoded frame of the current decoded frame; constructing a bitstream data set using the current decoded frame as a reference frame; performing scene switching detection on the current decoded frame based on the reference frequency and the bitstream data set to obtain the current frame type.
[0134] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a detection range threshold based on the image information to be processed; obtaining image information corresponding to multiple subsequent decoded frames of the current decoded frame based on the detection range threshold; counting the number of times the current decoded frame is referenced by subsequent decoded frames based on the image information, and calculating the reference frequency of the current decoded frame.
[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: calculating the total area data of adjacent decoded blocks of the target decoded error block in the current decoded frame; calculating the characteristic area data of the adjacent decoded blocks that conform to the target attribute characteristics; and obtaining the attribute data of the current decoded frame based on the total area data and the characteristic area data.
[0136] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the texture attribute of the area where the decoding error block is located according to the attribute characteristics; selecting the corresponding processing mode according to the texture attribute, and performing recovery processing on the decoding error block.
[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the decoding error block exists in an area with complex texture properties, the decoding error block is recovered by using an intra-frame prediction filling mode; when the decoding error block exists in an area with smooth texture properties, the decoding error block is recovered by copying the image data of the decoded block.
[0138] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps: obtaining image information to be processed of a current decoded frame; performing scene switching detection on the current decoded frame to obtain a current frame type based on the image information to be processed; when the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of a decoded error block based on the attribute data; and performing recovery processing on the decoded error block based on the attribute feature.
[0139] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the reference frequency of the current decoded frame based on the image information to be processed and the image information corresponding to the subsequent decoded frame of the current decoded frame; constructing a bitstream data set using the current decoded frame as a reference frame; performing scene switching detection on the current decoded frame based on the reference frequency and the bitstream data set to obtain the current frame type.
[0140] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a detection range threshold based on the image information to be processed; obtaining image information corresponding to multiple subsequent decoded frames of the current decoded frame based on the detection range threshold; counting the number of times the current decoded frame is referenced by subsequent decoded frames based on the image information, and calculating the reference frequency of the current decoded frame.
[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: calculating the total area data of adjacent decoded blocks of the target decoded error block in the current decoded frame; calculating the characteristic area data of the adjacent decoded blocks that conform to the target attribute characteristics; and obtaining the attribute data of the current decoded frame based on the total area data and the characteristic area data.
[0142] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the texture attribute of the area where the decoding error block is located according to the attribute characteristics; selecting the corresponding processing mode according to the texture attribute, and performing recovery processing on the decoding error block.
[0143] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the decoding error block exists in an area with complex texture properties, the decoding error block is recovered by using an intra-frame prediction filling mode; when the decoding error block exists in an area with smooth texture properties, the decoding error block is recovered by copying the image data of the decoded block.
[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0145] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0146] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for processing a decoding error block, characterized in that: The method comprises: Get the image information to be processed of the current decoded frame; According to the image information to be processed, performing scene switching detection on the current decoded frame to obtain a current frame type; In the case where the current frame type is a scene switching frame, counting attribute data of the current decoded frame, and determining at least one attribute feature of the decoding error block according to the attribute data; The decoding error block is restored according to the attribute characteristics.
2. The method according to claim 1, characterized in that The step of performing scene switching detection on the current decoded frame according to the image information to be processed to obtain the current frame type includes: Calculating a reference frequency of the current decoded frame according to the image information to be processed and image information corresponding to a subsequent decoded frame of the current decoded frame; Using the current decoded frame as a reference frame, constructing a bitstream data set; A scene switching detection is performed on the current decoded frame according to the reference frequency and the bitstream data set to obtain a current frame type.
3. The method according to claim 2, characterized in that The calculating the reference frequency of the current decoded frame according to the image information to be processed and the image information corresponding to the subsequent decoded frame of the current decoded frame includes: Acquire a detection range threshold according to the image information to be processed; According to the detection range threshold, acquiring image information corresponding to a plurality of subsequent decoded frames of the current decoded frame; According to the image information, the number of times the current decoded frame is referenced by the subsequent decoded frame is counted, and the reference frequency of the current decoded frame is calculated.
4. The method according to claim 1, characterized in that: The counting of attribute data of the current decoded frame includes: Calculating total area data of adjacent decoding blocks of a target decoding error block in the current decoding frame; Calculate the characteristic area data of the adjacent decoding blocks that meet the target attribute characteristics; The attribute data of the current decoded frame is obtained according to the total area data and the characteristic area data.
5. The method according to any one of claims 1 to 4, characterized in that: The recovering process of the decoded error block according to the attribute characteristics comprises: Determining the texture attribute of the area where the decoding error block is located according to the attribute feature; A corresponding processing mode is selected according to the texture attribute, and recovery processing is performed on the decoded error block.
6. The method according to claim 5, characterized in that The texture attributes include a texture complexity attribute and a texture smoothness attribute; the selecting a corresponding processing mode according to the texture attributes to perform recovery processing on the decoded error block includes: In the case where the decoding error block exists in a region with complex texture attributes, the decoding error block is restored by using an intra-frame prediction filling mode; In the case that the decoding error block exists in the texture smoothness attribute area, the decoding error block is restored by copying the image data of the decoded block.
7. A decoding error block processing device, characterized in that: The device comprises: An information acquisition module, used to acquire the image information to be processed of the current decoded frame; A scene detection module, configured to perform scene switching detection on the current decoded frame according to the image information to be processed, and obtain a current frame type; a feature extraction module, configured to, when the current frame type is a scene switching frame, collect attribute data of the current decoded frame, and determine at least one attribute feature of the decoded error block according to the attribute data; A decoding processing module is used to perform recovery processing on the decoding error block according to the attribute characteristics.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.