CN111770334B - 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 PDFInfo
- Publication number
- CN111770334B CN111770334B CN202010717846.2A CN202010717846A CN111770334B CN 111770334 B CN111770334 B CN 111770334B CN 202010717846 A CN202010717846 A CN 202010717846A CN 111770334 B CN111770334 B CN 111770334B
- Authority
- CN
- China
- Prior art keywords
- macro block
- macro
- blocks
- image data
- block
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
- H04N19/139—Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
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 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; determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: a constant macro block, a matched macro block and a copy macro block; and encoding the macro block in the image data according to the determined type. The invention solves the technical problems of noise signals in the data encoding and decoding process in the related technology, poor real-time performance and poor anti-noise effect in the traditional filtering denoising mode.
Description
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 premise of compression coding transmission of a computer synthesized image is that the image is acquired, and according to different scenes of specific applications, noise can be introduced in the acquisition process, so that interference is brought to an image signal, and the interference noise can greatly influence the coding code stream and the coding effect of the synthesized image. The existing real-time transmission technology is mainly used for collecting digital signals such as HDMI, namely, the collection is ensured not to introduce a large amount of noise, and coding is carried out on the premise; the filtering process can be performed on noise, and the filtering process is often used for non-real-time scenes because of the need of completely preprocessing each frame of image. The method cannot simultaneously have good real-time requirements and anti-noise effects.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a data coding method and device and a data decoding method and device, which at least solve the technical problems of noise signals in the data coding and decoding process in the related technology, poor real-time performance and poor anti-noise effect in the traditional filtering and denoising mode.
According to an aspect of an embodiment of the present invention, there is provided a data encoding method including: 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; determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: a constant macro block, a matched macro block and a copy macro block; 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 the macroblock in the image data belongs includes: comparing the macro block of the image data with a reference macro block, and determining a constant macro block and a variable macro block in the macro block of the image data, wherein the constant macro block is the same macro block as the reference macro block, and the variable macro block is a macro block different from the reference macro block; shifting the changed macro block of the image data according to the global motion vector, and taking the changed macro block which is the same as the reference macro block after shifting as the matched macro block; and comparing the macro block of the image data with adjacent macro blocks adjacent to the macro block in the image to determine 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 the macroblock in the image data belongs includes: coding the unchanged macro blocks, the matched macro blocks and the copied macro blocks respectively; determining types of other macro blocks except the unchanged macro block in the macro blocks of the image data, wherein the types of the other macro blocks comprise: text macro block, picture macro block; and encoding the picture macro blocks according to a picture encoding mode, and encoding the text macro blocks according to a text encoding mode.
Optionally, comparing the macroblock of the image data with a reference macroblock, determining the unchanged macroblock 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 constant macro block under the condition that a first judging condition is met, wherein the reference macro block is an encoded 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 values of the pixels of the macro block of the image data do not exceed a preset difference value; 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 four-corner crossing line contains 0 value.
Optionally, comparing the macroblock of the image data with a reference macroblock, determining a matching macroblock 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 judging condition is met; shifting the changed macro block through the global motion vector, and taking the changed macro block which is the same as the reference macro block after shifting 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 smaller than the preset average value; or, the difference of pixels of a macroblock of the image data exceeds the preset difference; 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 macroblock of the image data with neighboring macroblocks, determining the copied macroblock includes: comparing the macro block of the image data with adjacent macro blocks, and determining the macro block of the image data as the adjacent macro block under the condition that the first judging condition is met; wherein the neighboring macro block is at least one of: and in the image data, adjacent macro blocks above the macro block, adjacent macro blocks below the macro block, adjacent macro blocks to the left of the macro block and adjacent macro blocks to the right of the macro block.
According to another aspect of the embodiment of the present invention, there is also provided a data decoding method, including: receiving code streams of macro blocks of different types, wherein the types of the macro blocks are determined according to global motion vectors, and the types comprise: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the maximum number of corresponding macro blocks in the motion vectors of all macro blocks of the image data of the macro blocks; 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 unchanged macro block as the decoded data of the unchanged macro block, wherein the unchanged 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 the same as the reference macro block after offset, and the changed macro block is a macro block which is different from the reference macro block; the decoding data of adjacent macro blocks corresponding to the copied macro blocks are used as the decoding data of the copied macro blocks, wherein the adjacent macro blocks are adjacent macro blocks of the macro blocks in the image, and the copied macro blocks are the same macro blocks as the adjacent macro blocks; and decoding other macro blocks according to a decoding mode corresponding to an encoding mode corresponding to the type of the other macro blocks except the unchanged macro block in the macro blocks of the image data, wherein the type of the other macro blocks comprises: text macro block, picture macro block; and decoding the picture macro block according to a picture decoding mode, and decoding the text macro block according to a text decoding mode.
According to another aspect of the embodiment of the present invention, there is also provided a data encoding apparatus including: the statistics 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, according to the global motion vector, a type to which a macroblock in the image data belongs, where the type includes: a constant macro block, a matched macro block and a copy macro block; and the encoding module is used for encoding the macro blocks in the image data according to the determined type.
According to another aspect of the embodiment of the present invention, there is also provided a data decoding apparatus including: the receiving module is configured to receive code streams of macro blocks of different types, where the types of macro blocks are determined according to global motion vectors, and the types include: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the maximum number of corresponding macro blocks in the motion vectors of all macro blocks of the image data of the macro blocks; 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 embodiment 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 device in which the computer storage medium is controlled to execute the method of any one of the above methods.
According to another aspect of the embodiment of the present invention, there is also provided a processor, where the processor is configured to execute a program, where the program executes any one of the methods described above.
In the embodiment of the invention, the motion vectors of all macro blocks of the statistical image data are adopted, and the motion vector with the maximum number of corresponding macro blocks is determined as the global motion vector; determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: a constant macro block, a matched macro block and a copy macro block; according to the determined type, the macro block type in the image data is accurately distinguished in the noise environment, so that the problem that a large number of macro blocks which can be coded through inter-frame or intra-frame prediction originally have to be coded in a coding mode according to a reference frame to greatly increase the code stream can be avoided, the aim of effectively determining the macro blocks of each type in the noise environment is fulfilled, the data transmission effect under noise is improved, the transmission accuracy is improved, the technical effect of noise resistance is improved, and the technical problems that noise signals exist in the data coding and decoding process in the related art, the traditional filtering denoising mode is poor in instantaneity and poor in noise resistance are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a data encoding method according to an embodiment of the present application;
FIG. 2 is a flow chart of a data decoding method according to an embodiment of the present application;
FIG. 3-1 is a schematic diagram of pixel values of the macroblock without noise effects according to an embodiment of the application;
FIG. 3-2 is a schematic diagram of pixel values of the macroblock under the influence of noise in accordance with an embodiment of the present application;
FIG. 4 is a schematic diagram of an encoder module according to embodiments of the present application;
FIG. 5 is a schematic diagram of pixel value differences between noise-interfering macroblocks and reference macroblocks in accordance with an embodiment of the application;
FIG. 6-1 is a schematic diagram of one macroblock at the same position in two adjacent frames that are changed in accordance with an embodiment of the present application;
FIG. 6-2 is a schematic diagram of pixel values of another macroblock at the same location in two adjacent frames that are changed in accordance with an embodiment of the present application;
FIG. 7 is a schematic diagram of pixel value differences between a changed macroblock and a reference macroblock in accordance with an embodiment of the present application;
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 that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise 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.
According to an embodiment of the present invention, there is provided a method embodiment of a data encoding method, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that 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 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;
step S104, determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: a constant macro block, a matched macro block and a copy macro block;
step S106, according to the determined type, the macro block in the image data is encoded.
Through the steps, the motion vector of all macro blocks of the statistical image data is adopted, and the motion vector with the maximum number of corresponding macro blocks is determined to be the global motion vector; determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: a constant macro block, a matched macro block and a copy macro block; according to the determined type, the macro block type in the image data is accurately distinguished in the noise environment, so that the problem that a large number of macro blocks which can be coded through inter-frame or intra-frame prediction originally have to be coded in a coding mode according to a reference frame to greatly increase the code stream can be avoided, the aim of effectively determining the macro blocks of each type in the noise environment is fulfilled, the data transmission effect under noise is improved, the transmission accuracy is improved, the technical effect of noise resistance is improved, and the technical problems that noise signals exist in the data coding and decoding process in the related art, the traditional filtering denoising mode is poor in instantaneity and poor in noise resistance are solved.
The global motion vector may also be the motion vector with the largest number of corresponding macro blocks exceeding a preset number threshold.
Optionally, determining, according to the global motion vector, a type to which the macroblock in the image data belongs includes: comparing a macro block of the image data with a reference macro block to determine a constant macro block and a variable macro block in the macro block of the image data, wherein the constant macro block is the same macro block as the reference macro block, and the variable macro block is a macro block different from the reference macro block; shifting the changed macro blocks of the image data according to the global motion vector, and taking the changed macro blocks which are the same as the reference macro blocks after shifting as matched macro blocks; and comparing the macro block of the image data with adjacent macro blocks adjacent to the macro block in the image to determine 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.
Because each macroblock type is accurately distinguished under noise environment, the problem that a large number of macroblocks which can be coded through inter-frame or intra-frame prediction originally have to be coded according to the coding mode of a reference frame to greatly increase a code stream can be avoided due to noise interference, the types of the macroblocks are classified through the mode, the different types of the macroblocks are classified for coding and decoding, the code stream is reduced, the data transmission effect under noise is improved, the transmission accuracy is improved, the technical effect of noise resistance is improved, and the technical problems that noise signals exist in the data acquisition process in the related art, the traditional filtering denoising mode is poor in real-time performance and poor in noise resistance are solved.
Specifically, when the macro block of the type is encoded, since the invariable macro block is the same as the already encoded reference macro block, the code stream of the encoded reference macro block can be directly used as the code stream of the invariable macro block, so that the coding of the invariable macro block is avoided, the coding efficiency is improved, and the data quantity of the code stream is reduced.
When the matched macro block is coded, the offset of a global motion vector is different between the matched macro block and the coded reference macro block, so that the code stream of the coded reference macro block is offset by a global motion vector, the code stream of the matched macro block can be obtained quickly, the coding efficiency is improved, and the data quantity of the code stream is reduced.
When the copied macroblock is coded, since the copied macroblock is the same as the coded adjacent macroblock, after the adjacent macroblock is coded, the code stream of the adjacent macroblock can be used as the code stream of the copied macroblock, so that the coding efficiency is improved, and the data quantity of the code stream is reduced.
Optionally, determining, according to the global motion vector, a type to which the macroblock in the image data belongs includes: coding the unchanged macro blocks, the matched macro blocks and the copied macro blocks respectively; judging types of other macro blocks except the unchanged macro block, the matched macro block and the copy macro block in the macro blocks of the image data, wherein the types of the other macro blocks comprise: text macro block, picture macro block; and encoding the picture macro blocks according to a picture encoding mode, and encoding the text macro blocks according to a text encoding mode.
When other macro blocks are encoded, the types of the other macro blocks are determined, wherein the types of the other macro blocks can be the encoding types aiming at the encoding mode, for example, the types comprise picture macro blocks and text macro blocks, when the encoding is carried out, the picture macro blocks are encoded according to the picture encoding mode, and the text macro blocks are encoded according to the text encoding mode. Different from the types of the macro blocks, the types of the macro blocks are macro blocks which can be quickly coded from different angles, and specifically comprise unchanged macro blocks, matched macro blocks and copied macro blocks.
Encoding it may further improve the encoding efficiency by different types of other macroblocks.
Optionally, comparing the macroblock of the image data with a reference macroblock, determining the unchanged macroblock includes: comparing a macro block of the image data with a reference macro block, and determining the macro block of the image data as a constant macro block under the condition that a first judging 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 value of the pixels of the macro block of the image data does not exceed the preset difference value; and, the difference value of pixels of a macroblock of image data, the difference value of at least two adjacent rows or columns of pixels contains 0 value, or the pixel in the crossing line of four corners contains 0 value.
The preset component may be a YUV component, or any one component or any two components of YUV components. In this embodiment, the Y component may be exemplified below.
As shown in fig. 5, the pixel difference between the macro block of the image data and the reference macro block is the whole case, and if the image data is ideal without noise, the image should be 0. At present, pixels corresponding to non-0 values are affected by noise, and irregular distribution of the pixels can be seen;
the average value of the 256 differences is-0.25, and the absolute value of the 256 differences is smaller than the preset average value of 0.5;
the maximum absolute value of the difference of the macro block is 7 and is smaller than or equal to 20;
looking at the difference diagram, in the pixels of the horizontal 16 rows, no two adjacent rows of pixels are all non-0, namely zero value is contained; the 16 columns of pixels are vertical, and no any two adjacent columns are all non-0, namely zero value is contained; the intersecting lines are shown with 31 elements on the intersecting lines containing 0.
With the above conditions, the present macroblock is successfully classified as a constant macroblock.
Optionally, comparing the macroblock of the image data with a reference macroblock, determining a matching macroblock 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 the second judging condition is satisfied; shifting the changed macro block through the global motion vector, and taking the changed macro block which is the same as the reference macro block after shifting 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 smaller 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 value of the pixels of the macro block of the image data, the difference value of the pixels of at least two adjacent rows or columns does not contain 0 value, or the pixels in the crossing lines of four corners do not contain 0 value.
In the case where the preset component is the Y component, for example, as shown in fig. 7, the Y component difference map can see 3 decision 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 map do not contain 0.
The macroblock will be determined as a changed macroblock. The above three determination conditions are or are in relation to each other, and it is possible to determine that a macro block is changed by satisfying any one of the above three determination conditions.
Not all the changed macro blocks are matched macro blocks, the global motion vector is used for shifting, and the changed macro blocks which are the same as the reference macro blocks after shifting are matched macro blocks. A changed macroblock different from the reference macroblock after the offset may be used as the other macroblock.
Optionally, comparing the macroblock of image data with neighboring macroblocks, determining the copied macroblock 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 the first judging condition is satisfied; wherein the neighboring macro block is at least one of: in the image data, adjacent macro blocks above the macro block, adjacent macro blocks below the macro block, adjacent macro blocks to the left of the macro block and adjacent macro blocks to the right of the macro block.
When the plurality of the unchanged macro blocks, the matched macro blocks, and the copy macro blocks are determined, the matched macro blocks may be determined based on the unchanged macro blocks determined first, and the copy macro blocks may be determined based on the matched macro blocks. The situation that some macro blocks can meet multiple types of judging conditions to cause type conflict and the coding mode of the macro blocks is uncertain 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 macro blocks are determined according to the global motion vector, and the types include: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all macro blocks of the image data where the macro blocks are located;
step S204, decoding the macro block according to the macro block type.
Through the steps, the code stream for receiving the macro blocks of different types is adopted, wherein the types of the macro blocks are determined according to the global motion vector, and the types comprise: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all macro blocks of the image data where the macro blocks are located; according to the type of the macro block, the macro block type is accurately distinguished in a noise environment according to the mode of decoding the macro block, the problem that a large number of macro blocks which can be coded through inter-frame or intra-frame prediction originally have to be coded in a coding mode according to a reference frame, so that a code stream is greatly increased is solved, the purpose of effectively determining the macro blocks of each type in the noise environment is achieved, the data transmission effect under noise is improved, the transmission accuracy is improved, the technical effect of noise resistance 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 poor in noise resistance are solved.
The execution body of the above steps may be a data receiving end that receives a code stream for decoding.
Optionally, decoding the macroblock according to the type of macroblock includes: taking the decoded data of the reference macro block corresponding to the unchanged macro block as the decoded data of the unchanged macro block, wherein the unchanged macro block is the same macro block as the reference macro block; the decoding data of the reference macro block corresponding to the matched macro block is shifted according to the global motion vector to obtain the decoding data of the matched macro block, wherein the matched macro block is a changed macro block which is the same as the reference macro block after shifting, and the changed macro block is a macro block which is different from the reference macro block; the decoding data of adjacent macro blocks corresponding to the copied macro blocks are used as the decoding data of the copied macro blocks, wherein the adjacent macro blocks are adjacent macro blocks of the macro blocks in the image, and the copied macro blocks are macro blocks identical to the adjacent macro blocks; according to the decoding mode corresponding to the coding mode corresponding to the type of other macro blocks except the unchanged macro block, matching macro blocks and the copy macro blocks in the macro blocks of the image data, decoding the other macro blocks, and determining decoded data, wherein the types of the other macro blocks comprise: text macro block, picture macro block; and decoding the picture macro block according to a picture decoding mode, and decoding the text macro block according to a text decoding mode.
Therefore, the purpose of effectively determining each type of macro block in a noise environment is achieved, the data transmission effect under noise is improved, the transmission accuracy is improved, the technical effect of anti-noise effect is improved, and the technical problems that noise signals exist in the data encoding and decoding process in the related technology, the traditional filtering denoising mode is poor in instantaneity and poor in anti-noise effect are solved.
It should be noted that this embodiment also provides an alternative implementation, and this implementation is described in detail below.
The key invention points of the present embodiment are as follows: when the acquired image signal has noise, the type of the macro block can be accurately distinguished, the filtering operation on the full-frame image is not required in advance, specifically, the macro block with the characteristics of inter-frame prediction and intra-frame prediction 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 affecting the image quality.
The computer synthesized image is characterized in that the image is not acquired by a camera matched with a photosensitive component, but generated by a computer, such as the contents of elements such as a desktop, a window, a menu and the like of the computer. The display is characterized in that the pixels on the picture are very regular, such as the black matrix of the desktop in fig. 3-1 and 3-2, and theoretically, the pixel values of the region are always the same as long as the region is not shielded by elements such as windows of other colors. Similarly, when the same window moves on the screen, the pixel value displayed in the small area inside the window does not change before and after the movement. It is with these features that the encoder of the computer synthesized image can encode the real-time image into a well-defined code stream with a very low code rate. However, the introduction of noise destroys this feature, and in this case the same coding scheme is still used, which leads to a very large increase in the code stream. The noise is generated for a plurality of reasons, some of which can be avoided, and some of which cannot be avoided. The present embodiment can be optimized on the premise of unavoidable noise introduction.
The most common scenario is that the data source for image acquisition is analog signals such as VGA, the analog signals are converted into digital signals which can be processed by coding, the digital signals are lost, and random noise is brought in the digital-to-analog conversion process. Fig. 3-1 and 3-2 are two adjacent frames of desktop images taken from the VGA interface. Wherein the numbers displayed on the right part are not the acquired images, the icons on the left part and the ground color are the acquired desktop images. The current scene is a static state in which the picture is displayed as a user desktop. The pixel value of the upper right corner of the my computer icon is viewed, and theoretically, two frames are completely consistent, but the contents are not identical from the view point, and the difference can be seen in a right dotted line frame, and the difference is randomly distributed in the whole frame picture, so that the influence of noise is caused.
Fig. 3-1 is a schematic view of pixel values of the macro block without noise influence according to an embodiment of the present invention, and fig. 3-2 is a schematic view of pixel values of the macro block under noise influence according to an embodiment of the present invention, as shown in fig. 3-1 and 3-2, theoretically, two frames of pictures in fig. 3-1 and 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 inter-frame prediction mode, the content of the 1 st frame is directly used as a reference frame, the content of the 1 st frame is used as the content of the 2 nd frame, and thus, the 2 nd frame can finish 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 accuracy, the 2 nd frame may be compressed as well as the full frame, resulting in 3 rd and 4 th frames, which, however, may result in a full frame code rate as high as ten times that of the noiseless case, which is almost impossible to transmit over a wide area network.
Aiming at the problems, each macroblock type can be accurately distinguished under a noise environment, and the problem that the code stream is greatly increased because the macroblock type cannot be accurately distinguished due to noise interference, so that a large number of macroblocks which can be originally encoded through inter-frame or intra-frame prediction have to be encoded by using an encoding mode according to a reference frame can be avoided.
The system also includes a codec. However, since the main key point of this embodiment is interference resistance, and this feature is mainly performed at the encoding end, the decoder only needs to decode according to each macroblock type, and thus the decoder module is not listed.
Fig. 4 is a schematic diagram of an encoder module according to embodiments of the present invention, as shown in fig. 2, the encoder module and its respective roles are:
201: and a global motion vector search module. The module firstly counts all motion vectors according to characteristic points in a whole frame, then carries out histogram statistics on the motion vectors, finds out the motion vector with the largest occurrence number, if the motion vector reaches a certain number (50 in the scheme), sets the motion vector as a global motion vector, and matches the motion vector as inter-frame prediction with an offset value determined by a macro block.
202: and the anti-noise data comparison module. Is the core module of this embodiment, and is mainly used for comparing two data blocks with the same size. In this embodiment, this size is 16×16 pixels, i.e., one macroblock size. In the invention, the processing method of comparison is to give out whether the comparison results of two macro blocks are the same or different under the condition of noise; the comparative processing method is described in detail later.
203: and a constant macro block judging module. The module receives original image data, compares each macro block with macro blocks at the same position of a reference frame as a reference macro block, judges the macro block as a constant macro block if the content is the same, and sends the constant macro block data to the 207 coding module for coding after the comparison processing is carried out by calling the 202 module.
Wherein, the term "unchanged macro block" refers to: the content and location are the same as the corresponding reference macro blocks in the reference frame.
204: the motion vector matches the macroblock decision module. The result of the classification of the module 203 is received by the module, namely, the area of the non-unchanged macro block. Traversing each macro block of the areas by the module, shifting the macro blocks through a global motion vector, then searching an area with the size of 16 x 16 in a reference frame according to the shifted position, comparing the area with the current macro block, and judging the current macro block as a motion vector matching macro block if the area is the same as the current macro block; after classification, this type of macroblock data is passed 207 to the encoding module for encoding. Specifically, 204 is the comparison process performed by calling 202 the module.
205: and an intra prediction macroblock decision module. The present module receives 204 the processing result, executes intra prediction, i.e. compares the present macroblock content with the left and upper macroblocks of the present macroblock, if the present macroblock content is the same as one of the present macroblock content and the left and upper macroblocks, then determines the present macroblock type as the left copy or upper copy, and sends 207 the present macroblock type to the encoding module for encoding. Specifically, 204 is the comparison process performed by calling 202 the module.
206:203 and 204 belong to inter-prediction macroblocks and 205 belong to intra-prediction macroblocks, all three types of macroblocks being referenced to complete the encoding operation. The remaining blocks after screening of the three classification links are judged by using a module 206, and finally are judged to be picture blocks or text blocks, the picture blocks are sent to 207 an encoder, the picture blocks are encoded by JPEG, and the text blocks are mainly encoded by human.
It will be appreciated that in steps 203 to 205, the comparison process is performed by calling 202 the module. That is, the comparison processing in steps 203 to 205 is performed according to the processing steps of the 202 module.
The following focus on the operation of the module 202 is the core of the present solution. To combat noise, the noise is first found out and distinguished from normal pixel variations. After any scene is found, the pixel difference value of two adjacent frames of pictures is calculated after the screen pictures are ensured not to be changed in any vision, and the following conclusion can be obtained through a large amount of statistics:
(1) 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 of noise interference is the Y component, and the difference between the UV component is smaller; and the absolute value of the average of the 256 differences for this macroblock of the Y component is typically below 0.5. Different scenes and different pictures, and the value can be specifically adjusted. 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 larger than 20, the macro block has high probability of actually changing color, namely changing the macro block, but not disturbing the macro block by noise; if all absolute values of the differences are < = 20, the macro block is considered to be possible to be unchanged;
(4) The actual changing macro block is characterized in that at least two adjacent rows or columns often have no 0 value or the four-corner intersecting line has no 0 value in the 16-by-16 macro block difference value of the Y component. The characteristics of the unchanged macro block are contrary to the above. In the macroblock difference, 0 means that the values of two pixels are numerically identical.
In practice, the condition for determining that two macro blocks are identical is that the above three conditions (2), (3) and (4) must be considered simultaneously, and neither condition is satisfied and the identical determination cannot be made.
To explain rule (2), still take the noise interference macro block on the upper right side of my computer icon as shown in fig. 3-1.
Fig. 5 is a schematic diagram of pixel value differences between a noise-disturbing macroblock and a reference macroblock, as shown in fig. 5, which is a noise-disturbing, as it should be, Y-component difference diagram of a constant macroblock, according to an embodiment of the present invention. I.e. the Y component value of the current macroblock minus the luminance value of the corresponding position of the Y component of the reference macroblock. As can be seen from the figure:
(1) If there is no noise ideal, the graph should be all 0 s. At present, pixels corresponding to non-0 values are affected by noise, and irregular distribution of the pixels can be seen;
(2) The average value of the 256 differences is-0.25, and the absolute value of the 256 differences is less than 0.5;
(3) The maximum absolute value of the difference value of the macro block is 7 and is smaller than 20;
(4) Looking at the difference diagram, in the pixels of the horizontal 16 rows, no two adjacent rows of pixels are all non-0; 16 columns of pixels are erected, and any two adjacent columns are not all 0; the intersecting lines are shown with 31 elements on the intersecting lines containing 0.
With the above conditions, the present macroblock is successfully classified as a constant macroblock.
In contrast, fig. 6-1 is a schematic diagram of a macroblock at the same position in two adjacent frames that are changed according to an embodiment of the present invention, as shown in fig. 6-1, which is a macroblock in which an image is actually changed while also being noisy, and fig. 6-2 is a schematic diagram of pixel values of another macroblock at the same position in two adjacent frames that are changed according to an embodiment of the present invention, as shown in fig. 6-2, which is a difference map between the same macroblock and a reference macroblock.
Fig. 7 is a schematic diagram of pixel value differences between a changed macroblock and a reference macroblock according to an embodiment of the present invention, and as shown in fig. 7, the 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 map do not contain 0.
The macro block is judged as a changed macro block, which accords with the actual situation.
FIG. 8 is a flowchart of anti-noise data comparison according to an embodiment of the present invention, as shown in FIG. 8, with the following specific steps:
s501: belonging to a fast comparison link. According to the statistical law, in the two real unchanged macro blocks, the situation that the absolute value of the difference value is below 4 has a larger probability.
The primary threshold here means that the Y component is 1 or 2 in terms of the UV component, and the two macro blocks are directly compared with YUV three components, if the values of all the pixels Y are less than or equal to 4 and the values of UV are less than or equal to 1 or 2, the macro block is directly judged to be the same macro block, otherwise, if only one Y is found to be greater than 4 or UV is found to be greater than 1 or 2, the comparison is immediately stopped, the fast comparison link is exited, and the next stage of judgment is performed in step S503; the fast comparison link is set for reducing the calculated amount by utilizing the statistical probability of the difference value;
S502: the method comprises the steps of taking two macro blocks to be compared as pixel difference values, and generating three component difference value graphs, wherein each component difference value graph is composed of 16-16 numbers;
s503: calculating the maximum value and the average value of the difference value graphs of the three components;
s504: judging whether all three components accord with the absolute value of the average value <0.5 and the absolute value of the maximum value <20; if yes, go to S506 to carry on the next step to judge; if not, directly judging as different;
s505: judging whether the adjacent difference values of any two rows/columns in the difference value diagram contain 0, and the cross line contains 0, if so, judging the same macro block, and if not, judging the macro blocks to be different.
The decoding process is the inverse of the encoding process, and the decoder can directly decode according to the macroblock type because the code stream contains each macroblock type during encoding. And will not be described in detail.
The embodiment provides a high-efficiency anti-noise coding mode without pre-filtering the whole frame, and by adopting the scheme, various macro block types, especially the unchanged macro block and the unchanged macro block, can be accurately distinguished under noise interference, so that inter-frame and intra-frame prediction is accurately utilized for coding, and the code stream is greatly reduced. The problem that the code stream is greatly increased due to noise interference and errors of the type of the resolution macro block, particularly the problem that the unchanged macro block is mistaken to be a non-unchanged macro block, is avoided.
This embodiment pertains to anti-noise techniques in macroblock classification. The coding scheme of the technology can ensure timeliness and simultaneously reduce the size of the code stream, and is particularly suitable for computer synthesized image application scenes.
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, there is also provided a data encoding apparatus according to another aspect of an embodiment of the present invention, including: the statistics module 92, the determination module 94 and the encoding module 96, the apparatus is described in detail below.
A statistics module 92, configured to count motion vectors of all macro blocks of the image data, and determine a motion vector with the largest number of corresponding macro blocks as a global motion vector; the determining module 94 is connected to the statistics module 92, and is configured to determine, according to the global motion vector, a type of a macroblock in the image data, where the type includes: a constant macro block, a matched macro block and a copy macro block; the encoding module 96 is connected to the determining module 94, and is configured to encode the macro blocks in the image data according to the determined type.
By the above device, the motion vectors of all macro blocks of the image data are counted by adopting the counting module 92, and the motion vector with the largest number of corresponding macro blocks is determined as the global motion vector; the determining module 94 determines, according to the global motion vector, a type to which the macroblock in the image data belongs, where the type includes: a constant macro block, a matched macro block and a copy macro block; the coding module 96 accurately distinguishes each macro block type under the noise environment according to the determined type, so that the problem that a large number of macro blocks which can be coded through inter or intra prediction originally have to be coded by using the coding mode according to the reference frame, so that the code stream is greatly increased can be avoided, the purpose of effectively determining each type of macro block under the noise environment is achieved, the data transmission effect under the noise is improved, the transmission accuracy is improved, the technical effect of noise resistance is improved, and the technical problems that noise signals exist in the data coding and decoding process in the related art, the traditional filtering denoising mode is poor in instantaneity and poor in noise resistance are solved.
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: the receiving module 1002 and the decoding module 1004 are described in detail below.
The receiving module 1002 is configured to receive code streams of different types of macro blocks, where the types of macro blocks are determined according to a global motion vector, and the types include: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all macro blocks of the image data where the macro blocks are located; the decoding module 1004 is connected to the receiving module 1002, and is configured to decode the macroblock according to the macroblock type.
By the above device, the receiving module 1002 is configured to receive the code streams of different types of macro blocks, where the types of macro blocks are determined according to the global motion vector, and the types include: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the largest number of corresponding macro blocks in the motion vectors of all macro blocks of the image data where the macro blocks are located; the decoding module 1004 accurately distinguishes each macroblock type under a noise environment according to the macroblock type, so that the problem that a large number of macroblocks which can be coded by inter-frame or intra-frame prediction originally have to be coded in a coding mode according to a reference frame to greatly increase a code stream can be avoided because of noise interference, the aim of effectively determining each type of macroblock under the noise environment is fulfilled, the data transmission effect under noise is improved, the transmission accuracy is improved, the technical effect of noise resistance is improved, and the technical problems that noise signals exist in the data coding and decoding process in the related art, the traditional filtering denoising mode is poor in instantaneity and poor in noise resistance are solved.
According to another aspect of the embodiments of the present application, there is also provided a computer storage medium, including a stored program, where the program, when run, controls a device in which the computer storage medium is located to perform any one of the methods described above.
According to another aspect of the embodiment of the present application, there is also provided a processor, configured to execute a program, where the program executes the method of any one of the above.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform 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, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (7)
1. A method of encoding data, comprising:
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;
determining the type of the macro block in the image data according to the global motion vector, wherein the type comprises: a constant macro block, a matched macro block and a copy macro block;
encoding a macroblock in the image data according to the determined type;
determining, from 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 a constant macro block and a variable macro block in the macro block of the image data, wherein the constant macro block is the same macro block as the reference macro block, and the variable macro block is a macro block different from the reference macro block; shifting the changed macro block of the image data according to the global motion vector, and taking the changed macro block which is the same as the reference macro block after shifting as the matched macro block; comparing the macro block of the image data with adjacent macro blocks adjacent to the macro block in the image to determine 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; coding the unchanged macro blocks, the matched macro blocks and the copied macro blocks respectively; determining types of other macro blocks except the unchanged macro block in the macro blocks of the image data, wherein the types of the other macro blocks comprise: text macro block, picture macro block; and encoding the picture macro blocks according to a picture encoding mode, and encoding the text macro blocks according to a text encoding mode.
2. The method of claim 1, wherein comparing the macroblock of the image data to a reference macroblock, determining a constant 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 constant macro block under the condition that a first judging condition is met, wherein the reference macro block is an encoded 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 values of the pixels of the macro block of the image data do not exceed a preset difference value;
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 four-corner crossing line contains 0 value.
3. The method of claim 2, wherein comparing the macroblock of the image data to a reference macroblock, 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 judging condition is met;
Shifting the changed macro block through the global motion vector, and taking the changed macro block which is the same as the reference macro block after shifting 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 smaller than the preset average value;
or, the difference of pixels of a macroblock of the image data exceeds the preset difference;
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.
4. A method according to claim 3, wherein comparing the macroblock of the image data with neighboring macroblocks, determining a copy macroblock comprises:
comparing the macro block of the image data with adjacent macro blocks, and determining the macro block of the image data as the adjacent macro block under the condition that the first judging condition is met;
wherein the neighboring macro block is at least one of: and in the image data, adjacent macro blocks above the macro block, adjacent macro blocks below the macro block, adjacent macro blocks to the left of the macro block and adjacent macro blocks to the right of the macro block.
5. A method of decoding data, comprising:
receiving code streams of macro blocks of different types, wherein the types of the macro blocks are determined according to global motion vectors, and the types comprise: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the maximum number of corresponding macro blocks in the motion vectors of all macro blocks of the image data of the macro blocks;
decoding the macro block according to the type of the macro block, including: taking the decoded data of the reference macro block corresponding to the unchanged macro block as the decoded data of the unchanged macro block, wherein the unchanged 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 the same as the reference macro block after offset, and the changed macro block is a macro block which is different from the reference macro block; the decoding data of adjacent macro blocks corresponding to the copied macro blocks are used as the decoding data of the copied macro blocks, wherein the adjacent macro blocks are adjacent macro blocks of the macro blocks in the image, and the copied macro blocks are the same macro blocks as the adjacent macro blocks; and decoding other macro blocks according to a decoding mode corresponding to an encoding mode corresponding to the type of the other macro blocks except the unchanged macro block in the macro blocks of the image data, wherein the type of the other macro blocks comprises: text macro block, picture macro block; and decoding the picture macro block according to a picture decoding mode, and decoding the text macro block according to a text decoding mode.
6. A data encoding apparatus, comprising:
the statistics 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, according to the global motion vector, a type to which a macroblock in the image data belongs, where the type includes: the method for determining the type of the macro block in the image data comprises the following steps of: comparing the macro block of the image data with a reference macro block, and determining a constant macro block and a variable macro block in the macro block of the image data, wherein the constant macro block is the same macro block as the reference macro block, and the variable macro block is a macro block different from the reference macro block; shifting the changed macro block of the image data according to the global motion vector, and taking the changed macro block which is the same as the reference macro block after shifting as the matched macro block; comparing the macro block of the image data with adjacent macro blocks adjacent to the macro block in the image to determine 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; coding the unchanged macro blocks, the matched macro blocks and the copied macro blocks respectively; determining types of other macro blocks except the unchanged macro block in the macro blocks of the image data, wherein the types of the other macro blocks comprise: text macro block, picture macro block; encoding the picture macro block according to a picture encoding mode, and encoding the text macro block according to a text encoding mode;
And the encoding module is used for encoding the macro blocks in the image data according to the determined type.
7. A data decoding apparatus, comprising:
the receiving module is configured to receive code streams of macro blocks of different types, where the types of macro blocks are determined according to global motion vectors, and the types include: a constant macro block, a matched macro block and a copy macro block; the global motion vector is the motion vector with the maximum number of corresponding macro blocks in the motion vectors of all macro blocks of the image data of the macro blocks;
the decoding module is configured to decode the macroblock according to the type of the macroblock, and includes: taking the decoded data of the reference macro block corresponding to the unchanged macro block as the decoded data of the unchanged macro block, wherein the unchanged 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 the same as the reference macro block after offset, and the changed macro block is a macro block which is different from the reference macro block; the decoding data of adjacent macro blocks corresponding to the copied macro blocks are used as the decoding data of the copied macro blocks, wherein the adjacent macro blocks are adjacent macro blocks of the macro blocks in the image, and the copied macro blocks are the same macro blocks as the adjacent macro blocks; and decoding other macro blocks according to a decoding mode corresponding to an encoding mode corresponding to the type of the other macro blocks except the unchanged macro block in the macro blocks of the image data, wherein the type of the other macro blocks comprises: text macro block, picture macro block; and decoding the picture macro block according to a picture decoding mode, and decoding the text macro block according to a text decoding mode.
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 CN111770334A (en) | 2020-10-13 |
CN111770334B true 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) |
Families Citing this family (2)
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 |
CN112422973B (en) * | 2020-10-28 | 2024-09-13 | 西安万像电子科技有限公司 | Coding method and device |
Citations (5)
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 |
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7050500B2 (en) * | 2001-08-23 | 2006-05-23 | 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 |
-
2020
- 2020-07-23 CN CN202010717846.2A patent/CN111770334B/en active Active
Patent Citations (5)
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 |
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)
Title |
---|
MPEG-4编、解码器容错技术的研究;朱小松等;《电视技术》;20030517(第05期);全文 * |
一种基于全局视差的多视点视频快速编码方法;陈思利等;《成都电子机械高等专科学校学报》;20100925(第03期);全文 * |
一种易于并行实现的全局运动估计算法;王慈等;《计算机工程》;20041105(第11期);全文 * |
基于运动复杂度的码率控制算法研究;刘云海等;《浙江大学学报(工学版)》;20090415(第04期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111770334A (en) | 2020-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111819854B (en) | Method and apparatus for coordinating multi-sign bit concealment and residual sign prediction | |
CN108495135B (en) | Quick coding method for screen content video coding | |
CN105472205B (en) | Real-time video noise reduction method and device in encoding process | |
US9813708B2 (en) | Method and system of coding prediction for screen video | |
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 | |
CN111770334B (en) | Data encoding method and device, and data decoding method and device | |
CN112218092A (en) | Encoding method, apparatus and storage medium for string encoding technique | |
US8363978B2 (en) | System and method for block edge location with varying block sizes and offsets in compressed digital video | |
WO2020258055A1 (en) | Loop filtering method and device | |
CN104284199A (en) | Video decoding method and device through deblocking effect operation for reducing complexity | |
CN112001854B (en) | Method for repairing coded image and related system and device | |
CN111447452B (en) | Data coding method and system | |
CN110913215B (en) | Method and device for selecting prediction mode and readable storage medium | |
JPH04219089A (en) | Image encoding device | |
CN113382249B (en) | Image/video encoding method, apparatus, system, and computer-readable storage medium | |
CN112565760B (en) | Encoding method, apparatus and storage medium for string encoding technique | |
CN113992635A (en) | Multimedia data processing method, device, equipment and storage medium | |
CN104104956B (en) | For layered video coding and the method for decoding, encoding apparatus and decoding apparatus | |
CN116320446A (en) | Video encoding method and device, electronic equipment and computer medium | |
CN101437161B (en) | Method and system for processing vedio data | |
CN107222743B (en) | Image processing method, device and system | |
CN108024111B (en) | Frame type judgment method and device | |
CN105828084B (en) | HEVC (high efficiency video coding) inter-frame coding processing method and device | |
CN113365080B (en) | Encoding and decoding method, device and storage medium for string coding technology |
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 |