WO2021035717A1 - Intra-frame chroma prediction method and apparatus, device, and video coding and decoding system - Google Patents

Intra-frame chroma prediction method and apparatus, device, and video coding and decoding system Download PDF

Info

Publication number
WO2021035717A1
WO2021035717A1 PCT/CN2019/103800 CN2019103800W WO2021035717A1 WO 2021035717 A1 WO2021035717 A1 WO 2021035717A1 CN 2019103800 W CN2019103800 W CN 2019103800W WO 2021035717 A1 WO2021035717 A1 WO 2021035717A1
Authority
WO
WIPO (PCT)
Prior art keywords
chrominance
prediction
information
prediction method
target
Prior art date
Application number
PCT/CN2019/103800
Other languages
French (fr)
Chinese (zh)
Inventor
朱林卫
张云
李娜
张欢
乔宇
Original Assignee
中国科学院深圳先进技术研究院
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 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Priority to PCT/CN2019/103800 priority Critical patent/WO2021035717A1/en
Publication of WO2021035717A1 publication Critical patent/WO2021035717A1/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/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/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes

Definitions

  • This application belongs to the field of video coding technology, and in particular relates to an intra-frame chrominance prediction method, device, video coding and decoding system, terminal equipment, video encoder, video decoder, and computer-readable storage medium.
  • the video coding process mainly includes modules such as prediction, transform quantization, and entropy coding.
  • Prediction can be divided into intra-frame prediction and inter-frame prediction, and intra-frame prediction can include intra-frame chroma prediction and intra-frame luminance prediction.
  • VVC Versatile Video Coding
  • CCLM Based Cross-component Linear Model Chroma Intra-prediction for Video Coding
  • MMLM Multi-model Based Cross-component Linear Model Chroma Intra-prediction for Video Coding, MM- CCLM
  • the embodiment of the present application is to provide an intra-frame chrominance prediction method, system, terminal equipment, and device, aiming to solve the problem that the existing intra-frame chrominance prediction method has low universality and requires more code rate.
  • an embodiment of the present application provides an intra-frame chroma prediction method, including:
  • the target parameter includes at least one of the encoding distortion and the adjacent chrominance block that has been encoded or decoded; the target chrominance component block is cut out from the chrominance component, and the target chrominance component block is cut out from the chrominance component.
  • the target chrominance component block is the final chrominance prediction result.
  • an embodiment of the present application provides an intra-frame chrominance prediction method, which is applied to a video encoder, and the method includes:
  • the luminance component Encode the luminance component to obtain the luminance code stream; obtain the encoded and reconstructed luminance component, the adjacent chrominance information that has been encoded and reconstructed, and the original chrominance information corresponding to the chrominance block to be encoded;
  • the target chrominance prediction method with the smallest rate-distortion cost is determined in the degree prediction method; wherein the at least two chrominance prediction methods include a first type of chrominance prediction method and a second type of chrominance prediction method, and the first type
  • the chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the indicator information corresponding to the target chrominance prediction method is generated through the association relationship between the chrominance prediction method and the indicator information
  • the original chrominance information and the predicted chrominance information are subtracted to obtain chrominance residual information; wherein the predicted chrominance information is chrominance prediction by the target chrominance prediction method
  • an embodiment of the present application provides an intra-frame chrominance prediction method, which is applied to a video decoder, and the method includes:
  • the indication information determines the target chroma prediction mode from at least two chroma prediction modes, the at least two chroma prediction modes including a first type of chroma prediction mode and a second type of chroma prediction mode, the first
  • the chrominance-like prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, through the The target chroma prediction method performs chroma prediction on the chroma components to obtain a chroma prediction result; performs color based on the residual obtained after decoding the chroma residual information in the video bitstream and the chroma prediction result.
  • an intra-frame chroma prediction method including:
  • the video encoder encodes the luminance component to obtain the luminance code stream; obtains the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be encoded; Determine the target chrominance prediction method with the smallest rate-distortion cost among the two chrominance prediction methods; wherein, the at least two chrominance prediction methods include a first-type chrominance prediction method and a second-type chrominance prediction method.
  • the first type of chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the target chrominance prediction method is generated through the association relationship between the chrominance prediction method and the indication information Indication information; subtracting the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is the color of the target chrominance prediction mode Chrominance information obtained after degree prediction; encoding the indication information and the chrominance residual error to obtain a chrominance code stream, and combining the chrominance code stream and the luminance code stream to obtain a video code stream;
  • the video decoder obtains the video code stream; decodes the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information;
  • the target chrominance prediction mode is determined in the at least two chrominance prediction modes; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, the target chrominance prediction mode
  • the chrominance component performs chrominance prediction to obtain the chrominance prediction result; the chrominance reconstruction is performed according to the residual error obtained after decoding the chrominance residual information in the video bitstream and the chrominance prediction result to obtain the output chrominance .
  • an embodiment of the present application provides a video encoding and decoding system, including a video encoder and a video decoder;
  • the video encoder is used to encode the luminance component to obtain the luminance code stream; obtain the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be encoded; pass rate distortion Optimizing the determination of a target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods; wherein the at least two chrominance prediction methods include a first-type chrominance prediction method and a second-type chrominance prediction method
  • the first type of chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the target chrominance is generated through the association relationship between the chrominance prediction method and the indication information Indication information of the prediction mode; subtracting the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is predicted by the target chrominance
  • the video decoder is used to obtain the video code stream; decode the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information; according to the indication information , Determining the target chrominance prediction mode from the at least two chrominance prediction modes; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, predict the target chrominance
  • the chrominance component is predicted by the chrominance component to obtain the chrominance prediction result; the chrominance reconstruction is performed according to the residual error obtained after decoding the chrominance residual information in the video bitstream and the chrominance prediction result to obtain Output chromaticity.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program that is stored in the memory and can run on the processor.
  • the processor executes the computer program when the computer program is executed.
  • the intra-frame chroma prediction method according to any one of the above-mentioned first aspects.
  • an embodiment of the present application provides a video encoder, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program,
  • the intra-frame chrominance prediction method according to any one of the above-mentioned second aspects is implemented.
  • an embodiment of the present application provides a video decoder, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • a processor executes the computer program,
  • the intra-frame chrominance prediction method according to any one of the above-mentioned third aspects is implemented.
  • an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, implements the first aspect or the second aspect or the first aspect described above.
  • the intra-frame chroma prediction method according to any one of the three aspects.
  • the embodiments of the present application provide a computer program product.
  • the computer program product runs on a terminal device or a video encoder or a video decoder
  • the terminal device or a video encoder or a video decoder can execute the above-mentioned first Aspect or the intra-frame chroma prediction method according to any one of the second aspect or the third aspect.
  • the chromaticity prediction is performed through the image color sub-network in the chromaticity prediction convolutional neural network model and the corresponding input parameters, that is, the chromaticity prediction problem is modeled as an image coloring problem, which has high universality.
  • the chroma prediction based on the color sub-network of the image can save the bit rate.
  • FIG. 1 is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of the application;
  • FIG. 2 is a schematic block diagram of the process of reconstructing adjacent chrominance blocks according to an embodiment of the application
  • FIG. 3 is a schematic diagram of a reconstruction process of adjacent chrominance blocks provided by an embodiment of this application;
  • FIG. 4 is a schematic diagram of an intra-frame chroma prediction method based on a convolutional neural network provided by an embodiment of the application;
  • FIG. 5 is a schematic block diagram of the structure of an intra-frame chrominance prediction apparatus provided by an embodiment of the application;
  • FIG. 6 is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of an encoding process of a video encoder provided by an embodiment of the application.
  • FIG. 8 is a schematic block diagram of the structure of an intra-frame chrominance prediction apparatus provided by an embodiment of the application.
  • FIG. 9 is a schematic block diagram of the flow of an intra-frame chroma prediction method provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of a decoding process of a video decoder provided by an embodiment of the application.
  • FIG. 11 is a schematic block diagram of the structure of an intra-frame chrominance prediction apparatus provided by an embodiment of this application.
  • FIG. 12 is a schematic block diagram of the structure of a video encoding and decoding system provided by an embodiment of this application.
  • FIG. 13 is a schematic diagram of interaction between a video encoder and a video decoder provided by an embodiment of the application;
  • FIG. 14 is a schematic structural diagram of a terminal device provided by an embodiment of the application.
  • FIG. 15 is a schematic structural diagram of a video encoder provided by an embodiment of the application.
  • FIG. 16 is a schematic structural diagram of a video decoder provided by an embodiment of the application.
  • FIG. 1 is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of this application.
  • the method may include the following steps:
  • Step 101 Obtain an encoded or decoded and reconstructed luminance component.
  • the above-mentioned encoded or decoded and reconstructed luminance component can be the luminance component corresponding to any color space and any video format, that is, the intra-frame chrominance prediction method provided by the embodiment of this application can be applied to any color space and any video format.
  • Video format For example, the above-mentioned encoded or decoded and reconstructed luminance component is the luminance component Y in the YCbCr 4:2:0 format.
  • Step 102 Down-sampling the encoded or decoded and reconstructed luminance components.
  • the above-mentioned down-sampling method may be any down-sampling method in the prior art, or brightness down-sampling may be performed through a convolutional neural network.
  • the aforementioned chrominance prediction convolutional neural network model may further include a luminance down-sampling sub-network.
  • the foregoing specific process of down-sampling the encoded or decoded and reconstructed luminance component may include: down-sampling the encoded or decoded and reconstructed luminance component through the luminance down-sampling sub-network.
  • the above-mentioned chrominance prediction convolutional neural network model may include a luminance down-sampling sub-network in addition to the following image color sub-network.
  • the input coded or decoded and reconstructed brightness components can be down-sampled to obtain the down-sampled coded or decoded and reconstructed brightness components.
  • the 4N ⁇ 4N encoded or decoded and reconstructed luminance component is input to the luminance down-sampling sub-network, and after the luminance down-sampling sub-network is down-sampled, the 2N ⁇ 2N encoded or decoded and reconstructed luminance component is output, where , N is 64.
  • the output layer of the luminance down-sampling sub-network can include one or more kernel functions, that is, the luminance down-sampling network can output one or more down-sampling results, and one down-sampling result corresponds to a down-sampling encoded or decoded reconstruction The brightness component.
  • the luminance down-sampling network can output one or more down-sampling results
  • one down-sampling result corresponds to a down-sampling encoded or decoded reconstruction The brightness component.
  • chroma prediction through multiple down-sampling results can further improve the chroma prediction performance.
  • the above-mentioned brightness down-sampling sub-network can be specifically a convolutional neural network.
  • the hyper-parameters and structure of the brightness down-sampling sub-network can be specifically shown in Table 1 below.
  • the structure and hyper-parameters of the brightness down-sampling sub-network shown in Table 1 above are merely illustrative. In specific applications, the hyperparameters and structure in the brightness down-sampling sub-network can be adjusted according to actual needs. For example, when the color space and video format are YCbCr 4:4:4, the second layer stride in the brightness downsampling sub-network is set to 1. When the color space and video format are YCbCr 4:2:2, the brightness is down The sampling sub-network can only be executed in the vertical or horizontal direction.
  • Step 103 Input the preset parameters into the image coloring sub-network in the pre-trained chroma prediction convolutional neural network model to obtain the chroma components output by the image coloring sub-network;
  • the preset parameters include down-sampled encoded or decoded and reconstructed luminance components, or down-sampled encoded or decoded and reconstructed luminance components and target parameters.
  • the target parameters include encoding distortion and encoded or decoded At least one of the reconstructed adjacent chrominance blocks is decoded.
  • the above-mentioned preset parameters may only include down-sampled encoded or decoded and reconstructed luminance components, may include down-sampled encoded or decoded and reconstructed luminance components and encoding distortion, and may include down-sampling.
  • the subsequent coded or decoded and reconstructed luminance component and adjacent chrominance blocks may also include the down-sampled coded or decoded and reconstructed luminance component, coding distortion, and the coded or decoded and reconstructed adjacent chrominance Piece.
  • the adjacent chrominance blocks that have been coded or decoded and reconstructed can improve the chroma prediction performance of the image coloring network and the training speed of the network model, and the coding distortion can eliminate the negative impact of compression distortion.
  • the preset parameters include down-sampled coded or decoded and reconstructed luminance components, coding distortion, and adjacent chroma blocks
  • the performance of the image coloring network is the best, that is, the intra-frame chroma prediction performance
  • the preset parameters include the down-sampling coded or decoded and reconstructed luminance component and coding distortion, or the down-sampled coded or decoded reconstructed luminance component and the coded or decoded reconstructed phase
  • the performance of the image coloring network is second; when the preset parameters only include down-sampled encoded or decoded and reconstructed luminance components, the performance of the image coloring network is the worst, that is, the intra-frame color
  • the preset parameters only include the down-sampled encoded or decoded and reconstructed luminance components, the color prediction results can still be obtained through the image coloring network, that is, the objectives of the embodiments of the present application can still be achieved.
  • the aforementioned encoding distortion degree can be specifically expressed as an image block characterized by a quantization parameter.
  • the value of the encoding distortion degree can be any value from 0 to 51.
  • the coding distortion degree is 10
  • the coding distortion degree is specifically a 2N ⁇ 2N image block, and the value of each pixel in the image block is 10.
  • the aforementioned adjacent chrominance block refers to an image block that includes adjacent chrominance information, and the adjacent chrominance block is reconstructed in advance.
  • the above-mentioned preset parameters include adjacent chrominance blocks that have been encoded or decoded and reconstructed, referring to the schematic block diagram of the flow of the adjacent chrominance block reconstruction process shown in FIG. 2, the above-mentioned intra-frame chrominance Forecasting methods can also include:
  • Step 201 Cut out the target brightness component block from the coded or decoded and reconstructed brightness component.
  • the aforementioned target luminance component block generally refers to the luminance component block located at the lower right of the encoded or decoded and reconstructed luminance component.
  • the coded or decoded and reconstructed luminance component is a 4N ⁇ 4N luminance block
  • the 4N ⁇ 4N luminance component block is divided into 4 2N ⁇ 2N luminance component blocks
  • the 2N ⁇ 2N luminance component block at the bottom right is Target luminance component block.
  • Step 202 Perform chroma prediction on the target luminance component block by using a preset chroma prediction mode to obtain a predicted chroma.
  • the above-mentioned preset chromaticity prediction method can be specifically any chromaticity prediction method in the prior art, for example, a linear prediction model CCLM or a multi-directional linear model MDLM.
  • the traditional linear chrominance prediction model is used to predict the chrominance of the target luminance component block to obtain the predicted chrominance Cb and Cr.
  • Step 203 Use the predicted chrominance as the initial chrominance information of the chrominance block to be predicted.
  • the size of the coded or decoded and reconstructed brightness component 31 is 4N ⁇ 4N, and the brightness component includes brightness component blocks of size 2N ⁇ 2N and codes 1, 2, 3, and 4 respectively, where, Luminance component block 1 is located at the upper left, luminance component block 2 is located at the upper right, luminance component block 3 is located at the lower left, and luminance component block 4 is located at the lower right.
  • the luminance component block 32 can be obtained by cropping, and then the 2N ⁇ 2N luminance component block 32 is input into the linear prediction model CCLM to obtain the predicted chrominance Cb and Cr 34, and then the N ⁇ N chrominance block Cb and Cr are respectively filled in The vacant parts to the corresponding chrominance block 35, that is, the chrominance blocks Cb and Cr are respectively filled to the position of the question mark in FIG. 3, as the initial chrominance information of the 2N ⁇ 2N chrominance block to be predicted.
  • the input of the above-mentioned image coloring sub-network is a grayscale image
  • the output is a corresponding color image.
  • the chromaticity prediction problem is modeled as an image coloring problem, that is, the purpose of intra-frame chromaticity prediction is achieved through image coloring.
  • the structure and hyperparameters of the above-mentioned image color sub-network may be shown in Table 2 below.
  • the above-mentioned chrominance prediction convolutional neural network model includes the above-mentioned image coloring sub-network. In some embodiments, it may also include a luminance down-sampling sub-network.
  • the chrominance prediction convolutional neural network model is pre-trained.
  • the loss function is specifically:
  • L 2
  • F 1 (Y) is the down-sampled coded or decoded reconstructed brightness Component
  • the size is 2N ⁇ 2N
  • D is the coding distortion degree
  • the size is 2N ⁇ 2N
  • Cb, Cr are adjacent chrominance information in adjacent chrominance blocks
  • the adjacent chrominance block size is 2N ⁇ 2N.
  • the batch size and learning rate during training are set to 128 and 1 ⁇ 10 -4 respectively .
  • can be set to 0.5.
  • the training sample data set may include 886 images from the UCID database and 400 images from the DIV2K database.
  • Step 104 Cut out the target chrominance component block from the chrominance component, and the target chrominance component block is the final chrominance prediction result.
  • the image coloring sub-network will output the corresponding chroma components, and then the corresponding chroma component blocks are cut out from the output of the image coloring sub-network, To get the predicted chromaticity. That is, in some embodiments, the above-mentioned specific process of obtaining the color prediction result according to the chroma component may include: cropping the target chroma component block from the chroma component, and the target chroma component block is the coded or decoded reconstructed luminance. The chroma prediction result corresponding to the component.
  • an N ⁇ N target chrominance component block is cropped from the 2N ⁇ 2N chrominance component, and the target luminance component block is 2N ⁇ 2N
  • the chroma block in the lower right of the chroma component is cropped from the 2N ⁇ 2N chrominance component, and the target luminance component block is 2N ⁇ 2N
  • the chroma prediction convolutional neural network model includes a luminance down-sampling sub-network 41 and an image color sub-network 42.
  • the size of the encoded or decoded and reconstructed luminance component 43 is 4N ⁇ 4N, including four 2N ⁇ 2N brightness component blocks, the 4 2N ⁇ 2N brightness component blocks are numbered 1, 2, 3, and 4 respectively.
  • the encoded or decoded and reconstructed luminance component 43 is input to the luminance down-sampling network 41 to obtain a plurality of down-sampled encoded or decoded and reconstructed luminance components. Then multiple 2N ⁇ 2N down-sampled encoded or decoded and reconstructed luminance components 44, reconstructed 2N ⁇ 2N adjacent chrominance blocks 45, and 2N ⁇ 2N encoding distortion 46 are input to the image
  • the color sub-network 42, the color sub-network on the image outputs two 2N ⁇ 2N chrominance components 47, respectively cropping out N ⁇ N Cb′ and Cr′ from the two 2N ⁇ 2N chrominance components, and the cropped N ⁇ N Cb' and Cr' are the final chromaticity prediction results.
  • the apparatus may include:
  • the luminance component acquisition module 51 is configured to acquire the encoded or decoded and reconstructed luminance component
  • the down-sampling module 52 is used for down-sampling the encoded or decoded and reconstructed luminance components
  • the coloring module 53 is used to input preset parameters into the image coloring sub-network in the pre-trained chroma prediction convolutional neural network model to obtain the chroma components output by the image coloring sub-network; wherein, the preset parameters include The coded or decoded and reconstructed luminance component after downsampling, or the coded or decoded and reconstructed luminance component after downsampling and the target parameter.
  • the target parameter includes the coding distortion and the adjacent chrominance that has been coded or decoded and reconstructed At least one of the blocks;
  • the prediction module 54 is used to cut out the target chrominance component block from the chrominance component, and the target chrominance component block is the final chrominance prediction result.
  • the apparatus may further include:
  • the cropping module is used to crop the target brightness component block from the coded or decoded and reconstructed brightness component
  • the chrominance prediction module is used to predict the chrominance of the target luminance component block through a preset chrominance prediction method to obtain the predicted chrominance;
  • the reconstruction module uses the predicted chrominance as the initial chrominance component of the chrominance block to be predicted.
  • the above-mentioned chrominance prediction convolutional neural network model further includes a luminance down-sampling sub-network; the above-mentioned down-sampling module is specifically used to: use the luminance down-sampling sub-network to download the encoded or decoded and reconstructed luminance components sampling.
  • the intra-frame chrominance prediction device includes a processor, wherein the following program modules used to execute the memory are processed: : Luminance component acquisition module, used to obtain the encoded or decoded and reconstructed luminance components; down-sampling module, used to down-sample the encoded or decoded and reconstructed luminance components; coloring module, used to input preset parameters To the image color sub-network in the pre-trained chroma prediction convolutional neural network model, the chroma components output by the image color sub-network are obtained; among them, the preset parameters include the down-sampled coded or decoded reconstructed brightness Component, or includes down-sampled encoded or decoded and reconstructed luminance component and target parameter, the target parameter includes at least one of encoding distortion and encoded or decoded and reconstructed adjacent chrominance blocks; a prediction module for The target chrominance
  • the foregoing intra-frame chrominance prediction device corresponds to the foregoing intra-frame chrominance prediction method one-to-one.
  • the foregoing intra-frame chrominance prediction device corresponds to the foregoing intra-frame chrominance prediction method one-to-one.
  • the intra-frame chromaticity prediction scheme based on the convolutional neural network provided by the embodiment of the present application performs chromaticity prediction through the image color sub-network and the corresponding input parameters, so as to model the chromaticity prediction problem as an image
  • the color problem is more universal.
  • the chroma prediction based on the color sub-network of the image can save the bit rate. It can be obtained through experiments that the intra-frame chrominance prediction scheme based on the convolutional neural network provided by the embodiment of the present application can save 4.235% of the code rate on average compared with the existing chrominance prediction method.
  • the intra-frame chroma prediction scheme based on the convolutional neural network provided by the embodiments of the present application can be applied to the video encoding and decoding process.
  • the rate-distortion cost competition can be carried out between the intra-frame chroma prediction method based on convolutional neural network and the traditional chroma prediction method, and the chroma prediction method with the smallest rate-distortion cost can be selected for video Codec.
  • This embodiment will introduce the chroma coding process.
  • FIG. 6 is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of this application.
  • the method may be specifically applied to a video encoder.
  • the method may include the following steps:
  • Step 601 Encode the luminance component to obtain a luminance code stream
  • Step 602 Obtain the coded and reconstructed luminance component, the coded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the to-be-coded chrominance block.
  • the above-mentioned coded or decoded and reconstructed luminance component Y, chrominance components Cb, Cr, and adjacent chrominance information can all be included in the coding block.
  • the aforementioned adjacent chrominance information is specifically represented as adjacent chrominance blocks.
  • Step 603 Determine the target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein, the at least two chrominance prediction methods include the first type of chrominance prediction method and the second type.
  • the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the foregoing first embodiment.
  • the video encoder includes at least two chroma prediction methods, and the at least two chroma prediction methods include a first type of chroma prediction method and a second type of chroma prediction method.
  • the first type of chroma prediction method refers to the intra-frame chroma prediction method based on the convolutional neural network provided by the embodiment of the application
  • the second type of chroma prediction method may refer to the traditional intra-frame chroma prediction method
  • the traditional Intra-frame chroma prediction methods include angle prediction, linear model CCLM, multi-directional linear model MDLM, and so on.
  • the foregoing second-type chrominance prediction method may include one or more traditional intra-frame chrominance prediction methods.
  • the chroma prediction method with the least rate-distortion cost can be determined from a variety of chroma prediction methods.
  • the above-mentioned specific process of determining the target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization may include: separately calculating the rates corresponding to the at least two chrominance prediction methods.
  • Distortion cost Determine the chromaticity prediction method with the least cost-distortion cost as the target chromaticity prediction method.
  • Step 604 Generate the indication information corresponding to the target chromaticity prediction mode through the association relationship between the chromaticity prediction mode and the indication information.
  • the above-mentioned association relationship is established in advance, and the indication information corresponding to each chromaticity prediction method can be determined through the association relationship.
  • the indication information is a binary flag bit value
  • the mapping relationship between each chroma prediction method and the corresponding value is established in advance, and the specific expression is: the flag bit value corresponding to the first chroma prediction method is 00, The value of the number of flag bits corresponding to the second chromaticity prediction method is 01, and so on.
  • the corresponding indication information can be generated according to the content of the corresponding indication information. For example, when the value corresponding to the target chromaticity prediction mode is 1, the value of the binary flag bit is set to 1 to generate the indication information corresponding to the target chromaticity prediction mode.
  • the indication information is used to indicate which chrominance prediction mode is selected for chrominance prediction.
  • the above-mentioned indication information is specifically a flag bit value.
  • the above-mentioned specific process of generating the indication information corresponding to the target chromaticity prediction mode through the association relationship between the chrominance prediction mode and the indication information may include: setting the flag bit through the association relationship between the chrominance prediction mode and the value of the flag bit Is the corresponding value to obtain the indication information corresponding to the target chromaticity prediction mode.
  • the binary flag bit value corresponding to the intra-frame chroma prediction method based on the convolutional neural network in the first embodiment can be set to 1, and the binary flag bit value corresponding to the second type of chroma prediction method can be set Is 0.
  • the value of the binary flag bit is set to 1.
  • the value of the binary flag bit is set to 0.
  • the second type of chrominance prediction method includes multiple traditional chrominance prediction methods
  • two or three binary flags can be used to represent the corresponding chrominance prediction method
  • two binary flags can be used to represent the corresponding chrominance prediction method.
  • the value of the binary flag corresponding to the first traditional chrominance prediction method is 00
  • the value of the binary flag corresponding to the second traditional chrominance prediction method is 01, and so on.
  • Step 605 Perform a subtraction operation on the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is obtained after chrominance prediction is performed through the target chrominance prediction method Chromaticity information.
  • the chrominance information obtained by the above prediction is information obtained by performing chrominance prediction on the chrominance block to be predicted by executing the determined target chrominance prediction method, and the specific process is not repeated here.
  • Step 606 Encode the indication information and the chrominance residual information to obtain a chrominance code stream, which is combined with the luminance code stream to obtain a video code stream.
  • lossless true coding is performed on the indication information, and corresponding residual coding is performed on the chrominance residual information to obtain the output code stream of the video encoder.
  • the luminance component is coded to obtain the luminance code stream; the chrominance coding block to be predicted 71 is input to the video encoder 72, and the chrominance coding block to be predicted includes the coded and reconstructed luminance component and the coded reconstruction.
  • the video encoder executes the traditional intra-frame chrominance prediction method and the intra-frame chrominance prediction method based on convolutional neural network respectively. Through rate-distortion optimization, the rate-distortion cost value of each chrominance prediction method is calculated, and then the rate-distortion code is compared.
  • the chroma prediction block For the value of the value, select the chroma prediction method corresponding to the minimum rate-distortion cost value as the target chroma prediction method; then based on the target chroma prediction method, set the binary flag bit to the corresponding value, and then encode the binary flag bit and predict it
  • the chroma coding block performs residual coding to obtain the chroma code stream 73.
  • the chrominance code stream and the luminance code stream are combined into a video code stream, which is sent to the video decoder for corresponding decoding process.
  • the apparatus may include:
  • the luminance encoding module 81 is used to encode the luminance component to obtain a luminance code stream;
  • the obtaining module 82 is configured to obtain the coded and reconstructed luminance component, the coded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the to-be-coded chrominance block;
  • the second determining module 83 is configured to determine the target chrominance prediction method with the minimum rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein, the at least two chrominance prediction methods include the first type of chrominance prediction Method and the second type of chroma prediction method, the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the foregoing embodiment;
  • the generating module 84 is configured to generate the indication information corresponding to the target chromaticity prediction mode through the association relationship between the chromaticity prediction mode and the indication information;
  • the subtraction module 85 is used to perform a subtraction operation between the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is the chrominance prediction through the target chrominance prediction method Chromaticity information obtained afterwards;
  • the encoding module 86 is configured to encode the indication information and the chrominance residual information to obtain a chrominance code stream, and combine the chrominance code stream and the luminance code stream to obtain a video code stream.
  • the above-mentioned second determining module is specifically configured to: respectively calculate the rate-distortion cost values corresponding to at least two chrominance prediction modes; and determine the chrominance prediction mode with the smallest rate-distortion cost value as the target chrominance prediction mode.
  • the above-mentioned indication information is specifically a flag bit value.
  • the above-mentioned generating module is specifically used to set the flag bit to a corresponding value through the association relationship between the chrominance prediction mode and the value of the flag bit, so as to obtain the indication information corresponding to the target chrominance prediction mode.
  • the embodiment of the present application also provides another preferred embodiment of the intra-frame chrominance prediction device.
  • the intra-frame chrominance prediction device includes a processor, wherein the following program modules used to execute the memory are processed: : Luminance encoding module, used to encode the luminance component to obtain the luminance code stream; acquisition module, used to obtain the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original color corresponding to the chrominance block to be encoded Degree information; a second determination module for determining the target chrominance prediction method with the least rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein the at least two chrominance prediction methods include the first type of color
  • the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the above-mentioned embodiment; the generation module is used to pass the chroma prediction method and the indication information.
  • the correlation relationship of the target chrominance prediction method is generated; the subtraction module is used to subtract the original chrominance information and the predicted chrominance information to obtain the chrominance residual information; among them, the predicted chrominance information
  • the chrominance information is the chrominance information obtained after the chrominance prediction is performed by the target chrominance prediction method; the coding module is used to encode the indication information and the chrominance residual information to obtain the chrominance code stream, and the chrominance code The stream and the luminance code stream are combined to obtain the video code stream.
  • the foregoing intra-frame chrominance prediction device corresponds to the foregoing intra-frame chrominance prediction method one-to-one.
  • the foregoing intra-frame chrominance prediction device corresponds to the foregoing intra-frame chrominance prediction method one-to-one.
  • the rate-distortion cost competition is performed between the traditional intra-frame chrominance prediction method and the intra-frame chrominance prediction method based on the convolutional neural network provided in the embodiment of the application, and an increase is used to indicate which chrominance is selected.
  • the indication information of the prediction mode can further improve the chroma coding performance.
  • this embodiment introduces the video decoding process.
  • the video decoding process in this embodiment corresponds to the video encoding process in the second embodiment above.
  • FIG. 9 is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of this application.
  • the method may be applied to a video decoder.
  • the method may include the following steps:
  • Step 901 Obtain a code stream output by the video encoder.
  • Step 902 Decode the video code stream to obtain decoded and reconstructed luminance components, decoded and reconstructed adjacent chrominance information, and indication information for determining a chrominance prediction mode.
  • the video decoder receives the video code stream output by the video encoder, and then decodes the code stream to obtain corresponding information.
  • the above-mentioned indication information may specifically be a binary flag bit.
  • Step 903 According to the instruction information, determine the target chroma prediction mode from at least two chroma prediction modes, the at least two chroma prediction modes include the first type of chroma prediction mode and the second type of chroma prediction mode, the first type
  • the chroma prediction method is the intra-frame chroma prediction method as in any one of the above-mentioned first embodiment.
  • the selected target chromaticity prediction mode can be determined according to the instruction information.
  • the indication information is specifically the value of the flag bit
  • the specific process of determining the target chroma prediction mode from at least two chroma prediction modes according to the indication information may include: when the bit value of the flag is the first value, the first The second-type chromaticity prediction method is determined as the target chromaticity prediction method; when the flag bit value is the second value, the second-type chromaticity prediction method is determined as the target chromaticity prediction method.
  • the above-mentioned first value may be 1, and correspondingly, the second value is 0; the first value may also be 0, and correspondingly, the second value is 1.
  • Step 904 According to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, perform chrominance prediction on the chrominance component through the target chrominance prediction mode to obtain a chrominance prediction result.
  • the target chromaticity prediction mode can be executed to perform chromaticity prediction, so as to obtain the corresponding chromaticity prediction result.
  • the target chromaticity prediction method is the intra-frame chromaticity prediction method based on the convolutional neural network in the first embodiment, the specific process of chromaticity prediction can be referred to the corresponding content above, which will not be repeated here.
  • Step 905 Perform chroma reconstruction according to the residual and chroma prediction result obtained after decoding the chroma residual information in the bitstream to obtain the output chroma.
  • the video decoder 101 receives the input code stream 102, first decodes the luminance component, and then decodes the binary flag bit to obtain the binary flag bit.
  • the traditional intra-frame chrominance prediction method is selected.
  • the result and the residual decoding result are subjected to chroma reconstruction, and the output chroma 103 is obtained.
  • the apparatus may include:
  • the code stream obtaining module 111 is used to obtain the code stream output by the video encoder
  • the decoding module 112 is configured to decode the video code stream to obtain decoded and reconstructed luminance components, decoded and reconstructed adjacent chrominance information, and indication information for determining a chrominance prediction mode;
  • the first determining module 113 is configured to determine the target chrominance prediction mode from at least two chrominance prediction modes according to the instruction information.
  • the at least two chrominance prediction modes include the first type of chrominance prediction mode and the second type of chrominance prediction mode.
  • Method, the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the foregoing embodiment;
  • the chroma prediction module 114 is configured to perform chroma prediction on the chroma component by the target chroma prediction mode according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chroma information to obtain a chroma prediction result;
  • the chrominance reconstruction module 115 is configured to perform chrominance reconstruction according to the residual and chrominance prediction result obtained after decoding the chrominance residual information in the video bitstream to obtain the output chrominance.
  • the aforementioned indication information is specifically a flag bit value; the aforementioned first determining module is specifically configured to: when the flag bit value is the first value, determine the first type of chromaticity prediction mode as the target chromaticity prediction mode; When the value of the number of flag bits is the second value, the second type of chromaticity prediction mode is determined as the target chromaticity prediction mode.
  • the intra-frame chrominance prediction device includes a processor, wherein the following program modules used to execute the memory are processed: : Code stream acquisition module, used to obtain the code stream output by the video encoder; decoding module, used to decode the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and to determine Indication information of the chrominance prediction mode; a first determining module, configured to determine the target chrominance prediction mode from at least two chrominance prediction modes according to the indication information, the at least two chrominance prediction modes including the first type of chrominance prediction mode And the second type of chroma prediction method, the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the above embodiment; the chroma prediction module is used to reconstruct the decoded luminance component and the decoded reconstruction The adjacent
  • the foregoing intra-frame chrominance prediction apparatus corresponds to the intra-frame chrominance prediction method in the foregoing embodiment one-to-one.
  • the foregoing intra-frame chrominance prediction apparatus corresponds to the intra-frame chrominance prediction method in the foregoing embodiment one-to-one.
  • the rate-distortion cost competition is performed between the traditional intra-frame chrominance prediction method and the intra-frame chrominance prediction method based on the convolutional neural network provided in the embodiment of the application, and an increase is used to indicate which chrominance is selected.
  • the indication information of the prediction mode can further improve the chroma coding performance.
  • FIG. 12 is a schematic block diagram of a structure of a video encoding and decoding system provided by an embodiment of this application.
  • the system may include a video encoder 121 and a video decoder 122.
  • the system also includes an encoding transmission sub-system 123 for transmitting the code stream, which is between the video encoder and the video decoder, and is used to transmit the code stream output by the video encoder to the video decoder. .
  • the interaction process of the intra-frame chrominance prediction system may include the following steps:
  • Step 1301 The video encoder encodes the luminance component to obtain a luminance code stream.
  • Step 1302 Obtain the coded and reconstructed luminance component and the coded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be coded.
  • Step 1303 The video encoder determines the target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein, the at least two chrominance prediction methods include the first type of chrominance prediction method and The second type of chroma prediction method, the first type of chroma prediction method is the intra-frame chroma prediction method according to any one of the above-mentioned first aspects.
  • Step 1304 The video encoder generates the indication information of the target chrominance prediction mode through the association relationship between the chrominance prediction mode and the indication information.
  • Step 1305 The video encoder performs a subtraction operation on the original chrominance information and the predicted chrominance information to obtain chrominance residual information.
  • Step 1306 The video encoder encodes the indication information and the chrominance residual information to obtain a chrominance code stream, which is combined with the luminance code stream to obtain a video code stream.
  • Step 1307 The video decoder obtains the video code stream output by the video encoder.
  • Step 1308 The video decoder decodes the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information.
  • Step 1309 The video decoder determines the target chrominance prediction mode from at least two chrominance prediction modes according to the instruction information.
  • Step 1310 According to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, the video decoder performs chrominance prediction on the chrominance component through the target chrominance prediction mode to obtain a chrominance prediction result.
  • Step 1311 The video decoder performs chroma reconstruction based on the residual and chroma prediction result obtained after decoding the chroma residual information in the bitstream, to obtain the output chroma.
  • FIG. 14 is a schematic structural diagram of a terminal device provided by an embodiment of this application.
  • the terminal device 14 of this embodiment includes: at least one processor 140, a memory 141, and a computer program 142 that is stored in the memory 141 and can run on the at least one processor 140.
  • the processor 140 executes the computer program 142, the steps in any embodiment of the intra-frame chrominance prediction method in the first embodiment are implemented.
  • the terminal device 14 may be a computing device such as a desktop computer, a notebook, or a palmtop computer.
  • the terminal device may include, but is not limited to, a processor 140 and a memory 141.
  • FIG. 14 is only an example of the terminal device 14 and does not constitute a limitation on the terminal device 14. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input and output devices, network access devices, and so on.
  • the so-called processor 140 may be a central processing unit (Central Processing Unit, CPU), and the processor 140 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 141 may be an internal storage unit of the terminal device 14 in some embodiments, such as a hard disk or a memory of the terminal device 14. In other embodiments, the memory 141 may also be an external storage device of the terminal device 14, such as a plug-in hard disk equipped on the terminal device 14, a smart media card (SMC), a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc. Further, the memory 141 may also include both an internal storage unit of the terminal device 14 and an external storage device.
  • the memory 141 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 141 can also be used to temporarily store data that has been output or will be output.
  • FIG. 15 is a schematic structural diagram of a video encoder provided by an embodiment of this application.
  • the video encoder 15 of this embodiment includes: at least one processor 150, a memory 151, and a computer program 152 that is stored in the memory 151 and can run on the at least one processor 150, so When the processor 150 executes the computer program 152, the steps in any embodiment of the intra-frame chrominance prediction method in the second embodiment are implemented.
  • the video encoder may include, but is not limited to, a processor 150 and a memory 151.
  • FIG. 15 is only an example of the video encoder 15 and does not constitute a limitation on the video encoder 15. It may include more or less components than shown in the figure, or a combination of certain components, or different components.
  • the components of, for example, can also include input and output devices, network access devices, and so on.
  • the so-called processor 150 may be a central processing unit (Central Processing Unit, CPU), and the processor 150 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 151 may be an internal storage unit of the video encoder 15 in some embodiments, such as a hard disk or a memory of the video encoder 15. In other embodiments, the memory 151 may also be an external storage device of the video encoder 15, such as a plug-in hard disk or a smart media card (SMC) equipped on the video encoder 15, Secure Digital (SD) card, Flash Card, etc. Further, the memory 151 may also include both an internal storage unit of the video encoder 15 and an external storage device.
  • the memory 151 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 151 can also be used to temporarily store data that has been output or will be output.
  • FIG. 16 is a schematic structural diagram of a video decoder provided by an embodiment of this application.
  • the video decoder 16 of this embodiment includes: at least one processor 160, a memory 161, and a computer program 162 that is stored in the memory 161 and can run on the at least one processor 160, so When the processor 160 executes the computer program 162, the steps in the embodiment of any intra-frame chrominance prediction method in the third embodiment are implemented.
  • the video decoder may include, but is not limited to, a processor 160 and a memory 161.
  • FIG. 16 is only an example of the video decoder 16 and does not constitute a limitation on the video decoder 16. It may include more or less components than those shown in the figure, or combine certain components, or be different. The components of, for example, can also include input and output devices, network access devices, and so on.
  • the so-called processor 160 may be a central processing unit (Central Processing Unit, CPU), and the processor 160 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 161 may be an internal storage unit of the video decoder 16 in some embodiments, such as a hard disk or a memory of the video decoder 16. In other embodiments, the memory 161 may also be an external storage device of the video decoder 16, for example, a plug-in hard disk or a smart memory card (Smart Media Card, SMC) equipped on the video decoder 16, Secure Digital (SD) card, Flash Card, etc. Further, the memory 161 may also include both an internal storage unit of the video decoder 16 and an external storage device.
  • the memory 161 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 161 can also be used to temporarily store data that has been output or will be output.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program. Intra-frame chroma prediction method.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product runs on a terminal device or a video encoder or a video decoder
  • the terminal device or a video encoder or a video decoder will correspondingly execute the above-mentioned embodiment one or The intra-frame chroma prediction method of any one of Embodiment 2 or Embodiment 3.

Landscapes

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

Abstract

Disclosed in the embodiments of the present application are an intra-frame chroma prediction method and apparatus, a system, a terminal device, a video encoder, a video decoder and a computer-readable storage medium. Said method comprises: acquiring encoded or decoded reconstructed luminance components; down-sampling the encoded or decoded reconstructed luminance components; inputting preset parameters into an image coloring sub-network in a pre-trained chroma prediction convolutional neural network model, so as to obtain chroma components output by the image coloring sub-network, the preset parameters comprising down-sampled encoded or decoded reconstructed luminance components, or comprising down-sampled encoded or decoded reconstructed luminance components and target parameters, and the target parameters comprising at least one of encoding distortions and encoded or decoded reconstructed adjacent chroma blocks; and obtaining a chroma prediction result according to the chroma components. The intra-frame chroma prediction solution based on a convolutional neural network provided by the embodiments of the present application has high universality, and can save code rate.

Description

帧内色度预测方法、装置、设备及视频编解码系统Intra-frame chrominance prediction method, device, equipment and video coding and decoding system 技术领域Technical field
本申请属于视频编码技术领域,尤其涉及一种帧内色度预测方法、装置、视频编解码系统、终端设备、视频编码器、视频解码器及计算机可读存储介质。This application belongs to the field of video coding technology, and in particular relates to an intra-frame chrominance prediction method, device, video coding and decoding system, terminal equipment, video encoder, video decoder, and computer-readable storage medium.
背景技术Background technique
视频编码过程主要包括预测、变换量化以及熵编码等模块,预测有可以分为帧内预测和帧间预测,帧内预测又可以包括帧内色度预测和帧内亮度预测。The video coding process mainly includes modules such as prediction, transform quantization, and entropy coding. Prediction can be divided into intra-frame prediction and inter-frame prediction, and intra-frame prediction can include intra-frame chroma prediction and intra-frame luminance prediction.
目前,在新一代视频编码标准多功能视频编码(Versatile Video Coding,VVC)中,为了消除YCbCr颜色空间中的冗余信息,一般是利用编码块中亮度分量和色度分量之间的线性相关性,采用相应的线性预测模型CCLM(Based Cross-component Linear Model Chroma Intra-prediction for Video Coding)或者多模型线性预测模型MMLM(Multi-model Based Cross-component Linear Model Chroma Intra-prediction for Video Coding,MM-CCLM)进行帧内色度预测。但是,现有帧内色度预测方式无法适用于所有情况,需要耗费较多的码率。At present, in the new generation of video coding standard Versatile Video Coding (VVC), in order to eliminate redundant information in the YCbCr color space, the linear correlation between the luminance component and the chrominance component in the coding block is generally used , Adopt the corresponding linear prediction model CCLM (Based Cross-component Linear Model Chroma Intra-prediction for Video Coding) or multi-model linear prediction model MMLM (Multi-model Based Cross-component Linear Model Chroma Intra-prediction for Video Coding, MM- CCLM) performs intra-frame chroma prediction. However, the existing intra-frame chrominance prediction method cannot be applied to all situations and requires a lot of bit rate.
技术问题technical problem
本申请实施例在于提供一种帧内色度预测方法、系统、终端设备及器件,旨在解决现有帧内色度预测方式的普适性较低,且需要耗费较多码率的问题。The embodiment of the present application is to provide an intra-frame chrominance prediction method, system, terminal equipment, and device, aiming to solve the problem that the existing intra-frame chrominance prediction method has low universality and requires more code rate.
技术解决方案Technical solutions
第一方面,本申请实施例提供一种帧内色度预测方法,包括:In the first aspect, an embodiment of the present application provides an intra-frame chroma prediction method, including:
获取已编码或已解码重建的亮度分量;对所述已编码或已解码重建的亮度分量进行下采样;将预设参量输入至预训练的色度预测卷积神经网络模型中的图像上色子网络,得到所述图像上色子网络输出的色度分量;其中,所述预设参量包括下采样后的已编码或已解码重建的亮度分量,或者包括下采样后的已编码或已解码重建的亮度分量和目标参量,所述目标参量包括编码失真度和已编码或已解码重建的相邻色度块中的至少一种;从所述色度分量裁剪出目标色度分量块,所述目标色度分量块为最终的色度预测结果。Obtain the encoded or decoded and reconstructed luminance component; down-sampling the encoded or decoded and reconstructed luminance component; input the preset parameters into the pre-trained chrominance prediction convolutional neural network model of the image on the color Network to obtain the chrominance components output by the color sub-network on the image; wherein, the preset parameters include down-sampled encoded or decoded reconstructed luminance components, or down-sampled encoded or decoded reconstructions The target parameter includes at least one of the encoding distortion and the adjacent chrominance block that has been encoded or decoded; the target chrominance component block is cut out from the chrominance component, and the target chrominance component block is cut out from the chrominance component. The target chrominance component block is the final chrominance prediction result.
第二方面,本申请实施例提供一种帧内色度预测方法,应用于视频编码器,所述方法包括:In a second aspect, an embodiment of the present application provides an intra-frame chrominance prediction method, which is applied to a video encoder, and the method includes:
对亮度分量进行编码,得到亮度码流;获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求 1至3任一项所述的帧内色度预测方法;通过色度预测方式和指示信息之间的关联关系,生成所述目标色度预测方式对应的指示信息;将所述原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,所述预测得到的色度信息为通过所述目标色度预测方式进行色度预测后得出的色度信息;对所述指示信息和所述色度残差信息进行编码,得到色度码流,并将所述色度码流与所述亮度码流合并得到视频码流。Encode the luminance component to obtain the luminance code stream; obtain the encoded and reconstructed luminance component, the adjacent chrominance information that has been encoded and reconstructed, and the original chrominance information corresponding to the chrominance block to be encoded; The target chrominance prediction method with the smallest rate-distortion cost is determined in the degree prediction method; wherein the at least two chrominance prediction methods include a first type of chrominance prediction method and a second type of chrominance prediction method, and the first type The chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the indicator information corresponding to the target chrominance prediction method is generated through the association relationship between the chrominance prediction method and the indicator information The original chrominance information and the predicted chrominance information are subtracted to obtain chrominance residual information; wherein the predicted chrominance information is chrominance prediction by the target chrominance prediction method The chrominance information obtained later; encoding the indication information and the chrominance residual information to obtain a chrominance code stream, and combining the chrominance code stream and the luminance code stream to obtain a video code stream.
第三方面,本申请实施例提供一种帧内色度预测方法,应用于视频解码器,所述方法包括:In a third aspect, an embodiment of the present application provides an intra-frame chrominance prediction method, which is applied to a video decoder, and the method includes:
获取视频编码器输出的视频码流;对所述视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和用于确定色度预测方式的指示信息;根据所述指示信息,从至少两种色度预测方式中确定目标色度预测方式,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求1至3任一项所述的帧内色度预测方法;根据所述已解码重建的亮度分量和所述已解码重建的相邻色度信息,通过所述目标色度预测方式对色度分量进行色度预测,得到色度预测结果;根据对所述视频码流中的色度残差信息进行解码后得到的残差和所述色度预测结果进行色度重建,得到输出色度。Obtain the video code stream output by the video encoder; decode the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information for determining the chrominance prediction mode; The indication information determines the target chroma prediction mode from at least two chroma prediction modes, the at least two chroma prediction modes including a first type of chroma prediction mode and a second type of chroma prediction mode, the first The chrominance-like prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, through the The target chroma prediction method performs chroma prediction on the chroma components to obtain a chroma prediction result; performs color based on the residual obtained after decoding the chroma residual information in the video bitstream and the chroma prediction result. Reconstruction to get the output chromaticity.
第四方面,本申请实施例提供一种帧内色度预测方法,包括:In a fourth aspect, an embodiment of the present application provides an intra-frame chroma prediction method, including:
视频编码器对亮度分量进行编码,得到亮度码流;获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求1至3任一项所述的帧内色度预测方法;通过色度预测方式和指示信息之间的关联关系,生成所述目标色度预测方式的指示信息;将所述原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,所述预测得到的色度信息为通过所述目标色度预测方式进行色度预测后得出的色度信息;对所述指示信息和所述色度残差进行编码得到色度码流,并将所述色度码流与所述亮度码流合并得到视频码流;The video encoder encodes the luminance component to obtain the luminance code stream; obtains the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be encoded; Determine the target chrominance prediction method with the smallest rate-distortion cost among the two chrominance prediction methods; wherein, the at least two chrominance prediction methods include a first-type chrominance prediction method and a second-type chrominance prediction method. The first type of chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the target chrominance prediction method is generated through the association relationship between the chrominance prediction method and the indication information Indication information; subtracting the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is the color of the target chrominance prediction mode Chrominance information obtained after degree prediction; encoding the indication information and the chrominance residual error to obtain a chrominance code stream, and combining the chrominance code stream and the luminance code stream to obtain a video code stream;
视频解码器获取所述视频码流;对所述视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和所述指示信息;根据所述指示信息,从所述至少两种色度预测方式中确定所述目标色度预测方式;根据所述已解码重建的亮度分量和所述已解码重建的相邻色度信息,通过所述目标色度预测方式对色度分量进行色度预测,得到色度预测结果;根据对所述视频码流中的色度残差信息进行解码后得到的残差和所述色度预测结果进行色度重建,得到输出色度。The video decoder obtains the video code stream; decodes the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information; The target chrominance prediction mode is determined in the at least two chrominance prediction modes; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, the target chrominance prediction mode The chrominance component performs chrominance prediction to obtain the chrominance prediction result; the chrominance reconstruction is performed according to the residual error obtained after decoding the chrominance residual information in the video bitstream and the chrominance prediction result to obtain the output chrominance .
第五方面,本申请实施例提供一种视频编解码系统,包括视频编码器和视频解码器;In a fifth aspect, an embodiment of the present application provides a video encoding and decoding system, including a video encoder and a video decoder;
所述视频编码器用于对亮度分量进行编码,得到亮度码流;获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求1至3任一项所述的帧内色度预测方法;通过色度预测方式和指示信息之间的关联关系,生成所述目标色度预测方式的指示信息;将所述原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,所述预测得到的色度信息为通过所述目标色度预测方式进行色度预测后得出的色度信息;对所述指示信息和所述色度残差进行编码得到色度码流,并将所述色度码流与亮度码流合并得到视频码流;The video encoder is used to encode the luminance component to obtain the luminance code stream; obtain the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be encoded; pass rate distortion Optimizing the determination of a target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods; wherein the at least two chrominance prediction methods include a first-type chrominance prediction method and a second-type chrominance prediction method The first type of chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the target chrominance is generated through the association relationship between the chrominance prediction method and the indication information Indication information of the prediction mode; subtracting the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is predicted by the target chrominance The chrominance information obtained after chrominance prediction is performed in a manner; the indication information and the chrominance residual are encoded to obtain a chrominance code stream, and the chrominance code stream and the luminance code stream are combined to obtain a video code stream ;
所述视频解码器用于获取所述视频码流;对所述视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和所述指示信息;根据所述指示信息,从所述至少两种色度预测方式中确定所述目标色度预测方式;根据所述已解码重建的亮度分量和所述已解码重建的相邻色度信息,通过所述目标色度预测方式对色度分量进行色度预测,得到色度预测结果;根据对所述视频码流中的色度残差信息进行解码后得到的残差和所述色度预测结果进行色度重建,得到输出色度。The video decoder is used to obtain the video code stream; decode the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information; according to the indication information , Determining the target chrominance prediction mode from the at least two chrominance prediction modes; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, predict the target chrominance The chrominance component is predicted by the chrominance component to obtain the chrominance prediction result; the chrominance reconstruction is performed according to the residual error obtained after decoding the chrominance residual information in the video bitstream and the chrominance prediction result to obtain Output chromaticity.
第六方面,本申请实施例提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第一方面任一项所述的帧内色度预测方法。In a sixth aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program that is stored in the memory and can run on the processor. The processor executes the computer program when the computer program is executed. The intra-frame chroma prediction method according to any one of the above-mentioned first aspects.
第七方面,本申请实施例提供一种视频编码器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第二方面任一项所述的帧内色度预测方法。In a seventh aspect, an embodiment of the present application provides a video encoder, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, The intra-frame chrominance prediction method according to any one of the above-mentioned second aspects is implemented.
第八方面,本申请实施例提供一种视频解码器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第三方面任一项所述的帧内色度预测方法。In an eighth aspect, an embodiment of the present application provides a video decoder, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, The intra-frame chrominance prediction method according to any one of the above-mentioned third aspects is implemented.
第九方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面或第二方面或第三方面任一项所述的帧内色度预测方法。In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, implements the first aspect or the second aspect or the first aspect described above. The intra-frame chroma prediction method according to any one of the three aspects.
第十方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在终端设备或视频编码器或视频解码器上运行时,使得终端设备或视频编码器或视频解码器相应执行上述第一方面或第二方面或第三方面中任一项所述的帧内色度预测方法。In a tenth aspect, the embodiments of the present application provide a computer program product. When the computer program product runs on a terminal device or a video encoder or a video decoder, the terminal device or a video encoder or a video decoder can execute the above-mentioned first Aspect or the intra-frame chroma prediction method according to any one of the second aspect or the third aspect.
有益效果Beneficial effect
本申请实施例通过色度预测卷积神经网络模型中的图像上色子网络和输入的相应参量 进行色度预测,即将色度预测问题模型化为图像上色问题,普适性较高。另外,基于图像上色子网络进行色度预测可以节省码率。In the embodiment of the application, the chromaticity prediction is performed through the image color sub-network in the chromaticity prediction convolutional neural network model and the corresponding input parameters, that is, the chromaticity prediction problem is modeled as an image coloring problem, which has high universality. In addition, the chroma prediction based on the color sub-network of the image can save the bit rate.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only of the present application. For some embodiments, those of ordinary skill in the art can obtain other drawings based on these drawings without creative labor.
图1为本申请实施例提供的一种帧内色度预测方法的流程示意框图;FIG. 1 is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of the application;
图2为本申请实施例提供的相邻色度块重构过程的流程示意框图;FIG. 2 is a schematic block diagram of the process of reconstructing adjacent chrominance blocks according to an embodiment of the application;
图3为本申请实施例提供的相邻色度块重构过程示意图;FIG. 3 is a schematic diagram of a reconstruction process of adjacent chrominance blocks provided by an embodiment of this application;
图4为本申请实施例提供的基于卷积神经网络的帧内色度预测方法的示意图;4 is a schematic diagram of an intra-frame chroma prediction method based on a convolutional neural network provided by an embodiment of the application;
图5为本申请实施例提供的一种帧内色度预测装置的结构示意框图;FIG. 5 is a schematic block diagram of the structure of an intra-frame chrominance prediction apparatus provided by an embodiment of the application;
图6为本申请实施例提供的一种帧内色度预测方法的流程示意框图;6 is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of the application;
图7为本申请实施例提供的视频编码器的编码过程示意图;FIG. 7 is a schematic diagram of an encoding process of a video encoder provided by an embodiment of the application;
图8为本申请实施例提供的一种帧内色度预测装置的结构示意框图;FIG. 8 is a schematic block diagram of the structure of an intra-frame chrominance prediction apparatus provided by an embodiment of the application;
图9为本申请实施例提供的一种帧内色度预测方法的流程示意框图;9 is a schematic block diagram of the flow of an intra-frame chroma prediction method provided by an embodiment of the application;
图10为本申请实施例提供的视频解码器的解码过程示意图;FIG. 10 is a schematic diagram of a decoding process of a video decoder provided by an embodiment of the application;
图11为本申请实施例提供的一种帧内色度预测装置的结构示意框图;FIG. 11 is a schematic block diagram of the structure of an intra-frame chrominance prediction apparatus provided by an embodiment of this application;
图12为本申请实施例提供的一种视频编解码系统的结构示意框图;FIG. 12 is a schematic block diagram of the structure of a video encoding and decoding system provided by an embodiment of this application;
图13为本申请实施例提供的视频编码器和视频解码器之间的交互示意图;FIG. 13 is a schematic diagram of interaction between a video encoder and a video decoder provided by an embodiment of the application;
图14为本申请实施例提供的终端设备的结构示意图;FIG. 14 is a schematic structural diagram of a terminal device provided by an embodiment of the application;
图15为本申请实施例提供的视频编码器的结构示意图;FIG. 15 is a schematic structural diagram of a video encoder provided by an embodiment of the application;
图16为本申请实施例提供的视频解码器的结构示意图。FIG. 16 is a schematic structural diagram of a video decoder provided by an embodiment of the application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. In order to illustrate the technical solution described in the present application, specific embodiments are used for description below.
实施例一Example one
请参见图1,为本申请实施例提供的一种帧内色度预测方法的流程示意框图,该方法可以包括以下步骤:Please refer to FIG. 1, which is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of this application. The method may include the following steps:
步骤101、获取已编码或已解码重建的亮度分量。Step 101: Obtain an encoded or decoded and reconstructed luminance component.
需要说明的是,上述已编码或已解码重建的亮度分量可以是任意颜色空间、任意视频 格式对应的亮度分量,即本申请实施例提供的帧内色度预测方法可以应用于任意颜色空间和任意视频格式。例如,上述已编码或已解码重建的亮度分量为YCbCr 4:2:0格式下的亮度分量Y。It should be noted that the above-mentioned encoded or decoded and reconstructed luminance component can be the luminance component corresponding to any color space and any video format, that is, the intra-frame chrominance prediction method provided by the embodiment of this application can be applied to any color space and any video format. Video format. For example, the above-mentioned encoded or decoded and reconstructed luminance component is the luminance component Y in the YCbCr 4:2:0 format.
步骤102、对已编码或已解码重建的亮度分量进行下采样。Step 102: Down-sampling the encoded or decoded and reconstructed luminance components.
需要说明的是,上述下采样的方式可以是现有技术中的任意一种下采样方式,也可以通过卷积神经网络进行亮度下采样。It should be noted that the above-mentioned down-sampling method may be any down-sampling method in the prior art, or brightness down-sampling may be performed through a convolutional neural network.
在一些实施例中,上述色度预测卷积神经网络模型还可以包括亮度下采样子网络。此时,上述对已编码或已解码重建的亮度分量进行下采样的具体过程可以包括:通过亮度下采样子网络,对已编码或解码重建的亮度分量进行下采样。In some embodiments, the aforementioned chrominance prediction convolutional neural network model may further include a luminance down-sampling sub-network. At this time, the foregoing specific process of down-sampling the encoded or decoded and reconstructed luminance component may include: down-sampling the encoded or decoded and reconstructed luminance component through the luminance down-sampling sub-network.
其中,上述色度预测卷积神经网络模型除了包括下文的图像上色子网络之外,还可以包括亮度下采样子网络。通过该亮度下采样子网络可以将输入的已编码或已解码重建的亮度分量进行下采样,得到下采样后的已编码或已解码重建的亮度分量。例如,将4N×4N的已编码或已解码重建的亮度分量输入至亮度下采样子网络,经过亮度下采样子网络下采样后,输出2N×2N的已编码或已解码重建的亮度分量,其中,N为64。Wherein, the above-mentioned chrominance prediction convolutional neural network model may include a luminance down-sampling sub-network in addition to the following image color sub-network. Through the brightness down-sampling sub-network, the input coded or decoded and reconstructed brightness components can be down-sampled to obtain the down-sampled coded or decoded and reconstructed brightness components. For example, the 4N×4N encoded or decoded and reconstructed luminance component is input to the luminance down-sampling sub-network, and after the luminance down-sampling sub-network is down-sampled, the 2N×2N encoded or decoded and reconstructed luminance component is output, where , N is 64.
另外,亮度下采样子网络的输出层可以包括一个或多个核函数,即亮度下采样网络可以输出一个或多个下采样结果,一个下采样结果对应一个下采样后的已编码或已解码重建的亮度分量。相较于一个下采样结果,通过多个下采样结果进行色度预测可以进一步提高色度预测性能。In addition, the output layer of the luminance down-sampling sub-network can include one or more kernel functions, that is, the luminance down-sampling network can output one or more down-sampling results, and one down-sampling result corresponds to a down-sampling encoded or decoded reconstruction The brightness component. Compared with one down-sampling result, chroma prediction through multiple down-sampling results can further improve the chroma prediction performance.
上述亮度下采样子网络可以具体为卷积神经网络,当颜色空间和视频格式为YCbCr 4:2:0格式,该亮度下采样子网络的超参数和结构可以具体如下表1所示。The above-mentioned brightness down-sampling sub-network can be specifically a convolutional neural network. When the color space and video format are in the YCbCr 4:2:0 format, the hyper-parameters and structure of the brightness down-sampling sub-network can be specifically shown in Table 1 below.
表1Table 1
Figure PCTCN2019103800-appb-000001
Figure PCTCN2019103800-appb-000001
需要说明的是,上述表1示出的亮度下采样子网络的结构和超参数仅仅是一种示意。在具体应用中,可以根据实际需要对亮度下采样子网络中的超参数和结构进行调整。例如,当颜色空间和视频格式为YCbCr 4:4:4时,亮度下采样子网络中的第二层步幅设置为1, 当颜色空间和视频格式为YCbCr 4:2:2时,亮度下采样子网络只能在垂直或水平方向上执行。It should be noted that the structure and hyper-parameters of the brightness down-sampling sub-network shown in Table 1 above are merely illustrative. In specific applications, the hyperparameters and structure in the brightness down-sampling sub-network can be adjusted according to actual needs. For example, when the color space and video format are YCbCr 4:4:4, the second layer stride in the brightness downsampling sub-network is set to 1. When the color space and video format are YCbCr 4:2:2, the brightness is down The sampling sub-network can only be executed in the vertical or horizontal direction.
值得指出的是,相较于普通的下采样方式,通过上述亮度下采样子网络进行下采样,可以获得较多的亮度信息,以进一步提高后续色度预测的性能。It is worth noting that, compared with the ordinary down-sampling method, by performing down-sampling through the above-mentioned luminance down-sampling sub-network, more luminance information can be obtained, so as to further improve the performance of subsequent chrominance prediction.
步骤103、将预设参量输入至预训练的色度预测卷积神经网络模型中的图像上色子网络,得到图像上色子网络输出的色度分量;Step 103: Input the preset parameters into the image coloring sub-network in the pre-trained chroma prediction convolutional neural network model to obtain the chroma components output by the image coloring sub-network;
其中,预设参量包括下采样后的已编码或已解码重建的亮度分量,或者包括下采样后的已编码或已解码重建的亮度分量和目标参量,目标参量包括编码失真度和已编码或已解码重建的相邻色度块中的至少一种。Among them, the preset parameters include down-sampled encoded or decoded and reconstructed luminance components, or down-sampled encoded or decoded and reconstructed luminance components and target parameters. The target parameters include encoding distortion and encoded or decoded At least one of the reconstructed adjacent chrominance blocks is decoded.
需要说明的是,上述预设参量可以只包括下采样后的已编码或已解码重建的亮度分量,可以包括下采样后的已编码或已解码重建的亮度分量和编码失真度,可以包括下采样后的已编码或已解码重建的亮度分量和相邻色度块,也可以包括下采样后的已编码或已解码重建的亮度分量、编码失真度和已编码或已解码重建的相邻色度块。It should be noted that the above-mentioned preset parameters may only include down-sampled encoded or decoded and reconstructed luminance components, may include down-sampled encoded or decoded and reconstructed luminance components and encoding distortion, and may include down-sampling. The subsequent coded or decoded and reconstructed luminance component and adjacent chrominance blocks may also include the down-sampled coded or decoded and reconstructed luminance component, coding distortion, and the coded or decoded and reconstructed adjacent chrominance Piece.
其中,已编码或已解码重建的相邻色度块可以提高图像上色网络的色度预测性能和网络模型训练速度,而编码失真度可以消除压缩失真带来的负面影响。基于此,当预设参量同时包括下采样后的已编码或已解码重建的亮度分量、编码失真度和相邻色度块时,图像上色网络的性能最佳,即帧内色度预测性能最好;当预设参量包括下采样后的已编码或已解码重建的亮度分量和编码失真度,或者包括下采样后的已编码或已解码重建的亮度分量和已编码或已解码重建的相邻色度块时,图像上色网络的性能次之;而当预设参量只包括下采样后的已编码或已解码重建的亮度分量时,图像上色网络的性能最差,即帧内色度预测性能最差。Among them, the adjacent chrominance blocks that have been coded or decoded and reconstructed can improve the chroma prediction performance of the image coloring network and the training speed of the network model, and the coding distortion can eliminate the negative impact of compression distortion. Based on this, when the preset parameters include down-sampled coded or decoded and reconstructed luminance components, coding distortion, and adjacent chroma blocks, the performance of the image coloring network is the best, that is, the intra-frame chroma prediction performance Preferably; when the preset parameters include the down-sampling coded or decoded and reconstructed luminance component and coding distortion, or the down-sampled coded or decoded reconstructed luminance component and the coded or decoded reconstructed phase When adjacent to chrominance blocks, the performance of the image coloring network is second; when the preset parameters only include down-sampled encoded or decoded and reconstructed luminance components, the performance of the image coloring network is the worst, that is, the intra-frame color Degree prediction performance is the worst.
应理解的是,即使预设参量只包括下采样后的已编码或已解码重建的亮度分量,通过图像上色网络仍然能得出色度预测结果,即仍然能实现本申请实施例的目的。It should be understood that even if the preset parameters only include the down-sampled encoded or decoded and reconstructed luminance components, the color prediction results can still be obtained through the image coloring network, that is, the objectives of the embodiments of the present application can still be achieved.
值得指出的是,上述编码失真度可以具体表现为以量化参数为特征的图像块。其中,编码失真度的数值可以为0~51中的任意一个数值。例如,编码失真度的数值为10,编码失真度具体为2N×2N的图像块,该图像块内每一个像素点的数值均为10。It is worth noting that the aforementioned encoding distortion degree can be specifically expressed as an image block characterized by a quantization parameter. Wherein, the value of the encoding distortion degree can be any value from 0 to 51. For example, the coding distortion degree is 10, and the coding distortion degree is specifically a 2N×2N image block, and the value of each pixel in the image block is 10.
上述相邻色度块是指包括相邻色度信息的图像块,该相邻色度块是预先重构好的。在一些实施例中,当上述预设参量包括已编码或已解码重建的相邻色度块时,参见图2示出的相邻色度块重构过程的流程示意框图,上述帧内色度预测方法还可以包括:The aforementioned adjacent chrominance block refers to an image block that includes adjacent chrominance information, and the adjacent chrominance block is reconstructed in advance. In some embodiments, when the above-mentioned preset parameters include adjacent chrominance blocks that have been encoded or decoded and reconstructed, referring to the schematic block diagram of the flow of the adjacent chrominance block reconstruction process shown in FIG. 2, the above-mentioned intra-frame chrominance Forecasting methods can also include:
步骤201、从已编码或已解码重建的亮度分量中裁剪出目标亮度分量块。Step 201: Cut out the target brightness component block from the coded or decoded and reconstructed brightness component.
需要说明的是,上述目标亮度分量块一般是指位于已编码或已解码重建的亮度分量右下方的亮度分量块。例如,已编码或已解码重建的亮度分量为4N×4N的亮度块,将4N×4N 的亮度分量块划分为4个2N×2N的亮度分量块,右下方2N×2N的亮度分量块即为目标亮度分量块。It should be noted that the aforementioned target luminance component block generally refers to the luminance component block located at the lower right of the encoded or decoded and reconstructed luminance component. For example, the coded or decoded and reconstructed luminance component is a 4N×4N luminance block, and the 4N×4N luminance component block is divided into 4 2N×2N luminance component blocks, and the 2N×2N luminance component block at the bottom right is Target luminance component block.
步骤202、通过预设色度预测方式对目标亮度分量块进行色度预测,得到预测的色度。Step 202: Perform chroma prediction on the target luminance component block by using a preset chroma prediction mode to obtain a predicted chroma.
需要说明的是,上述预设色度预测方式可以具体为现有技术中的任意一种色度预测方式,例如,线性预测模型CCLM或多方向线性模型MDLM。利用传统的线性色度预测模型,对目标亮度分量块进行色度预测,得到预测的色度Cb和Cr。It should be noted that the above-mentioned preset chromaticity prediction method can be specifically any chromaticity prediction method in the prior art, for example, a linear prediction model CCLM or a multi-directional linear model MDLM. The traditional linear chrominance prediction model is used to predict the chrominance of the target luminance component block to obtain the predicted chrominance Cb and Cr.
步骤203、将预测的色度作为待预测色度块的初始色度信息。Step 203: Use the predicted chrominance as the initial chrominance information of the chrominance block to be predicted.
为了更好地介绍上述相邻色度块重构过程,下面将结合图3示出的相邻色度块重构过程示意图进行介绍。In order to better introduce the foregoing adjacent chrominance block reconstruction process, the following will be introduced in conjunction with the schematic diagram of the adjacent chrominance block reconstruction process shown in FIG. 3.
如图3所述,已编码或已解码重建的亮度分量31的大小为4N×4N,该亮度分量包括大小为2N×2N、编码分别为1、2、3、4的亮度分量块,其中,亮度分量块1位于左上方,亮度分量块2位于右上方,亮度分量块3位于左下方,亮度分量块4位于右下方。通过裁剪可以得到亮度分量块32,然后将2N×2N的亮度分量块32输入线性预测模型CCLM,得到预测的色度Cb和Cr 34,再将N×N的色度块Cb和Cr分别填入至相应色度块35的空缺部分,即色度块Cb和Cr分别填充至图3中的问号位置,以作为待预测色度块2N×2N的初始色度信息。As shown in Fig. 3, the size of the coded or decoded and reconstructed brightness component 31 is 4N×4N, and the brightness component includes brightness component blocks of size 2N×2N and codes 1, 2, 3, and 4 respectively, where, Luminance component block 1 is located at the upper left, luminance component block 2 is located at the upper right, luminance component block 3 is located at the lower left, and luminance component block 4 is located at the lower right. The luminance component block 32 can be obtained by cropping, and then the 2N×2N luminance component block 32 is input into the linear prediction model CCLM to obtain the predicted chrominance Cb and Cr 34, and then the N×N chrominance block Cb and Cr are respectively filled in The vacant parts to the corresponding chrominance block 35, that is, the chrominance blocks Cb and Cr are respectively filled to the position of the question mark in FIG. 3, as the initial chrominance information of the 2N×2N chrominance block to be predicted.
需要说明的是,上述图像上色子网络的输入为灰度图,输出为对应的彩色图。在本申请实施例中,将色度预测问题模型化为图像上色问题,即通过图像上色达到帧内色度预测的目的。It should be noted that the input of the above-mentioned image coloring sub-network is a grayscale image, and the output is a corresponding color image. In the embodiment of the present application, the chromaticity prediction problem is modeled as an image coloring problem, that is, the purpose of intra-frame chromaticity prediction is achieved through image coloring.
作为示例而非限定,上述图像上色子网络的结构和超参数可以如下表2所示。As an example and not a limitation, the structure and hyperparameters of the above-mentioned image color sub-network may be shown in Table 2 below.
表2Table 2
Figure PCTCN2019103800-appb-000002
Figure PCTCN2019103800-appb-000002
Figure PCTCN2019103800-appb-000003
Figure PCTCN2019103800-appb-000003
应当理解的是,上述表2示出的图像上色子网络的结构和超参数仅仅是一种示例。在具体应用中,可以根据需要调整上述图像上色子网络中的超参数和结构。It should be understood that the structure and hyperparameters of the image color sub-network shown in Table 2 above are only an example. In specific applications, the hyperparameters and structures in the above-mentioned image coloring sub-network can be adjusted as needed.
上述色度预测卷积神经网络模型包括上述图像上色子网络,在一些实施例中,还可以包括亮度下采样子网络,该色度预测卷积神经网络模型是预先训练好的。The above-mentioned chrominance prediction convolutional neural network model includes the above-mentioned image coloring sub-network. In some embodiments, it may also include a luminance down-sampling sub-network. The chrominance prediction convolutional neural network model is pre-trained.
当色度预测卷积神经网络模型包括亮度下采样子网络和图像上色子网络时,在该色度卷积神经网络模型的训练过程中,损失函数具体为:When the chroma prediction convolutional neural network model includes a luminance down-sampling sub-network and an image color sub-network, during the training process of the chroma convolutional neural network model, the loss function is specifically:
L 2=λ||Cb′-Cb|| 2+(1-λ)||Cr′-Cr|| 2,其中,λ为权重,Cb′、Cr′为从图像上色网络的输出中裁剪得到的色度分量,其大小为N×N。Cb、Cr是大小为N×N的色度分量的真实值。 L 2 =λ||Cb'-Cb|| 2 +(1-λ)||Cr'-Cr|| 2 , where λ is the weight, Cb' and Cr' are cropped from the output of the image coloring network The size of the obtained chrominance component is N×N. Cb and Cr are the true values of chrominance components with a size of N×N.
其中,Cb′,Cr′=F 2(F 1(Y),D,Cb,Cr),F 2为图像上色网络,F 1(Y)为下采样后的已编码或已解码重建的亮度分量,大小为2N×2N;D为编码失真度,大小为2N×2N;Cb,Cr为相邻色度块中的相邻色度信息,相邻色度块大小为2N×2N。训练过程中的批量大小和学习率分别设置为128和1×10 -4。λ可以设置为0.5。训练样本数据集可以包括来自UCID数据库的886张图像和来自DIV2K数据库的400张图像。 Among them, Cb', Cr'=F 2 (F 1 (Y), D, Cb, Cr), F 2 is the image coloring network, F 1 (Y) is the down-sampled coded or decoded reconstructed brightness Component, the size is 2N×2N; D is the coding distortion degree, and the size is 2N×2N; Cb, Cr are adjacent chrominance information in adjacent chrominance blocks, and the adjacent chrominance block size is 2N×2N. The batch size and learning rate during training are set to 128 and 1×10 -4 respectively . λ can be set to 0.5. The training sample data set may include 886 images from the UCID database and 400 images from the DIV2K database.
步骤104、从色度分量裁剪出目标色度分量块,目标色度分量块为最终的色度预测结 果。Step 104: Cut out the target chrominance component block from the chrominance component, and the target chrominance component block is the final chrominance prediction result.
具体地,在将预设参量输入至图像上色子网络之后,图像上色子网络会输出相应的色度分量,然后再从图像上色子网络的输出中裁剪出对应的色度分量块,以得到预测的色度。即在一些实施例中,上述根据色度分量得出色度预测结果的具体过程可以包括:从色度分量中裁剪出目标色度分量块,目标色度分量块为已编码或已解码重建的亮度分量对应的色度预测结果。Specifically, after the preset parameters are input to the image coloring sub-network, the image coloring sub-network will output the corresponding chroma components, and then the corresponding chroma component blocks are cut out from the output of the image coloring sub-network, To get the predicted chromaticity. That is, in some embodiments, the above-mentioned specific process of obtaining the color prediction result according to the chroma component may include: cropping the target chroma component block from the chroma component, and the target chroma component block is the coded or decoded reconstructed luminance. The chroma prediction result corresponding to the component.
例如,当图像上色子网络输出的色度分量的大小为2N×2N,从2N×2N的色度分量中裁剪出N×N的目标色度分量块,该目标亮度分量块是2N×2N的色度分量中右下方的色度块。For example, when the size of the chrominance component output by the color sub-network on the image is 2N×2N, an N×N target chrominance component block is cropped from the 2N×2N chrominance component, and the target luminance component block is 2N×2N The chroma block in the lower right of the chroma component.
为了更好地介绍本申请实施例提供的帧内色度预测方法,下面将结合图4示出的基于卷积神经网络的帧内色度预测方法的示意图进行介绍。In order to better introduce the intra-frame chrominance prediction method provided by the embodiments of the present application, the following will be introduced in conjunction with the schematic diagram of the intra-frame chrominance prediction method based on the convolutional neural network shown in FIG. 4.
如图4所示,色度预测卷积神经网络模型包括亮度下采样子网络41和图像上色子网络42,已编码或已解码重建的亮度分量43的大小为4N×4N,包括4个2N×2N的亮度分量块,这4个2N×2N的亮度分量块分别用1、2、3、4编号。从已编码或已解码重建的亮度分量43中裁剪出2N×2N的亮度分量块4作为目标亮度分量块,将目标亮度分量块输入至线性色度预测模型CCLM,得出线性色度预测模型CCLM的输出结果Cb和Cr,将输出结果Cb和Cr填入至相邻色度块中的空缺部分,以作为待预测色度块的初始色度分量。As shown in Figure 4, the chroma prediction convolutional neural network model includes a luminance down-sampling sub-network 41 and an image color sub-network 42. The size of the encoded or decoded and reconstructed luminance component 43 is 4N×4N, including four 2N ×2N brightness component blocks, the 4 2N×2N brightness component blocks are numbered 1, 2, 3, and 4 respectively. Cut out the 2N×2N luminance component block 4 from the encoded or decoded and reconstructed luminance component 43 as the target luminance component block, and input the target luminance component block to the linear chrominance prediction model CCLM to obtain the linear chrominance prediction model CCLM The output results Cb and Cr are filled in the vacant parts in the adjacent chrominance block as the initial chrominance components of the chrominance block to be predicted.
将已编码或已解码重建的亮度分量43输入至亮度下采样网络41,得出多个下采样后的已编码或已解码重建的亮度分量。然后将多个2N×2N的下采样后的已编码或已解码重建的亮度分量44、重构出的2N×2N的相邻色度块45和2N×2N的编码失真度46输入至图像上色子网络42,图像上色子网络输出两个2N×2N的色度分量47,分别从两个2N×2N的色度分量中裁剪出N×N的Cb′和Cr′,裁剪出的N×N的Cb′和Cr′即为最终的色度预测结果。The encoded or decoded and reconstructed luminance component 43 is input to the luminance down-sampling network 41 to obtain a plurality of down-sampled encoded or decoded and reconstructed luminance components. Then multiple 2N×2N down-sampled encoded or decoded and reconstructed luminance components 44, reconstructed 2N×2N adjacent chrominance blocks 45, and 2N×2N encoding distortion 46 are input to the image The color sub-network 42, the color sub-network on the image outputs two 2N×2N chrominance components 47, respectively cropping out N×N Cb′ and Cr′ from the two 2N×2N chrominance components, and the cropped N ×N Cb' and Cr' are the final chromaticity prediction results.
相应地,参见图5示出的一种帧内色度预测装置的结构示意框图,该装置可以包括:Correspondingly, referring to the schematic structural block diagram of an intra-frame chrominance prediction apparatus shown in FIG. 5, the apparatus may include:
亮度分量获取模块51,用于获取已编码或已解码重建的亮度分量;The luminance component acquisition module 51 is configured to acquire the encoded or decoded and reconstructed luminance component;
下采样模块52,用于对已编码或已解码重建的亮度分量进行下采样;The down-sampling module 52 is used for down-sampling the encoded or decoded and reconstructed luminance components;
上色模块53,用于将预设参量输入至预训练的色度预测卷积神经网络模型中的图像上色子网络,得到图像上色子网络输出的色度分量;其中,预设参量包括下采样后的已编码或已解码重建的亮度分量,或者包括下采样后的已编码或解码重建的亮度分量和目标参量,目标参量包括编码失真度和已编码或已解码重建的相邻色度块中的至少一种;The coloring module 53 is used to input preset parameters into the image coloring sub-network in the pre-trained chroma prediction convolutional neural network model to obtain the chroma components output by the image coloring sub-network; wherein, the preset parameters include The coded or decoded and reconstructed luminance component after downsampling, or the coded or decoded and reconstructed luminance component after downsampling and the target parameter. The target parameter includes the coding distortion and the adjacent chrominance that has been coded or decoded and reconstructed At least one of the blocks;
预测模块54,用于从色度分量裁剪出目标色度分量块,目标色度分量块为最终的色度预测结果。The prediction module 54 is used to cut out the target chrominance component block from the chrominance component, and the target chrominance component block is the final chrominance prediction result.
在一些实施例中,当预设参量包括相邻色度块时,该装置还可以包括:In some embodiments, when the preset parameter includes adjacent chrominance blocks, the apparatus may further include:
裁剪模块,用于从已编码或已解码重建的亮度分量中裁剪出目标亮度分量块;The cropping module is used to crop the target brightness component block from the coded or decoded and reconstructed brightness component;
色度预测模块,用于通过预设色度预测方式对目标亮度分量块进行色度预测,得到预测的色度;The chrominance prediction module is used to predict the chrominance of the target luminance component block through a preset chrominance prediction method to obtain the predicted chrominance;
重构模块,将预测的色度作为待预测色度块的初始色度分量。The reconstruction module uses the predicted chrominance as the initial chrominance component of the chrominance block to be predicted.
在一些实施例中,上述色度预测卷积神经网络模型还包括亮度下采样子网络;上述下采样模块具体用于:通过亮度下采样子网络,对已编码或已解码重建的亮度分量进行下采样。In some embodiments, the above-mentioned chrominance prediction convolutional neural network model further includes a luminance down-sampling sub-network; the above-mentioned down-sampling module is specifically used to: use the luminance down-sampling sub-network to download the encoded or decoded and reconstructed luminance components sampling.
本申请实施例还提供了帧内色度预测装置的另一种优选的实施例,在本实施例中,帧内色度预测装置包括:处理器,其中,处理用于执行存储器的以下程序模块:亮度分量获取模块,用于获取已编码或已解码重建的亮度分量;下采样模块,用于对已编码或已解码重建的亮度分量进行下采样;上色模块,用于将预设参量输入至预训练的色度预测卷积神经网络模型中的图像上色子网络,得到图像上色子网络输出的色度分量;其中,预设参量包括下采样后的已编码或已解码重建的亮度分量,或者包括下采样后的已编码或解码重建的亮度分量和目标参量,目标参量包括编码失真度和已编码或已解码重建的相邻色度块中的至少一种;预测模块,用于从色度分量裁剪出目标色度分量块,目标色度分量块为最终的色度预测结果。The embodiment of the present application also provides another preferred embodiment of the intra-frame chrominance prediction device. In this embodiment, the intra-frame chrominance prediction device includes a processor, wherein the following program modules used to execute the memory are processed: : Luminance component acquisition module, used to obtain the encoded or decoded and reconstructed luminance components; down-sampling module, used to down-sample the encoded or decoded and reconstructed luminance components; coloring module, used to input preset parameters To the image color sub-network in the pre-trained chroma prediction convolutional neural network model, the chroma components output by the image color sub-network are obtained; among them, the preset parameters include the down-sampled coded or decoded reconstructed brightness Component, or includes down-sampled encoded or decoded and reconstructed luminance component and target parameter, the target parameter includes at least one of encoding distortion and encoded or decoded and reconstructed adjacent chrominance blocks; a prediction module for The target chrominance component block is cut out from the chrominance component, and the target chrominance component block is the final chrominance prediction result.
需要说明的是,上述帧内色度预测装置与上述帧内色度预测方法一一对应,相关介绍请参见上文相应内容,在此不再赘述。It should be noted that the foregoing intra-frame chrominance prediction device corresponds to the foregoing intra-frame chrominance prediction method one-to-one. For related introduction, please refer to the corresponding content above, which will not be repeated here.
可以看出,本申请实施例提供的基于卷积神经网络的帧内色度预测方案,通过图像上色子网络和输入的相应参量进行色度预测,以将色度预测问题模型化为图像上色问题,普适性较高。另外,基于图像上色子网络进行色度预测可以节省码率。通过实验可得,本申请实施例提供的基于卷积神经网络的帧内色度预测方案相较于现有的色度预测方式,平均可以节省4.235%的码率。It can be seen that the intra-frame chromaticity prediction scheme based on the convolutional neural network provided by the embodiment of the present application performs chromaticity prediction through the image color sub-network and the corresponding input parameters, so as to model the chromaticity prediction problem as an image The color problem is more universal. In addition, the chroma prediction based on the color sub-network of the image can save the bit rate. It can be obtained through experiments that the intra-frame chrominance prediction scheme based on the convolutional neural network provided by the embodiment of the present application can save 4.235% of the code rate on average compared with the existing chrominance prediction method.
实施例二Example two
本申请实施例提供的基于卷积神经网络的帧内色度预测方案可以应用于视频编解码过程。为了进一步提高视频编解码性能,可以在基于卷积神经网络的帧内色度预测方法和传统的色度预测方法之间进行率失真代价竞争,以选取最小率失真代价的色度预测方式进行视频编解码。本实施例将对色度编码过程进行介绍。The intra-frame chroma prediction scheme based on the convolutional neural network provided by the embodiments of the present application can be applied to the video encoding and decoding process. In order to further improve the performance of video coding and decoding, the rate-distortion cost competition can be carried out between the intra-frame chroma prediction method based on convolutional neural network and the traditional chroma prediction method, and the chroma prediction method with the smallest rate-distortion cost can be selected for video Codec. This embodiment will introduce the chroma coding process.
参见图6,为本申请实施例提供的一种帧内色度预测方法的流程示意框图,该方法可以具体应用于视频编码器,该方法可以包括以下步骤:Refer to FIG. 6, which is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of this application. The method may be specifically applied to a video encoder. The method may include the following steps:
步骤601、将亮度分量进行编码,得到亮度码流;Step 601: Encode the luminance component to obtain a luminance code stream;
步骤602、获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息。Step 602: Obtain the coded and reconstructed luminance component, the coded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the to-be-coded chrominance block.
可以理解的是,上述已编码或解码重建的亮度分量Y、色度分量Cb、Cr和相邻色度信息均可包括在编码块中。其中,上述相邻色度信息具体表现为相邻色度块。It can be understood that the above-mentioned coded or decoded and reconstructed luminance component Y, chrominance components Cb, Cr, and adjacent chrominance information can all be included in the coding block. Wherein, the aforementioned adjacent chrominance information is specifically represented as adjacent chrominance blocks.
步骤603、通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,第一类色度预测方式为如上述实施例一中任一项的帧内色度预测方法。Step 603: Determine the target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein, the at least two chrominance prediction methods include the first type of chrominance prediction method and the second type. For the chroma prediction method, the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the foregoing first embodiment.
需要说明的是,视频编码器中包括至少两种色度预测方式,至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式。第一类色度预测方式是指本申请实施例提供的基于卷积神经网络的帧内色度预测方法,而第二类色度预测方式可以是指传统的帧内色度预测方法,传统的帧内色度预测方法包括角度预测、线性模型CCLM和多方向线性模型MDLM等等。应理解,上述第二类色度预测方式可以包括一种或多种传统的帧内色度预测方法。It should be noted that the video encoder includes at least two chroma prediction methods, and the at least two chroma prediction methods include a first type of chroma prediction method and a second type of chroma prediction method. The first type of chroma prediction method refers to the intra-frame chroma prediction method based on the convolutional neural network provided by the embodiment of the application, and the second type of chroma prediction method may refer to the traditional intra-frame chroma prediction method, and the traditional Intra-frame chroma prediction methods include angle prediction, linear model CCLM, multi-directional linear model MDLM, and so on. It should be understood that the foregoing second-type chrominance prediction method may include one or more traditional intra-frame chrominance prediction methods.
通过率失真优化可以从多种色度预测方式中确定出最小率失真代价的色度预测方式。在一些实施例中,上述通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式的具体过程可以包括:分别计算至少两种色度预测方式对应的率失真代价值;将率失真代价值最小的色度预测方式确定为目标色度预测方式。Through rate-distortion optimization, the chroma prediction method with the least rate-distortion cost can be determined from a variety of chroma prediction methods. In some embodiments, the above-mentioned specific process of determining the target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization may include: separately calculating the rates corresponding to the at least two chrominance prediction methods. Distortion cost: Determine the chromaticity prediction method with the least cost-distortion cost as the target chromaticity prediction method.
步骤604、通过色度预测方式和指示信息之间的关联关系,生成目标色度预测方式对应的指示信息。Step 604: Generate the indication information corresponding to the target chromaticity prediction mode through the association relationship between the chromaticity prediction mode and the indication information.
需要说明的是,上述关联关系是预先建立,通过该关联关系可以确定出每一种色度预测方式对应的指示信息。例如,当指示信息具体为二进制的标志位数值,预先建立每一种色度预测方式与对应数值之间的映射关系,具体表现为:第一种色度预测方式对应的标志位数值为00,第二种色度预测方式对应的标志位数值为01,依次类推。It should be noted that the above-mentioned association relationship is established in advance, and the indication information corresponding to each chromaticity prediction method can be determined through the association relationship. For example, when the indication information is a binary flag bit value, the mapping relationship between each chroma prediction method and the corresponding value is established in advance, and the specific expression is: the flag bit value corresponding to the first chroma prediction method is 00, The value of the number of flag bits corresponding to the second chromaticity prediction method is 01, and so on.
在通过关联关系获取到色度预测方式对应的指示信息之后,可以根据对应的指示信息内容生成相应的指示信息。例如,当目标色度预测方式对应的数值为1,则将二进制标志位的数值设置为1,以生成目标色度预测方式对应的指示信息。该指示信息用于指示选择哪种色度预测方式进行色度预测。After obtaining the indication information corresponding to the chroma prediction mode through the association relationship, the corresponding indication information can be generated according to the content of the corresponding indication information. For example, when the value corresponding to the target chromaticity prediction mode is 1, the value of the binary flag bit is set to 1 to generate the indication information corresponding to the target chromaticity prediction mode. The indication information is used to indicate which chrominance prediction mode is selected for chrominance prediction.
在一些实施例中,上述指示信息具体为标志位数值。上述通过色度预测方式和指示信息之间的关联关系,生成目标色度预测方式对应的指示信息的具体过程可以包括:通过色度预测方式和标志位数值之间的关联关系,将标志位设置为对应数值,以得到目标色度预测方式对应的指示信息。In some embodiments, the above-mentioned indication information is specifically a flag bit value. The above-mentioned specific process of generating the indication information corresponding to the target chromaticity prediction mode through the association relationship between the chrominance prediction mode and the indication information may include: setting the flag bit through the association relationship between the chrominance prediction mode and the value of the flag bit Is the corresponding value to obtain the indication information corresponding to the target chromaticity prediction mode.
在本实施例中,可以将上述实施例一中的基于卷积神经网络的帧内色度预测方法对应 的二进制标志位数值设置为1,第二类色度预测方式对应的二进制标志位数值设置为0。此时,如果通过率失真优化确定出具备最小率失真代价的是基于卷积神经网络的色度预测方式,则将二进制标志位的数值设置为1,反之,如果具备最小率失真代价的是第二类色度预测方式,则将二进制标志位的数值设置为0。应当理解,当第二类色度预测方式包括多种传统的色度预测方式时,可以使用两位或三位二进制标志位表示对应的色度预测方式,例如,用两位二进制标志位来表示对应的色度预测方式,第一种传统色度预测方式对应的二进制标志位的数值为00,第二种传统色度预测方式对应的二进制标志位的数值为01,依次类推。In this embodiment, the binary flag bit value corresponding to the intra-frame chroma prediction method based on the convolutional neural network in the first embodiment can be set to 1, and the binary flag bit value corresponding to the second type of chroma prediction method can be set Is 0. At this time, if it is determined through the rate-distortion optimization that the chroma prediction method based on the convolutional neural network has the smallest rate-distortion cost, then the value of the binary flag bit is set to 1. On the contrary, if the smallest rate-distortion cost is the first For the second type of chroma prediction method, the value of the binary flag bit is set to 0. It should be understood that when the second type of chrominance prediction method includes multiple traditional chrominance prediction methods, two or three binary flags can be used to represent the corresponding chrominance prediction method, for example, two binary flags can be used to represent the corresponding chrominance prediction method. For the corresponding chrominance prediction method, the value of the binary flag corresponding to the first traditional chrominance prediction method is 00, the value of the binary flag corresponding to the second traditional chrominance prediction method is 01, and so on.
步骤605、将原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,预测得到的色度信息为通过目标色度预测方式进行色度预测后得出的色度信息。Step 605: Perform a subtraction operation on the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is obtained after chrominance prediction is performed through the target chrominance prediction method Chromaticity information.
其中,上述预测得到的色度信息是通过执行确定出的目标色度预测方式对待预测色度块进行色度预测得出的信息,具体过程在此不再赘述。Wherein, the chrominance information obtained by the above prediction is information obtained by performing chrominance prediction on the chrominance block to be predicted by executing the determined target chrominance prediction method, and the specific process is not repeated here.
步骤606、对指示信息和色度残差信息进行编码得到色度码流,与亮度码流合并得到视频码流。Step 606: Encode the indication information and the chrominance residual information to obtain a chrominance code stream, which is combined with the luminance code stream to obtain a video code stream.
具体地,对指示信息进行无损失真编码,对色度残差信息进行相应的残差编码,以得到视频编码器的输出码流。Specifically, lossless true coding is performed on the indication information, and corresponding residual coding is performed on the chrominance residual information to obtain the output code stream of the video encoder.
为了更好地介绍本实施例提供的视频编码器的编码过程,下面将结合图7示出的视频编码器的编码过程示意图进行说明。In order to better introduce the encoding process of the video encoder provided in this embodiment, the following will describe with reference to the schematic diagram of the encoding process of the video encoder shown in FIG. 7.
如图7所示,将亮度分量进行编码,得到亮度码流;将待预测色度编码块71输入至视频编码器72,该待预测色度编码块包括已编码重建的亮度分量和已编码重建的相邻色度信息等信息。视频编码器分别执行传统帧内色度预测方式和基于卷积神经网络的帧内色度预测方式,通过率失真优化,计算出每种色度预测方式的率失真代价值,然后比较率失真代价值的大小,选取最小率失真代价值对应的色度预测方式作为目标色度预测方式;再基于目标色度预测方式,将二进制标志位设置为相应数值,然后对二进制标志位进行编码和对待预测色度编码块进行残差编码,以得到色度码流73。该色度码流与亮度码流合并成视频码流,传送至视频解码器,以进行相应的解码过程。As shown in Figure 7, the luminance component is coded to obtain the luminance code stream; the chrominance coding block to be predicted 71 is input to the video encoder 72, and the chrominance coding block to be predicted includes the coded and reconstructed luminance component and the coded reconstruction. The adjacent chromaticity information and other information. The video encoder executes the traditional intra-frame chrominance prediction method and the intra-frame chrominance prediction method based on convolutional neural network respectively. Through rate-distortion optimization, the rate-distortion cost value of each chrominance prediction method is calculated, and then the rate-distortion code is compared. For the value of the value, select the chroma prediction method corresponding to the minimum rate-distortion cost value as the target chroma prediction method; then based on the target chroma prediction method, set the binary flag bit to the corresponding value, and then encode the binary flag bit and predict it The chroma coding block performs residual coding to obtain the chroma code stream 73. The chrominance code stream and the luminance code stream are combined into a video code stream, which is sent to the video decoder for corresponding decoding process.
相应地,参见图8示出的一种帧内色度预测装置的结构示意框图,该装置可以包括:Correspondingly, referring to the schematic structural block diagram of an intra-frame chrominance prediction apparatus shown in FIG. 8, the apparatus may include:
亮度编码模块81,用于将亮度分量进行编码,得到亮度码流;The luminance encoding module 81 is used to encode the luminance component to obtain a luminance code stream;
获取模块82,用于获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;The obtaining module 82 is configured to obtain the coded and reconstructed luminance component, the coded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the to-be-coded chrominance block;
第二确定模块83,用于通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,至少两种色度预测方式包括第一类色度预测方式和第 二类色度预测方式,第一类色度预测方式为如上述实施例一任一项的帧内色度预测方法;The second determining module 83 is configured to determine the target chrominance prediction method with the minimum rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein, the at least two chrominance prediction methods include the first type of chrominance prediction Method and the second type of chroma prediction method, the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the foregoing embodiment;
生成模块84,用于通过色度预测方式和指示信息之间的关联关系,生成目标色度预测方式对应的指示信息;The generating module 84 is configured to generate the indication information corresponding to the target chromaticity prediction mode through the association relationship between the chromaticity prediction mode and the indication information;
相减模块85,用于将原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,预测得到的色度信息为通过目标色度预测方式进行色度预测后得出的色度信息;The subtraction module 85 is used to perform a subtraction operation between the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is the chrominance prediction through the target chrominance prediction method Chromaticity information obtained afterwards;
编码模块86,用于对指示信息和色度残差信息进行编码,得到色度码流,并将色度码流与亮度码流合并得到视频码流。The encoding module 86 is configured to encode the indication information and the chrominance residual information to obtain a chrominance code stream, and combine the chrominance code stream and the luminance code stream to obtain a video code stream.
在一些实施例中,上述第二确定模块具体用于:分别计算至少两种色度预测方式对应的率失真代价值;将率失真代价值最小的色度预测方式确定为目标色度预测方式。In some embodiments, the above-mentioned second determining module is specifically configured to: respectively calculate the rate-distortion cost values corresponding to at least two chrominance prediction modes; and determine the chrominance prediction mode with the smallest rate-distortion cost value as the target chrominance prediction mode.
在一些实施例中,上述指示信息具体为标志位数值。上述生成模块具体用于:通过色度预测方式和标志位数值之间的关联关系,将标志位设置为对应数值,以得到目标色度预测方式对应的指示信息。In some embodiments, the above-mentioned indication information is specifically a flag bit value. The above-mentioned generating module is specifically used to set the flag bit to a corresponding value through the association relationship between the chrominance prediction mode and the value of the flag bit, so as to obtain the indication information corresponding to the target chrominance prediction mode.
本申请实施例还提供了帧内色度预测装置的另一种优选的实施例,在本实施例中,帧内色度预测装置包括:处理器,其中,处理用于执行存储器的以下程序模块:亮度编码模块,用于将亮度分量进行编码,得到亮度码流;获取模块,用于获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;第二确定模块,用于通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,第一类色度预测方式为如上述实施例一任一项的帧内色度预测方法;生成模块,用于通过色度预测方式和指示信息之间的关联关系,生成目标色度预测方式对应的指示信息;相减模块,用于将原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,预测得到的色度信息为通过目标色度预测方式进行色度预测后得出的色度信息;编码模块,用于对指示信息和色度残差信息进行编码,得到色度码流,并将色度码流与亮度码流合并得到视频码流。The embodiment of the present application also provides another preferred embodiment of the intra-frame chrominance prediction device. In this embodiment, the intra-frame chrominance prediction device includes a processor, wherein the following program modules used to execute the memory are processed: : Luminance encoding module, used to encode the luminance component to obtain the luminance code stream; acquisition module, used to obtain the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original color corresponding to the chrominance block to be encoded Degree information; a second determination module for determining the target chrominance prediction method with the least rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein the at least two chrominance prediction methods include the first type of color The first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the above-mentioned embodiment; the generation module is used to pass the chroma prediction method and the indication information. The correlation relationship of the target chrominance prediction method is generated; the subtraction module is used to subtract the original chrominance information and the predicted chrominance information to obtain the chrominance residual information; among them, the predicted chrominance information The chrominance information is the chrominance information obtained after the chrominance prediction is performed by the target chrominance prediction method; the coding module is used to encode the indication information and the chrominance residual information to obtain the chrominance code stream, and the chrominance code The stream and the luminance code stream are combined to obtain the video code stream.
需要说明的是,上述帧内色度预测装置与上述帧内色度预测方法一一对应,相关介绍请参见上文相应内容,在此不再赘述。It should be noted that the foregoing intra-frame chrominance prediction device corresponds to the foregoing intra-frame chrominance prediction method one-to-one. For related introduction, please refer to the corresponding content above, which will not be repeated here.
可以看出,通过在传统帧内色度预测方式和本申请实施例提供的基于卷积神经网络的帧内色度预测方式之间进行率失真代价竞争,并增加用于指示选择哪种色度预测方式的指示信息,可以进一步提高色度编码性能。It can be seen that the rate-distortion cost competition is performed between the traditional intra-frame chrominance prediction method and the intra-frame chrominance prediction method based on the convolutional neural network provided in the embodiment of the application, and an increase is used to indicate which chrominance is selected. The indication information of the prediction mode can further improve the chroma coding performance.
实施例三Example three
在介绍完视频编码过程之后,本实施例将视频解码过程进行介绍说明。本实施例的视 频解码过程与上述实施例二的视频编码过程相对应。After introducing the video encoding process, this embodiment introduces the video decoding process. The video decoding process in this embodiment corresponds to the video encoding process in the second embodiment above.
参见图9,为本申请实施例提供的一种帧内色度预测方法的流程示意框图,该方法可以应用于视频解码器,该方法可以包括以下步骤:Refer to FIG. 9, which is a schematic block diagram of the flow of an intra-frame chrominance prediction method provided by an embodiment of this application. The method may be applied to a video decoder. The method may include the following steps:
步骤901、获取视频编码器输出的码流。Step 901: Obtain a code stream output by the video encoder.
步骤902、对视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和用于确定色度预测方式的指示信息。Step 902: Decode the video code stream to obtain decoded and reconstructed luminance components, decoded and reconstructed adjacent chrominance information, and indication information for determining a chrominance prediction mode.
具体地,视频解码器接收视频编码器输出的视频码流,然后对码流进行解码,以得到相应的信息。其中,上述指示信息可以具体为二进制标志位。Specifically, the video decoder receives the video code stream output by the video encoder, and then decodes the code stream to obtain corresponding information. Wherein, the above-mentioned indication information may specifically be a binary flag bit.
步骤903、根据指示信息,从至少两种色度预测方式中确定目标色度预测方式,至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,第一类色度预测方式为如上述实施例一中任一项的帧内色度预测方法。Step 903: According to the instruction information, determine the target chroma prediction mode from at least two chroma prediction modes, the at least two chroma prediction modes include the first type of chroma prediction mode and the second type of chroma prediction mode, the first type The chroma prediction method is the intra-frame chroma prediction method as in any one of the above-mentioned first embodiment.
具体地,解码得到指示信息之后,可以根据指示信息确定出选用的目标色度预测方式。例如,当指示信息具体为标志位数值;上述根据指示信息,从至少两种色度预测方式中确定目标色度预测方式的具体过程可以包括:当标志位数值为第一数值时,将第一类色度预测方式确定为目标色度预测方式;当标志位数值为第二数值时,将第二类色度预测方式确定为目标色度预测。其中,上述第一数值可以为1,相应地,第二数值为0;第一数值也可以为0,相应地,第二数值为1。Specifically, after the instruction information is obtained by decoding, the selected target chromaticity prediction mode can be determined according to the instruction information. For example, when the indication information is specifically the value of the flag bit; the specific process of determining the target chroma prediction mode from at least two chroma prediction modes according to the indication information may include: when the bit value of the flag is the first value, the first The second-type chromaticity prediction method is determined as the target chromaticity prediction method; when the flag bit value is the second value, the second-type chromaticity prediction method is determined as the target chromaticity prediction method. Wherein, the above-mentioned first value may be 1, and correspondingly, the second value is 0; the first value may also be 0, and correspondingly, the second value is 1.
步骤904、根据已解码重建的亮度分量和已解码重建的相邻色度信息,通过目标色度预测方式对色度分量进行色度预测,得到色度预测结果。Step 904: According to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, perform chrominance prediction on the chrominance component through the target chrominance prediction mode to obtain a chrominance prediction result.
可以理解的是,根据指示信息选择出目标色度预测方式之后,可以执行目标色度预测方式进行色度预测,以得到相应的色度预测结果。其中,如果目标色度预测方式为上述实施例一的基于卷积神经网络的帧内色度预测方法,色度预测的具体过程可以参见上文相应内容,在此不再赘述。It is understandable that after the target chromaticity prediction mode is selected according to the instruction information, the target chromaticity prediction mode can be executed to perform chromaticity prediction, so as to obtain the corresponding chromaticity prediction result. Wherein, if the target chromaticity prediction method is the intra-frame chromaticity prediction method based on the convolutional neural network in the first embodiment, the specific process of chromaticity prediction can be referred to the corresponding content above, which will not be repeated here.
步骤905、根据对码流中的色度残差信息进行解码后得到的残差和色度预测结果进行色度重建,得到输出色度。Step 905: Perform chroma reconstruction according to the residual and chroma prediction result obtained after decoding the chroma residual information in the bitstream to obtain the output chroma.
为了更好地介绍视频解码过程,下面将结合图10示出的视频解码器的解码过程示意图进行介绍。In order to better introduce the video decoding process, the following will be introduced in conjunction with the schematic diagram of the decoding process of the video decoder shown in FIG. 10.
如图10所示,视频解码器101接收输入码流102,首先对亮度分量进行解码,然后进行二进制标志位解码,得到二进制标志位,根据二进制标志位确定是选用传统帧内色度预测方式进行色度预测,还是选择基于卷积神经网络的帧内色度预测方式进行色度预测;然后执行所选择的目标色度预测方式进行色度预测,得到色度预测结果;基于得到的色度预测结果和残差解码的结果进行色度重建,得到输出色度103。As shown in Figure 10, the video decoder 101 receives the input code stream 102, first decodes the luminance component, and then decodes the binary flag bit to obtain the binary flag bit. According to the binary flag bit, the traditional intra-frame chrominance prediction method is selected. For chroma prediction, choose the intra-frame chroma prediction method based on convolutional neural network for chroma prediction; then execute the selected target chroma prediction method to perform chroma prediction to obtain the chroma prediction result; based on the obtained chroma prediction The result and the residual decoding result are subjected to chroma reconstruction, and the output chroma 103 is obtained.
相应地,参见图11示出的一种帧内色度预测装置的结构示意框图,该装置可以包括:Correspondingly, referring to the schematic structural block diagram of an intra-frame chrominance prediction apparatus shown in FIG. 11, the apparatus may include:
码流获取模块111,用于获取视频编码器输出的码流;The code stream obtaining module 111 is used to obtain the code stream output by the video encoder;
解码模块112,用于对视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和用于确定色度预测方式的指示信息;The decoding module 112 is configured to decode the video code stream to obtain decoded and reconstructed luminance components, decoded and reconstructed adjacent chrominance information, and indication information for determining a chrominance prediction mode;
第一确定模块113,用于根据指示信息,从至少两种色度预测方式中确定目标色度预测方式,至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,第一类色度预测方式为如上述实施例一任一项的帧内色度预测方法;The first determining module 113 is configured to determine the target chrominance prediction mode from at least two chrominance prediction modes according to the instruction information. The at least two chrominance prediction modes include the first type of chrominance prediction mode and the second type of chrominance prediction mode. Method, the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the foregoing embodiment;
色度预测模块114,用于根据已解码重建的亮度分量和已解码重建的相邻色度信息,通过目标色度预测方式对色度分量进行色度预测,得到色度预测结果;The chroma prediction module 114 is configured to perform chroma prediction on the chroma component by the target chroma prediction mode according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chroma information to obtain a chroma prediction result;
色度重建模块115,用于根据对视频码流中的色度残差信息进行解码后得到的残差和色度预测结果进行色度重建,得到输出色度。The chrominance reconstruction module 115 is configured to perform chrominance reconstruction according to the residual and chrominance prediction result obtained after decoding the chrominance residual information in the video bitstream to obtain the output chrominance.
在一些实施例中,上述指示信息具体为标志位数值;上述第一确定模块具体用于:当标志位数值为第一数值时,将第一类色度预测方式确定为目标色度预测方式;当标志位数值为第二数值时,将第二类色度预测方式确定为目标色度预测方式。In some embodiments, the aforementioned indication information is specifically a flag bit value; the aforementioned first determining module is specifically configured to: when the flag bit value is the first value, determine the first type of chromaticity prediction mode as the target chromaticity prediction mode; When the value of the number of flag bits is the second value, the second type of chromaticity prediction mode is determined as the target chromaticity prediction mode.
本申请实施例还提供了帧内色度预测装置的另一种优选的实施例,在本实施例中,帧内色度预测装置包括:处理器,其中,处理用于执行存储器的以下程序模块:码流获取模块,用于获取视频编码器输出的码流;解码模块,用于对视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和用于确定色度预测方式的指示信息;第一确定模块,用于根据指示信息,从至少两种色度预测方式中确定目标色度预测方式,至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,第一类色度预测方式为如上述实施例一任一项的帧内色度预测方法;色度预测模块,用于根据已解码重建的亮度分量和已解码重建的相邻色度信息,通过目标色度预测方式对色度分量进行色度预测,得到色度预测结果;色度重建模块,用于根据对视频码流中的色度残差信息进行解码后得到的残差和色度预测结果进行色度重建,得到输出色度。The embodiment of the present application also provides another preferred embodiment of the intra-frame chrominance prediction device. In this embodiment, the intra-frame chrominance prediction device includes a processor, wherein the following program modules used to execute the memory are processed: : Code stream acquisition module, used to obtain the code stream output by the video encoder; decoding module, used to decode the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and to determine Indication information of the chrominance prediction mode; a first determining module, configured to determine the target chrominance prediction mode from at least two chrominance prediction modes according to the indication information, the at least two chrominance prediction modes including the first type of chrominance prediction mode And the second type of chroma prediction method, the first type of chroma prediction method is the intra-frame chroma prediction method as in any one of the above embodiment; the chroma prediction module is used to reconstruct the decoded luminance component and the decoded reconstruction The adjacent chrominance information of the chrominance component is predicted by the target chrominance prediction method to obtain the chrominance prediction result; the chrominance reconstruction module is used to decode the chrominance residual information in the video stream The obtained residual and chromaticity prediction results are subjected to chromaticity reconstruction to obtain the output chromaticity.
需要说明的是,上述帧内色度预测装置与上述实施例帧内色度预测方法一一对应,相关介绍请参见上文相应内容,在此不再赘述。It should be noted that the foregoing intra-frame chrominance prediction apparatus corresponds to the intra-frame chrominance prediction method in the foregoing embodiment one-to-one. For related introduction, please refer to the corresponding content above, which will not be repeated here.
可以看出,通过在传统帧内色度预测方式和本申请实施例提供的基于卷积神经网络的帧内色度预测方式之间进行率失真代价竞争,并增加用于指示选择哪种色度预测方式的指示信息,可以进一步提高色度编码性能。It can be seen that the rate-distortion cost competition is performed between the traditional intra-frame chrominance prediction method and the intra-frame chrominance prediction method based on the convolutional neural network provided in the embodiment of the application, and an increase is used to indicate which chrominance is selected. The indication information of the prediction mode can further improve the chroma coding performance.
实施例四Example four
参见图12,为本申请实施例提供的一种视频编解码系统的结构示意框图,该系统可以包括视频编码器121和视频解码器122。当然,该系统还包括用于传输码流的编码传输子 系统123,该编码传输子系统介于视频编码器和视频解码器之间,用于将视频编码器输出的码流传输至视频解码器。Refer to FIG. 12, which is a schematic block diagram of a structure of a video encoding and decoding system provided by an embodiment of this application. The system may include a video encoder 121 and a video decoder 122. Of course, the system also includes an encoding transmission sub-system 123 for transmitting the code stream, which is between the video encoder and the video decoder, and is used to transmit the code stream output by the video encoder to the video decoder. .
视频编码器和视频解码器的工作流程和交互流程可以参见下图13,在此不再赘述。The working flow and interaction flow of the video encoder and the video decoder can be seen in Figure 13 below, which will not be repeated here.
需要说明的是,关于基于卷积神经网络的帧内色度预测方法、视频编码器的编码过程以及视频解码器的解码过程可以参见上文相应内容,在此不再赘述。It should be noted that for the intra-frame chroma prediction method based on the convolutional neural network, the encoding process of the video encoder, and the decoding process of the video decoder, please refer to the corresponding content above, which will not be repeated here.
相应地,参见图13示出的视频编码器和视频解码器之间的交互示意图,上述帧内色度预测系统的交互流程可以包括以下步骤:Correspondingly, referring to the schematic diagram of interaction between the video encoder and the video decoder shown in FIG. 13, the interaction process of the intra-frame chrominance prediction system may include the following steps:
步骤1301、视频编码器将亮度分量进行编码,得到亮度码流。Step 1301: The video encoder encodes the luminance component to obtain a luminance code stream.
步骤1302、获取已编码重建的亮度分量和已编码重建的相邻色度信息,以及待编码色度块对应的原始色度信息。Step 1302: Obtain the coded and reconstructed luminance component and the coded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be coded.
步骤1303、视频编码器通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,第一类色度预测方式为如上述第一方面任一项的帧内色度预测方法。Step 1303: The video encoder determines the target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization; wherein, the at least two chrominance prediction methods include the first type of chrominance prediction method and The second type of chroma prediction method, the first type of chroma prediction method is the intra-frame chroma prediction method according to any one of the above-mentioned first aspects.
步骤1304、视频编码器通过色度预测方式和指示信息之间的关联关系,生成目标色度预测方式的指示信息。Step 1304: The video encoder generates the indication information of the target chrominance prediction mode through the association relationship between the chrominance prediction mode and the indication information.
步骤1305、视频编码器将原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息。Step 1305: The video encoder performs a subtraction operation on the original chrominance information and the predicted chrominance information to obtain chrominance residual information.
步骤1306、视频编码器对指示信息和色度残差信息进行编码得到色度码流,与亮度码流合并得到视频码流。Step 1306: The video encoder encodes the indication information and the chrominance residual information to obtain a chrominance code stream, which is combined with the luminance code stream to obtain a video code stream.
步骤1307、视频解码器获取视频编码器输出的视频码流。Step 1307: The video decoder obtains the video code stream output by the video encoder.
步骤1308、视频解码器对视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和指示信息。Step 1308: The video decoder decodes the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information.
步骤1309、视频解码器根据指示信息,从至少两种色度预测方式中确定目标色度预测方式。Step 1309: The video decoder determines the target chrominance prediction mode from at least two chrominance prediction modes according to the instruction information.
步骤1310、视频解码器根据已解码重建的亮度分量和已解码重建的相邻色度信息,通过目标色度预测方式对色度分量进行色度预测,得到色度预测结果。Step 1310: According to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, the video decoder performs chrominance prediction on the chrominance component through the target chrominance prediction mode to obtain a chrominance prediction result.
步骤1311、视频解码器根据对码流中的色度残差信息进行解码后得到的残差和色度预测结果进行色度重建,得到输出色度。Step 1311. The video decoder performs chroma reconstruction based on the residual and chroma prediction result obtained after decoding the chroma residual information in the bitstream, to obtain the output chroma.
需要说明的是,视频编码器和视频解码器之间的交互流程与上文各个实施例的相同或相似之处,可以参见上文相应内容,在此不再赘述。It should be noted that the interaction process between the video encoder and the video decoder is the same as or similar to the above embodiments, please refer to the corresponding content above, which will not be repeated here.
需要说明的是,上述装置、单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此 处不再赘述。It should be noted that the information exchange and execution process between the above-mentioned devices and units are based on the same concept as the method embodiment of this application, and its specific functions and technical effects can be found in the method embodiment section for details. I won't repeat it here.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
实施例五Example five
图14为本申请一实施例提供的终端设备的结构示意图。如图14所示,该实施例的终端设备14包括:至少一个处理器140、存储器141以及存储在所述存储器141中并可在所述至少一个处理器140上运行的计算机程序142,所述处理器140执行所述计算机程序142时实现上述实施例一中任意帧内色度预测方法实施例中的步骤。FIG. 14 is a schematic structural diagram of a terminal device provided by an embodiment of this application. As shown in FIG. 14, the terminal device 14 of this embodiment includes: at least one processor 140, a memory 141, and a computer program 142 that is stored in the memory 141 and can run on the at least one processor 140. When the processor 140 executes the computer program 142, the steps in any embodiment of the intra-frame chrominance prediction method in the first embodiment are implemented.
该终端设备14可以是桌上型计算机、笔记本或者掌上电脑等计算设备。该终端设备可包括,但不仅限于,处理器140、存储器141。本领域技术人员可以理解,图14仅仅是终端设备14的举例,并不构成对终端设备14的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The terminal device 14 may be a computing device such as a desktop computer, a notebook, or a palmtop computer. The terminal device may include, but is not limited to, a processor 140 and a memory 141. Those skilled in the art can understand that FIG. 14 is only an example of the terminal device 14 and does not constitute a limitation on the terminal device 14. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input and output devices, network access devices, and so on.
所称处理器140可以是中央处理单元(Central Processing Unit,CPU),该处理器140还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 140 may be a central processing unit (Central Processing Unit, CPU), and the processor 140 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器141在一些实施例中可以是所述终端设备14的内部存储单元,例如终端设备14的硬盘或内存。所述存储器141在另一些实施例中也可以是所述终端设备14的外部存储设备,例如所述终端设备14上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器141还可以既包括所述终端设备14的内部存储单元也包括外部存储设备。所述存储器141用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器141还可以用于暂时地存储已经输出或者将要输出的数据。The memory 141 may be an internal storage unit of the terminal device 14 in some embodiments, such as a hard disk or a memory of the terminal device 14. In other embodiments, the memory 141 may also be an external storage device of the terminal device 14, such as a plug-in hard disk equipped on the terminal device 14, a smart media card (SMC), a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc. Further, the memory 141 may also include both an internal storage unit of the terminal device 14 and an external storage device. The memory 141 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 141 can also be used to temporarily store data that has been output or will be output.
图15为本申请一实施例提供的视频编码器的结构示意图。如图15所示,该实施例的视频编码器15包括:至少一个处理器150、存储器151以及存储在所述存储器151中并可在所述至少一个处理器150上运行的计算机程序152,所述处理器150执行所述计算机程序152时实现上述实施例二中任意帧内色度预测方法实施例中的步骤。FIG. 15 is a schematic structural diagram of a video encoder provided by an embodiment of this application. As shown in FIG. 15, the video encoder 15 of this embodiment includes: at least one processor 150, a memory 151, and a computer program 152 that is stored in the memory 151 and can run on the at least one processor 150, so When the processor 150 executes the computer program 152, the steps in any embodiment of the intra-frame chrominance prediction method in the second embodiment are implemented.
该视频编码器可包括,但不仅限于,处理器150、存储器151。本领域技术人员可以理解,图15仅仅是视频编码器15的举例,并不构成对视频编码器15的限定,可以包括比图 示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The video encoder may include, but is not limited to, a processor 150 and a memory 151. Those skilled in the art can understand that FIG. 15 is only an example of the video encoder 15 and does not constitute a limitation on the video encoder 15. It may include more or less components than shown in the figure, or a combination of certain components, or different components. The components of, for example, can also include input and output devices, network access devices, and so on.
所称处理器150可以是中央处理单元(Central Processing Unit,CPU),该处理器150还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 150 may be a central processing unit (Central Processing Unit, CPU), and the processor 150 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器151在一些实施例中可以是所述视频编码器15的内部存储单元,例如视频编码器15的硬盘或内存。所述存储器151在另一些实施例中也可以是所述视频编码器15的外部存储设备,例如所述视频编码器15上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器151还可以既包括所述视频编码器15的内部存储单元也包括外部存储设备。所述存储器151用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器151还可以用于暂时地存储已经输出或者将要输出的数据。The memory 151 may be an internal storage unit of the video encoder 15 in some embodiments, such as a hard disk or a memory of the video encoder 15. In other embodiments, the memory 151 may also be an external storage device of the video encoder 15, such as a plug-in hard disk or a smart media card (SMC) equipped on the video encoder 15, Secure Digital (SD) card, Flash Card, etc. Further, the memory 151 may also include both an internal storage unit of the video encoder 15 and an external storage device. The memory 151 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 151 can also be used to temporarily store data that has been output or will be output.
图16为本申请一实施例提供的视频解码器的结构示意图。如图16所示,该实施例的视频解码器16包括:至少一个处理器160、存储器161以及存储在所述存储器161中并可在所述至少一个处理器160上运行的计算机程序162,所述处理器160执行所述计算机程序162时实现上述实施例三中任意帧内色度预测方法实施例中的步骤。FIG. 16 is a schematic structural diagram of a video decoder provided by an embodiment of this application. As shown in FIG. 16, the video decoder 16 of this embodiment includes: at least one processor 160, a memory 161, and a computer program 162 that is stored in the memory 161 and can run on the at least one processor 160, so When the processor 160 executes the computer program 162, the steps in the embodiment of any intra-frame chrominance prediction method in the third embodiment are implemented.
该视频解码器可包括,但不仅限于,处理器160、存储器161。本领域技术人员可以理解,图16仅仅是视频解码器16的举例,并不构成对视频解码器16的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The video decoder may include, but is not limited to, a processor 160 and a memory 161. Those skilled in the art can understand that FIG. 16 is only an example of the video decoder 16 and does not constitute a limitation on the video decoder 16. It may include more or less components than those shown in the figure, or combine certain components, or be different. The components of, for example, can also include input and output devices, network access devices, and so on.
所称处理器160可以是中央处理单元(Central Processing Unit,CPU),该处理器160还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 160 may be a central processing unit (Central Processing Unit, CPU), and the processor 160 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器161在一些实施例中可以是所述视频解码器16的内部存储单元,例如视频解码器16的硬盘或内存。所述存储器161在另一些实施例中也可以是所述视频解码器16 的外部存储设备,例如所述视频解码器16上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器161还可以既包括所述视频解码器16的内部存储单元也包括外部存储设备。所述存储器161用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器161还可以用于暂时地存储已经输出或者将要输出的数据。The memory 161 may be an internal storage unit of the video decoder 16 in some embodiments, such as a hard disk or a memory of the video decoder 16. In other embodiments, the memory 161 may also be an external storage device of the video decoder 16, for example, a plug-in hard disk or a smart memory card (Smart Media Card, SMC) equipped on the video decoder 16, Secure Digital (SD) card, Flash Card, etc. Further, the memory 161 may also include both an internal storage unit of the video decoder 16 and an external storage device. The memory 161 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 161 can also be used to temporarily store data that has been output or will be output.
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时实现如上述实施例一或实施例二或实施例三任一项的帧内色度预测方法。The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. Intra-frame chroma prediction method.
本申请实施例还提供了一种计算机程序产品,当计算机程序产品在终端设备或视频编码器或视频解码器上运行时,使得终端设备或视频编码器或视频解码器相应执行上述实施例一或实施例二或实施例三中任一项的帧内色度预测方法。The embodiments of the present application also provide a computer program product. When the computer program product runs on a terminal device or a video encoder or a video decoder, the terminal device or a video encoder or a video decoder will correspondingly execute the above-mentioned embodiment one or The intra-frame chroma prediction method of any one of Embodiment 2 or Embodiment 3.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (16)

  1. 一种帧内色度预测方法,其特征在于,包括:An intra-frame chrominance prediction method, characterized in that it comprises:
    获取已编码或已解码重建的亮度分量;Obtain the coded or decoded and reconstructed luminance component;
    对所述已编码或已解码重建的亮度分量进行下采样;Down-sampling the encoded or decoded and reconstructed luminance component;
    将预设参量输入至预训练的色度预测卷积神经网络模型中的图像上色子网络,得到所述图像上色子网络输出的色度分量;其中,所述预设参量包括下采样后的已编码或已解码重建的亮度分量,或者包括下采样后的已编码或已解码重建的亮度分量和目标参量,所述目标参量包括编码失真度和已编码或已解码重建的相邻色度块中的至少一种;The preset parameters are input to the image coloring sub-network in the pre-trained chroma prediction convolutional neural network model to obtain the chroma components output by the image coloring sub-network; wherein, the preset parameters include down-sampling The coded or decoded and reconstructed luminance component, or the coded or decoded and reconstructed luminance component after downsampling and the target parameter, the target parameter including the coding distortion and the coded or decoded and reconstructed adjacent chrominance At least one of the blocks;
    从所述色度分量裁剪出目标色度分量块,所述目标色度分量块为最终的色度预测结果。The target chrominance component block is cut out from the chrominance component, and the target chrominance component block is the final chrominance prediction result.
  2. 根据权利要求1所述的帧内色度预测方法,其特征在于,当所述预设参量包括所述已编码或已解码重建的相邻色度块时,所述方法还包括:The intra-frame chrominance prediction method according to claim 1, wherein when the preset parameter includes the coded or decoded and reconstructed adjacent chrominance block, the method further comprises:
    从所述已编码或已解码重建的亮度分量中裁剪出目标亮度分量块;Crop a target luminance component block from the encoded or decoded and reconstructed luminance component;
    通过预设色度预测方式对所述目标亮度分量块进行色度预测,得到预测的色度;Performing chrominance prediction on the target luminance component block by using a preset chrominance prediction mode to obtain the predicted chrominance;
    将所述预测的色度作为待预测色度块的初始色度分量。The predicted chrominance is used as the initial chrominance component of the chrominance block to be predicted.
  3. 根据权利要求1所述的帧内色度预测方法,其特征在于,所述色度预测卷积神经网络模型还包括亮度下采样子网络;The intra-frame chrominance prediction method according to claim 1, wherein the chrominance prediction convolutional neural network model further comprises a luminance down-sampling sub-network;
    所述对所述已编码或已解码重建的亮度分量进行下采样,包括:The down-sampling of the coded or decoded and reconstructed luminance component includes:
    通过所述亮度下采样子网络,对所述已编码或已解码重建的亮度分量进行下采样。Through the brightness down-sampling sub-network, down-sampling the coded or decoded and reconstructed brightness components.
  4. 一种帧内色度预测方法,其特征在于,应用于视频编码器,所述方法包括:An intra-frame chrominance prediction method, characterized in that it is applied to a video encoder, and the method includes:
    对亮度分量进行编码,得到亮度码流;Encode the luminance component to obtain the luminance code stream;
    获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;Acquiring the coded and reconstructed luminance component, the coded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be coded;
    通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求1至3任一项所述的帧内色度预测方法;Through rate-distortion optimization, the target chrominance prediction method with the least rate-distortion cost is determined from at least two chrominance prediction methods; wherein, the at least two chrominance prediction methods include a first-type chrominance prediction method and a second-type chrominance prediction method. Degree prediction mode, the first type of chroma prediction mode is the intra-frame chroma prediction method according to any one of claims 1 to 3;
    通过色度预测方式和指示信息之间的关联关系,生成所述目标色度预测方式对应的指示信息;Generating the indication information corresponding to the target chromaticity prediction mode through the association relationship between the chromaticity prediction mode and the indication information;
    将所述原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,所述预测得到的色度信息为通过所述目标色度预测方式进行色度预测后得出的色度信息;Perform a subtraction operation on the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is after chrominance prediction is performed through the target chrominance prediction method Chromaticity information obtained;
    对所述指示信息和所述色度残差信息进行编码,得到色度码流,并将所述色度码流与 所述亮度码流合并得到视频码流。The indication information and the chrominance residual information are encoded to obtain a chrominance code stream, and the chrominance code stream and the luminance code stream are combined to obtain a video code stream.
  5. 根据权利要求4所述的帧内色度预测方法,其特征在于,所述通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式,包括:The intra-frame chrominance prediction method according to claim 4, wherein the determining the target chrominance prediction method with the least rate-distortion cost from at least two chrominance prediction methods through rate-distortion optimization comprises:
    分别计算所述至少两种色度预测方式对应的率失真代价值;Respectively calculating the rate-distortion cost values corresponding to the at least two chromaticity prediction methods;
    将所述率失真代价值最小的色度预测方式确定为所述目标色度预测方式。The chromaticity prediction mode with the least cost-distortion cost is determined as the target chromaticity prediction mode.
  6. 根据权利要求4所述的帧内色度预测方法,其特征在于,所述指示信息具体为标志位数值;The intra-frame chrominance prediction method according to claim 4, wherein the indication information is specifically a flag bit value;
    所述通过色度预测方式和指示信息之间的关联关系,生成所述目标色度预测方式对应的指示信息,包括:The generating the indication information corresponding to the target chrominance prediction mode through the association relationship between the chrominance prediction mode and the indication information includes:
    通过色度预测方式和标志位数值之间的关联关系,将标志位设置为对应数值,以得到所述目标色度预测方式对应的指示信息。According to the association relationship between the chromaticity prediction mode and the value of the flag bit, the flag bit is set to the corresponding value to obtain the indication information corresponding to the target chromaticity prediction mode.
  7. 一种帧内色度预测方法,其特征在于,应用于视频解码器,所述方法包括:An intra-frame chrominance prediction method, characterized in that it is applied to a video decoder, and the method includes:
    获取视频编码器输出的视频码流;Obtain the video code stream output by the video encoder;
    对所述视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和用于确定色度预测方式的指示信息;Decoding the video code stream to obtain decoded and reconstructed luminance components, decoded and reconstructed adjacent chrominance information, and indication information for determining a chrominance prediction mode;
    根据所述指示信息,从至少两种色度预测方式中确定目标色度预测方式,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求1至3任一项所述的帧内色度预测方法;According to the instruction information, a target chroma prediction mode is determined from at least two chroma prediction modes, the at least two chroma prediction modes include a first type of chroma prediction mode and a second type of chroma prediction mode, the The first type of chroma prediction method is the intra-frame chroma prediction method according to any one of claims 1 to 3;
    根据所述已解码重建的亮度分量和所述已解码重建的相邻色度信息,通过所述目标色度预测方式对色度分量进行色度预测,得到色度预测结果;Performing chrominance prediction on the chrominance component through the target chrominance prediction mode according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information to obtain a chrominance prediction result;
    根据对所述视频码流中的色度残差信息进行解码后得到的残差和所述色度预测结果进行色度重建,得到输出色度。Perform chroma reconstruction according to the residual obtained after decoding the chroma residual information in the video bitstream and the chroma prediction result to obtain the output chroma.
  8. 根据权利要求7所述的帧内色度预测方法,其特征在于,所述指示信息具体为标志位数值;The intra-frame chrominance prediction method according to claim 7, wherein the indication information is specifically a flag bit value;
    所述根据所述指示信息,从至少两种色度预测方式中确定目标色度预测方式,包括:The determining the target chromaticity prediction mode from at least two chromaticity prediction modes according to the instruction information includes:
    当所述标志位数值为第一数值时,将所述第一类色度预测方式确定为所述目标色度预测方式;When the value of the number of flag bits is the first value, determining the first-type chromaticity prediction mode as the target chromaticity prediction mode;
    当所述标志位数值为第二数值时,将所述第二类色度预测方式确定为所述目标色度预测方式。When the value of the number of flag bits is the second value, the second-type chromaticity prediction mode is determined as the target chromaticity prediction mode.
  9. 一种帧内色度预测方法,其特征在于,包括:An intra-frame chrominance prediction method, characterized in that it comprises:
    视频编码器对亮度分量进行编码,得到亮度码流;获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;通过率失真优化从至少两 种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求1至3任一项所述的帧内色度预测方法;通过色度预测方式和指示信息之间的关联关系,生成所述目标色度预测方式的指示信息;将所述原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,所述预测得到的色度信息为通过所述目标色度预测方式进行色度预测后得出的色度信息;对所述指示信息和所述色度残差进行编码得到色度码流,并将所述色度码流与所述亮度码流合并得到视频码流;The video encoder encodes the luminance component to obtain the luminance code stream; obtains the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be encoded; Determine the target chrominance prediction method with the smallest rate-distortion cost among the two chrominance prediction methods; wherein, the at least two chrominance prediction methods include a first-type chrominance prediction method and a second-type chrominance prediction method. The first type of chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the target chrominance prediction method is generated through the association relationship between the chrominance prediction method and the indication information Indication information; subtracting the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is the color of the target chrominance prediction mode Chrominance information obtained after degree prediction; encoding the indication information and the chrominance residual error to obtain a chrominance code stream, and combining the chrominance code stream and the luminance code stream to obtain a video code stream;
    视频解码器获取所述视频码流;对所述视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和所述指示信息;根据所述指示信息,从所述至少两种色度预测方式中确定所述目标色度预测方式;根据所述已解码重建的亮度分量和所述已解码重建的相邻色度信息,通过所述目标色度预测方式对色度分量进行色度预测,得到色度预测结果;根据对所述视频码流中的色度残差信息进行解码后得到的残差和所述色度预测结果进行色度重建,得到输出色度。The video decoder obtains the video code stream; decodes the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information; The target chrominance prediction mode is determined in the at least two chrominance prediction modes; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, the target chrominance prediction mode The chrominance component performs chrominance prediction to obtain the chrominance prediction result; the chrominance reconstruction is performed according to the residual error obtained after decoding the chrominance residual information in the video bitstream and the chrominance prediction result to obtain the output chrominance .
  10. 一种视频编解码系统,其特征在于,包括视频编码器和视频解码器;A video encoding and decoding system, characterized in that it comprises a video encoder and a video decoder;
    所述视频编码器用于对亮度分量进行编码,得到亮度码流;获取已编码重建的亮度分量、已编码重建的相邻色度信息以及待编码色度块对应的原始色度信息;通过率失真优化从至少两种色度预测方式中确定具备最小率失真代价的目标色度预测方式;其中,所述至少两种色度预测方式包括第一类色度预测方式和第二类色度预测方式,所述第一类色度预测方式为如权利要求1至3任一项所述的帧内色度预测方法;通过色度预测方式和指示信息之间的关联关系,生成所述目标色度预测方式的指示信息;将所述原始色度信息与预测得到的色度信息进行相减操作,得到色度残差信息;其中,所述预测得到的色度信息为通过所述目标色度预测方式进行色度预测后得出的色度信息;对所述指示信息和所述色度残差进行编码得到色度码流,并将所述色度码流与亮度码流合并得到视频码流;The video encoder is used to encode the luminance component to obtain the luminance code stream; obtain the encoded and reconstructed luminance component, the encoded and reconstructed adjacent chrominance information, and the original chrominance information corresponding to the chrominance block to be encoded; pass rate distortion Optimizing the determination of a target chrominance prediction method with the smallest rate-distortion cost from at least two chrominance prediction methods; wherein the at least two chrominance prediction methods include a first-type chrominance prediction method and a second-type chrominance prediction method The first type of chrominance prediction method is the intra-frame chrominance prediction method according to any one of claims 1 to 3; the target chrominance is generated through the association relationship between the chrominance prediction method and the indication information Indication information of the prediction mode; subtracting the original chrominance information and the predicted chrominance information to obtain chrominance residual information; wherein the predicted chrominance information is predicted by the target chrominance The chrominance information obtained after chrominance prediction is performed in a manner; the indication information and the chrominance residual are encoded to obtain a chrominance code stream, and the chrominance code stream and the luminance code stream are combined to obtain a video code stream ;
    所述视频解码器用于获取所述视频码流;对所述视频码流进行解码,得到已解码重建的亮度分量、已解码重建的相邻色度信息和所述指示信息;根据所述指示信息,从所述至少两种色度预测方式中确定所述目标色度预测方式;根据所述已解码重建的亮度分量和所述已解码重建的相邻色度信息,通过所述目标色度预测方式对色度分量进行色度预测,得到色度预测结果;根据对所述视频码流中的色度残差信息进行解码后得到的残差和所述色度预测结果进行色度重建,得到输出色度。The video decoder is used to obtain the video code stream; decode the video code stream to obtain the decoded and reconstructed luminance component, the decoded and reconstructed adjacent chrominance information, and the indication information; according to the indication information , Determining the target chrominance prediction mode from the at least two chrominance prediction modes; according to the decoded and reconstructed luminance component and the decoded and reconstructed adjacent chrominance information, predict the target chrominance The chrominance component is predicted by the chrominance component to obtain the chrominance prediction result; the chrominance reconstruction is performed according to the residual error obtained after decoding the chrominance residual information in the video bitstream and the chrominance prediction result to obtain Output chromaticity.
  11. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1~3任一项所述帧内色度预测方法的步骤。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program as claimed in claim 1 to 3. Steps of any one of the intra-frame chroma prediction methods.
  12. 一种视频编码器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求4~6任一项所述帧内色度预测方法的步骤。A video encoder, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program as claimed in claim 4 Steps of the intra-frame chroma prediction method described in any one of ~6.
  13. 一种视频解码器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求7~8任一项所述帧内色度预测方法的步骤。A video decoder, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program as claimed in claim 7 Steps of the intra-frame chroma prediction method described in any one of ~8.
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1~3任一项所述帧内色度预测方法的步骤。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the frame described in any one of claims 1 to 3 The steps of the internal chromaticity prediction method.
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求4~6任一项所述帧内色度预测方法的步骤。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is executed by a processor to realize the frame described in any one of claims 4 to 6 The steps of the internal chromaticity prediction method.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求7~8任一项所述帧内色度预测方法的步骤。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the frame according to any one of claims 7 to 8 is realized. The steps of the internal chromaticity prediction method.
PCT/CN2019/103800 2019-08-30 2019-08-30 Intra-frame chroma prediction method and apparatus, device, and video coding and decoding system WO2021035717A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/103800 WO2021035717A1 (en) 2019-08-30 2019-08-30 Intra-frame chroma prediction method and apparatus, device, and video coding and decoding system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/103800 WO2021035717A1 (en) 2019-08-30 2019-08-30 Intra-frame chroma prediction method and apparatus, device, and video coding and decoding system

Publications (1)

Publication Number Publication Date
WO2021035717A1 true WO2021035717A1 (en) 2021-03-04

Family

ID=74684427

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103800 WO2021035717A1 (en) 2019-08-30 2019-08-30 Intra-frame chroma prediction method and apparatus, device, and video coding and decoding system

Country Status (1)

Country Link
WO (1) WO2021035717A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159874A (en) * 2004-09-08 2008-04-09 华为技术有限公司 intraframe coding based image chroma prediction technique
CN103260018A (en) * 2012-02-16 2013-08-21 乐金电子(中国)研究开发中心有限公司 Intra-frame image predictive encoding and decoding method and video codec
WO2018099579A1 (en) * 2016-12-02 2018-06-07 Huawei Technologies Co., Ltd. Apparatus and method for encoding an image
CN109842799A (en) * 2017-11-29 2019-06-04 杭州海康威视数字技术股份有限公司 The intra-frame prediction method and device of color component

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159874A (en) * 2004-09-08 2008-04-09 华为技术有限公司 intraframe coding based image chroma prediction technique
CN103260018A (en) * 2012-02-16 2013-08-21 乐金电子(中国)研究开发中心有限公司 Intra-frame image predictive encoding and decoding method and video codec
WO2018099579A1 (en) * 2016-12-02 2018-06-07 Huawei Technologies Co., Ltd. Apparatus and method for encoding an image
CN109842799A (en) * 2017-11-29 2019-06-04 杭州海康威视数字技术股份有限公司 The intra-frame prediction method and device of color component

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LI YUE; LI LI; LI ZHU; YANG JIANCHAO; XU NING; LIU DONG; LI HOUQIANG: "A hybrid neural network for chroma intra prediction", 2018 25TH IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING (ICIP), 7 October 2018 (2018-10-07), pages 1797 - 1801, XP033454967, ISSN: 2381-8549, DOI: 10.1109/ICIP.2018.8451396 *

Similar Documents

Publication Publication Date Title
CN110602491B (en) Intra-frame chroma prediction method, device and equipment and video coding and decoding system
WO2020253831A1 (en) Method and device for coding and decoding, and storage medium
CN107809642B (en) Method for encoding and decoding video image, encoding device and decoding device
CN105284111B (en) Dynamic image encoding device, moving image decoding apparatus, dynamic image encoding method, dynamic image decoding method and program
WO2014166434A1 (en) Method for coding/decoding depth image and coding/decoding device
WO2020237646A1 (en) Image processing method and device, and computer-readable storage medium
WO2016065872A1 (en) Image prediction method and relevant device
US11893762B2 (en) Method and data processing system for lossy image or video encoding, transmission and decoding
WO2021004153A1 (en) Image prediction method, coder, decoder, and storage medium
CN110753225A (en) Video compression method and device and terminal equipment
WO2020140218A1 (en) Motion information acquisition method and device for video coding or decoding
JP2018533273A5 (en)
WO2019228207A1 (en) Image encoding and decoding method , related device and storage medium
US10542277B2 (en) Video encoding
CN108632630A (en) A kind of bi-level image coding method of combination bit arithmetic and probabilistic forecasting
CN116600119B (en) Video encoding method, video decoding method, video encoding device, video decoding device, computer equipment and storage medium
WO2021035717A1 (en) Intra-frame chroma prediction method and apparatus, device, and video coding and decoding system
WO2023143349A1 (en) Facial video encoding method and apparatus, and facial video decoding method and apparatus
US20230232002A1 (en) Point cloud coding method, point cloud decoding method, and relevant apparatuses
JP2015019364A (en) Image compression apparatus and method
WO2020181554A1 (en) Method for determining prediction value, decoder, and computer storage medium
WO2023082107A1 (en) Decoding method, encoding method, decoder, encoder, and encoding and decoding system
CN115442617A (en) Video processing method and device based on video coding
CN108174201A (en) Terminate the video-frequency compression method of encoding block coding mode search in advance by video content
CN114501031B (en) Compression coding and decompression method and device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19943323

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19943323

Country of ref document: EP

Kind code of ref document: A1