CN111770334A - Data encoding method and device, and data decoding method and device - Google Patents

Data encoding method and device, and data decoding method and device Download PDF

Info

Publication number
CN111770334A
CN111770334A CN202010717846.2A CN202010717846A CN111770334A CN 111770334 A CN111770334 A CN 111770334A CN 202010717846 A CN202010717846 A CN 202010717846A CN 111770334 A CN111770334 A CN 111770334A
Authority
CN
China
Prior art keywords
macro block
macro
image data
macroblock
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010717846.2A
Other languages
Chinese (zh)
Other versions
CN111770334B (en
Inventor
张路
钟安彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010717846.2A priority Critical patent/CN111770334B/en
Publication of CN111770334A publication Critical patent/CN111770334A/en
Application granted granted Critical
Publication of CN111770334B publication Critical patent/CN111770334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability

Abstract

The invention discloses a data encoding method and device and a data decoding method and device. Wherein, the method comprises the following steps: counting motion vectors of all macro blocks of the image data, and determining the motion vector with the maximum number of corresponding macro blocks as a global motion vector; determining a type to which a macro block in the image data belongs according to the global motion vector, wherein the type comprises: the macro block is not changed, the macro block is matched, and the macro block is copied; and encoding the macro block in the image data according to the determined type. The invention solves the technical problems of noise signals existing in the data encoding and decoding process in the related technology, poor instantaneity and poor anti-noise effect of the traditional filtering and de-noising mode.

Description

Data encoding method and device, and data decoding method and device
Technical Field
The present invention relates to the field of data processing, and in particular, to a data encoding method and apparatus, and a data decoding method and apparatus.
Background
In the related art, the precondition for compression coding transmission of a computer composite image is image acquisition, and according to different scenes of specific application, the image acquisition has multiple modes, noise may be introduced in the acquisition process to cause interference to image signals, and the interference noise will greatly influence the coding code stream and the coding effect of the composite image. Most of the existing real-time transmission technologies are used for collecting digital signals such as HDMI (high-definition multimedia interface), namely, the collection is ensured not to introduce a large amount of noise, and coding is carried out on the premise; and the method can filter noise, and is mainly used for non-real-time scenes because each frame of image needs to be completely preprocessed. And the device cannot have good real-time requirement and anti-noise effect at the same time.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a data encoding method and device and a data decoding method and device, which at least solve the technical problems of noise signals in the data encoding and decoding process, poor real-time performance and poor anti-noise effect of the traditional filtering and de-noising mode in the related technology.
According to an aspect of an embodiment of the present invention, there is provided a data encoding method including: counting motion vectors of all macro blocks of the image data, and determining the motion vector with the maximum number of corresponding macro blocks as a global motion vector; determining a type to which a macro block in the image data belongs according to the global motion vector, wherein the type comprises: the macro block is not changed, the macro block is matched, and the macro block is copied; and encoding the macro block in the image data according to the determined type.
Optionally, determining, according to the global motion vector, a type to which a macroblock in the image data belongs includes: comparing the macro block of the image data with a reference macro block, and determining an invariant macro block and a variant macro block in the macro block of the image data, wherein the invariant macro block is the same as the reference macro block, and the variant macro block is different from the reference macro block; shifting the changed macro block of the image data according to the global motion vector, and taking the shifted changed macro block which is the same as the reference macro block as the matched macro block; comparing the macro block of the image data with an adjacent macro block of the macro block adjacent to the macro block in the image, and determining a copy macro block in the macro block of the image data, wherein the copy macro block is the same macro block as the adjacent macro block.
Optionally, determining, according to the global motion vector, a type to which a macroblock in the image data belongs includes: matching the invariant macro blocks, copying the macro blocks and coding the macro blocks respectively; determining the types of other macroblocks except the invariant macroblock, the matching macroblock and the copy macroblock in the macroblocks of the image data, wherein the types of the other macroblocks comprise: text macro blocks, picture macro blocks; and coding the picture macro block according to a picture coding mode, and coding the character macro block according to a character coding mode.
Optionally, comparing the macro block of the image data with a reference macro block, and determining an invariant macro block includes: comparing the macro block of the image data with a reference macro block, and determining the macro block of the image data as an invariant macro block under the condition that a first judgment condition is met, wherein the reference macro block is a coded preset macro block; wherein the first determination condition includes: the average value of the difference values of the pixels of the macro block of the image data and the pixels of the reference macro block on the preset component is smaller than the preset average value; and, the difference of pixels of a macroblock of the image data does not exceed a preset difference; and the difference value of the pixels of the macro block of the image data, the difference value of at least two adjacent rows or columns of pixels contains 0 value, or the pixels in the cross line of four corners contain 0 value.
Optionally, comparing the macro block of the image data with the reference macro block, and determining a matching macro block includes: comparing the macro block of the image data with a reference macro block, and determining the macro block of the image data as a changed macro block under the condition that a second judgment condition is met; shifting the changed macro block through the global motion vector, and taking the shifted changed macro block which is the same as the reference macro block as the matched macro block; wherein the second determination condition includes: the average value of the difference values of the pixels of the macro block of the image data and the pixels of the reference macro block on the preset component is not less than the preset average value; or, the difference value of the pixels of the macro block of the image data exceeds the preset difference value; or, the difference value of the pixels of the macro block of the image data, the difference value of at least two adjacent rows or columns of pixels, does not contain 0 value, or the pixels in the four-corner cross line do not contain 0 value.
Optionally, comparing the macro block of the image data with the adjacent macro blocks, and determining the copy macro block includes: comparing the macro block of the image data with an adjacent macro block, and determining the macro block of the image data as the adjacent macro block under the condition that the first judgment condition is met; wherein the adjacent macro block is at least one of the following: the macro block adjacent to the upper part of the macro block, the macro block adjacent to the lower part of the macro block, the macro block adjacent to the left part of the macro block and the macro block adjacent to the right part of the macro block in the image data.
According to another aspect of the embodiments of the present invention, there is also provided a data decoding method, including: receiving code streams of different types of macro blocks, wherein the types of the macro blocks are determined according to global motion vectors, and the types comprise: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located; and decoding the macro block according to the type of the macro block.
Optionally, decoding the macroblock according to the type of the macroblock includes: taking the decoded data of the reference macro block corresponding to the invariant macro block as the decoded data of the invariant macro block, wherein the invariant macro block is the same macro block as the reference macro block; performing offset on the decoded data of the reference macro block corresponding to the matched macro block according to the global motion vector to obtain the decoded data of the matched macro block, wherein the matched macro block is a changed macro block which is identical to the reference macro block after offset, and the changed macro block is a macro block which is different from the reference macro block; taking the decoded data of the adjacent macro block corresponding to the copied macro block as the decoded data of the copied macro block, wherein the adjacent macro block is a macro block adjacent to the macro block in the image, and the copied macro block is the same macro block as the adjacent macro block; decoding the other macroblocks according to decoding modes corresponding to coding modes corresponding to types of other macroblocks except the unchanged macroblock, the matched macroblock and the copied macroblock in the macroblocks of the image data, and determining decoded data, wherein the types of the other macroblocks comprise: text macro blocks, picture macro blocks; and decoding the picture macro block according to a picture decoding mode, and decoding the character macro block according to a character decoding mode.
According to another aspect of the embodiments of the present invention, there is also provided a data encoding apparatus, including: the statistic module is used for counting the motion vectors of all macro blocks of the image data and determining the motion vector with the largest number of corresponding macro blocks as a global motion vector; a determining module, configured to determine a type to which a macroblock in the image data belongs according to the global motion vector, where the type includes: the macro block is not changed, the macro block is matched, and the macro block is copied; and the coding module is used for coding the macro blocks in the image data according to the determined types.
According to another aspect of the embodiments of the present invention, there is also provided a data decoding apparatus, including: a receiving module, configured to receive code streams of different types of macroblocks, where the type of a macroblock is determined according to a global motion vector, and the type includes: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located; and the decoding module is used for decoding the macro block according to the type of the macro block.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium, where the computer storage medium includes a stored program, and when the program runs, the apparatus on which the computer storage medium is located is controlled to execute any one of the methods described above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes to perform the method described in any one of the above.
In the embodiment of the invention, motion vectors of all macro blocks of statistical image data are adopted, and the motion vector with the largest number of corresponding macro blocks is determined as a global motion vector; determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: the macro block is not changed, the macro block is matched, and the macro block is copied; according to the determined type, the macro block type in the image data is accurately distinguished in a noise environment, the problem that the macro block type cannot be accurately distinguished due to noise interference can be avoided, a large number of macro blocks which can be originally coded through interframe or intraframe prediction have to be coded in a coding mode according to a reference frame, and the code stream is greatly increased is solved, the purpose of effectively determining the macro blocks of various types in the noise environment is achieved, the data transmission effect and the transmission accuracy under noise are improved, the technical effect of the anti-noise effect is improved, and the technical problems that noise signals exist in the data coding and decoding process in the related technology, the traditional filtering denoising mode is poor in instantaneity, and the anti-noise effect is poor are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of encoding data according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of data decoding according to an embodiment of the present invention;
FIG. 3-1 is a diagram illustrating pixel values of the macroblock without noise effects according to an embodiment of the present invention;
FIG. 3-2 is a diagram illustrating pixel values of the macroblock under the influence of noise according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an encoder module according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a difference between pixel values of a noisy interference macroblock and a reference macroblock according to an embodiment of the present invention;
FIG. 6-1 is a diagram illustrating a changed macroblock in two adjacent frames at the same location, according to an embodiment of the invention;
FIG. 6-2 is a diagram illustrating a changed pixel value of another macroblock at the same position in two adjacent frames according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating pixel value differences between a changed macroblock and a reference macroblock according to an embodiment of the present invention;
FIG. 8 is a flow chart of anti-noise data comparison according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a data encoding apparatus according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a data decoding apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method embodiment of a data encoding method, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that described herein.
Fig. 1 is a flowchart of a data encoding method according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S102, counting motion vectors of all macro blocks of image data, and determining the motion vector with the largest number of corresponding macro blocks as a global motion vector;
step S104, determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: the macro block is not changed, the macro block is matched, and the macro block is copied;
and step S106, encoding the macro block in the image data according to the determined type.
Through the steps, motion vectors of all macro blocks of the statistical image data are adopted, and the motion vector with the largest number of corresponding macro blocks is determined to be a global motion vector; determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: the macro block is not changed, the macro block is matched, and the macro block is copied; according to the determined type, the macro block type in the image data is accurately distinguished in a noise environment, the problem that the macro block type cannot be accurately distinguished due to noise interference can be avoided, a large number of macro blocks which can be originally coded through interframe or intraframe prediction have to be coded in a coding mode according to a reference frame, and the code stream is greatly increased is solved, the purpose of effectively determining the macro blocks of various types in the noise environment is achieved, the data transmission effect and the transmission accuracy under noise are improved, the technical effect of the anti-noise effect is improved, and the technical problems that noise signals exist in the data coding and decoding process in the related technology, the traditional filtering denoising mode is poor in instantaneity, and the anti-noise effect is poor are solved.
The global motion vector may also be a motion vector whose number of corresponding macroblocks exceeds a preset number threshold and whose number is the largest.
Optionally, determining the type of the macroblock in the image data according to the global motion vector includes: comparing the macro block of the image data with the reference macro block, and determining an invariant macro block and a variant macro block in the macro block of the image data, wherein the invariant macro block is the same as the reference macro block, and the variant macro block is different from the reference macro block; shifting the changed macro block of the image data according to the global motion vector, and taking the shifted changed macro block which is the same as the reference macro block as a matched macro block; and comparing the macro block of the image data with the adjacent macro block of the macro block which is adjacent to the macro block in the image, and determining a copy macro block in the macro block of the image data, wherein the copy macro block is the same macro block as the adjacent macro block.
The method has the advantages that the types of the macro blocks can be accurately distinguished in a noise environment, the problem that the macro block types cannot be accurately distinguished due to noise interference can be avoided, a large number of macro blocks which can be originally coded through interframe or intraframe prediction have to be coded by using a coding mode according to a reference frame, and code streams are greatly increased.
Specifically, when the macro block of the type is coded, because the invariant macro block is the same as the coded reference macro block, the code stream of the coded reference macro block can be directly used as the code stream of the invariant macro block, thereby avoiding coding the invariant macro block, improving the coding efficiency and reducing the data amount of the code stream.
When the matched macro block is coded, the code stream of the matched macro block can be quickly obtained by offsetting the code stream of the coded reference macro block by a global motion vector due to the fact that the matched macro block and the coded reference macro block have a difference of an offset of the global motion vector, so that the coding efficiency is improved, and the data volume of the code stream is reduced.
When the copied macro block is coded, because the copied macro block is the same as the coded adjacent macro block, after the adjacent macro block is coded, the code stream of the adjacent macro block can be used as the code stream of the copied macro block, so that the coding efficiency is improved, and the data volume of the code stream is reduced.
Optionally, determining the type of the macroblock in the image data according to the global motion vector includes: respectively coding the invariant macro block, the matched macro block and the copied macro block; judging the types of other macro blocks except the unchanged macro block, the matched macro block and the copied macro block in the macro blocks of the image data, wherein the types of the other macro blocks comprise: text macro blocks, picture macro blocks; and coding the picture macro block according to a picture coding mode, and coding the character macro block according to a character coding mode.
When other macro blocks are coded, the types of the other macro blocks are determined, where the types of the other macro blocks may be coding types for a coding mode, for example, the types include a picture macro block and a text macro block, and when coding is performed, the picture macro block is coded according to the picture coding mode, and the text macro block is coded according to the text coding mode. Different from the types of the macro blocks, the types of the macro blocks are from different angles, and the macro blocks can be quickly coded, and specifically include an invariant macro block, a matching macro block and a copy macro block.
Coding other macroblocks by different types can further improve coding efficiency.
Optionally, comparing the macro block of the image data with the reference macro block, and determining the invariant macro block includes: comparing the macro block of the image data with a reference macro block, and determining the macro block of the image data as an invariant macro block under the condition that a first judgment condition is met, wherein the reference macro block is a coded preset macro block; wherein the first determination condition includes: the average value of the difference values of the pixels of the macro block of the image data and the pixels of the reference macro block on the preset component is smaller than the preset average value; and, the difference of the pixels of the macro block of the image data does not exceed the preset difference; and the difference value of the pixels of the macro block of the image data, the difference value of at least two adjacent rows or two columns of pixels contains 0 value, or the pixels in the cross line of four corners contain 0 value.
The preset component may be a YUV component, or any one or two of the YUV components. In this embodiment, the Y component may be used, which will be described below by way of example.
As shown in fig. 5, the pixel difference values of the macro block of the image data and the reference macro block are all 0 in the ideal case without noise. The pixels corresponding to the non-0 value are influenced by noise at present, and the distribution of the pixels is irregular;
the average value of the 256 difference values is-0.25, and the absolute value of the 256 difference values is less than the preset average value of 0.5;
the maximum absolute value of the difference value of the macro block is 7, and the maximum absolute value of the difference value is less than or equal to a preset difference value 20;
when the difference value diagram is inspected, no two adjacent rows of pixels in 16 rows of pixels are all non-0, namely zero value is contained; 16 columns of pixels are erected, and any two adjacent columns are not 0, namely zero-value; the cross lines are shown, with 31 elements on the cross lines containing 0.
If the above conditions are met, the macro block is successfully classified as an invariant macro block.
Optionally, comparing the macro block of the image data with the reference macro block, and determining a matching macro block includes: comparing the macro block of the image data with the reference macro block, and determining the macro block of the image data as a changed macro block under the condition that a second judgment condition is met; shifting the changed macro block through the global motion vector, and taking the shifted changed macro block which is the same as the reference macro block as a matched macro block; wherein the second determination condition includes: the average value of the difference values of the pixels of the macro block of the image data and the pixels of the reference macro block on the preset component is not less than the preset average value; or, the difference value of the pixels of the macro block of the image data exceeds a preset difference value; or, the difference between the pixels of the macro block of the image data, the difference between the pixels of at least two adjacent rows or columns does not contain 0 value, or the pixels in the cross line of four corners do not contain 0 value.
In the case where the predetermined component is a Y component, for example, as shown in fig. 7, the Y component difference map shows 3 determination conditions that the macroblock satisfies:
the average value of the 256 differences is 24.04, and the absolute value of the 256 differences is not less than 0.5;
the maximum absolute value of the difference is 67 and is not less than 20;
the first 2 adjacent columns in this difference plot do not contain 0.
In summary, the macroblock will be referred to as a change macroblock. In addition, the above-described three determination conditions are in an or relationship, and a macroblock can be determined to be changed if any one of the determination conditions is satisfied.
Not all the changed macroblocks are matched macroblocks, and the changed macroblocks which are shifted by the global motion vector and are the same as the reference macroblocks are the matched macroblocks. The changed macroblock shifted to be different from the reference macroblock may be used as the other macroblocks.
Optionally, comparing the macro block of the image data with the adjacent macro blocks, and determining the copy macro block includes: comparing the macro block of the image data with the adjacent macro block, and determining the macro block of the image data as the adjacent macro block under the condition that a first judgment condition is met; wherein, the adjacent macro block is at least one of the following: in the image data, the adjacent macro block above the macro block, the adjacent macro block below the macro block, the adjacent macro block on the left of the macro block, and the adjacent macro block on the right of the macro block.
When determining a plurality of the above invariant macroblocks, matching macroblocks, and copy macroblocks, the invariant macroblock may be determined first, the matching macroblock may be determined based on the determination, and the copy macroblock may be determined based on the determination. The situation that the coding mode of some macro blocks is uncertain due to the fact that the types of the macro blocks are conflicted because the macro blocks can meet the judgment conditions of multiple types is avoided.
Fig. 2 is a flowchart of a data decoding method according to an embodiment of the present invention, and as shown in fig. 2, according to another aspect of the embodiment of the present invention, there is also provided a data decoding method, including the steps of:
step S202, receiving code streams of different types of macro blocks, wherein the types of the macro blocks are determined according to the global motion vector, and the types comprise: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located;
in step S204, the macroblock is decoded according to the type of the macroblock.
Through the steps, the code stream of different types of macro blocks is received, wherein the types of the macro blocks are determined according to the global motion vector, and the types comprise: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located; according to the type of the macro block, the macro block is decoded in a mode that each macro block type is accurately distinguished in a noise environment, the problem that the macro block types cannot be accurately distinguished due to noise interference can be avoided, a large number of macro blocks which can be originally encoded through interframe or intraframe prediction have to be encoded by using an encoding mode according to a reference frame, and the code stream is greatly increased, and the purpose of effectively determining each type of macro block in the noise environment is achieved, so that the technical effects of improving the data transmission effect and the transmission accuracy under noise and improving the anti-noise effect are achieved, and the technical problems that noise signals exist in the data encoding and decoding process in the related technology, the traditional filtering and de-noise mode is poor in real-time performance and the anti-noise effect is poor are solved.
The execution main body of the above steps may be a data receiving end that receives the code stream for decoding.
Optionally, decoding the macroblock according to the type of the macroblock includes: taking the decoded data of the reference macro block corresponding to the invariant macro block as the decoded data of the invariant macro block, wherein the invariant macro block is the same macro block as the reference macro block; the decoding data of the reference macro block corresponding to the matching macro block are subjected to offset according to the global motion vector, so that the decoding data of the matching macro block are obtained, wherein the matching macro block is a changed macro block which is identical to the reference macro block after offset, and the changed macro block is a macro block which is different from the reference macro block; taking the decoded data of the adjacent macro block corresponding to the copied macro block as the decoded data of the copied macro block, wherein the adjacent macro block is the macro block adjacent to the macro block in the image, and the copied macro block is the same as the adjacent macro block; decoding other macro blocks according to a decoding mode corresponding to a coding mode corresponding to the types of other macro blocks except an invariant macro block, a matching macro block and a copy macro block in the macro blocks of the image data, and determining decoded data, wherein the types of other macro blocks comprise: text macro blocks, picture macro blocks; and decoding the picture macro block according to a picture decoding mode, and decoding the character macro block according to a character decoding mode.
Therefore, the purpose of effectively determining various types of macro blocks in a noise environment is achieved, the data transmission effect and the transmission accuracy under noise are improved, the technical effect of anti-noise effect is improved, and the technical problems that in the related technology, noise signals exist in the data coding and decoding process, the traditional filtering and de-noising mode is poor in instantaneity and the anti-noise effect is poor are solved.
It should be noted that this embodiment also provides an alternative implementation, which is described in detail below.
The key points of the present embodiment are: when the acquired image signal has noise, the macro block type can be accurately distinguished, the filtering operation on the full-frame image is not needed in advance, specifically, the macro blocks with inter-frame prediction and intra-frame prediction characteristics can be accurately classified according to the randomness characteristic of the noise, and the coding code stream is greatly reduced on the premise of not influencing the image quality.
The computer synthesized image is characterized in that the image is not acquired by matching a camera with a photosensitive component, but is generated by a computer, such as the contents of elements of a desktop, a window, a menu and the like of the computer. The method is characterized in that pixels on a picture are very regular, for example, the black background color of the desktop in fig. 3-1 and fig. 3-2, theoretically, as long as the area is not shielded by elements such as windows of other colors, the pixel values embodied by the area should be the same all the time. Similarly, when the same window moves on the screen, the pixel values of the small areas in the window do not change before and after the small areas move. By utilizing the characteristics, the encoder of the computer synthesized image can encode the real-time image into a code stream with good effect and low code rate. But the introduction of noise destroys this property, and in this case, the same coding method is still used, which results in a very large code stream. The noise is generated by a plurality of reasons, some reasons can be avoided, and some reasons cannot be avoided. This embodiment can be optimized on the premise of unavoidable introduction of noise.
The most common scenario is that the data source for image acquisition is an analog signal such as VGA, and the analog signal is converted into a digital signal which can be processed by coding, and the digital signal itself is lossy, and random noise is brought in the process of digital-to-analog conversion. Fig. 3-1 and 3-2 are two adjacent frames of desktop images taken from the VGA interface. Wherein the numbers displayed in the right part are not captured images and the icons and the background color in the left part are captured desktop images. The current scene is a static state with the picture displayed as a user desktop. Looking at the pixel values of the upper right part of the "my computer" icon, theoretically, the two frames should be identical, but the contents are different from each other in the view of the figure, and the difference can be seen in the dashed box on the right side, and the difference is randomly distributed in the full frame picture, which is the influence caused by noise.
Fig. 3-1 is a schematic diagram of pixel values of the macroblock without noise influence according to an embodiment of the present invention, and fig. 3-2 is a schematic diagram of pixel values of the macroblock under noise influence according to an embodiment of the present invention, as shown in fig. 3-1 and fig. 3-2, theoretically, the two frames of pictures in fig. 3-1 and fig. 3-2 are identical. The 1 st frame is full frame compression, in order to reduce code rate, the 2 nd frame can completely adopt an interframe prediction mode, the content of the 1 st frame is directly used as a reference frame, the content of the reference frame is used as the content of the 2 nd frame, and thus, the 2 nd frame can complete encoding only by hundreds of bytes. In practice, however, the content of frame 2 and frame 1 do not coincide from a computer computing point of view due to noise. In order to improve the accuracy, the 2 nd frame and the full frame can be compressed to obtain both the 3 rd and 4 th frames, but this results in the full frame code rate being as high as dozens of times of the noise-free case, and the full frame code rate can hardly be transmitted in the wide area network.
Aiming at the problems, the types of the macro blocks can be accurately distinguished in a noise environment, and the problem that the code stream is greatly increased because a large number of macro blocks which can be originally coded through interframe or intraframe prediction have to be coded by using a coding mode according to a reference frame due to the fact that the types of the macro blocks cannot be accurately distinguished due to noise interference can be avoided.
The system also includes a codec. However, since the key point of the present embodiment is anti-interference, and this characteristic is mainly performed at the encoding end, the decoder only needs to decode according to the type of each macroblock, and therefore, the decoder modules are not listed.
Fig. 4 is a schematic diagram of an encoder module according to an embodiment of the present invention, as shown in fig. 2, the modules and respective roles of the encoder are:
201: a global motion vector search module. The module firstly counts all motion vectors according to the feature points in the whole frame, then carries out histogram statistics on the motion vectors, finds the motion vector with the largest occurrence number, sets the motion vector as a global motion vector if the motion vector reaches a certain number (the scheme is set as 50), and uses the global motion vector as an offset value for judging that the motion vector of the inter-frame prediction matches with the macro block.
202: and an anti-noise data comparison module. Is the core module of this embodiment, which is mainly used to compare two data blocks of the same size. In this embodiment, the size is 16 × 16 pixels, i.e., a macroblock size. In the invention, the processing method of comparison is to give whether the comparison results of two macro blocks are the same or different under the condition of noise; the processing method of comparison is described in detail later.
203: and an invariant macroblock decision module. The module receives original image data, compares each macro block in the original image data with a macro block at the same position of a reference frame as a reference macro block, judges the original image data to be an invariant macro block if the original image data and the macro block are the same in content, executes comparison processing by calling a 202 module, and sends the invariant macro block data to a 207 encoding module for encoding after classification.
Herein, the "invariant macro block" in the present invention refers to: both the content and the location are the same as the corresponding reference macro block in the reference frame.
204: and a motion vector matching macro block judging module. The result of the classification by the block 203, i.e. the area of non-invariant macroblocks, is received by this block. The module traverses each macro block of the areas, shifts the macro blocks through the global motion vector, then finds areas with the size of 16 x 16 in the reference frame according to the shifted positions, compares the areas with the current macro block, and judges the current macro block as a motion vector matching macro block if the areas are the same; after classification, the macro block data is sent to 207 encoding module for encoding. Specifically, 204 is to perform the comparison process by calling 202 the module.
205: and an intra-prediction macro block judgment module. The module receives 204 the processed result, executes the intra-frame prediction, that is, compares the content of the macroblock with the left and upper macroblocks of the macroblock, if the content is the same as one of the left and upper macroblocks, determines the macroblock type as left copy or upper copy, and sends 207 the macroblock type to the coding module for coding. Specifically, 204 is to perform the comparison process by calling 202 the module.
206: 203 and 204 belong to inter-predicted macroblocks, and 205 belong to intra-predicted macroblocks, which are all referred to for encoding. The remaining blocks after the three classification links are screened are judged by using a 206 module, finally, the blocks are judged to be picture blocks or character blocks, the picture blocks are sent to a 207 encoder, the picture blocks are coded by JPEG, and the character blocks are mainly coded by huffman.
It is understood that the comparison process is performed by calling the 202 module in steps 203 to 205. That is, the comparison processing in steps 203 to 205 is performed according to the processing procedure of block 202.
The following focuses on the working process of the analysis 202 module, which is the core of the present solution. To combat noise, the noise is first regularly identified and distinguished from normal pixel variations. Randomly finding a scene, calculating the pixel difference value of two adjacent frames of pictures after ensuring that the screen picture has no visual change, and obtaining the following conclusion through a large amount of statistics:
(1) the rule of the noise is that the noise is irregularly and randomly distributed at all positions of the whole frame;
(2) the main difference between two macro blocks with the same content interfered by noise appears in the Y component, and the difference of the UV component is smaller; and the absolute value of the average of the 256 differences for this macroblock for the Y component is typically below 0.5. The scene is different, the picture is different, this value can also be adjusted again specifically. The scheme adopts 0.5;
(3) in the macro block difference value of the Y component, if the absolute value of the difference value is greater than 20, the macro block has high probability that the color change really occurs, namely the change macro block, but not the noise interference macro block; if all absolute difference values are less than 20, the macro block is considered to be possible to be unchanged;
(4) the real change macro block is characterized in that in the 16 × 16 macro block difference values of the Y component, at least two adjacent rows or two columns do not contain 0 value, or the intersection line of four corners does not contain 0 value. The feature of an invariant macroblock is the opposite. In the macroblock difference value, 0 means that the values of the two pixels are numerically the same.
In practice, the condition for judging two macroblocks to be the same is that the three conditions (2), (3) and (4) must be considered at the same time, and neither condition is satisfied and the condition cannot be judged to be the same.
To explain rule (2), we take the noise interference macro block at the top right of my computer icon as an example, as shown in fig. 3-1.
Fig. 5 is a diagram illustrating the difference between the pixel values of the noisy reference macroblock and the reference macroblock according to the embodiment of the present invention, and as shown in fig. 5, is a difference diagram of the Y component of the noisy reference macroblock, which should be practically the unchanged macroblock. Namely, the Y component value of the current macro block subtracts the brightness value of the corresponding position of the Y component of the reference macro block to obtain a graph. It can be seen from the figure that:
(1) if in the ideal case of no noise, the graph should be all 0. The pixels corresponding to the non-0 value are influenced by noise at present, and the distribution of the pixels is irregular;
(2) the average of the 256 differences is-0.25, the absolute value of which is less than 0.5;
(3) the maximum absolute value of the difference value of the macro block is 7 and is less than 20;
(4) the difference value diagram is inspected, and no two adjacent rows of pixels in 16 rows of pixels are all non-0; 16 columns of pixels are erected, and any two adjacent columns are not 0; the cross lines are shown, with 31 elements on the cross lines containing 0.
If the above conditions are met, the macro block is successfully classified as an invariant macro block.
In contrast, fig. 6-1 is a schematic diagram of a macroblock at the same position in two adjacent frames with a change according to the embodiment of the present invention, and is a schematic diagram of a macroblock with a real change in an image and noise as shown in fig. 6-1, and fig. 6-2 is a schematic diagram of a pixel value of another macroblock at the same position in two adjacent frames with a change according to the embodiment of the present invention, and is a difference diagram of the macroblock from a reference macroblock as shown in fig. 6-2.
Fig. 7 is a diagram illustrating a difference between pixel values of a changed macroblock and a reference macroblock according to an embodiment of the present invention, and as shown in fig. 7, a Y component difference diagram in fig. 7 shows that the macroblock violates the same 3 conditions:
(1) the average value of the 256 differences is 24.04, and the absolute value of the 256 differences is not less than 0.5;
(2) the maximum absolute value of the difference is 67 and is not less than 20;
(3) the first 2 adjacent columns in this difference plot do not contain 0.
In conclusion, the macro block is judged to be a change macro block, and the actual situation is met.
Fig. 8 is a flowchart of anti-noise data comparison according to an embodiment of the present invention, as shown in fig. 8, the specific steps are as follows:
s501: belonging to the quick comparison link. According to the statistical rule, in two real invariant macro blocks to be compared, the case that the absolute value of the difference value is below 4 is a great probability.
The first-level threshold value is that the Y component is 4, the UV component is 1 or 2, the YUV three components of the two macro blocks are directly compared, if the values of all the pixels Y are less than or equal to 4 and the values of the UV are less than or equal to 1 or 2, the macro block is directly judged to be the same macro block, otherwise, as long as one Y is found to be greater than 4 or the UV is greater than 1 or 2, the continuous comparison is immediately stopped, the quick comparison link is exited, and the next stage of judgment is performed in S503; the quick comparison link is set for reducing the calculated amount by utilizing the statistical probability of the difference;
s502: performing pixel difference on two macro blocks to be compared to generate a difference graph of three components, wherein the difference graph of each component consists of 16-by-16 numbers;
s503: calculating the maximum value and the average value of the difference value graph of the three components;
s504: judging whether the three components all accord with the absolute value of the average value <0.5 and the absolute value of the maximum value < 20; if yes, turning to S506 to carry out the next judgment; if not, directly judging that the signals are different;
s505: and judging whether any two-row/column adjacent difference value in the difference value graph contains 0 and the cross line contains 0, if so, judging the macro block to be the same, otherwise, judging the macro block to be different.
The decoding flow is the inverse process of the encoding flow, and as the code stream contains the type of each macro block during encoding, the decoder can directly decode according to the macro block type. And will not be described in detail.
The embodiment provides a high-efficiency anti-noise coding mode without pre-filtering a full frame, and by adopting the scheme, various macro block types, particularly invariant macro blocks and non-invariant macro blocks can be distinguished accurately under noise interference, so that inter-frame and intra-frame prediction is accurately applied to coding, and code streams are greatly reduced. The problem that the code stream is greatly increased due to the fact that the type of the distinguishing macro block is wrong due to noise interference, and particularly, the invariant macro block is mistaken for the invariant macro block is solved.
The embodiment belongs to an anti-noise technology in a macro block classification process. By adopting the coding scheme of the technology, the real-time performance can be ensured, and meanwhile, the code stream size is low, so that the method is particularly suitable for the application scene of computer synthetic images.
Fig. 9 is a schematic diagram of a data encoding apparatus according to an embodiment of the present invention, and as shown in fig. 9, according to another aspect of the embodiment of the present invention, there is also provided a data encoding apparatus including: a statistics module 92, a determination module 94 and an encoding module 96, which are described in detail below.
A counting module 92, configured to count motion vectors of all macroblocks of the image data, and determine that a motion vector corresponding to a macroblock with the largest number is a global motion vector; a determining module 94, connected to the statistical module 92, configured to determine a type to which a macroblock in the image data belongs according to the global motion vector, where the type includes: the macro block is not changed, the macro block is matched, and the macro block is copied; and an encoding module 96, connected to the determining module 94, for encoding the macro blocks in the image data according to the determined type.
By the device, the motion vectors of all the macro blocks of the image data are counted by adopting a counting module 92, and the motion vector with the largest number of corresponding macro blocks is determined as a global motion vector; the determining module 94 determines the type of the macroblock in the image data according to the global motion vector, where the type includes: the macro block is not changed, the macro block is matched, and the macro block is copied; the coding module 96 codes the macro blocks in the image data according to the determined types, accurately distinguishes the macro block types in a noise environment, can avoid the problem that the macro block types cannot be accurately distinguished due to noise interference, so that a large number of macro blocks which can be originally coded through interframe or intraframe prediction have to be coded by using a coding mode according to a reference frame, and the code stream is greatly increased, thereby achieving the purpose of effectively determining the macro blocks of various types in the noise environment, improving the data transmission effect and the transmission accuracy under noise, improving the technical effect of an anti-noise effect, and further solving the technical problems of noise signals in the data coding and decoding process in the related technology, the traditional filtering and de-noise mode, poor real-time performance and poor anti-noise effect.
Fig. 10 is a schematic diagram of another data decoding apparatus according to an embodiment of the present invention, and as shown in fig. 10, according to another aspect of the embodiment of the present invention, there is also provided another data decoding apparatus including: a receiving module 1002 and a decoding module 1004, which will be described in detail below.
A receiving module 1002, configured to receive code streams of different types of macroblocks, where the types of the macroblocks are determined according to the global motion vector, and the types include: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located; a decoding module 1004, connected to the receiving module 1002, for decoding the macro block according to the type of the macro block.
By the above device, the receiving module 1002 is adopted to receive the code streams of different types of macro blocks, wherein the types of the macro blocks are determined according to the global motion vector, and the types include: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located; the decoding module 1004 can accurately distinguish the macroblock types in a noise environment according to the macroblock types by decoding the macroblock types, can avoid the problem that the macroblock types cannot be accurately distinguished due to noise interference, so that a large number of macroblocks which can be originally encoded by interframe or intraframe prediction have to be encoded by using an encoding method according to a reference frame, and the code stream is greatly increased, and achieves the purpose of effectively determining the macroblocks of various types in the noise environment, thereby realizing the technical effects of improving the data transmission effect and the transmission accuracy under noise, improving the anti-noise effect, and further solving the technical problems of noise signals in the data encoding and decoding process in the related art, the traditional filtering and de-noising method, poor real-time performance and poor anti-noise effect.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium including a stored program, wherein when the program runs, the apparatus on which the computer storage medium is located is controlled to execute the method of any one of the above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes to perform the method of any one of the above.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of encoding data, comprising:
counting motion vectors of all macro blocks of the image data, and determining the motion vector with the maximum number of corresponding macro blocks as a global motion vector;
determining a type to which a macro block in the image data belongs according to the global motion vector, wherein the type comprises: the macro block is not changed, the macro block is matched, and the macro block is copied;
and encoding the macro block in the image data according to the determined type.
2. The method of claim 1, wherein determining the type of macroblock in the image data from the global motion vector comprises:
comparing the macro block of the image data with a reference macro block, and determining an invariant macro block and a variant macro block in the macro block of the image data, wherein the invariant macro block is the same as the reference macro block, and the variant macro block is different from the reference macro block;
shifting the changed macro block of the image data according to the global motion vector, and taking the shifted changed macro block which is the same as the reference macro block as the matched macro block;
comparing the macro block of the image data with an adjacent macro block of the macro block adjacent to the macro block in the image, and determining a copy macro block in the macro block of the image data, wherein the copy macro block is the same macro block as the adjacent macro block.
3. The method of claim 2, wherein determining the type of macroblock in the image data from the global motion vector comprises:
matching the invariant macro blocks, copying the macro blocks and coding the macro blocks respectively;
determining the types of other macroblocks except the invariant macroblock, the matching macroblock and the copy macroblock in the macroblocks of the image data, wherein the types of the other macroblocks comprise: text macro blocks, picture macro blocks;
and coding the picture macro block according to a picture coding mode, and coding the character macro block according to a character coding mode.
4. The method of claim 3, wherein comparing the macroblock of image data to a reference macroblock, and wherein determining an invariant macroblock comprises:
comparing the macro block of the image data with a reference macro block, and determining the macro block of the image data as an invariant macro block under the condition that a first judgment condition is met, wherein the reference macro block is a coded preset macro block;
wherein the first determination condition includes: the average value of the difference values of the pixels of the macro block of the image data and the pixels of the reference macro block on the preset component is smaller than the preset average value;
and, the difference of pixels of a macroblock of the image data does not exceed a preset difference;
and the difference value of the pixels of the macro block of the image data, the difference value of at least two adjacent rows or columns of pixels contains 0 value, or the pixels in the cross line of four corners contain 0 value.
5. The method of claim 4, wherein comparing the macroblock of image data to a reference macroblock, and wherein determining a matching macroblock comprises:
comparing the macro block of the image data with a reference macro block, and determining the macro block of the image data as a changed macro block under the condition that a second judgment condition is met;
shifting the changed macro block through the global motion vector, and taking the shifted changed macro block which is the same as the reference macro block as the matched macro block;
wherein the second determination condition includes: the average value of the difference values of the pixels of the macro block of the image data and the pixels of the reference macro block on the preset component is not less than the preset average value;
or, the difference value of the pixels of the macro block of the image data exceeds the preset difference value;
or, the difference value of the pixels of the macro block of the image data, the difference value of at least two adjacent rows or columns of pixels, does not contain 0 value, or the pixels in the four-corner cross line do not contain 0 value.
6. The method of claim 5, wherein comparing the macroblock of image data to neighboring macroblocks and determining a copy macroblock comprises:
comparing the macro block of the image data with an adjacent macro block, and determining the macro block of the image data as the adjacent macro block under the condition that the first judgment condition is met;
wherein the adjacent macro block is at least one of the following: the macro block adjacent to the upper part of the macro block, the macro block adjacent to the lower part of the macro block, the macro block adjacent to the left part of the macro block and the macro block adjacent to the right part of the macro block in the image data.
7. A method of decoding data, comprising:
receiving code streams of different types of macro blocks, wherein the types of the macro blocks are determined according to global motion vectors, and the types comprise: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located;
and decoding the macro block according to the type of the macro block.
8. The method of claim 7, wherein decoding the macroblock according to the type of the macroblock comprises:
taking the decoded data of the reference macro block corresponding to the invariant macro block as the decoded data of the invariant macro block, wherein the invariant macro block is the same macro block as the reference macro block;
performing offset on the decoded data of the reference macro block corresponding to the matched macro block according to the global motion vector to obtain the decoded data of the matched macro block, wherein the matched macro block is a changed macro block which is identical to the reference macro block after offset, and the changed macro block is a macro block which is different from the reference macro block;
taking the decoded data of the adjacent macro block corresponding to the copied macro block as the decoded data of the copied macro block, wherein the adjacent macro block is a macro block adjacent to the macro block in the image, and the copied macro block is the same macro block as the adjacent macro block;
decoding the other macroblocks according to decoding modes corresponding to coding modes corresponding to types of other macroblocks except the unchanged macroblock, the matched macroblock and the copied macroblock in the macroblocks of the image data, and determining decoded data, wherein the types of the other macroblocks comprise: text macro blocks, picture macro blocks; and decoding the picture macro block according to a picture decoding mode, and decoding the character macro block according to a character decoding mode.
9. A data encoding apparatus, comprising:
the statistic module is used for counting the motion vectors of all macro blocks of the image data and determining the motion vector with the largest number of corresponding macro blocks as a global motion vector;
a determining module, configured to determine a type to which a macroblock in the image data belongs according to the global motion vector, where the type includes: the macro block is not changed, the macro block is matched, and the macro block is copied;
and the coding module is used for coding the macro blocks in the image data according to the determined types.
10. A data decoding apparatus, comprising:
a receiving module, configured to receive code streams of different types of macroblocks, where the type of a macroblock is determined according to a global motion vector, and the type includes: the macro block is not changed, the macro block is matched, and the macro block is copied; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all the macro blocks of the image data where the macro blocks are located;
and the decoding module is used for decoding the macro block according to the type of the macro block.
CN202010717846.2A 2020-07-23 2020-07-23 Data encoding method and device, and data decoding method and device Active CN111770334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010717846.2A CN111770334B (en) 2020-07-23 2020-07-23 Data encoding method and device, and data decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010717846.2A CN111770334B (en) 2020-07-23 2020-07-23 Data encoding method and device, and data decoding method and device

Publications (2)

Publication Number Publication Date
CN111770334A true CN111770334A (en) 2020-10-13
CN111770334B CN111770334B (en) 2023-09-22

Family

ID=72727140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010717846.2A Active CN111770334B (en) 2020-07-23 2020-07-23 Data encoding method and device, and data decoding method and device

Country Status (1)

Country Link
CN (1) CN111770334B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112351281A (en) * 2020-10-28 2021-02-09 西安万像电子科技有限公司 Image processing method and device, processor and nonvolatile storage medium
CN112422973A (en) * 2020-10-28 2021-02-26 西安万像电子科技有限公司 Encoding method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10229563A (en) * 1997-02-13 1998-08-25 Sanyo Electric Co Ltd Moving image encoding method and moving image encoder
US20030043912A1 (en) * 2001-08-23 2003-03-06 Sharp Laboratories Of America, Inc. Method and apparatus for motion vector coding with global motion parameters
US20030202590A1 (en) * 2002-04-30 2003-10-30 Qunshan Gu Video encoding using direct mode predicted frames
CN110933428A (en) * 2019-10-17 2020-03-27 西安万像电子科技有限公司 Image processing method and device
CN110971903A (en) * 2019-10-17 2020-04-07 西安万像电子科技有限公司 Coding method, device and system
CN110996127A (en) * 2019-11-25 2020-04-10 西安万像电子科技有限公司 Image coding and decoding method, device and system
CN111277829A (en) * 2020-02-25 2020-06-12 西安万像电子科技有限公司 Encoding and decoding method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10229563A (en) * 1997-02-13 1998-08-25 Sanyo Electric Co Ltd Moving image encoding method and moving image encoder
US20030043912A1 (en) * 2001-08-23 2003-03-06 Sharp Laboratories Of America, Inc. Method and apparatus for motion vector coding with global motion parameters
US20030202590A1 (en) * 2002-04-30 2003-10-30 Qunshan Gu Video encoding using direct mode predicted frames
CN110933428A (en) * 2019-10-17 2020-03-27 西安万像电子科技有限公司 Image processing method and device
CN110971903A (en) * 2019-10-17 2020-04-07 西安万像电子科技有限公司 Coding method, device and system
CN110996127A (en) * 2019-11-25 2020-04-10 西安万像电子科技有限公司 Image coding and decoding method, device and system
CN111277829A (en) * 2020-02-25 2020-06-12 西安万像电子科技有限公司 Encoding and decoding method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘云海等: "基于运动复杂度的码率控制算法研究", 《浙江大学学报(工学版)》 *
朱小松等: "MPEG-4编、解码器容错技术的研究", 《电视技术》 *
王慈等: "一种易于并行实现的全局运动估计算法", 《计算机工程》 *
陈思利等: "一种基于全局视差的多视点视频快速编码方法", 《成都电子机械高等专科学校学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112351281A (en) * 2020-10-28 2021-02-09 西安万像电子科技有限公司 Image processing method and device, processor and nonvolatile storage medium
CN112422973A (en) * 2020-10-28 2021-02-26 西安万像电子科技有限公司 Encoding method and device

Also Published As

Publication number Publication date
CN111770334B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN111819854B (en) Method and apparatus for coordinating multi-sign bit concealment and residual sign prediction
CN105472205B (en) Real-time video noise reduction method and device in encoding process
USRE42148E1 (en) Method and apparatus for visual lossless image syntactic encoding
US20220058775A1 (en) Video denoising method and apparatus, and storage medium
KR101808327B1 (en) Video encoding/decoding method and apparatus using paddding in video codec
CN110087083B (en) Method for selecting intra chroma prediction mode, image processing apparatus, and storage apparatus
CN100370484C (en) System for and method of sharpness enhancement for coded digital video
WO2005122588A1 (en) Method for chroma deblocking
CN111770334B (en) Data encoding method and device, and data decoding method and device
US8363978B2 (en) System and method for block edge location with varying block sizes and offsets in compressed digital video
CN104284199A (en) Video decoding method and device through deblocking effect operation for reducing complexity
Li et al. An anti-steganalysis HEVC video steganography with high performance based on CNN and PU partition modes
EP1072157A1 (en) Video decoding device and method using a filtering step for block effect reduction
CN113992635B (en) Multimedia data processing method, device, equipment and storage medium
JPH04219089A (en) Image encoding device
US10477219B2 (en) Image-processing apparatus and lossless image compression method using intra-frame prediction
US5703697A (en) Method of lossy decoding of bitstream data
CN113329229A (en) High-capacity hiding method for H.265 video information with high-efficiency fidelity
CN110913215B (en) Method and device for selecting prediction mode and readable storage medium
CN107222743B (en) Image processing method, device and system
CN108024111B (en) Frame type judgment method and device
CN111212288B (en) Video data encoding and decoding method and device, computer equipment and storage medium
CN109862207B (en) KVM video content change detection method based on compressed domain
US9542611B1 (en) Logo detection for macroblock-based video processing
JP2001094996A (en) Block distortion reduction method and block distortion reduction device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant