WO2022088101A1 - 编码方法、解码方法、编码器、解码器及存储介质 - Google Patents

编码方法、解码方法、编码器、解码器及存储介质 Download PDF

Info

Publication number
WO2022088101A1
WO2022088101A1 PCT/CN2020/125532 CN2020125532W WO2022088101A1 WO 2022088101 A1 WO2022088101 A1 WO 2022088101A1 CN 2020125532 W CN2020125532 W CN 2020125532W WO 2022088101 A1 WO2022088101 A1 WO 2022088101A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
component
data
current image
video
Prior art date
Application number
PCT/CN2020/125532
Other languages
English (en)
French (fr)
Inventor
元辉
杨烨
刘瑶
李明
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2020/125532 priority Critical patent/WO2022088101A1/zh
Priority to CN202080106697.4A priority patent/CN116569550A/zh
Publication of WO2022088101A1 publication Critical patent/WO2022088101A1/zh
Priority to US18/141,098 priority patent/US20230269380A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/136Incoming video signal characteristics or properties

Definitions

  • Decoded data of the current image is determined based on the restored data of the first image component and the restored data of the second image component of the current image.
  • the identification information indicates that the restoration data of the second image component is determined using the prediction model, skip encoding the restoration data of the second image component of the current image, wherein the second image the component is an image component different from the first image component;
  • an embodiment of the present application provides an encoder, the encoder includes a second processor and a second memory storing executable instructions of the second processor, when the instructions are executed by the second processor When executed by the processor, the encoding method described in the second aspect is implemented.
  • Fig. 1 is a frame diagram of a video processing method
  • Fig. 7 is the structural representation of U-net
  • Fig. 13 is the realization schematic diagram 1 of the video compression method
  • Fig. 14 is the realization schematic diagram II of the video compression method
  • 16 is a schematic diagram of the composition and structure of the decoder 2;
  • Figure 17 is a schematic diagram of the composition structure of the encoder one
  • FIG. 18 is a second schematic diagram of the composition and structure of the encoder.
  • FIG. 1 is a frame diagram of a video processing method.
  • the video can be processed mainly by an encoder and a decoder.
  • the decoder may perform compression processing on the video data, wherein the encoder may first perform preprocessing on the video data, and then perform compression processing on the preprocessed data to generate a bit stream, and The bit stream is transmitted to the decoder; correspondingly, after receiving the bit stream corresponding to the video data, the decoder can obtain video data through decoding processing, wherein after the decoder decodes the bit stream, it can further perform post-processing to restore the video data for playback.
  • Compressing video especially in the case of a high compression rate, will cause the video quality to decrease.
  • the further processing techniques after decoding are mainly divided into: processing algorithms based on image enhancement and processing algorithms based on image restoration.
  • the processing algorithm based on image enhancement focuses on enhancing the subjective quality of the image, and the main method is to filter the compressed image with a filter to enhance the visual effect of the image.
  • the processing algorithm based on image restoration regards the removal of compression effect as an image restoration problem, and typical algorithms include maximum a posteriori probability method, non-uniform interpolation method and so on.
  • frame rate improvement algorithms can be divided into two categories: non-block matching-based frame rate improvement algorithms and block matching-based frame rate improvement algorithms.
  • the non-block matching-based frame rate boosting algorithm does not consider the motion of objects in the image, and uses the linear operation of adjacent frames to estimate the interpolation frame. This kind of algorithm has low complexity but poor processing effect.
  • the frame rate improvement algorithm based on block matching considers the motion of the object, and interpolates on the motion trajectory of the object. The motion estimation accuracy of the pixel-level optical flow method is high, but it also brings about an increase in computational complexity.
  • the processing method based on image enhancement is relatively simple, the effect obtained is often unsatisfactory.
  • the processing algorithm based on image restoration has an improved effect.
  • the complexity is relatively high.
  • the non-uniform interpolation method is to non-uniformly interpolate the known image information onto the target image, but such methods have poor applicability, are difficult to deal with blur phenomenon, and cannot make full use of prior knowledge.
  • Video sequence compression has a large amount of information, large code flow, and low coding efficiency. Therefore, how to effectively reduce the code flow has become an urgent problem to be solved.
  • the encoding method and decoding method proposed in this application can only encode and decode part of the image components of one or more images in the video, thereby reducing the code rate, greatly reducing the transmission code stream, and effectively improving the encoding and decoding efficiency.
  • Step 101 Decode the video stream, and determine the decoding parameters of the current image in the video; wherein, the decoding parameters of the current image include restored data of the first image component of one or more images in the video.
  • the video includes one or more images, that is, for any image in the video, the decoder can obtain corresponding decoding parameters.
  • the current image is the current image to be decoded in the video, that is to say, when the decoder decodes the image to be decoded in the video, it can first decode to obtain the decoded image of the to-be-decoded image. parameter.
  • the first image component may be the luminance component of the current image
  • the second image component may be the chrominance component of the current image
  • the first image component may be the Y component (luminance component) of the current image
  • the second image component may be the UV component (chrominance component) of the current image.
  • the decoding parameters may only include The restored data of the Y component does not include the restored data of the UV component.
  • the first image component may be the chrominance component of the current image
  • the second image component may be the luminance component of the current image
  • the second image component may be the Y component (luminance component) of the current image
  • the first image component may be the UV component (chrominance component) of the current image
  • the decoding parameters may not include Restoration data of the Y component and only restoration data of the UV component are included.
  • YUV is a color coding method that is often used in various video processing components.
  • the bandwidth of chroma can be reduced by YUV encoding method.
  • YUV can represent the type of compiled true-color color space (color space), Y'UV, YUV, YCbCr, YPbPr and other proper nouns can be called YUV, overlapping each other.
  • Y represents the brightness (Luminance or Luma), that is, the grayscale value
  • U and "V” represent the chroma (Chrominance or Chroma), which are used to describe the color and saturation of the image, and are used to specify pixels. s color.
  • YCbCr is a scaled and offset version of YUV. Among them, Y has the same meaning as Y in YUV. Cb and Cr also refer to color, but they are different in terms of representation. In the YUV family, YCbCr is the most widely used member in the computer system, and its application fields are very wide. Both JPEG and MPEG use this format. Generally speaking, YUV mostly refers to YCbCr. YCbCr has many sampling formats, such as 4:4:4, 4:2:2, 4:1:1 and 4:2:0.
  • the first image component may be the Y component of the current image
  • the second image component may be the Cb and Cr components of the current image
  • the first image component may be the Cb component of the current image
  • the second image component may be the Cb component of the current image.
  • the image component may be the Y and Cr components of the current image
  • the first image component may be the Cr component of the current image
  • the second image component may be the Cb and Y components of the current image.
  • the first image component may be a first color component
  • the second image component may be a second color component; wherein the second color component is a color component different from the first color component.
  • the first color component may be the R (red) component of the current image
  • the second color component may be the G (green) component and the B (blue) component of the current image.
  • decoding The parameters may include only the restored data of the R component without including the restored data of the G and B components.
  • the first color component may also be a G component (or a B component), and the second color component may also be an R component and a B component (or, a G component and an R component).
  • the decoder decodes the video code stream, and can also obtain identification information.
  • the decoding parameters of the current image obtained by the decoder decoding may include identification information.
  • the decoder may perform an acquisition process of the restoration data of the second image component based on the prediction model.
  • the identification information is used to determine whether to use the prediction model to determine the restored data of the second image component, that is, the identification information indicates whether to use the prediction model to determine the restored data of the second image component.
  • the identification information corresponding to the current image may be determined by a flag bit of one bit. For example, if the flag bit is 1, that is, the value of the identification information is 1, then It is determined to use the prediction model to determine the restored data of the second image component. If the flag bit is 0, that is, the value of the identification information is 0, it is determined not to use the prediction model to determine the restored data of the second image component.
  • the identification information may be information directly indicated by one or more bits existing in the video code stream.
  • the encoder can set the identification information and write the identification information into the video code stream after determining to use the prediction model.
  • the decoder may determine the identification information according to the flag bits of one or more bits in the video code stream.
  • the encoder may further determine the identification information of the current image according to whether the current image is a high temporal layer image or a low temporal layer image.
  • the decoder decodes the video stream to obtain the encoding sequence of the current image, so that it can be determined whether the current image is a high temporal layer image or a low temporal layer image according to the encoding sequence.
  • the decoder when decoding the video code stream and determining the decoding parameters of the current image in the video, the decoder may also decode the video code stream, and obtain identification information from the data unit corresponding to the current image.
  • the decoder when decoding the video code stream and determining the decoding parameters of the current image in the video, the decoder may also decode the video code stream and determine the temporal layer attribute of the current image, wherein the temporal layer attribute indicates The current image is a high temporal layer image or a low temporal layer image; then, the identification information included in the decoding parameters can be further determined according to the temporal layer attribute.
  • the decoder when the decoder determines the identification information based on the temporal layer attribute, if the restored data of the current image obtained by decoding the video stream does not include the restored data of the second image component of the current image. , meanwhile, the temporal layer attribute indicates that the current picture is a high temporal layer picture, then the decoder may set the identification information to indicate that the restoration data of the second picture component is determined using the prediction model.
  • the identification information indicates that the prediction model is used to determine the restored data of the second image component, then it can be shown that the restored data of the second image component of the current image cannot be obtained by decoding the video stream, and the decoder needs to use the first
  • the restored data of the image component and the prediction model predict and determine the restored data of the second image component, that is, the methods of the following steps 102 and 103 may be performed.
  • the decoder can obtain the restored data of the second image component of the image by using the restored data of the first image component and the prediction model by using the decoding method proposed in the present application.
  • the decoder after the decoder decodes the video code stream and obtains the identification information, if the identification information indicates that the restoration data of the second image component is not determined using the prediction model, the decoder can directly decode the video code stream. , so that the restored data of the second image component can be directly obtained.
  • the identification information indicates that the prediction model is not used to determine the restored data of the second image component
  • the restored data of the second image component of the current image can be obtained by decoding the video stream, so the decoder can directly decode video code stream to obtain the restored data of the second image component.
  • the decoder decodes the video stream to obtain the restored data of the high temporal layer image and the restored data of the low temporal layer image of the video.
  • the restored data of the high temporal layer image may include only the restored data of the first image component
  • the restored data of the low temporal layer image may include the restored data of the first image component and the restored data of the second image component.
  • the decoder may perform the process of obtaining the recovered data of the second image component based on the prediction model, that is, the methods of the following steps 102 and 103 may be performed.
  • the decoder can directly generate corresponding decoded data according to the restored data of the high temporal layer image.
  • the decoder can directly generate the restored data according to the restored data of the low temporal layer image. corresponding decoded data.
  • the images in the video can be divided into “high temporal layer images” and “low temporal layer images”, and at the encoding end, the encoder can choose to perform component removal processing on the high temporal layer images,
  • the restored image data transmitted to the decoding end only includes the restored data of the first image component of the high temporal layer image. Therefore, for the high temporal layer image, the decoder can perform the restored data of the second image component according to the decoding method proposed in this application.
  • Step 102 according to the decoding parameters of the current image, and based on the restored data of the first image component, use a prediction model to determine the restored data of the second image component of the current image; wherein, the second image component is an image component different from the first image component .
  • the decoder after decoding the video stream and obtaining the decoding parameters of the restored data including the first image component, the decoder can use the decoding parameters of the current image and the restored data of the first image component to use The prediction model further determines restored data for the second image component of the current image.
  • the decoder based on the restored data of the first image component, before the second image sub-decoder of the current image is determined by the prediction model according to the restored data of the decoding parameter of the current image, that is, before step 102, the decoder also The video stream can be decoded to obtain recovered data of one or more low temporal layer images.
  • one or more low temporal layer images are one or more images obtained by decoding the video stream before decoding the current image in a decoding order.
  • the decoder when using the prediction model to determine the restored data of the second image component of the current image based on the restored data of the first image component according to the decoding parameters of the current image, if the identification information is set to indicate
  • the decoder may use the prediction model to determine the second image of the current image based on the restored data of the first image component of the current image and the restored data of one or more lower temporal layer images Component recovery data.
  • the decoder may input the restored data of the first image component of the current image and the restored data of one or more low-temporal layer images into the prediction model to generate the restoration of the second image component of the current image data.
  • the decoder can input the restored data of the first image component of the high temporal layer image and the restored data of the low temporal layer image into the prediction model, and generate the second image component of the high temporal layer image. Data recovery.
  • the restored data of the low temporal layer image may be used to predict the restored data of the second image component of the high temporal layer image.
  • the restored data of the low temporal layer image can be used as reference data to realize the prediction of the restored data of the high temporal layer.
  • the restoration data of the second image component of the high temporal layer needs to be predicted
  • the second image component of the low temporal layer image needs to be used as a reference.
  • the UV component of the low temporal layer image can also be input into the prediction model together with the most reference.
  • the prediction model may specifically include a noise reduction network and a prediction network, wherein the noise reduction network may be used for noise removal, and the prediction network may be used for restoration of the second image component. predict.
  • the decoder determines the restored data of the second image component of the current image by using the prediction model according to the decoding parameters of the current image and the restored data of the first image component
  • the current image The restored data of the first image component is input into the noise reduction network, so as to obtain the first noise-reduced data; at the same time, the restored data of one or more low-temporal layer images can be input into the noise reduction network, so as to obtain the second de-noised data.
  • the first denoised data and the second denoised data can be fused to obtain the fused image features; finally, the decoder inputs the fused image features into the prediction network to generate the image features of the current image. Restoration data for the second image component.
  • the decoder before the decoder performs fusion processing on the first denoised data and the second denoised data, and obtains the fused image features, the decoder may also firstly fuse the second denoised data.
  • the data is subjected to size conversion processing, so that the first and second denoised data can have the same size.
  • the fusion processing further includes the first preprocessing, wherein the first A preprocessing performs size transformation processing on the first denoised data or the second denoised data, so that after the first preprocessing, the first denoised data and the second denoised data have the same size.
  • the decoder can obtain model parameters of the prediction model by decoding the video stream, and then can construct the noise reduction network and the prediction network based on the model parameters, that is, construct the prediction model.
  • the decoder can first determine the training data set; then can use the training data set for training to determine the model parameters of the prediction model; finally, the prediction model can be constructed based on the model parameters.
  • the decoder when determining the training data set, may first determine the training data identification information by decoding the video stream; and then obtain the training data set according to the training data identification information.
  • the decoder when determining the training data set, may also directly obtain the training data set according to preset training data identification information.
  • the decoder when determining the training data set, may also obtain the training data set from the remote server indicated by the training data identification information.
  • Step 103 Determine the decoded data of the current image based on the restored data of the first image component and the restored data of the second image component of the current image.
  • the decoder after the decoder determines the restored data of the second image component of the current image based on the restored data of the first image component by using the prediction model, the decoder can determine the restored data of the second image component of the current image based on the restored data of the first image component of the current image and The recovered data of the second image component determines the decoded data of the current image.
  • the decoder can obtain the restored data of the first image component of one or more images in the video by decoding the video code stream, and then can use the prediction method based on the restored data of the first image component.
  • the model predicts the restored data of the second image component of one or more images in the video, so that the decoding corresponding to one or more images can be finally obtained based on the restored data of the first image component and the restored data of the second image component data.
  • the decoder can further determine whether to use the prediction model to obtain the restoration data of the second image component by decoding the obtained identification information. Prediction of the restored data, then the decoder can perform the above steps 102 and 103; if it is determined not to use the prediction model to predict the restored data of the second image component based on the identification information, then the decoder can directly decode the video stream. Recovered data for two image components.
  • the decoder can further determine whether to directly decode the video stream to obtain the second image component or to use the prediction model to obtain the recovery data of the second image component by determining whether to use the prediction model. model to obtain the second image component.
  • This embodiment provides a decoding method.
  • the decoder decodes a video code stream and determines decoding parameters of a current image in the video; wherein the decoding parameters of the current image include restored data of a first image component of one or more images in the video ;
  • the decoding parameters of the current image based on the restored data of the first image component, utilize the prediction model to determine the restored data of the second image component of the current image, wherein the second image component is an image component different from the first image component; Based on The restored data of the first image component and the restored data of the second image component of the current image determine the decoded data of the current image.
  • the encoder can perform image component removal processing on one or more images in the video, so that only part of the image components of one or more images in the video can be encoded without All image components need to be encoded; correspondingly, after the decoder decodes the video code stream, it obtains the restored data of part of the image components of one or more images in the video, and then can use the prediction model to restore the data of the remaining image components. Make predictions, and eventually complete image data can be generated.
  • the encoding method and decoding method proposed in this application can only encode and decode part of the image components of one or more images in the video, thereby reducing the code rate, greatly reducing the transmission code stream, and effectively improving the encoding and decoding efficiency.
  • FIG. 3 is a schematic diagram 2 of the implementation flow of the decoding method.
  • the method for decoding processing by the decoder may further include the following steps:
  • Step 201 Decode the video stream to obtain identification information.
  • Step 202 Does the identification information indicate that the restoration data of the second image component is determined using the prediction model? If yes, go to step 203; otherwise, go to step 205.
  • Step 203 Decode the video stream to obtain restored data of the first image component.
  • Step 204 Based on the restored data of the first image component, use a prediction model to determine the restored data of the second image component.
  • Step 205 Decode the video stream to obtain the restored data of the first image component and the restored data of the second image component.
  • Step 206 Generate decoded data of the current image based on the restored data of the first image component and the restored data of the second image component.
  • the decoder can obtain identification information for indicating whether to use the prediction model to obtain the restored data of the second image component by decoding the video code stream, so that the identification information of the second image component can be further determined according to the identification information. How to get recovery data.
  • the decoder can obtain the restoration data of the first image component by decoding the video code stream, and then pass The restored data of the first image component and the prediction model are predicted to obtain the restored data of the second image component, and finally the generation of the image data can be completed based on the restored data of the first image component and the restored data of the second image component.
  • the decoder can directly obtain the restored data of the first image component and the first image component by decoding the video code stream.
  • the restored data of the two image components can then complete the generation of the decoded data of the current image based on the restored data of the first image component and the restored data of the second image component.
  • the prediction model may specifically include a noise reduction network and a prediction network, wherein the noise reduction network may be used for noise removal, and the prediction network may be used for restoration of the second image component. predict.
  • the prediction network may be a Colorization network, that is, the prediction model may be composed of a noise reduction network and a Colorization network.
  • the core of the prediction model can be a Colorization network, that is, the core of the decoding method proposed in this application is to use a Colorization network to predict the restored data of the image components, for example, the color is removed at the encoding end
  • the UV component of the information image needs to use the Colorization network to predict the UV component at the decoding end.
  • a noise reduction can be passed before the prediction network (Colorization network). The internet.
  • FIG. 4 is a schematic diagram of the network structure of the prediction model.
  • the prediction model is mainly composed of two parts: a noise reduction network and a Colorization network.
  • the first image component of any one or more images in the video is input into the prediction model, and after performing noise reduction processing and prediction processing in sequence, the second image component of the any one or more images can be output.
  • the structure of the noise reduction network may learn from the structure of a feed-forward denoising convolutional neural network (DnCNN).
  • DnCNN feed-forward denoising convolutional neural network
  • Figure 5 is a schematic diagram of the structure of DnCNN. As shown in Figure 5, DnCNN uses a relatively deep structure, residual learning algorithm, regularization and batch normalization to improve the denoising performance.
  • Figure 6 is a schematic diagram of the structure of the noise reduction network. As shown in Figure 6, the noise reduction network uses the regularization and batch normalization methods to improve the noise reduction performance. Different from DnCNN, the noise reduction network uses coding.
  • the encoder downsamples the input, the decoder restores the original size, and reduces the number of layers of the network, so that the entire noise reduction process can be performed on low-resolution input, which can effectively reduce the amount of calculation. .
  • the Colorization network can use the U-net structure.
  • Figure 7 is a schematic diagram of the structure of U-net.
  • U-net consists of two parts. The first part is feature extraction. Similar to VGG, features are extracted through four downsampling, and one pooling layer is passed each time. scale. The second part is the up-sampling part. Each time the up-sampling part is up-sampling, the layers with the same number of channels and the same scale as the feature extraction part are fused. Because the network structure of the whole process is U-shaped, it is called a U-net network. Since there are connection layers in the front and back parts, the features are retained during the propagation process, which reduces the loss of features.
  • the Y component of the high temporal layer is used as the first image component, and when the prediction model is used to predict the second image component of the high temporal layer, that is, the UV component, decoding is performed.
  • the filter can also use the UV component of the lower temporal layer as a reference.
  • FIG. 8 is a schematic diagram of the prediction model performing image component prediction.
  • the input of the prediction model is the Y component of the high temporal layer image
  • the reference is the UV component of the low temporal layer image
  • the first part is the trained noise reduction network
  • the second part is the Colorization network of U-net structure, that is, the prediction network.
  • the prediction model performs the UV component prediction process.
  • the Colorization network implements a reference coloring method. Since the loss of color information itself is an irreversible process, some automatic coloring methods without reference often require The network is trained on a large dataset, and the colorization results obtained will be far from the real pictures. Compared with the automatic coloring method, the coloring method with added reference information can make the coloring more accurate, and there is a close relationship between the coloring effect and the given reference.
  • the reference used is a low temporal layer image, and it is also an image adjacent to the input high temporal layer image.
  • the input is the first frame of 4 temporal layers, refer to It can be the 0th frame of the 0 temporal layer or the 2nd frame of the 3 temporal layer. Since the information correlation between adjacent frames is the highest, the coloring effect obtained by using adjacent frames as a reference will be better.
  • This embodiment provides a decoding method.
  • the decoder decodes a video stream and determines decoding parameters of a current image in the video; wherein the decoding parameters of the current image include restored data of a first image component of one or more images in the video ;
  • the decoding parameters of the current image based on the restored data of the first image component, utilize the prediction model to determine the restored data of the second image component of the current image, wherein the second image component is an image component different from the first image component; Based on The restored data of the first image component and the restored data of the second image component of the current image determine the decoded data of the current image.
  • the encoder can perform image component removal processing on one or more images in the video, so that only part of the image components of one or more images in the video can be encoded without All image components need to be encoded; correspondingly, after the decoder decodes the video code stream, it obtains the restored data of part of the image components of one or more images in the video, and then can use the prediction model to restore the data of the remaining image components. Make predictions, and eventually complete image data can be generated.
  • the encoding method and decoding method proposed in this application can only encode and decode part of the image components of one or more images in the video, thereby reducing the code rate, greatly reducing the transmission code stream, and effectively improving the encoding and decoding efficiency.
  • FIG. 9 is a schematic diagram 1 of an implementation flow of the encoding method.
  • the encoder performs The method of encoding processing may include the following steps:
  • Step 301 Determine identification information of a current image in the video; wherein the identification information indicates whether to use a prediction model to determine the restoration data of the second image component of the current image.
  • the encoder may first determine the identification information of the current image, specifically, the identification information is used to determine whether to use the prediction model to determine the restored data of the second image component.
  • the encoder when the encoder determines the identification information of the current image, it may first determine the first performance parameter and the second performance parameter of the current image; , determine the identification information.
  • the first performance parameter may represent the coding efficiency of the removed component
  • the second performance parameter may represent the coding efficiency of the non-removed component
  • the first performance parameter and the second performance parameter may be BD-rate, where D-rate is one of the main parameters for evaluating the performance of a video encoding algorithm, indicating that the video encoded by the new algorithm is relatively higher than the original one. Changes in the code rate and Peak Signal to Noise Ratio (PSNR) of the algorithm.
  • D-rate is one of the main parameters for evaluating the performance of a video encoding algorithm, indicating that the video encoded by the new algorithm is relatively higher than the original one.
  • PSNR Peak Signal to Noise Ratio
  • BD-rate calculates the average value of the difference between the two RD curves corresponding to the two algorithms. Specifically, it is necessary to perform curve fitting on several (usually 4) points tested, then make the difference, and finally take the average.
  • the encoder determines the identification information according to the first performance parameter and the second performance parameter, if the first performance parameter is not less than the second performance parameter, it can be determined that the identification information indicates that the identification information is not used.
  • the prediction model determines the restored data of the second image component; if the first performance parameter is smaller than the second performance parameter, it may be determined that the identification information indicates that the prediction model is used to determine the restored data of the second image component.
  • the encoder can compare the performance parameter after removing the image component with the performance parameter without removing the image component, so as to determine whether to use the prediction model according to the comparison result, that is, determine whether to identify the information.
  • the encoder can compare the first BD-rate of the encoding method with the UV component removed with the second BD-rate of the original encoding method without removing the UV component, so as to determine whether to remove the color information according to whether the RD-rate is reduced (UV component), if the RD-rate is not reduced, that is, the first BD-rate is not less than the second BD-rate, then the encoder continues to use the original encoding method and directly sends all image components into the encoder, that is, the identification information is determined.
  • UV component RD-rate
  • the encoder continues to use the original encoding method and directly sends all image components into the encoder, that is, the identification information is determined.
  • the encoder can first remove the UV component in the video, and only The Y component is sent to the encoder for encoding, that is, the identification information indicates that the restoration data of the second image component is determined using the prediction model.
  • the encoder when the encoder determines the identification information of the current image, it may also first determine the temporal layer attribute of the current image, wherein the temporal layer attribute indicates that the current image is a high temporal layer image or a low temporal layer image image; the identification information can then be further determined based on the temporal layer properties.
  • the encoder may further determine the identification information in combination with the first performance parameter, the second performance parameter, and the temporal layer attribute.
  • the encoder can set the identification information to indicate that the prediction model is not used to determine Restoration data for the second image component.
  • the identification information corresponding to the current image may be determined by a flag bit of one bit. For example, if the flag bit is 1, that is, the value of the identification information is 1, then It is determined to use the prediction model to determine the restored data of the second image component. If the flag bit is 0, that is, the value of the identification information is 0, it is determined not to use the prediction model to determine the restored data of the second image component.
  • Step 302 Encode the restored data of the first image component of the current image.
  • the encoder when the encoder determines the training data set, the encoder may also obtain the training data set from the remote server indicated by the training data identification information.
  • Step 401 Acquire a video sequence.
  • Step 405 Determine whether to perform component removal processing according to the identification information, if yes, perform step 406; otherwise, perform step 403.
  • the encoder can judge whether to remove the component through the identification information. Specifically, in the present application, the encoder may first determine identification information, where the identification information is used to determine whether to use the prediction model to determine the restored data of the image component.
  • the first image component may be a first color component
  • the second image component may be a second color component; wherein the second color component is a color component different from the first color component.
  • the restored data of the high temporal layer image may be image data from which some image components have been removed from the restored data.
  • the restored data of the high temporal layer image may be image data that only includes the restored data of the first image component and removes the restored data of the second image component.
  • the restored data of the low temporal layer image includes both the restored data of the first image component and the restored data of the second image component.
  • the encoder can further select whether to write the restoration information of all image components of the high-temporal layer images into the video stream by determining the identification information, or to remove the high-temporal layer images first. After restoring data of part of the image components of the layer image, the restored data of the remaining part of the image components are written into the video code stream.
  • the encoder may first determine whether to use the prediction model to determine the restored data of the second image component, and if so, execute the component removal process, and then perform the encoding process, if not, then The encoding process is performed directly.
  • the encoder can directly set, according to the encoder configuration file, which images of one or more images in the video use component removal processing, and which images of one or more images in the video are directly encoded;
  • the decoder determines (directly or indirectly) the identification information according to the parameters obtained by decoding the video stream, and further determines whether to use the prediction model to predict the restored data of the image components according to the indication of the identification information.
  • This embodiment provides an encoding method, in which the encoder determines identification information of a current image in a video; wherein the identification information indicates whether to use a prediction model to determine the restoration data of the second image component of the current image; for the first image of the current image If the identification information indicates that the prediction model is used to determine the restored data of the second image component, then skip encoding the restored data of the second image component of the current image, wherein the second image component is the same as the first image component. An image component with a different image component; writes the encoded bits of the current image into the video stream.
  • the decoder can first decode the code stream (step 503) to obtain the restoration information of the first image component, and then use the prediction model to perform the restoration information of the second image component based on the restoration information of the first image. Prediction (step 504 ), and after obtaining the restoration information of the second image component, combine the restoration information of the first image component and the restoration information of the second image to further generate video data.
  • the encoder can first remove the UV component of the YUV video through preprocessing. , and then write the Y component into the video code stream; accordingly, through the decoding method proposed in the embodiment of the present application, after decoding the video code stream, the decoder can use the prediction model to predict and generate a reliable UV component based on the Y component, to restore complete image data.
  • the video compression solution proposed in the present application can effectively improve the coding efficiency and greatly reduce the code stream because only part of the image components are encoded and decoded.
  • the collected video data is first processed to remove components, and then sent to the encoder to generate a series of video code streams. , these streams are transmitted to the decoder through the channel, and the decoder reconstructs the video data after decoding. Since there will be losses in the whole process of video compression, and some noise will inevitably be added, therefore, a noise reduction network can be added to the prediction model proposed in the embodiment of the present application, and the noise reduction network can be used to remove the noise added in the video transmission process. , so that the recovered video quality is higher.
  • the core of the video compression scheme proposed in this application is to perform coding after removing the color information of the video, and during reconstruction, reliable color information can be recovered through the prediction model, thereby greatly reducing the bit rate.
  • FIG 14 is a schematic diagram of the implementation of the video compression method.
  • the video sequence is first divided into a low-temporal layer image and a high-temporal layer image, and the original encoding method is maintained for the low-temporal layer image, and the corresponding code stream ( Step 601); after marking the high temporal layer image, determine whether to remove the UV component (step 602), specifically, the encoder can remove the BD- of the encoding mode of the UV component and the original encoding mode that does not remove the UV The rate is compared, and it is judged whether to remove the color information according to whether the RD-rate decreases.
  • the decoder can obtain the low temporal layer image by decoding the stream (step 606 ), and for the high temporal layer image, the decoding end can determine whether there is a UV component in the high temporal layer image (step 607 ) ), if it exists, directly decode the high temporal layer image (step 608), if not, first decode to obtain the Y component of the high temporal layer image (step 609), and then take the low temporal layer image as a reference, based on the high temporal layer image
  • the Y component of the high temporal layer image is recovered by using the prediction model (step 610), and finally, the Y component of the high temporal layer image is combined with the restored UV component of the high temporal layer image to obtain a high temporal layer image.
  • the YUV image data of the image is obtained by decoding the stream (step 606 ), and for the high temporal layer image, the decoding end can determine whether there is a UV component in the high temporal layer image (step 607 ) ), if it
  • the encoding method and decoding method proposed in this application take the image data in YUV format as an example, and remove the UV component of the high-temporal layer image of one or more images in the video during compression encoding; Use the designed prediction model to predict the corresponding UV components, and restore the original image data. That is to say, the transmission process is improved from the original transmission of three YUV components to only the Y component, which can significantly reduce the code rate, greatly improve the coding efficiency, and reduce the transmission code stream.
  • the prediction model may be composed of a prediction network and a noise reduction network
  • the noise reduction network proposed in this application may be a network structure using encoding and decoding, which can downsample video frames to A low-resolution video frame can effectively reduce the computational complexity of the noise reduction network. It can improve the image quality and frame rate of the video. Applying the proposed noise reduction network to the process of video compression can improve the quality of the compressed video and the accuracy of the color prediction results.
  • the prediction network in the prediction model may be a Colorization network, where the Colorization neural network structure is used to recover image components of one or more images in the video.
  • the network structure in the prediction model can also be modified, and the number of network layers can be appropriately increased or deleted according to the actual application scenario.
  • the denoising network uses an encoding-decoding structure, and can also be replaced with DnCNN or other network structures, and the number of network layers is not fixed.
  • the prediction network uses the adjacent frames of the lower temporal layer as a reference, and can also use other frames or other pictures as a reference.
  • This embodiment provides an encoding method and a decoding method.
  • the decoder decodes a video stream and determines a decoding parameter of a current image in the video; wherein the decoding parameter of the current image includes a first image component of one or more images in the video According to the decoding parameters of the current image, based on the restored data of the first image component, use the prediction model to determine the restored data of the second image component of the current image, wherein the second image component is an image different from the first image component component; determining the decoded data of the current image based on the restored data of the first image component and the restored data of the second image component of the current image.
  • the encoder determines the identification information of the current image in the video; wherein, the identification information indicates whether to use the prediction model to determine the restoration data of the second image component of the current image; encode the restoration data of the first image component of the current image; if the identification information Instructs the use of the prediction model to determine the restored data of the second image component, then skips encoding the restored data of the second image component of the current image, where the second image component is an image component different from the first image component; the current image
  • the encoded bits are written into the video stream.
  • the encoder can perform image component removal processing on one or more images in the video, so that only part of the image components of one or more images in the video can be encoded without All image components need to be encoded; correspondingly, after the decoder decodes the video code stream, it obtains the restored data of part of the image components of one or more images in the video, and then can use the prediction model to restore the data of the remaining image components. Make predictions, and eventually complete image data can be generated.
  • the encoding method and decoding method proposed in this application can only encode and decode part of the image components of one or more images in the video, thereby reducing the code rate, greatly reducing the transmission code stream, and effectively improving the encoding and decoding efficiency.
  • FIG. 15 is a schematic diagram 1 of the composition and structure of the decoder.
  • the decoder 100 proposed in the embodiment of the present application may include a decoding part 101 , and the first determines Section 102.
  • the first determining part 102 is configured to determine the decoding parameters of the current image in the video; wherein the decoding parameters of the current image include restoration data of the first image component of one or more images in the video; decoding parameters of the current image, and based on the restored data of the first image component, using a prediction model to determine restored data of a second image component of the current image, wherein the second image component is the same as the first image image components with different components; determining decoded data of the current image based on the restored data of the first image component and the restored data of the second image component of the current image.
  • FIG. 16 is a second schematic diagram of the composition and structure of the decoder.
  • the decoder 100 proposed in this embodiment of the present application may further include a first processor 103 and a first memory 104 storing executable instructions of the first processor 103 , a first communication interface 105 , and a first bus 106 for connecting the first processor 103 , the first memory 104 and the first communication interface 105 .
  • the above-mentioned first processor 103 is configured to decode the video code stream and determine the decoding parameters of the current image in the video; wherein, the decoding parameters of the current image include one in the video or the restored data of the first image component of the plurality of images; according to the decoding parameters of the current image, and based on the restored data of the first image component, use a prediction model to determine the restored data of the second image component of the current image, wherein, the second image component is an image component different from the first image component; the determination of the Decoded data for the current image.
  • FIG. 17 is a schematic diagram 1 of the composition and structure of the encoder.
  • the encoder 200 proposed in the embodiment of the present application includes: a second determining part 201, an encoding part 202,
  • the second determining part 201 is configured to determine identification information of the current image in the video; wherein the identification information indicates whether to use a prediction model to determine the restoration data of the second image component of the current image;
  • the encoding part 202 is configured to encode the restoration data of the first image component of the current image; if the identification information indicates that the restoration data of the second image component is determined by using the prediction model, skip the restoration data of the second image component. encoding the restored data of the second image component of the current image, wherein the second image component is a different image component from the first image component; writing the encoded bits of the current image into a video code flow.
  • FIG. 18 is a second schematic diagram of the composition and structure of the encoder.
  • the encoder 200 proposed in this embodiment of the present application may further include a second processor 203 and a second memory 204 storing executable instructions of the second processor 203 , a second communication interface 205 , and a second bus 206 for connecting the second processor 203 , the second memory 204 and the second communication interface 205 .
  • the above-mentioned second processor 203 is configured to determine the identification information of the current image in the video; wherein the identification information indicates whether to use a prediction model to determine the second image of the current image recovery data of the component; encoding the recovery data of the first image component of the current image; if the identification information indicates that the prediction model is used to determine the recovery data of the second image component, skipping the recovery data of the current image encoding the restored data of the second image component of the image, wherein the second image component is an image component different from the first image component; writing the encoded bits of the current image into the video code stream
  • each functional module in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
  • Embodiments of the present application provide an encoder and a decoder.
  • the decoder decodes a video stream and determines decoding parameters of a current image in the video; wherein the decoding parameters of the current image include a first image of one or more images in the video Restoration data of the component; according to the decoding parameters of the current image, based on the restoration data of the first image component, using a prediction model to determine restoration data of the second image component of the current image, wherein the second image component is different from the first image component an image component; determining decoded data of the current image based on the restored data of the first image component and the restored data of the second image component of the current image.
  • the encoder determines the identification information of the current image in the video; wherein, the identification information indicates whether to use the prediction model to determine the restoration data of the second image component of the current image; encode the restoration data of the first image component of the current image; if the identification information Instructs the use of the prediction model to determine the restored data of the second image component, then skips encoding the restored data of the second image component of the current image, where the second image component is an image component different from the first image component; the current image
  • the encoded bits are written into the video stream.
  • the encoding method and decoding method proposed in this application can only encode and decode part of the image components of one or more images in the video, thereby reducing the code rate, greatly reducing the transmission code stream, and effectively improving the encoding and decoding efficiency.
  • Embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method described in the foregoing embodiments is implemented.
  • a program instruction corresponding to a decoding method in this embodiment may be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc.
  • a storage medium such as an optical disc, a hard disk, a U disk, etc.
  • a prediction model is used to determine the restored data of the second image component of the current image, wherein the second image component is the same as the first image component.
  • Decoded data of the current image is determined based on the restored data of the first image component and the restored data of the second image component of the current image.
  • a program instruction corresponding to an encoding method in this embodiment may be stored on a storage medium such as an optical disk, a hard disk, a U disk, etc.
  • a storage medium such as an optical disk, a hard disk, a U disk, etc.
  • identification information of the current image in the video indicates whether to use a prediction model to determine the restoration data of the second image component of the current image
  • the identification information indicates that the restoration data of the second image component is determined using the prediction model, skip encoding the restoration data of the second image component of the current image, wherein the second image the component is an image component different from the first image component;
  • the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, optical storage, and the like.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • An apparatus implements the functions specified in a flow or flows of the implementation flow diagram and/or a block or blocks of the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the implementing flow diagram and/or the block or blocks of the block diagram.
  • Embodiments of the present application provide an encoding method, a decoding method, an encoder, a decoder, and a storage medium.
  • the decoder decodes a video stream and determines decoding parameters of a current image in the video; wherein the decoding parameters of the current image include Restoration data of the first image component of one or more images; according to the decoding parameters of the current image, based on the restoration data of the first image component, using a prediction model to determine the restoration data of the second image component of the current image, wherein the second image
  • the component is an image component different from the first image component; the decoded data of the current image is determined based on the restored data of the first image component and the restored data of the second image component of the current image.
  • the encoder determines the identification information of the current image in the video; wherein, the identification information indicates whether to use the prediction model to determine the restoration data of the second image component of the current image; encode the restoration data of the first image component of the current image; if the identification information Instructs the use of the prediction model to determine the restored data of the second image component, then skips encoding the restored data of the second image component of the current image, where the second image component is an image component different from the first image component; the current image
  • the encoded bits are written into the video stream.
  • the encoder can perform image component removal processing on one or more images in the video, so that only part of the image components of one or more images in the video can be encoded without All image components need to be encoded; correspondingly, after the decoder decodes the video code stream, it obtains the restored data of part of the image components of one or more images in the video, and then can use the prediction model to restore the data of the remaining image components. Make predictions, and eventually complete image data can be generated.
  • the encoding method and decoding method proposed in this application can only encode and decode part of the image components of one or more images in the video, thereby reducing the code rate, greatly reducing the transmission code stream, and effectively improving the encoding and decoding efficiency.

Abstract

本申请实施例公开了一种编码方法、解码方法、编码器、解码器及存储介质,解码器解码视频码流,确定视频中的当前图像的解码参数;根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据,基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。编码器确定视频中的当前图像的标识信息;对当前图像的第一图像分量的恢复数据进行编码;若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对当前图像的第二图像分量的恢复数据进行编码,将当前图像的编码比特写入视频码流。

Description

编码方法、解码方法、编码器、解码器及存储介质 技术领域
本申请实施例涉及图像处理技术,尤其涉及一种编码方法、解码方法、编码器、解码器及存储介质。
背景技术
随着多媒体技术的发展,视频应用的范围不断扩大,各类视频网站、应用软件等的出现,使得视频更加普及,成为传播信息的一种越来越重要的手段。而在视频的传输过程中,由于未经压缩的原始视频数据量非常大,为了适应存储和传输网络的限制,必须要先对视频进行高效压缩。
因此,如何实现视频数据的高效率和高精度的压缩处理,成为图像处理领域中亟待解决的问题。
发明内容
本申请实施例提供一种编码方法、解码方法、编码器、解码器及存储介质,可以减少传输码流,大大提高编解码效率。
本申请实施例的技术方案是这样实现的:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,所述方法包括:
解码视频码流,确定视频中的当前图像的解码参数;其中,所述当前图像的解码参数包括所述视频中一个或多个图像的第一图像分量的恢复数据;
根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;
基于所述当前图像的所述第一图像分量的恢复数据和所述第二图像分量的恢复数据,确定所述当前图像的解码数据。
第二方面,本申请实施例提供了一种编码方法,应用于编码器,所述方法包括:
确定视频中的当前图像的标识信息;其中,所述标识信息指示是否使用预测模型确定所述当前图像的第二图像分量的恢复数据;
对所述当前图像的第一图像分量的恢复数据进行编码;
若所述标识信息指示使用所述预测模型确定所述第二图像分量的恢复数据,则跳过对所述当前图像的所述第二图像分量的恢复数据进行编码,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;
将所述当前图像的编码比特写入视频码流。
第三方面,本申请实施例提供了一种解码器,所述解码器包括:解码部分,第一确定部分,
所述解码部分,配置为解码视频码流;
所述第一确定部分,配置为确定视频中的当前图像的解码参数;其中,所述当前图像的解码参数包括所述视频中一个或多个图像的第一图像分量的恢复数据;根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;基于所述当前图像的所述第一图像分量的恢复数据和所述第二图像分量的恢复数据,确定所述当前图像的解码数据。
第四方面,本申请实施例提供了一种解码器,所述解码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被所述第一处理器执行时,实现如第一方面所述的解码方法。
第五方面,本申请实施例提供了一种编码器,所述编码器包括:第二确定部分,编码部分,
所述第二确定部分,配置为确定视频中的当前图像的标识信息;其中,所述标识信息指示是否使用预测模型确定所述当前图像的第二图像分量的恢复数据;
所述编码部分,配置为对所述当前图像的第一图像分量的恢复数据进行编码;若所述标识信息指示使用所述预测模型确定所述第二图像分量的恢复数据,则跳过对所述当前图像的所述第二图像分量的恢复数据进行编码,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;将所述当前图像的编码比特写入视频码流。
第六方面,本申请实施例提供了一种编码器,所述编码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被所述第二处理器执行时,实现如第二方面所述的编码方法。
第七方面,本申请实施例提供了一种计算机可读存储介质,其上存储有程序,应用于解码器和编码器中,所述程序被第一处理器执行时,实现如第一方面所述的解码方法,所述程序被第二处理器执行时,实现如第二方面所述的编码方法。
本申请实施例提供了一种解码方法、编码方法、编码器、解码器及存储介质,解码器解码视频码流,确定视频中的当前图像的解码参数;其中,当前图像的解码参数包括视频中一个或多个图像的第一图像分量的恢复数据;根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据,其中,第二图像分量是与第一图像分量不同的图像分量;基于当前图像的第一图像分量的恢复数据和第二图像分量 的恢复数据,确定当前图像的解码数据。编码器确定视频中的当前图像的标识信息;其中,标识信息指示是否使用预测模型确定当前图像的第二图像分量的恢复数据;对当前图像的第一图像分量的恢复数据进行编码;若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对当前图像的第二图像分量的恢复数据进行编码,其中,第二图像分量是与第一图像分量不同的图像分量;将当前图像的编码比特写入视频码流。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
附图说明
图1为视频处理方法的框架图;
图2为解码方法的实现流程示意图一;
图3为解码方法的实现流程示意图二;
图4为预测模型的网络结构示意图;
图5为DnCNN的结构示意图;
图6为降噪网络的结构示意图;
图7为U-net的结构示意图;
图8为预测模型进行图像分量预测的示意图;
图9为编码方法的实现流程示意图一;
图10为编码方法的实现流程示意图二;
图11为编码方法的实现流程示意图三;
图12为编码方法的实现流程示意图四;
图13为视频压缩方法的实现示意图一;
图14为视频压缩方法的实现示意图二;
图15为解码器的组成结构示意图一;
图16为解码器的组成结构示意图二;
图17为编码器的组成结构示意图一;
图18为编码器的组成结构示意图二。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。
随着多媒体技术的发展,视频应用的范围不断扩大,各类视频网站、应用软件等的出现,使得视频更加普及,成为传播信息的一种越来越重要的手段。而在视频的传输过程中,由于未经压缩的原始视频数据量非常大,为了适应存储和传输网络的限制,必须要先对视频进行高效压缩。但压缩会带来质量的损失,压缩后的视频会出现不同程度的质量下降,为了解决这个问题,目前主要通过优化压缩算法和对压缩后的视频进行处理这两种方式进行视频质量的提升。
图1为视频处理方法的框架图,如图1所示,主要可以通过编码器和解码器对视频进行处理。具体地,解码器在接收视频数据之后,可以对视频数据进行压缩处理,其中,编码器可以先对视频数据进行预处理,然后再对预处理后的数据进行压缩处理,生成比特流,并将比特流传输至解码器;相应地,解码器在接收到视频数据对应的比特流之后,可以通过解码处理获得视频数据,其中,解码器解码比特流之后,可以进一步进行后处理,从而还原出视频数据,以供播放。
对视频进行压缩,尤其是在压缩率较高的情况下会造成视频质量的下降,质量下降的因素主要有两方面:一是量化损失,二是帧率损失。
对于压缩带来的图像失真,解码后的进一步处理的技术主要分为:基于图像增强的处理算法和基于图像恢复的处理算法。其中,基于图像增强的处理算法以增强图像的主观质量为研究重点,主要做法是用滤波器对压缩后的图像进行滤波以增强图像的视觉效果。基于图像恢复的处理算法把去除压缩效应看作图像恢复问题,典型算法有最大后验概率法、非均匀插值法等。
对于压缩带来的帧率损失,帧率提升算法可分为两类:非基于块匹配的帧率提升算法和基于块匹配的帧率提升算法。非基于块匹配的帧率提升算法不考虑图像中物体的运动,采用相邻帧的线性运算估计插值帧,该类算法复杂度低但处理效果较差。基于块匹配的帧率提升算法考虑物体的运动,在物体的运动轨迹上插值,像素级的光流法运动估计的精度较高,但同时也带来计算复杂度的提升。
虽然基于图像增强的处理方法较为简单,但是得到的效果往往不尽如人意,而基于图像恢复的处理算法相比较于基于图像增强的后处理方法所得到的效果虽然有所提升,但是该算法的复杂度比较高,例如,非均匀插值法是将已知图像信息非均匀的插值到目标图像上,而此类方法适用性较差,难以处理模糊现象,也不能充分利用先验知识。
综上所述,目前常见的、用于解决高压缩率造成的视频质量下降的方法均不能获得较佳的质量提升效果,且现有的视频序列一般都具有丰富的颜色信息,如果直接对整个视频序列压缩,信息量大,码流量大,编码效率低,因此,如何有效地减少码流成为亟待解决的问题。
为了解决上述技术问题,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
本申请一实施例提供了一种解码方法,该解码方法应用于解码器中,图2为解码方法的实现流程示意图一,如图2所示,在本申请的实施例中,解码器进行解码处理的方法可以包括以下步骤:
步骤101、解码视频码流,确定视频中的当前图像的解码参数;其中,当前图像的解码参数包括视频中一个或多个图像的第一图像分量的恢复数据。
在本申请的实施例中,解码器可以先解码视频码流,从而可以获得视频中的当前图像的解码参数。具体地,当前图像的解码参数包括视频中的一个或多个图像的第一图像分量的恢复数据。
需要说明的是,在本申请的实施例中,视频中包括有一个或多个图像,即对视频中的任一个图像,解码器均可以获得对应的解码参数。
可以理解的是,在本申请中,当前图像即为视频中的当前待解码图像,也就是说,解码器在对视频中的待解码图像进行解码时,可以先解码获得该待解码图像的解码参数。
需要说明的是,在本申请的实施例中,解码参数可以包括去除了部分图像分量的恢复数据的图像数据。示例性的,在本申请中,解码参数可以为仅包括第一图像分量的恢复数据、而去除了第二图像分量的恢复数据的图像数据。其中,第二图像分量是与第一图像分量不同的图像分量。
进一步地,在本申请的实施例中,第一图像分量可以为当前图像的亮度分量,第二图像分量可以为当前图像的色度分量。
示例性的,在本申请中,第一图像分量可以为当前图像的Y分量(亮度分量),第二图像分量可以为当前图像的UV分量(色度分量),相应地,解码参数可以仅包括Y分量的恢复数据而不包括UV分量的恢复数据。
进一步地,在本申请的实施例中,第一图像分量可以为当前图像的色度分量,第二图像分量可以为当前图像的亮度分量。
示例性的,在本申请中,第二图像分量可以为当前图像的Y分量(亮度分量),第一图像分量可以为当前图像的UV分量(色度分量),相应地,解码参数可以不包括Y分量的恢复数据而仅包括UV分量的恢复数据。
其中,YUV,是一种颜色编码方法,常使用在各个视频处理组件中。在对照片或视频编码时,考虑到人类的感知能力,通过YUV编码方法,可降低色度的带宽。
YUV可表示编译true-color颜色空间(color space)的种类,Y'UV,YUV,YCbCr,YPbPr等专有名词都可以称为YUV,彼此有重叠。“Y”表示明亮度(Luminance或Luma),也就是灰阶值,“U”和“V”表示的则是色度(Chrominance或Chroma),作用是描述影像色彩及饱和度,用于指定像素的颜色。
YCbCr则是YUV经过缩放和偏移的翻版。其中Y与YUV中的Y含义一致,Cb,Cr同样都指色彩,只是在表示方法上不同而已。在YUV家族中,YCbCr是在计算机系统中应用最多的成员,其应用领域很广泛,JPEG、MPEG均采用此格式。一般人们所讲的YUV大多是指YCbCr。YCbCr有许多取样格式,如4∶4∶4,4∶2∶2,4∶1∶1和4∶2∶0。
可以理解的是,在本申请中,第一图像分量可以为当前图像的Y分量,第二图像分量可以为当前图像的Cb、Cr分量;第一图像分量可以为当前图像的Cb分量,第二图像分量可以为当前图像的Y、Cr分量;第一图像分量可以为当前图像的Cr分量,第二图像分量可以为当前图像的Cb、Y分量。
进一步地,在本申请的实施例中,第一图像分量可以为第一颜色分量,第二图像分量可以为第二颜色分量;其中,第二颜色分量是与第一颜色分量不同的颜色分量。
示例性的,在本申请中,第一颜色分量可以为当前图像的R(红色)分量,第二颜色分量可以为当前图像的G(绿色)分量和B(蓝色)分量,相应地,解码参数可以仅包括R分量的恢复数据而不包括G分量和B分量的恢复数据。
可以理解的是,在本申请中,第一颜色分量也可以为G分量(或B分量),第二颜色分量也可以为R分量和B分量(或,G分量和R分量)。
进一步地,在本申请的实施例中,解码器解码视频码流,还可以获得标识信息,具体地,解码器解码获得的当前图像的解码参数中可以包括有标识信息。接着,解码器可以在确定标识信息指示使用预测模型确定第二图像分量的恢复数据之后,执行基于预测模型的第二图像分量的恢复数据的获取流程。
进一步地,在本申请的实施中,标识信息用于判断是否使用预测模型确定第二图像分量的恢复数据,即标识信息指示是否使用预测模型确定第二图像分量的恢复数据。
示例性的,在本申请的实施例中,当前图像对应的标识信息可以通过一个比特的标志位来进行取值的确定,例如,若标志位为1,即标识信息的取值为1,则确定使用预测模型确定第二图像分量的恢复数据,若标志位为0,即标识信息的取值为0,则确定不使用预测模型确定第二图像分量的恢复数据。
可以理解的是,在本申请中,标识信息可以是视频码流中存在的一个或多个比特直接指示的信息,具体地,在 编码端,无论是使用率失真优化(Ratedistortion optimization,RDO)方法,还是高低时间等级图像的方法,编码器可以在确定使用预测模型后,便设置标识信息并将标识信息写入视频码流。在解码端,解码器可以根据视频码流中的一个或多个比特的标志位确定标识信息。
进一步地,在本申请中,标识信息也可以是根据现有参数推导得到的,具体地,在编码端,编码器可以直接在码流中设置比特直接指示该信息。
需要说明的是,在本申请中,在编码端,编码器还可以根据当前图像为高时间层图像还是低时间层图像来进一步确定当前图像的标识信息。
具体地,在本申请的实施例中,在对视频进行编码时,编码器可以根据视频帧的编码顺序进行高时间层图像和低时间层图像的确定。具体地,编码顺序在前的图像为低时间层图像,编码顺序在后的图像为高时间层图像。也就是说,先编码的图像为低时间层图像,后编码的图像为高时间层图像。
相应地,在解码端,解码器解码视频码流,可以获得当前图像的编码顺序,从而可以根据编码顺序确定当前图像是高时间层图像或低时间层图像。
进一步地,在本申请的实施例中,解码器在解码视频码流,确定视频中当前图像的解码参数时,还可以解码视频码流,从当前图像对应的数据单元中,获得标识信息。
进一步地,在本申请的实施例中,解码器在解码视频码流,确定视频中当前图像的解码参数时,还可以解码视频码流,确定当前图像的时间层属性,其中,时间层属性指示当前图像是高时间层图像或低时间层图像;然后可以根据时间层属性,进一步地确定解码参数中包括的标识信息。
可以理解的是,在本申请中,解码器在基于时间层属性进行标识信息的确定时,如果解码视频码流所得到的当前图像的恢复数据中不包括当前图像的第二图像分量的恢复数据,同时,时间层属性指示当前图像为高时间层图像,那么解码器可以将标识信息设置为指示使用预测模型确定第二图像分量的恢复数据。
也就是说,如果标识信息指示使用预测模型进行第二图像分量的恢复数据的确定,那么可以说明解码视频码流无法获得当前图像的第二图像分量的恢复数据,那么解码器便需要利用第一图像分量的恢复数据和预测模型对第二图像分量的恢复数据进行预测和确定,即可以执行下述步骤102和步骤103的方法。
可见,在本申请中,对于视频中的一个图像,通过解码视频码流所获得的标识信息可以判断是否可以通过解码视频码流而直接获得该图像的第二图像分量的恢复数据,当确定不能获得第二图像分量的恢复数据时,解码器便可以利用本申请提出的解码方法,使用第一图像分量的恢复数据和预测模型,得到该图像第二图像分量的恢复数据。
进一步地,在本申请的实施例中,解码器在解码视频码流,获得标识信息之后,如果标识信息指示不使用预测模型确定第二图像分量的恢复数据,那么解码器可以直接解码视频码流,从而可以直接获得第二图像分量的恢复数据。
也就是说,如果标识信息指示不使用预测模型进行第二图像分量的恢复数据的确定,那么可以说明解码视频码流可以获得当前图像的第二图像分量的恢复数据,因此解码器可以直接通过解码视频码流来获得第二图像分量的恢复数据。
进一步地,在本申请的实施例中,解码器解码视频码流可以获得视频的高时间层图像的恢复数据和低时间层图像的恢复数据。具体地,高时间层图像的恢复数据可以仅包括第一图像分量的恢复数据,而低时间层图像的恢复数据可以包括第一图像分量的恢复数据和第二图像分量的恢复数据。
可以理解的是,在本申请中,解码器在解码视频码流,获得高时间层图像的恢复数据和低时间层图像的恢复数据之后,如果高时间层图像的恢复数据中不存在第二图像分量的恢复数据,那么解码器可以执行基于预测模型的第二图像分量的恢复数据的获取流程,即可以执行下述步骤102和步骤103的方法。
需要说明的是,在本申请的实施例中,如果高时间层图像的恢复数据中存在第二图像分量的恢复数据,那么解码器可以直接根据高时间层图像的恢复数据生成对应的解码数据。
可以理解的是,在本申请中,由于低时间层图像的恢复数据可以包括第一图像分量的恢复数据和第二图像分量的恢复数据,因此解码器可以直接根据低时间层图像的恢复数据生成对应的解码数据。
也就是说,在本申请中,可以将视频中的图像区分为“高时间层图像”和“低时间层图像”,在编码端,编码器可以选择对高时间层图像进行去除分量的处理,使得传输至解码端的恢复图像数据仅仅包括高时间层图像的第一图像分量的恢复数据,因此,对于高时间层图像,解码器可以按照本申请提出的解码方法进行第二图像分量的恢复数据的确定。
步骤102、根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据;其中,第二图像分量是与第一图像分量不同的图像分量。
在本申请的实施例中,解码器在解码视频码流,获得包括有第一图像分量的恢复数据的解码参数之后,便可以根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型进一步确定当前图像的第二图像分量的恢复数据。
进一步地,在本申请中,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分解码器根据当前图像的解码参数量的恢复数据之前,即步骤102之前,解码器还可以解码视频码流,获得一个或多个低时间层图像的恢复数据。
需要说明的是,在本申请中,一个或多个低时间层图像是按照解码顺序在解码所述当前图像之前,解码所述视频码流获得的一个或多个图像。
相应地,在本申请的实施例中,在根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据时,如果标识信息设置为指示使用预测模型确定第二图像分量的恢复数据时,解码器可以基于当前图像的第一图像分量的恢复数据、一个或多个低时间层图像的恢复数据,利用预测模型确定当 前图像的第二图像分量的恢复数据。
具体地,在本申请中,解码器可以将当前图像的第一图像分量的恢复数据和一个或多个低时间层图像的恢复数据输入至预测模型中,生成当前图像的第二图像分量的恢复数据。
也就是说,在本申请中,解码器可以将高时间层图像的第一图像分量的恢复数据和低时间层图像的恢复数据输入至预测模型中,生成高时间层图像的第二图像分量的恢复数据。
可以理解的是,在本申请的实施例中,低时间层图像的恢复数据可以用于对高时间层图像的第二图像分量的恢复数据进行预测。
也就是说,在本申请中,低时间层图像的恢复数据可以作为参考数据,来实现高时间层的恢复数据的预测。具体地,如果需要预测高时间层的第二图像分量的恢复数据,那么需要使用低时间层图像的第二图像分量作为参考。例如,如果以高时间层的Y分量作为预测模型的输入进行UV分量的预测,那么也可以将低时间层图像的UV分量最为参考一同输入至预测模型中。
需要说明的是,在本申请的实施例中,预测模型具体可以包括降噪网络和预测网络,其中,降噪网络可以用于噪声的去除,预测网络可以用于第二图像分量的恢复数据的预测。
进一步地,在本申请的实施例中,解码器在根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据时,可以将当前图像的第一图像分量的恢复数据输入至降噪网络中,从而获得第一降噪后数据;同时可以将一个或多个低时间层图像的恢复数据输入至降噪网络,从而可以获得第二降噪后数据;接着可以对第一降噪后数据和第二降噪后数据进行融合处理,获得融合后图像特征;最后,解码器将融合后图像特征输入至预测网络,便可以生成当前图像的第二图像分量的恢复数据。
需要说明的是,在本申请的实施例中,解码器在对第一降噪后数据和第二降噪后数据进行融合处理,获得融合后图像特征之前,还可以先对第二降噪后数据进行尺寸变换处理,从而可以使第一降噪后数据和第二降噪后数据具有相同的尺寸。
也就是说,在本申请中,解码器在对第一降噪后数据和第二降噪后数据进行融合处理,获得融合后图像特征时,该融合处理还包括第一预处理,其中,第一预处理对第一降噪后数据或第二降噪后数据进行尺寸变换处理,以使经过第一预处理后,第一降噪后数据和第二降噪后数据具有相同的尺寸。
可以理解的是,在本申请的实施例中,解码器可以通过解码视频码流,获得预测模型的模型参数,然后可以基于模型参数,对降噪网络和预测网络进行构建,即构建预测模型。
进一步地,在本申请的实施例中,解码器可以先确定训练数据集合;然后可以使用训练数据集合进行训练,从而确定预测模型的模型参数;最终便可以基于模型参数,构建预测模型。
示例性的,在本申请的实施例中,解码器在确定训练数据集合时,可以先通过解码视频码流,确定训练数据标识信息;然后可以根据训练数据标识信息,获取训练数据集合。
示例性的,在本申请的实施例中,解码器在确定训练数据集合时,也可以直接根据预先设定的训练数据标识信息,获取训练数据集合。
示例性的,在本申请的实施例中,解码器在确定训练数据集合时,还可以从训练数据标识信息指示的远程服务器上获得训练数据集合。
步骤103、基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。
在本申请的实施例中,解码器在基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据之后,便可以基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。
可以理解的是,在本申请中,解码器可以通过解码视频码流,获得视频中的一个或多个图像的第一图像分量的恢复数据,然后可以基于第一图像分量的恢复数据,利用预测模型对视频中的一个或多个图像的第二图像分量的恢复数据进行预测,从而可以基于第一图像分量的恢复数据和第二图像分量的恢复数据,最终获得一个或多个图像对应的解码数据。
需要说明的是,在本申请中,解码器可以通过解码获得的标识信息来进一步判断是否使用预测模型来获得第二图像分量的恢复数据,如果基于标识信息判定使用预测模型进行第二图像分量的恢复数据的预测,那么解码器可以执行上述步骤102和步骤103;如果基于标识信息判定不使用预测模型进行第二图像分量的恢复数据的预测,那么解码器直接通过解码视频码流便可以获得第二图像分量的恢复数据。
也就是说,在本申请的实施例中,解码器可以通过是否使用预测模型来获得第二图像分量的恢复数据的判断结果,进一步确定是直接解码视频码流获得第二图像分量,还是使用预测模型来获得第二图像分量。
本实施例提供了一种解码方法,解码器解码视频码流,确定视频中的当前图像的解码参数;其中,当前图像的解码参数包括视频中一个或多个图像的第一图像分量的恢复数据;根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据,其中,第二图像分量是与第一图像分量不同的图像分量;基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
基于上述实施例,在本申请的再一实施例中,图3为解码方法的实现流程示意图二,如图3所示,解码器进行解码处理的方法还可以包括以下步骤:
步骤201、解码视频码流,获得标识信息。
步骤202、标识信息是否指示使用预测模型确定第二图像分量的恢复数据?若是,则执行步骤203;否则执行步骤205。
步骤203、解码视频码流,获得第一图像分量的恢复数据。
步骤204、基于第一图像分量的恢复数据,利用预测模型确定第二图像分量的恢复数据。
步骤205、解码视频码流,获得第一图像分量的恢复数据和第二图像分量的恢复数据。
步骤206、基于第一图像分量的恢复数据和第二图像分量的恢复数据,生成当前图像的解码数据。
在本申请的实施例中,解码器通过解码视频码流,可以获得用于指示是否使用预测模型获取第二图像分量的恢复数据的标识信息,从而可以根据该标识信息进一步确定第二图像分量的恢复数据的获取方法。
进一步地,在本申请的实施例中,如果该标识信息指示使用预测模型确定第二图像分量的恢复数据,那么解码器可以通过解码视频码流,获得第一图像分量的恢复数据,然后再通过第一图像分量的恢复数据和预测模型,预测获得第二图像分量的恢复数据,最终便可以基于第一图像分量的恢复数据和第二图像分量的恢复数据,完成图像数据的生成。
进一步地,在本申请的实施例中,如果该标识信息指示不使用预测模型确定第二图像分量的恢复数据,那么解码器可以通过解码视频码流,直接获得第一图像分量的恢复数据和第二图像分量的恢复数据,接着便可以基于第一图像分量的恢复数据和第二图像分量的恢复数据,完成当前图像的解码数据的生成。
需要说明的是,在本申请的实施例中,预测模型具体可以包括降噪网络和预测网络,其中,降噪网络可以用于噪声的去除,预测网络可以用于第二图像分量的恢复数据的预测。
示例性的,在本申请的实施例中,预测网络可以为Colorization网络,即预测模型可以由降噪网络和Colorization网络构成。
具体地,在本申请中,预测模型的核心可以为Colorization网络,也就是说,本申请提出的解码方法的核心是用一个Colorization网络来预测图像分量的恢复数据,例如,在编码端去除了颜色信息的图像的UV分量,在解码端需要使用Colorization网络来进行UV分量的预测,同时,由于在压缩过程中会不可避免的引入噪声,所以在预测网络(Colorization网络)之前可以先通过一个降噪网络。
示例性的,在本申请中,图4为预测模型的网络结构示意图,如图4所示,预测模型主要由降噪网络和Colorization网络这两个部分组成。视频中的任意一个或多个图像的第一图像分量输入至该预测模型中,依次进行降噪处理和预测处理之后,便可以输出该任意一个或多个图像的第二图像分量。
需要说明的是,在本申请的实施例中,降噪网络的结构可以借鉴前馈去噪卷积神经网络(feed-forward denoising convolutional neural network,DnCNN)的结构。图5为DnCNN的结构示意图,如图5所示,DnCNN使用了比较深的结构、残差学习算法、正则化和批量归一化等方法提高去噪性能。图6为降噪网络的结构示意图,如图6所示,降噪网络借鉴DnCNN使用正则化和批量归一化的方法提高降噪性能,而与DnCNN所不同的是,降噪网络采用了编码解码的结构,编码端将输入进行下采样,解码端恢复到原有的尺寸,同时减少了网络的层数,从而能使得整个降噪过程在低分辨率的输入上进行,能有效减少计算量。
示例性的,在本申请中,Colorization网络可以使用U-net结构。图7为U-net的结构示意图,如图7所示,U-net包括两部分,第一部分为特征提取,与VGG类似,通过四个下采样提取特征,每次经过一个池化层就一个尺度。第二部分为上采样部分,上采样部分每上采样一次,就和特征提取部分对应的通道数和尺度相同的层进行融合。由于整个过程的网络结构像U型,所以叫U-net网络。由于前后两部分有连接层,使得特征在传播过程中有所保留,减少了特征的丢失。
进一步地,在本申请的实施例中,基于YUV格式,以高时间层的Y分量作为第一图像分量,在使用预测模型进行高时间层的第二图像分量,即UV分量的预测时,解码器还可以使用低时间层的UV分量作为参考。
示例性的,在本申请中,图8为预测模型进行图像分量预测的示意图,如图8所示,预测模型的输入为高时间层图像的Y分量,参考为低时间层图像的UV分量,第一部分为训练好的降噪网络,第二部分为U-net结构的Colorization网络,即预测网络。输入帧的Y分量(高时间层图像的Y分量)与参考帧的UV分量(低时间层图像的UV分量)分别通过降噪网络之后,低时间层图像的UV分量需要经过最近邻插值将尺寸变为和高时间层图像的Y分量尺寸一致,然后经过第三部分所示的融合层进行融合处理之后,送入Colorization网络,Colorization网络中的前后有连接层,这相当于后部分层加上了前部分层的特征,从而使得参考帧能得到充分的利用,最后输出为预测出的高时间层图像的UV分量。
由此可见,预测模型进行UV分量的预测过程,Colorization网络实现的是一个有参考的上色方法,由于颜色信息的丢失本身就是一个不可逆的过程,一些不加参考的自动上色方法,往往需要将网络在一个很大的数据集上进行训练,而且得到的上色结果会出现与真实图片相差甚远的情况。相比较于自动上色方法,增加了参考信息的上色方法能让上色更为准确,上色效果与所给参考之间有着密切的联系。而本申请实施例提出的预测模型的结构,所使用的参考是低时间层图像,同时也是与输入的高时间层图像相邻近的图像,例如,输入为4时间层的第1帧,参考可以为0时间层的第0帧或者3时间层的第2帧。由于相邻帧之间信息相关性最高,所以用相邻的帧作为参考所得到的上色效果会比较好。
本实施例提供了一种解码方法,解码器解码视频码流,确定视频中的当前图像的解码参数;其中,当前图像的解码参数包括视频中一个或多个图像的第一图像分量的恢复数据;根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据,其中,第二图像分量是与第一图像分量不同的图像分量;基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视 频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
本申请再一实施例提供了一种编码方法,该编码方法应用于编码器中,图9为编码方法的实现流程示意图一,如图9所示,在本申请的实施例中,编码器进行编码处理的方法可以包括以下步骤:
步骤301、确定视频中的当前图像的标识信息;其中,标识信息指示是否使用预测模型确定当前图像的第二图像分量的恢复数据。
在本申请的实施例中,编码器可以先确定当前图像的标识信息,具体地,标识信息用于判断是否使用预测模型确定第二图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器在确定当前图像的标识信息时,可以先确定当前图像的第一性能参数和第二性能参数;然后可以根据第一性能参数和第二性能参数,确定标识信息。
需要说明的是,在本申请中,第一性能参数可以表征去除分量的编码效率,第二性能参数可以表征未去除分量的编码效率。
示例性的,在本申请中,第一性能参数和第二性能参数可以为BD-rate其中,D-rate是评价视频编码算法性能的主要参数之一,表示新算法编码的视频相对于原来的算法在码率和峰值信噪比(Peak Signal to Noise Ratio,PSNR)上的变化情况。
在视频编码中,码率低表示压缩量大,PSNR值高表示客观质量好。因此,对于一种编码算法,如果压缩视频码率降低、PSNR值提高,那么该算法具有良好的性能。但是通常视频编码算法在提高压缩量的同时会损失压缩质量,即码率减小的同时PSNR值也减小,此时就需要使用BD-rate进行衡量。BD-rate计算的是两种算法对应的两条RD曲线的差值的均值,具体需要通过对测试的几个(一般是4个)点进行曲线拟合,再做差值,最后取平均。
进一步地,在本申请的实施例中,编码器在根据第一性能参数和第二性能参数,确定标识信息时,如果第一性能参数不小于第二性能参数,那么可以确定标识信息指示不使用预测模型确定第二图像分量的恢复数据;如果第一性能参数小于第二性能参数,那么可以确定标识信息指示使用预测模型确定第二图像分量的恢复数据。
也就是说,在本申请的实施例中,编码器可以对去除图像分量之后的性能参数和未去除图像分量的性能参数进行比较,从而可以根据比较结果对是否使用预测模型进行确定,即确定标识信息。例如,编码器可以将去除UV分量的编码方式的第一BD-rate与不去除UV分量的原有编码方式的第二BD-rate进行比较,从而根据RD-rate是否降低来判断是否去除颜色信息(UV分量),若RD-rate没有降低,即第一BD-rate不小于第二BD-rate,那么编码器继续用原编码方式,直接将全部图像分量送入编码器中,即确定标识信息指示不使用预测模型确定第二图像分量的恢复数据;若RD-rate降低,即第一BD-rate小于第二BD-rate,那么编码器可以先去除视频中的UV分量,只将视频中的Y分量送入编码器编码,即确定标识信息指示使用预测模型确定第二图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器在确定当前图像的标识信息时,还可以先确定当前图像的时间层属性,其中,时间层属性指示当前图像是高时间层图像或低时间层图像;然后可以根据时间层属性,进一步确定标识信息。
需要说明的是,在本申请的实施例中,编码器可以结合第一性能参数、第二性能参数以及时间层属性,进一步对标识信息进行确定。
具体地,在本申请中,如果第一性能参数小于第二性能参数,同时,时间层属性指示当前图像是高时间层图像,那么编码器便可以将标识信息设置为指示使用预测模型确定第二图像分量的恢复数据。
相应地,在本申请中,如果第一性能参数不小于第二性能参数,或者,时间层属性指示当前图像是低时间层图像,那么编码器便可以将标识信息设置为指示不使用预测模型确定第二图像分量的恢复数据。
示例性的,在本申请的实施例中,当前图像对应的标识信息可以通过一个比特的标志位来进行取值的确定,例如,若标志位为1,即标识信息的取值为1,则确定使用预测模型确定第二图像分量的恢复数据,若标志位为0,即标识信息的取值为0,则确定不使用预测模型确定第二图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器可以将标识信息写入视频码流。
进一步地,在本申请的实施例中,编码器也可以根据标识信息确定当前图像对应的数据单元,然后便可以将数据单元写入视频码流。
可以理解的是,在本申请中,标识信息可以是视频码流中存在的一个或多个比特直接指示的信息,具体地,在编码端,无论使用RDO方法还是高低时间等级图像的方法,编码器可以在确定使用预测模型后,便设置标识信息并将标识信息写入视频码流。在解码端,解码器可以根据视频码流中的一个或多个比特的标志位确定标识信息。
进一步地,在本申请中,标识信息也可以是根据现有参数推导得到的,具体地,在编码端,编码器可以直接在码流中设置比特直接指示该信息。
需要说明的是,在本申请中,在编码端,编码器还可以根据当前图像为高时间层图像还是低时间层图像来进一步确定当前图像的标识信息。
具体地,在本申请的实施例中,在对视频进行编码时,编码器可以根据视频帧的编码顺序进行高时间层图像和低时间层图像的确定。具体地,编码顺序在前的图像为低时间层图像,编码顺序在后的图像为高时间层图像。也就是说,先编码的图像为低时间层图像,后编码的图像为高时间层图像。
相应地,在解码端,解码器解码视频码流,可以获得当前图像的编码顺序,从而可以根据编码顺序确定当前图像是高时间层图像或低时间层图像。
步骤302、对当前图像的第一图像分量的恢复数据进行编码。
在本申请的实施例中,编码器可以对当前图像的第一图像分量进行编码。具体地,本申请不对步骤302的执行 顺序进行限制。也就是说,编码器在对视频进行编码时,可以选择直接对当前图像的第一图像分量的恢复数据执行编码处理,即可以先执行步骤302,再执行步骤301,也可以在确定当前图像的标识信息之后再执行对当前图像的第一图像分量的恢复数据,即在步骤301之后再执行步骤302,还可以在确定标识信息的同时进行第一图像分量的恢复数据的编码处理,即同时执行步骤301和步骤302。
步骤303、若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对所述当前图像的所述第二图像分量的恢复数据进行编码;其中,第二图像分量是与第一图像分量不同的图像分量。
在本申请的实施例中,编码器在确定标识信息之后,如果标识信息指示使用预测模型确定第二图像分量的恢复数据,那么编码器便可以对当前图像进行分量去除处理,仅编码当前图像的第一图像分量的恢复数据,而去除当前图像的第二图像分量的恢复数据,从而生成当前图像对应的恢复数据。其中,当前图像的恢复数据可以为视频中一个或多个图像的第一图像分量的恢复数据。
具体地,在本申请的实施例中,编码器在确定当前图像的标识信息之后,如果标识信息指示使用预测模型确定第二图像分量的恢复数据,那么编码器也可以跳过对当前图像的第二图像分量的恢复数据进行编码,即选择不对第二图像分量进行编码处理。
也就是说,在本申请的实施例中,编码器在基于标识信息进行编码处理时,如果标识信息指示使用预测模型确定第二图像分量的恢复数据,那么编码器可以选择从待编码的当前图像的数据中去除第二图像分量的恢复数据,然后将去除分量操作后的图像数据输入编码器进行编码;进一步地,编码器还可以选择不对第二图像分量的恢复数据进行编码,即按照原有的方式将第一图像分量的恢复数据和第二图像分量的恢复数据均输入至编码器中,但在标识信息的指示下,不再对第二图像分量的恢复数据进行编码,具体地,可以跳过(skip)对第二图像分量的编码过程。
需要说明的是,在本申请的实施例中,当前图像对应的恢复数据可以为去除了部分图像分量的恢复数据的图像数据。示例性的,在本申请中,编码可以为仅包括第一图像分量的恢复数据、而去除了第二图像分量的恢复数据的图像数据。
可以理解的是,在本申请中,第二图像分量是与第一图像分量不同的图像分量。
进一步地,在本申请的实施例中,第一图像分量可以为当前图像的亮度分量,第二图像分量可以为当前图像的色度分量。
示例性的,在本申请中,第一图像分量可以为当前图像的Y分量(亮度分量),第二图像分量可以为当前图像的UV分量(色度分量),相应地,当前图像对应的恢复数据可以仅包括Y分量的恢复数据而不包括UV分量的恢复数据。
进一步地,在本申请的实施例中,第一图像分量可以为当前图像的色度分量,第二图像分量可以为当前图像的亮度分量。
示例性的,在本申请中,第二图像分量可以为当前图像的Y分量(亮度分量),第一图像分量可以为当前图像的UV分量(色度分量),相应地,当前图像对应的恢复数据可以不包括Y分量的恢复数据而仅包括UV分量的恢复数据。
可以理解的是,在本申请中,第一图像分量可以为当前图像的Y分量,第二图像分量可以为当前图像的Cb、Cr分量;第一图像分量可以为当前图像的Cb分量,第二图像分量可以为当前图像的Y、Cr分量;第一图像分量可以为当前图像的Cr分量,第二图像分量可以为当前图像的Cb、Y分量。
进一步地,在本申请的实施例中,第一图像分量可以为第一颜色分量,第二图像分量可以为第二颜色分量;其中,第二颜色分量是与第一颜色分量不同的颜色分量。
示例性的,在本申请中,第一颜色分量可以为当前图像的R分量,第二颜色分量可以为当前图像的G分量和B分量,相应地,当前图像对应的恢复数据可以仅包括R分量的恢复数据而不包括G分量和B分量的恢复数据。
可以理解的是,在本申请中,第一颜色分量也可以为G分量(或B分量),第二颜色分量也可以为R分量和B分量(或,G分量和R分量)。
需要说明的是,在本申请的实施例中,视频中包括有一个或多个图像,即对视频中的任一个图像,编码器均可以确定对应的标识信息。
可以理解的是,在本申请中,当前图像即为视频中的当前待编码图像,也就是说,编码器在对视频中的待编码图像进行编码时,可以先确定该待编码图像的标识信息。
需要说明的是,在本申请中,编码器在对当前图像进行分量去除处理之前,还可以先对当前图像的格式进行确定,如果确定出的当前图像的格式不为预设格式,那么编码器可以将当前图像的格式转换为预设格式。
示例性的,在本申请的实施例中,预设格式可以包括YUV格式、YCbCr格式、RGB格式中的一种。
可以理解的是,在本申请的实施例中,如果当前图像的格式为YUV格式,那么编码器可以对Y分量进行去除,最终获得的当前图像的恢复数据中仅包括UV分量;如果当前图像的格式为YUV格式,那么编码器可以对UV分量进行去除,最终获得的当前图像的恢复数据中仅包括Y分量。
可以理解的是,在本申请的实施例中,如果当前图像的格式为YCbCr格式,那么编码器可以对Y分量进行去除,最终获得的当前图像的恢复数据中仅包括CbCr分量;如果当前图像的格式为YCbCr格式,那么编码器可以对Cb分量进行去除,最终获得的当前图像的恢复数据中仅包括YCr分量;如果当前图像的格式为YCbCr格式,那么编码器可以对Cr分量进行去除,最终获得的当前图像的恢复数据中仅包括YCb分量。
可以理解的是,在本申请的实施例中,如果当前图像的格式为RGB格式,那么编码器可以对R分量进行去除,最终获得的当前图像的恢复数据中仅包括GB分量;如果当前图像的格式为RGB格式,那么编码器可以对G分量进行去除,最终获得的当前图像的恢复数据中仅包括RB分量;如果当前图像的格式为RGB格式,那么编码器可以对B分量进行去除,最终获得的当前图像的恢复数据中仅包括RG分量。
进一步地,在本申请的实施例中,编码器在对视频中的一个或多个图像进行分量去除处理,获得对应的恢复数据时,可以先对视频中的一个或多个图像的高时间层图像进行去分量处理,获得高时间层图像的恢复数据和低时间层图像的恢复数据;其中,高时间层图像的恢复数据包括第一图像分量的恢复数据,低时间层图像的恢复数据包括第一图像分量的恢复数据和第二图像分量的恢复数据。
也就是说,在本申请中,编码器可以选择只对视频中的一个或多个图像的高时间层图像进行分量去除处理,而不对低时间层图像进行分量去除处理,因此,获得的视频中的一个或多个图像的恢复数据中包括高时间层图像的第一图像分量的恢复数据和低时间层图像的全部图像分量的恢复数据。
进一步地,在本申请的实施例中,图10为编码方法的实现流程示意图二,如图10所示,编码器在确定当前图像的标识信息之后,即步骤301之后,编码器进行编码处理的方法还可以包括以下步骤:
步骤305、若标识信息指示不使用预测模型确定第二图像分量的恢复数据,则对第一图像分量的恢复数据和第二图像分量的恢复数据进行编码处理,生成视频码流。
在本申请的实施例中,编码器在确定当前图像的标识信息之后,如果标识信息指示不使用预测模型确定第二图像分量的恢复数据,那么编码器则不需要进行图像分量的去除处理,而是可以直接对当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据进行编码处理,最终生成视频码流。
步骤304、将当前图像的编码比特写入视频码流。
在本申请的实施例中,如果标识信息指示使用预测模型确定第二图像分量的恢复数据,编码器在跳过对所述当前图像的所述第二图像分量的恢复数据进行编码之后,便可以将所述当前图像的编码比特写入视频码流,并传输至解码端。
需要说明的是,在本申请的实施例中,如果标识信息指示使用预测模型确定第二图像分量的恢复数据,那么编码器获得的当前图像的恢复数据仅包括由第一图像分量的恢复数据,在进行编码处理生成对应的视频码流并传输至解码端以后,解码器便在通过解码视频码流获得第一图像分量的恢复数据之后,需要使用预测模型进行第二图像分量的恢复数据的获取。
进一步地,在本申请的实施例中,由于视频中的一个或多个图像对应的恢复数据可以包括高时间层图像的恢复数据和低时间层图像的恢复数据,因此,编码器在进行编码处理时,可以编码高时间层图像的恢复数据和低时间层图像的恢复数据,从而可以获得视频中的一个或多个图像对应的视频码流。
进一步地,在本申请的实施例中,图11为编码方法的实现流程示意图三,如图11所示,若标识信息指示使用预测模型确定第二图像分量的恢复数据,则编码器在跳过对所述当前图像的所述第二图像分量的恢复数据进行编码之后,即步骤303之后,编码器进行编码处理的方法还可以包括以下步骤:
步骤306、设置标识信息为指示使用预测模型确定第二图像分量的恢复数据,并将标识信息写入视频码流。
在本申请的实施例中,如果标识信息指示使用预测模型确定第二图像分量的恢复数据,那么编码器在对当前图像进行分量去除处理,确定当前图像的第一图像分量的恢复数据之后,还可以设置标识信息为指示使用预测模型确定第二图像分量的恢复数据,然后可以将标识信息写入视频码流中。
示例性的,在本申请的实施例中,当前图像对应的标识信息可以通过一个比特的标志位来进行取值的确定,例如,若标志位为1,即标识信息的取值为1,则确定使用预测模型确定第二图像分量的恢复数据,若标志位为0,即标识信息的取值为0,则确定不使用预测模型确定第二图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器也可以根据标识信息确定当前图像对应的数据单元,然后便可以将数据单元写入视频码流。
相应地,在本申请中,编码端将写入标识信息的视频码流传输至解码端,解码器可以通过解码视频码流获得标识信息,并通过标识信息确定需要使用预测模型确定当前图像的第二图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器还可以将预测模型的模型参数写入视频码流中。
需要说明的是,在本申请的实施例中,预测模型具体可以包括降噪网络和预测网络,其中,降噪网络可以用于噪声的去除,预测网络可以用于第二图像分量的恢复数据的预测。
可以理解的是,在本申请的实施例中,基于所述当前图像的所述第一图像分量的恢复数据,可以使用所述预测模型确定所述当前图像的所述第二图像分量的恢复数据。
可以理解的是,在本申请的实施例中,使用所述当前图像的所述第一图像分量的恢复数据和第二图像分量的恢复数据,可以确定所述当前图像的解码数据。
示例性的,在本申请的实施例中,预测网络可以为Colorization网络,即预测模型可以由降噪网络和Colorization网络构成。
具体地,在本申请中,预测模型的核心可以为Colorization网络,也就是说,在解码端,解码方法的核心是用一个Colorization网络来预测图像分量的恢复数据,例如,在编码端去除了颜色信息的图像的UV分量,在解码端需要使用Colorization网络来进行UV分量的预测,同时,由于在压缩过程中会不可避免的引入噪声,所以在预测网络(Colorization网络)之前可以先通过一个降噪网络。
可见,正是由于在解码端可以通过预测模型对图像分量进行预测和获取,因此,在编码端,编码器可以选择去除部分图像分量,从而大大减小需要传输的数据大小。
可以理解的是,在本申请中,视频中的任意一个或多个图像的第一图像分量输入至该预测模型中,依次进行降噪处理和预测处理之后,便可以输出该任意一个或多个图像的第二图像分量。
需要说明的是,在本申请的实施例中,降噪网络的结构可以借鉴DnCNN的结构。具体地,降噪网络借鉴DnCNN使用正则化和批量归一化的方法提高降噪性能,而与DnCNN所不同的是,降噪网络采用了编码解码的结构,编码端将输入进行下采样,解码端恢复到原有的尺寸,同时减少了网络的层数,从而能使得整个降噪过程在低分辨率的输 入上进行,能有效减少计算量。
示例性的,在本申请中,Colorization网络可以使用U-net结构。其中,U-net包括两部分,第一部分为特征提取,与VGG类似,通过四个下采样提取特征,每次经过一个池化层就一个尺度。第二部分为上采样部分,上采样部分每上采样一次,就和特征提取部分对应的通道数和尺度相同的层进行融合。由于整个过程的网络结构像U型,所以叫U-net网络。由于前后两部分有连接层,使得特征在传播过程中有所保留,减少了特征的丢失。
进一步地,在本申请的实施例中,编码器可以先确定训练数据集合;然后可以使用训练数据集合进行训练,从而确定预测模型的模型参数;最终便可以通过视频码流传输模型参数,以使解码器基于模型参数构建预测模型。
示例性的,在本申请的实施例中,编码器在确定训练数据集合时,可以先确定训练数据标识信息;然后可以根据训练数据标识信息,获取训练数据集合。
示例性的,在本申请的实施例中,编码器在确定训练数据集合时,也可以直接根据预先设定的训练数据标识信息,获取训练数据集合。
示例性的,在本申请的实施例中,编码器在确定训练数据集合时,还可以从训练数据标识信息指示的远程服务器上获得训练数据集合。
本实施例提供了一种编码方法,编码器确定视频中的当前图像的标识信息;其中,标识信息指示是否使用预测模型确定当前图像的第二图像分量的恢复数据;对当前图像的第一图像分量的恢复数据进行编码;若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对当前图像的第二图像分量的恢复数据进行编码,其中,第二图像分量是与第一图像分量不同的图像分量;将当前图像的编码比特写入视频码流。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
基于上述实施例,在本申请的再一实施例中,图12为编码方法的实现流程示意图四,如图12所示,编码器进行编码处理的方法还可以包括以下步骤:
步骤401、获取视频序列。
步骤402、视频序列中的一图像是否为高时间层图像,若是,则执行步骤404,否则执行步骤403。
步骤403、对该图像进行编码处理,生成码流。
步骤404、确定标识信息。
步骤405、根据标识信息判断是否执行分量去除处理,若是,则执行步骤406,否则执行步骤403。
步骤406、去除该图像的第二图像分量。
步骤407、对该图像的第一图像分量进行编码处理,生成码流。
在本申请的实施例中,编码器在获取视频序列之后,对于该视频序列中的高时间层图像和低时间层图像分别进行处理。具体地,如果一图像为该视频序列中的低时间层图像,则可以直接对低时间层图像的全部图像分量进行编码处理,生成视频码流,也就是说,编码器可以直接将低时间层图像的恢复数据写入视频码流中。
相应地,在本申请的实施例中,如果一图像为该视频序列中的高时间层图像,那么编码器可以通过标识信息进行是否去除分量的判断。具体地,在本申请中,编码器可以先确定标识信息,其中,标识信息用于判断是否使用预测模型确定图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器在确定标识信息时,可以先确定表征去除分量的编码效率的第一性能参数和表征未去除分量的编码效率的第二性能参数;然后可以根据第一性能参数和第二性能参数,确定标识信息。
示例性的,在本申请中,如果第一性能参数不小于第二性能参数,那么可以认为不需要进行图像分量的去除,即确定标识信息指示不使用预测模型确定图像分量的恢复数据;如果第一性能参数小于第二性能参数,那么可以认为需要进行图像分量的去除,即确定标识信息指示使用预测模型确定图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器在确定标识信息之后,便可以利用标识信息进行是否执行去除分量流程的指示,如果指示去除分量,那么编码器可以对高时间层图像的任意一个分量进行去除处理,例如,编码器可以去除高时间层图像的第二图像分量的恢复数据,因此生成的高时间层图像的恢复数据中仅包括第一图像分量的恢复数据。
可以理解的是,在本申请中,第二图像分量是与第一图像分量不同的图像分量。
进一步地,在本申请的实施例中,第一图像分量可以为亮度分量,第二图像分量可以为色度分量。或者,第一图像分量可以为色度分量,第二图像分量可以为亮度分量。
进一步地,在本申请的实施例中,第一图像分量可以为第一颜色分量,第二图像分量可以为第二颜色分量;其中,第二颜色分量是与第一颜色分量不同的颜色分量。
需要说明的是,在本申请的实施例中,高时间层图像的恢复数据可以为去除了部分图像分量的恢复数据的图像数据。示例性的,在本申请中,高时间层图像的恢复数据可以为仅包括第一图像分量的恢复数据、而去除了第二图像分量的恢复数据的图像数据。
相应地,在本申请中,与高时间层图像相比,低时间层图像的恢复数据既包括有第一图像分量的恢复数据,也包括有第二图像分量的恢复数据。
进一步地,在本申请的实施例中,编码器在确定标识信息之后,如果标识信息指示不去除分量,那么编码器便可以直接对高时间层图像的全部图像分量进行编码处理,生成视频码流。
可见,在本申请中,对于高时间层图像来说,编码器可以通过标识信息的确定来进一步选择是将高时间层图像 的全部图像分量的恢复信息写入视频码流,还是先去除高时间层图像的部分图像分量的恢复数据之后,将其余部分图像分量的恢复数据写入视频码流中。
进一步地,在本申请的实施例中,编码器可以先确定是否使用预测模型确定第二图像分量的恢复数据,如果使用,则执行分量去除的处理之后,再进行编码处理,如果不使用,则直接进行编码处理。
具体地,在本申请中,编码器可以根据编码器配置文件直接设置对视频中的一个或多个图像的哪些图像使用去除分量处理,对视频中的一个或多个图像的哪些图像直接编码;相应地,在解码端,解码器是根据解码视频码流获得的参数来(直接或间接)确定标识信息,并根据标识信息的指示进一步确定是否使用预测模型进行图像分量的恢复数据的预测。
本实施例提供了一种编码方法,编码器确定视频中的当前图像的标识信息;其中,标识信息指示是否使用预测模型确定当前图像的第二图像分量的恢复数据;对当前图像的第一图像分量的恢复数据进行编码;若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对当前图像的第二图像分量的恢复数据进行编码,其中,第二图像分量是与第一图像分量不同的图像分量;将当前图像的编码比特写入视频码流。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
基于上述实施例,在本申请的另一实施例中,图13为视频压缩方法的实现示意图一,如图13所示,在编码端,对于获取的视频数据,编码器可以先进行去除分量的处理(步骤501),例如,去除第二图像分量的恢复数据,然后获得对应的恢复视频数据,其中,恢复视频数据仅仅包括第一图像分量的恢复数据;接着,编码器可以对恢复视频数据进行编码处理(步骤502),生成第一图像分量对应的码流,并将码流传输至解码端。
相应地,在解码端,解码器可以先解码码流(步骤503),获得第一图像分量的恢复信息,然后再基于第一图像的恢复信息,利用预测模型对第二图像分量的恢复信息进行预测(步骤504),并在获得第二图像分量的恢复信息之后,结合第一图像分量的恢复信息和第二图像的恢复信息,进一步生成视频数据。
示例性的,在本申请中,假设第一图像分量为Y分量,假设第二图像分量为UV分量,通过本申请实施例提出的编码方法,编码器可以先通过预处理去除YUV视频的UV分量,然后再将Y分量写入视频码流;相应地,通过本申请实施例提出的解码方法,解码器在解码视频码流之后,可以基于Y分量,利用预测模型预测生成出可靠的UV分量,以恢复完整的图像数据。
综上所述,本申请提出的视频压缩方案,由于仅对部分图像分量进行编码和解码,因此能够有效提升编码效率,大大减少码流。
进一步地,在本申请的实施例中,在预测第二图像分量的恢复数据时,解码器主要采用以深度学习中的Colorization网络为基础的预测模型来进行第二图像分量的预测。
可以理解的是,在本申请的实施例中,在视频压缩过程中,视频经过数据采集后,将采集到的视频数据先进行去除分量的处理,然后送入编码器中生成一系列视频码流,这些码流经过信道传输到解码器端,解码器解码后重建出视频数据。由于在视频压缩的整个过程中会有损失,也会不可避免的加入一些噪声,因此,本申请实施例提出的预测模型中可以加入降噪网络,使用降噪网络去除视频传输过程中加入的噪声,使得恢复出的视频质量更高。
也就是说,在本申请的实施例中,预测模型具体可以包括降噪网络和预测网络。
在本申请的实施例中,进一步地,由于在视频压缩的整个过程中,编码和解码的处理过程占主要部分,码流的多少对编码和解码的效率有着关键的影响,而现有的视频序列一般都具有丰富的颜色信息,如果直接对整个视频序列压缩,信息量大,码流量大,编码效率低。而本申请提出的压缩方案通过图像分量的去除处理和预测模型的使用能够解决上述问题。具体地,编码器可以图像分量的去除处理中,先去除YUV视频中高时间层图像的UV分量,只将Y分量送入编码器中,生成Y分量的码流传输至解码端,解码器在重建出Y分量后,用低时间层图像作为参考,通过预测模型恢复出视频帧的UV分量,最终获得完整的YUV视频。
也就是说,本申请提出的视频压缩方案,核心就在于在去除视频的颜色信息之后再进行编码,而在重建时能够通过预测模型恢复出可靠的颜色信息,进而可以大大降低码率。
进一步地,在本申请的实施例中,上述压缩方案可以应用于可分级视频编解码处理中。具体地,可以把视频序列按照时间层划分,由于相邻帧的时间层不同,从而能够减少相邻帧之间的参考耦合关系。
图14为视频压缩方法的实现示意图二,如图14所示,视频序列首先分为低时间层图像和高时间层图像,对低时间层图像保持原有编码方式,编码生成对应的码流(步骤601);对高时间层图像做好标记后,判断是否去除UV分量(步骤602),具体地,编码器可以将去除UV分量的编码方式与不去除UV分量的原有编码方式的BD-rate进行比较,根据RD-rate是否降低来判断是否去除颜色信息,若RD-rate没有降低,则继续用原编码方式,编码生成对应的码流(步骤603);若RD-rate降低,则先去除高时间层图像的UV分量(步骤604),只将高时间层图像的Y分量送入编码器编码,生成对应的码流(步骤605)。
相应地,在解码端,对于低时间层图像,解码器可以通过解码流获得低时间层图像(步骤606),对于高时间层图像,解码端可以判断高时间层图像是否存在UV分量(步骤607),如果存在,则直接解码出高时间层图像(步骤608),如果不存在,则先解码获得高时间层图像的Y分量(步骤609),然后以低时间层图像作为参考,基于高时间层图像的Y分量,利用预测模型恢复出高时间层图像的UV分量(步骤610),最后,将高时间层图像的Y分量与恢复出的高时间层图像的UV分量结合,得到高时间层图像的YUV图像数据。
由此可见,本申请提出的编码方法和解码方法,以YUV格式的图像数据为例,在压缩编码时将视频中的一个或 多个图像的高时间层图像的UV分量进行去除;在解码时用所设计的预测模型进行相对应的UV分量的预测,恢复出原有的图像数据。也就是说,传输过程从原有的传递YUV三个分量,改进为只需要传播Y分量,可以明显降低码率,大大提高编码效率,减少传输码流。
进一步地,在本申请的实施例中,预测模型可以由预测网络和降噪网络构成,其中,本申请所提出的降噪网络可以为使用编码解码的网络结构,能够将视频帧进行下采样到一个低分辨率的视频帧,能有效减少降噪网络的计算量。能够提高视频的图像质量和帧率,将所提出的降噪网络应用于视频压缩的处理过程,可以提升压缩视频的质量,同时也能提高颜色预测结果的准确性。
具体地,在本申请的实施例中,预测模型中的预测网络可以为Colorization网络,其中,Colorization神经网络结构用于将视频中的一个或多个图像的图像分量恢复出来。
可以理解的是,本申请实施例提出的编码方法和解码方法,即本申请所提出的压缩方法,既可以基于上述预测模型实现一个低码率的视频压缩方案,在编码时先去除视频的部分图像分量,在解码时再进行相对应的部分图像分量的恢复,编解码过程只针对部分图像分量进行,可以大大降低码率;也可以在解码的过程中,利用预测模型中的降噪网络对压缩重建的视频去除噪声,以提高视频图像质量。
进一步地,在本申请的实施例中,也可以对预测模型中的网络结构进行更改,可以根据实际应用场景对网络层数进行适当的增加或者删减。其中,在本申请中,降噪网络使用的是编码解码结构,也可以替换为DnCNN或者其他的网络结构,且网络层数不固定。在本申请中,预测网络使用的是低时间层的相邻帧作为参考,也可以使用其他帧或者其他图片作为参考。
本实施例提供了一种编码方法和解码方法,解码器解码视频码流,确定视频中的当前图像的解码参数;其中,当前图像的解码参数包括视频中一个或多个图像的第一图像分量的恢复数据;根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据,其中,第二图像分量是与第一图像分量不同的图像分量;基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。编码器确定视频中的当前图像的标识信息;其中,标识信息指示是否使用预测模型确定当前图像的第二图像分量的恢复数据;对当前图像的第一图像分量的恢复数据进行编码;若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对当前图像的第二图像分量的恢复数据进行编码,其中,第二图像分量是与第一图像分量不同的图像分量;将当前图像的编码比特写入视频码流。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
基于上述实施例,在本申请的另一实施例中,图15为解码器的组成结构示意图一,如图15所示,本申请实施例提出的解码器100可以包括解码部分101,第一确定部分102。
所述解码部分101,配置为解码视频码流;
所述第一确定部分102,配置为确定视频中的当前图像的解码参数;其中,所述当前图像的解码参数包括所述视频中一个或多个图像的第一图像分量的恢复数据;根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;基于所述当前图像的所述第一图像分量的恢复数据和所述第二图像分量的恢复数据,确定所述当前图像的解码数据。
图16为解码器的组成结构示意图二,如图16所示,本申请实施例提出的解码器100还可以包括第一处理器103、存储有第一处理器103可执行指令的第一存储器104、第一通信接口105,和用于连接第一处理器103、第一存储器104以及第一通信接口105的第一总线106。
进一步地,在本申请的实施例中,上述第一处理器103,用于解码视频码流,确定视频中的当前图像的解码参数;其中,所述当前图像的解码参数包括所述视频中一个或多个图像的第一图像分量的恢复数据;根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;基于所述当前图像的所述第一图像分量的恢复数据和所述第二图像分量的恢复数据,确定所述当前图像的解码数据。
图17为编码器的组成结构示意图一,如图17所示,本申请实施例提出的编码器200包括:第二确定部分201,编码部分202,
所述第二确定部分201,配置为确定视频中的当前图像的标识信息;其中,所述标识信息指示是否使用预测模型确定所述当前图像的第二图像分量的恢复数据;
所述编码部分202,配置为对所述当前图像的第一图像分量的恢复数据进行编码;若所述标识信息指示使用所述预测模型确定所述第二图像分量的恢复数据,则跳过对所述当前图像的所述第二图像分量的恢复数据进行编码,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;将所述当前图像的编码比特写入视频码流。
图18为编码器的组成结构示意图二,如图18所示,本申请实施例提出的编码器200还可以包括第二处理器203、存储有第二处理器203可执行指令的第二存储器204、第二通信接口205,和用于连接第二处理器203、第二存储器204以及第二通信接口205的第二总线206。
进一步地,在本申请的实施例中,上述第二处理器203,用于确定视频中的当前图像的标识信息;其中,所述标识信息指示是否使用预测模型确定所述当前图像的第二图像分量的恢复数据;对所述当前图像的第一图像分量的恢复数据进行编码;若所述标识信息指示使用所述预测模型确定所述第二图像分量的恢复数据,则跳过对所述当前图 像的所述第二图像分量的恢复数据进行编码,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;将所述当前图像的编码比特写入视频码流
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例提供了一种编码器和解码器,解码器解码视频码流,确定视频中的当前图像的解码参数;其中,当前图像的解码参数包括视频中一个或多个图像的第一图像分量的恢复数据;根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据,其中,第二图像分量是与第一图像分量不同的图像分量;基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。编码器确定视频中的当前图像的标识信息;其中,标识信息指示是否使用预测模型确定当前图像的第二图像分量的恢复数据;对当前图像的第一图像分量的恢复数据进行编码;若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对当前图像的第二图像分量的恢复数据进行编码,其中,第二图像分量是与第一图像分量不同的图像分量;将当前图像的编码比特写入视频码流。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。
本申请实施例提供计算机可读存储介质和计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如上述实施例所述的方法。
具体来讲,本实施例中的一种解码方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种解码方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
解码视频码流,确定视频中的当前图像的解码参数;其中,所述当前图像的解码参数包括所述视频中一个或多个图像的第一图像分量的恢复数据;
根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;
基于所述当前图像的所述第一图像分量的恢复数据和所述第二图像分量的恢复数据,确定所述当前图像的解码数据。
具体来讲,本实施例中的一种编码方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种编码方法对应的程序指令被一电子设备读取或被执行时,还包括如下步骤:
确定视频中的当前图像的标识信息;其中,所述标识信息指示是否使用预测模型确定所述当前图像的第二图像分量的恢复数据;
对所述当前图像的第一图像分量的恢复数据进行编码;
若所述标识信息指示使用所述预测模型确定所述第二图像分量的恢复数据,则跳过对所述当前图像的所述第二图像分量的恢复数据进行编码,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;
将所述当前图像的编码比特写入视频码流
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的实现流程示意图和/或方框图来描述的。应理解可由计算机程序指令实现流程示意图和/或方框图中的每一流程和/或方框、以及实现流程示意图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
工业实用性
本申请实施例提供了一种编码方法、解码方法、编码器、解码器及存储介质,解码器解码视频码流,确定视频中的当前图像的解码参数;其中,当前图像的解码参数包括视频中一个或多个图像的第一图像分量的恢复数据;根据当前图像的解码参数,基于第一图像分量的恢复数据,利用预测模型确定当前图像的第二图像分量的恢复数据,其中,第二图像分量是与第一图像分量不同的图像分量;基于当前图像的第一图像分量的恢复数据和第二图像分量的恢复数据,确定当前图像的解码数据。编码器确定视频中的当前图像的标识信息;其中,标识信息指示是否使用预测模型确定当前图像的第二图像分量的恢复数据;对当前图像的第一图像分量的恢复数据进行编码;若标识信息指示使用预测模型确定第二图像分量的恢复数据,则跳过对当前图像的第二图像分量的恢复数据进行编码,其中,第二图像分量是与第一图像分量不同的图像分量;将当前图像的编码比特写入视频码流。由此可见,在本申请的实施例中,编码器可以对视频中的一个或多个图像进行图像分量的去除处理,从而可以只编码视频中的一个或多个图像的部分图像分量,而不需要对全部图像分量进行编码;相应地,解码器解码视频码流之后,获得的是视频中的一个或多个图像的部分图像分量的恢复数据,然后可以利用预测模型对其余图像分量的恢复数据进行预测,最终便可以生成完整的图像数据。可见,本申请提出的编码方法和解码方法,能够只对视频中的一个或多个图像的部分图像分量进行编码和解码,从而能够降低码率,大大减少传输码流,有效提高编解码效率。

Claims (39)

  1. 一种解码方法,应用于解码器,所述方法包括:
    解码视频码流,确定视频中的当前图像的解码参数;其中,所述当前图像的解码参数包括所述视频中一个或多个图像的第一图像分量的恢复数据;
    根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;
    基于所述当前图像的所述第一图像分量的恢复数据和所述第二图像分量的恢复数据,确定所述当前图像的解码数据。
  2. 根据权利要求1所述的方法,其中,所述第一图像分量为亮度分量,所述第二图像分量为色度分量,或者,所述第一图像分量为色度分量,所述第二图像分量为亮度分量。
  3. 根据权利要求1所述的方法,其中,所述第一图像分量为第一颜色分量,所述第二图像分量为第二颜色分量;其中,所述第二颜色分量是与所述第一颜色分量不同的颜色分量。
  4. 根据权利要求1所述的方法,其中,
    所述当前图像的解码参数还包括标识信息;其中,所述标识信息指示是否使用所述预测模型确定所述第二图像分量的恢复数据。
  5. 根据权利要求4所述的方法,其中,所述解码视频码流,确定所述视频中当前图像的解码参数,包括:
    解码所述视频码流,从所述当前图像对应的数据单元中,获得所述标识信息。
  6. 根据权利要求4所述的方法,其中,所述解码视频码流,确定所述视频中当前图像的解码参数,包括:
    解码所述视频码流,确定所述当前图像的时间层属性,其中,所述时间层属性指示所述当前图像是高时间层图像或低时间层图像;
    根据所述时间层属性,确定所述标识信息。
  7. 根据权利要求6所述的方法,其中,所述根据所述时间层属性,确定所述标识信息,包括:
    若解码所述视频码流所得到的所述当前图像的恢复数据中不包含所述当前图像的所述第二图像分量的恢复数据,且所述时间层属性指示所述当前图像为所述高时间层图像,则将所述标识信息设置为指示使用所述预测模型确定所述第二图像分量的恢复数据。
  8. 根据权利要求4所述的方法,其中,所述根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,包括:
    当所述标识信息设置为指示使用所述预测模型确定所述第二图像分量的恢复数据时,将所述当前图像的所述第一图像分量的恢复数据和一个或多个低时间层图像的恢复数据输入至所述预测模型中,生成所述当前图像的所述第二图像分量的恢复数据;其中,所述一个或多个低时间层图像是按照解码顺序在解码所述当前图像之前,解码所述视频码流获得的图像。
  9. 根据权利要求8所述的方法,其中,所述方法还包括:
    所述预测模型包括降噪网络和预测网络。
  10. 根据权利要求9所述的方法,其中,所述方法还包括:
    将所述当前图像的所述第一图像分量的恢复数据输入至所述降噪网络,获得第一降噪后数据;将所述一个或多个低时间层图像的恢复数据输入至所述降噪网络,获得第二降噪后数据;
    对所述第一降噪后数据和所述第二降噪后数据进行融合处理,获得融合后图像特征;
    将所述融合后图像特征输入至所述预测网络,生成所述第二图像分量的恢复数据。
  11. 根据权利要求10所述的方法,其中,所述对所述第一降噪后数据和所述第二降噪后数据进行融合处理,获得融合后图像特征,所述方法还包括:
    所述融合处理还包括第一预处理,其中,所述第一预处理对所述第一降噪后数据或所述第二降噪后数据进行尺寸变换处理,以使经过所述第一预处理后,所述第一降噪后数据和所述第二降噪后数据具有相同的尺寸。
  12. 根据权利要求1所述的方法,其中,所述方法还包括:
    解码所述视频码流,获得所述预测模型的模型参数;
    基于所述模型参数,构建所述预测模型。
  13. 根据权利要求1所述的方法,其中,所述方法还包括:
    确定训练数据集合;
    使用训练数据集合进行训练,确定所述预测模型的模型参数;
    基于所述模型参数,构建所述预测模型。
  14. 根据权利要求13所述的方法,其中,所述确定训练数据集合,包括:
    解码所述视频码流,确定训练数据标识信息;
    根据所述训练数据标识信息,获取所述训练数据集合。
  15. 根据权利要求13所述的方法,其中,所述确定训练数据集合,包括:
    根据预先设定的训练数据标识信息,获取所述训练数据集合。
  16. 根据权利要求14或15所述的方法,其中,所述方法还包括:
    从所述训练数据标识信息指示的远程服务器上获得所述训练数据集合。
  17. 一种编码方法,应用于编码器,所述方法包括:
    确定视频中的当前图像的标识信息;其中,所述标识信息指示是否使用预测模型确定所述当前图像的第二图像分量的恢复数据;
    对所述当前图像的第一图像分量的恢复数据进行编码;
    若所述标识信息指示使用所述预测模型确定所述第二图像分量的恢复数据,则跳过对所述当前图像的所述第二图像分量的恢复数据进行编码,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;
    将所述当前图像的编码比特写入视频码流。
  18. 根据权利要求17所述的方法,其中,所述确定当前图像的标识信息,包括:
    确定所述当前图像的第一性能参数和第二性能参数;其中,所述第一性能参数表征去除分量的编码效率,所述第二性能参数表征未去除分量的编码效率;
    根据所述第一性能参数和所述第二性能参数,确定所述标识信息。
  19. 根据权利要求18所述的方法,其中,所述确定当前图像的标识信息,包括:
    确定所述当前图像的时间层属性,其中,所述时间层属性指示所述当前图像是高时间层图像或低时间层图像;
    根据所述时间层属性,确定所述标识信息。
  20. 根据权利要求19所述的方法,其中,所述方法还包括:
    若所述第一性能参数小于所述第二性能参数,且所述时间层属性指示所述当前图像是所述高时间层图像,则将所述标识信息设置为指示使用所述预测模型确定所述第二图像分量的恢复数据。
  21. 根据权利要求18或19所述的方法,其中,所述方法还包括:
    将所述标识信息写入所述视频码流;或者,根据所述标识信息确定所述当前图像对应的数据单元,并将所述数据单元写入所述视频码流。
  22. 根据权利要求17所述的方法,其中,所述第一图像分量为亮度分量,所述第二图像分量为色度分量,或者,所述第一图像分量为色度分量,所述第二图像分量为亮度分量。
  23. 根据权利要求17所述的方法,其中,所述第一图像分量为第一颜色分量,所述第二图像分量为第二颜色分量;其中,所述第二颜色分量是与所述第一颜色分量不同的颜色分量。
  24. 根据权利要求17所述的方法,其中,所述方法还包括:
    若所述当前图像的格式不为预设格式,则将所述当前图像的格式转换为预设格式。
  25. 根据权利要求24所述的方法,其中,所述预设格式包括YUV格式、YCbCr格式、RGB格式中的一种。
  26. 根据权利要求17所述的方法,其中,所述方法还包括:
    将所述预测模型的模型参数写入所述视频码流。
  27. 根据权利要求26所述的方法,其中,所述方法还包括:
    确定训练数据集合;
    使用训练数据集合进行训练,确定所述预测模型的模型参数。
  28. 根据权利要求27所述的方法,其中,所述确定训练数据集合,包括:
    确定训练数据标识信息;
    根据所述训练数据标识信息,获取所述训练数据集合。
  29. 根据权利要求28所述的方法,其中,所述方法还包括:
    将所述训练数据标识信息写入所述视频码流。
  30. 根据权利要求27所述的方法,其中,所述确定训练数据集合,包括:
    根据预先设定的训练数据标识信息,获取所述训练数据集合。
  31. 根据权利要求28或30所述的方法,其中,所述方法还包括:
    从所述训练数据标识信息指示的远程服务器上获得所述训练数据集合。
  32. 根据权利要求17所述的方法,其中,包括:
    基于所述当前图像的所述第一图像分量的恢复数据,使用所述预测模型确定所述当前图像的所述第二图像分量的恢复数据。
  33. 根据权利要求32所述的方法,其中,包括:
    使用所述当前图像的所述第一图像分量的恢复数据和第二图像分量的恢复数据,确定所述当前图像的解码数据。
  34. 根据权利要求19所述的方法,其中,所述预测模型包括降噪网络和预测网络。
  35. 一种解码器,所述解码器包括:解码部分,第一确定部分,
    所述解码部分,配置为解码视频码流;
    所述第一确定部分,配置为确定视频中的当前图像的解码参数;其中,所述当前图像的解码参数包括所述视频中一个或多个图像的第一图像分量的恢复数据;根据所述当前图像的解码参数,基于所述第一图像分量的恢复数据,利用预测模型确定所述当前图像的第二图像分量的恢复数据,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;基于所述当前图像的所述第一图像分量的恢复数据和所述第二图像分量的恢复数据,确定所述当前图像的解码数据。
  36. 一种解码器,所述解码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被所述第一处理器执行时,实现如权利要求1-16任一项所述的方法。
  37. 一种编码器,所述编码器包括:第二确定部分,编码部分,
    所述第二确定部分,配置为确定视频中的当前图像的标识信息;其中,所述标识信息指示是否使用预测模型确定所述当前图像的第二图像分量的恢复数据;
    所述编码部分,配置为对所述当前图像的第一图像分量的恢复数据进行编码;若所述标识信息指示使用所述预 测模型确定所述第二图像分量的恢复数据,则跳过对所述当前图像的所述第二图像分量的恢复数据进行编码,其中,所述第二图像分量是与所述第一图像分量不同的图像分量;将所述当前图像的编码比特写入视频码流。
  38. 一种编码器,所述编码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被所述第二处理器执行时,实现如权利要求17-34任一项所述的方法。
  39. 一种计算机可读存储介质,其上存储有程序,应用于解码器和编码器中,所述程序被第一处理器执行时,实现如权利要求1-16任一项所述的方法,所述程序被第二处理器执行时,实现如权利要求17-34任一项所述的方法。
PCT/CN2020/125532 2020-10-30 2020-10-30 编码方法、解码方法、编码器、解码器及存储介质 WO2022088101A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2020/125532 WO2022088101A1 (zh) 2020-10-30 2020-10-30 编码方法、解码方法、编码器、解码器及存储介质
CN202080106697.4A CN116569550A (zh) 2020-10-30 2020-10-30 编码方法、解码方法、编码器、解码器及存储介质
US18/141,098 US20230269380A1 (en) 2020-10-30 2023-04-28 Encoding method, decoding method, encoder, decoder and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/125532 WO2022088101A1 (zh) 2020-10-30 2020-10-30 编码方法、解码方法、编码器、解码器及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/141,098 Continuation US20230269380A1 (en) 2020-10-30 2023-04-28 Encoding method, decoding method, encoder, decoder and storage medium

Publications (1)

Publication Number Publication Date
WO2022088101A1 true WO2022088101A1 (zh) 2022-05-05

Family

ID=81381629

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125532 WO2022088101A1 (zh) 2020-10-30 2020-10-30 编码方法、解码方法、编码器、解码器及存储介质

Country Status (3)

Country Link
US (1) US20230269380A1 (zh)
CN (1) CN116569550A (zh)
WO (1) WO2022088101A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634603A (zh) * 2012-08-29 2014-03-12 中兴通讯股份有限公司 视频编解码方法、装置及系统
CN103782596A (zh) * 2011-06-28 2014-05-07 三星电子株式会社 使用图像的亮度分量的对图像的色度分量的预测方法和设备
CN109842799A (zh) * 2017-11-29 2019-06-04 杭州海康威视数字技术股份有限公司 颜色分量的帧内预测方法及装置
CN111133756A (zh) * 2017-10-12 2020-05-08 联发科技股份有限公司 用于视频编码的神经网络方法和装置
US20200221079A1 (en) * 2011-06-24 2020-07-09 Texas Instruments Incorporated Luma-based chroma intra-prediction for video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200221079A1 (en) * 2011-06-24 2020-07-09 Texas Instruments Incorporated Luma-based chroma intra-prediction for video coding
CN103782596A (zh) * 2011-06-28 2014-05-07 三星电子株式会社 使用图像的亮度分量的对图像的色度分量的预测方法和设备
CN103634603A (zh) * 2012-08-29 2014-03-12 中兴通讯股份有限公司 视频编解码方法、装置及系统
CN111133756A (zh) * 2017-10-12 2020-05-08 联发科技股份有限公司 用于视频编码的神经网络方法和装置
CN109842799A (zh) * 2017-11-29 2019-06-04 杭州海康威视数字技术股份有限公司 颜色分量的帧内预测方法及装置

Also Published As

Publication number Publication date
US20230269380A1 (en) 2023-08-24
CN116569550A (zh) 2023-08-08

Similar Documents

Publication Publication Date Title
Mentzer et al. Vct: A video compression transformer
CN107211128B (zh) 自适应色度下采样和色彩空间转换技术
KR101366091B1 (ko) 영상 부호화 및 복호화 방법과 장치
US9729870B2 (en) Video coding efficiency with camera metadata
CN113766249B (zh) 视频编解码中的环路滤波方法、装置、设备及存储介质
WO2023000179A1 (zh) 视频超分辨网络及视频超分辨、编解码处理方法、装置
CN112235569B (zh) 基于h264压缩域的快速视频分类方法、系统及装置
CN112422989A (zh) 一种视频编码方法
CN115442618A (zh) 基于神经网络的时域-空域自适应视频压缩
US20190096036A1 (en) Multi-level temporal resolution increase of video
WO2022088101A1 (zh) 编码方法、解码方法、编码器、解码器及存储介质
WO2023225808A1 (en) Learned image compress ion and decompression using long and short attention module
CN114793282B (zh) 带有比特分配的基于神经网络的视频压缩
CN113747242B (zh) 图像处理方法、装置、电子设备及存储介质
Liu et al. Learned video compression with residual prediction and loop filter
US7706440B2 (en) Method for reducing bit rate requirements for encoding multimedia data
US10003826B2 (en) Method of reducing noise of video signal
Ibraheem et al. Enhancing Versatile Video Coding Efficiency via Post-Processing of Decoded Frames Using Residual Network Integration in Deep Convolutional Neural Networks
US20220222864A1 (en) Image compression apparatus and learning apparatus and method for the same
US10015506B2 (en) Frequency reduction and restoration system and method in video and image compression
WO2022067806A1 (zh) 一种视频编解码方法、编码器、解码器及存储介质
Montajabi et al. Recurrent Neural Network-Based Video Compression
Guleryuz et al. Sandwiched Compression: Repurposing Standard Codecs with Neural Network Wrappers
WO2024006167A1 (en) Inter coding using deep learning in video compression
CN117915093A (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: 20959262

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202080106697.4

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20959262

Country of ref document: EP

Kind code of ref document: A1