Video encoding and decoding method, medium, equipment and method for processing video code stream

By using format flags in the VVC video encoding and decoding method to determine the target format type of the video frame, and enabling or disabling the relevant decoding methods according to this type, the problem of insufficient flexibility in the video encoding and decoding methods in the prior art is solved, and a more efficient and flexible video encoding and decoding process is achieved.

CN119562080APending Publication Date: 2025-03-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411270064.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2020-01-07
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing VVC video encoding and decoding methods are not flexible enough, making it difficult to adapt to the video encoding and decoding requirements of different format types.

Method used

By setting the format flags in the video parameter set, the target format type of the video frame is determined, and relevant decoding methods are enabled or disabled according to this type, such as joint Cb-Cr residual codec, cross component linear model, cross component adaptive loop filter and adaptive color transformation.

Benefits of technology

It improves the flexibility and efficiency of video encoding and decoding methods, avoids waste of resources caused by decoding methods that are not suitable for target format types, and ensures an efficient and accurate decoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562080A_ABST
    Figure CN119562080A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of video processing, and particularly provides a video coding and decoding method, a computer storage medium and electronic equipment for realizing the video coding and decoding method, and a method for processing a video code stream. The video decoding method comprises the following steps: acquiring a parameter set of a video to be decoded from an encoded video stream; determining a target format type of a target video frame in the to-be-decoded video according to the parameter set; determining a syntax element corresponding to the target decoding mode according to the target format type; and enabling or disabling the target decoding mode according to the value of the syntax element. Therefore, resource waste caused by trying to adopt a decoding mode not suitable for the target format type for decoding is avoided, the decoding mode suitable for the target format type can be efficiently and accurately determined, and the decoding efficiency is improved. And meanwhile, the decoding flexibility can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of application number 202010014736X filed on January 7, 2020, and invention name is “Video decoding method and device, video encoding method and device, medium and device”. Technical Field

[0002] The present disclosure relates to the field of video processing technology, and in particular to a video encoding and decoding method, a computer storage medium and an electronic device for implementing the video encoding and decoding method, and a method for processing a video code stream. Background Art

[0003] H.266 is a new generation of video codec standard based on H.265 / HEVC (High Efficient Video Coding). H.266 can be called VVC (Versatile Video Coding), which is continuously updated and improved under the guidance of JVET (Joint Video Experts Team).

[0004] VVC encodes videos of different formats (e.g., RGB format type, YUV format type), however, different encoding tools / encoding methods are used for original videos of different formats. Correspondingly, different decoding methods are used for encoded videos of different formats.

[0005] However, the flexibility of the video encoding and decoding method currently used by VVC needs to be improved.

[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure. Summary of the invention

[0007] The purpose of the present disclosure is to provide a video encoding and decoding method, a computer storage medium and an electronic device for implementing the above-mentioned video encoding and decoding method, and a method for processing a video code stream, thereby improving the flexibility of the video encoding and decoding method at least to a certain extent, and facilitating improving the efficiency of video encoding and decoding.

[0008] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0009] According to one aspect of the present disclosure, a video decoding method is provided, comprising:

[0010] A parameter set of a to-be-decoded video is obtained from an encoded video stream; a target format type of a target video frame in the to-be-decoded video is determined according to the parameter set; if the target format type is RGB, a target decoding method associated with the target format type is determined to include one or more of the following methods: a joint Cb-Cr residual codec JCCR, a cross-component linear model CCLM, and a cross-component adaptive loop filter CCALF; if the target format type is YUV, a target decoding method associated with the target format type is determined to include: an adaptive color transform ACT; a syntax element corresponding to the target decoding method is obtained; and according to the value of the syntax element, the target decoding method is enabled or disabled.

[0011] According to another aspect of the present disclosure, a video encoding method is provided, comprising:

[0012] Obtain a parameter set of a video to be encoded; determine a target format type of a target video frame in the video to be encoded according to the parameter set; if the target format type is RGB, determine that a target encoding method associated with the target format type includes one or more of the following methods: a joint Cb-Cr residual codec JCCR, a cross-component linear model CCLM, and a cross-component adaptive loop filter CCALF; if the target format type is YUV, determine that a target encoding method associated with the target format type includes: an adaptive color transform ACT; obtain a syntax element corresponding to the target encoding method; and enable or disable the target encoding method according to the value of the syntax element.

[0013] According to another aspect of the present disclosure, a video decoding device is provided, comprising:

[0014] The parameter set acquisition module is configured to: acquire the parameter set of the to-be-decoded video from the encoded video stream; the format type determination module is configured to: determine the target format type of the target video frame in the to-be-decoded video according to the parameter set; the syntax element determination module is configured to: if the target format type is RGB, determine that the target decoding mode associated with the target format type includes one or more of the following modes: joint Cb-Cr residual codec JCCR, cross component linear model CCLM and cross component adaptive loop filter CCALF; if the target format type is YUV, determine that the target decoding mode associated with the target format type includes: adaptive color transform ACT; acquire the syntax element corresponding to the target decoding mode; the decoding processing module is configured to: enable or disable the target decoding mode according to the value of the syntax element.

[0015] In some embodiments of the present disclosure, based on the above-mentioned solution, the parameter set acquisition module is specifically configured as follows:

[0016] Obtaining the video to be decoded from the encoded video stream and obtaining one or more of the following parameter sets of the video to be decoded: a video parameter set VPS, a sequence parameter set SPS, and a picture parameter set PPS.

[0017] In some embodiments of the present disclosure, based on the above-mentioned solution, the parameter set includes a format flag, and the above-mentioned format type determination module includes: a value determination unit and a format type determination unit.

[0018] Among them, the above-mentioned value determination unit is configured to: determine the value of the above-mentioned format flag in the above-mentioned parameter set; the above-mentioned format type determination unit is configured to: determine the target format type of the above-mentioned target video frame according to the value of the above-mentioned format flag.

[0019] In some embodiments of the present disclosure, based on the aforementioned scheme, in the above-mentioned sequence parameter set SPS, the above-mentioned format flag is: sps_rgb_format_flag; the above-mentioned value determination unit is specifically configured as: if sps_rgb_format_flag does not exist in the above-mentioned SPS, the value of the above-mentioned format flag is the first parameter; the above-mentioned format type determination unit is specifically configured as: when the value of the above-mentioned format flag is the above-mentioned first parameter, the above-mentioned target format type is YUV; when the value of the above-mentioned format flag is the second parameter, the above-mentioned target format type is RGB.

[0020] In some embodiments of the present disclosure, based on the aforementioned solution, the above decoding processing module includes: a flag value determination unit and a first processing unit / a second processing unit.

[0021] The flag value determination unit is configured to: obtain a parameter set of the video to be decoded, and obtain a value of a format flag for determining the target format type in the parameter set;

[0022] The first processing unit is configured to: determine the value of the syntax element based on the value of the format flag to prohibit sending the syntax element for identifying the start state of the target decoding mode;

[0023] The second processing unit is configured to set the value of the syntax element for identifying the start state of the target decoding mode to a preset value based on the value of the format flag and the decoding stream consistency, so as to enable or disable the target decoding mode.

[0024] In some embodiments of the present disclosure, based on the aforementioned scheme, the above-mentioned first processing unit is specifically configured to: use the value of the above-mentioned format flag as the conditional content of the conditional statement to determine the value of the syntax element, so as to prohibit sending the syntax element used to identify the startup status of the above-mentioned target decoding method.

[0025] In some embodiments of the present disclosure, based on the above scheme, if the value of the format flag is the second parameter, and the target decoding mode is JCCR, the first syntax element used to mark the activation state of the target decoding mode is sps_joint_cbcr_enabled_flag;

[0026] The second processing unit is specifically configured to: according to the decoding stream consistency, when the value of the format flag is the second parameter, set the value of the first syntax element sps_joint_cbcr_enabled_flag to 0.

[0027] In some embodiments of the present disclosure, based on the aforementioned scheme, when the value of the first syntax element sps_joint_cbcr_enabled_flag is set to 0, joint decoding of Cr (Chroma red) and Cb (Chroma blue) residual blocks is disabled.

[0028] In some embodiments of the present disclosure, based on the above scheme, if the value of the format flag is the second parameter, and the target decoding mode is CCLM, the second syntax element used to mark the activation state of the target decoding mode is sps_cclm_enabled_flag;

[0029] The second processing unit is specifically configured to: according to the decoding stream consistency, when the value of the format flag is the second parameter, set the value of the second syntax element sps_cclm_enabled_flag to 0.

[0030] In some embodiments of the present disclosure, based on the aforementioned solution, when the value of the second syntax element sps_cclm_enabled_flag is set to 0, intra prediction based on the cross-component linear model is disabled.

[0031] In some embodiments of the present disclosure, based on the aforementioned scheme, if the value of the above-mentioned format flag is the second parameter, and the above-mentioned target decoding mode is CCALF, then the third syntax element used to mark the startup status of the above-mentioned target decoding mode is the startup identifier corresponding to CCALF.

[0032] In some embodiments of the present disclosure, based on the above scheme, if the value of the format flag is the first parameter, and the target decoding mode is ACT, the fourth syntax element used to mark the activation state of the target decoding mode is sps_act_enabled_flag;

[0033] The second processing unit is specifically configured to: according to the decoding stream consistency, when the value of the format flag is the first parameter, set the value of the fourth syntax element sps_act_enabled_flag to 0.

[0034] In some embodiments of the present disclosure, based on the aforementioned solution, when the fourth syntax element sps_act_enabled_flag is set to 0, adaptive color transform decoding is disabled.

[0035] According to another aspect of the present disclosure, a video encoding device is provided, including:

[0036] The parameter set acquisition module is configured to: acquire the parameter set of the video to be encoded; the format type determination module is configured to: determine the target format type of the target video frame in the video to be encoded according to the format flag in the above parameter set; the syntax element determination module is configured to: determine the target encoding method associated with the target format type, and acquire the syntax element corresponding to the target encoding method; the encoding processing module is configured to: enable or disable the above target encoding method according to the value of the above syntax element.

[0037] According to one aspect of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the video decoding method or the video encoding method is implemented.

[0038] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned video decoding method, or implement the above-mentioned video encoding method, by executing the executable instructions.

[0039] According to one aspect of the present disclosure, a method for processing a video code stream is provided, wherein the video code stream is generated according to the above-mentioned video encoding method, or is decoded based on the above-mentioned decoding method.

[0040] It can be seen from the above technical solutions that the video encoding and decoding method in the exemplary embodiment of the present disclosure, the computer storage medium and electronic device for implementing the above video encoding and decoding method, and the method for processing a video code stream have at least the following advantages and positive effects:

[0041] In the technical solutions provided by some embodiments of the present disclosure, a parameter set of a video to be decoded is obtained from an encoded video stream, and a target format type of a target video frame in the video to be decoded is determined according to the parameter set. In view of the different decoding methods applicable to video frames of different format types, in the technical solution, if the target format type is RGB, the target decoding method associated with the target format type is determined to include one or more of the following methods: joint Cb-Cr residual codec JCCR, cross component linear model CCLM and cross component adaptive loop filter CCALF; if the target format type is YUV, the target decoding method associated with the target format type is determined to include: adaptive color transformation ACT; and obtaining the syntax element of the target decoding method; further, according to the value of the syntax element, the target decoding method is enabled or disabled. In the process of decoding the target video frame, the relevant target decoding method is disabled or enabled according to the value of the above syntax element, thereby avoiding the waste of resources caused by attempting to decode using a decoding method that is not applicable to the target format type, and is conducive to efficiently and accurately determining the decoding method applicable to the above target format type, thereby improving the decoding efficiency. At the same time, it is conducive to improving decoding flexibility.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0044] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present disclosure can be applied;

[0045] Figure 2 A schematic diagram showing a placement of a video encoder and a video decoder in a streaming environment exemplarily shown in the present disclosure;

[0046] Figure 3 A schematic diagram of encoding in an inter-frame prediction mode provided by an embodiment of the present disclosure is shown;

[0047] Figure 4 A schematic diagram of encoding in an intra-frame prediction mode provided by an embodiment of the present disclosure is shown;

[0048] Figure 5The schematic diagram shows that CCALF uses a diamond-shaped filter kernel;

[0049] Figure 6 The flowchart of the video decoding method according to the embodiment of the present disclosure is schematically shown;

[0050] Figure 7 The flowchart of a video decoding method according to another embodiment of the present disclosure is schematically shown;

[0051] Figure 8 The flowchart of the video encoding method according to the embodiment of the present disclosure is schematically shown;

[0052] Fig. 9 The structure diagram of the video decoding device according to the embodiment of the present disclosure is schematically shown;

[0053] Fig.10 A schematic diagram of the structure of a video encoding device according to an embodiment of the present disclosure is shown; and

[0054] Fig.11 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0055] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.

[0056] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0057] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0058] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0059] Figure 1 A schematic diagram of a system architecture of an exemplary application environment in which a video decoding method and apparatus, and a video encoding method and apparatus according to an embodiment of the present disclosure can be applied is shown.

[0060] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0061] The video decoding method provided in the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the video decoding device is generally set in the server 105. However, it is easy for those skilled in the art to understand that the video decoding method provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, and 103, and accordingly, the video decoding device can also be set in the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment.

[0062] For example, in an exemplary embodiment, the terminal devices 101, 102, and 103 may obtain the encoded video stream and send it to the server 105; thus, the server 105 obtains the parameter set of the video to be decoded from the encoded video stream; then, the server 105 determines the target format type of the target video frame in the video to be decoded according to the format flag in the parameter set. Further, the server 105 determines the syntax element corresponding to the target decoding method according to the target format type. Finally, the server 105 enables or disables the target decoding method according to the value of the syntax element.

[0063] Exemplarily, the server 105 may also send the decoded video to the terminal devices 101, 102, and 103. Thus, the user may view the decoded video through the terminal devices 101, 102, and 103.

[0064] As an example, Figure 2 The video encoder and video decoder are shown in a streaming environment. The disclosed subject matter is equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV (Television), storing compressed video on digital media including CD (Compact Disc), DVD (Digital Versatile Disc), memory sticks, etc., and the like.

[0065] refer to Figure 2 , the streaming system may include an acquisition subsystem 213, wherein the acquisition subsystem 213 may include a video source 201 such as a digital camera, which creates an uncompressed video picture stream 202. In an embodiment, the video picture stream 202 includes samples taken by a digital camera. Compared to the encoded video data 204 (or the encoded video bitstream), the video picture stream 202 is depicted as a thick line to emphasize the high data volume of the video picture stream, and the video picture stream 202 can be processed by an electronic device 220, which includes a video encoder 203 coupled to the video source 201.

[0066] Among them, the video encoder 203 may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video picture stream 202, the encoded video data 204 (or the encoded video bitstream) is depicted as a thin line to emphasize the lower amount of data of the encoded video data 204 (or the encoded video bitstream), which can be stored on the streaming server 205 for future use.

[0067] In addition, the streaming system may also include one or more streaming client subsystems. Figure 2 The client subsystem 206 and the client subsystem 208 in the streaming server 205 can access the streaming server 205 to retrieve the copy 207 and the copy 209 of the encoded video data 204, respectively. The client subsystem 206 may include, for example, a video decoder 210 in the electronic device 230. Among them, the video decoder 210 decodes the incoming copy 207 of the encoded video data and generates an output video picture stream 211 that can be presented on a display 212 (e.g., a display screen) or another presentation device (not depicted). In some streaming systems, the encoded video data 204, the video data 207, and the video data 209 (e.g., video bitstreams) may be encoded according to certain video encoding / compression standards.

[0068] It should be noted that the electronic device 220 and the electronic device 230 may include other components (not shown). For example, the electronic device 220 may include a video decoder (not shown), and the electronic device 230 may further include a video encoder (not shown). The video decoder is used to decode the received encoded video data; the video encoder is used to encode the video data.

[0069] In an exemplary embodiment, when encoding an image block in a video frame, an inter-frame prediction mode or an intra-frame prediction mode may be used, for example, Figure 3 As shown, for the inter-frame prediction mode: the encoded reference block 31 is located in the encoded video frame, and the block to be encoded 32 is located in the video frame to be encoded, that is, the encoded reference block 31 and the block to be encoded 32 are located in two different video frames. Figure 4 As shown, for the intra-frame prediction mode: the encoded reference block 41 and the block to be encoded 42 are both located in the video frame to be encoded, that is, the encoded reference block 41 and the block to be encoded 42 are located in the same video frame. Specifically, a prediction block is generated based on one or more encoded reference blocks. The prediction block can be an estimated version of the original block. A residual block can be generated by subtracting the original block from the prediction block, and vice versa. The residual block can be used to represent the prediction residual (or prediction error).

[0070] Exemplarily, some basic concepts involved in this technical solution are introduced and explained.

[0071] 1. Video frame format type

[0072] 1.1. About RGB format type

[0073] RGB (Red, Green, Blue) is a color encoding method. RGB format type video frames use RGB color components to save color information to record computer images / video frames. Specifically, there are three electron guns inside the cathode ray tube (CathodeRay Tube) display. The electron guns activate the phosphors on the display screen. The light emitted by the three phosphors generates a color point at a pixel position, which is a pixel that our human eyes can see. Among them, each pixel corresponds to three intensity levels of red, green, and blue (R, G, B).

[0074] 1.2. About YUV format type

[0075] YUV is also a color encoding method. The video frame in YUV format is divided into three components: Y / U / V. Among them, "Y" represents brightness (Luminance or Luma), that is, the grayscale value of the video frame; and "U" and "V" represent chrominance (Chrominance or Chroma), which is used to describe the color and saturation of the video frame.

[0076] YUV format video frames can be used in television systems and analog video fields to separate brightness information (Y) from color information (UV). Without UV information, the complete image can be displayed, but in black and white, thus solving the compatibility problem between color TV and black and white TV. At the same time, unlike RGB format video frames, YUV format video frames do not require three independent video signals to be transmitted simultaneously, so the transmission of YUV format video frames occupies less bandwidth.

[0077] 1.3. Conversion between YUV format video frames and RGB format video frames

[0078] Using linear transformation, a video frame in RGB format can be converted to a video frame in YUV format in the following way:

[0079] Y=((66*R+129*G+25*B+128)>>8)+16

[0080] U=((-38*R-74*G+112*B+128)>>8)+128

[0081] V=((112*R-94*G-18*B+128)>>8)+128

[0082] 2. JCCR (Joint Cb Cr residual coding / decoding) method

[0083] VVC draft 6 adopts the JCCR codec mode, which uses the joint coding and decoding method of Cr (Chroma red, red chroma) and Cb (Chroma blue, blue chroma) residual blocks to improve the coding efficiency of chroma. The activation of the joint chroma coding mode is indicated by the TU (Transform Unit)-level syntax element tu_joint_cbcr-_residual flag, and the mode contains 3 chroma residual coding sub-modes, as shown in Table 1 below:

[0084] Table 1

[0085]

[0086] Referring to Table 1, the sub-mode of JCCR can be inferred from the two syntax elements tu_cbf_cb and tu_cbf_cr of the chrominance component.

[0087] 3. CCLM (Cross-component linear model) method

[0088] In order to reduce cross-component redundancy, CCLM prediction mode is used in VVC. CCLM belongs to Figure 4 The intra prediction mode shown is an inter-component prediction. Specifically, it includes two inter-component predictions: one is the prediction of chrominance components by luminance components, and the other is the prediction of Cr (Chroma red) by Cb (Chroma blue). The following linear model can be used to predict chrominance components based on the reconstructed luminance components of the same coded unit:

[0089] pred C (i,j)=α·rec L '(i,j)+β

[0090] Among them, pred C (i,j) represents the predicted chrominance component in the coding block, rec L '(i,j) represents the downsampled reconstructed luminance component of the same coding block. The CCLM linear model parameters "α" and "β" are determined by the 4 chrominance pixel values ​​of the chrominance component and the 4 reconstructed luminance values ​​corresponding to the chrominance after downsampling. According to the width and height of the chrominance block, CCLM is divided into three modes, LM, LM-A and LM-L, and the 4 chrominance pixels of CCLM are selected accordingly.

[0091] 4. CCALF (Cross-Component Adaptive Loop Filter) method

[0092] CCALF is proposed in JVET-O0636, which is a linear loop filtering technology that corrects the corresponding chrominance component value according to the brightness component pixel value. Specifically, Figure 5 It shows that CCALF uses a diamond-shaped filter kernel, where the filter formula of CCALF is as follows:

[0093]

[0094]

[0095] sum = curr + (( sum + 64) >> 7) (2)

[0096] In formula (1), f[] represents the filter coefficient of CCALF, recPictureL represents the input pixel value of CCALF, and curr represents the input chrominance pixel value of CCALF. In formula (2), curr represents the chrominance pixel value before CCALF, and sum represents the final filter value of CCALF. The filter coefficient of CCALF will be encoded and transmitted in APS.

[0097] 5. ACT (Adaptive Colour Transform) encoding method

[0098] In order to achieve efficient coding of RGB video content, Adaptive Color Transform (ACT) is adopted in the HEVC Screen Content Coding Extension Software Test Model, which can perform spatial transformation operations on residual blocks in the residual domain and use a CU (Coding Unit) level flag to indicate the use of color space transformation.

[0099] It should be noted that the above video frame formats are all shown as examples, and the technical solutions provided by the present disclosure are not limited to RGB format types and YUV format types. The above video codecs are all shown as examples, and the technical solutions provided by the present disclosure are not limited to JCCR, CCLM, CCALF and ACT formats.

[0100] Another point to be noted is that the technical solution provided in the embodiments of the present disclosure can be applied to the H.266 / VCC standard or the next generation video coding and decoding standard, and the embodiments of the present disclosure are not limited to this.

[0101] Another point to be explained is that, in the video decoding method provided in the embodiment of the present disclosure, the executor of each step is a decoding end device, and the executor of each step of the video encoding method provided in the embodiment of the present disclosure is an encoding end device. Both the decoding end device and the encoding end device can be computer devices, and the computer device refers to an electronic device with data calculation, processing and storage capabilities, such as a PC, a mobile phone, a tablet computer, a media player, a dedicated video conferencing device, a server, etc.

[0102] In addition, the method provided by the present disclosure can be used alone or in combination with other methods in any order. The encoder and decoder based on the method provided by the present disclosure can be implemented by one or more processors or one or more integrated circuits. Below, the technical solution of the present disclosure is introduced and explained through several embodiments.

[0103] Figure 6 The flowchart of the video decoding method according to the embodiment of the present disclosure is schematically shown. In this embodiment, the method is mainly applied to the decoding end device introduced above as an example. Figure 6The method may include steps S610 to S640.

[0104] In step S610, a parameter set of a video to be decoded is obtained from an encoded video stream; and in step S620, a target format type of a target video frame in the video to be decoded is determined according to a format flag in the parameter set.

[0105] Since different decoding methods are applicable to video frames of different formats, this embodiment takes RGB and YUV video formats as examples for explanation: the correlation degree between the three channels of the RGB video frame is different from the correlation degree between the channels in the YUV video frame, so the YUV video encoding and decoding tools that use the correlation between channels, such as JCCR, CCLM, CCALC, etc., are not applicable to decoding RGB video frames; similarly, ACT, which is applicable to decoding RGB video frames, is not applicable to decoding YUV video frames. Therefore, if the format type of the video frame to be decoded is not distinguished during the decoding process, the decoding efficiency will be low and the decoding flexibility will be low.

[0106] In view of the above technical problems, the technical solution adopts the method of setting a format flag in the video parameter set to indicate the format type of the video frame. Therefore, when decoding the target video frame, the format type of the target video frame (which can be recorded as "target format type") can be determined according to the format flag in the parameter set.

[0107] In an exemplary embodiment, the format flag can be set in a video parameter set (VPS), a sequence parameter set (SPS), or a picture parameter set (VPS). Among them, VPS is the highest-level syntax element, which is a parameter shared by multiple video frames; SPS saves a set of global parameters of a coded video sequence (Coded videosequence). A coded video sequence is a sequence of structures composed of pixel data of each frame of the original video after encoding. The parameters on which the encoded data of each frame depends are stored in PPS.

[0108] Further, by obtaining a parameter set including a format flag, the target format type of the target video frame can be determined according to the format flag in the parameter set. Exemplarily, in this embodiment, the format flag of the target video frame is set in the SPS (as shown in Table 2). Referring to the shaded text portion in Table 2, the format flag can be represented as: sps_rgb_format_flag.

[0109] Table 2

[0110]

[0111] In an exemplary embodiment, further, the target format type of the target video frame is determined by the value of the format flag in the parameter set. In this embodiment, referring to Table 2, if the value of the format flag sps_rgb_format_flag is 0, the target format type corresponding to the target video frame is YUV; if the value of the format flag is 1, the target format type corresponding to the target video frame is RGB. It should be noted that if sps_rgb_format_flag does not exist in the SPS, the value of the format flag is 0, that is, the target format type corresponding to the target video frame is YUV.

[0112] Continue to refer Figure 6 After determining the format type of the target video frame, in step S630, the syntax elements corresponding to the target decoding method are determined according to the target format type.

[0113] In view of the different decoding methods applicable to video frames of different formats, in order to improve the video decoding efficiency and the decoding flexibility for video frames of different formats, the present technical solution obtains a decoding method that is not applicable to the above target format type in this embodiment. In other words, the above target decoding method is a decoding method that is not applicable to the above target format type.

[0114] In an exemplary embodiment, the RGB format type and the YUV format type are still used as examples for description. If the target format type is RGB, the target decoding method associated with the target format type is determined to include one or more of the following methods: JCCR, CCLM, and CCALF. If the target format type is YUV, the target decoding method associated with the target format type is determined to include ACT.

[0115] Further obtain the syntax elements of the above target decoding mode. Exemplarily, in SPS, the syntax elements of JCCR can be expressed as: sps_joint_cbcr_enabled_flag; the syntax elements of CCLM can be expressed as: sps_cclm_enabled_flag; the syntax elements of CCALF can be expressed as: sps_cclm_enabled_flag; the syntax elements of JCCALF can be expressed as: sps_ccalf_enabled_flag; the syntax elements of JCCR can be expressed as: sps_act_enabled_flag. It should be noted that the syntax elements of the above decoding modes are only shown for example.

[0116] After the syntax elements of the decoding method that is not applicable to the above target format type are determined by the embodiment corresponding to step S630, further, in step S640, the target decoding method is enabled or disabled according to the value of the syntax element. In the process of decoding the target video frame, the decoding method that is not applicable to the above target video format is disabled, or the decoding method that is applicable to the above target video format is enabled, thereby avoiding the waste of resources caused by attempting to use a decoding method that is not applicable to the target format type for decoding, and is conducive to efficiently and accurately determining the decoding method that is applicable to the above target format type, thereby improving decoding efficiency. At the same time, it is conducive to improving decoding flexibility.

[0117] In an exemplary embodiment, Figure 7 The flowchart of the video decoding method according to another embodiment of the present disclosure is schematically shown. Figure 7 The method includes step S710, step S721 and step S722.

[0118] In step S710, a parameter set of the video to be decoded is obtained, and a value of a format flag for determining the target format type is obtained in the parameter set.

[0119] As mentioned above, since the format flag can be set in VPS, PPS or SPS, the format flag used to determine the target format type is obtained in the above parameter set in this embodiment. For example, in Table 2 above, the format flag sps_rgb_format_flag and the value of sps_rgb_format_flag are obtained in SPS.

[0120] In step S721, the value of the syntax element is determined based on the value of the format flag to prohibit sending the syntax element for identifying the activation state of the target decoding mode.

[0121] In an exemplary embodiment, different format types of the video frame to be decoded may be specifically indicated by different values ​​of the format flag. For example, in this embodiment, the target video frame may be of RGB format type or YUV format type, then the value of the format flag may be "first parameter" to indicate that the current target video frame is of YUV format type, and the value of the format flag may be "second parameter" to indicate that the current target video frame is of RGB format type. The above "first parameter" and "second parameter" may be different identifiers.

[0122] In this embodiment, the value "first parameter" of the format flag sps_rgb_format_flag can be represented by "0", and the value "second parameter" can be represented by "1".

[0123] In an exemplary embodiment, the value of the format flag bit can be used as the conditional content of the conditional statement to determine the value of the syntax element, so as to prohibit the sending of the syntax element used to identify the start state of the target decoding mode. The specific implementation of step S721 is divided into two cases according to the target format type:

[0124] Case 1: When the format type of the target video frame is RGB (i.e., the value of sps_rgb_format_flag obtained in the SPS is 1), the decoding method that is not suitable for decoding the video frame in RGB format is prohibited. In this embodiment, JCCR, CCLM and CCALF are prohibited. Specifically refer to the shaded text part in Table 3:

[0125] Table 3

[0126]

[0127]

[0128] (1) When the target decoding mode is JCCR, if (!sps_rgb_format_flag) is 0, the first method element sps_joint_cbcr_enabled_flag used to mark the JCCR enabled state of the target decoding mode is not executed. That is, the value of the format flag sps_rgb_format_flag is used as the conditional content of the conditional statement to prohibit the JCCR mode from being enabled.

[0129] (2) When the target decoding mode is CCLM, if (!sps_rgb_format_flag) is 0, the second syntax element sps_cclm_enabled_flag used to mark the CCLM activation state of the target decoding mode is not executed. That is, the value of the format flag sps_rgb_format_flag is used as the conditional content of the conditional statement to prohibit the activation of the CCLM mode.

[0130] (3) When the target decoding mode is CCALF, if (!sps_rgb_format_flag) takes a value of 0, the third syntax element (the specific syntax element representation method is not limited) used to mark the CCLM start state of the target decoding mode is not executed. That is, the value of the format flag sps_rgb_format_flag is used as the conditional content of the conditional statement to prohibit the activation of the CCALF mode.

[0131] Case 2: When the format type of the target video frame is YUV (i.e., the value of sps_rgb_format_flag obtained in SPS is 0), the decoding method that is not suitable for decoding YUV format video frames is prohibited. In this embodiment, ACT is prohibited. For details, refer to the shaded text in Table 4:

[0132] Table 4

[0133]

[0134] When the target decoding mode is ACT, if (sps_rgb_format_flag) is 0, the fourth method element sps_act_enabled_flag for marking the ACT activation state of the target decoding mode is not executed. That is, the value of the format flag sps_rgb_format_flag is used as the conditional content of the conditional statement to prohibit the activation of the ACT mode.

[0135] In an exemplary embodiment, in addition to prohibiting the enabling of the above-mentioned target decoding mode as shown in step S721, the present technical solution also provides step S722: based on the value of the format flag and the decoding stream consistency, the value of the syntax element used to identify the startup state of the target decoding mode is set to a preset value to enable or disable the target decoding mode.

[0136] The specific implementation of step S722 is divided into two cases according to the target format type:

[0137] Case 1: When the format type of the target video frame is RGB (i.e., the value of sps_rgb_format_flag obtained in the SPS is 1), the decoding method that is not suitable for decoding the video frame in RGB format is prohibited. In this embodiment, JCCR, CCLM and CCALF are prohibited. For details, refer to the shaded text part in Table 5:

[0138] Table 5

[0139]

[0140] Referring to Table 5, when the value of the format flag bit sps_rgb_format_flag is 1:

[0141] (1) According to the decoding stream consistency, it is stipulated that the value of the first syntax element sps_joint_cbcr_enabled_flag is set to 0. When the value of the first syntax element sps_joint_cbcr_enabled_flag is set to 0, the joint encoding of chroma residuals of Cr and Cb is disabled, thereby prohibiting the JCCR mode from being enabled. In addition, when the value of sps_joint_cbcr_enabled_flag is 1, the joint encoding of chroma residuals of Cr and Cb is enabled.

[0142] (2) According to the decoding stream consistency, it is stipulated that the value of the second syntax element sps_cclm_enabled_flag is set to 0. When the value of the second syntax element sps_cclm_enabled_flag is set to 0, intra prediction based on the cross-component linear model is disabled, thereby playing the role of prohibiting the CCLM mode from being enabled. In addition, when the value of sps_cclm_enabled_flag is 1, intra prediction based on the cross-component linear model is enabled.

[0143] (3) According to the consistency of the decoding stream, the value of the third syntax element (i.e., the activation flag corresponding to CCALF, the specific syntax element representation method is not limited) is set to 0 to play the role of prohibiting the activation of the CCALF mode.

[0144] Case 2: When the format type of the target video frame is YUV (i.e., the value of sps_rgb_format_flag obtained in SPS is 0), the decoding method that is not suitable for decoding YUV format video frames is prohibited. In this embodiment, ACT is prohibited. For details, refer to the shaded text in Table 6:

[0145] Table 6

[0146]

[0147] Referring to Table 6, when the value of the format flag sps_rgb_format_flag is 0, according to the decoding stream consistency, it is specified that the value of the fourth syntax element sps_rgb_format_flag is set to 0. When the value of sps_rgb_format_flag is set to 0, the adaptive color transform decoding tool will be disabled, and the syntax element cu_act_enabled_flag will not appear at the decoding unit layer, thereby playing the role of disabling the activation of the ACT mode.

[0148] In addition, when the value of sps_act_enabled_flag is 1, the adaptive color transform decoding tool will be enabled, and the syntax element cu_act_enabled_flag will appear at the decoding unit layer, so that the ACT mode can be enabled.

[0149] It should be noted that the format type of the video frame in the above embodiment is described by taking YUV and RGB as examples. When it is determined that the format type of the target video frame is A, any other encoding method (such as encoding method x, encoding method y) that is not applicable to the decoding format type A can be obtained, and further, encoding method x and encoding method y are disabled for decoding the above target video frame. At the same time, when it is determined that the format type of the target video frame is A, any other encoding method (such as encoding method m, encoding method n) that is applicable to the decoding format type A can also be obtained, and further, encoding method m and encoding method n are enabled for decoding the above target video frame. Thereby, the waste of resources caused by attempting to decode using a decoding method that is not applicable to the target format type is avoided, and it is conducive to efficiently and accurately determining the decoding method applicable to the above target format type, thereby improving the decoding efficiency. At the same time, it is conducive to improving the decoding flexibility.

[0150] Figure 8 The flowchart of the video encoding method according to the embodiment of the present disclosure is schematically shown. In this embodiment, the method is mainly applied to the encoding end device introduced above as an example. Figure 8 , the method may include:

[0151] Step S810, obtaining a parameter set of a video to be encoded;

[0152] Step S820, determining a target format type of a target video frame in the video to be encoded according to the format flag in the parameter set;

[0153] Step S830, determining a syntax element corresponding to a target encoding method according to the target format type; and

[0154] Step S840: enabling or disabling the target coding mode according to the value of the syntax element.

[0155] Figure 8In the technical solution provided by the illustrated embodiment, the target format type of the video frame to be encoded is determined according to the format flag in the parameter set. In view of the different encoding methods applicable to video frames of different format types, the technical solution also determines the syntax element corresponding to the target encoding method according to the above-mentioned target format type, and further, the value of the syntax element enables or disables the target encoding method. In the process of encoding the target video frame, the relevant target encoding method is disabled or enabled according to the value of the above-mentioned syntax element, thereby avoiding the waste of resources caused by attempting to use an encoding method that is not suitable for the target format type for encoding, and is conducive to efficiently and accurately determining the encoding method applicable to the above-mentioned target format type, thereby improving encoding efficiency. At the same time, it is conducive to improving encoding flexibility.

[0156] In addition, the encoding process of the encoding end device corresponds to the decoding process of the decoding end device. For details not described in detail in the encoding process, please refer to the introduction and description in the above embodiment of the decoding process, which will not be repeated here.

[0157] Those skilled in the art will appreciate that all or part of the steps to implement the above embodiments are implemented as a computer program executed by a processor (including a CPU and a GPU). When the computer program is executed by the CPU, the above functions defined by the above method provided by the present disclosure are executed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0158] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiment of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0159] The following introduces an embodiment of a video decoding device of the present disclosure, which can be used to execute the above-mentioned video decoding method of the present disclosure.

[0160] Fig. 9 FIG. 2 is a schematic diagram showing the structure of a video decoding device in an exemplary embodiment of the present disclosure. Fig. 9 As shown, the video decoding device 900 includes: a parameter set acquisition module 901, a format type determination module 902, a syntax element determination module 903, and a decoding processing module 904.

[0161] The parameter set acquisition module 901 is configured to: acquire a parameter set of a video to be decoded from an encoded video stream;

[0162] The format type determination module 902 is configured to: determine the target format type of the target video frame in the video to be decoded according to the format flag in the parameter set;

[0163] The syntax element determination module 903 is configured to: determine the syntax element corresponding to the target decoding mode according to the target format type; and

[0164] The decoding processing module 904 is configured to enable or disable the target decoding mode according to the value of the syntax element.

[0165] In some embodiments of the present disclosure, based on the above solution, the parameter set acquisition module 901 is specifically configured as follows:

[0166] Obtaining the video to be decoded from the encoded video stream and obtaining one or more of the following parameter sets of the video to be decoded: a video parameter set VPS, a sequence parameter set SPS, and a picture parameter set PPS.

[0167] In some embodiments of the present disclosure, based on the above-mentioned solution, the format type determination module 902 includes: a value determination unit and a format type determination unit.

[0168] Among them, the above-mentioned value determination unit is configured to: determine the value of the above-mentioned format flag in the above-mentioned parameter set; the above-mentioned format type determination unit is configured to: determine the target format type of the above-mentioned target video frame according to the value of the above-mentioned format flag.

[0169] In some embodiments of the present disclosure, based on the aforementioned scheme, in the above-mentioned sequence parameter set SPS, the above-mentioned format flag is: sps_rgb_format_flag; the above-mentioned value determination unit is specifically configured as: if sps_rgb_format_flag does not exist in the above-mentioned SPS, the value of the above-mentioned format flag is the first parameter; the above-mentioned format type determination unit is specifically configured as: when the value of the above-mentioned format flag is the above-mentioned first parameter, the above-mentioned target format type is YUV; when the value of the above-mentioned format flag is the second parameter, the above-mentioned target format type is RGB.

[0170] In some embodiments of the present disclosure, based on the aforementioned scheme, the above-mentioned syntax element determination module 903 is specifically configured as follows: if the above-mentioned target format type is RGB, then determining that the target decoding method associated with the above-mentioned target format type includes one or more of the following methods: JCCR, CCLM and CCALF; and obtaining the syntax elements of the above-mentioned target decoding method.

[0171] In some embodiments of the present disclosure, based on the aforementioned scheme, the above-mentioned syntax element determination module 903 is specifically configured as follows: if the above-mentioned target format type is YUV, then determining that the target decoding method associated with the above-mentioned target format type includes: ACT; and obtaining the syntax elements of the above-mentioned target decoding method.

[0172] In some embodiments of the present disclosure, based on the above-mentioned solution, the decoding processing module 904 includes: a flag value determination unit and a first processing unit / a second processing unit.

[0173] The flag value determination unit is configured to: obtain a parameter set of the video to be decoded, and obtain a value of a format flag for determining the target format type in the parameter set;

[0174] The first processing unit is configured to: prohibit sending a syntax element for identifying a start state of the target decoding mode based on a value of the format flag;

[0175] The second processing unit is configured to set the value of the syntax element used to identify the start state of the target decoding mode to a preset value based on the value of the format flag and the decoding stream consistency.

[0176] In some embodiments of the present disclosure, based on the aforementioned scheme, the above-mentioned first processing unit is specifically configured to: use the value of the above-mentioned format flag as the conditional content of the conditional statement to determine the value of the syntax element, so as to prohibit sending the syntax element used to identify the startup status of the above-mentioned target decoding method.

[0177] In some embodiments of the present disclosure, based on the above scheme, if the value of the format flag is the second parameter, and the target decoding mode is JCCR, the first syntax element used to mark the activation state of the target decoding mode is sps_joint_cbcr_enabled_flag;

[0178] The second processing unit is specifically configured to: according to the decoding stream consistency, when the value of the format flag is the second parameter, set the value of the first syntax element sps_joint_cbcr_enabled_flag to 0.

[0179] In some embodiments of the present disclosure, based on the aforementioned scheme, when the value of the first syntax element sps_joint_cbcr_enabled_flag is set to 0, joint decoding of Cr (Chroma red) and Cb (Chroma blue) residual blocks is disabled.

[0180] In some embodiments of the present disclosure, based on the above scheme, if the value of the format flag is the second parameter, and the target decoding mode is CCLM, the second syntax element used to mark the activation state of the target decoding mode is sps_cclm_enabled_flag;

[0181] The second processing unit is specifically configured to: according to the decoding stream consistency, when the value of the format flag is the second parameter, set the value of the second syntax element sps_cclm_enabled_flag to 0.

[0182] In some embodiments of the present disclosure, based on the aforementioned solution, when the value of the second syntax element sps_cclm_enabled_flag is set to 0, intra prediction based on the cross-component linear model is disabled.

[0183] In some embodiments of the present disclosure, based on the aforementioned scheme, if the value of the above-mentioned format flag is the second parameter, and the above-mentioned target decoding mode is CCALF, then the third syntax element used to mark the startup status of the above-mentioned target decoding mode is the startup identifier corresponding to CCALF.

[0184] In some embodiments of the present disclosure, based on the above scheme, if the value of the format flag is the first parameter, and the target decoding mode is ACT, the fourth syntax element used to mark the activation state of the target decoding mode is sps_act_enabled_flag;

[0185] The second processing unit is specifically configured to: according to the decoding stream consistency, when the value of the format flag is the first parameter, set the value of the fourth syntax element sps_act_enabled_flag to 0.

[0186] In some embodiments of the present disclosure, based on the aforementioned solution, when the fourth syntax element sps_act_enabled_flag is set to 0, adaptive color transform decoding is disabled.

[0187] The specific details of each unit in the above video decoding device have been described in detail in the video decoding method in the specification, so they will not be repeated here.

[0188] The following introduces an embodiment of a video encoding device of the present disclosure, which can be used to execute the above-mentioned video encoding method of the present disclosure.

[0189] Fig.10 FIG. 2 is a schematic diagram showing the structure of a video decoding device in an exemplary embodiment of the present disclosure. Fig.10As shown, the video encoding device 1000 includes: a parameter set acquisition module 1001, a format type determination module 1002, a syntax element determination module 1003, and an encoding processing module 1004.

[0190] The parameter set acquisition module 1001 is configured to: acquire a parameter set of a video to be encoded;

[0191] The format type determination module 1002 is configured to: determine the target format type of the target video frame in the to-be-encoded video according to the format flag in the parameter set;

[0192] The syntax element determination module 1003 is configured to: determine the syntax element corresponding to the target encoding method according to the target format type; and

[0193] The encoding processing module 1004 is configured to enable or disable the target encoding method according to the value of the syntax element.

[0194] Since the specific details of each unit in the above video encoding device have been described in the video encoding method of the specification, they will not be repeated here.

[0195] Fig.11 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.

[0196] It should be noted that Fig.11 The computer system 1100 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0197] like Fig.11 As shown, the computer system 1100 includes a processor 1101 (including: a graphics processing unit (GPU), a central processing unit (CPU)), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 to the random access memory (RAM) 1103. Various programs and data required for system operation are also stored in the RAM 1103. The CPU 1101, the ROM 1102 and the RAM 1103 are connected to each other through a bus 1104. The input / output (I / O) interface 1105 is also connected to the bus 1104.

[0198] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.

[0199] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1109, and / or installed from a removable medium 1111. When the computer program is executed by a central processing unit (CPU) 1101, various functions defined in the system of the present disclosure are executed.

[0200] It should be noted that the computer-readable medium shown in the embodiment of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0201] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0202] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0203] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0204] For example, the electronic device can implement Figure 6 As shown in: step S610, obtaining a parameter set of a to-be-decoded video from an encoded video stream; and in step S620, determining a target format type of a target video frame in the to-be-decoded video according to a format flag in the parameter set; step S630, determining a syntax element corresponding to a target decoding method according to the target format type; and, step S640, enabling or disabling the target decoding method according to a value of the syntax element.

[0205] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0206] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0207] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0208] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A video decoding method, characterized in that: The method comprises: Obtaining a parameter set of a video to be decoded from an encoded video stream; Determining a target format type of a target video frame in the video to be decoded according to the parameter set; If the target format type is RGB, the target decoding method associated with the target format type is determined to include one or more of the following methods: joint Cb-Cr residual codec JCCR, cross component linear model CCLM and cross component adaptive loop filter CCALF; if the target format type is YUV, the target decoding method associated with the target format type is determined to include: adaptive color transform ACT; Obtaining syntax elements of the target decoding mode; The target decoding mode is enabled or disabled according to the value of the syntax element.

2. The video decoding method according to claim 1, characterized in that: The step of obtaining a parameter set of a video to be decoded from an encoded video stream includes: One or more of the following parameter sets of the video to be decoded are obtained from the encoded video stream: video parameter set VPS, sequence parameter set SPS, and picture parameter set PPS.

3. The video decoding method according to claim 2, characterized in that: The parameter set includes a format flag, and determining a target format type of a target video frame in the to-be-decoded video according to the parameter set includes: Determine the value of the format flag in the parameter set; The target format type of the target video frame is determined according to the value of the format flag.

4. The video decoding method according to claim 3, characterized in that: In the sequence parameter set SPS, the format flag is: sps_rgb_format_flag; The determining a value of the format flag in the parameter set includes: If sps_rgb_format_flag does not exist in the SPS, the value of the format flag is the first parameter; The determining the target format type of the target video frame according to the value of the format flag bit includes: When the value of the format flag is the first parameter, the target format type is YUV; when the value of the format flag is the second parameter, the target format type is RGB.

5. The video decoding method according to any one of claims 1 to 4, characterized in that: The enabling or disabling of the target decoding mode according to the value of the syntax element includes: Acquire a parameter set of the video to be decoded, and acquire a value of a format flag used to determine the target format type in the parameter set; The value of the syntax element is determined based on the value of the format flag to prohibit sending the syntax element used to identify the startup state of the target decoding mode; or, based on the value of the format flag and the consistency of the decoding stream, the value of the syntax element used to identify the startup state of the target decoding mode is set to a preset value to enable or disable the target decoding mode.

6. The video decoding method according to claim 1, characterized in that: The determining the value of the syntax element based on the value of the format flag to prohibit sending the syntax element for identifying the startup state of the target decoding mode includes: The value of the format flag is used as the conditional content of the conditional statement to determine the value of the syntax element, so as to prohibit the sending of the syntax element used to identify the start-up state of the target decoding mode.

7. The video decoding method according to claim 1, characterized in that: If the value of the format flag is the second parameter, and the target decoding mode is JCCR, the first syntax element used to mark the activation state of the target decoding mode is sps_joint_cbcr_enabled_flag; The step of setting the value of the syntax element for identifying the start state of the target decoding mode to a preset value based on the value of the format flag and the decoding stream consistency includes: According to the decoding stream consistency, when the value of the format flag is the second parameter, the value of the first syntax element sps_joint_cbcr_enabled_flag is set to 0.

8. The video decoding method according to claim 7, characterized in that: When the value of the first syntax element sps_joint_cbcr_enabled_flag is set to 0, joint decoding of red chrominance Cr and blue chrominance Cb residual blocks is disabled.

9. The video decoding method according to claim 1, characterized in that: If the value of the format flag is the second parameter, and the target decoding mode is CCLM, the second syntax element used to mark the activation state of the target decoding mode is sps_cclm_enabled_flag; The step of setting the value of the syntax element for identifying the start state of the target decoding mode to a preset value based on the value of the format flag and the decoding stream consistency includes: According to the decoding stream consistency, when the value of the format flag is the second parameter, the value of the second syntax element sps_cclm_enabled_flag is set to 0.

10. The video decoding method according to claim 9, characterized in that: When the value of the second syntax element sps_cclm_enabled_flag is set to 0, intra prediction based on the cross-component linear model is disabled.

11. The video decoding method according to claim 1, characterized in that: If the value of the format flag is the second parameter, and the target decoding mode is CCALF, then the third syntax element used to mark the activation state of the target decoding mode is the activation identifier corresponding to CCALF.

12. The video decoding method according to claim 1, characterized in that: If the value of the format flag is the first parameter, and the target decoding mode is ACT, the fourth syntax element used to mark the activation state of the target decoding mode is sps_act_enabled_flag; The step of setting the value of the syntax element for identifying the start state of the target decoding mode to a preset value based on the value of the format flag and the decoding stream consistency includes: According to the decoding stream consistency, when the value of the format flag is the first parameter, the value of the fourth syntax element sps_act_enabled_flag is set to 0.

13. The video decoding method according to claim 12, characterized in that: When the fourth syntax element sps_act_enabled_flag is set to 0, adaptive color transform decoding is disabled.

14. A video encoding method, characterized in that: The method comprises: Set the parameter set of the video to be encoded; Determining a target format type of a target video frame in the video to be encoded according to the parameter set; If the target format type is RGB, the target encoding method associated with the target format type is determined to include one or more of the following methods: joint Cb-Cr residual codec JCCR, cross component linear model CCLM and cross component adaptive loop filter CCALF; if the target format type is YUV, the target encoding method associated with the target format type is determined to include: adaptive color transform ACT; Obtaining syntax elements of the target encoding method; The target coding mode is enabled or disabled according to the value of the syntax element.

15. A computer storage medium, characterized in that A computer program is stored thereon; When the computer program is executed by a processor, it implements the video decoding method according to any one of claims 1 to 13, or implements the video encoding method according to claim 14.

16. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the video decoding method as described in any one of claims 1 to 13, or implement the video encoding method as described in claim 14.

17. A method for processing a video code stream, characterized in that: The video code stream is generated according to the encoding method according to claim 14, or is decoded based on the decoding method according to any one of claims 1 to 13.