CN111447451A - Image coding and decoding method and device - Google Patents

Image coding and decoding method and device Download PDF

Info

Publication number
CN111447451A
CN111447451A CN202010209931.8A CN202010209931A CN111447451A CN 111447451 A CN111447451 A CN 111447451A CN 202010209931 A CN202010209931 A CN 202010209931A CN 111447451 A CN111447451 A CN 111447451A
Authority
CN
China
Prior art keywords
macro block
frame image
image
continuous
macroblock
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.)
Pending
Application number
CN202010209931.8A
Other languages
Chinese (zh)
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 CN202010209931.8A priority Critical patent/CN111447451A/en
Publication of CN111447451A publication Critical patent/CN111447451A/en
Pending legal-status Critical Current

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

Abstract

The disclosure relates to image encoding and decoding methods and devices. The image encoding method includes: applied to the encoding end, comprising: acquiring a video frame image; dividing a video frame image into a plurality of macro blocks; comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain at least one continuous macro block group; determining a corresponding reference macro block list according to a preset generation rule and at least one continuous macro block group; and coding according to the frame image to be coded corresponding to the reference macro block list. The present disclosure also provides an image decoding method. The technical scheme of the invention can improve the data comparison efficiency and reduce the bandwidth, thereby further improving the image coding and decoding efficiency.

Description

Image coding and decoding method and device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to methods and apparatuses for encoding and decoding an image.
Background
With the development of information technology, the demand of people for communication services is continuously increasing, and the contradiction between image communication and communication network capacity is increasingly prominent. Especially for video image communication, due to its huge data volume, it is difficult to transmit and store data without image compression. Therefore, image compression capability is particularly important for video images.
Image compression is the application of data compression techniques to digital images with the goal of reducing redundant information in the image data, thereby storing and transmitting the data in a more efficient format. Inter-frame reference is an important means in image compression. The common interframe reference coding principle is: when the current frame image is coded, the current frame and the reference frame are compared, partial data which are the same as or similar to the reference frame are removed, and the position of the same data is marked, so that the purpose of compression is achieved.
Disclosure of Invention
The embodiment of the disclosure provides an image encoding and decoding method and device, which can improve the efficiency of data comparison and reduce the bandwidth, thereby further improving the efficiency of image encoding and decoding. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an image encoding method, applied to an encoding end, including:
acquiring a video frame image, wherein the video frame image comprises a reference frame image and at least one corresponding frame image to be coded;
dividing the video frame image into a plurality of macroblocks;
comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain at least one continuous macro block group; the continuous macro block group comprises at least two continuous macro blocks of the reference frame image, and each macro block is the same as a corresponding macro block in at least one frame image to be coded;
determining a corresponding reference macro block list according to a preset generation rule and at least one continuous macro block group, wherein the reference macro block list comprises image characteristic values of macro blocks in the continuous macro block group and corresponding macro block addresses;
and coding according to the frame image to be coded corresponding to the reference macro block list.
According to a second aspect of the embodiments of the present disclosure, there is provided an image decoding method, applied to a decoding end, including: comparing a reference frame image with a corresponding frame image to be decoded according to a reference macro block list to obtain a comparison result, wherein the reference macro block list comprises an image characteristic value and a corresponding macro block address;
and decoding according to the comparison result.
According to a third aspect of the embodiments of the present disclosure, there is provided an image encoding device including:
the device comprises a first acquisition module, a second acquisition module and a coding module, wherein the first acquisition module is used for acquiring a video frame image, and the video frame image comprises a reference frame image and at least one corresponding frame image to be coded;
a dividing module, configured to divide the video frame image into a plurality of macroblocks;
the second obtaining module is used for comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain at least one continuous macro block group; the continuous macro block group comprises at least two continuous macro blocks of the reference frame image, and each macro block is the same as a corresponding macro block in at least one frame image to be coded;
a determining module, configured to determine a corresponding reference macroblock list according to a preset generation rule and at least one continuous macroblock group, where the reference macroblock list includes an image feature value of a macroblock in the continuous macroblock group and a corresponding macroblock address;
and the coding module is used for coding according to the frame image to be coded corresponding to the reference macro block list. According to a fourth aspect of the embodiments of the present disclosure, there is provided an image decoding apparatus comprising:
the third acquisition module is used for comparing the reference frame image with the corresponding frame image to be decoded according to a reference macro block list to acquire a comparison result, wherein the reference macro block list comprises an image characteristic value and a corresponding macro block address;
and the decoding module is used for decoding according to the comparison result.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an image encoding device including:
a first processor; a first memory for storing first processor-executable instructions;
wherein the first processor is configured to implement the steps of the method of the first aspect.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an image decoding apparatus comprising:
a second processor; a second memory for storing second processor-executable instructions;
wherein the second processor is configured to implement the steps of the method of the second aspect.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions, which when executed by a first processor, implement the steps of the method of the first aspect described above. According to an eighth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a second processor, implement the steps of the method of the second aspect described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the technical scheme, coding is carried out according to the reference macro block list, the same image characteristic values and addresses are integrated, sequenced and associated in the list mode, the workload of repeated coding can be greatly reduced, the image coding efficiency is improved, the data comparison efficiency is improved, the bandwidth is reduced, and therefore the image coding and decoding efficiency is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating an image encoding and decoding according to an exemplary embodiment.
Fig. 3 is a diagram illustrating a progressive comparison sequential macroblock group of an image encoding method according to an exemplary embodiment.
Fig. 4 is a diagram illustrating a group of consecutive macroblocks in a row-by-row aligned order of an image encoding method according to an exemplary embodiment. .
Fig. 5 is a diagram illustrating an overall aligned sequential macroblock group of an image encoding method according to an exemplary embodiment.
FIG. 6 is a flow chart illustrating an image encoding method according to an exemplary embodiment.
Fig. 7 is a schematic diagram illustrating a reference macroblock list of an image encoding method according to an exemplary embodiment.
FIG. 8 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
FIG. 9 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
FIG. 10 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
FIG. 11 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
FIG. 12 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
FIG. 13 is a flowchart illustrating an image decoding method according to an exemplary embodiment.
Fig. 14 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
Fig. 15 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
Fig. 16 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
Fig. 17 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
Fig. 18 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
Fig. 19 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
Fig. 20 is a block diagram illustrating an image decoding apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the related art, image compression is an application of data compression technology to digital images, and aims to reduce redundant information in image data, thereby storing and transmitting data in a more efficient format. The video signal is encoded in the encoding end and then transmitted to the decoding end through the network transmission channel. Inter-frame reference is an important means in image compression. The common interframe reference coding principle is: when the current frame image is coded, the current frame and the reference frame are compared, partial data which are the same as or similar to the reference frame are removed, and the position of the same data is marked, so that the purpose of compression is achieved. Because the data volume of image transmission is more and more huge, the existing image coding and decoding processing method has low efficiency, especially has low efficiency in the data comparison process, and occupies more network bandwidth.
In order to solve the above technical problem, embodiments of the present disclosure provide an image encoding and decoding method and apparatus, which can improve the efficiency of data comparison and reduce the bandwidth, thereby further improving the efficiency of image encoding and decoding.
Fig. 1 is a flowchart illustrating an image encoding method according to an exemplary embodiment, where the method is applied to an encoding end, the encoding end being a terminal or a server, and includes the following steps 101-103:
in step 101, a video frame image is obtained, where the video frame image includes a reference frame image and at least one corresponding frame image to be encoded.
In step 102, the video frame image is divided into a plurality of macroblocks.
In step 103, comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be encoded according to a preset comparison sequence to obtain at least one continuous macro block group; the continuous macroblock group comprises at least two continuous macroblocks of the reference frame image, and each macroblock is the same as a corresponding macroblock in at least one frame image to be coded.
In step 104, according to a preset generation rule and at least one of the groups of consecutive macroblocks, a corresponding reference macroblock list is determined, where the reference macroblock list includes an image feature value of a macroblock and a corresponding macroblock address.
In step 105, the corresponding frame image to be encoded is encoded according to the reference macroblock list.
In this embodiment, as shown in fig. 2, the video signal is encoded in the encoding end and then transmitted to the decoding end through the network transmission channel. Those skilled in the art can understand that the encoding end may be located in a sending device, or may be a separate device, where the sending device may be a personal computer, a monitoring device, a camera device, a server, or the like; the decoding end is located on a receiving device, the receiving device may be a personal computer, a mobile phone or a display device, and the number of the receiving devices may be one or more, which is not limited in this disclosure.
After the video frame images are obtained, each frame image is divided into a plurality of M × N macro blocks, wherein M and N are integers which are larger than or equal to 1, for example, each frame image is divided into 16 × 16 macro blocks or 8 × 8 macro blocks, and the like.
Optionally, the specific process of comparing the macro block of the reference frame image with the corresponding macro block of the frame image to be encoded according to the preset comparison sequence includes comparing the macro blocks of the reference frame image with the macro blocks of each frame image to be encoded one by one, and specifically comparing the macro blocks at the same position one by one, for example, dividing each frame image into 8 × 8 macro blocks, and marking each macro block with a row number and a column number, in the comparison process, it is necessary to compare the macro blocks with the same row number and column number in the current frame and the previous frame, for example, comparing the macro blocks in the second row and column in the current frame with the macro blocks in the second row and column in the previous frame.
In one embodiment, the predetermined alignment sequence comprises at least one of: a row-by-row alignment order, a column-by-column alignment order, and an overall alignment order. The overall comparison sequence is an overall undifferentiated comparison mode without distinguishing rows and columns. In this embodiment, the macro blocks of the reference frame image and the corresponding macro blocks of the frame image to be encoded are compared according to one or more comparison sequences to obtain at least one continuous macro block group. Specifically, for example, the alignment procedure performed according to the row-by-row alignment order is as follows:
comparing the current frame image to be coded with the corresponding macro blocks in the reference frame image line by line, recording the macro blocks when the same macro blocks are detected, and continuing to detect from the macro blocks until the macro blocks which are different from the macro blocks of the reference frame image are detected, and recording the continuous same macro block group; then, continuously detecting from the macro block which is different from the macro block of the reference frame image, when the macro block which is the same as the macro block of the reference frame image is detected again, recording the macro block, and continuously detecting backwards from the current position until the macro block which is different from the macro block of the reference frame image is detected, and recording the continuous same macro block group; and the process is circulated until the comparison of all the macro blocks is completed. As shown in fig. 3, the groups of consecutive macroblocks are determined in a row-by-row alignment order; as shown in fig. 4, groups of consecutive macroblocks determined in a column-by-column alignment order; as shown in fig. 5, groups of consecutive macroblocks determined in an overall undifferentiated alignment order without distinguishing rows and columns; as can be seen from the figure, the order of row and column comparison, which is not differentiated as a whole, is not distinguished, and compared with the order of row-by-row or column-by-column comparison, the order of row-by-row or column-by-column comparison can make the groups of consecutive macroblocks have better continuity, thereby improving the encoding effect. The optional alignment mode is: and extracting data characteristics in the macro blocks to be compared of the reference frame image and the frame image to be coded, and comparing the characteristics. Algorithms for extracting data features include, but are not limited to, the aHash algorithm, the pHash algorithm, the dHash algorithm, or other techniques.
Optionally, the reference macroblock list at least includes data of an image characteristic value of a macroblock and a corresponding macroblock address, the image characteristic value of the macroblock and the corresponding macroblock address are a set of corresponding data and correspond to a continuous macroblock group, wherein the image characteristic value of the macroblock includes a special image identifier, an application habit identifier, a use frequency and a time characteristic; the macro block address is the address of each macro block in the current continuous macro block group.
Alternatively, a suitable encoder may be selected as needed to encode the current frame data. The encoder resources include various encoders such as, but not limited to, JPEG, H264, or other custom encoders.
FIG. 6 is a flow chart illustrating an image encoding method according to an exemplary embodiment.
As shown in fig. 6, the step 104 includes a step 201:
in step 201, a corresponding reference macroblock list is determined according to the sequential order of the number of times that each continuous macroblock group appears in the frame image to be encoded from high to low.
In this embodiment, the number of times that each continuous macroblock group appears in the video frame image to be encoded is counted, and a reference macroblock list corresponding to each continuous macroblock group is sequentially generated from top to bottom, such as the reference macroblock list shown in fig. 7, where the list further includes serial numbers from 0 to N, and each row represents data of one continuous macroblock group, where the reference macroblock list includes N +1 continuous macroblock groups, and the serial numbers from top to bottom are respectively from 0 to N. From top to bottom, the larger the sequence number, the smaller the number of occurrences of the corresponding group of consecutive macroblocks.
In one embodiment, when the comparison order adopted by each row in the reference macroblock list is different (for example, row 0 adopts row-by-row comparison, row 1 adopts column-by-column comparison, and row 3 adopts row-by-row comparison peer-to-peer), another comparison order flag bit may be added to each row of data to flag the comparison order adopted by the current consecutive macroblock group. For example, the "row-by-row alignment order" may be labeled with 00, the "column-by-column alignment order" may be labeled with 01, and the "row-and-column-indistinguishable alignment order as a whole without distinction" may be labeled with 10. For the decoding end, the comparison sequence of the current continuous macro block set can be determined according to the comparison sequence flag bit, and comparison during decoding is performed according to the corresponding sequence.
When two or more continuous macro block groups have the same occurrence number, the corresponding continuous macro block groups are continuously sorted according to the determined sequence, or sorted in any other way, for example, when the number of continuous macro block groups with the maximum occurrence number is 3, the corresponding continuous macro block groups are sequentially sorted at the position of sequence number 0-2 according to the determined sequence of the three continuous macro block groups, or sorted at the position of sequence number 0-2 according to any other sequence.
FIG. 8 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
As shown in fig. 8, the step 103 includes steps 301 to 302:
in step 301, the macro blocks of the reference frame image and the corresponding macro blocks of the frame image to be encoded are compared according to a preset comparison sequence to obtain all the continuous macro block groups.
In step 302, counting the occurrence frequency of each of all the consecutive macroblock groups, and obtaining at least one consecutive macroblock group with the largest occurrence frequency.
In this embodiment, all the continuous macroblock groups of the reference frame image are obtained first, and then the continuous macroblock group with the largest occurrence number with respect to the frame image to be encoded is counted, and the continuous macroblock group with the largest occurrence number is obtained, where the number of the continuous macroblock groups with the largest occurrence number may be one or more.
FIG. 9 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
As shown in fig. 9, the step 302 includes steps 401 to 402:
in step 401, counting the occurrence frequency of each continuous macro block group in all the continuous macro block groups, and obtaining at least one first continuous macro block group with the largest occurrence frequency.
In step 402, comparing the macro blocks in the reference frame image except the first continuous macro block group with the corresponding macro blocks of the frame image to be encoded according to a preset comparison sequence, and obtaining a second continuous macro block group with the largest occurrence frequency until all macro blocks in the frame image to be encoded are traversed. The first and second contiguous macroblock groups constitute a contiguous macroblock group.
In this embodiment, after each time of acquiring a continuous macroblock group, the number of macroblocks of the continuous macroblock group currently found by the current frame is recorded, and is added to the total number of macroblocks of the continuous macroblock group recorded before the current frame, and if the addition result is equal to the total number of macroblocks in one frame image, the process is ended.
In one embodiment, the method further comprises: the continuous macroblock group whose number of occurrences is 0 is removed from the obtained continuous macroblock groups. After the continuous macro block group with the occurrence frequency of 0 in the reference frame image is eliminated, the comparison efficiency in the subsequent encoding and decoding processes can be improved.
FIG. 10 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
As shown in fig. 10, when the preset comparison sequence includes at least two types, the step 301 includes steps 501 to 503:
in step 501, the macro block of the reference frame image and the macro block of the corresponding frame image to be encoded are compared according to at least two preset comparison sequences.
In step 502, the total number of macroblocks in the set of consecutive macroblocks in each alignment order is determined.
In step 503, all the continuous macroblock groups corresponding to the comparison order with the largest total number of macroblocks are obtained.
In this embodiment, when comparing the reference frame image with the macro blocks of the frame image to be encoded corresponding to the reference frame image, the reference frame image and the macro blocks of the frame image to be encoded may be compared according to two or more comparison sequences at the same time to obtain a comparison result, and the final comparison result is determined according to the comparison result. Counting the total number of macro blocks in the continuous macro block group obtained after comparison in various sequences, determining the comparison sequence with the maximum total number of macro blocks as a final comparison sequence, and taking the comparison result obtained according to the sequence as the comparison result of the current frame. In this embodiment, the method can be preferably applied to a scene where a user operates more screens in offices and the like, and since the user is likely to involve many operations with more lateral changes or more longitudinal changes in offices, the total number of macroblocks in the obtained continuous macroblock groups tends to generate a larger difference when performing comparison according to different comparison orders in the image encoding process, and therefore, the comparison result of the optimal comparison order can be selected as the comparison result of the current frame.
FIG. 11 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
As shown in fig. 11, the step 503 includes the step 601: when the comparison sequence with the maximum macroblock total number has at least two types, all continuous macroblock groups corresponding to the comparison sequence with the maximum macroblock total number and the highest priority are obtained.
In this embodiment, when the total number of the macro blocks after comparison in multiple sequences is counted, and the comparison sequence with the largest total number of the macro blocks is more than one, the comparison sequence with the highest priority may be determined as the final comparison sequence for comparison of the corresponding frame according to the priorities of the various comparison sequences, or the comparison result with the comparison sequence with the highest priority may be understood as the comparison result of the current frame.
FIG. 12 is a flowchart illustrating an image encoding method according to an exemplary embodiment.
As shown in fig. 12, the present embodiment provides an image encoding method including:
step 701, acquiring a video frame image, where the video frame image includes a reference frame image and at least one corresponding frame image to be encoded.
Step 702, dividing the video frame image into a plurality of macro blocks.
Step 703, comparing the macro block of the reference frame image with the macro block of the corresponding frame image to be encoded according to at least two preset comparison sequences when the preset comparison sequences include at least two types.
In step 704, the total number of macroblocks in the set of consecutive macroblocks in each alignment order is determined.
Step 705, when there are at least two comparison orders with the largest total number of macroblocks, all the consecutive macroblock groups corresponding to the comparison order with the largest total number of macroblocks and the highest priority are obtained.
Step 706, counting the occurrence frequency of all the continuous macro block groups, and obtaining at least one first continuous macro block group with the largest occurrence frequency.
And 707, comparing the macro blocks in the reference frame image, except for the first continuous macro block group, with the corresponding macro blocks of the frame image to be encoded according to a preset comparison sequence, and acquiring a second continuous macro block group with the largest occurrence frequency until all macro blocks in the frame image to be encoded are traversed. The first and second contiguous macroblock groups constitute a contiguous macroblock group.
Step 708, determining a corresponding reference macroblock list according to the sequential order from high to low of the times of each continuous macroblock group appearing in the frame image to be encoded.
And step 709, coding according to the frame image to be coded corresponding to the reference macro block list.
According to a second aspect of the embodiments of the present disclosure, there is provided an image decoding method.
FIG. 13 is a flowchart illustrating an image decoding method according to an exemplary embodiment.
As shown in fig. 13, the decoding end is a terminal, and includes the following steps 801 to 802:
in step 801, a reference frame image and a corresponding frame image to be decoded are compared according to a reference macroblock list, and a comparison result is obtained, where the reference macroblock list includes an image characteristic value and a corresponding macroblock address.
In step 802, decoding is performed according to the comparison result.
In this embodiment, the frame image to be decoded in the method corresponds to the frame image to be encoded in the above embodiment, and after being encoded according to the above embodiment, the frame image to be decoded is transmitted to a decoding end, and the decoding end is referred to as the frame image to be decoded.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 14 is a block diagram illustrating an image encoding apparatus, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both, according to an exemplary embodiment.
As shown in fig. 14, the image encoding device includes: a first obtaining module 901, a dividing module 902, a second obtaining module 903, a determining module 904 and an encoding module 905.
A first obtaining module 901, configured to obtain a video frame image, where the video frame image includes a reference frame image and at least one corresponding frame image to be encoded;
a dividing module 902, configured to divide the video frame image into a plurality of macroblocks;
a second obtaining module 903, configured to compare the macro block of the reference frame image with the macro block of the corresponding frame image to be encoded according to a preset comparison sequence, so as to obtain at least one continuous macro block group; the continuous macro block group comprises at least two continuous macro blocks of the reference frame image, and each macro block is the same as a corresponding macro block in at least one frame image to be coded;
a determining module 904, configured to determine a corresponding reference macroblock list according to a preset generation rule and at least one of the continuous macroblock groups, where the reference macroblock list includes an image feature value of a macroblock in the continuous macroblock group and a corresponding macroblock address;
and the encoding module 905 is configured to perform encoding according to the frame image to be encoded corresponding to the reference macroblock list.
Fig. 15 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
As shown in fig. 15, the determining module 904 includes: the determination sub-module 1001:
the determining submodule 1001 is configured to determine a corresponding reference macroblock list according to a sequential order from high to low of the number of times that each continuous macroblock group appears in the frame image to be encoded.
Fig. 16 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
As shown in fig. 16, the second obtaining module 903 includes: a first acquisition submodule 1101 and a second acquisition submodule 1102.
The first obtaining sub-module 1101 is configured to compare the macro block of the reference frame image with the macro block of the corresponding frame image to be encoded according to a preset comparison sequence, so as to obtain all continuous macro block groups.
The second obtaining sub-module 1102 is configured to count the occurrence frequency of each continuous macro block group in all the continuous macro block groups, and obtain at least one continuous macro block group with the largest occurrence frequency.
Fig. 17 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
As shown in fig. 17, the second obtaining sub-module 1102 includes: a first acquisition unit 1201 and a second acquisition unit 1202.
A first obtaining unit 1201, configured to count the occurrence frequency of each continuous macro block group in all the continuous macro block groups, and obtain at least one first continuous macro block group with the largest occurrence frequency.
A second obtaining unit 1202, configured to compare, according to a preset comparison sequence, macro blocks in the reference frame image, except for the first continuous macro block group, with macro blocks of a corresponding frame image to be encoded, and obtain a second continuous macro block group that occurs most frequently until all macro blocks in the frame image to be encoded are traversed. The first and second contiguous macroblock groups constitute a contiguous macroblock group.
Fig. 18 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
As shown in fig. 18, the first obtaining sub-module 1101 includes: an alignment unit 1301, a determination unit 1302 and a third acquisition unit 1303.
The comparing unit 1301 is configured to compare the macro block of the reference frame image with the macro block of the corresponding frame image to be encoded according to at least two preset comparison sequences.
A determining unit 1302, configured to determine the total number of macroblocks of the consecutive macroblock groups in each alignment order.
A third obtaining unit 1303, configured to obtain all the consecutive macroblock groups corresponding to the comparison order with the largest total number of macroblocks.
Fig. 19 is a block diagram illustrating an image encoding apparatus according to an exemplary embodiment.
As shown in fig. 19, the third acquiring unit 1303 includes: acquisition subunit 1401.
An obtaining subunit 1401, configured to, when there are at least two comparison orders with the largest total number of macroblocks, obtain all consecutive macroblock groups corresponding to the comparison order with the largest total number of macroblocks and the highest priority.
Fig. 20 is a block diagram illustrating an image decoding apparatus according to an exemplary embodiment. The apparatus may be implemented as part or all of an electronic device through software, hardware, or a combination of both.
As shown in fig. 20, the image decoding apparatus includes: a third acquisition module 1501 and a decoding module 1502.
A third obtaining module 1501, configured to compare a reference frame image with a corresponding frame image to be decoded according to a reference macroblock list, and obtain a comparison result, where the reference macroblock list includes an image feature value and a corresponding macroblock address.
The decoding module 1502 decodes according to the comparison result.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an image encoding device including:
a first processor;
a first memory for storing first processor-executable instructions;
wherein the first processor is configured to:
acquiring a video frame image, wherein the video frame image comprises a reference frame image and at least one corresponding frame image to be coded;
dividing the video frame image into a plurality of macroblocks;
comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain at least one continuous macro block group; the continuous macro block group comprises at least two continuous macro blocks of the reference frame image, and each macro block is the same as a corresponding macro block in at least one frame image to be coded;
determining a corresponding reference macro block list according to a preset generation rule and at least one continuous macro block group, wherein the reference macro block list comprises image characteristic values of macro blocks in the continuous macro block group and corresponding macro block addresses;
and coding according to the frame image to be coded corresponding to the reference macro block list.
The first processor may be further configured to:
and determining a corresponding reference macro block list according to the sequential sequencing of the times of each continuous macro block group in the frame image to be coded from high to low.
The first processor may be further configured to:
comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain all continuous macro block groups;
and counting the occurrence times of each continuous macro block group in all the continuous macro block groups, and acquiring at least one continuous macro block group with the maximum occurrence times.
The first processor may be further configured to:
counting the occurrence frequency of each continuous macro block group in all continuous macro block groups, and acquiring at least one first continuous macro block group with the largest occurrence frequency;
comparing macro blocks in the reference frame image except the first continuous macro block group with corresponding macro blocks of the frame image to be coded according to a preset comparison sequence, and acquiring a second continuous macro block group with the largest occurrence frequency until all macro blocks in the frame image to be coded are traversed;
the first and second contiguous macroblock groups constitute a contiguous macroblock group.
The first processor may be further configured to:
the preset comparison sequence comprises at least two of the following sequences: comparing the macro block of the reference frame image with the macro block of the corresponding frame image to be coded according to at least two preset comparison sequences;
determining the total number of macro blocks of the continuous macro block groups in each comparison sequence;
and acquiring all continuous macro block groups corresponding to the comparison sequence with the maximum total number of macro blocks.
The first processor may be further configured to:
when the comparison sequence with the maximum macroblock total number has at least two types, all continuous macroblock groups corresponding to the comparison sequence with the maximum macroblock total number and the highest priority are obtained.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an image decoding apparatus comprising:
a second processor;
a second memory for storing second processor-executable instructions;
wherein the second processor is configured to:
comparing a reference frame image with a corresponding frame image to be decoded according to a reference macro block list to obtain a comparison result, wherein the reference macro block list comprises an image characteristic value and a corresponding macro block address;
and decoding according to the comparison result.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
A computer-readable storage medium applied to an encoding side, wherein when instructions in the storage medium are executed by a first processor of an image encoding apparatus, the storage medium enables the image encoding apparatus to perform a method of encoding an image, the method comprising:
acquiring a video frame image, wherein the video frame image comprises a reference frame image and at least one corresponding frame image to be coded;
dividing the video frame image into a plurality of macroblocks;
comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain at least one continuous macro block group; the continuous macro block group comprises at least two continuous macro blocks of the reference frame image, and each macro block is the same as a corresponding macro block in at least one frame image to be coded;
determining a corresponding reference macro block list according to a preset generation rule and at least one continuous macro block group, wherein the reference macro block list comprises image characteristic values of macro blocks in the continuous macro block group and corresponding macro block addresses;
and coding according to the frame image to be coded corresponding to the reference macro block list.
In one embodiment, determining the corresponding reference macroblock list according to a preset generation rule and at least one of the consecutive macroblock groups includes:
and determining a corresponding reference macro block list according to the sequential sequencing of the times of each continuous macro block group in the frame image to be coded from high to low.
In an embodiment, the comparing, according to a preset comparison sequence, the macro block of the reference frame image with the macro block of the corresponding frame image to be encoded to obtain at least one continuous macro block group includes:
comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain all continuous macro block groups;
and counting the occurrence times of each continuous macro block group in all the continuous macro block groups, and acquiring at least one continuous macro block group with the maximum occurrence times.
In one embodiment, counting the number of occurrences of the consecutive macroblock group, and obtaining at least one consecutive macroblock group with the largest number of occurrences, includes:
counting the occurrence frequency of each continuous macro block group in all continuous macro block groups, and acquiring at least one first continuous macro block group with the largest occurrence frequency;
comparing macro blocks in the reference frame image except the first continuous macro block group with corresponding macro blocks of the frame image to be coded according to a preset comparison sequence, and acquiring a second continuous macro block group with the largest occurrence frequency until all macro blocks in the frame image to be coded are traversed;
the first and second contiguous macroblock groups constitute a contiguous macroblock group.
In an embodiment, when the preset comparison sequence includes at least two types, the comparing, according to the preset comparison sequence, the macro block of the reference frame image with the macro block of the corresponding frame image to be encoded to obtain all the continuous macro block groups includes:
comparing the macro block of the reference frame image with the macro block of the corresponding frame image to be coded according to at least two preset comparison sequences;
determining the total number of macro blocks of the continuous macro block groups in each comparison sequence;
and acquiring all continuous macro block groups corresponding to the comparison sequence with the maximum total number of macro blocks.
In an embodiment, the obtaining of the continuous macroblock group corresponding to the comparison order with the largest total number of macroblocks includes: when the comparison sequence with the maximum macroblock total number has at least two types, all continuous macroblock groups corresponding to the comparison sequence with the maximum macroblock total number and the highest priority are obtained.
A computer-readable storage medium applied to a decoding side, wherein when instructions in the storage medium are executed by a second processor of the image decoding apparatus, the instructions enable the image decoding apparatus to perform a method of decoding the image, the method comprising:
comparing a reference frame image with a corresponding frame image to be decoded according to a reference macro block list to obtain a comparison result, wherein the reference macro block list comprises an image characteristic value and a corresponding macro block address;
and decoding according to the comparison result.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1. An image encoding method applied to an encoding end, comprising:
acquiring a video frame image, wherein the video frame image comprises a reference frame image and at least one corresponding frame image to be coded;
dividing the video frame image into a plurality of macroblocks;
comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain at least one continuous macro block group; the continuous macro block group comprises at least two continuous macro blocks of the reference frame image, and each macro block is the same as a corresponding macro block in at least one frame image to be coded;
determining a corresponding reference macro block list according to a preset generation rule and at least one continuous macro block group, wherein the reference macro block list comprises image characteristic values of macro blocks in the continuous macro block group and corresponding macro block addresses;
and coding according to the frame image to be coded corresponding to the reference macro block list.
2. The image encoding method of claim 1, wherein determining the corresponding reference macroblock list according to a preset generation rule and at least one of the groups of consecutive macroblocks comprises:
and determining a corresponding reference macro block list according to the sequential sequencing of the times of each continuous macro block group in the frame image to be coded from high to low.
3. The image encoding method of claim 1, wherein the comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be encoded according to a preset comparison sequence to obtain at least one continuous macro block group comprises:
comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain all continuous macro block groups;
and counting the occurrence times of each continuous macro block group in all the continuous macro block groups, and acquiring at least one continuous macro block group with the maximum occurrence times.
4. The image encoding method of claim 3, wherein counting the number of occurrences of the consecutive macroblock group, and obtaining at least one consecutive macroblock group with the largest number of occurrences comprises:
counting the occurrence frequency of each continuous macro block group in all continuous macro block groups, and acquiring at least one first continuous macro block group with the largest occurrence frequency;
comparing macro blocks in the reference frame image except the first continuous macro block group with corresponding macro blocks of the frame image to be coded according to a preset comparison sequence, and acquiring a second continuous macro block group with the largest occurrence frequency until all macro blocks in the frame image to be coded are traversed;
the first and second contiguous macroblock groups constitute a contiguous macroblock group.
5. The image encoding method of claim 3, wherein when the preset comparison sequence includes at least two types, the comparing the macro block of the reference frame image with the corresponding macro block of the frame image to be encoded according to the preset comparison sequence to obtain all the continuous macro block groups comprises:
comparing the macro block of the reference frame image with the macro block of the corresponding frame image to be coded according to at least two preset comparison sequences;
determining the total number of macro blocks of the continuous macro block groups in each comparison sequence;
and acquiring all continuous macro block groups corresponding to the comparison sequence with the maximum total number of macro blocks.
6. The image encoding method of claim 5, wherein said obtaining the set of consecutive macroblocks corresponding to the comparison order with the largest total number of macroblocks comprises: when the comparison sequence with the maximum macroblock total number has at least two types, all continuous macroblock groups corresponding to the comparison sequence with the maximum macroblock total number and the highest priority are obtained.
7. An image decoding method applied to a decoding end, comprising: comparing a reference frame image with a corresponding frame image to be decoded according to a reference macro block list to obtain a comparison result, wherein the reference macro block list comprises an image characteristic value and a corresponding macro block address;
and decoding according to the comparison result.
8. An image encoding device characterized by comprising:
the device comprises a first acquisition module, a second acquisition module and a coding module, wherein the first acquisition module is used for acquiring a video frame image, and the video frame image comprises a reference frame image and at least one corresponding frame image to be coded;
a dividing module, configured to divide the video frame image into a plurality of macroblocks;
the second obtaining module is used for comparing the macro blocks of the reference frame image with the corresponding macro blocks of the frame image to be coded according to a preset comparison sequence to obtain at least one continuous macro block group; the continuous macro block group comprises at least two continuous macro blocks of the reference frame image, and each macro block is the same as a corresponding macro block in at least one frame image to be coded;
a determining module, configured to determine a corresponding reference macroblock list according to a preset generation rule and at least one continuous macroblock group, where the reference macroblock list includes an image feature value of a macroblock in the continuous macroblock group and a corresponding macroblock address;
and the coding module is used for coding according to the frame image to be coded corresponding to the reference macro block list.
9. An image decoding apparatus, comprising:
the third acquisition module is used for comparing the reference frame image with the corresponding frame image to be decoded according to a reference macro block list to acquire a comparison result, wherein the reference macro block list comprises an image characteristic value and a corresponding macro block address;
and the decoding module is used for decoding according to the comparison result.
10. An image encoding device characterized by comprising:
a first processor;
a first memory for storing first processor-executable instructions;
wherein the first processor is configured to implement the steps of the image encoding method of any of the preceding claims 1-6.
11. An image decoding apparatus, comprising:
a second processor;
a second memory for storing second processor-executable instructions;
wherein the second processor is configured to implement the steps of the image decoding method of claim 7 above.
12. A computer-readable storage medium, on which computer instructions are stored, which instructions, when executed by a first processor, carry out the steps of the image encoding method of any one of claims 1 to 6.
13. A computer-readable storage medium having stored thereon computer instructions, which, when executed by a second processor, carry out the steps of the image decoding method of claim 7.
CN202010209931.8A 2020-03-23 2020-03-23 Image coding and decoding method and device Pending CN111447451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010209931.8A CN111447451A (en) 2020-03-23 2020-03-23 Image coding and decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010209931.8A CN111447451A (en) 2020-03-23 2020-03-23 Image coding and decoding method and device

Publications (1)

Publication Number Publication Date
CN111447451A true CN111447451A (en) 2020-07-24

Family

ID=71649010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010209931.8A Pending CN111447451A (en) 2020-03-23 2020-03-23 Image coding and decoding method and device

Country Status (1)

Country Link
CN (1) CN111447451A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422969A (en) * 2020-10-20 2021-02-26 西安万像电子科技有限公司 Image coding and decoding method and device
CN115278248A (en) * 2022-09-28 2022-11-01 广东电网有限责任公司中山供电局 Video image coding device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1494327A (en) * 2003-09-30 2004-05-05 清华大学 Storage method of reference buffer storage of two stage coding used on macro block group structure
US20040175049A1 (en) * 2003-03-04 2004-09-09 Matsushita Electric Industrial Co., Ltd Moving image coding method and apparatus
EP2109319A1 (en) * 2008-04-11 2009-10-14 Fujitsu Limited Moving image encoding-decoding system with macroblock-level adaptive frame/field processing
CN103124345A (en) * 2011-11-18 2013-05-29 江南大学 Parallel encoding method
CN103167283A (en) * 2011-12-19 2013-06-19 华为技术有限公司 Video coding method and device
CN104796706A (en) * 2014-01-17 2015-07-22 深圳市中瀛鑫科技股份有限公司 Video coding method and device
US20150358625A1 (en) * 2014-06-04 2015-12-10 Hon Hai Precision Industry Co., Ltd. Device and method for video encoding
CN109640089A (en) * 2018-11-02 2019-04-16 西安万像电子科技有限公司 Image coding/decoding method and device
CN110493600A (en) * 2019-08-23 2019-11-22 腾讯科技(深圳)有限公司 Image encoding method, device, computer equipment and storage medium
CN110636334A (en) * 2019-08-23 2019-12-31 西安万像电子科技有限公司 Data transmission method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040175049A1 (en) * 2003-03-04 2004-09-09 Matsushita Electric Industrial Co., Ltd Moving image coding method and apparatus
CN1494327A (en) * 2003-09-30 2004-05-05 清华大学 Storage method of reference buffer storage of two stage coding used on macro block group structure
EP2109319A1 (en) * 2008-04-11 2009-10-14 Fujitsu Limited Moving image encoding-decoding system with macroblock-level adaptive frame/field processing
CN103124345A (en) * 2011-11-18 2013-05-29 江南大学 Parallel encoding method
CN103167283A (en) * 2011-12-19 2013-06-19 华为技术有限公司 Video coding method and device
CN104796706A (en) * 2014-01-17 2015-07-22 深圳市中瀛鑫科技股份有限公司 Video coding method and device
US20150358625A1 (en) * 2014-06-04 2015-12-10 Hon Hai Precision Industry Co., Ltd. Device and method for video encoding
CN109640089A (en) * 2018-11-02 2019-04-16 西安万像电子科技有限公司 Image coding/decoding method and device
CN110493600A (en) * 2019-08-23 2019-11-22 腾讯科技(深圳)有限公司 Image encoding method, device, computer equipment and storage medium
CN110636334A (en) * 2019-08-23 2019-12-31 西安万像电子科技有限公司 Data transmission method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘峰;马力妮;杜小钰;: "一种基于多参考块的多视点视频编码方案", 北京机械工业学院学报, no. 03, 1 September 2008 (2008-09-01) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422969A (en) * 2020-10-20 2021-02-26 西安万像电子科技有限公司 Image coding and decoding method and device
CN115278248A (en) * 2022-09-28 2022-11-01 广东电网有限责任公司中山供电局 Video image coding device

Similar Documents

Publication Publication Date Title
CN108243339B (en) Image coding and decoding method and device
EP1619901A2 (en) Context adaptive binary arithmetic coding with reduced complexity
JP5606591B2 (en) Video compression method
AU2014275405A1 (en) Tuning video compression for high frame rate and variable frame rate capture
US7945103B2 (en) Method and apparatus for decoding compressed and encoded digital images
CN111447451A (en) Image coding and decoding method and device
CN109511011B (en) YouTube DASH encrypted video-oriented fingerprint database construction method
CN112165621A (en) Scene switching frame detection method and device, storage medium and electronic equipment
US20120106632A1 (en) Method and apparatus for error resilient long term referencing block refresh
CN109982091B (en) Image processing method and device
US8681860B2 (en) Moving picture compression apparatus and method of controlling operation of same
CN1383686A (en) Image coding appts. and image coding method
CN110636334B (en) Data transmission method and system
CN111093079A (en) Image processing method and device
US7106225B2 (en) Coding apparatus and imaging apparatus
CN108307191B (en) Image data alignment method and device
CN101296166B (en) Method for measuring multimedia data based on index
CN110740316A (en) Data coding method and device
TWI559751B (en) Methods, systems, and computer program products for assessing a macroblock candidate for conversion to a skipped macroblock
CN101242534B (en) Video encoding apparatus and method
CN111212288B (en) Video data encoding and decoding method and device, computer equipment and storage medium
JP2002325259A (en) Method for coding digital image base on error correction
KR100927353B1 (en) Video encoding and decoding method of mitigating data losses in an encoded video signal transmitted through a channel
CN110582022B (en) Video encoding and decoding method and device and storage medium
CN112351282A (en) Image data transmission method and device, nonvolatile storage medium and processor

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