Block effect detection method and apparatus

By acquiring and analyzing the quantization parameters of coded blocks in video image frames, block artifacts are detected and eliminated, thus solving the problem of block artifacts in video image compression algorithms and improving image quality.

CN116527920BActive Publication Date: 2026-03-17JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing video image compression algorithms are prone to blockiness, which seriously affects the subjective visual quality of video images, especially at low bit rate transmission.

Method used

By obtaining the quantization parameters of the non-boundary coding block to be encoded and its surrounding coding blocks in the current frame, the target parameters are determined, and it is judged whether the preset conditions are met to detect block artifacts. When block artifacts are detected, the quantization parameters are updated to eliminate block artifacts.

Benefits of technology

It improves the efficiency and accuracy of block effect detection, enhances the subjective quality of images, and effectively reduces the occurrence of block effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527920B_ABST
    Figure CN116527920B_ABST
Patent Text Reader

Abstract

The application discloses a blocking effect detection method and device, and relates to the technical field of image processing. A specific embodiment of the method comprises the following steps: in response to determining that a first coding block to be coded in a current frame is a non-boundary coding block, obtaining a quantization parameter of a second coding block and at least one coding block around the second coding block; determining a first target parameter based on the quantization parameter of the second coding block and the at least one coding block around the second coding block; and in response to determining that the first target parameter meets a first preset condition, determining that the first coding block has a blocking effect after coding. The embodiment effectively improves the detection efficiency of the blocking effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to the field of image processing technology, and in particular to a block effect detection method and apparatus. Background Technology

[0002] Video image compression algorithms are generally implemented based on the idea of ​​block division. For example, current international image and video compression standards such as JPEG, MPEG, H.264, and HEVC are all based on the block-based discrete cosine transform coding method. However, these algorithms can easily lead to obvious blocky patterns in the processed image, especially during low bit rate transmission, such as network video. This phenomenon is called "blocking artifacts." This blocking artifact is a type of artificial noise caused by image coding, namely "block noise," which can seriously affect the subjective visual quality of video images. Summary of the Invention

[0003] This application provides a block effect detection method, apparatus, device, and storage medium.

[0004] According to a first aspect, embodiments of this application provide a block effect detection method, the method comprising: in response to determining that a first coding block to be encoded in the current frame is a non-boundary coding block, obtaining quantization parameters of a second coding block and at least one coding block surrounding the second coding block; determining a first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block; and in response to determining that the first target parameter meets a first preset condition, determining that a block effect exists after encoding the first coding block.

[0005] According to a second aspect, embodiments of this application provide a block effect detection apparatus, the apparatus comprising: an acquisition module configured to acquire a second coding block and quantization parameters of at least one coding block surrounding the second coding block in response to determining that a first coding block to be encoded in the current frame is a non-boundary coding block; a transition module configured to determine a first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block; and a determination module configured to determine that a block effect exists after encoding the first coding block in response to determining that the first target parameter meets a first preset condition.

[0006] According to a third aspect, embodiments of this application provide an electronic device including one or more processors; a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the block effect detection method as described in any embodiment of the first aspect.

[0007] According to a fourth aspect, embodiments of this application provide a computer-readable medium having a computer program stored thereon that, when executed by a processor, implements the block effect detection method as described in any embodiment of the first aspect.

[0008] This application improves the efficiency of block effect detection by obtaining the quantization parameters of a second coding block and at least one coding block surrounding the second coding block in response to determining that the first coding block to be encoded in the current frame is a non-boundary coding block; determining a first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block; and determining that there is block effect after the first coding block is encoded in response to determining that the first target parameter meets a first preset condition.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0011] Figure 2a This is a flowchart of an embodiment of the block effect detection method according to this application;

[0012] Figure 2b This is a schematic diagram of yet another embodiment of the block effect detection method according to this application;

[0013] Figure 2c This is a schematic diagram of another embodiment of the block effect detection method according to this application;

[0014] Figure 3 This is a schematic diagram of an application scenario of the block effect detection method according to this application;

[0015] Figure 4a This is a flowchart of yet another embodiment of the block effect detection method according to this application;

[0016] Figure 4b This is a schematic diagram of yet another embodiment of the block effect detection method according to this application.

[0017] Figure 5 This is a schematic diagram of one embodiment of the block effect detection device according to this application;

[0018] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing the server embodiments of this application. Detailed Implementation

[0019] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0021] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the block effect detection method of this application can be applied.

[0022] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0023] Terminal devices 101, 102, and 103 interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications, such as video playback applications and communication applications, can be installed on terminal devices 101, 102, and 103.

[0024] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to mobile phones and laptops. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (e.g., to provide block effect detection services) or as a single software program or software module. No specific limitations are made here.

[0025] Server 105 may be a server that provides various services, such as: in response to determining that the first coding block to be encoded in the current frame is a non-boundary coding block, obtaining the quantization parameters of the second coding block and at least one coding block surrounding the second coding block; determining a first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block; and determining that there is a block effect after the first coding block is encoded in response to determining that the first target parameter meets a first preset condition.

[0026] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide block effect detection services), or as a single software program or software module. No specific limitations are made here.

[0027] It should be noted that the block effect detection method provided in the embodiments of this disclosure can be executed by server 105, by terminal devices 101, 102, and 103, or by server 105 and terminal devices 101, 102, and 103 in cooperation with each other. Accordingly, all parts (e.g., units, sub-units, modules, and sub-modules) of the block effect detection device can be entirely located in server 105, entirely located in terminal devices 101, 102, and 103, or separately located in server 105 and terminal devices 101, 102, and 103.

[0028] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0029] Figure 2a A flow 200 is shown as an embodiment of the block effect detection method applicable to this application. In this embodiment, the block effect detection method includes the following steps:

[0030] Step 201: In response to determining that the first coding block to be encoded in the current frame is a non-boundary coding block, obtain the quantization parameters of the second coding block and at least one coding block surrounding the second coding block.

[0031] In this embodiment, the execution subject (such as...) Figure 1 The server 105 or terminal device 101, 102, 103 shown can sequentially detect the coded blocks in the current (image) frame. In response to determining that the first coded block to be encoded in the current frame is a non-boundary coded block, that is, a coded block that is not located at the edge of the image frame, the quantization parameters of the second coded block and the quantization parameters of at least one coded block around the second coded block are obtained.

[0032] The second coding block is the coding block located at the same position as the first coding block in the previous frame of the current frame.

[0033] Here, the quantization parameter is used to reflect the spatial detail compression. The smaller the value, the finer the quantization, the higher the image quality, and the longer the generated bitstream.

[0034] It should be noted that the encoded block can be a macroblock based on the H.264 standard or a block based on other video compression standards. This application does not limit this. In addition, the shape of the encoded block is not limited to block shape.

[0035] Step 202: Determine the first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block.

[0036] In this embodiment, after obtaining the quantization parameters of the second coding block and the quantization parameters of one or more coding blocks surrounding the second coding block, the executing entity can determine the first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block.

[0037] The first target parameter is used to characterize the transition trend of the surrounding blocks of the second coding block. Specifically, it can be determined by formulas that characterize the size relationship between adjacent coding blocks, such as the difference and ratio between the surrounding coding blocks, and the difference and ratio between the second coding block and the surrounding coding blocks. The number of parameters of the first target parameter can be one or more, and this application does not limit it.

[0038] In some alternative approaches, the first target parameter is determined based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block, including: determining the first target parameter based on the quantization parameters of the second coding block and the quantization parameters of each coding block in a diamond-shaped block in which the second coding block is located.

[0039] In this implementation, the diamond-shaped block can be a quadrilateral-shaped block structure composed of at least three coded blocks surrounding the second coded block. The execution entity can determine the first target parameter based on the quantization parameters of the second coded block and the quantization parameters of each coded block within the diamond-shaped block in which the second coded block is located.

[0040] Specifically, such as Figure 2b As shown, the quantization parameter of the second coding block is x5, and the quantization parameters of the surrounding coding blocks are x1, x2, and x4, respectively. The first target parameter D1 can be expressed by the following formula:

[0041] a1=x4 / x 1, a2=x2 / x 1, a3=x5 / x4, a4=x5 / x2, a5=x5 / x1

[0042]

[0043] This implementation method determines the first target parameter based on the quantization parameters of the second coding block and each coding block in the diamond-shaped block in which the second coding block is located, thereby improving the accuracy and reliability of the determined first target parameter.

[0044] In some alternative approaches, determining a first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block includes: determining the first target parameter based on the quantization parameters of the second coding block and the quantization parameters of each coding block in at least two diamond blocks in which the second coding block is located.

[0045] In this implementation, the executing entity can determine the first target parameter based on the quantization parameters of the second coding block and the quantization parameters of each coding block in one or more of the at least two diamond blocks in which the second coding block is located.

[0046] The diamond block is a quadrilateral-shaped block structure consisting of a second coding block and at least three coding blocks surrounding the second coding block.

[0047] Specifically, such as Figure 2c As shown, the quantization parameter of the second coding block is x5. The quantization parameters of each coding block in the first diamond block where the second coding block is located are x1, x2, x4, and x5, respectively. The quantization parameters of each coding block in the second diamond block where the second coding block is located are x5, x6, x8, and x9, respectively. The first target parameter includes three parameters, namely D1, D2, and D3, which can be specifically expressed by the following formula:

[0048] a1=x4 / x 1, a2=x2 / x 1, a3=x5 / x4, a4=x5 / x2, a5=x5 / x1

[0049] a6=x8 / x5, a7=x6 / x5, a8=x9 / x8, a9=x9 / x6, a10=x9 / x5

[0050]

[0051]

[0052] D3 = a5 + a10

[0053] This implementation method determines the first target parameter based on the quantization parameters of the second coding block and the coding blocks in at least two diamond blocks in which the second coding block is located, thereby further improving the accuracy and reliability of the determined first target parameter.

[0054] Step 203: In response to determining that the first target parameter meets the first preset condition, it is determined that there is a block effect after the first coding block is encoded.

[0055] In this embodiment, after obtaining the first target parameter, the executing entity can further determine whether the first target parameter meets the first preset condition. If it meets the first preset condition, that is, the second coding block has block effect, it can be determined that the first coding block will have block effect after encoding (because the current frame and the previous coding frame have a large time correlation, and the co-occurring blocks have a greater correlation).

[0056] The first preset condition is used to determine whether the second coding block has block effects. The specific conditions can be determined based on experience, actual needs and specific application scenarios. This application does not limit this.

[0057] Specifically, for example, the first target parameter includes D1. The executing entity can determine whether D1 is greater than a preset first threshold. If D1 is greater than the preset first threshold, it is determined that the first coding block has block effects.

[0058] For example, if the target parameters include D1, D2, and D3, the executing entity can determine whether D1 is greater than the first threshold, whether D2 is greater than the second threshold, and whether D3 is greater than the third threshold. If all three are satisfied (e.g., D1>4.8&&D2>4.4&&D3>2), then it is determined that the first coded block has block effects.

[0059] The first threshold, second threshold, and third threshold can be set based on experience and actual needs.

[0060] See also Figure 3 , Figure 3 This is a schematic diagram of an application scenario of the block effect detection method according to this embodiment.

[0061] exist Figure 3 In the application scenario, the execution entity 301 can sequentially detect the coded blocks in the current (image) frame. In response to determining that the first coded block to be encoded in the current frame is a non-boundary coded block, that is, a coded block that is not located at the edge of the image frame, the quantization parameters 302 of the second coded block and the quantization parameters 303 of at least one coded block around the second coded block are obtained. The second coded block is a coded block located at the same position as the first coded block in the previous frame of the current frame. Based on the quantization parameters of the second coded block and at least one coded block around the second coded block, a first target parameter 304 is determined. The first target parameter 304 is used to characterize the transition trend of the blocks surrounding the second coded block. In response to determining that the first target parameter 304 meets the first preset condition 305, it is determined that there is a block effect 306 after the first coded block is encoded.

[0062] The block artifact detection method disclosed herein, in response to determining that the first coding block to be encoded in the current frame is a non-boundary coding block, obtains the quantization parameters of the second coding block and at least one coding block surrounding the second coding block; based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block, determines a first target parameter; in response to determining that the first target parameter meets a first preset condition, determines that there is a block artifact after the first coding block is encoded, effectively improving the efficiency of block artifact detection.

[0063] Further reference Figure 4a It shows Figure 2a The flowchart 400 shows another embodiment of the block effect detection method. In this embodiment, the block effect detection method flowchart 400 may include the following steps:

[0064] Step 401: In response to determining that the first coding block to be encoded in the current frame is a non-boundary coding block, obtain the quantization parameters of the second coding block and at least one coding block surrounding the second coding block.

[0065] In this embodiment, the implementation details and technical effects of step 401 can be found in the description of step 201, and will not be repeated here.

[0066] Step 402: Determine the first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block.

[0067] In this embodiment, the implementation details and technical effects of step 402 can be found in the description of step 202, and will not be repeated here.

[0068] Step 403: In response to determining that the first target parameter meets the first preset condition, it is determined that the first coding block has a block effect after encoding.

[0069] In this embodiment, the implementation details and technical effects of step 403 can be found in the description of step 203, and will not be repeated here.

[0070] Step 404: In response to determining that there is block artifacts after encoding the first coding block, the quantization parameters of the first coding block are updated to eliminate the block artifacts.

[0071] In this embodiment, after determining that there will be block effects after the first coding block is encoded, the execution subject can update the quantization parameters of the first coding block to obtain new quantization parameters in order to eliminate the block effects.

[0072] The update method can be set according to actual needs. For example, if the first quantization parameter of the first coding block is Q, Q can be set to Q-1.

[0073] In some alternative embodiments, the method further includes: acquiring quantization parameters of at least two third coded blocks that have been fully encoded around the first coded block; and updating the quantization parameters of the first coded block in response to determining that the second target parameter meets a second preset condition.

[0074] In this implementation, the executing entity can obtain the quantization parameters of at least two third coded blocks that have been encoded around the first coded block; and determine the second target parameter based on the average of the quantization parameters of the at least two third coded blocks and the quantization parameter of the first coded block; in response to the second target parameter meeting the second preset condition, the quantization parameter of the first coded block is further updated to obtain a new quantization parameter.

[0075] The second target parameter is used to characterize the average transition trend of the surrounding blocks of the first coding block.

[0076] Here, the number of completed third coding blocks around the first coding block can be two or more. For example, the at least two completed third coding blocks around the first coding block may include a coding block adjacent to and above the first coding block, and a coding block adjacent to and to the left of the first coding block; the at least two completed third coding blocks around the first coding block may include a coding block adjacent to and above the first coding block, a coding block adjacent to and to the left of the first coding block, a coding block adjacent to and below the first coding block, and a coding block adjacent to and to the right of the first coding block, etc. This application does not limit this.

[0077] The second preset condition can be set based on experience and actual needs.

[0078] Specifically, such as Figure 4b As shown, at least two third coding blocks that have been fully encoded around the first coding block may include a coding block located above the first coding block, a coding block located to the left of the first coding block, and a coding block located above the first coding block with quantization parameter U0, and a coding block located to the left of the first coding block with quantization parameter L0. The second target parameter can be characterized by the following formula:

[0079] D4=||(L0+U0) / 2|-Q|

[0080] In response to determining that the second target parameter meets the second preset condition, such as D4>4, the quantization parameters of the first coding block are further updated, such as setting the quantization parameter Q=Q-0.5.

[0081] This implementation obtains the quantization parameters of at least two third coding blocks that have been fully encoded around the first coding block; in response to determining that the second target parameter meets the second preset condition, the quantization parameters of the first coding block are updated, which helps to further improve the block effect elimination effect.

[0082] In some alternative embodiments, the method further includes: obtaining quantization parameters of at least one third coded block that has been fully encoded around the first coded block; and updating the quantization parameters of the first coded block in response to determining that at least one parameter among the third target parameters meets a third preset condition.

[0083] In this implementation, the executing entity can obtain the quantization parameters of at least one third coding block that has been encoded around the first coding block; and determine the difference between the quantization parameters of each third coding block in the at least one third coding block and the quantization parameters of the first coding block as the third target parameter; in response to determining that at least one parameter in the third target parameter meets the third preset condition, the first quantization parameter is further updated to obtain a new first quantization parameter.

[0084] Here, the third target parameter is used to characterize the transition trend of each surrounding block of the first coding block.

[0085] The third preset condition can be set based on experience and actual needs.

[0086] Specifically, at least one third coded block that has been fully encoded around the first coded block may include a coded block adjacent to and above the first coded block, a coded block adjacent to and to the left of the first coded block, and a coded block above the first coded block with quantization parameter U0, and a coded block to the left of the first coded block with quantization parameter L0. The third target parameter includes two parameters, D5 and D6, which can be characterized by the following formula:

[0087] D5 = |U0 - Q|

[0088] D6 = |L0 - Q|

[0089] In response to the determination that at least one parameter in the third target parameters meets the third preset condition, such as D5>8 or D6>8, the quantization parameters of the first coding block are further updated, such as setting the quantization parameter Q=Q-1.5.

[0090] This implementation obtains the quantization parameters of at least one third coded block that has been fully encoded around the first coded block; in response to determining that at least one parameter among the third target parameters meets the third preset condition, the quantization parameters of the first coded block are updated, which helps to further improve the block effect elimination effect.

[0091] As can be seen from Figure 4, compared with the embodiment corresponding to Figure 2, the block effect detection method in this embodiment has a flow 400 that reflects the response to the determination that there is a block effect after the first coding block is encoded, the quantization parameters of the first coding block are updated to eliminate the block effect. This method effectively reduces the block effect of the current coding block and improves the subjective quality of the image, that is, the quality perceived by the human eye.

[0092] Further reference Figure 5 As an implementation of the methods shown in the above figures, this application provides an embodiment of a block effect detection device, which corresponds to the method embodiment shown in Figure 2, and the device can be applied to various electronic devices.

[0093] like Figure 5 As shown, the block effect detection device 500 of this embodiment includes: an acquisition module 501, a transition module 502, and a determination module 503.

[0094] The acquisition module 501 can be configured to acquire the quantization parameters of the second coding block and at least one coding block surrounding the second coding block in response to determining that the first coding block to be encoded in the current frame is a non-boundary coding block.

[0095] Transition module 502 can be configured to determine a first target parameter based on the quantization parameters of the second coding block and at least one coding block surrounding the second coding block.

[0096] The determination module 503 can be configured to determine that there is a block effect after the first coding block is encoded in response to determining that the first target parameter meets the first preset condition.

[0097] In some optional embodiments of this example, the transition module is further configured to determine the first target parameter based on the quantization parameters of the second coding block and the quantization parameters of each coding block in a diamond-shaped block in which the second coding block is located.

[0098] In some optional embodiments of this example, the transition module is further configured to determine the first target parameter based on the quantization parameters of the second coding block and the quantization parameters of each coding block in at least two diamond blocks in which the second coding block is located.

[0099] In some optional embodiments of this invention, the apparatus further includes a first update module configured to update the quantization parameters of the first coded block in response to determining that block artifacts exist after the first coded block is encoded, so as to eliminate the block artifacts.

[0100] In some optional embodiments of this invention, the apparatus further includes: a second update module configured to acquire quantization parameters of at least two third coded blocks that have been fully encoded around the first coded block; and to update the quantization parameters of the first coded block in response to determining that the second target parameter meets the second preset condition.

[0101] In some optional embodiments of this invention, the apparatus further includes: a third update module configured to acquire quantization parameters of at least one third coded block that has been fully encoded around the first coded block; and to update the quantization parameters of the first coded block in response to determining that at least one parameter among the third target parameters meets a third preset condition.

[0102] According to embodiments of this application, this application also provides an electronic device and a readable storage medium.

[0103] like Figure 6 The diagram shown is a block diagram of an electronic device according to an embodiment of the block effect detection method of this application.

[0104] 600 is a block diagram of an electronic device for a block effect detection method according to an embodiment of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.

[0105] like Figure 6 As shown, the electronic device includes one or more processors 601, a memory 602, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take the 601 processor as an example.

[0106] The memory 602 is the non-transitory computer-readable storage medium provided in this application. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the block effect detection method provided in this application. The non-transitory computer-readable storage medium of this application stores computer instructions for causing a computer to perform the block effect detection method provided in this application.

[0107] Memory 602, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the block effect detection method in the embodiments of this application (e.g., appendix). Figure 5 The acquisition module 501, transition module 502, and determination module 503 are shown. The processor 601 executes various functional applications and data processing of the server by running non-transient software programs, instructions, and modules stored in the memory 602, thereby implementing the block effect detection method in the above method embodiments.

[0108] Memory 602 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the block effect detection electronic device. Furthermore, memory 602 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 602 may optionally include memory remotely located relative to processor 601, and these remote memories can be connected to the block effect detection electronic device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0109] The electronic device for the block effect detection method may further include an input device 603 and an output device 604. The processor 601, memory 602, input device 603, and output device 604 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.

[0110] Input device 603 can receive input numerical or character information, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 604 may include a display device, auxiliary lighting device (e.g., LED), and haptic feedback device (e.g., vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light-emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touchscreen.

[0111] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application-specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] These computational programs (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processor and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term “machine-readable signal” refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0113] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0114] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0115] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0116] The technical solution according to the embodiments of this application effectively improves the efficiency of block effect detection.

[0117] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.

[0118] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for detecting blocking artifacts, the method comprising: obtaining quantization parameters of a second coding block and at least one coding block around the second coding block in response to determining that a first coding block to be coded in a current frame is a non-boundary coding block, wherein the second coding block is a coding block located in a previous frame of the current frame at a same position as the first coding block; determining a first target parameter based on the quantization parameters of the second coding block and the at least one coding block around the second coding block, the first target parameter being used to represent a transition tendency of blocks around the second coding block, the first target parameter being determined based on a ratio of the quantization parameters between the coding blocks around the second coding block and a ratio of the quantization parameters between the second coding block and the coding blocks around the second coding block; and determining that the first coding block has blocking artifacts after being coded in response to determining that the first target parameter meets a first preset condition. The determining of the first target parameter based on the quantization parameters of the second coding block and the at least one coding block around the second coding block comprises: determining the first target parameter based on the quantization parameter of the second coding block and the quantization parameters of the coding blocks in one diamond block in which the second coding block is located, wherein the diamond block is a block-shaped structure presenting a quadrilateral and composed of the second coding block and at least three coding blocks around the second coding block. The determining of the first target parameter based on the quantization parameters of the second coding block and the at least one coding block around the second coding block comprises: determining the first target parameter based on the quantization parameter of the second coding block and the quantization parameters of the coding blocks in at least two diamond blocks in which the second coding block is located, wherein the diamond block is a block-shaped structure presenting a quadrilateral and composed of the second coding block and at least three coding blocks around the second coding block. 4.The method of claim 1, further comprising: updating the quantization parameter of the first coding block to eliminate the blocking artifacts in response to determining that the first coding block has the blocking artifacts after being coded.

2. The method of claim 1, wherein, 5.The method of claim 4, further comprising: obtaining quantization parameters of at least two third coding blocks around the first coding block, the at least two third coding blocks having been coded; and updating the quantization parameter of the first coding block in response to determining that a second target parameter meets a second preset condition, the second target parameter being determined based on an average of the quantization parameters of the at least two third coding blocks and the quantization parameter of the first coding block, the second target parameter being used to represent an average transition tendency of the blocks around the first coding block. 6.The method of any one of claims 4-5, further comprising: obtaining a quantization parameter of at least one third coding block around the first coding block, the at least one third coding block having been coded; and updating the quantization parameter of the first coding block in response to determining that at least one parameter in a third target parameter meets a third preset condition, the third target parameter being determined based on a difference between the quantization parameter of the at least one third coding block and the quantization parameter of the first coding block, the third target parameter being used to represent the transition tendency of each of the blocks around the first coding block.

3. The method of claim 1, wherein, ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ 7. An apparatus for block effect detection, the apparatus comprising: an obtaining module configured to obtain quantization parameters of a second coding block and at least one coding block around the second coding block in response to determining that a first coding block to be encoded in a current frame is a non-boundary coding block, wherein the second coding block is a coding block located in a previous frame of the current frame at a same position as the first coding block; a transition module configured to determine a first target parameter based on the quantization parameters of the second coding block and the at least one coding block around the second coding block, the first target parameter being used to represent a transition tendency of the coding blocks around the second coding block, the first target parameter being determined based on a ratio of the quantization parameters between the coding blocks around the second coding block and a ratio of the quantization parameters between the second coding block and the coding blocks around the second coding block; a determining module configured to determine that the first coding block has a block effect after being encoded in response to determining that the first target parameter meets a first preset condition.

8. The apparatus of claim 7, further comprising: an updating module configured to update the quantization parameters of the first coding block to eliminate the block effect in response to determining that the first coding block has the block effect after being encoded.

9. An electronic device, comprising: comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores computer instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

10. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, the computer instructions are used to enable the computer to perform the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Video coding compression method, device, equipment and medium

    CN109379594A

  • Encoding method and device, electronic equipment and storage medium

    CN112203094A