WO2014106487A1 - 基于双向预测的编码方法、解码方法和装置 - Google Patents

基于双向预测的编码方法、解码方法和装置 Download PDF

Info

Publication number
WO2014106487A1
WO2014106487A1 PCT/CN2014/070172 CN2014070172W WO2014106487A1 WO 2014106487 A1 WO2014106487 A1 WO 2014106487A1 CN 2014070172 W CN2014070172 W CN 2014070172W WO 2014106487 A1 WO2014106487 A1 WO 2014106487A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
enhancement layer
reference image
residual
list
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
Application number
PCT/CN2014/070172
Other languages
English (en)
French (fr)
Inventor
杨海涛
张金雷
李斌
李厚强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
University of Science and Technology of China USTC
Original Assignee
Huawei Technologies Co Ltd
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd, University of Science and Technology of China USTC filed Critical Huawei Technologies Co Ltd
Publication of WO2014106487A1 publication Critical patent/WO2014106487A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/187Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a bidirectional prediction based encoding method, decoding method and apparatus. Background technique
  • Scalable Video Coding SVC
  • JVT Joint Video Team
  • Scalable coding techniques use multiple levels of code streams to represent video images of different qualities, hence the name layered coding.
  • the lowest quality layer that can be provided is called the base layer, and the layer that enhances spatial resolution, time resolution, or signal-to-noise ratio strength is called an enhancement layer.
  • Spatial scalable coding utilizes motion information, texture information, and residual information between different spatial layers; time scalable coding uses hierarchical bi-predictive image coding (Hierarchical B) coding techniques; SNR scalable coding can use coarse-grained quality scalability (Coarse Grain Scalability, CGS) method and Median Grain Scalability (MGS) method.
  • CGS coarse-grained quality scalability
  • MGS Median Grain Scalability
  • the content of the enhancement layer image is the same as the content of the corresponding base layer image, but the spatial resolution of the image of the layer is lower. Therefore, although the low frequency signal in the enhancement layer image can be accurately predicted from the base layer image, part of the high frequency signal in the enhancement layer image may not be obtained from the base layer image.
  • the enhancement layer image of the currently encoded enhancement layer image (hereinafter referred to as enhancement layer current image) has the same resolution as the current image of the enhancement layer in the time domain, and may include high frequency signals in the current image of the enhancement layer. .
  • the predicted signal of the current image of the enhancement layer can be determined in combination with the low frequency signal acquired from the base layer and the high frequency signal acquired from the enhancement layer.
  • the difference between the already encoded enhancement layer reference image block of the enhancement layer current image block and the corresponding upsampled image block of the corresponding base layer reconstruction image block may be used as a high frequency signal, using the basic layer corresponding to the currently processed enhancement layer image block.
  • Upsampled image of layer reconstructed image block The block acts as a low frequency signal, and the intensity value of the high frequency signal is superimposed with the intensity value of the low frequency signal to obtain a prediction signal of the current image block of the enhancement layer.
  • This processing method can be used for encoding and decoding, called differential mode.
  • Embodiments of the present invention provide a bidirectional prediction-based coding method, decoding method, and apparatus, which are capable of implementing a differential mode at a lower cost.
  • a bidirectional prediction-based coding method including: generating at least one residual image according to at least one enhancement layer reference image of an enhancement layer current image and a base layer image corresponding to at least one enhancement layer reference image, and The at least one residual image is added to the first reference image list of the enhancement layer current image as at least one first reference image; the second reference image is generated according to the base layer image corresponding to the enhancement layer current image, and the second reference is generated Adding an image to a second reference image list of the enhancement layer current image; encoding, according to the first reference image list and the second reference image list, the image block of the enhancement layer current image by using a bidirectional prediction method, wherein the first reference image The list is one of a forward reference image list and a backward reference image list of the enhancement layer current image, and the second reference image list is the other of the forward reference image list and the backward reference image list.
  • the encoding, by using the bidirectional prediction method, the image block of the current image of the enhancement layer, based on the first reference image list and the second reference image list specifically includes: a second reference image list, using a bidirectional prediction method to perform motion estimation on the image block of the current image of the enhancement layer to determine motion information of the image block; and performing image block of the current image of the enhancement layer according to motion information of the image block
  • the motion compensation predicts a predicted difference signal of the image block; the motion information and the predicted difference signal are encoded, and the obtained encoded information is added to the encoded stream formed by the encoding and sent to the decoding end.
  • the weighted prediction parameters comprises: a first prediction signal of the right weight M3 ⁇ 4, heavy weights Wl of the second prediction signal, the offset of the first prediction signal. . , the offset of the second prediction signal. a precision control factor shift, wherein the weighted prediction operation is performed on the first prediction signal and the second prediction signal based on the weighted prediction parameter to superimpose the first prediction signal and the second prediction signal to obtain a prediction signal of the image block, specifically including : performing a weighted prediction operation on the first prediction signal and the second prediction signal according to the weighted prediction parameter to obtain a prediction signal of the image block:
  • predSamples (P 0 xw 0 + P l w l + ((. 0 + + 1) « (shift - 1) ⁇ shift , where predSampleS is the predicted signal of the image block, which means shifting to the left, ⁇ indicates shifting to the right, p. is the first prediction signal, which is the second prediction signal.
  • the first prediction signal is an unsigned number converted after offset
  • the offset is the offset when the first prediction signal is converted to an unsigned number.
  • the encoding method of the first aspect further includes: adding, in the code stream formed after the encoding, indicating that the differential mode is allowed to be performed.
  • Encoding the first identification information so that the decoding end determines, according to the first identification information, that the one of the at least one residual image in the first reference image list and the second reference image in the second reference image list are allowed to be based on the bidirectional prediction method
  • the image block of the current image of the enhancement layer is decoded.
  • the foregoing generating at least one residual image according to the at least one enhancement layer reference image of the enhancement layer current image and the corresponding base layer image includes: generating the at least one residual image according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and the corresponding base layer image, where the forward enhancement layer reference image is a forward reference One of the image lists, the backward enhancement layer reference image is one of the backward reference image lists.
  • the encoding method of the first aspect further includes: the enhancement layer reference image in the at least one enhancement layer reference image and the corresponding image
  • the residual image is stored in the same image buffer, wherein the image sequence number of the enhancement layer reference image is consistent with the image sequence number of the corresponding residual image, and a first additional identifier is added for the corresponding residual image, so that The encoding end distinguishes the enhancement layer reference image from the corresponding residual image according to the first additional identifier when managing the residual image and the enhancement layer reference image; or, the enhancement layer reference image in the at least one enhancement layer reference image and The corresponding residual image is stored in a different image buffer, wherein the image sequence number of the enhancement layer reference image coincides with the image sequence number of the corresponding residual image.
  • the coding method of the first aspect further includes: determining, according to a preset criterion, an enhancement layer reference image corresponding to an image sequence number in the image buffer area. And/or whether the corresponding residual image is a reference image of the subsequently encoded image; if the enhancement layer image corresponding to the one image sequence number in the image buffer and/or the corresponding residual image is not determined according to a preset criterion The enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer as a reference image of the subsequently encoded image.
  • the coding method of the first aspect further includes: generating decoded image management information, where the decoded image management information is used to indicate an image sequence in an image buffer Whether the enhanced layer reference image corresponding to the number and/or the corresponding residual image is a reference image of the subsequently encoded image; the decoded image management information is added to the coded stream formed by the encoding.
  • the foregoing generating at least one residual image according to the at least one enhancement layer reference image of the enhancement layer current image and the corresponding base layer image includes: performing upsampling on the base layer image corresponding to the at least one enhancement layer reference image of the current image of the enhancement layer, generating at least one upsampled image, and subtracting the at least one upsampled image from the corresponding enhancement layer reference image respectively, Get the above The at least one residual image, wherein the generating the second reference image according to the base layer image corresponding to the current image of the enhancement layer comprises: upsampling the base layer image corresponding to the current image of the enhancement layer to generate a second reference image.
  • the foregoing at least one enhancement layer reference image according to the enhancement layer current image And generating, by the corresponding base layer image, the at least one residual image, the method comprising: subtracting the at least one enhancement layer reference image from the corresponding base layer image to obtain the at least one residual image, where the foregoing
  • the generating, by the base layer image, the second reference image comprises: using the base layer image corresponding to the current image of the enhancement layer as the second reference image.
  • the coding method of the first aspect further includes: determining, according to the second identification information, And an enhancement layer reference image for generating the at least one residual image, wherein the second identification information is used to indicate information of the at least one residual image.
  • the second identifier information includes: the number of the at least one residual image, and the identifier of the enhancement layer reference image corresponding to the at least one residual image. Information, or image sequence number information of the enhancement layer reference image corresponding to the at least one residual image, wherein the second identification information is predicted to be set at the encoding end or added to the code stream formed after the encoding.
  • the coding method of the first aspect further includes: according to the enhancement A temporal correlation of the layer current image with the at least one enhancement layer reference image determines an enhancement layer reference image for generating the at least one residual image.
  • determining the at least one residual image according to the temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image including: The enhancement layer reference image in which the absolute value of the difference between the image sequence code number and the image sequence number of the enhancement layer current image in the at least one enhancement layer reference image is less than a preset threshold value determines the at least one residual image.
  • a second aspect provides a bidirectional prediction-based decoding method, including: generating at least one residual image according to at least one enhancement layer reference image of an enhancement layer current image and a base layer image corresponding to at least one enhancement layer reference image, and At least one residual image described above as at least one Adding a first reference image to a first reference image list of the enhancement layer current image; generating a second reference image according to the base layer image corresponding to the enhancement layer current image, and adding the second reference image to the enhancement layer current image a second reference image list; decoding, according to the first reference image list and the second reference image list, the image block of the enhancement layer current image by using a bidirectional prediction method, wherein the first reference image list is a forward direction of the enhancement layer current image One of the reference image list and the backward reference image list, the second reference image list being the other of the forward reference image list and the backward reference image list.
  • the foregoing based on the first reference image list and the second reference image list, decoding the image block of the current image of the enhancement layer by using a bidirectional prediction method, including: from the code stream formed after the encoding Obtaining motion information of the image block of the current image of the enhancement layer and encoding information of the prediction difference signal of the image block, and decoding the encoding information to obtain motion information and a prediction difference signal of the image block; based on the first reference image list and And a second reference image list, performing motion compensation decoding on the image block of the current image of the enhancement layer according to the motion information of the image block and the predicted difference signal.
  • a bidirectional prediction method including: from the code stream formed after the encoding Obtaining motion information of the image block of the current image of the enhancement layer and encoding information of the prediction difference signal of the image block, and decoding the encoding information to obtain motion information and a prediction difference signal of the image block; based on the first reference image list and And a second reference image list, performing motion compensation decoding
  • the foregoing motion information includes: the motion information includes an index of the selected reference image in the first reference image list, and the first motion vector and the second reference image.
  • Performing motion compensation decoding on the block includes: if the motion information indicates that the selected reference image of the image block in the first reference image list is one of the at least one residual image and the selected reference of the image block in the second reference image list
  • the image is a second reference image
  • the first prediction signal is obtained from one of the at least one residual image according to the first motion vector
  • the second prediction signal is obtained from the second reference image according to the second motion vector;
  • the prediction signal and the second prediction signal are subjected to a weighted prediction operation to be the first And superimposing the prediction signal and the second prediction signal to obtain
  • the weighted prediction parameters comprises: a first prediction signal of the right weight ⁇ 3 ⁇ 4, heavy weights Wl of the second prediction signal, the offset of the first prediction signal. . , the offset of the second prediction signal. a precision control factor shift, wherein the weighted prediction operation is performed on the first prediction signal and the second prediction signal based on the weighted prediction parameter to perform the first prediction And superimposing the signal and the second prediction signal to obtain the prediction signal of the image block, comprising: performing a weighted prediction operation on the first prediction signal and the second prediction signal according to the weighted prediction parameter to obtain a prediction signal of the image block:
  • predSamples (P 0 xw 0 + P l xw l + ((.. + o t + 1) « (shift - 1) » shift , where pred ampleS is the predicted signal of the image block, which means shifting to the left Bit, the "represents shift to the right, and P. is the first prediction signal, which is the second prediction signal.
  • the decoding method of the second aspect further includes: obtaining, from the code stream, indicating that the differential mode is allowed to be used. Decoding the first identification information, so that the decoding end determines, according to the first identification information, that the image block of the enhancement layer current image is decoded by using a bidirectional prediction method based on the first reference image list and the second reference image list.
  • the foregoing at least one enhancement layer reference image and the corresponding base layer image are generated according to the enhancement layer current image
  • the method includes: generating the at least one residual image according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and the corresponding base layer image, where the forward enhancement layer reference image is a forward reference image One of the lists, the backward enhancement layer reference image is one of the backward reference image lists.
  • the decoding method of the second aspect further includes: the enhancement layer reference in the at least one enhancement layer reference image
  • the image and the corresponding residual image are stored in the same image buffer, wherein the image sequence number of the enhancement layer reference image is consistent with the image sequence number of the corresponding residual image, and the first additional identifier is added for encoding Ending the residual layer reference image and the corresponding residual image according to the first additional identifier when managing the residual image and the enhancement layer reference image in the image buffer; or, enhancing the enhancement in the at least one enhancement layer reference image
  • the layer reference image and the corresponding residual image are stored in different image buffers, wherein the image sequence number of the enhancement layer reference image coincides with the image sequence number of the corresponding residual image.
  • the decoding method of the second aspect further includes: determining, according to a preset criterion, whether the enhancement layer reference image and the corresponding residual image corresponding to one image sequence number in the image buffer area are used as reference images of the subsequently decoded image; Determining, according to a preset criterion, an enhancement layer image corresponding to an image sequence number in the image buffer area and/or a corresponding residual image is no longer used as a reference image of a subsequently decoded image, and deleting the enhancement layer reference from the image buffer area Image and/or corresponding residual image.
  • the decoding method of the second aspect further includes: decoded image management information obtained from a code stream, where the decoded image management information is used Determining whether an enhancement layer reference image corresponding to an image sequence number and/or a corresponding residual image in the image buffer area is used as a reference image of a subsequently encoded image; if the image buffer area is sequentially numbered with an image according to the decoded image management information The corresponding enhancement layer image and/or corresponding residual image is no longer used as a reference image for the subsequently decoded image, and the enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer.
  • the foregoing at least one enhancement layer reference image of the enhancement layer current image and the corresponding base layer image are generated by the at least one And the residual layer image is: performing upsampling on the base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image, generating at least one upsampled image, and respectively corresponding to the at least one upsampled image and the corresponding enhancement layer reference The image is subtracted to obtain the at least one residual image, wherein the generating the second reference image according to the base layer image corresponding to the current image of the enhancement layer includes: upsampling the base layer image corresponding to the current image of the enhancement layer to generate Second reference image.
  • the foregoing at least one enhancement layer reference image according to the enhancement layer current image And generating, by the corresponding base layer image, the at least one residual image, comprising: subtracting the at least one enhancement layer reference image from the corresponding base layer image to obtain the at least one residual image, where the foregoing is corresponding to the current image of the enhancement layer.
  • the generating, by the base layer image, the second reference image comprises: using the base layer image corresponding to the current image of the enhancement layer as the second reference image.
  • the decoding method of the second aspect further includes: The identification information determines an enhancement layer reference image for generating the at least one residual image, wherein the second identification information is used to indicate information of the at least one residual image.
  • the second identifier information includes: the number of the at least one residual image, the identification information of the enhancement layer reference image corresponding to the at least one residual image, or the image sequence number of the enhancement layer reference image corresponding to the at least one residual image. Information, wherein the second identification information is predicted to be set at the encoding end or obtained from the code stream.
  • the decoding method of the second aspect further includes: according to the enhancement A temporal correlation of the layer current image with the at least one enhancement layer reference image determines an enhancement layer reference image for generating the at least one residual image.
  • the foregoing determining the at least one residual according to a time correlation between the enhancement layer current image and the at least one enhancement layer reference image And the image includes: determining the at least one residual image according to the enhancement layer reference image that the absolute value of the difference between the image sequence coding number of the enhancement layer reference image and the image sequence number of the enhancement layer current image is less than a preset threshold.
  • a third aspect provides an encoding apparatus based on bidirectional prediction, including: a generating module, configured to generate at least one residual according to at least one enhancement layer reference image of an enhancement layer current image and a base layer image corresponding to at least one enhancement layer reference image a difference image, and adding the at least one residual image as the at least one first reference image to the first reference image list of the enhancement layer current image; and configured to generate a second reference according to the base layer image corresponding to the enhancement layer current image An image, and adding a second reference image to the second reference image list of the enhancement layer current image; an encoding module, configured to perform the enhancement layer current by using a bidirectional prediction method based on the first reference image list and the second reference image list The image block of the image is encoded, wherein the first reference image list is one of a forward reference image list and a backward reference image list of the enhancement layer current image, and the second reference image list is a forward reference image list and a backward reference image The other in the list.
  • the encoding module performs motion estimation on the image block of the current image of the enhancement layer by using a bidirectional prediction method based on the first reference image list and the second reference image list to determine motion of the image block.
  • Information performing motion compensation prediction on the image block of the current image of the enhancement layer to obtain a prediction difference signal of the image block according to the motion information of the image block; encoding the motion information and the prediction difference signal, and adding the obtained coding information
  • the code stream formed after encoding is sent to the decoding end.
  • the coding module performs a bidirectional search on the first reference image list and the second reference image list, and determines the image block An optimal reference image and a first motion vector in the reference image list and an optimal reference image and a second motion vector in the second reference image list, wherein the motion information includes an index of the optimal reference image in the first reference image list And an index of the first motion vector and the optimal reference image in the second reference image list and the second motion vector; if the motion information indicates that the optimal reference image of the image block in the first reference list is the at least one residual One of the images and the optimal reference image of the image block in the second reference image list is a second reference image, and the first prediction signal is obtained from one of the at least one residual image according to the first motion vector, according to the second motion vector Obtaining a second prediction signal from the second reference image; performing a weighted prediction operation on the first prediction signal and the second prediction signal based on the weighted prediction parameter, so as to superimpose the first prediction signal
  • the weighted prediction parameter includes: a weight w of the first prediction signal.
  • the weight of the second prediction signal W1 the offset of the first prediction signal. . , the offset of the second prediction signal.
  • the precision control factor shift wherein the encoding module performs a weighted prediction operation on the first prediction signal and the second prediction signal based on the weighted prediction parameter to obtain a prediction signal of the image block:
  • predSamples (P 0 xw 0 + P l xw l + ((.. + o t + 1) « (shift - 1) » shift , where pred ampleS is the predicted signal of the image block, which means shifting to the left Bit, the "represents shift to the right, P. is the first prediction signal, which is the second prediction signal.
  • the encoding apparatus of the third aspect further includes: a first adding module, configured to: Adding first identification information for indicating whether to allow encoding using the differential mode, so that the decoding end determines, based on the first identification information, that one of the at least one residual image and the second reference image in the first reference image list are allowed to be based on the first identification information.
  • the second reference image in the list decodes the image block of the current image of the enhancement layer by using a bidirectional prediction method.
  • the generating module generates the at least one residual image according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and the corresponding base layer image, where the forward enhancement layer The reference image is one of the forward reference image lists, and the backward enhancement layer reference image is one of the backward reference image lists.
  • the encoding apparatus of the third aspect further includes: a storage module, configured to use the at least one enhancement layer reference image
  • the enhancement layer reference image and the corresponding residual image are stored in the same image buffer, wherein the image sequence number of the enhancement layer reference image is consistent with the image sequence number of the corresponding residual image, and is the corresponding residual
  • the difference image adds a first additional identifier so that the encoding end distinguishes the enhancement layer reference image from the corresponding residual image according to the first additional identifier when managing the residual image and the enhancement layer reference image; or, for using the at least one enhancement
  • the enhancement layer reference image and the corresponding residual image in the layer reference image are stored in different image buffer regions, wherein the image sequence number of the enhancement layer reference image coincides with the image sequence number of the corresponding residual image described above.
  • the encoding apparatus of the third aspect further includes: a first determining module, configured to determine, in the image buffer, according to a preset criterion Whether the enhancement layer reference image corresponding to one image sequence number and/or the corresponding residual image is a reference image of the subsequently encoded image; a deletion module, configured to determine the image buffer in the image buffer according to a preset criterion In the case where the enhancement layer image corresponding to the sequence number and/or the corresponding residual image is no longer a reference image of the subsequently encoded image, the enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer.
  • the generating module is further configured to generate decoded image management information, where the decoded image management information is used to indicate an image sequence in the image buffer
  • the encoding device further includes: a second adding module, configured to add the decoded image management information to the code stream formed by the encoding, and the corresponding image of the enhancement layer reference image and/or the corresponding residual image is used as the reference image of the subsequently encoded image. in.
  • the generating module performs the base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image. Upsampling, generating at least one upsampled image, and subtracting the at least one upsampled image from its corresponding enhancement layer reference image to obtain the at least one residual image; performing the base layer image corresponding to the current image of the enhancement layer Sampling to generate a second parameter Test image.
  • the generating module is configured to correspond to the at least one enhancement layer reference image
  • the base layer image is subtracted to obtain the at least one residual image; and the base layer image corresponding to the current layer of the enhancement layer is used as the second reference image.
  • the coding apparatus of the third aspect further includes: And a module, configured to determine, according to the second identifier information, an enhancement layer reference image used to generate the at least one residual image, where the second identifier information is used to indicate information of the at least one residual image.
  • the second identifier information includes: the number of the at least one residual image, and the enhancement layer corresponding to the at least one residual image The identification information of the reference image, or the difference information of the image sequence number of the enhancement layer reference image corresponding to the at least one residual image, wherein the second identification information is preset in the encoding end or added to the code stream formed after the encoding .
  • the coding apparatus of the third aspect further includes: And a module, configured to determine, according to a temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image, an enhancement layer reference image used to generate the at least one residual image.
  • the foregoing determining, according to the time correlation between the current layer image of the enhancement layer and the at least one enhancement layer reference image, the foregoing at least one residual image includes: And determining the at least one residual image according to the enhancement layer reference image in which the absolute value of the difference between the image sequence code number and the image sequence number of the enhancement layer current image in the at least one enhancement layer reference image is less than a preset threshold.
  • a decoding apparatus based on bidirectional prediction, including: a generating module, configured to generate at least one residual according to at least one enhancement layer reference image of an enhancement layer current image and a base layer image corresponding to at least one enhancement layer reference image a difference image, and adding the at least one residual image as the at least one first reference image to the first reference image list of the enhancement layer current image; generating a second reference image according to the base layer image corresponding to the enhancement layer current image, And adding a second reference image to the second reference image list of the current image of the enhancement layer; and a decoding module, configured to perform, by using a bidirectional prediction method, the current image of the enhancement layer based on the first reference image list and the second reference image list The image block is decoded, wherein the first reference image list is an enhancement layer current image One of the forward reference image list and the backward reference image list, the second reference image list being the other of the forward reference image list and the backward reference image list.
  • the decoding module acquires the encoding information of the current image of the enhancement layer from the code stream formed by the encoding, and decodes the encoding information to obtain motion information of the image block and a prediction of the image block. a difference signal; based on the first reference image list and the second reference image list, performing motion compensation decoding on the image block of the enhancement layer current image according to the motion information of the image block and the prediction difference signal.
  • the motion information includes: the motion information includes an index of the selected reference image in the first reference image list, and a first motion vector, and An index of the selected reference image and a second motion vector in the second reference image list, the decoding module indicating, in the motion information, that the selected reference image of the image block in the first reference image list is one of the at least one residual image and The image block acquires a first prediction signal from one of the at least one residual image according to the first motion vector, in a case where the selected reference image in the second reference image list is the second reference image, according to the second motion vector Obtaining a second prediction signal according to the second reference image; performing a weighted prediction operation on the first prediction signal and the second prediction signal based on the weighted prediction parameter, to superimpose the first prediction signal and the second prediction signal to obtain a prediction signal of the image block; The predicted difference signal and the predicted signal of the image block obtain a reconstructed signal of the image block Wherein the weight
  • the weighted prediction parameters comprises: a first prediction signal of the right weight ⁇ 3 ⁇ 4, heavy weights Wl of the second prediction signal, the first prediction signal Offset. . , the offset of the second prediction signal. a precision control factor Shift, wherein the decoding module performs a weighted prediction operation on the first prediction signal and the second prediction signal based on the weighted prediction parameter to obtain a prediction signal of the image block:
  • predSamples (P 0 xw 0 + P l xw l + ((.. + o t + 1) « (shift - 1) » shift , where pred ampleS is the predicted signal of the image block, which means shifting to the left Bit, the "represents shift to the right, and P. is the first prediction signal, which is the second prediction signal.
  • the decoding apparatus of the fourth aspect further includes: a first acquiring module, configured to obtain, from the code stream, The differential mode performs the decoding of the first identification information, so that the decoding end determines, according to the first identification information, that the image block of the enhancement layer current image is decoded by using a bidirectional prediction method based on the first reference image list and the second reference image list.
  • the generating module is configured according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and The corresponding base layer image generates the at least one residual image, wherein the forward enhancement layer reference image is one of a forward reference image list and the backward enhancement layer reference image is one of a backward reference image list.
  • the decoding manner of the fourth aspect further includes: a storage module, configured to use the enhancement layer in the at least one enhancement layer reference image
  • the reference image and the corresponding residual image are stored in the same image buffer, wherein the image sequence number of the enhancement layer reference image is consistent with the image sequence number of the corresponding residual image, and the first residual image is added.
  • An additional identifier so that the encoding end distinguishes the enhancement layer reference image from the corresponding residual image according to the first additional identifier when managing the residual image and the enhancement layer reference image in the image buffer; or, the at least one enhancement layer is
  • the enhancement layer reference image and the corresponding residual image in the reference image are stored in different image buffer regions, wherein the image sequence number of the enhancement layer reference image coincides with the image sequence number of the corresponding residual image.
  • the decoding manner of the fourth aspect further includes: a first determining module, configured to determine, in the image buffer area according to the preset criterion An enhancement layer reference image corresponding to an image sequence number and/or a corresponding residual image as a reference image of a subsequently decoded image; a deletion module, configured to determine the image buffer in the image buffer according to a preset criterion In the case where the enhancement layer image corresponding to the sequence number and/or the corresponding residual image is no longer used as the reference image of the subsequently decoded image, the enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer.
  • the encoding apparatus of the fourth aspect further includes: a first obtaining module, configured to decode image management information acquired from the code stream, wherein the decoded image management information is used to indicate that the image buffer area is aligned with an image Whether the enhancement layer reference image corresponding to the sequence number and/or the corresponding residual image is a reference image of the subsequently encoded image; a deletion module, configured to determine an enhancement corresponding to an image sequence number in the image buffer area according to the decoded image management information In the case where the layer image and/or the corresponding residual image are no longer reference images of the subsequently decoded image, the enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer.
  • the generating module performs upsampling, and generates a base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image. At least one upsampled image, and subtracting the at least one upsampled image from its corresponding enhancement layer reference image to obtain the at least one residual image, and upsampling the base layer image corresponding to the enhancement layer current image, to A second reference image is generated.
  • the generating module is configured to correspond to the at least one enhancement layer reference image
  • the base layer image is subtracted to obtain the at least one residual image, and the base layer image corresponding to the current layer of the enhancement layer is used as the second reference image.
  • the decoding apparatus of the fourth aspect further includes: a second determining module, configured to: And determining, according to the second identification information, an enhancement layer reference image for generating the at least one residual image, wherein the second identification information is used to indicate information of the at least one residual image.
  • the second identifier information includes: the number of the at least one residual image, and the enhancement layer corresponding to the at least one residual image
  • the identification information of the reference image, or the image sequence number information of the enhancement layer reference image corresponding to the at least one residual image, and the second identification information is preset at the decoding end or acquired from the code stream.
  • the decoding apparatus of the fourth aspect further includes: And a determining module, configured to determine, according to a temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image, an enhancement layer reference image used to generate the at least one residual image.
  • the second determining module is configured to perform, according to the difference between the image sequence code number in the at least one enhancement layer reference image and the image sequence number of the current image of the enhancement layer
  • the enhancement layer reference image whose absolute value is less than the preset threshold
  • the at least one residual image is determined.
  • the embodiment of the present invention may add a residual image obtained according to the reference image of the current image of the enhancement layer and the corresponding base layer image to one reference image list, and add the image obtained according to the base layer image corresponding to the current image of the enhancement layer to another image.
  • the image list, and according to the two reference image lists the image block of the current image of the enhancement layer is encoded by the bidirectional prediction method, and the differential coding mode is implemented. Since the embodiment of the present invention implements the differential mode by means of the bidirectional prediction method, there is no need to modify the core module of the codec, and therefore, the implementation is less expensive.
  • FIG. 1 is a schematic flowchart of a bidirectional prediction based coding method according to an embodiment of the present invention.
  • 2 is a schematic flow chart of a bidirectional prediction based decoding method according to an embodiment of the present invention.
  • 3A is a schematic diagram of constructing a reference image list in accordance with one embodiment of the present invention.
  • Figure 3B is a schematic flow diagram of a bidirectional prediction based encoding process in accordance with one embodiment of the present invention.
  • FIG. 4 is a schematic flow diagram of a bidirectional prediction based decoding process in accordance with one embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a bidirectional prediction based encoding apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a bidirectional prediction based encoding apparatus according to another embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a bidirectional prediction based decoding apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a bidirectional prediction based decoding apparatus according to another embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a bidirectional prediction based encoding apparatus according to still another embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a bidirectional prediction based decoding apparatus according to still another embodiment of the present invention.
  • FIG. 1 is a schematic flow chart of a bidirectional prediction based coding method according to an embodiment of the present invention.
  • the method of Figure 1 is performed by an encoder and includes the following.
  • the first reference image list (for example, the forward or backward reference image list) of the enhancement layer current image may include the enhancement layer reference image of the enhancement layer current image before adding the at least one residual image.
  • Each enhancement layer reference image is a reference image of the enhancement layer current image in the time domain, which is an enhancement layer image that the encoder has processed before processing the current image of the enhancement layer, wherein the image signal is a reconstruction signal obtained by the encoder.
  • the residual image of the enhancement layer reference image of the embodiment of the present invention may be a difference image of the enhancement layer reference image and the base layer image corresponding to the enhancement layer reference image, that is, by subtracting the enhancement layer reference image from the enhancement
  • the image obtained by the base layer image corresponding to the layer reference image for example, in the case where the resolution of the enhancement layer is higher than the resolution of the base layer, the upsampled image may be first generated according to the base layer image corresponding to each enhancement layer reference image. And then subtracting the enhancement layer reference image from the upsampled image to obtain a residual image.
  • the embodiment of the present invention is not limited thereto.
  • the enhancement layer reference image and the base layer image corresponding to the enhancement layer reference image may be directly subtracted.
  • a residual image is obtained.
  • the subtraction of the two images referred to herein refers to the subtraction of the signal values of the image signals (i.e., the sample point signals) of the corresponding positions of the two images having the same resolution.
  • the image signal of the base layer image referred to here is reconstructed after being encoded. Assuming that the image signal is represented by 8 bits, the signal value ranges from 0 to 255, and the residual image signal ranges from -255 to 255.
  • the residual image signal can be clamped to a range of -128 to 127 to be represented by 8 bits, thereby reducing the implementation cost.
  • the residual image signal value can be incremented by 128 such that it is between 0 and 255.
  • the second reference image of the enhancement layer current image may include an enhancement layer reference image of the enhancement layer current image (eg, a backward or forward enhancement layer reference image).
  • the second reference image may be an upsampled image generated according to the base layer image corresponding to the current image of the enhancement layer.
  • the embodiment of the present invention is not limited thereto.
  • the base layer image corresponding to the current image of the enhancement layer may be directly used as the second reference image, or The base layer image corresponding to the current image of the enhancement layer is subjected to smoothing filtering or the like as a second reference image.
  • the image block of the enhancement layer current image by using a bidirectional prediction method according to the first reference image list and the second reference image list, where the first reference image list is a forward reference image list of the enhancement layer current image and To one of the reference image lists, the second reference image list is the other of the forward reference image list and the backward reference image list.
  • the bidirectional prediction method refers to a method of predicting an image block of a current image of an enhancement layer using a forward reference image and a backward reference image.
  • Embodiments of the present invention can superimpose the sample point signal of the residual image and the sample point signal of the second reference image by means of the bidirectional prediction mechanism in the mainstream video compression scheme to implement differential mode coding.
  • the second reference image list is a backward reference image list, or, in the case where the first reference image list is a backward reference image list
  • the second reference image list is a forward reference image list. It should be understood that embodiments of the present invention are also applicable to the case where the first reference picture list and the second reference picture list are both forward or backward reference picture lists.
  • the embodiment of the present invention may add a residual image obtained according to the reference image of the current image of the enhancement layer and the corresponding base layer image to one reference image list, and add the image obtained according to the base layer image corresponding to the current image of the enhancement layer to another image.
  • the image list, and according to the two reference image lists the image block of the current image of the enhancement layer is encoded by the bidirectional prediction method, and the differential coding mode is implemented. Since the embodiment of the present invention implements the differential mode by means of the bidirectional prediction method, it is not necessary to set whether or not to use the differential mode flag for each image block, and therefore, the implementation is less expensive.
  • a motion estimation of the image block of the current image of the enhancement layer may be performed by using a bidirectional prediction method based on the first reference image list and the second reference image list to determine motion information of the image block; according to the motion of the image block Information, performing motion compensation prediction on the image block of the current image of the enhancement layer to obtain a prediction difference signal of the image block; encoding the motion information and the prediction difference signal, and adding the obtained coding information to the code stream formed by the coding Send to the decoder.
  • an embodiment of the present invention searches (ie, motion estimates) an optimal matching block of the image block in the first reference image list and the second reference list by bidirectional prediction, and the reference image in which the optimal matching block is located is an optimal reference. image.
  • the motion information of the image block may include a motion vector for indicating a relative displacement of the matching block of the image block in the time domain reference image and the image block.
  • the motion information may also include a prediction direction, such as one-way prediction or two-way prediction.
  • the motion information may further include information indicating an optimal reference image of the image block.
  • a bidirectional search may be performed on the first reference image list and the second reference image list, and an optimal reference image and a first motion vector in the first reference image list are determined for the image block and An optimal reference image and a second motion vector in the second reference image list, wherein the motion information includes an index of the optimal reference image in the first reference image list and the first motion vector and an optimal reference in the second reference image list An index of the image and a second motion vector; if the motion information indicates that the optimal reference image of the image block in the first reference list is one of the at least one residual image and the image block is the most in the second reference image list
  • the optimal reference image is a second reference image, and the first prediction signal is obtained from one of the at least one residual image according to the first motion vector, and the second prediction signal is obtained from the second reference image according to the second motion vector;
  • the first prediction signal and the second prediction signal perform a weighted prediction operation to compare the first prediction signal with the second
  • the prediction signal is superimposed to obtain a prediction signal of the
  • the embodiment of the present invention may perform a one-way search on the reference image other than the residual image and the reference image other than the second reference image in the second reference image list in the first reference image list, respectively.
  • a reference image other than the residual image in a reference image list and a reference image other than the second reference image in the second reference image list are bidirectionally searched, and at least one residual image in the first reference image list may be Performing a bidirectional search with the second reference image in the second reference image list to obtain an optimal reference image, for example, determining a reference image that minimizes the sum of absolute sums of the image blocks and the matching blocks (Sum of Absolute Difference, SAD) An optimal reference image, wherein the optimal reference image includes the matching block.
  • SAD Sum of Absolute Difference
  • the embodiment of the present invention may further perform a one-way search on the first reference image list and the second reference image list to determine an optimal reference image and a second reference image list in the first reference image list.
  • Optimal reference image in this case, it is also possible to compare the optimal reference image obtained by the one-way search with the optimal reference image obtained by the bidirectional search to obtain the final prediction direction and the optimal reference image, for example, if one-way The sum of the absolute differences between the image block and the matching block obtained during the search (Sum The Absolute Difference (SAD) is larger than the Sum of Absolute Difference (SAD) obtained when the bidirectional search is obtained. Then the bidirectional prediction is selected as the final prediction mode, and the optimal reference obtained when bidirectional search is selected.
  • SAD Sum of Absolute Difference
  • SAD Sum of Absolute Difference
  • the image is the final optimal reference image and vice versa.
  • the embodiment of the present invention adds the at least one residual image and the second reference image respectively in the first reference image list and the second reference image list such that the at least one residual image is In a case where the first and second reference images are determined as the optimal reference image, the residual image and the second reference image may be superimposed to implement the differential mode.
  • the embodiment of the present invention may further perform a one-way search on the second reference image list, and use at least one of the first reference image list in the case that the second reference image is determined to be the optimal reference image.
  • the residual image and the second reference image in the second reference image list are bidirectionally searched, the optimal reference image is determined, and the sum of the absolute differences of the image block and the matching block in the two cases is compared to determine the final prediction direction. And optimal reference image.
  • the first prediction signal and the second prediction signal may be respectively set with corresponding weights based on a preset rule, or a similarity degree between the final prediction signal obtained by the weighted prediction and the original signal. That is, weighted prediction parameters.
  • the final prediction signal of the image block is an average of the first prediction signal and the second prediction signal
  • the weighted prediction parameters of the first prediction signal and the weighted prediction parameters of the second prediction signal are respectively set to 0.5.
  • the similarity between the content of the currently processed image and the image content of the first prediction signal and the similarity between the content of the currently processed image and the image content of the second prediction signal may be used.
  • the weighted prediction parameters of the first prediction signal and the second prediction signal are determined in order to make the final prediction signal most similar to the original signal.
  • an appropriate weighted prediction parameter may be set such that the final prediction signal of the image block is the first prediction signal. Superposition with the second prediction signal.
  • the weighted prediction parameter of the first prediction signal and the weighted prediction parameter of the second prediction signal are both set to 1 such that the weighted prediction operation is performed on the first prediction signal and the second prediction signal.
  • the above weighted prediction parameters are determined by the encoding end and added in the code stream formed after encoding.
  • the weighted prediction parameter is preset in the encoding end.
  • the weighted prediction parameter comprises: a weight ⁇ 3 ⁇ 4 of the first prediction signal, The weight of the second prediction signal Wi , the offset of the first prediction signal. . , the offset of the second prediction signal.
  • the precision control factor shift, wherein in 130, the first prediction signal and the second prediction signal may be weighted and predicted based on the weighted prediction parameter to obtain a prediction signal of the image block:
  • predSamples (P 0 xw 0 + P l xw l + ((.. + o t + 1) « (shift - 1) » shift , where pred ampleS is the predicted signal of the image block, which means shifting to the left Bit, the "represents shift to the right, and P. is the first prediction signal, which is the second prediction signal.
  • Both W1 and Wl should be set to (l «shift) to achieve the effect of an actual weight of 1.
  • the actual value range of the residual image signal is -128 to 127 and the overall offset 128 is converted to an unsigned number for storage and processing, it is necessary. . versus.
  • the sum of t is set to -256 to compensate for the aforementioned offset 128 to achieve p.
  • the effect of superimposing with this can be done at this time.
  • . versus. 1 is set to -128.
  • to compensate for the offset offset of the residual image signal it needs to be set. . versus.
  • the embodiment of the present invention may implement the differential mode by setting a weighting parameter, so that the first prediction signal obtained from the residual image and the second prediction signal obtained from the second reference image are superimposed to obtain a final prediction signal of the image block, due to the setting.
  • the weighting parameters do not need to be modified for the block-level core module in the conventional codec, and only the image-level operation can achieve the same function as the block-level differential mode, so while obtaining the differential mode coding gain, Reduced implementation costs.
  • the encoding method of FIG. 1 further includes: adding, in the code stream formed after the encoding, first identification information indicating that encoding is allowed to be performed in a differential mode, so that the decoding end Determining, according to the first identification information, allowing the image block of the current image of the enhancement layer to be performed by using a bidirectional prediction method based on one of the at least one residual image and the second reference image in the second reference image list in the first reference image list. decoding.
  • an identification bit can be added to the code stream to indicate whether the image in the current image sequence is in differential mode.
  • the identifier bit may be added in a Sequence Parameter Set (SPS) or a Picture Parameter Set (PPS).
  • SPS Sequence Parameter Set
  • PPS Picture Parameter Set
  • the flag bit 1 indicates that the differential mode is used
  • the flag bit 0 indicates that the difference is not used. mode.
  • the encoding end or the decoding end may determine whether the image in the current image sequence adopts a differential mode according to the identifier.
  • the embodiment of the present invention is not limited thereto, and the decoding end may be notified by other means whether the difference is used.
  • the mode for example, the encoding end and the decoding end are pre-agreed to use a differential mode or the like.
  • the at least one residual image may be generated according to a forward enhancement layer reference image and/or a backward enhancement layer reference image of the enhancement layer current image and a corresponding base layer image, where
  • the reference image to the enhancement layer is one of the forward reference image lists, and the backward enhancement layer reference image is one of the backward reference image lists.
  • At least one residual image may be generated from the forward enhancement layer reference image and the base layer image corresponding to the forward enhancement layer reference image.
  • the embodiment of the present invention is not limited thereto.
  • a part of the residual image may be generated according to the forward enhancement layer reference image and the base layer image corresponding to the forward enhancement layer reference image, according to the backward enhancement layer reference image and the latter.
  • the encoding method of FIG. 1 further includes: storing an enhancement layer reference image and a corresponding residual image in the at least one enhancement layer reference image into a same image buffer area, where the enhancement layer The image sequence number of the reference image and the corresponding picture sequence number (POC) of the corresponding residual image, and adding a first additional identifier to the corresponding residual image so that the encoding end manages the residual image and The enhancement layer reference image is distinguished from the corresponding residual image according to the first additional identifier when the layer reference image is enhanced.
  • POC picture sequence number
  • the image buffer area may be a Decoded Picture Buffer (DPB).
  • DPB Decoded Picture Buffer
  • the image sequence number of the enhancement layer reference image and the corresponding picture sequence number (POC) of the corresponding residual image may be the same, and embodiments of the present invention are not limited thereto, for example, Way to implement enhancement layer reference image and residual image Correspondence between.
  • the enhancement layer reference image of the embodiment of the present invention is an enhancement layer image that has been encoded, that is, an enhancement layer reconstructed image.
  • the enhancement layer reconstructed image may be stored into the decoded image buffer area. And subtracting the image generated from the base layer image corresponding to the enhanced layer reconstructed image by the enhanced layer reconstructed image to obtain a residual image, and storing the residual image in the same decoded image buffer.
  • the above POC can identify the position of the image in the video sequence, and therefore, in subsequent processing, the image and the residual image can be reconstructed according to the enhancement layer in the POC index DPB. Since the enhancement layer reconstructed image and the corresponding residual image use the same POC, the existing DPB management mechanism can be used to perform indexing, removing, and the like on the enhancement layer reconstructed image and the corresponding residual image based on the POC.
  • the encoding method of FIG. 1 further includes: storing an enhancement layer reference image and a corresponding residual image in the at least one enhancement layer reference image into different decoded image buffer regions, where The image sequence number of the enhancement layer reference image coincides with the image sequence number of the corresponding residual image described above.
  • the residual image DPB is used to manage the residual image, at this time, in one DPB Only one frame of image corresponds to one POC value, so there is no need to add an additional flag to distinguish the enhancement layer reconstructed image from the corresponding residual image.
  • the enhancement layer reconstructed image and the corresponding residual image are stored in different DPBs, the same POC value can be set for the one-frame enhancement layer reconstructed image and its corresponding residual image to facilitate reconstruction of the enhanced layer image and corresponding Management of residual images.
  • the encoding method of FIG. 1 further includes: determining, according to a preset criterion, an enhancement layer reference image and/or a corresponding residual image corresponding to an image sequence number in the decoded image buffer area. As a reference image of the subsequently encoded image; determining, according to a preset criterion, that the enhancement layer image corresponding to the one image sequence number in the decoded image buffer and/or the corresponding residual image is no longer used as a reference for the subsequently encoded image An image from which the enhancement layer reference image and/or the corresponding residual image are deleted.
  • sliding window criteria can be used to determine the removal of an image in the DPB.
  • all images in the DPB can be sorted according to the POC from large to small, and all images ranked after the 4th bit can be removed according to the given sliding window size (for example, 4).
  • the encoder and decoder can agree on the criteria used.
  • the encoder adds the above-mentioned decoded image management information to the code stream, and informs the decoding end of the encoding end The decoded image management method used.
  • the method of FIG. 1 further includes: generating decoded image management information, wherein the decoded image management information is used to indicate an enhancement layer reference image and/or corresponding to an image sequence number in the image buffer area. Whether the residual image is a reference image of the subsequently encoded image, and the decoded image management information is added to the coded stream formed.
  • a base layer image corresponding to at least one enhancement layer reference image of the enhancement layer current image may be upsampled to generate at least one upsampled image, and the at least one upsampled image is respectively The at least one residual image is obtained by subtracting the corresponding enhancement layer reference image, wherein in 120, the base layer image corresponding to the current image of the enhancement layer may be upsampled to generate a second reference image.
  • the at least one enhancement layer reference image may be subtracted from the corresponding base layer image to obtain the at least one residual image, wherein in 120, the enhancement layer current image may be corresponding to The base layer image serves as a second reference image.
  • the encoding method of FIG. 1 further includes: determining, according to the second identification information, an enhancement layer reference image used to generate the at least one residual image, where the second identification information is used to indicate the at least one The information of the residual image.
  • information for constructing a residual image of the first reference picture list may be written to the video compressed code stream.
  • the reference image list can be constructed in the same manner as the encoding end based on the information of the residual image in the video compressed code stream.
  • the second identification information includes: the number of the at least one residual image, the identification information of the enhancement layer reference image corresponding to the at least one residual image, or the enhancement layer reference image corresponding to the at least one residual image Image sequence number information, wherein the second identification information is previously set at the encoding end or added to the code stream formed after encoding.
  • information indicating the number of residual images (eg, M) added to the first reference image list may be written into the code stream, and the codec end will number the first M enhancement layers of the reference image index number in the first reference image list.
  • the residual image corresponding to the reference image is added to the reference image list.
  • a residual image obtained from reference images whose reference image index numbers are 0, 1, 2, ... M-1 may be added to the reference image list.
  • the codec can also agree on the number of residual images. For example, it is only necessary to use only one residual image. In this case, it is not necessary to add the residual image quantity information to the code stream.
  • the residual image corresponding to the enhancement layer reference image may be pre-agreed at the encoding end and the decoding end to join the reference image list, for example, the enhancement layer reference image in the first reference image list.
  • the corresponding residual image is added to the reference image list, or the residual image corresponding to the enhancement layer reference image in the second reference image list in the first reference image list is simultaneously added to the first reference image list.
  • the enhancement layer reference image information corresponding to the residual image specified by the encoding end can be written to the code stream to inform the decoding end.
  • an additional flag may be added for each enhancement layer reference picture indicating whether or not its corresponding residual picture is added to the reference picture list.
  • the POC of the enhancement layer reference image corresponding to the residual image specified by the encoding end may be added to the code stream.
  • POC difference information can be used instead of the original POC value to save bit overhead.
  • the POC of the current layer of the enhancement layer and the difference information of the POC of the enhancement layer reference image corresponding to the residual image that needs to be added to the first reference image list may be carried in the code stream, so that the difference of the POC can be passed at the decoding end.
  • the value information and the POC of the enhancement layer current image determine the POC of the enhancement layer reference image, and then obtain the residual image corresponding to the enhancement layer reference image from the DPB according to the POC of the enhancement layer reference image.
  • the encoding method of FIG. 1 further includes: determining, according to a temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image, an enhancement layer reference for generating the at least one residual image.
  • Image at this time, it is not necessary to write the enhancement layer reference image information corresponding to the residual image into the code stream, and it is not necessary to write the image sequence number information of the enhancement layer reference image corresponding to the residual image into the code stream.
  • the reference image that is closer to the current image of the enhancement layer is more correlated with the current image of the enhancement layer than the reference image that is farther from the current image of the enhancement layer. Therefore, according to an embodiment of the present invention, when constructing the first reference image list, the residual image corresponding to the reference image with strong temporal correlation with the current image of the enhancement layer may be preferentially added to the first reference image list, such that The prediction signal is more accurate.
  • the image sequence coding number and the enhancement layer may be currently according to the at least one enhancement layer reference image.
  • the absolute value of the difference in the image sequence number of the image 'J, the enhancement layer reference image at the preset threshold determines at least one residual image.
  • the image sequence number of the image may reflect the distance of the image in time, and the closer the time distance of the two images with the closer the image sequence number. Therefore, an enhancement layer reference image having an image sequence number close to the image sequence number of the enhancement layer current image can be preferentially selected for determination.
  • At least one residual image described above For example, in the case where the predicted threshold is 2, an enhancement layer reference image whose absolute value of the difference between the image sequence number and the image sequence number of the enhancement layer current image is 1 is used to determine the at least one residual image. For example, in the case where the image sequence number of the enhancement layer current image is 5, the enhancement layer reference image whose image order numbers are 4 and 6 is selected as its residual image.
  • FIG. 2 is a schematic flow chart of a bidirectional prediction based decoding method according to an embodiment of the present invention.
  • the method of Fig. 2 is performed by a decoder, corresponding to the method of Fig. 1, and a detailed description is omitted as appropriate.
  • the method of Figure 2 includes the following.
  • the second reference image list is the other of the forward reference image list and the backward reference image list.
  • the embodiment of the present invention may add a residual image obtained according to the reference image of the current image of the enhancement layer and the corresponding base layer image to one reference image list, and add the image obtained according to the base layer image corresponding to the current image of the enhancement layer to another image.
  • the image list, and according to the two reference image lists the image block of the current image of the enhancement layer is decoded by the bidirectional prediction method to implement a differential decoding mode. Since the embodiment of the present invention implements the differential mode by means of the bidirectional prediction method, it is not necessary to set whether or not to use the differential mode flag for each image block, and therefore, the implementation is less expensive.
  • encoding information of an image block of the current image of the enhancement layer may be obtained from a code stream formed after encoding, and decoding the encoding information to obtain motion information and a prediction difference signal of the image block; based on the first reference image And the list and the second reference image list, performing motion compensation decoding on the image block of the current image of the enhancement layer according to the motion information of the image block and the prediction difference signal of the image block.
  • the motion information includes an index of the selected reference image in the first reference image list and an index of the first motion vector and the selected reference image in the second reference image list, and a second motion vector
  • the selected reference image of the image block in the first reference image list may be one of the at least one residual image and the selected reference image of the image block in the second reference image list is
  • the first prediction signal is acquired from one of the at least one residual image according to the first motion vector
  • the second prediction signal is acquired from the second reference image according to the second motion vector
  • a prediction signal and a second prediction signal are subjected to a weighted prediction operation to superimpose the first prediction signal and the second prediction signal to obtain a prediction signal of the image block
  • the image is obtained according to the prediction difference signal and the prediction signal of the image block Reconstructed image of the block.
  • the weighted prediction parameter is derived from the code stream, or the weighted prediction parameter is pre-set at the decoding end.
  • the weighted prediction parameter comprises: a weight ⁇ 3 ⁇ 4 of the first prediction signal, a weight W1 of the second prediction signal, and an offset of the first prediction signal. . , the offset of the second prediction signal.
  • predSamples (P 0 xw 0 + P l xw l + ((.. + + 1) « (shift - 1) » shift , where pred ampleS is the predicted signal of the image block, which means shifting to the left, This means shifting to the right, and P is the first prediction signal, which is the second prediction signal.
  • the method of FIG. 2 further includes: acquiring, from the code stream, first identifier information for indicating that the differential mode is allowed to be used for decoding, so that the decoding end determines that the permission is based on the first identifier information.
  • An image block of the current image of the enhancement layer is decoded by a bidirectional prediction method by one of the at least one residual image and the second reference image of the second reference image list in a reference image list.
  • the at least one residual image may be generated according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and the corresponding base layer image, where the forward enhancement layer reference image is front To one of the reference image lists, the backward enhancement layer reference image is back To one of the reference image lists.
  • the decoding method of FIG. 2 further includes: storing an enhancement layer reference image and a corresponding residual image in the at least one enhancement layer reference image into a same image buffer, wherein the enhancement The image sequence number of the layer reference image is consistent with the image sequence number of the corresponding residual image, and a first additional identifier is added for the corresponding residual image, so that the residual image and the enhancement layer of the encoding end in the management image buffer are The enhancement layer reference image is distinguished from the corresponding residual image according to the first additional identifier when the image is referenced.
  • the decoding method of FIG. 2 further includes: storing an enhancement layer reference image and a corresponding residual image in the at least one enhancement layer reference image into different image buffer regions, where The image sequence number of the enhancement layer reference image is identical to the image sequence number of the corresponding residual image.
  • the decoding method of FIG. 2 further includes: determining, according to a preset criterion, whether an enhancement layer reference image and/or a corresponding residual image corresponding to an image sequence number in the image buffer area are a reference image of the subsequently decoded image; if it is determined according to a preset criterion that the enhancement layer image corresponding to one image sequence number in the image buffer area and/or the corresponding residual image is no longer used as the reference image of the subsequently decoded image And deleting the enhancement layer reference image and/or the corresponding residual image from the image buffer.
  • the method of FIG. 2 further includes: decoded image management information acquired from a code stream, where the decoded image management information is used to indicate an enhancement layer reference corresponding to an image sequence number in the image buffer area. Whether the image and/or the corresponding residual image is a reference image of the subsequently encoded image; if it is determined from the decoded image management information that the enhancement layer image corresponding to an image sequence number and/or the corresponding residual image in the image buffer is no longer As a reference image of the subsequently decoded image, the enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer.
  • the base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image may be upsampled to generate at least one upsampled image, and the at least one upsampled image respectively corresponding to the enhancement layer reference image Subtracting, the at least one residual image is obtained, wherein in 220, the base layer image corresponding to the current image of the enhancement layer may be upsampled to generate a second reference image.
  • the at least one enhancement layer reference image may be subtracted from the corresponding base layer image to obtain the at least one residual image, where in 120, the base layer image corresponding to the enhancement layer current image may be used as the second Reference image.
  • the decoding method of FIG. 2 further includes: determining, according to the second identification information, an enhancement layer reference image for generating the at least one residual image, where the second identifier information is used to indicate the at least one The information of the residual image.
  • the second identifier information includes: the number of the at least one residual image, the identifier information of the enhancement layer reference image corresponding to the at least one residual image, or the enhancement layer reference corresponding to the at least one residual image
  • the decoding method of FIG. 2 further includes: determining, according to a temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image, an enhancement layer reference for generating the at least one residual image. image.
  • the image sequence coding number in the at least one enhancement layer reference image may be The enhancement layer reference image whose absolute value of the difference between the image sequence numbers of the enhancement layer current image is less than a preset threshold determines the at least one residual image.
  • Embodiments of the present invention may construct a reference picture list at the encoding end and the decoding end. Therefore, the method of constructing the reference image list below can be applied to both the encoding end and the decoding end. It should be understood that the processing described in the embodiments of the present invention refers to an encoding operation or a decoding operation. In this embodiment, when the enhancement layer reconstructs an image as a reference image of other images, it is referred to as an enhancement layer reference image.
  • the base layer image may be based on the base layer image
  • the reconstructed image (hereinafter referred to as a base layer image) acquires an upsampled image, stores the upsampled image into the DPB, and sets an image order number (POC) of the upsampled image to a corresponding enhancement
  • POC image order number
  • a residual image is generated based on the enhanced layer reconstructed image and the upsampled image, the residual image is stored in the DPB, and the upsampled image is removed from the DPB.
  • Embodiments of the present invention may also set the enhancement layer reconstructed image to have the same value as the POC of the residual image. Since the reconstructed image of the current image of the enhancement layer is the same as the POC value of the corresponding residual image, it is necessary to add an additional identifier to the residual image in the DPB for distinguishing.
  • the upsampled image of the base layer image so the identification of the upsampled image may not be distinguished. It should be understood that the upsampled image is only used when processing the current image of the enhancement layer, and is not used when processing subsequent images, and therefore may not be stored in the DPB.
  • the indication information can be carried in a PPS or slice header.
  • the encoding end or the decoding end can determine whether all images in the DPB corresponding to a certain POC (for example, the enhancement layer reconstructed image and the corresponding residual image) are used as reference images for subsequent processing images according to a given criterion.
  • the given criterion can be pre-agreed at the codec end or notified to the decoder by the encoder. If a frame of image is no longer used as a reference image, it can be removed from the DPB.
  • the enhancement layer reconstructed image and the residual image may also be separately stored and managed to a separate DPB.
  • the enhanced layer reconstructed image is used to reconstruct the image using the enhancement layer
  • the residual image is managed using the residual image DPB.
  • only one frame of image corresponds to each POC in one DPB, so it is not necessary to add an additional flag to distinguish the enhancement layer reconstructed image from the residual image. It should be understood that in different DPBs, the same POC can be set for one frame enhancement layer reconstructed image and corresponding residual image.
  • 3A is a schematic diagram of constructing a reference image list in accordance with one embodiment of the present invention.
  • the first reference image list is a forward reference image list
  • the second reference image list is a backward reference image list.
  • the resolution of the enhancement layer image is different from the resolution of the base layer image.
  • the resolution of the base layer image is lower than the resolution of the enhancement layer image. Therefore, it is necessary to add the upsampled image of the base layer image to Backward reference image column In the table.
  • the reference image list may include: a forward reference image list listO and a backward reference image list list1, the residual image may be put into the listO, and the above-mentioned upsampled image is placed in the listl, where the image is placed
  • the reference image list refers to setting an index or an identifier of an image in a reference image list.
  • a prediction signal of one image block in the current image of the enhancement layer is generated by combining two prediction signals including: a forward prediction signal obtained from a reference image in listO and from a listl
  • the backward prediction signal obtained by the reference image enables the bidirectional prediction mechanism to superimpose the signal in the residual image with the signal in the upsampled image to achieve the same effect as the differential mode of the conventional block level.
  • the first line of image is an Enhancement Layer (EL) image
  • the Curr image represents the enhancement layer current image, i.e., the image being processed (e.g., being encoded or decoded).
  • RefO, Refl, and Refn represent reference images of the current image of the enhancement layer.
  • These reference images are enhancement layer reconstructed images, that is, images generated by the encoding or decoding operations in the enhancement layer.
  • the image on the left side of the Curr image is in listO.
  • the reference image, that is, the forward reference image, the image on the right side of the Curr image is the reference image in listl, that is, the backward reference image.
  • the second line image represents the base layer upsmaple (BL Upsample) image obtained by up-sampling the base layer reconstructed image of the third row (the base layer image), and the example port, BLUpCurr represents the current image of the enhancement layer. Upsampled image of the base layer image.
  • the third line of image represents the base layer (BL) image.
  • the BLCurr image is the base layer image corresponding to the Curr image.
  • the images of the corresponding positions in the same column represent the base layer reconstructed image, the upsampled image of the base layer image, and the enhancement layer image at the same time.
  • the base layer images corresponding to the reference images RefO, Refl, and Refn in the listO are respectively BLL00 BLL01, BLLOn
  • the upsampled images are respectively BLUpLOO BLUpLOl, BLUpLOn
  • the images are BLL10 BLL11, BLLln, and the upsampled image is divided into another) J is BLUpUO B JpUl , B JpUn.
  • the embodiment of the present invention adds residual images DifO, Difl, ..., Difn to the listO, and adds the upsampled image BLUpCurr to the listl.
  • residual images DifO, Difl, ..., Difn are illustrated in FIG. 3A as a new reference image.
  • the residual image corresponding to RefO, Refl, and Refn in listl may also be added to listO.
  • BLUpCurr in list1 is not used for generation. Residual image.
  • the residual image can be placed at any position in the reference image list.
  • Figure 3A shows a possible placement method, where DiffO is placed after RefO in listO, Diffl is placed after Refl, and so on. It should be understood that the residual image and the upsampled image should be placed in a different reference image list to achieve a differential mode by superimposing the residual signal with the base layer upsampled signal by bidirectional prediction.
  • FIG. 3B is a schematic flow chart of a bidirectional prediction based encoding process according to an embodiment of the present invention.
  • the embodiment of Figure 3 is an example of the embodiment of Figure 1.
  • the present embodiment describes in detail the encoding process of one frame bidirectionally predicted image in the enhancement layer in the case where the differential mode is implemented by bidirectional prediction.
  • the reference image list may be constructed in accordance with the method described in FIG. 3A, and the residual image is placed in listO, and the upsampled image is placed in list1, and details are not described herein again.
  • the residual image in listO and the upsampled image in listl are marked as weighted prediction reference images.
  • the marking may not be performed.
  • the weighted prediction parameters are set for the weighted prediction reference image according to the following method, that is, the weighted prediction reference image is bound to the weighted prediction parameter.
  • w Indicates the weight of the reference image in listO
  • Wl represents the weight of the reference image in listl
  • 0l represents the offset of the reference image in listl
  • shift represents the precision control factor
  • w 1 (1 « luma _ log 2 _ weight _ denom) + delta _ luma _ weight _ 11
  • o 0 luma _ offset _ 10
  • ⁇ ⁇ luma _ offset _ 11
  • Shift luma _ log 2 _ weight _ denom
  • luma _ log 2 _ weight _ denom can be set according to the default method, that is, set to 6 when the number of reference images is less than 3, otherwise set to 7.
  • Delta _ luma _ weight _ 10 port delta _ luma _ weight _ 11 Can be set to 0,
  • I ffset _ IQ and I ffset _ ll can be m ⁇ 2 encoding can be luma _ log 2 _ weight _ denom delta _ luma _ weight _ /0 delta _ luma _ weight _ /1 luma _ offset _
  • Five parameters, 10 and /#M _ /1, are sent to the decoder so that the decoder can generate the same weighted prediction parameters M3 ⁇ 4, Wl according to these five parameters. . , 01 and shift
  • 330 Perform motion estimation on the image block of the current image of the enhancement layer, and determine motion information thereof. For example, first, a one-way search may be performed on the reference image list, that is, all images except the residual image in the ListO are traversed to perform motion search to determine an optimal forward reference image, and all images except BLUpCurr in the listl are traversed to perform motion search. Determine the optimal backward reference image. Then, a two-way search can be performed to determine the optimal bidirectional reference image. When a bidirectional predictive search is performed using the upsampled image and the residual image, the weighted prediction parameters determined in step 320 are used for weighted prediction.
  • the residual image in ListO is searched. If the optimal reference image selected from List1 is BLUpCurr, the residual image in ListO is searched. If the optimal reference picture in listl is not BLUpCurr, only the reference picture other than the residual picture in listO is searched to obtain the optimal bidirectional prediction reference picture without searching for the residual picture. Since the embodiment of the present invention adds the residual image only for the implementation of the differential mode prediction, when the motion estimation operation of the bidirectional prediction is performed at the encoding end, the listO is required only when the optimal reference image in the list1 is BLUpCurr. Each residual image in the motion search is performed as a forward reference image.
  • the encoding side performs the motion estimation operation of the unidirectional prediction, it is not necessary to use the residual image in the listO as the reference image for the motion search.
  • motion information can be determined for each image block of the enhancement layer current image, e.g., the identification and motion vector of the optimal forward reference image and the optimal backward reference image are determined for each image block.
  • the motion information determined in 330 indicates the forward prediction signal p of the image block. From the residual image, where the forward prediction signal ranges from 0 to 255 (for storage and processing, 128 offsets are added and converted to unsigned numbers), and the backward prediction signal comes from the upsampled image, where The signal value ranges from 0 to 255, and the prediction signal predSamples of the image block can be calculated according to the following formula (2).
  • the prediction signal can be predSamples clamps to constrain the value to [0, Between 255]. It can be seen from equation (2) that according to the setting of the weighted prediction parameter in step 320, the superposition of the original residual signal (P 0 - 128) and the upsampled signal can be achieved, thereby achieving the same differential mode coding as the conventional block level. Effect.
  • the image block After acquiring the prediction signal predSamples of the image block, the image block may be further predictively coded based on the already obtained prediction signal, that is, the prediction difference signal is calculated, and the prediction difference signal is written into the video compression code stream. Predictive coding of an image block based on the already obtained prediction signal is a conventional technique and will not be described herein.
  • a corresponding residual image may be generated based on the enhancement layer reconstructed image, and the residual image is placed in the DPB. , for use in subsequent encoding processes.
  • Embodiments of the present invention may calculate a difference image between the enhanced layer reconstructed image signal and the corresponding base layer upsampled image after completing encoding of each frame of the enhancement layer image, and reconstruct the difference image as the enhancement layer
  • the residual image of the image can be constructed by the following formula (3):
  • Dif0(x, y) Ref0(x, y) - BLUpL00(x, y) + 128 (3)
  • (X, y) represents the coordinates of the sample points in the image
  • the remaining residual images can also be constructed using the same method. , will not repeat them here. Since the pixel values in the reference image are not allowed to be negative in some conventional codec schemes, in order to enable embodiments of the present invention to be applied to these codec schemes, all signals in the residual image may be added to 128 and clamped. The bit operation constrains the signal value within the interval [0, 255] in order to convert the signed number to an unsigned number for storage and processing.
  • a decoding process that implements a differential mode based on bidirectional prediction is described below with reference to FIG. 3A.
  • FIG. 4 is a schematic flow chart of a bidirectional prediction based decoding process according to an embodiment of the present invention.
  • the embodiment of Figure 4 is an example of the embodiment of Figure 2.
  • This embodiment describes in detail the decoding process of one-frame bidirectionally predicted image in the enhancement layer in the case where the differential mode is implemented by bidirectional prediction.
  • the reference image list may be constructed in accordance with the method described in FIG. 3A, and the residual image is placed in listO, and the upsampled image is placed in list1, and details are not described herein again.
  • the motion information determined in 330 indicates the forward prediction signal p of the image block.
  • the backward prediction signal is from the upsampled image in the backward reference list, then the prediction signal predSamples of the image block can be calculated according to the above formula (2).
  • the prediction signal predSamples can be clamped to constrain the value between [0, 255].
  • the difference signal obtained by superimposing and decoding may be performed, and further decoding operations such as loop filtering are performed to obtain the final reconstructed signal. It is a conventional technique to perform a decoding operation on an image block based on the already obtained prediction signal to obtain a final reconstructed signal, and details are not described herein again.
  • the corresponding residual image may be generated based on the enhancement layer reconstruction image according to the method described in FIG. 3A, and the residual image is placed in the DPB. , for use in subsequent decoding processes.
  • the residual image and the upsampled image may not be stored in the DPB, in which case, when encoding or decoding the current image of the enhancement layer,
  • the reference image of the current image of the enhancement layer is first acquired from the DPB according to the POC of the reference image, such as the reference images RefO, Refl, Refn in FIG. 3A.
  • the residual image corresponding to the reference images is calculated according to the above formula (3), and the residual image is added to the reference image list, and the upsampled image of the base layer image corresponding to the current image of the enhancement layer is added to the listl. In the list of reference images.
  • the residual image and the upsampled image are not stored in the DPB for unified management, but the residual image and the upsampled image are calculated only when encoding or decoding is required.
  • the advantage of this is that the generated residual image is only valid when processing the current image of the enhancement layer, and can be destroyed immediately after the processing of the current image of the enhancement layer ends.
  • the method manages the residual image and the upsampled image.
  • the embodiment of Figs. 3B and 4 has an advantage in that it is possible to avoid double counting which may be caused in the case of using a plurality of residual images at the same time.
  • the method of this embodiment is applicable to a case where the residual image is small, for example, in the case where a residual image is added to the reference image list of the current image of the enhancement layer, the reference image list is set in combination with the conventional sliding window method. In this way, there is no case where the residual image is repeatedly calculated.
  • time correlation is usually A strong reference image is placed at the front end of the list.
  • the time correlation between the first enhancement layer reference image RefO in the listO and list1 shown in FIG. 3 and the currently processed image is stronger than the temporal correlation between the enhancement layer reference image Refl and the currently processed image in listO and listl, and so on.
  • the reference images in the same position in listO and listl can be considered as not significantly different from the temporal correlation of the currently processed images.
  • the reference image may be selected from the reference image list in order of correlation from strong to weak, and its corresponding residual image may be added to a reference image list, such as list0.
  • the corresponding residual images may be sequentially added to the listO in the preset order.
  • the residual image can be placed anywhere in listO. It should be noted that the reference images in listO and listl may be duplicated, so the corresponding residual images may also be duplicated. When it is detected that the currently processed enhancement layer reference image is duplicated with the processed enhancement layer reference image, it is not necessary to generate a corresponding residual image.
  • Fig. 5 is a schematic structural diagram of a bidirectional prediction based encoding apparatus 500 according to an embodiment of the present invention.
  • the encoding device 500 includes: a generating module 510 and an encoding module 520.
  • the generating module 510 generates at least one residual image according to the at least one enhancement layer reference image of the enhancement layer current image and the base layer image corresponding to the at least one enhancement layer reference image, and adds the at least one residual image as the at least one first reference image. Going to the first reference image list of the enhancement layer current image; generating a second reference image according to the base layer image corresponding to the enhancement layer current image, and adding the second reference image to the second reference of the enhancement layer current image In the image list.
  • the encoding module 520 encodes the image block of the enhancement layer current image by using a bidirectional prediction method based on the first reference image list and the second reference image list, where the first reference image list is a forward reference image list of the enhancement layer current image and One of the backward reference image lists, the second reference image list is the other of the forward reference image list and the backward reference image list.
  • the embodiment of the present invention may add a residual image obtained according to the reference image of the current image of the enhancement layer and the corresponding base layer image to one reference image list, and add the image obtained according to the base layer image corresponding to the current image of the enhancement layer to another image.
  • the image list, and according to the two reference image lists the image block of the current image of the enhancement layer is encoded by the bidirectional prediction method, and the differential coding mode is implemented. Since the embodiment of the present invention implements a differential mode by means of a bidirectional prediction method It is not necessary to set whether to use the differential mode flag for each image block, so the implementation is less expensive.
  • FIG. 6 is a schematic structural diagram of a bidirectional prediction-based encoding apparatus 600 according to another embodiment of the present invention.
  • the encoding device 600 includes: a generating module 610 and an encoding module 620.
  • the generating module 610 and the encoding module 620 are similar to the generating module 510 and the encoding module 520 of FIG. 5, and details are not described herein again.
  • the encoding module 620 performs motion estimation on the image block of the current image of the enhancement layer by using a bidirectional prediction method according to the first reference image list and the second reference image list to determine motion information of the image block;
  • the motion information of the image block is subjected to motion compensation prediction on the image block of the current image of the enhancement layer to obtain a prediction difference signal of the image block; the motion information and the prediction difference signal are encoded, and the obtained coding information is added after coding.
  • the formed code stream is sent to the decoding end.
  • the encoding module 620 performs a bidirectional search on the first reference image list and the second reference image list, and determines an optimal reference image and a first motion vector and a second in the first reference image list for the image block.
  • An optimal reference image and a second motion vector in the reference image list wherein the motion information includes an index of the optimal reference image in the first reference image list and the first motion vector and the optimal reference image in the second reference image list An index and a second motion vector; if the motion information indicates that the optimal reference image of the image block in the first reference list is one of the at least one residual image and the image block is in an optimal reference in the second reference image list
  • the image is a second reference image
  • the first prediction signal is obtained from one of the at least one residual image according to the first motion vector
  • the second prediction signal is obtained from the second reference image according to the second motion vector
  • the prediction signal and the second prediction signal perform a weighted prediction operation to compare the first prediction signal with the second prediction Signal superimposed to obtain the prediction signal of the image block; the difference between the predicted image block according to the prediction signal is calculated.
  • the weighted prediction parameter is determined by the encoding end and added in the code stream formed after encoding, or the weighted prediction parameter is previously set at the encoding end.
  • the weighted prediction parameter comprises: a weight M3 ⁇ 4 of the first prediction signal, a weight Wi of the second prediction signal, and an offset of the first prediction signal. . , the offset of the second prediction signal.
  • the encoding device 600 further includes: a first adding module 630.
  • the first adding module 630 adds, in the code stream formed after the encoding, first identification information for indicating that the encoding is allowed to be performed in the differential mode, so that the decoding end determines, according to the first identification information, that at least one residual in the first reference image list is allowed to be based.
  • the image block of the current image of the enhancement layer is decoded by one of the image and the second reference image in the second reference image list by a bidirectional prediction method.
  • the generating module 610 generates the at least one residual image according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and the corresponding base layer image, wherein the forward enhancement The layer reference image is one of the forward reference image lists, and the backward enhancement layer reference image is one of the backward reference image lists.
  • the encoding device 600 further includes: a storage module 640.
  • the storage module 640 stores the enhancement layer reference image and the corresponding residual image in the at least one enhancement layer reference image into the same image buffer area, wherein the enhancement layer refers to the image sequence number of the image and the corresponding residual image
  • the image sequence numbers are consistent, and a first additional identifier is added to the corresponding residual image so that the encoding end distinguishes the enhancement layer reference image from the corresponding residual image according to the first additional identifier when managing the residual image and the enhancement layer reference image.
  • the enhancement layer references the image sequence number of the image and the corresponding corresponding The image sequence numbers of the residual images are the same.
  • the encoding apparatus 600 further includes: a first determining module 650 and a deleting module 660.
  • the first determining module 650 determines, according to a preset criterion, whether the enhancement layer reference image and/or the corresponding residual image corresponding to an image sequence number in the image buffer is a reference image of the subsequently encoded image.
  • the deleting module 660 determines, according to a preset criterion, that the enhancement layer image corresponding to the one image sequence number in the image buffer area and/or the corresponding residual image is no longer used as the reference image of the subsequently encoded image.
  • the enhancement layer reference image and/or the corresponding residual image are deleted in the image buffer.
  • the generating module 610 is further configured to generate decoded image management information, where the decoded image management information is used to indicate an enhancement layer reference image and/or corresponding to an image sequence number in the image buffer area. Whether the residual image is a reference image of the subsequently encoded image,
  • the encoding device further includes: a second adding module 680, configured to add the decoded image management information to the encoded stream formed by the encoding.
  • the generating module 610 upsamples the base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image, generates at least one upsampled image, and respectively corresponding to the at least one upsampled image
  • the enhancement layer reference image is subtracted to obtain the at least one residual image; and the base layer image corresponding to the current image of the enhancement layer is upsampled to generate a second reference image.
  • the generating module 610 subtracts the at least one enhancement layer reference image from the corresponding base layer image to obtain the at least one residual image, and uses the base layer image corresponding to the enhancement layer current image as the second reference. image.
  • the encoding device 600 further includes: a second determining module 670.
  • the second determining module 670 is configured to determine, according to the second identification information, an enhancement layer reference image used to generate the at least one residual image, where the second identification information is used to indicate information of the at least one residual image.
  • the second identifier information includes: the number of the at least one residual image, the identifier information of the enhancement layer reference image corresponding to the at least one residual image, or the enhancement layer reference corresponding to the at least one residual image The image sequence number information of the image, wherein the second identification information is previously set at the encoding end or added to the code stream formed after the encoding.
  • the encoding apparatus 600 of FIG. 6 further includes: a second determining module 670.
  • the second determining module 670 determines an enhancement layer reference image for generating the at least one residual image according to a temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image.
  • the second determining module 670 is configured to: according to the enhancement layer reference image that the absolute value of the difference between the image sequence coding number and the image sequence number of the enhancement layer current image in the at least one enhancement layer reference image is less than a preset threshold. The at least one residual image is determined.
  • Fig. 7 is a schematic structural diagram of a bidirectional prediction based decoding apparatus 700 according to an embodiment of the present invention.
  • the decoding device 700 includes: a generating module 710 and a decoding module 720.
  • the generating module 710 generates at least one residual image according to the at least one enhancement layer reference image of the enhancement layer current image and the base layer image corresponding to the at least one enhancement layer reference image, and adds the at least one residual image as the at least one first reference image. Going to the first reference image list of the enhancement layer current image; generating a second reference image according to the base layer image corresponding to the enhancement layer current image, and adding the second reference image to the second reference image list of the enhancement layer current image in.
  • the decoding module 720 is configured to decode the image block of the enhancement layer current image by using a bidirectional prediction method based on the first reference image list and the second reference image list, where the first reference image list is a forward reference image of the enhancement layer current image One of the list and the backward reference image list, the second reference image list being the other of the forward reference image list and the backward reference image list.
  • the embodiment of the present invention may add a residual image obtained according to the reference image of the current image of the enhancement layer and the corresponding base layer image to one reference image list, and add the image obtained according to the base layer image corresponding to the current image of the enhancement layer to another image.
  • the image list, and according to the two reference image lists the image block of the current image of the enhancement layer is decoded by the bidirectional prediction method, and the differential decoding mode is implemented. Since the embodiment of the present invention implements the differential mode by means of the bidirectional prediction method, it is not necessary to set whether or not to use the differential mode flag for each image block, and therefore, the implementation is less expensive.
  • FIG. 8 is a schematic structural diagram of a bidirectional prediction based decoding apparatus 800 according to another embodiment of the present invention.
  • the decoding device 800 includes: a generating module 810 and a decoding module 820, which are similar to the generating module 710 and the decoding module 720 of FIG. 7, and are not described herein again.
  • the decoding module 820 obtains the encoding information of the image block of the current image of the enhancement layer from the code stream formed by the encoding, and decodes the encoding information to obtain the motion information of the image block and the prediction difference of the image block. a value signal; based on the first reference image list and the second reference image list, performing motion compensation decoding on the image block of the enhancement layer current image according to the motion information of the image block and the prediction difference signal.
  • the motion information comprises: the motion information comprises an index of the selected reference image in the first reference image list and an index and a second motion of the first motion vector and the selected reference image in the second reference image list a vector, the decoding module 820 indicates, in the motion information, that the selected reference image of the image block in the first reference image list is one of the at least one residual image and the selected reference image of the image block in the second reference image list is In the case of the second reference image, the first prediction signal is acquired from one of the at least one residual image according to the first motion vector, the second prediction signal is acquired from the second reference image according to the second motion vector; and the first is based on the weighted prediction parameter The prediction signal and the second prediction signal perform a weighted prediction operation to superimpose the first prediction signal and the second prediction signal to obtain a prediction signal of the image block; and obtain the image block according to the prediction difference signal and the prediction signal of the image block. Reconstructed image.
  • the weighted prediction parameter is derived from the code stream, or the weighted prediction parameter is pre-set at the decoding end.
  • the weighted prediction parameter comprises: a weight M3 ⁇ 4 of the first prediction signal, The weight of the second prediction signal Wi , the offset of the first prediction signal. . , the offset of the second prediction signal.
  • the precision control factor shift wherein the decoding module 820 performs a weighted prediction operation on the first prediction signal and the second prediction signal according to the weighted prediction parameter to obtain a prediction signal of the image block:
  • the first prediction signal this is the second prediction signal.
  • the decoding apparatus 800 of FIG. 8 further includes: a first obtaining module 830.
  • the first obtaining module 830 obtains, from the code stream, first identifier information for indicating that the differential mode is allowed to be used for decoding, so that the decoding end determines, according to the first identifier information, that the first reference image list and the second reference image list are allowed to be used.
  • the bidirectional prediction method decodes the image block of the current image of the enhancement layer.
  • the generating module 810 generates the at least one residual image according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and the corresponding base layer image, wherein the forward enhancement The layer reference image is one of the forward reference image lists, and the backward enhancement layer reference image is one of the backward reference image lists.
  • the decoding apparatus 800 of FIG. 8 further includes: a storage module 840.
  • the storage module 840 stores the enhancement layer reference image and the corresponding residual image in the at least one enhancement layer reference image in the same image buffer area, wherein the enhancement layer refers to the image sequence number of the image and the corresponding residual image
  • the image sequence numbers are consistent, and a first additional identifier is added for the corresponding residual image, so that the encoding end updates the layer reference image according to the first additional identifier when managing the residual image and the enhancement layer reference image in the image buffer.
  • Corresponding residual images are distinguished; or, the enhancement layer reference image and the corresponding residual image in the at least one enhancement layer reference image are stored in different image buffer regions, wherein the image sequence number of the enhancement layer reference image is The image sequence numbers of the corresponding residual images are identical.
  • the decoding apparatus 800 of FIG. 8 further includes: a first determining module 850 and delete module 860.
  • the first determining module 850 determines, according to the preset criterion or the decoded image management information acquired from the code stream, whether the enhancement layer reference image and the corresponding residual image corresponding to one image sequence number in the image buffer area are used for subsequent decoding. a reference image of the image, and adding decoded image management information to the code stream, wherein the decoded image management information is used to indicate an enhancement layer reference image and/or a corresponding residual in the image buffer corresponding to an image sequence number Whether the image serves as a reference image for the subsequently encoded image.
  • the deleting module 860 when determining, according to a preset criterion, that the enhancement layer image corresponding to the one image sequence number in the image buffer area and/or the corresponding residual image is no longer used as the reference image of the subsequently decoded image, The enhancement layer reference image and/or the corresponding residual image are deleted in the image buffer.
  • the decoding apparatus of FIG. 8 further includes: a second obtaining module 870, configured to obtain decoded image management information from a code stream, where the decoded image management information is used to indicate an image buffer area An enhancement layer reference image corresponding to an image sequence number and/or a corresponding residual image as a reference image of a subsequently encoded image; a deletion module 860, configured to sequentially number the image with an image in the image buffer according to the decoded image management information In the case where the corresponding enhancement layer image and/or the corresponding residual image are no longer used as reference images for subsequently decoded images, the enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer.
  • a second obtaining module 870 configured to obtain decoded image management information from a code stream, where the decoded image management information is used to indicate an image buffer area An enhancement layer reference image corresponding to an image sequence number and/or a corresponding residual image as a reference image of a subsequently encoded image
  • a deletion module 860 configured to
  • the generating module 810 upsamples the base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image, generates at least one upsampled image, and respectively corresponding to the at least one upsampled image
  • the enhancement layer reference image is subtracted to obtain the at least one residual image
  • the base layer image corresponding to the current image of the enhancement layer is upsampled to generate a second reference image.
  • the generating module 810 subtracts the at least one enhancement layer reference image from the corresponding base layer image to obtain the at least one residual image, and uses the base layer image corresponding to the enhancement layer current image as the second Reference image.
  • the decoding apparatus 800 of FIG. 8 further includes: a second determining module
  • the second determining module 880 determines an enhancement layer reference image for generating the at least one residual image according to the second identification information, wherein the second identification information is used to indicate information of the at least one residual image.
  • the second identifier information includes: the second identifier information includes: the number of the at least one residual image, the identifier information of the enhancement layer reference image corresponding to the at least one residual image, or the at least one residual image. Image sequence number of the corresponding enhancement layer reference image Information, wherein the second identification information is preset at the decoding end or obtained from the code stream.
  • the decoding apparatus 800 of FIG. 8 further includes: a second determining module 880.
  • the second determining module 880 determines an enhancement layer reference image for generating the at least one residual image based on a temporal correlation of the enhancement layer current image with the at least one enhancement layer reference image.
  • the second determining module 880 is configured to: according to the enhancement layer reference image that the absolute value of the difference between the image sequence code number of the at least one enhancement layer reference image and the image sequence number of the enhancement layer current image is less than a preset threshold. The at least one residual image is determined.
  • FIG. 9 is a schematic block diagram of a bidirectional prediction based encoding apparatus 900 according to still another embodiment of the present invention.
  • the encoding device 900 includes: a processor 910 and a memory 920.
  • the processor 910 calls the code stored in the memory 920 to generate at least one residual image according to at least one enhancement layer reference image of the enhancement layer current image and the base layer image corresponding to the at least one enhancement layer reference image, and at least one of the foregoing Adding a residual image as a first reference image to the first reference image list of the enhancement layer current image; for generating a second reference image according to the base layer image corresponding to the enhancement layer current image, and using the second reference image Adding to a second reference image list of the enhancement layer current image; encoding, according to the first reference image list and the second reference image list, the image block of the enhancement layer current image by using a bidirectional prediction method, wherein the first reference image list Is one of a forward reference image list and a backward reference image list of the enhancement layer current image, and the second reference image list is the other of the forward reference image list and the backward reference image list.
  • the embodiment of the present invention may add a residual image obtained according to the reference image of the current image of the enhancement layer and the corresponding base layer image to one reference image list, and add the image obtained according to the base layer image corresponding to the current image of the enhancement layer to another image.
  • the image list, and according to the two reference image lists the image block of the current image of the enhancement layer is encoded by the bidirectional prediction method, and the differential coding mode is implemented. Since the embodiment of the present invention implements the differential mode by means of the bidirectional prediction method, it is not necessary to set whether or not to use the differential mode flag for each image block, and therefore, the implementation is less expensive.
  • the processor 910 performs motion estimation on the image block of the current image of the enhancement layer by using a bidirectional prediction method according to the first reference image list and the second reference image list to determine motion information of the image block;
  • the motion information of the image block is subjected to motion compensation prediction on the image block of the current image of the enhancement layer to obtain a prediction difference signal of the image block; the motion information and the prediction difference signal are encoded, and the obtained coding information is added after coding.
  • the formed code stream is sent to the decoding end.
  • the processor 910 performs a bidirectional search on the first reference image list and the second reference image list, and determines an optimal reference image and a first motion vector and a second in the first reference image list for the image block.
  • An optimal reference image and a second motion vector in the reference image list wherein the motion information includes an index of the optimal reference image in the first reference image list and the first motion vector and the optimal reference image in the second reference image list
  • An index and a second motion vector if the motion information indicates that the optimal reference image of the image block in the first reference list is one of the at least one residual image and the image block is in an optimal reference in the second reference image list
  • the image is a second reference image, the first prediction signal is obtained from one of the at least one residual image according to the first motion vector, and the second prediction signal is obtained from the second reference image according to the second motion vector;
  • the prediction signal and the second prediction signal perform a weighted prediction operation to perform the first prediction signal and the second prediction signal Superimposing a prediction signal of the image block; calculating
  • the weighted prediction parameter is determined by the encoding end and added in the code stream formed after encoding, or the weighted prediction parameter is previously set at the encoding end.
  • the weighted prediction parameter comprises: a weight w of the first prediction signal.
  • the weight of the second prediction signal Wi the offset of the first prediction signal. . , the offset of the second prediction signal.
  • the processor 910 adds first identifier information for indicating that the encoding is allowed to be performed in the differential mode, so that the decoding end determines that the permission is based on the first identifier information.
  • the image block of the current image of the enhancement layer is decoded by a bidirectional prediction method by referring to one of the at least one residual image and the second reference image in the second reference image list.
  • the processor 910 is configured according to a forward enhancement layer of the current layer of the enhancement layer. Generating the at least one residual image by the reference image and/or the backward enhancement layer reference image and the corresponding base layer image, wherein the forward enhancement layer reference image is one of the forward reference image lists, and the backward enhancement layer reference image is rear To one of the reference image lists.
  • the processor 910 stores the enhancement layer reference image and the corresponding residual image in the at least one enhancement layer reference image into the same image buffer, where the image sequence number and The image sequence numbers of the corresponding residual images are identical, and a first additional identifier is added for the corresponding residual image so that the encoding end can enhance the layer reference image according to the first additional identifier when managing the residual image and the enhancement layer reference image.
  • Corresponding residual images are distinguished; or, for storing the enhancement layer reference image and the corresponding residual image in the at least one enhancement layer reference image in different image buffer regions, wherein the enhancement layer refers to the image
  • the image sequence number is identical to the image sequence number of the corresponding residual image described above.
  • the processor 910 determines, according to a preset criterion, whether the enhancement layer reference image and the corresponding residual image corresponding to one image sequence number in the image buffer area are used as the subsequently encoded image. a reference image; in the case where it is determined according to a preset criterion that the enhancement layer image corresponding to one image sequence number and/or the corresponding residual image in the image buffer area is no longer a reference image of the subsequently encoded image, from the image The enhancement layer reference image and/or the corresponding residual image are deleted in the buffer area.
  • the processor 910 is further configured to generate decoded image management information, where the decoded image management information is used to indicate an enhancement layer reference image and/or corresponding to an image sequence number in the image buffer area. Whether the residual image is a reference image of the subsequently encoded image, and the decoded image management information is added to the coded stream formed.
  • the processor 910 upsamples the base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image, generates at least one upsampled image, and respectively corresponding to the at least one upsampled image
  • the enhancement layer reference image is subtracted to obtain the at least one residual image; and the base layer image corresponding to the current image of the enhancement layer is upsampled to generate a second reference image.
  • the processor 910 subtracts the at least one enhancement layer reference image from the corresponding base layer image to obtain the at least one residual image, and uses the base layer image corresponding to the enhancement layer current image as the second reference. image.
  • the processor 910 determines, according to the second identifier information, an enhancement layer reference image used to generate the at least one residual image, where the second identifier information is used to indicate the foregoing. Information of at least one residual image.
  • the second identifier information includes: the number of the at least one residual image, the identifier information of the enhancement layer reference image corresponding to the at least one residual image, or the enhancement layer reference image corresponding to the at least one residual image.
  • Image sequence number information wherein the second identification information is previously set at the encoding end or added to the code stream formed after encoding.
  • the processor 910 determines an enhancement layer reference image for generating the at least one residual image according to a temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image.
  • the processor 910 determines, according to the enhancement layer reference image that the absolute value of the difference between the image sequence code number in the at least one enhancement layer reference image and the image sequence number of the enhancement layer current image is less than a preset threshold. At least one residual image.
  • FIG 10 is a schematic block diagram of a bidirectional prediction based decoding apparatus 1000 according to still another embodiment of the present invention.
  • the decoding device 1000 includes: a processor 1010 and a memory 1020.
  • the processor 1010 calls a code stored in the memory 1020, configured to generate at least one residual image according to the at least one enhancement layer reference image of the enhancement layer current image and the base layer image corresponding to the at least one enhancement layer reference image, and the at least one residual
  • the difference image is added to the first reference image list of the enhancement layer current image as the at least one first reference image
  • the second reference image is generated according to the base layer image corresponding to the enhancement layer current image
  • the second reference image is added to the Encrypting a second reference image list of the current image of the layer
  • decoding the image block of the current image of the enhancement layer by using a bidirectional prediction method based on the first reference image list and the second reference image list, wherein the first reference image list is an enhancement layer One of a forward reference image list and a backward reference image list of the current image, the second reference image list being the other of the forward reference image list and the backward reference image list.
  • the embodiment of the present invention may add a residual image obtained according to the reference image of the current image of the enhancement layer and the corresponding base layer image to one reference image list, and add the image obtained according to the base layer image corresponding to the current image of the enhancement layer to another image.
  • the image list, and according to the two reference image lists the image block of the current image of the enhancement layer is decoded by the bidirectional prediction method, and the differential decoding mode is implemented. Since the embodiment of the present invention implements the differential mode by means of the bidirectional prediction method, it is not necessary to set whether or not to use the differential mode flag for each image block, and therefore, the implementation is less expensive.
  • the processor 1010 obtains the encoding information of the image block of the current image of the enhancement layer from the code stream formed by the encoding, and decodes the encoding information to obtain the motion of the image block. a prediction difference signal of the information and the image block; based on the first reference image list and the second reference image list, performing motion compensation decoding on the image block of the current image of the enhancement layer according to the motion information of the image block and the prediction difference signal .
  • the motion information comprises: the motion information comprises an index of the selected reference image in the first reference image list and an index and a second motion of the first motion vector and the selected reference image in the second reference image list a vector, wherein the processor 1010 indicates, in the motion information, that the selected reference image of the image block in the first reference image list is one of the at least one residual image and the selected reference image of the image block in the second reference image list is In the case of the second reference image, the first prediction signal is acquired from one of the at least one residual image according to the first motion vector, and the second prediction signal is acquired from the second reference image according to the second motion vector; a prediction signal and a second prediction signal are subjected to a weighted prediction operation to superimpose the first prediction signal and the second prediction signal to obtain a prediction signal of the image block; according to the prediction difference signal and the pre-J signal of the image block 'J Reconstructed image of this image block.
  • the weighted prediction parameter is derived from the code stream, or the weighted prediction parameter is pre-set at the decoding end.
  • the weighted prediction parameter comprises: a weight M3 ⁇ 4 of the first prediction signal, a weight Wi of the second prediction signal, and an offset of the first prediction signal. . , the offset of the second prediction signal.
  • the precision control factor shift wherein the processor 1010 performs a weighted prediction operation on the first prediction signal and the second prediction signal according to the weighted prediction parameter to obtain a prediction signal of the image block: — 1))) » ; "f , where pre ⁇ ap/i ⁇ is the predicted signal of the image block, the "representing shifting to the left, the" indicating shifting to the right, p being the first predictive signal, Is a second prediction signal.
  • the Offset is an offset when the first prediction signal is converted into an unsigned number.
  • the processor 1010 obtains, from the code stream, the first identification information used to indicate that the decoding is allowed to be performed in the differential mode. And determining, by the decoding end, according to the first identification information, to allow the decoding end to decode the image block of the current image of the enhancement layer according to the first reference image list and the second reference image list according to the bidirectional prediction method.
  • the processor 1010 generates the at least one residual image according to the forward enhancement layer reference image and/or the backward enhancement layer reference image of the enhancement layer current image and the corresponding base layer image, wherein the forward enhancement The layer reference image is one of the forward reference image lists, and the backward enhancement layer reference image is one of the backward reference image lists.
  • the processor 1010 stores the enhancement layer reference image and the corresponding residual image in the at least one enhancement layer reference image into the same image buffer, where the enhancement layer refers to an image of the image.
  • the sequence number and the corresponding residual image have the same image sequence number, and the first additional identifier is added to the corresponding residual image, so that the encoding end is based on the residual image and the enhancement layer reference image in the image buffer.
  • the additional identifier distinguishes the enhancement layer reference image from the corresponding residual image; or stores the enhancement layer reference image and the corresponding residual image in the at least one enhancement layer reference image into different image buffer regions, wherein
  • the image sequence number of the enhancement layer reference image coincides with the image sequence number of the corresponding residual image described above.
  • the processor 1010 determines, according to preset criteria or decoded image management information acquired from the code stream, an image and/or a corresponding residual corresponding to an image sequence number in the image buffer. Whether the image is a reference image of a subsequently decoded image, and the decoded image management information is added to the code stream, wherein the decoded image management information is used to indicate an enhancement layer reference image corresponding to an image sequence number in the image buffer area and/or Whether the corresponding residual image is a reference image of the subsequently encoded image; determining, in accordance with a preset criterion, that the enhancement layer image and/or the corresponding residual image corresponding to the one image sequence number in the image buffer area are no longer used as In the case of a reference image of a subsequently decoded image, the image and/or the corresponding residual image are deleted from the image buffer.
  • the decoding apparatus of FIG. 10 further includes: a receiver 1030, configured to obtain decoded image management information from the code stream, where the decoded image management information is used to indicate an image in the image buffer area Whether the enhancement layer reference image corresponding to the sequence number and/or the corresponding residual image is a reference image of the subsequently encoded image, wherein the processor 1010 determines an enhancement layer corresponding to an image sequence number in the image buffer area according to the decoded image management information. In the case where the image and/or the corresponding residual image are no longer reference images of the subsequently decoded image, the enhancement layer reference image and/or the corresponding residual image are deleted from the image buffer.
  • a receiver 1030 configured to obtain decoded image management information from the code stream, where the decoded image management information is used to indicate an image in the image buffer area Whether the enhancement layer reference image corresponding to the sequence number and/or the corresponding residual image is a reference image of the subsequently encoded image, wherein the processor 1010 determines an enhancement layer corresponding to an
  • the processor 1010 upsamples the base layer image corresponding to the at least one enhancement layer reference image of the enhancement layer current image, generates at least one upsampled image, and respectively corresponding to the at least one upsampled image
  • the enhancement layer reference image is subtracted to obtain the above At least one residual image, and upsampling the base layer image corresponding to the current image of the enhancement layer to generate a second reference image.
  • the processor 1010 subtracts the at least one enhancement layer reference image from the corresponding base layer image to obtain the at least one residual image, and uses the base layer image corresponding to the enhancement layer current image as the second Reference image.
  • the processor 1010 determines, according to the second identifier information, an enhancement layer reference image used to generate the at least one residual image, where the second identifier information is used to indicate information of the at least one residual image. .
  • the second identifier information includes: the number of the at least one residual image, the identifier information of the enhancement layer reference image corresponding to the at least one residual image, or the enhancement layer reference image corresponding to the at least one residual image.
  • the image sequence number is the difference information.
  • the processor 1010 determines, according to a temporal correlation between the enhancement layer current image and the at least one enhancement layer reference image, an enhancement layer reference image used to generate the at least one residual image.
  • the processor 1010 determines the foregoing according to the enhancement layer reference image that the absolute value of the difference between the image sequence code number and the image sequence number of the enhancement layer current image in the at least one enhancement layer reference image is less than a preset threshold. At least one residual image.
  • 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 mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling through some interfaces, devices or units.
  • a communication connection which can be electrical, mechanical or other form.
  • 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

基于双向预测的编码方法、 解码方法和装置 本申请要求于 2013 年 1 月 6 日提交中国专利局、 申请号为 201310003666.8、 发明名称为"基于双向预测的编码方法、 解码方法和装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及图像处理技术领域,尤其是涉及一种基于双向预测的编码方 法、 解码方法和装置。 背景技术
目前, 可伸缩编码(Scalable Video Coding, SVC )技术已经被联合视频 组(Joint Video Team, JVT )纳入到 H.264/AVC标准。 可伸缩编码技术使用 多个层次的码流表示不同质量的视频图像, 因此又称作分层编码。 在 SVC 技术中, 能提供的最低质量层被称作基本层, 能增强空间分辨率、 时间分辨 率或者信噪比强度的层被称作增强层。 空间可伸缩编码利用不同空间分层间 的运动信息、 纹理信息和残差信息; 时间可伸缩编码采用分级双向预测图像 (Hierarchical B)编码技术; 信噪比可伸缩编码可以使用粗粒度质量可伸缩 ( Coarse Grain Scalability, CGS )方法和中等粒度质量可伸缩( Median Grain Scalability, MGS )方法。
在空间可伸缩编码的情况下,增强层图像的内容与对应的基本层图像的 内容相同, 但 ^^本层图像的空间分辨率较低。 因此, 尽管增强层图像中的 低频信号可以从基本层图像准确预测,但是增强层图像中的部分高频信号可 能无法从基本层图像获得。 另一方面, 当前编码的增强层图像(以下筒称增 强层当前图像)在时间域上的增强层参考图像与该增强层当前图像的分辨率 相同, 可能包含增强层当前图像中的高频信号。 为得到更准确的预测, 可以 结合从基本层获取的低频信号和从增强层获取的高频信号来确定增强层当 前图像的预测信号。 例如, 可以使用增强层当前图像块的已经编码的增强层 参考图像块与其对应的基本层重建图像块的上采样图像块的差值作为高频 信号,使用当前处理的增强层图像块对应的基本层重建图像块的上采样图像 块作为低频信号, 并且将高频信号的强度值与低频信号的强度值叠加来获得 增强层当前图像块的预测信号。 这种处理方法可用于编、 解码端, 称为差分 模式。
然而, 为了实现上述技术方案, 现有技术需要为每一个图像块添加一个 标记,用于指示该图像块是否采用差分模式进行编解码处理,实现代价较高。 发明内容
本发明的实施例提供了一种基于双向预测的编码方法、 解码方法和装 置, 能够以较低的代价实现差分模式。
第一方面, 提供了一种基于双向预测的编码方法, 包括: 根据增强层当 前图像的至少一个增强层参考图像以及至少一个增强层参考图像对应的基 本层图像生成至少一个残差图像, 并将上述至少一个残差图像作为至少一个 第一参考图像加入到该增强层当前图像的第一参考图像列表中;根据该增强 层当前图像对应的基本层图像生成第二参考图像, 并将第二参考图像加入到 该增强层当前图像的第二参考图像列表中;基于第一参考图像列表和第二参 考图像列表, 采用双向预测方法对该增强层当前图像的图像块进行编码, 其 中第一参考图像列表是增强层当前图像的前向参考图像列表和后向参考图 像列表中的一个, 第二参考图像列表是前向参考图像列表和后向参考图像列 表中的另一个。
在第一种可能的实现方式中, 上述基于第一参考图像列表和第二参考图 像列表, 采用双向预测方法对该增强层当前图像的图像块进行编码, 具体包 括: 基于第一参考图像列表和第二参考图像列表, 采用双向预测方法对该增 强层当前图像的图像块进行运动估计, 以确定该图像块的运动信息; 根据该 图像块的运动信息,对该增强层当前图像的图像块进行运动补偿预测得到图 像块的预测差值信号; 对该运动信息和预测差值信号进行编码并将得到的编 码信息添加在编码后形成的码流中发送给解码端。
结合第一种可能的实现方式, 在第二种可能的实现方式中, 上述基于第 一参考图像列表和第二参考图像列表, 采用双向预测方法对该增强层当前图 像的图像块进行运动估计, 以确定该图像块的运动信息, 具体包括: 对第一 参考图像列表和第二参考图像列表进行双向搜索, 为该图像块确定第一参考 图像列表中的最优参考图像和第一运动矢量以及第二参考图像列表中的最 优参考图像和第二运动矢量, 其中运动信息包括第一参考图像列表中的最优 参考图像的索引和第一运动矢量以及第二参考图像列表中的最优参考图像 的索引和第二运动矢量; 其中上述根据该图像块的运动信息, 对该增强层当 前图像的图像块进行运动补偿预测得到图像块的预测差值信号, 具体包括: 若该运动信息指示该图像块在第一参考列表中的最优参考图像为上述至少 一个残差图像之一且该图像块在第二参考图像列表中的最优参考图像为第 二参考图像,根据第一运动矢量从上述至少一个残差图像之一获取第一预测 信号, 根据第二运动矢量从第二参考图像获取第二预测信号; 基于加权预测 参数对第一预测信号和第二预测信号进行加权预测运算, 以便将第一预测信 号与第二预测信号进行叠加得到该图像块的预测信号; 根据该预测信号计算 该图像块的预测差值信, 该加权预测参数由编码端确定并且添加在编码后形 成的码流中, 或者, 该加权预测参数被预先设置在编码端。
结合第二种可能的实现方式, 在第三种可能的实现方式中, 该加权预测 参数包括: 第一预测信号的权重 M¾ , 第二预测信号的权重 Wl , 第一预测信号 的偏移。。, 第二预测信号的偏移。 1 精度控制因子 shift, 其中上述基于加权 预测参数对第一预测信号和第二预测信号进行加权预测运算, 以将第一预测 信号与第二预测信号进行叠加得到该图像块的预测信号, 具体包括: 基于该 加权预测参数采用如下公式对第一预测信号和第二预测信号进行加权预测 运算得到该图像块的预测信号:
predSamples = (P0 x w0 + Pl wl + ((。0 + + 1) « (shift - 1)》》 shift , 其中, predSampleS 为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, p。为第一预 测信号, 该 为第二预测信号。
结合第四种可能的实现方式, 在第五种可能的实现方式中, 第一预测信 号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , ο0 = οι = -2 χ offset ,该 offset 为第一预测信号被转换成无符号数时偏移量。 结合第一方面或者上述任何一种可能的实现方式,在第五种可能的实现 方式中, 第一方面的编码方法还包括: 在编码后形成的码流中添加用于指示 允许采用差分模式进行编码的第一标识信息, 以便解码端根据第一标识信息 确定允许基于第一参考图像列表中的上述至少一个残差图像之一和第二参 考图像列表中的第二参考图像, 采用双向预测方法对该增强层当前图像的图 像块进行解码。 结合第一方面或者上述任何一种可能的实现方式,在第六种可能的实现 方式中,上述根据增强层当前图像的至少一个增强层参考图像以及对应的基 本层图像生成至少一个残差图像, 具体包括: 根据该增强层当前图像的前向 增强层参考图像和 /或后向增强层参考图像以及对应的基本层图像生成上述 至少一个残差图像, 其中前向增强层参考图像为前向参考图像列表中的一 个, 后向增强层参考图像为后向参考图像列表中的一个。
结合第一方面或者上述任何一种可能的实现方式,在第七种可能的实现 方式中, 第一方面的编码方法还包括: 将上述至少一个增强层参考图像中的 增强层参考图像和相对应的残差图像存储到同一图像緩存区中,其中该增强 层参考图像的图像顺序编号和相对应的残差图像的图像顺序编号一致, 并且 为相对应的残差图像添加第一附加标识, 以便编码端在管理残差图像和增强 层参考图像时根据第一附加标识将增强层参考图像与相对应的残差图像相 区分; 或者, 将上述至少一个增强层参考图像中的增强层参考图像和相对应 的残差图像存储到不同的图像緩存区中, 其中该增强层参考图像的图像顺序 编号和上述相对应的残差图像的图像顺序编号一致。
结合第七种可能的实现方式, 在第八种可能的实现方式中, 第一方面的 编码方法还包括: 根据预设的准则确定该图像緩存区中与一个图像顺序编号 对应的增强层参考图像和 /或相应的残差图像是否作为后续编码的图像的参 考图像; 若根据预设的准则确定该图像緩存区中与上述一个图像顺序编号对 应的增强层图像和 /或相应的残差图像不再作为后续编码的图像的参考图像, 从该图像緩存区中删除该增强层参考图像和 /或相应的残差图像。
结合第八种可能的实现方式, 在第九种可能的实现方式中, 第一方面的 编码方法还包括: 生成解码图像管理信息, 其中解码图像管理信息用于指示 图像緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差 图像是否作为后续编码的图像的参考图像; 将解码图像管理信息添加到编码 后形成的码流中。
结合第一方面或者上述任何一种可能的实现方式,在第十种可能的实现 方式中,上述根据增强层当前图像的至少一个增强层参考图像以及对应的基 本层图像生成至少一个残差图像, 包括: 对该增强层当前图像的至少一个增 强层参考图像对应的基本层图像进行上采样, 生成至少一个上采样图像, 并 将上述至少一个上采样图像分别与其对应的增强层参考图像相减,得到上述 至少一个残差图像, 其中上述根据该增强层当前图像对应的基本层图像生成 第二参考图像, 包括: 对该增强层当前图像对应的基本层图像进行上采样, 以生成第二参考图像。
结合第一方面或者第一方面的第一种至第九种可能的实现方式中的任 何一种, 在第十一种可能的实现方式中, 上述根据增强层当前图像的至少一 个增强层参考图像以及对应的基本层图像生成至少一个残差图像, 具体包 括: 将上述至少一个增强层参考图像与其对应的基本层图像相减, 得到上述 至少一个残差图像, 其中上述根据该增强层当前图像对应的基本层图像生成 第二参考图像, 具体包括: 将该增强层当前图像对应的基本层图像作为第二 参考图像。
结合第一方面或者第一种至第十一种可能的实现方式中的任何一种,在 第十二种可能的实现方式中, 第一方面的编码方法还包括: 根据第二标识信 息确定用于生成上述至少一个残差图像的增强层参考图像, 其中第二标识信 息用于指示上述至少一个残差图像的信息。
结合第十二种可能的实现方式, 在第十三种可能的实现方式中, 第二标 识信息包括: 上述至少一个残差图像的数目、 上述至少一个残差图像对应的 增强层参考图像的标识信息, 或者上述至少一个残差图像对应的增强层参考 图像的图像顺序编号信息, 其中第二标识信息被预测设置在编码端或者被添 加在编码后形成的码流中。
结合第一方面或者第一方面的第一种至第十一种可能的实现方式中的 任何一种, 在第十四种可能的实现方式中, 第一方面的编码方法还包括: 根 据该增强层当前图像与上述至少一个增强层参考图像的时间相关性确定用 于生成上述至少一个残差图像的增强层参考图像。
结合第十四种可能的实现方式, 在第十五种可能的实现方式中, 根据该 增强层当前图像与上述至少一个增强层参考图像的时间相关性确定上述至 少一个残差图像, 包括: 根据上述至少一个增强层参考图像中图像顺序编码 号与该增强层当前图像的图像顺序编号之差的绝对值小于预设的阈值的增 强层参考图像确定上述至少一个残差图像。
第二方面, 提供了一种基于双向预测的解码方法, 包括: 根据增强层当 前图像的至少一个增强层参考图像以及至少一个增强层参考图像对应的基 本层图像生成至少一个残差图像, 并将上述至少一个残差图像作为至少一个 第一参考图像加入到该增强层当前图像的第一参考图像列表中;根据该增强 层当前图像对应的基本层图像生成第二参考图像, 并将第二参考图像加入到 该增强层当前图像的第二参考图像列表中;基于第一参考图像列表和第二参 考图像列表, 采用双向预测方法对该增强层当前图像的图像块进行解码, 其 中第一参考图像列表是增强层当前图像的前向参考图像列表和后向参考图 像列表中的一个, 第二参考图像列表是前向参考图像列表和后向参考图像列 表中的另一个。
在第一种可能的实现方式中, 上述基于第一参考图像列表和第二参考图 像列表, 采用双向预测方法对该增强层当前图像的图像块进行解码, 包括: 从编码后形成的码流中获取该增强层当前图像的图像块的运动信息和图像 块的预测差值信号的编码信息, 并对该编码信息解码得到该图像块的运动信 息和预测差值信号; 基于第一参考图像列表和第二参考图像列表, 根据该图 像块的运动信息和该预测差值信号,对该增强层当前图像的图像块进行运动 补偿解码。
结合第一种可能的实现方式, 在第二种可能的实现方式中, 上述运动信 息包括: 该运动信息包括第一参考图像列表中的选用参考图像的索引和第一 运动矢量以及第二参考图像列表中的选用参考图像的索引和第二运动矢量, 其中上述基于第一参考图像列表和第二参考图像列表,根据该图像块的运动 信息和预测差值信号, 对该增强层当前图像的图像块进行运动补偿解码, 包 括: 若该运动信息指示该图像块在第一参考图像列表中的选用参考图像为上 述至少一个残差图像之一并且该图像块在第二参考图像列表中的选用参考 图像为第二参考图像,根据第一运动矢量从上述至少一个残差图像之一获取 第一预测信号, 根据第二运动矢量从第二参考图像获取第二预测信号; 基于 加权预测参数对第一预测信号和第二预测信号进行加权预测运算, 以将第一 预测信号与第二预测信号进行叠加得到该图像块的预测信号; 根据该预测差 值信号和该图像块的预测信号得到该图像块的重建信号, 其中该加权预测参 数从码流中得到, 或者该加权预测参数被预先设置在解码端。
结合第二种可能的实现方式, 在第三种可能的实现方式中, 该加权预测 参数包括: 第一预测信号的权重 κ¾ , 第二预测信号的权重 Wl , 第一预测信号 的偏移。。, 第二预测信号的偏移。 1 精度控制因子 shift, 其中上述基于加权 预测参数对第一预测信号和第二预测信号进行加权预测运算, 以将第一预测 信号与第二预测信号进行叠加得到该图像块的预测信号, 包括: 基于该加权 预测参数采用如下公式对第一预测信号和第二预测信号进行加权预测运算 得到该图像块的预测信号:
predSamples = (P0 x w0 + Pl x wl + ((。。 + ot + 1) « (shift - 1)》 » shift , 其中, pred ampleS 为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, P。为第一预 测信号, 该 为第二预测信号。
结合第三种可能的实现方式, 在第四种可能的实现方式中, 第一预测信 号为经过偏移后转换成的无符号数, w0 = w1 = (1 « shift) , ο0 = o{ = -2 x offset , 上述 offset为第一预测信号被转换成无符号数时偏移量。 结合第二方面或第二方面的上述任何一种可能的实现方式,在第五种可 能的实现方式中, 第二方面的解码方法还包括: 从该码流中获取用于指示允 许采用差分模式进行解码的第一标识信息, 以使解码端根据第一标识信息确 定允许基于第一参考图像列表和第二参考图像列表, 采用双向预测方法对该 增强层当前图像的图像块进行解码。
结合第二方面的上述任何一种可能的实现方式,在第六种可能的实现方 式中, 上述根据增强层当前图像的至少一个增强层参考图像以及对应的基本 层图像生成至少一个残差图像, 包括: 根据该增强层当前图像的前向增强层 参考图像和 /或后向增强层参考图像以及对应的基本层图像生成上述至少一 个残差图像, 其中前向增强层参考图像为前向参考图像列表中的一个, 后向 增强层参考图像为后向参考图像列表中的一个。
结合第二方面或第二方面的上述任何一种可能的实现方式,在第七种可 能的实现方式中, 第二方面的解码方法还包括: 将上述至少一个增强层参考 图像中的增强层参考图像和相对应的残差图像存储到同一图像緩存区中, 其 中该增强层参考图像的图像顺序编号和上述相对应的残差图像的图像顺序 编号一致, 并且为添加第一附加标识, 以便编码端在管理图像緩存区中的残 差图像和增强层参考图像时根据第一附加标识将增强层参考图像与相对应 的残差图像相区分; 或者, 将上述至少一个增强层参考图像中的增强层参考 图像和相对应的残差图像存储到不同的图像緩存区中, 其中该增强层参考图 像的图像顺序编号和上述相对应的残差图像的图像顺序编号一致。
结合第二方面的第七种可能的实现方式, 在第八种可能的实现方式中, 第二方面的解码方法还包括: 根据预设的准则确定该图像緩存区中与一个图 像顺序编号对应的增强层参考图像和 /或相应的残差图像是否作为后续解码 的图像的参考图像; 若根据预设的准则确定图像緩存区中与一个图像顺序编 号对应的增强层图像和 /或相应的残差图像不再作为后续解码的图像的参考 图像, 从该图像緩存区中删除该增强层参考图像和 /或相应的残差图像。
结合第二方面的第八种可能的实现方式, 在第九种可能的实现方式中, 第二方面的解码方法还包括: 从码流中获取的解码图像管理信息, 其中解码 图像管理信息用于指示图像緩存区中与一个图像顺序编号对应的增强层参 考图像和 /或相应的残差图像是否作为后续编码的图像的参考图像;若根据解 码图像管理信息确定图像緩存区中与一个图像顺序编号对应的增强层图像 和 /或相应的残差图像不再作为后续解码的图像的参考图像,从图像緩存区中 删除增强层参考图像和 /或相应的残差图像。
结合第二方面或第二方面的上述任何一种可能的实现方式,在第十种可 能的实现方式中, 上述根据增强层当前图像的至少一个增强层参考图像以及 对应的基本层图像生成至少一个残差图像, 包括: 对该增强层当前图像的至 少一个增强层参考图像对应的基本层图像进行上采样, 生成至少一个上采样 图像, 并将上述至少一个上采样图像分别与其对应的增强层参考图像相减, 得到上述至少一个残差图像, 其中上述根据该增强层当前图像对应的基本层 图像生成第二参考图像, 包括: 对该增强层当前图像对应的基本层图像进行 上采样, 以生成第二参考图像。
结合第二方面或第二方面的第一种至第九种可能的实现方式中的任何 一种, 在第十一种可能的实现方式中, 上述根据增强层当前图像的至少一个 增强层参考图像以及对应的基本层图像生成至少一个残差图像, 包括: 将上 述至少一个增强层参考图像与其对应的基本层图像相减,得到上述至少一个 残差图像, 其中上述根据该增强层当前图像对应的基本层图像生成第二参考 图像, 包括: 将该增强层当前图像对应的基本层图像作为第二参考图像。
结合第二方面或第二方面的第一种至第十一种可能的实现方式中的任 一种, 在第十二种可能的实现方式中, 第二方面的解码方法还包括: 根据第 二标识信息确定用于生成上述至少一个残差图像的增强层参考图像, 其中第 二标识信息用于指示上述至少一个残差图像的信息。
结合第二方面的第十二种可能的实现方式,在第十三种可能的实现方式 中, 第二标识信息包括: 上述至少一个残差图像的数目、 上述至少一个残差 图像对应的增强层参考图像的标识信息, 或者上述至少一个残差图像对应的 增强层参考图像的图像顺序编号信息, 其中第二标识信息被预测设置在编码 端或者从码流中获取。
结合第二方面或第二方面的第一种至第十一种可能的实现方式中的任 何一种, 在第十四种可能的实现方式中, 第二方面的解码方法还包括: 根据 该增强层当前图像与上述至少一个增强层参考图像的时间相关性确定用于 生成上述至少一个残差图像的增强层参考图像。
结合第二方面的第十四种可能的实现方式,在第十五种可能的实现方式 中, 上述根据该增强层当前图像与上述至少一个增强层参考图像的时间相关 性确定上述至少一个残差图像, 包括: 根据上述至少一个增强层参考图像中 图像顺序编码号与该增强层当前图像的图像顺序编号之差的绝对值小于预 设的阈值的增强层参考图像确定上述至少一个残差图像。
第三方面, 提供了一种基于双向预测的编码装置, 包括: 生成模块, 用 于根据增强层当前图像的至少一个增强层参考图像以及至少一个增强层参 考图像对应的基本层图像生成至少一个残差图像, 并将上述至少一个残差图 像作为至少一个第一参考图像加入到该增强层当前图像的第一参考图像列 表中; 用于根据该增强层当前图像对应的基本层图像生成第二参考图像, 并 将第二参考图像加入到该增强层当前图像的第二参考图像列表中; 编码模 块, 用于基于第一参考图像列表和第二参考图像列表, 采用双向预测方法对 该增强层当前图像的图像块进行编码, 其中第一参考图像列表是增强层当前 图像的前向参考图像列表和后向参考图像列表中的一个, 第二参考图像列表 是前向参考图像列表和后向参考图像列表中的另一个。
在第一种可能的实现方式中, 该编码模块基于第一参考图像列表和第二 参考图像列表,采用双向预测方法对该增强层当前图像的图像块进行运动估 计, 以确定该图像块的运动信息; 根据该图像块的运动信息, 对该增强层当 前图像的图像块进行运动补偿预测得到图像块的预测差值信号; 对该运动信 息和预测差值信号进行编码并将得到的编码信息添加在编码后形成的码流 中发送给解码端。
结合第一种可能的实现方式, 在第二种可能的实现方式中, 该编码模块 对第一参考图像列表和第二参考图像列表进行双向搜索, 为该图像块确定第 一参考图像列表中的最优参考图像和第一运动矢量以及第二参考图像列表 中的最优参考图像和第二运动矢量,其中运动信息包括第一参考图像列表中 的最优参考图像的索引和第一运动矢量以及第二参考图像列表中的最优参 考图像的索引和第二运动矢量; 若该运动信息指示该图像块在第一参考列表 中的最优参考图像为上述至少一个残差图像之一且该图像块在第二参考图 像列表中的最优参考图像为第二参考图像,根据第一运动矢量从上述至少一 个残差图像之一获取第一预测信号,根据第二运动矢量从第二参考图像获取 第二预测信号;基于加权预测参数对第一预测信号和第二预测信号进行加权 预测运算, 以便将第一预测信号与第二预测信号进行叠加得到该图像块的预 测信号; 根据该预测信号计算该图像块的预测差值信号其中, 该加权预测参 数由编码端确定并且添加在编码后形成的码流中, 或者, 该加权预测参数被 预先设置在编码端。
结合第二种可能的实现方式, 在第三种可能的实现方式中, 该加权预测 参数包括: 第一预测信号的权重 w。, 第二预测信号的权重 Wl , 第一预测信号 的偏移。。, 第二预测信号的偏移。 精度控制因子 shift, 其中该编码模块基 于该加权预测参数采用如下公式对第一预测信号和第二预测信号进行加权 预测运算得到该图像块的预测信号:
predSamples = (P0 x w0 + Pl x wl + ((。。 + ot + 1) « (shift - 1)》 » shift , 其中, pred ampleS 为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, P。为第一预 测信号, 该 为第二预测信号。 结合第三种可能的实现方式, 在第四种可能的实现方式中, 第一预测信 号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , ο0 = ol = -2 χ offset ,该 offset 为第一预测信号被转换成无符号数时偏移量。
结合第三方面或第三方面的上述任何一种可能的实现方式,在第五种可 能的实现方式中, 第三方面的编码装置还包括: 第一添加模块, 用于在编码 后形成的码流中添加用于指示是否允许采用差分模式进行编码的第一标识 信息, 以便解码端根据第一标识信息确定允许基于第一参考图像列表中的上 述至少一个残差图像之一和第二参考图像列表中的第二参考图像, 采用双向 预测方法对该增强层当前图像的图像块进行解码。
结合第三方面或第三方面的上述任何一种可能的实现方式,在第六种可 能的实现方式中, 该生成模块根据该增强层当前图像的前向增强层参考图像 和 /或后向增强层参考图像以及对应的基本层图像生成上述至少一个残差图 像, 其中前向增强层参考图像为前向参考图像列表中的一个, 后向增强层参 考图像为后向参考图像列表中的一个。
结合第三方面或第三方面的上述任何一种可能的实现方式,在第七种可 能的实现方式中, 第三方面的编码装置还包括: 存储模块, 用于将上述至少 一个增强层参考图像中的增强层参考图像和相对应的残差图像存储到同一 图像緩存区中,其中该增强层参考图像的图像顺序编号和相对应的残差图像 的图像顺序编号一致, 并且为相对应的残差图像添加第一附加标识以便编码 端在管理残差图像和增强层参考图像时根据第一附加标识将增强层参考图 像与相对应的残差图像相区分; 或者, 用于将上述至少一个增强层参考图像 中的增强层参考图像和相对应的残差图像存储到不同的图像緩存区中, 其中 该增强层参考图像的图像顺序编号和上述相对应的残差图像的图像顺序编 号一致。
结合第三方面的第七种可能的实现方式, 在第八种可能的实现方式中, 第三方面的编码装置还包括: 第一确定模块, 用于根据预设的准则确定该图 像緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差图 像是否作为后续编码的图像的参考图像; 删除模块, 用于在根据预设的准则 确定该图像緩存区中与上述一个图像顺序编号对应的增强层图像和 /或相应 的残差图像不再作为后续编码的图像的参考图像的情况下, 从该图像緩存区 中删除该增强层参考图像和 /或相应的残差图像。
结合第三方面的第八种可能的实现方式, 在第九种可能的实现方式中, 生成模块还用于生成解码图像管理信息, 其中解码图像管理信息用于指示图 像緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差图 像是否作为后续编码的图像的参考图像, 编码装置还包括: 第二添加模块, 用于将解码图像管理信息添加到编码后形成的码流中。
结合第三方面或第三方面的上述任何一种可能的实现方式,在第十种可 能的实现方式中, 该生成模块对该增强层当前图像的至少一个增强层参考图 像对应的基本层图像进行上采样, 生成至少一个上采样图像, 并将上述至少 一个上采样图像分别与其对应的增强层参考图像相减,得到上述至少一个残 差图像; 对该增强层当前图像对应的基本层图像进行上采样, 以生成第二参 考图像。
结合第三方面或第三方面的第一种至第九种可能的实现方式中的任何 一种, 在第十一种可能的实现方式中, 该生成模块将上述至少一个增强层参 考图像与其对应的基本层图像相减, 得到上述至少一个残差图像; 将该增强 层当前图像对应的基本层图像作为第二参考图像。
结合第三方面或第三方面的第一种至第十一种可能的实现方式中的任 何一种, 在第十二种可能的实现方式中, 第三方面的编码装置还包括: 第二 确定模块, 用于根据第二标识信息确定用于生成上述至少一个残差图像的增 强层参考图像, 其中第二标识信息用于指示上述至少一个残差图像的信息。
结合第三方面的第十二种可能的实现方式,在第十三种可能的实现方式 中, 第二标识信息包括: 上述至少一个残差图像的数目、 上述至少一个残差 图像对应的增强层参考图像的标识信息, 或者上述至少一个残差图像对应的 增强层参考图像的图像顺序编号的差值信息,其中第二标识信息被预先设置 在编码端或者被添加在编码后形成的码流中。
结合第三方面或第三方面的第一种至第十一种可能的实现方式中的任 何一种, 在第十四种可能的实现方式中, 第三方面的编码装置还包括: 第二 确定模块, 用于根据该增强层当前图像与上述至少一个增强层参考图像的时 间相关性确定用于生成上述至少一个残差图像的增强层参考图像。
结合第十四种可能的实现方式, 在第十五种可能的实现方式中, 上述根 据上述增强层当前图像与上述至少一个增强层参考图像的时间相关性确定 上述至少一个残差图像, 包括: 根据上述至少一个增强层参考图像中图像顺 序编码号与该增强层当前图像的图像顺序编号之差的绝对值小于预设的阈 值的增强层参考图像确定上述至少一个残差图像。
第四方面, 提供了一种基于双向预测的解码装置, 包括: 生成模块, 用 于根据增强层当前图像的至少一个增强层参考图像以及至少一个增强层参 考图像对应的基本层图像生成至少一个残差图像, 并将上述至少一个残差图 像作为至少一个第一参考图像加入到该增强层当前图像的第一参考图像列 表中; 根据该增强层当前图像对应的基本层图像生成第二参考图像, 并将第 二参考图像加入到该增强层当前图像的第二参考图像列表中; 解码模块, 用 于基于第一参考图像列表和第二参考图像列表, 采用双向预测方法对该增强 层当前图像的图像块进行解码, 其中第一参考图像列表是增强层当前图像的 前向参考图像列表和后向参考图像列表中的一个, 第二参考图像列表是前向 参考图像列表和后向参考图像列表中的另一个。
在第一种可能的实现方式中, 该解码模块从编码后形成的码流中获取该 增强层当前图像的编码信息, 并对该编码信息解码得到该图像块的运动信息 和该图像块的预测差值信号; 基于第一参考图像列表和第二参考图像列表, 根据该图像块的运动信息和该预测差值信号,对该增强层当前图像的图像块 进行运动补偿解码。
结合第四方面的第一种可能的实现方式, 在第二种可能的实现方式中, 该运动信息包括: 该运动信息包括第一参考图像列表中的选用参考图像的索 引和第一运动矢量以及第二参考图像列表中的选用参考图像的索引和第二 运动矢量, 该解码模块在该运动信息指示该图像块在第一参考图像列表中的 选用参考图像为上述至少一个残差图像之一并且该图像块在第二参考图像 列表中的选用参考图像为第二参考图像的情况下,根据第一运动矢量从上述 至少一个残差图像之一获取第一预测信号,根据第二运动矢量从第二参考图 像获取第二预测信号;基于加权预测参数对第一预测信号和第二预测信号进 行加权预测运算, 以将第一预测信号与第二预测信号进行叠加得到该图像块 的预测信号; 根据该预测差值信号和该图像块的预测信号得到该图像块的重 建信号, 其中该加权预测参数从该码流中得到, 或者该加权预测参数被预先 设置在解码端。
结合第四方面的第二种可能的实现方式, 在第三种可能的实现方式中, 该加权预测参数包括: 第一预测信号的权重 κ¾ , 第二预测信号的权重 Wl , 第 一预测信号的偏移。。, 第二预测信号的偏移。 1 精度控制因子 Shift , 其中该 解码模块基于该加权预测参数采用如下公式对第一预测信号和第二预测信 号进行加权预测运算得到该图像块的预测信号:
predSamples = (P0 x w0 + Pl x wl + ((。。 + ot + 1) « (shift - 1)》 » shift , 其中, pred ampleS 为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, P。为第一预 测信号, 该 为第二预测信号。
结合第二种可能的实现方式, 在第四种可能的实现方式中, 第一预测信 号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , ο0 = ol = -2 χ offset ,该 offset 为第一预测信号被转换成无符号数时偏移量。 结合第四方面或者上述任何一种可能的实现方式,在第五种可能的实现 方式中, 第四方面的解码装置还包括: 第一获取模块, 用于从码流中获取用 于指示允许采用差分模式进行解码的第一标识信息, 以使解码端根据第一标 识信息确定允许基于第一参考图像列表和第二参考图像列表, 采用双向预测 方法对该增强层当前图像的图像块进行解码。
结合第四方面或者上述任何一种可能的实现方式,在第六种可能的实现 方式中,该生成模块根据该增强层当前图像的前向增强层参考图像和 /或后向 增强层参考图像以及对应的基本层图像生成上述至少一个残差图像, 其中前 向增强层参考图像为前向参考图像列表中的一个,后向增强层参考图像为后 向参考图像列表中的一个。
结合第四方面或者上述任何一种可能的实现方式,在第七种可能的实现 方式中, 第四方面的解码方式还包括: 存储模块, 用于将上述至少一个增强 层参考图像中的增强层参考图像和相对应的残差图像存储到同一图像緩存 区中, 其中该增强层参考图像的图像顺序编号和相对应的残差图像的图像顺 序编号一致, 为相对应的残差图像添加第一附加标识, 以便编码端在管理图 像緩存区中的残差图像和增强层参考图像时根据第一附加标识将增强层参 考图像与相对应的残差图像相区分; 或者, 将上述至少一个增强层参考图像 中的增强层参考图像和相对应的残差图像存储到不同的图像緩存区中, 其中 该增强层参考图像的图像顺序编号和相对应的残差图像的图像顺序编号一 致。
结合第四方面或者上述任何一种可能的实现方式,在第八种可能的实现 方式中, 第四方面的解码方式还包括: 第一确定模块, 用于根据预设的准则 确定图像緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的 残差图像是否作为后续解码的图像的参考图像; 删除模块, 用于在根据预设 的准则确定该图像緩存区中与上述一个图像顺序编号对应的增强层图像和 / 或相应的残差图像不再作为后续解码的图像的参考图像的情况下,从该图像 緩存区中删除该增强层参考图像和 /或相应的残差图像。
结合第四方面或者第八种可能的实现方式, 在第九种可能的实现方式 中。 第四方面的编码装置还包括: 第一获取模块, 用于从码流中获取的解码 图像管理信息,其中解码图像管理信息用于指示图像緩存区中与一个图像顺 序编号对应的增强层参考图像和 /或相应的残差图像是否作为后续编码的图 像的参考图像; 删除模块, 用于在根据解码图像管理信息确定图像緩存区中 与一个图像顺序编号对应的增强层图像和 /或相应的残差图像不再作为后续 解码的图像的参考图像的情况下, 从图像緩存区中删除增强层参考图像和 / 或相应的残差图像。
结合第四方面或者上述任何一种可能的实现方式,在第十种可能的实现 方式中,该生成模块对该增强层当前图像的至少一个增强层参考图像对应的 基本层图像进行上采样, 生成至少一个上采样图像, 并将上述至少一个上采 样图像分别与其对应的增强层参考图像相减, 得到上述至少一个残差图像, 并且对该增强层当前图像对应的基本层图像进行上采样, 以生成第二参考图 像。
结合第四方面或者第一方面的第一种至第九种可能的实现方式中的任 何一种, 在第十一种可能的实现方式中, 该生成模块将上述至少一个增强层 参考图像与其对应的基本层图像相减, 得到上述至少一个残差图像, 并且将 该增强层当前图像对应的基本层图像作为第二参考图像。
结合第四方面或者第一种至第十一种可能的实现方式中的任何一种,在 第十二种可能的实现方式中, 第四方面的解码装置还包括: 第二确定模块, 用于根据第二标识信息确定用于生成上述至少一个残差图像的增强层参考 图像, 其中第二标识信息用于指示上述至少一个残差图像的信息。
结合第四方面的第十二种可能的实现方式,在第十三种可能的实现方式 中, 第二标识信息包括: 上述至少一个残差图像的数目、 上述至少一个残差 图像对应的增强层参考图像的标识信息, 或者上述至少一个残差图像对应的 增强层参考图像的图像顺序编号信息, 第二标识信息被预先设置在解码端, 或者从码流中获取。
结合第四方面或者第四方面的上述第一种至第十一种可能的实现方式 中的任何一种,在第十四种可能的实现方式中,第四方面的解码装置还包括: 第二确定模块,用于根据该增强层当前图像与上述至少一个增强层参考图像 的时间相关性确定用于生成上述至少一个残差图像的增强层参考图像。
结合第十四种可能的实现方式, 在第十五种可能的实现方式中, 第二确 定模块根据上述至少一个增强层参考图像中图像顺序编码号与该增强层当 前图像的图像顺序编号之差的绝对值小于预设的阈值的增强层参考图像确 定上述至少一个残差图像。
本发明的实施例可以将根据增强层当前图像的参考图像以及对应的基 本层图像得到的残差图像加入到一个参考图像列表,将根据增强层当前图像 对应的基本层图像得到图像加入到另一参考图像列表, 并且根据这两个参考 图像列表, 利用双向预测方法对该增强层当前图像的图像块进行编码, 实现 了差分编码模式。 由于本发明的实施例借助于双向预测方法来实现差分模 式, 无需对编解码器的核心模块进行改动, 因此, 实现代价较低。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作筒单地介绍, 显而易见地, 下面所描述的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明一个实施例的基于双向预测的编码方法的示意性流程图。 图 2是本发明一个实施例的基于双向预测的解码方法的示意性流程图。 图 3A是根据本发明一个实施例的构造参考图像列表的示意图。
图 3B 是本发明一个实施例的基于双向预测的编码过程的示意性流程 图。
图 4是根据本发明一个实施例的基于双向预测的解码过程的示意性流程 图。
图 5是本发明一个实施例的基于双向预测的编码装置的示意性结构图。 图 6是本发明另一实施例的基于双向预测的编码装置的示意性结构图。 图 7是本发明一个实施例的基于双向预测的解码装置的示意性结构图。 图 8是本发明另一实施例的基于双向预测的解码装置的示意性结构图。 图 9是本发明又一实施例的基于双向预测的编码装置的示意性结构图。 图 10是本发明又一实施例的基于双向预测的解码装置的示意性结构图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创 造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 图 1是本发明一个实施例的基于双向预测的编码方法的示意性流程图。 图 1的方法由编码器执行, 包括如下内容。
110, 根据增强层当前图像的至少一个增强层参考图像以及至少一个增 强层参考图像对应的基本层图像生成至少一个残差图像, 并将上述至少一个 残差图像作为至少一个第一参考图像加入到该增强层当前图像的第一参考 图像列表中。
根据本发明的实施例, 在加入上述至少一个残差图像之前, 增强层当前 图像的第一参考图像列表(例如, 前向或后向参考图像列表)可以包括增强 层当前图像的增强层参考图像(例如, 前向或后向增强层参考图像)。 每个 增强层参考图像为增强层当前图像在时域上的参考图像,是编码器在处理增 强层当前图像之前已经处理完成的增强层图像, 其中的图像信号为编码器处 理得到的重建信号。
本发明的实施例的增强层参考图像的残差图像可以是该增强层参考图 像和该增强层参考图像对应的基本层图像的差值图像, 即通过将该增强层参 考图像减去与该增强层参考图像相对应的基本层图像获得的图像, 例如, 在 增强层的分辨率高于基本层的分辨率的情况下, 可以首先根据每个增强层参 考图像对应的基本层图像生成上采样图像, 然后将该增强层参考图像与该上 采样图像相减得到残差图像。 本发明的实施例并不限于此, 例如, 在增强层 的分辨率与基本层的分辨率相同的情况下,也可以直接将上述增强层参考图 像与增强层参考图像对应的基本层图像相减得到残差图像。这里所说的两个 图像相减指的是分辨率相同的两个图像的对应位置的图像信号(即采样点信 号)的信号值相减。 这里所说的基本层图像的图像信号是经编码处理后重建 得到。 假设图像信号采用 8个比特表示, 则信号取值范围为 0~255 , 那么残 差图像信号的取值范围为 -255~255。 因为残差图像信号的取值一般较小, 可 以将残差图像信号钳位到范围 -128~127之间, 以便用 8比特表示, 从而减小 实现代价。 在某些实现中, 在不便存储和处理带符号数的情况下, 可将残差 图像信号值加 128, 使得其取之范围在 0~255之间。
120, 根据该增强层当前图像对应的基本层图像生成第二参考图像, 并 将第二参考图像加入到该增强层当前图像的第二参考图像列表中。
例如, 在加入上述第二参考图像之前, 增强层当前图像的第二参考图像 列表(例如, 后向或前向参考图像列表)可以包括增强层当前图像的增强层 参考图像(例如, 后向或前向增强层参考图像)。 在增强层的分辨率高于基 本层的分辨率的情况下, 第二参考图像可以是根据该增强层当前图像对应的 基本层图像生成的上采样图像。 本发明的实施例并不限于此, 例如, 在增强 层的分辨率与基本层的分辨率相同的情况下,也可以直接将该增强层当前图 像对应的基本层图像作为第二参考图像, 或者将该增强层当前图像对应的基 本层图像经平滑滤波等滤波处理后作为第二参考图像。
130, 根据第一参考图像列表和第二参考图像列表, 采用双向预测方法 对该增强层当前图像的图像块进行编码, 其中第一参考图像列表是增强层当 前图像的前向参考图像列表和后向参考图像列表中的一个, 第二参考图像列 表是前向参考图像列表和后向参考图像列表中的另一个。
双向预测方法是指利用前向参考图像和后向参考图像对增强层当前图 像的图像块进行预测的方法。本发明的实施例借助于主流视频压缩方案中的 双向预测机制, 能够将上述残差图像的采样点信号与第二参考图像的采样点 信号进行叠加, 以实现差分模式编码。
在本发明的实施例的第一参考图像列表为前向参考图像列表的情况下, 第二参考图像列表为后向参考图像列表, 或者, 在第一参考图像列表为后向 参考图像列表的情况下, 第二参考图像列表为前向参考图像列表。 应理解, 本发明的实施例也可以适用于第一参考图像列表和第二参考图像列表均为 前向或后向参考图像列表的情况。
本发明的实施例可以将根据增强层当前图像的参考图像以及对应的基 本层图像得到的残差图像加入到一个参考图像列表,将根据增强层当前图像 对应的基本层图像得到图像加入到另一参考图像列表, 并且根据这两个参考 图像列表, 利用双向预测方法对该增强层当前图像的图像块进行编码, 实现 了差分编码模式。 由于本发明的实施例借助于双向预测方法来实现差分模 式,无需为每个图像块设置是否使用差分模式的标记, 因此, 实现代价较低。
在 130中, 可以基于第一参考图像列表和第二参考图像列表, 采用双向 预测方法对该增强层当前图像的图像块进行运动估计, 以确定该图像块的运 动信息; 根据该图像块的运动信息, 对该增强层当前图像的图像块进行运动 补偿预测得到图像块的预测差值信号; 对该运动信息和预测差值信号进行编 码并将得到的编码信息添加在编码后形成的码流中发送给解码端。 例如, 本发明的实施例通过双向预测, 在第一参考图像列表和第二参考 列表中搜索(即运动估计)该图像块的最优匹配块, 最优匹配块所在的参考 图像为最优参考图像。 图像块的运动信息可以包括运动矢量, 用于指示该图 像块在时域参考图像中的匹配块与该图像块的相对位移。运动信息还可以包 括预测方向, 例如, 单向预测或者双向预测。 另外, 在多帧参考图像情况下, 运动信息还可以包括用于指示该图像块的最优参考图像的信息。
根据本发明的实施例, 在 130中, 可以对第一参考图像列表和第二参考 图像列表进行双向搜索, 为该图像块确定第一参考图像列表中的最优参考图 像和第一运动矢量以及第二参考图像列表中的最优参考图像和第二运动矢 量, 其中运动信息包括第一参考图像列表中的最优参考图像的索引和第一运 动矢量以及第二参考图像列表中的最优参考图像的索引和第二运动矢量; 若 该运动信息指示该图像块在第一参考列表中的最优参考图像为上述至少一 个残差图像之一且该图像块在第二参考图像列表中的最优参考图像为第二 参考图像,根据第一运动矢量从上述至少一个残差图像之一获取第一预测信 号, 根据第二运动矢量从第二参考图像获取第二预测信号; 基于加权预测参 数对第一预测信号和第二预测信号进行加权预测运算, 以便将第一预测信号 与第二预测信号进行叠加得到该图像块的预测信号; 根据该预测信号计算该 图像块的预测差值信号。
例如, 本发明的实施例可以分别对第一参考图像列表中除残差图像之外 的参考图像和第二参考图像列表中除第二参考图像之外的参考图像进行单 向搜索,可以对第一参考图像列表中除残差图像之外的参考图像和第二参考 图像列表中除第二参考图像之外的参考图像进行双向搜索, 并且可以对第一 参考图像列表中的至少一个残差图像和第二参考图像列表中的第二参考图 像进行双向搜索, 以获得最优参考图像, 例如, 确定使得图像块与匹配块的 绝对差之和( Sum of Absolute Difference, SAD )最小的参考图像作为最优参 考图像, 其中该最优参考图像包含该匹配块。
可选地, 本发明的实施例还可以先对第一参考图像列表和第二参考图像 列表进行单向搜索, 以确定第一参考图像列表中的最优参考图像和第二参考 图像列表中的最优参考图像, 在这种情况下, 还可以比较单向搜索得到的最 优参考图像和双向搜索得到的最优参考图像, 以得到最终的预测方向和最优 参考图像,例如,如果单向搜索时获得的图像块与匹配块的绝对差之和( Sum of Absolute Difference, SAD )大于双向搜索时获得的图像块与匹配块的绝对 差之和(Sum of Absolute Difference, SAD ), 则选择双向预测为最终的预测 方式, 选择双向搜索时获得的最优参考图像作为最终的最优参考图像, 反之 亦然。 与常规双向预测方法相比, 本发明的实施例在第一参考图像列表和第 二参考图像列表中分别增加了上述至少一个残差图像和第二参考图像,使得 在上述至少一个残差图像之一和第二参考图像被确定为最优参考图像的情 况下, 可以将残差图像与第二参考图像进行叠加, 从而实现差分模式。
可选地, 本发明的实施例还可以先对第二参考图像列表进行单向搜索, 并且在确定第二参考图像为最优参考图像的情况下, 才使用第一参考图像列 表中的至少一个残差图像和第二参考图像列表中的第二参考图像进行双向 搜索, 确定最优参考图像, 并且比较这两种情况下的图像块与匹配块的绝对 差之和, 以确定最终的预测方向和最优参考图像。
根据本发明的实施例, 在加权预测运算时, 可以基于预设的规则, 或者 加权预测得到的最终预测信号与原信号的相似程度分别为第一预测信号和 第二预测信号设置相应的权重, 即加权预测参数。 例如, 一般情况下, 图像 块的最终预测信号为第一预测信号与第二预测信号的平均值, 此时第一预测 信号的加权预测参数和第二预测信号的加权预测参数分别设置为 0.5。 再例 如, 在具有淡入、 淡出效果的场景切换情况下, 可根据当前处理图像的内容 与第一预测信号所在图像内容的相似度以及当前处理图像的内容与第二预 测信号所在图像内容的相似度确定第一预测信号与第二预测信号的加权预 测参数, 目的是使得最终预测信号与原信号最为相似。根据本发明的实施例, 为了实现差分模块, 在最优参考图像为残差图像和第二参考图像的情况下, 可以设置合适的加权预测参数,使得图像块的最终预测信号为第一预测信号 与第二预测信号的叠加。 例如, 在理想情况下, 例如, 第一预测信号的加权 预测参数和第二预测信号的加权预测参数均被设置为 1 , 以使得对第一预测 信号和第二预测信号进行加权预测运算得到第一预测信号和第二预测信号 相叠加的效果。
根据本发明的实施例, 上述加权预测参数由编码端确定并且添加在编码 后形成的码流中。
可选地, 作为另一实施例, 该加权预测参数被预先设置在编码端。
根据本发明的实施例, 该加权预测参数包括: 第一预测信号的权重 κ¾ , 第二预测信号的权重 Wi , 第一预测信号的偏移。。, 第二预测信号的偏移。 精度控制因子 shift, 其中在 130中, 可以基于该加权预测参数采用如下公式 对第一预测信号和第二预测信号进行加权预测运算得到该图像块的预测信 号:
predSamples = (P0 x w0 + Pl x wl + ((。。 + ot + 1) « (shift - 1)》 » shift , 其中, pred ampleS 为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, P。为第一预 测信号, 该 为第二预测信号。
根据本发明的实施例, 第一预测信号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , o0 + Ol = -2 x offset , 该 offset 为第一预测信号被转换成无符号 数时偏移量。
例如, 在该公式中, ^。与 Wl均应设置为(l«shift), 以达到实际权重为 1 的效果。在残差图像信号的实际取值范围为 -128~127而整体偏移 128转换为 无符号数进行存储与处理的情况下, 需要将。。与。 t的和设置为 -256, 才可以 补偿前述偏移量 128以实现 p。与 相叠加的效果,此时可以将。。与。 1分别设置 为 -128。 概括的说, 为补偿残差图像信号的偏移 offset, 需要设置。。与。 t使得 两者之和的幅度为两倍的 offset并且符号与 offset相反, 即 Oo + 0l =—i x 0ffset。 在残差图像信号的实际取值范围为 -128~127 而可按照带符号数进行存储与 处理的情况下,无需进行补偿,只要保证。。与。 t的和为 0即可实现^。与 相叠 加的效果, 此时可将。。与。 t分别设置为 0。 应理解, 可以根据实际情况对加权预测参数进行调整, 只要使得图像块 的最终预测信号为第一预测信号和第二预测信号的叠加即可。本发明的实施 例可以通过设置加权参数实现差分模式,从而实现从残差图像得到的第一预 测信号与从第二参考图像得到的第二预测信号相叠加得到图像块的最终预 测信号, 由于设置加权参数并不需要对常规编解码器中的块级别核心模块进 行改动, 只需进行图像级别的操作, 就可以实现与块级别的差分模式相同的 功能, 因此在得到差分模式编码增益的同时, 降低了实现代价。
可选地, 作为另一实施例, 图 1的编码方法还包括: 在编码后形成的码 流中添加用于指示允许采用差分模式进行编码的第一标识信息, 以便解码端 根据第一标识信息确定允许基于第一参考图像列表中的上述至少一个残差 图像之一和第二参考图像列表中的第二参考图像,采用双向预测方法对该增 强层当前图像的图像块进行解码。
例如, 可在码流中加入标识位以表示当前图像序列中的图像是否采用差 分模式。 具体而言, 可以在序列参数集(Sequence Parameter Set, SPS )或 图像参数集(Picture Parameter Set, PPS ) 中加入该标识位, 例如, 标识位 1 表示采用差分模式, 标识位 0表示不采用差分模式。 在这种情况下, 编码端 或解码端可以根据该标识位判断当前图像序列中的图像是否采用差分模式, 根据本发明的实施例并不限于此,也可通过其它方式告知解码端是否采用差 分模式, 例如, 编码端和解码端预先约定使用差分模式等。
根据本发明的实施例, 在 110中, 可以根据该增强层当前图像的前向增 强层参考图像和 /或后向增强层参考图像以及对应的基本层图像生成上述至 少一个残差图像, 其中前向增强层参考图像为前向参考图像列表中的一个, 后向增强层参考图像为后向参考图像列表中的一个。
例如, 可以根据前向增强层参考图像以及该前向增强层参考图像对应的 基本层图像生成至少一个残差图像。 本发明的实施例并不限于此, 例如, 也 可以根据前向增强层参考图像和该前向增强层参考图像对应的基本层图像 生成一部分残差图像,根据后向增强层参考图像和该后向增强层参考图像对 应的基本层图像生成另一部分残差图像, 并且将这两部分残差图像均放置在 第一参考图像列表中, 以便为差分模式提供更多的选择, 从而提高预测的精 度。
可选地, 作为另一实施例, 图 1的编码方法还包括: 将上述至少一个增 强层参考图像中的增强层参考图像和相对应的残差图像存储到同一图像緩 存区中,其中增强层参考图像的图像顺序编号和上述相对应的残差图像的图 像顺序编号 (Picture order count, POC )—致, 并且为相对应的残差图像添 加第一附加标识以便编码端在管理残差图像和增强层参考图像时根据第一 附加标识将增强层参考图像与相对应的残差图像相区分。
例如, 上述图像緩存区可以为解码图像緩存区(Decoded Picture Buffer, DPB )。 较佳地增强层参考图像的图像顺序编号和上述相对应的残差图像的 图像顺序编号 (Picture order count, POC ) 可以相同, 本发明的实施例并不 限于此, 例如, 还可以通过映射的方式来实现增强层参考图像和残差图像之 间的对应。
本发明的实施例的增强层参考图像为已经完成编码的增强层图像, 即增 强层重建图像, 例如, 在完成对增强层图像的编码之后, 可以将增强层重建 图像存储到解码图像緩存区中, 并且将该增强层重建图像减去根据该增强层 重建图像对应的基本层图像生成的图像, 得到残差图像, 并将该残差图像存 储到同一解码图像緩存区中。 上述 POC可以标识图像在视频序列中的位置, 因此, 在后续的处理中, 可以依据该 POC索引 DPB中的增强层重建图像和 残差图像。 由于增强层重建图像和相应的残差图像使用了相同的 POC, 因此 可以使用现有的 DPB管理机制, 基于 POC对增强层重建图像以及对应的残 差图像进行索引、 移除等操作。
可选地, 作为另一实施例, 图 1的编码方法还包括: 将上述至少一个增 强层参考图像中的增强层参考图像和相对应的残差图像存储到不同的解码 图像緩存区中,其中该增强层参考图像的图像顺序编号和上述相对应的残差 图像的图像顺序编号一致。
由于增强层重建图像与相对应的残差图像使用独立的 DPB进行管理, 例如, 使用增强层重建图像 DPB管理增强层重建图像, 使用残差图像 DPB 管理残差图像, 此时, 在一个 DPB中仅有一帧图像与一个 POC数值对应, 因此无需添加额外的标识区分增强层重建图像与相对应的残差图像。尽管增 强层重建图像与相对应的残差图像存储在不同的 DPB 中, 仍然可以为一帧 增强层重建图像与其对应的残差图像设置相同的 POC数值, 以方便对增强 层重建图像和相应的残差图像的管理。
可选地, 作为另一实施例, 图 1的编码方法还包括: 根据预设的准则确 定该解码图像緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相 应的残差图像是否作为后续编码的图像的参考图像; 若根据预设的准则确定 该解码图像緩存区中与上述一个图像顺序编号对应的增强层图像和 /或相应 的残差图像不再作为后续编码的图像的参考图像,从该解码图像緩存区中删 除该增强层参考图像和 /或相应的残差图像。
例如,可以使用滑窗准则确定 DPB中图像的移除。具体说,可按照 POC 由大到小对 DPB中所有图像排序, 可按照给定的滑窗大小 (例如 4 ), 将排 在第 4位以后的所有图像移除。 编码器和解码器可以约定所使用的准则。 或 者, 编码器将上述解码图像管理信息添加到码流中, 告知解码端编码端所使 用的解码图像管理方法。
可选地,作为另一实施例, 图 1的方法还包括: 生成解码图像管理信息, 其中解码图像管理信息用于指示图像緩存区中与一个图像顺序编号对应的 增强层参考图像和 /或相应的残差图像是否作为后续编码的图像的参考图像, 并且将解码图像管理信息添加到编码后形成的码流中。
根据本发明的实施例, 在 110中, 可以对该增强层当前图像的至少一个 增强层参考图像对应的基本层图像进行上采样, 生成至少一个上采样图像, 并将上述至少一个上采样图像分别与其对应的增强层参考图像相减,得到上 述至少一个残差图像, 其中在 120中, 可以对该增强层当前图像对应的基本 层图像进行上采样, 以生成第二参考图像。
根据本发明的实施例, 在 110中, 可以将上述至少一个增强层参考图像 与其对应的基本层图像相减, 得到上述至少一个残差图像, 其中在 120中, 可以将该增强层当前图像对应的基本层图像作为第二参考图像。
可选地, 作为另一实施例, 图 1的编码方法还包括: 根据第二标识信息 确定用于生成上述至少一个残差图像的增强层参考图像, 其中第二标识信息 用于指示上述至少一个残差图像的信息。
例如, 在编码端, 可以将用于构造第一参考图像列表的残差图像的信息 写入视频压缩码流。 在解码端, 可以基于视频压缩码流中的残差图像的信息 按照与编码端相同的方法构造参考图像列表。
根据本发明的实施例第二标识信息包括: 上述至少一个残差图像的数 目、 上述至少一个残差图像对应的增强层参考图像的标识信息, 或者上述至 少一个残差图像对应的增强层参考图像的图像顺序编号信息, 其中第二标识 信息被预先设置在编码端或者被添加在编码后形成的码流中。
例如, 可以将表示加入第一参考图像列表中的残差图像的数量(例如, M )的信息写入码流, 而编解码端将第一参考图像列表中参考图像索引编号 前 M个增强层参考图像对应的残差图像加入参考图像列表, 例如, 可以将 根据参考图像索引编号为 0, 1 , 2, ...M-1的参考图像得到的残差图像加入 到参考图像列表中。 注意, 编解码端也可以约定残差图像的数量, 例如约定 仅使用一个残差图像, 此时则无需将残差图像数量信息添加到码流中。
例如, 可以在编码端和解码端预先约定将哪些增强层参考图像对应的残 差图像加入参考图像列表, 例如, 将第一参考图像列表中的增强层参考图像 对应的残差图像加入参考图像列表,或者同时将第一参考图像列表中与第二 参考图像列表中的增强层参考图像对应的残差图像均加入到第一参考图像 列表中。
又如,可以将与编码端指定的残差图像对应的增强层参考图像信息写入 码流以告知解码端。 具体而言, 在将参考图像列表信息写入码流的情况下, 可以为每一个增强层参考图像额外添加一个标识,指示是否将其对应的残差 图像加入参考图像列表。
再如, 可以将与编码端指定的残差图像对应的增强层参考图像的 POC 添加到码流中。 或者, 可以使用 POC差值信息而不是原始 POC值, 以节约 比特开销。 例如, 可以在码流中携带增强层当前图像的 POC以及与需要加 入第一参考图像列表的残差图像对应的增强层参考图像的 POC的差值信息, 以便在解码端可以通过该 POC的差值信息和增强层当前图像的 POC确定该 增强层参考图像的 POC,再根据该增强层参考图像的 POC从 DPB中获取该 增强层参考图像对应的残差图像。
可选地, 作为另一实施例, 图 1的编码方法还包括: 根据该增强层当前 图像与上述至少一个增强层参考图像的时间相关性确定用于生成上述至少 一个残差图像的增强层参考图像, 此时则无需将残差图像对应的增强层参考 图像信息写入码流,也无需将残差图像对应的增强层参考图像的图像顺序编 号信息写入码流。
一般而言, 与距离增强层当前图像较远的参考图像相比, 距离增强层当 前图像较近的参考图像与增强层当前图像的相关性更强。 因此, 根据本发明 的实施例, 在构造第一参考图像列表时, 可优先选择与增强层当前图像的时 间相关性较强的参考图像所对应的残差图像加入第一参考图像列表, 这样使 得预测信号更加准确。
根据本发明的实施例,在根据增强层当前图像与至少一个增强层参考图 像的时间相关性确定上述至少一个残差图像时, 可以根据至少一个增强层参 考图像中图像顺序编码号与增强层当前图像的图像顺序编号之差的绝对值 'J、于预设的阈值的增强层参考图像确定至少一个残差图像。
例如, 图像的图像顺序编号可以反映图像在时间上的距离远近, 图像顺 序编号越接近的两个图像的时间距离越近。 因此, 可优先选择具有与增强层 当前图像的图像顺序编号接近的图像顺序编号的增强层参考图像用于确定 上述至少一个残差图像。 举例来说, 在该预测的阈值为 2的情况下, 选择其 图像顺序编号与增强层当前图像的图像顺序编号之差的绝对值为 1的增强层 参考图像用于确定上述至少一个残差图像, 例如, 在增强层当前图像的图像 顺序编号为 5的情况下,选择图像顺序编号为 4和 6的增强层参考图像作为 其残差图像。
图 2是本发明一个实施例的基于双向预测的解码方法的示意性流程图。 图 2的方法由解码器执行,与图 1的方法相对应,在此适当省略详细的描述。 图 2的方法包括如下内容。
210, 根据增强层当前图像的至少一个增强层参考图像以及至少一个增 强层参考图像对应的基本层图像生成至少一个残差图像, 并将上述至少一个 残差图像作为至少一个第一参考图像加入到该增强层当前图像的第一参考 图像列表中。
220, 根据该增强层当前图像对应的基本层图像生成第二参考图像, 并 将第二参考图像加入到该增强层当前图像的第二参考图像列表中。
230, 基于第一参考图像列表和第二参考图像列表, 采用双向预测方法 对该增强层当前图像的图像块进行解码, 其中第一参考图像列表是增强层当 前图像的前向参考图像列表和后向参考图像列表中的一个, 第二参考图像列 表是前向参考图像列表和后向参考图像列表中的另一个。
本发明的实施例可以将根据增强层当前图像的参考图像以及对应的基 本层图像得到的残差图像加入到一个参考图像列表,将根据增强层当前图像 对应的基本层图像得到图像加入到另一参考图像列表, 并且根据这两个参考 图像列表, 利用双向预测方法对该增强层当前图像的图像块进行解码, 实现 差分解码模式。 由于本发明的实施例借助于双向预测方法来实现差分模式, 无需为每个图像块设置是否使用差分模式的标记, 因此, 实现代价较低。
在 230中, 可以从编码后形成的码流中获取该增强层当前图像的图像块 的编码信息, 并对该编码信息解码得到该图像块的运动信息和预测差值信 号; 基于第一参考图像列表和第二参考图像列表, 根据该图像块的运动信息 和该图像块的预测差值信号,对该增强层当前图像的图像块进行运动补偿解 码。
该运动信息包括第一参考图像列表中的选用参考图像的索引和第一运 动矢量以及第二参考图像列表中的选用参考图像的索引和第二运动矢量, 其 中在 230中, 可以在该运动信息指示该图像块在第一参考图像列表中的选用 参考图像为上述至少一个残差图像之一并且该图像块在第二参考图像列表 中的选用参考图像为第二参考图像的情况下,根据第一运动矢量从上述至少 一个残差图像之一获取第一预测信号,根据第二运动矢量从第二参考图像获 取第二预测信号;基于加权预测参数对第一预测信号和第二预测信号进行加 权预测运算, 以将第一预测信号与第二预测信号进行叠加得到该图像块的预 测信号;根据该预测差值信号和该图像块的预测信号得到该图像块的重建图 像。
根据本发明的实施例, 该加权预测参数从码流中得到, 或者该加权预测 参数被预先设置在解码端。
根据本发明的实施例, 该加权预测参数包括: 第一预测信号的权重 κ¾ , 第二预测信号的权重 W1 , 第一预测信号的偏移。。, 第二预测信号的偏移。 精度控制因子 shift, 其中在 230中, 可以基于该加权预测参数采用如下公式 对第一预测信号和第二预测信号进行加权预测运算得到该图像块的预测信 号:
predSamples = (P0 x w0 + Pl x wl + ((。。 + + 1) « (shift - 1)》 » shift , 其中, pred ampleS 为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, P。为第一预 测信号, 该 为第二预测信号。
根据本发明的实施例, 第一预测信号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , o0 + Ol = -2 x offset , 该 offset 为第一预测信号被转换成无符号 数时偏移量。 可选地, 作为另一实施例, 图 2的方法还包括: 从码流中获取用于指示 允许采用差分模式进行解码的第一标识信息, 以使解码端根据第一标识信息 确定允许基于第一参考图像列表中的上述至少一个残差图像之一和第二参 考图像列表中的第二参考图像, 采用双向预测方法对该增强层当前图像的图 像块进行解码。
在 210中,可以根据该增强层当前图像的前向增强层参考图像和 /或后向 增强层参考图像以及对应的基本层图像生成上述至少一个残差图像, 其中前 向增强层参考图像为前向参考图像列表中的一个,后向增强层参考图像为后 向参考图像列表中的一个。
可选地, 作为另一实施例, 图 2的解码方法还包括: 将上述至少一个增 强层参考图像中的增强层参考图像和相对应的残差图像存储到同一图像緩 存区中,其中该增强层参考图像的图像顺序编号和相对应的残差图像的图像 顺序编号一致, 并且为相对应的残差图像添加第一附加标识, 以便编码端在 管理图像緩存区中的残差图像和增强层参考图像时根据第一附加标识将增 强层参考图像与相对应的残差图像相区分。
可选地, 作为另一实施例, 图 2的解码方法还包括: 将上述至少一个增 强层参考图像中的增强层参考图像和相对应的残差图像存储到不同的图像 緩存区中, 其中该增强层参考图像的图像顺序编号和相对应的残差图像的图 像顺序编号一致。
可选地, 作为另一实施例, 图 2的解码方法还包括: 根据预设的准则确 定该图像緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的 残差图像是否作为后续解码的图像的参考图像; 若根据预设的准则确定图像 緩存区中与一个图像顺序编号对应的增强层图像和 /或相应的残差图像不再 作为后续解码的图像的参考图像的情况下, 从该图像緩存区中删除该增强层 参考图像和 /或相应的残差图像。
可选地, 作为另一实施例, 图 2的方法还包括: 从码流中获取的解码图 像管理信息, 其中解码图像管理信息用于指示图像緩存区中与一个图像顺序 编号对应的增强层参考图像和 /或相应的残差图像是否作为后续编码的图像 的参考图像; 若根据解码图像管理信息确定图像緩存区中与一个图像顺序编 号对应的增强层图像和 /或相应的残差图像不再作为后续解码的图像的参考 图像, 从图像緩存区中删除增强层参考图像和 /或相应的残差图像。
在 210中, 可以对该增强层当前图像的至少一个增强层参考图像对应的 基本层图像进行上采样, 生成至少一个上采样图像, 并将上述至少一个上采 样图像分别与其对应的增强层参考图像相减, 得到上述至少一个残差图像, 其中在 220中, 可以对该增强层当前图像对应的基本层图像进行上采样, 以 生成第二参考图像。
在 210中, 可以将上述至少一个增强层参考图像与其对应的基本层图像 相减, 得到上述至少一个残差图像, 其中在 120中, 可以将该增强层当前图 像对应的基本层图像作为第二参考图像。 可选地, 作为另一实施例, 图 2的解码方法还包括: 根据第二标识信息 确定用于生成上述至少一个残差图像的增强层参考图像, 其中第二标识信息 用于指示上述至少一个残差图像的信息。
根据本发明的实施例, 第二标识信息包括: 上述至少一个残差图像的数 目、 上述至少一个残差图像对应的增强层参考图像的标识信息, 或者上述至 少一个残差图像对应的增强层参考图像的图像顺序编号信息, 其中第二标识 信息被预先设置在解码端或者从码流中获取。 注意, 若编解码端约定残差图 像的数量, 则无需将残差图像数量信息添加到码流中。
可选地, 作为另一实施例, 图 2的解码方法还包括: 根据该增强层当前 图像与上述至少一个增强层参考图像的时间相关性确定用于生成上述至少 一个残差图像的增强层参考图像。
根据本发明的实施例,在根据该增强层当前图像与上述至少一个增强层 参考图像的时间相关性确定上述至少一个残差图像时, 可以根据上述至少一 个增强层参考图像中图像顺序编码号与该增强层当前图像的图像顺序编号 之差的绝对值小于预设的阈值的增强层参考图像确定上述至少一个残差图 像。
此时则无需从码流中获取残差图像对应的增强层参考图像的标识信息, 也无需从码流中获取残差图像对应的增强层参考图像的图像顺序编号信息。
下面详细描述本发明的实施例的参考图像列表的构造过程。本发明的实 施例可以在编码端与解码端构造参考图像列表。 因此, 下面构造参考图像列 表的方法既可应用于编码端, 也可以应用于解码端。 应理解, 本发明的实施 例中描述的处理指编码操作或解码操作。 本实施例中, 当增强层重建图像作 为其它图像的参考图像时, 称为增强层参考图像。
在编码端或解码端处理(例如, 编码或解码)完一帧基本层图像后, 在 处理与该基本层图像相对应的增强层图像(即增强层当前图像)前, 可以基 于该基本层图像的重建图像(以下筒称基本层图像)获取上采样图像, 将该 上采样图像存储到 DPB中,并将该上采样图像的图像顺序编号( Picture Order Count, POC )设置成与相对应的增强层当前图像的 POC相同。 然后对相对 应的增强层当前图像进行处理, 处理完成后, 将得到的增强层重建图像存储 到该 DPB 中。 基于该增强层重建图像与该上采样图像生成残差图像, 将该 残差图像存储到该 DPB中, 并将该上采样图像从该 DPB中移除。 本发明的 实施例还可以设置该增强层重建图像与该残差图像的 POC为相同的数值。 因为增强层当前图像的重建图像与相对应的残差图像的 POC值相同, 所以 需要为该 DPB中的残差图像加入一个附加标识进行区分。
应理解, 由于只有在增强层当前图像处理完成后才能得到相对应的重建 图像与残差图像, 因此在 DPB中按增强层当前图像的 POC数值索引只会找 到与该增强层当前图像相对应的基本层图像的上采样图像, 因此可以不对该 上采样图像添加标识进行区分。 应理解的是, 上采样图像仅在处理增强层当 前图像时使用, 而不会在处理后续图像时使用, 因此, 也可以不存储到 DPB 中。
除了可以按照约定将每帧残差图像存储 DPB 中之外, 还可以根据码流 中的指示信息确定是否将某一帧残差图像存储到 DPB 中。 例如, 该指示信 息可在 PPS或片头 ( slice header ) 中携带。
另外, 编码端或解码端可以根据给定准则确定 DPB中与某个 POC对应 的所有图像(例如, 增强层重建图像与相对应的残差图像), 是否会被用作 后续处理图像的参考图像。 该给定准则可以在编解码端预先约定, 或者由编 码端确定后通知解码端。如果一帧图像不再被用作参考图像, 则可以从 DPB 中移除。
上面描述了增强层重建图像及残差图像放在同一个 DPB 中进行管理的 方法。 可选地, 作为另一实施例, 还可以分别将增强层重建图像和残差图像 存储到独立的 DPB进行管理。 换句话说, 使用增强层重建图像 DPB管理增 强层重建图像, 使用残差图像 DPB管理残差图像。 在这种情况下, 在一个 DPB中仅有一帧图像与每个 POC相对应, 因此无需添加额外的标识区分增 强层重建图像与残差图像。 应理解, 在不同的 DPB 中, 可以为一帧增强层 重建图像和相对应的残差图像设置相同的 POC。
图 3 A是根据本发明一个实施例的构造参考图像列表的示意图。
本实施例以上述第一参考图像列表为前向参考图像列表、上述第二参考 图像列表为后向参考图像列表为例进行说明。 在本实施例中, 假设增强层图 像与基本层图像的分辨率不一样, 例如, 基本层图像的分辨率低于增强层图 像的分辨率, 因此, 需要将基本层图像的上采样图像加入到后向参考图像列 表中。
具体而言,参考图像列表可以包括: 前向参考图像列表 listO与后向参考 图像列表 listl ,可以将上述残差图像放入 listO,将上述上采样图像放入 listl , 在这里,将图像放入参考图像列表是指将图像的索引或标识设置在参考图像 列表中。 在进行双向预测时, 增强层当前图像中的一个图像块的预测信号由 两个预测信号组合产生,这两个预测信号包括: 从 listO中的参考图像获得的 前向预测信号和从 listl中的参考图像获得的后向预测信号,使得能够利用双 向预测机制将残差图像中的信号与上采样图像中的信号进行叠加 , 达到与常 规块级别的差分模式相同的效果。
参见图 3A, 第一行图像为增强层(Enhancement Layer, EL ) 图像, 其 中, Curr图像表示增强层当前图像, 即正在进行处理(例如, 正在进行编码 或解码) 的图像。 RefO, Refl , Refn表示增强层当前图像的参考图像, 这些参考图像是增强层重建图像, 即增强层中已经完成编码或解码操作而产 生的图像, 例如, Curr图像左侧的图像为 listO 中的参考图像, 即前向参考 图像, Curr图像右侧的图像为 listl 中的参考图像, 即后向参考图像。 第二 行图像表示第三行的基本层重建图像(筒称基本层图像)上采样后所得的基 本层上采样 (Base Layer Upsmaple, BL Upsample)图像, 例 口, BLUpCurr 表示增强层当前图像对应的基本层图像的上采样图像。 第三行图像表示基本 层 (Base Layer, BL ) 图像, 例如, BLCurr图像为 Curr图像对应的基本层图 像。
在图 3A中, 同一列对应位置的图像表示同一时刻的基本层重建图像、 基本层图像的上采样图像和增强层图像。 例如, 与 listO中的参考图像 RefO, Refl , Refn对应的基本层图像分别为 BLL00 BLL01 , BLLOn, 上 采样图像分别为 BLUpLOO BLUpLOl , BLUpLOn; 与 listl中的参考图像 RefO, Refl , Refn对应的基本层图像分别为 BLL10 BLL11 , BLLln, 上采样图像分另) J为 BLUpUO B JpUl , B JpUn。
另外, 本发明的实施例在 listO中添加了残差图像 DifO , Difl , ... , Difn , 在 listl中添加了上采样图像 BLUpCurr。 为了清楚起见, 图 3A中只图示说 明了在 listO中添加 listO的参考图像的残差图像作为新的参考图像。 应理解 的是, 在本发明的实施中, 也可以将 listl 中的 RefO, Refl , Refn对应 的残差图像也加入到 listO中, 在这种情况下, listl中的 BLUpCurr不用于生 成残差图像。
根据本发明的实施例, 残差图像可以放置在参考图像列表中的任意位 置。 例如, 图 3A给出一种可能的放置方法, 其中 DiffO置于 listO中的 RefO 之后, Diffl置于 Refl之后, 依此类推。 应理解的是, 残差图像与上采样图 像应该放置在不同的参考图像列表中, 以便通过双向预测将残差信号与基本 层上采样信号叠加来实现差分模式。
下面参照图 3A描述基于双向预测实现差分模式的编码过程。 图 3B是 本发明一个实施例的基于双向预测的编码过程的示意性流程图。 图 3的实施 例是图 1的实施例的例子。
本实施例详细描述了在采用双向预测实现差分模式的情况下,增强层中 一帧双向预测图像的编码流程。
310, 构造增强层当前图像的参考图像列表。
例如, 可以按照图 3A描述的方法构造参考图像列表, 将残差图像放置 在 listO中, 在上采样图像放置在 listl中, 在此不再赘述。
320, 确定加权预测参考图像, 并为加权预测参考图像设置相应的加权 预测参数。
例如, 将 listO中的残差图像和 listl 中的上采样图像标记为加权预测参 考图像。 在所有参考图像均为加权预测参考图像的情况下, 也可以不进行标 记。 按照下面的方法为加权预测参考图像设置加权预测参数, 即为加权预测 参考图像绑定加权预测参数。
下面以一种常规加权预测方法为例, 说明加权预测参数的设置方法。 例 如, 在加权预测方法中, w。表示 listO中的参考图像的权重, Wl表示 listl 中 的参考图像的权重, 。。表示 listO中的参考图像的偏移, 0l表示 listl中的参考 图像的偏移, shift表示精度控制因子。 例如, 可以按照公式(1 )所示方法 确定这些参数。
w0 = (1 « luma _ log 2 _ weight _ denom) + delta _ luma _ weight _ 10
w1 = (1 « luma _ log 2 _ weight _ denom) + delta _ luma _ weight _ 11
o0 = luma _ offset _ 10
ογ = luma _ offset _ 11
shift = luma _ log 2 _ weight _ denom
其中, luma _ log 2 _ weight _ denom可以按照默认的方法设置, 即当参考图像数 目小于 3时设置为 6, 否则设置为 7。 delta _ luma _ weight _ 10 口 delta _ luma _ weight _ 11 可以设置为 0 , I ffset _ IQ和 I ffset _ ll可以 m为 Λ2 编码端可以将 luma _ log 2 _ weight _ denom delta _ luma _ weight _ /0 delta _ luma _ weight _ /1 luma _ offset _ 10 和/ #M _ /1等五个参数告知解码端,以便解码端能够根据这五个参数生成 相同的加权预测参数 M¾、 Wl . 。。、 01和 shift
330, 对增强层当前图像的图像块进行运动估计, 确定其运动信息。 例如, 首先可以对参考图像列表进行单向搜索, 即遍历 ListO中除残差 图像外的所有图像进行运动搜索以确定最优前向参考图像, 遍历 listl 中除 BLUpCurr外的所有图像进行运动搜索以确定最优后向参考图像。 然后, 可 以再进行双向搜索确定最优双向参考图像。在使用上采样图像和残差图像进 行双向预测搜索时, 使用步骤 320中确定的加权预测参数进行加权预测。
如果从 Listl中选出的最优参考图像是 BLUpCurr, 则对 ListO中的残差 图像进行搜索。 如果 listl中的最优参考图像不是 BLUpCurr, 则只对 listO中 除残差图像之外的参考图像进行搜索得到最优双向预测参考图像, 而不对残 差图像进行搜索。 由于本发明的实施例添加残差图像只是为了实现差分模式 预测, 因此, 在编码端进行双向预测的运动估计操作时, 仅在 listl中的最优 参考图像为 BLUpCurr的情况下,才需要使用 listO中的各个残差图像作为前 向参考图像进行运动搜索。
此外,编码端进行单向预测的运动估计操作时,也无需使用 listO中的残 差图像作为参考图像进行运动搜索。
经过上述运动估计过程,可以为增强层当前图像的每个图像块确定运动 信息, 例如, 为每个图像块确定最优前向参考图像和最优后向参考图像的标 识和运动矢量。
340 , 根据确定的运动信息, 对当前增强层图像的图像块进行运动补偿 预测, 得到增强层重建图像。
如果 330中确定的运动信息指示该图像块的前向预测信号 p。来自于残差 图像, 其中前向预测信号的取值范围为 0~255 (为存储与处理方便, 已添加 128偏移后转换为无符号数), 后向预测信号 来自于上采样图像, 其中信号 的取值范围为 0~255 , 则可按照下面的公式(2 )计算该图像块的预测信号 predSamples
predSamples = (P0 x w0 + Pl wl + ((o0 + ot + 1) « (shift - 1)》 » shift = ( 0 - 128) + /^ ( 2 ) 另外, 可以对预测信号 predSamples进行钳位操作, 以将数值约束在 [0, 255]之间。 从公式(2 ) 可以看到, 按照步骤 320中的加权预测参数的设置, 可以实现原始残差信号 (P0 - 128)与上采样信号 的叠加,从而达到与常规块级 别的差分模式编码相同的效果。
在获取该图像块的预测信号 predSamples后, 可以进一步基于已经获取 的预测信号对图像块进行预测编码, 即计算预测差值信号, 并将该预测差值 信号写入视频压缩码流。基于已经获取的预测信号对图像块进行预测编码是 常规技术, 在此不再赘述。
350, 基于增强层重建图像生成相对应的残差图像, 并将该残差图像放 入 DPB中。
例如, 在完成对增强层当前图像的编码得到增强层重建图像(即编码后 的图像)之后, 可以基于该增强层重建图像生成相对应的残差图像, 并将该 残差图像放入 DPB中, 以便在后续的编码过程中使用。
本发明的实施例可以在完成每帧增强层图像的编码之后,计算得到的增 强层重建图像信号与相对应的基本层上采样图像的差值图像, 并且将该差值 图像作为该增强层重建图像的残差图像。 例如, 可以按照下列公式 (3)的方法 构造残差图像 DifO:
Dif0(x, y) = Ref0(x, y) - BLUpL00(x, y) + 128 (3) 其中 (X , y)表示图像中采样点的坐标, 其余残差图像也可使用相同的方 法构造, 在此不再赘述。 由于一些常规编解码方案中规定参考图像中的像素 值不能为负值, 为了使得本发明的实施例能够应用于这些编解码方案, 可以 将残差图像中所有信号均加上 128, 并进行钳位操作以将信号值约束在区间 [0, 255]之内, 目的是将带符号数转换为无符号数进行存储与处理。
下面参照图 3A描述基于双向预测实现差分模式的解码过程。
图 4是本发明一个实施例的基于双向预测的解码过程的示意性流程图。 图 4的实施例是图 2的实施例的例子。
本实施例详细描述了在采用双向预测实现差分模式的情况下,增强层中 一帧双向预测图像的解码流程。
410, 构造增强层当前图像的参考图像列表。
例如, 可以按照图 3A描述的方法构造参考图像列表, 将残差图像放置 在 listO中, 在上采样图像放置在 listl中, 在此不再赘述。
420, 从码流中获取增强层当前图像中的图像块的运动信息, 并根据该 运动信息对该图像块进行运动补偿解码操作, 得到该图像块的重建图像。 如果 330中确定的运动信息指示该图像块的前向预测信号 p。来自于前向 参考列表中的残差图像, 后向预测信号 来自于后向参考列表中的上采样图 像, 则可按照上面的公式(2 )计算该图像块的预测信号 predSamples。 另夕卜, 可以对预测信号 predSamples进行钳位操作,以将数值约束在 [0, 255]之间。 在获取图像块的预测信号 predSamples后, 可以进行叠加解码得到的差值信 号, 并进一步进行环路滤波等解码操作从而获取最终的重建信号。 基于已经 获取的预测信号对图像块进行解码操作以获取最终重建信号是常规技术,在 此不再赘述。
430, 基于增强层重建图像生成相对应的残差图像, 并将该残差图像放 入 DPB中。
例如, 在完成对增强层当前图像的解码得到增强层重建图像之后, 可以 按照图 3A中描述的方法基于该增强层重建图像生成相对应的残差图像, 并 将该残差图像放入 DPB中, 以便在后续的解码过程中使用。
可选地, 作为图 3B和图 4的实施例的替代方案, 残差图像和上采样图 像可以不存储在 DPB 中, 在这种情况下, 在对增强层当前图像进行编码或 解码时, 可以先根据参考图像的 POC从 DPB中获取增强层当前图像的参考 图像, 如图 3A中的参考图像 RefO, Refl , Refn。 然后根据上述公式( 3 ) 计算得到与这些参考图像相对应的残差图像, 并将残差图像加入到参考图像 列表中, 同时将增强层当前图像对应的基本层图像的上采样图像加入到 listl 的参考图像列表中。 本实施例并未将残差图像和上采样图像存储到 DPB 中 进行统一管理, 而是在需要进行编码或解码时才计算残差图像和上采样图 像。 这样做的优点在于, 生成残差图像仅在处理增强层当前图像时有效, 在 增强层当前图像的处理结束后可以立即销毁。 与图 3B和图 4的实施例的方 法相比, 该方法对残差图像与上采样图像的管理筒单。 然而, 图 3B和图 4 的实施例的优点在于能够避免同时使用多个残差图像的情况下可能导致的 重复计算。 因此, 本实施例的方法适用于残差图像较少的情况, 例如, 在增 强层当前图像的参考图像列表中加入一个残差图像的情况下, 结合常规的采 用滑窗方式设置参考图像列表的方法, 则不会出现重复计算残差图像的情 况。
可选地, 作另一实施例, 在构造参考图像列表时, 通常会将时间相关性 强的参考图像放置在列表的前端。 例如, 图 3所示 listO和 listl中的首个增 强层参考图像 RefO与当前处理图像的时间相关性分别强于 listO和 listl中增 强层参考图像 Refl与当前处理图像的时间相关性,依此类推。而 listO和 listl 中同位置的参考图像可认为其与当前处理图像的时间相关性没有明显差别。 在这种情况下, 可按时间照相关性从强到弱的顺序, 从参考图像列表中选择 参考图像并将其对应的残差图像加入一个参考图像列表, 例如 list0。 若两个 参考图像的时间相关性没有差别, 则可以按照预置的次序依次添加其对应的 残差图像到 listO 中。 残差图像可放置在 listO 中的任意位置。 需注意, listO 与 listl中的参考图像可能有重复, 因此, 对应的残差图像也可能有重复。 在 检测到当前处理的增强层参考图像与已处理完成的增强层参考图像有重复 时, 则无需生成对应的残差图像。
上述实施例以基本层图像与增强层图像分辨率不同的情况下进行了说 明, 然而本技术领域人员应理解的是, 上述实施例也可应用于基本层图像与 增强层图像分辨率相同的情况, 在这种情况下, 除了无需对基本层图像进行 上采样操作之外, 其余处理流程与上述实施例相同。
图 5是本发明一个实施例的基于双向预测的编码装置 500的示意性结构 图。 编码装置 500包括: 生成模块 510和编码模块 520。
生成模块 510根据增强层当前图像的至少一个增强层参考图像以及至少 一个增强层参考图像对应的基本层图像生成至少一个残差图像, 并将上述至 少一个残差图像作为至少一个第一参考图像加入到该增强层当前图像的第 一参考图像列表中; 用于根据该增强层当前图像对应的基本层图像生成第二 参考图像, 并将第二参考图像加入到该增强层当前图像的第二参考图像列表 中。 编码模块 520基于第一参考图像列表和第二参考图像列表, 采用双向预 测方法对该增强层当前图像的图像块进行编码, 其中第一参考图像列表是增 强层当前图像的前向参考图像列表和后向参考图像列表中的一个, 第二参考 图像列表是前向参考图像列表和后向参考图像列表中的另一个。
本发明的实施例可以将根据增强层当前图像的参考图像以及对应的基 本层图像得到的残差图像加入到一个参考图像列表,将根据增强层当前图像 对应的基本层图像得到图像加入到另一参考图像列表, 并且根据这两个参考 图像列表, 利用双向预测方法对该增强层当前图像的图像块进行编码, 实现 了差分编码模式。 由于本发明的实施例借助于双向预测方法来实现差分模 式,无需为每个图像块设置是否使用差分模式的标记, 因此, 实现代价较低。 图 6是本发明另一实施例的基于双向预测的编码装置 600的示意性结构 图。 编码装置 600包括: 生成模块 610和编码模块 620。 生成模块 610和编 码模块 620与图 5的生成模块 510和编码模块 520类似, 在此不再赘述。
根据本发明的实施例, 编码模块 620根据第一参考图像列表和第二参考 图像列表, 采用双向预测方法对该增强层当前图像的图像块进行运动估计, 以确定该图像块的运动信息; 根据该图像块的运动信息, 对该增强层当前图 像的图像块进行运动补偿预测得到图像块的预测差值信号; 对该运动信息和 预测差值信号进行编码并将得到的编码信息添加在编码后形成的码流中发 送给解码端。
根据本发明的实施例, 编码模块 620对第一参考图像列表和第二参考图 像列表进行双向搜索, 为该图像块确定第一参考图像列表中的最优参考图像 和第一运动矢量以及第二参考图像列表中的最优参考图像和第二运动矢量, 其中运动信息包括第一参考图像列表中的最优参考图像的索引和第一运动 矢量以及第二参考图像列表中的最优参考图像的索引和第二运动矢量; 若该 运动信息指示该图像块在第一参考列表中的最优参考图像为上述至少一个 残差图像之一且该图像块在第二参考图像列表中的最优参考图像为第二参 考图像, 根据第一运动矢量从上述至少一个残差图像之一获取第一预测信 号, 根据第二运动矢量从第二参考图像获取第二预测信号; 基于加权预测参 数对第一预测信号和第二预测信号进行加权预测运算, 以便将第一预测信号 与第二预测信号进行叠加得到该图像块的预测信号; 根据该预测信号计算该 图像块的预测差值。
根据本发明的实施例, 该加权预测参数由编码端确定并且添加在编码后 形成的码流中, 或者, 该加权预测参数被预先设置在编码端。
根据本发明的实施例, 该加权预测参数包括: 第一预测信号的权重 M¾ , 第二预测信号的权重 Wi , 第一预测信号的偏移。。, 第二预测信号的偏移。 精度控制因子 shift,其中编码模块 620基于该加权预测参数采用如下公式对 第一预测信号和第二预测信号进行加权预测运算得到该图像块的预测信号: predSamples = ((P0 + ) x w0 + Pl x wl + ((o0 + ot + 1) « (shift - 1))) » shift , 其 中 , prei^a /?/^为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, p。为第一预测信号, 该 为第二预测信号。 根据本发明的实施例, 第一预测信号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , o0 = Ol =— 2 x offset , 该 offset 为第一预测信号被转换成无符号 数时偏移量。
可选地, 作为另一实施例, 编码装置 600还包括: 第一添加模块 630。 第一添加模块 630在编码后形成的码流中添加用于指示允许采用差分模 式进行编码的第一标识信息, 以便解码端根据第一标识信息确定允许基于第 一参考图像列表中至少一个残差图像之一和第二参考图像列表中的第二参 考图像, 采用双向预测方法对该增强层当前图像的图像块进行解码。
根据本发明的实施例, 生成模块 610根据该增强层当前图像的前向增强 层参考图像和 /或后向增强层参考图像以及对应的基本层图像生成上述至少 一个残差图像, 其中前向增强层参考图像为前向参考图像列表中的一个, 后 向增强层参考图像为后向参考图像列表中的一个。
可选地, 作为另一实施例, 编码装置 600还包括: 存储模块 640。 存储 模块 640将上述至少一个增强层参考图像中的增强层参考图像和相对应的残 差图像存储到同一图像緩存区中, 其中该增强层参考图像的图像顺序编号和 相对应的残差图像的图像顺序编号一致, 为相对应的残差图像添加第一附加 标识以便编码端在管理残差图像和增强层参考图像时根据第一附加标识将 增强层参考图像与相对应的残差图像相区分; 或者, 用于将上述至少一个增 强层参考图像中的增强层参考图像和相对应的残差图像存储到不同的图像 緩存区中, 其中该增强层参考图像的图像顺序编号和上述相对应的残差图像 的图像顺序编号一致。
可选地, 作为另一实施例, 编码装置 600还包括: 第一确定模块 650和 删除模块 660。 第一确定模块 650根据预设的准则确定该图像緩存区中与一 个图像顺序编号对应的增强层参考图像和 /或相应的残差图像是否作为后续 编码的图像的参考图像。删除模块 660在根据预设的准则确定该图像緩存区 中与上述一个图像顺序编号对应的增强层图像和 /或相应的残差图像不再作 为后续编码的图像的参考图像的情况下,从该图像緩存区中删除该增强层参 考图像和 /或相应的残差图像。
可选地,作为另一实施例,生成模块 610还用于生成解码图像管理信息, 其中解码图像管理信息用于指示图像緩存区中与一个图像顺序编号对应的 增强层参考图像和 /或相应的残差图像是否作为后续编码的图像的参考图像, 编码装置还包括: 第二添加模块 680, 用于将解码图像管理信息添加到编码 后形成的码流中。
根据本发明的实施例, 生成模块 610对该增强层当前图像的至少一个增 强层参考图像对应的基本层图像进行上采样, 生成至少一个上采样图像, 并 将上述至少一个上采样图像分别与其对应的增强层参考图像相减,得到上述 至少一个残差图像; 对该增强层当前图像对应的基本层图像进行上采样, 以 生成第二参考图像。
根据本发明的实施例, 生成模块 610将上述至少一个增强层参考图像与 其对应的基本层图像相减, 得到上述至少一个残差图像; 将该增强层当前图 像对应的基本层图像作为第二参考图像。
可选地, 作为另一实施例, 编码装置 600还包括: 第二确定模块 670。 第二确定模块 670用于根据第二标识信息确定用于生成上述至少一个残 差图像的增强层参考图像, 其中第二标识信息用于指示上述至少一个残差图 像的信息。
根据本发明的实施例, 第二标识信息包括: 上述至少一个残差图像的数 目、 上述至少一个残差图像对应的增强层参考图像的标识信息, 或者上述至 少一个残差图像对应的增强层参考图像的图像顺序编号信息, 其中第二标识 信息被预先设置在编码端或者被添加在编码后形成的码流中。
根据本发明的实施例, 图 6的编码装置 600还包括: 第二确定模块 670。 第二确定模块 670根据该增强层当前图像与上述至少一个增强层参考图像的 时间相关性确定用于生成上述至少一个残差图像的增强层参考图像。
根据本发明的实施例, 第二确定模块 670根据上述至少一个增强层参考 图像中图像顺序编码号与该增强层当前图像的图像顺序编号之差的绝对值 小于预设的阈值的增强层参考图像确定上述至少一个残差图像。
图 7是本发明一个实施例的基于双向预测的解码装置 700的示意性结构 图。 解码装置 700包括: 生成模块 710和解码模块 720。
生成模块 710根据增强层当前图像的至少一个增强层参考图像以及至少 一个增强层参考图像对应的基本层图像生成至少一个残差图像, 并将上述至 少一个残差图像作为至少一个第一参考图像加入到该增强层当前图像的第 一参考图像列表中; 根据该增强层当前图像对应的基本层图像生成第二参考 图像, 并将第二参考图像加入到该增强层当前图像的第二参考图像列表中。 解码模块 720用于基于第一参考图像列表和第二参考图像列表,采用双向预 测方法对该增强层当前图像的图像块进行解码, 其中第一参考图像列表是增 强层当前图像的前向参考图像列表和后向参考图像列表中的一个, 第二参考 图像列表是前向参考图像列表和后向参考图像列表中的另一个。
本发明的实施例可以将根据增强层当前图像的参考图像以及对应的基 本层图像得到的残差图像加入到一个参考图像列表,将根据增强层当前图像 对应的基本层图像得到图像加入到另一参考图像列表, 并且根据这两个参考 图像列表, 利用双向预测方法对该增强层当前图像的图像块进行解码, 实现 了差分解码模式。 由于本发明的实施例借助于双向预测方法来实现差分模 式,无需为每个图像块设置是否使用差分模式的标记, 因此, 实现代价较低。
图 8是本发明另一实施例的基于双向预测的解码装置 800的示意性结构 图。 解码装置 800包括: 生成模块 810和解码模块 820, 与图 7的生成模块 710和解码模块 720类似, 在此不再赘述。
根据本发明的实施例,解码模块 820从编码后形成的码流中获取该增强 层当前图像的图像块的编码信息, 并对该编码信息解码得到该图像块的运动 信息和图像块的预测差值信号; 基于第一参考图像列表和第二参考图像列 表, 根据该图像块的运动信息和该预测差值信号, 对该增强层当前图像的图 像块进行运动补偿解码。
根据本发明的实施例, 该运动信息包括: 该运动信息包括第一参考图像 列表中的选用参考图像的索引和第一运动矢量以及第二参考图像列表中的 选用参考图像的索引和第二运动矢量,解码模块 820在该运动信息指示该图 像块在第一参考图像列表中的选用参考图像为上述至少一个残差图像之一 并且该图像块在第二参考图像列表中的选用参考图像为第二参考图像的情 况下, 根据第一运动矢量从上述至少一个残差图像之一获取第一预测信号, 根据第二运动矢量从第二参考图像获取第二预测信号;基于加权预测参数对 第一预测信号和第二预测信号进行加权预测运算, 以将第一预测信号与第二 预测信号进行叠加得到该图像块的预测信号; 根据该预测差值信号和该图像 块的预测信号得到该图像块的重建图像。
根据本发明的实施例, 该加权预测参数从码流中得到, 或者该加权预测 参数被预先设置在解码端。
根据本发明的实施例, 该加权预测参数包括: 第一预测信号的权重 M¾ , 第二预测信号的权重 Wi , 第一预测信号的偏移。。, 第二预测信号的偏移。 精度控制因子 shift,其中该解码模块 820基于该加权预测参数采用如下公式 对第一预测信号和第二预测信号进行加权预测运算得到该图像块的预测信 号:
preitt ipto +
Figure imgf000043_0001
, 其 中 , pre^a p/i^为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, p。为第一预测信号, 该 为第二预测信号。 根据本发明的实施例, 第一预测信号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , o0 = Ol =— 2 x offset , 该 Offset 为第一预测信号被转换成无符号 数时偏移量。 可选地, 作为另一实施例, 图 8的解码装置 800还包括: 第一获取模块 830。 第一获取模块 830从码流中获取用于指示允许采用差分模式进行解码 的第一标识信息, 以使解码端根据第一标识信息确定允许基于第一参考图像 列表和第二参考图像列表, 采用双向预测方法对该增强层当前图像的图像块 进行解码。
根据本发明的实施例, 生成模块 810根据该增强层当前图像的前向增强 层参考图像和 /或后向增强层参考图像以及对应的基本层图像生成上述至少 一个残差图像, 其中前向增强层参考图像为前向参考图像列表中的一个, 后 向增强层参考图像为后向参考图像列表中的一个。
可选地, 作为另一实施例, 图 8的解码装置 800还包括: 存储模块 840。 存储模块 840将上述至少一个增强层参考图像中的增强层参考图像和相对应 的残差图像存储到同一图像緩存区中, 其中该增强层参考图像的图像顺序编 号和相对应的残差图像的图像顺序编号一致, 并且为相对应的残差图像添加 第一附加标识, 以便编码端在管理图像緩存区中的残差图像和增强层参考图 像时根据第一附加标识将增强层参考图像与相对应的残差图像相区分; 或 者,将上述至少一个增强层参考图像中的增强层参考图像和相对应的残差图 像存储到不同的图像緩存区中, 其中该增强层参考图像的图像顺序编号和相 对应的残差图像的图像顺序编号一致。
可选地, 作为另一实施例, 图 8的解码装置 800还包括: 第一确定模块 850和删除模块 860。 第一确定模块 850根据预设的准则或从码流中获取的 解码图像管理信息确定该图像緩存区中与一个图像顺序编号对应的增强层 参考图像和 /或相应的残差图像是否作为后续解码的图像的参考图像,并且将 解码图像管理信息添加到码流中, 其中该解码图像管理信息用于指示该图像 緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差图像 是否作为后续编码的图像的参考图像。删除模块 860在根据预设的准则确定 该图像緩存区中与上述一个图像顺序编号对应的增强层图像和 /或相应的残 差图像不再作为后续解码的图像的参考图像的情况下,从该图像緩存区中删 除该增强层参考图像和 /或相应的残差图像。
可选地, 作为另一实施例, 图 8的解码装置还包括: 第二获取模块 870, 用于从码流中获取的解码图像管理信息, 其中解码图像管理信息用于指示图 像緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差图 像是否作为后续编码的图像的参考图像; 删除模块 860, 用于在根据解码图 像管理信息确定图像緩存区中与一个图像顺序编号对应的增强层图像和 /或 相应的残差图像不再作为后续解码的图像的参考图像的情况下,从图像緩存 区中删除增强层参考图像和 /或相应的残差图像。
根据本发明的实施例, 生成模块 810对该增强层当前图像的至少一个增 强层参考图像对应的基本层图像进行上采样, 生成至少一个上采样图像, 并 将上述至少一个上采样图像分别与其对应的增强层参考图像相减,得到上述 至少一个残差图像, 并且对该增强层当前图像对应的基本层图像进行上采 样, 以生成第二参考图像。
根据本发明的实施例, 生成模块 810将上述至少一个增强层参考图像与 其对应的基本层图像相减, 得到上述至少一个残差图像, 并且将该增强层当 前图像对应的基本层图像作为第二参考图像。
可选地, 作为另一实施例, 图 8的解码装置 800还包括: 第二确定模块
880。 第二确定模块 880根据第二标识信息确定用于生成上述至少一个残差 图像的增强层参考图像, 其中第二标识信息用于指示上述至少一个残差图像 的信息。
根据本发明的实施例, 第二标识信息包括: 第二标识信息包括: 上述至 少一个残差图像的数目、上述至少一个残差图像对应的增强层参考图像的标 识信息或者上述至少一个残差图像对应的增强层参考图像的图像顺序编号 信息, 其中, 第二标识信息被预先设置在解码端, 或者从码流中获取。
可选地, 作为另一实施例, 图 8的解码装置 800还包括: 第二确定模块 880。 第二确定模块 880根据该增强层当前图像与上述至少一个增强层参考 图像的时间相关性确定用于生成上述至少一个残差图像的增强层参考图像。
根据本发明的实施例, 第二确定模块 880根据上述至少一个增强层参考 图像中图像顺序编码号与该增强层当前图像的图像顺序编号之差的绝对值 小于预设的阈值的增强层参考图像确定上述至少一个残差图像。
图 9是本发明又一实施例的基于双向预测的编码装置 900的示意性结构 图。 编码装置 900包括: 处理器 910和存储器 920。
处理器 910调用存储器 920中存储的代码, 以用于根据增强层当前图像 的至少一个增强层参考图像以及至少一个增强层参考图像对应的基本层图 像生成至少一个残差图像, 并将上述至少一个残差图像作为至少一个第一参 考图像加入到该增强层当前图像的第一参考图像列表中; 用于根据该增强层 当前图像对应的基本层图像生成第二参考图像, 并将第二参考图像加入到该 增强层当前图像的第二参考图像列表中;基于第一参考图像列表和第二参考 图像列表, 采用双向预测方法对该增强层当前图像的图像块进行编码, 其中 第一参考图像列表是增强层当前图像的前向参考图像列表和后向参考图像 列表中的一个, 第二参考图像列表是前向参考图像列表和后向参考图像列表 中的另一个。
本发明的实施例可以将根据增强层当前图像的参考图像以及对应的基 本层图像得到的残差图像加入到一个参考图像列表,将根据增强层当前图像 对应的基本层图像得到图像加入到另一参考图像列表, 并且根据这两个参考 图像列表, 利用双向预测方法对该增强层当前图像的图像块进行编码, 实现 了差分编码模式。 由于本发明的实施例借助于双向预测方法来实现差分模 式,无需为每个图像块设置是否使用差分模式的标记, 因此, 实现代价较低。
根据本发明的实施例, 处理器 910根据第一参考图像列表和第二参考图 像列表, 采用双向预测方法对该增强层当前图像的图像块进行运动估计, 以 确定该图像块的运动信息; 根据该图像块的运动信息, 对该增强层当前图像 的图像块进行运动补偿预测得到图像块的预测差值信号; 对该运动信息和预 测差值信号进行编码并将得到的编码信息添加在编码后形成的码流中发送 给解码端。 根据本发明的实施例, 处理器 910对第一参考图像列表和第二参考图像 列表进行双向搜索, 为该图像块确定第一参考图像列表中的最优参考图像和 第一运动矢量以及第二参考图像列表中的最优参考图像和第二运动矢量, 其 中运动信息包括第一参考图像列表中的最优参考图像的索引和第一运动矢 量以及第二参考图像列表中的最优参考图像的索引和第二运动矢量; 若该运 动信息指示该图像块在第一参考列表中的最优参考图像为上述至少一个残 差图像之一且该图像块在第二参考图像列表中的最优参考图像为第二参考 图像, 根据第一运动矢量从上述至少一个残差图像之一获取第一预测信号, 根据第二运动矢量从第二参考图像获取第二预测信号;基于加权预测参数对 第一预测信号和第二预测信号进行加权预测运算, 以便将第一预测信号与第 二预测信号进行叠加得到该图像块的预测信号; 根据该预测信号计算该图像 块的预测差值。
根据本发明的实施例, 该加权预测参数由编码端确定并且添加在编码后 形成的码流中, 或者, 该加权预测参数被预先设置在编码端。
根据本发明的实施例, 该加权预测参数包括: 第一预测信号的权重 w。, 第二预测信号的权重 Wi , 第一预测信号的偏移。。, 第二预测信号的偏移。 精度控制因子 shift,其中处理器 910基于该加权预测参数采用如下公式对第 一预测信号和第二预测信号进行加权预测运算得到该图像块的预测信号: predSamples = ((P0 +m) x w0 + Pl x wl + ((o0 + ot + 1) « (shift - 1))) » shift , 其 中 , prei^a /?/^为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, p。为第一预测信号, 该 为第二预测信号。 根据本发明的实施例, 第一预测信号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , o0 = Ol =— 2 x offset , 该 offset 为第一预测信号被转换成无符号 数时偏移量。
可选地, 作为另一实施例, 处理器 910在编码后形成的码流中添加用于 指示允许采用差分模式进行编码的第一标识信息, 以便解码端根据第一标识 信息确定允许基于第一参考图像列表中至少一个残差图像之一和第二参考 图像列表中的第二参考图像, 采用双向预测方法对该增强层当前图像的图像 块进行解码。
根据本发明的实施例, 处理器 910根据该增强层当前图像的前向增强层 参考图像和 /或后向增强层参考图像以及对应的基本层图像生成上述至少一 个残差图像, 其中前向增强层参考图像为前向参考图像列表中的一个, 后向 增强层参考图像为后向参考图像列表中的一个。
可选地, 作为另一实施例, 处理器 910将上述至少一个增强层参考图像 中的增强层参考图像和相对应的残差图像存储到同一图像緩存区中, 其中该 图像的图像顺序编号和相对应的残差图像的图像顺序编号一致, 为相对应的 残差图像添加第一附加标识以便编码端在管理残差图像和增强层参考图像 时根据第一附加标识将增强层参考图像与相对应的残差图像相区分; 或者, 用于将该上述至少一个增强层参考图像中的增强层参考图像和相对应的残 差图像存储到不同的图像緩存区中,其中该增强层参考图像的图像顺序编号 和上述相对应的残差图像的图像顺序编号一致。
可选地, 作为另一实施例, 处理器 910根据预设的准则确定该图像緩存 区中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差图像是否 作为后续编码的图像的参考图像; 在根据预设的准则确定该图像緩存区中与 一个图像顺序编号对应的增强层图像和 /或相应的残差图像不再作为后续编 码的图像的参考图像的情况下,从该图像緩存区中删除该增强层参考图像和 /或相应的残差图像。
可选地, 作为另一实施例, 处理器 910还用于生成解码图像管理信息, 其中解码图像管理信息用于指示图像緩存区中与一个图像顺序编号对应的 增强层参考图像和 /或相应的残差图像是否作为后续编码的图像的参考图像, 并且将解码图像管理信息添加到编码后形成的码流中。
根据本发明的实施例, 处理器 910对该增强层当前图像的至少一个增强 层参考图像对应的基本层图像进行上采样, 生成至少一个上采样图像, 并将 上述至少一个上采样图像分别与其对应的增强层参考图像相减,得到上述至 少一个残差图像; 对该增强层当前图像对应的基本层图像进行上采样, 以生 成第二参考图像。
根据本发明的实施例, 处理器 910将上述至少一个增强层参考图像与其 对应的基本层图像相减, 得到上述至少一个残差图像; 将该增强层当前图像 对应的基本层图像作为第二参考图像。
可选地, 作为另一实施例, 处理器 910根据第二标识信息确定用于生成 上述至少一个残差图像的增强层参考图像, 其中第二标识信息用于指示上述 至少一个残差图像的信息。
根据本发明的实施例, 第二标识信息包括: 上述至少一个残差图像的数 目、上述至少一个残差图像对应的增强层参考图像的标识信息或者上述至少 一个残差图像对应的增强层参考图像的图像顺序编号信息, 其中第二标识信 息被预先设置在编码端或者被添加在编码后形成的码流中。
根据本发明的实施例, 处理器 910根据该增强层当前图像与上述至少一 个增强层参考图像的时间相关性确定用于生成上述至少一个残差图像的增 强层参考图像。
根据本发明的实施例, 处理器 910根据上述至少一个增强层参考图像中 图像顺序编码号与该增强层当前图像的图像顺序编号之差的绝对值小于预 设的阈值的增强层参考图像确定上述至少一个残差图像。
图 10是本发明又一实施例的基于双向预测的解码装置 1000的示意性结 构图。 解码装置 1000包括: 处理器 1010和存储器 1020。
处理器 1010调用存储器 1020中存储的代码, 用于根据增强层当前图像 的至少一个增强层参考图像以及至少一个增强层参考图像对应的基本层图 像生成至少一个残差图像, 并将上述至少一个残差图像作为至少一个第一参 考图像加入到该增强层当前图像的第一参考图像列表中; 根据该增强层当前 图像对应的基本层图像生成第二参考图像, 并将第二参考图像加入到该增强 层当前图像的第二参考图像列表中;基于第一参考图像列表和第二参考图像 列表, 采用双向预测方法对该增强层当前图像的图像块进行解码, 其中第一 参考图像列表是增强层当前图像的前向参考图像列表和后向参考图像列表 中的一个, 第二参考图像列表是前向参考图像列表和后向参考图像列表中的 另一个。
本发明的实施例可以将根据增强层当前图像的参考图像以及对应的基 本层图像得到的残差图像加入到一个参考图像列表,将根据增强层当前图像 对应的基本层图像得到图像加入到另一参考图像列表, 并且根据这两个参考 图像列表, 利用双向预测方法对该增强层当前图像的图像块进行解码, 实现 了差分解码模式。 由于本发明的实施例借助于双向预测方法来实现差分模 式,无需为每个图像块设置是否使用差分模式的标记, 因此, 实现代价较低。
根据本发明的实施例, 处理器 1010从编码后形成的码流中获取该增强 层当前图像的图像块的编码信息, 并对该编码信息解码得到该图像块的运动 信息和图像块的预测差值信号; 基于第一参考图像列表和第二参考图像列 表, 根据该图像块的运动信息和该预测差值信号, 对该增强层当前图像的图 像块进行运动补偿解码。
根据本发明的实施例, 该运动信息包括: 该运动信息包括第一参考图像 列表中的选用参考图像的索引和第一运动矢量以及第二参考图像列表中的 选用参考图像的索引和第二运动矢量, 其中处理器 1010在该运动信息指示 该图像块在第一参考图像列表中的选用参考图像为上述至少一个残差图像 之一并且该图像块在第二参考图像列表中的选用参考图像为第二参考图像 的情况下,根据第一运动矢量从上述至少一个残差图像之一获取第一预测信 号, 根据第二运动矢量从第二参考图像获取第二预测信号; 基于加权预测参 数对第一预测信号和第二预测信号进行加权预测运算, 以将第一预测信号与 第二预测信号进行叠加得到该图像块的预测信号;根据该预测差值信号和该 图像块的预 'J信号得 'J该图像块的重建图像。
根据本发明的实施例, 该加权预测参数从码流中得到, 或者该加权预测 参数被预先设置在解码端。
根据本发明的实施例, 该加权预测参数包括: 第一预测信号的权重 M¾ , 第二预测信号的权重 Wi , 第一预测信号的偏移。。, 第二预测信号的偏移。 精度控制因子 shift, 其中处理器 1010基于该加权预测参数采用如下公式对 第一预测信号和第二预测信号进行加权预测运算得到该图像块的预测信号:
Figure imgf000049_0001
— 1))) » ; "f , 其 中 , pre^a p/i^为图像块的预测信号, 该《表示向左移位, 该》表示向右移位, p。为第一预测信号, 该 为第二预测信号。 根据本发明的实施例, 第一预测信号为经过偏移后转换成的无符号数, w0 = Wl = (1 « shift) , o0 = Ol =— 2 x offset , 该 Offset 为第一预测信号被转换成无符号 数时偏移量。 可选地, 作为另一实施例, 处理器 1010从码流中获取用于指示允许采 用差分模式进行解码的第一标识信息, 以使解码端根据第一标识信息确定允 许基于解码端根据第一参考图像列表和第二参考图像列表, 采用双向预测方 法对该增强层当前图像的图像块进行解码。 根据本发明的实施例, 处理器 1010根据该增强层当前图像的前向增强 层参考图像和 /或后向增强层参考图像以及对应的基本层图像生成上述至少 一个残差图像, 其中前向增强层参考图像为前向参考图像列表中的一个, 后 向增强层参考图像为后向参考图像列表中的一个。
可选地, 作为另一实施例, 处理器 1010将上述至少一个增强层参考图 像中的增强层参考图像和相对应的残差图像存储到同一图像緩存区中, 其中 该增强层参考图像的图像顺序编号和相对应的残差图像的图像顺序编号一 致, 为相对应的残差图像添加第一附加标识, 以便编码端在管理图像緩存区 中的残差图像和增强层参考图像时根据第一附加标识将增强层参考图像与 相对应的残差图像相区分; 或者, 将上述至少一个增强层参考图像中的增强 层参考图像和相对应的残差图像存储到不同的图像緩存区中, 其中该增强层 参考图像的图像顺序编号和上述相对应的残差图像的图像顺序编号一致。
可选地, 作为另一实施例, 处理器 1010根据预设的准则或从码流中获 取的解码图像管理信息确定该图像緩存区中与一个图像顺序编号对应的图 像和 /或相应的残差图像是否作为后续解码的图像的参考图像,并且将解码图 像管理信息添加到码流中, 其中该解码图像管理信息用于指示该图像緩存区 中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差图像是否作 为后续编码的图像的参考图像; 在根据预设的准则确定该图像緩存区中与上 述一个图像顺序编号对应的增强层图像和 /或相应的残差图像不再作为后续 解码的图像的参考图像的情况下,从该图像緩存区中删除该图像和 /或相应的 残差图像。
可选地, 作为另一实施例, 图 10的解码装置还包括: 接收器 1030, 用 于从码流中获取的解码图像管理信息, 其中解码图像管理信息用于指示图像 緩存区中与一个图像顺序编号对应的增强层参考图像和 /或相应的残差图像 是否作为后续编码的图像的参考图像, 其中处理器 1010在根据解码图像管 理信息确定图像緩存区中与一个图像顺序编号对应的增强层图像和 /或相应 的残差图像不再作为后续解码的图像的参考图像的情况下,从图像緩存区中 删除增强层参考图像和 /或相应的残差图像。
根据本发明的实施例, 处理器 1010对该增强层当前图像的至少一个增 强层参考图像对应的基本层图像进行上采样, 生成至少一个上采样图像, 并 将上述至少一个上采样图像分别与其对应的增强层参考图像相减,得到上述 至少一个残差图像, 并且对该增强层当前图像对应的基本层图像进行上采 样, 以生成第二参考图像。
根据本发明的实施例, 处理器 1010将上述至少一个增强层参考图像与 其对应的基本层图像相减, 得到上述至少一个残差图像, 并且将该增强层当 前图像对应的基本层图像作为第二参考图像。
可选地, 作为另一实施例, 处理器 1010根据第二标识信息确定用于生 成上述至少一个残差图像的增强层参考图像,其中第二标识信息用于指示上 述至少一个残差图像的信息。
根据本发明的实施例, 第二标识信息包括: 上述至少一个残差图像的数 目、上述至少一个残差图像对应的增强层参考图像的标识信息或者上述至少 一个残差图像对应的增强层参考图像的图像顺序编号的差值信息。
可选地, 作为另一实施例, 处理器 1010根据该增强层当前图像与上述 至少一个增强层参考图像的时间相关性确定用于生成上述至少一个残差图 像的增强层参考图像。
根据本发明的实施例, 处理器 1010根据上述至少一个增强层参考图像 中图像顺序编码号与该增强层当前图像的图像顺序编号之差的绝对值小于 预设的阈值的增强层参考图像确定上述至少一个残差图像。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为描述的方便和筒洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一 个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明 的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部 分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前 述的存储介质包括: U盘、移动硬盘、只读存储器( ROM, Read-Only Memory )、 随机存取存储器(RAM, Random Access Memory ), 磁碟或者光盘等各种可 以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应以权利要求的保护范围为准。

Claims

权利要求
1、 一种基于双向预测的编码方法, 其特征在于, 包括:
根据增强层当前图像的至少一个增强层参考图像以及所述至少一个增 强层参考图像对应的基本层图像生成至少一个残差图像, 并将所述至少一个 残差图像作为至少一个第一参考图像加入到所述增强层当前图像的第一参 考图像列表中;
根据所述增强层当前图像对应的基本层图像生成第二参考图像, 并将所 述第二参考图像加入到所述增强层当前图像的第二参考图像列表中;
基于所述第一参考图像列表和所述第二参考图像列表, 采用双向预测方 法对所述增强层当前图像的图像块进行编码,其中所述第一参考图像列表是 所述增强层当前图像的前向参考图像列表和后向参考图像列表中的一个, 所 述第二参考图像列表是所述前向参考图像列表和所述后向参考图像列表中 的另一个。
2、 根据权利要求 1所述的编码方法, 其特征在于, 所述基于所述第一 参考图像列表和所述第二参考图像列表, 采用双向预测方法对所述增强层当 前图像的图像块进行编码, 具体包括:
基于所述第一参考图像列表和所述第二参考图像列表, 采用双向预测方 法对所述增强层当前图像的图像块进行运动估计, 以确定所述图像块的运动 信息;
根据所述图像块的运动信息,对所述增强层当前图像的图像块进行运动 补偿预测得到所述图像块的预测差值信号;
对所述运动信息和预测差值信号进行编码并将得到的编码信息添加在 编码后形成的码流中发送给解码端。
3、 根据权利要求 2所述的编码方法, 其特征在于, 所述基于所述第一 参考图像列表和所述第二参考图像列表, 采用双向预测方法对所述增强层当 前图像的图像块进行运动估计, 以确定所述图像块的运动信息, 具体包括: 对所述第一参考图像列表和所述第二参考图像列表进行双向搜索, 为所 述图像块确定所述第一参考图像列表中的最优参考图像和第一运动矢量以 及所述第二参考图像列表中的最优参考图像和第二运动矢量, 其中所述运动 信息包括所述第一参考图像列表中的最优参考图像的索引和第一运动矢量 以及所述第二参考图像列表中的最优参考图像的索引和第二运动矢量; 其中所述根据所述图像块的运动信息,对所述增强层当前图像的图像块 进行运动补偿预测得到所述图像块的预测差值信号, 具体包括:
若所述运动信息指示所述图像块在所述第一参考列表中的最优参考图 像为所述至少一个残差图像之一且所述图像块在所述第二参考图像列表中 的最优参考图像为所述第二参考图像,根据所述第一运动矢量从所述至少一 个残差图像之一获取第一预测信号,根据所述第二运动矢量从所述第二参考 图像获取第二预测信号;
基于加权预测参数对所述第一预测信号和所述第二预测信号进行加权 预测运算, 以便将所述第一预测信号与所述第二预测信号进行叠加得到所述 图像块的预测信号;
根据所述预测信号计算所述图像块的预测差值其中所述加权预测参数 由编码端确定并且添加在编码后形成的码流中, 或者, 所述加权预测参数被 预先设置在编码端。
4、 根据权利要求 3所述的编码方法, 其特征在于, 所述加权预测参数 包括: 所述第一预测信号的权重 w。, 所述第二预测信号的权重 Wl , 所述第一 预测信号的偏移。。, 所述第二预测信号的偏移。 精度控制因子 shift,
其中所述基于加权预测参数对所述第一预测信号和所述第二预测信号 进行加权预测运算, 以将所述第一预测信号与所述第二预测信号进行叠加得 到所述图像块的预测信号, 具体包括:
基于所述加权预测参数采用如下公式对所述第一预测信号和所述第二 预测信号进行加权预测运算得到所述图像块的预测信号:
preitt ipto x Wo + x +
Figure imgf000054_0001
1)》》 : "f , 其 中 , 所 述 predSamples 为所述图像块的预测信号, 所述《表示向左移位, 所述》表示 向右移位, P。为所述第一预测信号, 所述 为所述第二预测信号。
5、 根据权利要求 4所述的编码方法, 其特征在于, 所述第一预测信号 为经过偏移后转换成的无符号数, w0 = wl = (1 « shift) , ο0 + ο{ = -2 χ offset ,所述 offset 为第一预测信号被转换成无符号数时偏移量。
6、 根据权利要求 1至 5中的任一项所述的编码方法, 所述方法还包括: 在编码后形成的码流中添加用于指示允许采用差分模式进行编码的第 一标识信息, 以便解码端根据所述第一标识信息确定允许基于所述第一参考 图像列表中的所述至少一个残差图像之一和所述第二参考图像列表中的所 述第二参考图像, 采用双向预测方法对所述增强层当前图像的图像块进行解 码。
7、 根据权利要求 1至 6中的任一项所述的编码方法, 所述根据增强层 当前图像的至少一个增强层参考图像以及对应的基本层图像生成至少一个 残差图像, 具体包括:
根据所述增强层当前图像的前向增强层参考图像和 /或后向增强层参考 图像以及对应的基本层图像生成所述至少一个残差图像, 其中所述前向增强 层参考图像为所述前向参考图像列表中的一个, 所述后向增强层参考图像为 所述后向参考图像列表中的一个。
8、 根据权利要求 1至 7中的任一项所述的编码方法, 其特征在于, 所 述方法还包括:
将所述至少一个增强层参考图像中的增强层参考图像和相对应的残差 图像存储到同一图像緩存区中, 其中所述增强层参考图像的图像顺序编号和 所述相对应的残差图像的图像顺序编号一致, 并且为所述相对应的残差图像 添加第一附加标识以便编码端在管理所述残差图像和所述增强层参考图像 时根据所述第一附加标识将所述增强层参考图像与所述相对应的残差图像 相区分;
或者,
将所述至少一个增强层参考图像中的增强层参考图像和相对应的残差 图像存储到不同的图像緩存区中, 其中所述增强层参考图像的图像顺序编号 和所述相对应的残差图像的图像顺序编号一致。
9、 根据权利要求 8所述的编码方法, 其特征在于, 所述方法还包括: 根据预设的准则确定所述图像緩存区中与一个图像顺序编号对应的增 强层参考图像和 /或相应的残差图像是否作为后续编码的图像的参考图像; 若根据所述预设的准则确定所述图像緩存区中与所述一个图像顺序编 号对应的增强层图像和 /或相应的残差图像不再作为后续编码的图像的参考 图像, 从所述图像緩存区中删除所述增强层参考图像和 /或相应的残差图像。
10、 根据权利要求 9所述的编码方法, 其特征在于, 所述方法还包括: 生成解码图像管理信息, 其中所述解码图像管理信息用于指示所述图像 緩存区中与所述一个图像顺序编号对应的增强层参考图像和 /或相应的残差 图像是否作为后续编码的图像的参考图像;
将所述解码图像管理信息添加到编码后形成的码流中。
11、 根据权利要求 1至 10中的任一项所述的编码方法, 其特征在于, 所述根据增强层当前图像的至少一个增强层参考图像以及对应的基本层图 像生成至少一个残差图像, 具体包括:
对所述增强层当前图像的至少一个增强层参考图像对应的基本层图像 进行上采样, 生成至少一个上采样图像, 并将所述至少一个上采样图像分别 与其对应的增强层参考图像相减, 得到所述至少一个残差图像,
其中所述根据所述增强层当前图像对应的基本层图像生成第二参考图 像, 具体包括:
对所述增强层当前图像对应的基本层图像进行上采样, 以生成所述第二 参考图像。
12、 根据权利要求 1至 10中的任一项所述的编码方法, 其特征在于, 所述根据增强层当前图像的至少一个增强层参考图像以及对应的基本层图 像生成至少一个残差图像, 具体包括:
将所述至少一个增强层参考图像与其对应的基本层图像相减,得到所述 至少一个残差图像,
其中所述根据所述增强层当前图像对应的基本层图像生成第二参考图 像, 具体包括:
将所述增强层当前图像对应的基本层图像作为所述第二参考图像。
13、 根据权利要求 1至 12中的任一项所述的编码方法, 其特征在于, 所述方法还包括:
根据第二标识信息确定用于生成所述至少一个残差图像的增强层参考 图像, 其中所述第二标识信息用于指示所述至少一个残差图像的信息。
14、 根据权利要求 13所述的编码方法, 其特征在于, 所述第二标识信 息包括: 所述至少一个残差图像的数目、 所述至少一个残差图像对应的增强 层参考图像的标识信息, 或者所述至少一个残差图像对应的增强层参考图像 的图像顺序编号信息,其中所述第二标识信息被预先设置在编码端或者被添 加在编码后形成的码流中。
15、 根据权利要求 1至 12中的任一项所述的编码方法, 其特征在于, 还包括:
根据所述增强层当前图像与所述至少一个增强层参考图像的时间相关 性确定用于生成所述至少一个残差图像的增强层参考图像。
16、 根据权利要求 15所述的编码方法, 其特征在于, 所述根据所述增 强层当前图像与所述至少一个增强层参考图像的时间相关性确定所述至少 一个残差图像, 具体包括:
根据所述至少一个增强层参考图像中图像顺序编码号与所述增强层当 前图像的图像顺序编号之差的绝对值小于预设的阈值的增强层参考图像确 定所述至少一个残差图像。
17、 一种基于双向预测的解码方法, 其特征在于, 包括:
根据增强层当前图像的至少一个增强层参考图像以及所述至少一个增 强层参考图像对应的基本层图像生成至少一个残差图像, 并将所述至少一个 残差图像作为至少一个第一参考图像加入到所述增强层当前图像的第一参 考图像列表中;
根据所述增强层当前图像对应的基本层图像生成第二参考图像, 并将所 述第二参考图像加入到所述增强层当前图像的第二参考图像列表中;
基于所述第一参考图像列表和所述第二参考图像列表, 采用双向预测方 法对所述增强层当前图像的图像块进行解码, 其中所述第一参考图像列表是 所述增强层当前图像的前向参考图像列表和后向参考图像列表中的一个, 所 述第二参考图像列表是所述前向参考图像列表和所述后向参考图像列表中 的另一个。
18、 根据权利要求 17所述的解码方法, 其特征在于, 所述基于所述第 一参考图像列表和所述第二参考图像列表, 采用双向预测方法对所述增强层 当前图像的图像块进行解码, 具体包括:
从编码后形成的码流中获取所述增强层当前图像的图像块的编码信息, 并对该编码信息解码得到所述图像块的运动信息和所述图像块的预测差值 信号;
基于所述第一参考图像列表和所述第二参考图像列表,根据所述图像块 的运动信息和所述预测差值信号,对所述增强层当前图像的图像块进行运动 补偿解码。
19、 根据权利要求 18所述的解码方法, 其特征在于, 所述运动信息包 括所述第一参考图像列表中的选用参考图像的索引和第一运动矢量以及所 述第二参考图像列表中的选用参考图像的索引和第二运动矢量,其中所述基 于所述第一参考图像列表和所述第二参考图像列表,根据所述图像块的运动 信息和所述预测差值信号,对所述增强层当前图像的图像块进行运动补偿解 码, 包括:
若所述运动信息指示所述图像块在所述第一参考图像列表中的选用参 考图像为所述至少一个残差图像之一并且所述图像块在所述第二参考图像 列表中的选用参考图像为所述第二参考图像,根据所述第一运动矢量从所述 至少一个残差图像之一获取第一预测信号,根据所述第二运动矢量从所述第 二参考图像获取第二预测信号;
基于加权预测参数对所述第一预测信号和所述第二预测信号进行加权 预测运算, 以将所述第一预测信号与所述第二预测信号进行叠加得到所述图 像块的预测信号;
根据所述预测差值信号和所述图像块的预测信号得到所述图像块的重 建信号, 其中所述加权预测参数从所述码流中得到, 或者所述加权预测参数 被预先设置在解码端。
20、 根据权利要求 19所述的解码方法, 其特征在于, 所述加权预测参 数包括: 所述第一预测信号的权重 M¾ , 所述第二预测信号的权重 Wl , 所述第 一预测信号的偏移。。, 所述第二预测信号的偏移 Cl , 精度控制因子 shift, 其中所述基于加权预测参数对所述第一预测信号和所述第二预测信号 进行加权预测运算, 以将所述第一预测信号与所述第二预测信号进行叠加得 到所述图像块的预测信号, 包括:
基于所述加权预测参数采用如下公式对所述第一预测信号和所述第二 预测信号进行加权预测运算得到所述图像块的预测信号:
preitt ipto x Wo + x w +
Figure imgf000058_0001
1))) » : "f , 其 中 , 所 述 predSamples 为所述图像块的预测信号, 所述《表示向左移位, 所述》表示 向右移位, P。为所述第一预测信号, 所述 为所述第二预测信号。
21、 根据权利要求 20所述的解码方法, 其特征在于, 所述第一预测信 号为经过偏移后转换成的无符号数, w0 = wl = (1 « shift) , + ^ = -2 χ offset , 所述 offset为第一预测信号被转换成无符号数时偏移量。
22、 根据权利要求 17至 21中的任一项所述的解码方法, 所述方法还包 括:
从所述码流中获取用于指示允许采用差分模式进行解码的第一标识信 息, 以使解码端根据所述第一标识信息确定允许基于所述第一参考图像列表 中的所述至少一个残差图像之一和所述第二参考图像列表中的所述第二参 考图像, 采用双向预测方法对所述增强层当前图像的图像块进行解码。
23、 根据权利要求 17至 22中的任一项所述的解码方法, 所述根据增强 层当前图像的至少一个增强层参考图像以及对应的基本层图像生成至少一 个残差图像, 包括:
根据所述增强层当前图像的前向增强层参考图像和 /或后向增强层参考 图像以及对应的基本层图像生成所述至少一个残差图像,其中所述前向增强 层参考图像为所述前向参考图像列表中的一个, 所述后向增强层参考图像为 所述后向参考图像列表中的一个。
24、 根据权利要求 17至 23中的任一项所述的解码方法, 其特征在于, 所述方法还包括:
将所述至少一个增强层参考图像中的增强层参考图像和相对应的残差 图像存储到同一图像緩存区中, 其中所述增强层参考图像的图像顺序编号和 所述相对应的残差图像的图像顺序编号一致, 并且为所述相对应的残差图像 添加第一附加标识, 以便编码端在管理所述图像緩存区中的所述残差图像和 所述增强层参考图像时根据所述第一附加标识将所述增强层参考图像与所 述相对应的残差图像相区分;
或者,
将所述至少一个增强层参考图像中的增强层参考图像和相对应的残差 图像存储到不同的图像緩存区中, 其中所述增强层参考图像的图像顺序编号 和所述相对应的残差图像的图像顺序编号一致。
25、 根据权利要求 24所述的解码方法, 其特征在于, 所述方法还包括: 根据预设的准则确定所述图像緩存区中与一个图像顺序编号对应的增 强层参考图像和 /或相应的残差图像是否作为后续解码的图像的参考图像; 若根据所述预设的准则确定所述图像緩存区中与所述一个图像顺序编 号对应的增强层图像和 /或相应的残差图像不再作为后续解码的图像的参考 图像, 从所述图像緩存区中删除所述增强层参考图像和 /或相应的残差图像。
26、 根据权利要求 24所述的解码方法, 其特征在于, 所述方法还包括: 从所述码流中获取的解码图像管理信息, 其中所述解码图像管理信息用 于指示所述图像緩存区中与所述一个图像顺序编号对应的增强层参考图像 和 /或相应的残差图像是否作为后续编码的图像的参考图像;
若根据所述解码图像管理信息确定所述图像緩存区中与所述一个图像 顺序编号对应的增强层图像和 /或相应的残差图像不再作为后续解码的图像 的参考图像,从所述图像緩存区中删除所述增强层参考图像和 /或相应的残差 图像。
27、 根据权利要求 17至 26中的任一项所述的解码方法, 其特征在于, 所述根据增强层当前图像的至少一个增强层参考图像以及对应的基本层图 像生成至少一个残差图像, 包括:
对所述增强层当前图像的至少一个增强层参考图像对应的基本层图像 进行上采样, 生成至少一个上采样图像, 并将所述至少一个上采样图像分别 与其对应的增强层参考图像相减, 得到所述至少一个残差图像,
其中所述根据所述增强层当前图像对应的基本层图像生成第二参考图 像, 包括:
对所述增强层当前图像对应的基本层图像进行上采样, 以生成所述第二 参考图像。
28、 根据权利要求 17至 26中的任一项所述的解码方法, 其特征在于, 所述根据增强层当前图像的至少一个增强层参考图像以及对应的基本层图 像生成至少一个残差图像, 包括:
将所述至少一个增强层参考图像与其对应的基本层图像相减,得到所述 至少一个残差图像,
其中所述根据所述增强层当前图像对应的基本层图像生成第二参考图 像, 包括:
将所述增强层当前图像对应的基本层图像作为所述第二参考图像。
29、 根据权利要求 17至 28中的任一项所述的解码方法, 其特征在于, 所述方法还包括:
根据第二标识信息确定用于生成所述至少一个残差图像的增强层参考 图像, 其中所述第二标识信息用于指示所述至少一个残差图像的信息。
30、 根据权利要求 29所述的解码方法, 其特征在于, 所述第二标识信 息包括: 所述至少一个残差图像的数目、 所述至少一个残差图像对应的增强 层参考图像的标识信息, 或者所述至少一个残差图像对应的增强层参考图像 的图像顺序编号信息,其中所述第二标识信息被预先设置在解码端或者从所 述码流中获取。
31、 根据权利要求 17至 28中的任一项所述的解码方法, 其特征在于, 所述方法还包括:
根据所述增强层当前图像与所述至少一个增强层参考图像的时间相关 性确定用于生成所述至少一个残差图像的增强层参考图像。
32、 根据权利要求 31所述的解码方法, 其特征在于, 所述根据所述增 强层当前图像与所述至少一个增强层参考图像的时间相关性确定所述至少 一个残差图像, 包括:
根据所述至少一个增强层参考图像中图像顺序编码号与所述增强层当 前图像的图像顺序编号之差的绝对值小于预设的阈值的增强层参考图像确 定所述至少一个残差图像。
33、 一种基于双向预测的编码装置, 其特征在于, 包括:
生成模块, 用于根据增强层当前图像的至少一个增强层参考图像以及所 述至少一个增强层参考图像对应的基本层图像生成至少一个残差图像, 并将 所述至少一个残差图像作为至少一个第一参考图像加入到所述增强层当前 图像的第一参考图像列表中; 用于根据所述增强层当前图像对应的基本层图 像生成第二参考图像, 并将所述第二参考图像加入到所述增强层当前图像的 第二参考图像列表中;
编码模块, 用于基于所述第一参考图像列表和所述第二参考图像列表, 采用双向预测方法对所述增强层当前图像的图像块进行编码, 其中所述第一 参考图像列表是所述增强层当前图像的前向参考图像列表和后向参考图像 列表中的一个,所述第二参考图像列表是所述前向参考图像列表和所述后向 参考图像列表中的另一个。
34、 根据权利要求 33所述的编码装置, 其特征在于, 所述编码模块基 于所述第一参考图像列表中和所述第二参考图像列表, 采用双向预测方法对 所述增强层当前图像的图像块进行运动估计, 以确定所述图像块的运动信 息; 根据所述图像块的运动信息, 对所述增强层当前图像的图像块进行运动 补偿预测得到所述图像块的预测差值信号; 对所述运动信息和预测差值信号 进行编码并将得到的编码信息添加在编码后形成的码流中发送给解码端。
35、 根据权利要求 34所述的编码装置, 其特征在于, 所述编码模块对 所述第一参考图像列表和所述第二参考图像列表进行双向搜索, 为所述图像 块确定所述第一参考图像列表中的最优参考图像和第一运动矢量以及所述 第二参考图像列表中的最优参考图像和第二运动矢量, 其中所述运动信息包 括所述第一参考图像列表中的最优参考图像的索引和第一运动矢量以及所 述第二参考图像列表中的最优参考图像的索引和第二运动矢量; 若所述运动 信息指示所述图像块在所述第一参考列表中的最优参考图像为所述至少一 个残差图像之一且所述图像块在所述第二参考图像列表中的最优参考图像 为所述第二参考图像,根据所述第一运动矢量从所述至少一个残差图像之一 获取第一预测信号,根据所述第二运动矢量从所述第二参考图像获取第二预 测信号;基于加权预测参数对所述第一预测信号和所述第二预测信号进行加 权预测运算, 以便将所述第一预测信号与所述第二预测信号进行叠加得到所 述图像块的预测信号; 根据所述预测信号计算所述图像块的预测差值, 其中 所述加权预测参数由编码端确定并且添加在编码后形成的码流中, 或者, 所 述加权预测参数被预先设置在编码端。
36、 根据权利要求 35所述的编码装置, 其特征在于, 所述加权预测参 数包括: 所述第一预测信号的权重 M¾ , 所述第二预测信号的权重 Wl , 所述第 一预测信号的偏移。。, 所述第二预测信号的偏移。 精度控制因子 shift, 其 中编码模块基于所述加权预测参数采用如下公式对所述第一预测信号和所 述第二预测信号进行加权预测运算得到所述图像块的预测信号:
preitt ipto x Wo + x +
Figure imgf000062_0001
1)》》 : "f , 其 中 , 所 述 predSamples 为所述图像块的预测信号, 所述《表示向左移位, 所述》表示 向右移位, p。为所述第一预测信号, 所述 为所述第二预测信号。
37、 根据权利要求 36所述的编码装置, 其特征在于, 所述第一预测信 号为经过偏移后转换成的无符号数, w0 = wl = (1 « shift) , ο0 = o{ = -2 x offset , 所述 offset为第一预测信号被转换成无符号数时偏移量。
38、 根据权利要求 33至 37中的任一项所述的编码装置, 还包括: 第一添加模块, 用于在编码后形成的码流中添加用于指示允许采用差分 模式进行编码的第一标识信息, 以便解码端根据所述第一标识信息确定允许 基于所述第一参考图像列表中至少一个残差图像之一和所述第二参考图像 列表中的第二参考图像, 采用双向预测方法对所述增强层当前图像的图像块 进行解码。
39、 根据权利要求 33至 38中的任一项所述的编码装置, 所述生成模块 根据所述增强层当前图像的前向增强层参考图像和 /或后向增强层参考图像 以及对应的基本层图像生成所述至少一个残差图像, 其中所述前向增强层参 考图像为所述前向参考图像列表中的一个, 所述后向增强层参考图像为所述 后向参考图像列表中的一个。
40、 根据权利要求 33至 39中的任一项所述的编码装置, 其特征在于, 还包括:
存储模块, 用于将所述至少一个增强层参考图像中的增强层参考图像和 相对应的残差图像存储到同一图像緩存区中,其中所述增强层参考图像的图 像顺序编号和所述相对应的残差图像的图像顺序编号一致, 并且为所述相对 应的残差图像添加第一附加标识以便编码端在管理所述残差图像和所述增 强层参考图像时根据所述第一附加标识将所述增强层参考图像与所述相对 应的残差图像相区分; 或者, 用于将所述至少一个增强层参考图像中的增强 层参考图像和相对应的残差图像存储到不同的图像緩存区中, 其中所述增强 层参考图像的图像顺序编号和所述相对应的残差图像的图像顺序编号一致。
41、 根据权利要求 40所述的编码装置, 其特征在于, 还包括: 第一确定模块, 用于根据预设的准则确定所述图像緩存区中与一个图像 顺序编号对应的增强层参考图像和 /或相应的残差图像是否作为后续编码的 图像的参考图像;
删除模块, 用于在根据所述预设的准则确定所述图像緩存区中与所述一 个图像顺序编号对应的增强层图像和 /或相应的残差图像不再作为后续编码 的图像的参考图像的情况下,从所述图像緩存区中删除所述增强层参考图像 和 /或相应的残差图像。
42、 根据权利要求 41所述的编码装置, 其特征在于, 所述生成模块还 用于生成解码图像管理信息, 其中所述解码图像管理信息用于指示所述图像 緩存区中与所述一个图像顺序编号对应的增强层参考图像和 /或相应的残差 图像是否作为后续编码的图像的参考图像, 所述编码装置还包括: 第二添加 模块, 用于将所述解码图像管理信息添加到编码后形成的码流中。
43、 根据权利要求 33至 42中的任一项所述的编码装置, 其特征在于, 所述生成模块对所述增强层当前图像的至少一个增强层参考图像对应的基 本层图像进行上采样, 生成至少一个上采样图像, 并将所述至少一个上采样 图像分别与其对应的增强层参考图像相减, 得到所述至少一个残差图像; 对 所述增强层当前图像对应的基本层图像进行上采样, 以生成所述第二参考图 像。
44、 根据权利要求 33至 42中的任一项所述的编码装置, 其特征在于, 所述生成模块将所述至少一个增强层参考图像与其对应的基本层图像相减 , 得到所述至少一个残差图像; 将所述增强层当前图像对应的基本层图像作为 所述第二参考图像。
45、 根据权利要求 33至 44中的任一项所述的编码装置, 其特征在于, 还包括:
第二确定模块, 用于根据第二标识信息确定用于生成所述至少一个残差 图像的增强层参考图像,其中所述第二标识信息用于指示所述至少一个残差 图像的信息。
46、 根据权利要求 45所述的编码装置, 其特征在于, 所述第二标识信 息包括: 所述至少一个残差图像的数目、 所述至少一个残差图像对应的增强 层参考图像的标识信息,或者所述至少一个残差图像对应的增强层参考图像 的图像顺序编号信息,其中所述第二标识信息被预先设置在编码端或者被添 加在编码后形成的码流中。
47、 根据权利要求 33至 44中的任一项所述的编码装置, 其特征在于, 还包括:
第二确定模块, 用于根据所述增强层当前图像与所述至少一个增强层参 考图像的时间相关性确定用于生成所述至少一个残差图像的增强层参考图 像。
48、 根据权利要求 47所述的编码装置, 其特征在于, 所述第二确定模 块根据所述至少一个增强层参考图像中图像顺序编码号与所述增强层当前 图像的图像顺序编号之差的绝对值小于预设的阈值的增强层参考图像确定 所述至少一个残差图像。
49、 一种基于双向预测的解码装置, 其特征在于, 包括: 生成模块, 用于根据增强层当前图像的至少一个增强层参考图像以及所 述至少一个增强层参考图像对应的基本层图像生成至少一个残差图像, 并将 所述至少一个残差图像作为至少一个第一参考图像加入到所述增强层当前 图像的第一参考图像列表中; 根据所述增强层当前图像对应的基本层图像生 成第二参考图像, 并将所述第二参考图像加入到所述增强层当前图像的第二 参考图像列表中;
解码模块, 用于基于所述第一参考图像列表和所述第二参考图像列表, 采用双向预测方法对所述增强层当前图像的图像块进行解码, 其中所述第一 参考图像列表是所述增强层当前图像的前向参考图像列表和后向参考图像 列表中的一个,所述第二参考图像列表是所述前向参考图像列表和所述后向 参考图像列表中的另一个。
50、 根据权利要求 49所述的解码装置, 其特征在于, 所述解码模块从 编码后形成的码流中获取所述增强层当前图像的图像块的编码信息, 并对该 编码信息解码得到所述图像块的运动信息和所述图像块的预测差值信号;基 于所述第一参考图像列表和所述第二参考图像列表,根据所述图像块的运动 信息和所述预测差值信号,对所述增强层当前图像的图像块进行运动补偿解 码。
51、 根据权利要求 50所述的解码装置, 其特征在于, 所述运动信息包 括所述第一参考图像列表中的选用参考图像的索引和第一运动矢量以及所 述第二参考图像列表中的选用参考图像的索引和第二运动矢量,所述解码模 块在所述运动信息指示所述图像块在所述第一参考图像列表中的选用参考 图像为所述至少一个残差图像之一并且所述图像块在所述第二参考图像列 表中的选用参考图像为所述第二参考图像的情况下,根据所述第一运动矢量 从所述至少一个残差图像之一获取第一预测信号,根据所述第二运动矢量从 所述第二参考图像获取第二预测信号;基于加权预测参数对所述第一预测信 号和所述第二预测信号进行加权预测运算, 以将所述第一预测信号与所述第 二预测信号进行叠加得到所述图像块的预测信号; 根据所述预测差值信号和 所述图像块的预测信号得到所述图像块的重建信号, 其中所述加权预测参数 从所述码流中得到, 或者所述加权预测参数被预先设置在解码端。
52、 根据权利要求 51所述的解码装置, 其特征在于, 所述加权预测参 数包括: 所述第一预测信号的权重 Μ¾ , 所述第二预测信号的权重 Wl , 所述第 一预测信号的偏移。。, 所述第二预测信号的偏移。 精度控制因子 Shift , 其 中所述解码模块基于所述加权预测参数采用如下公式对所述第一预测信号 和所述第二预测信号进行加权预测运算得到所述图像块的预测信号:
preitt ipto x Wo + x +
Figure imgf000066_0001
1)》》 : "f , 其 中 , 所 述 predSamples 为所述图像块的预测信号, 所述 <<表示向左移位, 所述》表示 向右移位, P。为所述第一预测信号, 所述 为所述第二预测信号。
53、 根据权利要求 52所述的解码装置, 其特征在于, 所述第一预测信 号为经过偏移后转换成的无符号数, w0 = wl = (1 « shift) , ο0 = o{ = -2 x offset , 所述 offset为第一预测信号被转换成无符号数时偏移量。
54、 根据权利要求 49至 53中的任一项所述的解码装置, 还包括: 第一获取模块, 用于从所述码流中获取用于指示允许采用差分模式进行 解码的第一标识信息, 以使解码端根据所述第一标识信息确定允许基于所述 第一参考图像列表和所述第二参考图像列表,采用双向预测方法对所述增强 层当前图像的图像块进行解码。
55、 根据权利要求 49至 54中的任一项所述的解码装置, 所述生成模块 根据所述增强层当前图像的前向增强层参考图像和 /或后向增强层参考图像 以及对应的基本层图像生成所述至少一个残差图像, 其中所述前向增强层参 考图像为所述前向参考图像列表中的一个, 所述后向增强层参考图像为所述 后向参考图像列表中的一个。
56、 根据权利要求 49至 55中的任一项所述的解码装置, 其特征在于, 还包括:
存储模块, 用于将所述至少一个增强层参考图像中的增强层参考图像和 相对应的残差图像存储到同一图像緩存区中,其中所述增强层参考图像的图 像顺序编号和所述相对应的残差图像的图像顺序编号一致, 并且为所述相对 应的残差图像添加第一附加标识, 以便编码端在管理所述图像緩存区中的所 述残差图像和所述增强层参考图像时根据所述第一附加标识将所述增强层 参考图像与所述相对应的残差图像相区分; 或者, 将所述至少一个增强层参 考图像中的增强层参考图像和相对应的残差图像存储到不同的图像緩存区 中, 其中所述增强层参考图像的图像顺序编号和所述相对应的残差图像的图 像顺序编号一致。
57、 根据权利要求 56所述的解码装置, 其特征在于, 还包括: 第一确定模块, 用于根据预设的准则确定所述图像緩存区中与一个图像 顺序编号对应的增强层参考图像和 /或相应的残差图像是否作为后续解码的 图像的参考图像;
删除模块, 用于在根据所述预设的准则确定所述图像緩存区中与所述一 个图像顺序编号对应的增强层图像和 /或相应的残差图像不再作为后续解码 的图像的参考图像的情况下,从所述图像緩存区中删除所述增强层参考图像 和 /或相应的残差图像。
58、 根据权利要求 56所述的解码装置, 其特征在于, 还包括: 第二获取模块, 用于从所述码流中获取的解码图像管理信息, 其中所述 解码图像管理信息用于指示所述图像緩存区中与所述一个图像顺序编号对 应的增强层参考图像和 /或相应的残差图像是否作为后续编码的图像的参考 图像;
删除模块, 用于在根据所述解码图像管理信息确定所述图像緩存区中与 所述一个图像顺序编号对应的增强层图像和 /或相应的残差图像不再作为后 续解码的图像的参考图像的情况下,从所述图像緩存区中删除所述增强层参 考图像和 /或相应的残差图像。
59、 根据权利要求 49至 58中的任一项所述的解码装置, 所述生成模块 对所述增强层当前图像的至少一个增强层参考图像对应的基本层图像进行 上采样, 生成至少一个上采样图像, 并将所述至少一个上采样图像分别与其 对应的增强层参考图像相减, 得到所述至少一个残差图像, 并且对所述增强 层当前图像对应的基本层图像进行上采样 , 以生成所述第二参考图像。
60、 根据权利要求 49至 58中的任一项所述的解码装置, 其特征在于, 所述生成模块将所述至少一个增强层参考图像与其对应的基本层图像相减, 得到所述至少一个残差图像, 并且将所述增强层当前图像对应的基本层图像 作为所述第二参考图像。
61、 根据权利要求 49至 60中的任一项所述的解码装置, 其特征在于, 还包括:
第二确定模块, 用于根据第二标识信息确定用于生成所述至少一个残差 图像的增强层参考图像,其中所述第二标识信息用于指示所述至少一个残差 图像的信息。
62、 根据权利要求 61所述的解码装置, 其特征在于, 所述第二标识信 息包括: 所述至少一个残差图像的数目、 所述至少一个残差图像对应的增强 层参考图像的标识信息, 或者所述至少一个残差图像对应的增强层参考图像 的图像顺序编号信息, 所述第二标识信息被预先设置在解码端, 或者从所述 码流中获取。
63、 根据权利要求 49至 60中的任一项所述的解码装置, 其特征在于, 还包括:
第二确定模块, 用于根据所述增强层当前图像与所述至少一个增强层参 考图像的时间相关性确定用于生成所述至少一个残差图像的增强层参考图 像。
64、 根据权利要求 63所述的解码装置, 其特征在于, 所述第二确定模 块根据所述至少一个增强层参考图像中图像顺序编码号与所述增强层当前 图像的图像顺序编号之差的绝对值小于预设的阈值的增强层参考图像确定 所述至少一个残差图像。
PCT/CN2014/070172 2013-01-06 2014-01-06 基于双向预测的编码方法、解码方法和装置 Ceased WO2014106487A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310003666.8 2013-01-06
CN201310003666.8A CN103916673B (zh) 2013-01-06 2013-01-06 基于双向预测的编码方法、解码方法和装置

Publications (1)

Publication Number Publication Date
WO2014106487A1 true WO2014106487A1 (zh) 2014-07-10

Family

ID=51042017

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/070172 Ceased WO2014106487A1 (zh) 2013-01-06 2014-01-06 基于双向预测的编码方法、解码方法和装置

Country Status (2)

Country Link
CN (1) CN103916673B (zh)
WO (1) WO2014106487A1 (zh)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105981382B (zh) 2014-09-30 2019-05-28 微软技术许可有限责任公司 用于视频编码的基于散列的编码器判定
CN104581172A (zh) * 2014-12-08 2015-04-29 北京中星微电子有限公司 一种实现svc宏块级算法的硬件结构
CN106303544B (zh) * 2015-05-26 2019-06-11 华为技术有限公司 一种视频编解码方法、编码器和解码器
EP3457694A4 (en) * 2016-05-24 2019-05-22 Huawei Technologies Co., Ltd. IMAGE FORECASTING METHOD AND ASSOCIATED DEVICE
CN107318024A (zh) * 2017-06-27 2017-11-03 北京奇艺世纪科技有限公司 基于运动场的视频编码方法及装置
CN109963155B (zh) * 2017-12-23 2023-06-06 华为技术有限公司 图像块的运动信息的预测方法、装置及编解码器
WO2020094057A1 (en) 2018-11-06 2020-05-14 Beijing Bytedance Network Technology Co., Ltd. Position based intra prediction
CN113039780B (zh) 2018-11-17 2023-07-28 北京字节跳动网络技术有限公司 视频处理中用运动矢量差的Merge
CN113170122B (zh) 2018-12-01 2023-06-27 北京字节跳动网络技术有限公司 帧内预测的参数推导
PH12021551289A1 (en) 2018-12-07 2022-03-21 Beijing Bytedance Network Tech Co Ltd Context-based intra prediction
CN113196773B (zh) 2018-12-21 2024-03-08 北京字节跳动网络技术有限公司 具有运动矢量差的Merge模式中的运动矢量精度
CN113491121B (zh) 2019-02-24 2022-12-06 北京字节跳动网络技术有限公司 对视频数据进行编解码的方法、设备及计算机可读介质
CN113767631B (zh) 2019-03-24 2023-12-15 北京字节跳动网络技术有限公司 用于帧内预测的参数推导中的条件
CN112135141A (zh) 2019-06-24 2020-12-25 华为技术有限公司 视频编码器、视频解码器及相应方法
CN115811616A (zh) 2021-09-15 2023-03-17 华为技术有限公司 一种视频编码、解码方法及装置
CN114205615B (zh) * 2021-12-03 2024-02-06 北京达佳互联信息技术有限公司 解码图像缓存区的管理方法和装置
CN121120866B (zh) * 2025-11-14 2026-02-13 中国联合网络通信集团有限公司 一种基于增量差分的图层自动分离方法、装置及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222630A (zh) * 2007-11-30 2008-07-16 武汉大学 一种实现实时双帧参考的时域可分级视频编码方法
CN101742324A (zh) * 2008-11-14 2010-06-16 北京中星微电子有限公司 视频编解码方法、视频编解码系统及编解码器
CN102595135A (zh) * 2012-02-24 2012-07-18 中国科学技术大学 一种可伸缩视频编码的方法及装置

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100693669B1 (ko) * 2003-03-03 2007-03-09 엘지전자 주식회사 피일드 매크로 블록의 레퍼런스 픽쳐 결정 방법
EP1661405B1 (en) * 2003-08-29 2009-07-01 Koninklijke Philips Electronics N.V. System and method for encoding and decoding enhancement layer data using descriptive model parameters
JP2007514359A (ja) * 2003-12-08 2007-05-31 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ デッドゾーンによる空間スケーラブル圧縮スキーム
WO2006044370A1 (en) * 2004-10-13 2006-04-27 Thomson Licensing Method and apparatus for complexity scalable video encoding and decoding
EP1806930A1 (en) * 2006-01-10 2007-07-11 Thomson Licensing Method and apparatus for constructing reference picture lists for scalable video
KR101406156B1 (ko) * 2006-02-02 2014-06-13 톰슨 라이센싱 움직임 보상 예측을 위한 적응 가중 선택 방법 및 장치
US9215475B2 (en) * 2006-02-02 2015-12-15 Thomson Licensing Method and apparatus for motion estimation using combined reference bi-prediction
RU2409006C1 (ru) * 2006-10-20 2011-01-10 Нокиа Корпорейшн Маркировка виртуальных декодированных опорных изображений и список опорных изображений
CN101119493B (zh) * 2007-08-30 2010-12-01 威盛电子股份有限公司 区块式数字编码图像的译码方法及装置
CN101822056B (zh) * 2007-10-12 2013-01-02 汤姆逊许可公司 用于视频编解码几何划分的双向预测模式划分的方法和装置
EP2525576A4 (en) * 2010-01-12 2015-04-15 Sharp Kk ENCODER APPARATUS, DECODER APPARATUS, AND DATA STRUCTURE
JP2012169763A (ja) * 2011-02-10 2012-09-06 Sony Corp 画像符号化装置と画像符号化方法およびプログラム
CN108391135B (zh) * 2011-06-15 2022-07-19 韩国电子通信研究院 可伸缩解码方法/设备、可伸缩编码方法/设备和介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222630A (zh) * 2007-11-30 2008-07-16 武汉大学 一种实现实时双帧参考的时域可分级视频编码方法
CN101742324A (zh) * 2008-11-14 2010-06-16 北京中星微电子有限公司 视频编解码方法、视频编解码系统及编解码器
CN102595135A (zh) * 2012-02-24 2012-07-18 中国科学技术大学 一种可伸缩视频编码的方法及装置

Also Published As

Publication number Publication date
CN103916673A (zh) 2014-07-09
CN103916673B (zh) 2017-12-22

Similar Documents

Publication Publication Date Title
WO2014106487A1 (zh) 基于双向预测的编码方法、解码方法和装置
CN103891290B (zh) 运动矢量处理
JP6290399B2 (ja) ビデオコーディングのためのクロスレイヤ並列処理およびオフセット遅延パラメータ
CN101690220B (zh) 用于解码/编码视频信号的方法和装置
JP6359549B2 (ja) 3次元ビデオコーディングにおける適応ルミナンス補償
KR101524146B1 (ko) 다운샘플링된 기준 화상을 이용한 인터-뷰 예측
CN116347101B (zh) 用于视频译码中的参考图像重采样的多个图像大小和符合性窗口的处理
TW201136325A (en) Selectively motion vector prediction method, motion estimation method and device thereof applied to scalable video coding system
TW201639370A (zh) 視訊寫碼中運動資訊推導模式判定
JP2021517392A (ja) ビデオ符号化のための方法及び装置
CN111480338A (zh) 视频数据的帧间预测方法和装置
WO2014162751A1 (en) Marking pictures for inter-layer prediction
JP2023065393A (ja) 動きベクトル予測方法および装置、エンコーダ、ならびにデコーダ
CN113826399A (zh) 视频译码中用于参考图像重采样的解码器侧运动矢量修正(dmvr)译码工具的处理
JP7675107B2 (ja) 時間動きベクトル予測、インターレイヤ参照、及び時間サブレイヤ指示のビデオコーディングの態様
WO2008083599A1 (fr) Procédé et appareil de codage et de décodage vidéo multivues
WO2014048372A1 (zh) 用于图像处理的方法、装置、编码器和解码器
GB2499831A (en) Determining missing coding units while decoding a video bitstream
CN118369917A (zh) 用于视频处理的方法、装置和介质
JP7751092B2 (ja) ビデオ処理ための方法、装置、および媒体
GB2585022A (en) Video coding and decoding
KR20240068711A (ko) 동영상을 처리하는 방법, 장치 및 매체
JP7806226B2 (ja) ビデオ処理のための方法、装置及び媒体
CN112073734B (zh) 一种编解码方法、装置及其设备
GB2506853A (en) Image Encoding / Decoding Including Determination of Second Order Residual as Difference Between an Enhancement and Reference Layer Residuals

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: 14735306

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: 14735306

Country of ref document: EP

Kind code of ref document: A1