CN102724553A - Image encoding method, image decoding method, image encoder and image decoder - Google Patents

Image encoding method, image decoding method, image encoder and image decoder Download PDF

Info

Publication number
CN102724553A
CN102724553A CN2012101927415A CN201210192741A CN102724553A CN 102724553 A CN102724553 A CN 102724553A CN 2012101927415 A CN2012101927415 A CN 2012101927415A CN 201210192741 A CN201210192741 A CN 201210192741A CN 102724553 A CN102724553 A CN 102724553A
Authority
CN
China
Prior art keywords
image
frame
bit
order
low
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
CN2012101927415A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2012101927415A priority Critical patent/CN102724553A/en
Publication of CN102724553A publication Critical patent/CN102724553A/en
Priority to PCT/CN2013/072207 priority patent/WO2013185494A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234327Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by decomposing into layers, e.g. base layer and one or more enhancement layers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • H04N19/34Scalability techniques involving progressive bit-plane based encoding of the enhancement layer, e.g. fine granular scalability [FGS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/65Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using error resilience
    • H04N19/66Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using error resilience involving data partitioning, i.e. separation of data into packets or partitions according to importance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2381Adapting the multiplex stream to a specific network, e.g. an Internet Protocol [IP] network
    • 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/188Methods 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 a video data packet, e.g. a network abstraction layer [NAL] unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses an image encoding method, an image decoding method, an image encoder and an image decoder and belongs to the field of computers. The encoding method comprises the following steps of dividing a one-frame image into a one-frame high-bit image and a one-frame low-bit image, wherein the one-frame image comprises a first bit wide bit, the one-frame high-bit image comprises a second bit wide bit, the one-frame low-bit image comprises a second bit wide bit, and the first bit width is more than the second bit width and is less than two times of the second bit width; encoding the one-frame high-bit image to obtain a first network data packet, wherein the first network data packet comprises frame identifier information of the one-frame image, and the efficient bit information and the image type of the one-frame high-bit image; and encoding the one-frame low-bit image to obtain a second network data packet, wherein the second network data packet comprises frame identifier information of the one-frame image, and the efficient bit information and the image type of the one-frame high-bit image. The encoding cost can be reduced by the method.

Description

Image encoding method, image decoding method, image encoder, and image decoder
Technical Field
The present invention relates to the field of computers, and in particular, to an image encoding method, an image decoding method, an image encoder, and an image decoder.
Background
At present, most images with 8 bit widths are images with 8 bit widths, but with the improvement of requirements for image effects in video experiences, the image effects provided by the images with 8 bit widths cannot meet the requirements for video experiences, and then, images with more than 8 bit widths appear at present to provide better image effects, for example, images with 10 bit widths or 12 bit widths appear at present.
When an image with a bit width higher than 8 bits is coded, a coder with a bit width higher than 8 bits is needed to code the image with a bit width higher than 8 bits, and a corresponding code stream is obtained; and when decoding the code stream corresponding to the image with the bit width higher than 8 bits, a decoder with the bit width higher than 8 bits is required to decode the code stream corresponding to the image with the bit width higher than 8 bits.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in the prior art, the operation complexity of encoding and decoding an image is high, so that the structure of an adopted encoder and a decoder is complex and the cost is high, and the cost of encoding and decoding the image in the prior art is high.
Disclosure of Invention
In order to reduce the cost of encoding and decoding, the invention provides an image encoding method, an image decoding method, an image encoder and an image decoder. The technical scheme is as follows:
a method of image encoding, the method comprising:
dividing a frame of image into a frame of high-order image and a frame of low-order image, the frame of image including a first bit width of bits, the frame of high-order image including a second bit width of bits, the frame of low-order image including a second bit width of bits, the first bit width being greater than the second bit width and less than twice the second bit width;
encoding the frame of high-order image to obtain a first network data packet, wherein the first network data packet comprises frame identification information of the frame of image, effective bit information and an image type of the frame of high-order image, the frame identification information is used for identifying the frame of image, the effective bit information of the frame of high-order image is used for indicating bits in the frame of image included in the frame of high-order image, and the image type included in the first network data packet is a high-order image;
and encoding the frame of low-order image to obtain a second network data packet, wherein the second network data packet comprises the frame identification information of the frame of image, the effective bit information and the image type of the frame of low-order image, the effective bit information of the frame of low-order image is used for indicating the bits in the frame of image included in the frame of low-order image, and the image type included in the second network data packet is a low-order image.
A method of decoding a network data packet corresponding to the image, the method comprising:
decoding a network data packet to obtain a first image, a second image, and frame identification information, effective bit information and an image type of the first image and the second image, wherein the bit width of the first image is a first bit width, the bit width of the second image is a second bit width, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image;
and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width, wherein the first bit width is greater than the second bit width and is less than or equal to two times of the second bit width.
An image encoder, the image encoder comprising:
the dividing module is used for dividing a frame of image into a frame of high-order image and a frame of low-order image, wherein the frame of image comprises a first bit width, the frame of high-order image comprises a second bit width, the frame of low-order image comprises a second bit width, and the first bit width is larger than the second bit width and smaller than twice the second bit width;
a first encoding module, configured to encode a frame of high-level images divided by the dividing module to obtain a first network data packet, where the first network data packet includes frame identification information of the frame of images, and effective bit information and an image type of the frame of high-level images, the frame identification information is used to identify the frame of images, the effective bit information of the frame of high-level images is used to indicate bits in the frame of images included in the frame of high-level images, and the image type included in the first network data packet is a high-level image;
the second encoding module is configured to encode a frame of low-level images divided by the dividing module to obtain a second network data packet, where the second network data packet includes frame identification information of the frame of images, valid bit information of the frame of low-level images and an image type, the valid bit information of the frame of low-level images is used to indicate bits in the frame of images included in the frame of low-level images, and the image type included in the second network data packet is a low-level image.
An image decoder for decoding network packets corresponding to the image, the image decoder comprising:
the decoding module is used for decoding a network data packet to obtain a first image, a second image, and frame identification information, effective bit information and an image type of the first image and the second image, wherein the bit width of the first image is a first bit width, the bit width of the second image is a second bit width, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image;
and the reconstruction module is used for reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image which are obtained by decoding of the decoding module to obtain a reconstructed image with a first bit width, wherein the first bit width is greater than the second bit width and is less than or equal to two times of the second bit width.
In the embodiment of the invention, at a transmitting end, a frame of image with a first bit width is divided into a frame of high-order image with a second bit width and a frame of low-order image with the second bit width, the frame of high-order image is encoded to obtain a first network data packet, the first network data packet comprises frame identification information of the frame of image, effective bit information of the frame of high-order image and an image type, the frame of low-order image is encoded to obtain a second network data packet, and the second network data packet comprises frame identification information of the frame of image, effective bit information of the frame of low-order image and an image type; at a receiving end, decoding a network transmission packet corresponding to an image to obtain a first image with a second bit width and a second image with the second bit width, and analyzing the image type of the first image as a high-order image and the image type of the second image as a low-order image, wherein the frame identification information, the effective bit information and the image type of the first image and the second image are respectively frame identification information, effective bit information and image type of the second image; and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width. In this embodiment, the first bit width is greater than the second bit width, so that the image with the first bit width can be encoded by using the encoder with the second bit width, and the image with the first bit width can be decoded by using the encoder with the second bit width, so that the encoding and decoding costs are reduced.
Drawings
FIG. 1 is a flowchart of a method for encoding an image according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for encoding an image according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of the structure of an image A, an upper image A1 and a lower image A2 according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a picture B, a high picture B1 and a low picture B2 according to another embodiment of the present invention;
FIG. 5 is a flowchart of a method for encoding an image according to another embodiment of the present invention;
FIG. 6 is a flowchart of a method for decoding an image according to another embodiment of the present invention;
FIG. 7 is a flowchart of a method for decoding an image according to another embodiment of the present invention;
FIG. 8 is a flowchart of a method for decoding an image according to another embodiment of the present invention;
FIG. 9 is a schematic diagram of an image encoder according to another embodiment of the present invention;
fig. 10 is a schematic structural diagram of an image decoder according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides an image encoding method, including:
step 101: dividing a frame of image into a frame of high-order image and a frame of low-order image, wherein the frame of image comprises a first bit width, the frame of high-order image comprises a second bit width, the frame of low-order image comprises a second bit width, and the first bit width is larger than the second bit width and smaller than twice the second bit width;
step 102: coding the frame of high-order image to obtain a first network data packet, wherein the first network data packet comprises frame identification information of the frame of image, effective bit information and an image type of the frame of high-order image, the frame identification information is used for identifying the frame of image, the effective bit information of the frame of high-order image is used for indicating bits in the frame of image included in the frame of high-order image, and the image type included in the first network data packet is the high-order image;
the frame identification information of the frame image may be a timestamp of the frame image or a frame number of the frame image; the network packet may be an RTP (Real-time Transport Protocol) packet or the like.
Step 103: and coding the frame of low-order image to obtain a second network data packet, wherein the second network data packet comprises the frame identification information of the frame of image, the effective bit information and the image type of the frame of low-order image, the effective bit information of the frame of low-order image is used for indicating the bits in the frame of image contained in the frame of low-order image, and the image type contained in the second network data packet is a low-order image.
In the embodiment of the present invention, a frame of an image with a first bit width is divided into a frame of a high-order image with a second bit width and a frame of a low-order image with a second bit width, the frame of the high-order image is encoded to obtain a first network data packet corresponding to the frame of the high-order image, the first network transmission packet includes frame identification information of the frame of the image, valid bit information of the frame of the high-order image and an image type, the frame of the low-order image is encoded to obtain a second network data packet corresponding to the frame of the low-order image, and the second network data packet includes frame identification information of the frame of the image, valid bit information of the frame of the low-order image and an image type. The first bit width is greater than the second bit width, so that in this embodiment, an encoder with the second bit width may be used to encode the image with the first bit width, thereby reducing the encoding cost.
The embodiment of the invention provides an image coding method. In this embodiment, for an image with a first bit width, a sending end encodes the image with the first bit width by using the method provided in this embodiment, referring to fig. 2, where the method includes:
step 201: dividing a frame of image into a frame of high-order image and a frame of low-order image, wherein the frame of image comprises a first bit width number of bits, the frame of high-order image comprises a second bit width number ratio, the frame of low-order image comprises a second bit width number ratio characteristic, and the first bit width is larger than a second bit width and smaller than or equal to twice the second bit width;
in this embodiment, a preferable mode is provided, which specifically includes:
and dividing the frame of image into a frame of high-order image and a frame of low-order image according to the first difference value and the second difference value.
The dividing of the frame of image into a frame of high-order image and a frame of low-order image according to the first difference and the second difference may specifically include the following two ways:
firstly, forming a low second bit width bit corresponding to a frame of image into a frame of low bit image, forming a high first difference bit corresponding to the frame of image into a low first difference bit corresponding to a frame of high bit image, and supplementing a second difference preset bit to the frame of high bit image to obtain a second bit width bit included in the frame of high bit image.
The preset bit may be a 0 bit or a1 bit.
For example, referring to fig. 3, it is assumed that one frame image a includes bits of a first bit width, the first bit width is 12 bits, the second bit width is 8 bits, a first difference between the first bit width and the second bit width is calculated to be 4, a second difference between the second bit width and the first difference is calculated to be 4, lower 8 bits corresponding to the one frame image a are formed into one frame lower image a2, upper 4 bits corresponding to the one frame image a are formed into lower 4 bits of one frame upper image a1, the one frame upper image a1 is supplemented with 4 preset bits, and if the preset bits are 0, the one frame upper image a1 is supplemented with 4 bits of 0, so that the one frame upper image a1 includes 8 bits.
Secondly, forming a high second bit width bit corresponding to a frame of image into a frame of high-order image, forming a low first difference bit corresponding to the frame of image into a high first difference bit corresponding to a frame of low-order image, and supplementing a second difference preset bit to the frame of low-order image to obtain a second bit width bit included in the frame of low-order image.
For example, referring to fig. 4, it is assumed that one frame image B includes bits of a first bit width, the first bit width is 12 bits, the second bit width is 8 bits, a first difference between the first bit width and the second bit width is calculated as 4, a second difference between the second bit width and the first difference is calculated as 4, high 8 bits corresponding to the one frame image B are formed into a frame high image B1, low 4 bits corresponding to the one frame image B are formed into high 4 bits of a frame low image B2, and the frame low image B2 is supplemented with 4 preset bits, and it is assumed that the preset bits are 0, that is, the frame low image B2 is supplemented with 4 bits of 0, so that 8 bits included in the frame low image B2 are obtained.
Step 202: acquiring effective bit information of the frame of high-order image and effective bit information of the frame of low-order image, wherein the effective bit information of the frame of high-order image is used for indicating bits in the frame of image included in the frame of high-order image, and the effective bit information of the frame of low-order image is used for indicating bits in the frame of image included in the frame of low-order image;
if the first mode is adopted to divide the frame of image, the step may specifically be: and obtaining the valid bit information of the frame of high-order image, wherein the valid bit information of the frame of high-order image can be used for indicating that the low first difference bit included in the frame of high-order image is the bit in the frame of image, and obtaining the valid bit information of the frame of low-order image, and the valid bit information of the frame of low-order image can be used for indicating that the second wide bit included in the frame of low-order image is the bit in the frame of image.
For example, for a frame of the upper image a1 and a frame of the lower image a2 as shown in fig. 3, the valid bit information of the frame of the upper image a1 is acquired, and the valid bit information of the frame of the upper image a1 is used to indicate that the lower 4 bits included in the frame of the upper image a1 are bits in the frame of the image a, and the valid bit information of the frame of the lower image a2 is acquired, and the valid bit information of the frame of the lower image a2 is used to indicate that the 8 bits included in the frame of the lower image a2 are bits in the frame of the image a.
If the second mode is adopted to divide the frame of image, the step may specifically be: and obtaining the valid bit information of the frame of low-order image, wherein the valid bit information of the frame of low-order image can be used for indicating that the first high difference bit included in the frame of low-order image is the bit in the frame of image, and obtaining the valid bit information of the frame of high-order image, and the valid bit information of the frame of high-order image can be used for indicating that the second wide bit included in the frame of high-order image is the bit in the frame of image.
For example, for a frame of the upper image B1 and a frame of the lower image B2 as shown in fig. 4, the valid bit information of the frame of the lower image B2 is obtained, and the valid bit information of the frame of the lower image B2 is used to indicate that the upper 4 bits included in the frame of the lower image B2 are bits in the frame of the image B, and the valid bit information of the frame of the upper image B1 is obtained, and the valid bit information of the frame of the upper image B1 is used to indicate that the 8 bits included in the frame of the upper image B1 are bits in the frame of the image B.
Step 203: coding the frame high-order image to obtain a code stream of the frame high-order image, setting the code stream of the frame high-order image to comprise frame identification information of the frame image, effective bit information of the frame high-order image and an image type, wherein the image type is the high-order image, and the frame identification information is used for identifying the frame image;
specifically, a first encoder is adopted to encode the frame of high-order image to obtain a code stream of the frame of high-order image, the code stream of the frame of high-order image comprises image content and additional information of the frame of high-order image, the additional information of the code stream of the frame of high-order image is set to comprise frame identification information of the frame of image, effective bit information of the frame of high-order image and an image type, the image type is a high-order image, and the frame identification information is used for identifying the frame of image; and the bit width of the first encoder is a second bit width.
In this embodiment, the additional information part may be configured to further carry frame identification information of the frame image, valid bit information of the frame high-order image, and an image type, so that the additional information of the code stream of the frame high-order image includes the frame identification information of the frame image, the valid bit information of the frame high-order image, and the image type.
For example, for a frame of high-level image a1 shown in fig. 3, a first encoder with a bit width of 8 bits is used to encode the frame of high-level image to obtain a code stream a1 of the frame of high-level image a1, and the code stream a1 is set to include the frame identification information IDA of the frame of image a, the valid bit information of the frame of high-level image a1, and the image type; for a frame of high-level picture B1 shown in fig. 4, a first encoder with a bit width of 8 bits is used to encode the frame of high-level picture to obtain a code stream B1 of the frame of high-level picture B1, and the code stream B1 is configured to include frame identification information IDB of the frame of picture B, valid bit information of the frame of high-level picture B1, and a picture type.
Step 204: packing the code stream of the frame of high-order image to obtain a first network data packet corresponding to the frame of high-order image;
for example, in this embodiment, the bitstream of one frame of the high-level image a1 shown in fig. 3 is packed to obtain the first network packet a1 corresponding to the frame of the high-level image a1, and the bitstream of one frame of the high-level image B1 shown in fig. 4 is packed to obtain the first network packet B1 corresponding to the frame of the high-level image B1.
Step 205: coding the frame of low-level image to obtain a code stream of the frame of low-level image, wherein the code stream of the frame of low-level image comprises frame identification information of the frame of image, effective bit information of the frame of low-level image and an image type, and the image type is the low-level image;
specifically, the second encoder is adopted to encode the frame of low-order image to obtain a code stream of the frame of low-order image, the code stream of the frame of low-order image comprises image content and additional information of the frame of low-order image, the additional information of the code stream of the frame of low-order image is set to comprise frame identification information of the frame of image, effective bit information and image type of the frame of low-order image, and the image type is a low-order image; and the bit width of the second encoder is a second bit width.
For example, as for a frame of low-level image a2 shown in fig. 3, a second encoder with a bit width of 8 bits is used to encode the frame of low-level image a2, so as to obtain a code stream a2 of the frame of low-level image a2, and the code stream a2 is set to include the frame identification information IDA of the frame of image a, the valid bit information of the frame of low-level image a2, and the image type; for a frame of low-level picture B2 shown in fig. 4, a second encoder with a bit width of 8 bits is used to encode the frame of low-level picture B2, so as to obtain a code stream B2 of the frame of low-level picture B2, and the code stream B2 is set to include the frame identification information IDB of the frame of picture B, the valid bit information of the frame of low-level picture B2, and the picture type.
Step 206: and packing the code stream of the frame of low-order image to obtain a second network data packet corresponding to the frame of low-order image.
For example, in this embodiment, the bitstream of one frame of low-level image a2 shown in fig. 3 is packed to obtain the second network packet a2 corresponding to the frame of low-level image a2, and the bitstream of one frame of low-level image B2 shown in fig. 4 is packed to obtain the second network packet B2 corresponding to the frame of low-level image B2.
Thus, the compression coding of the frame image is completed to obtain the network data packet corresponding to the frame image, and then the network data packet corresponding to the frame image can be sent to the receiving end.
In the embodiment of the present invention, a frame of an image with a first bit width is divided into a frame of a high-order image with a second bit width and a frame of a low-order image with a second bit width, the frame of the high-order image is encoded to obtain a first network data packet corresponding to the frame of the high-order image, the first network data packet includes frame identification information of the frame of the image, valid bit information of the frame of the high-order image and an image type, the frame of the low-order image is encoded to obtain a second network data packet corresponding to the frame of the low-order image, and the second network data packet includes frame identification information of the frame of the image, valid bit information of the frame of the low-order image and an image type. The first bit width is greater than the second bit width, so that in this embodiment, an encoder with the second bit width can be used to encode the image with the first bit width, thereby reducing the encoding cost; in addition, in this embodiment, a memory with a second bit width may be used to store the code stream of the high-order image and the code stream of the low-order image corresponding to the image with the first bit width, so that the memory space is saved.
The embodiment of the invention provides an image coding method. In this embodiment, for an image with a first bit width, a sending end encodes the image with the first bit width by using the method provided in this embodiment, referring to fig. 5, where the method includes:
step 301: dividing a frame of image into a frame of high-order image and a frame of low-order image, wherein the frame of image comprises a first bit width, the frame of high-order image comprises a second bit width, the frame of low-order image comprises a second bit width, and the first bit width is larger than the second bit width and is smaller than or equal to twice the second bit width;
specifically, a first difference between a first bit width and a second bit width is calculated, a second difference between the second bit width and the first difference is calculated, and one frame of image is divided into one frame of high-order image and one frame of low-order image according to the first difference and the second difference.
The operation of dividing one frame of image into one frame of higher image and one frame of lower image according to the first difference and the second difference can be referred to the corresponding content in step 201 of the above embodiment, and will not be described in detail here.
Step 302: acquiring effective bit information of the frame of high-order image and effective bit information of the frame of low-order image, wherein the effective bit information of the frame of high-order image is used for indicating bits in the frame of image included in the frame of high-order image, and the effective bit information of the frame of low-order image is used for indicating bits in the frame of image included in the frame of low-order image;
the detailed operation of this step can be referred to the corresponding content in step 202 of the above embodiment, and will not be described in detail here.
Step 303: coding the frame of high-order image to obtain a code stream of the frame of high-order image;
specifically, the frame of high-order image is encoded by a first encoder to obtain a code stream of the frame of high-order image, wherein a bit width of the first encoder is a second bit width.
Step 304: packing the code stream of the frame of high-order image to obtain a first network data packet corresponding to the frame of high-order image, setting a packet header of the first network data packet corresponding to the frame of high-order image to carry frame identification information of the frame of image, effective bit information of the frame of high-order image and an image type, wherein the image type is the high-order image, and the frame identification information is used for identifying the frame of image;
the first network data packet corresponding to the frame of high-order image at least comprises a packet header and a code stream of the frame of high-order image.
Step 305: coding the frame of low-level image to obtain a code stream of the frame of low-level image;
specifically, the frame of low-order image is encoded by a second encoder to obtain a code stream of the frame of low-order image, wherein a bit width of the second encoder is a second bit width.
Step 306: and packing the code stream of the frame of low-order image to obtain a second network data packet corresponding to the frame of low-order image, and setting a packet header of the second network data packet corresponding to the frame of low-order image to carry the frame identification information of the frame of image, the effective bit information of the frame of low-order image and the image type, wherein the image type is the low-order image.
The second network data packet corresponding to the frame of low-order image at least comprises a packet header and a code stream of the frame of high-order image.
Thus, the compression coding of the frame image is completed to obtain the network data packet corresponding to the frame image, and then the network data packet corresponding to the frame image can be sent to the receiving end.
In the embodiment of the present invention, a frame of an image with a first bit width is divided into a frame of a high-order image with a second bit width and a frame of a low-order image with a second bit width, the frame of the high-order image is encoded to obtain a first network data packet corresponding to the frame of the high-order image, a header of the first network data packet includes frame identification information of the frame of the image, valid bit information of the frame of the high-order image and an image type, the frame of the low-order image is encoded and packaged to obtain a second network data packet corresponding to the frame of the low-order image, and a header of the second network data packet includes the frame identification information of the frame of the image, the valid bit information of the frame of the low-order image and the image type. The first bit width is greater than the second bit width, so that in this embodiment, an encoder with the second bit width can be used to encode the image with the first bit width, thereby reducing the encoding cost; in addition, in this embodiment, a memory with a second bit width may be used to store the code stream of the high-order image and the code stream of the low-order image corresponding to the image with the first bit width, so that the memory space is saved.
Referring to fig. 6, an embodiment of the present invention provides an image decoding method, including:
step 401: decoding the network data packet to obtain a first image, a second image, and frame identification information, effective bit information and an image type of the first image and the second image, wherein the bit width of the first image is a first bit width, the bit width of the second image is a second bit width, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image;
step 402: and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width, wherein the first bit width is greater than the second bit width and less than twice the second bit width.
In the embodiment of the invention, a network transmission packet is decoded to obtain a first image with a second bit width, a second image with the second bit width, and frame identification information, effective bit information and image types of the first image and the second image, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image; and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width. The first bit width is greater than the second bit width, so that in this embodiment, the image with the first bit width can be decoded by using the encoder with the second bit width, thereby reducing the decoding cost.
The embodiment of the invention provides an image decoding method. The sending end encodes the image by using the encoding method to obtain a first network data packet and a second network data packet corresponding to the image, and the receiving end receives the first network data packet and the second network data packet corresponding to the image sent by the sending end and then decodes the image by using the method provided by the embodiment, referring to fig. 7, where the method includes:
step 501: unpacking a first network data packet to obtain a first code stream, and unpacking a second network data packet corresponding to the image to obtain a second code stream;
specifically, a first code stream is obtained by decapsulating the first network data packet, and a second code stream is obtained by decapsulating the second network data packet.
For example, decapsulating the first network packet a1 to obtain a first code stream a1, and decapsulating the second network packet a2 to obtain a second code stream a 2; and decapsulating the first network data packet B1 to obtain a first code stream B1, and encapsulating the second network data packet B2 to obtain a second code stream B2.
Step 502: decoding the first code stream to obtain a first image corresponding to the first code stream, frame identification information, effective bit information and an image type of the first image, wherein the bit width of the first image is a first bit width, and the image type is analyzed to be a high-order image;
specifically, a first decoder is adopted to decode a first code stream to obtain a first image and additional information of the first image, frame identification information, effective bit information and an image type of the first image are extracted from the additional information of the first image, the bit width of the first decoder is a second bit width, the bit width of the first image is the second bit width, and the image type is analyzed to be a high-order image.
For example, assuming that the second bit width is 8 bits, the first code stream a1 is decoded by using a first decoder having a bit width of 8 bits to obtain additional information of the first image a1 and the first image a1 having 8 bits, the frame identification information IDA, the valid bit information, and the image type of the first image a1 are extracted from the additional information of the first image a1, and the image type is analyzed to be a high-order image.
For another example, a first decoder with a bit width of 8 bits is used to decode the first code stream B1 to obtain additional information of the first image B1 and the first image B1 with 8 bits, the frame identification information IDB, the valid bit information, and the image type of the first image B1 are extracted from the additional information of the first image B1, and the image type is analyzed to be a high-order image.
Step 503: decoding the second code stream to obtain a second image with a second bit width corresponding to the second code stream, frame identification information, effective bit information and an image type of the second image, and analyzing the image type as a low-bit image;
specifically, a second decoder is used for decoding the second code stream to obtain a second image and additional information of the second image, frame identification information, effective bit information and an image type of the second image are extracted from the additional information of the second image, the bit width of the second decoder is a second bit width, the bit width of the second image is a second bit width, and the image type is analyzed to be a low-bit image.
For example, the second code stream a2 is decoded by a second decoder having a bit width of 8 bits to obtain additional information of the second image a2 and the second image a2 having 8 bits, the frame identification information IDA, the significant bit information, and the image type of the second image a2 are extracted from the additional information of the second image a2, and the lower image of the image type is parsed.
For another example, the second decoder with a bit width of 8 bits is used to decode the second code stream B2 to obtain additional information of the second picture B2 and the second picture B2 with 8 bits, the frame identification information IDB, the significant bit information, and the picture type of the second picture B2 are extracted from the additional information of the second picture B2, and the lower picture of the picture type is parsed.
Step 504: determining a frame of first image and a frame of second image which have the attribute in the same frame of image according to the frame identification information of the first image and the frame identification information of the second image;
for example, it is determined from the frame identification information IDA corresponding to the first picture a1 and the frame identification information IDA corresponding to the second picture a2 that the first picture a1 and the second picture a2 belong to the same frame picture a;
for another example, it is determined that the first picture B1 and the second picture B2 belong to the same frame picture B based on the frame identification information IDB corresponding to the first picture B1 and the frame identification information IDB corresponding to the second picture B2.
Step 505: analyzing the image type of the frame of first image, determining that the frame of first image is a high-order image of the frame of image, and extracting a first effective bit from the frame of first image according to effective bit information of the frame of first image, wherein the first effective bit is a bit in the frame of image;
specifically, the image type of the frame of first image is analyzed to be a high-order image, the frame of first image is determined to be the high-order image of the frame of image according to the image type, first effective bits included in the frame of first image are determined according to effective bit information of the frame of first image, the first effective bits are bits in the frame of image, and the determined first effective bits are extracted from second bit width bits included in the frame of first image.
For example, the image type of the frame first image a1 is analyzed to be a lower image, and accordingly the frame first image is determined to be a higher image of the frame first image a, the lower 4 bits included in the frame first image are determined to be first significant bits according to the significance information of the frame first image a1, and the lower 4 first significant bits are extracted from the 8 bits included in the frame first image a 1.
For another example, the image type of the frame first image B1 is analyzed to determine that the frame first image is the higher order image of the frame first image B, the 8 bits included in the frame first image are determined as the first significant bits according to the significant information of the frame first image B1, and the 8 first significant bits are extracted from the frame first image.
Step 506: analyzing the image type of the frame of second image, determining that the frame of second image is a low-order image of the frame of image, and extracting a second effective bit from the frame of second image according to the effective bit information of the frame of second image, wherein the second effective bit is a bit in the frame of image;
specifically, the image type of the frame of second image is analyzed to be a low-order image, the frame of second image is determined to be the low-order image of the frame of image according to the image type of the frame of second image, a second effective bit included in the frame of second image is determined according to effective bit information of the frame of second image, the second effective bit is a bit in the frame of image, and the determined second effective bit is extracted from a second bit width of bits included in the frame of second image.
For example, the image type of the frame second image a2 is analyzed to be a lower image, and accordingly the frame second image is determined to be the lower image of the frame image a, the 8 bits included in the frame second image are determined to be the second significant bits according to the significant information of the frame second image a2, and the 8 second significant bits are extracted from the frame first image.
For another example, the image type of the frame second image B2 is analyzed to determine that the frame second image is the lower image of the frame image B, the high-order 4 bits included in the frame second image are determined to be the second significant bits according to the significant information of the frame second image B2, and the high-order 4 second significant bits are extracted from the 8 bits included in the frame second image.
Step 507: and forming a reconstructed image with the first bit width as the first bit width by the first effective bit and the second effective bit according to the condition that the first image of the frame is a high-order image and the second image of the frame is a low-order image.
Specifically, the first effective bit is used as the high-order bit of one frame image according to the frame of first image as the high-order image, the second effective bit is used as the low-order bit of one frame image according to the frame of second image as the low-order image, and then the first effective bit and the second effective bit form a reconstructed image with the first bit width.
For example, the first bit width is 12 bits, and the lower 4 first significant bits extracted from the frame first image a1 and the 8 significant bits extracted from the frame second image a2 constitute a reconstructed image a of the first bit width.
For another example, the 8-bit first significant bits extracted from the frame first image B1 and the high-order 4-bit second significant bits extracted from the frame second image B2 are combined into the first bit-wide reconstructed image B.
In the embodiment of the invention, a first network data packet is decoded to obtain a first image with a second bit width, the frame identification information, the effective bit information and the image type of the first image are obtained, and the image type is a high-order image; decoding the second network data packet to obtain a second image with a second bit width, wherein the frame identification information, the effective bit information and the image type of the second image are low-bit images; and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width. The first bit width is greater than the second bit width, so that in this embodiment, an encoder with the second bit width can be used to decode an image with the first bit width, thereby reducing the decoding cost; in addition, in this embodiment, a memory with a second bit width may be used to store the first code stream and the second code stream corresponding to the image with the first bit width, so that the memory space is saved.
The embodiment of the invention provides an image decoding method. The sending end encodes the image by using the encoding method to obtain a first network data packet and a second network data packet corresponding to the image, and the receiving end receives the first network data packet and the second network data packet corresponding to the image sent by the sending end and then decodes the image by using the method provided by the embodiment, referring to fig. 8, where the method includes:
step 601: unpacking a first network data packet to obtain a first code stream, analyzing the image type of a first image corresponding to the first code stream to be a high-order image, unpacking a second network data packet to obtain a second code stream, analyzing the frame identification information, the effective bit information and the image type of a second image corresponding to the second code stream to be a low-order image;
specifically, decapsulating a first network data packet to obtain a packet header and a first code stream included in the first network data packet, extracting frame identification information, valid bit information, and an image type of a first image corresponding to the first code stream from the packet header of the first network data packet, and analyzing the image type of the first image as a high-order image; and decapsulating the second network data packet to obtain a packet header and a second code stream of the second network data packet, extracting frame identification information, effective bit information and an image type of a second image corresponding to the second code stream from the packet header of the second network data packet, and analyzing the image type of the second image as a low-bit image.
Step 602: decoding the first code stream to obtain a first image with a second bit width corresponding to the first code stream;
specifically, a first decoder is used for decoding the first code stream to obtain a first image, the bit width of the first decoder is a second bit width, and the bit width of the first image is the second bit width.
Step 603: decoding the second code stream to obtain a second image with a second bit width corresponding to the second code stream;
specifically, a second decoder is used for decoding the second code stream to obtain a second image, the bit width of the second decoder is a second bit width, and the bit width of the second image is a second bit width.
Step 604: determining a frame of first image and a frame of second image which have the attribute in the same frame of image according to the frame identification information of the first image and the frame identification information of the second image;
step 605: analyzing the image type of the frame of first image into a high-order image and determining the first image as the high-order image of the frame of image, and analyzing the image type of the frame of second image into a low-order image and determining the second image as the low-order image of the frame of image;
step 606: extracting first effective bits from the frame first image according to the effective bit information of the frame first image, wherein the first effective bits are bits in the frame first image;
specifically, a first significant bit included in the frame first image is determined according to significant bit information of the frame first image, the first significant bit is a bit in the frame image, and the determined first significant bit is extracted from a second bit-wide bit included in the frame first image.
Step 607: extracting second effective bits from the frame of second image according to the effective bit information of the frame of second image, wherein the second effective bits are bits in the frame of second image;
specifically, the second significant bit included in the frame second image is determined according to the significant bit information of the frame second image, the second significant bit is a bit in the frame image, and the determined second significant bit is extracted from the second bits wide included in the frame second image.
Step 608: and forming a reconstructed image with the first bit width as the first bit width by the first effective bit and the second effective bit according to the condition that the first image of the frame is a high-order image and the second image of the frame is a low-order image.
Specifically, the first effective bit is used as the high-order bit of a frame image according to the frame of the first image as the high-order image, the second effective bit is used as the low-order bit of a frame image according to the frame of the second image as the low-order image, and then the first effective bit and the second effective bit form a reconstructed image with a first bit width.
In the embodiment of the invention, a first network data packet is decoded to obtain a first image with a second bit width, the frame identification information, the effective bit information and the image type of the first image are analyzed, and the image type of the first image is analyzed to be a high-bit image; decoding the second network data packet to obtain a second image with a second bit width, and analyzing the image type of the second image into a low-order image, wherein the frame identification information, the effective bit information and the image type of the second image are the frame identification information; and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width. The first bit width is greater than the second bit width, so that in this embodiment, an encoder with the second bit width can be used to decode an image with the first bit width, thereby reducing the decoding cost; in addition, in this embodiment, a memory with a second bit width may be used to store the first code stream and the second code stream corresponding to the image with the first bit width, so that the memory space is saved.
Referring to fig. 9, an embodiment of the present invention provides an image encoder including:
a dividing module 701, configured to divide a frame of image into a frame of high-order image and a frame of low-order image, where the frame of image includes bits with a first bit width, the frame of high-order image includes bits with a second bit width, the frame of low-order image includes bits with the second bit width, and the first bit width is greater than the second bit width and less than twice the second bit width;
a first encoding module 702, configured to encode the frame of high-level image divided by the dividing module 701 to obtain a first network data packet, where the first network data packet includes frame identification information of the frame of image, valid bit information of the frame of high-level image and an image type, the frame identification information is used to identify the frame of image, the valid bit information of the frame of high-level image is used to indicate bits in the frame of image included in the frame of high-level image, and the image type included in the first network data packet is a high-level image;
a second encoding module, configured to encode the frame of low-level images divided by the dividing module 701 to obtain a second network data packet, where the second network data packet includes frame identification information of the frame of images, and valid bit information and an image type of the frame of low-level images, the valid bit information of the frame of low-level images is used to indicate bits in the frame of images included in the frame of low-level images, and the image type included in the second network data packet is a low-level image.
Wherein, the dividing module 701 includes:
the first dividing unit is used for calculating a first difference value between the first bit width and the second bit width and a second difference value between the second bit width and the first difference value, forming low second bit width bit bits corresponding to the frame image into a frame low-order bit image, forming high first difference bit bits corresponding to the frame image into low first difference bit bits corresponding to a frame high-order bit image, and supplementing second difference preset bit bits to the frame high-order bit image; or,
the second dividing unit is used for calculating a first difference value between the first bit width and the second bit width, calculating a second difference value between the second bit width and the first difference value, forming high second bit width bits corresponding to the frame image into a frame high-order image, forming low first difference bits corresponding to the frame image into high first difference bits corresponding to a frame low-order image, and supplementing second difference preset bits to the frame low-order image.
The first encoding module 702 includes:
the first coding unit is used for coding the frame of high-order image to obtain a code stream of the frame of high-order image, setting additional information of the code stream of the frame of high-order image to comprise frame identification information of the frame of image, effective bit information and image type of the frame of high-order image, and packaging the code stream of the frame of high-order image to obtain a first network data packet; or,
and the second coding unit is used for coding the frame of high-order image to obtain a code stream of the frame of high-order image, packaging the code stream of the frame of high-order image to obtain a first network data packet, and setting a packet header of the first network data packet to carry the frame identification information of the frame of image, the effective bit information of the frame of high-order image and the image type.
Wherein the second encoding module 703 includes:
a third encoding unit, configured to encode the frame of low-level image to obtain a code stream of the frame of low-level image, set that additional information of the code stream of the frame of low-level image includes frame identification information of the frame of image, valid bit information of the frame of low-level image and an image type, and pack the code stream of the frame of low-level image to obtain a second network data packet; or,
and the fourth coding unit is used for coding the frame of low-order image to obtain a code stream of the frame of low-order image, packaging the code stream of the frame of low-order image to obtain a second network data packet, and setting a packet header of the second network data packet to carry the frame identification information of the frame of image, the effective bit information of the frame of low-order image and the image type.
Further, the apparatus further comprises:
and the acquisition module is used for acquiring the effective bit information of the frame of high-order image and the effective bit information of the frame of low-order image.
In the embodiment of the present invention, a frame of an image with a first bit width is divided into a frame of a high-order image with a second bit width and a frame of a low-order image with a second bit width, the frame of the high-order image is encoded to obtain a first network data packet corresponding to the frame of the high-order image, the first network data packet includes frame identification information of the frame of the image, valid bit information of the frame of the high-order image and an image type, the frame of the low-order image is encoded and packaged to obtain a second network data packet corresponding to the frame of the low-order image, and the second network data packet includes the frame identification information of the frame of the image, the valid bit information of the frame of the low-order image and the image type. The first bit width is greater than the second bit width, so that in this embodiment, an encoder with the second bit width can be used to encode the image with the first bit width, thereby reducing the encoding cost; in addition, in this embodiment, a memory with a second bit width may be used to store the code stream of the high-order image and the code stream of the low-order image corresponding to the image with the first bit width, so that the memory space is saved.
Referring to fig. 10, an embodiment of the present invention provides an image decoder for decoding a network data packet corresponding to an image obtained by the image encoder, including:
a decoding module 801, configured to decode the network data packet to obtain a first image, a second image, and frame identification information, valid bit information, and an image type of the first image and the second image, where a bit width of the first image is a first bit width, a bit width of the second image is a second bit width, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image;
a reconstructing module 802, configured to reconstruct the first image and the second image according to the frame identifier information, the valid bit information, and the image type of the first image and the frame identifier information, the valid bit information, and the image type of the second image obtained by decoding in the decoding module 801, so as to obtain a reconstructed image with a first bit width, where the first bit width is greater than the second bit width and is less than or equal to twice the second bit width.
The decoding module 801 includes:
the first decoding unit is used for unpacking the first network data packet to obtain a first code stream, decoding the first code stream to obtain a first image, extracting frame identification information, effective bit information and an image type of the first image from additional information of the first code stream, and analyzing that the image type of the first image is a high-order image;
and the second decoding unit is used for decoding the second network data packet to obtain a second code stream, decoding the second code stream to obtain a second image, extracting the frame identification information, the effective bit information and the image type of the second image from the additional information of the second code stream, and analyzing the image type of the second image as a low-bit image.
The decoding module 801 includes:
the third decoding unit is used for unpacking the first network data packet to obtain a first code stream, extracting frame identification information, effective bit information and an image type of a first image corresponding to the first code stream from a packet header of the first network data packet, decoding the first code stream to obtain a first image, and analyzing the image type of the first image to be a high-order image;
and the fourth decoding unit is used for unpacking the second network data packet to obtain a second code stream, extracting the frame identification information, the effective bit information and the image type of a second image corresponding to the second code stream from the packet header of the second network data packet, decoding the second code stream to obtain a second image, and analyzing that the image type of the second image is a low-bit image.
Wherein the reconstruction module 803 comprises:
the first determining unit is used for determining a first image and a second image belonging to a frame included in the same image according to the frame identification information of the first image and the frame identification information of the second image;
the second determining unit is used for analyzing the image type of the frame of first image and determining that the frame of first image is the high-order image of the frame of image determined by the first determining unit, and analyzing the image type of the frame of second image and determining that the frame of second image is the low-order image of the frame of image determined by the first determining unit;
a first obtaining unit, configured to obtain a first valid bit from the frame first image according to valid bit information of the frame first image, where the first valid bit is a bit in the frame first image;
a second obtaining unit, configured to obtain a second valid bit from the frame second image according to the valid bit information of the frame second image, where the second valid bit is a bit in the frame second image;
and the composition unit is used for composing the first effective bit and the second effective bit into a reconstructed image of a first position of a frame according to the fact that the first image of the frame determined by the second determination unit is a high-order image and the second image of the frame is a low-order image.
In the embodiment of the invention, a network transmission packet is decoded to obtain a first image with a second bit width, a second image with the second bit width, and frame identification information, effective bit information and image types of the first image and the second image, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image; and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width. The first bit width is greater than the second bit width, so that in this embodiment, an encoder with the second bit width can be used to decode an image with the first bit width, thereby reducing the decoding cost; in addition, in this embodiment, a memory with a second bit width may be used to store the first code stream and the second code stream corresponding to the image with the first bit width, so that the memory space is saved.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (16)

1. An image encoding method, characterized in that the method comprises:
dividing a frame of image into a frame of high-order image and a frame of low-order image, the frame of image including a first bit width of bits, the frame of high-order image including a second bit width of bits, the frame of low-order image including a second bit width of bits, the first bit width being greater than the second bit width and less than twice the second bit width;
encoding the frame of high-order image to obtain a first network data packet, wherein the first network data packet comprises frame identification information of the frame of image, effective bit information and an image type of the frame of high-order image, the frame identification information is used for identifying the frame of image, the effective bit information of the frame of high-order image is used for indicating bits in the frame of image included in the frame of high-order image, and the image type included in the first network data packet is a high-order image;
and encoding the frame of low-order image to obtain a second network data packet, wherein the second network data packet comprises the frame identification information of the frame of image, the effective bit information and the image type of the frame of low-order image, the effective bit information of the frame of low-order image is used for indicating the bits in the frame of image included in the frame of low-order image, and the image type included in the second network data packet is a low-order image.
2. The method of claim 1, wherein the dividing a frame of image into a frame of higher order image and a frame of lower order image comprises:
calculating a first difference value between the first bit width and the second bit width, calculating a second difference value between the second bit width and the first difference value, forming low second bit width bits corresponding to the frame of image into a frame of low-order image, forming high first difference bits corresponding to the frame of image into low first difference bits corresponding to a frame of high-order image, and supplementing a second difference preset bit to the frame of high-order image; or,
calculating a first difference value between the first bit width and the second bit width, calculating a second difference value between the second bit width and the first difference value, forming high second bit width bits corresponding to the frame of image into a frame of high-order image, forming low first difference bits corresponding to the frame of image into high first difference bits corresponding to a frame of low-order image, and supplementing second difference preset bits to the frame of low-order image.
3. The method of claim 1, wherein said encoding the frame of higher order pictures into a first network packet comprises:
coding the frame of high-order image to obtain a code stream of the frame of high-order image, setting additional information of the code stream to comprise frame identification information of the frame of image, effective bit information and image type of the frame of high-order image, and packaging the code stream to obtain a first network data packet; or,
and coding the frame of high-order image to obtain a code stream of the frame of high-order image, packaging the code stream to obtain a first network data packet, and setting a packet header of the first network data packet to carry the frame identification information of the frame of image, the effective bit information of the frame of high-order image and the image type.
4. The method of claim 1, wherein said encoding said frame of lower pictures into a second network packet comprises:
coding the frame of low-order image to obtain a code stream of the frame of low-order image, setting additional information of the code stream to comprise frame identification information of the frame of image, effective bit information and image type of the frame of low-order image, and packaging the code stream to obtain a second network data packet; or,
and coding the frame of low-order image to obtain a code stream of the frame of low-order image, packaging the code stream to obtain a second network data packet, and setting a packet header of the second network data packet to carry the frame identification information of the frame of image, the effective bit information of the frame of low-order image and the image type.
5. A method for decoding network packets corresponding to the image obtained in claim 1, the method comprising:
decoding a network data packet to obtain a first image, a second image, and frame identification information, effective bit information and an image type of the first image and the second image, wherein the bit width of the first image is a first bit width, the bit width of the second image is a second bit width, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image;
and reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image to obtain a reconstructed image with a first bit width, wherein the first bit width is greater than the second bit width and is less than or equal to two times of the second bit width.
6. The method of claim 5, wherein decoding the network packet to obtain the first picture, the second picture, and the frame identification information, the valid bit information, and the picture type of the first picture and the second picture comprises:
unpacking a first network data packet to obtain a first code stream, decoding the first code stream to obtain a first image, and extracting frame identification information, effective bit information and an image type of the first image from additional information of the first code stream;
decoding a second network data packet to obtain a second code stream, decoding the second code stream to obtain a second image, and extracting frame identification information, effective bit information and an image type of the second image from additional information of the second code stream.
7. The method of claim 5, wherein decoding the network packet to obtain the first picture, the second picture, and the frame identification information, the valid bit information, and the picture type of the first picture and the second picture comprises:
unpacking a first network data packet to obtain a first code stream, extracting frame identification information, effective bit information and an image type of a first image corresponding to the first code stream from a packet header of the first network data packet, and decoding the first code stream to obtain a first image;
unpacking a second network data packet to obtain a second code stream, extracting frame identification information, effective bit information and an image type of a second image corresponding to the second code stream from a packet header of the second network data packet, and decoding the second code stream to obtain a second image.
8. The method according to any one of claims 5 to 7, wherein said reconstructing the first image and the second image according to the frame identification information, the valid bit information and the image type of the first image and the frame identification information, the valid bit information and the image type of the second image to obtain the reconstructed image with the first bit width comprises:
determining a frame of first image and a frame of second image which belong to the same frame of image according to the frame identification information of the first image and the frame identification information of the second image;
analyzing the image type of the first frame of image and determining that the first frame of image is a high-order image of the first frame of image, and analyzing the image type of the second frame of image and determining that the second frame of image is a low-order image of the first frame of image;
acquiring first effective bits from the first frame of image according to effective bit information of the first frame of image, wherein the first effective bits are bits in the first frame of image;
acquiring a second effective bit from the first frame of second image according to the effective bit information of the first frame of second image, wherein the second effective bit is a bit in the first frame of image;
and forming a reconstructed image with a first bit width by the first effective bit and the second effective bit according to the condition that the first image of the frame is a high-order image and the second image of the frame is a low-order image.
9. An image encoder, characterized in that the image encoder comprises:
the dividing module is used for dividing a frame of image into a frame of high-order image and a frame of low-order image, wherein the frame of image comprises a first bit width, the frame of high-order image comprises a second bit width, the frame of low-order image comprises a second bit width, and the first bit width is larger than the second bit width and smaller than twice the second bit width;
a first encoding module, configured to encode a frame of high-level images divided by the dividing module to obtain a first network data packet, where the first network data packet includes frame identification information of the frame of images, and effective bit information and an image type of the frame of high-level images, the frame identification information is used to identify the frame of images, the effective bit information of the frame of high-level images is used to indicate bits in the frame of images included in the frame of high-level images, and the image type included in the first network data packet is a high-level image;
the second encoding module is configured to encode a frame of low-level images divided by the dividing module to obtain a second network data packet, where the second network data packet includes frame identification information of the frame of images, valid bit information of the frame of low-level images and an image type, the valid bit information of the frame of low-level images is used to indicate bits in the frame of images included in the frame of low-level images, and the image type included in the second network data packet is a low-level image.
10. The image encoder of claim 9, wherein the partitioning module comprises:
a first dividing unit, configured to calculate a first difference between the first bit width and the second bit width, calculate a second difference between the second bit width and the first difference, form a frame of low-order image from low second bit width bits corresponding to the frame of image, form low first difference bits corresponding to a frame of high-order image from high first difference bits corresponding to the frame of image, and supplement a second difference preset bit to the frame of high-order image; or,
the second dividing unit is configured to calculate a first difference between the first bit width and the second bit width, calculate a second difference between the second bit width and the first difference, form a frame of high-order image from high second bit width bits corresponding to the frame of image, form high first difference bits corresponding to a frame of low-order image from low first difference bits corresponding to the frame of image, and supplement the frame of low-order image with second difference preset bits.
11. The image encoder of claim 9, wherein the first encoding module comprises:
the first coding unit is used for coding the frame of high-order image to obtain a code stream of the frame of high-order image, setting additional information of the code stream to comprise frame identification information of the frame of image, effective bit information and image type of the frame of high-order image, and packaging the code stream to obtain a first network data packet; or,
and the second coding unit is used for coding the frame of high-order image to obtain a code stream of the frame of high-order image, packaging the code stream to obtain a first network data packet, and setting a packet header of the first network data packet to carry the frame identification information of the frame of image, the effective bit information of the frame of high-order image and the image type.
12. The image encoder of claim 9, wherein the second encoding module comprises:
a third encoding unit, configured to encode the frame of low-level image to obtain a code stream of the frame of low-level image, set that additional information of the code stream includes frame identification information of the frame of image, and pack the code stream to obtain a second network data packet, where the effective bit information and the image type of the frame of low-level image are included in the additional information of the code stream; or,
and the fourth coding unit is used for coding the frame of low-order image to obtain a code stream of the frame of low-order image, packaging the code stream to obtain a second network data packet, and setting a packet header of the second network data packet to carry the frame identification information of the frame of image, the effective bit information of the frame of low-order image and the image type.
13. An image decoder for decoding network packets corresponding to the image obtained in claim 9, said image decoder comprising:
the decoding module is used for decoding a network data packet to obtain a first image, a second image, and frame identification information, effective bit information and an image type of the first image and the second image, wherein the bit width of the first image is a first bit width, the bit width of the second image is a second bit width, and the image type of the first image is analyzed to be a high-order image and the image type of the second image is analyzed to be a low-order image;
and the reconstruction module is used for reconstructing the first image and the second image according to the frame identification information, the effective bit information and the image type of the first image and the frame identification information, the effective bit information and the image type of the second image which are obtained by decoding of the decoding module to obtain a reconstructed image with a first bit width, wherein the first bit width is greater than the second bit width and is less than or equal to two times of the second bit width.
14. The image decoder of claim 13, wherein the decoding module comprises:
the first decoding unit is used for unpacking a first network data packet to obtain a first code stream, decoding the first code stream to obtain a first image, extracting frame identification information, effective bit information and an image type of the first image from additional information of the first code stream, and analyzing that the image type of the first image is a high-order image;
the second decoding unit is configured to decode a second network data packet to obtain a second code stream, decode the second code stream to obtain a second image, extract frame identification information, valid bit information, and an image type of the second image from additional information of the second code stream, and analyze that the image type of the second image is a low-order image.
15. The image decoder of claim 13, wherein the decoding module comprises:
the third decoding unit is used for unpacking a first network data packet to obtain a first code stream, extracting frame identification information, effective bit information and an image type of a first image corresponding to the first code stream from a packet header of the first network data packet, decoding the first code stream to obtain a first image, and analyzing that the image type of the first image is a high-order image;
the fourth decoding unit is configured to unpack a second network data packet to obtain a second code stream, extract frame identification information, valid bit information, and an image type of a second image corresponding to the second code stream from a packet header of the second network data packet, decode the second code stream to obtain a second image, and analyze that the image type of the second image is a low-order image.
16. The image decoder of any of claims 13 to 15, wherein the reconstruction module comprises:
a first determining unit, configured to determine, according to the frame identification information of the first image and the frame identification information of the second image, a frame of the first image and a frame of the second image that belong to the same frame of image;
a second determining unit, configured to analyze the image type of the first frame of image and determine that the first frame of image is a higher-order image of the first frame of image determined by the first determining unit, and analyze the image type of the second frame of image and determine that the second frame of image is a lower-order image of the first frame of image determined by the first determining unit;
a first obtaining unit, configured to obtain a first valid bit from the first frame of first image according to valid bit information of the first frame of first image, where the first valid bit is a bit in the first frame of first image;
a second obtaining unit, configured to obtain a second valid bit from the second image of the first frame according to valid bit information of the second image of the first frame, where the second valid bit is a bit in the second image of the first frame;
and the forming unit is used for forming a reconstructed image of a first position of one frame by the first effective bit acquired by the first acquisition unit and the second effective bit acquired by the second acquisition unit according to the fact that the second determination unit determines that the first image of one frame is a high-order image and the second image of one frame is a low-order image.
CN2012101927415A 2012-06-12 2012-06-12 Image encoding method, image decoding method, image encoder and image decoder Pending CN102724553A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2012101927415A CN102724553A (en) 2012-06-12 2012-06-12 Image encoding method, image decoding method, image encoder and image decoder
PCT/CN2013/072207 WO2013185494A1 (en) 2012-06-12 2013-03-06 Image encoding method, image decoding method , image encoder and image decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101927415A CN102724553A (en) 2012-06-12 2012-06-12 Image encoding method, image decoding method, image encoder and image decoder

Publications (1)

Publication Number Publication Date
CN102724553A true CN102724553A (en) 2012-10-10

Family

ID=46950195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101927415A Pending CN102724553A (en) 2012-06-12 2012-06-12 Image encoding method, image decoding method, image encoder and image decoder

Country Status (2)

Country Link
CN (1) CN102724553A (en)
WO (1) WO2013185494A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013185494A1 (en) * 2012-06-12 2013-12-19 华为技术有限公司 Image encoding method, image decoding method , image encoder and image decoder
CN105516542A (en) * 2014-09-26 2016-04-20 北京同步科技有限公司 Multichannel video synchronization system based on hardware encoders and synchronization method thereof
CN109600618A (en) * 2018-12-19 2019-04-09 上海数迹智能科技有限公司 Video-frequency compression method, decompression method, device, terminal and medium
CN109618171A (en) * 2018-05-07 2019-04-12 杭州新瀚光电科技有限公司 Infrared image real-time Transmission compression algorithm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040135903A1 (en) * 2002-10-11 2004-07-15 Brooks Lane C. In-stream lossless compression of digital image sensor data
US20090097561A1 (en) * 2007-10-15 2009-04-16 Yi-Jen Chiu Bit depth enhancement for scalable video coding
CN102387356A (en) * 2010-09-06 2012-03-21 索尼公司 Image processing apparatus and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724553A (en) * 2012-06-12 2012-10-10 华为技术有限公司 Image encoding method, image decoding method, image encoder and image decoder

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040135903A1 (en) * 2002-10-11 2004-07-15 Brooks Lane C. In-stream lossless compression of digital image sensor data
US20090097561A1 (en) * 2007-10-15 2009-04-16 Yi-Jen Chiu Bit depth enhancement for scalable video coding
CN102387356A (en) * 2010-09-06 2012-03-21 索尼公司 Image processing apparatus and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013185494A1 (en) * 2012-06-12 2013-12-19 华为技术有限公司 Image encoding method, image decoding method , image encoder and image decoder
CN105516542A (en) * 2014-09-26 2016-04-20 北京同步科技有限公司 Multichannel video synchronization system based on hardware encoders and synchronization method thereof
CN109618171A (en) * 2018-05-07 2019-04-12 杭州新瀚光电科技有限公司 Infrared image real-time Transmission compression algorithm
CN109600618A (en) * 2018-12-19 2019-04-09 上海数迹智能科技有限公司 Video-frequency compression method, decompression method, device, terminal and medium
CN109600618B (en) * 2018-12-19 2021-12-24 上海数迹智能科技有限公司 Video compression method, decompression method, device, terminal and medium

Also Published As

Publication number Publication date
WO2013185494A1 (en) 2013-12-19

Similar Documents

Publication Publication Date Title
WO2020012073A1 (en) Method and apparatus for storage and signaling of compressed point clouds
US8538181B2 (en) Image signal encoding apparatus and image signal encoding method
US11818392B2 (en) Decoder and encoder and methods for coding of a video sequence
CN101394550B (en) Packing method and device for video data
CN113170088A (en) Method and apparatus for generating a media file including three-dimensional video content, and method and apparatus for playing back three-dimensional video content
CN102724553A (en) Image encoding method, image decoding method, image encoder and image decoder
CN104935944A (en) Method and device for coding and decoding video data
CN113228664B (en) Method, apparatus, computer program and computer readable medium for scalable image coding
CN102055963A (en) Video coding and decoding methods and video coding and decoding devices
CN111726616A (en) Point cloud encoding method, point cloud decoding method, point cloud encoding device, point cloud decoding device, and storage medium
CN104320644B (en) A kind of decoding method of depth information, system and device
JP2022507027A (en) Methods, equipment, computer programs, and computer-readable media for scalable video coding and transmission.
KR101581131B1 (en) Transmitting method for video data, video encoder and video decoder
CN116033113B (en) Video conference auxiliary information transmission method and system
CN113625965B (en) Data storage method, system and device of distributed storage system and storage medium
WO2020187283A1 (en) Point cloud encoding method, point cloud decoding method, apparatus, and storage medium
WO2020220941A1 (en) Point cloud encoding method, point cloud decoding method, apparatuses, and storage medium
CN114006619A (en) Method for converting GZIP format file into LZ4 format file
CN117459728A (en) Unmanned aerial vehicle video data compression and transmission system
CN118674794A (en) Data processing method, apparatus, storage medium, and program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121010