WO2014048372A1 - 用于图像处理的方法、装置、编码器和解码器 - Google Patents
用于图像处理的方法、装置、编码器和解码器 Download PDFInfo
- Publication number
- WO2014048372A1 WO2014048372A1 PCT/CN2013/084504 CN2013084504W WO2014048372A1 WO 2014048372 A1 WO2014048372 A1 WO 2014048372A1 CN 2013084504 W CN2013084504 W CN 2013084504W WO 2014048372 A1 WO2014048372 A1 WO 2014048372A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- block
- sub
- target image
- image
- target
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/59—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/30—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
- H04N19/33—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability in the spatial domain
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/46—Embedding additional information in the video signal during the compression process
- H04N19/463—Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
- H04N19/517—Processing of motion vectors by encoding
- H04N19/52—Processing of motion vectors by encoding by predictive encoding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/187—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a scalable video layer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
Definitions
- the present invention relates to the field of video processing and, more particularly, to a method, apparatus, encoder and decoder for image processing. Background technique
- Scalable coding is also known as layered coding.
- SVC scalable video coding
- the image can be subjected to down-resolution processing to obtain a low-resolution image, and the original image is referred to as a high-resolution image as a contrast, and the encoder separately determines the low-quality (eg, low-resolution) image.
- the high quality (for example, high resolution) image is encoded to obtain high quality image coding information and low quality image coding information.
- an image is divided into a plurality of image layers based on quality parameters including spatial resolution, temporal resolution, or signal-to-noise ratio intensity.
- the goal of SVC is to make high-quality image layers make full use of low-quality image layer information, improve the efficiency of inter-layer prediction, and make it more efficient when encoding high-quality images.
- the motion information of the image block of the appropriately scaled low-quality layer image is directly used as the motion information of the corresponding image block in the high-quality layer image, but, for example, there are one or more sub-blocks in the low-quality layer image (corresponding to The sub-block) is encoded in the intra mode (ie, the motion information of the corresponding sub-block is empty), and the sub-block in the high-quality layer image block cannot acquire the motion information from the corresponding sub-block in the low-quality layer image.
- the motion information of the sub-block is constructed according to a given method.
- the motion information derived from these derivations is not accurate, which affects the coding performance of the sub-block and further affects the coding efficiency of the entire high-quality layer image.
- Embodiments of the present invention provide a method and apparatus for image processing, which can improve coding performance of a sub-block that cannot obtain motion information from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image.
- a method for image processing comprising: when determining that motion information of a first base layer image sub-block corresponding to a first target image sub-block of a target image block is empty, according to Determining a second target image, a size of the target image block, a size of each target image sub-block included in the target image block, and second indication information indicating a position of the first target image sub-block in the target image block Determining, according to the motion information of the second target image sub-block, determining first reference information for encoding the first target image sub-block, where the first base layer image sub-block is located in the base layer image An image block, the target image block being located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and a spatial location of the first base image block sub-block in the base layer image and the first target An image sub-block corresponds to a spatial position in the enhancement layer image; encoding the target image block to generate a target code stream and included in the target code
- the size according to the target image block, the size of the target image sub-block included in the target image block, and the second position indicating the position of the first target image sub-block in the target image block Instructing information, determining the second target image sub-block, comprising: determining the second target image sub-block according to any one of the following formulas,
- Idx 2 ((l - ldx x %N / (N / 2)) x 2 + ⁇ ldx x %N / (N / 4) %2)) x N / 4 ;
- Idx 2 Idx N x N + ((l - ldx x %N / (N / 2)) x 2 + (l - ldx x %N / (N / 4) %2)) x N / 4 ;
- Representing third indication information indicating a position of the second target image sub-block in the target image block, / indicating the second indication information, N being according to a size of the target image block and a size of the target image sub-block definite.
- the determining, according to the motion information of the second target image sub-block, determining, for encoding the first target image sub-block The first reference information includes: if the motion information of the second target image sub-block is empty, determining that the first reference information is zero motion information.
- the encoding the target image block includes: according to the first reference information, The first target image sub-block performs motion compensation processing.
- the target image block according to the reference information Performing encoding includes: performing deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the method For encoding the target image block, the method includes: entropy encoding the first indication information, so that the first indication information is in the target code stream, and the skip mode flag bit or the merged MERGE mode flag bit information adjacent.
- the encoding the target image block according to the reference information includes: determining, according to the reference image block located in the preset position in the enhancement layer image, whether the context is encoded by using reference information; according to the context, The first indication information is entropy encoded.
- a method for image processing comprising: acquiring first indication information from a target code stream; and a first base layer corresponding to a first target image sub-block of the target image block
- the motion information of the image sub-block is empty, based on the first indication information, according to the size of the target image block, the size of each target image sub-block included in the target image block, and the sub-block for indicating the first target image Determining, by the second indication information of the position in the target image block, the second target image sub-block; determining, according to the motion information of the second target image sub-block, the sub-block for the first target image Decoding the first reference information, wherein the first base layer image sub-block is an image block located in the base layer image, the target image block being located in the enhancement layer image, the base layer image corresponding to the enhancement layer image And the spatial position of the first basic image block sub-block in the base layer image corresponds to a spatial position of the first target image sub-block in the enhancement layer image;
- the size according to the target image block, the size of the target image sub-block included in the target image block, and the second position indicating the position of the first target image sub-block in the target image block Instructing information, determining the second target image sub-block, comprising: determining the second target image sub-block according to any one of the following formulas,
- the determining, according to the motion information of the second target image sub-block, determining, for encoding the first target image sub-block The first reference information includes: if the motion information of the second target image sub-block is empty, determining that the first reference information is zero motion information.
- the decoding the target code stream includes: according to the first reference information, The first target image sub-block performs motion compensation processing.
- the target image block according to the reference information Performing decoding includes: performing deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the secondary target Obtaining the first indication information in the code stream includes: acquiring, from the target code stream, the first indication information, where the first indication information is in the target code stream and is merged with the skip mode flag bit
- the obtaining the first indication information from the target code stream includes: determining, according to whether the reference image block located in the preset position in the enhancement layer image is decoded by using reference information, determining a context according to the context; Decoding to determine the first indication information.
- an apparatus for image processing comprising: an obtaining unit, configured to determine motion information of a first base layer image sub-block corresponding to a first target image sub-block of a target image block When empty, according to the size of the target image block, the size of each target image sub-block included in the target image block, and the second indication information indicating the position of the first target image sub-block in the target image block, Determining a second target image sub-block; configured to determine, according to motion information of the second target image sub-block, first reference information used to encode the first target image sub-block, where the first base layer image sub- The block is an image block located in the base layer image, the target image block is located in the enhancement layer image, the base layer image corresponds to the enhancement layer image, and the first basic image block sub-block is in the base layer image a spatial position corresponding to a spatial position of the first target image sub-block in the enhancement layer image; a coding unit that encodes the target image block to generate a mesh
- the acquiring unit is specifically configured to determine the second target image sub-block according to any one of the following formulas,
- W3 ⁇ 4 / ⁇ /NxN + ((l-/ x 1 N/(N/2))x2 + (l-/ ⁇ N/(N/4) 2))xN/4; where The third indication information of the position of the second target image sub-block in the target image block, / represents the second indication information, and N is determined according to the size of the target image block and the size of the target image sub-block.
- the acquiring unit is specifically configured to: if the motion information of the second target image sub-block is empty, determine the first reference information Zero motion information.
- the coding unit is specifically configured to use the first target image according to the first reference information.
- the sub-block performs motion compensation processing.
- the coding unit is further configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the coding unit Specifically, the first indication information is entropy encoded such that the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the coding unit is specifically configured to: according to whether the reference image block located in the preset position in the enhancement layer image is encoded by using reference information, determine a context; and perform entropy coding on the first indication information according to the context. .
- a fourth aspect provides an apparatus for image processing, the apparatus comprising: a decoding unit, configured to acquire first indication information from a target code stream; and an acquiring unit, configured to: when the first target image is associated with the target image block And when the motion information of the first base layer image sub-block corresponding to the block is empty, based on the first indication information acquired by the decoding unit, according to the size of the target image block, each target image sub-block included in the target image block.
- a second indication information indicating a position of the first target image sub-block in the target image block determining a second target image sub-block; and determining, according to the motion information of the second target image sub-block,
- the first reference information for decoding the first target image sub-block wherein the first base layer image sub-block is an image block located in the base layer image, the target image block being located in the enhancement layer image, the basic a layer image corresponding to the enhancement layer image, and a spatial position of the first basic image block sub-block in the base layer image is in the first target image sub-block
- the spatial position in the enhancement layer image corresponds; the decoding unit is further configured to decode the target code stream to obtain the target image block.
- the acquiring unit is specifically configured to determine the second target image sub-block according to any one of the following formulas,
- the acquiring unit is specifically configured to determine the first reference information if the motion information of the second
- the decoding unit is specifically configured to: according to the first reference information, the first target image The sub-block performs motion compensation processing.
- the decoding unit is further configured to locate the target image The pixels near the boundary between the sub-blocks are subjected to deblocking filtering processing.
- the decoding unit Specifically, the first indication information is obtained from the target code stream, where the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the decoding unit is specifically configured to: according to whether the reference image block located in the preset position in the enhancement layer image is decoded by using reference information, determine a context, and perform entropy decoding according to the context to determine the first Instructions.
- an encoder for image processing comprising: a bus; a processor coupled to the bus; a memory coupled to the bus; wherein the processor calls the memory through the bus a program stored in the method for determining, when the motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is empty, according to the size of the target image block, the target image block Decoding a size of each target image sub-block and second indication information indicating a position of the first target image sub-block in the target image block, determining a second target image sub-block; for using the second target image
- the motion information of the sub-block determines first reference information for encoding the first target image sub-block, wherein the first base layer image sub-block is an image block located in the base layer image, where the target image block is located In the enhancement layer image, the base layer image corresponds to the enhancement layer image, and the spatial position of the first basic image block sub-block in the base layer image and the The first target image sub
- Idx 2 + idx, %N/(N/2))x2 + (l- Idx l %N /(N / 4)%2)) ⁇ N /4 ; Idx 2 + ((l - ldx x %N/(N/2))x2 + (ldx x %N / (N / 4) %2)) xN/4; W3 ⁇ 4 / ⁇ /NxN + ((l-/ x 1 N/(N/2))x2 + (l-/ ⁇ N/(N/4) 2))xN/4; wherein, the representation is used to indicate that the second target image sub-block is in the target image block
- the third indication information of the location, / represents the second indication information, and N is determined according to the size of the target image block and the size of the target image sub-block.
- the processor is specifically configured to: if the motion information of the second target image sub-block is empty, determine the first reference information Zero motion information.
- the processor is specifically configured to: according to the first reference information, the first target image The sub-block performs motion compensation processing.
- the processor is specifically configured to locate the target image The pixels near the boundary between the sub-blocks are subjected to deblocking filtering processing.
- the processor Specifically, the first indication information is entropy encoded such that the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the processor is specifically configured to: according to whether the reference image block located in the preset position in the enhancement layer image is encoded by using reference information, determine a context; and perform entropy coding on the first indication information according to the context. .
- a decoder for image processing comprising: a bus; a processor coupled to the bus; a memory coupled to the bus; wherein the processor calls the memory through the bus a program stored in the target code stream for obtaining first indication information; for when motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is empty And based on the first indication information, according to the size of the target image block, the target Determining, by the image block, a size of each target image sub-block and a second indication information indicating a position of the first target image sub-block in the target image block, determining a second target image sub-block; Moving information of the target image sub-block, determining first reference information for decoding the first target image sub-block, wherein the first base layer image sub-block is an image block located in the base layer image, the target image The block is located in the enhancement layer image, the base layer image corresponds to the enhancement layer image, and the spatial position of the first
- the processor is specifically configured to determine the second target image sub-block according to any one of the following formulas,
- Idx 2 + ⁇ idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2)) ⁇ N /4 ; Idx 2 + ((l - ldx x %N/(N/2))x2 + (ldx x %N / (N / 4) %2)) xN/4; W3 ⁇ 4 / ⁇ /NxN + ((l-/ 1 %N/(N/2))x2 + (l-/ ⁇ %N/(N/4)%2))xN/4; wherein, the representation is used to indicate that the second target image sub-block is in the target image block
- the third indication information of the position in the middle indicates that the second indication information is determined according to the size of the target image block and the size of the target image sub-block.
- the processor is specifically configured to determine the first reference information if the motion information of the second target image sub-block is empty Zero motion information.
- the processor is specifically configured to: according to the first reference information, the first target image The sub-block performs motion compensation processing.
- the processor is specifically configured to locate the target image The pixels near the boundary between the sub-blocks are subjected to deblocking filtering processing.
- the processor Specifically, the first indication information is obtained from the target code stream, where the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the processor is specifically configured to determine, according to whether the reference image block located in the preset position in the enhancement layer image is used by using reference information, to determine a context, and perform entropy decoding according to the context to determine The first indication information.
- a method for image processing comprising: when determining that motion information of a first base layer image sub-block corresponding to a first target image sub-block of a target image block is empty, according to a reconstructed pixel of the first base layer image sub-block, determining second reference information for encoding the first target image sub-block, wherein the first base layer image sub-block is an image block located in the base layer image And the target image block is located in the enhancement layer image, the base layer image corresponds to the enhancement layer image, and the spatial position of the first basic image block sub-block in the base layer image and the first target image sub-block Corresponding to a spatial position in the enhancement layer image; encoding the target image block to generate a target code stream and fourth indication information included in the target code stream.
- the encoding the target image block comprises: performing deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the encoding the target image block includes: entropy encoding the fourth indication information, so that the fourth indication information Adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target bitstream.
- the encoding the target image block includes: performing, according to whether the reference image block located at the preset position in the enhancement layer image uses reference information Encoding, determining a context; according to the context, the fourth indication information is entropy encoded.
- a method for image processing comprising: acquiring fourth indication information from a target code stream; determining a first basic corresponding to a first target image sub-block of the target image block When the motion information of the layer image sub-block is empty, based on the fourth indication information, determining second reference information for encoding the first target image sub-block according to the reconstructed pixel of the first base layer image sub-block,
- the first base layer image sub-block is an image block located in the base layer image
- the target image block is located in the enhancement layer image
- the base layer image corresponds to the enhancement layer image
- the first basic image block is The spatial position of the sub-block in the base layer image corresponds to the spatial position of the first target image sub-block in the enhancement layer image
- the target code stream is decoded to obtain the target image block.
- the decoding of the target code stream includes: The pixels near the boundary between the target image sub-blocks perform deblocking filtering processing.
- the obtaining, by the target code stream, the fourth indication information including: obtaining the fourth indication information from the target code stream,
- the fourth indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the obtaining, by the target code stream, the fourth indication information including: according to the enhancement layer Whether the reference image block located in the preset position in the image is decoded using the reference information to determine a context; according to the context, entropy decoding is performed to determine the fourth indication information.
- an apparatus for image processing comprising: an acquisition unit, configured to determine motion information of a first base layer image sub-block corresponding to a first target image sub-block of a target image block When the space is empty, determining, according to the reconstructed pixels of the first base layer image sub-block, second reference information for encoding the first target image sub-block, where the first base layer image sub-block is located at the base layer An image block in the image, the target image block being located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and a spatial position of the first basic image block sub-block in the base layer image and the first A target image sub-block corresponds to a spatial position in the enhancement layer image; a coding unit is configured to encode the target image block to generate a target code stream and fourth indication information included in the target code stream.
- the coding unit is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the coding unit is specifically configured to entropy encode the fourth indication information, so that the fourth indication information is in the target code
- the stream is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information.
- the coding unit is specifically configured to use the reference image located in the preset position in the enhancement layer image. Whether the block is encoded using reference information, determining a context; and for entropy encoding the fourth indication information according to the context.
- an apparatus for image processing comprising: a decoding unit, configured to acquire fourth indication information from a target code stream; and an acquiring unit, configured to determine a first target image with a target image block
- a decoding unit configured to acquire fourth indication information from a target code stream
- an acquiring unit configured to determine a first target image with a target image block
- the motion information of the first base layer image sub-block corresponding to the sub-block is empty, based on the fourth indication information acquired by the decoding unit, according to the reconstructed pixel of the first base layer image sub-block, a second reference information for encoding the first target image sub-block, wherein the first base layer image sub-block is an image block located in the base layer image, the target image block being located in the enhancement layer image, a base layer image corresponding to the enhancement layer image, and a spatial position of the first base image block sub-block in the base layer image corresponds to a spatial position of the first target image sub-block in the enhancement layer image;
- the coding unit is further configured
- the decoding unit is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the decoding unit is specifically configured to obtain fourth indication information from the target code stream, where the fourth indication information is The target code stream is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information.
- the decoding unit is specifically configured to use the reference image located in the preset position in the enhancement layer image. Whether the block is decoded using reference information, determining a context; and performing entropy decoding according to the context to determine the fourth indication information.
- an encoder for image processing comprising: a bus; a processor coupled to the bus; a memory coupled to the bus; wherein the processor calls the bus through the bus a program stored in the memory for reconstructing the motion of the first base layer image sub-block according to the first base layer image sub-block corresponding to the first target image sub-block of the target image block a second reference information for encoding the first target image sub-block, wherein the first base layer image sub-block is an image block located in a base layer image, the target image block being located in the enhancement layer image Corresponding to the enhancement layer image, and the spatial position of the first basic image block sub-block in the base layer image and the spatial position of the first target image sub-block in the enhancement layer image Corresponding; encoding the target image block to generate a target code stream and fourth indication information included in the target code stream.
- the processor specifically performs deblocking filtering on pixels located near a boundary between the target image sub-blocks.
- the processor is specifically configured to entropy encode the fourth indication information, so that the fourth indication information is at the target The code stream is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information.
- the processor is specifically configured to use the reference located in the preset position in the enhancement layer image. Whether the image block is encoded using the reference information, determining a context; and for entropy encoding the fourth indication information according to the context.
- a decoder for image processing comprising: a bus; a processor connected to the bus; a memory connected to the bus; wherein the processor calls the bus through the bus a program stored in the memory for acquiring fourth indication information from the target code stream; for determining that motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is Empty space, based on the fourth indication information, determining second reference information for encoding the first target image sub-block according to the reconstructed pixel of the first base layer image sub-block, wherein the first base layer image The sub-block is an image block located in the base layer image, the target image block is located in the enhancement layer image, the base layer image corresponds to the enhancement layer image, and the first basic image block sub-block is in the base layer image a spatial position corresponding to a spatial position of the first target image sub-block in the enhancement layer image; configured to decode the target code stream to obtain the target image
- the processor is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the processor is specifically configured to obtain fourth indication information from the target code stream, where the fourth indication information is The target bitstream is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information.
- the processor is specifically configured to determine, according to whether the reference image block located at the preset position in the enhancement layer image is decoded by using reference information, to determine a context according to the context, to determine the first Four instructions.
- a method and apparatus for image processing according to an embodiment of the present invention for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the Position of a target image sub-block determines a second target image sub-block, and according to motion information of the second target image sub-block or first base layer image sub-block corresponding to the first target image sub-block in spatial position Reconstructing a pixel, determining reference information for the first target image sub-block, and encoding according to the reference information, can improve coding performance of the first target image sub-block.
- 1 is a schematic flow chart of a method for image processing according to an embodiment of the present invention.
- 2 is a schematic diagram of sub-block partitioning and sub-block indexing according to an embodiment of the invention.
- FIG. 3 is a schematic flow chart of a method for image processing in accordance with another embodiment of the present invention.
- 4 is a schematic block diagram of an apparatus for image processing in accordance with an embodiment of the present invention.
- FIG. 5 is a schematic block diagram of an apparatus for image processing according to another embodiment of the present invention.
- 6 is a schematic block diagram of an encoder for image processing in accordance with an embodiment of the present invention.
- FIG. 7 is a schematic block diagram of a decoder for image processing according to another embodiment of the present invention.
- 8 is a schematic flowchart of a method for image processing according to still another embodiment of the present invention.
- FIG. 9 is a schematic flowchart of a method for image processing according to still another embodiment of the present invention.
- 11 is a schematic block diagram of an apparatus for image processing according to still another embodiment of the present invention.
- Figure 12 is a schematic block diagram of an encoder for image processing in accordance with still another embodiment of the present invention.
- Figure 13 is a schematic block diagram of a decoder for image processing in accordance with still another embodiment of the present invention. detailed description
- Fig. 1 shows a schematic flow chart of a method 100 for image processing according to an embodiment of the present invention, which is described from the perspective of an encoding end. As shown in FIG. 1, the method 100 includes:
- S120 Determine, according to the motion information of the second target image sub-block, the first target image. a first reference information encoded by a sub-block, wherein the first base layer image sub-block is an image block located in a base layer image, the target image block being located in an enhancement layer image, the base layer image and the enhancement layer Corresponding to the image, and a spatial position of the first basic image block sub-block in the base layer image corresponds to a spatial position of the first target image sub-block in the enhancement layer image;
- the image when the image is hierarchically encoded, for example, in spatial scalable coding, the image may be subjected to resolution processing to obtain a low-resolution image, and the original image is referred to as a high-resolution image as a contrast, respectively.
- the low resolution image and the high resolution image are encoded.
- a high quality image to be encoded is referred to herein as an enhancement layer image
- a corresponding low quality image to be encoded e.g., the low resolution image
- a base layer image a corresponding low quality image to be encoded
- the target image is an image processed by a layered coding technique
- the basic layer refers to a quality in layered coding (including frame rate, spatial resolution, temporal resolution, signal to noise ratio intensity or quality level).
- the enhancement layer refers to the layer with higher quality (including frame rate, spatial resolution, temporal resolution, signal-to-noise ratio intensity or quality level) in the layered coding.
- the corresponding base layer may be any layer lower in quality than the enhancement layer, for example, if currently There are five layers, and the coding quality is sequentially improved (that is, the first layer has the lowest quality and the fifth layer has the highest quality).
- the enhancement layer is the fourth layer
- the base layer may be the first layer or the second layer. It is the third layer or the fourth layer.
- the corresponding enhancement layer can be any layer of lower quality than the base layer.
- the enhancement layer image is the image in the currently processed enhancement layer
- the base layer image is the image in the base layer at the same time as the enhancement layer image.
- the quality of the base layer image is lower than the quality of the enhancement layer image.
- the target image block is the image block being processed in the enhancement layer image.
- the base layer image block is an image block in the base layer image that has a corresponding relationship with the target image block in spatial position.
- the correspondence between the image block in the base layer and the image block in the enhancement layer may be calculated according to the resolution proportional relationship between the base layer image and the enhancement layer image. For example, in a system including the X direction and the y direction, if the enhancement layer image is resolved in the X direction and the y direction The rate is 2 times of the image of the layer, and the image block with the pixel coordinates of the upper left corner of the enhancement layer is (2x, 2y) and the size is (2m) X (2n), and the corresponding block in the base layer image may be the upper left.
- the sub-blocks described later refer to sub-blocks of the target image block (image blocks in the enhancement layer), and the corresponding sub-blocks described later refer to the image blocks corresponding to the sub-blocks in the base layer.
- the motion information may include one or more of a prediction direction, a reference image index, or a motion vector, where the prediction direction may be divided into one-way and two-way prediction, and the one-way prediction may be further divided into forward prediction.
- forward prediction refers to the use of a forward reference picture list, ie, a reference picture in list 0 to generate a prediction signal
- backward prediction refers to the use of a backward reference picture list, ie, a reference picture in list 1 to generate a prediction.
- Bidirectional prediction refers to the use of reference pictures in list 0 and list 1 to generate prediction signals; for unidirectional prediction, a reference picture index is required to indicate the reference picture selected in list 0 or listl.
- each motion vector includes a horizontal direction component X and a vertical direction component y, which can be recorded as (X, y), for unidirectional prediction,
- a motion vector indicates the displacement of the prediction signal in the selected list 0 or list 1 reference image, for bidirectional prediction,
- listO list 1 reference picture and the reference picture respectively indicate the front and the rear to the prediction signal to the prediction signal in the selected displacement.
- the target image block may be configured by at least two sub-blocks (ie, target image sub-blocks), wherein the size of the sub-block may be determined according to a preset value.
- the sub-block size is 4x4 as an example. For example, if the size of the target image block is 16x 16, it can be determined that the target image block includes 16 sub-blocks (size 4x4). Therefore, in the embodiment of the present invention, a corresponding sub-block of each sub-block in the target image block (belonging to the corresponding image block) may be determined, and motion information of the corresponding sub-block is determined.
- the coordinates of the corresponding position of the pixel in the base layer image may be determined according to the coordinates of a certain pixel point in the sub-block (denoted as: u ⁇ E x , E y ) n ) : u(B x , B y y ), and the image block in the base layer containing the corresponding position coordinates is used as the corresponding child, and can be calculated according to the following formulas 1 and 2: ( ⁇ , ⁇ ):
- S is an accuracy control factor (for example, in the embodiment of the present invention, it can be set to 16), and D r can be calculated according to the following formula 5, and D y is calculated according to the following formula 6
- ScaledBaseHeight where ⁇ represents the width of the base layer image, BiweH gfe represents the height of the base layer image, ScaledBaseWidth represents the width of the enhancement layer image, and ScaledBaseHeight represents the height of the enhancement layer image.
- the corresponding sub-block can be determined, and in the case where the corresponding sub-block includes motion information, the prediction direction and the reference image index in the motion information can be directly used as the sub-block (first target image sub-block) Prediction direction and reference image index.
- the motion vector of the corresponding sub-block can be according to the following Equations 7 to 10 Scaling is performed, and the scaled motion vector is taken as the motion vector (EMV x , EMV ⁇ ) of the sub-block (first target image sub-block).
- EMV x (BMV x x ScaledBaseWidth + R BW ) / BaseWidth ( 7 )
- EMV y (BMV y x ScaledBaseHeight + R BH ) I BaseHeight ( 8 )
- R BH sgn(BMV y ) * BaseHeight 12 ( 10)
- the motion information of the corresponding sub-block can be directly used as the motion information of the sub-block.
- motion information of the corresponding sub-block may be
- the method further includes: And determining, according to the encoding mode of the base layer image, whether the first base layer image sub-block corresponding to the first target image sub-block includes motion information.
- whether the corresponding sub-block includes motion information may be determined according to an encoding mode of the base layer image (corresponding image block). For example, if the base layer image uses the intra prediction coding mode, it may be determined that the corresponding sub-block does not contain motion information (i.e., the motion information of the first basic layer image sub-block is empty).
- the corresponding sub-block when the corresponding sub-block includes motion information, the corresponding sub-block may be determined according to the process as described above and its motion information may be acquired. When the corresponding sub-block does not include motion information, the above process may be skipped.
- the second target image sub-block may be determined by the following method 1, and S120, according to the The motion information of the two target image sub-blocks acquires the first reference information.
- the target image sub-block may be filled with motion information so that the filled motion information can be used as reference information.
- the index allocation method of the sub-block may be the same as the prior art.
- the description thereof is omitted, and the division and indexing of the sub-blocks are shown in FIG.
- the processing level may be determined according to the size of the target image block and the size of the sub-block, and the processing layer is recursively layer by layer according to the processing level.
- each processing unit (referred to as the first processing unit) in the lowest level hierarchy (referred to as the first layer) may be defined to include four sub-blocks, the previous layer of the first layer.
- Each processing unit (referred to as the second layer) (denoted as the second layer) includes four first processing units, and so on, in order to avoid redundancy, the recursive description is omitted.
- two levels may be included.
- sub-block 0 ⁇ sub-block 3 constitute the first processing unit
- sub-block 4 ⁇ sub The block 7 constitutes the first processing unit 1
- the sub-block 8 ⁇ sub-block 11 constitutes the first processing unit 2
- the sub-block 12 ⁇ sub-block 15 constitutes the first processing unit 3.
- the first processing unit 0 to the first processing unit 3 constitute the second processing unit 0. It should be understood that the above-described hierarchical division method is merely illustrative, and the present invention is not limited thereto.
- the index number of the sub-block may be used for each first processing unit. (for example, from small to large) sequentially determining whether the motion information of each sub-block is empty, and if the motion information of the sub-block is empty, it may be based on the sub-block adjacent to the first processing unit (second target image sub-).
- the motion information of an example of the block determines its motion information. For example, if the motion information of the sub-block with index 0 (ie, sub-block 0, belonging to the first processing unit 0) is empty, motion information of other sub-blocks belonging to the same processing unit (first processing unit 0) may be acquired. And use the motion information as the motion information of the sub-block 0.
- the obtaining order may be, for example, first obtaining motion information of a sub-block with an index of 1 (sub-block 1, that is, an example of a second target image sub-block, adjacent to sub-block 0 in the horizontal direction), if sub-block 1 If the motion information is empty, the motion information of the sub-block whose index is 2 (sub-block 2, that is, another example of the second target image sub-block, adjacent to the sub-block 0 in the vertical direction) may be acquired again. If the motion information of the sub-block 2 is empty, then the sub-block with the index of 3 (sub-block 3, that is, another example of the second target image sub-block, adjacent to the sub-block 0 in the diagonal direction) may be acquired. Sports information.
- the motion information can be filled by the above method.
- the method for filling the motion information of the sub-blocks whose motion information is empty is only an exemplary description, and the present invention is not limited thereto.
- the vertical direction may also be obtained first.
- the motion information of the sub-block (here, the adjacent sub-block), and the motion information of the specified sub-block (here, the adjacent sub-block) in the horizontal direction is acquired, and the specified sub-block in the diagonal direction is acquired (here , for adjacent sub-blocks) motion information. That is, the order of acquisition can be arbitrarily changed.
- the motion information filled for the sub-block can be directly used. That is, the motion information of the second target image sub-block may refer to the motion information of the base layer corresponding sub-block of the second target image sub-block, or may be the method of filling the motion information according to the embodiment of the present invention. Image sub-block-filled motion information (from other enhancement layer sub-blocks).
- the first processing unit may be in the same processing unit as the sub-block 0 from the first layer (for example, the first processing unit 0)
- Other sub-blocks eg, sub-block 1 - sub-block 3 acquire motion information.
- the sub-block for example, sub-block 0
- the specified sub-block in the first layer for example, sub-block 1 ⁇ sub-block 3
- the motion information is empty, you can get Taking motion information of a predetermined sub-block (another example of the second target image sub-block) in the predetermined first processing unit (for example, the first processing unit 1 to the first processing unit 3) in the second processing unit, and taking the motion
- the information is the motion information of the sub-block (for example, sub-block 0).
- first processing unit 0 if the corresponding sub-blocks of all the sub-blocks in one first processing unit (for example, the first processing unit 0) are all empty, other first processing units in the second processing unit may be acquired (for example, the first processing).
- the motion information of the predetermined sub-block in the first to third processing units 3 for convenience of explanation, the sub-block in the upper left corner of each first processing unit is described as an example, and the motion information is used as the first Motion information of each sub-block within a processing unit (first processing unit 0).
- the order of obtaining may be, for example, first obtaining a sub-block of the upper left corner of the first processing unit (the first processing unit 1 adjacent to the first processing unit 0 in the horizontal direction) having an index of 1 (sub-block 4, ie
- the motion information of the second target image sub-block is empty. If the motion information of the sub-block 4 is empty, the motion information of the other sub-blocks in the first processing unit 1 is also considered to be empty, so that the index can be re-acquired.
- a sub-block of the upper left corner of the first processing unit (first processing unit 2 adjacent to the first processing unit 0 in the vertical direction) of 2 (subblock 8, that is, another example of the second target image sub-block)
- the motion information of the sub-block 8 is considered to be empty if the motion information of the sub-block 8 is empty, so that the motion information of the other sub-blocks in the first processing unit 2 is also empty, so that the first processing unit with the index of 3 can be reacquired (first The processing unit 3, which is adjacent to the first processing unit 0 in the diagonal direction, has motion information of the sub-block in the upper left corner (sub-block 12, that is, another example of the second target image sub-block).
- the motion information can be filled by the above method.
- the method for filling the motion information of the sub-blocks whose motion information is empty is only an exemplary description, and the present invention is not limited thereto.
- the vertical direction may also be obtained first. Obtaining motion information of a predetermined sub-block of the first processing unit (here, adjacent to the first processing unit), and acquiring a predetermined sub-block of a predetermined first processing unit (here, an adjacent first processing unit) in the horizontal direction The motion information further acquires motion information of a prescribed sub-block of the first processing unit (here, the adjacent first processing unit) in the diagonal direction.
- predetermined sub-block is not limited to the sub-block in the upper left corner of the first processing unit, and may be a sub-block at an arbitrary position in the same first processing unit.
- the target image block enumerated above is 16 x 16 and the size of the sub-block is 4 x 4, the target image block includes only two layers, and the above recursive process ends.
- the size of the target image block is larger, for example, 32 x 32, and the size of the sub-block is 4 x 4, then the target image block includes three layers, and the recursive operation can be continued in the same manner as described above.
- Image block All sub-blocks get motion information.
- the second target image sub-block includes:
- Idx 2 + ⁇ idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2)) ⁇ N /4 ; Idx 2 + ((l - ldx x %N/(N/2))x2 + ⁇ ldx x %N / (N / 4) %2)) xN/4; W3 ⁇ 4 / ⁇ /NxN + ((l-/ x 1 N/(N/2))x2 + (l-/ ⁇ N/(N/4) 2))xN/4; wherein, the representation is used to indicate that the second target image sub-block is in the target image block
- the third indication information of the location, / ⁇ indicates the second indication information, and N is determined according to the size of the target image block and the size of the target image sub-block.
- the third index information indicating the position of the second target image sub-block in the target image block is indicated, / ⁇ indicates the second index information, % indicates a modulo operation or a remainder operation, and N indicates the target image The number of sub-blocks included in the block.
- the second target image sub-block within the currently processed hierarchy may be determined according to the index of the sub-block currently being processed, where ⁇ corresponds to the layer currently being processed, and ⁇ is according to the target
- the size of the image block and the size of the sub-block are determined. For example, if the size of the target image block is 16x 16, and the size of the sub-block is 4x4, the target image block includes two layers as described above, and when processing the first layer, The number of sub-blocks included in each processing unit (first processing unit) in the layer, here is 4. When processing the second layer, ⁇ is the number of sub-blocks included in each processing unit (second processing unit) in the layer, here 16.
- determining the first reference information of the first target image sub-block according to the motion information of the second target image sub-block includes:
- the motion information of the second target image sub-block is empty, it is determined that the first reference information is zero motion information.
- zero motion information is used as the motion information of the sub-block.
- zero motion information can be constructed in the following manner. For example, in predictive coded image frames (P frames), the predicted side of zero motion information For unidirectional prediction, the reference image index is 0, motion vector (0, 0). In the bidirectionally predictive coded image frame (B frame), the prediction direction of the zero motion information is bidirectional prediction, both reference image indices are 0, and both motion vectors are (0, 0).
- the foregoing method of using the zero motion information as the motion information of the sub-block may be performed after processing the last layer, or may be performed on any other layer.
- the treatment is carried out, and the present invention is not particularly limited.
- the method for obtaining the motion information of the sub-blocks listed above is only an exemplary description of the present invention, and the present invention is not limited thereto.
- the coding mode of the layer image determines whether the corresponding sub-block contains motion information.
- the base layer image uses the intra prediction coding mode, it may be determined that the corresponding sub-block does not contain motion information (i.e., the motion information of the first base layer image sub-block is empty). If it is determined that only one of the sub-blocks of the target image block (specifically, its corresponding sub-block) has motion information, the motion information of the sub-block may be used as motion information of the other sub-blocks.
- the first reference information of the first target image sub-block can be determined.
- the first reference information of the first target image block (the corresponding sub-block in the base layer does not include motion information) is acquired by the above method 1.
- the encoding the target image block includes:
- the first target image sub-block may be encoded (specifically, motion compensation processing) based on reference information (specifically, motion information) of the first target image sub-block.
- independent motion compensation processing may be performed on the first target image sub-block according to the motion information acquired or filled for the first target image sub-block as described above.
- the motion information of the third target image block (the corresponding sub-block in the base layer includes motion information) may be acquired, and the method for acquiring the motion information of the third target image block may be the same as the prior art. The description thereof is omitted here.
- the target image block after performing motion compensation processing on all the sub-blocks of the target image block, after acquiring the prediction signal of the target image block, the target image block can be predictively encoded, thereby calculating the rate distortion cost.
- an indication identifier (first indication information) can be determined to indicate the decoding end, and the first target image block is obtained by the above method 1 and method 2.
- the encoding, according to the reference information, the first target image sub-block comprising: entropy encoding the first indication information, so that the first indication information is in the target code stream and the skip mode
- the flag bit or the merged MERGE mode flag bit information is adjacent.
- the first indication information may be configured at a position adjacent to the skip mode flag bit information.
- the first indication information may be placed as the first information of the target image block in the target code stream before the skip mode flag bit information, and the first indication information may be placed as the target after the skip mode flag bit information.
- the first indication information can be placed adjacent to the MERGE mode flag bit information.
- the first indication information may be placed before the MERGE mode flag bit information, and the first indication information may be placed after the MERGE mode flag bit information.
- the MERGE may be the same mode as the prior art, and the determination method and the configuration position may be the same as the prior art.
- the description thereof is omitted.
- the first indication information may be a binary flag bit. Therefore, when the first indication information is entropy encoded, it is not necessary to perform binarization processing on the first indication information.
- the context used for entropy encoding the first indication information of the binarization may be selected, and optionally, encoding the first target image sub-block according to the reference information, including: according to the enhancement Whether the reference image block located in the preset position in the layer image is encoded using the reference information to determine the context;
- the first indication information is entropy encoded.
- the context can contain three contexts of 0, 1, and 2. This embodiment determines which context to use based on whether the left and upper image blocks use the base layer mode. In this embodiment, for example, depending on whether the image blocks on the left and the top of the target image block use their respective first indication information, which context is used, for example, if the image blocks on the left and above the target image block are not Using the first indication information, then selecting a context model with an index of 0. If the image block on the left and top of the target image block has a first indication information, then select a context model with an index of 1 if the target image block is left and above. The image block uses the first indication information, then the context with the index of 2 is selected. Table 1 0 1 2 Intra coded slice is undefined (or unused) CNU CNU
- the first indication information can be binary arithmetic coded according to the context selected as described above, and the used context model is updated.
- the process may be the same as the prior art, and the description thereof is omitted here to avoid redundancy.
- each of the first target image sub-blocks may be encoded according to the obtained reference information, thereby completing encoding of the target image block, and generating the information of the target image block and the entropy-encoded information.
- the first indication information is added to the code stream (target stream).
- the encoded target image including the base layer image and the enhancement layer image
- the processing procedure may be the same as the prior art, where , the description is omitted.
- the target image information may be acquired from the code stream, and the target image (specifically, the target image block) is determined, and the obtained first indication information (entropy-encoded information) is entropy solved or similar. The description thereof is omitted here.
- a binary symbol string (bin string) representing the first indication information may be parsed from the code stream according to the selected context.
- the binary arithmetic decoding corresponds to binary arithmetic coding at the encoding end.
- the decoding end needs to obtain the first reference information of the first target image sub-block by using the same method as the encoding end, and the decoding end needs to use The first reference information of the first target image sub-block is acquired in the same manner as the encoding end.
- the method of indicating the first indication information listed above is merely illustrative, and the present invention is not limited thereto. It should be noted that, in the embodiment of the present invention, when the reference information of the first target image sub-block is acquired by using the method 1, the reference information (specifically, the motion information) of the first target image sub-block may be used.
- the first target image sub-block is decoded (specifically, motion compensation processing). Specifically, independent motion compensation processing may be performed on the first target image sub-block according to the motion information filled in the first target image sub-block as described above.
- the encoding the target image block includes:
- Deblocking filtering processing is performed on pixels located near the boundary between the target image sub-blocks. Specifically, it is also possible to perform filtering processing on pixels in the vicinity of the boundary between the sub-blocks of the target image block.
- a method for image processing according to an embodiment of the present invention for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the first target image Positioning the sub-block determines a second target image sub-block, and determining first reference information for the first target image sub-block according to the motion information of the second target image sub-block, and encoding according to the first reference information, The coding performance of the first target image sub-block can be improved.
- Fig. 3 shows a schematic flow chart of a method 200 for image processing according to an embodiment of the present invention, which is described from the perspective of a decoding end. As shown in FIG. 2, the method 200 includes:
- S230 Determine first reference information used to decode the first target image sub-block according to the motion information of the second target image sub-block, where the first base layer image sub-block is located in the base layer image.
- the sub-block corresponds to a spatial position in the enhancement layer image;
- the decoding end may acquire the target image information from the code stream, and determine the target image (specifically, the target image block), and acquire the first indication information (entropy-encoded information).
- the obtaining the first indication information from the target code stream includes:
- the first indication information is obtained from the target code stream, where the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the first indication information may be configured at a position adjacent to the skip mode flag bit information.
- the first indication information may be placed as the first information of the target image block in the target code stream before the skip mode flag bit information, and the first indication information may be placed as the target after the skip mode flag bit information.
- the first indication information can be placed adjacent to the MERGE mode flag bit information.
- the first indication information may be placed before the MERGE mode flag bit information, and the first indication information may be placed after the MERGE mode flag bit information.
- the MERGE may be the same as the prior art, and the determination method and the configuration position may be the same as those in the prior art. Here, in order to avoid redundancy, the description thereof is omitted.
- the decoding end may perform entropy decoding on the obtained first indication information.
- the first indication information may be a binary flag bit. Therefore, when entropy decoding the first indication information, it is not necessary to binarize the first indication information.
- the upper and lower texts used for entropy encoding the first indication information of the binarization may be selected, and optionally, the first indication information is obtained from the target code stream, including:
- entropy decoding is performed to determine the first indication information.
- the context can contain three contexts of 0, 1, and 2.
- This embodiment determines which context to use based on whether the left and upper image blocks use the base layer mode. In this embodiment, for example, depending on whether the image blocks on the left and the top of the target image block use their respective first indication information, which context is used, for example, if the image blocks on the left and above the target image block are not Using the first indication information, then selecting a context model with an index of 0. If the image block on the left and top of the target image block has a first indication information, then select a context model with an index of 1 if the target image block is left and above. The image block uses the first indication information, then the context with the index of 2 is selected.
- the first indication information can be binary arithmetically decoded according to the context selected as above, and the used context model is updated.
- the process may be the same as the prior art, and the description thereof is omitted here to avoid redundancy.
- the decoding end needs to obtain the first reference information of the first target image sub-block by using the same method as the encoding end, and the decoding end needs to use The first reference information of the first target image sub-block is acquired in the same manner as the encoding end.
- the decoding end may determine, according to the first indication information, whether the first reference information of the first target image sub-block needs to be acquired, and the following is a description of the case where the encoding end needs to acquire the first reference information of the first target image sub-block. .
- the image can be processed to obtain a low resolution image, and the original image is referred to as a high resolution image as a contrast, and the encoder separately determines the low resolution.
- the rate image and the high resolution image are encoded.
- a high quality image to be encoded is referred to herein as an enhancement layer image
- a corresponding low quality image to be encoded is referred to as a base layer image.
- the target image is an image processed by a layered coding technique
- the basic layer refers to a quality in layered coding (including frame rate, spatial resolution, temporal resolution, signal to noise ratio intensity or quality level).
- the enhancement layer refers to the layer with higher quality (including frame rate, spatial resolution, temporal resolution, signal-to-noise ratio intensity or quality level) in the layered coding.
- the corresponding base layer may be any layer lower in quality than the enhancement layer, for example, if currently There are five layers, and the coding quality is sequentially improved (that is, the first layer has the lowest quality and the fifth layer has the highest quality).
- the enhancement layer is the fourth layer
- the base layer may be the first layer or the second layer. It is the third layer or the fourth layer.
- the corresponding enhancement layer can be any layer of lower quality than the base layer.
- the enhancement layer image is the image in the currently processed enhancement layer
- the base layer image is the image in the base layer at the same time as the enhancement layer image.
- the quality of the base layer image is lower than the quality of the enhancement layer image.
- the target image block is the image block being processed in the enhancement layer image.
- the base layer image block is an image block in the base layer image that has a corresponding relationship with the target image block in spatial position.
- the correspondence between the image block in the base layer and the image block in the enhancement layer can be calculated according to the resolution proportional relationship between the base layer image and the enhancement layer image. For example, in a system including an X direction and a y direction, if the resolution of the enhancement layer image in the X direction and the y direction is twice that of the original layer image, the pixel coordinates of the upper left corner in the enhancement layer are (2x, 2y). And an image block of size (2m ) X ( 2n ), the corresponding block in the base layer image may be an image block whose pixel coordinates are (X , y ) and whose size is mxn in the upper left corner.
- the sub-blocks described later refer to sub-blocks of the target image block (image blocks in the enhancement layer), and the corresponding sub-blocks described later refer to the image blocks corresponding to the sub-blocks in the base layer.
- the motion information may include one or more of a prediction direction, a reference image index, or a motion vector, where the prediction direction may be divided into one-way and two-way prediction, and the one-way prediction may be further divided into forward prediction.
- forward prediction refers to the use of a forward reference picture list, ie, a reference picture in list 0 to generate a prediction signal
- backward prediction refers to using a backward reference picture list, ie, a reference picture in list 1 to generate a prediction.
- Bidirectional prediction refers to the use of reference pictures in list 0 and list 1 to generate prediction signals; for unidirectional prediction, a reference picture index is required to indicate the reference picture selected in list 0 or list l.
- each motion vector includes a horizontal direction component X and a vertical direction component y, which can be written as (X, y), for one-way prediction, Requires a motion vector to indicate the displacement of the predicted signal in the selected list 0 or list 1 reference image, for bidirectional prediction
- Two motion vectors are required to indicate the displacement of the forward prediction signal and the backward prediction signal in the selected list O reference image and the list 1 reference image, respectively.
- the target image block may be configured by at least two sub-blocks (ie, target image sub-blocks), wherein the size of the sub-block may be determined according to a preset value.
- the sub-block size is 4 x 4 as an example. For example, if the size of the target image block is 16 16, it can be determined that the target image block includes 16 sub-blocks (size 4 x 4). Therefore, in the embodiment of the present invention, a corresponding sub-block (a first base layer image sub-block) in each of the target image blocks (the first target image sub-block) in the base layer may be determined, and the Corresponding to the motion information of the sub-block.
- a first base layer image sub-block corresponding to the first target image sub-block may be determined, and in a case where the first base layer image sub-block includes motion information, prediction in the motion information may be directly used
- the direction and reference image index are used as the prediction direction of the sub-block (first target image sub-block) and the reference image index.
- the motion vector ( ⁇ , ⁇ ) of the first base layer image sub-block may be scaled according to the following Equations 7 to 10, and the scaled motion vector is used as the sub-block (first target image sub-block) Motion vector (EMV x , EMV y ).
- the motion information of the corresponding sub-block can be directly used as the motion information of the sub-block.
- motion information of the corresponding sub-block may be
- the method further includes:
- the first base layer image sub-block corresponding to the first target image sub-block includes motion information.
- whether the corresponding sub-block includes motion information may be determined according to an encoding mode of the base layer image (corresponding image block). For example, if the base layer image uses the intra prediction coding mode, it may be determined that the corresponding sub-block does not contain motion information (i.e., the motion information of the first basic layer image sub-block is empty).
- the corresponding sub-block when the corresponding sub-block includes motion information, the corresponding sub-block may be determined according to the above process and its motion information is obtained. When the corresponding sub-block does not include motion information, the above procedure may be skipped.
- the second target image sub-block may be determined by the following method 2, and S230, according to the The motion information of the two target image sub-blocks acquires the first reference information.
- the target image sub-block may be filled with motion information, so that the filled motion information can be used For reference information.
- the index allocation method of the sub-block may be the same as the prior art.
- the description thereof is omitted, and the division and indexing of the sub-blocks are shown in FIG.
- the processing level may be determined according to the size of the target image block and the size of the sub-block, and the processing layer is recursively layer by layer according to the processing level.
- each processing unit (referred to as the first processing unit) in the lowest level hierarchy (referred to as the first layer) may be defined to include four sub-blocks, the previous layer of the first layer.
- Each processing unit (referred to as the second layer) (denoted as the second layer) includes four first processing units, and so on, in order to avoid redundancy, the recursive description is omitted.
- two levels may be included.
- sub-block 0 ⁇ sub-block 3 constitute the first processing unit 0
- the block 7 constitutes the first processing unit 1
- the sub-block 8 ⁇ sub-block 11 constitutes the first processing unit 2
- the sub-block 12 ⁇ sub-block 15 constitutes the first processing unit 3.
- the first processing unit 0 to the first processing unit 3 constitute the second processing unit 0. It should be understood that the above-described hierarchical division method is merely illustrative, and the present invention is not limited thereto.
- the motion information of each sub-block is empty according to the index number of the sub-block (for example, from small to large) may be determined, if the motion information of the sub-block is empty. Then, motion information of the sub-block (an example of the second target image sub-block) adjacent to the first processing unit may be determined based on the motion information. For example, if the motion information of the sub-block with index 0 (ie, sub-block 0, belonging to the first processing unit 0) is empty, motion information of other sub-blocks belonging to the same processing unit (first processing unit 0) may be acquired. And use the motion information as the motion information of the sub-block 0.
- the obtaining order may be, for example, first obtaining motion information of a sub-block with an index of 1 (sub-block 1, that is, an example of a second target image sub-block, adjacent to sub-block 0 in the horizontal direction), if sub-block 1 If the motion information is empty, the motion information of the sub-block whose index is 2 (sub-block 2, that is, another example of the second target image sub-block, adjacent to the sub-block 0 in the vertical direction) may be acquired again. If the motion information of the sub-block 2 is empty, then the sub-block with the index of 3 (sub-block 3, that is, another example of the second target image sub-block, adjacent to the sub-block 0 in the diagonal direction) may be acquired. Sports information.
- the motion information can be filled by the above method.
- the method for filling the motion information of the sub-blocks whose motion information is empty is only an exemplary description, and the present invention is not limited thereto.
- the motion information of the specified sub-block here, the adjacent sub-block. That is, the order of acquisition can be arbitrarily changed.
- the motion information filled for the sub-block can be directly used. That is, the motion information of the second target image sub-block may refer to the motion information of the base layer corresponding sub-block of the second target image sub-block, or may be the method of filling the motion information according to the embodiment of the present invention. Image sub-block-filled motion information (from other enhancement layer sub-blocks).
- the first processing unit may be in the same processing unit as the sub-block 0 from the first layer (for example, the first processing unit 0)
- Other sub-blocks eg, sub-block 1 - sub-block 3 acquire motion information.
- the sub-block for example, sub-block 0
- the specified sub-block in the first layer for example, sub-block 1 ⁇ sub-block 3
- the predetermined sub-block in the predetermined first processing unit for example, the first processing unit 1 to the first processing unit 3 in the second processing unit may be acquired (another example of the second target image sub-block)
- the motion information is used as the motion information of the sub-block (for example, sub-block 0).
- first processing unit 0 if the corresponding sub-blocks of all the sub-blocks in one first processing unit (for example, the first processing unit 0) are all empty, other first processing units in the second processing unit may be acquired (for example, the first processing).
- the motion information of the predetermined sub-block in the first to third processing units 3 for convenience of explanation, the sub-block in the upper left corner of each first processing unit is described as an example, and the motion information is used as the first Motion information of each sub-block within a processing unit (first processing unit 0).
- the order of obtaining may be, for example, first obtaining a sub-block of the upper left corner of the first processing unit (the first processing unit 1 adjacent to the first processing unit 0 in the horizontal direction) having an index of 1 (sub-block 4, ie
- the motion information of the second target image sub-block is empty. If the motion information of the sub-block 4 is empty, the motion information of the other sub-blocks in the first processing unit 1 is also considered to be empty, so that the index can be re-acquired.
- a sub-block of the upper left corner of the first processing unit (first processing unit 2 adjacent to the first processing unit 0 in the vertical direction) of 2 (subblock 8, that is, another example of the second target image sub-block) Motion information If the motion information of the sub-block 8 is empty, it can be considered that the motion information of other sub-blocks in the first processing unit 2 is also empty, so that the first processing unit with the index of 3 can be re-acquired (the first processing unit 3, The motion information of the sub-block (sub-block 12, that is, another example of the second target image sub-block) of the upper left corner adjacent to the first processing unit 0 in the diagonal direction. Similarly, for the first processing unit whose motion information is empty, the motion information can be filled by the above method.
- the method for filling the motion information of the sub-blocks whose motion information is empty is only an exemplary description, and the present invention is not limited thereto.
- the vertical direction may also be obtained first.
- the motion information further acquires motion information of a prescribed sub-block of the first processing unit (here, the adjacent first processing unit) in the diagonal direction. That is, the order of acquisition can be arbitrarily changed.
- the above-mentioned "predetermined sub-block” is not limited to the sub-block in the upper left corner of the first processing unit, and may be a sub-block at an arbitrary position in the same first processing unit.
- the target image block since the size of the target image block enumerated above is 16x 16, and the size of the sub-block is 4x 4, the target image block includes only two layers, and the above recursion process ends. However, the size of the target image block is larger, for example, 32x 32, and the size of the sub-block is 4x4, then the target image block includes three layers, and the recursive operation can be continued in the same manner as described above, as the target image block All sub-blocks get motion information.
- the second target image sub-block includes:
- Idx 2 + ⁇ idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2)) ⁇ N /4 ; Idx 2 + ((l - ldx x %N/(N/2))x2 + (ldx x %N / (N / 4) %2)) xN/4; W3 ⁇ 4 / ⁇ /NxN + ((l-/ 1 %N/(N/2))x2 + (l-/ ⁇ %N/(N/4)%2))xN/4; wherein, the representation is used to indicate that the second target image sub-block is in the target image block
- the third indication information of the position in the /, the second indication information, N is determined according to the size of the target image block and the size of the target image sub-block.
- indicating third index information indicating a position of the second target image sub-block in the target image block indicates the second index information, % indicates a modulo operation or a remainder operation, and N indicates that the target image block includes The number of sub-blocks.
- the second target image sub-block within the currently processed hierarchy may be determined according to the index of the sub-block currently being processed, where N corresponds to the layer currently being processed, and N is according to the target
- the size of the image block and the size of the sub-block are determined. For example, if the size of the target image block is 16 x 16 and the size of the sub-block is 4 x 4, the target image block includes two layers as described above, and the first layer is processed.
- N is the number of sub-blocks included in each processing unit (first processing unit) in the layer, here is 4.
- N is the number of sub-blocks included in each processing unit (second processing unit) in the layer, here 16.
- determining the first reference information of the first target image sub-block according to the motion information of the second target image sub-block includes:
- the motion information of the second target image sub-block is empty, it is determined that the first reference information is zero motion information.
- zero motion information is used as the motion information of the sub-block.
- zero motion information can be constructed in the following manner. For example, in a predictive coded picture frame (P frame), the prediction direction of the zero motion information is unidirectional prediction, and the reference picture index is 0, motion vector (0, 0). In the bidirectionally predictive coded picture frame (B frame), the prediction direction of the zero motion information is bidirectional prediction, both reference picture indices are 0, and both motion vectors are (0, 0).
- the foregoing method of using the zero motion information as the motion information of the sub-block may be performed after processing the last layer, or may be performed on any other layer.
- the treatment is carried out, and the present invention is not particularly limited.
- the method for obtaining the motion information of the sub-blocks listed above is only an exemplary description of the present invention, and the present invention is not limited thereto.
- the coding mode of the layer image determines whether the corresponding sub-block contains motion information.
- the base layer image uses the intra prediction coding mode, it may be determined that the corresponding sub-block does not contain motion information (i.e., the motion information of the first base layer image sub-block is empty). If it is determined that only one of the sub-blocks of the target image block (specifically, its corresponding sub-block) has motion information, the motion information of the sub-block may be used as motion information of the other sub-blocks.
- the first reference information of the first target image sub-block can be determined.
- the first target sub-block may be decoded according to the obtained first reference information, for example, according to the first reference information (specifically, motion information) of the first target image sub-block, the first The target image sub-block is decoded (specifically, motion compensation processing).
- the first target image sub-block may be subjected to motion compensation processing according to the motion information filled for the first target image sub-block as described above.
- the motion information can be obtained by the same method as the prior art, and The decoding is performed, and the process can be the same as in the prior art.
- the description thereof will be omitted.
- decoding the target image block according to the reference information comprises: performing deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- a method for image processing according to an embodiment of the present invention for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the first target image Positioning the sub-block determines a second target image sub-block, and determining reference information for the first target image sub-block according to the motion information of the second target image sub-block, and encoding according to the reference information, the first The coding performance of the target image sub-block.
- FIGS. 1 to 3 a method for image processing according to an embodiment of the present invention is described in detail with reference to FIGS. 1 to 3.
- a device for image processing according to an embodiment of the present invention will be described in detail with reference to FIGS. 4 to 5. .
- FIG. 4 shows a schematic block diagram of an apparatus 300 for image processing in accordance with an embodiment of the present invention.
- the apparatus 300 includes:
- the acquiring unit 310 is configured to, when determining that the motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is empty, according to the size of the target image block, the target image block includes Determining a second target image sub-block, the size of each target image sub-block and second indication information indicating a position of the first target image sub-block in the target image block;
- the target image block being located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and a spatial position of the first basic image block sub-block in the base layer image and the first target image
- the sub-block corresponds to a spatial position in the enhancement layer image
- the encoding unit 320 encodes the target image block to generate a target code stream and includes the The first indication information in the target code stream.
- the obtaining unit 310 is specifically configured to determine the second target image sub-block according to any one of the following formulas.
- Idx 2 / 2) ⁇ 2 + (1 - Idx l %N /(N/4) %2)) xN/4; Idx 2 (N/2))x2 + (ldx x %N / (N / 4) %2)) xN/4;
- W3 ⁇ 4 / ⁇ /NxN + ((l-/ x 1 N/(N/2))x2 + (l-/ ⁇ N/(N/4) 2))xN/4; where The third indication information of the position of the second target image sub-block in the target image block, / represents the second indication information, and N is determined according to the size of the target image block and the size of the target image sub-block.
- the acquiring unit 310 is specifically configured to determine that the first reference information is zero motion information if the motion information of the second target image sub-block is empty.
- the encoding unit 320 is specifically configured to perform motion compensation processing on the first target image sub-block according to the first reference information.
- the encoding unit 320 is further configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the encoding unit 320 is specifically configured to entropy encode the first indication information, so that the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the encoding unit 320 is specifically configured to determine, according to whether the reference image block located in the preset position in the enhancement layer image is encoded by using reference information, to determine a context;
- the apparatus 300 for image processing according to an embodiment of the present invention may correspond to an encoding end in the method of the embodiment of the present invention, and each unit in the image processing apparatus 300, that is, a module and the above other operations and/or functions respectively In order to implement the corresponding process of the method 100 in FIG. 1, for the sake of cleaning, no further details are provided herein.
- An apparatus for image processing for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, by according to the first target image Positioning the sub-block determines a second target image sub-block, and determining reference information for the first target image sub-block according to the motion information of the second target image sub-block, and encoding according to the reference information, thereby improving the The coding performance of a target image sub-block.
- FIG. 5 shows a schematic block of an apparatus 400 for image processing in accordance with an embodiment of the present invention.
- the apparatus 400 includes:
- the decoding unit 410 is configured to obtain first indication information from the target code stream.
- the obtaining unit 420 configured to: when the motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is empty, based on the first indication information acquired by the decoding unit, according to the target Determining a second target image sub-block, the size of the image block, the size of each target image sub-block included in the target image block, and second indication information indicating a position of the first target image sub-block in the target image block ;
- the target image block being located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and a spatial position of the first basic image block sub-block in the base layer image and the first target image
- the sub-block corresponds to a spatial position in the enhancement layer image
- the decoding unit 410 is further configured to decode the target code stream to obtain the target image block.
- the acquiring unit 420 is specifically configured to determine the second target image sub-block according to any one of the following formulas.
- the acquiring unit 420 is specifically configured to determine that the first reference information is zero motion information if the motion information of the second target image sub-block is empty.
- the decoding unit 410 is specifically configured to perform motion compensation processing on the first target image sub-block according to the first reference information.
- the decoding unit 410 is further configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the decoding unit 410 is specifically configured to obtain, from the target code stream, the first indication information, where the first indication information is in the target code stream, and the skip mode flag bit or the merged MERGE mode flag bit information is adjacent.
- the decoding unit 410 is specifically configured to be located at a preset location according to the enhancement layer image. Whether the reference image block is decoded using the reference information to determine the context;
- the apparatus 400 for image processing may correspond to a decoding end in the method of the embodiment of the present invention, and the units in the apparatus 400 for image processing, that is, modules and other operations and/or functions described above In order to implement the corresponding process of the method 200 in FIG. 3, respectively, for the sake of cleaning, no further details are provided herein.
- An apparatus for image processing for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, by according to the first target image Positioning the sub-block determines a second target image sub-block, and determining reference information for the first target image sub-block according to the motion information of the second target image sub-block, and encoding according to the reference information, thereby improving the The coding performance of a target image sub-block.
- Fig. 6 shows a schematic block diagram of an encoder 500 for image processing in accordance with an embodiment of the present invention.
- the encoder 500 can include:
- processor 520 connected to the bus
- the processor 520 calls, by the bus 510, a program stored in the memory 530, for determining that the motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is Space-time, determining according to the size of the target image block, the size of each target image sub-block included in the target image block, and the second indication information indicating the position of the first target image sub-block in the target image block.
- a second target image sub-block
- the target image block being located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and a spatial position of the first basic image block sub-block in the base layer image and the first target image
- the sub-block corresponds to a spatial position in the enhancement layer image
- the processor 520 is specifically configured to determine the second target image sub-block according to any one of the following formulas,
- the processor 520 is specifically configured to determine that the first reference information is zero motion information if the motion information of the second target image sub-block is empty.
- the processor 520 is specifically configured to perform motion compensation processing on the first target image sub-block according to the first reference information.
- the processor 520 is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the processor 520 is specifically configured to entropy encode the first indication information, so that the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the processor 520 is specifically configured to determine, according to whether the reference image block located in the preset position in the enhancement layer image is encoded by using reference information, to determine a context;
- the encoder 500 for image processing may correspond to an encoding end in the method of the embodiment of the present invention, and each unit in the encoder 500 for image processing, that is, a module and the above-described other operations and/or For the purpose of implementing the corresponding process of the method 100 in FIG. 1 , the functions are not described here.
- An encoder for image processing for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the first target Positioning the image sub-block determines a second target image sub-block, and determining reference information for the first target image sub-block according to the motion information of the second target image sub-block, and encoding according to the reference information, The coding performance of the first target image sub-block.
- FIG. 7 shows a schematic block diagram of a decoder 600 for image processing in accordance with an embodiment of the present invention.
- the decoder 600 can include: Bus 610;
- processor 620 connected to the bus
- the processor 620 by using the bus 610, invokes a program stored in the memory 630 to obtain first indication information from the target code stream.
- the target image block Determining a second target image sub-block by including a size of each target image sub-block and second indication information indicating a position of the first target image sub-block in the target image block;
- the target image block being located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and a spatial position of the first basic image block sub-block in the base layer image and the first target image
- the sub-block corresponds to a spatial position in the enhancement layer image
- the processor 620 is specifically configured to determine the second target image sub-block according to any one of the following formulas.
- Idx 2 + ⁇ idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2)) ⁇ N /4 ; Idx 2 + ((l - ldx x %N/(N/2))x2 + ⁇ ldx x %N / (N / 4) %2)) xN/4; W3 ⁇ 4 / ⁇ /NxN + ((l-/ x 1 N/(N/2))x2 + (l-/ ⁇ N/(N/4) 2))xN/4; wherein, the representation is used to indicate that the second target image sub-block is in the target image block
- the third indication information of the location, / represents the second indication information, and N is determined according to the size of the target image block and the size of the target image sub-block.
- the processor 620 is specifically configured to determine that the first reference information is zero motion information if the motion information of the second target image sub-block is empty.
- the processor 620 is specifically configured to perform motion compensation processing on the first target image sub-block according to the first reference information.
- the processor 620 is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the processor 620 is specifically configured to obtain, from the target code stream, the first indication information, where the first indication information is in the target code stream, and the skip mode flag bit or the merged MERGE mode.
- the flag information is adjacent.
- the processor 620 is specifically configured to determine, according to whether the reference image block located in the preset position in the enhancement layer image is decoded by using reference information, to determine a context;
- the decoder 600 for image processing may correspond to a decoding end in the method of the embodiment of the present invention, and each unit in the decoder 600 for image processing, that is, a module and the other operations described above and/or For the purpose of implementing the corresponding process of the method 200 in FIG. 5, the functions are not described here.
- a decoder for image processing for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the first target Positioning the image sub-block determines a second target image sub-block, and determining reference information for the first target image sub-block according to the motion information of the second target image sub-block, and encoding according to the reference information, The coding performance of the first target image sub-block.
- Fig. 8 shows a schematic flow chart of a method 700 for image processing according to an embodiment of the present invention, which is described from the perspective of an encoding end. As shown in FIG. 8, the method 700 includes:
- the motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is empty, determining, according to the reconstructed pixel of the first base layer image sub-block, a second reference information encoded by the first target image sub-block, wherein the first base layer image sub-block is an image block located in the base layer image, the target image block is located in the enhancement layer image, and the base layer image is The enhancement layer image corresponds to, and a spatial position of the first basic image block sub-block in the base layer image corresponds to a spatial position of the first target image sub-block in the enhancement layer image;
- S720 Encode the target image block to generate a target code stream and fourth indication information included in the target code stream.
- the image when the image is hierarchically encoded, for example, in spatial scalable coding, the image may be subjected to resolution processing to obtain a low-resolution image, and the original image is referred to as a high-resolution image as a contrast, respectively.
- the low resolution image and the high resolution image are encoded.
- a high-quality image to be encoded is referred to herein as an enhancement layer image
- a corresponding low-quality image to be encoded (for example, the low-resolution image) is referred to as a base layer image.
- the target image is an image processed by a layered coding technique
- the basic layer refers to a quality in layered coding (including frame rate, spatial resolution, temporal resolution, and signal to noise).
- the enhancement layer refers to a layer with higher quality (including frame rate, spatial resolution, temporal resolution, signal-to-noise ratio intensity, or quality level) in the layered coding. .
- the corresponding base layer may be any layer lower in quality than the enhancement layer, for example, if currently There are five layers, and the coding quality is sequentially improved (that is, the first layer has the lowest quality and the fifth layer has the highest quality).
- the enhancement layer is the fourth layer
- the base layer may be the first layer or the second layer. It is the third layer or the fourth layer.
- the corresponding enhancement layer can be any layer of lower quality than the base layer.
- the enhancement layer image is the image in the currently processed enhancement layer
- the base layer image is the image in the base layer at the same time as the enhancement layer image.
- the quality of the base layer image is lower than the quality of the enhancement layer image.
- the target image block is the image block being processed in the enhancement layer image.
- the base layer image block is an image block in the base layer image that has a corresponding relationship with the target image block in spatial position.
- the correspondence between the image block in the base layer and the image block in the enhancement layer can be calculated according to the resolution proportional relationship between the base layer image and the enhancement layer image. For example, in a system including an X direction and a y direction, if the resolution of the enhancement layer image in the X direction and the y direction is twice that of the original layer image, the pixel coordinates of the upper left corner in the enhancement layer are (2x, 2y). And an image block of size (2m ) X ( 2n ), the corresponding block in the base layer image may be an image block whose pixel coordinates are (X , y ) and whose size is mxn in the upper left corner.
- the sub-blocks described later refer to sub-blocks of the target image block (image blocks in the enhancement layer), and the corresponding sub-blocks described later refer to the image blocks corresponding to the sub-blocks in the base layer.
- the motion information may include one or more of a prediction direction, a reference image index, or a motion vector, where the prediction direction may be divided into one-way and two-way prediction, and the one-way prediction may be further divided into forward prediction.
- forward prediction refers to the use of a forward reference picture list, ie, a reference picture in list 0 to generate a prediction signal
- backward prediction refers to using a backward reference picture list, ie, a reference picture in list 1 to generate a prediction.
- Bidirectional prediction refers to the use of reference pictures in list 0 and list 1 to generate prediction signals; for unidirectional prediction, a reference picture index is required to indicate the reference picture selected in list 0 or list l.
- each motion vector includes a horizontal direction
- the component x and the vertical component y can be written as (X, y).
- a motion vector is required to indicate the displacement of the prediction signal in the selected list 0 or list 1 reference image.
- Two motion vectors indicating the displacement of the forward prediction signal and the backward prediction signal in the selected listO reference image and the list 1 reference image, respectively.
- the target image block may be configured by at least two sub-blocks (ie, target image sub-blocks), wherein the size of the sub-block may be determined according to a preset value.
- the sub-block size is 4x4 as an example. For example, if the size of the target image block is 16x 16, it can be determined that the target image block includes 16 sub-blocks (size 4x4). Therefore, in the embodiment of the present invention, a corresponding sub-block of each sub-block in the target image block (belonging to the corresponding image block) may be determined, and motion information of the corresponding sub-block is determined.
- the coordinates of the corresponding position of the pixel in the base layer image may be determined according to the coordinates of a certain pixel point in the sub-block (denoted as: u ⁇ E x , E y ) n ) u (B x , B y y ), and the image block in the base layer containing the corresponding position coordinates is used as the corresponding sub-block.
- the motion vector ( ⁇ , ⁇ of the first base layer image sub-block is scaled, and the scaled motion vector is used as the motion vector (EMV x , EMV y ) of the sub-block (first target image sub-block).
- the motion information of the corresponding sub-block can be directly used as the motion information of the sub-block.
- motion information of the corresponding sub-block may be
- the method further includes:
- the first base layer image sub-block corresponding to the first target image sub-block includes motion information.
- whether the corresponding sub-block includes motion information may be determined according to an encoding mode of the base layer image (corresponding image block). For example, if the base layer image uses the intra prediction coding mode, it may be determined that the corresponding sub-block does not contain motion information (i.e., the motion information of the first basic layer image sub-block is empty).
- the correspondence may be determined as described above.
- the sub-block acquires its motion information, and when the corresponding sub-block does not include motion information, the above process can be skipped.
- the second reference information can be obtained by the following method 3.
- the reconstructed pixel of the sub-block corresponding to the first target image sub-block in the base layer image may be acquired, and the reconstructed pixel is subjected to upsampling processing, and the prediction signal of the first target image sub-block is generated as a reference. information.
- the encoding process is performed on the target image block according to the reference information, including: performing motion compensation processing on the first target image sub-block according to the reference information.
- the first target image sub-block may be encoded (specifically, predictive coding processing) based on reference information of the first target image sub-block (specifically, the prediction signal). Specifically, the reconstructed pixel is appropriately upsampled to serve as a prediction signal for the current sub-block. After the prediction signal of the current block is obtained, the current block can be predictively coded to calculate the rate distortion cost.
- the encoding processing the target image block according to the reference information comprises: performing deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- second reference information of the first target image block (the corresponding sub-block in the base layer does not include motion information) is acquired by the above method 3
- the third target image block is acquired (the corresponding sub-block in the base layer includes The motion information of the motion information)
- the method of acquiring the motion information of the third target image block may be the same as the prior art, and the description thereof is omitted here, so that the distortion rate cost of the target image block can be calculated, if the distortion rate is costed
- an indication identifier (fourth indication information) may be determined to indicate the decoding end, and the reference information of the first target image block is obtained by the foregoing method 1 and method 2, and the third target image block is acquired (corresponding in the basic layer)
- the sub-block includes motion information of the motion information).
- the encoding process is performed on the first target image sub-block according to the reference information, including:
- the first indication information is subjected to entropy encoding processing such that the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the first indication information in the target code stream, may be configured at a position adjacent to the skip mode flag bit information.
- the first indication information may be placed as the first information of the target image block in the target code stream before the skip mode flag bit information, and the first indication information may be placed as the target after the skip mode flag bit information.
- the above skip mode may be the same as the prior art, and the determination method and the configuration position may be the same as the prior art.
- the description thereof is omitted.
- the first indication information can be placed adjacent to the MERGE mode flag bit information.
- the first indication information may be placed before the MERGE mode flag bit information, and the first indication information may be placed after the MERGE mode flag bit information.
- the MERGE may be the same mode as the prior art, and the determination method and the configuration position may be the same as the prior art.
- the description thereof is omitted.
- the first indication information may be a binary flag bit. Therefore, when the first indication information is entropy encoded, it is not necessary to perform binarization processing on the first indication information.
- the context used for performing the entropy coding process on the binarized first indication information may be selected.
- the first target image sub-block is encoded according to the reference information, including:
- the first indication information is subjected to entropy coding processing.
- the context can contain three contexts of 0, 1, and 2.
- This embodiment determines which context to use based on whether the left and upper image blocks use the base layer mode. In this embodiment, for example, depending on whether the image blocks on the left and the top of the target image block use their respective first indication information, which context is used, for example, if the image blocks on the left and above the target image block are not Using the first indication information, then selecting a context model with an index of 0. If the image block on the left and top of the target image block has a first indication information, then select a context model with an index of 1 if the target image block is left and above. The image block uses the first indication information, then the context with the index of 2 is selected.
- the first indication information can be binary arithmetic coded according to the context selected as described above, and the used context model is updated.
- the process may be the same as the prior art, and the description thereof is omitted here to avoid redundancy.
- each first target image sub-block may be encoded according to the obtained reference information, thereby completing encoding processing on the target image block, and generating the generated target image.
- the information of the block and the first indication information after the entropy coding process described above are added to the code stream (target code stream).
- target code stream information of the target image (including the base layer image and the enhancement layer image) after the encoding process may be included, and the process may be the same as the prior art, here, in order to avoid For the details, the description is omitted.
- the decoding end needs to obtain the second reference information of the first target image sub-block by using the same method as the encoding end, and the decoding end needs to use
- the second reference information of the first target image sub-block is acquired in the same manner as the encoding end.
- the decoding end may determine, according to the fourth indication information, whether the second reference information of the first target image sub-block needs to be acquired, and the following is a description of the case where the encoding end needs to acquire the second reference information of the first target image sub-block. .
- the target image information may be acquired from the code stream, and the target image (specifically, the target image block) is determined, and the acquired fourth indication information (the information after the entropy coding process) is subjected to entropy decoding processing.
- the process of context selection and context update is the same as or similar to the processing of the above encoding end, and the description thereof is omitted here.
- a binary symbol string (bin string) representing the fourth indication information may be parsed from the code stream according to the selected context.
- the binary arithmetic decoding process corresponds to the binary arithmetic coding process at the encoding end.
- the sub-block corresponding to the first target image sub-block in the base layer image may be acquired.
- the first target image sub-block may be subjected to encoding processing (specifically, predictive encoding processing) based on reference information of the first target image sub-block (specifically, the prediction signal).
- the reconstructed pixel is upsampled as a prediction signal of the current sub-block.
- the current block may be subjected to motion compensation processing, and the additionally decoded residual signal may also be superimposed to obtain the reconstructed signal.
- a method for image processing according to an embodiment of the present invention for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, Determining for the second target image sub-block according to the position of the first target image sub-block, and determining, according to the reconstructed pixel of the first base layer image sub-block corresponding to the first target image sub-block in spatial position
- the reference information of the first target image sub-block, and performing encoding processing according to the reference information can improve coding performance of the first target image sub-block.
- Figure 9 shows a schematic flow diagram of a method 800 for image processing in accordance with an embodiment of the present invention as described from the perspective of a decoding end.
- the method 800 includes:
- the decoding end may acquire the target image information from the code stream, determine the target image (specifically, the target image block), and acquire the first indication information (the information after entropy coding processing).
- the obtaining the first indication information from the target code stream includes:
- the first indication information is obtained from the target code stream, where the first indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the first indication information may be configured at a position adjacent to the skip mode flag bit information.
- the first indication information may be placed as the first information of the target image block in the target code stream before the skip mode flag bit information, and the first indication information may be placed as the target after the skip mode flag bit information.
- the first indication information can be placed adjacent to the MERGE mode flag bit information.
- the first indication information may be placed before the MERGE mode flag bit information, and the first indication information may be placed after the MERGE mode flag bit information.
- the MERGE can be with The same mode of the prior art, the determination method and the configuration position thereof may be the same as the prior art, and the description thereof is omitted here to avoid redundancy.
- the decoding end may perform entropy decoding processing on the obtained first indication information.
- the first indication information may be a binary flag bit. Therefore, when entropy decoding the first indication information, it is not necessary to binarize the first indication information.
- the context used for performing the entropy coding process on the first indication information of the binarization may be selected.
- the obtaining the first indication information from the target code stream includes:
- entropy decoding processing is performed to determine the first indication information.
- the context can contain three contexts of 0, 1, and 2.
- This embodiment determines which context to use based on whether the left and upper image blocks use the base layer mode. In this embodiment, for example, depending on whether the image blocks on the left and the top of the target image block use their respective first indication information, which context is used, for example, if the image blocks on the left and above the target image block are not Using the first indication information, then selecting a context model with an index of 0. If the image block on the left and top of the target image block has a first indication information, then select a context model with an index of 1 if the target image block is left and above. The image block uses the first indication information, then the context with the index of 2 is selected.
- the first indication information can be binary arithmetically decoded according to the context selected as above, and the used context model is updated.
- the process may be the same as the prior art, and the description thereof is omitted here to avoid redundancy.
- the decoding end needs to obtain the first reference information of the first target image sub-block by using the same method as the encoding end, and the decoding end needs to use The first reference information of the first target image sub-block is acquired in the same manner as the encoding end.
- the decoding end may determine, according to the first indication information, whether the first reference information of the first target image sub-block needs to be acquired, and the following is a description of the case where the encoding end needs to acquire the first reference information of the first target image sub-block. .
- the image is hierarchically encoded, for example, in spatial scalable coding
- the image may be subjected to resolution processing to obtain a low-resolution image, and the original image is referred to as a high-resolution image as a comparison, and the encoder separately encodes the low-resolution image and the high-resolution image.
- a high quality image to be encoded is referred to herein as an enhancement layer image
- a corresponding low quality image to be encoded (eg, the low resolution image) is referred to as a base layer image.
- the target image is an image processed by a layered coding technique
- the basic layer refers to a quality in layered coding (including frame rate, spatial resolution, temporal resolution, signal to noise ratio intensity or quality level).
- the enhancement layer refers to the layer with higher quality (including frame rate, spatial resolution, temporal resolution, signal-to-noise ratio intensity or quality level) in the layered coding.
- the corresponding base layer may be any layer lower in quality than the enhancement layer, for example, if currently There are five layers, and the coding quality is sequentially improved (that is, the first layer has the lowest quality and the fifth layer has the highest quality).
- the enhancement layer is the fourth layer
- the base layer may be the first layer or the second layer. It is the third layer or the fourth layer.
- the corresponding enhancement layer can be any layer of lower quality than the base layer.
- the enhancement layer image is the image in the currently processed enhancement layer
- the base layer image is the image in the base layer at the same time as the enhancement layer image.
- the quality of the base layer image is lower than the quality of the enhancement layer image.
- the target image block is the image block being processed in the enhancement layer image.
- the base layer image block is an image block in the base layer image that has a corresponding relationship with the target image block in spatial position.
- the correspondence between the image block in the base layer and the image block in the enhancement layer can be calculated according to the resolution proportional relationship between the base layer image and the enhancement layer image. For example, in a system including an X direction and a y direction, if the resolution of the enhancement layer image in the X direction and the y direction is twice that of the original layer image, the pixel coordinates of the upper left corner in the enhancement layer are (2x, 2y). And an image block of size (2m ) X ( 2n ), the corresponding block in the base layer image may be an image block whose pixel coordinates are (X , y ) and whose size is mxn in the upper left corner.
- the sub-blocks described later refer to sub-blocks of the target image block (image blocks in the enhancement layer), and the corresponding sub-blocks described later refer to the image blocks corresponding to the sub-blocks in the base layer.
- the motion information may include one or more of a prediction direction, a reference image index, or a motion vector, where the prediction direction may be divided into one-way and two-way prediction, and the one-way prediction Can be divided into forward prediction and backward prediction, forward prediction refers to the use of forward reference image list, ie list
- the reference image in ( list ) 0 produces a prediction signal
- the backward prediction refers to the use of a backward reference image list, that is, a reference image in list 1 to generate a prediction signal
- the bidirectional prediction refers to generating prediction using the reference images in list 0 and list 1 at the same time.
- Signal; for unidirectional prediction a reference image index is required to indicate the reference image selected in list 0 or list l.
- two reference image indices are required, indicating the reference selected in list 0 and list 1, respectively.
- Image each motion vector includes a horizontal direction component X and a vertical direction component y, which can be written as (X, y).
- a motion vector is required to indicate the prediction signal in the selected list 0 or list 1 reference image.
- two motion vectors are required to indicate the displacement of the forward prediction signal and the backward prediction signal in the selected list O reference image and the list 1 reference image, respectively.
- the target image block may be configured by at least two sub-blocks (ie, target image sub-blocks), wherein the size of the sub-block may be determined according to a preset value.
- the sub-block size is 4 x 4 as an example. For example, if the size of the target image block is 16 x 16 , it can be determined that the target image block includes 16 sub-blocks (the size is 4 x 4 ). Therefore, in the embodiment of the present invention, a corresponding sub-block (a first base layer image sub-block) in each of the target image blocks (the first target image sub-block) in the base layer may be determined, and the Corresponding to the motion information of the sub-block.
- the pixel may be determined in the base layer image according to the coordinates of a certain pixel point in the sub-block (the first target image sub-block) (referred to as: "(E x , E y ) " )
- the coordinates of the corresponding position (denoted as "" (and the image block in the base layer containing the corresponding position coordinates is taken as the corresponding sub-block (the first base layer image sub-block).
- the motion vectors (EMV x , EMV y ) of the first target image sub-block are calculated according to the following Equations 1 to 10.
- the motion information of the corresponding sub-block can be directly used as the motion information of the sub-block.
- motion information of the corresponding sub-block may be
- the method further includes:
- whether the corresponding sub-block includes motion information may be determined according to an encoding mode of the base layer image (corresponding image block). For example, if the base layer image uses the intra prediction coding mode, it may be determined that the corresponding sub-block does not contain motion information (i.e., the motion information of the first basic layer image sub-block is empty).
- the corresponding sub-block when the corresponding sub-block includes the motion information, the corresponding sub-block may be determined according to the process as described above and the motion information thereof may be obtained.
- the method may be obtained by the following method 4 Second reference information of a target image sub-block.
- the reconstructed pixel of the sub-block corresponding to the first target image sub-block in the base layer image may be acquired, and the reconstructed pixel is subjected to upsampling processing, and the prediction signal of the first target image sub-block is generated as a reference. information.
- the decoding process of the target image block according to the reference information includes: performing motion compensation processing on the first target image sub-block according to the reference information.
- the first target sub-block may be decoded according to the obtained reference information. If the reference information is acquired by the method 3, the reference information of the first target image sub-block may be used (specifically, Motion information), decoding processing (specifically, motion compensation processing) on the first target image sub-block. Specifically, motion compensation processing may be performed on the first target image sub-block according to the motion information filled for the first target image sub-block as described above.
- Motion information specifically, Motion information
- decoding processing specifically, motion compensation processing
- the reconstructed pixel of the sub-block corresponding to the first target image sub-block in the base layer image may be acquired, and the reconstructed pixel is subjected to upsampling processing to generate the first
- the prediction signal of the target image sub-block is used as reference information.
- the first target image sub-block may be subjected to encoding processing (specifically, predictive encoding processing) based on reference information of the first target image sub-block (specifically, the prediction signal).
- the reconstructed pixel is upsampled as a prediction signal of the current sub-block.
- the current block may be subjected to motion compensation processing, and the additionally decoded residual signal may be superimposed to obtain the reconstructed signal.
- the motion information can be obtained by the same method as the prior art, and The decoding process is performed, and the process can be the same as in the prior art.
- the decoding process on the target image block according to the reference information includes: performing deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- a method for image processing according to an embodiment of the present invention for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the first target image Positioning the sub-block determines a second target image sub-block, and determining, according to the reconstructed pixel of the first base layer image sub-block corresponding to the first target image sub-block in spatial position, determining the sub-block for the first target image Referring to the information and performing encoding processing according to the reference information, the coding performance of the first target image sub-block can be improved.
- FIGS. 8 to 9 a method for image processing according to an embodiment of the present invention is described in detail with reference to FIGS. 8 to 9.
- a device for image processing according to an embodiment of the present invention will be described in detail with reference to FIGS. 10 to 11. .
- FIG. 10 shows a schematic block diagram of an apparatus 900 for image processing in accordance with an embodiment of the present invention.
- the apparatus 900 includes:
- the obtaining unit 910 is configured to determine, according to the reconstructed pixels of the first base layer image sub-block, when determining that motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is empty Second reference information for encoding the first target image sub-block, wherein the first base layer image sub-block is an image block located in a base layer image, the target image block being located in an enhancement layer image, a base layer image corresponding to the enhancement layer image, and a spatial position of the first base image block sub-block in the base layer image corresponds to a spatial position of the first target image sub-block in the enhancement layer image;
- the encoding unit 920 is configured to encode the target image block to generate a target code stream and fourth indication information included in the target code stream.
- the coding unit 920 is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the encoding unit 920 is specifically configured to entropy encode the fourth indication information, so that the fourth indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the coding unit 920 is specifically configured to determine, according to whether the reference image block located in the preset position in the enhancement layer image is encoded by using reference information, to determine a context;
- the apparatus 900 for image processing according to an embodiment of the present invention may correspond to an embodiment of the present invention.
- the modules in the image processing device 900, and the other operations and/or functions described above, respectively, in order to implement the corresponding processes of the method 700 in FIG. 8, for the sake of cleaning no further description is provided herein. .
- An apparatus for image processing according to an embodiment of the present invention for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, by according to the first target image Positioning the sub-block determines a second target image sub-block, and determining, according to the reconstructed pixel of the first base layer image sub-block corresponding to the first target image sub-block in spatial position, determining the sub-block for the first target image Referring to the information and performing encoding processing according to the reference information, the coding performance of the first target image sub-block can be improved.
- FIG 11 shows a schematic block diagram of an apparatus 1000 for image processing in accordance with an embodiment of the present invention.
- the device 1000 includes:
- the decoding unit 1010 is configured to obtain fourth indication information from the target code stream.
- the obtaining unit 1020 is configured to, when determining that the motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is empty, based on the fourth indication information acquired by the decoding unit, according to the first a reconstructed pixel of a base layer image sub-block, determining second reference information for encoding the first target image sub-block, wherein the first base layer image sub-block is an image block located in the base layer image, The target image block is located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and the spatial position of the first basic image block sub-block in the base layer image and the first target image sub-block are in the Corresponding to the spatial position in the enhancement layer image;
- the encoding unit 1010 is further configured to decode the target code stream to obtain the target image block.
- the decoding unit 1010 is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the decoding unit 1010 is specifically configured to obtain fourth indication information from the target code stream, where the fourth indication information is in the target code stream, and the skip mode flag bit or the merged MERGE mode flag bit information is adjacent.
- the decoding unit 1010 is specifically configured to determine, according to whether the reference image block located in the preset position in the enhancement layer image is decoded by using reference information, to determine a context;
- the apparatus 1000 for image processing may correspond to a decoding end in the method of the embodiment of the present invention, and the units in the apparatus 1000 for image processing are modules and other operations and/or functions described above.
- Clean, no longer repeat here In order to implement the corresponding process of the method 800 in FIG. 9, respectively, Clean, no longer repeat here.
- An apparatus for image processing according to an embodiment of the present invention for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, by according to the first target image Positioning the sub-block determines a second target image sub-block, and determining, according to the reconstructed pixel of the first base layer image sub-block corresponding to the first target image sub-block in spatial position, determining the sub-block for the first target image Referring to the information and performing encoding processing according to the reference information, the coding performance of the first target image sub-block can be improved.
- Figure 12 shows a schematic block diagram of an encoder 1100 for image processing in accordance with an embodiment of the present invention.
- the encoder 1100 can include:
- processor 1120 connected to the bus
- the processor 1120 calls the program stored in the memory 1130 through the bus 1110, for determining that the motion information of the first base layer image sub-block corresponding to the first target image sub-block of the target image block is Empty space, determining, according to the reconstructed pixels of the first base layer image sub-block, second reference information for encoding the first target image sub-block, wherein the first base layer image sub-block is located in the base layer image An image block in which the target image block is located in the enhancement layer image, the base layer image corresponding to the enhancement layer image, and a spatial position of the first basic image block sub-block in the base layer image and the first The spatial position of the target image sub-block corresponds in the enhancement layer image;
- the target image block is encoded to generate a target code stream and fourth indication information included in the target code stream.
- the processor 1120 is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the processor 1120 is specifically configured to entropy encode the fourth indication information, so that the fourth indication information is adjacent to the skip mode flag bit or the merged MERGE mode flag bit information in the target code stream.
- the processor 1120 is specifically configured to be located at a preset location according to the enhancement layer image. Whether the reference image block is encoded using reference information to determine a context;
- the encoder 1100 for image processing may correspond to an encoding end in the method of the embodiment of the present invention, and each unit in the encoder 1100 for image processing, that is, a module and the above-described other operations and/or For the purpose of implementing the corresponding process of the method 700 in FIG. 8 , the functions are not described herein.
- An encoder for image processing for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the first target Positioning the image sub-block determines a second target image sub-block, and determining, according to the reconstructed pixel of the first base layer image sub-block corresponding to the first target image sub-block in spatial position, determining the first target image sub-block
- the reference information, and encoding processing according to the reference information can improve the coding performance of the first target image sub-block.
- Figure 13 shows a schematic block diagram of a decoder 1200 for image processing in accordance with an embodiment of the present invention.
- the decoder 1200 can include:
- processor 1220 connected to the bus
- the processor 1220 calls the program stored in the memory 1230 through the bus 1210 to obtain fourth indication information from the target code stream.
- the first base layer image sub-block is an image block located in a base layer image, the target image block being located in the enhancement layer image Corresponding to the enhancement layer image, and the spatial position of the first basic image block sub-block in the base layer image and the spatial position of the first target image sub-block in the enhancement layer image Corresponding
- the processor 1220 is specifically configured to perform deblocking filtering processing on pixels located near a boundary between the target image sub-blocks.
- the processor 1220 is specifically configured to obtain fourth indication information from the target code stream, where the fourth indication information is in the target code stream and the skip mode flag bit or the merged MERGE mode The type flag information is adjacent.
- the processor 1220 is specifically configured to determine, according to whether the reference image block located in the preset position in the enhancement layer image is decoded by using reference information, to determine a context;
- the decoder 1200 for image processing may correspond to a decoding end in the method of the embodiment of the present invention, and each unit in the decoder 1200 for image processing is a module and the other operations described above and/or For the purpose of implementing the corresponding process of the method 800 in FIG. 9, the functions are not described here.
- a decoder for image processing for a first target image sub-block in which a motion information cannot be obtained from a corresponding sub-block included in a base layer image in a target image block of an enhancement layer image, according to the first target Positioning the image sub-block determines a second target image sub-block, and determining, according to the reconstructed pixel of the first base layer image sub-block corresponding to the first target image sub-block in spatial position, determining the first target image sub-block
- the reference information, and encoding processing according to the reference information can improve the coding performance of the first target image sub-block.
- the decoding end and the decoding end are required to obtain the reference information, that is, if the encoding end uses the method 1 to obtain the reference information (the first reference information) ), the decoder will use method 2 (corresponding to method 1) to obtain reference information (first reference information).
- the decoding end processing method may be determined according to the described encoding end processing method, or the encoding end processing method may be determined according to the described decoding end processing method.
- the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
- the implementation process constitutes any limitation.
- the disclosed systems, devices, and methods may be implemented in other ways.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
- the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
- the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
- the technical solution of the present invention which is essential to the prior art or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, including
- the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
一种用于图像处理的方法,该方法包括:当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子块的运动信息为空时,根据该目标图像块的大小、该目标图像块包括的每个目标图像子块的大小和用于指示第一目标图像子块在该目标图像块中的位置的第二指示信息,确定第二目标图像子块;根据该第二目标图像子块的运动信息,确定用于对该第一目标图像子块进行编码的第一参考信息,其中,该第一基本层图像子块是位于基本层图像中的图像块,该目标图像块位于增强层图像中,该的基本层图像与该增强层图像相对应;对该目标图像块进行编码,以生成目标码流以及包含于该目标码流中的第一指示信息。
Description
用于图像处理的方法、 装置、 编码器和解码器 本申请要求于 2012 年 9 月 29 日提交中国专利局、 申请号为 201210375019.5、 发明名称为"用于图像处理的方法、 装置编码器和解码器" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及视频处理领域, 并且更具体地, 涉及一种用于图像处理的方 法、 装置、 编码器和解码器。 背景技术
随着互联网的迅猛发展以及人们物质精神文化的日益丰富,在互联网中 针对视频的应用需求尤其是针对高清视频的应用需求越来越多, 而高清视频 的数据量非常大, 要想高清视频能在带宽有限的互联网中传输, 必须首先解 决的问题就是高清视频压缩编码问题。
在网络环境里 (比如互联网), 由于网络带宽是有限的, 终端设备以及 用户的需求都是不同的, 所以为了某种特定的应用而一次压缩的码流并不是 令人满意和有效的, 对一些特定的用户或设备而言, 甚至是没有意义的。 解 决这个问题的一个有效的方法就是利用可伸缩视频编码( SVC, scalable video coding )技术。 可伸缩编码又称作分层编码。 在该 SVC技术中, 根据包括空 间分辨率、 时间分辨率或者信噪比强度等在内的质量参数, 对图像进行分层 编码。 例如, 在空间可伸缩编码时, 可以将图像进行降分辨率处理得到低分 辨率图像,作为对比将原图像称作高分辨率图像,编码器分别对该低质量(例 如, 低分辨率) 图像以及该高质量(例如, 高分辨率) 图像进行编码, 得到 高质量图像编码信息与低质量图像编码信息。 在该 SVC技术中, 根据包括 空间分辨率、 时间分辨率或者信噪比强度等在内的质量参数, 将一个图像分 为多个图像层。 SVC的目标就是让高质量图像层尽量充分的利用低质量图像 层的信息, 提高层间预测的效率, 使得编码质量高的图像的时候能够效率更 高。
为了提高层间预测效率, 在现有技术中, 如果在低质量层图像中与高质 量层图像的图像块对应的所有图像块中有至少一个图像块使用帧间预测模
式, 则直接使用适当缩放后的低质量层图像的图像块的运动信息作为高质量 层图像中相应图像块的运动信息, 但是, 例如, 在低质量层图像中有一个或 多个子块(对应子块)采用帧内模式(即, 该对应子块的运动信息为空)编 码的情况下, 高质量层图像块中的子块无法从低质量层图像中的对应子块中 获取运动信息。 该情况下, 会按照给定方法构造得到该子块的运动信息。 然 而, 这些推导得到的运动信息并不准确, 从而会影响对该子块的编码性能, 并进一步影响整个高质量层图像的编码效率。
因此, 希望提供一种方法, 能够提高对于高质量层图像的目标图像块中 不能从低质量层图像中的对应子块获得运动信息的子块的编码性能。 发明内容
本发明实施例提供一种用于图像处理的方法和装置, 能够提高对于增强 层图像的目标图像块中不能从基本层图像包括的对应子块获得运动信息的 子块的编码性能。
第一方面, 提供了一种用于图像处理的方法, 该方法包括: 当确定与目 标图像块的第一目标图像子块相对应的第一基本层图像子块的运动信息为 空时, 根据该目标图像块的大小、 该目标图像块包括的每个目标图像子块的 大小和用于指示第一目标图像子块在该目标图像块中的位置的第二指示信 息, 确定第二目标图像子块; 根据该第二目标图像子块的运动信息, 确定用 于对该第一目标图像子块进行编码的第一参考信息, 其中, 该第一基本层图 像子块是位于基本层图像中的图像块, 该目标图像块位于增强层图像中, 该 的基本层图像与该增强层图像相对应,且该第一基本图像块子块在该基本层 图像中的空间位置与该第一目标图像子块在该增强层图像中的空间位置相 对应; 对该目标图像块进行编码, 以生成目标码流以及包含于该目标码流中 的第一指示信息。
在一种可能的实施方式中, 该根据目标图像块的大小、 该目标图像块包 括的目标图像子块的大小和用于指示第一目标图像子块在该目标图像块中 的位置的第二指示信息,确定第二目标图像子块, 包括:根据以下任一公式, 确定该第二目标图像子块,
Idx2 + {idx, %N / (N / 2)) x 2 + (l - Idx, %N / (N / 4) %2)) χ N / 4 ;
Idx2
+ ((l - ldxx %N / (N / 2)) x 2 + {ldxx %N / (N / 4) %2)) x N / 4 ;
Idx2 = Idx N x N + ((l - ldxx %N / (N / 2))x 2 + (l - ldxx %N / (N / 4) %2)) x N / 4 ; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
结合第一方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该根据该第二目标图像子块的运动信息,确定用于对该第一目标图像子块进 行编码的第一参考信息, 包括: 如果该第二目标图像子块的运动信息为空, 则确定该第一参考信息为零运动信息。
结合第一方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该对该目标图像块进行编码包括: 根据该第一参考 信息, 对该第一目标图像子块进行运动补偿处理。
结合第一方面、 第一种可能的实施方式、 第二种可能的实施方式和第三 种可能的实施方式, 在第四种可能的实施方式中, 该根据该参考信息, 对该 目标图像块进行编码, 包括: 对位于该目标图像子块之间的边界附近的像素 进行去块效应滤波处理。
结合第一方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式和第四种可能的实施方式, 在第五种可能的实施方式中, 该根据该参考信息, 对该目标图像块进行编码, 包括: 对该第一指示信息进 行熵编码, 以使该第一指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
结合第一方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式、 第四种可能的实施方式和第五种可能的实施方式, 在第 六种可能的实施方式中, 该根据该参考信息, 对该目标图像块进行编码, 包 括: 根据该增强层图像中位于预设位置的参考图像块是否使用参考信息进行 编码, 确定上下文; 根据该上下文, 对该第一指示信息进行熵编码。
第二方面, 提供了一种用于图像处理的方法, 该方法包括: 从目标码流 中, 获取第一指示信息; 当与目标图像块的第一目标图像子块相对应的第一 基本层图像子块的运动信息为空时, 基于该第一指示信息, 根据该目标图像 块的大小、该目标图像块包括的每个目标图像子块的大小和用于指示第一目 标图像子块在该目标图像块中的位置的第二指示信息,确定第二目标图像子 块; 根据该第二目标图像子块的运动信息, 确定用于对该第一目标图像子块
进行解码的第一参考信息, 其中, 该第一基本层图像子块是位于基本层图像 中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增强层 图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与该第 一目标图像子块在该增强层图像中的空间位置相对应; 对该目标码流进行解 码, 以获取该目标图像块。
在一种可能的实施方式中, 该根据目标图像块的大小、 该目标图像块包 括的目标图像子块的大小和用于指示第一目标图像子块在该目标图像块中 的位置的第二指示信息,确定第二目标图像子块, 包括:根据以下任一公式, 确定该第二目标图像子块,
Idx2 / 2)) χ 2 + (l - Idxl %N / (N / 4) %2)) x N / 4;
Idx2
(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
结合第二方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该根据该第二目标图像子块的运动信息,确定用于对该第一目标图像子块进 行编码的第一参考信息, 包括: 如果该第二目标图像子块的运动信息为空, 则确定该第一参考信息为零运动信息。
结合第二方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该对该目标码流进行解码包括: 根据该第一参考信 息, 对该第一目标图像子块进行运动补偿处理。
结合第二方面、 第一种可能的实施方式、 第二种可能的实施方式和第三 种可能的实施方式, 在第四种可能的实施方式中, 该根据该参考信息, 对该 目标图像块进行解码, 包括: 对位于该目标图像子块之间的边界附近的像素 进行去块效应滤波处理。
结合第二方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式和第四种可能的实施方式, 在第五种可能的实施方式中, 该从目标码流中, 获取第一指示信息, 包括: 从目标码流中, 获取第一指示 信息, 其中, 该第一指示信息在该目标码流中与跳过模式标志位或融合
MERGE模式标志位信息相邻。
结合第二方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式、 第四种可能的实施方式和第五种可能的实施方式, 在第 六种可能的实施方式中, 该从目标码流中, 获取第一指示信息, 包括: 根据 该增强层图像中位于预设位置的参考图像块是否使用参考信息进行解码,确 定上下文; 根据该上下文, 进行熵解码, 以确定该第一指示信息。
第三方面, 提供了一种用于图像处理的装置, 该装置包括: 获取单元, 用于当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 根据该目标图像块的大小、 该目标图像块包括的每个 目标图像子块的大小和用于指示第一目标图像子块在该目标图像块中的位 置的第二指示信息, 确定第二目标图像子块; 用于根据该第二目标图像子块 的运动信息, 确定用于对该第一目标图像子块进行编码的第一参考信息, 其 中, 该第一基本层图像子块是位于基本层图像中的图像块, 该目标图像块位 于增强层图像中, 该的基本层图像与该增强层图像相对应, 且该第一基本图 像块子块在该基本层图像中的空间位置与该第一目标图像子块在该增强层 图像中的空间位置相对应; 编码单元, 对该目标图像块进行编码, 以生成目 标码流以及包含于该目标码流中的第一指示信息。
在一种可能的实施方式中, 该获取单元具体用于根据以下任一公式, 确 定该第二目标图像子块,
Idx2 %N / (N / 2)) χ 2 + (1 - Idx, %N /(N/4) <¾2)) xN/4; Idx2
dxx %N/(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4;
W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
结合第三方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该获取单元具体用于如果该第二目标图像子块的运动信息为空, 则确定该第 一参考信息为零运动信息。
结合第三方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该编码单元具体用于根据该第一参考信息, 对该第 一目标图像子块进行运动补偿处理。
结合第三方面、 第一种可能的实施方式、 第二种可能的实施方式和第三
种可能的实施方式, 在第四种可能的实施方式中, 该编码单元还用于对位于 该目标图像子块之间的边界附近的像素进行去块效应滤波处理。
结合第三方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式和第四种可能的实施方式, 在第五种可能的实施方式中, 该编码单元具体用于对该第一指示信息进行熵编码, 以使该第一指示信息在 该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
结合第三方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式、 第四种可能的实施方式和第五种可能的实施方式, 在第 六种可能的实施方式中, 该编码单元具体用于根据该增强层图像中位于预设 位置的参考图像块是否使用参考信息进行编码, 确定上下文; 用于根据该上 下文, 对该第一指示信息进行熵编码。
第四方面, 提供了一种图像处理的装置, 该装置包括: 解码单元, 用于 从目标码流中, 获取第一指示信息; 获取单元, 用于当与目标图像块的第一 目标图像子块相对应的第一基本层图像子块的运动信息为空时,基于该解码 单元获取的该第一指示信息, 根据该目标图像块的大小、 该目标图像块包括 的每个目标图像子块的大小和用于指示第一目标图像子块在该目标图像块 中的位置的第二指示信息, 确定第二目标图像子块; 用于根据该第二目标图 像子块的运动信息,确定用于对该第一目标图像子块进行解码的第一参考信 息, 其中, 该第一基本层图像子块是位于基本层图像中的图像块, 该目标图 像块位于增强层图像中, 该的基本层图像与该增强层图像相对应, 且该第一 基本图像块子块在该基本层图像中的空间位置与该第一目标图像子块在该 增强层图像中的空间位置相对应; 该解码单元还用于对该目标码流进行解 码, 以获取该目标图像块。
在一种可能的实施方式中, 该获取单元具体用于根据以下任一公式, 确 定该第二目标图像子块,
Idx2 + idx, %N/(N/2))x2 + (l- Idxl %N /(N / 4)%2))χ N /4 ; Idx2
+ ((l - ldxx %N/(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ 1%N/(N/2))x2 + (l-/^%N/(N/4)%2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, /^表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
结合第四方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该获取单元具体用于如果该第二目标图像子块的运动信息为空, 则确定该第 一参考信息为零运动信息。
结合第四方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该解码单元具体用于根据该第一参考信息, 对该第 一目标图像子块进行运动补偿处理。
结合第四方面、 第一种可能的实施方式、 第二种可能的实施方式和第三 种可能的实施方式, 在第四种可能的实施方式中, 该解码单元还用于对位于 该目标图像子块之间的边界附近的像素进行去块效应滤波处理。
结合第四方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式和第四种可能的实施方式, 在第五种可能的实施方式中, 该解码单元具体用于从目标码流中, 获取第一指示信息, 其中, 该第一指示 信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相 邻。
结合第四方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式、 第四种可能的实施方式和第五种可能的实施方式, 在第 六种可能的实施方式中, 该解码单元具体用于根据该增强层图像中位于预设 位置的参考图像块是否使用参考信息进行解码, 确定上下文; 用于根据该上 下文, 进行熵解码, 以确定该第一指示信息。
第五方面, 提供了一种用于图像处理的编码器, 该编码器包括: 总线; 与该总线相连的处理器; 与该总线相连的存储器; 其中, 该处理器通过该总 线, 调用该存储器中存储的程序, 以用于当确定与目标图像块的第一目标图 像子块相对应的第一基本层图像子块的运动信息为空时,根据该目标图像块 的大小、该目标图像块包括的每个目标图像子块的大小和用于指示第一目标 图像子块在该目标图像块中的位置的第二指示信息, 确定第二目标图像子 块; 用于根据该第二目标图像子块的运动信息, 确定用于对该第一目标图像 子块进行编码的第一参考信息, 其中, 该第一基本层图像子块是位于基本层 图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增 强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与 该第一目标图像子块在该增强层图像中的空间位置相对应; 用于对该目标图 像块进行编码, 以生成目标码流以及包含于该目标码流中的第一指示信息。
在一种可能的实施方式中, 该处理器具体用于根据以下任一公式, 确定 该第二目标图像子块,
Idx2 + idx, %N/(N/2))x2 + (l- Idxl %N /(N / 4)%2))χ N /4 ; Idx2
+ ((l - ldxx %N/(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
结合第五方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该处理器具体用于如果该第二目标图像子块的运动信息为空, 则确定该第一 参考信息为零运动信息。
结合第五方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该处理器具体用于根据该第一参考信息, 对该第一 目标图像子块进行运动补偿处理。
结合第五方面、 第一种可能的实施方式、 第二种可能的实施方式和第三 种可能的实施方式, 在第四种可能的实施方式中, 该处理器具体用于对位于 该目标图像子块之间的边界附近的像素进行去块效应滤波处理。
结合第五方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式和第四种可能的实施方式, 在第五种可能的实施方式中, 该处理器具体用于对该第一指示信息进行熵编码, 以使该第一指示信息在该 目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
结合第五方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式、 第四种可能的实施方式和第五种可能的实施方式, 在第 六种可能的实施方式中, 该处理器具体用于根据该增强层图像中位于预设位 置的参考图像块是否使用参考信息进行编码, 确定上下文; 用于根据该上下 文, 对该第一指示信息进行熵编码。
第六方面, 提供了一种用于图像处理的解码器, 该解码器包括: 总线; 与该总线相连的处理器; 与该总线相连的存储器; 其中, 该处理器通过该总 线,调用该存储器中存储的程序, 以用于从目标码流中,获取第一指示信息; 用于当与目标图像块的第一目标图像子块相对应的第一基本层图像子块的 运动信息为空时, 基于该第一指示信息, 根据该目标图像块的大小、 该目标
图像块包括的每个目标图像子块的大小和用于指示第一目标图像子块在该 目标图像块中的位置的第二指示信息, 确定第二目标图像子块; 用于根据该 第二目标图像子块的运动信息,确定用于对该第一目标图像子块进行解码的 第一参考信息,其中,该第一基本层图像子块是位于基本层图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增强层图像相对应, 且该第一基本图像块子块在该基本层图像中的空间位置与该第一目标图像 子块在该增强层图像中的空间位置相对应; 用于对该目标码流进行解码, 以 获取该目标图像块。
在一种可能的实施方式中, 该处理器具体用于根据以下任一公式, 确定 该第二目标图像子块,
Idx2 + {idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2))χ N /4 ; Idx2
+ ((l - ldxx %N/(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ 1%N/(N/2))x2 + (l-/^%N/(N/4)%2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, /^表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
结合第六方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该处理器具体用于如果该第二目标图像子块的运动信息为空, 则确定该第一 参考信息为零运动信息。
结合第六方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该处理器具体用于根据该第一参考信息, 对该第一 目标图像子块进行运动补偿处理。
结合第六方面、 第一种可能的实施方式、 第二种可能的实施方式和第三 种可能的实施方式, 在第四种可能的实施方式中, 该处理器具体用于对位于 该目标图像子块之间的边界附近的像素进行去块效应滤波处理。
结合第六方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式和第四种可能的实施方式, 在第五种可能的实施方式中, 该处理器具体用于从目标码流中, 获取第一指示信息, 其中, 该第一指示信 息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
结合第六方面、 第一种可能的实施方式、 第二种可能的实施方式、 第三 种可能的实施方式、 第四种可能的实施方式和第五种可能的实施方式, 在第
六种可能的实施方式中, 该处理器具体用于根据该增强层图像中位于预设位 置的参考图像块是否使用参考信息进行解码, 确定上下文; 用于根据该上下 文, 进行熵解码, 以确定该第一指示信息。
第七方面, 提供了一种用于图像处理的方法, 该方法包括: 当确定与目 标图像块的第一目标图像子块相对应的第一基本层图像子块的运动信息为 空时, 根据该第一基本层图像子块的重建像素, 确定用于对该第一目标图像 子块进行编码的第二参考信息, 其中, 该第一基本层图像子块是位于基本层 图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增 强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与 该第一目标图像子块在该增强层图像中的空间位置相对应; 对该目标图像块 进行编码, 以生成目标码流以及包含于该目标码流中的第四指示信息。
在一种可能的实施方式中, 该对该目标图像块进行编码包括: 对位于该 目标图像子块之间的边界附近的像素进行去块效应滤波处理。
结合第七方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该对该目标图像块进行编码包括: 对该第四指示信息进行熵编码, 以使该第 四指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信 息相邻。
结合第七方面、 第一种可能的实施方式和第二种可能的实施方式, 该对 该目标图像块进行编码包括: 根据该增强层图像中位于预设位置的参考图像 块是否使用参考信息进行编码, 确定上下文; 根据该上下文, 对该第四指示 信息进行熵编码。
第八方面, 提供了一种用于图像处理的方法, 该方法包括: 从目标码流 中, 获取第四指示信息; 当确定与目标图像块的第一目标图像子块相对应的 第一基本层图像子块的运动信息为空时, 基于该第四指示信息, 根据该第一 基本层图像子块的重建像素,确定用于对该第一目标图像子块进行编码的第 二参考信息, 其中, 该第一基本层图像子块是位于基本层图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增强层图像相对应, 且该第一基本图像块子块在该基本层图像中的空间位置与该第一目标图像 子块在该增强层图像中的空间位置相对应; 对该目标码流进行解码, 以获取 该目标图像块。
在一种可能的实施方式中, 该对该目标码流进行解码包括: 对位于该目
标图像子块之间的边界附近的像素进行去块效应滤波处理。
结合第八方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该从目标码流中, 获取第四指示信息, 包括: 从目标码流中, 获取第四指示 信息, 其中, 该第四指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
结合第八方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该从目标码流中, 获取第四指示信息, 包括: 根据 该增强层图像中位于预设位置的参考图像块是否使用参考信息进行解码,确 定上下文; 根据该上下文, 进行熵解码, 以确定该第四指示信息。
第九方面, 提供了一种用于图像处理的装置, 该装置包括: 获取单元, 用于当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 根据该第一基本层图像子块的重建像素, 确定用于对 该第一目标图像子块进行编码的第二参考信息, 其中, 该第一基本层图像子 块是位于基本层图像中的图像块, 该目标图像块位于增强层图像中, 该的基 本层图像与该增强层图像相对应,且该第一基本图像块子块在该基本层图像 中的空间位置与该第一目标图像子块在该增强层图像中的空间位置相对应; 编码单元, 用于对该目标图像块进行编码, 以生成目标码流以及包含于该目 标码流中的第四指示信息。
在一种可能的实施方式中,该编码单元具体用于对位于该目标图像子块 之间的边界附近的像素进行去块效应滤波处理。
结合第九方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该编码单元具体用于对该第四指示信息进行熵编码, 以使该第四指示信息在 该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
结合第九方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该编码单元具体用于根据该增强层图像中位于预设 位置的参考图像块是否使用参考信息进行编码, 确定上下文; 用于根据该上 下文, 对该第四指示信息进行熵编码。
第十方面, 提供了一种图像处理的装置, 该装置包括: 解码单元, 用于 从目标码流中, 获取第四指示信息; 获取单元, 用于当确定与目标图像块的 第一目标图像子块相对应的第一基本层图像子块的运动信息为空时,基于该 解码单元获取的第四指示信息, 根据该第一基本层图像子块的重建像素, 确
定用于对该第一目标图像子块进行编码的第二参考信息, 其中, 该第一基本 层图像子块是位于基本层图像中的图像块, 该目标图像块位于增强层图像 中, 该的基本层图像与该增强层图像相对应, 且该第一基本图像块子块在该 基本层图像中的空间位置与该第一目标图像子块在该增强层图像中的空间 位置相对应; 该编码单元还用于对该目标码流进行解码, 以获取该目标图像 块。
在一种可能的实施方式中,该解码单元具体用于对位于该目标图像子块 之间的边界附近的像素进行去块效应滤波处理。
结合第十方面和第一种可能的实施方式, 在第二种可能的实施方式中, 该解码单元具体用于从目标码流中, 获取第四指示信息, 其中, 该第四指示 信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相 邻。
结合第十方面、 第一种可能的实施方式和第二种可能的实施方式, 在第 三种可能的实施方式中, 该解码单元具体用于根据该增强层图像中位于预设 位置的参考图像块是否使用参考信息进行解码, 确定上下文; 用于根据该上 下文, 进行熵解码, 以确定该第四指示信息。
第十一方面,提供了一种用于图像处理的编码器,该编码器包括: 总线; 与该总线相连的处理器; 与该总线相连的存储器; 其中, 该处理器通过该总 线, 调用该存储器中存储的程序, 以用于当确定与目标图像块的第一目标图 像子块相对应的第一基本层图像子块的运动信息为空时,根据该第一基本层 图像子块的重建像素,确定用于对该第一目标图像子块进行编码的第二参考 信息, 其中, 该第一基本层图像子块是位于基本层图像中的图像块, 该目标 图像块位于增强层图像中, 该的基本层图像与该增强层图像相对应, 且该第 一基本图像块子块在该基本层图像中的空间位置与该第一目标图像子块在 该增强层图像中的空间位置相对应; 对该目标图像块进行编码, 以生成目标 码流以及包含于该目标码流中的第四指示信息。
在一种可能的实施方式中,该处理器具体用对位于该目标图像子块之间 的边界附近的像素进行去块效应滤波处理。
结合第十一方面和第一种可能的实施方式, 在第二种可能的实施方式 中, 该处理器具体用于对该第四指示信息进行熵编码, 以使该第四指示信息 在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
结合第十一方面、 第一种可能的实施方式和第二种可能的实施方式, 在 第三种可能的实施方式中, 该处理器具体用于根据该增强层图像中位于预设 位置的参考图像块是否使用参考信息进行编码, 确定上下文; 用于根据该上 下文, 对该第四指示信息进行熵编码。
第十二方面,提供了一种用于图像处理的解码器,该解码器包括: 总线; 与该总线相连的处理器; 与该总线相连的存储器; 其中, 该处理器通过该总 线,调用该存储器中存储的程序, 以用于从目标码流中,获取第四指示信息; 用于当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 基于该第四指示信息, 根据该第一基本层图像子块的 重建像素,确定用于对该第一目标图像子块进行编码的第二参考信息,其中, 该第一基本层图像子块是位于基本层图像中的图像块, 该目标图像块位于增 强层图像中, 该的基本层图像与该增强层图像相对应, 且该第一基本图像块 子块在该基本层图像中的空间位置与该第一目标图像子块在该增强层图像 中的空间位置相对应; 用于对该目标码流进行解码, 以获取该目标图像块。
在一种可能的实施方式中,该处理器具体用于对位于该目标图像子块之 间的边界附近的像素进行去块效应滤波处理。
结合第十二方面和第一种可能的实施方式, 在第二种可能的实施方式 中, 该处理器具体用于从目标码流中, 获取第四指示信息, 其中, 该第四指 示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相 邻。
结合第十二方面、该处理器具体用于根据该增强层图像中位于预设位置 的参考图像块是否使用参考信息进行解码,确定上下文;用于根据该上下文, 进行熵解码, 以确定该第四指示信息。
根据本发明实施例的用于图像处理的方法和装置,对于增强层图像的目 标图像块中不能从基本层图像包括的对应子块获得运动信息的第一目标图 像子块, 通过根据所述第一目标图像子块的位置确定第二目标图像子块, 并 根据该第二目标图像子块的运动信息或在空间位置上与该第一目标图像子 块相对应的第一基本层图像子块的重建像素,确定针对该第一目标图像子块 的参考信息, 并根据该参考信息进行编码, 能够提高该第一目标图像子块的 编码性能。
附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作筒单地介绍, 显而易见地, 下面所描述的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1是根据本发明一实施例的用于图像处理的方法的示意性流程图。 图 2是根据本发明一实施例的子块划分与子块索引的示意图.
图 3是根据本发明另一实施例的用于图像处理的方法的意性流程图。 图 4是根据本发明一实施例的用于图像处理的装置的示意性框图。
图 5是根据本发明另一实施例的用于图像处理的装置的示意性框图。 图 6是根据本发明一实施例的用于图像处理的编码器的示意性框图。 图 7是根据本发明另一实施例的用于图像处理的解码器的示意性框图。 图 8是根据本发明再一实施例的用于图像处理的方法的示意性流程图 图 9是根据本发明再一实施例的用于图像处理的方法的示意性流程图 图 10是根据本发明再一实施例的用于图像处理的装置的示意性框图。 图 11是根据本发明再一实施例的用于图像处理的装置的示意性框图。 图 12是根据本发明再一实施例的用于图像处理的编码器的示意性框图。 图 13是根据本发明再一实施例的用于图像处理的解码器的示意性框图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创 造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
图 1示出了从编码端角度描述的根据本发明实施例的用于图像处理的方 法 100的示意性流程图。 如图 1所示, 该方法 100包括:
S110, 当确定与目标图像块的第一目标图像子块相对应的第一基本层图 像子块的运动信息为空时, 根据该目标图像块的大小、 该目标图像块包括的 每个目标图像子块的大小和用于指示第一目标图像子块在该目标图像块中 的位置的第二指示信息, 确定第二目标图像子块;
S120, 根据该第二目标图像子块的运动信息, 确定用于对该第一目标图
像子块进行编码的第一参考信息, 其中, 该第一基本层图像子块是位于基本 层图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该 增强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置 与该第一目标图像子块在该增强层图像中的空间位置相对应;
S130, 对该目标图像块进行编码, 以生成目标码流以及包含于该目标码 流中的第一指示信息。
具体地说, 在对图像进行分层编码, 例如, 在空间可伸缩编码时, 可以 将图像进行将分辨率处理得到低分辨率图像,作为对比将原图像称作高分辨 率图像, 编码器分别对该低分辨率图像以及该高分辨率图像进行编码。 为方 便描述, 本文中将质量高的待编码图像称作增强层图像, 将对应的质量低的 待编码图像(例如所述低分辨率图像)称作基本层图像。
在本发明实施例中, 目标图像是使用分层编码技术进行处理的图像, 基 本层是指分层编码中的质量(包括帧速率、 空间分辨率、 时间分辨率、 信噪 比强度或质量等级等参数)较低的层, 增强层是指分层编码中的质量(包括 帧速率、 空间分辨率、 时间分辨率、 信噪比强度或质量等级等参数)较高的 层。 需要说明的是, 在本发明实施例中, 在本发明实施例中, 对于一个给定 的增强层, 与其相对应的基本层可以为质量低于该增强层的任一层, 例如, 如果当前存在五层, 编码质量依次提高 (即, 第一层质量最低, 第五层质量 最高), 如果增强层为第四层, 则基本层可以是第一层, 也可以是第二层、 也可以是第三层、 也可以是第四层。 同理, 对于一个给定的基本层, 与其相 对应的增强层可以为质量低于该基本层的任一层。
增强层图像为当前处理的增强层中的图像,基本层图像为基本层中与增 强层图像在同一时刻的图像。
综上所述, 在本发明实施例中, 该基本层图像的质量低于该增强层图像 的质量。
目标图像块为该增强层图像中正在处理的图像块。
基本层图像块为基本层图像中与该目标图像块在空间位置上存在对应 关系的图像块。
在本发明实施例中,基本层中的图像块与增强层中的图像块的对应关系 可以根据基本层图像与增强层图像之间的分辨率比例关系计算得到。 例如, 在包括 X方向和 y方向的系统内,如果增强层图像在 X方向与 y方向的分辨
率分别 本层图像的 2倍,则对于增强层中左上角的像素坐标为(2x, 2y) 且大小为(2m) X (2n)的图像块, 其基本层图像中的对应块可以是左上角 的像素坐标为 (X, y)且大小为 mxn的图像块。
在本发明实施例中, 后述子块是指目标图像块的子块(增强层内的图像 块), 后述对应子块是指该子块的在基本层中对应的图像块。
在本发明实施例中, 运动信息可以包括预测方向、 参考图像索引或运动 矢量中的一个或多个, 其中, 预测方向可分为单向和双向预测, 单向预测又 可以分为前向预测与后向预测, 前向预测指使用前向参考图像列表, 即列表 (list) 0中的参考图像产生预测信号, 后向预测指使用后向参考图像列表, 即 list 1中的参考图像产生预测信号, 双向预测指同时使用 list 0和 list 1中 的参考图像产生预测信号;对于单向预测,需要一个参考图像索引指示在 list 0或 listl中所选择的参考图像, 对于双向预测, 需要两个参考图像索引, 分 别指示在 list 0与 list 1中所选择的参考图像; 每一个运动矢量包括水平方向 分量 X和竖直方向分量 y, 可记作(X, y ), 对于单向预测, 需要一个运动矢 量指示预测信号在所选择的 list 0或 list 1参考图像中的位移,对于双向预测, 需要两个运动矢量,分别指示前向预测信号与后向预测信号在所选择的 listO 参考图像与 list 1参考图像中的位移。
在本发明实施例中, 目标图像块可以看作由至少两个子块(即, 目标图 像子块)构成的, 其中, 该子块的大小可以根据预设值确定, 为了便于说明, 以下, 以子块大小为 4x4为例进行说明。 例如, 如果目标图像块的大小为 16x 16, 则可以确定该目标图像块包括 16个子块(大小为 4x4)。 从而, 在 本发明实施例中,可以确定该目标图像块中的每一个子块在基本层中的对应 子块(属于该对应图像块), 并确定该对应子块的运动信息。
在本发明实施例中, 可以根据子块中的某一像素点的坐标 (记作: u {Ex,Ey) n ), 确定该像素点在基本层图像中对应位置的坐标 (记作: u(Bx,Byy ), 并将包含所属对应的位置坐标的基本层中的图像块作为所述对 应子 , 可以按照以下式 1和式 2计算得到 (^,^):
( E X D + R λ
其中, Ro m )表示截断小数部分的操作, 和 表示偏移量, 可以按 照以下式 3计算得到 Rx , 按照以下式 4计算得到 Ry
RX =T 5 (3)
Ry = 2s- 5 ( 4 )
其中, S是精度控制因子(例如, 在本发明实施例, 可以设置为 16), 可以按照以下式 5计算得到 Dr , 按照以下式 6计算得到 Dy
l^BaseWidth
Dv = Round (5)
ScaledBase Width
T * BaseHeight
D = Round (6)
ScaledBaseHeight 其中, ^表示基本层图像的宽, BiweH gfe表示基本层图像的高, ScaledBaseWidth表示增强层图像的宽, 以及 ScaledBaseHeight表示增强层图像的 高。
从而, 可以确定该对应子块, 并且, 在该对应子块包括运动信息的情况 下, 可以直接使用该运动信息中的预测方向和参考图像索引作为该子块(第 一目标图像子块) 的预测方向与参考图象索引。 可以根据以下式 7至式 10, 对该对应子块的运动矢量
)进行缩放, 并将缩放后的运动矢量作 为该子块(第一目标图像子块) 的运动矢量 (EMVx,EMV^。
EMVx = (BMVx x ScaledBaseWidth + RBW)/ BaseWidth ( 7 )
EMVy = (BMVy x ScaledBaseHeight + RBH ) I BaseHeight ( 8 )
RBW = sgn(BMVx ) * BaseWidth 12 ( 9 )
RBH = sgn(BMVy ) * BaseHeight 12 ( 10)
其中, sgn(x)是符号函数, 可以获取 x的符号。
这里, 需要说明的是, 如果基本层图像与增强层图像的分辨率相同, 则 无需进行上述的缩放操作, 而可以直接使用对应子块的运动信息作为子块的 运动信息。
通过以上方法, 可以确定目标图像块中能从基本层图像包括的对应子块 获得运动信息的子块。
从而, 对于能够从基本层图像包括的对应子块获得运动信息的子块, 可 以将其对应子块的运动信息
可选地, 在本发明实施例中, 该方法还包括:
根据所述基本层图像的编码模式,确定与第一目标图像子块相对应的第 一基本层图像子块是否包括运动信息。
具体地说,在本发明实施例中,可以根据所述基本层图像(对应图像块) 的编码模式确定该对应子块是否包含有运动信息。 例如, 如果基本层图像使 用帧内预测编码模式, 则可以确定该对应子块不包含运动信息(即, 第一基 本层图像子块的运动信息为空)。
从而, 在该对应子块包括运动信息时, 可以按如上所述过程确定该对应 子块并获取其运动信息, 在该对应子块不包括运动信息时, 可以跳过以上流 程。
对于不能从基本层图像包括的对应子块获得运动信息的子块(即, 第一 目标图像子块), S110, 可以通过以下方法 1 , 确定第二目标图像子块, 并 S120, 根据该第二目标图像子块的运动信息, 获取第一参考信息。
方法 1
可以为该目标图像子块填充运动信息,从而可以以该填充的运动信息作 为参考信息。
下面, 详细说明本发明实施例中, 填充运动信息的方法。
具体地说, 不失一般性, 例如, 如果目标图像块的大小为 16 x 16, 子块 的大小为 4 x 4,在本发明实施例中,子块的索引分配方法可以与现有技术相 同, 这里, 省略其说明, 图 2所示了子块的划分与索引。
在本发明实施例中, 可以根据目标图像块的大小和子块的大小, 确定处 理层次, 并按处理层次逐层递推处理。 例如, 在本发明实施例中, 可以规定 最底层的层次(记作, 第一层) 中的每个处理单元(记作, 第一处理单元) 包括四个子块, 第一层的上一层次(记作第二层) 的每个处理单元(记作, 第二处理单元) 包括四个第一处理单元, 以此类推, 为了避免赘述, 省略递 推说明。 从而, 作为示例而非限定, 在图 2所示的目标图像块中, 可以包括 两个层次, 第一层中, 子块 0~子块 3构成了第一处理单元 0, 子块 4~子块 7 构成了第一处理单元 1 , 子块 8~子块 11构成了第一处理单元 2, 子块 12~子 块 15构成了第一处理单元 3。 第二层中, 第一处理单元 0~第一处理单元 3 构成了第二处理单元 0。应理解, 以上列举的层次划分方法仅为示例性说明, 本发明并不限定于此。
在本发明实施例中, 对于每一个第一处理单元, 可以按照子块的索引号
(例如, 从小到大)依次判定各子块的运动信息是否为空, 如果该子块的运 动信息为空, 则可以基于该第一处理单元内与其相邻的子块(第二目标图像 子块的一例)的运动信息确定其运动信息。 例如, 如果索引为 0的子块(即, 子块 0, 属于第一处理单元 0 ) 的运动信息为空, 可以获取属于同一个处理 单元(第一处理单元 0 ) 内其他子块的运动信息, 并将该运动信息作为该子 块 0的运动信息。 获取顺序可以为, 例如, 首先获取索引为 1的子块(子块 1 , 即, 第二目标图像子块的一例, 在水平方向上与子块 0相邻) 的运动信 息, 如果子块 1的运动信息为空, 则可以再获取索引为 2 (子块 2, 即, 第 二目标图像子块的另一例,在竖直方向上与子块 0相邻)的子块的运动信息, 如果子块 2的运动信息为空, 则可以再获取索引为 3 (子块 3 , 即, 第二目 标图像子块的再一例, 在对角线方向上与子块 0相邻) 的子块的运动信息。 同理, 对于各运动信息为空的子块, 均可以通过以上方法对其运动信息进行 填充。 应理解, 以上列举的对运动信息为空的子块的运动信息填充方法仅为 示例性说明, 本发明并不限定于此, 例如, 对于上述获取顺序, 也可以先获 取竖直方向上的规定子块(这里, 为相邻子块)的运动信息, 再获取水平方 向上的规定子块(这里, 为相邻子块)的运动信息, 再获取对角线方向上的 规定子块(这里, 为相邻子块)的运动信息。 即, 该获取顺序可以任意变更。
从而, 经上述在第一层内进行的处理, 对各第一处理单元内的各子块进 行上述处理后, 只要该第一处理单元内的四个子块中有至少一个子块的运动 信息不为空, 就可以为该第一处理单元内所有运动信息为空的子块填充(或 者说, 获得)运动信息。
需要说明的是, 对于已根据上述方法填充了运动信息的子块, 在后续处 理中需要使用该子块的运动信息时, 可以直接使用为该子块填充的运动信 息。 即, 第二目标图像子块的运动信息可以是指该第二目标图像子块的基本 层对应子块的运动信息,也可以是根据本发明实施例的填充运动信息的方法 为该第二目标图像子块填充的 (来自其他增强层子块的)运动信息。
因此, 当确定某一个子块(例如, 子块 0 ) 的对应子块不包括运动信息 时, 可以从第一层中与该子块 0处于同一第一处理单元(例如, 第一处理单 元 0 ) 的其他子块(例如, 子块 1~子块 3 )获取运动信息。 当与该子块(例 如, 子块 0 )处于同一第一处理单元(例如, 第一处理单元 0 ) 的其他子块 (第一层内的规定子块, 例如, 子块 1~子块 3 )的运动信息为空, 则可以获
取第二处理单元内的规定第一处理单元(例如,第一处理单元 1~第一处理单 元 3 ) 中规定子块(第二目标图像子块的另一例) 的运动信息, 并将该运动 信息作为该子块(例如, 子块 0 ) 的运动信息。
即, 如果一个第一处理单元(例如, 第一处理单元 0 ) 内的所有子块的 对应子块均为空, 则可以获取第二处理单元内的其他第一处理单元(例如, 第一处理单元 1~第一处理单元 3 ) 内的规定子块(为了便于说明, 在本发明 以各第一处理单元左上角的子块为例进行说明)的运动信息, 并将该运动信 息作为该第一处理单元(第一处理单元 0 ) 内各子块的运动信息。 获取顺序 可以为, 例如, 首先获取索引为 1的第一处理单元(第一处理单元 1 , 其在 水平方向上与第一处理单元 0相邻) 的左上角的子块(子块 4 , 即, 第二目 标图像子块的一例)的运动信息, 如果子块 4的运动信息为空, 则可以认为 该第一处理单元 1内其他子块的运动信息也为空, 从而可以再获取索引为 2 的第一处理单元(第一处理单元 2 ,其在竖直方向上与第一处理单元 0相邻) 的左上角的子块(子块 8 , 即, 第二目标图像子块的另一例) 的运动信息, 如果子块 8的运动信息为空, 则可以认为该第一处理单元 2内其他子块的运 动信息也为空,从而可以再获取索引为 3的第一处理单元(第一处理单元 3 , 其在对角线方向上与第一处理单元 0相邻) 的左上角的子块(子块 12 , 即, 第二目标图像子块的再一例)的运动信息。 同理, 对于各运动信息为空的第 一处理单元, 均可以通过以上方法对其运动信息进行填充。 应理解, 以上列 举的对运动信息为空的子块的运动信息填充方法仅为示例性说明, 本发明并 不限定于此, 例如, 对于上述获取顺序, 也可以先获取竖直方向上的规定第 一处理单元(这里, 为相邻第一处理单元)的规定子块的运动信息, 再获取 水平方向上的规定第一处理单元(这里, 为相邻第一处理单元)的规定子块 的运动信息, 再获取对角线方向上的规定第一处理单元(这里, 为相邻第一 处理单元) 的规定子块的运动信息。 即, 该获取顺序可以任意变更。 并且, 作为上述 "规定子块" 并不限定于第一处理单元左上角的子块, 也可以是同 一第一处理单元内任意位置的子块。
需要说明的是, 由于上述列举的目标图像块的大小为 16 x 16 ,子块的大 小为 4 x 4 , 因此该目标图像块仅包括两层, 上述递归过程结束。但是目标图 像块的大小为更大, 例如, 32 x 32 , 而子块的大小为 4 x 4 , 则该目标图像块 包括三层, 可以按照与上述相同的方法继续进行递归操作, 为当目标图像块
的所有子块获取运动信息。
可选地, 该根据目标图像块的大小、 该目标图像块包括的目标图像子块 的大小和用于指示第一目标图像子块在该目标图像块中的位置的第二指示 信息, 确定第二目标图像子块, 包括:
根据以下任一公式, 确定该第二目标图像子块,
Idx2 + {idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2))χ N /4 ; Idx2
+ ((l - ldxx %N/(N/2))x2 + {ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, /^表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三索引信息, /^表示该第二索引信息, %表示模运算或取余操作, N表 示该目标图像块包括的子块的数量。
具体地说, 根据上述各公式可以根据当前正在处理的子块的索引, 确定 当前处理的层次内的第二目标图像子块,其中 Ν与当前正在处理的层次相对 应, 并且, Ν是根据目标图像块的大小和子块的大小确定的, 例如, 如果目 标图像块的大小为 16x 16, 子块的大小为 4x4, 则如上所述该目标图像块 包括两层, 在处理第一层时, Ν为该层中各处理单元(第一处理单元) 包括 的子块数量, 这里为 4。 在处理第二层时, Ν为该层中各处理单元(第二处 理单元) 包括的子块数量, 这里为 16。
以上, 列举了当上述 "规定子块" 为所述处理单元的左上角子块时, 所 使用的公式。 但本发明并不限定与此, 还可以根据 "规定子块" 所述处理单 元中的位置, 对上述公式进行变更。
可选地, 该根据该第二目标图像子块的运动信息, 确定该第一目标图像 子块的第一参考信息, 包括:
如果该第二目标图像子块的运动信息为空, 则确定该第一参考信息为零 运动信息。
具体地说, 如果经上述处理后, 不能为该子块填充运动信息, 则使用零 运动信息作为该子块的运动信息。 在本发明实施例中, 可以按照以下方法构 造零运动信息。 例如, 在预测编码图像帧 (P帧) 中, 零运动信息的预测方
向为单向预测, 参考图像索引为 0, 运动矢量(0, 0 )。 在双向预测编码图像 帧 (B帧) 中, 零运动信息的预测方向为双向预测, 两个参考图像索引均为 0, 两个运动矢量均为 (0, 0 )。
需要说明的是, 当目标图像块包括多个处理层次, 上述使用零运动信息 作为该子块的运动信息的方法, 可以在对最后一个层次进行处理后进行, 也 可以在对其他任一层次进行处理后进行, 本发明并未特别限定。 应理解, 以 上列举的获取子块的运动信息的方法仅为本发明的示例性说明,本发明并不 限定于此, 例如, 在本发明是示例中, 还可以如上所述, 根据所述基本层图 像(对应图像块) 的编码模式确定该对应子块是否包含有运动信息。 例如, 如果基本层图像使用帧内预测编码模式, 则可以确定该对应子块不包含运动 信息 (即, 第一基本层图像子块的运动信息为空)。 如果确定目标图像块的 所有子块中只有一个子块(具体地说, 是其对应子块)具有运动信息, 则可 以将该子块的运动信息作为其他子块的运动信息。
由此, 通过上述方法, 可以确定第一目标图像子块的第一参考信息。 在 S130中, 在通过上述方法 1获取第一目标图像块(基本层中对应的 子块不包括运动信息) 的第一参考信息。
可选地, 该对该目标图像块进行编码, 包括:
根据该第一参考信息, 对该第一目标图像子块进行运动补偿处理。
具体地说, 还可以根据第一目标图像子块的参考信息(具体地说是运动 信息), 对该第一目标图像子块进行编码(具体地说, 是运动补偿处理)。 具 体地说, 可以根据如上所述为该第一目标图像子块获取或填充的运动信息, 对该第一目标图像子块进行独立的运动补偿处理。
在本发明实施例中, 还可以获取第三目标图像块(基本层中对应的子块 包括运动信息)的运动信息, 获取该第三目标图像块的运动信息的方法可以 与现有技术相同, 这里省略其说明。
从而, 在对目标图像块的所有子块进行运动补偿处理后, 获取目标图像 块的预测信号后,可以对目标图像块进行预测编码,从而计算出率失真代价。 可以计算出目标图像块的失真率代价后, 如果该失真率代价最小, 则可以确 定一个指示标识(第一指示信息), 以指示解码端, 通过上述方法 1和方法 2 获取第一目标图像块的参考信息, 并获取第三目标图像块(基本层中对应的 子块包括运动信息) 的运动信息。 并对该第一指示信息进行熵编码。
可选地, 该根据该参考信息, 对该第一目标图像子块进行编码, 包括: 对该第一指示信息进行熵编码, 以使该第一指示信息在该目标码流中与 跳过模式标志位或融合 MERGE模式标志位信息相邻。
具体地说, 在本发明实施例中, 在目标码流中, 可以将第一指示信息配 置在与跳过模式标志位信息相邻的位置。 具体地说,
例如, 可以将第一指示信息置于跳过模式标志位信息之前作为目标图像 块在目标码流中的第一个信息,还可以将第一指示信息置于跳过模式标志位 信息之后作为目标图像块在目标码流中的第二个信息。上述跳过模式可以是 与现有技术相同的模式,其确定方法与配置位置可以与现有技术相同,这里, 为了避免赘述, 省略其说明。
再例如, 可以将第一指示信息置于与 MERGE模式标志位信息相邻的位 置。 具体的, 可以将第一指示信息置于 MERGE模式标志位信息之前, 还可 以将第一指示信息置于 MERGE模式标志位信息之后。所述 MERGE可以是 与现有技术相同的模式,其确定方法与配置位置可以与现有技术相同,这里, 为了避免赘述, 省略其说明。
在本发明实施例中, 该第一指示信息可以是一个二进制标志位。 因此, 在对第一指示信息进行熵编码时, 无需对第一指示信息进行二值化处理。
其后, 可以选择用于对二值化的第一指示信息进行熵编码时使用的上下 文, 可选地, 该根据该参考信息, 对该第一目标图像子块进行编码, 包括: 根据该增强层图像中位于预设位置的参考图像块是否使用参考信息进 行编码, 确定上下文;
根据该上下文, 对该第一指示信息进行熵编码。
具体地说。 如以下表 1所示, 该上下文可以包含 0、 1、 2三个上下文。 本实施例根据左边和上方的图像块是否使用基本层模式来确定使用哪一个 上下文。 在本实施例中, 例如, 可以根据目标图像块左边和上方的图像块是 否使用其各自的第一指示信息, 确定使用哪一种上下文, 例如, 如果目标图 像块左边和上方的图像块都不使用第一指示信息, 那么选择索引为 0的上下 文模型, 如果目标图像块左边和上方的图像块有一个使用第一指示信息, 那 么选择索引为 1的上下文模型,如果目标图像块左边和上方的图像块都使用 第一指示信息, 那么选择索引为 2的上下文。 表 1
0 1 2 帧内编码片 未定义(或未使用) CNU CNU
( I slice ) ( CNU, Context Not Used ) 预测编码片 197 185 201
P slice 双向预测编码片 197 185 201
B slice
其后, 可以根据如上所述选择的上下文对该第一指示信息进行二进制算 术编码, 并更新所使用的上下文模型。 在本发明实施例中, 该过程可以与现 有技术相同, 这里为了避免赘述, 省略其说明。
在本发明实施例中, 可以根据所获得的参考信息, 对各第一目标图像子 块进行编码, 进而完成对目标图像块的编码, 并将生成的目标图像块的信息 以及上述熵编码后的第一指示信息加入码流(目标码流)。
这里,需要说明的是,在该目标码流中,可以包括编码后的目标图像(包 括基本层图像和增强层图像)信息,并且,该处理过程可以与现有技术相同, 这里, 为了避免赘述, 省略其说明。
在解码端, 可以从码流中获取目标图像信息, 并确定目标图像(具体地 说, 是目标图像块), 对获取的第一指示信息 (熵编码后的信息)进行熵解 同或相似, 这里省略其说明。
可以根据选择的上下文从码流中解析得到表示第一指示信息的二进制 符号字串 (bin string )。 其中, 该二进制算术解码与编码端的二进制算术编 码相对应。
在本发明实施例中, 可以规定, 例如, 当第一指示信息为 1时, 则解码 端需要使用与编码端相同的方法获取第一目标图像子块的第一参考信息, 则 解码端需要使用与编码端相同的方法获取第一目标图像子块的第一参考信 息。
应理解, 以上列举的第一指示信息的指示方法仅为示例性说明, 本发明 并不限定于此。
需要说明的是, 在本发明实施例中, 在使用方法 1获取第一目标图像子 块的参考信息时, 可以根据第一目标图像子块的参考信息(具体地说是运动 信息), 对该第一目标图像子块进行解码(具体地说, 是运动补偿处理)。 具 体地说, 可以根据如上所述为该第一目标图像子块填充的运动信息, 对该第 一目标图像子块进行独立的运动补偿处理。
可选地, 该对该目标图像块进行编码包括:
对位于该目标图像子块之间的边界附近的像素进行去块效应滤波处理。 具体地说,还可以对目标图像块的各子块间的边界附近像素进行滤波处 理。
根据本发明实施例的用于图像处理的方法,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据该第二 目标图像子块的运动信息, 确定针对该第一目标图像子块的第一参考信息, 并根据该第一参考信息进行编码, 能够提高该第一目标图像子块的编码性 能。
图 3示出了从解码端角度描述的根据本发明实施例的用于图像处理的方 法 200的示意性流程图。 如图 2所示, 该方法 200包括:
S210, 从目标码流中, 获取第一指示信息;
S220 , 当与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 基于该第一指示信息, 根据该目标图像块的大小、 该 目标图像块包括的每个目标图像子块的大小和用于指示第一目标图像子块 在该目标图像块中的位置的第二指示信息, 确定第二目标图像子块;
S230, 根据该第二目标图像子块的运动信息, 确定用于对该第一目标图 像子块进行解码的第一参考信息, 其中, 该第一基本层图像子块是位于基本 层图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该 增强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置 与该第一目标图像子块在该增强层图像中的空间位置相对应;
S230, 对该目标码流进行解码, 以获取该目标图像块。
具体地说, 在 S210, 解码端可以从码流中获取目标图像信息, 并确定 目标图像(具体地说, 是目标图像块), 并获取的第一指示信息 (熵编码后 的信息)。
可选地, 该从目标码流中, 获取第一指示信息, 包括:
从目标码流中, 获取第一指示信息, 其中, 该第一指示信息在该目标码 流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
具体地说, 在本发明实施例中, 在目标码流中, 可以将第一指示信息配 置在与跳过模式标志位信息相邻的位置。 具体地说,
例如, 可以将第一指示信息置于跳过模式标志位信息之前作为目标图像 块在目标码流中的第一个信息,还可以将第一指示信息置于跳过模式标志位 信息之后作为目标图像块在目标码流中的第二个信息。上述跳过模式可以是 与现有技术相同的模式,其确定方法与配置位置可以与现有技术相同,这里, 为了避免赘述, 省略其说明。
再例如, 可以将第一指示信息置于与 MERGE模式标志位信息相邻的位 置。 具体的, 可以将第一指示信息置于 MERGE模式标志位信息之前, 还可 以将第一指示信息置于 MERGE模式标志位信息之后。该 MERGE可以是与 现有技术相同的模式, 其确定方法与配置位置可以与现有技术相同, 这里, 为了避免赘述, 省略其说明。
其后, 解码端可以对获取的第一指示信息进行熵解码。
在本发明实施例中, 该第一指示信息可以是一个二进制标志位。 因此, 在对第一指示信息进行熵解码时, 无需使第一指示信息二值化。
其后, 可以选择用于对二值化的第一指示信息进行熵编码时使用的上下 文, 可选地, 该从目标码流中, 获取第一指示信息, 包括:
根据该增强层图像中位于预设位置的参考图像块是否使用参考信息进 行解码, 确定上下文;
根据该上下文, 进行熵解码, 以确定该第一指示信息。
具体地说。 如以上表 1所示, 该上下文可以包含 0、 1、 2三个上下文。 本实施例根据左边和上方的图像块是否使用基本层模式来确定使用哪一个 上下文。 在本实施例中, 例如, 可以根据目标图像块左边和上方的图像块是 否使用其各自的第一指示信息, 确定使用哪一种上下文, 例如, 如果目标图 像块左边和上方的图像块都不使用第一指示信息, 那么选择索引为 0的上下 文模型, 如果目标图像块左边和上方的图像块有一个使用第一指示信息, 那 么选择索引为 1的上下文模型,如果目标图像块左边和上方的图像块都使用 第一指示信息, 那么选择索引为 2的上下文。
其后, 可以根据如上该选择的上下文对该第一指示信息进行二进制算术 解码, 并更新所使用的上下文模型。 在本发明实施例中, 该过程可以与现有 技术相同, 这里为了避免赘述, 省略其说明。
在本发明实施例中, 可以规定, 例如, 当第一指示信息为 1时, 则解码 端需要使用与编码端相同的方法获取第一目标图像子块的第一参考信息, 则 解码端需要使用与编码端相同的方法获取第一目标图像子块的第一参考信 息。
应理解, 以上列举的第一指示信息的指示方法仅为示例性说明, 本发明 并不限定于此。
因此, 解码端可以根据该第一指示信息, 确定是否需要获取第一目标图 像子块的第一参考信息, 下面, 对编码端需要获取第一目标图像子块的第一 参考信息的情况进行说明。
在对图像进行分层编码, 例如, 在空间可伸缩编码时, 可以将图像进行 将分辨率处理得到低分辨率图像, 作为对比将原图像称作高分辨率图像, 编 码器分别对该低分辨率图像以及该高分辨率图像进行编码。 为方便描述, 本 文中将质量高的待编码图像称作增强层图像,将对应的质量低的待编码图像 (例如该低分辨率图像)称作基本层图像。
在本发明实施例中, 目标图像是使用分层编码技术进行处理的图像, 基 本层是指分层编码中的质量(包括帧速率、 空间分辨率、 时间分辨率、 信噪 比强度或质量等级等参数)较低的层, 增强层是指分层编码中的质量(包括 帧速率、 空间分辨率、 时间分辨率、 信噪比强度或质量等级等参数)较高的 层。 需要说明的是, 在本发明实施例中, 在本发明实施例中, 对于一个给定 的增强层, 与其相对应的基本层可以为质量低于该增强层的任一层, 例如, 如果当前存在五层, 编码质量依次提高 (即, 第一层质量最低, 第五层质量 最高), 如果增强层为第四层, 则基本层可以是第一层, 也可以是第二层、 也可以是第三层、 也可以是第四层。 同理, 对于一个给定的基本层, 与其相 对应的增强层可以为质量低于该基本层的任一层。
增强层图像为当前处理的增强层中的图像,基本层图像为基本层中与增 强层图像在同一时刻的图像。
综上该, 在本发明实施例中, 该基本层图像的质量低于该增强层图像的 质量。
目标图像块为该增强层图像中正在处理的图像块。
基本层图像块为基本层图像中与该目标图像块在空间位置上存在对应 关系的图像块。
在本发明实施例中,基本层中的图像块与增强层中的图像块的对应关系 可以根据基本层图像与增强层图像之间的分辨率比例关系计算得到。 例如, 在包括 X方向和 y方向的系统内,如果增强层图像在 X方向与 y方向的分辨 率分别 本层图像的 2倍,则对于增强层中左上角的像素坐标为(2x, 2y ) 且大小为(2m ) X ( 2n )的图像块, 其基本层图像中的对应块可以是左上角 的像素坐标为 (X , y )且大小为 m x n的图像块。
在本发明实施例中, 后述子块是指目标图像块的子块(增强层内的图像 块), 后述对应子块是指该子块的在基本层中对应的图像块。
在本发明实施例中, 运动信息可以包括预测方向、 参考图像索引或运动 矢量中的一个或多个, 其中, 预测方向可分为单向和双向预测, 单向预测又 可以分为前向预测与后向预测, 前向预测指使用前向参考图像列表, 即列表 ( list ) 0中的参考图像产生预测信号, 后向预测指使用后向参考图像列表, 即 list 1中的参考图像产生预测信号, 双向预测指同时使用 list 0和 list 1中 的参考图像产生预测信号;对于单向预测,需要一个参考图像索引指示在 list 0或 list l中所选择的参考图像, 对于双向预测, 需要两个参考图像索引, 分 别指示在 list 0与 list 1中所选择的参考图像; 每一个运动矢量包括水平方向 分量 X和竖直方向分量 y , 可记作(X , y ) , 对于单向预测, 需要一个运动矢 量指示预测信号在所选择的 list 0或 list 1参考图像中的位移,对于双向预测, 需要两个运动矢量,分别指示前向预测信号与后向预测信号在所选择的 list O 参考图像与 list 1参考图像中的位移。
在本发明实施例中, 目标图像块可以看作由至少两个子块(即, 目标图 像子块)构成的, 其中, 该子块的大小可以根据预设值确定, 为了便于说明, 以下, 以子块大小为 4 x 4为例进行说明。 例如, 如果目标图像块的大小为 16 16, 则可以确定该目标图像块包括 16个子块(大小为 4 x 4 )。 从而, 在 本发明实施例中, 可以确定该目标图像块中的每一个子块(第一目标图像子 块)在基本层中的对应子块(第一基本层图像子块), 并确定该对应子块的 运动信息。
在本发明实施例中, 可以根据子块(第一目标图像子块) 中的某一像素
点的坐标(记作: " (Ex , Ey) " ), 确定该像素点在基本层图像中对应位置的坐 标(记作: " ( 并将包含所属对应的位置坐标的基本层中的图像块 作为所述对应子块(第一基本层图像子块)。 在本发明实施例中, 可以按照 以下公式 1至公式 10计算得到 (βχ, ) :
从而, 可以确定与该第一目标图像子块相对应的第一基本层图像子块, 并且, 在该第一基本层图像子块包括运动信息的情况下, 可以直接使用该运 动信息中的预测方向和参考图像索引作为该子块(第一目标图像子块)的预 测方向与参考图象索引。可以根据以下式 7至式 10,对该第一基本层图像子 块的运动矢量 (βΜ^, βΜ^ )进行缩放,并将缩放后的运动矢量作为该子块(第 一目标图像子块) 的运动矢量 (EMVx, EMVy)。
这里, 需要说明的是, 如果基本层图像与增强层图像的分辨率相同, 则 无需进行上述的缩放操作, 而可以直接使用对应子块的运动信息作为子块的 运动信息。
通过以上方法, 可以确定目标图像块中能从基本层图像包括的对应子块 获得运动信息的子块。
从而, 对于能够从基本层图像包括的对应子块获得运动信息的子块, 可 以将其对应子块的运动信息
可选地, 在本发明实施例中, 该方法还包括:
根据所述基本层图像的编码模式,确定与第一目标图像子块相对应的第 一基本层图像子块是否包括运动信息。
具体地说,在本发明实施例中,可以根据所述基本层图像(对应图像块) 的编码模式确定该对应子块是否包含有运动信息。 例如, 如果基本层图像使 用帧内预测编码模式, 则可以确定该对应子块不包含运动信息(即, 第一基 本层图像子块的运动信息为空)。
从而, 在该对应子块包括运动信息时, 可以按如上该过程确定该对应子 块并获取其运动信息,在该对应子块不包括运动信息时,可以跳过以上流程。
对于不能从基本层图像包括的对应子块获得运动信息的子块(即, 第一 目标图像子块), S220, 可以通过以下方法 2, 确定第二目标图像子块, 并 S230, 根据该第二目标图像子块的运动信息, 获取第一参考信息。
方法 2
可以为该目标图像子块填充运动信息,从而可以以该填充的运动信息作
为参考信息。
下面, 详细说明本发明实施例中, 填充运动信息的方法。
具体地说, 不失一般性, 例如, 如果目标图像块的大小为 16 x 16 , 子块 的大小为 4 x 4 ,在本发明实施例中,子块的索引分配方法可以与现有技术相 同, 这里, 省略其说明, 图 2所示了子块的划分与索引。
在本发明实施例中, 可以根据目标图像块的大小和子块的大小, 确定处 理层次, 并按处理层次逐层递推处理。 例如, 在本发明实施例中, 可以规定 最底层的层次(记作, 第一层) 中的每个处理单元(记作, 第一处理单元) 包括四个子块, 第一层的上一层次(记作第二层) 的每个处理单元(记作, 第二处理单元) 包括四个第一处理单元, 以此类推, 为了避免赘述, 省略递 推说明。 从而, 作为示例而非限定, 在图 2所示的目标图像块中, 可以包括 两个层次, 第一层中, 子块 0~子块 3构成了第一处理单元 0 , 子块 4~子块 7 构成了第一处理单元 1 , 子块 8~子块 11构成了第一处理单元 2 , 子块 12~子 块 15构成了第一处理单元 3。 第二层中, 第一处理单元 0~第一处理单元 3 构成了第二处理单元 0。应理解, 以上列举的层次划分方法仅为示例性说明, 本发明并不限定于此。
在本发明实施例中, 对于每一个第一处理单元, 可以按照子块的索引号 (例如, 从小到大)依次判定各子块的运动信息是否为空, 如果该子块的运 动信息为空, 则可以基于该第一处理单元内与其相邻的子块(第二目标图像 子块的一例)的运动信息确定其运动信息。 例如, 如果索引为 0的子块(即, 子块 0 , 属于第一处理单元 0 ) 的运动信息为空, 可以获取属于同一个处理 单元(第一处理单元 0 ) 内其他子块的运动信息, 并将该运动信息作为该子 块 0的运动信息。 获取顺序可以为, 例如, 首先获取索引为 1的子块(子块 1 , 即, 第二目标图像子块的一例, 在水平方向上与子块 0相邻) 的运动信 息, 如果子块 1的运动信息为空, 则可以再获取索引为 2 (子块 2 , 即, 第 二目标图像子块的另一例,在竖直方向上与子块 0相邻)的子块的运动信息, 如果子块 2的运动信息为空, 则可以再获取索引为 3 (子块 3 , 即, 第二目 标图像子块的再一例, 在对角线方向上与子块 0相邻) 的子块的运动信息。 同理, 对于各运动信息为空的子块, 均可以通过以上方法对其运动信息进行 填充。 应理解, 以上列举的对运动信息为空的子块的运动信息填充方法仅为 示例性说明, 本发明并不限定于此, 例如, 对于上述获取顺序, 也可以先获
取竖直方向上的规定子块(这里, 为相邻子块)的运动信息, 再获取水平方 向上的规定子块(这里, 为相邻子块)的运动信息, 再获取对角线方向上的 规定子块(这里, 为相邻子块)的运动信息。 即, 该获取顺序可以任意变更。
从而, 经上述在第一层内进行的处理, 对各第一处理单元内的各子块进 行上述处理后, 只要该第一处理单元内的四个子块中有至少一个子块的运动 信息不为空, 就可以为该第一处理单元内所有运动信息为空的子块填充(或 者说, 获得)运动信息。
需要说明的是, 对于已根据上述方法填充了运动信息的子块, 在后续处 理中需要使用该子块的运动信息时, 可以直接使用为该子块填充的运动信 息。 即, 第二目标图像子块的运动信息可以是指该第二目标图像子块的基本 层对应子块的运动信息,也可以是根据本发明实施例的填充运动信息的方法 为该第二目标图像子块填充的 (来自其他增强层子块的)运动信息。
因此, 当确定某一个子块(例如, 子块 0 ) 的对应子块不包括运动信息 时, 可以从第一层中与该子块 0处于同一第一处理单元(例如, 第一处理单 元 0 ) 的其他子块(例如, 子块 1~子块 3 )获取运动信息。 当与该子块(例 如, 子块 0 )处于同一第一处理单元(例如, 第一处理单元 0 ) 的其他子块 (第一层内的规定子块, 例如, 子块 1~子块 3 )的运动信息为空, 则可以获 取第二处理单元内的规定第一处理单元(例如,第一处理单元 1~第一处理单 元 3 ) 中规定子块(第二目标图像子块的另一例) 的运动信息, 并将该运动 信息作为该子块(例如, 子块 0 ) 的运动信息。
即, 如果一个第一处理单元(例如, 第一处理单元 0 ) 内的所有子块的 对应子块均为空, 则可以获取第二处理单元内的其他第一处理单元(例如, 第一处理单元 1~第一处理单元 3 ) 内的规定子块(为了便于说明, 在本发明 以各第一处理单元左上角的子块为例进行说明)的运动信息, 并将该运动信 息作为该第一处理单元(第一处理单元 0 ) 内各子块的运动信息。 获取顺序 可以为, 例如, 首先获取索引为 1的第一处理单元(第一处理单元 1 , 其在 水平方向上与第一处理单元 0相邻) 的左上角的子块(子块 4, 即, 第二目 标图像子块的一例)的运动信息, 如果子块 4的运动信息为空, 则可以认为 该第一处理单元 1内其他子块的运动信息也为空, 从而可以再获取索引为 2 的第一处理单元(第一处理单元 2,其在竖直方向上与第一处理单元 0相邻) 的左上角的子块(子块 8, 即, 第二目标图像子块的另一例) 的运动信息,
如果子块 8的运动信息为空, 则可以认为该第一处理单元 2内其他子块的运 动信息也为空,从而可以再获取索引为 3的第一处理单元(第一处理单元 3, 其在对角线方向上与第一处理单元 0相邻) 的左上角的子块(子块 12, 即, 第二目标图像子块的再一例)的运动信息。 同理, 对于各运动信息为空的第 一处理单元, 均可以通过以上方法对其运动信息进行填充。 应理解, 以上列 举的对运动信息为空的子块的运动信息填充方法仅为示例性说明, 本发明并 不限定于此, 例如, 对于上述获取顺序, 也可以先获取竖直方向上的规定第 一处理单元(这里, 为相邻第一处理单元)的规定子块的运动信息, 再获取 水平方向上的规定第一处理单元(这里, 为相邻第一处理单元)的规定子块 的运动信息, 再获取对角线方向上的规定第一处理单元(这里, 为相邻第一 处理单元) 的规定子块的运动信息。 即, 该获取顺序可以任意变更。 并且, 作为上述 "规定子块" 并不限定于第一处理单元左上角的子块, 也可以是同 一第一处理单元内任意位置的子块。
需要说明的是, 由于上述列举的目标图像块的大小为 16x 16,子块的大 小为 4x 4, 因此该目标图像块仅包括两层, 上述递归过程结束。但是目标图 像块的大小为更大, 例如, 32x 32, 而子块的大小为 4x4, 则该目标图像块 包括三层, 可以按照与上述相同的方法继续进行递归操作, 为当目标图像块 的所有子块获取运动信息。
可选地, 该根据目标图像块的大小、 该目标图像块包括的目标图像子块 的大小和用于指示第一目标图像子块在该目标图像块中的位置的第二指示 信息, 确定第二目标图像子块, 包括:
根据以下任一公式, 确定该第二目标图像子块,
Idx2 + {idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2))χ N /4 ; Idx2
+ ((l - ldxx %N/(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ 1%N/(N/2))x2 + (l-/^%N/(N/4)%2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三索引信息, 表示该第二索引信息, %表示模运算或取余操作, N表 示该目标图像块包括的子块的数量。
具体地说, 根据上述各公式可以根据当前正在处理的子块的索引, 确定 当前处理的层次内的第二目标图像子块,其中 N与当前正在处理的层次相对 应, 并且, N是根据目标图像块的大小和子块的大小确定的, 例如, 如果目 标图像块的大小为 16 x 16, 子块的大小为 4 x 4, 则如上所述该目标图像块 包括两层, 在处理第一层时, N为该层中各处理单元(第一处理单元) 包括 的子块数量, 这里为 4。 在处理第二层时, N为该层中各处理单元(第二处 理单元) 包括的子块数量, 这里为 16。
以上, 列举了当上述 "规定子块" 为所述处理单元的左上角子块时, 所 使用的公式。 但本发明并不限定与此, 还可以根据 "规定子块" 所述处理单 元中的位置, 对上述公式进行变更。
可选地, 该根据该第二目标图像子块的运动信息, 确定该第一目标图像 子块的第一参考信息, 包括:
如果该第二目标图像子块的运动信息为空, 则确定该第一参考信息为零 运动信息。
具体地说, 如果经上述处理后, 不能为该子块填充运动信息, 则使用零 运动信息作为该子块的运动信息。 在本发明实施例中, 可以按照以下方法构 造零运动信息。 例如, 在预测编码图像帧 (P帧) 中, 零运动信息的预测方 向为单向预测, 参考图像索引为 0, 运动矢量(0, 0 )。 在双向预测编码图像 帧 (B帧) 中, 零运动信息的预测方向为双向预测, 两个参考图像索引均为 0, 两个运动矢量均为 (0, 0 )。
需要说明的是, 当目标图像块包括多个处理层次, 上述使用零运动信息 作为该子块的运动信息的方法, 可以在对最后一个层次进行处理后进行, 也 可以在对其他任一层次进行处理后进行, 本发明并未特别限定。 应理解, 以 上列举的获取子块的运动信息的方法仅为本发明的示例性说明,本发明并不 限定于此, 例如, 在本发明是示例中, 还可以如上所述, 根据所述基本层图 像(对应图像块) 的编码模式确定该对应子块是否包含有运动信息。 例如, 如果基本层图像使用帧内预测编码模式, 则可以确定该对应子块不包含运动 信息 (即, 第一基本层图像子块的运动信息为空)。 如果确定目标图像块的 所有子块中只有一个子块(具体地说, 是其对应子块)具有运动信息, 则可 以将该子块的运动信息作为其他子块的运动信息。
由此, 通过上述方法, 可以确定第一目标图像子块的第一参考信息。
在 S240, 可以根据获取的第一参考信息, 对该第一目标子块进行解码, 例如, 可以根据第一目标图像子块的第一参考信息(具体地说是运动信息 ), 对该第一目标图像子块进行解码(具体地说, 是运动补偿处理)。 具体地说, 可以根据如上所述为该第一目标图像子块填充的运动信息,对该第一目标图 像子块进行运动补偿处理。
在本发明实施例中, 对于目标图像块中的第三目标图像子块(基本层中 的对应子块包括运动信息), 可以通过与现有技术相同的方法, 获取其运动 信息, 并对其进行解码, 该过程可以与现有技术相同, 这里, 为了避免赘述, 省略其说明。
可选地, 该根据该参考信息, 对该目标图像块进行解码, 包括: 对位于该目标图像子块之间的边界附近的像素进行去块效应滤波处理。 根据本发明实施例的用于图像处理的方法,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据该第二 目标图像子块的运动信息确定针对该第一目标图像子块的参考信息, 并根据 该参考信息进行编码, 能够提高该第一目标图像子块的编码性能。
上文中, 结合图 1至图 3 , 详细描述了根据本发明实施例的用于图像处 理的方法, 下面, 将结合图 4至图 5 , 详细描述根据本发明实施例的用于图 像处理的装置。
图 4示出了根据本发明实施例的用于图像处理的装置 300 的示意性框 图。 如图 4所示, 该装置 300包括:
获取单元 310, 用于当确定与目标图像块的第一目标图像子块相对应的 第一基本层图像子块的运动信息为空时, 根据该目标图像块的大小、 该目标 图像块包括的每个目标图像子块的大小和用于指示第一目标图像子块在该 目标图像块中的位置的第二指示信息, 确定第二目标图像子块;
用于根据该第二目标图像子块的运动信息,确定用于对该第一目标图像 子块进行编码的第一参考信息, 其中, 该第一基本层图像子块是位于基本层 图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增 强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与 该第一目标图像子块在该增强层图像中的空间位置相对应;
编码单元 320, 对该目标图像块进行编码, 以生成目标码流以及包含于
该目标码流中的第一指示信息。
可选地, 该获取单元 310具体用于根据以下任一公式, 确定该第二目标 图像子块,
W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
可选地, 该获取单元 310具体用于如果该第二目标图像子块的运动信息 为空, 则确定该第一参考信息为零运动信息。
可选地, 该编码单元 320具体用于根据该第一参考信息, 对该第一目标 图像子块进行运动补偿处理。
可选地, 该编码单元 320还用于对位于该目标图像子块之间的边界附近 的像素进行去块效应滤波处理。
可选地, 该编码单元 320具体用于对该第一指示信息进行熵编码, 以使 该第一指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志 位信息相邻。
可选地, 该编码单元 320具体用于根据该增强层图像中位于预设位置的 参考图像块是否使用参考信息进行编码, 确定上下文;
用于根据该上下文, 对该第一指示信息进行熵编码。
根据本发明实施例的用于图像处理的装置 300可对应于本发明实施例的 方法中的编码端, 并且, 该图像处理的装置 300中的各单元即模块和上述其 他操作和 /或功能分别为了实现图 1中的方法 100的相应流程, 为了筒洁,在 此不再赘述。
根据本发明实施例的用于图像处理的装置,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据该第二 目标图像子块的运动信息, 确定针对该第一目标图像子块的参考信息, 并根 据该参考信息进行编码, 能够提高该第一目标图像子块的编码性能。
图 5 示出了根据本发明实施例的用于图像处理的装置 400 的示意性框
图。 如图 5所示, 该装置 400包括:
解码单元 410, 用于从目标码流中, 获取第一指示信息;
获取单元 420 , 用于当与目标图像块的第一目标图像子块相对应的第一 基本层图像子块的运动信息为空时, 基于该解码单元获取的该第一指示信 息, 根据该目标图像块的大小、 该目标图像块包括的每个目标图像子块的大 小和用于指示第一目标图像子块在该目标图像块中的位置的第二指示信息, 确定第二目标图像子块;
用于根据该第二目标图像子块的运动信息,确定用于对该第一目标图像 子块进行解码的第一参考信息, 其中, 该第一基本层图像子块是位于基本层 图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增 强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与 该第一目标图像子块在该增强层图像中的空间位置相对应;
该解码单元 410还用于对该目标码流进行解码, 以获取该目标图像块。 可选地, 该获取单元 420具体用于根据以下任一公式, 确定该第二目标 图像子块,
Idx2 / 2)) χ 2 + (1 - Idxl %N /(N/4) %2)) xN/4; Idx2
(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, /^表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
可选地, 该获取单元 420具体用于如果该第二目标图像子块的运动信息 为空, 则确定该第一参考信息为零运动信息。
可选地, 该解码单元 410具体用于根据该第一参考信息, 对该第一目标 图像子块进行运动补偿处理。
可选地, 该解码单元 410还用于对位于该目标图像子块之间的边界附近 的像素进行去块效应滤波处理。
可选地, 该解码单元 410具体用于从目标码流中, 获取第一指示信息, 其中, 该第一指示信息在该目标码流中与跳过模式标志位或融合 MERGE模 式标志位信息相邻。
可选地, 该解码单元 410具体用于根据该增强层图像中位于预设位置的
参考图像块是否使用参考信息进行解码, 确定上下文;
用于根据该上下文, 进行熵解码, 以确定该第一指示信息。
根据本发明实施例的用于图像处理的装置 400可对应于本发明实施例的 方法中解码端, 并且, 该用于图像处理的装置 400中的各单元即模块和上述 其他操作和 /或功能分别为了实现图 3中的方法 200的相应流程, 为了筒洁, 在此不再赘述。
根据本发明实施例的用于图像处理的装置,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据该第二 目标图像子块的运动信息, 确定针对该第一目标图像子块的参考信息, 并根 据该参考信息进行编码, 能够提高该第一目标图像子块的编码性能。
上文中, 结合图 1至图 5 , 详细描述了根据本发明实施例的用于图像处 理的方法和装置, 下面将结合图 6和图 7, 详细描述根据本发明实施例的用 于图像处理的编码器和解码器。
图 6示出了根据本发明实施例的用于图像处理的编码器 500的示意性框 图。 如图 6所示, 该编码器 500可以包括:
总线 510;
与该总线相连的处理器 520;
与该总线相连的存储器 530;
其中,该处理器 520通过该总线 510,调用该存储器 530中存储的程序, 以用于当确定与目标图像块的第一目标图像子块相对应的第一基本层图像 子块的运动信息为空时, 根据该目标图像块的大小、 该目标图像块包括的每 个目标图像子块的大小和用于指示第一目标图像子块在该目标图像块中的 位置的第二指示信息, 确定第二目标图像子块;
用于根据该第二目标图像子块的运动信息,确定用于对该第一目标图像 子块进行编码的第一参考信息, 其中, 该第一基本层图像子块是位于基本层 图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增 强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与 该第一目标图像子块在该增强层图像中的空间位置相对应;
用于对该目标图像块进行编码, 以生成目标码流以及包含于该目标码流 中的第一指示信息。
可选地, 该处理器 520具体用于根据以下任一公式, 确定该第二目标图 像子块,
Idx2 + idx, %N/(N/2))x2 + (l- Idxl %N /(N / 4)%2))χ N /4 ;
Idx2
+ ((l - ldxx %N/(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
可选地,该处理器 520具体用于如果该第二目标图像子块的运动信息为 空, 则确定该第一参考信息为零运动信息。
可选地, 该处理器 520具体用于根据该第一参考信息, 对该第一目标图 像子块进行运动补偿处理。
可选地,该处理器 520具体用于对位于该目标图像子块之间的边界附近 的像素进行去块效应滤波处理。
可选地, 该处理器 520具体用于对该第一指示信息进行熵编码, 以使该 第一指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志位 信息相邻。
可选地,该处理器 520具体用于根据该增强层图像中位于预设位置的参 考图像块是否使用参考信息进行编码, 确定上下文;
用于根据该上下文, 对该第一指示信息进行熵编码。
根据本发明实施例的用于图像处理的编码器 500可对应于本发明实施例 的方法中编码端, 并且, 该用于图像处理的编码器 500中的各单元即模块和 上述其他操作和 /或功能分别为了实现图 1中的方法 100的相应流程,为了筒 洁, 在此不再赘述。
根据本发明实施例的用于图像处理的编码器,对于增强层图像的目标图 像块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子 块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据该 第二目标图像子块的运动信息, 确定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码, 能够提高该第一目标图像子块的编码性能。
图 7示出了根据本发明实施例的用于图像处理的解码器 600的示意性框 图。 如图 7所示, 该解码器 600可以包括:
总线 610;
与该总线相连的处理器 620;
与该总线相连的存储器 630;
其中,该处理器 620通过该总线 610,调用该存储器 630中存储的程序, 以用于从目标码流中, 获取第一指示信息;
用于当与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 基于该第一指示信息, 根据该目标图像块的大小、 该 目标图像块包括的每个目标图像子块的大小和用于指示第一目标图像子块 在该目标图像块中的位置的第二指示信息, 确定第二目标图像子块;
用于根据该第二目标图像子块的运动信息,确定用于对该第一目标图像 子块进行解码的第一参考信息, 其中, 该第一基本层图像子块是位于基本层 图像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增 强层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与 该第一目标图像子块在该增强层图像中的空间位置相对应;
用于对该目标码流进行解码, 以获取该目标图像块。
可选地, 该处理器 620具体用于根据以下任一公式, 确定该第二目标图 像子块,
Idx2 + {idx, %N/(N/2))x2 + (l- Idx, %N /(N / 4)%2))χ N /4 ; Idx2
+ ((l - ldxx %N/(N/2))x2 + {ldxx %N / (N / 4) %2)) xN/4; W¾ =/^/NxN + ((l-/ x1 N/(N/2))x2 + (l-/^ N/(N/4) 2))xN/4; 其中, 表示用于指示该第二目标图像子块在该目标图像块中的位置 的第三指示信息, / 表示该第二指示信息, N是根据该目标图像块的大小 和该目标图像子块的大小确定的。
可选地,该处理器 620具体用于如果该第二目标图像子块的运动信息为 空, 则确定该第一参考信息为零运动信息。
可选地, 该处理器 620具体用于根据该第一参考信息, 对该第一目标图 像子块进行运动补偿处理。
可选地,该处理器 620具体用于对位于该目标图像子块之间的边界附近 的像素进行去块效应滤波处理。
可选地, 该处理器 620具体用于从目标码流中, 获取第一指示信息, 其 中, 该第一指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式
标志位信息相邻。
可选地,该处理器 620具体用于根据该增强层图像中位于预设位置的参 考图像块是否使用参考信息进行解码, 确定上下文;
用于根据该上下文, 进行熵解码, 以确定该第一指示信息。
根据本发明实施例的用于图像处理的解码器 600可对应于本发明实施例 的方法中解码端, 并且, 该用于图像处理的解码器 600中的各单元即模块和 上述其他操作和 /或功能分别为了实现图 5中的方法 200的相应流程,为了筒 洁, 在此不再赘述。
根据本发明实施例的用于图像处理的解码器,对于增强层图像的目标图 像块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子 块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据该 第二目标图像子块的运动信息, 确定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码, 能够提高该第一目标图像子块的编码性能。
图 8示出了从编码端角度描述的根据本发明实施例的用于图像处理的方 法 700的示意性流程图。 如图 8所示, 该方法 700包括:
S710, 当确定与目标图像块的第一目标图像子块相对应的第一基本层图 像子块的运动信息为空时, 根据该第一基本层图像子块的重建像素, 确定用 于对该第一目标图像子块进行编码的第二参考信息, 其中, 该第一基本层图 像子块是位于基本层图像中的图像块, 该目标图像块位于增强层图像中, 该 的基本层图像与该增强层图像相对应,且该第一基本图像块子块在该基本层 图像中的空间位置与该第一目标图像子块在该增强层图像中的空间位置相 对应;
S720, 对该目标图像块进行编码, 以生成目标码流以及包含于该目标码 流中的第四指示信息。
具体地说, 在对图像进行分层编码, 例如, 在空间可伸缩编码时, 可以 将图像进行将分辨率处理得到低分辨率图像,作为对比将原图像称作高分辨 率图像, 编码器分别对该低分辨率图像以及该高分辨率图像进行编码处理。 为方便描述, 本文中将质量高的待编码图像称作增强层图像, 将对应的质量 低的待编码图像(例如所述低分辨率图像)称作基本层图像。
在本发明实施例中, 目标图像是使用分层编码技术进行处理的图像, 基 本层是指分层编码中的质量(包括帧速率、 空间分辨率、 时间分辨率、 信噪
比强度或质量等级等参数)较低的层, 增强层是指分层编码中的质量(包括 帧速率、 空间分辨率、 时间分辨率、 信噪比强度或质量等级等参数)较高的 层。 需要说明的是, 在本发明实施例中, 在本发明实施例中, 对于一个给定 的增强层, 与其相对应的基本层可以为质量低于该增强层的任一层, 例如, 如果当前存在五层, 编码质量依次提高 (即, 第一层质量最低, 第五层质量 最高), 如果增强层为第四层, 则基本层可以是第一层, 也可以是第二层、 也可以是第三层、 也可以是第四层。 同理, 对于一个给定的基本层, 与其相 对应的增强层可以为质量低于该基本层的任一层。
增强层图像为当前处理的增强层中的图像,基本层图像为基本层中与增 强层图像在同一时刻的图像。
综上所述, 在本发明实施例中, 该基本层图像的质量低于该增强层图像 的质量。
目标图像块为该增强层图像中正在处理的图像块。
基本层图像块为基本层图像中与该目标图像块在空间位置上存在对应 关系的图像块。
在本发明实施例中,基本层中的图像块与增强层中的图像块的对应关系 可以根据基本层图像与增强层图像之间的分辨率比例关系计算得到。 例如, 在包括 X方向和 y方向的系统内,如果增强层图像在 X方向与 y方向的分辨 率分别 本层图像的 2倍,则对于增强层中左上角的像素坐标为(2x, 2y ) 且大小为(2m ) X ( 2n )的图像块, 其基本层图像中的对应块可以是左上角 的像素坐标为 (X , y )且大小为 m x n的图像块。
在本发明实施例中, 后述子块是指目标图像块的子块(增强层内的图像 块), 后述对应子块是指该子块的在基本层中对应的图像块。
在本发明实施例中, 运动信息可以包括预测方向、 参考图像索引或运动 矢量中的一个或多个, 其中, 预测方向可分为单向和双向预测, 单向预测又 可以分为前向预测与后向预测, 前向预测指使用前向参考图像列表, 即列表 ( list ) 0中的参考图像产生预测信号, 后向预测指使用后向参考图像列表, 即 list 1中的参考图像产生预测信号, 双向预测指同时使用 list 0和 list 1中 的参考图像产生预测信号;对于单向预测,需要一个参考图像索引指示在 list 0或 list l中所选择的参考图像, 对于双向预测, 需要两个参考图像索引, 分 别指示在 list 0与 list 1中所选择的参考图像; 每一个运动矢量包括水平方向
分量 x和竖直方向分量 y, 可记作(X, y), 对于单向预测, 需要一个运动矢 量指示预测信号在所选择的 list 0或 list 1参考图像中的位移,对于双向预测, 需要两个运动矢量,分别指示前向预测信号与后向预测信号在所选择的 listO 参考图像与 list 1参考图像中的位移。
在本发明实施例中, 目标图像块可以看作由至少两个子块(即, 目标图 像子块)构成的, 其中, 该子块的大小可以根据预设值确定, 为了便于说明, 以下, 以子块大小为 4x4为例进行说明。 例如, 如果目标图像块的大小为 16x 16, 则可以确定该目标图像块包括 16个子块(大小为 4x4)。 从而, 在 本发明实施例中,可以确定该目标图像块中的每一个子块在基本层中的对应 子块(属于该对应图像块), 并确定该对应子块的运动信息。
在本发明实施例中, 可以根据子块中的某一像素点的坐标 (记作: u{Ex,Ey) n ), 确定该像素点在基本层图像中对应位置的坐标 (记作: u(Bx,Byy ), 并将包含所属对应的位置坐标的基本层中的图像块作为所述对 应子块。 在本发明实施例中, 可以按照以上式 1至式 10, 对该第一基本层图 像子块的运动矢量 (βΜ^,βΜν^进行缩放, 并将缩放后的运动矢量作为该子 块(第一目标图像子块) 的运动矢量 (EMVx,EMVy)。
这里, 需要说明的是, 如果基本层图像与增强层图像的分辨率相同, 则 无需进行上述的缩放操作, 而可以直接使用对应子块的运动信息作为子块的 运动信息。
通过以上方法, 可以确定目标图像块中能从基本层图像包括的对应子块 获得运动信息的子块。
从而, 对于能够从基本层图像包括的对应子块获得运动信息的子块, 可 以将其对应子块的运动信息
可选地, 在本发明实施例中, 该方法还包括:
根据所述基本层图像的编码模式,确定与第一目标图像子块相对应的第 一基本层图像子块是否包括运动信息。
具体地说,在本发明实施例中,可以根据所述基本层图像(对应图像块) 的编码模式确定该对应子块是否包含有运动信息。 例如, 如果基本层图像使 用帧内预测编码模式, 则可以确定该对应子块不包含运动信息(即, 第一基 本层图像子块的运动信息为空)。
从而, 在该对应子块包括运动信息时, 可以按如上所述过程确定该对应
子块并获取其运动信息, 在该对应子块不包括运动信息时, 可以跳过以上流 程。
对于不能从基本层图像包括的对应子块获得运动信息的子块(即, 第一 目标图像子块), 可以通过以下方法 3 , 获取其第二参考信息。
方法 3
具体地说, 可以获取基本层图像中与该第一目标图像子块相对应的子块 的重建像素, 并对该重建像素进行上采样处理, 生成该第一目标图像子块的 预测信号作为参考信息。
可选地, 该根据该参考信息, 对该目标图像块进行编码处理, 包括: 根据该参考信息, 对该第一目标图像子块进行运动补偿处理。
具体地说, 可以根据第一目标图像子块的参考信息(具体地说, 是该预 测信号), 对该第一目标图像子块进行编码处理(具体地说, 是预测编码处 理)。 具体地说, 重建像素进行适当上采样后作为当前子块的预测信号。 在 获取到当前块的预测信号之后, 就可以对当前块进行预测编码, 从而计算出 率失真代价。
可选地, 该根据该参考信息, 对该目标图像块进行编码处理, 包括: 对位于该目标图像子块之间的边界附近的像素进行去块效应滤波处理。 在 S230中, 在通过上述方法 3获取第一目标图像块(基本层中对应的 子块不包括运动信息)的第二参考信息, 并获取第三目标图像块(基本层中 对应的子块包括运动信息)的运动信息, 获取该第三目标图像块的运动信息 的方法可以与现有技术相同, 这里省略其说明, 从而, 可以计算出目标图像 块的失真率代价后, 如果该失真率代价最小, 则可以确定一个指示标识(第 四指示信息), 以指示解码端, 通过上述方法 1和方法 2获取第一目标图像 块的参考信息,并获取第三目标图像块(基本层中对应的子块包括运动信息) 的运动信息。 并对该第四指示信息进行熵编码处理。
可选地, 该根据该参考信息, 对该第一目标图像子块进行编码处理, 包 括:
对该第一指示信息进行熵编码处理, 以使该第一指示信息在该目标码流 中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
具体地说, 在本发明实施例中, 在目标码流中, 可以将第一指示信息配 置在与跳过模式标志位信息相邻的位置。 具体地说,
例如, 可以将第一指示信息置于跳过模式标志位信息之前作为目标图像 块在目标码流中的第一个信息,还可以将第一指示信息置于跳过模式标志位 信息之后作为目标图像块在目标码流中的第二个信息。上述跳过模式可以是 与现有技术相同的模式,其确定方法与配置位置可以与现有技术相同,这里, 为了避免赘述, 省略其说明。
再例如, 可以将第一指示信息置于与 MERGE模式标志位信息相邻的位 置。 具体的, 可以将第一指示信息置于 MERGE模式标志位信息之前, 还可 以将第一指示信息置于 MERGE模式标志位信息之后。所述 MERGE可以是 与现有技术相同的模式,其确定方法与配置位置可以与现有技术相同,这里, 为了避免赘述, 省略其说明。
在本发明实施例中, 该第一指示信息可以是一个二进制标志位。 因此, 在对第一指示信息进行熵编码时, 无需对第一指示信息进行二值化处理。
其后, 可以选择用于对二值化的第一指示信息进行熵编码处理时使用的 上下文,可选地,该根据该参考信息,对该第一目标图像子块进行编码处理, 包括:
根据该增强层图像中位于预设位置的参考图像块是否使用参考信息进 行编码处理, 确定上下文;
根据该上下文, 对该第一指示信息进行熵编码处理。
具体地说。 如以上表 1所示, 该上下文可以包含 0、 1、 2三个上下文。 本实施例根据左边和上方的图像块是否使用基本层模式来确定使用哪一个 上下文。 在本实施例中, 例如, 可以根据目标图像块左边和上方的图像块是 否使用其各自的第一指示信息, 确定使用哪一种上下文, 例如, 如果目标图 像块左边和上方的图像块都不使用第一指示信息, 那么选择索引为 0的上下 文模型, 如果目标图像块左边和上方的图像块有一个使用第一指示信息, 那 么选择索引为 1的上下文模型,如果目标图像块左边和上方的图像块都使用 第一指示信息, 那么选择索引为 2的上下文。
其后, 可以根据如上所述选择的上下文对该第一指示信息进行二进制算 术编码, 并更新所使用的上下文模型。 在本发明实施例中, 该过程可以与现 有技术相同, 这里为了避免赘述, 省略其说明。
在本发明实施例中, 可以根据所获得的参考信息, 对各第一目标图像子 块进行编码处理, 进而完成对目标图像块的编码处理, 并将生成的目标图像
块的信息以及上述熵编码处理后的第一指示信息加入码流(目标码流)。 这里, 需要说明的是, 在该目标码流中, 可以包括编码处理后的目标图 像(包括基本层图像和增强层图像)信息, 并且, 该处理过程可以与现有技 术相同, 这里, 为了避免赘述, 省略其说明。
在本发明实施例中, 可以规定, 例如, 当第四指示信息为 1时, 则解码 端需要使用与编码端相同的方法获取第一目标图像子块的第二参考信息, 则 解码端需要使用与编码端相同的方法获取第一目标图像子块的第二参考信 息。
应理解, 以上列举的第四指示信息的指示方法仅为示例性说明, 本发明 并不限定于此。
因此, 解码端可以根据该第四指示信息, 确定是否需要获取第一目标图 像子块的第二参考信息, 下面, 对编码端需要获取第一目标图像子块的第二 参考信息的情况进行说明。
在解码端, 可以从码流中获取目标图像信息, 并确定目标图像(具体地 说, 是目标图像块), 对获取的第四指示信息 (熵编码处理后的信息)进行 熵解码处理, 该处理过程中, 上下文选择与上下文更新的过程与上述编码端 的处理相同或相似, 这里省略其说明。
可以根据选择的上下文从码流中解析得到表示第四指示信息的二进制 符号字串 (bin string )。 其中, 该二进制算术解码处理与编码端的二进制算 术编码处理相对应。
需要说明的是, 在本发明实施例中, 在使用方法 3获取第一目标图像子 块的第二参考信息时,可以获取基本层图像中与该第一目标图像子块相对应 的子块的重建像素, 并对该重建像素进行上采样处理, 生成该第一目标图像 子块的预测信号作为参考信息。 可以根据第一目标图像子块的参考信息(具 体地说, 是该预测信号), 对该第一目标图像子块进行编码处理(具体地说, 是预测编码处理)。 具体地说, 重建像素上采样后作为当前子块的预测信号。 在获取到当前块的预测信号之后,就可以对当前块进行运动补偿处理,并且, 还可以叠加另外解码得到的残差信号, 以获取重建信号。
并且, 还可以对目标图像块的各子块间的边界附近像素进行滤波处理。 根据本发明实施例的用于图像处理的方法,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块,
通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据在空间 位置上与该第一目标图像子块相对应的第一基本层图像子块的重建像素,确 定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码处理, 能够提高该第一目标图像子块的编码性能。
图 9示出了从解码端角度描述的根据本发明实施例的用于图像处理的方 法 800的示意性流程图。 如图 9所示, 该方法 800包括:
S210, 从目标码流中, 获取第四指示信息;
S220 , 当确定与目标图像块的第一目标图像子块相对应的第一基本层图 像子块的运动信息为空时, 基于该第四指示信息, 根据该第一基本层图像子 块的重建像素, 确定用于对该第一目标图像子块进行编码的第二参考信息, 其中, 该第一基本层图像子块是位于基本层图像中的图像块, 该目标图像块 位于增强层图像中, 该的基本层图像与该增强层图像相对应, 且该第一基本 图像块子块在该基本层图像中的空间位置与该第一目标图像子块在该增强 层图像中的空间位置相对应;
S230, 对该目标码流进行解码, 以获取该目标图像块。
具体地说, 在 S210, 解码端可以从码流中获取目标图像信息, 并确定 目标图像(具体地说, 是目标图像块), 并获取的第一指示信息 (熵编码处 理后的信息)。
可选地, 该从目标码流中, 获取第一指示信息, 包括:
从目标码流中, 获取第一指示信息, 其中, 该第一指示信息在该目标码 流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
具体地说, 在本发明实施例中, 在目标码流中, 可以将第一指示信息配 置在与跳过模式标志位信息相邻的位置。 具体地说,
例如, 可以将第一指示信息置于跳过模式标志位信息之前作为目标图像 块在目标码流中的第一个信息,还可以将第一指示信息置于跳过模式标志位 信息之后作为目标图像块在目标码流中的第二个信息。上述跳过模式可以是 与现有技术相同的模式,其确定方法与配置位置可以与现有技术相同,这里, 为了避免赘述, 省略其说明。
再例如, 可以将第一指示信息置于与 MERGE模式标志位信息相邻的位 置。 具体的, 可以将第一指示信息置于 MERGE模式标志位信息之前, 还可 以将第一指示信息置于 MERGE模式标志位信息之后。该 MERGE可以是与
现有技术相同的模式, 其确定方法与配置位置可以与现有技术相同, 这里, 为了避免赘述, 省略其说明。
其后, 解码端可以对获取的第一指示信息进行熵解码处理。
在本发明实施例中, 该第一指示信息可以是一个二进制标志位。 因此, 在对第一指示信息进行熵解码时, 无需使第一指示信息二值化。
其后, 可以选择用于对二值化的第一指示信息进行熵编码处理时使用的 上下文, 可选地, 该从目标码流中, 获取第一指示信息, 包括:
根据该增强层图像中位于预设位置的参考图像块是否使用参考信息进 行解码处理, 确定上下文;
根据该上下文, 进行熵解码处理, 以确定该第一指示信息。
具体地说。 如以上表 1所示, 该上下文可以包含 0、 1、 2三个上下文。 本实施例根据左边和上方的图像块是否使用基本层模式来确定使用哪一个 上下文。 在本实施例中, 例如, 可以根据目标图像块左边和上方的图像块是 否使用其各自的第一指示信息, 确定使用哪一种上下文, 例如, 如果目标图 像块左边和上方的图像块都不使用第一指示信息, 那么选择索引为 0的上下 文模型, 如果目标图像块左边和上方的图像块有一个使用第一指示信息, 那 么选择索引为 1的上下文模型,如果目标图像块左边和上方的图像块都使用 第一指示信息, 那么选择索引为 2的上下文。
其后, 可以根据如上该选择的上下文对该第一指示信息进行二进制算术 解码, 并更新所使用的上下文模型。 在本发明实施例中, 该过程可以与现有 技术相同, 这里为了避免赘述, 省略其说明。
在本发明实施例中, 可以规定, 例如, 当第一指示信息为 1时, 则解码 端需要使用与编码端相同的方法获取第一目标图像子块的第一参考信息, 则 解码端需要使用与编码端相同的方法获取第一目标图像子块的第一参考信 息。
应理解, 以上列举的第一指示信息的指示方法仅为示例性说明, 本发明 并不限定于此。
因此, 解码端可以根据该第一指示信息, 确定是否需要获取第一目标图 像子块的第一参考信息, 下面, 对编码端需要获取第一目标图像子块的第一 参考信息的情况进行说明。
在本发明实施例中, 在对图像进行分层编码, 例如, 在空间可伸缩编码
时, 可以将图像进行将分辨率处理得到低分辨率图像, 作为对比将原图像称 作高分辨率图像, 编码器分别对该低分辨率图像以及该高分辨率图像进行编 码处理。 为方便描述, 本文中将质量高的待编码图像称作增强层图像, 将对 应的质量低的待编码图像(例如所述低分辨率图像)称作基本层图像。
在本发明实施例中, 目标图像是使用分层编码技术进行处理的图像, 基 本层是指分层编码中的质量(包括帧速率、 空间分辨率、 时间分辨率、 信噪 比强度或质量等级等参数)较低的层, 增强层是指分层编码中的质量(包括 帧速率、 空间分辨率、 时间分辨率、 信噪比强度或质量等级等参数)较高的 层。 需要说明的是, 在本发明实施例中, 在本发明实施例中, 对于一个给定 的增强层, 与其相对应的基本层可以为质量低于该增强层的任一层, 例如, 如果当前存在五层, 编码质量依次提高 (即, 第一层质量最低, 第五层质量 最高), 如果增强层为第四层, 则基本层可以是第一层, 也可以是第二层、 也可以是第三层、 也可以是第四层。 同理, 对于一个给定的基本层, 与其相 对应的增强层可以为质量低于该基本层的任一层。
增强层图像为当前处理的增强层中的图像,基本层图像为基本层中与增 强层图像在同一时刻的图像。
综上所述, 在本发明实施例中, 该基本层图像的质量低于该增强层图像 的质量。
目标图像块为该增强层图像中正在处理的图像块。
基本层图像块为基本层图像中与该目标图像块在空间位置上存在对应 关系的图像块。
在本发明实施例中,基本层中的图像块与增强层中的图像块的对应关系 可以根据基本层图像与增强层图像之间的分辨率比例关系计算得到。 例如, 在包括 X方向和 y方向的系统内,如果增强层图像在 X方向与 y方向的分辨 率分别 本层图像的 2倍,则对于增强层中左上角的像素坐标为(2x, 2y ) 且大小为(2m ) X ( 2n )的图像块, 其基本层图像中的对应块可以是左上角 的像素坐标为 (X , y )且大小为 m x n的图像块。
在本发明实施例中, 后述子块是指目标图像块的子块(增强层内的图像 块), 后述对应子块是指该子块的在基本层中对应的图像块。
在本发明实施例中, 运动信息可以包括预测方向、 参考图像索引或运动 矢量中的一个或多个, 其中, 预测方向可分为单向和双向预测, 单向预测又
可以分为前向预测与后向预测, 前向预测指使用前向参考图像列表, 即列表
( list ) 0中的参考图像产生预测信号, 后向预测指使用后向参考图像列表, 即 list 1中的参考图像产生预测信号, 双向预测指同时使用 list 0和 list 1中 的参考图像产生预测信号;对于单向预测,需要一个参考图像索引指示在 list 0或 list l中所选择的参考图像, 对于双向预测, 需要两个参考图像索引, 分 别指示在 list 0与 list 1中所选择的参考图像; 每一个运动矢量包括水平方向 分量 X和竖直方向分量 y , 可记作(X , y ) , 对于单向预测, 需要一个运动矢 量指示预测信号在所选择的 list 0或 list 1参考图像中的位移,对于双向预测, 需要两个运动矢量,分别指示前向预测信号与后向预测信号在所选择的 list O 参考图像与 list 1参考图像中的位移。
在本发明实施例中, 目标图像块可以看作由至少两个子块(即, 目标图 像子块)构成的, 其中, 该子块的大小可以根据预设值确定, 为了便于说明, 以下, 以子块大小为 4 x 4为例进行说明。 例如, 如果目标图像块的大小为 16 x 16 , 则可以确定该目标图像块包括 16个子块(大小为 4 x 4 )。 从而, 在 本发明实施例中, 可以确定该目标图像块中的每一个子块(第一目标图像子 块)在基本层中的对应子块(第一基本层图像子块), 并确定该对应子块的 运动信息。
在本发明实施例中, 可以根据子块(第一目标图像子块) 中的某一像素 点的坐标(记作: " (Ex , Ey) " ), 确定该像素点在基本层图像中对应位置的坐 标(记作: " ( 并将包含所属对应的位置坐标的基本层中的图像块 作为所述对应子块(第一基本层图像子块)。 在本发明实施例中, 可以按照 以下公式 1至公式 10计算得到第一目标图像子块的运动矢量 (EMVx, EMVy)。
这里, 需要说明的是, 如果基本层图像与增强层图像的分辨率相同, 则 无需进行上述的缩放操作, 而可以直接使用对应子块的运动信息作为子块的 运动信息。
通过以上方法, 可以确定目标图像块中能从基本层图像包括的对应子块 获得运动信息的子块。
从而, 对于能够从基本层图像包括的对应子块获得运动信息的子块, 可 以将其对应子块的运动信息
可选地, 在本发明实施例中, 该方法还包括:
根据所述基本层图像的编码模式,确定与第一目标图像子块相对应的第
一基本层图像子块是否包括运动信息。
具体地说,在本发明实施例中,可以根据所述基本层图像(对应图像块) 的编码模式确定该对应子块是否包含有运动信息。 例如, 如果基本层图像使 用帧内预测编码模式, 则可以确定该对应子块不包含运动信息(即, 第一基 本层图像子块的运动信息为空)。
从而, 在该对应子块包括运动信息时, 可以按如上所述过程确定该对应 子块并获取其运动信息, 在该对应子块不包括运动信息时, 可以通过以下方 方法 4, 获取该第一目标图像子块的第二参考信息。
方法 4
具体地说, 可以获取基本层图像中与该第一目标图像子块相对应的子块 的重建像素, 并对该重建像素进行上采样处理, 生成该第一目标图像子块的 预测信号作为参考信息。
可选地, 该根据该参考信息, 对该目标图像块进行解码处理, 包括: 根据该参考信息, 对该第一目标图像子块进行运动补偿处理。
在 S230, 可以根据获取的参考信息, 对该第一目标子块进行解码处理, 在该参考信息是通过方法 3获取的情况下, 可以根据第一目标图像子块的参 考信息 (具体地说是运动信息), 对该第一目标图像子块进行解码处理(具 体地说, 是运动补偿处理)。 具体地说, 可以根据如上所述为该第一目标图 像子块填充的运动信息, 对该第一目标图像子块进行运动补偿处理。
在该参考信息是通过方法 4获取的情况下, 可以获取基本层图像中与该 第一目标图像子块相对应的子块的重建像素, 并对该重建像素进行上采样处 理, 生成该第一目标图像子块的预测信号作为参考信息。 可以根据第一目标 图像子块的参考信息 (具体地说, 是该预测信号), 对该第一目标图像子块 进行编码处理(具体地说, 是预测编码处理)。 具体地说, 重建像素上采样 后作为当前子块的预测信号。 在获取到当前块的预测信号之后, 就可以对当 前块进行运动补偿处理, 并且, 还可以叠加另外解码得到的残差信号, 以获 取重建信号。
在本发明实施例中, 对于目标图像块中的第三目标图像子块(基本层中 的对应子块包括运动信息), 可以通过与现有技术相同的方法, 获取其运动 信息, 并对其进行解码处理, 该过程可以与现有技术相同, 这里, 为了避免 赘述, 省略其说明。
可选地, 该根据该参考信息, 对该目标图像块进行解码处理, 包括: 对位于该目标图像子块之间的边界附近的像素进行去块效应滤波处理。 根据本发明实施例的用于图像处理的方法,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据在空间 位置上与该第一目标图像子块相对应的第一基本层图像子块的重建像素,确 定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码处理, 能够提高该第一目标图像子块的编码性能。
上文中, 结合图 8至图 9, 详细描述了根据本发明实施例的用于图像处 理的方法, 下面, 将结合图 10至图 11 , 详细描述根据本发明实施例的用于 图像处理的装置。
图 10示出了根据本发明实施例的用于图像处理的装置 900的示意性框 图。 如图 10所示, 该装置 900包括:
获取单元 910, 用于当确定与目标图像块的第一目标图像子块相对应的 第一基本层图像子块的运动信息为空时,根据该第一基本层图像子块的重建 像素, 确定用于对该第一目标图像子块进行编码的第二参考信息, 其中, 该 第一基本层图像子块是位于基本层图像中的图像块, 该目标图像块位于增强 层图像中, 该的基本层图像与该增强层图像相对应, 且该第一基本图像块子 块在该基本层图像中的空间位置与该第一目标图像子块在该增强层图像中 的空间位置相对应;
编码单元 920, 用于对该目标图像块进行编码, 以生成目标码流以及包 含于该目标码流中的第四指示信息。
可选地, 该编码单元 920具体用于对位于该目标图像子块之间的边界附 近的像素进行去块效应滤波处理。
可选地, 该编码单元 920具体用于对该第四指示信息进行熵编码, 以使 该第四指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志 位信息相邻。
可选地, 该编码单元 920具体用于根据该增强层图像中位于预设位置的 参考图像块是否使用参考信息进行编码, 确定上下文;
用于根据该上下文, 对该第四指示信息进行熵编码。
根据本发明实施例的用于图像处理的装置 900可对应于本发明实施例的
方法中的编码端, 并且, 该图像处理的装置 900中的各单元即模块和上述其 他操作和 /或功能分别为了实现图 8中的方法 700的相应流程, 为了筒洁,在 此不再赘述。
根据本发明实施例的用于图像处理的装置,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据在空间 位置上与该第一目标图像子块相对应的第一基本层图像子块的重建像素,确 定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码处理, 能够提高该第一目标图像子块的编码性能。
图 11示出了根据本发明实施例的用于图像处理的装置 1000的示意性框 图。 如图 11所示, 该装置 1000包括:
解码单元 1010, 用于从目标码流中, 获取第四指示信息;
获取单元 1020 ,用于当确定与目标图像块的第一目标图像子块相对应的 第一基本层图像子块的运动信息为空时,基于该解码单元获取的第四指示信 息, 根据该第一基本层图像子块的重建像素, 确定用于对该第一目标图像子 块进行编码的第二参考信息, 其中, 该第一基本层图像子块是位于基本层图 像中的图像块, 该目标图像块位于增强层图像中, 该的基本层图像与该增强 层图像相对应,且该第一基本图像块子块在该基本层图像中的空间位置与该 第一目标图像子块在该增强层图像中的空间位置相对应;
该编码单元 1010还用于对该目标码流进行解码, 以获取该目标图像块。 可选地, 该解码单元 1010具体用于对位于该目标图像子块之间的边界 附近的像素进行去块效应滤波处理。
可选地, 该解码单元 1010具体用于从目标码流中, 获取第四指示信息, 其中, 该第四指示信息在该目标码流中与跳过模式标志位或融合 MERGE模 式标志位信息相邻。
可选地, 该解码单元 1010具体用于根据该增强层图像中位于预设位置 的参考图像块是否使用参考信息进行解码, 确定上下文;
用于根据该上下文, 进行熵解码, 以确定该第四指示信息。
根据本发明实施例的用于图像处理的装置 1000可对应于本发明实施例 的方法中解码端, 并且, 该用于图像处理的装置 1000 中的各单元即模块和 上述其他操作和 /或功能分别为了实现图 9中的方法 800的相应流程,为了筒
洁, 在此不再赘述。
根据本发明实施例的用于图像处理的装置,对于增强层图像的目标图像 块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据在空间 位置上与该第一目标图像子块相对应的第一基本层图像子块的重建像素,确 定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码处理, 能够提高该第一目标图像子块的编码性能。
上文中, 结合图 8至图 11 ,详细描述了根据本发明实施例的用于图像处 理的方法和装置, 下面将结合图 12和图 13 , 详细描述根据本发明实施例的 用于图像处理的编码器和解码器。
图 12示出了根据本发明实施例的用于图像处理的编码器 1100的示意性 框图。 如图 12所示, 该编码器 1100可以包括:
总线 1110;
与该总线相连的处理器 1120;
与该总线相连的存储器 1130;
其中, 该处理器 1120通过该总线 1110, 调用该存储器 1130中存储的程 序, 以用于当确定与目标图像块的第一目标图像子块相对应的第一基本层图 像子块的运动信息为空时, 根据该第一基本层图像子块的重建像素, 确定用 于对该第一目标图像子块进行编码的第二参考信息, 其中, 该第一基本层图 像子块是位于基本层图像中的图像块, 该目标图像块位于增强层图像中, 该 的基本层图像与该增强层图像相对应,且该第一基本图像块子块在该基本层 图像中的空间位置与该第一目标图像子块在该增强层图像中的空间位置相 对应;
对该目标图像块进行编码, 以生成目标码流以及包含于该目标码流中的 第四指示信息。
可选地, 该处理器 1120具体用于对位于该目标图像子块之间的边界附 近的像素进行去块效应滤波处理。
可选地, 该处理器 1120具体用于对该第四指示信息进行熵编码, 以使 该第四指示信息在该目标码流中与跳过模式标志位或融合 MERGE模式标志 位信息相邻。
可选地, 该处理器 1120具体用于根据该增强层图像中位于预设位置的
参考图像块是否使用参考信息进行编码, 确定上下文;
用于根据该上下文, 对该第四指示信息进行熵编码。
根据本发明实施例的用于图像处理的编码器 1100可对应于本发明实施 例的方法中编码端, 并且, 该用于图像处理的编码器 1100 中的各单元即模 块和上述其他操作和 /或功能分别为了实现图 8中的方法 700的相应流程,为 了筒洁, 在此不再赘述。
根据本发明实施例的用于图像处理的编码器,对于增强层图像的目标图 像块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子 块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据在 空间位置上与该第一目标图像子块相对应的第一基本层图像子块的重建像 素, 确定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码 处理, 能够提高该第一目标图像子块的编码性能。
图 13示出了根据本发明实施例的用于图像处理的解码器 1200的示意性 框图。 如图 7所示, 该解码器 1200可以包括:
总线 1210;
与该总线相连的处理器 1220;
与该总线相连的存储器 1230;
其中,该处理器 1220通过该总线 1210,调用该存储器 1230中存储的程 序, 以用于从目标码流中, 获取第四指示信息;
用于当确定与目标图像块的第一目标图像子块相对应的第一基本层图 像子块的运动信息为空时, 基于该第四指示信息, 根据该第一基本层图像子 块的重建像素, 确定用于对该第一目标图像子块进行编码的第二参考信息, 其中, 该第一基本层图像子块是位于基本层图像中的图像块, 该目标图像块 位于增强层图像中, 该的基本层图像与该增强层图像相对应, 且该第一基本 图像块子块在该基本层图像中的空间位置与该第一目标图像子块在该增强 层图像中的空间位置相对应;
用于对该目标码流进行解码, 以获取该目标图像块。
可选地, 该处理器 1220具体用于对位于该目标图像子块之间的边界附 近的像素进行去块效应滤波处理。
可选地, 该处理器 1220具体用于从目标码流中, 获取第四指示信息, 其中, 该第四指示信息在该目标码流中与跳过模式标志位或融合 MERGE模
式标志位信息相邻。
可选地, 该处理器 1220具体用于根据该增强层图像中位于预设位置的 参考图像块是否使用参考信息进行解码, 确定上下文;
用于根据该上下文, 进行熵解码, 以确定该第四指示信息。
根据本发明实施例的用于图像处理的解码器 1200可对应于本发明实施 例的方法中解码端, 并且, 该用于图像处理的解码器 1200 中的各单元即模 块和上述其他操作和 /或功能分别为了实现图 9中的方法 800的相应流程,为 了筒洁, 在此不再赘述。
根据本发明实施例的用于图像处理的解码器,对于增强层图像的目标图 像块中不能从基本层图像包括的对应子块获得运动信息的第一目标图像子 块, 通过根据该第一目标图像子块的位置确定第二目标图像子块, 并根据在 空间位置上与该第一目标图像子块相对应的第一基本层图像子块的重建像 素, 确定针对该第一目标图像子块的参考信息, 并根据该参考信息进行编码 处理, 能够提高该第一目标图像子块的编码性能。
需要说明的是, 为了使编码端与解码端获取的参考信息一致, 所以要求 编码端与解码端使用的获取参考信息的方法一致, 即, 如果编码端使用方法 1获取参考信息(第一参考信息 ),则解码端要使用方法 2 (与方法 1相对应) 获取参考信息 (第一参考信息)。 换言之, 可以根据所描述的编码端处理方 法对应的确定解码端处理方法, 或者根据所描述的解码端处理方法对应的确 定编码端处理方法。
应理解, 本文中术语 "和 /或", 仅仅是一种描述关联对象的关联关系, 表示可以存在三种关系, 例如, A和 /或 B , 可以表示: 单独存在 A, 同时存 在 A和 B , 单独存在 B这三种情况。 另外, 本文中字符 "/" , 一般表示前后 关联对象是一种 "或" 的关系。
应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意味 着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不应 对本发明实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方
法来实现所描述的功能 , 但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为描述的方便和筒洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一 个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明 的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部 分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前 述的存储介质包括: U盘、移动硬盘、只读存储器( ROM , Read-Only Memory )、 随机存取存储器(RAM, Random Access Memory ), 磁碟或者光盘等各种可 以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应以所述权利要求的保护范围为准。
Claims
1. 一种用于图像处理的方法, 其特征在于, 所述方法包括:
当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 根据所述目标图像块的大小、 所述目标图像块包括的 每个目标图像子块的大小和用于指示第一目标图像子块在所述目标图像块 中的位置的第二指示信息, 确定第二目标图像子块;
根据所述第二目标图像子块的运动信息,确定用于对所述第一目标图像 子块进行编码的第一参考信息, 其中, 所述第一基本层图像子块是位于基本 层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层图像 与所述增强层图像相对应,且所述第一基本图像块子块在所述基本层图像中 的空间位置与所述第一目标图像子块在所述增强层图像中的空间位置相对 应;
对所述目标图像块进行编码, 以生成目标码流以及包含于所述目标码流 中的第一指示信息。
2. 根据权利要求 1所述的方法, 其特征在于: 所述根据目标图像块的 大小、所述目标图像块包括的目标图像子块的大小和用于指示第一目标图像 子块在所述目标图像块中的位置的第二指示信息, 确定第二目标图像子块, 包括:
根据以下任一公式, 确定所述第二目标图像子块,
Idx2 + idx, %N/(N/2))x2 + (l- Idxl %N /(N / 4)%2))χ N /4 ;
W¾ =/^/NxN + ((l-/ 1%N/(N/2))x2 + (l-/^%N/(N/4)%2))xN/4; 其中, Idx2表示用于指示所述第二目标图像子块在所述目标图像块中的 位置的第三指示信息, / 表示所述第二指示信息, N是根据所述目标图像 块的大小和所述目标图像子块的大小确定的。
3. 根据权利要求 1或 2所述的方法, 其特征在于, 所述根据所述第二 目标图像子块的运动信息,确定用于对所述第一目标图像子块进行编码的第 一参考信息, 包括:
如果所述第二目标图像子块的运动信息为空, 则确定所述第一参考信息 为零运动信息。
4. 根据权利要求 1至 3中任一项所述的方法, 其特征在于: 所述对所
述目标图像块进行编码包括:
根据所述第一参考信息, 对所述第一目标图像子块进行运动补偿处理。
5. 根据权利要求 1至 4中任一项所述的方法, 其特征在于: 所述对所 述目标图像块进行编码包括:
对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处 理。
6. 根据权利要求 1至 5中任一项所述的方法, 其特征在于: 所述对所 述目标图像块进行编码包括:
对所述第一指示信息进行熵编码, 以使所述第一指示信息在所述目标码 流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
7. 根据权利要求 1至 6中任一项所述的方法, 其特征在于: 所述对所 述目标图像块进行编码包括:
根据所述增强层图像中位于预设位置的参考图像块是否使用参考信息 进行编码, 确定上下文;
根据所述上下文, 对所述第一指示信息进行熵编码。
8. 一种用于图像处理的方法, 其特征在于, 所述方法包括:
从目标码流中, 获取第一指示信息;
当与目标图像块的第一目标图像子块相对应的第一基本层图像子块的 运动信息为空时, 基于所述第一指示信息, 根据所述目标图像块的大小、 所 述目标图像块包括的每个目标图像子块的大小和用于指示第一目标图像子 块在所述目标图像块中的位置的第二指示信息, 确定第二目标图像子块; 根据所述第二目标图像子块的运动信息,确定用于对所述第一目标图像 子块进行解码的第一参考信息, 其中, 所述第一基本层图像子块是位于基本 层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层图像 与所述增强层图像相对应,且所述第一基本图像块子块在所述基本层图像中 的空间位置与所述第一目标图像子块在所述增强层图像中的空间位置相对 应;
对所述目标码流进行解码, 以获取所述目标图像块。
9. 根据权利要求 8所述的方法, 其特征在于: 所述根据目标图像块的 大小、所述目标图像块包括的目标图像子块的大小和用于指示第一目标图像 子块在所述目标图像块中的位置的第二指示信息, 确定第二目标图像子块,
包括:
根据以下任一公式, 确定所述第二目标图像子块,
Idx2 + idx, %N/(N/2))x2 + (l- Idxl %N /(N / 4)%2))χ N /4 ;
10. 根据权利要求 8或 9所述的方法, 其特征在于, 所述根据所述第二 目标图像子块的运动信息,确定用于对所述第一目标图像子块进行编码的第 一参考信息, 包括:
如果所述第二目标图像子块的运动信息为空, 则确定所述第一参考信息 为零运动信息。
11. 根据权利要求 8至 10中任一项所述的方法, 其特征在于: 所述对 所述目标码流进行解码包括:
根据所述第一参考信息, 对所述第一目标图像子块进行运动补偿处理。
12. 根据权利要求 8至 11 中任一项所述的方法, 其特征在于: 所述对 所述目标码流进行解码包括:
对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处 理。
13. 根据权利要求 8至 12中任一项所述的方法, 其特征在于: 所述从 目标码流中, 获取第一指示信息, 包括:
从目标码流中, 获取第一指示信息, 其中, 所述第一指示信息在所述目 标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
14. 根据权利要求 8至 13中任一项所述的方法, 其特征在于: 所述从 目标码流中, 获取第一指示信息, 包括:
根据所述增强层图像中位于预设位置的参考图像块是否使用参考信息 进行解码, 确定上下文;
根据所述上下文, 进行熵解码, 以确定所述第一指示信息。
15. 一种用于图像处理的装置, 其特征在于, 所述装置包括: 获取单元, 用于当确定与目标图像块的第一目标图像子块相对应的第一
基本层图像子块的运动信息为空时, 根据所述目标图像块的大小、 所述目标 图像块包括的每个目标图像子块的大小和用于指示第一目标图像子块在所 述目标图像块中的位置的第二指示信息, 确定第二目标图像子块;
用于根据所述第二目标图像子块的运动信息,确定用于对所述第一目标 图像子块进行编码的第一参考信息, 其中, 所述第一基本层图像子块是位于 基本层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层 图像与所述增强层图像相对应,且所述第一基本图像块子块在所述基本层图 像中的空间位置与所述第一目标图像子块在所述增强层图像中的空间位置 相对应;
编码单元, 对所述目标图像块进行编码, 以生成目标码流以及包含于所 述目标码流中的第一指示信息。
16. 根据权利要求 15所述的装置, 其特征在于: 所述获取单元具体用 于根据以下任一公式, 确定所述第二目标图像子块,
Idx2 + idx, %N/(N/2))x2 + (l- Idxl %N /(N / 4)%2))χ N /4 ; Idx2
+ ((l - ldxx %N/(N/2))x2 + (ldxx %N / (N / 4) %2)) xN/4;
W¾ =/^/NxN + ((l-/ 1%N/(N/2))x2 + (l-/^%N/(N/4)%2))xN/4; 其中, Idx2表示用于指示所述第二目标图像子块在所述目标图像块中的 位置的第三指示信息, / 表示所述第二指示信息, N是根据所述目标图像 块的大小和所述目标图像子块的大小确定的。
17. 根据权利要求 15或 16所述的装置, 其特征在于, 所述获取单元具 体用于如果所述第二目标图像子块的运动信息为空, 则确定所述第一参考信 息为零运动信息。
18. 根据权利要求 15至 17中任一项所述的装置, 其特征在于: 所述编 码单元具体用于根据所述第一参考信息,对所述第一目标图像子块进行运动 补偿处理。
19. 根据权利要求 15至 18中任一项所述的装置, 其特征在于: 所述编 码单元具体用于对位于所述目标图像子块之间的边界附近的像素进行去块 效应滤波处理。
20. 根据权利要求 15至 19中任一项所述的装置, 其特征在于: 所述编 码单元具体用于对所述第一指示信息进行熵编码, 以使所述第一指示信息在 所述目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
21. 根据权利要求 15至 20中任一项所述的装置, 其特征在于: 所述编 码单元具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行编码, 确定上下文;
用于根据所述上下文, 对所述第一指示信息进行熵编码。
22. 一种用于图像处理的装置, 其特征在于, 所述装置包括: 解码单元, 用于从目标码流中, 获取第一指示信息;
获取单元, 用于当与目标图像块的第一目标图像子块相对应的第一基本 层图像子块的运动信息为空时, 基于所述解码单元获取的所述第一指示信 息, 根据所述目标图像块的大小、 所述目标图像块包括的每个目标图像子块 的大小和用于指示第一目标图像子块在所述目标图像块中的位置的第二指 示信息, 确定第二目标图像子块;
用于根据所述第二目标图像子块的运动信息,确定用于对所述第一目标 图像子块进行解码的第一参考信息, 其中, 所述第一基本层图像子块是位于 基本层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层 图像与所述增强层图像相对应,且所述第一基本图像块子块在所述基本层图 像中的空间位置与所述第一目标图像子块在所述增强层图像中的空间位置 相对应;
所述解码单元还用于对所述目标码流进行解码, 以获取所述目标图像 块。
23. 根据权利要求 22所述的装置, 其特征在于: 所述获取单元具体用 于根据以下任一公式, 确定所述第二目标图像子块,
24. 根据权利要求 22或 23所述的装置, 其特征在于, 所述获取单元具 体用于如果所述第二目标图像子块的运动信息为空, 则确定所述第一参考信 息为零运动信息。
25. 根据权利要求 22至 24中任一项所述的装置, 其特征在于: 所述解
码单元具体用于根据所述第一参考信息,对所述第一目标图像子块进行运动 补偿处理。
26. 根据权利要求 22至 25中任一项所述的装置, 其特征在于: 所述解 码单元具体用于对位于所述目标图像子块之间的边界附近的像素进行去块 效应滤波处理。
27. 根据权利要求 22至 26中任一项所述的装置, 其特征在于: 所述解 码单元具体用于从目标码流中, 获取第一指示信息, 其中, 所述第一指示信 息在所述目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相 邻。
28. 根据权利要求 22至 27中任一项所述的装置, 其特征在于: 所述解 码单元具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行解码, 确定上下文;
用于根据所述上下文, 进行熵解码, 以确定所述第一指示信息。
29. 一种用于图像处理的编码器, 其特征在于, 所述编码器包括: 总线;
与所述总线相连的处理器;
与所述总线相连的存储器;
其中, 所述处理器通过所述总线, 调用所述存储器中存储的程序, 以用 于当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子块 的运动信息为空时, 根据所述目标图像块的大小、 所述目标图像块包括的每 个目标图像子块的大小和用于指示第一目标图像子块在所述目标图像块中 的位置的第二指示信息, 确定第二目标图像子块;
用于根据所述第二目标图像子块的运动信息,确定用于对所述第一目标 图像子块进行编码的第一参考信息, 其中, 所述第一基本层图像子块是位于 基本层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层 图像与所述增强层图像相对应,且所述第一基本图像块子块在所述基本层图 像中的空间位置与所述第一目标图像子块在所述增强层图像中的空间位置 相对应;
用于对所述目标图像块进行编码, 以生成目标码流以及包含于所述目标 码流中的第一指示信息
30. 根据权利要求 29所述的编码器, 其特征在于: 所述处理器具体用
于根据以下任一公式, 确定所述第二目标图像子块,
Idx2 + idx, %N/(N/2))x2 + (l- Idxl %N /(N / 4)%2))χ N /4 ;
W¾ =/^/NxN + ((l-/ 1%N/(N/2))x2 + (l-/^%N/(N/4)%2))xN/4; 其中, 表示用于指示所述第二目标图像子块在所述目标图像块中的 位置的第三指示信息, / 表示所述第二指示信息, N是根据所述目标图像 块的大小和所述目标图像子块的大小确定的。
31. 根据权利要求 29或 30所述的编码器, 其特征在于, 所述处理器具 体用于如果所述第二目标图像子块的运动信息为空, 则确定所述第一参考信 息为零运动信息。
32. 根据权利要求 29至 31中任一项所述的编码器, 其特征在于: 所述 处理器具体用于根据所述参考信息,对所述第一目标图像子块进行运动补偿 处理。
33. 根据权利要求 29至 32中任一项所述的编码器, 其特征在于: 所述 处理器具体用于对位于所述目标图像子块之间的边界附近的像素进行去块 效应滤波处理。
34. 根据权利要求 29至 33中任一项所述的编码器, 其特征在于: 所述 处理器具体用于对所述第一指示信息进行熵编码, 以使所述第一指示信息在 所述目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
35. 根据权利要求 29至 34中任一项所述的编码器, 其特征在于: 所述 处理器具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行编码, 确定上下文;
用于根据所述上下文, 对所述第一指示信息进行熵编码。
36. 一种用于图像处理的解码器, 其特征在于, 所述解码器包括: 总线;
与所述总线相连的处理器;
与所述总线相连的存储器;
其中, 所述处理器通过所述总线, 调用所述存储器中存储的程序, 以用 于从目标码流中, 获取第一指示信息;
用于当与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时,基于所述第一指示信息,根据所述目标图像块的大小、
所述目标图像块包括的每个目标图像子块的大小和用于指示第一目标图像 子块在所述目标图像块中的位置的第二指示信息, 确定第二目标图像子块; 用于根据所述第二目标图像子块的运动信息,确定用于对所述第一目标 图像子块进行解码的第一参考信息, 其中, 所述第一基本层图像子块是位于 基本层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层 图像与所述增强层图像相对应,且所述第一基本图像块子块在所述基本层图 像中的空间位置与所述第一目标图像子块在所述增强层图像中的空间位置 相对应;
用于对所述目标码流进行解码, 以获取所述目标图像块。
37. 根据权利要求 36所述的解码器, 其特征在于: 所述处理器具体用 于根据以下任一公式, 确定所述第二目标图像子块,
38. 根据权利要求 36或 37所述的解码器, 其特征在于, 所述处理器具 体用于如果所述第二目标图像子块的运动信息为空, 则确定所述第一参考信 息为零运动信息。
39. 根据权利要求 36至 38中任一项所述的解码器, 其特征在于: 所述 处理器具体用于根据所述第一参考信息,对所述第一目标图像子块进行运动 补偿处理。
40. 根据权利要求 36至 39中任一项所述的解码器, 其特征在于: 所述 处理器具体用于对位于所述目标图像子块之间的边界附近的像素进行去块 效应滤波处理。
41. 根据权利要求 36至 40中任一项所述的解码器, 其特征在于: 所述 处理器具体用于从目标码流中, 获取第一指示信息, 其中, 所述第一指示信 息在所述目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相 邻。
42. 根据权利要求 36至 41中任一项所述的解码器, 其特征在于: 所述
处理器具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行解码, 确定上下文;
用于根据所述上下文, 进行熵解码, 以确定所述第一指示信息。
43. 一种用于图像处理的方法, 其特征在于, 所述方法包括: 当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 根据所述第一基本层图像子块的重建像素, 确定用于 对所述第一目标图像子块进行编码的第二参考信息, 其中, 所述第一基本层 图像子块是位于基本层图像中的图像块, 所述目标图像块位于增强层图像 中, 所述的基本层图像与所述增强层图像相对应, 且所述第一基本图像块子 块在所述基本层图像中的空间位置与所述第一目标图像子块在所述增强层 图像中的空间位置相对应;
对所述目标图像块进行编码, 以生成目标码流以及包含于所述目标码流 中的第四指示信息。
44. 根据权利要求 43所述的方法, 其特征在于: 所述对所述目标图像 块进行编码包括:
对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处 理。
45. 根据权利要求 43或 44所述的方法, 其特征在于: 所述对所述目标 图像块进行编码包括:
对所述第四指示信息进行熵编码, 以使所述第四指示信息在所述目标码 流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
46. 根据权利要求 43至 45中任一项所述的方法, 其特征在于: 所述对 所述目标图像块进行编码包括:
根据所述增强层图像中位于预设位置的参考图像块是否使用参考信息 进行编码, 确定上下文;
根据所述上下文, 对所述第四指示信息进行熵编码。
47. —种用于图像处理的方法, 其特征在于, 所述方法包括: 从目标码流中, 获取第四指示信息;
当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子 块的运动信息为空时, 基于所述第四指示信息, 根据所述第一基本层图像子 块的重建像素, 确定用于对所述第一目标图像子块进行编码的第二参考信
息, 其中, 所述第一基本层图像子块是位于基本层图像中的图像块, 所述目 标图像块位于增强层图像中, 所述的基本层图像与所述增强层图像相对应, 且所述第一基本图像块子块在所述基本层图像中的空间位置与所述第一目 标图像子块在所述增强层图像中的空间位置相对应;
对所述目标码流进行解码, 以获取所述目标图像块。
48. 根据权利要求 47所述的方法, 其特征在于: 所述对所述目标码流 进行解码包括:
对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处 理。
49. 根据权利要求 47或 48所述的方法, 其特征在于: 所述从目标码流 中, 获取第四指示信息, 包括:
从目标码流中, 获取第四指示信息, 其中, 所述第四指示信息在所述目 标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
50. 根据权利要求 47至 48中任一项所述的方法, 其特征在于: 所述从 目标码流中, 获取第四指示信息, 包括:
根据所述增强层图像中位于预设位置的参考图像块是否使用参考信息 进行解码, 确定上下文;
根据所述上下文, 进行熵解码, 以确定所述第四指示信息。
51. 一种用于图像处理的装置, 其特征在于, 所述装置包括: 获取单元, 用于当确定与目标图像块的第一目标图像子块相对应的第一 基本层图像子块的运动信息为空时,根据所述第一基本层图像子块的重建像 素, 确定用于对所述第一目标图像子块进行编码的第二参考信息, 其中, 所 述第一基本层图像子块是位于基本层图像中的图像块, 所述目标图像块位于 增强层图像中, 所述的基本层图像与所述增强层图像相对应, 且所述第一基 本图像块子块在所述基本层图像中的空间位置与所述第一目标图像子块在 所述增强层图像中的空间位置相对应;
编码单元, 用于对所述目标图像块进行编码, 以生成目标码流以及包含 于所述目标码流中的第四指示信息。
52. 根据权利要求 51所述的装置, 其特征在于: 所述编码单元具体用 于对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处理。
53. 根据权利要求 51或 52所述的装置, 其特征在于: 所述编码单元具
体用于对所述第四指示信息进行熵编码, 以使所述第四指示信息在所述目标 码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
54. 根据权利要求 51至 53中任一项所述的装置, 其特征在于: 所述编 码单元具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行编码, 确定上下文;
用于根据所述上下文, 对所述第四指示信息进行熵编码。
55. 一种用于图像处理的装置, 其特征在于, 所述装置包括: 解码单元, 用于从目标码流中, 获取第四指示信息;
获取单元, 用于当确定与目标图像块的第一目标图像子块相对应的第一 基本层图像子块的运动信息为空时, 基于所述解码单元获取的第四指示信 息, 根据所述第一基本层图像子块的重建像素, 确定用于对所述第一目标图 像子块进行编码的第二参考信息, 其中, 所述第一基本层图像子块是位于基 本层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层图 像与所述增强层图像相对应,且所述第一基本图像块子块在所述基本层图像 中的空间位置与所述第一目标图像子块在所述增强层图像中的空间位置相 对应;
所述编码单元还用于对所述目标码流进行解码, 以获取所述目标图像 块。
56. 根据权利要求 55所述的装置, 其特征在于: 所述解码单元具体用 于对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处理。
57. 根据权利要求 55或 56所述的装置, 其特征在于: 所述解码单元具 体用于从目标码流中, 获取第四指示信息, 其中, 所述第四指示信息在所述 目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
58. 根据权利要求 55至 57中任一项所述的装置, 其特征在于: 所述解 码单元具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行解码, 确定上下文;
用于根据所述上下文, 进行熵解码, 以确定所述第四指示信息。
59. 一种用于图像处理的编码器, 其特征在于, 所述编码器包括: 总线;
与所述总线相连的处理器;
与所述总线相连的存储器;
其中, 所述处理器通过所述总线, 调用所述存储器中存储的程序, 以用 于当确定与目标图像块的第一目标图像子块相对应的第一基本层图像子块 的运动信息为空时, 根据所述第一基本层图像子块的重建像素, 确定用于对 所述第一目标图像子块进行编码的第二参考信息, 其中, 所述第一基本层图 像子块是位于基本层图像中的图像块, 所述目标图像块位于增强层图像中, 所述的基本层图像与所述增强层图像相对应,且所述第一基本图像块子块在 所述基本层图像中的空间位置与所述第一目标图像子块在所述增强层图像 中的空间位置相对应;
对所述目标图像块进行编码, 以生成目标码流以及包含于所述目标码流 中的第四指示信息。
60. 根据权利要求 59所述的编码器, 其特征在于: 所述处理器具体用 对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处理。
61. 根据权利要求 59或 60所述的编码器, 其特征在于, 所述处理器具 体用于对所述第四指示信息进行熵编码, 以使所述第四指示信息在所述目标 码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
62. 根据权利要求 59至 61中任一项所述的编码器, 其特征在于: 所述 处理器具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行编码, 确定上下文;
用于根据所述上下文, 对所述第四指示信息进行熵编码。
63. 一种用于图像处理的解码器, 其特征在于, 所述解码器包括: 总线;
与所述总线相连的处理器;
与所述总线相连的存储器;
其中, 所述处理器通过所述总线, 调用所述存储器中存储的程序, 以用 于从目标码流中, 获取第四指示信息;
用于当确定与目标图像块的第一目标图像子块相对应的第一基本层图 像子块的运动信息为空时, 基于所述第四指示信息, 根据所述第一基本层图 像子块的重建像素,确定用于对所述第一目标图像子块进行编码的第二参考 信息, 其中, 所述第一基本层图像子块是位于基本层图像中的图像块, 所述 目标图像块位于增强层图像中, 所述的基本层图像与所述增强层图像相对 应,且所述第一基本图像块子块在所述基本层图像中的空间位置与所述第一
目标图像子块在所述增强层图像中的空间位置相对应;
用于对所述目标码流进行解码, 以获取所述目标图像块。
64. 根据权利要求 63所述的解码器, 其特征在于: 所述处理器具体用 于对位于所述目标图像子块之间的边界附近的像素进行去块效应滤波处理。
65. 根据权利要求 63或 64所述的解码器, 其特征在于, 所述处理器具 体用于从目标码流中, 获取第四指示信息, 其中, 所述第四指示信息在所述 目标码流中与跳过模式标志位或融合 MERGE模式标志位信息相邻。
66. 根据权利要求 63至 65中任一项所述的解码器, 其特征在于: 所述 处理器具体用于根据所述增强层图像中位于预设位置的参考图像块是否使 用参考信息进行解码, 确定上下文;
用于根据所述上下文, 进行熵解码, 以确定所述第四指示信息。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210375019.5 | 2012-09-29 | ||
| CN201210375019.5A CN103716629B (zh) | 2012-09-29 | 2012-09-29 | 用于图像处理的方法、装置、编码器和解码器 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2014048372A1 true WO2014048372A1 (zh) | 2014-04-03 |
Family
ID=50387015
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2013/084504 Ceased WO2014048372A1 (zh) | 2012-09-29 | 2013-09-27 | 用于图像处理的方法、装置、编码器和解码器 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN103716629B (zh) |
| WO (1) | WO2014048372A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| RU2793825C1 (ru) * | 2019-08-26 | 2023-04-06 | Хуавэй Текнолоджиз Ко., Лтд. | Способ и устройство для хранения информации о движении |
| US11706417B2 (en) | 2018-09-10 | 2023-07-18 | Huawei Technologies Co., Ltd. | Video decoding method and video decoder |
| US12081765B2 (en) | 2019-08-26 | 2024-09-03 | Huawei Technologies Co., Ltd. | Method and apparatus for motion information storage |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20170026334A (ko) * | 2014-07-06 | 2017-03-08 | 엘지전자 주식회사 | 비디오 신호의 처리 방법 및 이를 위한 장치 |
| CN109996075B (zh) * | 2017-12-29 | 2022-07-12 | 华为技术有限公司 | 一种图像解码方法及解码器 |
| CN117956182A (zh) | 2018-06-04 | 2024-04-30 | 华为技术有限公司 | 获取运动矢量的方法和装置 |
| CN112598572B (zh) * | 2019-10-01 | 2022-04-15 | 浙江大学 | 一种筛选子块图像与处理单元的方法及装置 |
| CN114339262B (zh) * | 2020-09-30 | 2023-02-14 | 华为技术有限公司 | 熵编/解码方法及装置 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101156454A (zh) * | 2005-02-07 | 2008-04-02 | 三星电子株式会社 | 用来压缩多层运动向量的方法与装置 |
| CN101755458A (zh) * | 2006-07-11 | 2010-06-23 | 诺基亚公司 | 可缩放视频编码 |
| US20120201301A1 (en) * | 2006-01-11 | 2012-08-09 | Qualcomm Incorporated | Video coding with fine granularity spatial scalability |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100664929B1 (ko) * | 2004-10-21 | 2007-01-04 | 삼성전자주식회사 | 다 계층 기반의 비디오 코더에서 모션 벡터를 효율적으로압축하는 방법 및 장치 |
| CN101198064A (zh) * | 2007-12-10 | 2008-06-11 | 武汉大学 | 一种分辨率分层技术中的运动矢量预测方法 |
-
2012
- 2012-09-29 CN CN201210375019.5A patent/CN103716629B/zh active Active
-
2013
- 2013-09-27 WO PCT/CN2013/084504 patent/WO2014048372A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101156454A (zh) * | 2005-02-07 | 2008-04-02 | 三星电子株式会社 | 用来压缩多层运动向量的方法与装置 |
| US20120201301A1 (en) * | 2006-01-11 | 2012-08-09 | Qualcomm Incorporated | Video coding with fine granularity spatial scalability |
| CN101755458A (zh) * | 2006-07-11 | 2010-06-23 | 诺基亚公司 | 可缩放视频编码 |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11706417B2 (en) | 2018-09-10 | 2023-07-18 | Huawei Technologies Co., Ltd. | Video decoding method and video decoder |
| US12047577B2 (en) | 2018-09-10 | 2024-07-23 | Huawei Technologies Co., Ltd. | Video decoding method and video decoder |
| US12445616B2 (en) | 2018-09-10 | 2025-10-14 | Huawei Technologies Co., Ltd. | Video decoding method and video decoder |
| RU2793825C1 (ru) * | 2019-08-26 | 2023-04-06 | Хуавэй Текнолоджиз Ко., Лтд. | Способ и устройство для хранения информации о движении |
| US12081765B2 (en) | 2019-08-26 | 2024-09-03 | Huawei Technologies Co., Ltd. | Method and apparatus for motion information storage |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103716629A (zh) | 2014-04-09 |
| CN103716629B (zh) | 2017-02-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112055968B (zh) | 视频解码方法、装置、存储介质以及电子设备 | |
| TWI532369B (zh) | 用於基於高效率視訊寫碼之可擴縮寫碼視訊資訊之裝置及方法 | |
| CN105247867B (zh) | 用于不同层间预测类型的参考图片的独立重新采样及选择 | |
| CN103444174B (zh) | 视频编码和解码 | |
| CN113498607B (zh) | 视频编码方法、解码方法、装置和可读介质 | |
| JP6352390B2 (ja) | 高レベルシンタックス専用shvcにおける一般化残差予測ならびにそのシグナリングおよび管理 | |
| TWI535273B (zh) | 經組態以寫碼視訊資訊之設備及視訊寫碼裝置、編碼及解碼視訊資訊之方法與非暫態電腦可讀媒體 | |
| WO2014048372A1 (zh) | 用于图像处理的方法、装置、编码器和解码器 | |
| JP6495268B2 (ja) | パラメータセット内のビューidビット深度のシグナリング | |
| JP6573879B2 (ja) | ビデオ情報のスケーラブルコーディングのためのデバイスおよび方法 | |
| TWI504239B (zh) | 針對基於高效率視訊寫碼之可縮放寫碼之運動場升頻取樣 | |
| WO2020052534A1 (zh) | 视频解码方法及视频解码器 | |
| JP6367309B2 (ja) | 映像情報のスケーラブルコーディングのためのデバイス及び方法 | |
| CN111107354A (zh) | 一种视频图像预测方法及装置 | |
| CN111726622B (zh) | 视频编解码的方法、装置及介质 | |
| CN112771869B (zh) | 视频编码、解码方法及装置 | |
| CN116965031A (zh) | 基于模板匹配的自适应运动矢量分辨率(amvr) | |
| CN115428445A (zh) | 用于视频编码的方法和装置 | |
| JP7494303B2 (ja) | 符号化及び復号化方法並びに装置 | |
| CN111953996A (zh) | 视频解码的方法和装置 | |
| WO2014048378A1 (zh) | 用于图像处理的方法、装置、编码器和解码器 | |
| CN110868589A (zh) | 帧间预测方法、装置及其应用的编/解方法及装置 | |
| CN111010565B (zh) | 帧间预测方法、装置及其应用的编/解方法及装置 | |
| CN116057934A (zh) | 多视图相关的辅助增强信息消息 | |
| CN116325725B (zh) | 视频编解码方法、装置及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13842955 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 13842955 Country of ref document: EP Kind code of ref document: A1 |

















