CN115209141A - Video encoding and decoding method and device, computer readable medium and electronic equipment - Google Patents

Video encoding and decoding method and device, computer readable medium and electronic equipment Download PDF

Info

Publication number
CN115209141A
CN115209141A CN202110396634.3A CN202110396634A CN115209141A CN 115209141 A CN115209141 A CN 115209141A CN 202110396634 A CN202110396634 A CN 202110396634A CN 115209141 A CN115209141 A CN 115209141A
Authority
CN
China
Prior art keywords
intra
prediction mode
frame prediction
mode
group number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110396634.3A
Other languages
Chinese (zh)
Inventor
王力强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110396634.3A priority Critical patent/CN115209141A/en
Publication of CN115209141A publication Critical patent/CN115209141A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Landscapes

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

Abstract

The embodiment of the application provides a video coding and decoding method, a video coding and decoding device, a computer readable medium and electronic equipment. The video decoding method includes: decoding the video code stream to obtain a prediction mode adopted by a coding block; if the coding block adopts the SAWP mode, decoding to obtain a first intra-frame prediction mode adopted by the SAWP mode and the rest 2 identification bits and the group number identification bits corresponding to a second intra-frame prediction mode adopted by the SAWP mode; and if the first intra-frame prediction mode and the second intra-frame prediction mode are not the intra-frame prediction modes in the MPM list and the values of the residual 2 identification bits and the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, skipping the decoding of the residual identification bits corresponding to the second intra-frame prediction mode, and determining the mode numerical value corresponding to the second intra-frame prediction mode according to the mode numerical value corresponding to the first intra-frame prediction mode. The technical scheme of the embodiment of the application can improve the coding and decoding efficiency of the video.

Description

Video encoding and decoding method and device, computer readable medium and electronic equipment
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a video encoding and decoding method, an apparatus, a computer readable medium, and an electronic device.
Background
In the field of video coding and decoding, since a single Prediction mode cannot adapt to complex textures in an image, a Spatial Angular Weighted Prediction (SAWP) technique is proposed, in which 2 different intra Prediction modes are required to be used for predicting the same coding block, and a final Prediction image is generated by weighting 2 intra Prediction images.
In the intra Mode coding process of the SAWP, if neither the first intra prediction Mode nor the second intra prediction Mode belongs to an intra prediction Mode in an MPM (Most Probable Mode) list, there is redundant coding in a coding manner in the related art.
Disclosure of Invention
Embodiments of the present application provide a video encoding and decoding method, an apparatus, a computer-readable medium, and an electronic device, so that encoding and decoding efficiency of a video can be improved at least to a certain extent.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a video decoding method including: decoding the video code stream to obtain a prediction mode adopted by a coding block; if the coding block adopts an airspace angle weighted prediction (SAWP) mode, decoding to obtain a first intra-frame prediction mode adopted by the SAWP mode, and the rest 2 identification bits and the group number identification bits corresponding to a second intra-frame prediction mode adopted by the SAWP mode; if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list with the maximum possibility, and the values of the residual 2 identification bits and the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, skipping decoding of the residual identification bits corresponding to the second intra-frame prediction mode, and determining the mode value corresponding to the second intra-frame prediction mode according to the mode value corresponding to the first intra-frame prediction mode.
According to an aspect of an embodiment of the present application, there is provided a video encoding method, including: if the coding block needs to adopt the SAWP mode, determining a first intra-frame prediction mode and a second intra-frame prediction mode adopted by the SAWP mode; if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list and the values of the residual 2 identification bits and the values of the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, encoding the value of the identification bit corresponding to the first intra-frame prediction mode, the value of the residual 2 identification bit corresponding to the second intra-frame prediction mode and the value of the group number identification bit into a code stream, and skipping the encoding process of the residual identification bit corresponding to the second intra-frame prediction mode.
According to an aspect of an embodiment of the present application, there is provided a video decoding apparatus including: the first decoding unit is configured to decode the video code stream to obtain a prediction mode adopted by the coding block; a second decoding unit, configured to decode to obtain a first intra-frame prediction mode adopted by the SAWP mode and remaining 2 identification bits and group number identification bits corresponding to a second intra-frame prediction mode adopted by the SAWP mode if the coding block adopts an spatial domain angle weighted prediction (SAWP) mode; a first processing unit, configured to skip decoding of a remainder flag bit corresponding to a second intra-frame prediction mode and determine a mode value corresponding to the second intra-frame prediction mode according to a mode value corresponding to the first intra-frame prediction mode if neither the first intra-frame prediction mode nor the second intra-frame prediction mode is an intra-frame prediction mode in a MPM list of a most probable intra-frame prediction mode and values of the remainder 2 flag bit and the group number flag bit corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same.
In some embodiments of the present application, based on the foregoing solution, the first processing unit is configured to: if the values of the remaining 2 flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 0, and the values of the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, determining the value of the remainder flag bit corresponding to the second intra-frame prediction mode based on the principle that the values of the remainder flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are different; and determining a mode numerical value corresponding to the second intra-frame prediction mode according to the value of the residue 2 identification bit corresponding to the second intra-frame prediction mode, the value of the group number identification bit and the determined value of the residue identification bit corresponding to the second intra-frame prediction mode.
In some embodiments of the present application, based on the foregoing solution, the first processing unit is configured to: and if the values of the remaining 2 identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 1, and the values of the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, determining the designated mode value corresponding to the designated group number as the mode value corresponding to the second intra-frame prediction mode, wherein the mode value corresponding to the second intra-frame prediction mode is different from the mode value corresponding to the first intra-frame prediction mode.
In some embodiments of the present application, based on the foregoing scheme, the value of the remaining 2 identification bits associated with the specified group number and the specified pattern value is 0.
In some embodiments of the present application, based on the foregoing scheme, the specified group number is the same as a group number corresponding to the first intra prediction mode.
In some embodiments of the present application, based on the foregoing scheme, the specified group number is different from a group number corresponding to the first intra prediction mode.
In some embodiments of the present application, based on the foregoing solution, the first processing unit is further configured to: if the value of the remaining 2 flag bit corresponding to the first intra-frame prediction mode is 1, the value of the remaining 2 flag bit corresponding to the second intra-frame prediction mode is 0, and the value of the group number flag bit corresponding to the second intra-frame prediction mode is the designated group number, skipping the analysis of the remaining flag bit corresponding to the second intra-frame prediction mode, and taking the other mode value except the designated mode value as the mode value corresponding to the second intra-frame prediction mode from the two mode values associated with the remaining 2 flag bit value of 0 and the group number flag bit value as the designated group number.
In some embodiments of the present application, based on the foregoing scheme, the second decoding unit is configured to: when the residual 2 identification bits and the group number identification bits corresponding to the second intra-frame prediction mode are decoded, the residual 2 identification bits corresponding to the second intra-frame prediction mode are decoded first, and then the group number identification bits corresponding to the second intra-frame prediction mode are decoded; or
When the remaining 2 identification bits and the group number identification bits corresponding to the second intra-frame prediction mode are decoded, the group number identification bits corresponding to the second intra-frame prediction mode are decoded first, and then the remaining 2 identification bits corresponding to the second intra-frame prediction mode are decoded.
In some embodiments of the present application, based on the foregoing scheme, the second decoding unit is configured to: when the identification bits corresponding to the first intra-frame prediction mode are decoded, the decoding sequence of the residue 2 identification bits corresponding to the first intra-frame prediction mode is positioned before the decoding sequence of the residue identification bits corresponding to the second intra-frame prediction mode; the decoding order of the remaining 2 flag bits corresponding to the first intra-frame prediction mode is located before the decoding order of the group number flag bits corresponding to the second intra-frame prediction mode, or the decoding order of the remaining 2 flag bits corresponding to the first intra-frame prediction mode is located after the decoding order of the group number flag bits corresponding to the second intra-frame prediction mode.
In some embodiments of the present application, based on the foregoing solution, the first processing unit is further configured to: and after the mode value corresponding to the second intra-frame prediction mode is determined, determining the second intra-frame prediction mode according to the mode value corresponding to the second intra-frame prediction mode.
According to an aspect of an embodiment of the present application, there is provided a video encoding apparatus including: the device comprises a determining unit and a judging unit, wherein the determining unit is configured to determine a first intra-frame prediction mode and a second intra-frame prediction mode adopted by a SAWP mode if the coding block needs to adopt the SAWP mode; and a second processing unit, configured to, if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list and the values of the remaining 2 flag bits and the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, encode the value of the flag bit corresponding to the first intra-frame prediction mode, and the value of the remaining 2 flag bit and the group number flag bit corresponding to the second intra-frame prediction mode into a code stream, and skip an encoding process of the remaining flag bit corresponding to the second intra-frame prediction mode.
According to an aspect of embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a video decoding method or a video encoding method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a video decoding method or a video encoding method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the video decoding method or the video encoding method provided in the various alternative embodiments described above.
In the technical solutions provided in some embodiments of the present application, if the coding block adopts the SAWP mode, when neither the first intra prediction mode nor the second intra prediction mode adopted by the SAWP mode is an intra prediction mode in the MPM list, and the values of the remaining 2 flag bits and the group number flag bits corresponding to the first intra prediction mode and the second intra prediction mode are the same, the decoding of the remaining flag bit corresponding to the second intra prediction mode is skipped, and the mode value corresponding to the second intra prediction mode is determined according to the mode value corresponding to the first intra prediction mode, so that on the premise of ensuring that the mode value corresponding to the second intra prediction mode is obtained by the decoding, the coding redundancy is reduced, and the coding and decoding efficiency can be further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
fig. 2 is a schematic diagram showing the placement of a video encoding apparatus and a video decoding apparatus in a streaming system;
FIG. 3 shows a basic flow diagram of a video encoder;
fig. 4 illustrates a diagram of prediction directions in an intra prediction mode;
FIG. 5 illustrates an image of a complex texture;
FIG. 6 shows a schematic diagram of 8 weight generation angles;
FIG. 7 shows a schematic of 7 reference weight predicted positions;
FIG. 8 shows a flow diagram of a video decoding method according to an embodiment of the present application;
FIG. 9 shows a flow diagram of a video encoding method according to an embodiment of the present application;
FIG. 10 shows a block diagram of a video decoding apparatus according to an embodiment of the present application;
FIG. 11 shows a block diagram of a video encoding apparatus according to an embodiment of the present application;
FIG. 12 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different 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 thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in FIG. 1, the system architecture 100 includes a plurality of end devices that may communicate with each other over, for example, a network 150. For example, the system architecture 100 may include a first end device 110 and a second end device 120 interconnected by a network 150. In the embodiment of fig. 1, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.
For example, first terminal device 110 may encode video data (e.g., a stream of video pictures captured by terminal device 110) for transmission over network 150 to second terminal device 120, the encoded video data being transmitted as one or more encoded video streams, second terminal device 120 may receive the encoded video data from network 150, decode the encoded video data to recover the video data, and display the video pictures according to the recovered video data.
In one embodiment of the present application, the system architecture 100 may include a third end device 130 and a fourth end device 140 that perform bi-directional transmission of encoded video data, such as may occur during a video conference. For bi-directional data transmission, each of third end device 130 and fourth end device 140 may encode video data (e.g., a stream of video pictures captured by the end device) for transmission over network 150 to the other of third end device 130 and fourth end device 140. Each of the third terminal device 130 and the fourth terminal device 140 may also receive encoded video data transmitted by the other of the third terminal device 130 and the fourth terminal device 140, and may decode the encoded video data to recover the video data, and may display a video picture on an accessible display device according to the recovered video data.
In the embodiment of fig. 1, the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 may be a server, a personal computer, and a smart phone, but the principles disclosed herein may not be limited thereto. Embodiments disclosed herein are applicable to laptop computers, tablet computers, media players, and/or dedicated video conferencing equipment. Network 150 represents any number of networks that communicate encoded video data between first end device 110, second end device 120, third end device 130, and fourth end device 140, including, for example, wired and/or wireless communication networks. The communication network 150 may exchange data in circuit-switched and/or packet-switched channels. The network may include a telecommunications network, a local area network, a wide area network, and/or the internet. For purposes of this application, the architecture and topology of the network 150 may be immaterial to the operation of the present disclosure, unless explained below.
In one embodiment of the present application, fig. 2 illustrates the placement of video encoding devices and video decoding devices in a streaming environment. The subject matter disclosed herein is equally applicable to other video-enabled applications including, for example, video conferencing, digital TV (television), storing compressed video on digital media including CDs, DVDs, memory sticks, and the like.
The streaming system may include an acquisition subsystem 213, and the acquisition subsystem 213 may include a video source 201, such as a digital camera, that creates an uncompressed video picture stream 202. In an embodiment, the video picture stream 202 includes samples taken by a digital camera. The video picture stream 202 is depicted as a thick line to emphasize a high data amount video picture stream compared to the encoded video data 204 (or the encoded video codestream 204), the video picture stream 202 can be processed by an electronic device 220, the electronic device 220 comprising a video encoding device 203 coupled to a video source 201. The video encoding device 203 may comprise hardware, software, or a combination of hardware and software to implement or perform aspects of the disclosed subject matter as described in more detail below. The encoded video data 204 (or encoded video codestream 204) is depicted as a thin line compared to the video picture stream 202 to emphasize the lower data amount of the encoded video data 204 (or encoded video codestream 204), which may be stored on the streaming server 205 for future use. One or more streaming client subsystems, such as client subsystem 206 and client subsystem 208 in fig. 2, may access streaming server 205 to retrieve copies 207 and 209 of encoded video data 204. Client subsystem 206 may include, for example, video decoding device 210 in electronic device 230. Video decoding device 210 decodes incoming copies 207 of the encoded video data and generates an output video picture stream 211 that may be presented on a display 212 (e.g., a display screen) or another presentation device. In some streaming systems, encoded video data 204, video data 207, and video data 209 (e.g., video streams) may be encoded according to certain video encoding/compression standards. Examples of such standards include ITU-T H.265. In an embodiment, the Video Coding standard under development is informally referred to as next generation Video Coding (VVC), and the present application may be used in the context of the VVC standard.
It should be noted that electronic devices 220 and 230 may include other components not shown in the figures. For example, electronic device 220 may comprise a video decoding device, and electronic device 230 may also comprise a video encoding device.
In an embodiment of the present application, taking the international Video Coding standard HEVC (High Efficiency Video Coding), VVC (scalable Video Coding), and the chinese national Video Coding standard AVS as an example, after a Video frame image is input, the Video frame image is divided into a plurality of non-overlapping processing units according to a block size, and each processing unit performs a similar compression operation. This processing Unit is called a CTU (Coding Tree Unit), or a LCU (Largest Coding Unit). The CTU can continue to perform finer partitioning further down to obtain one or more basic coding units CU, which are the most basic elements in a coding link. Some concepts when coding a CU are introduced below:
predictive Coding (Predictive Coding): the predictive coding includes intra-frame prediction and inter-frame prediction, and the original video signal is predicted by the selected reconstructed video signal to obtain a residual video signal. The encoding side needs to decide which predictive coding mode to select for the current CU and inform the decoding side. The intra-frame prediction means that a predicted signal comes from an already coded and reconstructed region in the same image; inter-prediction means that the predicted signal is from another picture (called a reference picture) than the current picture that has already been coded.
Transformation and Quantization (Transform & Quantization): the residual video signal is subjected to Transform operations such as DFT (Discrete Fourier Transform), DCT (Discrete Cosine Transform), etc., and then converted into a Transform domain, which is referred to as Transform coefficients. The transform coefficients are further subjected to lossy quantization operations, losing certain information, so that the quantized signal is favorable for compressed representation. In some video coding standards, more than one transform mode may be selectable, so the encoding side also needs to select one of the transform modes for the current CU and inform the decoding side. The Quantization fineness is usually determined by a Quantization Parameter (QP), and the QP has a larger value, and a coefficient indicating a larger value range is quantized into the same output, so that larger distortion and lower code rate are usually brought; conversely, the QP value is smaller, and the coefficients representing a smaller value range will be quantized to the same output, thus usually causing less distortion and corresponding to a higher code rate.
Entropy Coding (Entropy Coding) or statistical Coding: and the quantized transform domain signal is subjected to statistical compression coding according to the frequency of each value, and finally, a compressed code stream of binarization (0 or 1) is output. Meanwhile, other information generated by encoding, such as a selected encoding mode, motion vector data, and the like, also needs to be entropy encoded to reduce the code rate. The statistical Coding is a lossless Coding method, which can effectively reduce the code rate required for expressing the same signal, and the common statistical Coding methods include Variable Length Coding (VLC) or context-based Binary Arithmetic Coding (CABAC).
Loop Filtering (Loop Filtering): the transformed and quantized signal is subjected to inverse quantization, inverse transformation and prediction compensation to obtain a reconstructed image. Compared with the original image, the reconstructed image has a different part of information from the original image due to the quantization effect, i.e., the reconstructed image is distorted (Distortion). Therefore, the reconstructed image may be subjected to a filtering operation, such as a Deblocking Filter (DB), an SAO (Sample Adaptive Offset), or an ALF (Adaptive Loop Filter), so as to effectively reduce the distortion degree caused by quantization. The above-described filtering operation is also referred to as loop filtering, i.e. a filtering operation within the coding loop, since these filtered reconstructed pictures will be used as references for subsequent coded pictures to predict future picture signals.
In one embodiment of the present application, fig. 3 shows a basic flow chart of a video encoder, in which intra prediction is taken as an example for illustration. Wherein the original image signal s k [x,y]And a predicted image signal
Figure BDA0003018816960000101
Performing difference operation to obtain a residual signal u k [x,y]Residual signal u k [x,y]Obtaining a quantized coefficient after transformation and quantization processing, wherein the quantized coefficient obtains a coded bit stream through entropy coding on one hand, and obtains a reconstructed residual signal u 'through inverse quantization and inverse transformation processing on the other hand' k [x,y]Predicting an image signal
Figure BDA0003018816960000102
And reconstructed residual signal u' k [x,y]Superimposing the generated image signals
Figure BDA0003018816960000103
Image signal
Figure BDA0003018816960000104
The signals are input to an intra mode decision module and an intra prediction module for intra prediction processing on the one hand, and a reconstructed image signal s 'is output through loop filtering on the other hand' k [x,y]Reconstruction of the image Signal s' k [x,y]It can be used as the reference image of the next frame for motion estimation and motion compensated prediction. Then s 'based on the result of the motion compensation prediction' r [x+m x ,y+m y ]And intra prediction results
Figure BDA0003018816960000105
Obtaining a predicted image signal of the next frame
Figure BDA0003018816960000106
And continuing to repeat the process until the coding is completed.
Based on the above encoding process, after obtaining a compressed code stream (i.e., a bit stream) at a decoding end for each CU, entropy decoding is performed to obtain various types of mode information and quantization coefficients. And then, carrying out inverse quantization and inverse transformation on the quantized coefficient to obtain a residual signal. On the other hand, according to the known coding mode information, a prediction signal corresponding to the CU can be obtained, then a reconstructed signal can be obtained by adding the residual signal and the prediction signal, and the reconstructed signal is subjected to loop filtering and other operations to generate a final output signal.
When decoding an image, a frame of image is usually divided into image blocks (LCUs) with equal size for reconstruction, and the LCUs are decoded sequentially from left to right and from top to bottom in raster scan (each row of LCUs, from left to right). Each LCU is divided into a plurality of sub-blocks by a quadtree (QT for short), a Binary-Tree (BT for short) and an Extended quadtree (EQT for short), and the sub-blocks are processed sequentially from left to right and from top to bottom.
The intra coding mode of AVS3 has 3 modes: general Intra prediction technology, intra Block copy technology (IBC), and Intra String copy technology (ISC). As shown in fig. 4, 66 types of intra prediction modes are available for the general intra prediction technology, among which, the modes 3-32 and 34-65 are angle prediction modes, the mode 33 is a PCM (Pulse Code Modulation) mode, the mode 0 is a DC prediction mode, the mode 1 is a Plane prediction mode, and the mode 2 is a Biliner prediction mode.
The dashed arrows in fig. 4 indicate the newly introduced angle expansion Mode (EIPM for short) in the second stage of AVS3, and modes 12 and 24 respectively indicate the vertical Prediction Mode and the horizontal Prediction Mode. Assuming that the total number of intra prediction modes is IPD _ CNT, if the EIPM is turned off, IPD _ CNT is 34; if the EIPM is turned on, IPD _ CNT is 66.
When the FIMC technology is used, a buffer with a length of IPD _ CNT needs to be established, and intra prediction modes corresponding to the coding blocks in the decoded area are counted, so as to designate two intra prediction modes with the highest frequency count as MPMs corresponding to the current coding block to be decoded. As shown in table 1 below, the AVS3 has 2 MPMs in the current MPM list, and if the prefix included in the parsed coding block is 1, it indicates that the intra-prediction mode of the current coding block is in the MPM list, and then parses the 1bit suffix in the coding block to specifically distinguish the MPM modes. If the prefix in the analysis coding block is 0, the intra-frame prediction mode of the current coding block is not in the MPM list, and then the intra-frame prediction mode of the current coding block needs to be specifically distinguished by analyzing the fixed length code of 5bit or 6 bit.
Figure BDA0003018816960000111
TABLE 1
In addition, in view of the fact that the conventional single prediction mode cannot adapt to more complicated image textures, such as the image shown in fig. 5 that includes two textures, the SAWP proposes to perform prediction by using 2 different intra prediction modes for the same coding block, and to generate a final prediction image by weighting the 2 intra prediction images.
Specifically, it is assumed that predicted images obtained in 2 intra prediction modes are predMatrix respectively 0 And predMatrix 1 The final predicted image generated by SAWP is predMatrixSawp, and the mask is weightMatrixAwap, [ i [ ]][j]Representing a coordinate point within an image block, then there is the following equation:
predMatrixSawp[i][j]=(predMatrix 0 [i][j]×weightMatrixAwap[i][j]+predMatrix 1 [i][j]×(8-weightMatrixAwap[i][j])+4)>>3
fig. 6 shows 8 weight generation angles, fig. 7 shows 7 reference weight prediction positions (i.e., 7 weight configurations), and each weight configuration can generate a mask weight matrix xawap along the 8 angles shown in fig. 6, and thus can generate 8 × 7=56 masks.
Meanwhile, both intra prediction modes employed by the SAWP can use only 26 angular prediction modes in total, from modes 5 to 30 shown in fig. 4, and the MPM list has a length of 2. The identification of the two intra prediction modes used by the SAWP can be shown in table 2 below:
Figure BDA0003018816960000121
TABLE 2
Referring to table 2, for the decoding end, if the value of the MPM flag bit is 1, then analyze 1bit to obtain a specific MPM; if the value of the MPM flag is 0, it is necessary to determine one intra prediction mode from among the 24 intra prediction modes, and at this time, it is necessary to parse the value of the remaining 2 flag.
If the value of the rest 2 identification bits is 1, then analyzing the 3-bit group number identification bits to obtain a specific group number; if the value of the remaining 2 identification bits is 0, then the 3-bit group number identification bits are analyzed to obtain a specific group number and the 1-bit remainder identification bits to obtain a specific remainder value. After the specific remainder value is determined, the mode number value may be obtained from table 2, and then 2 specific intra prediction modes adopted by the SAWP may be determined according to the mode number value, the mode number value ranges of the two intra prediction modes adopted by the MPM and the SAWP.
After decoding the first intra prediction mode in the SAWP, if the first intra prediction mode is determined as an intra prediction mode in the MPM list, since the second intra prediction mode is definitely different from the first intra prediction mode, when decoding the second intra prediction mode, if the value of the MPM flag bit is 1, it is not necessary to parse idx of 1bit, and then the second intra prediction mode is a prediction mode different from the first intra prediction mode among 2 MPMs.
However, if neither the first intra-prediction mode nor the second intra-prediction mode belongs to intra-prediction modes in the MPM list, there is also coding redundancy in direct coding. Based on this, the technical solution of the embodiment of the present application removes the coding redundancy of the second intra prediction mode for such a situation, and thus can improve the coding efficiency to a certain extent.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 8 shows a flow chart of a video decoding method according to an embodiment of the present application, which may be performed by a device having a computing processing function, such as a terminal device or a server. Referring to fig. 8, the video decoding method at least includes steps S810 to S830, and the following is detailed:
in step S810, a video code stream is decoded to obtain a prediction mode used by the coding block.
In an embodiment of the present application, the video bitstream is a bitstream obtained by encoding a sequence of video image frames. The video image frame sequence includes a series of images, each of which can be further divided into slices (Slice), which can be further divided into a series of LCUs (or CTUs), and the LCUs include CUs. Video image frames are encoded in units of blocks, and in some new video encoding standards, for example, in the h.264 standard, there are Macroblocks (MBs), which can be further divided into a plurality of prediction blocks (predictions) that can be used for prediction encoding. In the HEVC standard, basic concepts such as a coding unit CU, a Prediction Unit (PU), and a Transform Unit (TU) are used, and various block units are functionally divided and described using a brand-new tree-based structure. For example, a CU may be partitioned into smaller CUs in a quadtree manner, and the smaller CUs may be further partitioned to form a quadtree structure. The coding block in the embodiment of the present application may be a CU, or a smaller block than the CU, such as a smaller block obtained by dividing the CU.
In one embodiment of the present application, the prediction modes that can be adopted by the coding block may be 66 intra prediction modes as shown in fig. 4, and may also be a SAWP mode or the like.
In step S820, if the coding block adopts the SAWP mode, the decoding obtains a first intra prediction mode adopted by the SAWP mode, and a remaining 2 flag bit and a group number flag bit corresponding to a second intra prediction mode adopted by the SAWP mode.
In one embodiment of the present application, when decoding the flag bits corresponding to the first intra-frame prediction mode, the decoding order of the remaining 2 flag bits corresponding to the first intra-frame prediction mode is before the decoding order of the remaining flag bits corresponding to the second intra-frame prediction mode. Meanwhile, the decoding order of the remaining 2 flag bits corresponding to the first intra-frame prediction mode is located before the decoding order of the group number flag bits corresponding to the second intra-frame prediction mode, or the decoding order of the remaining 2 flag bits corresponding to the first intra-frame prediction mode is located after the decoding order of the group number flag bits corresponding to the second intra-frame prediction mode. That is, for the first intra prediction mode, the remaining 2 flag needs to be parsed before the remainder flag, and the parsing order between the remaining 2 flag and the group number flag may not be distinguished, for example, the following parsing order may be adopted:
a remainder 2 identification bit, a group number identification bit and a remainder identification bit;
a group number identification bit, a remainder 2 identification bit and a remainder identification bit;
remainder 2 identification bits, remainder identification bits, group number identification bits.
In an embodiment of the present application, when the remaining 2 flag bits and the group number flag bits corresponding to the second intra-frame prediction mode are decoded, the remaining 2 flag bits corresponding to the second intra-frame prediction mode may be decoded first, and then the group number flag bits corresponding to the second intra-frame prediction mode may be decoded. Or the group number flag corresponding to the second intra prediction mode may be decoded first, and then the remaining 2 flag corresponding to the second intra prediction mode may be decoded. That is, for the second intra prediction mode, the 2 remainder flag also needs to be parsed before the remainder flag.
Continuing to refer to fig. 8, in step S830, if neither the first intra-frame prediction mode nor the second intra-frame prediction mode is the intra-frame prediction mode in the MPM list, and the values of the remaining 2 flag bits and the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, the decoding of the remaining flag bit corresponding to the second intra-frame prediction mode is skipped, and the mode value corresponding to the second intra-frame prediction mode is determined according to the mode value corresponding to the first intra-frame prediction mode.
In an embodiment of the present application, if the values of the remaining 2 flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 0, and the values of the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, the value of the remainder flag bit corresponding to the second intra-frame prediction mode is determined based on the principle that the values of the remainder flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are different; and determining a mode numerical value corresponding to the second intra-frame prediction mode according to the value of the residue 2 identification bit corresponding to the second intra-frame prediction mode, the value of the group number identification bit and the determined value of the residue identification bit corresponding to the second intra-frame prediction mode.
Specifically, referring to table 2, if the values of the remaining 2 flag bits corresponding to the first intra prediction mode and the second intra prediction mode are both 0, and the values of the group number flag bits corresponding to the first intra prediction mode and the second intra prediction mode are the same, the values of the corresponding remaining number flag bits are only 0 and 1. Therefore, if the value of the remainder flag corresponding to the first intra prediction mode is obtained by decoding, the value of the remainder flag corresponding to the second intra prediction mode can also be estimated, for example, when the value of the remainder flag corresponding to the first intra prediction mode is 0, the value of the remainder flag corresponding to the second intra prediction mode can be estimated to be 1; when the value of the residue flag corresponding to the first intra prediction mode is 1, it can be estimated that the value of the residue flag corresponding to the second intra prediction mode is 0.
In an embodiment of the present application, if the remaining 2 flag values corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 1, and the group number flag values corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, the specified mode value corresponding to the specified group number is determined as the mode value corresponding to the second intra-frame prediction mode, where the mode value corresponding to the second intra-frame prediction mode is different from the mode value corresponding to the first intra-frame prediction mode.
Specifically, if the remaining 2 flag bits corresponding to the first intra prediction mode and the second intra prediction mode both have a value of 1, and the group number flag bits corresponding to the first intra prediction mode and the second intra prediction mode have the same value, it may be specified that a designated mode value corresponding to the designated group number (different from the mode value corresponding to the first intra prediction mode) is determined as the mode value corresponding to the second intra prediction mode.
Optionally, the value of the remaining 2 identification bit associated with the specified group number and the specified mode value is 0. I.e., the specified group number and the specified mode value are selected from the modes having a value of 0 for the remaining 2 identification bits.
Optionally, the specified group number is the same as a group number corresponding to the first intra prediction mode. Or the specified group number is different from the group number corresponding to the first intra prediction mode.
In an embodiment of the present application, if the value of the remaining 2 flag bit corresponding to the first intra prediction mode is 1, the value of the remaining 2 flag bit corresponding to the second intra prediction mode is 0, and the value of the group number flag bit corresponding to the second intra prediction mode is the designated group number, the parsing of the remaining flag bit corresponding to the second intra prediction mode is skipped, and the mode value other than the designated mode value among the two mode values associated with the remaining 2 flag bit value of 0 and the group number flag bit value of the designated group number is used as the mode value corresponding to the second intra prediction mode.
Specifically, if the value of the remaining 2 flag bit is 0 and the value of the group number flag bit is a designated group number, two mode values are assigned, in which case, if the value of the remaining 2 flag bit corresponding to the first intra prediction mode is 1, the value of the remaining 2 flag bit corresponding to the second intra prediction mode is 0, and the value of the group number flag bit corresponding to the second intra prediction mode is a designated group number, the other mode value different from the designated mode value among the two mode values may be used as the mode value corresponding to the second intra prediction mode.
In an embodiment of the present application, after the mode value corresponding to the second intra prediction mode is determined, the second intra prediction mode may be determined according to the mode value corresponding to the second intra prediction mode.
In summary, the technical solution of the embodiment of the present application mainly removes the first intra prediction mode from the candidate modes of the second intra prediction mode according to the different prior knowledge of the first intra prediction mode and the second intra prediction mode in the SAWP, so as to remove the coding redundancy. Specifically, with respect to the AVS3 existing SAWP coding scheme, the group numbers of the first intra prediction mode and the second intra prediction mode are denoted as g1 and g2, respectively, and when neither the first intra prediction mode nor the second intra prediction mode is a prediction mode in the MPM list, the following processing is performed:
treatment method 1: when the values of the residue 2 flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 0 and the values of the corresponding group number flag bits are also the same, the residue flag bit corresponding to the second intra-frame prediction mode does not need to be decoded, and the value of the residue flag bit corresponding to the second intra-frame prediction mode is directly determined to be different from the value of the residue flag bit corresponding to the first intra-frame prediction mode. A mode value corresponding to the second intra prediction mode may then be determined, and the second intra prediction mode may be determined based on the mode value.
Treatment method 2: when the value of the remaining 2 flag bit corresponding to the first intra prediction mode is 1, if the value of the remaining 2 flag bit corresponding to the second intra prediction mode is also 1 and the corresponding group numbers are the same (i.e., g1= g 2), the remaining flag bit corresponding to the second intra prediction mode does not need to be decoded, and the determined mode value corresponding to the second intra prediction mode is different from the mode value corresponding to the first intra prediction mode.
For example, the mode value corresponding to the second intra prediction mode may be the mode value v3 of the corresponding group number (denoted as g 3) when the remainder 2 flag is 0 and the remainder flag is 0 or 1. Optionally, g1= g2= g3, or g1= g2 ≠ g3.
When the value of the remaining 2 flag bit corresponding to the first intra prediction mode is 1, if the value of the remaining 2 flag bit corresponding to the second intra prediction mode is 0 and the corresponding group number is g3, the mode value of the second intra prediction mode is directly determined to be a mode value different from v3 among 2 mode values indicated by the remaining 2 flag bit being 0 and the group number being g3 without decoding the remaining 2 flag bit corresponding to the second intra prediction mode.
Fig. 9 shows a flow diagram of a video encoding method according to an embodiment of the present application, which may be performed by a device having a computational processing function, such as a terminal device or a server. Referring to fig. 9, the video encoding method at least includes steps S910 to S920, which are described in detail as follows:
in step S910, if the coding block needs to adopt the SAWP mode, determining a first intra prediction mode and a second intra prediction mode adopted by the SAWP mode;
in step S920, if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list and the values of the remaining 2 flag bits and the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, the value of the flag bit corresponding to the first intra-frame prediction mode, the value of the remaining 2 flag bit corresponding to the second intra-frame prediction mode, and the value of the group number flag bit are encoded into a code stream, and an encoding process of the remaining flag bit corresponding to the second intra-frame prediction mode is skipped.
It should be noted that the processing procedure of the encoding end is similar to the related processing procedure of the decoding end, and is not described again.
According to the technical scheme, decoding of the remainder identification bit corresponding to the second intra-frame prediction mode can be skipped, and the mode value corresponding to the second intra-frame prediction mode is determined according to the mode value corresponding to the first intra-frame prediction mode, so that coding redundancy can be reduced on the premise that the mode value corresponding to the second intra-frame prediction mode is obtained through decoding, and coding and decoding efficiency can be improved.
Embodiments of the apparatus of the present application are described below, which may be used to perform the methods described in the above-described embodiments of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method described above in the present application.
Fig. 10 shows a block diagram of a video decoding apparatus according to an embodiment of the present application, which may be disposed in a device having a calculation processing function, such as a terminal device or a server.
Referring to fig. 10, a video decoding apparatus 1000 according to an embodiment of the present application includes: a first decoding unit 1002, a second decoding unit 1004, and a first processing unit 1006.
The first decoding unit 1002 is configured to decode a video code stream to obtain a prediction mode used by a coding block; the second decoding unit 1004 is configured to, if the coding block adopts an spatial domain angle weighted prediction (SAWP) mode, decode to obtain a first intra-frame prediction mode adopted by the SAWP mode, and a remaining 2 identification bits and a group number identification bit corresponding to a second intra-frame prediction mode adopted by the SAWP mode; the first processing unit 1006 is configured to skip decoding of the residue flag bit corresponding to the second intra-frame prediction mode and determine the mode value corresponding to the second intra-frame prediction mode according to the mode value corresponding to the first intra-frame prediction mode if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list, and the values of the residue 2 flag bit and the group number flag bit corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same.
In some embodiments of the present application, based on the foregoing solution, the first processing unit 1006 is configured to: if the values of the remaining 2 flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 0, and the values of the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, determining the value of the remainder flag bit corresponding to the second intra-frame prediction mode based on the principle that the values of the remainder flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are different; and determining a mode numerical value corresponding to the second intra-frame prediction mode according to the value of the residue 2 identification bit corresponding to the second intra-frame prediction mode, the value of the group number identification bit and the determined value of the residue identification bit corresponding to the second intra-frame prediction mode.
In some embodiments of the present application, based on the foregoing scheme, the first processing unit 1006 is configured to: and if the values of the remaining 2 identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 1 and the values of the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, determining the specified mode value corresponding to the specified group number as the mode value corresponding to the second intra-frame prediction mode, wherein the mode value corresponding to the second intra-frame prediction mode is different from the mode value corresponding to the first intra-frame prediction mode.
In some embodiments of the present application, based on the foregoing scheme, the value of the remaining 2 identification bit associated with the specified group number and the specified pattern value is 0.
In some embodiments of the present application, based on the foregoing scheme, the specified group number is the same as a group number corresponding to the first intra prediction mode.
In some embodiments of the present application, based on the foregoing scheme, the specified group number is different from a group number corresponding to the first intra prediction mode.
In some embodiments of the present application, based on the foregoing solution, the first processing unit 1006 is further configured to: if the value of the remaining 2 flag bit corresponding to the first intra-frame prediction mode is 1, the value of the remaining 2 flag bit corresponding to the second intra-frame prediction mode is 0, and the value of the group number flag bit corresponding to the second intra-frame prediction mode is the designated group number, skipping the analysis of the remaining flag bit corresponding to the second intra-frame prediction mode, and taking the other mode value except the designated mode value as the mode value corresponding to the second intra-frame prediction mode from the two mode values associated with the remaining 2 flag bit value of 0 and the group number flag bit value as the designated group number.
In some embodiments of the present application, based on the foregoing scheme, the second decoding unit 1004 is configured to: when the residual 2 identification bits and the group number identification bits corresponding to the second intra-frame prediction mode are decoded, the residual 2 identification bits corresponding to the second intra-frame prediction mode are decoded first, and then the group number identification bits corresponding to the second intra-frame prediction mode are decoded; or
When the remaining 2 identification bits and the group number identification bits corresponding to the second intra-frame prediction mode are decoded, the group number identification bits corresponding to the second intra-frame prediction mode are decoded first, and then the remaining 2 identification bits corresponding to the second intra-frame prediction mode are decoded.
In some embodiments of the present application, based on the foregoing scheme, the second decoding unit 1004 is configured to: when the identification bits corresponding to the first intra-frame prediction mode are decoded, the decoding sequence of the residue 2 identification bits corresponding to the first intra-frame prediction mode is positioned before the decoding sequence of the residue identification bits corresponding to the second intra-frame prediction mode; the decoding order of the remaining 2 identification bits corresponding to the first intra-frame prediction mode is located before the decoding order of the group number identification bits corresponding to the second intra-frame prediction mode, or the decoding order of the remaining 2 identification bits corresponding to the first intra-frame prediction mode is located after the decoding order of the group number identification bits corresponding to the second intra-frame prediction mode.
In some embodiments of the present application, based on the foregoing solution, the first processing unit 1006 is further configured to: and after the mode value corresponding to the second intra-frame prediction mode is determined, determining the second intra-frame prediction mode according to the mode value corresponding to the second intra-frame prediction mode.
Fig. 11 shows a block diagram of a video encoding apparatus according to an embodiment of the present application, which may be disposed in a device having a calculation processing function, such as a terminal device or a server.
Referring to fig. 11, a video encoding apparatus 1100 according to an embodiment of the present application includes: a determination unit 1102 and a second processing unit 1104.
The determining unit 1102 is configured to determine a first intra prediction mode and a second intra prediction mode adopted by a SAWP mode if the coding block needs to adopt the SAWP mode; the second processing unit 1104 is configured to, if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list and the values of the remaining 2 flag bits and the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, encode the value of the flag bit corresponding to the first intra-frame prediction mode, and the values of the remaining 2 flag bits and the group number flag bits corresponding to the second intra-frame prediction mode into a code stream, and skip an encoding process for the remaining flag bit corresponding to the second intra-frame prediction mode.
FIG. 12 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1200 of the electronic device shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 12, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. In the RAM 1203, various programs and data necessary for system operation are also stored. The CPU 1201, ROM 1202, and RAM 1203 are connected to each other by a bus 1204. An Input/Output (I/O) interface 1205 is also connected to bus 1204.
The following components are connected to the I/O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output section 1207 including a Display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 1208 including a hard disk and the like; and a communication section 1209 including a Network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 1209 performs communication processing via a network such as the internet. A driver 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1209, and/or installed from the removable medium 1211. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 1201.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied 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 foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, which when executed by one of the electronic devices, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application 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 disk, a removable hard disk, etc.) or on a network, and includes 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 embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements 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 application is limited only by the appended claims.

Claims (15)

1. A video decoding method, comprising:
decoding the video code stream to obtain a prediction mode adopted by a coding block;
if the coding block adopts an airspace angle weighted prediction (SAWP) mode, decoding to obtain a first intra-frame prediction mode adopted by the SAWP mode, and a residual 2 identification bit and a group number identification bit corresponding to a second intra-frame prediction mode adopted by the SAWP mode;
if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list with the maximum possibility, and the values of the residual 2 identification bits and the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, skipping decoding of the residual identification bits corresponding to the second intra-frame prediction mode, and determining the mode value corresponding to the second intra-frame prediction mode according to the mode value corresponding to the first intra-frame prediction mode.
2. The video decoding method of claim 1, wherein determining the mode value corresponding to the second intra-prediction mode according to the mode value corresponding to the first intra-prediction mode comprises:
if the values of the remaining 2 flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 0, and the values of the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, determining the value of the remainder flag bit corresponding to the second intra-frame prediction mode based on the principle that the values of the remainder flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are different;
and determining a mode numerical value corresponding to the second intra-frame prediction mode according to the value of the residue 2 identification bit corresponding to the second intra-frame prediction mode, the value of the group number identification bit and the determined value of the residue identification bit corresponding to the second intra-frame prediction mode.
3. The video decoding method of claim 1, wherein determining the mode value corresponding to the second intra-prediction mode according to the mode value corresponding to the first intra-prediction mode comprises:
and if the values of the remaining 2 identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are both 1, and the values of the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, determining the designated mode value corresponding to the designated group number as the mode value corresponding to the second intra-frame prediction mode, wherein the mode value corresponding to the second intra-frame prediction mode is different from the mode value corresponding to the first intra-frame prediction mode.
4. The video decoding method of claim 3, wherein the remaining 2 identification bits associated with the specified group number and the specified mode value have a value of 0.
5. The video decoding method according to claim 3, wherein the specified group number is the same as a group number corresponding to the first intra prediction mode.
6. The video decoding method of claim 3, wherein the specified group number is different from a group number corresponding to the first intra prediction mode.
7. The video decoding method of claim 3, wherein the video decoding method further comprises:
if the value of the remaining 2 flag bit corresponding to the first intra-frame prediction mode is 1, the value of the remaining 2 flag bit corresponding to the second intra-frame prediction mode is 0, and the value of the group number flag bit corresponding to the second intra-frame prediction mode is the specified group number, skipping the analysis of the remaining flag bit corresponding to the second intra-frame prediction mode, and taking the other mode value except the specified mode value as the mode value corresponding to the second intra-frame prediction mode in two mode values associated with the remaining 2 flag bit value of 0 and the group number flag bit value as the specified group number.
8. The video decoding method of claim 1, wherein the video decoding method further comprises:
when the residual 2 identification bits and the group number identification bits corresponding to the second intra-frame prediction mode are decoded, the residual 2 identification bits corresponding to the second intra-frame prediction mode are decoded first, and then the group number identification bits corresponding to the second intra-frame prediction mode are decoded; or alternatively
When the remaining 2 identification bits and the group number identification bits corresponding to the second intra-frame prediction mode are decoded, the group number identification bits corresponding to the second intra-frame prediction mode are decoded first, and then the remaining 2 identification bits corresponding to the second intra-frame prediction mode are decoded.
9. The video decoding method of claim 1, wherein the video decoding method further comprises:
when the identification bits corresponding to the first intra-frame prediction mode are decoded, the decoding sequence of the remainder 2 identification bits corresponding to the first intra-frame prediction mode is positioned before the decoding sequence of the remainder identification bits corresponding to the second intra-frame prediction mode;
the decoding order of the remaining 2 flag bits corresponding to the first intra-frame prediction mode is located before the decoding order of the group number flag bits corresponding to the second intra-frame prediction mode, or the decoding order of the remaining 2 flag bits corresponding to the first intra-frame prediction mode is located after the decoding order of the group number flag bits corresponding to the second intra-frame prediction mode.
10. The video decoding method according to any one of claims 1 to 9, wherein the video decoding method further comprises:
and after the mode value corresponding to the second intra-frame prediction mode is determined, determining the second intra-frame prediction mode according to the mode value corresponding to the second intra-frame prediction mode.
11. A video encoding method, comprising:
if the coding block needs to adopt the SAWP mode, determining a first intra-frame prediction mode and a second intra-frame prediction mode adopted by the SAWP mode;
if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list and the values of the residual 2 identification bits and the values of the group number identification bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, encoding the value of the identification bit corresponding to the first intra-frame prediction mode, the value of the residual 2 identification bit corresponding to the second intra-frame prediction mode and the value of the group number identification bit into a code stream, and skipping the encoding process of the residual identification bit corresponding to the second intra-frame prediction mode.
12. A video decoding apparatus, comprising:
the first decoding unit is configured to decode the video code stream to obtain a prediction mode adopted by the coding block;
a second decoding unit, configured to, if the coding block adopts an airspace angle weighted prediction (SAWP) mode, decode to obtain a first intra-frame prediction mode adopted by the SAWP mode, and a remaining 2 identification bits and a group number identification bit corresponding to a second intra-frame prediction mode adopted by the SAWP mode;
a first processing unit, configured to skip decoding of a remainder flag bit corresponding to a second intra-frame prediction mode and determine a mode value corresponding to the second intra-frame prediction mode according to a mode value corresponding to the first intra-frame prediction mode if neither the first intra-frame prediction mode nor the second intra-frame prediction mode is an intra-frame prediction mode in a MPM list of most probable intra-frame prediction modes and values of the remainder 2 flag bit and the group number flag bit corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same.
13. A video encoding apparatus, comprising:
the device comprises a determining unit, a calculating unit and a judging unit, wherein the determining unit is configured to determine a first intra-frame prediction mode and a second intra-frame prediction mode adopted by a SAWP mode if the coding block needs to adopt the SAWP mode;
and a second processing unit, configured to, if the first intra-frame prediction mode and the second intra-frame prediction mode are not intra-frame prediction modes in the MPM list and the values of the remaining 2 flag bits and the group number flag bits corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode are the same, encode the value of the flag bit corresponding to the first intra-frame prediction mode, and the value of the remaining 2 flag bit and the group number flag bit corresponding to the second intra-frame prediction mode into a code stream, and skip an encoding process of the remaining flag bit corresponding to the second intra-frame prediction mode.
14. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out a video decoding method according to any one of claims 1 to 10 or carries out a video encoding method according to claim 11.
15. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the video decoding method of any one of claims 1 to 10 or the video encoding method of claim 11.
CN202110396634.3A 2021-04-13 2021-04-13 Video encoding and decoding method and device, computer readable medium and electronic equipment Pending CN115209141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110396634.3A CN115209141A (en) 2021-04-13 2021-04-13 Video encoding and decoding method and device, computer readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110396634.3A CN115209141A (en) 2021-04-13 2021-04-13 Video encoding and decoding method and device, computer readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115209141A true CN115209141A (en) 2022-10-18

Family

ID=83571156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110396634.3A Pending CN115209141A (en) 2021-04-13 2021-04-13 Video encoding and decoding method and device, computer readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115209141A (en)

Similar Documents

Publication Publication Date Title
CN112533000B (en) Video decoding method and device, computer readable medium and electronic equipment
CN112543338B (en) Video decoding method and device, computer readable medium and electronic equipment
CN112565751B (en) Video decoding method and device, computer readable medium and electronic equipment
CN112543337B (en) Video decoding method, device, computer readable medium and electronic equipment
WO2022174660A1 (en) Video coding and decoding method, video coding and decoding apparatus, computer-readable medium, and electronic device
CN113207002B (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN115209157A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN114513663A (en) Video decoding method and device and electronic equipment
WO2021263251A1 (en) State transition for dependent quantization in video coding
CN115209141A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN114079773B (en) Video decoding method and device, computer readable medium and electronic equipment
CN114079772B (en) Video decoding method and device, computer readable medium and electronic equipment
WO2022116854A1 (en) Video decoding method and apparatus, readable medium, electronic device, and program product
WO2022174701A1 (en) Video coding method and apparatus, video decoding method and apparatus, and computer-readable medium and electronic device
CN114979656A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
WO2022174637A1 (en) Video encoding and decoding method, video encoding and decoding apparatus, computer-readable medium and electronic device
WO2022037464A1 (en) Video decoding method and apparatus, video coding method and apparatus, device, and storage medium
CN115086654A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN115209138A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN115209146A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN114979642A (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN115695805A (en) Video coding method and device, computer readable medium and electronic equipment
CN116980609A (en) Video data processing method, device, storage medium and equipment
CN116456086A (en) Loop filtering method, video encoding and decoding method, device, medium and electronic equipment
CN117837148A (en) History-based rice coding parameter derivation for video coding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40074957

Country of ref document: HK