WO2023072068A1 - 图像编解码方法和装置 - Google Patents
图像编解码方法和装置 Download PDFInfo
- Publication number
- WO2023072068A1 WO2023072068A1 PCT/CN2022/127363 CN2022127363W WO2023072068A1 WO 2023072068 A1 WO2023072068 A1 WO 2023072068A1 CN 2022127363 W CN2022127363 W CN 2022127363W WO 2023072068 A1 WO2023072068 A1 WO 2023072068A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- frame
- image
- layer number
- feedback information
- channel feedback
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/164—Feedback from the receiver or from the transmission channel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/30—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Definitions
- the present application relates to video coding and decoding technologies, and in particular to an image coding and decoding method and device.
- Scalable video coding also known as scalable video coding, is an extension coding standard of the current video coding standard.
- different code stream layers are formed by performing spatial domain classification (resolution classification), temporal domain classification, or quality classification in the encoder, so that different resolutions and different frame rates are included in the same code stream. Or video streams with different bit rates.
- the encoder can encode video frames into base layer code streams and enhancement layer code streams according to different encoding configurations.
- the basic layer generally encodes the lowest-level airspace, time-domain, or lowest-quality code stream; the enhancement layer uses the basic layer as a basis to superimpose and encode higher-level airspace, time-domain or higher-quality code streams.
- the spatial domain, time domain or quality level of coding is also higher and higher.
- priority is given to ensuring the transmission of the basic layer code stream, and when there is a margin in the network, the higher and higher enhancement layer code streams are gradually transmitted.
- the decoder first receives the code stream of the basic layer and decodes it, and then gradually decodes the code stream of higher and higher spatial domain, time domain or quality level according to the received code stream of the enhancement layer from low to high level, and passes the higher layer
- the higher-level information is superimposed on the lower level to obtain higher resolution, higher frame rate or higher quality video reconstruction frames.
- the scalable coding scheme in the related art may be affected by changes in channel conditions, resulting in artifacts.
- the present application provides an image encoding and decoding method and device to fully consider channel changes, ensure that the reference images used by the encoding end and the decoding end are consistent, improve encoding efficiency, and avoid blurred screens.
- the present application provides an image encoding method, including: determining the reference frame number of the current image according to channel feedback information, the channel feedback information is used to indicate the information of the image frame received by the decoding end;
- the channel feedback information is used to indicate the information of the image frame received by the decoding end.
- the total number of layers of the current image frame is 4, and the encoding end encodes the current image frame to obtain the code stream corresponding to the 4 layers, but the decoding end only receives the code stream corresponding to the first 3 layers of the current image frame during transmission.
- the encoding end uses the reconstructed image of the fourth layer of the current image as a reference image, but the decoding end does not receive the code stream corresponding to the fourth layer, so the decoding end cannot use the fourth layer of the current image.
- the encoding end first obtains the channel feedback information, and determines the information of the image frame received by the decoding end based on the channel feedback information.
- the channel feedback information includes the frame number and layer number of the image frame received by the decoding end, and then Based on this, the reference frame of the next frame is determined, thereby avoiding the situation in the above example, and ensuring that the reference images used by the encoding end and the decoding end are consistent.
- the maximum number of layers can be a threshold, that is, when each image frame is layered
- the number of layers does not exceed at most, but in actual encoding, different image frames may have different total layers.
- the total number of layers of the first image frame is represented by L1, and L1 can be less than or equal to the aforementioned maximum number of layers L max .
- N1 layers can be used as reference images for subsequent image frames, 1 ⁇ N1 ⁇ L1, and the layer numbers of the N1 layers form the first reference layer of the first image frame number set, that is, the first image frame corresponds to the first reference layer number set, and only the layered reconstructed image whose layer number is in the first reference layer number set can be used as a reference image for subsequent image frames.
- the reconstructed image corresponding to the reference frame number and reference layer number can be extracted from the decoded picture buffer (DPB) as the reference image of the current image, so that based on the Scalable encoding is performed on the current image with reference to the image to obtain a code stream.
- DPB decoded picture buffer
- the reference frame number of the current image is determined based on the channel feedback information, and then the reference layer number of the current image is determined based on the reference frame number and a preset reference layer number set.
- the reference layer number set includes the reference frame number corresponding to The layer numbers of the N layers of the image frame, and then obtain the reference image of the current image based on the reference frame number and the reference layer number.
- the reference image obtained in this way fully takes into account the change of the channel, ensuring that the reference image used by the encoding end and the decoding end The image is consistent, improving the coding efficiency and avoiding the situation of blurred screen.
- the performing video encoding on the current image according to the reference frame number and the reference layer number to obtain a code stream includes: The reconstructed image corresponding to the frame number and the reference layer number, where only the reconstructed images of the N1 layers are stored in the DPB for the first image frame; The reconstructed image corresponding to the layer number is used as a reference image, and the video encoding is performed on the current image according to the reference image to obtain the code stream.
- the determining the reference frame number of the current image according to the channel feedback information includes: acquiring a plurality of the channel feedback information, the channel feedback information is used to indicate the The frame number of the image frame received by the decoding end; the frame number closest to the frame number of the current image among the multiple frame numbers indicated by the multiple channel feedback information is determined as the reference frame number of the current image.
- the determining the reference layer number of the current image according to the channel feedback information and the first set of reference layer numbers includes: The highest indicated layer number is determined as the target layer number; when the target layer number is included in the first reference layer number set, the target layer number is determined as the reference layer number of the current image; or, when the When the target layer number is not included in the first reference layer number set, the layer number in the first reference layer number set that is smaller than and closest to the target layer number is determined as the reference layer number of the current image.
- the determining the reference frame number of the current image according to the channel feedback information includes: acquiring multiple sets of channel feedback information, the multiple sets of channel feedback information and the Corresponding to multiple decoding ends, each set of channel feedback information includes a plurality of said channel feedback information, and said channel feedback information is used to indicate the frame number of the image frame received by the corresponding decoding end; determined according to the multiple sets of channel feedback information
- the common frame number refers to the frame number indicated by at least one channel feedback information in each group of channel feedback information; determine the current image according to the one or more common frame numbers The reference frame number.
- the highest layer number indicated by the channel feedback information indicating the common frame number may be determined as the target layer number; when the first reference layer number set includes the target layer number, the target layer number The layer number is determined as the reference layer number of the current image; or, when the target layer number is not included in the first reference layer number set, the first reference layer number set is smaller than and closest to the The layer number of the target layer number is determined as the reference layer number of the current image.
- the reference frame number determined according to the channel feedback information can not only conform to the channel condition, but also determine the received image frame closest to the current image as the reference frame, which can improve coding efficiency.
- the determining the reference layer number of the current image according to the channel feedback information and the first set of reference layer numbers includes: acquiring each of the multiple sets of channel feedback information Indicating the highest layer number indicated by the channel feedback information of the reference frame number; determining the smallest of the multiple highest layer numbers as the target layer number; set according to the target layer number and the first reference layer number Determine the reference layer number of the current image.
- the channel feedback information comes from a corresponding decoding end and/or a network device on a transmission link.
- the channel feedback information is generated based on the sent code stream.
- the determining the reference frame number of the current image according to the channel feedback information includes: acquiring a plurality of the channel feedback information, the channel feedback information is used to indicate the image received by the decoding end The frame number of the frame; determine the frame number closest to the current image among the multiple frame numbers indicated by the multiple channel feedback information as the target frame number; when the channel feedback information indicating the target frame number indicates When the highest layer number is greater than or equal to the highest layer number in the second reference layer number set, the target frame number is determined as the reference frame number, and the second reference layer number set is corresponding to the target frame number Set of reference layer numbers for the second image frame.
- the method further includes: when the highest layer number indicated by the channel feedback information indicating the target frame number is smaller than the highest layer number in the second reference layer number set, assigning the A specified frame number among the multiple frame numbers indicated by the multiple channel feedback information is determined as the reference frame number of the current image.
- the method further includes: when the target layer number is not included in the first reference layer number set, if the target layer number is not included in the first reference layer number set The layer number of the layer number, then the reference frame number of the previous frame of the current image is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the reference layer of the current image Number.
- the code stream further includes the first set of reference layer numbers.
- the code stream further includes the reference frame number.
- the code stream further includes the reference frame number and the reference layer number.
- the channel feedback information includes the image slice number of the image frame received by the decoding end and the layer corresponding to the image slice number number; the determining the reference layer number of the current image according to the channel feedback information and the first reference layer number set includes: if the image slice number of the current image and the image received by the decoding end The image slice number of the frame is the same, and the layer number corresponding to the image slice number of the image frame received by the decoding end is determined as the target layer number; when the first reference layer number set includes the target layer number, determine the target layer number as the reference layer number of the current image; or, when the target layer number is not included in the first reference layer number set, set the first reference layer number set The layer number that is smaller than and closest to the target layer number is determined as the reference layer number of the current image.
- a frame of image can be divided into multiple image slices (Slice) for encoding and transmission. Therefore, when the current image is an image slice, in addition to the frame number of the image frame received by the decoder, the channel feedback information also includes the frame number received by the decoder. The image slice number of the image frame and the layer number corresponding to the image slice number.
- the encoder can first use the above method to determine the reference frame number of the current image, and then determine the reference layer number of the current image according to the image slice number of the current image and the first reference layer number set, that is, the channel feedback information indicating the reference frame number Find the one with the same image slice number as the current image among the multiple indicated image slice numbers, and then determine the layer number corresponding to the same image slice number as the target layer number, and start from the first reference layer number based on the target layer number Determine the reference layer number of the current image in the set.
- the image slice number of the current image is 1, then the reference layer number of the current image is obtained from the layer number 3 corresponding to the aforementioned image slice number 1 and the first reference layer number set, and the reference layer number is 3.
- the reference layer number of the current image is obtained from the layer number 4 corresponding to the aforementioned image slice number 2 and the first reference layer number set, and its reference layer number is 3.
- the image slice number of the current image is 3, then the reference layer number of the current image is obtained according to the layer number 5 corresponding to the aforementioned image slice number 3 and the first reference layer number set, and its reference layer number is 5.
- the image slice number of the current image is 4, then the reference layer number of the current image is obtained according to the layer number 6 corresponding to the image slice number 4 and the first reference layer number set, and its reference layer number is 5.
- the present application provides an image decoding method, including: obtaining a code stream; parsing the code stream to obtain a reference frame number of the current image; obtaining a third reference frame of a third image frame corresponding to the reference frame number A set of layer numbers, the third set of reference layer numbers includes layer numbers of N2 layers, 1 ⁇ N2 ⁇ L2, and L2 represents the total number of layers of the third image frame; according to the third set of reference layer numbers Determining the reference layer number of the current image; performing video decoding according to the reference frame number and the reference layer number to obtain a reconstructed image of the current image.
- the decoder can send channel feedback information when it parses to start receiving the code stream of the next frame (judging based on the frame number in the code stream), which carries the frame number of the previous frame and the highest frame number received in the previous frame. layer number; or, when it is resolved that the current image is received (judged based on the highest layer number of the current image in the code stream), channel feedback information can be sent, which carries the frame number of the current image and the highest layer number received by the current image .
- the decoding end sends channel feedback information in the above two cases, which can ensure that the highest layer received by any frame obtained by the encoding end is consistent with the highest layer of the same frame actually received by the decoding end, thereby avoiding the occurrence of The codec of 's has errors due to the use of different reference images.
- the performing video decoding according to the reference frame number and the reference layer number to obtain the reconstructed image of the current image includes: A reconstructed image corresponding to the frame number and the reference layer number; using the acquired reconstructed image corresponding to the reference frame number and the reference layer number as a reference image, performing the video decoding according to the reference image to obtain A reconstructed image of the current image.
- the method further includes: storing the reconstructed images of the N3 layers of the current image into the DPB, and the fourth reference layer number set of the current image includes M layers of Layer number, the M layers include the N3 layers, 1 ⁇ M ⁇ L3, L3 represents the total number of layers of the current image; or, the reconstruction of the highest layer in the N3 layers Images are stored in the DPB.
- the fourth reference layer number set of the current picture can be obtained by analyzing the code stream, but when the decoding end is decoding, the layer number L4 of the highest layer obtained for the current picture may be less than the total number of layers L3 of the current picture, so it is stored in the DPB
- the layer number L4 of the highest layer obtained for the current picture may be less than the total number of layers L3 of the current picture, so it is stored in the DPB
- the method further includes: sending a reconstructed image of the L4th layer of the current image to display, where L4 represents a layer number of the highest layer obtained by decoding the current image.
- the determining the reference layer number of the current image according to the third reference layer number set includes: determining the respective corresponding the highest layer number in the layer number; when the third reference layer number set includes the highest layer number, determine the highest layer number as the reference layer number of the current image; or, when the reference layer When the highest layer number is not included in the number set, determine the layer number that is smaller than and closest to the highest layer number in the third reference layer number set as the reference layer number of the current image.
- the method further includes: when the third reference layer number set does not include the highest layer number, if the third reference layer number set does not include the highest layer number The layer number of the layer number, then the reference frame number of the previous frame of the current image is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the reference layer of the current image Number.
- the method further includes: determining the frame number and layer number of the received image frame; sending channel feedback information to the encoding end, where the channel feedback information is used to indicate the received image frame The frame number and the layer number of the frame.
- the sending the channel feedback information to the encoding end includes: sending the channel feedback information to the encoding end when it is determined to start parsing the second frame according to the frame number in the code stream , the channel feedback information is used to indicate the frame number of the first frame and the received layer number of the highest layer of the first frame, the first frame being the previous frame of the second frame; or, when it is determined that the first frame has been received according to the layer number of the received image frame, the channel feedback information is sent to the encoding end, and the channel feedback information is used to indicate the frame number and reception of the first frame The layer number of the topmost layer of the first frame.
- the method when the current image is an image slice, the method further includes: determining the image slice number of the received image frame; correspondingly, the channel feedback information is also used to indicate The image slice number.
- a frame of image is divided into multiple image slices (Slice) for encoding and sending.
- the decoder can determine the received frame number and layer number at the same time. The slice number, and then carry the frame number of the received image slice, the image slice number, and the layer number corresponding to the image slice number in the channel feedback information.
- the above process of processing by image can be processed by image slices in the same way.
- the present application provides an image encoding device, including: an inter-frame prediction module, configured to determine the reference frame number of the current image according to channel feedback information, and the channel feedback information is used to indicate the number of the image frame received by the decoding end.
- Information obtain the first reference layer number set of the first image frame corresponding to the reference frame number, the first reference layer number set includes N1 layer numbers, 1 ⁇ N1 ⁇ L1, L1 means the The total number of layers of the first image frame; determine the reference layer number of the current image according to the channel feedback information and the first reference layer number set; an encoding module, configured to use the reference frame number and the reference The layer number performs video encoding on the current image to obtain a code stream.
- the encoding module is specifically configured to obtain the reconstructed image corresponding to the reference frame number and the reference layer number from a decoded image buffer DPB, where the DPB is for the first An image frame only has the reconstructed images of the N1 layers; the obtained reconstructed image corresponding to the reference frame number and the reference layer number is used as a reference image, and the current The image is subjected to the video coding to obtain the code stream.
- the inter-frame prediction module is specifically configured to acquire a plurality of the channel feedback information, and the channel feedback information is used to indicate the information received by the decoding end
- the frame number of the image frame determining the frame number closest to the frame number of the current image among the multiple frame numbers indicated by the multiple channel feedback information as the reference frame number of the current image.
- the inter-frame prediction module is specifically configured to determine the highest layer number indicated by the channel feedback information indicating the reference frame number as the target layer number; when the first reference layer number When the set includes the target layer number, determine the target layer number as the reference layer number of the current image; or, when the first reference layer number set does not include the target layer number, set the target layer number The layer number that is smaller than and closest to the target layer number in the first reference layer number set is determined as the reference layer number of the current image.
- the inter-frame prediction module is specifically configured to obtain multiple sets of channel feedback information, the multiple sets of channel feedback information corresponding to the multiple decoding ends,
- Each set of channel feedback information includes a plurality of the channel feedback information, and the channel feedback information is used to indicate the frame number of the image frame received by the corresponding decoding end; determine one or more common frames according to the multiple sets of channel feedback information
- the common frame number refers to the frame number indicated by at least one channel feedback information in each group of channel feedback information; the reference frame number of the current image is determined according to the one or more common frame numbers.
- the inter-frame prediction module is specifically configured to obtain the highest layer number indicated by the channel feedback information indicating the reference frame number in each of the multiple sets of channel feedback information; The smallest one of the highest layer numbers is determined as the target layer number; and the reference layer number of the current image is determined according to the target layer number and the first reference layer number set.
- the channel feedback information comes from a corresponding decoding end and/or a network device on a transmission link.
- the channel feedback information is generated based on the sent code stream.
- the inter-frame prediction module is specifically configured to acquire a plurality of the channel feedback information, and the channel feedback information is used to indicate the frame number of the image frame received by the decoding end; Among the multiple frame numbers indicated by the multiple channel feedback information, the one closest to the frame number of the current image is determined as the target frame number; when the highest layer number indicated by the channel feedback information indicating the target frame number is greater than or equal to When the highest layer number in the second reference layer number set, determine the target frame number as the reference frame number, the second reference layer number set is the reference of the second image frame corresponding to the target frame number A collection of layer numbers.
- the inter-frame prediction module is further configured to: when the highest layer number indicated by the channel feedback information indicating the target frame number is smaller than the highest layer number in the second reference layer number set , determining a specified frame number among the multiple frame numbers indicated by the multiple channel feedback information as the reference frame number of the current image.
- the inter prediction module is further configured to: when the target layer number is not included in the first reference layer number set, if the first reference layer number set does not include If the layer number is smaller than the target layer number, the reference frame number of the previous frame of the current image is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the current The reference layer number of the image.
- the code stream further includes the first set of reference layer numbers.
- the code stream further includes the reference frame number.
- the code stream further includes the reference frame number and the reference layer number.
- the inter-frame prediction module is specifically configured to determine the image slice number of the current image and the image frame received by the decoding end
- the image slice number of the image frame is the same, and the layer number corresponding to the image slice number of the image frame received by the decoder is determined as the target layer number; when the first reference layer number set includes the target layer number , the target layer number is determined as the reference layer number of the current image; or, when the target layer number is not included in the first set of reference layer numbers, the smaller The layer number on and closest to the target layer number is determined as the reference layer number of the current image.
- the present application provides an image decoding device, including: an acquisition module, configured to acquire a code stream; an inter-frame prediction module, configured to parse the code stream to obtain a reference frame number of the current image;
- the decoding module is specifically configured to acquire the reconstructed image corresponding to the reference frame number and the reference layer number from the decoded image buffer DPB;
- the reconstructed image corresponding to the reference frame number and the reference layer number is used as a reference image, and the video decoding is performed according to the reference image to obtain the reconstructed image of the current image.
- the decoding module is further configured to store the reconstructed images of the N3 layers of the current image in the DPB, and the fourth reference layer number set of the current image includes M sub-layers
- the layer number of the layer, the M layers include the N3 layers, 1 ⁇ M ⁇ L3, L3 represents the total number of layers of the current image; or, the highest layer in the N3 layers
- the reconstructed image is stored in the DPB.
- a display module configured to display the reconstructed image of the L4th layer of the current image, where L4 represents the layer number of the highest layer obtained by decoding the current image.
- the inter-frame prediction module is specifically configured to determine the highest layer number among the layer numbers corresponding to the multiple reconstructed images of the decoded third image frame; when the third When the set of reference layer numbers includes the highest layer number, determine the highest layer number as the reference layer number of the current image; or, when the set of reference layer numbers does not include the highest layer number, set A layer number smaller than and closest to the highest layer number in the third set of reference layer numbers is determined as the reference layer number of the current image.
- the inter prediction module is further configured to: when the third reference layer number set does not include the highest layer number, if the third reference layer number set does not include If the layer number is smaller than the highest layer number, the reference frame number of the previous frame of the current image is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the current The reference layer number of the image.
- a sending module configured to determine the frame number and layer number of the received image frame; and send channel feedback information to the encoding end, where the channel feedback information is used to indicate that the received The frame number and the layer number of the image frame.
- the sending module is specifically configured to send the channel feedback information to the encoding end when it is determined according to the frame number in the code stream to start parsing the second frame, and the channel The feedback information is used to indicate the frame number of the first frame and the received layer number of the highest layer of the first frame, where the first frame is the previous frame of the second frame; or, when according to the received When the layer number of the image frame determines that the first frame has been received, the channel feedback information is sent to the encoding end, and the channel feedback information is used to indicate the frame number of the first frame and the received The layer number of the highest layer of the first frame.
- the sending module is further configured to determine the image slice number of the received image frame; correspondingly, the channel feedback information is also used Indicates the image slice number.
- the present application provides an encoder, including: one or more processors; a non-transitory computer-readable storage medium, coupled to the processor and storing a program executed by the processor, wherein the The program, when executed by the processor, causes the encoder to perform the method according to any one of the first aspect.
- the present application provides a decoder, including: one or more processors;
- a non-transitory computer-readable storage medium coupled to the processor and storing a program executed by the processor, wherein the program, when executed by the processor, causes the decoder to perform any one of the methods described.
- the present application provides a non-transitory computer-readable storage medium, including program code, which, when executed by a computer device, is used to execute the method according to any one of the first or second aspect.
- the present application provides a non-transitory storage medium, including a bit stream encoded according to the method described in any one of the first or second aspects.
- the present application provides a computer program product including instructions, which, when run on a computer, cause the computer to execute the method described in any one of the first aspect or the second aspect.
- FIG. 1A is an exemplary block diagram of a decoding system 10 according to an embodiment of the present application.
- FIG. 1B is an exemplary block diagram of a video decoding system 40 according to an embodiment of the present application.
- FIG. 2 is an exemplary block diagram of a video encoder 20 according to an embodiment of the present application.
- FIG. 3 is an exemplary block diagram of a video decoder 30 according to an embodiment of the present application.
- FIG. 4 is an exemplary block diagram of a video decoding device 400 according to an embodiment of the present application.
- FIG. 5 is an exemplary hierarchical schematic diagram of scalable video coding in the present application.
- Fig. 6 is an exemplary flow chart of the encoding method of the enhancement layer of the present application.
- Fig. 7 is an exemplary flow chart of the image encoding method of the present application.
- Fig. 8 is an exemplary flow chart of the image decoding method of the present application.
- FIG. 9 is a schematic structural diagram of an encoding device 900 according to an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of a decoding device 1000 according to an embodiment of the present application.
- At least one (item) means one or more, and “multiple” means two or more.
- “And/or” is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, “A and/or B” can mean: only A exists, only B exists, and A and B exist at the same time , where A and B can be singular or plural.
- the character “/” generally indicates that the contextual objects are an “or” relationship.
- At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
- At least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ", where a, b, c can be single or multiple.
- Video coding generally refers to the processing of sequences of images that form a video or video sequence.
- the terms "picture”, “frame” or “image” may be used as synonyms.
- Video coding (or commonly referred to as coding) includes two parts: video coding and video decoding.
- Video encoding is performed on the source side and typically involves processing (eg, compressing) raw video images to reduce the amount of data needed to represent the video images (and thus more efficient storage and/or transmission).
- Video decoding is performed at the destination and typically involves inverse processing relative to the encoder to reconstruct the video image.
- the "encoding" of video images (or generally referred to as images) involved in the embodiments should be understood as “encoding” or “decoding” of video images or video sequences.
- the encoding part and the decoding part are also collectively referred to as codec (encoding and decoding, CODEC).
- the original video image can be reconstructed, ie the reconstructed video image has the same quality as the original video image (assuming no transmission loss or other data loss during storage or transmission).
- further compression is performed by quantization, etc., to reduce the amount of data required to represent the video image, and the decoder side cannot completely reconstruct the video image, that is, the quality of the reconstructed video image is lower than that of the original video image. low or poor.
- Video coding standards belong to "lossy hybrid video codecs" (ie, combining spatial and temporal prediction in the pixel domain with 2D transform coding in the transform domain for applying quantization).
- Each image in a video sequence is usually partitioned into a non-overlapping set of blocks, usually encoded at the block level.
- encoders usually process, i.e.
- video at the block (video block) level e.g., through spatial (intra) prediction and temporal (inter) prediction to produce a predicted block; from the current block (currently processed/to be processed block) to obtain the residual block; transform the residual block in the transform domain and quantize the residual block to reduce the amount of data to be transmitted (compressed), and the decoder side will be inversely processed relative to the encoder Partially applied to encoded or compressed blocks to reconstruct the current block for representation.
- the encoder needs to repeat the decoder's processing steps such that the encoder and decoder generate the same predicted (eg, intra and inter) and/or reconstructed pixels for processing, ie encoding, subsequent blocks.
- the encoder 20 and the decoder 30 are described with reference to FIGS. 1A to 3 .
- FIG. 1A is an exemplary block diagram of a decoding system 10 according to an embodiment of the present application, such as a video decoding system 10 (or simply referred to as the decoding system 10 ) that can utilize the technology of the present application.
- Video encoder 20 (or simply encoder 20) and video decoder 30 (or simply decoder 30) in video coding system 10 represent devices, etc. that may be used to perform techniques according to various examples described in this application. .
- a decoding system 10 includes a source device 12 for providing encoded image data 21 such as encoded images to a destination device 14 for decoding the encoded image data 21 .
- the source device 12 includes an encoder 20 , and optionally, an image source 16 , a preprocessor (or a preprocessing unit) 18 such as an image preprocessor, and a communication interface (or a communication unit) 22 .
- Image source 16 may include or be any type of image capture device for capturing real world images, etc., and/or any type of image generation device, such as a computer graphics processor or any type of Devices for acquiring and/or providing real-world images, computer-generated images (e.g., screen content, virtual reality (VR) images, and/or any combination thereof (e.g., augmented reality (AR) images). So
- the image source may be any type of memory or storage that stores any of the above images.
- the image (or image data) 17 may also be referred to as a raw image (or raw image data) 17.
- the preprocessor 18 is used to receive the original image data 17 and perform preprocessing on the original image data 17 to obtain a preprocessed image (or preprocessed image data) 19 .
- preprocessing performed by preprocessor 18 may include cropping, color format conversion (eg, from RGB to YCbCr), color grading, or denoising. It can be understood that the preprocessing unit 18 can be an optional component.
- a video encoder (or encoder) 20 is used to receive preprocessed image data 19 and provide encoded image data 21 (to be further described below with reference to FIG. 2 etc.).
- the communication interface 22 in the source device 12 may be used to receive the encoded image data 21 and send the encoded image data 21 (or any other processed version) via the communication channel 13 to another device such as the destination device 14 or any other device for storage Or rebuild directly.
- the destination device 14 includes a decoder 30 , and may also optionally include a communication interface (or communication unit) 28 , a post-processor (or post-processing unit) 32 and a display device 34 .
- the communication interface 28 in the destination device 14 is used to receive the coded image data 21 (or any other processed version) directly from the source device 12 or from any other source device such as a storage device, for example, the storage device is a coded image data storage device, And the coded image data 21 is supplied to the decoder 30 .
- the communication interface 22 and the communication interface 28 can be used to pass through a direct communication link between the source device 12 and the destination device 14, such as a direct wired or wireless connection, etc., or through any type of network, such as a wired network, a wireless network, or any other Combination, any type of private network and public network or any combination thereof, send or receive coded image data (or coded data) 21 .
- the communication interface 22 can be used to encapsulate the encoded image data 21 into a suitable format such as a message, and/or use any type of transmission encoding or processing to process the encoded image data, so that it can be transmitted over a communication link or communication network on the transmission.
- the communication interface 28 corresponds to the communication interface 22, eg, can be used to receive the transmission data and process the transmission data using any type of corresponding transmission decoding or processing and/or decapsulation to obtain the encoded image data 21 .
- Both the communication interface 22 and the communication interface 28 can be configured as a one-way communication interface as indicated by an arrow pointing from the source device 12 to the corresponding communication channel 13 of the destination device 14 in FIG. 1A , or a two-way communication interface, and can be used to send and receive messages etc., to establish the connection, confirm and exchange any other information related to the communication link and/or data transmission such as encoded image data transmission, etc.
- the video decoder (or decoder) 30 is used to receive encoded image data 21 and provide decoded image data (or decoded image data) 31 (which will be further described below with reference to FIG. 3 , etc.).
- the post-processor 32 is used to perform post-processing on decoded image data 31 (also referred to as reconstructed image data) such as a decoded image to obtain post-processed image data 33 such as a post-processed image.
- Post-processing performed by post-processing unit 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color grading, cropping, or resampling, or any other processing for producing decoded image data 31 for display by a display device 34 or the like. .
- the display device 34 is used to receive the post-processed image data 33 to display the image to a user or viewer or the like.
- Display device 34 may be or include any type of display for representing the reconstructed image, eg, an integrated or external display screen or display.
- the display screen may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS) display, or a liquid crystal on silicon (LCoS) display. ), a digital light processor (DLP), or any type of other display.
- LCD liquid crystal display
- OLED organic light emitting diode
- plasma display e.g., a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS) display, or a liquid crystal on silicon (LCoS) display.
- DLP digital light processor
- FIG. 1A shows the source device 12 and the destination device 14 as independent devices
- device embodiments may also include the source device 12 and the destination device 14 or the functions of the source device 12 and the destination device 14 at the same time, that is, include both the source device 12 and the destination device 14 at the same time.
- Device 12 or corresponding function and destination device 14 or corresponding function In these embodiments, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and/or software or by separate hardware and/or software or any combination thereof.
- Encoder 20 e.g., video encoder 20
- decoder 30 e.g., video decoder 30
- processing circuitry such as one or more microprocessors, digital signal processors, (digital signal processor, DSP), application-specific integrated circuit (ASIC), field-programmable gate array (field-programmable gate array, FPGA), discrete logic, hardware, video encoding dedicated processor or any combination thereof .
- Encoder 20 may be implemented by processing circuitry 46 to include the various modules discussed with reference to encoder 20 of FIG. 2 and/or any other encoder system or subsystem described herein.
- Decoder 30 may be implemented by processing circuitry 46 to include the various modules discussed with reference to decoder 30 of FIG.
- the processing circuitry 46 may be used to perform various operations discussed below. As shown in Figure 5, if part of the technology is implemented in software, the device can store the instructions of the software in a suitable computer-readable storage medium, and use one or more processors to execute the instructions in hardware, thereby implementing the present invention technology.
- One of the video encoder 20 and the video decoder 30 may be integrated in a single device as part of a combined codec (encoder/decoder, CODEC), as shown in FIG. 1B .
- Source device 12 and destination device 14 may comprise any of a variety of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, cell phone, smartphone, tablet or tablet computer, camera, desktop computers, set-top boxes, televisions, display devices, digital media players, video game consoles, video streaming devices (such as content service servers or content distribution servers), broadcast receiving devices, broadcast transmitting devices, etc., and may not Use or use any type of operating system.
- source device 12 and destination device 14 may be equipped with components for wireless communication. Accordingly, source device 12 and destination device 14 may be wireless communication devices.
- the video coding system 10 shown in FIG. 1A is merely exemplary, and the techniques provided herein may be applicable to video coding settings (e.g., video coding or video decoding) that do not necessarily include coding devices and Decode any data communication between devices.
- data is retrieved from local storage, sent over a network, and so on.
- a video encoding device may encode and store data into memory, and/or a video decoding device may retrieve and decode data from memory.
- encoding and decoding are performed by devices that do not communicate with each other but simply encode data to memory and/or retrieve and decode data from memory.
- FIG. 1B is an exemplary block diagram of a video decoding system 40 according to an embodiment of the present application.
- the video decoding system 40 may include an imaging device 41, a video encoder 20, a video decoder 30 (and/or by Video codec implemented by processing circuit 46 ), antenna 42 , one or more processors 43 , one or more memory stores 44 and/or display device 45 .
- imaging device 41 , antenna 42 , processing circuit 46 , video encoder 20 , video decoder 30 , processor 43 , memory storage 44 and/or display device 45 are capable of communicating with each other.
- the video coding system 40 may include only the video encoder 20 or only the video decoder 30 .
- antenna 42 may be used to transmit or receive an encoded bitstream of video data.
- display device 45 may be used to present video data.
- the processing circuit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like.
- the video decoding system 40 may also include an optional processor 43, and the optional processor 43 may similarly include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like.
- the memory storage 44 can be any type of memory, such as volatile memory (for example, static random access memory (static random access memory, SRAM), dynamic random access memory (dynamic random access memory, DRAM), etc.) or non-volatile memory volatile memory (for example, flash memory, etc.) and the like.
- volatile memory for example, static random access memory (static random access memory, SRAM), dynamic random access memory (dynamic random access memory, DRAM), etc.
- non-volatile memory volatile memory for example, flash memory, etc.
- memory storage 44 may be implemented by cache memory.
- processing circuitry 46 may include memory (eg, cache, etc.) for implementing an image buffer or the like.
- video encoder 20 implemented by logic circuitry may include an image buffer (eg, implemented by processing circuitry 46 or memory storage 44 ) and a graphics processing unit (eg, implemented by processing circuitry 46 ).
- a graphics processing unit may be communicatively coupled to the image buffer.
- Graphics processing unit may include video encoder 20 implemented by processing circuitry 46 to implement the various modules discussed with reference to FIG. 2 and/or any other encoder system or subsystem described herein.
- Logic circuits may be used to perform the various operations discussed herein.
- video decoder 30 may be implemented by processing circuitry 46 in a similar manner to implement the various aspects discussed with reference to video decoder 30 of FIG. 3 and/or any other decoder system or subsystem described herein. module.
- logic circuit implemented video decoder 30 may include an image buffer (implemented by processing circuit 46 or memory storage 44 ) and a graphics processing unit (eg, implemented by processing circuit 46 ).
- a graphics processing unit may be communicatively coupled to the image buffer.
- Graphics processing unit may include video decoder 30 implemented by processing circuitry 46 to implement the various modules discussed with reference to FIG. 3 and/or any other decoder system or subsystem described herein.
- antenna 42 may be used to receive an encoded bitstream of video data.
- an encoded bitstream may contain data related to encoded video frames, indicators, index values, mode selection data, etc., as discussed herein, such as data related to encoding partitions (e.g., transform coefficients or quantized transform coefficients , (as discussed) an optional indicator, and/or data defining an encoding split).
- Video coding system 40 may also include video decoder 30 coupled to antenna 42 and used to decode the encoded bitstream.
- a display device 45 is used to present video frames.
- the video decoder 30 may be used to perform a reverse process.
- the video decoder 30 may be configured to receive and parse such syntax elements and decode the associated video data accordingly.
- video encoder 20 may entropy encode the syntax elements into an encoded video bitstream.
- video decoder 30 may parse such syntax elements and decode the related video data accordingly.
- VVC general video coding
- VCEG video coding experts group
- MPEG motion picture experts group
- HEVC high-efficiency video coding
- JCT-VC joint collaboration team on video coding
- FIG. 2 is an exemplary block diagram of a video encoder 20 according to an embodiment of the present application.
- the video encoder 20 includes an input terminal (or input interface) 201, a residual calculation unit 204, a transformation processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transformation processing unit 212, a reconstruction unit 214, Loop filter 220 , decoded picture buffer (decoded picture buffer, DPB) 230 , mode selection unit 260 , entropy coding unit 270 and output terminal (or output interface) 272 .
- Mode selection unit 260 may include inter prediction unit 244 , intra prediction unit 254 , and partition unit 262 .
- Inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown).
- the video encoder 20 shown in FIG. 2 may also be called a hybrid video encoder or a video encoder based on a hybrid video codec.
- the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 constitute the forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop A path filter 220, a decoded picture buffer (decoded picture buffer, DPB) 230, an inter prediction unit 244, and an intra prediction unit 254 form the backward signal path of the encoder, wherein the backward signal path of the encoder 20 corresponds to the decoding signal path of the decoder (see decoder 30 in FIG. 3).
- Inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, loop filter 220, decoded picture buffer 230, inter prediction unit 244, and intra prediction unit 254 also make up the "built-in decoder" of video encoder 20 .
- the encoder 20 is operable to receive, via an input 201 or the like, an image (or image data) 17, eg an image in a sequence of images forming a video or a video sequence.
- the received image or image data may also be a preprocessed image (or preprocessed image data) 19 .
- image 17 may also be referred to as a current image or an image to be encoded (especially when the current image is distinguished from other images in video encoding, other images such as the same video sequence, that is, the video sequence that also includes the current image, before encoding post image and/or decoded image).
- a (digital) image is or can be viewed as a two-dimensional array or matrix of pixel points with intensity values. Pixels in the array may also be referred to as pixels (pixel or pel) (short for image element). The number of pixels in the array or image in the horizontal and vertical directions (or axes) determines the size and/or resolution of the image. In order to represent a color, three color components are usually used, that is, an image can be represented as or include three pixel arrays. In the RBG format or color space, an image includes corresponding red, green and blue pixel arrays.
- each pixel is usually expressed in a luminance/chroma format or color space, such as YCbCr, including a luminance component indicated by Y (sometimes also indicated by L) and two chrominance components indicated by Cb and Cr.
- the luminance (luma) component Y represents brightness or grayscale level intensity (e.g., both are the same in a grayscale image), while the two chrominance (chroma) components Cb and Cr represent chrominance or color information components .
- an image in the YCbCr format includes a luminance pixel point array of luminance pixel point values (Y) and two chrominance pixel point arrays of chrominance values (Cb and Cr).
- Images in RGB format can be converted or transformed to YCbCr format and vice versa, a process also known as color transformation or conversion. If the image is black and white, the image may only include an array of luminance pixels. Correspondingly, the image can be, for example, an array of luma pixels in monochrome format or an array of luma pixels and two corresponding arrays of chrominance pixels in 4:2:0, 4:2:2 and 4:4:4 color formats .
- an embodiment of the video encoder 20 may include an image segmentation unit (not shown in FIG. 2 ) for segmenting the image 17 into a plurality of (typically non-overlapping) image blocks 203 .
- These blocks can also be called root blocks, macro blocks (H.264/AVC) or coding tree blocks (Coding Tree Block, CTB), or coding tree units (Coding Tree Unit, CTU) in the H.265/HEVC and VVC standards ).
- the segmentation unit can be used to use the same block size for all images in a video sequence and to use a corresponding grid that defines the block size, or to vary the block size between images or subsets or groups of images and segment each image into corresponding piece.
- the video encoder may be adapted to directly receive the blocks 203 of an image 17, e.g. one, several or all blocks making up said image 17.
- the image block 203 may also be referred to as a current image block or an image block to be encoded.
- the image block 203 is also or can be regarded as a two-dimensional array or matrix composed of pixels with intensity values (pixel values), but the image block 203 is smaller than that of the image 17 .
- block 203 may comprise one pixel point array (for example, a luminance array in the case of a monochrome image 17 or a luminance array or a chrominance array in the case of a color image) or three pixel point arrays (for example, in the case of a color image 17 one luma array and two chrominance arrays) or any other number and/or type of arrays depending on the color format employed.
- a block may be an array of M ⁇ N (M columns ⁇ N rows) pixel points, or an array of M ⁇ N transform coefficients, and the like.
- the video encoder 20 shown in FIG. 2 is used to encode the image 17 block by block, eg, performing encoding and prediction on each block 203 .
- the video encoder 20 shown in FIG. 2 can also be used to segment and/or encode an image using slices (also called video slices), where an image can use one or more slices (typically non-overlapping ) for segmentation or encoding.
- slices also called video slices
- Each slice may include one or more blocks (for example, a coding tree unit CTU) or one or more block groups (for example, a coding block (tile) in the H.265/HEVC/VVC standard and a tile in the VVC standard ( brick).
- the video encoder 20 shown in FIG. 2 can also be configured to use slices/coded block groups (also called video coded block groups) and/or coded blocks (also called video coded block groups) ) to segment and/or encode an image, where an image may be segmented or encoded using one or more slices/coded block groups (usually non-overlapping), each slice/coded block group may consist of one or more A block (such as a CTU) or one or more coding blocks, etc., wherein each coding block may be in the shape of a rectangle or the like, and may include one or more complete or partial blocks (such as a CTU).
- slices/coded block groups also called video coded block groups
- coded blocks also called video coded block groups
- the residual calculation unit 204 is used to calculate the residual block 205 according to the image block 203 and the prediction block 265 in the following manner (the prediction block 265 will be described in detail later): for example, pixel by pixel (pixel by pixel) from the pixel of the image block 203 Subtract the pixel value of the prediction block 265 from the value to obtain the residual block 205 in the pixel domain.
- the transform processing unit 206 is configured to perform discrete cosine transform (discrete cosine transform, DCT) or discrete sine transform (discrete sine transform, DST) etc. on the pixel point values of the residual block 205 to obtain transform coefficients 207 in the transform domain.
- the transform coefficients 207 may also be referred to as transform residual coefficients, representing the residual block 205 in the transform domain.
- Transform processing unit 206 may be configured to apply an integer approximation of DCT/DST, such as the transform specified for H.265/HEVC. This integer approximation is usually scaled by some factor compared to the orthogonal DCT transform. To maintain the norm of the forward and inverse transformed residual blocks, other scaling factors are used as part of the transformation process. The scaling factor is usually chosen according to certain constraints, such as the scaling factor being a power of 2 for the shift operation, the bit depth of the transform coefficients, the trade-off between accuracy and implementation cost, etc.
- specifying a specific scaling factor for the inverse transform at the encoder 20 side by the inverse transform processing unit 212 (and for the corresponding inverse transform at the decoder 30 side by, for example, the inverse transform processing unit 312), and correspondingly, can The side 20 specifies the corresponding scaling factor for the forward transform through the transform processing unit 206 .
- the video encoder 20 (correspondingly, the transform processing unit 206) can be used to output transform parameters such as one or more transform types, for example, directly output or output after encoding or compression by the entropy encoding unit 270 , for example, so that the video decoder 30 can receive and use the transformation parameters for decoding.
- transform parameters such as one or more transform types, for example, directly output or output after encoding or compression by the entropy encoding unit 270 , for example, so that the video decoder 30 can receive and use the transformation parameters for decoding.
- the quantization unit 208 is configured to quantize the transform coefficient 207 by, for example, scalar quantization or vector quantization, to obtain a quantized transform coefficient 209 .
- Quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209 .
- the quantization process may reduce the bit depth associated with some or all of the transform coefficients 207 .
- n-bit transform coefficients may be rounded down to m-bit transform coefficients during quantization, where n is greater than m.
- the degree of quantization can be modified by adjusting a quantization parameter (quantization parameter, QP).
- QP quantization parameter
- QP quantization parameter
- a smaller quantization step size corresponds to finer quantization
- a larger quantization step size corresponds to coarser quantization.
- a suitable quantization step size can be indicated by a quantization parameter (quantization parameter, QP).
- a quantization parameter may be an index to a predefined set of suitable quantization step sizes.
- Quantization may include dividing by a quantization step size, while corresponding or inverse dequantization performed by the inverse quantization unit 210 or the like may include multiplying by a quantization step size.
- Embodiments according to some standards such as HEVC may be used to determine the quantization step size using quantization parameters.
- the quantization step size can be calculated from the quantization parameter using a fixed-point approximation of an equation involving division.
- the video encoder 20 (correspondingly, the quantization unit 208) can be used to output a quantization parameter (quantization parameter, QP), for example, directly output or output after being encoded or compressed by the entropy encoding unit 270, for example, making the video Decoder 30 may receive and use the quantization parameters for decoding.
- a quantization parameter quantization parameter, QP
- the inverse quantization unit 210 is used to perform the inverse quantization of the quantization unit 208 on the quantization coefficients to obtain the dequantization coefficients 211, for example, perform the inverse quantization of the quantization scheme performed by the quantization unit 208 according to or use the same quantization step size as that of the quantization unit 208 plan.
- the dequantized coefficients 211 may also be referred to as dequantized residual coefficients 211 , corresponding to the transform coefficients 207 , but due to loss caused by quantization, the dequantized coefficients 211 are usually not exactly the same as the transform coefficients.
- the inverse transform processing unit 212 is configured to perform an inverse transform of the transform performed by the transform processing unit 206, for example, an inverse discrete cosine transform (discrete cosine transform, DCT) or an inverse discrete sine transform (discrete sine transform, DST), to transform in the pixel domain
- DCT inverse discrete cosine transform
- DST inverse discrete sine transform
- a reconstructed residual block 213 (or corresponding dequantization coefficients 213) is obtained.
- the reconstructed residual block 213 may also be referred to as a transform block 213 .
- the reconstruction unit 214 (e.g., summer 214) is used to add the transform block 213 (i.e., the reconstructed residual block 213) to the predicted block 265 to obtain the reconstructed block 215 in the pixel domain, for example, the reconstructed residual block 213
- the pixel value is added to the pixel value of the prediction block 265 .
- the loop filter unit 220 (or “loop filter” 220 for short) is used to filter the reconstructed block 215 to obtain the filtered block 221, or generally used to filter the reconstructed pixels to obtain filtered pixel values.
- a loop filter unit is used to smooth pixel transitions or improve video quality.
- the loop filter unit 220 may include one or more loop filters, such as deblocking filters, pixel adaptive offset (sample-adaptive offset, SAO) filters, or one or more other filters, such as auto Adaptive loop filter (ALF), noise suppression filter (NSF), or any combination.
- the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter.
- the order of the filtering process may be deblocking filter, SAO filter and ALF filter.
- add a process called luma mapping with chroma scaling (LMCS) ie adaptive in-loop shaper. This process is performed before deblocking.
- LMCS luma mapping with chroma scaling
- the deblocking filtering process can also be applied to internal sub-block edges, such as affine sub-block edges, ATMVP sub-block edges, sub-block transform (sub-block transform, SBT) edges and intra sub-partition (ISP )edge.
- loop filter unit 220 is shown in FIG. 2 as a loop filter, in other configurations, loop filter unit 220 may be implemented as a post-loop filter.
- the filtering block 221 may also be referred to as a filtering reconstruction block 221 .
- video encoder 20 (correspondingly, loop filter unit 220) can be used to output loop filter parameters (such as SAO filter parameters, ALF filter parameters or LMCS parameters), for example, directly or by entropy
- the encoding unit 270 performs entropy encoding to output, for example, so that the decoder 30 can receive and use the same or different loop filter parameters for decoding.
- a decoded picture buffer (DPB) 230 may be a reference picture memory that stores reference picture data for use by the video encoder 20 when encoding video data.
- the DPB 230 may be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (synchronous DRAM, SDRAM), magnetoresistive RAM (magnetoresistive RAM, MRAM), Resistive RAM (resistive RAM, RRAM) or other types of storage devices.
- DRAM dynamic random access memory
- the decoded picture buffer 230 may be used to store one or more filter blocks 221 .
- the decoded picture buffer 230 may also be used to store other previously filtered blocks, such as the previously reconstructed and filtered block 221, of the same current picture or a different picture such as a previous reconstructed block, and may provide the complete previously reconstructed, i.e. decoded, picture (and corresponding reference blocks and pixels) and/or a partially reconstructed current image (and corresponding reference blocks and pixels), for example for inter-frame prediction.
- the decoded image buffer 230 can also be used to store one or more unfiltered reconstruction blocks 215, or generally store unfiltered reconstruction pixels, for example, the reconstruction blocks 215 that have not been filtered by the loop filter unit 220, or have not been filtered. Any other processed reconstruction blocks or reconstructed pixels.
- the mode selection unit 260 includes a segmentation unit 262, an inter prediction unit 244, and an intra prediction unit 254 for receiving or obtaining raw blocks from the decoded image buffer 230 or other buffers (e.g., column buffers, not shown in the figure).
- 203 current block 203 of current image 17
- original image data such as reconstructed block data, e.g. filtered and/or unfiltered reconstructed pixels or reconstructions of the same (current) image and/or one or more previously decoded images piece.
- the reconstructed block data is used as reference image data required for prediction such as inter-frame prediction or intra-frame prediction to obtain a prediction block 265 or a prediction value 265 .
- the mode selection unit 260 can be used to determine or select a partition for the prediction mode (such as intra-frame or inter-frame prediction mode) of the current block (including no partition), generate a corresponding prediction block 265, and perform calculation and calculation on the residual block 205
- the reconstruction block 215 is reconstructed.
- mode selection unit 260 is operable to select a partitioning and prediction mode (e.g., from among the prediction modes supported or available by mode selection unit 260) that provides the best match or the smallest residual (minimum Residual refers to better compression in transmission or storage), or provides minimal signaling overhead (minimum signaling overhead refers to better compression in transmission or storage), or considers or balances both of the above.
- the mode selection unit 260 may be configured to determine the partition and prediction mode according to rate distortion optimization (RDO), that is, to select the prediction mode that provides the minimum rate distortion optimization.
- RDO rate distortion optimization
- best do not necessarily refer to “best”, “lowest”, “best” in general, but may refer to situations where termination or selection criteria are met, e.g., Values above or below thresholds or other constraints may result in “sub-optimal selection”, but reduce complexity and processing time.
- segmentation unit 262 may be used to segment images in a video sequence into a sequence of coding tree units (CTUs), and CTUs 203 may be further segmented into smaller block portions or sub-blocks (again forming blocks), e.g. By iteratively using quad-tree partitioning (QT) partitioning, binary-tree partitioning (BT) partitioning or triple-tree partitioning (TT) partitioning or any combination thereof, and for example or each of the sub-blocks to perform prediction, wherein the mode selection includes selecting the tree structure of the partition block 203 and selecting the prediction mode to be applied to the block portion or each of the sub-blocks.
- QT quad-tree partitioning
- BT binary-tree partitioning
- TT triple-tree partitioning
- partitioning eg, performed by partition unit 262
- prediction processing eg, performed by inter-prediction unit 244 and intra-prediction unit 254
- the division unit 262 may divide (or divide) one coding tree unit 203 into smaller parts, such as small blocks in the shape of a square or a rectangle.
- a CTU For an image with three pixel arrays, a CTU consists of N ⁇ N luma pixel blocks and two corresponding chrominance pixel blocks.
- the H.265/HEVC video coding standard divides a frame of image into non-overlapping CTUs, and the size of the CTU can be set to 64 ⁇ 64 (the size of the CTU can also be set to other values, such as the size of the CTU in the JVET reference software JEM increases 128 ⁇ 128 or 256 ⁇ 256).
- a 64 ⁇ 64 CTU includes a rectangular pixel matrix consisting of 64 columns and 64 pixels in each column, and each pixel includes a luminance component or/and a chrominance component.
- H.265 uses a QT-based CTU division method, uses the CTU as the root node (root) of the QT, and recursively divides the CTU into several leaf nodes (leaf nodes) according to the QT division method.
- a node corresponds to an image area. If the node is not divided, the node is called a leaf node, and its corresponding image area is a CU; if the node continues to be divided, the image area corresponding to the node can be divided into four of the same size The area (its length and width are half of the divided area), each area corresponds to a node, and it is necessary to determine whether these nodes will be divided separately.
- Whether a node is split is indicated by the split_cu_flag corresponding to the node in the code stream.
- the QT level (qtDepth) of the root node is 0, and the QT level of the node is the four QT level of the parent node of the node plus 1.
- a CTU contains a luma block and two chroma blocks, and the luma block and the chroma block can be divided in the same way, called luma-chroma union coding tree.
- VVC if the current frame is an I frame, when a CTU is a node of a preset size (such as 64 ⁇ 64) in an intra-frame coding frame (I frame), the luma block contained in the node is divided through the luma coding tree into a group of coding units containing only luma blocks, and the chroma blocks contained in this node are divided into a group of coding units containing only chroma blocks through the chroma coding tree; the division of the luma coding tree and the chroma coding tree are independent of each other.
- Such luma blocks and chrominance blocks use separate coding trees, called separate trees.
- a CU includes luma pixels and chrominance pixels; in H.266, AVS3 and other standards, in addition to CUs that contain both luma pixels and chrominance pixels, there are luma CUs that only contain luma pixels and A chroma CU that contains only chroma pixels.
- the video encoder 20 is configured to determine or select the best or optimal prediction mode from a set of (predetermined) prediction modes.
- the set of prediction modes may include, for example, intra prediction modes and/or inter prediction modes.
- the set of intra prediction modes can include 35 different intra prediction modes, e.g. non-directional modes like DC (or mean) mode and planar mode, or directional modes as defined by HEVC, or can include 67 different Intra prediction modes, eg non-directional modes like DC (or mean) mode and planar mode, or directional modes as defined in VVC.
- intra prediction modes e.g. non-directional modes like DC (or mean) mode and planar mode, or directional modes as defined in VVC.
- several traditional angle intra prediction modes are adaptively replaced with wide angle intra prediction modes for non-square blocks defined in VVC.
- to avoid the division operation of DC prediction only the longer side is used to calculate the average value of non-square blocks.
- the intra prediction result of the planar mode can also be modified by using a position dependent intra prediction combination (PDPC) method.
- PDPC position dependent intra prediction combination
- the intra prediction unit 254 is configured to generate an intra prediction block 265 by using reconstructed pixels of adjacent blocks of the same current image according to an intra prediction mode in the intra prediction mode set.
- Intra prediction unit 254 (or generally mode selection unit 260) is also configured to output intra prediction parameters (or generally information indicating the selected intra prediction mode for a block) in the form of syntax elements 266 to entropy encoding unit 270 , to be included in the encoded image data 21, so that the video decoder 30 can perform operations such as receiving and using prediction parameters for decoding.
- the set of inter prediction modes depends on available reference pictures (i.e., e.g. at least some previously decoded pictures previously stored in DBP 230) and other inter prediction parameters, e.g. on whether the entire reference picture is used or only Use part of the reference image, e.g. the search window area around the area of the current block, to search for the best matching reference block, and/or e.g. depending on whether half-pel, quarter-pel and/or 16th interpolation is performed pixel interpolation.
- available reference pictures i.e., e.g. at least some previously decoded pictures previously stored in DBP 230
- other inter prediction parameters e.g. on whether the entire reference picture is used or only Use part of the reference image, e.g. the search window area around the area of the current block, to search for the best matching reference block, and/or e.g. depending on whether half-pel, quarter-pel and/or 16th interpolation is performed pixel interpolation.
- skip mode and/or direct mode may also be employed.
- the merge candidate list of this mode consists of the following five candidate types in order: spatial MVP from spatially adjacent CUs, temporal MVPs from collocated CUs, history-based MVPs from FIFO tables, For average MVP and zero MV.
- Decoder side motion vector refinement (DMVR) based on bilateral matching can be used to increase the accuracy of MV in merge mode.
- Merge mode with MVD (merge mode with MVD, MMVD) comes from merge mode with motion vector difference. Send the MMVD flag immediately after sending the skip flag and the merge flag to specify whether the CU uses MMVD mode.
- a CU-level adaptive motion vector resolution (AMVR) scheme may be used. AMVR supports CU's MVD encoding at different precisions.
- the MVD of the current CU is adaptively selected.
- a combined inter/intra prediction (CIIP) mode can be applied to the current CU.
- a weighted average is performed on the inter-frame and intra-frame prediction signals to obtain CIIP prediction.
- the affine motion field of a block is described by the motion information of 2 control points (4 parameters) or 3 control points (6 parameters) motion vector.
- SBTMVP subblock-based temporal motion vector prediction
- TMVP temporal motion vector prediction
- Bi-directional optical flow (BDOF), formerly known as BIO, is a simplified version that reduces computation, especially in terms of the number of multiplications and the size of the multiplier.
- the triangular partition mode the CU is evenly divided into two triangular parts in two ways: diagonal division and anti-diagonal division.
- the bidirectional prediction mode extends simple averaging to support weighted averaging of two prediction signals.
- the inter prediction unit 244 may include a motion estimation (motion estimation, ME) unit and a motion compensation (motion compensation, MC) unit (both are not shown in FIG. 2 ).
- the motion estimation unit is operable to receive or acquire image block 203 (current image block 203 of current image 17) and decoded image 231, or at least one or more previously reconstructed blocks, e.g., of one or more other/different previously decoded images 231 Reconstruct blocks for motion estimation.
- a video sequence may comprise a current picture and a previous decoded picture 231, or in other words, the current picture and a previous decoded picture 231 may be part of or form a sequence of pictures forming the video sequence.
- encoder 20 may be configured to select a reference block from a plurality of reference blocks in the same or different images in a plurality of other images, and assign the reference image (or reference image index) and/or the position (x, y coordinates) of the reference block ) and the position of the current block (spatial offset) are provided to the motion estimation unit as inter prediction parameters.
- This offset is also called a motion vector (MV).
- the motion compensation unit is configured to obtain, for example, receive, inter-frame prediction parameters, and perform inter-frame prediction according to or using the inter-frame prediction parameters to obtain an inter-frame prediction block 246 .
- Motion compensation performed by the motion compensation unit may include extracting or generating a prediction block from a motion/block vector determined by motion estimation, and may include performing interpolation to sub-pixel precision. Interpolation filtering can generate pixels of other pixels from pixels of known pixels, thereby potentially increasing the number of candidate predictive blocks that can be used to encode an image block.
- the motion compensation unit may locate the prediction block pointed to by the motion vector in one of the reference image lists.
- the motion compensation unit may also generate block- and video-slice-related syntax elements for use by video decoder 30 when decoding image blocks of video slices. Additionally, or instead of slices and corresponding syntax elements, coding block groups and/or coding blocks and corresponding syntax elements may be generated or used.
- the entropy coding unit 270 is used to use an entropy coding algorithm or scheme (for example, a variable length coding (variable length coding, VLC) scheme, a context adaptive VLC scheme (context adaptive VLC, CALVC), an arithmetic coding scheme, a binarization algorithm, Context Adaptive Binary Arithmetic Coding (CABAC), Syntax-based context-adaptive Binary Arithmetic Coding (SBAC), Probability Interval Partitioning Entropy (PIPE) ) encoding or other entropy encoding methods or techniques) are applied to the quantized residual coefficient 209, inter prediction parameters, intra prediction parameters, loop filter parameters and/or other syntax elements, and the obtained bit stream can be encoded by the output terminal 272 21 etc., so that the video decoder 30 etc. can receive and use parameters for decoding.
- Encoded bitstream 21 may be transmitted to video decoder 30 or stored in memory for later transmission or retrieval by video decoder 30 .
- a non-transform based encoder 20 may directly quantize the residual signal without a transform processing unit 206 for certain blocks or frames.
- encoder 20 may have quantization unit 208 and inverse quantization unit 210 combined into a single unit.
- FIG. 3 is an exemplary block diagram of a video decoder 30 according to an embodiment of the present application.
- the video decoder 30 is used to receive the encoded image data 21 (eg, the encoded bit stream 21 ) encoded by the encoder 20 to obtain a decoded image 331 .
- the coded image data or bitstream comprises information for decoding said coded image data, eg data representing image blocks of a coded video slice (and/or coded block group or coded block) and associated syntax elements.
- the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (such as a summer 314), a loop filter 320, a decoded picture buffer (DBP ) 330, mode application unit 360, inter prediction unit 344, and intra prediction unit 354.
- Inter prediction unit 344 may be or include a motion compensation unit.
- video decoder 30 may perform a decoding process that is substantially inverse to the encoding process described with reference to video encoder 100 of FIG. 2 .
- the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer DPB 230, the inter prediction unit 344 and the intra prediction unit 354 also constitute a video encoder 20's "built-in decoder".
- the inverse quantization unit 310 may be functionally the same as the inverse quantization unit 110
- the inverse transform processing unit 312 may be functionally the same as the inverse transform processing unit 122
- the reconstruction unit 314 may be functionally the same as the reconstruction unit 214
- the loop The filter 320 may be functionally the same as the loop filter 220
- the decoded picture buffer 330 may be functionally the same as the decoded picture buffer 230 . Therefore, the explanation of the corresponding elements and functions of the video encoder 20 applies to the corresponding elements and functions of the video decoder 30 accordingly.
- the entropy decoding unit 304 is used to analyze the bit stream 21 (or generally coded image data 21) and perform entropy decoding on the coded image data 21 to obtain quantization coefficients 309 and/or decoded coding parameters (not shown in FIG. 3 ), etc. , such as inter prediction parameters (such as reference image index and motion vector), intra prediction parameters (such as intra prediction mode or index), transformation parameters, quantization parameters, loop filter parameters and/or other syntax elements, etc. either or all.
- the entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to the encoding scheme of the entropy encoding unit 270 of the encoder 20 .
- Entropy decoding unit 304 may also be configured to provide inter-prediction parameters, intra-prediction parameters, and/or other syntax elements to mode application unit 360 , and to provide other parameters to other units of decoder 30 .
- Video decoder 30 may receive video slice and/or video block level syntax elements. Additionally, or instead of slices and corresponding syntax elements, coding block groups and/or coding blocks and corresponding syntax elements may be received or used.
- the inverse quantization unit 310 may be configured to receive a quantization parameter (quantization parameter, QP) (or generally information related to inverse quantization) and quantization coefficients from the encoded image data 21 (for example, parsed and/or decoded by the entropy decoding unit 304), and based on The quantization parameter performs inverse quantization on the decoded quantization coefficient 309 to obtain an inverse quantization coefficient 311 , and the inverse quantization coefficient 311 may also be called a transform coefficient 311 .
- the inverse quantization process may include using quantization parameters calculated by video encoder 20 for each video block in the video slice to determine the degree of quantization, as well as the degree of inverse quantization that needs to be performed.
- the inverse transform processing unit 312 is operable to receive dequantized coefficients 311 , also referred to as transform coefficients 311 , and apply a transform to the dequantized coefficients 311 to obtain a reconstructed residual block 213 in the pixel domain.
- the reconstructed residual block 213 may also be referred to as a transform block 313 .
- the transform may be an inverse transform, such as an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process.
- the inverse transform processing unit 312 may also be configured to receive transform parameters or corresponding information from the encoded image data 21 (eg, parsed and/or decoded by the entropy decoding unit 304 ) to determine the transform to apply to the dequantized coefficients 311 .
- the reconstruction unit 314 (for example, the summer 314) is used to add the reconstruction residual block 313 to the prediction block 365 to obtain the reconstruction block 315 in the pixel domain, for example, the pixel value of the reconstruction residual block 313 and the prediction block 365 pixel values are added.
- the loop filter unit 320 is used (in the encoding loop or after) to filter the reconstructed block 315 to obtain the filtered block 321 to smooth pixel transformation or improve video quality, etc.
- the loop filter unit 320 may include one or more loop filters, such as deblocking filters, pixel adaptive offset (sample-adaptive offset, SAO) filters, or one or more other filters, such as auto Adaptive loop filter (ALF), noise suppression filter (NSF), or any combination.
- the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter. The order of the filtering process may be deblocking filter, SAO filter and ALF filter.
- LMCS luma mapping with chroma scaling
- This process is performed before deblocking.
- the deblocking filtering process can also be applied to internal sub-block edges, such as affine sub-block edges, ATMVP sub-block edges, sub-block transform (sub-block transform, SBT) edges and intra sub-partition (ISP )edge.
- loop filter unit 320 is shown in FIG. 3 as a loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.
- the decoded video block 321 in one picture is then stored in a decoded picture buffer 330 which stores the decoded picture 331 as a reference picture for subsequent motion compensation in other pictures and/or for respective output display.
- the decoder 30 is used to output the decoded image 311 through the output terminal 312 and so on, for displaying or viewing by the user.
- the inter prediction unit 344 may be functionally the same as the inter prediction unit 244 (especially the motion compensation unit), and the intra prediction unit 354 may be functionally the same as the inter prediction unit 254, and is based on the coded image data 21 (eg Partitioning and/or prediction parameters or corresponding information received by the entropy decoding unit 304 (parsed and/or decoded) determines partitioning or partitioning and performs prediction.
- the mode application unit 360 can be used to perform prediction (intra-frame or inter-frame prediction) of each block according to the reconstructed block, block or corresponding pixels (filtered or unfiltered), to obtain the predicted block 365 .
- the intra prediction unit 354 in the mode application unit 360 is used to generate an input frame based on the indicated intra prediction mode and data from a previously decoded block of the current picture.
- a prediction block 365 based on an image block of the current video slice.
- inter prediction unit 344 e.g., motion compensation unit
- the element generates a prediction block 365 for a video block of the current video slice.
- the predicted blocks may be generated from one of the reference pictures in one of the reference picture lists.
- Video decoder 30 may construct reference frame list 0 and list 1 from the reference pictures stored in DPB 330 using a default construction technique.
- slices e.g., video slices
- the same or similar process can be applied to embodiments of encoding block groups (e.g., video encoding block groups) and/or encoding blocks (e.g., video encoding blocks),
- video may be encoded using I, P or B coding block groups and/or coding blocks.
- the mode application unit 360 is configured to determine prediction information for a video block of the current video slice by parsing motion vectors and other syntax elements, and use the prediction information to generate a prediction block for the current video block being decoded. For example, the mode application unit 360 uses some of the received syntax elements to determine the prediction mode (such as intra prediction or inter prediction), the inter prediction slice type (such as B slice, P slice or GPB slice) for encoding the video block of the video slice. slice), construction information for one or more reference picture lists for the slice, motion vectors for each inter-coded video block of the slice, inter prediction state for each inter-coded video block of the slice, Other information to decode video blocks within the current video slice.
- the prediction mode such as intra prediction or inter prediction
- the inter prediction slice type such as B slice, P slice or GPB slice
- construction information for one or more reference picture lists for the slice motion vectors for each inter-coded video block of the slice, inter prediction state for each inter-coded video block of the slice, Other information to decode video blocks within the
- encoding block groups e.g., video encoding block groups
- encoding blocks e.g., video encoding blocks
- video may be encoded using I, P or B coding block groups and/or coding blocks.
- the video encoder 30 shown in FIG. 3 can also be used to segment and/or decode an image using slices (also called video slices), where an image can use one or more slices (typically non-overlapping ) for segmentation or decoding.
- slices also called video slices
- Each slice may include one or more blocks (eg, CTUs) or one or more block groups (eg, coded blocks in the H.265/HEVC/VVC standard and tiles in the VVC standard.
- the video decoder 30 shown in FIG. 3 can also be configured to use slices/coded block groups (also called video coded block groups) and/or coded blocks (also called video coded block groups) ) to segment and/or decode an image, where an image may be segmented or decoded using one or more slices/coded block groups (usually non-overlapping), each slice/coded block group may consist of one or more A block (such as a CTU) or one or more coding blocks, etc., wherein each coding block may be in the shape of a rectangle or the like, and may include one or more complete or partial blocks (such as a CTU).
- slices/coded block groups also called video coded block groups
- coded blocks also called video coded block groups
- video decoder 30 may be used to decode encoded image data 21 .
- decoder 30 may generate an output video stream without loop filter unit 320 .
- the non-transform based decoder 30 can directly inverse quantize the residual signal if some blocks or frames do not have the inverse transform processing unit 312 .
- video decoder 30 may have inverse quantization unit 310 and inverse transform processing unit 312 combined into a single unit.
- the processing result of the current step can be further processed, and then output to the next step.
- further operations such as clipping or shifting operations, may be performed on the processing results of interpolation filtering, motion vector derivation or loop filtering.
- the value of the motion vector is limited to a predefined range according to the representation bits of the motion vector. If the representation bit of the motion vector is bitDepth, the range is -2 ⁇ (bitDepth-1) to 2 ⁇ (bitDepth-1)-1, where " ⁇ " represents a power. For example, if the bitDepth is set to 16, the range is -32768 to 32767; if the bitDepth is set to 18, the range is -131072 to 131071.
- the value of deriving a motion vector (e.g. the MVs of 4 4x4 sub-blocks in an 8x8 block) is constrained such that the maximum difference between the integer parts of the 4 4x4 sub-blocks MVs is not More than N pixels, for example, no more than 1 pixel.
- a motion vector e.g. the MVs of 4 4x4 sub-blocks in an 8x8 block
- bitDepth two ways to limit motion vectors based on bitDepth.
- embodiments of the decoding system 10, encoder 20, and decoder 30, as well as other embodiments described herein may also be used for still image processing or codecs, That is, the processing or coding of a single image in a video codec independently of any previous or successive images.
- image processing is limited to a single image 17, inter prediction unit 244 (encoder) and inter prediction unit 344 (decoder) may not be available.
- All other functions (also referred to as tools or techniques) of video encoder 20 and video decoder 30 are equally applicable to still image processing, such as residual calculation 204/304, transform 206, quantization 208, inverse quantization 210/310, (inverse ) transformation 212/312, segmentation 262/362, intra prediction 254/354 and/or loop filtering 220/320, entropy encoding 270 and entropy decoding 304.
- FIG. 4 is an exemplary block diagram of a video decoding device 400 according to an embodiment of the present application.
- the video coding apparatus 400 is suitable for implementing the disclosed embodiments described herein.
- the video decoding device 400 may be a decoder, such as the video decoder 30 in FIG. 1A , or an encoder, such as the video encoder 20 in FIG. 1A .
- the video decoding device 400 includes: an input port 410 (or input port 410) for receiving data and a receiving unit (receiver unit, Rx) 420; a processor, a logic unit or a central processing unit (central processing unit) for processing data , CPU) 430; a transmitter unit (transmitter unit, Tx) 440 and an output port 450 (or output port 450) for transmitting data; a memory 460 for storing data.
- the video decoding device 400 may also include an optical-to-electrical (OE) component and an electrical-to-optical (EO) component coupled to the input port 410, the receiving unit 420, the transmitting unit 440 and the output port 450, For the exit or entrance of optical or electrical signals.
- OE optical-to-electrical
- EO electrical-to-optical
- the processor 430 is realized by hardware and software.
- Processor 430 may be implemented as one or more processor chips, cores (eg, multi-core processors), FPGAs, ASICs, and DSPs.
- the processor 430 is in communication with the ingress port 410 , the receiving unit 420 , the transmitting unit 440 , the egress port 450 and the memory 460 .
- the processor 430 includes a decoding module 470 .
- the decoding module 470 implements the embodiments disclosed above. For example, the decode module 470 performs, processes, prepares, or provides for various encoding operations. Thus, a substantial improvement is provided to the functionality of the video coding device 400 by the decoding module 470 and the switching of the video coding device 400 to different states is effected.
- decode module 470 is implemented as instructions stored in memory 460 and executed by processor 430 .
- Memory 460 including one or more magnetic disks, tape drives, and solid-state drives, may be used as an overflow data storage device for storing programs when such programs are selected for execution, and for storing instructions and data that are read during execution of the programs.
- Memory 460 may be volatile and/or nonvolatile, and may be a read-only memory (ROM), random access memory (random access memory, RAM), ternary content-addressable memory (ternary content-addressable memory (TCAM) and/or static random-access memory (static random-access memory, SRAM).
- ROM read-only memory
- RAM random access memory
- TCAM ternary content-addressable memory
- SRAM static random-access memory
- Scalable video coding also known as scalable video coding, is an extension coding standard of the current video coding standard (generally an extension standard of advanced video coding (AVC) (H.264) scalable video coding (scalable video coding) , SVC), or the extended standard Scalable High Efficiency Video Coding (SHVC)) of High Efficiency Video Coding (HEVC) (H.265).
- AVC advanced video coding
- SHVC Scalable High Efficiency Video Coding
- HEVC High Efficiency Video Coding
- the basic structure in scalable video coding can be called a hierarchy.
- the scalable video coding technology can obtain code streams of different resolution levels by performing spatial classification (resolution classification) on original image blocks.
- the resolution can refer to the size of the image block in pixels.
- the resolution of the low-level is lower, and the resolution of the high-level is not lower than the resolution of the low-level; or, through the temporal domain of the original image block Grading (frame rate grading), you can get streams of different frame rates.
- the frame rate can refer to the number of image frames contained in the video per unit time.
- the frame rate of the low-level is lower, and the frame rate of the high-level is not lower than the frame rate of the low-level; or, by performing quality domain classification on the original image blocks , you can get code streams of different encoding quality levels.
- the encoding quality may refer to the quality of the video, and the degree of image distortion at the low level is greater, while the degree of image distortion at the high level is not higher than the degree of image distortion at the low level.
- a layer called the base layer is the lowest layer in scalable video coding.
- the base layer image blocks are encoded using the lowest resolution; in the temporal domain classification, the base layer image blocks are encoded using the lowest frame rate; in the quality domain classification, the base layer image blocks are encoded using the highest QP or the lowest code rate encoding. That is, the base layer is the lowest quality layer in scalable video coding.
- a layer called an enhancement layer is a layer above the base layer in scalable video coding, and can be divided into multiple enhancement layers from low to high.
- the bottom enhancement layer Based on the coding information obtained by the basic layer, the bottom enhancement layer encodes the combined code stream, which has a higher coding resolution than the basic layer, or a higher frame rate, or a higher code rate than the basic layer.
- the higher-level enhancement layer can encode higher-quality image blocks according to the coding information of the lower-level enhancement layer.
- FIG. 5 is an exemplary hierarchical diagram of scalable video coding in the present application.
- the original image block after the original image block is sent to the scalable encoder, it can be layered into base layer image block B according to different encoding configurations. and enhancement layer image blocks (E1 ⁇ En, n ⁇ 1), and then encode them respectively to obtain a code stream including a base layer code stream and an enhancement layer code stream.
- the base layer code stream is generally a code stream obtained by using the lowest resolution, the lowest frame rate, or the lowest encoding quality parameters for image blocks.
- the code stream of the enhancement layer is based on the basic layer, and the code stream obtained by encoding image blocks with high resolution, high frame rate or high coding quality parameters is superimposed.
- the spatial domain level, time domain level or quality level of coding will also become higher and higher.
- the encoder transmits the code stream to the decoder, the transmission of the basic layer code stream is given priority, and when the network has a margin, the higher-level code stream is gradually transmitted.
- the decoder first receives the basic layer code stream and decodes it, and then decodes the code stream with higher and higher levels in the space domain, time domain or quality layer by layer according to the received enhancement layer code stream in the order from low level to high level. Then, the higher-level decoding information is superimposed on the lower-level reconstruction blocks to obtain higher-resolution, higher-frame-rate or higher-quality reconstruction blocks.
- each image in a video sequence is usually partitioned into a non-overlapping set of blocks, usually encoded at the block level.
- encoders usually process or encode video at the block (image block) level, for example, through spatial (intra) prediction and temporal (inter) prediction to generate predicted blocks; from image blocks (currently processed/to be processed block) to obtain a residual block; transforming the residual block in the transform domain and quantizing the residual block can reduce the amount of data to be transmitted (compressed).
- the encoder also needs to undergo inverse quantization and inverse transformation to obtain the reconstructed residual block, and then add the pixel value of the reconstructed residual block and the pixel value of the predicted block to obtain the reconstructed block.
- the reconstructed block of the base layer refers to the reconstructed block obtained by performing the above operation on the base layer image block obtained by layering the original image block.
- FIG. 6 is an exemplary flow chart of the encoding method of the enhancement layer of the present application. As shown in FIG. The corresponding pixel points in the prediction block of the layer are calculated to obtain the residual block of the basic layer, and then the residual block of the basic layer is divided, transformed and quantized, together with the basic layer encoding control information, prediction information, motion information, etc. Perform entropy coding together to obtain the code stream of the basic layer.
- the encoder performs inverse quantization and inverse transformation on the quantized quantized coefficients to obtain the reconstructed residual block of the base layer, and then sums the corresponding pixels in the prediction block of the base layer and the reconstructed residual block of the base layer to obtain the base layer Rebuild blocks.
- the image below can refer to the largest coding unit (largest coding unit, LCU) in the entire frame of image, or the entire frame of image, or the region of interest (region of interest) in the entire frame of image interest, ROI), that is, an image area to be processed specified in the image, or a slice image (Slice) in a frame of image.
- LCU largest coding unit
- the present application provides an image encoding and decoding method to solve the problem that the scalable encoding and decoding technology is greatly affected by changes in channel conditions and may cause blurred screens.
- Fig. 7 is an exemplary flow chart of the image encoding method of the present application.
- Process 700 may be performed by video encoder 20 (or encoders).
- the process 700 is described as a series of steps or operations. It should be understood that the process 700 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 7 .
- Process 700 includes the following steps:
- Step 701. Determine the reference frame number of the current image according to the channel feedback information.
- the channel feedback information comes from a corresponding decoding end and/or a network device on a transmission link.
- the encoding end can send the code stream to one or more decoding ends, so that the decoding end that receives the code stream parses the code stream to reconstruct the image frame.
- the code stream is from the encoding end to the decoding end.
- the equipment at the end (decoding end) can also include network equipment on the transmission link between the two, such as switches, repeaters, base stations, hubs, routers, firewalls, bridges, gateways, network interface cards (network interface card) , NIC), printers, modems, fiber optic transceivers, fiber optic cables, etc.
- the decoding end may send channel feedback information to the encoding end.
- the channel feedback information may also be sent to the encoding end by the network device on the transmission link. This application does not specifically limit the sender of the channel feedback information.
- the decoding end and/or the network device on the transmission link can analyze the received code stream to determine the frame number and layer number corresponding to the code stream, and then send channel feedback information to the encoding end, which carries the frame corresponding to the aforementioned code stream number and layer number to inform the encoder which layer of which frame it has received.
- the decoder can periodically send channel feedback information to the encoder, which carries the frame number and layer number corresponding to the latest received code stream; or, it can also be parsed to start receiving the code stream of the next frame ( Judging based on the frame number in the code stream) to send channel feedback information, which carries the frame number of the previous frame and the highest layer number received in the previous frame; or, it can also be resolved when the current image is received (based on the frame number in the code stream) Judging by the highest layer number of the current image) Send channel feedback information, which carries the frame number of the current image and the highest layer number received by the current image.
- the decoding end may also send channel feedback information in other ways, which is not specifically limited.
- the channel feedback information is generated based on the sent code stream.
- the encoding end does not have to wait for the feedback from the decoding end or the network equipment on the transmission link when sending the code stream, and can know the channel status based on the situation of the communication interface sending and receiving signals.
- the transmission of the code stream is adjusted according to the known channel conditions, and the encoding end can assume that the transmitted code stream can be received by the decoding end. Therefore, the encoder can generate channel feedback information based on the frame number and layer number corresponding to the sent code stream.
- the encoding end may periodically generate channel feedback information, or may also generate channel feedback information every time a code stream of an image frame is sent, which is not specifically limited.
- the channel feedback information is used to indicate the information of the image frame received by the decoding end.
- the total number of layers of the current image frame is 4, and the encoding end encodes the current image frame to obtain the code stream corresponding to the 4 layers, but the decoding end only receives the code stream corresponding to the 3 layers of the current image frame during transmission.
- the encoding end uses the reconstructed image of the fourth layer of the current image as a reference image, but the decoding end does not receive the code stream corresponding to the fourth layer, so the decoding end cannot use the fourth layer of the current image.
- the reconstructed image of the layer is used as a reference image to decode the next frame, resulting in a decoding error of the next frame. Therefore, in this application, the encoding end first obtains channel feedback information, and based on the channel feedback information, determines the information of the image frame received by the decoding end, including the frame number and layer number of the image frame received by the decoding end, and then determines the next step based on this.
- the reference frame of the frame so as to avoid the situation in the above example, and ensure that the reference images used by the encoding end and the decoding end are consistent.
- the encoding end when there is only one decoding end, can first obtain multiple channel feedback information from the decoding end, and then use the frame number closest to the current image among the multiple frame numbers indicated by the multiple channel feedback information The frame number is determined as the reference frame number of the current image.
- the channel feedback information indicates the information of the image frame received by the decoding end, including the frame number and layer number of the image frame received by the decoding end.
- the encoding end will obtain multiple channel feedback information, which reflect the frame number and layer number corresponding to the code stream received by the decoding end at different times, so the multiple channels indicated by the aforementioned multiple channel feedback information can be respectively
- the frame number closest to the current image among the frame numbers is determined as the reference frame number of the current image.
- the encoding end obtains 3 channel feedback information, one of which indicates the frame number is 1, the other indicates the frame number is 2, and the third indicates the frame number is 1, and the current image is the third frame, so the encoding end It can be determined that the reference frame number of the current image is 2.
- the encoding end when there are multiple decoding ends, can first obtain multiple sets of channel feedback information corresponding to multiple decoding ends, and each set of channel feedback information includes multiple channels Feedback. Then determine one or more common frame numbers according to multiple sets of channel feedback information.
- the common frame number refers to the frame number indicated by at least one channel feedback information in each group of channel feedback information, and then determine according to one or more common frame numbers.
- the reference frame number of the current image when there are multiple decoding ends, the encoding end can first obtain multiple sets of channel feedback information corresponding to multiple decoding ends, and each set of channel feedback information includes multiple channels Feedback. Then determine one or more common frame numbers according to multiple sets of channel feedback information.
- the common frame number refers to the frame number indicated by at least one channel feedback information in each group of channel feedback information, and then determine according to one or more common frame numbers.
- the reference frame number of the current image when there are multiple decoding ends, the encoding end can first obtain multiple sets of channel feedback information corresponding to multiple decoding ends, and each set of
- the channel feedback information indicates the information of the image frame received by the decoding end, including the frame number and layer number of the image frame received by the decoding end.
- the encoding end will obtain a plurality of channel feedback information corresponding to the decoding end.
- the encoding end can determine the common frame number according to multiple sets of channel feedback information corresponding to multiple decoding ends.
- the common frame number refers to the frame number indicated by at least one channel feedback information in each set of channel feedback information, that is, the common frame number is The frame number indicated in a set of channel feedback information fed back by each decoder.
- the encoder can determine the common frame number as the reference frame number of the current image; if there are multiple common frame numbers, the largest among the multiple common frame numbers can be determined as the current image's reference frame number Reference frame number.
- decoder A corresponds to 3 channel feedback information, and the frame numbers indicated are 1, 2, 3, and 4 respectively
- decoder B corresponds to 3 channel feedback information, and the frame numbers indicated respectively are 2, 3, 4, and 5
- the decoding end C corresponds to 3 pieces of channel feedback information, and the frame numbers indicated are 2, 3, 4, and 6 respectively. It can be determined that the common frame numbers are 2, 3, and 4, and the largest one is 4, so the reference frame number of the current image is 4.
- Step 702. Obtain a first set of reference layer numbers of the first image frame corresponding to the reference frame number.
- the first set of reference layer numbers includes layer numbers of N1 layers.
- the first image frame corresponding to the reference frame number is the image frame indicated by the reference frame number determined in step 701 .
- the maximum layer number L max of the image frames in the video can be preset when performing scalable encoding, for example, 6.
- the maximum layer number can be a threshold, that is, each image frame can be layered at most no more than The number of layers, but different image frames may have different total layers in actual encoding.
- the total number of layers of the first image frame is denoted by L1, and L1 may be less than or equal to the aforementioned maximum layer number L max .
- N1 layers can be used as reference images for subsequent image frames, 1 ⁇ N1 ⁇ L1, and the layer numbers of the N1 layers form the first reference layer of the first image frame number set, that is, the first image frame corresponds to the first reference layer number set, and only the layered reconstructed image whose layer number is in the first reference layer number set can be used as a reference image for subsequent image frames.
- N1 can be set according to chip capabilities, or dynamically set according to real-time encoding and network feedback.
- each frame in the video may have an independent and different set of reference layer numbers; or, the image frames in the video are divided into multiple groups, and a group of image frames may have the same set of reference layer numbers; or, the image frames in the video may have the same set of reference layer numbers; All image frames may have the same set of reference layer numbers. This application does not specifically limit it.
- Step 703 Determine the reference layer number of the current image according to the channel feedback information and the first set of reference layer numbers.
- the encoding end may determine the highest layer number indicated by the channel feedback information indicating the reference frame number as the target layer number.
- the reference frame number is determined according to the channel feedback information, and the encoding end may further determine the target layer number based on the reference layer number indicated by the channel feedback information indicating the corresponding reference frame number.
- the layer number indicated by the channel feedback information is the highest layer number, which is directly determined as the target layer number; when there are multiple channel feedback information indicating the reference frame number, the The largest of the layer numbers respectively indicated by the multiple channel feedback information is determined as the target layer number.
- the frame number indicated by the three channel feedback information obtained by the encoder is 2, and 2 is the reference frame number of the current image, the layer number indicated by one of the channel feedback information is 3, and the layer number indicated by the other channel feedback information is 4, and the layer number indicated by another piece of channel feedback information is 5, so in order to improve the image quality, the layer number 5 can be determined as the target layer number.
- the target layer number is determined as the reference layer number of the current image; or, when the target layer number is not included in the reference layer number set, the reference layer number is smaller than and closest to The layer number of the target layer number is determined as the reference layer number of the current image.
- step 701 the reference frame number of the current image is determined, and it can be determined that the reference image of the current image comes from the image frame corresponding to the reference frame number.
- step 702 the reference layer number set of the image frame corresponding to the reference frame number is determined, and it can be determined that the reference image of the current image is the layer number of N1 layers included in the reference layer number set of the image frame corresponding to the reference frame number corresponding to one of the reconstructed images.
- the encoding end when there are multiple decoding ends, can obtain the highest layer number indicated by the channel feedback information indicating the reference frame number in each group of multiple sets of channel feedback information, and combine the multiple highest layer numbers The smallest of the numbers is determined as the target layer number.
- the reference frame number is determined according to the channel feedback information, and the encoding end may further determine the target layer number based on the channel feedback information indicating the reference frame number. Since the reference frame number is firstly the common frame number indicated by multiple groups of channel feedback information corresponding to multiple decoding ends, it is possible to obtain at least one channel feedback information indicating the reference frame number corresponding to each decoding end, and determine the indication reference of each decoding end. The largest of the layer numbers indicated by the channel feedback information of the frame number, and then take the minimum value from the highest layer numbers corresponding to each decoding end as the target layer number.
- the reference frame number is 2, and the layer numbers indicated by the channel feedback information indicating the reference frame number 2 at the decoder A include 1, 3, and 4, then the highest layer number 4 is taken corresponding to the reference frame number 2;
- the layer number indicated by the channel feedback information indicating the reference frame number 2 includes 1, 3, and 6, then corresponding to the reference frame number 2, the highest layer number 6 is taken, and the channel feedback information indicating the reference frame number 2 at the decoding end C indicates If the layer numbers include 3, 4, and 6, the highest layer number 6 is taken corresponding to the reference frame number 2; then the minimum value of the highest layer number is taken, so the target layer number can be determined to be 4.
- the target layer number is determined as the reference layer number of the current image; or, when the target layer number is not included in the reference layer number set, the reference layer number less than And the layer number closest to the target layer number is determined as the reference layer number of the current image.
- step 701 the reference frame number of the current image is determined, and it can be determined that the reference image of the current image comes from the image frame corresponding to the reference frame number.
- step 702 the reference layer number set of the image frame corresponding to the reference frame number is determined, and it can be determined that the reference image of the current image is the layer number of N1 layers included in the reference layer number set of the image frame corresponding to the reference frame number corresponding to one of the reconstructed images.
- Step 704 Perform scalable video coding on the current image according to the reference frame number and the reference layer number to obtain a code stream.
- the reconstructed image corresponding to the reference frame number and reference layer number can be extracted from the decoded picture buffer (DPB) as the reference image of the current image, so that based on the Scalable encoding is performed on the current image with reference to the image to obtain a code stream.
- DPB decoded picture buffer
- the coding end may also carry the reference layer number set of the above-mentioned image frame in the code stream.
- the reference frame number of the current image is determined based on the channel feedback information, and then the reference layer number of the current image is determined based on the reference frame number and a preset reference layer number set.
- the reference layer number set includes the reference frame number corresponding to The layer numbers of the N layers of the image frame, and then obtain the reference image of the current image based on the reference frame number and the reference layer number.
- the reference image obtained in this way fully takes into account the change of the channel, ensuring that the reference image used by the encoding end and the decoding end The image is consistent, improving the coding efficiency and avoiding the situation of blurred screen.
- N1 layered reconstructed images are stored in the DPB for the image frame corresponding to the reference frame number.
- the encoder needs to store 6-layer reconstructed images in the DPB.
- the reconstructed image is stored in DPB.
- the number of reconstructed images stored in the DPB in the present application is reduced, the writing bandwidth is reduced, the encoding processing speed can be improved, and the space of the DPB can be saved.
- the encoding end may first determine the frame number closest to the current image among the multiple frame numbers indicated by the multiple channel feedback information as the target frame number, and determine the channel feedback information indicating the target frame number Whether the indicated highest layer number is greater than or equal to the highest layer number in the second reference layer number set, which is the reference layer number set of the second image frame corresponding to the target frame number. When the aforementioned condition is met (ie greater than or equal to), the target frame number is then determined as the reference frame number.
- the encoding end determines that the reference frame number of the fourth frame is 3 and the reference layer number is 4 according to the channel feedback information, but in fact the decoding end receives the sixth layer of the image frame whose frame number is 3, then the decoding end is decoding
- the reference frame number may be determined as 3, and the reference layer number is determined as 6.
- the encoding and decoding end uses different reference images for the "fourth frame", resulting in inconsistent encoding and decoding, resulting in decoding errors. .
- this application provides the above scheme.
- the encoding end does not directly determine the frame number obtained according to the above conditions as the reference frame number, but as the target frame number, and judges the decoding according to the channel feedback information indicating the target frame number. Whether the end has received the image layer greater than or equal to the highest layer number in the second reference layer number set.
- the highest layer number indicated by the channel feedback information has met the condition of being greater than or equal to the highest layer number in the second reference layer number set, even if the decoding end has received a higher layer of the second image frame, according to the reference layer number determined in step 703
- the highest layer number in the second reference layer number set will still be selected as the reference layer number, so the target frame number can be directly used as the reference frame number at this time, and there will be no inconsistency between the reference layer numbers selected by the above-mentioned codec The problem.
- the encoder can determine the specified frame number among the multiple frame numbers indicated by the multiple channel feedback information as the reference frame number of the current image. For example, the encoding end obtains 3 channel feedback information, one of which indicates the frame number is 1, the other indicates the frame number is 2, and the third indicates the frame number is 1, and the current image is the third frame, so the encoding end The determined target frame number is 2.
- the specified frame number may be a frame number that is 2 frames earlier than the current image, or a fixed frame number, which is not specifically limited.
- the designated frame number and the designated layer number are preset, and the encoding end may determine the designated frame number as the reference frame number of the current image.
- the specified layer number is included in the reference layer number set, the specified layer number is determined as the reference layer number of the current image; or, when the specified layer number is not included in the reference layer number set, the reference layer number is smaller than and closest to The layer number of the specified layer number is determined as the reference layer number of the current image.
- the encoder can directly specify the reference frame number and the reference layer number of the current image, which can improve the efficiency of determining the reference image.
- the reference frame number of the previous frame of the current image It is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the reference layer number of the current image.
- the reference layer number set Rx ⁇ 3,5 ⁇
- the target layer number is 2
- there is no layer number less than 2 in the reference layer number set Rx so the reference frame number and reference layer number determined in the previous frame can be directly given to current image to use.
- the encoder can set the upper layer number 1 in each reference layer number set, so that there is no case that the reference layer number set does not include a layer number smaller than the target layer number, so as to determine the reference layer number of the current image is 1.
- the encoding end when there is only one decoding end, may carry the reference frame number determined in step 701 in the code stream, and the decoding end may use the logic of step 703 to determine the reference layer number.
- the encoding end may also carry the reference frame number determined in step 701 and the reference layer number determined in step 703 in the code stream, so that the decoding end parses the code stream to directly obtain the reference frame number and reference layer number.
- the encoding end may also carry the reference frame number determined in step 701 and the reference layer number determined in step 703 in the code stream, so that the decoding end Analyze the code stream to directly obtain the reference frame number and reference layer number.
- the channel feedback information when the current image is an image slice, includes the image slice number of the image frame received by the decoding end and the layer number corresponding to the image slice number; according to the channel feedback information and the first A reference layer number set to determine the reference layer number of the current image, including: if the image slice number of the current image is the same as the image slice number of the image frame received by the decoder, the image slice of the image frame received by the decoder The layer number corresponding to the number is determined as the target layer number; when the target layer number is included in the first reference layer number set, the target layer number is determined as the reference layer number of the current image; or, when the first reference layer number set does not include When the target layer number is selected, the layer number in the first reference layer number set that is smaller than and closest to the target layer number is determined as the reference layer number of the current image.
- a frame of image can be divided into multiple image slices (Slice) for encoding and transmission. Therefore, when the current image is an image slice, in addition to the frame number of the image frame received by the decoder, the channel feedback information also includes the frame number received by the decoder. The image slice number of the image frame and the layer number corresponding to the image slice number.
- the encoder can first use the above method to determine the reference frame number of the current image, and then determine the reference layer number of the current image according to the image slice number of the current image and the first reference layer number set, that is, the channel feedback information indicating the reference frame number Find the one with the same image slice number as the current image among the multiple indicated image slice numbers, and then determine the layer number corresponding to the same image slice number as the target layer number, and start from the first reference layer number based on the target layer number Determine the reference layer number of the current image in the set.
- the image slice number of the current image is 1, then the reference layer number of the current image is obtained from the layer number 3 corresponding to the aforementioned image slice number 1 and the first reference layer number set, and the reference layer number is 3.
- the reference layer number of the current image is obtained from the layer number 4 corresponding to the aforementioned image slice number 2 and the first reference layer number set, and its reference layer number is 3.
- the image slice number of the current image is 3, then the reference layer number of the current image is obtained according to the layer number 5 corresponding to the aforementioned image slice number 3 and the first reference layer number set, and its reference layer number is 5.
- the image slice number of the current image is 4, then the reference layer number of the current image is obtained according to the layer number 6 corresponding to the image slice number 4 and the first reference layer number set, and its reference layer number is 5.
- FIG. 8 is an exemplary flow chart of the image decoding method of the present application.
- Process 800 may be performed by video decoder 30 (or decoders).
- the process 800 is described as a series of steps or operations. It should be understood that the process 800 may be performed in various orders and/or concurrently, and is not limited to the order of execution shown in FIG. 8 .
- Process 800 includes the following steps:
- Step 801 acquire code stream.
- the decoding end can obtain the code stream through the transmission link with the encoding end.
- Step 802 parse the code stream to obtain the reference frame number of the current image.
- the encoding end carries the reference frame number of the image frame in the video in the code stream, so the decoding end can determine the reference frame number of the current image by analyzing the code stream.
- Step 803. Obtain a third reference layer number set of the third image frame corresponding to the reference frame number.
- the third reference layer number set includes layer numbers of N2 layers, 1 ⁇ N2 ⁇ L2, and L2 represents the total number of layers of the third image frame.
- the decoder can parse the code stream to obtain the set of reference layer numbers of the image frames in the video. For descriptions about the set of reference layer numbers, reference may be made to step 702 in the embodiment shown in FIG. 7 , which will not be repeated here.
- Step 804 Determine the reference layer number of the current image according to the third set of reference layer numbers.
- the decoding end may determine the highest layer number among the layer numbers of multiple reconstructed images of the decoded third image frame.
- the highest layer number is determined as the reference layer number of the current image; or, when the third reference layer number set of the third image frame does not include the highest
- the layer number in the third reference layer number set that is smaller than and closest to the highest layer number is determined as the reference layer number of the current image.
- the reference frame number of the previous frame of the current image is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the current frame number.
- the reference layer number of the image is determined as the reference frame number of the current image.
- step 703 in the embodiment shown in FIG. 7 , which will not be repeated here.
- Step 805 Perform video decoding according to the reference frame number and the reference layer number to obtain a reconstructed image of the current image.
- the decoding end can obtain the reconstructed image corresponding to the reference frame number and the reference layer number from the DPB, and then use the obtained reconstructed image corresponding to the reference frame number and the reference layer number as a reference image, and perform video decoding according to the reference image to obtain the current image reconstructed image.
- the decoder after the decoder performs scalable decoding to obtain the reconstructed image of the L3 layer of the current image, it can store the reconstructed images of the N3 layers of the current image in the DPB, and the fourth reference layer of the current image
- the number set includes layer numbers of M layers, M layers include N3 layers, 1 ⁇ M ⁇ L3, L3 represents the total number of layers of the current image; or, the reconstruction of the highest layer in the N3 layers Images are stored in DPB.
- the fourth reference layer number set of the current picture can be obtained by analyzing the code stream, but when the decoding end is decoding, the layer number L4 of the highest layer obtained for the current picture may be less than the total number of layers L3 of the current picture, so it is stored in the DPB
- the layer number L4 of the highest layer obtained for the current picture may be less than the total number of layers L3 of the current picture, so it is stored in the DPB
- the decoder Whenever the decoder obtains the reconstructed image of a layer of the current image, it can judge whether the layer number of this layer belongs to the fourth reference layer number set of the current image, and if it does, it can store the reconstructed image of this layer in the DPB, and If not, it does not need to be stored in the DPB, that is, each frame of image only needs to be stored in N3 hierarchically reconstructed images.
- the decoding end after the decoding end performs scalable decoding to obtain the reconstructed images of each layer of the current image, only the reconstructed image of the highest layer among the N3 layers may be saved in the DPB. Every time the decoder acquires the reconstructed image of a layer of the current image, it can judge whether the layer number of this layer belongs to the reference layer number set of the current image. The reconstructed image that has been stored in the image before, and if it does not belong, it does not need to be stored in the DPB.
- the decoder only needs to keep the reconstructed image whose layer number is 3 of the current image in the DPB. In this way, compared with related technologies, the number of reconstructed images stored in the DPB in the present application is reduced, the writing bandwidth is reduced, the decoding processing speed can be improved, and the space of the DPB can be saved.
- the decoding end may send the reconstructed image of the L4 layer of the current image for display.
- the decoder decodes the current image
- what is stored in the DPB is the reconstructed image whose layer number belongs to the fourth reference layer number set of the current image or the layer number belongs to the fourth reference layer number set of the current image and is the highest among them.
- the reconstructed image with layer number 4 is sent to display when displayed, and the reconstructed image with layer number 1 and 3 is stored in DPB for reference in subsequent image frame decoding. Reconstruct the image. In this way, the image quality displayed on the decoding end is better, which ensures the viewing experience of the user and saves the storage space of the DPB.
- the decoding end may determine the frame number and layer number of the received image frame, and then send channel feedback information to the encoding end, where the channel feedback information is used to indicate the aforementioned frame number and layer number.
- the decoding end when it is determined to start parsing the second frame according to the frame number in the code stream, the decoding end sends channel feedback information to the encoding end, and the channel feedback information is used to indicate the frame number of the first frame and the received first frame
- the layer number of the highest layer, the first frame is the previous frame of the second frame.
- the decoding end when it is determined that the first frame has been received according to the layer number of the received image frame, the decoding end sends channel feedback information to the encoding end, and the channel feedback information is used to indicate the frame number of the first frame and the received The layer number of the highest layer of the first frame.
- the decoder can send channel feedback information when it parses to start receiving the code stream of the next frame (judging based on the frame number in the code stream), which carries the frame number of the previous frame and the highest frame number received in the previous frame. layer number; or, when it is resolved that the current image is received (judged based on the highest layer number of the current image in the code stream), channel feedback information can be sent, which carries the frame number of the current image and the highest layer number received by the current image .
- the decoding end sends channel feedback information in the above two cases, which can ensure that the highest layer received by any frame obtained by the encoding end is consistent with the highest layer of the same frame actually received by the decoding end, thereby avoiding the occurrence of The codec of 's has errors due to the use of different reference images.
- the decoding end can also periodically send channel feedback information to the encoding end, which carries the frame number and layer number corresponding to the latest received code stream.
- the decoding end may also send the channel feedback information in other ways, which is not specifically limited.
- the method when the current image is an image slice, the method further includes: determining an image slice number of the received image frame; correspondingly, the channel feedback information is also used to indicate the image slice number.
- a frame of image is divided into multiple image slices (Slice) for encoding and sending.
- the decoder can determine the received frame number and layer number at the same time. The slice number, and then carry the frame number of the received image slice, the image slice number, and the layer number corresponding to the image slice number in the channel feedback information.
- the above process of processing by image can be processed by image slices in the same way.
- the encoding end determines the total number of layers of scalable video coding, sets the set of reference layer numbers, and sends the total number of layers and the set of reference layer numbers to the decoding end.
- the layer numbers in the reference layer number set will not be greater than the total number of layers L max of the scalable coding. When a layer number in the reference layer number set is greater than the total number of layers in scalable coding, this layer number will be ignored by the encoding side.
- the reference layer number set is set by the encoder.
- the number of layer numbers in the reference layer number set is less than or equal to the total layer number L max .
- the setting method is not limited.
- the total number of layers and the set of reference layer numbers can be sent to the decoding end in the form of code stream, or can be determined through negotiation between the decoding end and the encoding end, which is not specifically limited in this application.
- Each frame may have an independent and different set of reference layer numbers, or a group/all image frames may have the same set of reference layer numbers at the same time, which is not limited here.
- the encoding end performs scalable encoding on the current image, and saves the reconstructed image according to the set of reference layer numbers.
- the encoding end obtains a frame of image, and encodes the image into a multi-level code stream with the total number of layers in step 1 according to the resolution or quality.
- the coded reconstructed image of this layer is stored in DPB for reference of subsequent image frames.
- the encoded hierarchical code stream is transmitted through the network, and the network may be a transmission network with packet loss characteristics.
- the priority can be sorted according to the different levels of the encoded code stream, and discarded according to the priority from low to high. For example, the base layer code stream has the highest priority and needs to be maximized to ensure that it can be sent successfully; the higher the enhancement layer, the higher the priority. The lower the priority, the lower the priority to ensure successful transmission. In order to ensure the passage of higher priority layers, these lower priority layer streams can be actively discarded and not transmitted.
- the decoding end feeds back the received frame number and layer number information, indicating which layer of which frame was received.
- the transmission completion here refers to the end moment of the transmission within a certain period of time, for example, before the encoded frame, it means that the previous frame transmission is completed; or before the encoded code stream of the next frame is sent to the transmission module, it means that the previous frame Frame transmission is completed; or all layers of the previous frame have been transmitted, indicating that the transmission of the previous frame is completed, which is not limited here.
- the encoder can determine the specified frame number among the multiple frame numbers indicated by the channel feedback information is the reference frame number, and the reference frame number taken at this time is the frame that confirms that the decoding end has been received. For example, to encode the 3rd frame, if the frame number received by the decoder includes the 1st frame, you can specify the reference to the 1st frame.
- the decoding end obtains the total number of layers of the scalable video coding and the set information of reference layer numbers.
- the decoder can obtain the total number of layers and the set of reference layer numbers by parsing the code stream, or negotiate with the encoder to determine the total number of layers and the set of reference layer numbers, which is not specifically limited in this application.
- the decoding end obtains the scalable video stream for decoding, and puts the decoded reconstructed image into the DPB according to the received layer number of each frame and the set of reference layer numbers of the frame.
- the decoder After the decoder receives the code stream, it sends the code stream directly to the decoder for decoding.
- the decoding end parses the code stream in order from low level to high level, and decodes the base layer and enhancement layer of a frame of image. After each layer of reconstructed image is obtained through decoding, it will be judged whether the reconstructed image of this layer needs to be sent to the DPB according to the set of reference layer numbers of the frame.
- the reconstructed image of that layer is put into the DPB; if it is decoded to a higher layer of the frame, and the layer number of the layer is also If it is in the reference layer number set of the frame, the image of this layer is put into the DPB, and replaces the reconstructed image of the lower layer of the frame entering the DPB, as the reference layer image of the frame, which will be referenced by subsequent frames.
- the replacement here can be rewriting and overwriting of image data, reusing a storage space; it can also mark this layer as a reference layer in the form of annotation, mark the lower layer as a non-reference layer, and reserve the storage space of the reference layer, Free the storage space of the non-reference layer.
- the decoding end will feedback the received frame number and layer number corresponding to the frame.
- the decoder may feed back the received frame number and layer number corresponding to the frame each time it receives a layer of data in the frame, and perform feedback in ascending order of the layer numbers.
- the decoding end decodes a frame of data, obtains the reconstructed image of the highest layer of the frame, and sends the image to the display module for display.
- the decoding end receives the highest layer code stream of the frame and decodes the highest layer reconstructed image of the frame. At this time, the image can be directly sent to the display module. Here, judging whether it is the highest layer of the frame can be obtained by analyzing the layer information in the code stream and judging whether the layer number of this layer is equal to the total number of layers.
- the second is that the decoding end receives the non-highest layer code stream of the frame. After decoding and obtaining the reconstructed image of this layer, the next decoded code stream belongs to the basic layer code stream of the next frame. At this time, the decoded The reconstructed image of this layer is sent to the display module as the highest layer reconstructed image of the frame.
- the reconstructed image of the highest layer obtained in this step is not necessarily the reconstructed image stored in the DPB, only the reconstructed images of those layers whose layer number is in the reference layer number set of the frame can be stored in the DPB.
- the coded frame needs to be used as a reference frame, and the reconstructed image of the frame into the DPB is directly acquired for reference and decoding is completed.
- the reference layer number set of the image can be obtained, which is used to store the reconstructed image of the corresponding layer in the DPB queue according to step 2 after the reconstructed images of different layers of the image are decoded.
- the encoding and decoding end does not need a large number of writing operations to write the reconstructed images of unnecessary layers into the data memory of the DPB, which reduces the writing bandwidth and improves the encoding and decoding processing speed.
- the end-to-end encoding scheme is based on channel feedback information, so even if a frame is lost, there will be no phenomenon that the decoding end cannot find the reference image, resulting in blurred decoding or incorrect decoding, which improves the subjective experience.
- the channel feedback information can well guide the selection of the reference image at the encoding end, and use the received better reference layer for reference, which improves the encoding and compression efficiency.
- the reconstruction layer image sent to DPB by the decoder can be different from the image sent for display.
- the image sent for display can have a layer number greater than the reconstruction layer image sent to DPB, and the image quality is better. Therefore, it can be sent to display in this scheme. Better image quality ensures the user's viewing experience.
- the encoding end encodes and sends the code stream to multiple decoding ends. Therefore, multiple connections between one encoding end and multiple decoding ends will be established here, and the code stream transmitted by each channel is the same code stream.
- Step 3 of the encoding end in Embodiment 1 is the same as Step 3 of the encoding end in Embodiment 1, but there are some differences in the feedback information based on the channel.
- the encoder needs to receive channel feedback information from all decoders, that is, it needs to obtain the reception status of the current image at all decoders, including the frame numbers and layer numbers received by all decoders, different The layer number of the highest layer of the same frame received by the decoder may be different.
- the layer number that is smaller than the target layer number (determined by referring to the above method embodiment) and closest to the target layer number is used as the reference layer number.
- step 2 of the decoding end in Embodiment 1 it is the same as step 2 of the decoding end in Embodiment 1, but when storing the reconstructed images of different layers of the image into the DPB, each decoding end needs to retain the reconstructed images of all layer numbers in the reference layer number set of the frame, The obtained high-level reconstructed image cannot replace the low-layer reconstructed image of the frame entering the DPB, because the decoding end cannot know which layer is used as the reference layer for the subsequent image frame.
- This embodiment gives an example of code stream syntax and semantics based on specified layer reference based on channel feedback information.
- the encoding end needs to write the reference layer number set of each frame into the code stream and transmit it to the decoding end so that the decoding end can obtain the information.
- the code stream information in this embodiment is not limited to being added to code streams of standard protocols such as H.264 and H.265, and may also be added to non-standard code streams. This embodiment takes the H.265 standard code stream as an example.
- the first example is based on a set of coding reference layer numbers of a picture parameter set (picture parameter set, PPS). Add a syntax element indicating scalable coding to the PPS, and add a syntax element indicating the set of reference layer numbers to the PPS, as shown in the following table:
- pps_shortrange_multilayer_flag is used to indicate adding layered coding configuration parameters.
- the value is 1, it means that the current image sequence uses a layered encoding method, and the syntax elements of the layered encoding method need to be parsed; when the value is 0, it means that it is not used.
- pps_candidate_reference_layer is used to indicate the set of reference layer numbers. After decoding one frame of the decoder, the layer number of the reconstructed image needs to be stored. The reconstructed image is entered into the DPB as a reference frame.
- the syntax may be 8 bits, and each bit represents the layer number of a certain layer. For example, bit 0 may represent the base layer, and bits 1 to 7 may represent the enhancement layer 1 to the enhancement layer 7 respectively.
- the expression form here is not limited, for example, the number of digits can be adjusted according to the highest layer number, if the highest layer number is greater than 8, the number of digits of the syntax can be more than 8 digits.
- the decoding and processing methods at the decoding end are as follows:
- the set of reference layer numbers for this image sequence will not be updated until the new pps_candidate_reference_layer syntax element is parsed.
- a set of reference layer numbers is encoded based on a slice segment header (SSH).
- SSH slice segment header
- ssh_shortrange_multilayer_flag is used to instruct the segment to add layered encoding configuration parameters.
- the value is 1, it means that the current image segment uses a layered encoding method, and the syntax element of the layered encoding method corresponding to the segment needs to be parsed; when the value is 0 Indicates not used.
- ssh_candidate_reference_layer is used to indicate the reference layer number set of the slice.
- the decoder needs to store the layer number of the reconstructed image, and the reconstructed image is entered into the DPB as a reference frame.
- the syntax may be 8 bits, and each bit represents the layer number of a certain layer.
- bit 0 may represent the base layer
- bits 1 to 7 may represent the enhancement layer 1 to the enhancement layer 7 respectively.
- the expression form here is not limited, for example, the number of digits can be adjusted according to the highest layer number, if the highest layer number is greater than 8, the number of digits of the syntax can be more than 8 digits.
- the parsing and processing method at the decoding end is similar to the first example, the main difference is that the information parsed in this part corresponds to the image slice.
- FIG. 9 is a schematic structural diagram of an encoding device 900 according to an embodiment of the present application.
- the encoding device 900 includes: an inter-frame prediction module 901 and an encoding module 902 . in,
- the inter-frame prediction module 901 is configured to determine the reference frame number of the current image according to the channel feedback information, the channel feedback information is used to indicate the information of the image frame received by the decoding end; acquire the first image corresponding to the reference frame number
- the first reference layer number set of the frame, the first reference layer number set includes layer numbers of N1 layers, 1 ⁇ N1 ⁇ L1, L1 represents the total number of layers of the first image frame; according to the channel
- the feedback information and the first reference layer number set determine the reference layer number of the current image
- the encoding module 902 is configured to perform video encoding on the current image according to the reference frame number and the reference layer number to obtain a code flow.
- the encoding module 902 is specifically configured to obtain the reconstructed image corresponding to the reference frame number and the reference layer number from a decoded image buffer DPB, the DPB for the There are only reconstructed images of the N1 layers in the first image frame; the acquired reconstructed image corresponding to the reference frame number and the reference layer number is used as a reference image, and the Perform the video encoding on the current image to obtain the code stream.
- the inter-frame prediction module 901 is specifically configured to acquire a plurality of the channel feedback information, and the channel feedback information is used to indicate that the decoding end receives the frame number of the image frame; determining the frame number closest to the frame number of the current image among the multiple frame numbers indicated by the multiple channel feedback information as the reference frame number of the current image.
- the inter-frame prediction module 901 is specifically configured to determine the highest layer number indicated by the channel feedback information indicating the reference frame number as the target layer number; when the first reference layer When the target layer number is included in the number set, determine the target layer number as the reference layer number of the current image; or, when the first reference layer number set does not include the target layer number, set A layer number smaller than and closest to the target layer number in the first set of reference layer numbers is determined as the reference layer number of the current image.
- the inter-frame prediction module 901 is specifically configured to obtain multiple sets of channel feedback information, the multiple sets of channel feedback information corresponding to the multiple decoding ends , each group of channel feedback information includes a plurality of said channel feedback information, said channel feedback information is used to indicate the frame number of the image frame received by the corresponding decoder; determine one or more common Frame number, the common frame number refers to the frame number indicated by at least one channel feedback information in each group of channel feedback information; determine the reference frame number of the current image according to the one or more common frame numbers .
- the inter-frame prediction module 901 is specifically configured to obtain the highest layer number indicated by the channel feedback information indicating the reference frame number in each group of the multiple sets of channel feedback information; The smallest of the multiple highest layer numbers is determined as the target layer number; and the reference layer number of the current image is determined according to the target layer number and the first set of reference layer numbers.
- the channel feedback information comes from a corresponding decoding end and/or a network device on a transmission link.
- the channel feedback information is generated based on the sent code stream.
- the inter-frame prediction module 901 is specifically configured to acquire a plurality of channel feedback information, where the channel feedback information is used to indicate the frame number of the image frame received by the decoding end; Determining the frame number closest to the current image among the multiple frame numbers indicated by the multiple channel feedback information as the target frame number; when the highest layer number indicated by the channel feedback information indicating the target frame number is greater than or When it is equal to the highest layer number in the second reference layer number set, the target frame number is determined as the reference frame number, and the second reference layer number set is the second image frame corresponding to the target frame number A collection of reference layer numbers.
- the inter-frame prediction module 901 is further configured to: when the highest layer number indicated by the channel feedback information indicating the target frame number is smaller than the highest layer number in the second reference layer number set , determining a specified frame number among the multiple frame numbers indicated by the multiple channel feedback information as the reference frame number of the current image.
- the inter prediction module 901 is further configured to: when the target layer number is not included in the first reference layer number set, if the first reference layer number set does not include Including a layer number smaller than the target layer number, the reference frame number of the previous frame of the current image is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the The reference layer number of the current image.
- the code stream further includes the first set of reference layer numbers.
- the code stream further includes the reference frame number.
- the code stream further includes the reference frame number and the reference layer number.
- the inter prediction module 901 is specifically configured to determine the image slice number of the current image and the image received by the decoding end The image slice number of the frame is the same, and the layer number corresponding to the image slice number of the image frame received by the decoding end is determined as the target layer number; when the first reference layer number set includes the target layer number, determine the target layer number as the reference layer number of the current image; or, when the target layer number is not included in the first reference layer number set, set the first reference layer number set The layer number that is smaller than and closest to the target layer number is determined as the reference layer number of the current image.
- FIG. 10 is a schematic structural diagram of a decoding device 1000 according to an embodiment of the present application.
- the decoding device 1000 includes: an acquisition module 1001 , an inter-frame prediction module 1002 , a decoding module 1003 , a display module 1004 and a sending module 1005 . in,
- the obtaining module 1001 is used to obtain the code stream; the inter prediction module 1002 is used to analyze the code stream to obtain the reference frame number of the current image; obtain the third reference layer of the third image frame corresponding to the reference frame number number set, the third reference layer number set includes layer numbers of N2 layers, 1 ⁇ N2 ⁇ L2, L2 represents the total number of layers of the third image frame; determined according to the third reference layer number set The reference layer number of the current image; a decoding module 1003, configured to perform video decoding according to the reference frame number and the reference layer number to obtain a reconstructed image of the current image.
- the decoding module 1003 is specifically configured to acquire the reconstructed image corresponding to the reference frame number and the reference layer number from the decoded image buffer DPB;
- the reconstructed image corresponding to the reference frame number and the reference layer number is used as a reference image, and the video decoding is performed according to the reference image to obtain the reconstructed image of the current image.
- the decoding module 1003 is further configured to store the reconstructed images of the N3 layers of the current image into the DPB, and the fourth reference layer number set of the current image includes M
- the layer number of the layer, the M layers include the N3 layers, 1 ⁇ M ⁇ L3, L3 represents the total number of layers of the current image; or, the highest layer in the N3 layers
- the reconstructed image of the layer is stored in the DPB.
- the display module 1004 is configured to display the reconstructed image of the L4th layer of the current image, where L4 represents the layer number of the highest layer obtained by decoding the current image.
- the inter-frame prediction module 1002 is specifically configured to determine the highest layer number among the layer numbers corresponding to the multiple reconstructed images of the decoded third image frame; When the highest layer number is included in the set of three reference layer numbers, determine the highest layer number as the reference layer number of the current image; or, when the highest layer number is not included in the set of reference layer numbers, Determining a layer number that is smaller than and closest to the highest layer number in the third reference layer number set as the reference layer number of the current image.
- the inter prediction module 1002 is further configured to: when the third reference layer number set does not include the highest layer number, if the third reference layer number set does not include Including a layer number smaller than the highest layer number, the reference frame number of the previous frame of the current image is determined as the reference frame number of the current image, and the reference layer number of the previous frame is determined as the The reference layer number of the current image.
- the sending module 1005 is configured to determine the frame number and layer number of the received image frame; send channel feedback information to the encoding end, and the channel feedback information is used to indicate the received image frame The frame number and the layer number of the frame.
- the sending module 1005 is specifically configured to send the channel feedback information to the encoding end when determining to start parsing the second frame according to the frame number in the code stream, the The channel feedback information is used to indicate the frame number of the first frame and the layer number of the highest layer received in the first frame, where the first frame is the previous frame of the second frame; or, when receiving When the layer number of the image frame of the image frame determines that the first frame has been received, the channel feedback information is sent to the encoding end, and the channel feedback information is used to indicate the frame number of the first frame and the received State the layer number of the highest layer of the first frame.
- the sending module 1005 is further configured to determine the image slice number of the received image frame; correspondingly, the channel feedback information is also Used to indicate the image slice number.
- each step of the above-mentioned method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
- the processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other possible Program logic devices, discrete gate or transistor logic devices, discrete hardware components.
- a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
- the steps of the methods disclosed in the embodiments of the present application may be directly implemented by a hardware coded processor, or executed by a combination of hardware and software modules in the coded processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
- the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
- the memories mentioned in the above embodiments may be volatile memories or nonvolatile memories, or may include both volatile and nonvolatile memories.
- the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
- Volatile memory can be random access memory (RAM), which acts as external cache memory.
- RAM random access memory
- SRAM static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- SDRAM double data rate synchronous dynamic random access memory
- ESDRAM enhanced synchronous dynamic random access memory
- SLDRAM direct memory bus random access memory
- direct rambus RAM direct rambus RAM
- the disclosed systems, devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (personal computer, server, or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请提供一种图像编解码方法和装置。本申请图像编码方法,包括:根据信道反馈信息确定当前图像的参考帧号,所述信道反馈信息用于指示解码端接收到的图像帧的信息;获取与所述参考帧号对应的第一图像帧的第一参考层号集合,所述第一参考层号集合包括N1个分层的层号,1≤N1<L1,L1表示所述第一图像帧的总分层数;根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号;根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流。本申请可以充分考虑到信道的变化情况,确保编码端和解码端所采用的参考图像一致,提高编码效率,避免花屏的情况。
Description
本申请要求于2021年10月27日提交中国专利局、申请号为202111256754.X、申请名称为“图像编解码方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及视频编解码技术,尤其涉及一种图像编解码方法和装置。
可分级视频编码,又称可伸缩视频编码,是当前视频编码标准的扩展编码标准。在可分级视频编码中,通过在编码器中进行空域分级(分辨率分级)、时域分级或者质量分级,形成不同的码流层,从而在同一个码流中包含不同分辨率、不同帧率或者不同码率的视频码流。
编码器可以根据不同的编码配置将视频帧编码为基本层码流和增强层码流。基本层一般编码最低层空域、时域或者最低质量的码流;增强层以基本层作为基础,叠加编码更高层空域、时域或者更高质量的码流。随着增强层层数增加,编码的空域、时域或者质量层级也越来越高。传输时,优先保证基本层码流传输,当网络有余量时,逐步传输越来越高层的增强层码流。解码器先收到基本层码流并进行解码,然后根据收到的增强层从低到高层的码流,逐步解码越来越高的空域、时域或者质量层级的码流,通过将较高层级的信息叠加在较低层级,获得更高分辨率、更高帧率或者更高质量的视频重建帧。
但是,相关技术中的可分级编码方案会受到信道状况变化的影响,导致花屏。
发明内容
本申请提供一种图像编解码方法和装置,以充分考虑到信道的变化情况,确保编码端和解码端所采用的参考图像一致,提高编码效率,避免花屏的情况。
第一方面,本申请提供一种图像编码方法,包括:根据信道反馈信息确定当前图像的参考帧号,所述信道反馈信息用于指示解码端接收到的图像帧的信息;获取与所述参考帧号对应的第一图像帧的第一参考层号集合,所述第一参考层号集合包括N1个分层的层号,1≤N1<L1,L1表示所述第一图像帧的总分层数;根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号;根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流。
信道反馈信息用于指示解码端接收到的图像帧的信息。例如,当前图像帧的总分层数为4,编码端编码该当前图像帧得到4层对应的码流,但是传输过程中解码端只接收到当前图像帧的前3层对应的码流。此时编码端在编码下一帧时,用当前图像的第4层的重建图像作为参考图像,而在解码端没有接收到第4层对应的码流,因此解码端无法以当前图像的第4层的重建图像作为参考图像去解码下一帧,导致下一帧无法正常解码。因此本申请中,编码端先获取信道反馈信息,基于该信道反馈信息确定解码端接收到的图像帧的信息,例如,信道反馈信息包括解码端接收到的图像帧的帧号和层号,再基于此确定下一帧 的参考帧,从而避免出现上述示例中的情况,确保编码端和解码端所使用的参考图像一致。
本申请中,可以预先设定视频中的图像帧在进行可分级编码时的最大分层数L
max,例如L
max=6,该最大分层数可以是一个门限,即各个图像帧分层时最多不超过该层数,但实际编码中可能不同的图像帧会得到不同的总分层数,第一图像帧的总分层数用L1表示,L1可以小于或等于前述最大分层数L
max。第一图像帧被分成L1层后,可以有其中的N1个分层作为后续图像帧的参考图像,1≤N1<L1,该N1个分层的层号组成第一图像帧的第一参考层号集合,亦即第一图像帧对应第一参考层号集合,只有层号在第一参考层号集合中的分层的重建图像才能作为后续图像帧的参考图像。视频中的其它图像帧同理,此处不再赘述。
在确定当前图像的参考帧号和参考层号后,可以从解码图像缓冲区(decoded picture buffer,DPB)提取与参考帧号和参考层号对应的重建图像作为当前图像的参考图像,从而基于该参考图像对当前图像进行可分级编码以得到码流。
本申请,通过基于信道反馈信息确定当前图像的参考帧号,再基于参考帧号和预先设定的参考层号集合确定当前图像的参考层号,该参考层号集合包括了参考帧号对应的图像帧的N个分层的层号,进而基于参考帧号和参考层号获取当前图像的参考图像,这样得到的参考图像充分考虑到了信道的变化情况,确保编码端和解码端所采用的参考图像一致,提高编码效率,避免花屏的情况。
在一种可能的实现方式中,所述根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流,包括:从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像,所述DPB中针对所述第一图像帧仅存有所述N1个分层的重建图像;将获取的与所述参考帧号和所述参考层号对应的所述重建图像作为参考图像,根据所述参考图像对所述当前图像进行所述视频编码以得到所述码流。
由于DPB中针对第一图像帧仅存有其N1个分层的重建图像,而不是存储第一图像帧的所有L1个分层的重建图像,这样可以节省DPB的存储空间,并且提高编码效率。
在一种可能的实现方式中,当只有一个解码端时,所述根据信道反馈信息确定当前图像的参考帧号,包括:获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为所述当前图像的参考帧号。
在一种可能的实现方式中,所述根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号,包括:将指示所述参考帧号的信道反馈信息所指示的最高层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,当有多个解码端时,所述根据信道反馈信息确定当前图像的参考帧号,包括:获取多组信道反馈信息,所述多组信道反馈信息和所述多个解码端对应,每组信道反馈信息包括多个所述信道反馈信息,所述信道反馈信息用于指示对应的解码端接收到的图像帧的帧号;根据所述多组信道反馈信息确定一个或多个共有帧号,所述共有帧号是指每组信道反馈信息中都有至少一个信道反馈信息指示了的帧号;根据所述一 个或多个共有帧号确定所述当前图像的所述参考帧号。
本申请中,可以将指示所述共有帧号的信道反馈信息所指示的最高层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
根据信道反馈信息确定的参考帧号,既可以符合信道状况,又可以将最接近当前图像的已接收图像帧确定为参考帧,可以提高编码效率。
在一种可能的实现方式中,所述根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号,包括:获取所述多组信道反馈信息的各组中指示所述参考帧号的信道反馈信息所指示的最高层号;将多个所述最高层号中的最小者确定为目标层号;根据所述目标层号和所述第一参考层号集合确定所述当前图像的参考层号。
在一种可能的实现方式中,所述信道反馈信息来自对应的解码端和/或传输链路上的网络设备。
在一种可能的实现方式中,所述信道反馈信息基于已发送的码流生成。
在一种可能的实现方式中,所述根据信道反馈信息确定当前图像的参考帧号,包括:获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为目标帧号;当指示所述目标帧号的信道反馈信息所指示的最高层号大于或等于第二参考层号集合中的最高层号时,将所述目标帧号确定为所述参考帧号,所述第二参考层号集合是与所述目标帧号对应的第二图像帧的参考层号集合。
在一种可能的实现方式中,所述方法还包括:当指示所述目标帧号的信道反馈信息所指示的最高层号小于所述第二参考层号集合中的最高层号时,将所述多个信道反馈信息指示的多个帧号中的指定帧号确定为所述当前图像的参考帧号。
在一种可能的实现方式中,所述方法还包括:当所述第一参考层号集合中不包括所述目标层号时,若所述第一参考层号集合中不包括小于所述目标层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,所述码流还包括所述第一参考层号集合。
在一种可能的实现方式中,所述码流还包括所述参考帧号。
在一种可能的实现方式中,所述码流还包括所述参考帧号和所述参考层号。
在一种可能的实现方式中,当所述当前图像为图像分片时,所述信道反馈信息包括所述解码端接收到的图像帧的图像分片号和所述图像分片号对应的层号;所述根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号,包括:若所述当前图像的图像分片号和所述解码端接收到的图像帧的图像分片号相同,将所述解码端接收到的图像帧的所述图像分片号对应的层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
一帧图像可以分为多个图像分片(Slice)进行编码和发送,因此当当前图像为图像分 片时,除了解码端接收到的图像帧的帧号外,信道反馈信息还包括解码端接收到的图像帧的图像分片号和该图像分片号对应的层号。这样编码端可以先采用上述方法确定当前图像的参考帧号,然后根据当前图像的图像分片号和第一参考层号集合确定当前图像的参考层号,即指示参考帧号的信道反馈信息所指示的多个图像分片号中找到与当前图像的图像分片号相同者,然后将该相同的图像分片号对应的层号确定为目标层号,基于目标层号从第一参考层号集合中确定出当前图像的参考层号。例如,当前图像的参考帧号为1,指示帧号1的信道反馈信息所指示的多个图像分片号包括1、2、3和4,图像分片号1对应的层号3,图像分片号2对应的层号4,图像分片号3对应的层号5,图像分片号4对应的层号6,第一参考层号集合Rx={1,3,5}。当前图像的图像分片号为1,那么当前图像的参考层号是根据前述图像分片号1对应的层号3和第一参考层号集合得到的,其参考层号为3。或者,当前图像的图像分片号为2,那么当前图像的参考层号是根据前述图像分片号2对应的层号4和第一参考层号集合得到的,其参考层号为3。或者,当前图像的图像分片号为3,那么当前图像的参考层号是根据前述图像分片号3对应的层号5和第一参考层号集合得到的,其参考层号为5。或者,当前图像的图像分片号为4,那么当前图像的参考层号是根据前述图像分片号4对应的层号6和第一参考层号集合得到的,其参考层号为5。
第二方面,本申请提供一种图像解码方法,包括:获取码流;解析所述码流以获取当前图像的参考帧号;获取与所述参考帧号对应的第三图像帧的第三参考层号集合,所述第三参考层号集合包括N2个分层的层号,1≤N2<L2,L2表示所述第三图像帧的总分层数;根据所述第三参考层号集合确定所述当前图像的参考层号;根据所述参考帧号和所述参考层号进行视频解码以得到所述当前图像的重建图像。
本申请中,解码端可以在解析到开始接收下一帧的码流时(基于码流中的帧号判断)发送信道反馈信息,其中携带前一帧的帧号和前一帧接收到的最高层号;或者,还可以在解析到当前图像接收完时(基于码流中的当前图像的最高层号判断)发送信道反馈信息,其中携带当前图像的帧号和当前图像接收到的最高层号。解码端在前述两种情况下发送信道反馈信息,可以保证编码端获取到的任意一帧接收到的最高层与解码端实际接收到的同一帧的最高层一致,从而避免在编码端也会出现的编解码由于采用不同的参考图像而出现错误的问题。
在一种可能的实现方式中,所述根据所述参考帧号和所述参考层号进行视频解码以得到所述当前图像的重建图像,包括:从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像进行所述视频解码以得到所述当前图像的重建图像。
在一种可能的实现方式中,所述方法还包括:将所述当前图像的N3个分层的重建图像存入DPB中,所述当前图像的第四参考层号集合包括M个分层的层号,所述M个分层包括所述N3个分层,1≤M<L3,L3表示所述当前图像的总分层数;或者,将所述N3个分层中的最高层的重建图像存入所述DPB中。
当前图像的第四参考层号集合可以通过解析码流得到,但是解码端在解码时,可能针对当前图像得到的最高层的层号L4小于当前图像的总层数L3,因此在向DPB中存入当前图像的重建图像时,如果L4大于或等于上述M个分层中的最高层号,则N3=M;而如果L4小于上述M个分层的最高层号,则N3<M。
在一种可能的实现方式中,所述方法还包括:将所述当前图像的第L4层的重建图像送显,L4表示所述当前图像解码得到的最高层的层号。
在一种可能的实现方式中,所述根据所述第三参考层号集合确定所述当前图像的参考层号,包括:确定解码得到的所述第三图像帧的多个重建图像分别对应的层号中的最高层号;当所述第三参考层号集合中包括所述最高层号时,将所述最高层号确定为所述当前图像的参考层号;或者,当所述参考层号集合中不包括所述最高层号时,将所述第三参考层号集合中小于且最接近所述最高层号的层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,所述方法还包括:当所述第三参考层号集合中不包括所述最高层号时,若所述第三参考层号集合中不包括小于所述最高层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,所述方法还包括:确定接收到的图像帧的帧号和层号;向编码端发送信道反馈信息,所述信道反馈信息用于指示所述接收到的图像帧的所述帧号和所述层号。
在一种可能的实现方式中,所述向编码端发送信道反馈信息,包括:当根据所述码流中的帧号确定开始解析第二帧时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示第一帧的帧号和接收到的所述第一帧的最高层的层号,所述第一帧是所述第二帧的前一帧;或者,当根据接收到的图像帧的层号确定所述第一帧已接收完时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示所述第一帧的帧号和接收到的所述第一帧的最高层的层号。
在一种可能的实现方式中,当所述当前图像为图像分片时,所述方法还包括:确定接收到的图像帧的图像分片号;相应的,所述信道反馈信息还用于指示所述图像分片号。
一帧图像分为多个图像分片(Slice)进行编码和发送,当当前图像为图像分片时,解码端在确定接收到的帧号和层号的同时,还可以确定接收到的图像分片号,进而在信道反馈信息中携带上接收到的图像分片的帧号、图像分片号以及图像分片号对应的层号。上述按图像处理的过程可以按照图像分片进行同样处理。
第三方面,本申请提供一种图像编码装置,包括:帧间预测模块,用于根据信道反馈信息确定当前图像的参考帧号,所述信道反馈信息用于指示解码端接收到的图像帧的信息;获取与所述参考帧号对应的第一图像帧的第一参考层号集合,所述第一参考层号集合包括N1个分层的层号,1≤N1<L1,L1表示所述第一图像帧的总分层数;根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号;编码模块,用于根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流。
在一种可能的实现方式中,所述编码模块,具体用于从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像,所述DPB中针对所述第一图像帧仅存有所述N1个分层的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像对所述当前图像进行所述视频编码以得到所述码流。
在一种可能的实现方式中,当只有一个解码端时,所述帧间预测模块,具体用于获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为所述当 前图像的参考帧号。
在一种可能的实现方式中,所述帧间预测模块,具体用于将指示所述参考帧号的信道反馈信息所指示的最高层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,当有多个解码端时,所述帧间预测模块,具体用于获取多组信道反馈信息,所述多组信道反馈信息和所述多个解码端对应,每组信道反馈信息包括多个所述信道反馈信息,所述信道反馈信息用于指示对应的解码端接收到的图像帧的帧号;根据所述多组信道反馈信息确定一个或多个共有帧号,所述共有帧号是指每组信道反馈信息中都有至少一个信道反馈信息指示了的帧号;根据所述一个或多个共有帧号确定所述当前图像的所述参考帧号。
在一种可能的实现方式中,所述帧间预测模块,具体用于获取所述多组信道反馈信息的各组中指示所述参考帧号的信道反馈信息所指示的最高层号;将多个所述最高层号中的最小者确定为目标层号;根据所述目标层号和所述第一参考层号集合确定所述当前图像的参考层号。
在一种可能的实现方式中,所述信道反馈信息来自对应的解码端和/或传输链路上的网络设备。
在一种可能的实现方式中,所述信道反馈信息基于已发送的码流生成。
在一种可能的实现方式中,所述帧间预测模块,具体用于获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为目标帧号;当指示所述目标帧号的信道反馈信息所指示的最高层号大于或等于第二参考层号集合中的最高层号时,将所述目标帧号确定为所述参考帧号,所述第二参考层号集合是与所述目标帧号对应的第二图像帧的参考层号集合。
在一种可能的实现方式中,所述帧间预测模块,还用于当指示所述目标帧号的信道反馈信息所指示的最高层号小于所述第二参考层号集合中的最高层号时,将所述多个信道反馈信息指示的多个帧号中的指定帧号确定为所述当前图像的参考帧号。
在一种可能的实现方式中,所述帧间预测模块,还用于当所述第一参考层号集合中不包括所述目标层号时,若所述第一参考层号集合中不包括小于所述目标层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,所述码流还包括所述第一参考层号集合。
在一种可能的实现方式中,所述码流还包括所述参考帧号。
在一种可能的实现方式中,所述码流还包括所述参考帧号和所述参考层号。
在一种可能的实现方式中,当所述当前图像为图像分片时,所述帧间预测模块,具体用于确定所述当前图像的图像分片号和所述解码端接收到的图像帧的图像分片号相同,将所述解码端接收到的图像帧的所述图像分片号对应的层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或 者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
第四方面,本申请提供一种图像解码装置,包括:获取模块,用于获取码流;帧间预测模块,用于解析所述码流以获取当前图像的参考帧号;获取与所述参考帧号对应的第三图像帧的第三参考层号集合,所述第三参考层号集合包括N2个分层的层号,1≤N2<L2,L2表示所述第三图像帧的总分层数;根据所述第三参考层号集合确定所述当前图像的参考层号;解码模块,用于根据所述参考帧号和所述参考层号进行视频解码以得到所述当前图像的重建图像。
在一种可能的实现方式中,所述解码模块,具体用于从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像进行所述视频解码以得到所述当前图像的重建图像。
在一种可能的实现方式中,所述解码模块,还用于将所述当前图像的N3个分层的重建图像存入DPB中,所述当前图像的第四参考层号集合包括M个分层的层号,所述M个分层包括所述N3个分层,1≤M<L3,L3表示所述当前图像的总分层数;或者,将所述N3个分层中的最高层的重建图像存入所述DPB中。
在一种可能的实现方式中,还包括:显示模块,用于将所述当前图像的第L4层的重建图像送显,L4表示所述当前图像解码得到的最高层的层号。
在一种可能的实现方式中,所述帧间预测模块,具体用于确定解码得到的所述第三图像帧的多个重建图像分别对应的层号中的最高层号;当所述第三参考层号集合中包括所述最高层号时,将所述最高层号确定为所述当前图像的参考层号;或者,当所述参考层号集合中不包括所述最高层号时,将所述第三参考层号集合中小于且最接近所述最高层号的层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,所述帧间预测模块,还用于当所述第三参考层号集合中不包括所述最高层号时,若所述第三参考层号集合中不包括小于所述最高层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,还包括:发送模块,用于确定接收到的图像帧的帧号和层号;向编码端发送信道反馈信息,所述信道反馈信息用于指示所述接收到的图像帧的所述帧号和所述层号。
在一种可能的实现方式中,所述发送模块,具体用于当根据所述码流中的帧号确定开始解析第二帧时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示第一帧的帧号和接收到的所述第一帧的最高层的层号,所述第一帧是所述第二帧的前一帧;或者,当根据接收到的图像帧的层号确定所述第一帧已接收完时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示所述第一帧的帧号和接收到的所述第一帧的最高层的层号。
在一种可能的实现方式中,当所述当前图像为图像分片时,所述发送模块,还用于确定接收到的图像帧的图像分片号;相应的,所述信道反馈信息还用于指示所述图像分片号。
第五方面,本申请提供一种编码器,包括:一个或多个处理器;非瞬时性计算机可读 存储介质,耦合到所述处理器并存储由所述处理器执行的程序,其中所述程序在由所述处理器执行时,使得所述编码器执行根据第一方面任一项所述的方法。
第六方面,本申请提供一种解码器,包括:一个或多个处理器;
非瞬时性计算机可读存储介质,耦合到所述处理器并存储由所述处理器执行的程序,其中所述程序在由所述处理器执行时,使得所述解码器执行根据第二方面任一项所述的方法。
第七方面,本申请提供一种非瞬时性计算机可读存储介质,包括程序代码,当其由计算机设备执行时,用于执行根据第一或二方面任一项所述的方法。
第八方面,本申请提供一种非瞬时性存储介质,包括根据第一或二方面任一项所述的方法编码的比特流。
第九方面,本申请提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如第一方面或第二方面任一项所述的方法。
图1A为本申请实施例的译码系统10的示例性框图;
图1B为本申请实施例的视频译码系统40的示例性框图;
图2为本申请实施例的视频编码器20的示例性框图;
图3为本申请实施例的视频解码器30的示例性框图;
图4为本申请实施例的视频译码设备400的示例性框图;
图5为本申请可分级视频编码的一个示例性的层级示意图;
图6为本申请增强层的编码方法的一个示例性的流程图;
图7为本申请图像编码方法的一个示例性的流程图;
图8为本申请图像解码方法的一个示例性的流程图;
图9为本申请实施例的编码装置900的结构示意图;
图10为本申请实施例的解码装置1000的结构示意图。
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书实施例和权利要求书及附图中的术语“第一”、“第二”等仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元。方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是 单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。
视频编码通常是指处理形成视频或视频序列的图像序列。在视频编码领域,术语“图像(picture)”、“帧(frame)”或“图片(image)”可以用作同义词。视频编码(或通常称为编码)包括视频编码和视频解码两部分。视频编码在源侧执行,通常包括处理(例如,压缩)原始视频图像以减少表示该视频图像所需的数据量(从而更高效存储和/或传输)。视频解码在目的地侧执行,通常包括相对于编码器作逆处理,以重建视频图像。实施例涉及的视频图像(或通常称为图像)的“编码”应理解为视频图像或视频序列的“编码”或“解码”。编码部分和解码部分也合称为编解码(编码和解码,CODEC)。
在无损视频编码情况下,可以重建原始视频图像,即重建的视频图像与原始视频图像具有相同的质量(假设存储或传输期间没有传输损耗或其它数据丢失)。在有损视频编码情况下,通过量化等执行进一步压缩,来减少表示视频图像所需的数据量,而解码器侧无法完全重建视频图像,即重建的视频图像的质量比原始视频图像的质量较低或较差。
几个视频编码标准属于“有损混合型视频编解码”(即,将像素域中的空间和时间预测与变换域中用于应用量化的2D变换编码结合)。视频序列中的每个图像通常分割成不重叠的块集合,通常在块级上进行编码。换句话说,编码器通常在块(视频块)级处理即编码视频,例如,通过空间(帧内)预测和时间(帧间)预测来产生预测块;从当前块(当前处理/待处理的块)中减去预测块,得到残差块;在变换域中变换残差块并量化残差块,以减少待传输(压缩)的数据量,而解码器侧将相对于编码器的逆处理部分应用于编码或压缩的块,以重建用于表示的当前块。另外,编码器需要重复解码器的处理步骤,使得编码器和解码器生成相同的预测(例如,帧内预测和帧间预测)和/或重建像素,用于处理,即编码后续块。
在以下译码系统10的实施例中,编码器20和解码器30根据图1A至图3进行描述。
图1A为本申请实施例的译码系统10的示例性框图,例如可以利用本申请技术的视频译码系统10(或简称为译码系统10)。视频译码系统10中的视频编码器20(或简称为编码器20)和视频解码器30(或简称为解码器30)代表可用于根据本申请中描述的各种示例执行各技术的设备等。
如图1A所示,译码系统10包括源设备12,源设备12用于将编码图像等编码图像数据21提供给用于对编码图像数据21进行解码的目的设备14。
源设备12包括编码器20,另外即可选地,可包括图像源16、图像预处理器等预处理器(或预处理单元)18、通信接口(或通信单元)22。
图像源16可包括或可以为任意类型的用于捕获现实世界图像等的图像捕获设备,和/或任意类型的图像生成设备,例如用于生成计算机动画图像的计算机图形处理器或任意类型的用于获取和/或提供现实世界图像、计算机生成图像(例如,屏幕内容、虚拟现实(virtual reality,VR)图像和/或其任意组合(例如增强现实(augmented reality,AR)图像)的设备。所述图像源可以为存储上述图像中的任意图像的任意类型的内存或存储器。
为了区分预处理器(或预处理单元)18执行的处理,图像(或图像数据)17也可称 为原始图像(或原始图像数据)17。
预处理器18用于接收原始图像数据17,并对原始图像数据17进行预处理,得到预处理图像(或预处理图像数据)19。例如,预处理器18执行的预处理可包括修剪、颜色格式转换(例如从RGB转换为YCbCr)、调色或去噪。可以理解的是,预处理单元18可以为可选组件。
视频编码器(或编码器)20用于接收预处理图像数据19并提供编码图像数据21(下面将根据图2等进一步描述)。
源设备12中的通信接口22可用于:接收编码图像数据21并通过通信信道13向目的设备14等另一设备或任何其它设备发送编码图像数据21(或其它任意处理后的版本),以便存储或直接重建。
目的设备14包括解码器30,另外即可选地,可包括通信接口(或通信单元)28、后处理器(或后处理单元)32和显示设备34。
目的设备14中的通信接口28用于直接从源设备12或从存储设备等任意其它源设备接收编码图像数据21(或其它任意处理后的版本),例如,存储设备为编码图像数据存储设备,并将编码图像数据21提供给解码器30。
通信接口22和通信接口28可用于通过源设备12与目的设备14之间的直连通信链路,例如直接有线或无线连接等,或者通过任意类型的网络,例如有线网络、无线网络或其任意组合、任意类型的私网和公网或其任意类型的组合,发送或接收编码图像数据(或编码数据)21。
例如,通信接口22可用于将编码图像数据21封装为报文等合适的格式,和/或使用任意类型的传输编码或处理来处理所述编码后的图像数据,以便在通信链路或通信网络上进行传输。
通信接口28与通信接口22对应,例如,可用于接收传输数据,并使用任意类型的对应传输解码或处理和/或解封装对传输数据进行处理,得到编码图像数据21。
通信接口22和通信接口28均可配置为如图1A中从源设备12指向目的设备14的对应通信信道13的箭头所指示的单向通信接口,或双向通信接口,并且可用于发送和接收消息等,以建立连接,确认并交换与通信链路和/或例如编码后的图像数据传输等数据传输相关的任何其它信息,等等。
视频解码器(或解码器)30用于接收编码图像数据21并提供解码图像数据(或解码图像数据)31(下面将根据图3等进一步描述)。
后处理器32用于对解码后的图像等解码图像数据31(也称为重建后的图像数据)进行后处理,得到后处理后的图像等后处理图像数据33。后处理单元32执行的后处理可以包括例如颜色格式转换(例如从YCbCr转换为RGB)、调色、修剪或重采样,或者用于产生供显示设备34等显示的解码图像数据31等任何其它处理。
显示设备34用于接收后处理图像数据33,以向用户或观看者等显示图像。显示设备34可以为或包括任意类型的用于表示重建后图像的显示器,例如,集成或外部显示屏或显示器。例如,显示屏可包括液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light emitting diode,OLED)显示器、等离子显示器、投影仪、微型LED显示器、硅基液晶显示器(liquid crystal on silicon,LCoS)、数字光处理器(digital light processor, DLP)或任意类型的其它显示屏。
尽管图1A示出了源设备12和目的设备14作为独立的设备,但设备实施例也可以同时包括源设备12和目的设备14或同时包括源设备12和目的设备14的功能,即同时包括源设备12或对应功能和目的设备14或对应功能。在这些实施例中,源设备12或对应功能和目的设备14或对应功能可以使用相同硬件和/或软件或通过单独的硬件和/或软件或其任意组合来实现。
根据描述,图1A所示的源设备12和/或目的设备14中的不同单元或功能的存在和(准确)划分可能根据实际设备和应用而有所不同,这对技术人员来说是显而易见的。
编码器20(例如视频编码器20)或解码器30(例如视频解码器30)或两者都可通过如图1B所示的处理电路实现,例如一个或多个微处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)、离散逻辑、硬件、视频编码专用处理器或其任意组合。编码器20可以通过处理电路46实现,以包含参照图2编码器20论述的各种模块和/或本文描述的任何其它编码器系统或子系统。解码器30可以通过处理电路46实现,以包含参照图3解码器30论述的各种模块和/或本文描述的任何其它解码器系统或子系统。所述处理电路46可用于执行下文论述的各种操作。如图5所示,如果部分技术在软件中实施,则设备可以将软件的指令存储在合适的计算机可读存储介质中,并且使用一个或多个处理器在硬件中执行指令,从而执行本发明技术。视频编码器20和视频解码器30中的其中一个可作为组合编解码器(encoder/decoder,CODEC)的一部分集成在单个设备中,如图1B所示。
源设备12和目的设备14可包括各种设备中的任一种,包括任意类型的手持设备或固定设备,例如,笔记本电脑或膝上型电脑、手机、智能手机、平板或平板电脑、相机、台式计算机、机顶盒、电视机、显示设备、数字媒体播放器、视频游戏控制台、视频流设备(例如,内容业务服务器或内容分发服务器)、广播接收设备、广播发射设备,等等,并可以不使用或使用任意类型的操作系统。在一些情况下,源设备12和目的设备14可配备用于无线通信的组件。因此,源设备12和目的设备14可以是无线通信设备。
在一些情况下,图1A所示的视频译码系统10仅仅是示例性的,本申请提供的技术可适用于视频编码设置(例如,视频编码或视频解码),这些设置不一定包括编码设备与解码设备之间的任何数据通信。在其它示例中,数据从本地存储器中检索,通过网络发送,等等。视频编码设备可以对数据进行编码并将数据存储到存储器中,和/或视频解码设备可以从存储器中检索数据并对数据进行解码。在一些示例中,编码和解码由相互不通信而只是编码数据到存储器和/或从存储器中检索并解码数据的设备来执行。
图1B为本申请实施例的视频译码系统40的示例性框图,如图1B所示,视频译码系统40可以包含成像设备41、视频编码器20、视频解码器30(和/或藉由处理电路46实施的视频编/解码器)、天线42、一个或多个处理器43、一个或多个内存存储器44和/或显示设备45。
如图1B所示,成像设备41、天线42、处理电路46、视频编码器20、视频解码器30、处理器43、内存存储器44和/或显示设备45能够互相通信。在不同实例中,视频译码系统40可以只包含视频编码器20或只包含视频解码器30。
在一些实例中,天线42可以用于传输或接收视频数据的经编码比特流。另外,在一些实例中,显示设备45可以用于呈现视频数据。处理电路46可以包含专用集成电路(application-specific integrated circuit,ASIC)逻辑、图形处理器、通用处理器等。视频译码系统40也可以包含可选的处理器43,该可选处理器43类似地可以包含专用集成电路(application-specific integrated circuit,ASIC)逻辑、图形处理器、通用处理器等。另外,内存存储器44可以是任何类型的存储器,例如易失性存储器(例如,静态随机存取存储器(static random access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)等)或非易失性存储器(例如,闪存等)等。在非限制性实例中,内存存储器44可以由超速缓存内存实施。在其它实例中,处理电路46可以包含存储器(例如,缓存等)用于实施图像缓冲器等。
在一些实例中,通过逻辑电路实施的视频编码器20可以包含(例如,通过处理电路46或内存存储器44实施的)图像缓冲器和(例如,通过处理电路46实施的)图形处理单元。图形处理单元可以通信耦合至图像缓冲器。图形处理单元可以包含通过处理电路46实施的视频编码器20,以实施参照图2和/或本文中所描述的任何其它编码器系统或子系统所论述的各种模块。逻辑电路可以用于执行本文所论述的各种操作。
在一些实例中,视频解码器30可以以类似方式通过处理电路46实施,以实施参照图3的视频解码器30和/或本文中所描述的任何其它解码器系统或子系统所论述的各种模块。在一些实例中,逻辑电路实施的视频解码器30可以包含(通过处理电路46或内存存储器44实施的)图像缓冲器和(例如,通过处理电路46实施的)图形处理单元。图形处理单元可以通信耦合至图像缓冲器。图形处理单元可以包含通过处理电路46实施的视频解码器30,以实施参照图3和/或本文中所描述的任何其它解码器系统或子系统所论述的各种模块。
在一些实例中,天线42可以用于接收视频数据的经编码比特流。如所论述,经编码比特流可以包含本文所论述的与编码视频帧相关的数据、指示符、索引值、模式选择数据等,例如与编码分割相关的数据(例如,变换系数或经量化变换系数,(如所论述的)可选指示符,和/或定义编码分割的数据)。视频译码系统40还可包含耦合至天线42并用于解码经编码比特流的视频解码器30。显示设备45用于呈现视频帧。
应理解,本申请实施例中对于参考视频编码器20所描述的实例,视频解码器30可以用于执行相反过程。关于信令语法元素,视频解码器30可以用于接收并解析这种语法元素,相应地解码相关视频数据。在一些例子中,视频编码器20可以将语法元素熵编码成经编码视频比特流。在此类实例中,视频解码器30可以解析这种语法元素,并相应地解码相关视频数据。
为便于描述,参考通用视频编码(versatile video coding,VVC)参考软件或由ITU-T视频编码专家组(video coding experts group,VCEG)和ISO/IEC运动图像专家组(motion picture experts group,MPEG)的视频编码联合工作组(joint collaboration team on video coding,JCT-VC)开发的高性能视频编码(high-efficiency video coding,HEVC)描述本发明实施例。本领域普通技术人员理解本发明实施例不限于HEVC或VVC。
编码器和编码方法
图2为本申请实施例的视频编码器20的示例性框图。如图2所示,视频编码器20包 括输入端(或输入接口)201、残差计算单元204、变换处理单元206、量化单元208、反量化单元210、逆变换处理单元212、重建单元214、环路滤波器220、解码图像缓冲器(decoded picture buffer,DPB)230、模式选择单元260、熵编码单元270和输出端(或输出接口)272。模式选择单元260可包括帧间预测单元244、帧内预测单元254和分割单元262。帧间预测单元244可包括运动估计单元和运动补偿单元(未示出)。图2所示的视频编码器20也可称为混合型视频编码器或基于混合型视频编解码器的视频编码器。
残差计算单元204、变换处理单元206、量化单元208和模式选择单元260组成编码器20的前向信号路径,而反量化单元210、逆变换处理单元212、重建单元214、缓冲器216、环路滤波器220、解码图像缓冲器(decoded picture buffer,DPB)230、帧间预测单元244和帧内预测单元254组成编码器的后向信号路径,其中编码器20的后向信号路径对应于解码器的信号路径(参见图3中的解码器30)。反量化单元210、逆变换处理单元212、重建单元214、环路滤波器220、解码图像缓冲器230、帧间预测单元244和帧内预测单元254还组成视频编码器20的“内置解码器”。
图像和图像分割(图像和块)
编码器20可用于通过输入端201等接收图像(或图像数据)17,例如,形成视频或视频序列的图像序列中的图像。接收的图像或图像数据也可以是预处理后的图像(或预处理后的图像数据)19。为简单起见,以下描述使用图像17。图像17也可称为当前图像或待编码的图像(尤其是在视频编码中将当前图像与其它图像区分开时,其它图像例如同一视频序列,即也包括当前图像的视频序列,中的之前编码后图像和/或解码后图像)。
(数字)图像为或可以视为具有强度值的像素点组成的二维阵列或矩阵。阵列中的像素点也可以称为像素(pixel或pel)(图像元素的简称)。阵列或图像在水平方向和垂直方向(或轴线)上的像素点数量决定了图像的大小和/或分辨率。为了表示颜色,通常采用三个颜色分量,即图像可以表示为或包括三个像素点阵列。在RBG格式或颜色空间中,图像包括对应的红色、绿色和蓝色像素点阵列。但是,在视频编码中,每个像素通常以亮度/色度格式或颜色空间表示,例如YCbCr,包括Y指示的亮度分量(有时也用L表示)以及Cb、Cr表示的两个色度分量。亮度(luma)分量Y表示亮度或灰度水平强度(例如,在灰度等级图像中两者相同),而两个色度(chrominance,简写为chroma)分量Cb和Cr表示色度或颜色信息分量。相应地,YCbCr格式的图像包括亮度像素点值(Y)的亮度像素点阵列和色度值(Cb和Cr)的两个色度像素点阵列。RGB格式的图像可以转换或变换为YCbCr格式,反之亦然,该过程也称为颜色变换或转换。如果图像是黑白的,则该图像可以只包括亮度像素点阵列。相应地,图像可以为例如单色格式的亮度像素点阵列或4:2:0、4:2:2和4:4:4彩色格式的亮度像素点阵列和两个相应的色度像素点阵列。
在一个实施例中,视频编码器20的实施例可包括图像分割单元(图2中未示出),用于将图像17分割成多个(通常不重叠)图像块203。这些块在H.265/HEVC和VVC标准中也可以称为根块、宏块(H.264/AVC)或编码树块(Coding Tree Block,CTB),或编码树单元(Coding Tree Unit,CTU)。分割单元可用于对视频序列中的所有图像使用相同的块大小和使用限定块大小的对应网格,或在图像或图像子集或图像组之间改变块大小,并将每个图像分割成对应块。
在其它实施例中,视频编码器可用于直接接收图像17的块203,例如,组成所述图像 17的一个、几个或所有块。图像块203也可以称为当前图像块或待编码图像块。
与图像17一样,图像块203同样是或可认为是具有强度值(像素点值)的像素点组成的二维阵列或矩阵,但是图像块203的比图像17的小。换句话说,块203可包括一个像素点阵列(例如,单色图像17情况下的亮度阵列或彩色图像情况下的亮度阵列或色度阵列)或三个像素点阵列(例如,彩色图像17情况下的一个亮度阵列和两个色度阵列)或根据所采用的颜色格式的任何其它数量和/或类型的阵列。块203的水平方向和垂直方向(或轴线)上的像素点数量限定了块203的大小。相应地,块可以为M×N(M列×N行)个像素点阵列,或M×N个变换系数阵列等。
在一个实施例中,图2所示的视频编码器20用于逐块对图像17进行编码,例如,对每个块203执行编码和预测。
在一个实施例中,图2所示的视频编码器20还可以用于使用片(也称为视频片)分割和/或编码图像,其中图像可以使用一个或多个片(通常为不重叠的)进行分割或编码。每个片可包括一个或多个块(例如,编码树单元CTU)或一个或多个块组(例如H.265/HEVC/VVC标准中的编码区块(tile)和VVC标准中的砖(brick)。
在一个实施例中,图2所示的视频编码器20还可以用于使用片/编码区块组(也称为视频编码区块组)和/或编码区块(也称为视频编码区块)对图像进行分割和/或编码,其中图像可以使用一个或多个片/编码区块组(通常为不重叠的)进行分割或编码,每个片/编码区块组可包括一个或多个块(例如CTU)或一个或多个编码区块等,其中每个编码区块可以为矩形等形状,可包括一个或多个完整或部分块(例如CTU)。
残差计算
残差计算单元204用于通过如下方式根据图像块203和预测块265来计算残差块205(后续详细介绍了预测块265):例如,逐个像素点(逐个像素)从图像块203的像素点值中减去预测块265的像素点值,得到像素域中的残差块205。
变换
变换处理单元206用于对残差块205的像素点值执行离散余弦变换(discrete cosine transform,DCT)或离散正弦变换(discrete sine transform,DST)等,得到变换域中的变换系数207。变换系数207也可称为变换残差系数,表示变换域中的残差块205。
变换处理单元206可用于应用DCT/DST的整数化近似,例如为H.265/HEVC指定的变换。与正交DCT变换相比,这种整数化近似通常由某一因子按比例缩放。为了维持经过正变换和逆变换处理的残差块的范数,使用其它比例缩放因子作为变换过程的一部分。比例缩放因子通常是根据某些约束条件来选择的,例如比例缩放因子是用于移位运算的2的幂、变换系数的位深度、准确性与实施成本之间的权衡等。例如,在编码器20侧通过逆变换处理单元212为逆变换(以及在解码器30侧通过例如逆变换处理单元312为对应逆变换)指定具体的比例缩放因子,以及相应地,可以在编码器20侧通过变换处理单元206为正变换指定对应比例缩放因子。
在一个实施例中,视频编码器20(对应地,变换处理单元206)可用于输出一种或多种变换的类型等变换参数,例如,直接输出或由熵编码单元270进行编码或压缩后输出,例如使得视频解码器30可接收并使用变换参数进行解码。
量化
量化单元208用于通过例如标量量化或矢量量化对变换系数207进行量化,得到量化变换系数209。量化变换系数209也可称为量化残差系数209。
量化过程可减少与部分或全部变换系数207有关的位深度。例如,可在量化期间将n位变换系数向下舍入到m位变换系数,其中n大于m。可通过调整量化参数(quantization parameter,QP)修改量化程度。例如,对于标量量化,可以应用不同程度的比例来实现较细或较粗的量化。较小量化步长对应较细量化,而较大量化步长对应较粗量化。可通过量化参数(quantization parameter,QP)指示合适的量化步长。例如,量化参数可以为合适的量化步长的预定义集合的索引。例如,较小的量化参数可对应精细量化(较小量化步长),较大的量化参数可对应粗糙量化(较大量化步长),反之亦然。量化可包括除以量化步长,而反量化单元210等执行的对应或逆解量化可包括乘以量化步长。根据例如HEVC一些标准的实施例可用于使用量化参数来确定量化步长。一般而言,可以根据量化参数使用包含除法的等式的定点近似来计算量化步长。可以引入其它比例缩放因子来进行量化和解量化,以恢复可能由于在用于量化步长和量化参数的等式的定点近似中使用的比例而修改的残差块的范数。在一种示例性实现方式中,可以合并逆变换和解量化的比例。或者,可以使用自定义量化表并在比特流中等将其从编码器向解码器指示。量化是有损操作,其中量化步长越大,损耗越大。
在一个实施例中,视频编码器20(对应地,量化单元208)可用于输出量化参数(quantization parameter,QP),例如,直接输出或由熵编码单元270进行编码或压缩后输出,例如使得视频解码器30可接收并使用量化参数进行解码。
反量化
反量化单元210用于对量化系数执行量化单元208的反量化,得到解量化系数211,例如,根据或使用与量化单元208相同的量化步长执行与量化单元208所执行的量化方案的反量化方案。解量化系数211也可称为解量化残差系数211,对应于变换系数207,但是由于量化造成损耗,反量化系数211通常与变换系数不完全相同。
逆变换
逆变换处理单元212用于执行变换处理单元206执行的变换的逆变换,例如,逆离散余弦变换(discrete cosine transform,DCT)或逆离散正弦变换(discrete sine transform,DST),以在像素域中得到重建残差块213(或对应的解量化系数213)。重建残差块213也可称为变换块213。
重建
重建单元214(例如,求和器214)用于将变换块213(即重建残差块213)添加到预测块265,以在像素域中得到重建块215,例如,将重建残差块213的像素点值和预测块265的像素点值相加。
滤波
环路滤波器单元220(或简称“环路滤波器”220)用于对重建块215进行滤波,得到滤波块221,或通常用于对重建像素点进行滤波以得到滤波像素点值。例如,环路滤波器单元用于顺利进行像素转变或提高视频质量。环路滤波器单元220可包括一个或多个环路滤波器,例如去块滤波器、像素点自适应偏移(sample-adaptive offset,SAO)滤波器或一个或多个其它滤波器,例如自适应环路滤波器(adaptive loop filter,ALF)、噪声抑制滤波器 (noise suppression filter,NSF)或任意组合。例如,环路滤波器单元220可以包括去块滤波器、SAO滤波器和ALF滤波器。滤波过程的顺序可以是去块滤波器、SAO滤波器和ALF滤波器。再例如,增加一个称为具有色度缩放的亮度映射(luma mapping with chroma scaling,LMCS)(即自适应环内整形器)的过程。该过程在去块之前执行。再例如,去块滤波过程也可以应用于内部子块边缘,例如仿射子块边缘、ATMVP子块边缘、子块变换(sub-block transform,SBT)边缘和内子部分(intra sub-partition,ISP)边缘。尽管环路滤波器单元220在图2中示为环路滤波器,但在其它配置中,环路滤波器单元220可以实现为环后滤波器。滤波块221也可称为滤波重建块221。
在一个实施例中,视频编码器20(对应地,环路滤波器单元220)可用于输出环路滤波器参数(例如SAO滤波参数、ALF滤波参数或LMCS参数),例如,直接输出或由熵编码单元270进行熵编码后输出,例如使得解码器30可接收并使用相同或不同的环路滤波器参数进行解码。
解码图像缓冲器
解码图像缓冲器(decoded picture buffer,DPB)230可以是存储参考图像数据以供视频编码器20在编码视频数据时使用的参考图像存储器。DPB 230可以由多种存储器设备中的任一种形成,例如动态随机存取存储器(dynamic random access memory,DRAM),包括同步DRAM(synchronous DRAM,SDRAM)、磁阻RAM(magnetoresistive RAM,MRAM)、电阻RAM(resistive RAM,RRAM)或其它类型的存储设备。解码图像缓冲器230可用于存储一个或多个滤波块221。解码图像缓冲器230还可用于存储同一当前图像或例如之前的重建块等不同图像的其它之前的滤波块,例如之前重建和滤波的块221,并可提供完整的之前重建即解码图像(和对应参考块和像素点)和/或部分重建的当前图像(和对应参考块和像素点),例如用于帧间预测。解码图像缓冲器230还可用于存储一个或多个未经滤波的重建块215,或一般存储未经滤波的重建像素点,例如,未被环路滤波单元220滤波的重建块215,或未进行任何其它处理的重建块或重建像素点。
模式选择(分割和预测)
模式选择单元260包括分割单元262、帧间预测单元244和帧内预测单元254,用于从解码图像缓冲器230或其它缓冲器(例如,列缓冲器,图中未显示)接收或获得原始块203(当前图像17的当前块203)和重建块数据等原始图像数据,例如,同一(当前)图像和/或一个或多个之前解码图像的滤波和/或未经滤波的重建像素点或重建块。重建块数据用作帧间预测或帧内预测等预测所需的参考图像数据,以得到预测块265或预测值265。
模式选择单元260可用于为当前块(包括不分割)的预测模式(例如帧内或帧间预测模式)确定或选择一种分割,生成对应的预测块265,以对残差块205进行计算和对重建块215进行重建。
在一个实施例中,模式选择单元260可用于选择分割和预测模式(例如,从模式选择单元260支持的或可用的预测模式中),所述预测模式提供最佳匹配或者说最小残差(最小残差是指传输或存储中更好的压缩),或者提供最小信令开销(最小信令开销是指传输或存储中更好的压缩),或者同时考虑或平衡以上两者。模式选择单元260可用于根据码率失真优化(rate distortion Optimization,RDO)确定分割和预测模式,即选择提供最小码率失真优化的预测模式。本文“最佳”、“最低”、“最优”等术语不一定指总体上“最佳”、“最 低”、“最优”的,但也可以指满足终止或选择标准的情况,例如,超过或低于阈值的值或其他限制可能导致“次优选择”,但会降低复杂度和处理时间。
换言之,分割单元262可用于将视频序列中的图像分割为编码树单元(coding tree unit,CTU)序列,CTU 203可进一步被分割成较小的块部分或子块(再次形成块),例如,通过迭代使用四叉树(quad-tree partitioning,QT)分割、二叉树(binary-tree partitioning,BT)分割或三叉树(triple-tree partitioning,TT)分割或其任意组合,并且用于例如对块部分或子块中的每一个执行预测,其中模式选择包括选择分割块203的树结构和选择应用于块部分或子块中的每一个的预测模式。
下文将详细地描述由视频编码器20执行的分割(例如,由分割单元262执行)和预测处理(例如,由帧间预测单元244和帧内预测单元254执行)。
分割
分割单元262可将一个编码树单元203分割(或划分)为较小的部分,例如正方形或矩形形状的小块。对于具有三个像素点阵列的图像,一个CTU由N×N个亮度像素点块和两个对应的色度像素点块组成。
H.265/HEVC视频编码标准把一帧图像分割成互不重叠的CTU,CTU的大小可设置为64×64(CTU的大小也可设置为其它值,如JVET参考软件JEM中CTU大小增大为128×128或256×256)。64×64的CTU包含由64列、每列64个像素的矩形像素点阵,每个像素包含亮度分量或/和色度分量。
H.265使用基于QT的CTU划分方法,将CTU作为QT的根节点(root),按照QT的划分方式,将CTU递归划分成若干个叶节点(leaf node)。一个节点对应于一个图像区域,节点如果不划分,则该节点称为叶节点,其对应的图像区域即为一个CU;如果节点继续划分,则节点对应的图像区域可以被划分成四个相同大小的区域(其长和宽各为被划分区域的一半),每个区域对应一个节点,需要分别确定这些节点是否还会划分。一个节点是否划分由码流中该节点对应的划分标志位split_cu_flag指示。一个节点A划分一次得到4个节点Bi,i=0~3,Bi称为A的子节点,A称为Bi的父节点。根节点的QT层级(qtDepth)为0,节点的QT层级是该节点的父节点的四QT层级加1。
H.265/HEVC标准中,对于YUV4:2:0格式的图像,一个CTU包含一个亮度块和两个色度块,亮度块和色度块可以使用相同的方式划分,称作亮度色度联合编码树。VVC中,如果当前帧为I帧,则当一个CTU为帧内编码帧(I帧)中的预设大小(如64×64)的节点时,该节点包含的亮度块通过亮度编码树被划分成一组只包含亮度块的编码单元,该节点包含的色度块通过色度编码树被划分成一组只包含色度块的编码单元;亮度编码树和色度编码树的划分相互独立。这种亮度块和色度块使用独立的编码树,称为分离树(separate trees)。在H.265中,CU包含亮度像素和色度像素;在H.266、AVS3等标准中,除了具有同时包含亮度像素和色度像素的CU之外,还存在只包含亮度像素的亮度CU和只包含色度像素的色度CU。
如上所述,视频编码器20用于从(预定的)预测模式集合中确定或选择最好或最优的预测模式。预测模式集合可包括例如帧内预测模式和/或帧间预测模式。
帧内预测
帧内预测模式集合可包括35种不同的帧内预测模式,例如,像DC(或均值)模式和 平面模式的非方向性模式,或如HEVC定义的方向性模式,或者可包括67种不同的帧内预测模式,例如,像DC(或均值)模式和平面模式的非方向性模式,或如VVC中定义的方向性模式。例如,若干传统角度帧内预测模式自适应地替换为VVC中定义的非正方形块的广角帧内预测模式。又例如,为了避免DC预测的除法运算,仅使用较长边来计算非正方形块的平均值。并且,平面模式的帧内预测结果还可以使用位置决定的帧内预测组合(position dependent intra prediction combination,PDPC)方法修改。
帧内预测单元254用于根据帧内预测模式集合中的帧内预测模式使用同一当前图像的相邻块的重建像素点来生成帧内预测块265。
帧内预测单元254(或通常为模式选择单元260)还用于输出帧内预测参数(或通常为指示块的选定帧内预测模式的信息)以语法元素266的形式发送到熵编码单元270,以包含到编码图像数据21中,从而视频解码器30可执行操作,例如接收并使用用于解码的预测参数。
帧间预测
在可能的实现中,帧间预测模式集合取决于可用参考图像(即,例如前述存储在DBP230中的至少部分之前解码的图像)和其它帧间预测参数,例如取决于是否使用整个参考图像或只使用参考图像的一部分,例如当前块的区域附近的搜索窗口区域,来搜索最佳匹配参考块,和/或例如取决于是否执行半像素、四分之一像素和/或16分之一内插的像素内插。
除上述预测模式外,还可以采用跳过模式和/或直接模式。
例如,扩展合并预测,这种模式的合并候选列表由以下五种候选类型按顺序组成:来自空间相邻CU的空间MVP、来自并置CU的时间MVP、来自FIFO表的基于历史的MVP、成对平均MVP和零MV。可以使用基于双边匹配的解码器侧运动矢量修正(decoder side motion vector refinement,DMVR)来增加合并模式的MV的准确度。带有MVD的合并模式(merge mode with MVD,MMVD)来自有运动矢量差异的合并模式。在发送跳过标志和合并标志之后立即发送MMVD标志,以指定CU是否使用MMVD模式。可以使用CU级自适应运动矢量分辨率(adaptive motion vector resolution,AMVR)方案。AMVR支持CU的MVD以不同的精度进行编码。根据当前CU的预测模式,自适应地选择当前CU的MVD。当CU以合并模式进行编码时,可以将合并的帧间/帧内预测(combined inter/intra prediction,CIIP)模式应用于当前CU。对帧间和帧内预测信号进行加权平均,得到CIIP预测。对于仿射运动补偿预测,通过2个控制点(4参数)或3个控制点(6参数)运动矢量的运动信息来描述块的仿射运动场。基于子块的时间运动矢量预测(subblock-based temporal motion vector prediction,SbTMVP),与HEVC中的时间运动矢量预测(temporal motion vector prediction,TMVP)类似,但预测的是当前CU内的子CU的运动矢量。双向光流(bi-directional optical flow,BDOF)以前称为BIO,是一种减少计算的简化版本,特别是在乘法次数和乘数大小方面的计算。在三角形分割模式中,CU以对角线划分和反对角线划分两种划分方式被均匀划分为两个三角形部分。此外,双向预测模式在简单平均的基础上进行了扩展,以支持两个预测信号的加权平均。
帧间预测单元244可包括运动估计(motion estimation,ME)单元和运动补偿(motion compensation,MC)单元(两者在图2中未示出)。运动估计单元可用于接收或获取图像 块203(当前图像17的当前图像块203)和解码图像231,或至少一个或多个之前重建块,例如,一个或多个其它/不同之前解码图像231的重建块,来进行运动估计。例如,视频序列可包括当前图像和之前的解码图像231,或换句话说,当前图像和之前的解码图像231可以为形成视频序列的图像序列的一部分或形成该图像序列。
例如,编码器20可用于从多个其它图像中的同一或不同图像的多个参考块中选择参考块,并将参考图像(或参考图像索引)和/或参考块的位置(x、y坐标)与当前块的位置之间的偏移(空间偏移)作为帧间预测参数提供给运动估计单元。该偏移也称为运动矢量(motion vector,MV)。
运动补偿单元用于获取,例如接收,帧间预测参数,并根据或使用该帧间预测参数执行帧间预测,得到帧间预测块246。由运动补偿单元执行的运动补偿可能包含根据通过运动估计确定的运动/块矢量来提取或生成预测块,还可能包括对子像素精度执行内插。内插滤波可从已知像素的像素点中产生其它像素的像素点,从而潜在地增加可用于对图像块进行编码的候选预测块的数量。一旦接收到当前图像块的PU对应的运动矢量时,运动补偿单元可在其中一个参考图像列表中定位运动矢量指向的预测块。
运动补偿单元还可以生成与块和视频片相关的语法元素,以供视频解码器30在解码视频片的图像块时使用。此外,或者作为片和相应语法元素的替代,可以生成或使用编码区块组和/或编码区块以及相应语法元素。
熵编码
熵编码单元270用于将熵编码算法或方案(例如,可变长度编码(variable length coding,VLC)方案、上下文自适应VLC方案(context adaptive VLC,CALVC)、算术编码方案、二值化算法、上下文自适应二进制算术编码(context adaptive binary arithmetic coding,CABAC)、基于语法的上下文自适应二进制算术编码(syntax-based context-adaptive binary arithmetic coding,SBAC)、概率区间分割熵(probability interval partitioning entropy,PIPE)编码或其它熵编码方法或技术)应用于量化残差系数209、帧间预测参数、帧内预测参数、环路滤波器参数和/或其它语法元素,得到可以通过输出端272以编码比特流21等形式输出的编码图像数据21,使得视频解码器30等可以接收并使用用于解码的参数。可将编码比特流21传输到视频解码器30,或将其保存在存储器中稍后由视频解码器30传输或检索。
视频编码器20的其它结构变体可用于对视频流进行编码。例如,基于非变换的编码器20可以在某些块或帧没有变换处理单元206的情况下直接量化残差信号。在另一种实现方式中,编码器20可以具有组合成单个单元的量化单元208和反量化单元210。
解码器和解码方法
图3为本申请实施例的视频解码器30的示例性框图。视频解码器30用于接收例如由编码器20编码的编码图像数据21(例如编码比特流21),得到解码图像331。编码图像数据或比特流包括用于解码所述编码图像数据的信息,例如表示编码视频片(和/或编码区块组或编码区块)的图像块的数据和相关的语法元素。
在图3的示例中,解码器30包括熵解码单元304、反量化单元310、逆变换处理单元312、重建单元314(例如求和器314)、环路滤波器320、解码图像缓冲器(DBP)330、模式应用单元360、帧间预测单元344和帧内预测单元354。帧间预测单元344可以为或 包括运动补偿单元。在一些示例中,视频解码器30可执行大体上与参照图2的视频编码器100描述的编码过程相反的解码过程。
如编码器20所述,反量化单元210、逆变换处理单元212、重建单元214、环路滤波器220、解码图像缓冲器DPB230、帧间预测单元344和帧内预测单元354还组成视频编码器20的“内置解码器”。相应地,反量化单元310在功能上可与反量化单元110相同,逆变换处理单元312在功能上可与逆变换处理单元122相同,重建单元314在功能上可与重建单元214相同,环路滤波器320在功能上可与环路滤波器220相同,解码图像缓冲器330在功能上可与解码图像缓冲器230相同。因此,视频编码器20的相应单元和功能的解释相应地适用于视频解码器30的相应单元和功能。
熵解码
熵解码单元304用于解析比特流21(或一般为编码图像数据21)并对编码图像数据21执行熵解码,得到量化系数309和/或解码后的编码参数(图3中未示出)等,例如帧间预测参数(例如参考图像索引和运动矢量)、帧内预测参数(例如帧内预测模式或索引)、变换参数、量化参数、环路滤波器参数和/或其它语法元素等中的任一个或全部。熵解码单元304可用于应用编码器20的熵编码单元270的编码方案对应的解码算法或方案。熵解码单元304还可用于向模式应用单元360提供帧间预测参数、帧内预测参数和/或其它语法元素,以及向解码器30的其它单元提供其它参数。视频解码器30可以接收视频片和/或视频块级的语法元素。此外,或者作为片和相应语法元素的替代,可以接收或使用编码区块组和/或编码区块以及相应语法元素。
反量化
反量化单元310可用于从编码图像数据21(例如通过熵解码单元304解析和/或解码)接收量化参数(quantization parameter,QP)(或一般为与反量化相关的信息)和量化系数,并基于所述量化参数对所述解码的量化系数309进行反量化以获得反量化系数311,所述反量化系数311也可以称为变换系数311。反量化过程可包括使用视频编码器20为视频片中的每个视频块计算的量化参数来确定量化程度,同样也确定需要执行的反量化的程度。
逆变换
逆变换处理单元312可用于接收解量化系数311,也称为变换系数311,并对解量化系数311应用变换以得到像素域中的重建残差块213。重建残差块213也可称为变换块313。变换可以为逆变换,例如逆DCT、逆DST、逆整数变换或概念上类似的逆变换过程。逆变换处理单元312还可以用于从编码图像数据21(例如通过熵解码单元304解析和/或解码)接收变换参数或相应信息,以确定应用于解量化系数311的变换。
重建
重建单元314(例如,求和器314)用于将重建残差块313添加到预测块365,以在像素域中得到重建块315,例如,将重建残差块313的像素点值和预测块365的像素点值相加。
滤波
环路滤波器单元320(在编码环路中或之后)用于对重建块315进行滤波,得到滤波块321,从而顺利进行像素转变或提高视频质量等。环路滤波器单元320可包括一个或多 个环路滤波器,例如去块滤波器、像素点自适应偏移(sample-adaptive offset,SAO)滤波器或一个或多个其它滤波器,例如自适应环路滤波器(adaptive loop filter,ALF)、噪声抑制滤波器(noise suppression filter,NSF)或任意组合。例如,环路滤波器单元220可以包括去块滤波器、SAO滤波器和ALF滤波器。滤波过程的顺序可以是去块滤波器、SAO滤波器和ALF滤波器。再例如,增加一个称为具有色度缩放的亮度映射(luma mapping with chroma scaling,LMCS)(即自适应环内整形器)的过程。该过程在去块之前执行。再例如,去块滤波过程也可以应用于内部子块边缘,例如仿射子块边缘、ATMVP子块边缘、子块变换(sub-block transform,SBT)边缘和内子部分(intra sub-partition,ISP)边缘。尽管环路滤波器单元320在图3中示为环路滤波器,但在其它配置中,环路滤波器单元320可以实现为环后滤波器。
解码图像缓冲器
随后将一个图像中的解码视频块321存储在解码图像缓冲器330中,解码图像缓冲器330存储作为参考图像的解码图像331,参考图像用于其它图像和/或分别输出显示的后续运动补偿。
解码器30用于通过输出端312等输出解码图像311,向用户显示或供用户查看。
预测
帧间预测单元344在功能上可与帧间预测单元244(特别是运动补偿单元)相同,帧内预测单元354在功能上可与帧间预测单元254相同,并基于从编码图像数据21(例如通过熵解码单元304解析和/或解码)接收的分割和/或预测参数或相应信息决定划分或分割和执行预测。模式应用单元360可用于根据重建块、块或相应的像素点(已滤波或未滤波)执行每个块的预测(帧内或帧间预测),得到预测块365。
当将视频片编码为帧内编码(intra coded,I)片时,模式应用单元360中的帧内预测单元354用于根据指示的帧内预测模式和来自当前图像的之前解码块的数据生成用于当前视频片的图像块的预测块365。当视频图像编码为帧间编码(即,B或P)片时,模式应用单元360中的帧间预测单元344(例如运动补偿单元)用于根据运动矢量和从熵解码单元304接收的其它语法元素生成用于当前视频片的视频块的预测块365。对于帧间预测,可从其中一个参考图像列表中的其中一个参考图像产生这些预测块。视频解码器30可以根据存储在DPB 330中的参考图像,使用默认构建技术来构建参考帧列表0和列表1。除了片(例如视频片)或作为片的替代,相同或类似的过程可应用于编码区块组(例如视频编码区块组)和/或编码区块(例如视频编码区块)的实施例,例如视频可以使用I、P或B编码区块组和/或编码区块进行编码。
模式应用单元360用于通过解析运动矢量和其它语法元素,确定用于当前视频片的视频块的预测信息,并使用预测信息产生用于正在解码的当前视频块的预测块。例如,模式应用单元360使用接收到的一些语法元素确定用于编码视频片的视频块的预测模式(例如帧内预测或帧间预测)、帧间预测片类型(例如B片、P片或GPB片)、用于片的一个或多个参考图像列表的构建信息、用于片的每个帧间编码视频块的运动矢量、用于片的每个帧间编码视频块的帧间预测状态、其它信息,以解码当前视频片内的视频块。除了片(例如视频片)或作为片的替代,相同或类似的过程可应用于编码区块组(例如视频编码区块组)和/或编码区块(例如视频编码区块)的实施例,例如视频可以使用I、P或B编码区 块组和/或编码区块进行编码。
在一个实施例中,图3所示的视频编码器30还可以用于使用片(也称为视频片)分割和/或解码图像,其中图像可以使用一个或多个片(通常为不重叠的)进行分割或解码。每个片可包括一个或多个块(例如CTU)或一个或多个块组(例如H.265/HEVC/VVC标准中的编码区块和VVC标准中的砖。
在一个实施例中,图3所示的视频解码器30还可以用于使用片/编码区块组(也称为视频编码区块组)和/或编码区块(也称为视频编码区块)对图像进行分割和/或解码,其中图像可以使用一个或多个片/编码区块组(通常为不重叠的)进行分割或解码,每个片/编码区块组可包括一个或多个块(例如CTU)或一个或多个编码区块等,其中每个编码区块可以为矩形等形状,可包括一个或多个完整或部分块(例如CTU)。
视频解码器30的其它变型可用于对编码图像数据21进行解码。例如,解码器30可以在没有环路滤波器单元320的情况下产生输出视频流。例如,基于非变换的解码器30可以在某些块或帧没有逆变换处理单元312的情况下直接反量化残差信号。在另一种实现方式中,视频解码器30可以具有组合成单个单元的反量化单元310和逆变换处理单元312。
应理解,在编码器20和解码器30中,可以对当前步骤的处理结果进一步处理,然后输出到下一步骤。例如,在插值滤波、运动矢量推导或环路滤波之后,可以对插值滤波、运动矢量推导或环路滤波的处理结果进行进一步的运算,例如裁剪(clip)或移位(shift)运算。
应该注意的是,可以对当前块的推导运动矢量(包括但不限于仿射模式的控制点运动矢量、仿射、平面、ATMVP模式的子块运动矢量、时间运动矢量等)进行进一步运算。例如,根据运动矢量的表示位将运动矢量的值限制在预定义范围。如果运动矢量的表示位为bitDepth,则范围为-2^(bitDepth-1)至2^(bitDepth-1)-1,其中“^”表示幂次方。例如,如果bitDepth设置为16,则范围为-32768~32767;如果bitDepth设置为18,则范围为-131072~131071。例如,推导运动矢量的值(例如一个8×8块中的4个4×4子块的MV)被限制,使得所述4个4×4子块MV的整数部分之间的最大差值不超过N个像素,例如不超过1个像素。这里提供了两种根据bitDepth限制运动矢量的方法。
尽管上述实施例主要描述了视频编解码,但应注意的是,译码系统10、编码器20和解码器30的实施例以及本文描述的其它实施例也可以用于静止图像处理或编解码,即视频编解码中独立于任何先前或连续图像的单个图像的处理或编解码。一般情况下,如果图像处理仅限于单个图像17,帧间预测单元244(编码器)和帧间预测单元344(解码器)可能不可用。视频编码器20和视频解码器30的所有其它功能(也称为工具或技术)同样可用于静态图像处理,例如残差计算204/304、变换206、量化208、反量化210/310、(逆)变换212/312、分割262/362、帧内预测254/354和/或环路滤波220/320、熵编码270和熵解码304。
图4为本申请实施例的视频译码设备400的示例性框图。视频译码设备400适用于实现本文描述的公开实施例。在一个实施例中,视频译码设备400可以是解码器,例如图1A中的视频解码器30,也可以是编码器,例如图1A中的视频编码器20。
视频译码设备400包括:用于接收数据的入端口410(或输入端口410)和接收单元(receiver unit,Rx)420;用于处理数据的处理器、逻辑单元或中央处理器(central processing unit,CPU)430;用于传输数据的发送单元(transmitter unit,Tx)440和出端口450(或输出端口450);用于存储数据的存储器460。视频译码设备400还可包括耦合到入端口410、接收单元420、发送单元440和出端口450的光电(optical-to-electrical,OE)组件和电光(electrical-to-optical,EO)组件,用于光信号或电信号的出口或入口。
处理器430通过硬件和软件实现。处理器430可实现为一个或多个处理器芯片、核(例如,多核处理器)、FPGA、ASIC和DSP。处理器430与入端口410、接收单元420、发送单元440、出端口450和存储器460通信。处理器430包括译码模块470。译码模块470实施上文所公开的实施例。例如,译码模块470执行、处理、准备或提供各种编码操作。因此,通过译码模块470为视频译码设备400的功能提供了实质性的改进,并且影响了视频译码设备400到不同状态的切换。或者,以存储在存储器460中并由处理器430执行的指令来实现译码模块470。
存储器460包括一个或多个磁盘、磁带机和固态硬盘,可以用作溢出数据存储设备,用于在选择执行程序时存储此类程序,并且存储在程序执行过程中读取的指令和数据。存储器460可以是易失性和/或非易失性的,可以是只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、三态内容寻址存储器(ternary content-addressable memory,TCAM)和/或静态随机存取存储器(static random-access memory,SRAM)。
可分级视频编码,又称可伸缩视频编码,是当前视频编码标准的扩展编码标准(一般为高级视频编码(advanced video coding,AVC)(H.264)的扩展标准可伸缩视频编码(scalable video coding,SVC),或高效率视频编码(high efficiency video coding,HEVC)(H.265)的扩展标准可伸缩高效视频编码(scalable high efficiency video coding,SHVC))。可分级视频编码的出现主要是为了解决实时视频传输中出现的由于网络带宽实时变化带来的丢包和时延抖动问题。
可分级视频编码中的基本结构可称作层级,可分级视频编码技术通过对原始的图像块进行空域分级(分辨率分级),可以得到不同分辨率的层级的码流。分辨率可以是指图像块的以像素为单位的尺寸大小,低层级的分辨率较低,而高层级的分辨率不低于低层级的分辨率;或者,通过对原始的图像块进行时域分级(帧率分级),可以得到不同帧率的层级的码流。帧率可以是指单位时间内视频包含的图像帧数,低层级的帧率较低,而高层级的帧率不低于低层级的帧率;或者,通过对原始的图像块进行质量域分级,可以得到不同编码质量的层级的码流。编码质量可以是指视频的品质,低层级的图像失真程度较大,而高层级的图像失真程度不高于低层级的图像失真程度。
通常,被称作基本层的层级是可分级视频编码中的最底层。在空域分级中,基本层图像块使用最低分辨率进行编码;在时域分级中,基本层图像块使用最低帧率进行编码;在质量域分级中,基本层图像块使用最高QP或是最低码率进行编码。即基本层是可分级视频编码中品质最低的一层。被称作增强层的层级是可分级视频编码中在基本层之上的层级,由低到高可以分为多个增强层。最低层增强层依据基本层获得的编码信息,编码得到的合并码流,其编码分辨率比基本层高,或是帧率比基本层高,或是码率比基本层大。较高层增强层可以依据较低层增强层的编码信息,来编码更高品质的图像块。
例如,图5为本申请可分级视频编码的一个示例性的层级示意图,如图5所示,原始 图像块送入可分级编码器后,根据不同的编码配置可分层为基本层图像块B和增强层图像块(E1~En,n≥1),再分别编码得到包含基本层码流和增强层码流的码流。基本层码流一般是对图像块采用最低分辨率、最低帧率或者最低编码质量参数得到的码流。增强层码流是以基本层作为基础,叠加采用高分辨率、高帧率或者高编码质量参数对图像块进行编码得到的码流。随着增强层层数增加,编码的空域层级、时域层级或者质量层级也会越来越高。编码器向解码器传输码流时,优先保证基本层码流的传输,当网络有余量时,逐步传输越来越高层级的码流。解码器先接收基本层码流并解码,然后根据收到的增强层码流,按照从低层级到高层级的顺序,逐层解码空域、时域或者质量的层级越来越高的码流,然后将较高层级的解码信息叠加在较低层级的重建块上,获得较高分辨率、较高帧率或者较高质量的重建块。
如上,视频序列中的每个图像通常分割成不重叠的块集合,通常在块级上进行编码。换句话说,编码器通常在块(图像块)级处理即编码视频,例如,通过空间(帧内)预测和时间(帧间)预测来产生预测块;从图像块(当前处理/待处理的块)中减去预测块,得到残差块;在变换域中变换残差块并量化残差块,可以减少待传输(压缩)的数据量。编码器还需要经过反量化和反变换获得重建残差块,然后将重建残差块的像素点值和预测块的像素点值相加以获得重建块。基本层的重建块是指针对原始的图像块分层得到的基本层图像块执行上述操作所得到的重建块。例如,图6为本申请增强层的编码方法的一个示例性的流程图,如图6所示,编码器根据原始图像块(例如LCU)获得基本层的预测块,然后对原始图像块和基本层的预测块中的对应像素点求差以获得基本层的残差块,再对基本层的残差块进行划分后,进行变换、量化,连同基本层编码控制信息、预测信息、运动信息等共同进行熵编码得到基本层的码流。编码器对量化后的量化系数进行反量化、反变换得到基本层的重建残差块,然后对基本层的预测块和基本层的重建残差块中的对应像素点求和以获得基本层的重建块。
下文中的图像(例如当前图像、前一帧等)可以是指整帧图像中的最大编码单元(largest coding unit,LCU),或者整帧图像,或者整帧图像中的感兴趣区域(region of interest,ROI),即在图像中进行指定的某个需要处理的图像区域,或者一帧图像中的分片图像(Slice)。
基于上文描述,本申请提供了一种图像编解码方法,以解决可分级编解码技术中受信道状况变化影响大,会导致花屏的问题。
图7为本申请图像编码方法的一个示例性的流程图。过程700可由视频编码器20(或编码器)执行。过程700描述为一系列的步骤或操作,应当理解的是,过程700可以以各种顺序执行和/或同时发生,不限于图7所示的执行顺序。过程700包括如下步骤:
步骤701、根据信道反馈信息确定当前图像的参考帧号。
可选的,信道反馈信息来自对应的解码端和/或传输链路上的网络设备。编码端可以将码流发送给一个或多个解码端,以使得收到码流的解码端解析该码流从而重建图像帧,码流从编码端到解码端,除了发端(编码端)和收端(解码端)的设备,还可以包括该二者之间的传输链路上的网络设备,例如交换机、中继器、基站、集线器、路由器、防火墙、网桥、网关、网卡(network interface card,NIC)、打印机、调制解调器、光纤收发器、光缆等。为了使编码端了解传输链路的状况,解码端可以向编码端发送信道反馈信息。同理, 该信道反馈信息也可以由传输链路上的网络设备发送给编码端。本申请对信道反馈信息的发送方不做具体限定。
解码端和/或传输链路上的网络设备可以解析已经接收到的码流确定该码流对应的帧号和层号,然后向编码端发送信道反馈信息,在其中携带前述码流对应的帧号和层号,以告知编码端自己已经接收到哪一帧的哪一层。
本申请中,解码端可以周期性的向编码端发送信道反馈信息,其中携带最新接收的码流对应的帧号和层号;或者,也可以在解析到开始接收下一帧的码流时(基于码流中的帧号判断)发送信道反馈信息,其中携带前一帧的帧号和前一帧接收到的最高层号;或者,还可以在解析到当前图像接收完时(基于码流中的当前图像的最高层号判断)发送信道反馈信息,其中携带当前图像的帧号和当前图像接收到的最高层号。此外解码端还可以以其他方式发送信道反馈信息,对此不做具体限定。
可选的,信道反馈信息是基于已发送的码流生成的。在基于可靠的传输信道模式下,编码端在发送码流时,不必等待解码端或传输链路上的网络设备的反馈,可以基于通信接口收发信号的情况知晓信道状况,因此编码端可以根据已知的信道状况调整码流的发送,编码端可以认为发出去的码流一定可以被解码端接收到。因此编码端可以基于已发送的码流对应的帧号和层号生成信道反馈信息。同理,编码端可以周期性的生成信道反馈信息,或者也可以每发送完一帧图像帧的码流生成信道反馈信息,对此不做具体限定。
由此可见,信道反馈信息用于指示解码端接收到的图像帧的信息。例如,当前图像帧的总分层数为4,编码端编码该当前图像帧得到4层对应的码流,但是传输过程中解码端只接收到当前图像帧的3层对应的码流。此时编码端在编码下一帧时,用当前图像的第4层的重建图像作为参考图像,而在解码端没有接收到第4层对应的码流,因此解码端无法以当前图像的第4层的重建图像作为参考图像去解码下一帧,导致下一帧解码错误。因此本申请中,编码端先获取信道反馈信息,基于该信道反馈信息确定解码端接收到的图像帧的信息,包括解码端接收到的图像帧的帧号和层号,再基于此确定下一帧的参考帧,从而避免出现上述示例中的情况,确保编码端和解码端所使用的参考图像一致。
在一种可能的实现方式中,当只有一个解码端时,编码端可以先获取来自该解码端的多个信道反馈信息,然后将多个信道反馈信息指示的多个帧号中最接近当前图像的帧号者确定为当前图像的参考帧号。
如上所述,信道反馈信息指示解码端接收到的图像帧的信息,其中包括解码端接收到的图像帧的帧号和层号。编码端会获取到多个信道反馈信息,这些信道反馈信息反映了解码端在不同的时刻接收到的码流对应的帧号和层号,因此可以将前述多个信道反馈信息分别指示的多个帧号中最接近当前图像的帧号者确定为当前图像的参考帧号。例如,编码端获取了3个信道反馈信息,其中一个指示的帧号为1,另一个指示的帧号为2,再一个指示的帧号为1,而当前图像为第3帧,因此编码端可以确定当前图像的参考帧号为2。
在一种可能的实现方式中,当有多个解码端时,编码端可以先获取多组信道反馈信息,该多组信道反馈信息和多个解码端对应,每组信道反馈信息包括多个信道反馈信息。然后根据多组信道反馈信息确定一个或多个共有帧号,共有帧号是指每组信道反馈信息中都有至少一个信道反馈信息指示了的帧号,再根据一个或多个共有帧号确定当前图像的参考帧号。
如上所述,信道反馈信息指示解码端接收到的图像帧的信息,其中包括解码端接收到的图像帧的帧号和层号。针对每个解码端,编码端会获取到对应于该解码端的多个信道反馈信息。编码端可以根据多个解码端对应的多组信道反馈信息确定共有帧号,共有帧号是指每组信道反馈信息中都有至少一个信道反馈信息指示了的帧号,亦即共有帧号是每个解码端所反馈的一组信道反馈信息中都指示过的帧号。如果共有帧号只有一个,则编码端可以将该共有帧号确定为当前图像的参考帧号;如果共有帧号有多个,则可以将多个共有帧号中的最大者确定为当前图像的参考帧号。例如,解码端A对应3个信道反馈信息,分别指示的帧号为1、2、3、4;解码端B对应3个信道反馈信息,分别指示的帧号为2、3、4、5;解码端C对应3个信道反馈信息,分别指示的帧号为2、3、4、6。可以确定共有帧号为2、3、4,其中的最大者为4,因此当前图像的参考帧号为4。
步骤702、获取与参考帧号对应的第一图像帧的第一参考层号集合,第一参考层号集合包括N1个分层的层号。
与参考帧号对应的第一图像帧即为步骤701确定的参考帧号指示的图像帧。本申请中,可以预先设定视频中的图像帧在进行可分级编码时的最大分层数L
max,例如6,该最大分层数可以是一个门限,即各个图像帧分层时最多不超过该层数,但实际编码中可能不同的图像帧会得到不同的总分层数,第一图像帧的总分层数用L1表示,L1可以小于或等于前述最大分层数L
max。第一图像帧被分成L1层后,可以有其中的N1个分层作为后续图像帧的参考图像,1≤N1<L1,该N1个分层的层号组成第一图像帧的第一参考层号集合,亦即第一图像帧对应第一参考层号集合,只有层号在第一参考层号集合中的分层的重建图像才能作为后续图像帧的参考图像。视频中的其它图像帧同理,此处不再赘述。
本申请中,N1个分层可以是预先设置的,例如第一参考层号集合Rx={1,4,6},L1=6,即编码端在编码图像帧时共分了6层,该图像帧可以给后续图像帧用作参考图像的层号为1、4、6。
本申请对N1的取值不做具体限定,例如,可以根据芯片能力设置N1,或者根据实时编码和网络反馈情况动态设置N1。示例性的,N1不超过总分层数的一半,层号间隔可为2,例如,L1=6,则第一参考层号集合Rx={1,3,5};或者,N1个分层包含最高层数,例如,L1=6,第一参考层号集合Rx={1,3,6}。
应理解,视频中的每一帧可以具有独立且不同的参考层号集合;或者,视频中的图像帧分成多组,一组图像帧可以具有相同的参考层号集合;或者,视频中的所有图像帧可以具有相同的参考层号集合。本申请对此不做具体限定。
步骤703、根据信道反馈信息和第一参考层号集合确定当前图像的参考层号。
在一种可能的实现方式中,当只有一个解码端时,编码端可以将指示参考帧号的信道反馈信息所指示的最高层号确定为目标层号。
如上所述,参考帧号是根据信道反馈信息确定的,编码端可以基于指示对应参考帧号的信道反馈信息指示的参考层号进一步确定目标层号。当指示参考帧号的信道反馈信息只有一个时,该信道反馈信息指示的层号即为最高层号,直接确定为目标层号;当指示参考帧号的信道反馈信息有多个时,将该多个信道反馈信息分别指示的层号中的最大者确定为目标层号。例如,编码端获取到3个信道反馈信息均指示的帧号为2,且2为当前图像的参考帧号,其中一个信道反馈信息指示的层号为3,另一个信道反馈信息指示的层号为4, 再一个信道反馈信息指示的层号为5,这样为了提高图像的质量,可以将层号5确定为目标层号。
当参考层号集合中包括目标层号时,将目标层号确定为当前图像的参考层号;或者,当参考层号集合中不包括目标层号时,将参考层号集合中小于且最接近目标层号的层号确定为当前图像的参考层号。
在步骤701中确定了当前图像的参考帧号,可以确定当前图像的参考图像来自该参考帧号对应的图像帧。在步骤702中确定了与参考帧号对应的图像帧的参考层号集合,可以确定当前图像的参考图像是与参考帧号对应的图像帧的参考层号集合包括的N1个分层的层号分别对应的重建图像的其中之一。
基于此,在确定目标层号后,可以先查询该目标层号是否属于与参考帧号对应的图像帧的参考层号集合:若参考层号集合中包括目标层号,则可以将该目标层号确定为当前图像的参考层号;若参考层号集合中不包括目标层号,则需要在参考层号集合中找到比目标层号小且最接近目标层号的层号,将该层号确定为当前图像的参考层号。例如,参考层号集合Rx={1,3,5},目标层号为4,参考层号集合Rx中小于且最接近目标层号的层号为3,那么3就是当前图像的参考层号。
在一种可能的实现方式中,当有多个解码端时,编码端可以获取多组信道反馈信息的各组中指示参考帧号的信道反馈信息所指示的最高层号,将多个最高层号中的最小者确定为目标层号。
如上所述,参考帧号是根据信道反馈信息确定的,编码端可以基于指示参考帧号的信道反馈信息进一步确定目标层号。由于参考帧号首先是多个解码端对应的多组信道反馈信息指示的共有帧号,因此可以获取到各个解码端分别对应至少一个指示参考帧号的信道反馈信息,可以确定各个解码端的指示参考帧号的信道反馈信息所指示的层号中的最大者,然后从各个解码端分别对应的最高层号中取最小值作为目标层号。例如,参考帧号为2,解码端A的指示参考帧号2的信道反馈信息所指示的层号包括1、3、4,则对应于参考帧号2取最高层号4;解码端B的指示参考帧号2的信道反馈信息所指示的层号包括1、3、6,则对应于参考帧号2取最高层号6,解码端C的指示参考帧号2的信道反馈信息所指示的层号包括3、4、6,则对应于参考帧号2取最高层号6;然后取这最高层号的最小值,因此可以确定目标层号为4。
同理,当参考层号集合中包括目标层号时,将目标层号确定为当前图像的参考层号;或者,当参考层号集合中不包括目标层号时,将参考层号集合中小于且最接近目标层号的层号确定为当前图像的参考层号。
在步骤701中确定了当前图像的参考帧号,可以确定当前图像的参考图像来自该参考帧号对应的图像帧。在步骤702中确定了与参考帧号对应的图像帧的参考层号集合,可以确定当前图像的参考图像是与参考帧号对应的图像帧的参考层号集合包括的N1个分层的层号分别对应的重建图像的其中之一。
基于此,在确定目标层号后,可以先查询该目标层号是否属于与参考帧号对应的图像帧的参考层号集合:若参考层号集合中包括目标层号,则可以将该目标层号确定为当前图像的参考层号;若参考层号集合中不包括目标层号,则需要在参考层号集合中找到比目标层号小且最接近目标层号的层号,将该层号确定为当前图像的参考层号。例如,参考层号 集合Rx={1,3,5},目标层号为6,参考层号集合Rx中小于且最接近目标层号的层号为5,那么5就是当前图像的参考层号。
步骤704、根据参考帧号和参考层号对当前图像进行可分级视频编码以得到码流。
在确定当前图像的参考帧号和参考层号后,可以从解码图像缓冲区(decoded picture buffer,DPB)提取与参考帧号和参考层号对应的重建图像作为当前图像的参考图像,从而基于该参考图像对当前图像进行可分级编码以得到码流。
本申请中,除了上述可分级编码得到的码流外,编码端还可以在码流中携带上述图像帧的参考层号集合。
本申请,通过基于信道反馈信息确定当前图像的参考帧号,再基于参考帧号和预先设定的参考层号集合确定当前图像的参考层号,该参考层号集合包括了参考帧号对应的图像帧的N个分层的层号,进而基于参考帧号和参考层号获取当前图像的参考图像,这样得到的参考图像充分考虑到了信道的变化情况,确保编码端和解码端所采用的参考图像一致,提高编码效率,避免花屏的情况。
在一种可能的实现方式中,DPB中针对参考帧号对应的图像帧仅存有N1个分层的重建图像。
相关技术中,针对参考帧号对应的图像帧,编码端在对该图像帧进行可分级编码后,需要将其所有层的重建图像均存入DPB,例如,参考帧号对应的图像帧的L1=6,编码端需要在DPB中存入6层的重建图像。但本申请中,只需要存入参考帧号对应的图像帧的参考层号集合中包括的N1个层号所对应重建图像。例如,参考帧号对应的图像帧的L1=6,其参考层号集合Rx={1,3,5},编码端在编码完该图像帧后,只需要将层号为1、3、5的重建图像存入DPB。相较于相关技术,本申请存入DPB的重建图像的数量减少,降低了写入带宽,可以提高编码处理速度,又可以节省DPB的空间。
在一种可能的实现方式中,编码端可以先将多个信道反馈信息指示的多个帧号中最接近当前图像的帧号者确定为目标帧号,判断指示该目标帧号的信道反馈信息所指示的最高层号是否大于或等于第二参考层号集合中的最高层号,该第二参考层号集合是与目标帧号对应的第二图像帧的参考层号集合。当满足前述条件(即大于或等于)时,再将目标帧号确定为参考帧号。
举例说明,编码端根据信道反馈信息确定第4帧的参考帧号为3,参考层号为4,但实际上解码端接收到了帧号为3的图像帧的第6层,那么解码端在解码前述第4帧时可能会将其参考帧号确定为3,参考层号确定为6,这样编解码端针对“第4帧”采用了不同的参考图像,导致编解码不一致,从而解码错误的情况。
为了解决上述问题,本申请提供了上述方案,编码端不把依据上述条件得到的帧号直接确定为参考帧号,而是作为目标帧号,根据指示该目标帧号的信道反馈信息,判断解码端是否已经接收到了大于或等于上述第二参考层号集合中的最高层号的图像层。如果信道反馈信息所指示的最高层号已经满足大于或等于第二参考层号集合中的最高层号的条件,即使解码端接收到了第二图像帧的更高层,根据步骤703中确定参考层号的方案,仍然会选第二参考层号集合中的最高层号作为参考层号,因此此时可以直接将目标帧号作为参考帧号,也不会出现上述编解码端选择的参考层号不一致的问题。
而如果不满足大于或等于的条件,编码端可以将多个信道反馈信息指示的多个帧号中 的指定帧号确定为当前图像的参考帧号。例如,编码端获取了3个信道反馈信息,其中一个指示的帧号为1,另一个指示的帧号为2,再一个指示的帧号为1,而当前图像为第3帧,因此编码端确定的目标帧号为2。但是信道反馈信息指示解码端收到2帧的4层,其小于2帧的参考层号集合Rx={1,4,6}中的最高层号6,此时编码端可以将指定帧号1作为参考帧号。
本申请中,指定帧号可以是比当前图像早2帧的帧号,也可以固定帧号,对此不做具体限定。
在一种可能的实现方式中,预先设定指定帧号和指定层号,编码端可以将指定帧号确定为当前图像的参考帧号。当参考层号集合中包括指定层号时,将指定层号确定为当前图像的参考层号;或者,当参考层号集合中不包括指定层号时,将参考层号集合中小于且最接近指定层号的层号确定为当前图像的参考层号。
即,编码端可以直接指定当前图像的参考帧号和参考层号,这样可以提高参考图像的确定效率。
在一种可能的实现方式中,当参考层号集合中不包括目标层号时,若参考层号集合中不包括小于目标层号的层号,则将当前图像的前一帧的参考帧号确定为当前图像的参考帧号,将前一帧的参考层号确定为当前图像的参考层号。
例如,参考层号集合Rx={3,5},目标层号为2,参考层号集合Rx中没有小于2的层号,因此可以直接将前一帧确定的参考帧号和参考层号给当前图像使用。
可选的,编码端可以在每个参考层号集合中均设置上层号1,这样就不存在参考层号集合中不包括小于目标层号的层号的情况,从而确定当前图像的参考层号为1。
在一种可能的实现方式中,上述只有一个解码端的情况下,编码端可以在码流中携带上步骤701中确定的参考帧号,解码端可以采用步骤703的逻辑确定参考层号。或者,编码端也可以在码流中携带上步骤701中确定的参考帧号和步骤703中确定的参考层号,以使解码端解析码流直接获取参考帧号和参考层号。
在一种可能的实现方式中,上述有多个解码端的情况下,编码端也可以在码流中携带上步骤701中确定的参考帧号和步骤703中确定的参考层号,以使解码端解析码流直接获取参考帧号和参考层号。
在一种可能的实现方式中,当当前图像为图像分片时,信道反馈信息包括解码端接收到的图像帧的图像分片号和图像分片号对应的层号;根据信道反馈信息和第一参考层号集合确定当前图像的参考层号,包括:若当前图像的图像分片号和解码端接收到的图像帧的图像分片号相同,将解码端接收到的图像帧的图像分片号对应的层号确定为目标层号;当第一参考层号集合中包括目标层号时,将目标层号确定为当前图像的参考层号;或者,当第一参考层号集合中不包括目标层号时,将第一参考层号集合中小于且最接近目标层号的层号确定为当前图像的参考层号。
一帧图像可以分为多个图像分片(Slice)进行编码和发送,因此当当前图像为图像分片时,除了解码端接收到的图像帧的帧号外,信道反馈信息还包括解码端接收到的图像帧的图像分片号和该图像分片号对应的层号。这样编码端可以先采用上述方法确定当前图像的参考帧号,然后根据当前图像的图像分片号和第一参考层号集合确定当前图像的参考层号,即指示参考帧号的信道反馈信息所指示的多个图像分片号中找到与当前图像的图像分 片号相同者,然后将该相同的图像分片号对应的层号确定为目标层号,基于目标层号从第一参考层号集合中确定出当前图像的参考层号。例如,当前图像的参考帧号为1,指示帧号1的信道反馈信息所指示的多个图像分片号包括1、2、3和4,图像分片号1对应的层号3,图像分片号2对应的层号4,图像分片号3对应的层号5,图像分片号4对应的层号6,第一参考层号集合Rx={1,3,5}。当前图像的图像分片号为1,那么当前图像的参考层号是根据前述图像分片号1对应的层号3和第一参考层号集合得到的,其参考层号为3。或者,当前图像的图像分片号为2,那么当前图像的参考层号是根据前述图像分片号2对应的层号4和第一参考层号集合得到的,其参考层号为3。或者,当前图像的图像分片号为3,那么当前图像的参考层号是根据前述图像分片号3对应的层号5和第一参考层号集合得到的,其参考层号为5。或者,当前图像的图像分片号为4,那么当前图像的参考层号是根据前述图像分片号4对应的层号6和第一参考层号集合得到的,其参考层号为5。
图8为本申请图像解码方法的一个示例性的流程图。过程800可由视频解码器30(或解码器)执行。过程800描述为一系列的步骤或操作,应当理解的是,过程800可以以各种顺序执行和/或同时发生,不限于图8所示的执行顺序。过程800包括如下步骤:
步骤801、获取码流。
解码端可以通过与编码端之间的传输链路获取码流。
步骤802、解析码流以获取当前图像的参考帧号。
参考图7所示实施例,编码端在码流中携带了视频中的图像帧的参考帧号,因此解码端可以通过解析码流确定当前图像的参考帧号。
步骤803、获取与参考帧号对应的第三图像帧的第三参考层号集合。
第三参考层号集合包括N2个分层的层号,1≤N2<L2,L2表示第三图像帧的总分层数。解码端可以解析码流获取视频中的图像帧的参考层号集合。关于参考层号集合的描述可以参照图7所示实施例的步骤702,此处不再赘述。
步骤804、根据第三参考层号集合确定当前图像的参考层号。
如果码流中没有携带图像帧的参考层号,解码端可以确定解码得到的第三图像帧的多个重建图像的层号中的最高层号。当第三图像帧的第三参考层号集合中包括最高层号时,将最高层号确定为当前图像的参考层号;或者,当第三图像帧的第三参考层号集合中不包括最高层号时,将第三参考层号集合中小于且最接近最高层号的层号确定为当前图像的参考层号。若第三参考层号集合中不包括小于最高层号的层号,则将当前图像的前一帧的参考帧号确定为当前图像的参考帧号,将前一帧的参考层号确定为当前图像的参考层号。
此处可以参照图7所示实施例的步骤703,此处不再赘述。
步骤805、根据参考帧号和参考层号进行视频解码以得到当前图像的重建图像。
解码端可以从DPB中获取与参考帧号和参考层号对应的重建图像,然后将获取的与参考帧号和参考层号对应的重建图像作为参考图像,根据参考图像进行视频解码以得到当前图像的重建图像。
在一种可能的实现方式中,解码端进行可分级解码得到当前图像的L3层的重建图像后,可以将当前图像的N3个分层的重建图像存入DPB中,当前图像的第四参考层号集合包括M个分层的层号,M个分层包括N3个分层,1≤M<L3,L3表示当前图像的总分层数;或者,将N3个分层中的最高层的重建图像存入DPB中。
当前图像的第四参考层号集合可以通过解析码流得到,但是解码端在解码时,可能针对当前图像得到的最高层的层号L4小于当前图像的总层数L3,因此在向DPB中存入当前图像的重建图像时,如果L4大于或等于上述M个分层中的最高层号,则N3=M;而如果L4小于上述M个分层的最高层号,则N3<M。
解码端每获取到当前图像的一层的重建图像,可以判断该层的层号是否属于当前图像的第四参考层号集合,若属于,则可以将该层的重建图像存入DPB中,而若不属于,则不用存入DPB中,即每一帧图像只需要存入N3个分层的重建图像。例如,当前图像的第四参考层号集合Rx={1,3,5},M=3,解码端解码得到的当前图像的最高层号L4=6>5,解码端只需要将当前图像的层号为1、3、5的重建图像存入DPB,N3=3=M;又例如,当前图像的第四参考层号集合Rx={1,3,5},M=3,解码端解码得到的当前图像的最高层号L4=4<5,解码端只需要将当前图像的层号为1、3的重建图像存入DPB,N3=2<M。或者,解码端进行可分级解码得到当前图像的各层的重建图像后,可以在DPB中仅保存N3个分层中的最高层的重建图像。解码端每获取到当前图像的一层的重建图像,可以判断该层的层号是否属于当前图像的参考层号集合,若属于,则可以将该层的重建图像存入DPB中,直接覆盖当前图像之前已存入的重建图像,而若不属于,则不用存入DPB中。例如,当前图像的第四参考层号集合Rx={1,3,5},M=3,解码端解码得到的当前图像的最高层号L4=6>5,解码端只需要在DPB中保留当前图像的层号为5的重建图像;又例如,当前图像的第四参考层号集合Rx={1,3,5},M=3,解码端解码得到的当前图像的最高层号L4=4,解码端只需要在DPB中保留当前图像的层号为3的重建图像。这样相较于相关技术,本申请存入DPB的重建图像的数量减少,降低了写入带宽,可以提高解码处理速度,又可以节省DPB的空间。
在一种可能的实现方式中,解码端可以将当前图像的第L4层的重建图像送显。
如上所述,解码端解码当前图像之后,存入DPB的是层号属于当前图像的第四参考层号集合中的重建图像或者层号属于当前图像的第四参考层号集合且是其中的最高层号的重建图像,但是解码端在显示解码得到的当前图像时,可以将解码得到的当前图像的最高层的重建图像。例如,解码端解码得到的当前图像的L4=6,显示时是将层号为6的重建图像送显,而存入DPB给后续图像帧解码作参考用的是层号为1、3、5的重建图像。又例如,解码端解码得到的当前图像的L4=4,显示时是将层号为4的重建图像送显,而存入DPB给后续图像帧解码作参考用的是层号为1、3的重建图像。这样解码端显示的图像质量更好,保证了用户的观看体验,又可以节省DPB的存储空间。
在一种可能的实现方式中,解码端可以确定接收到的图像帧的帧号和层号,然后向编码端发送信道反馈信息,该信道反馈信息用于指示前述帧号和层号。
可选的,当根据码流中的帧号确定开始解析第二帧时,解码端向编码端发送信道反馈信息,该信道反馈信息用于指示第一帧的帧号和接收到的第一帧的最高层的层号,第一帧是第二帧的前一帧。
可选的,当根据接收到的图像帧的层号确定第一帧已接收完时,解码端向编码端发送信道反馈信息,该信道反馈信息用于指示第一帧的帧号和接收到的第一帧的最高层的层号。
本申请中,解码端可以在解析到开始接收下一帧的码流时(基于码流中的帧号判断)发送信道反馈信息,其中携带前一帧的帧号和前一帧接收到的最高层号;或者,还可以在 解析到当前图像接收完时(基于码流中的当前图像的最高层号判断)发送信道反馈信息,其中携带当前图像的帧号和当前图像接收到的最高层号。解码端在前述两种情况下发送信道反馈信息,可以保证编码端获取到的任意一帧接收到的最高层与解码端实际接收到的同一帧的最高层一致,从而避免在编码端也会出现的编解码由于采用不同的参考图像而出现错误的问题。
此外解码端还可以周期性的向编码端发送信道反馈信息,其中携带最新接收的码流对应的帧号和层号。本申请中解码端还可以以其他方式发送信道反馈信息,对此不做具体限定。
在一种可能的实现方式中,当当前图像为图像分片时,方法还包括:确定接收到的图像帧的图像分片号;相应的,信道反馈信息还用于指示图像分片号。
一帧图像分为多个图像分片(Slice)进行编码和发送,当当前图像为图像分片时,解码端在确定接收到的帧号和层号的同时,还可以确定接收到的图像分片号,进而在信道反馈信息中携带上接收到的图像分片的帧号、图像分片号以及图像分片号对应的层号。上述按图像处理的过程可以按照图像分片进行同样处理。
以下通过几个具体的实施例对上述方法实施例的方案进行说明。
实施例一
编码端:
1、编码端确定可分级视频编码的总分层数,设置参考层号集合,并发送总分层数以及参考层号集合到解码端。
该步骤中,参考层号集合是编码端在编码一帧图像需要进行参考时所选择的参考层号集合,其包括待参考的层号,例如参考层号集合Rx={1,4,6},表示层号为1、4、6的重建图像将会被后续图像帧参考,需要保留在DPB中。其中,参考层号集合中的层号不会大于可分级编码的总分层数L
max。当参考层号集合中有层号大于可分级编码的总分层数时,该层号将被编码端忽略。
参考层号集合是由编码端进行设置,参考层号集合中的层号数量小于或等于总分层数L
max,设置方法不限,例如可根据芯片能力,设置参考层号集合中层号数量不超过最大分层数的一半,层号间隔可为2,如总分层数L
max=6,则参考层号集合Rx={1,3,5};或者参考层参考层号集合包含总分层数,如最大分层数L
max=6,参考层号集合Rx={1,3,6};或者依据实时编码和网络反馈情况进行动态设置。
总分层数和参考层号集合可以以码流的形式发送到解码端,也可以是解码端与编码端协商确定,本申请对此不做具体限定。
每一帧都可以具有独立且不同的参考层号集合,或者一组/全部图像帧可以同时具有相同的参考层号集合,这里不做限定。
2、编码端对当前图像进行可分级编码,并依据参考层号集合保存重建图像。
编码端获取一帧图像,以步骤1中的总分层数,按照分辨率可分级或质量可分级进行编码,将图像编码为多层级的码流,当层号在参考层号集合中时,将该层的编码重建图像存入DPB,以供后续图像帧参考。例如,参考层号集合为Rx={1,4,6},则当前图像的层号为1、4、6的重建图像将存入DPB。
3、获取信道反馈信息,依据信道反馈信息以及参考层号集合编码后续图像帧。
将编码后的分级码流通过网络进行传输,网络可以是具有丢包特性的传输网。可以依据编码码流的不同层级进行优先级排序,并按照优先级从低到高进行丢弃,例如基本层码流具有最高优先级,需要最大化保证其能够发送成功;增强层越往高层,其优先级越低,保证传输成功的优先级则越低,为保证优先级更高的层级通过,这些优先级低的层级码流可以主动丢弃不进行传输。
传输完成后,解码端反馈收到的帧号与层号信息,表示接收到了哪一帧的哪一层。这里的传输完成,指的是在一定时间内的传输的结束时刻,例如在编码后一帧之前,表示前一帧传输完成;或者在后一帧编码码流送入传输模块之前,表示前一帧传输完成;或者前一帧的所有层都传输完毕,表示前一帧传输完成,这里不做限定。
在编码后一帧之前,编码器获取信道反馈信息。根据解码端已收到的帧号与层号,结合参考层号集合中的层号来获取参考图像。具体的,依据解码端已收到的帧号与层号,取距离当前图像最近的帧号,并取该帧号对应的图像帧的参考层号集合中比该层号小且距离该层号最近的层号。例如,解码端收到前一帧的第5层,而前一帧的参考层号集合Rx={1,4,6},则取前一帧的层号4的重建图像作为参考图像进行编码。或者,编码端可以在确定收到的前一帧的第5层是小于前一帧的参考层号集合中的最高层6,可以将信道反馈信息指示的多个帧号中的指定帧号确定为参考帧号,此时取的参考帧号是确认解码端已经接收完毕的帧。例如,编码第3帧,如果解码端已收到的帧号包含第1帧,可以指定参考第1帧。
4、重复步骤2和3,直到编码传输完成视频中的所有图像。
解码端:
1、解码端获取可分级视频编码总分层数,以及参考层号集合信息。
解码端可以通过解析码流获取到总分层数和参考层号集合,也可以和编码端协商确定总分层数和参考层号集合,本申请对此不做具体限定。
2、解码端获取可分级视频码流进行解码,并依据接收到的每帧的层号,以及该帧的参考层号集合,将解码后的重建图像放入DPB。
解码端接收到码流后,将码流直接送入解码器进行解码。解码端解析码流按照从低层次到高层次的顺序,解码一帧图像的基本层与增强层。每解码获得一层重建图像后,将依据该帧的参考层号集合,判断该层的重建图像是否需要送入DPB。具体地,若解码到某一层的层号在该帧的参考层号集合中,则将该层重建图像放入DPB中;如果解码到该帧的更高层,而且该层层号也在该帧的参考层号集合中时,则将该层图像放入DPB,并替代进入DPB的该帧的低层重建图像,作为该帧的参考层图像,将被后续帧参考。这里的替代可以是图像数据的重写与覆盖,复用一个存储空间;也可以是以标注的形式将该层标记为参考层,将低层标记为非参考层,并保留参考层的存储空间,将非参考层的存储空间释放。
如果由解码端进行已接收到的帧号和层号信息反馈,则解码端获取该帧所有能收到的数据之后,反馈已收到对应于该帧的帧号与层号。或者,解码端可以每收到该帧的一层数据,就反馈已收到对应于该帧的帧号和层号,并按照层号从小到大顺序进行反馈。
3、解码端解码完成一帧数据,获得该帧最高层的重建图像,并将图像送入显示模块进行显示。
解码完成一帧数据分为两种情况。第一种是解码端收到了该帧的最高层码流,解码出 来该帧的最高层的重建图像,此时可将该图像直接送入显示模块。这里,判断是否为该帧的最高层,可以通过解析码流中的层级信息,判断该层层号是否与总分层数相等来得出。第二种是解码端收到了该帧的非最高层码流,解码获得该层的重建图像后,获取到接下来解码的码流属于下一帧的基本层码流,此时则将解码后的该层重建图像作为该帧最高层重建图像,送入显示模块。
需要注意的是,该步骤获得的最高层的重建图像,不一定是存入DPB的重建图像,只有层号位于该帧参考层号集合中的那些层级的重建图像,才能存入DPB。
4、基于解码图像缓冲区获取参考帧,解码后续图像,直至完成所有图像。
在解码后续图像,需要使用已编码帧作为参考帧时,则直接获取该帧进入DPB中的重建图像,进行参考并完成解码。
在解码后续图像之前,可以获取该图像的参考层号集合,用于在解码完成该图像的不同层级的重建图像后,按照步骤2将对应层级的重建图像存入DPB队列中。
本实施例的技术效果包括:
(1)由于指定了存入DPB中的层号的重建图像,因此在编码端,非指定的层号的重建图像将不会存入DPB,降低了DPB的存储成本。
(2)编解码端均不用大量的写入操作来将不必要的层的重建图像写入DPB的数据存储器中,降低了写入带宽,也提高了编解码处理速度。
(3)端到端编码方案基于信道反馈信息,因此即使丢帧,也不会出现解码端找不到参考图像,从而导致解码花屏或解码不正确的现象,改善了主观体验。另外,信道反馈信息能够很好地指导编码端对参考图像的选择,使用接收到的较优参考层进行参考,提升了编码压缩效率。
(4)解码端送入DPB的重建层图像可以与送显示的图像不同,送显示的图像可以是层号大于送入DPB的重建层图像,图像质量更好,因此能够在该方案中送显较好画质的图像,保证了用户的观看体验。
实施例二
编码端:
1、与实施例一编码端步骤1相同。
本实施例中编码端编码后将码流发送到多个解码端,因此这里将建立由一个编码端与多个解码端的多路连接,每一路传送的码流都是相同的码流。
2、与实施例一编码端步骤2相同。
3、与实施例一编码端步骤3相同,但在依据信道反馈信息时有一些不同。
该步骤中,传输完成后,编码端需要接收所有解码端的信道反馈信息,也就是说,需要获得当前图像在所有解码端的接收情况,包含所有解码端已接收到的帧号与层号,不同的解码端所接收到同一帧的最高层的层号可不同。
在编码后一帧之前,依据已收到的上述帧号与层号,选择所有解码端的信道反馈信息中接收到的共有帧号中的最大帧号作为参考帧号,并取该帧的参考层号集合中比目标层号(参见上述方法实施例确定)小的且距离目标层号最近的层号作为参考层号。
将该帧所使用的参考帧号与参考层号编码到码流中。
4、与实施例一编码端步骤4相同。
解码端:
1、与实施例一解码端步骤1相同。
2、与实施例一解码端步骤2相同,但在将该图像的不同层重建图像存入DPB时,每个解码端都需要保留该帧的参考层号集合中的所有层号的重建图像,而不能将获取到的高层重建图像替代进入DPB的该帧的低层重建图像,原因是解码端无法知道后续图像帧是使用哪一层作为参考层。
3、与实施例一解码端步骤3相同。
4、与实施例一解码端步骤4相同。
实施例三
本实施例给出基于信道反馈信息的基于指定层参考的编码端码流语法和语义示例。
在实施例一和实施例二中,需要编码端将每帧的参考层号集合写入码流中,传输到解码端,让解码端能够获取到该信息。本实施例中的码流信息不限于添加到H.264和H.265等标准协议的码流中,也可以添加到非标准的码流中。本实施例以H.265标准码流为例。
第一种示例,基于图像参数集(picture parameter set,PPS)的编码参考层号集合。在PPS中添加指示可分级编码的语法元素,并在PPS中添加指示参考层号集合的语法元素,如下表所示:
新增语法元素语义如下:
pps_shortrange_multilayer_flag用于指示添加分层编码配置参数。该值为1时表示当前图像序列使用分层编码方法,需要解析分层编码方法的语法元素;该值为0时表示不使用。
pps_candidate_reference_layer用于指示参考层号集合,解码器一帧解码完成后,需要存储的重建图像的层号,该重建图像作为参考帧进入DPB中。示例中,该语法可以是8位,每个位代表某一层的层号,比如第0位可代表基本层,第1~7位可分别代表增强层第1层到增强层第7层。这里的表现形式可不限,比如位数可以依据最高层号进行调整,如果最高层号大于8,则该语法的位数可以是多于8位。
解码端解析和处理方法如下:
解码端获取码流,解析PPS信息pic_parameter_set_rbsp,当解析到元素pps_extension_present_flag=1时,将解析pps_shortrange_multilayer_flag;若解析到pps_shortrange_multilayer_flag=1,则进一步解析pps_candidate_reference_layer,获取该元素的值,根据该元素的值的每个位上的值,即可构建该图像序列的参考层号集合。
若解析到元素pps_extension_present_flag=0,则不做进一步解析pps_shortrange_multilayer_flag;若解析到pps_shortrange_multilayer_flag=0,则不做进一步解析pps_candidate_reference_layer,此时解码器将不会按照实施例一的方法进行处理。
在解析到新的pps_candidate_reference_layer语法元素之前,该图像序列的参考层号集合不会更新。
第二种示例,基于分片头(slice segment header,SSH)编码参考层号集合。在SSH中添加指示可分级编码的语法元素,并在PPS中添加指示参考层号集合的语法元素,如下表所示:
新增语法元素语义如下:
ssh_shortrange_multilayer_flag用于指示该分片添加分层编码配置参数,该值为1时表示当前图像分片使用分层编码方法,需要解析该分片对应的分层编码方法的语法元素;该值为0时表示不使用。
ssh_candidate_reference_layer用于指示该分片的参考层号集合,解码器当前分片解码完成后,需要存储的重建图像的层号,该重建图像作为参考帧进入DPB中。示例中,该语法可以是8位,每个位代表某一层的层号,比如第0位可代表基本层,第1~7位可分别代表增强层第1层到增强层第7层。这里的表现形式可不限,比如位数可以依据最高层号进行调整,如果最高层号大于8,则该语法的位数可以是多于8位。
解码端解析和处理方法与第一种示例类似,区别主要在于该部分解析的信息是对应于图像分片的。
图9为本申请实施例的编码装置900的结构示意图。该编码装置900包括:帧间预测模块901和编码模块902。其中,
帧间预测模块901,用于根据信道反馈信息确定当前图像的参考帧号,所述信道反馈 信息用于指示解码端接收到的图像帧的信息;获取与所述参考帧号对应的第一图像帧的第一参考层号集合,所述第一参考层号集合包括N1个分层的层号,1≤N1<L1,L1表示所述第一图像帧的总分层数;根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号;编码模块902,用于根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流。
在一种可能的实现方式中,所述编码模块902,具体用于从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像,所述DPB中针对所述第一图像帧仅存有所述N1个分层的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像对所述当前图像进行所述视频编码以得到所述码流。
在一种可能的实现方式中,当只有一个解码端时,所述帧间预测模块901,具体用于获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为所述当前图像的参考帧号。
在一种可能的实现方式中,所述帧间预测模块901,具体用于将指示所述参考帧号的信道反馈信息所指示的最高层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,当有多个解码端时,所述帧间预测模块901,具体用于获取多组信道反馈信息,所述多组信道反馈信息和所述多个解码端对应,每组信道反馈信息包括多个所述信道反馈信息,所述信道反馈信息用于指示对应的解码端接收到的图像帧的帧号;根据所述多组信道反馈信息确定一个或多个共有帧号,所述共有帧号是指每组信道反馈信息中都有至少一个信道反馈信息指示了的帧号;根据所述一个或多个共有帧号确定所述当前图像的所述参考帧号。
在一种可能的实现方式中,所述帧间预测模块901,具体用于获取所述多组信道反馈信息的各组中指示所述参考帧号的信道反馈信息所指示的最高层号;将多个所述最高层号中的最小者确定为目标层号;根据所述目标层号和所述第一参考层号集合确定所述当前图像的参考层号。
在一种可能的实现方式中,所述信道反馈信息来自对应的解码端和/或传输链路上的网络设备。
在一种可能的实现方式中,所述信道反馈信息基于已发送的码流生成。
在一种可能的实现方式中,所述帧间预测模块901,具体用于获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为目标帧号;当指示所述目标帧号的信道反馈信息所指示的最高层号大于或等于第二参考层号集合中的最高层号时,将所述目标帧号确定为所述参考帧号,所述第二参考层号集合是与所述目标帧号对应的第二图像帧的参考层号集合。
在一种可能的实现方式中,所述帧间预测模块901,还用于当指示所述目标帧号的信道反馈信息所指示的最高层号小于所述第二参考层号集合中的最高层号时,将所述多个信 道反馈信息指示的多个帧号中的指定帧号确定为所述当前图像的参考帧号。
在一种可能的实现方式中,所述帧间预测模块901,还用于当所述第一参考层号集合中不包括所述目标层号时,若所述第一参考层号集合中不包括小于所述目标层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,所述码流还包括所述第一参考层号集合。
在一种可能的实现方式中,所述码流还包括所述参考帧号。
在一种可能的实现方式中,所述码流还包括所述参考帧号和所述参考层号。
在一种可能的实现方式中,当所述当前图像为图像分片时,所述帧间预测模块901,具体用于确定所述当前图像的图像分片号和所述解码端接收到的图像帧的图像分片号相同,将所述解码端接收到的图像帧的所述图像分片号对应的层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
图10为本申请实施例的解码装置1000的结构示意图。该解码装置1000包括:获取模块1001、帧间预测模块1002、解码模块1003、显示模块1004和发送模块1005。其中,
获取模块1001,用于获取码流;帧间预测模块1002,用于解析所述码流以获取当前图像的参考帧号;获取与所述参考帧号对应的第三图像帧的第三参考层号集合,所述第三参考层号集合包括N2个分层的层号,1≤N2<L2,L2表示所述第三图像帧的总分层数;根据所述第三参考层号集合确定所述当前图像的参考层号;解码模块1003,用于根据所述参考帧号和所述参考层号进行视频解码以得到所述当前图像的重建图像。
在一种可能的实现方式中,所述解码模块1003,具体用于从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像进行所述视频解码以得到所述当前图像的重建图像。
在一种可能的实现方式中,所述解码模块1003,还用于将所述当前图像的N3个分层的重建图像存入DPB中,所述当前图像的第四参考层号集合包括M个分层的层号,所述M个分层包括所述N3个分层,1≤M<L3,L3表示所述当前图像的总分层数;或者,将所述N3个分层中的最高层的重建图像存入所述DPB中。
在一种可能的实现方式中,显示模块1004,用于将所述当前图像的第L4层的重建图像送显,L4表示所述当前图像解码得到的最高层的层号。
在一种可能的实现方式中,所述帧间预测模块1002,具体用于确定解码得到的所述第三图像帧的多个重建图像分别对应的层号中的最高层号;当所述第三参考层号集合中包括所述最高层号时,将所述最高层号确定为所述当前图像的参考层号;或者,当所述参考层号集合中不包括所述最高层号时,将所述第三参考层号集合中小于且最接近所述最高层号的层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,所述帧间预测模块1002,还用于当所述第三参考层号集合中不包括所述最高层号时,若所述第三参考层号集合中不包括小于所述最高层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的 参考层号确定为所述当前图像的参考层号。
在一种可能的实现方式中,发送模块1005,用于确定接收到的图像帧的帧号和层号;向编码端发送信道反馈信息,所述信道反馈信息用于指示所述接收到的图像帧的所述帧号和所述层号。
在一种可能的实现方式中,所述发送模块1005,具体用于当根据所述码流中的帧号确定开始解析第二帧时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示第一帧的帧号和接收到的所述第一帧的最高层的层号,所述第一帧是所述第二帧的前一帧;或者,当根据接收到的图像帧的层号确定所述第一帧已接收完时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示所述第一帧的帧号和接收到的所述第一帧的最高层的层号。
在一种可能的实现方式中,当所述当前图像为图像分片时,所述发送模块1005,还用于确定接收到的图像帧的图像分片号;相应的,所述信道反馈信息还用于指示所述图像分片号。
在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、特定应用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。本申请实施例公开的方法的步骤可以直接体现为硬件编码处理器执行完成,或者用编码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
上述各实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本 申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (53)
- 一种图像编码方法,其特征在于,包括:根据信道反馈信息确定当前图像的参考帧号,所述信道反馈信息用于指示解码端接收到的图像帧的信息;获取与所述参考帧号对应的第一图像帧的第一参考层号集合,所述第一参考层号集合包括N1个分层的层号,1≤N1<L1,L1表示所述第一图像帧的总分层数;根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号;根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流。
- 根据权利要求1所述的方法,其特征在于,所述根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流,包括:从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像,所述DPB中针对所述第一图像帧仅存有所述N1个分层的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像对所述当前图像进行所述视频编码以得到所述码流。
- 根据权利要求1或2所述的方法,其特征在于,当只有一个解码端时,所述根据信道反馈信息确定当前图像的参考帧号,包括:获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为所述当前图像的参考帧号。
- 根据权利要求3所述的方法,其特征在于,所述根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号,包括:将指示所述参考帧号的信道反馈信息所指示的最高层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
- 根据权利要求1或2所述的方法,其特征在于,当有多个解码端时,所述根据信道反馈信息确定当前图像的参考帧号,包括:获取多组信道反馈信息,所述多组信道反馈信息和所述多个解码端对应,每组信道反馈信息包括多个所述信道反馈信息,所述信道反馈信息用于指示对应的解码端接收到的图像帧的帧号;根据所述多组信道反馈信息确定一个或多个共有帧号,所述共有帧号是指每组信道反馈信息中都有至少一个信道反馈信息指示了的帧号;根据所述一个或多个共有帧号确定所述当前图像的所述参考帧号。
- 根据权利要求5所述的方法,其特征在于,所述根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号,包括:获取所述多组信道反馈信息的各组中指示所述参考帧号的信道反馈信息所指示的最 高层号;将多个所述最高层号中的最小者确定为目标层号;根据所述目标层号和所述第一参考层号集合确定所述当前图像的参考层号。
- 根据权利要求1-6中任一项所述的方法,其特征在于,所述信道反馈信息来自对应的解码端和/或传输链路上的网络设备。
- 根据权利要求1-6中任一项所述的方法,其特征在于,所述信道反馈信息基于已发送的码流生成。
- 根据权利要求1或2所述的方法,其特征在于,所述根据信道反馈信息确定当前图像的参考帧号,包括:获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为目标帧号;当指示所述目标帧号的信道反馈信息所指示的最高层号大于或等于第二参考层号集合中的最高层号时,将所述目标帧号确定为所述参考帧号,所述第二参考层号集合是与所述目标帧号对应的第二图像帧的参考层号集合。
- 根据权利要求9所述的方法,其特征在于,所述方法还包括:当指示所述目标帧号的信道反馈信息所指示的最高层号小于所述第二参考层号集合中的最高层号时,将所述多个信道反馈信息指示的多个帧号中的指定帧号确定为所述当前图像的参考帧号。
- 根据权利要求4或6所述的方法,其特征在于,所述方法还包括:当所述第一参考层号集合中不包括所述目标层号时,若所述第一参考层号集合中不包括小于所述目标层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
- 根据权利要求1-11中任一项所述的方法,其特征在于,所述码流还包括所述第一参考层号集合。
- 根据权利要求1-4中任一项所述的方法,其特征在于,所述码流还包括所述参考帧号。
- 根据权利要求1-12中任一项所述的方法,其特征在于,所述码流还包括所述参考帧号和所述参考层号。
- 根据权利要求1-3中任一项所述的方法,其特征在于,当所述当前图像为图像分片时,所述信道反馈信息包括所述解码端接收到的图像帧的图像分片号和所述图像分片号对应的层号;所述根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号,包括:若所述当前图像的图像分片号和所述解码端接收到的图像帧的图像分片号相同,将所述解码端接收到的图像帧的所述图像分片号对应的层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
- 一种图像解码方法,其特征在于,包括:获取码流;解析所述码流以获取当前图像的参考帧号;获取与所述参考帧号对应的第三图像帧的第三参考层号集合,所述第三参考层号集合包括N2个分层的层号,1≤N2<L2,L2表示所述第三图像帧的总分层数;根据所述第三参考层号集合确定所述当前图像的参考层号;根据所述参考帧号和所述参考层号进行视频解码以得到所述当前图像的重建图像。
- 根据权利要求16所述的方法,其特征在于,所述根据所述参考帧号和所述参考层号进行视频解码以得到所述当前图像的重建图像,包括:从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像进行所述视频解码以得到所述当前图像的重建图像。
- 根据权利要求16或17所述的方法,其特征在于,所述方法还包括:将所述当前图像的N3个分层的重建图像存入DPB中,所述当前图像的第四参考层号集合包括M个分层的层号,所述M个分层包括所述N3个分层,1≤M<L3,L3表示所述当前图像的总分层数;或者,将所述N3个分层中的最高层的重建图像存入所述DPB中。
- 根据权利要求18所述的方法,其特征在于,所述方法还包括:将所述当前图像的第L4层的重建图像送显,L4表示所述当前图像解码得到的最高层的层号。
- 根据权利要求16-19中任一项所述的方法,其特征在于,所述根据所述第三参考层号集合确定所述当前图像的参考层号,包括:确定解码得到的所述第三图像帧的多个重建图像分别对应的层号中的最高层号;当所述第三参考层号集合中包括所述最高层号时,将所述最高层号确定为所述当前图像的参考层号;或者,当所述参考层号集合中不包括所述最高层号时,将所述第三参考层号集合中小于且最接近所述最高层号的层号确定为所述当前图像的参考层号。
- 根据权利要求20所述的方法,其特征在于,所述方法还包括:当所述第三参考层号集合中不包括所述最高层号时,若所述第三参考层号集合中不包括小于所述最高层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
- 根据权利要求16-21中任一项所述的方法,其特征在于,所述方法还包括:确定接收到的图像帧的帧号和层号;向编码端发送信道反馈信息,所述信道反馈信息用于指示所述帧号和所述层号。
- 根据权利要求22所述的方法,其特征在于,所述向编码端发送信道反馈信息,包括:当根据所述码流中的帧号确定开始解析第二帧时,向所述编码端发送所述信道反馈信 息,所述信道反馈信息用于指示第一帧的帧号和接收到的所述第一帧的最高层的层号,所述第一帧是所述第二帧的前一帧;或者,当根据接收到的图像帧的层号确定所述第一帧已接收完时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示所述第一帧的帧号和接收到的所述第一帧的最高层的层号。
- 根据权利要求22或23所述的方法,其特征在于,当所述当前图像为图像分片时,所述方法还包括:确定接收到的图像帧的图像分片号;相应的,所述信道反馈信息还用于指示所述图像分片号。
- 一种图像编码装置,其特征在于,包括:帧间预测模块,用于根据信道反馈信息确定当前图像的参考帧号,所述信道反馈信息用于指示解码端接收到的图像帧的信息;获取与所述参考帧号对应的第一图像帧的第一参考层号集合,所述第一参考层号集合包括N1个分层的层号,1≤N1<L1,L1表示所述第一图像帧的总分层数;根据所述信道反馈信息和所述第一参考层号集合确定所述当前图像的参考层号;编码模块,用于根据所述参考帧号和所述参考层号对所述当前图像进行视频编码以得到码流。
- 根据权利要求25所述的装置,其特征在于,所述编码模块,具体用于从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像,所述DPB中针对所述第一图像帧仅存有所述N1个分层的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像对所述当前图像进行所述视频编码以得到所述码流。
- 根据权利要求25或26所述的装置,其特征在于,当只有一个解码端时,所述帧间预测模块,具体用于获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为所述当前图像的参考帧号。
- 根据权利要求27所述的装置,其特征在于,所述帧间预测模块,具体用于将指示所述参考帧号的信道反馈信息所指示的最高层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
- 根据权利要求25或26所述的装置,其特征在于,当有多个解码端时,所述帧间预测模块,具体用于获取多组信道反馈信息,所述多组信道反馈信息和所述多个解码端对应,每组信道反馈信息包括多个所述信道反馈信息,所述信道反馈信息用于指示对应的解码端接收到的图像帧的帧号;根据所述多组信道反馈信息确定一个或多个共有帧号,所述共有帧号是指每组信道反馈信息中都有至少一个信道反馈信息指示了的帧号;根据所述一个或多个共有帧号确定所述当前图像的所述参考帧号。
- 根据权利要求29所述的装置,其特征在于,所述帧间预测模块,具体用于获取所述多组信道反馈信息的各组中指示所述参考帧号的信道反馈信息所指示的最高层号;将多 个所述最高层号中的最小者确定为目标层号;根据所述目标层号和所述第一参考层号集合确定所述当前图像的参考层号。
- 根据权利要求25-30中任一项所述的装置,其特征在于,所述信道反馈信息来自对应的解码端和/或传输链路上的网络设备。
- 根据权利要求25-30中任一项所述的装置,其特征在于,所述信道反馈信息基于已发送的码流生成。
- 根据权利要求25或26所述的装置,其特征在于,所述帧间预测模块,具体用于获取多个所述信道反馈信息,所述信道反馈信息用于指示所述解码端接收到的图像帧的帧号;将所述多个信道反馈信息指示的多个帧号中最接近所述当前图像的帧号者确定为目标帧号;当指示所述目标帧号的信道反馈信息所指示的最高层号大于或等于第二参考层号集合中的最高层号时,将所述目标帧号确定为所述参考帧号,所述第二参考层号集合是与所述目标帧号对应的第二图像帧的参考层号集合。
- 根据权利要求33所述的装置,其特征在于,所述帧间预测模块,还用于当指示所述目标帧号的信道反馈信息所指示的最高层号小于所述第二参考层号集合中的最高层号时,将所述多个信道反馈信息指示的多个帧号中的指定帧号确定为所述当前图像的参考帧号。
- 根据权利要求28或30所述的装置,其特征在于,所述帧间预测模块,还用于当所述第一参考层号集合中不包括所述目标层号时,若所述第一参考层号集合中不包括小于所述目标层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
- 根据权利要求25-35中任一项所述的装置,其特征在于,所述码流还包括所述第一参考层号集合。
- 根据权利要求25-28中任一项所述的装置,其特征在于,所述码流还包括所述参考帧号。
- 根据权利要求25-36中任一项所述的装置,其特征在于,所述码流还包括所述参考帧号和所述参考层号。
- 根据权利要求25-38中任一项所述的装置,其特征在于,当所述当前图像为图像分片时,所述帧间预测模块,具体用于确定所述当前图像的图像分片号和所述解码端接收到的图像帧的图像分片号相同,将所述解码端接收到的图像帧的所述图像分片号对应的层号确定为目标层号;当所述第一参考层号集合中包括所述目标层号时,将所述目标层号确定为所述当前图像的参考层号;或者,当所述第一参考层号集合中不包括所述目标层号时,将所述第一参考层号集合中小于且最接近所述目标层号的层号确定为所述当前图像的参考层号。
- 一种图像解码装置,其特征在于,包括:获取模块,用于获取码流;帧间预测模块,用于解析所述码流以获取当前图像的参考帧号;获取与所述参考帧号对应的第三图像帧的第三参考层号集合,所述第三参考层号集合包括N2个分层的层号,1≤N2<L2,L2表示所述第三图像帧的总分层数;根据所述第三参考层号集合确定所述当前图像的参考层号;解码模块,用于根据所述参考帧号和所述参考层号进行视频解码以得到所述当前图像的重建图像。
- 根据权利要求40所述的装置,其特征在于,所述解码模块,具体用于从解码图像缓冲区DPB中获取与所述参考帧号和所述参考层号对应的重建图像;将获取的所述与所述参考帧号和所述参考层号对应的重建图像作为参考图像,根据所述参考图像进行所述视频解码以得到所述当前图像的重建图像。
- 根据权利要求40或41所述的装置,其特征在于,所述解码模块,还用于将所述当前图像的N3个分层的重建图像存入DPB中,所述当前图像的第四参考层号集合包括M个分层的层号,所述M个分层包括所述N3个分层,1≤M<L3,L3表示所述当前图像的总分层数;或者,将所述N3个分层中的最高层的重建图像存入所述DPB中。
- 根据权利要求42所述的装置,其特征在于,还包括:显示模块,用于将所述当前图像的第L4层的重建图像送显,L4表示所述当前图像解码得到的最高层的层号。
- 根据权利要求40-43中任一项所述的装置,其特征在于,所述帧间预测模块,具体用于确定解码得到的所述第三图像帧的多个重建图像分别对应的层号中的最高层号;当所述第三参考层号集合中包括所述最高层号时,将所述最高层号确定为所述当前图像的参考层号;或者,当所述参考层号集合中不包括所述最高层号时,将所述第三参考层号集合中小于且最接近所述最高层号的层号确定为所述当前图像的参考层号。
- 根据权利要求44所述的装置,其特征在于,所述帧间预测模块,还用于当所述第三参考层号集合中不包括所述最高层号时,若所述第三参考层号集合中不包括小于所述最高层号的层号,则将所述当前图像的前一帧的参考帧号确定为所述当前图像的参考帧号,将所述前一帧的参考层号确定为所述当前图像的参考层号。
- 根据权利要求40-45中任一项所述的装置,其特征在于,还包括:发送模块,用于确定接收到的图像帧的帧号和层号;向编码端发送信道反馈信息,所述信道反馈信息用于指示所述帧号和所述层号。
- 根据权利要求46所述的装置,其特征在于,所述发送模块,具体用于当根据所述码流中的帧号确定开始解析第二帧时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示第一帧的帧号和接收到的所述第一帧的最高层的层号,所述第一帧是所述第二帧的前一帧;或者,当根据接收到的图像帧的层号确定所述第一帧已接收完时,向所述编码端发送所述信道反馈信息,所述信道反馈信息用于指示所述第一帧的帧号和接收到的所述第一帧的最高层的层号。
- 根据权利要求46或47所述的装置,其特征在于,当所述当前图像为图像分片时,所述发送模块,还用于确定接收到的图像帧的图像分片号;相应的,所述信道反馈信息还用于指示所述图像分片号。
- 一种编码器,其特征在于,包括:一个或多个处理器;非瞬时性计算机可读存储介质,耦合到所述处理器并存储由所述处理器执行的程序,其中所述程序在由所述处理器执行时,使得所述编码器执行根据权利要求1-15任一项所述的方法。
- 一种解码器,其特征在于,包括:一个或多个处理器;非瞬时性计算机可读存储介质,耦合到所述处理器并存储由所述处理器执行的程序,其中所述程序在由所述处理器执行时,使得所述解码器执行根据权利要求16-24任一项所述的方法。
- 一种非瞬时性计算机可读存储介质,其特征在于,包括程序代码,当其由计算机设备执行时,用于执行根据权利要求1-24任一项所述的方法。
- 一种非瞬时性存储介质,其特征在于,包括根据权利要求1-24任一项所述的方法编码的比特流。
- 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求1-24任意一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22885945.0A EP4412206A4 (en) | 2021-10-27 | 2022-10-25 | IMAGE CODING METHOD AND DEVICE AND IMAGE DECODING METHOD AND DEVICE |
| US18/647,534 US20240275995A1 (en) | 2021-10-27 | 2024-04-26 | Picture Encoding Method and Apparatus, and Picture Decoding Method and Apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111256754.XA CN116033147A (zh) | 2021-10-27 | 2021-10-27 | 图像编解码方法和装置 |
| CN202111256754.X | 2021-10-27 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/647,534 Continuation US20240275995A1 (en) | 2021-10-27 | 2024-04-26 | Picture Encoding Method and Apparatus, and Picture Decoding Method and Apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023072068A1 true WO2023072068A1 (zh) | 2023-05-04 |
Family
ID=86076968
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/127363 Ceased WO2023072068A1 (zh) | 2021-10-27 | 2022-10-25 | 图像编解码方法和装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20240275995A1 (zh) |
| EP (1) | EP4412206A4 (zh) |
| CN (1) | CN116033147A (zh) |
| WO (1) | WO2023072068A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116760976A (zh) * | 2023-08-21 | 2023-09-15 | 腾讯科技(深圳)有限公司 | 仿射预测决策方法、装置、设备及存储介质 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120302051A (zh) * | 2024-01-10 | 2025-07-11 | 华为技术有限公司 | 一种编解码方法及装置 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101360243A (zh) * | 2008-09-24 | 2009-02-04 | 腾讯科技(深圳)有限公司 | 基于反馈参考帧的视频通信系统及方法 |
| US20110195658A1 (en) * | 2010-02-11 | 2011-08-11 | Electronics And Telecommunications Research Institute | Layered retransmission apparatus and method, reception apparatus and reception method |
| CN105981387A (zh) * | 2013-10-15 | 2016-09-28 | 诺基亚技术有限公司 | 使用可分级嵌套sei消息的视频编码和解码 |
| US20180343098A1 (en) * | 2017-05-24 | 2018-11-29 | Qualcomm Incorporated | Techniques and apparatuses for controlling negative acknowledgement (nack) transmissions for video communications |
| CN111183640A (zh) * | 2017-10-11 | 2020-05-19 | 索尼公司 | 发送装置、发送方法和程序 |
| US20210120232A1 (en) * | 2020-12-23 | 2021-04-22 | Intel Corporation | Method and system of video coding with efficient frame loss recovery |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9049449B2 (en) * | 2005-04-13 | 2015-06-02 | Nokia Corporation | Coding of frame number in scalable video coding |
| RU2432703C2 (ru) * | 2007-04-17 | 2011-10-27 | Нокиа Корпорейшн | Масштабируемое видеокодирование с обратной связью |
| CN109451321B (zh) * | 2013-06-05 | 2023-06-02 | 太阳专利托管公司 | 图像编码方法、图像解码方法、图像编码装置以及图像解码装置 |
| KR102262064B1 (ko) * | 2013-06-12 | 2021-06-08 | 주식회사 케이티 | 스케일러블 비디오 신호 인코딩/디코딩 방법 및 장치 |
| US9807407B2 (en) * | 2013-12-02 | 2017-10-31 | Qualcomm Incorporated | Reference picture selection |
| US11445223B2 (en) * | 2016-09-09 | 2022-09-13 | Microsoft Technology Licensing, Llc | Loss detection for encoded video transmission |
| WO2021137597A1 (ko) * | 2019-12-30 | 2021-07-08 | 엘지전자 주식회사 | Ols에 대한 dpb 파라미터를 사용하는 영상 디코딩 방법 및 그 장치 |
| CN113259673B (zh) * | 2021-07-05 | 2021-10-15 | 腾讯科技(深圳)有限公司 | 伸缩性视频编码方法、装置、设备及存储介质 |
-
2021
- 2021-10-27 CN CN202111256754.XA patent/CN116033147A/zh active Pending
-
2022
- 2022-10-25 WO PCT/CN2022/127363 patent/WO2023072068A1/zh not_active Ceased
- 2022-10-25 EP EP22885945.0A patent/EP4412206A4/en active Pending
-
2024
- 2024-04-26 US US18/647,534 patent/US20240275995A1/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101360243A (zh) * | 2008-09-24 | 2009-02-04 | 腾讯科技(深圳)有限公司 | 基于反馈参考帧的视频通信系统及方法 |
| US20110195658A1 (en) * | 2010-02-11 | 2011-08-11 | Electronics And Telecommunications Research Institute | Layered retransmission apparatus and method, reception apparatus and reception method |
| CN105981387A (zh) * | 2013-10-15 | 2016-09-28 | 诺基亚技术有限公司 | 使用可分级嵌套sei消息的视频编码和解码 |
| US20180343098A1 (en) * | 2017-05-24 | 2018-11-29 | Qualcomm Incorporated | Techniques and apparatuses for controlling negative acknowledgement (nack) transmissions for video communications |
| CN111183640A (zh) * | 2017-10-11 | 2020-05-19 | 索尼公司 | 发送装置、发送方法和程序 |
| US20210120232A1 (en) * | 2020-12-23 | 2021-04-22 | Intel Corporation | Method and system of video coding with efficient frame loss recovery |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4412206A4 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116760976A (zh) * | 2023-08-21 | 2023-09-15 | 腾讯科技(深圳)有限公司 | 仿射预测决策方法、装置、设备及存储介质 |
| CN116760976B (zh) * | 2023-08-21 | 2023-12-08 | 腾讯科技(深圳)有限公司 | 仿射预测决策方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20240275995A1 (en) | 2024-08-15 |
| EP4412206A1 (en) | 2024-08-07 |
| CN116033147A (zh) | 2023-04-28 |
| EP4412206A4 (en) | 2025-02-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7571227B2 (ja) | 行列ベースのイントラ予測と二次変換コア選択を調和させるエンコーダ、デコーダ、および対応する方法 | |
| CN112673626B (zh) | 各分割约束元素之间的关系 | |
| CN112954367B (zh) | 使用调色板译码的编码器、解码器和相应方法 | |
| CN113498605A (zh) | 编码器、解码器及使用自适应环路滤波器的相应方法 | |
| CN115211114B (zh) | 编码器、解码器和参数集中的指示和语义的对应方法 | |
| CN113660489B (zh) | 用于帧内子划分的解码方法、装置、解码器和存储介质 | |
| US20240275995A1 (en) | Picture Encoding Method and Apparatus, and Picture Decoding Method and Apparatus | |
| CN113455005A (zh) | 用于帧内子分区译码工具所产生的子分区边界的去块效应滤波器 | |
| CN114679583A (zh) | 视频编码器、视频解码器及对应方法 | |
| CN115836527A (zh) | 编码器、解码器及用于自适应环路滤波的对应方法 | |
| CN114598873B (zh) | 量化参数的解码方法和装置 | |
| CN115134597B (zh) | 增强层编解码方法和装置 | |
| JP2024147569A (ja) | スライス用のピクチャパーティション情報をシグナリングするためのデコーダ及び対応する方法 | |
| CN112956196A (zh) | 使用dct2启用高层级标志的编码器、解码器和对应方法 | |
| CN113228632B (zh) | 用于局部亮度补偿的编码器、解码器、以及对应方法 | |
| CN114830652A (zh) | 用于方向性帧内预测的参考样本插值滤波的方法及装置 | |
| WO2024093312A1 (zh) | 图像编解码方法和装置 | |
| WO2023160470A1 (zh) | 编解码方法和装置 | |
| WO2021027799A1 (zh) | 视频编码器及qp设置方法 | |
| CN118646901B (zh) | 编解码方法和装置 | |
| WO2024093305A1 (zh) | 图像编解码方法和装置 | |
| WO2024093317A1 (zh) | 图像分层编码方法和装置 | |
| WO2023216445A1 (zh) | 编解码方法和装置 | |
| CN114650425A (zh) | 视频帧格式转换方法和装置 | |
| HK40071103A (zh) | 用於指示条带的图像分割信息的解码器及对应方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22885945 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2022885945 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2022885945 Country of ref document: EP Effective date: 20240502 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |

