WO2022022622A1 - Image coding method, image decoding method, and related apparatus - Google Patents

Image coding method, image decoding method, and related apparatus Download PDF

Info

Publication number
WO2022022622A1
WO2022022622A1 PCT/CN2021/109173 CN2021109173W WO2022022622A1 WO 2022022622 A1 WO2022022622 A1 WO 2022022622A1 CN 2021109173 W CN2021109173 W CN 2021109173W WO 2022022622 A1 WO2022022622 A1 WO 2022022622A1
Authority
WO
WIPO (PCT)
Prior art keywords
intra
prediction
block
mode
frame prediction
Prior art date
Application number
PCT/CN2021/109173
Other languages
French (fr)
Chinese (zh)
Inventor
谢志煌
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN202180060486.6A priority Critical patent/CN116250240A/en
Publication of WO2022022622A1 publication Critical patent/WO2022022622A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • 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/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/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel

Definitions

  • the present application relates to the technical field of electronic devices, and in particular, to an image encoding method, an image decoding method, and related apparatuses.
  • Digital video capabilities can be incorporated into a wide range of devices, including digital television, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-books Readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, video conferencing devices, video streaming devices, and the like.
  • PDAs personal digital assistants
  • laptop or desktop computers tablet computers
  • e-books Readers digital cameras
  • digital recording devices digital media players
  • video game devices video game consoles
  • cellular or satellite radio telephones video conferencing devices
  • video streaming devices and the like.
  • Digital video devices implement video compression techniques such as those developed by the Moving Picture Experts Group (MPEG)-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 Advanced Video Coding Decoding (advanced video coding, AVC), ITU-TH.265 high efficiency video coding (high efficiency video coding, HEVC) standard defined standards and those video compression techniques described in extensions of said standards, so as to be more efficient to transmit and receive digital video information.
  • Video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing these video codec techniques.
  • the embodiments of the present application provide an image encoding method, an image decoding method, and a related device, in order to provide options for operations that require smoothing or local blurring for intra-frame prediction.
  • the technology makes the predicted pixels smoother and the predicted block closer to the original image, which will ultimately improve coding efficiency.
  • an embodiment of the present application provides an image encoding method, including:
  • intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, where the first indication information is used to indicate whether the first intra-frame prediction filtering mode is allowed to be used , the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
  • the first use flag of the first intra-frame prediction filtering mode of the current coding block is set bit is set to the first value
  • the current coding block is predicted to obtain a prediction block, the prediction block is encoded, and the encoding result is written into the code stream.
  • the solution of the present application provides options for operations such as smoothing or local blurring for intra-frame prediction.
  • operations such as smoothing or local blurring for intra-frame prediction.
  • the use of this technology makes the predicted pixels smoother and the predicted blocks more accurate. Close to the original image, which will eventually improve the encoding efficiency.
  • an embodiment of the present application provides an image decoding method, including:
  • the intra-frame prediction indication information includes first indication information and second indication information
  • the first indication information is used to indicate whether The first intra-frame prediction filtering mode is allowed to be used
  • the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used
  • the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode
  • the a use flag bit is the use flag bit of the first intra-frame prediction filtering mode
  • the intra-frame prediction filtering indication information and the first usage flag it is determined to use the first frame rate prediction filtering mode to perform prediction on the current decoding block, to obtain a prediction block of the current decoding block.
  • the solution of the present application provides options for operations such as smoothing or local blurring for intra-frame prediction.
  • operations such as smoothing or local blurring for intra-frame prediction.
  • the use of this technology makes the predicted pixels smoother and the predicted blocks more accurate. Close to the original image, which will eventually improve the encoding efficiency.
  • an embodiment of the present application provides an image encoding apparatus, including:
  • a determining unit configured to determine intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, the first indication information is used to indicate whether to allow the use of the first indication information an intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
  • a setting unit configured to set the first intra-frame prediction filtering mode of the current coding block if it is determined that the current coding block needs to use the first intra-frame prediction filtering mode
  • the first use identification bit of is set to the first value
  • a transmission unit configured to write the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream;
  • the superposition unit is configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block's prediction block.
  • an image decoding apparatus including:
  • a parsing unit configured to determine intra-frame prediction filtering indication information and a first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate Whether to allow the use of the first intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is the intra-frame prediction filtering IPF mode, the The first use flag is the use flag of the first intra-frame prediction filtering mode;
  • a determining unit configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block's prediction block.
  • an embodiment of the present application provides an encoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the first aspect.
  • an embodiment of the present application provides a decoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the second aspect above.
  • an embodiment of the present application provides a terminal, where the terminal includes: one or more processors, a memory, and a communication interface; the memory and the communication interface are connected to the one or more processors; The terminal communicates with other devices through the communication interface, and the memory is used for storing computer program code, the computer program code including instructions, when the one or more processors execute the instructions, the terminal executes The method of the first aspect or the second aspect.
  • embodiments of the present application provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is made to execute the first aspect or the second the method described in the aspect.
  • an embodiment of the present application provides a computer program product containing instructions, when the instructions are run on a computer, the instructions cause the computer to execute the method described in the first aspect or the second aspect.
  • FIG. 1 is a schematic block diagram of a coding tree unit in an embodiment of the application
  • FIG. 2 is a schematic block diagram of a CTU and a coding block CU in an embodiment of the present application
  • FIG. 3 is a schematic block diagram of a color format in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of the IPF in the embodiment of the application.
  • FIG. 5 is a schematic diagram of intra-frame prediction filtering in an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a video decoding system in an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a video encoder in an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a video decoder in an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of an image encoding method in an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of an image decoding method in an embodiment of the present application.
  • 11A is a schematic diagram of a filling of a prediction block in an embodiment of the present application.
  • 11B is a schematic diagram of another filling of a prediction block in an embodiment of the present application.
  • FIG. 12 is a block diagram of a functional unit of an image encoding apparatus in an embodiment of the application.
  • FIG. 13 is a block diagram of another functional unit of the image encoding apparatus in the embodiment of the application.
  • FIG. 14 is a block diagram of a functional unit of an image decoding apparatus in an embodiment of the application.
  • FIG. 15 is a block diagram of another functional unit of the image decoding apparatus in the embodiment of the present application.
  • first, second, etc. may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element.
  • a first client could be referred to as a second client, and similarly, a second client could be referred to as a first client, without departing from the scope of this disclosure.
  • Both the first client and the second client are clients, but they are not the same client.
  • High Efficiency Video Coding standard (HEVC) technology defines coding tree unit (coding tree unit, CTU), coding block (Coding Unit, CU) , Prediction Unit (PU) and Transform Unit (TU).
  • CTU, CU, PU and TU are all image blocks.
  • Coding tree unit CTU an image is composed of multiple CTUs, a CTU usually corresponds to a square image area, including the luminance pixels and chrominance pixels in this image area (or may only contain luminance pixels, or may only contain The CTU also contains syntax elements that indicate how to divide the CTU into at least one coding block (coding unit, CU), and a method for decoding each coding block to obtain a reconstructed image.
  • the image 10 is composed of a plurality of CTUs (including CTU A, CTU B, CTU C, etc.).
  • the encoding information corresponding to a certain CTU contains the luminance value and/or the chrominance value of the pixels in the square image area corresponding to the CTU.
  • the encoding information corresponding to a certain CTU may also contain syntax elements indicating how to divide the CTU into at least one CU, and a method of decoding each CU to obtain a reconstructed image.
  • An image area corresponding to one CTU may include 64 ⁇ 64, 128 ⁇ 128 or 256 ⁇ 256 pixels.
  • a 64x64 pixel CTU contains a rectangular pixel lattice of 64 columns of 64 pixels, each pixel containing a luma component and/or a chrominance component.
  • a CTU can also correspond to a rectangular image area or an image area of other shapes, and an image area corresponding to a CTU can also be an image area with a different number of pixels in the horizontal direction and the number of pixels in the vertical direction, for example, including 64 ⁇ 128 pixels .
  • Coding block CU as shown in Figure 2, a coding tree unit CTU can be further divided into coding block CU, usually corresponding to an A ⁇ B rectangular area in the image, containing A ⁇ B luminance pixels or/and its corresponding chrominance pixels Pixels, A is the width of the rectangle, B is the height of the rectangle, A and B can be the same or different, and the values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, 4.
  • the width involved in the embodiments of the present application refers to the length along the X-axis direction (horizontal direction) in the two-dimensional rectangular coordinate system XoY shown in FIG. 1 , and the height refers to the two-dimensional rectangular coordinate system XoY shown in FIG. 1 .
  • the reconstructed image of a CU can be obtained by adding the predicted image and the residual image.
  • the predicted image is generated by intra-frame prediction or inter-frame prediction. Specifically, it can be composed of one or more prediction blocks (PB), and the residual image is generated by
  • the transform coefficients are generated by inverse quantization and inverse transform processing, which may be specifically composed of one or more transform blocks (transform blocks, TB).
  • a CU includes encoding information, and the encoding information includes information such as prediction mode and transform coefficients.
  • the CU is subjected to corresponding decoding processing such as prediction, inverse quantization, and inverse transformation, and a reconstructed image corresponding to the CU is generated.
  • decoding processing such as prediction, inverse quantization, and inverse transformation
  • the prediction unit PU is the basic unit of intra prediction and inter prediction.
  • the motion information that defines the image block includes inter prediction direction, reference frame, motion vector, etc.
  • the image block that is being encoded is called the current coding block (CCB), and the image block that is being decoded is called the current decoding.
  • Block (current decoding block, CDB) for example, when prediction processing is being performed on an image block, the current coding block or current decoding block is the prediction block; when residual processing is being performed on an image block, the current coding block or current decoding block is Transform block.
  • the picture in which the current coding block or the current decoding block is located is called the current frame.
  • the image block located on the left or upper side of the current block may be inside the current frame and already
  • reconstructed images are obtained, which are called reconstructed blocks; information such as the encoding mode and reconstructed pixels of the reconstructed blocks are available.
  • a frame that has completed encoding/decoding before the current frame is encoded/decoded is called a reconstructed frame.
  • the current frame When the current frame is a unidirectional prediction frame (P frame) or a bidirectional prediction frame (B frame), it has one or two reference frame lists respectively, and the two lists are called L0 and L1 respectively, and each list contains at least one reconstructed frame. frame, referred to as the reference frame for the current frame.
  • the reference frame provides reference pixels for inter prediction of the current frame.
  • the transform unit TU processes the residuals of the original image block and the predicted image block.
  • Pixels refer to pixels in an image, such as pixels in coding blocks, pixels in luminance component pixel blocks (also known as luminance pixels), and pixels in chrominance component pixel blocks. (also known as chroma pixels), etc.
  • Sample also known as pixel value, sample value refers to the pixel value of a pixel point
  • the pixel value in the luminance component domain specifically refers to the luminance (ie grayscale value)
  • the pixel value in the chrominance component domain specifically refers to Chroma values (ie, color and saturation)
  • the samples of a pixel specifically include original samples, predicted samples and reconstructed samples.
  • Direction description horizontal direction, for example: along the X-axis direction and vertical direction in the two-dimensional rectangular coordinate system XoY as shown in Figure 1, for example: the negative direction along the Y-axis in the two-dimensional rectangular coordinate system XoY shown in Figure 1 .
  • a predicted image of the current block is generated according to the spatially adjacent pixels of the current block.
  • An intra prediction mode corresponds to a method of generating a predicted image.
  • the division of the intra prediction unit includes 2N ⁇ 2N division and N ⁇ N division.
  • the 2N ⁇ 2N division method is to not divide the image block; the N ⁇ N division method is to divide the image block into four sub-images of equal size. piece.
  • Y represents the brightness (Luminance or Luma), that is, the grayscale value
  • Cb represents the blue chrominance component
  • Cr represents the red chrominance component
  • U and V represent the chrominance (Chrominance or Chroma), which is used to describe color and saturation.
  • 4:2:0 means that every 4 pixels has 4 luminance components and 2 chrominance components (YYYYCbCr), and 4:2:2 means that every 4 pixels has 4 luminance components and 4 chrominance components.
  • component (YYYYCbCrCbCr) and 4:4:4 represents full pixel display (YYYYCbCrCbCrCbCrCbCr),
  • Figure 3 shows the distribution of each component in different color formats, where the white circle is the Y component, and the gray circle is the UV component.
  • the intra-frame prediction part in digital video coding and decoding mainly refers to the image information of adjacent blocks of the current frame to predict the current coding unit block, calculates the residual between the predicted block and the original image block to obtain the residual information, and then transforms and quantizes it.
  • the residual information is transmitted to the decoding end.
  • the decoding end receives and parses the code stream, the residual information is obtained through steps such as inverse transformation and inverse quantization, and the reconstructed image block is obtained by superimposing the residual information on the predicted image block predicted by the decoding end.
  • intra prediction usually uses the respective angle mode and non-angle mode to predict the current coding block to obtain the prediction block, and selects the optimal prediction mode for the current coding unit according to the rate-distortion information calculated from the prediction block and the original block. , and then write the prediction mode into the code stream to the decoding end.
  • the decoding end parses the prediction mode, predicts the prediction image of the current decoding block, and superimposes the residual pixels written into the code stream to obtain the reconstructed image.
  • the non-angle mode remains relatively stable, with average mode and plane mode; the angle mode continues to increase with the evolution of digital video coding standards.
  • the H.264/AVC standard has only 8 angle prediction modes and 1 non-angle prediction mode; H.265/HEVC is extended to 33 angle prediction modes and 2 non-angle prediction modes; and the latest general video coding standard H .266/VVC adopts 67 prediction modes, among which 2 non-angle prediction modes are reserved, and the angle mode is expanded from 33 kinds of H.265 to 65 kinds.
  • the intra-frame prediction will be more accurate, and it will be more in line with the needs of the current society for the development of high-definition and ultra-high-definition video.
  • the domestic digital audio and video coding standard AVS3 also continues to expand the angle mode and non-angle mode.
  • the development of ultra-high-definition digital video has put forward higher requirements for intra-frame prediction, and cannot just rely on simply increasing the angle prediction mode. , extending the wide angle to commit coding efficiency. Therefore, the domestic digital audio and video coding standard AVS3 adopts the intra prediction filtering technology (IPF, intra prediction filter).
  • IPF intra prediction filtering technology
  • the intra prediction filtering technology points out that not all reference pixels are used in the current intra angle prediction, and it is easy to ignore some pixels and
  • the correlation between the current coding units, the intra-frame prediction filtering technology improves the pixel prediction accuracy through point-to-point filtering, which can effectively enhance the spatial correlation, thereby improving the intra-frame prediction accuracy.
  • the IPF technology takes the prediction mode from top right to bottom left in AVS3 as an example, as shown in Figure 4, where URB represents the boundary pixel of the adjacent block on the left side close to the current coding unit, and MRB represents the adjacent block on the upper side close to the current coding unit.
  • the boundary pixels of the coding unit, filter direction indicates the filtering direction.
  • the direction of the prediction mode is from upper right to lower left, and the generated prediction value of the current coding unit mainly uses the reference pixels of the adjacent blocks in the upper MRB row, that is, the prediction pixels of the current coding unit do not refer to the reconstructed pixels of the adjacent blocks on the left.
  • the current coding unit and the left reconstruction block are in a spatially adjacent relationship. If only the upper MRB pixels are referenced instead of the left URB pixels, the spatial correlation is likely to be lost, resulting in poor prediction effect.
  • IPF technology is applied to all prediction modes of intra-frame prediction, and is a filtering method to improve the accuracy of intra-frame prediction.
  • IPF technology is mainly realized through the following processes:
  • the IPF technology judges the current prediction mode of the coding unit, and divides it into a horizontal angle prediction mode, a vertical angle prediction mode and a non-angle prediction mode;
  • the IPF technology uses different filters to filter the input pixels
  • the IPF technology uses different filter coefficients to filter the input pixels
  • the input pixels of the IPF technology are the predicted pixels obtained in each prediction mode, and the output pixels are the final predicted pixels after IPF.
  • the IPF technology has the allowable flag ipf_enable_flag, a binary variable, with a value of '1' indicating that intra-frame prediction filtering can be used; a value of '0' indicating that intra-frame prediction filtering should not be used.
  • the IPF technology also uses the flag ipf_flag, a binary variable. The value of '1' indicates that intra-frame prediction filtering should be used; the value of '0' indicates that intra-frame prediction filtering should not be used. If the flag bit ipf_flag does not exist in the code stream , the default is 0.
  • the syntax element IPF_flag is as follows:
  • the above-mentioned IPF technique classifies prediction modes 0, 1 and 2 as non-angular prediction modes, and uses the first three-tap filter to filter the predicted pixels;
  • Prediction mode 19 to prediction mode 32, prediction mode 51 to prediction mode 65 are classified as horizontal-like angle prediction modes, and the prediction pixels are filtered using a second two-tap filter.
  • P'(x, y) is the final prediction value of the pixel located at the position (x, y) of the current chrominance prediction block
  • f(x) and f(y) are the reconstructed pixels of the adjacent block on the left, respectively.
  • the horizontal filter coefficients and the vertical filter coefficients of the reconstructed pixels of the adjacent blocks on the upper side are referred to, P(-1,y) and P(x,-1) are the reconstructed pixels on the left side of row y and the upper side of the pixel located on column x, respectively.
  • Create pixel, P(x, y) is the original predicted pixel value in the current chrominance component prediction block. The values of x and y do not exceed the range of the width and height of the current coding unit block.
  • the values of the above-mentioned horizontal filter coefficients and vertical filter coefficients are related to the size of the current coding unit block and the distances from the predicted pixels in the current prediction block to the left reconstructed pixels and the top reconstructed pixels.
  • the values of the above-mentioned horizontal filter coefficients and vertical filter coefficients are also related to the size of the current coding block, and are divided into different filter coefficient groups according to the size of the current coding unit block.
  • Table 1 presents the filter coefficients of the IPF technique.
  • Figure 5 shows schematic diagrams of three filtering situations for intra-frame prediction filtering. Only the upper reference pixel is used to filter the prediction value in the current coding unit; only the left reference pixel is used to filter the prediction value in the current coding unit. filtering; and filtering the prediction value in the current coding unit block with reference to both the upper and left reference pixels.
  • FIG. 6 is a block diagram of an example video coding system 1 described in the embodiments of the present application.
  • the term "video coder” generally refers to both a video encoder and a video decoder.
  • the term “video coding” or “coding” may generally refer to video encoding or video decoding.
  • the video encoder 100 and the video decoder 200 of the video coding system 1 are used to implement the image coding method proposed in this application.
  • video coding system 1 includes source device 10 and destination device 20 .
  • Source device 10 produces encoded video data. Accordingly, source device 10 may be referred to as a video encoding device.
  • Destination device 20 may decode the encoded video data generated by source device 10 . Accordingly, destination device 20 may be referred to as a video decoding device.
  • Various implementations of source device 10, destination device 20, or both may include one or more processors and a memory coupled to the one or more processors.
  • the memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other medium that may be used to store the desired program code in the form of instructions or data structures accessible by a computer, as described herein.
  • Source device 10 and destination device 20 may include various devices including desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, etc. , televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
  • Link 30 may include one or more media or devices capable of moving encoded video data from source device 10 to destination device 20 .
  • link 30 may include one or more communication media that enable source device 10 to transmit encoded video data directly to destination device 20 in real-time.
  • source device 10 may modulate the encoded video data according to a communication standard, such as a wireless communication protocol, and may transmit the modulated video data to destination device 20 .
  • the one or more communication media may include wireless and/or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines.
  • RF radio frequency
  • the one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (eg, the Internet).
  • the one or more communication media may include routers, switches, base stations, or other equipment that facilitates communication from source device 10 to destination device 20 .
  • the encoded data may be output from output interface 140 to storage device 40 .
  • the image encoding and decoding techniques of the present application can be applied to video encoding and decoding to support a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (eg, via the Internet), for storage in data storage Encoding of video data on media, decoding of video data stored on data storage media, or other applications.
  • video coding system 1 may be used to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
  • the video coding system 1 illustrated in FIG. 6 is merely an example, and the techniques of this application may be applicable to video coding setups (eg, video encoding or video decoding) that do not necessarily include any communication of data between an encoding device and a decoding device. .
  • data is retrieved from local storage, streamed over a network, and the like.
  • a video encoding device may encode and store data to memory, and/or a video decoding device may retrieve and decode data from memory.
  • encoding and decoding is performed by devices that do not communicate with each other, but merely encode data to and/or retrieve data from memory and decode data.
  • source device 10 includes video source 120 , video encoder 100 , and output interface 140 .
  • output interface 140 may include a modulator/demodulator (modem) and/or a transmitter.
  • Video source 120 may include a video capture device (eg, a video camera), a video archive containing previously captured video data, a video feed interface to receive video data from a video content provider, and/or a computer to generate video data A graphics system, or a combination of such sources of video data.
  • Video encoder 100 may encode video data from video source 120 .
  • source device 10 transmits the encoded video data directly to destination device 20 via output interface 140 .
  • the encoded video data may also be stored on storage device 40 for later access by destination device 20 for decoding and/or playback.
  • destination device 20 includes input interface 240 , video decoder 200 , and display device 220 .
  • input interface 240 includes a receiver and/or a modem.
  • Input interface 240 may receive encoded video data via link 30 and/or from storage device 40 .
  • the display device 220 may be integrated with the destination device 20 or may be external to the destination device 20 . Generally, display device 220 displays decoded video data.
  • the display device 220 may include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
  • LCD liquid crystal display
  • OLED organic light emitting diode
  • video encoder 100 and video decoder 200 may each be integrated with an audio encoder and decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and software to handle the encoding of both audio and video in a common data stream or separate data streams.
  • Video encoder 100 and video decoder 200 may each be implemented as any of a variety of circuits such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, hardware, or any combination thereof. If the application is implemented in part in software, a device may store instructions for the software in a suitable non-volatile computer-readable storage medium, and the instructions may be executed in hardware using one or more processors Thus, the technology of the present application is implemented. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors. Each of video encoder 100 and video decoder 200 may be included in one or more encoders or decoders, either of which may be integrated as a combined encoder in the respective device /decoder (codec) part.
  • codec device /decoder
  • FIG. 7 is an exemplary block diagram of a video encoder 100 described in an embodiment of the present application.
  • the video encoder 100 is used to output the video to the post-processing entity 41 .
  • Post-processing entity 41 represents an example of a video entity that can process encoded video data from video encoder 100, such as a Media Aware Network Element (MANE) or a splicing/editing device.
  • MEM Media Aware Network Element
  • post-processing entity 41 may be an instance of a network entity.
  • post-processing entity 41 and video encoder 100 may be parts of separate devices, while in other cases the functionality described with respect to post-processing entity 41 may be performed by the same device that includes video encoder 100 implement.
  • post-processing entity 41 is an example of storage device 40 of FIG. 1 .
  • video encoder 100 includes prediction processing unit 108 , filter unit 106 , memory 107 , summer 112 , transformer 101 , quantizer 102 , and entropy encoder 103 .
  • the prediction processing unit 108 includes an inter predictor 110 and an intra predictor 109 .
  • the video encoder 100 also includes an inverse quantizer 104 , an inverse transformer 105 and a summer 111 .
  • Filter unit 106 represents one or more loop filters, such as deblocking filters, adaptive loop filters (ALF), and sample adaptive offset (SAO) filters.
  • filter unit 106 is shown in FIG. 7 as an in-loop filter, in other implementations, filter unit 106 may be implemented as a post-loop filter.
  • the video encoder 100 may further include a video data memory and a division unit (not shown in the figure).
  • the video encoder 100 receives video data and stores the video data in a video data memory.
  • the division unit divides the video data into several image blocks, and these image blocks can be further divided into smaller blocks, such as image block division based on a quad-tree structure or a binary tree structure.
  • Prediction processing unit 108 may select one of a plurality of possible coding modes for the current image block, such as one of a plurality of intra-coding modes or one of a plurality of inter-coding modes. Prediction processing unit 108 may provide the resulting intra-, inter-coded block to summer 112 to generate a residual block, and to summer 111 to reconstruct the encoded block for use as a reference image.
  • Intra-predictor 109 within prediction processing unit 108 may perform intra-predictive encoding of the current image block relative to one or more adjacent encoded blocks in the same frame or slice as the current block to be encoded to remove spatial redundancy Remain.
  • Inter predictor 110 within prediction processing unit 108 may perform inter-predictive encoding of the current image block relative to one or more prediction blocks in one or more reference images to remove temporal redundancy.
  • Prediction processing unit 108 provides information indicative of the selected intra or inter prediction mode for the current image block to entropy encoder 103 so that entropy encoder 103 encodes the information indicative of the selected inter prediction mode.
  • video encoder 100 forms a residual image block by subtracting the prediction block from the current image block to be encoded.
  • Summer 112 represents one or more components that perform this subtraction operation.
  • Residual video data in the residual block may be included in one or more TUs and applied to transformer 101 .
  • Transformer 101 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform.
  • Transformer 101 may convert residual video data from a pixel value domain to a transform domain, such as a frequency domain.
  • DCT discrete cosine transform
  • Transformer 101 may send the resulting transform coefficients to quantizer 102 .
  • Quantizer 102 quantizes the transform coefficients to further reduce the bit rate.
  • quantizer 102 may then perform a scan of the matrix including the quantized transform coefficients.
  • the entropy encoder 103 may perform scanning.
  • the entropy encoder 103 After quantization, the entropy encoder 103 entropy encodes the quantized transform coefficients. For example, the entropy encoder 103 may perform context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) ) encoding or another entropy encoding method or technique.
  • CAVLC context adaptive variable length coding
  • CABAC context adaptive binary arithmetic coding
  • SBAC syntax-based context adaptive binary arithmetic coding
  • PIPE probability interval partitioning entropy
  • the encoded codestream may be transmitted to video decoder 200 , or archived for later transmission or retrieval by video decoder 200 .
  • the entropy encoder 103 may also entropy encode the syntax elements of the current image block to be encoded.
  • Inverse quantizer 104 and inverse transformer 105 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain, eg, for later use as a reference block for a reference image.
  • Summer 111 adds the reconstructed residual block to the prediction block produced by inter predictor 110 or intra predictor 109 to produce a reconstructed image block.
  • Filter unit 106 may be applied to the reconstructed image blocks to reduce distortions, such as block artifacts.
  • This reconstructed image block is then stored in memory 107 as a reference block, which can be used as a reference block by inter-predictor 110 to inter-predict blocks in subsequent video frames or images.
  • the video encoder 100 divides the input video into several coding tree units, and each coding tree unit is further divided into several or rectangular or square coding blocks.
  • the current coding block selects the intra-frame prediction mode for coding
  • the luminance component of the current coding block is subjected to calculation traversal of several prediction modes
  • the optimal prediction mode is selected according to the rate-distortion cost
  • several prediction modes are performed on the chrominance components of the current coding block.
  • the calculation of the prediction mode goes through and selects the optimal prediction mode according to the rate-distortion cost.
  • the residual between the original video block and the predicted block is calculated.
  • the residual is subsequently transformed, quantized, and entropy encoded to form an output stream, and the other is subjected to inverse transformation, inverse quantization, and loop filtering to form a reconstructed sample.
  • reference information for subsequent video compression As reference information for subsequent video compression.
  • the current specific implementation of the IPF technology in the video encoder 100 is as follows.
  • the input digital video information is divided into several coding tree units at the coding end, and each coding tree unit is further divided into several rectangular or square coding units, and each coding unit performs an intra-frame prediction process to calculate a prediction block.
  • Intra-frame prediction first traverses all prediction modes, calculates the predicted pixels under each intra-frame prediction mode, and calculates the rate-distortion cost according to the original pixels;
  • this process opens the IPF technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
  • IPF is performed on the prediction block of the current coding unit, and the corresponding filter is selected according to the current prediction mode, and the corresponding filter coefficient group is selected according to the size of the current coding unit, and the specific correspondence can be found in Table 1;
  • the rate-distortion cost in b1) is smaller, write the prediction mode index code recorded in b1) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF current coding unit identification position to use the flag position No , indicating that IPF technology is not used, and the code stream is also written to the decoding end;
  • the prediction mode index coding recorded in e1) is written into the code stream as the optimal prediction mode of the current coding unit to the decoding end, and the current coding unit identification position of the IPF is used as the flag position true, Indicates that IPF technology is used, and the code stream is also written to the decoding end.
  • Intra predictor 109 may also provide information indicative of the selected intra prediction mode for the current coding block to entropy encoder 103 so that entropy encoder 103 encodes the information indicative of the selected intra prediction mode.
  • FIG. 8 is an exemplary block diagram of a video decoder 200 described in the embodiments of the present application.
  • video decoder 200 includes entropy decoder 203 , prediction processing unit 208 , inverse quantizer 204 , inverse transformer 205 , summer 211 , filter unit 206 , and memory 207 .
  • Prediction processing unit 208 may include inter predictor 210 and intra predictor 209 .
  • video decoder 200 may perform a decoding process that is substantially the reciprocal of the encoding process described with respect to video encoder 100 from FIG. 7 .
  • video decoder 200 receives from video encoder 100 an encoded video codestream representing image blocks of an encoded video slice and associated syntax elements.
  • the video decoder 200 may receive video data from the network entity 42, and optionally, may also store the video data in a video data storage (not shown in the figure).
  • Video data memory may store video data to be decoded by components of video decoder 200, such as an encoded video codestream.
  • the video data stored in the video data store may be obtained, for example, from the storage device 40, from a local video source such as a camera, via wired or wireless network communication of the video data, or by accessing a physical data storage medium.
  • the video data memory may serve as a decoded picture buffer (CPB) for storing encoded video data from the encoded video codestream.
  • CPB decoded picture buffer
  • Network entity 42 may be, for example, a server, a MANE, a video editor/splicer, or other such device for implementing one or more of the techniques described above.
  • Network entity 42 may or may not include a video encoder, such as video encoder 100 .
  • Network entity 42 may implement portions of the techniques described in this application before network entity 42 sends the encoded video stream to video decoder 200 .
  • network entity 42 and video decoder 200 may be part of separate devices, while in other cases, functionality described with respect to network entity 42 may be performed by the same device that includes video decoder 200 .
  • Entropy decoder 203 of video decoder 200 entropy decodes the codestream to generate quantized coefficients and some syntax elements. Entropy decoder 203 forwards the syntax elements to prediction processing unit 208 .
  • Video decoder 200 may receive syntax elements at the video slice level and/or the tile level. When a video slice is decoded as an intra-decoded (I) slice, the intra-predictor 209 of the prediction processing unit 208 is based on the signaled intra-prediction mode and data from previously decoded blocks of the current frame or picture Instead, the prediction block of the image block of the current video slice is generated.
  • I intra-decoded
  • inter predictor 210 of prediction processing unit 208 may determine, based on syntax elements received from entropy decoder 203, which method to use for the current The inter prediction mode in which the current image block of the video slice is decoded, based on the determined inter prediction mode, the current image block is decoded (eg, inter prediction is performed).
  • the inverse quantizer 204 inversely quantizes, ie dequantizes, the quantized transform coefficients provided in the codestream and decoded by the entropy decoder 203 .
  • the inverse quantization process may include using the quantization parameters calculated by the video encoder 100 for each image block in the video slice to determine the degree of quantization that should be applied and, likewise, the degree of inverse quantization that should be applied.
  • the inverse transformer 205 applies an inverse transform to the transform coefficients, such as an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to produce a residual block in the pixel domain.
  • the video decoder 200 After the inter predictor 210 generates a prediction block for the current image block or a sub-block of the current image block, the video decoder 200 performs the prediction by comparing the residual block from the inverse transformer 205 with the corresponding prediction generated by the inter predictor 210 The blocks are summed to obtain a reconstructed block, a decoded image block.
  • Summer 211 represents the component that performs this summation operation.
  • Loop filters may also be used (in the decoding loop or after the decoding loop) to smooth pixel transitions or otherwise improve video quality, if desired.
  • Filter unit 206 may represent one or more loop filters, such as deblocking filters, adaptive loop filters (ALF), and sample adaptive offset (SAO) filters. Although filter unit 206 is shown in FIG. 8 as an in-loop filter, in other implementations filter unit 206 may be implemented as a post-loop filter.
  • the image decoding method specifically executed by the video decoder 200 includes: after parsing, inverse transformation and inverse quantization of the input code stream, the prediction mode index of the current coding block is obtained. If the prediction mode index of the chrominance component of the current coding block is the enhanced two-step cross-component prediction mode, select only the reconstructed samples from the upper or left adjacent pixels of the current coding block to calculate the linear model according to the index value. , calculate the original prediction block of the chrominance component of the current coding block according to the linear model, down-sample, and perform prediction correction based on the correlation of the adjacent pixels of the border in the orthogonal direction for the down-sampled prediction block to obtain the final color The final prediction block for the degree component.
  • One channel of the subsequent code stream is used as reference information for subsequent video decoding, and the other channel is post-filtered to output the video signal.
  • the specific implementation of the IPF technology at the video decoder 200 is as follows.
  • the decoding end obtains the code stream and parses to obtain the digital video sequence information, and parses to obtain the IPF permission flag of the current video sequence, the coding mode of the current decoding unit is the intra-frame prediction coding mode, and the IPF usage flag of the current decoding unit.
  • video decoder 200 may generate an output video stream without being processed by filter unit 206; or, for some image blocks or image frames, entropy decoder 203 of video decoder 200 does not decode quantized coefficients, and accordingly Processing by inverse quantizer 204 and inverse transformer 205 is not required.
  • the existing IPF technology can effectively improve the coding efficiency of intra-frame prediction, greatly enhance the spatial correlation of intra-frame prediction, and solve the problem of using only a single reference pixel row or columns, while ignoring the effect of some pixels on the predicted value.
  • the intra-frame prediction process needs to be smoothed, neither the IPF technology nor the current intra-frame prediction mode can solve similar problems well. Unable to solve the smoothing problem inside the prediction block.
  • a prediction block calculated according to a single prediction mode usually shows a better prediction effect in an image with a clearer texture, and the residual error will therefore become smaller and less, and the coding efficiency will be improved.
  • over-sharpened prediction may lead to increased and larger residual errors, poor prediction effect and reduced coding efficiency.
  • the embodiments of the present application propose an IPF technology based on smoothing processing for some image blocks that need smoothing processing, and directly filter the predicted blocks obtained according to the intra-frame prediction mode.
  • FIG. 9 is a schematic flowchart of an image encoding method in an embodiment of the present application, and the image encoding method can be applied to the source device 10 in the video decoding system 1 shown in FIG. 6 or the video encoder 100 shown in FIG. 7 .
  • the flow shown in FIG. 9 is described by taking the execution subject as the video encoder 100 shown in FIG. 7 as an example.
  • the image coding method provided by the embodiment of the present application includes:
  • Step 110 Determine the intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, and the first indication information is used to indicate whether to allow the use of the first intra-frame a prediction filtering mode, where the second indication information is used to indicate whether the second intra prediction filtering mode is allowed to be used, and the first intra prediction filtering mode is an intra prediction filtering IPF mode;
  • Step 120 If it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode, set the first intra-frame prediction filtering mode of the current coding block to the first intra-frame prediction filtering mode.
  • a use flag is set to a first value, and the first value is used to indicate that the first intra-frame prediction filtering mode is used;
  • Step 130 writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream;
  • Step 140 Predict the current coding block to obtain a prediction block according to the first intra-frame prediction filtering mode, encode the prediction block, and write the coding result into a code stream.
  • the method further includes: superimposing the prediction block of the current coding block and the residual block obtained after inverse transformation and inverse quantization to obtain the reconstructed reconstructed block, which is used as the prediction of the next coding block Reference block.
  • the encoder obtains coding information, including the intra-frame prediction filtering allowable flag bit and the intra-frame prediction smoothing filter (hereinafter referred to as IPS) allowable flag bit of the technical solution, etc.
  • IPS intra-frame prediction smoothing filter
  • IPF allowable flag bit is '0', and the IPS allowable flag bit is '1', and the current CU area is greater than or equal to 64 and less than 4096, only execute a3), b3), f3), g3), h3), and i3), j3);
  • the current coding unit traverses all intra-frame prediction modes, calculates the prediction block under each prediction mode, and calculates the rate-distortion cost information of the current prediction mode according to the original block;
  • IPF filtering is performed on the prediction block of the current coding unit, the filter corresponding thereto is selected according to the current prediction mode, the corresponding filter coefficient group is selected according to the size of the current coding unit, and the specific correspondence can be found in Table 1;
  • this process opens the IPS technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
  • g3 IPS is performed twice on the prediction block of the current coding unit to obtain the final prediction block;
  • the rate-distortion cost in b3) is smaller, write the prediction mode index code recorded in b3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF current coding unit to use the flag position '0' , indicating that IPF technology is not used, and the code stream is also written to the decoding end;
  • the prediction mode index coding recorded in e3) is written as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and the current coding unit of the IPF uses the flag position '1', Indicates that IPF technology is used, and the code stream is also written to the decoder;
  • the rate-distortion cost in b3) is smaller, write the prediction mode index code recorded in b3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and set the IPS use flag position of the current coding unit to '0' ' (that is, the second value), indicating that the technology is not used, and the code stream is also written to the decoding end;
  • the rate-distortion in h3) is smaller, write the prediction mode index code recorded in h3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF use flag position '0' of the current coding unit And the IPS uses the flag position '1', which means that the IPS technology is not used instead of the IPF technology, and the code stream is also written to the decoding end.
  • the prediction block and the residual after inverse transformation and inverse quantization are superimposed to obtain the reconstructed coding unit block, which is used as the prediction reference block of the next coding unit.
  • the technical solution 2 is specifically implemented in the intra-frame prediction part of the coding end as follows:
  • the encoder obtains coding information, including the intra-frame prediction filtering allowable flag bit and the intra-frame prediction smoothing filter (hereinafter referred to as IPS) allowable flag bit of the technical solution, etc.
  • IPS intra-frame prediction smoothing filter
  • the current coding unit traverses all intra-frame prediction modes, calculates the prediction block under each prediction mode, and calculates the rate-distortion cost information of the current prediction mode according to the original block;
  • IPF filtering is performed on the prediction block of the current coding unit, the filter corresponding to it is selected according to the current prediction mode, the corresponding filter coefficient group is selected according to the size of the current coding unit, and the specific correspondence can be found in Table 1;
  • this process enables IPS technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
  • the prediction mode index coding recorded in e4) is written as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and the IPF current coding unit is used as the flag position '1', Indicates that IPF technology is used, and the code stream is also written to the decoder;
  • the rate-distortion cost in b4) is smaller, write the prediction mode index code recorded in b4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and set the IPS use flag position of the current coding unit to '0' ' (the second value), indicating that the technology is not used, and the code stream is also written to the decoding end;
  • the rate-distortion in h4) is smaller, write the prediction mode index coding recorded in h4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF use flag position '0' of the current coding unit And the IPS uses the flag position '1', which means that the IPS technology is not used instead of the IPF technology, and the code stream is also written to the decoding end.
  • the prediction block and the residual after inverse transformation and inverse quantization are superimposed to obtain the reconstructed coding unit block, which is used as the prediction reference block of the next coding unit.
  • FIG. 10 is a schematic flowchart of an image decoding method in an embodiment of the present application, and the image decoding method can be applied to the target device in the video decoding system 1 shown in FIG. 6 . 20 or the video decoder 200 shown in FIG. 8 .
  • the flow shown in FIG. 10 is described by taking the execution subject as the video encoder 200 shown in FIG. 8 as an example.
  • the image decoding method provided by the embodiment of the present application includes:
  • Step 210 parse the code stream, and determine the intra-frame prediction filtering indication information and the first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used as the first indication information.
  • the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filter mode
  • the first intra-frame prediction filter mode is the intra-frame prediction filter IPF mode
  • the first use flag is the use flag of the first intra-frame prediction filtering mode;
  • Step 220 Determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag to obtain a prediction block of the current decoding block .
  • the decoder obtains the code stream, parses the code stream to obtain the IPF allowable flag bit and the IPS allowable flag bit of the current video sequence, parses the code stream and performs inverse transformation and inverse quantization on the obtained residual information.
  • step d5) If the use flag bit of IPF is '0', no additional operation is performed on the current prediction block, and step d5) is skipped;
  • the usage flag of the IPF is '0', parse and obtain the usage flag of the IPS.
  • the decoder obtains the code stream, parses the code stream to obtain the IPF allowable flag bit and the IPS allowable flag bit of the current video sequence, parses the code stream and performs inverse transformation and inverse quantization on the obtained residual information.
  • step d6 If the use flag of IPF is '0', no additional operation is performed on the current prediction block, and step d6) is skipped;
  • the usage flag of the IPF is '0', parse and obtain the usage flag of the IPS.
  • the technical solution acts on the intra-frame prediction part in the coding and decoding framework.
  • the current block needs to be filled first, and the steps are as follows:
  • FIG. 11A shows a filling schematic diagram of the prediction block, wherein Pred.Pixel represents the pixel of the prediction block, and Recon.Pixel represents the filled pixel.
  • FIG. 11B shows another filling schematic diagram of the prediction block, wherein Pred.Pixel represents the pixel of the prediction block, and Recon.Pixel represents the filled pixel.
  • the above IPS technology uses a simplified Gaussian convolution kernel to filter the prediction block.
  • the filter has a total of 9 taps and 9 different filter coefficients, as shown below:
  • filter_coefficients represents filter coefficients.
  • P'(x, y) is the final predicted value at the current coding unit (x, y)
  • c 1 , c 2 and c 3 are the coefficients in the above filters, respectively, in the above approximate Gaussian convolution
  • c 1 is 0075
  • c 2 is 0.124
  • c 3 is 0.204.
  • P(x, y) and others such as P(x-1, y-1) are the predicted values located at the current coding units (x, y) and (x-1, y-1), where the values of x and y are The value range does not exceed the width and height of the current coding unit block.
  • the convolution kernel coefficients used by the above IPS technology can be approximated as integers and the sum of all coefficients is an exponential power of 2, which can avoid both floating-point calculations and division operations of the computer, which greatly reduces the computational complexity, as shown below:
  • the sum of the above filter coefficients is 64, that is, the calculated predicted value needs to be shifted to the right by 6 bits.
  • the IPS technology uses a simplified Gaussian convolution kernel to filter the prediction block.
  • the filter has a total of 25 taps and 6 different filter coefficients, as shown below:
  • P'(x, y) is the final predicted value at the current coding unit (x, y), and c 1 , c 2 , c 3 , c 4 , c 5 and c 6 are the In the above approximate Gaussian convolution kernel coefficients, c 1 is 0.0030, c 2 is 0.0133, c 3 is 0.0219, c 4 is 0.0596, c 5 is 0.0983, and c 6 is 0.1621.
  • P(x, y) and others such as P(x-1, y-1) are the predicted values located at the current coding units (x, y) and (x-1, y-1), where the values of x and y are The value range does not exceed the width and height of the current coding unit block.
  • the convolution kernel coefficients used by the above IPS technology can be approximated as integers and the sum of all coefficients is an exponential power of 2, which can avoid both floating-point calculations and division operations of the computer, which greatly reduces the computational complexity, as shown below:
  • the sum of the above filter coefficients is 1024, that is, the calculated predicted value needs to be shifted to the right by 10 bits.
  • the IPS technology can also use a simplified Gaussian convolution kernel to filter the prediction block.
  • the filter has a total of 13 taps and 4 different filter coefficients, as shown below:
  • the filtering formula is as follows:
  • P'(x,y) c 1 ⁇ P(x,y-2)+c 2 ⁇ P(x-1,y-1)+c 3 ⁇ P(x,y)+c 2 ⁇ P(x +1,y-1)+c 1 ⁇ P(x-2,y)+c 3 ⁇ P(x-1,y)+c 4 ⁇ P(x,y)+c 3 ⁇ P(x+1 ,y)+c 1 P(x+2,y)+c 2 P(x-1,y+1)+c 3 P(x,y+1)+c 2 P(x+1 ,y+1)+c 1 ⁇ P(x,y+2)
  • P'(x, y) is the final predicted value at the current coding unit (x, y)
  • c 1 , c 2 , c 3 and c 4 are the coefficients in the above filter, respectively, in the above approximation Among the Gaussian convolution kernel coefficients, c 1 is 13, c 2 is 18, c 3 is 25, and c 4 is 32.
  • P(x, y) and others such as P(x-1, y-1) are the predicted values located at the current coding units (x, y) and (x-1, y-1), where the values of x and y are The value range does not exceed the width and height of the current coding unit block.
  • the sum of the above filter coefficients is 256, that is, the calculated predicted value needs to be shifted to the right by 8 bits.
  • This technical solution will be applied to the encoding and decoding part of intra-frame prediction, providing options for intra-frame prediction operations that require smoothing or local blurring.
  • the predicted block is closer to the original image, which will ultimately improve coding efficiency.
  • the technical solution 1 was tested on the official simulation platform HPM7.0 of AVS, and the intra-frame prediction block was smoothed and filtered. Under the full-frame test conditions and random access conditions, the test results are shown in Table 2 and Table 3.
  • the luminance component has a BDBR saving of 0.42%
  • the UV component has a BDBR saving of 0.51% and 0.66% respectively. It can be clearly seen that it has high performance and effectively improves the coding efficiency of the encoder.
  • this solution has a large coding performance improvement on 4K resolution videos, which will be beneficial to the development of ultra-high-definition videos in the future, saving more bit rates and saving more for ultra-high-resolution videos. multiple bandwidths.
  • This scheme proposes to perform smooth filtering on the prediction block calculated by the intra-frame prediction mode during the intra-frame prediction process, so as to improve the intra-frame prediction accuracy and effectively improve the coding efficiency.
  • the details are as follows:
  • the encoder decides not to use the IPF technology for the current coding unit, it needs to transmit the identification bit of the IPS, and the decoder needs to parse the use identification bit of the IPS;
  • the IPS convolution kernel is proposed as a simplified 9-tap filtering Gaussian convolution kernel
  • a 9-tap integer Gaussian convolution kernel filter coefficient is proposed, the first filter coefficient is 5, the second filter coefficient is 8 and the third filter coefficient is 12, and the predicted value after filtering needs to be shifted to the right by 6 bits;
  • Extension 1 Replace the 9-tap Gaussian convolution kernel in this technical solution with a filter convolution kernel with more taps to achieve a better smoothing filtering effect.
  • Extended solution 2 The luminance component and the chrominance component in this technical solution are respectively used with independent identification bits to indicate whether the IPS is used or not.
  • Extended solution 3 The scope of use in this technical solution is limited, and IPS technology is not used for units with smaller prediction block areas, so as to reduce transmission identification bits and reduce computational complexity.
  • Extended solution 4 The scope of use in this technical solution is limited, and the prediction mode of the current coding unit is screened. If it is an average mode, the IPS technology is not used to reduce transmission identification bits and computational complexity.
  • An embodiment of the present application provides an image encoding apparatus, and the image encoding apparatus may be a video decoder or a video encoder. Specifically, the image encoding apparatus is configured to perform the steps performed by the video decoder in the above decoding method.
  • the image encoding apparatus provided by the embodiments of the present application may include modules corresponding to corresponding steps.
  • the image coding apparatus may be divided into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
  • the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 12 shows a possible schematic structural diagram of the image coding apparatus involved in the above embodiment.
  • the image encoding apparatus 12 includes a determination unit 120 , a setting unit 121 , a transmission unit 122 , and a superimposition unit 123 .
  • the determining unit 120 is configured to determine intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, and the first indication information is used to indicate whether to allow the use of the first indication information.
  • the intra-frame prediction filtering indication information includes first indication information and second indication information
  • the first indication information is used to indicate whether to allow the use of the first indication information.
  • an intra-frame prediction filtering mode the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
  • the setting unit 121 is configured to filter the first intra-frame prediction of the current coding block if it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode
  • the first use identification bit of the mode is set to the first value
  • a transmission unit 122 configured to write the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream;
  • the superimposing unit 123 is a superimposing unit configured to, according to the intra-frame prediction filtering indication information and the first use flag, determine to use the first frame rate prediction filtering mode to predict the current decoding block, and obtain the current decoding block. The predicted block of the decoded block.
  • the image encoding apparatus includes but is not limited to the above-mentioned modules.
  • the image encoding apparatus may further include a storage unit.
  • the storage unit may be used to store program codes and data of the image encoding apparatus.
  • the image encoding apparatus 13 includes a processing module 130 and a communication module 131 .
  • the processing module 130 is used to control and manage the actions of the image encoding apparatus, for example, to perform the steps performed by the determination unit 120, the setting unit 121, the transmission unit 122, the superimposition unit 123, and/or to perform other techniques described herein. process.
  • the communication module 131 is used to support the interaction between the image coding apparatus and other devices.
  • the image encoding apparatus may further include a storage module 132, and the storage module 132 is configured to store program codes and data of the image encoding apparatus, for example, to store the content stored in the above-mentioned storage unit.
  • the processing module 130 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), ASIC, FPGA or other programmable Logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
  • the communication module 131 may be a transceiver, an RF circuit, a communication interface, or the like.
  • the storage module 132 may be a memory.
  • the above-mentioned image encoding apparatus can perform the above-mentioned image encoding method, and the image encoding apparatus may specifically be a video image encoding apparatus or other equipment having a video encoding function.
  • the present application also provides a video encoder, including a non-volatile storage medium, and a central processing unit, where the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium.
  • the medium is connected, and the executable program is executed to implement the image encoding method of the embodiment of the present application.
  • An embodiment of the present application provides an image decoding apparatus, and the image decoding apparatus may be a video decoder or a video decoder. Specifically, the image decoding apparatus is configured to perform the steps performed by the video decoder in the above decoding method.
  • the image decoding apparatus provided by the embodiments of the present application may include modules corresponding to corresponding steps.
  • the image decoding apparatus may be divided into functional modules according to the above method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
  • the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 14 shows a possible schematic structural diagram of the image decoding apparatus involved in the above embodiment.
  • the image decoding apparatus 14 includes an analysis unit 140 and a determination unit 141 .
  • a parsing unit configured to determine intra-frame prediction filtering indication information and a first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate Whether to allow the use of the first intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is the intra-frame prediction filtering IPF mode, the The first use flag is the use flag of the first intra-frame prediction filtering mode;
  • a determining unit configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block's prediction block.
  • the image decoding apparatus includes but is not limited to the above-mentioned modules.
  • the image decoding apparatus may further include a storage unit.
  • the storage unit may be used to store program codes and data of the image decoding apparatus.
  • the image decoding apparatus 15 includes a processing module 150 and a communication module 151 .
  • the processing module 150 is used to control and manage the actions of the image decoding apparatus, eg, to perform the steps performed by the parsing unit 140, the determination unit 141, and/or other processes for performing the techniques described herein.
  • the communication module 151 is used to support the interaction between the image decoding apparatus and other devices.
  • the image decoding apparatus may further include a storage module 152, and the storage module 152 is configured to store program codes and data of the image decoding apparatus, for example, to store the content stored in the above-mentioned storage unit.
  • the processing module 150 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), ASIC, FPGA or other programmable Logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
  • the communication module 151 may be a transceiver, an RF circuit, a communication interface, or the like.
  • the storage module 152 may be a memory.
  • the above-mentioned image decoding apparatus can execute the above-mentioned image decoding method, and the image decoding apparatus may specifically be a video image decoding apparatus or other equipment having a video decoding function.
  • the present application also provides a video decoder, including a non-volatile storage medium, and a central processing unit, where the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium.
  • the medium is connected, and the executable program is executed to implement the image decoding method of the embodiment of the present application.
  • the present application also provides a terminal, where the terminal includes: one or more processors, a memory, and a communication interface.
  • the memory and the communication interface are coupled with one or more processors; the memory is used to store computer program codes, and the computer program codes include instructions.
  • the terminal executes the image encoding and/or the image coding and/or the embodiments of the present application. or image decoding method.
  • the terminal here can be a video display device, a smart phone, a portable computer, and other devices that can process or play videos.
  • Another embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes one or more program codes, and the one or more programs include instructions, when the processor in the decoding device executes the program When coding, the decoding device executes the image encoding method and the image decoding method of the embodiments of the present application.
  • a computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; at least one processor of the decoding device can be obtained from a computer
  • the readable storage medium reads the computer-executable instruction, and at least one processor executes the computer-executable instruction to cause the terminal to implement the image encoding method and the image decoding method of the embodiments of the present application.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • a software program it may take the form of a computer program product, in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • wire eg, coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless eg, infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

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

Abstract

An image coding method, an image decoding method, and related apparatuses. The image coding method comprises: determining intra-frame prediction filtering indication information of the current coding block; if it is determined, according to the intra-frame prediction filtering indication information, that the current coding block needs to use a first intra-frame prediction filtering mode, setting a first use identification bit of the first intra-frame prediction filtering mode of the current coding block to be allowed-to-use; writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream; and performing prediction on the current coding block according to the first intra-frame prediction filtering mode to obtain a predicted block, coding the predicted block, and writing a coding result into the code stream. Options for operations, such as smoothing processing or local blurring, required for intra-frame prediction are provided, and for parts of an image texture that do not need to be too sharp, predicted pixels are smoother, and a predicted block is closer to an original image. Therefore, the coding efficiency can be improved.

Description

图像编码方法、图像解码方法及相关装置Image coding method, image decoding method and related device 技术领域technical field
本申请涉及电子设备技术领域,具体涉及一种图像编码方法、图像解码方法及相关装置。The present application relates to the technical field of electronic devices, and in particular, to an image encoding method, an image decoding method, and related apparatuses.
背景技术Background technique
数字视频能力可并入到大范围的装置中,包含数字电视、数字直播***、无线广播***、个人数字助理(personal digital assistant,PDA)、膝上型或桌上型计算机、平板计算机、电子书阅读器、数码相机、数字记录装置、数字媒体播放器、视频游戏装置、视频游戏控制台、蜂窝式或卫星无线电电话、视频会议装置、视频流装置等等。Digital video capabilities can be incorporated into a wide range of devices, including digital television, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-books Readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, video conferencing devices, video streaming devices, and the like.
数字视频装置实施视频压缩技术,例如由动态图像专家组(Moving Picture Experts Group,MPEG)-2、MPEG-4、ITU-TH.263、ITU-TH.264/MPEG-4第10部分高级视频编解码(advanced video coding,AVC)、ITU-TH.265高效率视频编解码(high efficiency video coding,HEVC)标准定义的标准和所述标准的扩展部分中所描述的那些视频压缩技术,从而更高效地发射及接收数字视频信息。视频装置可通过实施这些视频编解码技术来更高效地发射、接收、编码、解码和/或存储数字视频信息。Digital video devices implement video compression techniques such as those developed by the Moving Picture Experts Group (MPEG)-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 Advanced Video Coding Decoding (advanced video coding, AVC), ITU-TH.265 high efficiency video coding (high efficiency video coding, HEVC) standard defined standards and those video compression techniques described in extensions of said standards, so as to be more efficient to transmit and receive digital video information. Video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing these video codec techniques.
随着互联网视频的激增,尽管数字视频压缩技术不断演进,但仍然对视频压缩比提出更高要求。With the proliferation of Internet video, despite the continuous evolution of digital video compression technology, it still puts forward higher requirements for video compression ratio.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种图像编码方法、图像解码方法及相关装置,以期为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。The embodiments of the present application provide an image encoding method, an image decoding method, and a related device, in order to provide options for operations that require smoothing or local blurring for intra-frame prediction. The technology makes the predicted pixels smoother and the predicted block closer to the original image, which will ultimately improve coding efficiency.
第一方面,本申请实施例提供一种图像编码方法,包括:In a first aspect, an embodiment of the present application provides an image encoding method, including:
确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;determining intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, where the first indication information is used to indicate whether the first intra-frame prediction filtering mode is allowed to be used , the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;If it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode, the first use flag of the first intra-frame prediction filtering mode of the current coding block is set bit is set to the first value;
将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;Writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use flag into the code stream;
根据所述第一帧内预测滤波模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。According to the first intra-frame prediction filtering mode, the current coding block is predicted to obtain a prediction block, the prediction block is encoded, and the encoding result is written into the code stream.
相比于现有技术,本申请方案为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。Compared with the prior art, the solution of the present application provides options for operations such as smoothing or local blurring for intra-frame prediction. For the part of the image texture that does not need to be too sharp, the use of this technology makes the predicted pixels smoother and the predicted blocks more accurate. Close to the original image, which will eventually improve the encoding efficiency.
第二方面,本申请实施例提供一种图像解码方法,包括:In a second aspect, an embodiment of the present application provides an image decoding method, including:
解析码流,确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;Parse the code stream, and determine the intra-frame prediction filtering indication information and the first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate whether The first intra-frame prediction filtering mode is allowed to be used, and the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode, and the a use flag bit is the use flag bit of the first intra-frame prediction filtering mode;
根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。According to the intra-frame prediction filtering indication information and the first usage flag, it is determined to use the first frame rate prediction filtering mode to perform prediction on the current decoding block, to obtain a prediction block of the current decoding block.
相比于现有技术,本申请方案为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。Compared with the prior art, the solution of the present application provides options for operations such as smoothing or local blurring for intra-frame prediction. For the part of the image texture that does not need to be too sharp, the use of this technology makes the predicted pixels smoother and the predicted blocks more accurate. Close to the original image, which will eventually improve the encoding efficiency.
第三方面,本申请实施例提供一种图像编码装置,包括:In a third aspect, an embodiment of the present application provides an image encoding apparatus, including:
确定单元,用于确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;a determining unit, configured to determine intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, the first indication information is used to indicate whether to allow the use of the first indication information an intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
设置单元,用于若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;A setting unit, configured to set the first intra-frame prediction filtering mode of the current coding block if it is determined that the current coding block needs to use the first intra-frame prediction filtering mode The first use identification bit of is set to the first value;
传输单元,用于将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;a transmission unit, configured to write the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream;
叠加单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。The superposition unit is configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block's prediction block.
第四方面,本申请实施例提供一种图像解码装置,包括:In a fourth aspect, an embodiment of the present application provides an image decoding apparatus, including:
解析单元,用于确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;a parsing unit, configured to determine intra-frame prediction filtering indication information and a first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate Whether to allow the use of the first intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is the intra-frame prediction filtering IPF mode, the The first use flag is the use flag of the first intra-frame prediction filtering mode;
确定单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。A determining unit, configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block's prediction block.
第五方面,本申请实施例提供了一种编码器,包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行上述第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides an encoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the first aspect.
第六方面,本申请实施例提供了一种解码器,包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行上述第二方面所述的方法。In a sixth aspect, an embodiment of the present application provides a decoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the second aspect above.
第七方面,本申请实施例提供了一种终端,所述终端包括:一个或多个处理器、存储器和通信接口;所述存储器、所述通信接口与所述一个或多个处理器连接;所述终端通过所述通信接口与其他设备通信,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述一个或多个处理器执行所述指令时,所述终端执行如第一方面或第二方面所述的方法。In a seventh aspect, an embodiment of the present application provides a terminal, where the terminal includes: one or more processors, a memory, and a communication interface; the memory and the communication interface are connected to the one or more processors; The terminal communicates with other devices through the communication interface, and the memory is used for storing computer program code, the computer program code including instructions, when the one or more processors execute the instructions, the terminal executes The method of the first aspect or the second aspect.
第八方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。In an eighth aspect, embodiments of the present application provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is made to execute the first aspect or the second the method described in the aspect.
第九方面,本申请实施例提供了一种包含指令的计算机程序产品,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。In a ninth aspect, an embodiment of the present application provides a computer program product containing instructions, when the instructions are run on a computer, the instructions cause the computer to execute the method described in the first aspect or the second aspect.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1为本申请实施例中编码树单元的一种示意性框图;1 is a schematic block diagram of a coding tree unit in an embodiment of the application;
图2为本申请实施例中CTU和编码块CU的一种示意性框图;2 is a schematic block diagram of a CTU and a coding block CU in an embodiment of the present application;
图3为本申请实施例中颜色格式的一种示意性框图;3 is a schematic block diagram of a color format in an embodiment of the present application;
图4为本申请实施例中IPF示意图;4 is a schematic diagram of the IPF in the embodiment of the application;
图5为本申请实施例中帧内预测滤波示意图;5 is a schematic diagram of intra-frame prediction filtering in an embodiment of the present application;
图6为本申请实施例中视频译码***的一种示意性框图;6 is a schematic block diagram of a video decoding system in an embodiment of the present application;
图7为本申请实施例中视频编码器的一种示意性框图;7 is a schematic block diagram of a video encoder in an embodiment of the present application;
图8为本申请实施例中视频解码器的一种示意性框图;8 is a schematic block diagram of a video decoder in an embodiment of the present application;
图9为本申请实施例中一种图像编码方法的流程示意图;FIG. 9 is a schematic flowchart of an image encoding method in an embodiment of the present application;
图10为本申请实施例中一种图像解码方法的流程示意图;10 is a schematic flowchart of an image decoding method in an embodiment of the present application;
图11A为本申请实施例中预测块的一种填充示意图;11A is a schematic diagram of a filling of a prediction block in an embodiment of the present application;
图11B为本申请实施例中预测块的另一种填充示意图;11B is a schematic diagram of another filling of a prediction block in an embodiment of the present application;
图12为本申请实施例中图像编码装置的一种功能单元框图;12 is a block diagram of a functional unit of an image encoding apparatus in an embodiment of the application;
图13为本申请实施例中图像编码装置的另一种功能单元框图;13 is a block diagram of another functional unit of the image encoding apparatus in the embodiment of the application;
图14为本申请实施例中图像解码装置的一种功能单元框图;14 is a block diagram of a functional unit of an image decoding apparatus in an embodiment of the application;
图15为本申请实施例中图像解码装置的另一种功能单元框图。FIG. 15 is a block diagram of another functional unit of the image decoding apparatus in the embodiment of the present application.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本发明的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It will be understood that the terms "first", "second", etc., as used herein, may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first client could be referred to as a second client, and similarly, a second client could be referred to as a first client, without departing from the scope of this disclosure. Both the first client and the second client are clients, but they are not the same client.
首先介绍一下本申请实施例中用到的术语。First, the terms used in the embodiments of this application are introduced.
对于图像的划分,为了更加灵活的表示视频内容,高效率视频编解码(High Efficiency Video Coding standard,HEVC)技术中定义了编码树单元(coding tree unit,CTU)、编码块(Coding Unit,CU)、预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。CTU、CU、PU和TU均为图像块。For image division, in order to represent video content more flexibly, High Efficiency Video Coding standard (HEVC) technology defines coding tree unit (coding tree unit, CTU), coding block (Coding Unit, CU) , Prediction Unit (PU) and Transform Unit (TU). CTU, CU, PU and TU are all image blocks.
编码树单元CTU,一幅图像由多个CTU构成,一个CTU通常对应于一个方形图像区域,包含这个图像区域中的亮度像素和色度像素(或者也可以只包含亮度像素,或者也可以只包含色度像素);CTU中还包含语法元素,这些语法元素指示如何将CTU划分成至少一个编码块(coding unit,CU),以及解码每个编码块得到重建图像的方法。如图1所示,图像10由多个CTU构成(包括CTU A、CTU B、CTU C等)。与某一CTU对应的编码信息包含与该CTU对应的方形图像区域中的像素的亮度值和/或色度值。此外,与某一CTU对应的编码信息还可以包含语法元素,这些语法元素指示如何将该CTU划分成至少一个CU,以及解码每个CU以得到重建图像的方法。一个CTU对应的图像区域可以包括64×64、128×128或256×256个像素。在一个示例中,64×64个像素的CTU包含由64列、每列64个像素的矩形像素点阵,每个像素包含亮度分量和/或色度分量。CTU也可以对应矩形图像区域或者其它形状的图像区域,一个CTU对应的图像区域也可以是水平方向的像素点的数量与竖直方向的像素点数量不同的图像区域,例如包括64×128个像素。Coding tree unit CTU, an image is composed of multiple CTUs, a CTU usually corresponds to a square image area, including the luminance pixels and chrominance pixels in this image area (or may only contain luminance pixels, or may only contain The CTU also contains syntax elements that indicate how to divide the CTU into at least one coding block (coding unit, CU), and a method for decoding each coding block to obtain a reconstructed image. As shown in FIG. 1, the image 10 is composed of a plurality of CTUs (including CTU A, CTU B, CTU C, etc.). The encoding information corresponding to a certain CTU contains the luminance value and/or the chrominance value of the pixels in the square image area corresponding to the CTU. In addition, the encoding information corresponding to a certain CTU may also contain syntax elements indicating how to divide the CTU into at least one CU, and a method of decoding each CU to obtain a reconstructed image. An image area corresponding to one CTU may include 64×64, 128×128 or 256×256 pixels. In one example, a 64x64 pixel CTU contains a rectangular pixel lattice of 64 columns of 64 pixels, each pixel containing a luma component and/or a chrominance component. A CTU can also correspond to a rectangular image area or an image area of other shapes, and an image area corresponding to a CTU can also be an image area with a different number of pixels in the horizontal direction and the number of pixels in the vertical direction, for example, including 64×128 pixels .
编码块CU,如图2所示,一个编码树单元CTU可以进一步划分为编码块CU,通常对应于图像中一个A×B的矩形区域,包含A×B亮度像素或/和它对应的色度像素,A为矩形的宽,B为矩形的高,A和B可以相同也可以不同,A和B的取值通常为2的整数次幂,例如128、64、32、16、8、4。其中,本申请实施例中涉及到的宽是指图1示出的二维直角坐标系XoY中沿X轴方向(水平方向)的长度,高是指图1示出的二维直角坐标系XoY中沿Y轴方向(竖直方向)的长度。一个CU的重建图像可以通过预测图像与残差图像相加得到,预测图像通过帧内预测或帧间预测生成,具体可以由一个或多个预测块(prediction block,PB)构成,残差图像通过对变换系数进行反量化和反变换处理生成,具体可以由一个或多个变换块(transform block,TB)构成。具体的,一个CU包含编码信息,编码信息包括预测模式、变换系数等信息,按照这些编码信息对CU进行相应的预测、反量化、反变换等解码处理,产生这个CU对应的重建图像。编码树单元与编码块关系如图3所示。Coding block CU, as shown in Figure 2, a coding tree unit CTU can be further divided into coding block CU, usually corresponding to an A×B rectangular area in the image, containing A×B luminance pixels or/and its corresponding chrominance pixels Pixels, A is the width of the rectangle, B is the height of the rectangle, A and B can be the same or different, and the values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, 4. The width involved in the embodiments of the present application refers to the length along the X-axis direction (horizontal direction) in the two-dimensional rectangular coordinate system XoY shown in FIG. 1 , and the height refers to the two-dimensional rectangular coordinate system XoY shown in FIG. 1 . The length along the Y-axis direction (vertical direction) in the middle. The reconstructed image of a CU can be obtained by adding the predicted image and the residual image. The predicted image is generated by intra-frame prediction or inter-frame prediction. Specifically, it can be composed of one or more prediction blocks (PB), and the residual image is generated by The transform coefficients are generated by inverse quantization and inverse transform processing, which may be specifically composed of one or more transform blocks (transform blocks, TB). Specifically, a CU includes encoding information, and the encoding information includes information such as prediction mode and transform coefficients. According to the encoding information, the CU is subjected to corresponding decoding processing such as prediction, inverse quantization, and inverse transformation, and a reconstructed image corresponding to the CU is generated. The relationship between the coding tree unit and the coding block is shown in Figure 3.
预测单元PU,是帧内预测、帧间预测的基本单元。定义图像块的运动信息包含帧间预测方向、参考帧、运动矢量等,正在进行编码处理的图像块称为当前编码块(current coding block,CCB),正在进行解码处理的图像块称为当前解码块(current decoding block,CDB),例如正在对一个图像块进行预测处理时,当前编码块或者当前解码块为预测块;正在对一个图像块进行残差处理时,当前编码块或者当前解码块为变换块。当前编码块或当前解码块所在的图像称为当前帧。当前帧中,位于当前块的左侧或上侧(以图1坐标系为准,左侧是指X轴负向,上侧是指Y轴正向)的图像块可能处于当前帧内部并且已经完成了编码/解码处理,得到了重建图像,它们称为重构块;重构块的编码模式、重建像素等信息是可以获得的(available)。在当前帧进行编码/解码之前已经完成编码/解码处理的帧称为重建帧。当前帧为单向预测帧(P帧)或双向预测帧(B帧)时,它分别具有一个或两个参考帧列表,两个列表分别称为L0和L1,每个列表中包含至少一个重建帧,称为当前帧的参考帧。参考帧为当前帧的帧间预测提供参考像素。The prediction unit PU is the basic unit of intra prediction and inter prediction. The motion information that defines the image block includes inter prediction direction, reference frame, motion vector, etc. The image block that is being encoded is called the current coding block (CCB), and the image block that is being decoded is called the current decoding. Block (current decoding block, CDB), for example, when prediction processing is being performed on an image block, the current coding block or current decoding block is the prediction block; when residual processing is being performed on an image block, the current coding block or current decoding block is Transform block. The picture in which the current coding block or the current decoding block is located is called the current frame. In the current frame, the image block located on the left or upper side of the current block (based on the coordinate system in Figure 1, the left side refers to the negative direction of the X-axis, and the upper side refers to the positive direction of the Y-axis) may be inside the current frame and already After the encoding/decoding process is completed, reconstructed images are obtained, which are called reconstructed blocks; information such as the encoding mode and reconstructed pixels of the reconstructed blocks are available. A frame that has completed encoding/decoding before the current frame is encoded/decoded is called a reconstructed frame. When the current frame is a unidirectional prediction frame (P frame) or a bidirectional prediction frame (B frame), it has one or two reference frame lists respectively, and the two lists are called L0 and L1 respectively, and each list contains at least one reconstructed frame. frame, referred to as the reference frame for the current frame. The reference frame provides reference pixels for inter prediction of the current frame.
变换单元TU,对原始图像块和预测图像块的残差进行处理。The transform unit TU processes the residuals of the original image block and the predicted image block.
像素(又称为像素点),是指图像中的像素点,如编码块中的像素点、亮度分量像素块中的像素点(又称为亮度像素)、色度分量像素块中的像素点(又称为色度像素)等。Pixels (also known as pixels) refer to pixels in an image, such as pixels in coding blocks, pixels in luminance component pixel blocks (also known as luminance pixels), and pixels in chrominance component pixel blocks. (also known as chroma pixels), etc.
样本(又称为像素值、样本值),是指像素点的像素值,该像素值在亮度分量域具体是指亮度(即灰阶值),该像素值在在色度分量域具体是指色度值(即色彩和饱和度),按照处理阶段的不同,一个像素的样本具体包括原始样本、预测样本和重构样本。Sample (also known as pixel value, sample value) refers to the pixel value of a pixel point, the pixel value in the luminance component domain specifically refers to the luminance (ie grayscale value), and the pixel value in the chrominance component domain specifically refers to Chroma values (ie, color and saturation), according to different processing stages, the samples of a pixel specifically include original samples, predicted samples and reconstructed samples.
方向说明:水平方向,例如:如图1所述的二维直角坐标系XoY中沿X轴方向、垂直方向,例如:如图1所示的二维直角坐标系XoY中沿Y轴负向方向。Direction description: horizontal direction, for example: along the X-axis direction and vertical direction in the two-dimensional rectangular coordinate system XoY as shown in Figure 1, for example: the negative direction along the Y-axis in the two-dimensional rectangular coordinate system XoY shown in Figure 1 .
帧内预测,根据当前块的空间相邻像素,产生当前块的预测图像。一种帧内预测模式对应于一种生成预测图像的方法。帧内预测单元的划分包括2N×2N划分方式和N×N划分方式,2N×2N划分方式为对图像块不进行划分;N×N划分方式为将图像块划分为四个等大的子图像块。In intra-frame prediction, a predicted image of the current block is generated according to the spatially adjacent pixels of the current block. An intra prediction mode corresponds to a method of generating a predicted image. The division of the intra prediction unit includes 2N×2N division and N×N division. The 2N×2N division method is to not divide the image block; the N×N division method is to divide the image block into four sub-images of equal size. piece.
通常,数字视频压缩技术作用于颜色编码方法为YCbCr,也可称为YUV,颜色格式为4:2:0、4:2:2或4:4:4的视频序列。其中,Y表示明亮度(Luminance或Luma),也就是灰阶值,Cb表示蓝色色度分量,Cr表示红色色度分量,U和V表示色度(Chrominance或Chroma),用于描述色彩及饱和度。在颜色格式上,4:2:0表示每4个像素有4个亮度分量,2个色度分量(YYYYCbCr),4:2:2表示每4个像素有4个亮度分量,4个色度分量(YYYYCbCrCbCr),而4:4:4表示全像素显示(YYYYCbCrCbCrCbCrCbCr),图3展示了不同颜色格式下的各分量分布图,其中白色圆形为Y分量,灰色圆形为UV分量。Generally, the digital video compression technology works on video sequences whose color coding method is YCbCr, which may also be called YUV, and whose color format is 4:2:0, 4:2:2 or 4:4:4. Among them, Y represents the brightness (Luminance or Luma), that is, the grayscale value, Cb represents the blue chrominance component, Cr represents the red chrominance component, and U and V represent the chrominance (Chrominance or Chroma), which is used to describe color and saturation. Spend. In the color format, 4:2:0 means that every 4 pixels has 4 luminance components and 2 chrominance components (YYYYCbCr), and 4:2:2 means that every 4 pixels has 4 luminance components and 4 chrominance components. component (YYYYCbCrCbCr), and 4:4:4 represents full pixel display (YYYYCbCrCbCrCbCrCbCr), Figure 3 shows the distribution of each component in different color formats, where the white circle is the Y component, and the gray circle is the UV component.
数字视频编解码中的帧内预测部分,主要参考当前帧的相邻块图像信息对当前编码单元块进行预测,将预测块与原始图像块计算残差得到残差信息后,经由变换与量化等过程,将残差信息传输到解码端。解码端接收并解析码流后,经过反变换与反量化等步骤得到残差信息,将解码端预测得到的预测图像块叠加残差信息后,得到重建图像块。在此过程中,帧内预测通常借助各自角度模式与非角度模式对当前编码块进行预测得到预测块,根据预测块与原始块计算得到的率失真信息,筛选出当前编码单元最优的预测模式,后将该预测模式写入码流到解码端。解码端解析出预测模式,预测得到当前解码块的预测图像并叠加写入码流而来的残差像素,即可得到重建图像。The intra-frame prediction part in digital video coding and decoding mainly refers to the image information of adjacent blocks of the current frame to predict the current coding unit block, calculates the residual between the predicted block and the original image block to obtain the residual information, and then transforms and quantizes it. In the process, the residual information is transmitted to the decoding end. After the decoding end receives and parses the code stream, the residual information is obtained through steps such as inverse transformation and inverse quantization, and the reconstructed image block is obtained by superimposing the residual information on the predicted image block predicted by the decoding end. In this process, intra prediction usually uses the respective angle mode and non-angle mode to predict the current coding block to obtain the prediction block, and selects the optimal prediction mode for the current coding unit according to the rate-distortion information calculated from the prediction block and the original block. , and then write the prediction mode into the code stream to the decoding end. The decoding end parses the prediction mode, predicts the prediction image of the current decoding block, and superimposes the residual pixels written into the code stream to obtain the reconstructed image.
经过历代的数字视频编解码标准发展,非角度模式保持相对稳定,有均值模式和平面模式;角度模式则随着数字视频编解码标准的演进而不断增加,以国际数字视频编码标准H系列为例,H.264/AVC标准仅有8种角度预测模式和1种非角度预测模式;H.265/HEVC扩展到33种角度预测模式和2种非角度预测模式;以及目前最新通用视频编码标准H.266/VVC采用了67种预测模式,其中保留2种非角度预测模式,将角度模式从H.265的33种扩展到了65种。毋庸置疑,随着角度模式的增加,帧内预测将会更加精确,也更加符合当前社会对高清以及超高清视频发展的需求。不仅国际标准如此,国内数字音视频编码标准AVS3也继续扩展了角度模式和非角度模式,超高清数字视频的发展对帧内预测提出了更高的要求,不能仅仅只是依靠单纯地增加角度预测模式,扩展宽角度来提交编码效率。因此,国内数字音视频编码标准AVS3采纳了帧内预测滤波技术(IPF,intra prediction filter),帧内预测滤波技术指出当前的帧内角度预测中并没有采用全部的参考像素,容易忽略一些像素与当前编码单元之间的关联性,帧内预测滤波技术通过点对点的滤波提升像素预测精度,可以有效地增强空间关联性,从而提升帧内预测精度。IPF技术以AVS3中自右上向左下的预测模式为例,具体如图4所示,其中,URB表示左侧相邻块的靠近当前编码单元的边界像素,MRB表示上侧相邻块的靠近当前编码单元的边界像素,filter direction表示滤波方向。该预测模式方向从右上到左下,生成的当前编码单元预测值主要使用上方MRB这一行相邻块的参考像素点,即当前编码单元的预测像素并没有参考到左侧相邻块的重建像素,然而当前编码单元与左侧重建块为空间相邻关系,若只参考上侧MRB像素而不参考左侧URB像素则容易缺失空间关联性导致预测效果较差。After the development of digital video coding and decoding standards of successive generations, the non-angle mode remains relatively stable, with average mode and plane mode; the angle mode continues to increase with the evolution of digital video coding standards. Take the international digital video coding standard H series as an example , the H.264/AVC standard has only 8 angle prediction modes and 1 non-angle prediction mode; H.265/HEVC is extended to 33 angle prediction modes and 2 non-angle prediction modes; and the latest general video coding standard H .266/VVC adopts 67 prediction modes, among which 2 non-angle prediction modes are reserved, and the angle mode is expanded from 33 kinds of H.265 to 65 kinds. Undoubtedly, with the increase of the angle mode, the intra-frame prediction will be more accurate, and it will be more in line with the needs of the current society for the development of high-definition and ultra-high-definition video. Not only the international standard, but the domestic digital audio and video coding standard AVS3 also continues to expand the angle mode and non-angle mode. The development of ultra-high-definition digital video has put forward higher requirements for intra-frame prediction, and cannot just rely on simply increasing the angle prediction mode. , extending the wide angle to commit coding efficiency. Therefore, the domestic digital audio and video coding standard AVS3 adopts the intra prediction filtering technology (IPF, intra prediction filter). The intra prediction filtering technology points out that not all reference pixels are used in the current intra angle prediction, and it is easy to ignore some pixels and The correlation between the current coding units, the intra-frame prediction filtering technology improves the pixel prediction accuracy through point-to-point filtering, which can effectively enhance the spatial correlation, thereby improving the intra-frame prediction accuracy. The IPF technology takes the prediction mode from top right to bottom left in AVS3 as an example, as shown in Figure 4, where URB represents the boundary pixel of the adjacent block on the left side close to the current coding unit, and MRB represents the adjacent block on the upper side close to the current coding unit. The boundary pixels of the coding unit, filter direction indicates the filtering direction. The direction of the prediction mode is from upper right to lower left, and the generated prediction value of the current coding unit mainly uses the reference pixels of the adjacent blocks in the upper MRB row, that is, the prediction pixels of the current coding unit do not refer to the reconstructed pixels of the adjacent blocks on the left. However, the current coding unit and the left reconstruction block are in a spatially adjacent relationship. If only the upper MRB pixels are referenced instead of the left URB pixels, the spatial correlation is likely to be lost, resulting in poor prediction effect.
IPF技术应用于帧内预测的所有预测模式中,是一种提高帧内预测精度的滤波方法。IPF技术主要通过以下流程实现:IPF technology is applied to all prediction modes of intra-frame prediction, and is a filtering method to improve the accuracy of intra-frame prediction. IPF technology is mainly realized through the following processes:
a)IPF技术对该编码单元的当前预测模式进行判断,划分为水平类角度预测模式、垂直类角度预测模式和非角度预测模式;a) The IPF technology judges the current prediction mode of the coding unit, and divides it into a horizontal angle prediction mode, a vertical angle prediction mode and a non-angle prediction mode;
b)根据不同类别的预测模式,IPF技术采用不同的滤波器对输入像素进行滤波;b) According to different types of prediction modes, the IPF technology uses different filters to filter the input pixels;
c)根据当前像素到参考像素的距离不同,IPF技术采用不同的滤波系数对输入像素进行滤波;c) According to the different distances from the current pixel to the reference pixel, the IPF technology uses different filter coefficients to filter the input pixels;
IPF技术的输入像素为各个预测模式下得到的预测像素,输出像素为IPF后的最终预测像素。The input pixels of the IPF technology are the predicted pixels obtained in each prediction mode, and the output pixels are the final predicted pixels after IPF.
IPF技术有允许标识位ipf_enable_flag,二值变量,值为‘1’表示可使用帧内预测滤波;值为‘0’表示不应使用帧内预测滤波。同时IPF技术还有使用标识位ipf_flag,二值变量,值为‘1’表示应使用帧内预测滤波;值为‘0’表示不应使用帧内预测滤波,如果码流中不存在标识位ipf_flag,则默认为0。The IPF technology has the allowable flag ipf_enable_flag, a binary variable, with a value of '1' indicating that intra-frame prediction filtering can be used; a value of '0' indicating that intra-frame prediction filtering should not be used. At the same time, the IPF technology also uses the flag ipf_flag, a binary variable. The value of '1' indicates that intra-frame prediction filtering should be used; the value of '0' indicates that intra-frame prediction filtering should not be used. If the flag bit ipf_flag does not exist in the code stream , the default is 0.
语法元素IPF_flag,如下:The syntax element IPF_flag is as follows:
Figure PCTCN2021109173-appb-000001
Figure PCTCN2021109173-appb-000001
Figure PCTCN2021109173-appb-000002
Figure PCTCN2021109173-appb-000002
上述IPF技术将预测模式0、1和2归类为非角度预测模式,使用第一三抽头滤波器对预测像素进行滤波;The above-mentioned IPF technique classifies prediction modes 0, 1 and 2 as non-angular prediction modes, and uses the first three-tap filter to filter the predicted pixels;
将预测模式3至预测模式18、预测模式34至预测模式50归类为垂直类角度预测模式,使用第一两抽头滤波器对预测像素进行滤波;Classify prediction mode 3 to prediction mode 18 and prediction mode 34 to prediction mode 50 as vertical class angle prediction modes, and use the first two-tap filter to filter the prediction pixels;
将预测模式19至预测模式32、预测模式51至预测模式65归类为水平类角度预测模式,使用第二两抽头滤波器对预测像素进行滤波。Prediction mode 19 to prediction mode 32, prediction mode 51 to prediction mode 65 are classified as horizontal-like angle prediction modes, and the prediction pixels are filtered using a second two-tap filter.
上述适用于IPF技术的第一三抽头滤波器,滤波公式如下:The above-mentioned first three-tap filter suitable for IPF technology, the filtering formula is as follows:
P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)P'(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P( x,y)
上述适用于IPF技术的第一两抽头滤波器,滤波公式如下:The above-mentioned first two-tap filter suitable for IPF technology, the filtering formula is as follows:
P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
上述适用于IPF技术的第二两抽头滤波器,滤波公式如下:The above-mentioned second two-tap filter suitable for IPF technology, the filtering formula is as follows:
P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)P'(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
上述式子中,P′(x,y)为当前色度预测块位于(x,y)位置像素的最终预测值,f(x)与f(y)分别为参考左侧相邻块重建像素的水平滤波系数与参考上侧相邻块重建像素的垂直滤波系数,P(-1,y)与P(x,-1)分别为位于y行的左侧重建像素与位于x列的上侧重建像素,P(x,y)为当前色度分量预测块里的原始预测像素值。其中,x与y的值均不超过当前编码单元块的宽与高取值范围。In the above formula, P'(x, y) is the final prediction value of the pixel located at the position (x, y) of the current chrominance prediction block, and f(x) and f(y) are the reconstructed pixels of the adjacent block on the left, respectively. The horizontal filter coefficients and the vertical filter coefficients of the reconstructed pixels of the adjacent blocks on the upper side are referred to, P(-1,y) and P(x,-1) are the reconstructed pixels on the left side of row y and the upper side of the pixel located on column x, respectively. Create pixel, P(x, y) is the original predicted pixel value in the current chrominance component prediction block. The values of x and y do not exceed the range of the width and height of the current coding unit block.
上述水平滤波系数与垂直滤波系数的取值与当前编码单元块的尺寸以及当前预测块中预测像素到左侧重建像素点、上侧重建像素点的距离有关。上述水平滤波系数与垂直滤波系数的取值还与当前编码块的尺寸有关,根据当前编码单元块的大小划分成不同滤波器系数组。The values of the above-mentioned horizontal filter coefficients and vertical filter coefficients are related to the size of the current coding unit block and the distances from the predicted pixels in the current prediction block to the left reconstructed pixels and the top reconstructed pixels. The values of the above-mentioned horizontal filter coefficients and vertical filter coefficients are also related to the size of the current coding block, and are divided into different filter coefficient groups according to the size of the current coding unit block.
表1给出了IPF技术的滤波系数。Table 1 presents the filter coefficients of the IPF technique.
表1 帧内色度预测滤波系数Table 1 Intra-frame chroma prediction filter coefficients
Figure PCTCN2021109173-appb-000003
Figure PCTCN2021109173-appb-000003
图5展示了帧内预测滤波的三种滤波情况示意图,分别仅参考了上侧参考像素对当前编码单元中的预测值进行滤波;仅参考了左侧参考像素对当前编码单元预中的测值进行滤波;以及都参考了上侧与左侧参考像素对当前编码单元块中的预测值进行滤波。Figure 5 shows schematic diagrams of three filtering situations for intra-frame prediction filtering. Only the upper reference pixel is used to filter the prediction value in the current coding unit; only the left reference pixel is used to filter the prediction value in the current coding unit. filtering; and filtering the prediction value in the current coding unit block with reference to both the upper and left reference pixels.
图6为本申请实施例中所描述的一种实例的视频译码***1的框图。如本文所使用,术语“视频译码器”一般是指视频编码器和视频解码器两者。在本申请中,术语“视频译码”或“译码”可一般地指代视频编码 或视频解码。视频译码***1的视频编码器100和视频解码器200用于实现本申请提出的图像编码方法。FIG. 6 is a block diagram of an example video coding system 1 described in the embodiments of the present application. As used herein, the term "video coder" generally refers to both a video encoder and a video decoder. In this application, the term "video coding" or "coding" may generally refer to video encoding or video decoding. The video encoder 100 and the video decoder 200 of the video coding system 1 are used to implement the image coding method proposed in this application.
如图6中所示,视频译码***1包含源装置10和目的装置20。源装置10产生经编码视频数据。因此,源装置10可被称为视频编码装置。目的装置20可对由源装置10所产生的经编码的视频数据进行解码。因此,目的装置20可被称为视频解码装置。源装置10、目的装置20或两个的各种实施方案可包含一或多个处理器以及耦合到所述一或多个处理器的存储器。所述存储器可包含但不限于RAM、ROM、EEPROM、快闪存储器或可用于以可由计算机存取的指令或数据结构的形式存储所要的程序代码的任何其它媒体,如本文所描述。As shown in FIG. 6 , video coding system 1 includes source device 10 and destination device 20 . Source device 10 produces encoded video data. Accordingly, source device 10 may be referred to as a video encoding device. Destination device 20 may decode the encoded video data generated by source device 10 . Accordingly, destination device 20 may be referred to as a video decoding device. Various implementations of source device 10, destination device 20, or both may include one or more processors and a memory coupled to the one or more processors. The memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other medium that may be used to store the desired program code in the form of instructions or data structures accessible by a computer, as described herein.
源装置10和目的装置20可以包括各种装置,包含桌上型计算机、移动计算装置、笔记型(例如,膝上型)计算机、平板计算机、机顶盒、例如所谓的“智能”电话等电话手持机、电视机、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机或其类似者。Source device 10 and destination device 20 may include various devices including desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, etc. , televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
目的装置20可经由链路30从源装置10接收经编码视频数据。链路30可包括能够将经编码视频数据从源装置10移动到目的装置20的一或多个媒体或装置。在一个实例中,链路30可包括使得源装置10能够实时将经编码视频数据直接发射到目的装置20的一或多个通信媒体。在此实例中,源装置10可根据通信标准(例如无线通信协议)来调制经编码视频数据,且可将经调制的视频数据发射到目的装置20。所述一或多个通信媒体可包含无线和/或有线通信媒体,例如射频(RF)频谱或一或多个物理传输线。所述一或多个通信媒体可形成基于分组的网络的一部分,基于分组的网络例如为局域网、广域网或全球网络(例如,因特网)。所述一或多个通信媒体可包含路由器、交换器、基站或促使从源装置10到目的装置20的通信的其它设备。在另一实例中,可将经编码数据从输出接口140输出到存储装置40。Destination device 20 may receive encoded video data from source device 10 via link 30 . Link 30 may include one or more media or devices capable of moving encoded video data from source device 10 to destination device 20 . In one example, link 30 may include one or more communication media that enable source device 10 to transmit encoded video data directly to destination device 20 in real-time. In this example, source device 10 may modulate the encoded video data according to a communication standard, such as a wireless communication protocol, and may transmit the modulated video data to destination device 20 . The one or more communication media may include wireless and/or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (eg, the Internet). The one or more communication media may include routers, switches, base stations, or other equipment that facilitates communication from source device 10 to destination device 20 . In another example, the encoded data may be output from output interface 140 to storage device 40 .
本申请的图像编解码技术可应用于视频编解码以支持多种多媒体应用,例如空中电视广播、有线电视发射、***发射、串流视频发射(例如,经由因特网)、用于存储于数据存储媒体上的视频数据的编码、存储在数据存储媒体上的视频数据的解码,或其它应用。在一些实例中,视频译码***1可用于支持单向或双向视频传输以支持例如视频流式传输、视频回放、视频广播和/或视频电话等应用。The image encoding and decoding techniques of the present application can be applied to video encoding and decoding to support a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (eg, via the Internet), for storage in data storage Encoding of video data on media, decoding of video data stored on data storage media, or other applications. In some examples, video coding system 1 may be used to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
图6中所说明的视频译码***1仅为实例,并且本申请的技术可适用于未必包含编码装置与解码装置之间的任何数据通信的视频译码设置(例如,视频编码或视频解码)。在其它实例中,数据从本地存储器检索、在网络上流式传输等等。视频编码装置可对数据进行编码并且将数据存储到存储器,和/或视频解码装置可从存储器检索数据并且对数据进行解码。在许多实例中,由并不彼此通信而是仅编码数据到存储器和/或从存储器检索数据且解码数据的装置执行编码和解码。The video coding system 1 illustrated in FIG. 6 is merely an example, and the techniques of this application may be applicable to video coding setups (eg, video encoding or video decoding) that do not necessarily include any communication of data between an encoding device and a decoding device. . In other instances, data is retrieved from local storage, streamed over a network, and the like. A video encoding device may encode and store data to memory, and/or a video decoding device may retrieve and decode data from memory. In many instances, encoding and decoding is performed by devices that do not communicate with each other, but merely encode data to and/or retrieve data from memory and decode data.
在图6的实例中,源装置10包含视频源120、视频编码器100和输出接口140。在一些实例中,输出接口140可包含调节器/解调器(调制解调器)和/或发射器。视频源120可包括视频捕获装置(例如,摄像机)、含有先前捕获的视频数据的视频存档、用以从视频内容提供者接收视频数据的视频馈入接口,和/或用于产生视频数据的计算机图形***,或视频数据的此些来源的组合。In the example of FIG. 6 , source device 10 includes video source 120 , video encoder 100 , and output interface 140 . In some examples, output interface 140 may include a modulator/demodulator (modem) and/or a transmitter. Video source 120 may include a video capture device (eg, a video camera), a video archive containing previously captured video data, a video feed interface to receive video data from a video content provider, and/or a computer to generate video data A graphics system, or a combination of such sources of video data.
视频编码器100可对来自视频源120的视频数据进行编码。在一些实例中,源装置10经由输出接口140将经编码视频数据直接发射到目的装置20。在其它实例中,经编码视频数据还可存储到存储装置40上,供目的装置20以后存取来用于解码和/或播放。 Video encoder 100 may encode video data from video source 120 . In some examples, source device 10 transmits the encoded video data directly to destination device 20 via output interface 140 . In other examples, the encoded video data may also be stored on storage device 40 for later access by destination device 20 for decoding and/or playback.
在图6的实例中,目的装置20包含输入接口240、视频解码器200和显示装置220。在一些实例中,输入接口240包含接收器和/或调制解调器。输入接口240可经由链路30和/或从存储装置40接收经编码视频数据。显示装置220可与目的装置20集成或可在目的装置20外部。一般来说,显示装置220显示经解码视频数据。显示装置220可包括多种显示装置,例如,液晶显示器(LCD)、等离子显示器、有机发光二极管(OLED)显示器或其它类型的显示装置。In the example of FIG. 6 , destination device 20 includes input interface 240 , video decoder 200 , and display device 220 . In some examples, input interface 240 includes a receiver and/or a modem. Input interface 240 may receive encoded video data via link 30 and/or from storage device 40 . The display device 220 may be integrated with the destination device 20 or may be external to the destination device 20 . Generally, display device 220 displays decoded video data. The display device 220 may include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
尽管图6中未图示,但在一些方面,视频编码器100和视频解码器200可各自与音频编码器和解码器集成,且可包含适当的多路复用器-多路分用器单元或其它硬件和软件,以处置共同数据流或单独数据流中的音频和视频两者的编码。Although not shown in Figure 6, in some aspects video encoder 100 and video decoder 200 may each be integrated with an audio encoder and decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and software to handle the encoding of both audio and video in a common data stream or separate data streams.
视频编码器100和视频解码器200各自可实施为例如以下各项的多种电路中的任一者:一或多个微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、离散逻辑、硬件或其任何组合。如果部分地以软件来实施本申请,那么装置可将用于软件的指令存储在合适的非易失性计算机可读存储媒体中,且可使用一或多个处理器在硬件中执行所述指令从而实施本申请技术。前述内容(包含硬件、软件、硬件与软件的组合等)中的任一者可被视为一或多个处理器。视频编码器100和视频解码器200中的 每一者可包含在一或多个编码器或解码器中,所述编码器或解码器中的任一者可集成为相应装置中的组合编码器/解码器(编码解码器)的一部分。 Video encoder 100 and video decoder 200 may each be implemented as any of a variety of circuits such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, hardware, or any combination thereof. If the application is implemented in part in software, a device may store instructions for the software in a suitable non-volatile computer-readable storage medium, and the instructions may be executed in hardware using one or more processors Thus, the technology of the present application is implemented. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors. Each of video encoder 100 and video decoder 200 may be included in one or more encoders or decoders, either of which may be integrated as a combined encoder in the respective device /decoder (codec) part.
图7为本申请实施例中所描述的一种视频编码器100的示例框图。视频编码器100用于将视频输出到后处理实体41。后处理实体41表示可处理来自视频编码器100的经编码视频数据的视频实体的实例,例如媒体感知网络元件(MANE)或拼接/编辑装置。在一些情况下,后处理实体41可为网络实体的实例。在一些视频编码***中,后处理实体41和视频编码器100可为单独装置的若干部分,而在其它情况下,相对于后处理实体41所描述的功能性可由包括视频编码器100的相同装置执行。在某一实例中,后处理实体41是图1的存储装置40的实例。FIG. 7 is an exemplary block diagram of a video encoder 100 described in an embodiment of the present application. The video encoder 100 is used to output the video to the post-processing entity 41 . Post-processing entity 41 represents an example of a video entity that can process encoded video data from video encoder 100, such as a Media Aware Network Element (MANE) or a splicing/editing device. In some cases, post-processing entity 41 may be an instance of a network entity. In some video encoding systems, post-processing entity 41 and video encoder 100 may be parts of separate devices, while in other cases the functionality described with respect to post-processing entity 41 may be performed by the same device that includes video encoder 100 implement. In an example, post-processing entity 41 is an example of storage device 40 of FIG. 1 .
在图7的实例中,视频编码器100包括预测处理单元108、滤波器单元106、存储器107、求和器112、变换器101、量化器102和熵编码器103。预测处理单元108包括帧间预测器110和帧内预测器109。为了图像块重构,视频编码器100还包含反量化器104、反变换器105和求和器111。滤波器单元106表示一或多个环路滤波器,例如去块滤波器、自适应环路滤波器(ALF)和样本自适应偏移(SAO)滤波器。尽管在图7中将滤波器单元106示出为环路内滤波器,但在其它实现方式下,可将滤波器单元106实施为环路后滤波器。在一种示例下,视频编码器100还可以包括视频数据存储器、分割单元(图中未示意)。In the example of FIG. 7 , video encoder 100 includes prediction processing unit 108 , filter unit 106 , memory 107 , summer 112 , transformer 101 , quantizer 102 , and entropy encoder 103 . The prediction processing unit 108 includes an inter predictor 110 and an intra predictor 109 . For image block reconstruction, the video encoder 100 also includes an inverse quantizer 104 , an inverse transformer 105 and a summer 111 . Filter unit 106 represents one or more loop filters, such as deblocking filters, adaptive loop filters (ALF), and sample adaptive offset (SAO) filters. Although filter unit 106 is shown in FIG. 7 as an in-loop filter, in other implementations, filter unit 106 may be implemented as a post-loop filter. In an example, the video encoder 100 may further include a video data memory and a division unit (not shown in the figure).
视频编码器100接收视频数据,并将所述视频数据存储在视频数据存储器中。分割单元将所述视频数据分割成若干图像块,而且这些图像块可以被进一步分割为更小的块,例如基于四叉树结构或者二叉树结构的图像块分割。预测处理单元108可选择用于当前图像块的多个可能的译码模式中的一者,例如多个帧内译码模式中的一者或多个帧间译码模式中的一者。预测处理单元108可将所得经帧内、帧间译码的块提供给求和器112以产生残差块,且提供给求和器111以重构用作参考图像的经编码块。预测处理单元108内的帧内预测器109可相对于与待编码当前块在相同帧或条带中的一或多个相邻编码块执行当前图像块的帧内预测性编码,以去除空间冗余。预测处理单元108内的帧间预测器110可相对于一或多个参考图像中的一或多个预测块执行当前图像块的帧间预测性编码以去除时间冗余。预测处理单元108将指示当前图像块的所选帧内或帧间预测模式的信息提供到熵编码器103,以便于熵编码器103编码指示所选帧间预测模式的信息。The video encoder 100 receives video data and stores the video data in a video data memory. The division unit divides the video data into several image blocks, and these image blocks can be further divided into smaller blocks, such as image block division based on a quad-tree structure or a binary tree structure. Prediction processing unit 108 may select one of a plurality of possible coding modes for the current image block, such as one of a plurality of intra-coding modes or one of a plurality of inter-coding modes. Prediction processing unit 108 may provide the resulting intra-, inter-coded block to summer 112 to generate a residual block, and to summer 111 to reconstruct the encoded block for use as a reference image. Intra-predictor 109 within prediction processing unit 108 may perform intra-predictive encoding of the current image block relative to one or more adjacent encoded blocks in the same frame or slice as the current block to be encoded to remove spatial redundancy Remain. Inter predictor 110 within prediction processing unit 108 may perform inter-predictive encoding of the current image block relative to one or more prediction blocks in one or more reference images to remove temporal redundancy. Prediction processing unit 108 provides information indicative of the selected intra or inter prediction mode for the current image block to entropy encoder 103 so that entropy encoder 103 encodes the information indicative of the selected inter prediction mode.
在预测处理单元108经由帧间预测/帧内预测产生当前图像块的预测块之后,视频编码器100通过从待编码的当前图像块减去所述预测块来形成残差图像块。求和器112表示执行此减法运算的一或多个组件。所述残差块中的残差视频数据可包含在一或多个TU中,并应用于变换器101。变换器101使用例如离散余弦变换(DCT)或概念上类似的变换等变换将残差视频数据变换成残差变换系数。变换器101可将残差视频数据从像素值域转换到变换域,例如频域。After prediction processing unit 108 generates a prediction block for the current image block via inter prediction/intra prediction, video encoder 100 forms a residual image block by subtracting the prediction block from the current image block to be encoded. Summer 112 represents one or more components that perform this subtraction operation. Residual video data in the residual block may be included in one or more TUs and applied to transformer 101 . Transformer 101 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform. Transformer 101 may convert residual video data from a pixel value domain to a transform domain, such as a frequency domain.
变换器101可将所得变换系数发送到量化器102。量化器102量化所述变换系数以进一步减小位码率。在一些实例中,量化器102可接着执行对包含经量化的变换系数的矩阵的扫描。或者,熵编码器103可执行扫描。Transformer 101 may send the resulting transform coefficients to quantizer 102 . Quantizer 102 quantizes the transform coefficients to further reduce the bit rate. In some examples, quantizer 102 may then perform a scan of the matrix including the quantized transform coefficients. Alternatively, the entropy encoder 103 may perform scanning.
在量化之后,熵编码器103对经量化变换系数进行熵编码。举例来说,熵编码器103可执行上下文自适应可变长度编码(CAVLC)、上下文自适应二进制算术编码(CABAC)、基于语法的上下文自适应二进制算术编码(SBAC)、概率区间分割熵(PIPE)编码或另一熵编码方法或技术。在由熵编码器103熵编码之后,可将经编码码流发射到视频解码器200,或经存档以供稍后发射或由视频解码器200检索。熵编码器103还可对待编码的当前图像块的语法元素进行熵编码。After quantization, the entropy encoder 103 entropy encodes the quantized transform coefficients. For example, the entropy encoder 103 may perform context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) ) encoding or another entropy encoding method or technique. After entropy encoding by entropy encoder 103 , the encoded codestream may be transmitted to video decoder 200 , or archived for later transmission or retrieval by video decoder 200 . The entropy encoder 103 may also entropy encode the syntax elements of the current image block to be encoded.
反量化器104和反变换器105分别应用逆量化和逆变换以在像素域中重构所述残差块,例如以供稍后用作参考图像的参考块。求和器111将经重构的残差块添加到由帧间预测器110或帧内预测器109产生的预测块,以产生经重构图像块。滤波器单元106可以适用于经重构图像块以减小失真,诸如方块效应(block artifacts)。然后,该经重构图像块作为参考块存储在存储器107中,可由帧间预测器110用作参考块以对后续视频帧或图像中的块进行帧间预测。 Inverse quantizer 104 and inverse transformer 105 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain, eg, for later use as a reference block for a reference image. Summer 111 adds the reconstructed residual block to the prediction block produced by inter predictor 110 or intra predictor 109 to produce a reconstructed image block. Filter unit 106 may be applied to the reconstructed image blocks to reduce distortions, such as block artifacts. This reconstructed image block is then stored in memory 107 as a reference block, which can be used as a reference block by inter-predictor 110 to inter-predict blocks in subsequent video frames or images.
视频编码器100将输入视频划分成若干个编码树单元,每个编码树单元又划分成若干个或矩形或方形的编码块。在当前编码块选择帧内预测模式进行编码时,对当前编码块的亮度分量进行若干种预测模式的计算遍历并根据率失真代价选择最优预测模式,对当前编码块的色度分量进行若干种预测模式的计算遍历并根据率失真代价选择最优预测模式。之后,计算原始视频块与预测块之间的残差,该残差后续一路经过变化与量化、熵编码等形成输出码流,另一路经过反变换与反量化、环路滤波等形成重构样本作为后续视 频压缩的参考信息。The video encoder 100 divides the input video into several coding tree units, and each coding tree unit is further divided into several or rectangular or square coding blocks. When the current coding block selects the intra-frame prediction mode for coding, the luminance component of the current coding block is subjected to calculation traversal of several prediction modes, the optimal prediction mode is selected according to the rate-distortion cost, and several prediction modes are performed on the chrominance components of the current coding block. The calculation of the prediction mode goes through and selects the optimal prediction mode according to the rate-distortion cost. After that, the residual between the original video block and the predicted block is calculated. The residual is subsequently transformed, quantized, and entropy encoded to form an output stream, and the other is subjected to inverse transformation, inverse quantization, and loop filtering to form a reconstructed sample. As reference information for subsequent video compression.
目前IPF技术在视频编码器100的具体实现如下。The current specific implementation of the IPF technology in the video encoder 100 is as follows.
输入数字视频信息在编码端被划分成若干个编码树单元,每个编码树单元又被划分成若干个或矩形或方形的编码单元,每个编码单元分别进行帧内预测过程计算预测块。The input digital video information is divided into several coding tree units at the coding end, and each coding tree unit is further divided into several rectangular or square coding units, and each coding unit performs an intra-frame prediction process to calculate a prediction block.
在当前编码单元中,In the current coding unit,
①若IPF的允许标识位为‘1’则进行如下所有步骤;①If the allowable flag bit of IPF is '1', perform all the following steps;
②若IPF的允许标识位为‘0’则仅进行a1)、b1)、f1和g1)步骤。② If the allowable flag bit of IPF is '0', only steps a1), b1), f1 and g1) are performed.
a1)帧内预测首先对所有预测模式进行遍历,计算每一种帧内预测模式下的预测像素,并根据原始像素计算率失真代价;a1) Intra-frame prediction first traverses all prediction modes, calculates the predicted pixels under each intra-frame prediction mode, and calculates the rate-distortion cost according to the original pixels;
b1)根据上述所有预测模式率失真代价最小原则,选择出当前编码单元的最优预测模式,记录最优预测模式信息和与之对应的率失真代价信息;b1) According to the principle of the minimum rate-distortion cost of all the above-mentioned prediction modes, select the optimal prediction mode of the current coding unit, and record the optimal prediction mode information and the corresponding rate-distortion cost information;
c1)对所有帧内预测模式再次进行遍历,此过程开启IPF技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;c1) traversing all intra-frame prediction modes again, this process opens the IPF technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
d1)对当前编码单元的预测块进行IPF,根据当前预测模式选择与之相对应的滤波器,根据当前编码单元尺寸选择相对应的滤波系数组,具体对应关系可查表1;d1) IPF is performed on the prediction block of the current coding unit, and the corresponding filter is selected according to the current prediction mode, and the corresponding filter coefficient group is selected according to the size of the current coding unit, and the specific correspondence can be found in Table 1;
e1)根据上述经过IPF技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;e1) Calculate the rate-distortion cost information of each prediction mode according to the final predicted pixel and the original pixel obtained by the IPF technique, and record the prediction mode and the corresponding cost value of the minimum rate-distortion cost information;
f1)若IPF允许标识位为‘0’,则将b1)中记录的预测模式索引写入码流给解码端;f1) If the IPF allows the identification bit to be '0', then the prediction mode index recorded in b1) is written into the code stream to the decoding end;
若IPF允许标识位为‘1’,则将b1)中记录的最小代价值与e1)中记录的最小代价值进行比较,If the IPF allows the flag bit to be '1', then compare the minimum cost value recorded in b1) with the minimum cost value recorded in e1),
若b1)中的率失真代价更小,则将b1)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元标识位置使用标志位置否,表示不使用IPF技术,也写入码流给解码端;If the rate-distortion cost in b1) is smaller, write the prediction mode index code recorded in b1) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF current coding unit identification position to use the flag position No , indicating that IPF technology is not used, and the code stream is also written to the decoding end;
若e1)中的率失真更小,则将e1)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元标识位置使用标志位置真,表示使用IPF技术,也写入码流给解码端。If the rate-distortion in e1) is smaller, the prediction mode index coding recorded in e1) is written into the code stream as the optimal prediction mode of the current coding unit to the decoding end, and the current coding unit identification position of the IPF is used as the flag position true, Indicates that IPF technology is used, and the code stream is also written to the decoding end.
g)之后,将预测值与变换与量化等操作后的残差信息叠加,得到当前编码单元的重建块作为后续编码单元的参考信息。g) After that, superimpose the predicted value and the residual information after operations such as transformation and quantization to obtain the reconstructed block of the current coding unit as the reference information of the subsequent coding unit.
帧内预测器109还可将指示当前编码块所选帧内预测模式的信息提供到熵编码器103,以便熵编码器103编码指示所选帧内预测模式的信息。 Intra predictor 109 may also provide information indicative of the selected intra prediction mode for the current coding block to entropy encoder 103 so that entropy encoder 103 encodes the information indicative of the selected intra prediction mode.
图8为本申请实施例中所描述的一种视频解码器200的示例框图。在图8的实例中,视频解码器200包括熵解码器203、预测处理单元208、反量化器204、反变换器205、求和器211、滤波器单元206以及存储器207。预测处理单元208可以包括帧间预测器210和帧内预测器209。在一些实例中,视频解码器200可执行大体上与相对于来自图7的视频编码器100描述的编码过程互逆的解码过程。FIG. 8 is an exemplary block diagram of a video decoder 200 described in the embodiments of the present application. In the example of FIG. 8 , video decoder 200 includes entropy decoder 203 , prediction processing unit 208 , inverse quantizer 204 , inverse transformer 205 , summer 211 , filter unit 206 , and memory 207 . Prediction processing unit 208 may include inter predictor 210 and intra predictor 209 . In some examples, video decoder 200 may perform a decoding process that is substantially the reciprocal of the encoding process described with respect to video encoder 100 from FIG. 7 .
在解码过程中,视频解码器200从视频编码器100接收表示经编码视频条带的图像块和相关联的语法元素的经编码视频码流。视频解码器200可从网络实体42接收视频数据,可选的,还可以将所述视频数据存储在视频数据存储器(图中未示意)中。视频数据存储器可存储待由视频解码器200的组件解码的视频数据,例如经编码视频码流。存储在视频数据存储器中的视频数据,例如可从存储装置40、从相机等本地视频源、经由视频数据的有线或无线网络通信或者通过存取物理数据存储媒体而获得。视频数据存储器可作为用于存储来自经编码视频码流的经编码视频数据的经解码图像缓冲器(CPB)。During the decoding process, video decoder 200 receives from video encoder 100 an encoded video codestream representing image blocks of an encoded video slice and associated syntax elements. The video decoder 200 may receive video data from the network entity 42, and optionally, may also store the video data in a video data storage (not shown in the figure). Video data memory may store video data to be decoded by components of video decoder 200, such as an encoded video codestream. The video data stored in the video data store may be obtained, for example, from the storage device 40, from a local video source such as a camera, via wired or wireless network communication of the video data, or by accessing a physical data storage medium. The video data memory may serve as a decoded picture buffer (CPB) for storing encoded video data from the encoded video codestream.
网络实体42可例如为服务器、MANE、视频编辑器/剪接器,或用于实施上文所描述的技术中的一或多者的其它此装置。网络实体42可包括或可不包括视频编码器,例如视频编码器100。在网络实体42将经编码视频码流发送到视频解码器200之前,网络实体42可实施本申请中描述的技术中的部分。在一些视频解码***中,网络实体42和视频解码器200可为单独装置的部分,而在其它情况下,相对于网络实体42描述的功能性可由包括视频解码器200的相同装置执行。Network entity 42 may be, for example, a server, a MANE, a video editor/splicer, or other such device for implementing one or more of the techniques described above. Network entity 42 may or may not include a video encoder, such as video encoder 100 . Network entity 42 may implement portions of the techniques described in this application before network entity 42 sends the encoded video stream to video decoder 200 . In some video decoding systems, network entity 42 and video decoder 200 may be part of separate devices, while in other cases, functionality described with respect to network entity 42 may be performed by the same device that includes video decoder 200 .
视频解码器200的熵解码器203对码流进行熵解码以产生经量化的系数和一些语法元素。熵解码器203将语法元素转发到预测处理单元208。视频解码器200可接收在视频条带层级和/或图像块层级处的语法元素。当视频条带被解码为经帧内解码(I)条带时,预测处理单元208的帧内预测器209基于发信号通知的帧 内预测模式和来自当前帧或图像的先前经解码块的数据而产生当前视频条带的图像块的预测块。当视频条带被解码为经帧间解码(即,B或P)条带时,预测处理单元208的帧间预测器210可基于从熵解码器203接收到的语法元素,确定用于对当前视频条带的当前图像块进行解码的帧间预测模式,基于确定的帧间预测模式,对所述当前图像块进行解码(例如执行帧间预测)。Entropy decoder 203 of video decoder 200 entropy decodes the codestream to generate quantized coefficients and some syntax elements. Entropy decoder 203 forwards the syntax elements to prediction processing unit 208 . Video decoder 200 may receive syntax elements at the video slice level and/or the tile level. When a video slice is decoded as an intra-decoded (I) slice, the intra-predictor 209 of the prediction processing unit 208 is based on the signaled intra-prediction mode and data from previously decoded blocks of the current frame or picture Instead, the prediction block of the image block of the current video slice is generated. When a video slice is decoded as an inter-decoded (ie, B or P) slice, inter predictor 210 of prediction processing unit 208 may determine, based on syntax elements received from entropy decoder 203, which method to use for the current The inter prediction mode in which the current image block of the video slice is decoded, based on the determined inter prediction mode, the current image block is decoded (eg, inter prediction is performed).
反量化器204将在码流中提供且由熵解码器203解码的经量化变换系数逆量化,即去量化。逆量化过程可包括:使用由视频编码器100针对视频条带中的每个图像块计算的量化参数来确定应施加的量化程度以及同样地确定应施加的逆量化程度。反变换器205将逆变换应用于变换系数,例如逆DCT、逆整数变换或概念上类似的逆变换过程,以便产生像素域中的残差块。The inverse quantizer 204 inversely quantizes, ie dequantizes, the quantized transform coefficients provided in the codestream and decoded by the entropy decoder 203 . The inverse quantization process may include using the quantization parameters calculated by the video encoder 100 for each image block in the video slice to determine the degree of quantization that should be applied and, likewise, the degree of inverse quantization that should be applied. The inverse transformer 205 applies an inverse transform to the transform coefficients, such as an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to produce a residual block in the pixel domain.
在帧间预测器210产生用于当前图像块或当前图像块的子块的预测块之后,视频解码器200通过将来自反变换器205的残差块与由帧间预测器210产生的对应预测块求和以得到重建的块,即经解码图像块。求和器211表示执行此求和操作的组件。在需要时,还可使用环路滤波器(在解码环路中或在解码环路之后)来使像素转变平滑或者以其它方式改进视频质量。滤波器单元206可以表示一或多个环路滤波器,例如去块滤波器、自适应环路滤波器(ALF)以及样本自适应偏移(SAO)滤波器。尽管在图8中将滤波器单元206示出为环路内滤波器,但在其它实现方式中,可将滤波器单元206实施为环路后滤波器。After the inter predictor 210 generates a prediction block for the current image block or a sub-block of the current image block, the video decoder 200 performs the prediction by comparing the residual block from the inverse transformer 205 with the corresponding prediction generated by the inter predictor 210 The blocks are summed to obtain a reconstructed block, a decoded image block. Summer 211 represents the component that performs this summation operation. Loop filters may also be used (in the decoding loop or after the decoding loop) to smooth pixel transitions or otherwise improve video quality, if desired. Filter unit 206 may represent one or more loop filters, such as deblocking filters, adaptive loop filters (ALF), and sample adaptive offset (SAO) filters. Although filter unit 206 is shown in FIG. 8 as an in-loop filter, in other implementations filter unit 206 may be implemented as a post-loop filter.
视频解码器200具体执行的图像解码方法包括,输入码流在进行解析、反变换和反量化后,得到当前编码块的预测模式索引。若当前编码块色度分量的预测模式索引为增强型两步跨分量预测模式,则根据索引值选择仅取来自当前编码块的上侧或者左侧相邻像素的重构样本进行线性模型的计算,根据线性模型计算得到当前编码块的色度分量的原始预测块,降采样、并针对降采样后的预测块进行基于正交方向的边界相邻像素的相关性的预测修正,得到最终的色度分量的最终预测块。后续码流一路作为后续视频解码的参考信息,一路经过后滤波处理输出视频信号。The image decoding method specifically executed by the video decoder 200 includes: after parsing, inverse transformation and inverse quantization of the input code stream, the prediction mode index of the current coding block is obtained. If the prediction mode index of the chrominance component of the current coding block is the enhanced two-step cross-component prediction mode, select only the reconstructed samples from the upper or left adjacent pixels of the current coding block to calculate the linear model according to the index value. , calculate the original prediction block of the chrominance component of the current coding block according to the linear model, down-sample, and perform prediction correction based on the correlation of the adjacent pixels of the border in the orthogonal direction for the down-sampled prediction block to obtain the final color The final prediction block for the degree component. One channel of the subsequent code stream is used as reference information for subsequent video decoding, and the other channel is post-filtered to output the video signal.
目前IPF技术在视频解码器200端具体实现如下。At present, the specific implementation of the IPF technology at the video decoder 200 is as follows.
解码端获取码流并解析得到数字视频序列信息,解析得到当前视频序列的IPF允许标识位、当前解码单元编码模式为帧内预测编码模式和当前解码单元的IPF使用标识位。The decoding end obtains the code stream and parses to obtain the digital video sequence information, and parses to obtain the IPF permission flag of the current video sequence, the coding mode of the current decoding unit is the intra-frame prediction coding mode, and the IPF usage flag of the current decoding unit.
在当前解码单元中,In the current decoding unit,
①若IPF的允许标识位为‘1’则进行如下所有步骤;①If the allowable flag bit of IPF is '1', perform all the following steps;
②若IPF的允许标识位为‘0’则仅进行a2)、b2)和e2)步骤:②If the allowable flag bit of IPF is '0', only steps a2), b2) and e2) are performed:
a2)获取码流信息,解析当前解码单元的残差信息,经过反变换与反量化过程得到时域残差信息;a2) Obtain the code stream information, analyze the residual information of the current decoding unit, and obtain the time domain residual information through the inverse transformation and inverse quantization process;
b2)解析码流并获取当前解码单元的预测模式索引,根据相邻重建块与预测模式索引,计算得到当前解码单元的预测块;b2) parse the code stream and obtain the prediction mode index of the current decoding unit, and calculate the prediction block of the current decoding unit according to the adjacent reconstruction block and the prediction mode index;
c2)解析并获取IPF的使用标识位,若IPF的使用标识位为‘0’,则不对当前预测块做额外操作;若IPF的使用标识位为‘1’,则执行d2);c2) Parse and obtain the use identification bit of IPF, if the use identification bit of IPF is '0', no additional operation is performed on the current prediction block; if the use identification bit of IPF is '1', then execute d2);
d2)根据当前解码单元的预测模式归类信息选择相对应的滤波器,根据当前解码单元的尺寸大小选择相对应的滤波器系数组,之后对预测块内各个像素进行滤波得到最终预测块;d2) select a corresponding filter according to the prediction mode classification information of the current decoding unit, select a corresponding filter coefficient group according to the size of the current decoding unit, and then filter each pixel in the prediction block to obtain the final prediction block;
e2)将预测块叠加还原后的残差信息得到当前解码单元的重建块,经后处理输出;e2) superimposing the restored residual information of the prediction block to obtain the reconstructed block of the current decoding unit, and outputting after post-processing;
应当理解的是,视频解码器200的其它结构变化可用于解码经编码视频码流。例如,视频解码器200可以不经滤波器单元206处理而生成输出视频流;或者,对于某些图像块或者图像帧,视频解码器200的熵解码器203没有解码出经量化的系数,相应地不需要经反量化器204和反变换器205处理。It should be understood that other structural variations of video decoder 200 may be used to decode encoded video codestreams. For example, video decoder 200 may generate an output video stream without being processed by filter unit 206; or, for some image blocks or image frames, entropy decoder 203 of video decoder 200 does not decode quantized coefficients, and accordingly Processing by inverse quantizer 204 and inverse transformer 205 is not required.
上述帧内预测技术中,现有IPF技术能够有效提升帧内预测的编码效率,大大增强了帧内预测的空间关联性,很好地解决了帧内预测过程中,仅用单一参考像素行或列,而忽略了某些像素对预测值的影响。但当帧内预测过程如需要平滑处理的部分时,IPF技术和目前帧内预测模式都不能很好地解决类似问题,逐像素的根据参考像素滤波可以提高预测块与参考块的关联性,却无法解决预测块内部的平滑问题。Among the above intra-frame prediction technologies, the existing IPF technology can effectively improve the coding efficiency of intra-frame prediction, greatly enhance the spatial correlation of intra-frame prediction, and solve the problem of using only a single reference pixel row or columns, while ignoring the effect of some pixels on the predicted value. However, when the intra-frame prediction process needs to be smoothed, neither the IPF technology nor the current intra-frame prediction mode can solve similar problems well. Unable to solve the smoothing problem inside the prediction block.
根据单一预测模式计算所得的预测块通常在纹理比较清晰的图像当中会体现出较好的预测效果,残差因此也会变得更小更少,编码效率得以提升。但在纹理比较模糊的图像块中,过于锐化的预测可能会导致残差增加和变大,预测效果不好,编码效率下降。A prediction block calculated according to a single prediction mode usually shows a better prediction effect in an image with a clearer texture, and the residual error will therefore become smaller and less, and the coding efficiency will be improved. However, in image blocks with blurred texture, over-sharpened prediction may lead to increased and larger residual errors, poor prediction effect and reduced coding efficiency.
针对上述问题,本申请实施例针对一些需要平滑处理的图像块,提出一种基于平滑处理的IPF技术,对根据帧内预测模式得到的预测块直接滤波。In view of the above problems, the embodiments of the present application propose an IPF technology based on smoothing processing for some image blocks that need smoothing processing, and directly filter the predicted blocks obtained according to the intra-frame prediction mode.
图9为本申请实施例中图像编码方法的一种流程示意图,该图像编码方法可以应用于图6示出的视频 译码***1中的源装置10或图7示出的视频编码器100。图9示出的流程以执行主体为图7示出的视频编码器100为例进行说明。如图9所示,本申请实施例提供的图像编码方法包括:FIG. 9 is a schematic flowchart of an image encoding method in an embodiment of the present application, and the image encoding method can be applied to the source device 10 in the video decoding system 1 shown in FIG. 6 or the video encoder 100 shown in FIG. 7 . The flow shown in FIG. 9 is described by taking the execution subject as the video encoder 100 shown in FIG. 7 as an example. As shown in FIG. 9 , the image coding method provided by the embodiment of the present application includes:
步骤110,确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;Step 110: Determine the intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, and the first indication information is used to indicate whether to allow the use of the first intra-frame a prediction filtering mode, where the second indication information is used to indicate whether the second intra prediction filtering mode is allowed to be used, and the first intra prediction filtering mode is an intra prediction filtering IPF mode;
步骤120,若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值,所述第一数值用于指示使用所述第一帧内预测滤波模式;Step 120: If it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode, set the first intra-frame prediction filtering mode of the current coding block to the first intra-frame prediction filtering mode. A use flag is set to a first value, and the first value is used to indicate that the first intra-frame prediction filtering mode is used;
步骤130,将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流; Step 130, writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream;
步骤140,根据所述第一帧内预测滤波模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。Step 140: Predict the current coding block to obtain a prediction block according to the first intra-frame prediction filtering mode, encode the prediction block, and write the coding result into a code stream.
在一些实施例中,所述方法还包括:将所述当前编码块的预测块和经反变换、反量化后得到的残差块叠加,得到重建后的重建块,作为下一个编码块的预测参考块。In some embodiments, the method further includes: superimposing the prediction block of the current coding block and the residual block obtained after inverse transformation and inverse quantization to obtain the reconstructed reconstructed block, which is used as the prediction of the next coding block Reference block.
本技术方案1在编码端帧内预测部分具体实现如下:The specific implementation of the technical solution 1 in the intra-frame prediction part of the coding end is as follows:
编码器获取编码信息,包括帧内预测滤波允许标识位以及本技术方案的帧内预测平滑滤波(后续简称为IPS)允许标识位等,获取图像信息后将图像划分成若干个CTU,进一步再划分成若干个CU,每个独立CU都进行帧内预测;The encoder obtains coding information, including the intra-frame prediction filtering allowable flag bit and the intra-frame prediction smoothing filter (hereinafter referred to as IPS) allowable flag bit of the technical solution, etc. After obtaining the image information, the image is divided into several CTUs, and further divided into several CUs, and each independent CU performs intra-frame prediction;
在帧内预测过程中,During intra prediction,
①若IPF允许标识位和IPS允许标识位都为‘1’,则执行如下所有步骤;①If the IPF allowable flag bit and the IPS allowable flag bit are both '1', perform all the following steps;
②若IPF允许标识位为‘1’、且IPS允许标识位为‘0’,则仅执行a3)、b3)、c3)、d3)、e3)、和i3)、j3);②If the IPF allowable flag bit is '1' and the IPS allowable flag bit is '0', only execute a3), b3), c3), d3), e3), and i3), j3);
③若IPF允许标识位为‘0’、且IPS允许标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执行a3)、b3)、f3)、g3)、h3)、和i3)、j3);③ If the IPF allowable flag bit is '0', and the IPS allowable flag bit is '1', and the current CU area is greater than or equal to 64 and less than 4096, only execute a3), b3), f3), g3), h3), and i3), j3);
④若IPF允许标识位和IPS允许标识位都为‘0’,则仅执行a3)、b3)和i3)、j3):④ If both the IPF allow flag bit and the IPS allow flag bit are '0', only execute a3), b3) and i3), j3):
a3)当前编码单元遍历所有帧内预测模式,计算得到每一种预测模式下的预测块,根据原始块计算得到当前预测模式的率失真代价信息;a3) The current coding unit traverses all intra-frame prediction modes, calculates the prediction block under each prediction mode, and calculates the rate-distortion cost information of the current prediction mode according to the original block;
b3)根据上述所有预测模式率失真代价最小原则,选择出当前编码单元的最优预测模式,记录最优预测模式信息和与之对应的率失真代价信息;b3) Selecting the optimal prediction mode of the current coding unit according to the minimum rate-distortion cost principle of all prediction modes above, and recording the optimal prediction mode information and the corresponding rate-distortion cost information;
c3)对所有帧内预测模式进行第二次遍历,此过程开启IPF技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;c3) carry out the second traversal to all intra-frame prediction modes, this process opens the IPF technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
d3)对当前编码单元的预测块进行IPF滤波,根据当前预测模式选择与之相对应的滤波器,根据当前编码单元尺寸选择相对应的滤波系数组,具体对应关系可查表1;d3) IPF filtering is performed on the prediction block of the current coding unit, the filter corresponding thereto is selected according to the current prediction mode, the corresponding filter coefficient group is selected according to the size of the current coding unit, and the specific correspondence can be found in Table 1;
e3)根据上述经过IPF技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;e3) Calculate the rate-distortion cost information of each prediction mode according to the final predicted pixel and the original pixel obtained by the IPF technology, and record the prediction mode and the corresponding cost value of the minimum rate-distortion cost information;
f3)对所有帧内预测模式进行第三次遍历,此过程开启IPS技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;f3) traversing all intra-frame prediction modes for the third time, this process opens the IPS technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
g3)对当前编码单元的预测块进行两次IPS得到最终预测块;g3) IPS is performed twice on the prediction block of the current coding unit to obtain the final prediction block;
h3)根据上述经过IPS技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;h3) Calculate the rate-distortion cost information of each prediction mode according to the final predicted pixel and the original pixel obtained by the above-mentioned IPS technology, and record the prediction mode and the corresponding cost value of the minimum rate-distortion cost information;
i3)若IPF允许标识位为‘0’且IPS允许标识位为‘0’,则将b3)中记录的预测模式索引写入码流给解码端;i3) if the IPF allows the identification bit to be '0' and the IPS allows the identification bit to be '0', then the prediction mode index recorded in b3) is written into the code stream to the decoding end;
若IPF允许标识位为‘1’且IPS允许标识位为‘0’,则将b3)中记录的最小代价值与e3)中记录的最小代价值进行比较,If the IPF allowable flag bit is '1' and the IPS allowable flag bit is '0', then compare the minimum cost value recorded in b3) with the minimum cost value recorded in e3),
若b3)中的率失真代价更小,则将b3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元使用标志位置‘0’,表示不使用IPF技术,也写入码流给解码端;If the rate-distortion cost in b3) is smaller, write the prediction mode index code recorded in b3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF current coding unit to use the flag position '0' , indicating that IPF technology is not used, and the code stream is also written to the decoding end;
若e3)中的率失真更小,则将e3)中记录的预测模式索引编码作为当前编码单元的最优预测 模式写入码流给解码端,将IPF当前编码单元使用标志位置‘1’,表示使用IPF技术,也写入码流给解码端;If the rate-distortion in e3) is smaller, the prediction mode index coding recorded in e3) is written as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and the current coding unit of the IPF uses the flag position '1', Indicates that IPF technology is used, and the code stream is also written to the decoder;
若IPF允许标识位为‘0’且IPS允许标识位为‘1’,则将b3)中记录的最小代价值与h)中记录的最小代价值进行比较,If the IPF allowable flag bit is '0' and the IPS allowable flag bit is '1', then compare the minimum cost value recorded in b3) with the minimum cost value recorded in h),
若b3)中的率失真代价更小,则将b3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘0’(即第二值),表示不使用该技术,也写入码流给解码端;If the rate-distortion cost in b3) is smaller, write the prediction mode index code recorded in b3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and set the IPS use flag position of the current coding unit to '0' ' (that is, the second value), indicating that the technology is not used, and the code stream is also written to the decoding end;
若h3)中的率失真更小,则将h3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘1’,表示使用该技术,也写入码流给解码端;If the rate-distortion in h3) is smaller, write the prediction mode index code recorded in h3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and set the IPS use flag position of the current coding unit to '1' , indicating that the technology is used, and the code stream is also written to the decoding end;
若IPF允许标识位为‘1’且IPS允许标识位为‘1’,则将b3)、e3)和h3)中记录的最小代价值进行比较,If the IPF allowable flag bit is '1' and the IPS allowable flag bit is '1', then compare the minimum cost values recorded in b3), e3) and h3),
若b3)中的率失真代价更小,则将b3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标识位和IPF使用标志位置‘0’,表示均不使用,也写入码流给解码端;If the rate-distortion cost in b3) is smaller, write the prediction mode index code recorded in b3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPS usage flag and IPF of the current coding unit Use the flag position '0', which means that it is not used, and also writes the code stream to the decoding end;
若e3)中的率失真更小,则将e3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘1’且不传输IPS标识位,表示使用IPF技术而不使用IPS技术,也写入码流给解码端;If the rate-distortion in e3) is smaller, write the prediction mode index code recorded in e3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF use flag position '1' of the current coding unit And do not transmit the IPS identification bit, indicating that the IPF technology is used instead of the IPS technology, and the code stream is also written to the decoding end;
若h3)中的率失真更小,则将h3)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘0’且IPS使用标志位置‘1’,表示不使用IPF技术而使用IPS技术,也写入码流给解码端。If the rate-distortion in h3) is smaller, write the prediction mode index code recorded in h3) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF use flag position '0' of the current coding unit And the IPS uses the flag position '1', which means that the IPS technology is not used instead of the IPF technology, and the code stream is also written to the decoding end.
j3)后将预测块和反变换、反量化后的残差叠加得到重建后的编码单元块,作为下一个编码单元的预测参考块。After j3), the prediction block and the residual after inverse transformation and inverse quantization are superimposed to obtain the reconstructed coding unit block, which is used as the prediction reference block of the next coding unit.
本技术方案2在编码端帧内预测部分具体实现如下:The technical solution 2 is specifically implemented in the intra-frame prediction part of the coding end as follows:
编码器获取编码信息,包括帧内预测滤波允许标识位以及本技术方案的帧内预测平滑滤波(后续简称为IPS)允许标识位等,获取图像信息后将图像划分成若干个CTU,进一步再划分成若干个CU,每个独立CU都进行帧内预测;The encoder obtains coding information, including the intra-frame prediction filtering allowable flag bit and the intra-frame prediction smoothing filter (hereinafter referred to as IPS) allowable flag bit of the technical solution, etc. After obtaining the image information, the image is divided into several CTUs, and further divided into several CUs, and each independent CU performs intra-frame prediction;
在帧内预测过程中,During intra prediction,
①若IPF允许标识位和IPS允许标识位都为‘1’,则执行如下所有步骤;①If the IPF allowable flag bit and the IPS allowable flag bit are both '1', perform all the following steps;
②若IPF允许标识位为‘1’、且IPS允许标识位为‘0’,则仅执行a4)、b4)、c4)、d4)、e4)、和i4)、j4);②If the IPF allowable flag bit is '1' and the IPS allowable flag bit is '0', only execute a4), b4), c4), d4), e4), and i4), j4);
③若IPF允许标识位为‘0’、且IPS允许标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执行a4)、b4)、f4)、g4)、h4)、和i4)、j4);③ If the IPF allowable flag bit is '0', and the IPS allowable flag bit is '1', and the current CU area is greater than or equal to 64 and less than 4096, only execute a4), b4), f4), g4), h4), and i4), j4);
④若IPF允许标识位和IPS允许标识位都为‘0’,则仅执行a4)、b4)和i4)、j4):④ If both the IPF allowable flag bit and the IPS allowable flag bit are '0', only a4), b4) and i4), j4) are executed:
a4)当前编码单元遍历所有帧内预测模式,计算得到每一种预测模式下的预测块,根据原始块计算得到当前预测模式的率失真代价信息;a4) The current coding unit traverses all intra-frame prediction modes, calculates the prediction block under each prediction mode, and calculates the rate-distortion cost information of the current prediction mode according to the original block;
b4)根据上述所有预测模式率失真代价最小原则,选择出当前编码单元的最优预测模式,记录最优预测模式信息和与之对应的率失真代价信息;b4) According to the principle of the minimum rate-distortion cost of all the above-mentioned prediction modes, select the optimal prediction mode of the current coding unit, and record the optimal prediction mode information and the corresponding rate-distortion cost information;
c4)对所有帧内预测模式进行第二次遍历,此过程开启IPF技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;c4) carry out the second traversal to all intra-frame prediction modes, this process opens the IPF technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
d4)对当前编码单元的预测块进行IPF滤波,根据当前预测模式选择与之相对应的滤波器,根据当前编码单元尺寸选择相对应的滤波系数组,具体对应关系可查表1;d4) IPF filtering is performed on the prediction block of the current coding unit, the filter corresponding to it is selected according to the current prediction mode, the corresponding filter coefficient group is selected according to the size of the current coding unit, and the specific correspondence can be found in Table 1;
e4)根据上述经过IPF技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;e4) Calculate the rate-distortion cost information of each prediction mode according to the final predicted pixel and the original pixel obtained by the IPF technology, and record the prediction mode and the corresponding cost value of the minimum rate-distortion cost information;
f4)对所有帧内预测模式进行第三次遍历,此过程开启IPS技术,首先计算每一种帧内预测模式下的预测像素,得到当前编码单元的预测块;f4) traversing all intra-frame prediction modes for the third time, this process enables IPS technology, first calculates the predicted pixels under each intra-frame prediction mode, and obtains the prediction block of the current coding unit;
g4)对当前编码单元的预测块进行一次IPS得到最终预测块;g4) perform an IPS on the prediction block of the current coding unit to obtain the final prediction block;
h4)根据上述经过IPS技术得到的最终预测像素与原始像素计算得到每一种预测模式的率失真代价信息,记录最小率失真代价信息的预测模式和对应代价值;h4) Calculate the rate-distortion cost information of each prediction mode according to the final predicted pixel and the original pixel obtained by the above-mentioned IPS technology, and record the prediction mode and the corresponding cost value of the minimum rate-distortion cost information;
i4)若IPF允许标识位为‘0’且IPS允许标识位为‘0’,则将b4)中记录的预测模式索引写入码流给解码端;i4) If the IPF allows the identification bit to be '0' and the IPS allows the identification bit to be '0', then the prediction mode index recorded in b4) is written into the code stream to the decoding end;
若IPF允许标识位为‘1’且IPS允许标识位为‘0’,则将b4)中记录的最小代价值与e)中记录的最小代价值进行比较,If the IPF allowable flag bit is '1' and the IPS allowable flag bit is '0', then compare the minimum cost value recorded in b4) with the minimum cost value recorded in e),
若b4)中的率失真代价更小,则将b4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元使用标志位置‘0’,表示不使用IPF技术,也写入码流给解码端;If the rate-distortion cost in b4) is smaller, write the prediction mode index code recorded in b4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and set the IPF current coding unit use flag position '0' , indicating that IPF technology is not used, and the code stream is also written to the decoding end;
若e4)中的率失真更小,则将e4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将IPF当前编码单元使用标志位置‘1’,表示使用IPF技术,也写入码流给解码端;If the rate-distortion in e4) is smaller, the prediction mode index coding recorded in e4) is written as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and the IPF current coding unit is used as the flag position '1', Indicates that IPF technology is used, and the code stream is also written to the decoder;
若IPF允许标识位为‘0’且IPS允许标识位为‘1’,则将b4)中记录的最小代价值与h)中记录的最小代价值进行比较,If the IPF allowable flag bit is '0' and the IPS allowable flag bit is '1', then compare the minimum cost value recorded in b4) with the minimum cost value recorded in h),
若b4)中的率失真代价更小,则将b4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘0’(第二值),表示不使用该技术,也写入码流给解码端;If the rate-distortion cost in b4) is smaller, write the prediction mode index code recorded in b4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and set the IPS use flag position of the current coding unit to '0' ' (the second value), indicating that the technology is not used, and the code stream is also written to the decoding end;
若h4)中的率失真更小,则将h4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标志位置‘1’,表示使用该技术,也写入码流给解码端;If the rate distortion in h4) is smaller, write the prediction mode index code recorded in h4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and set the IPS use flag position of the current coding unit to '1' , indicating that the technology is used, and the code stream is also written to the decoding end;
若IPF允许标识位为‘1’且IPS允许标识位为‘1’,则将b4)、e4)和h4)中记录的最小代价值进行比较,If the IPF allowable flag bit is '1' and the IPS allowable flag bit is '1', then compare the minimum cost values recorded in b4), e4) and h4),
若b4)中的率失真代价更小,则将b4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPS使用标识位和IPF使用标志位置‘0’,表示均不使用,也写入码流给解码端;If the rate-distortion cost in b4) is smaller, write the prediction mode index code recorded in b4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPS usage flag and IPF of the current coding unit Use the flag position '0', which means that it is not used, and also writes the code stream to the decoding end;
若e4)中的率失真更小,则将e4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘1’且不传输IPS标识位,表示使用IPF技术而不使用IPS技术,也写入码流给解码端;If the rate-distortion in e4) is smaller, write the prediction mode index code recorded in e4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF use flag position '1' of the current coding unit And do not transmit the IPS identification bit, indicating that the IPF technology is used instead of the IPS technology, and the code stream is also written to the decoding end;
若h4)中的率失真更小,则将h4)中记录的预测模式索引编码作为当前编码单元的最优预测模式写入码流给解码端,将当前编码单元的IPF使用标识位置‘0’且IPS使用标志位置‘1’,表示不使用IPF技术而使用IPS技术,也写入码流给解码端。If the rate-distortion in h4) is smaller, write the prediction mode index coding recorded in h4) as the optimal prediction mode of the current coding unit into the code stream to the decoding end, and use the IPF use flag position '0' of the current coding unit And the IPS uses the flag position '1', which means that the IPS technology is not used instead of the IPF technology, and the code stream is also written to the decoding end.
j4)后将预测块和反变换、反量化后的残差叠加得到重建后的编码单元块,作为下一个编码单元的预测参考块。After j4), the prediction block and the residual after inverse transformation and inverse quantization are superimposed to obtain the reconstructed coding unit block, which is used as the prediction reference block of the next coding unit.
与图9所述的图像编码方法对应的,图10为本申请实施例中图像解码方法的一种流程示意图,该图像解码方法可以应用于图6示出的视频译码***1中的目的装置20或图8示出的视频解码器200。图10示出的流程以执行主体为图8示出的视频编码器200为例进行说明。如图10所示,本申请实施例提供的图像解码方法包括:Corresponding to the image encoding method described in FIG. 9 , FIG. 10 is a schematic flowchart of an image decoding method in an embodiment of the present application, and the image decoding method can be applied to the target device in the video decoding system 1 shown in FIG. 6 . 20 or the video decoder 200 shown in FIG. 8 . The flow shown in FIG. 10 is described by taking the execution subject as the video encoder 200 shown in FIG. 8 as an example. As shown in FIG. 10 , the image decoding method provided by the embodiment of the present application includes:
步骤210,解析码流,确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位; Step 210, parse the code stream, and determine the intra-frame prediction filtering indication information and the first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used as the first indication information. for indicating whether to allow the use of the first intra-frame prediction filter mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filter mode, the first intra-frame prediction filter mode is the intra-frame prediction filter IPF mode, The first use flag is the use flag of the first intra-frame prediction filtering mode;
步骤220,根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。Step 220: Determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag to obtain a prediction block of the current decoding block .
本技术方案1在解码端帧内预测具体流程如下:The specific process of intra-frame prediction at the decoding end of the technical solution 1 is as follows:
解码器获取码流,解析码流得到当前视频序列的IPF允许标识位和IPS允许标识位,解析码流并对得到的残差信息进行反变换和反量化。The decoder obtains the code stream, parses the code stream to obtain the IPF allowable flag bit and the IPS allowable flag bit of the current video sequence, parses the code stream and performs inverse transformation and inverse quantization on the obtained residual information.
在帧内预测解码过程中,During the intra-frame prediction decoding process,
①若IPF的允许标识位和IPS的标识位都为‘1’,则执行如下所有步骤;①If the allowable flag bit of IPF and the flag bit of IPS are both '1', perform all the following steps;
②若IPF的允许标识位为‘1’且IPS的标识位为‘0’,则仅执行a5)、b5)、c5)、d5)和g5)步骤;②If the allowable identification bit of IPF is '1' and the identification bit of IPS is '0', then only steps a5), b5), c5), d5) and g5) are performed;
③若IPF的允许标识位为‘0’且IPS的标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执 行a5)、b5)、e5)、f5)和g5)步骤;③If the allowable flag bit of IPF is '0' and the flag bit of IPS is '1', and the current CU area is greater than or equal to 64 and less than 4096, then only perform steps a5), b5), e5), f5) and g5) ;
④若IPF的允许标识位和IPS的标识位都为‘0’,则仅执行a5)、b5)和g5)步骤;④If the allowable identification bit of IPF and the identification bit of IPS are all '0', then only a5), b5) and g5) steps are performed;
a5)获取码流并解码得到残差信息,经过反变换与反量化等过程得到时域残差信息;a5) Obtain the code stream and decode to obtain residual information, and obtain time-domain residual information through processes such as inverse transformation and inverse quantization;
b5)解析码流得到当前解码单元的预测模式,根据当前解码单元的预测模式和相邻重建块计算得到预测块;b5) parse the code stream to obtain the prediction mode of the current decoding unit, and calculate the prediction block according to the prediction mode of the current decoding unit and the adjacent reconstruction block;
c5)解析并获取IPF的使用标识位,c5) Parse and obtain the usage flag of IPF,
若IPF的使用标识位为‘0’,则不对当前预测块做额外操作,并跳过d5)步骤;If the use flag bit of IPF is '0', no additional operation is performed on the current prediction block, and step d5) is skipped;
若IPF的使用标识位为‘1’,则执行d5);If the use flag of IPF is '1', then execute d5);
d5)根据当前解码单元的预测模式归类信息选择相对应的滤波器,根据当前解码单元的尺寸大小选择相对应的滤波器系数组,之后对预测块内各个像素进行滤波得到预测块;d5) select a corresponding filter according to the prediction mode classification information of the current decoding unit, select a corresponding filter coefficient group according to the size of the current decoding unit, and then filter each pixel in the prediction block to obtain the prediction block;
e5)获取IPF的使用标识位,e5) Obtain the usage flag of IPF,
若IPF的使用标识位为‘1’,则跳过本步骤剩余过程,并跳过f5)步骤;If the use identification bit of IPF is '1', then skip the remaining process of this step, and skip the step f5);
若IPF的使用标识位为‘0’,则解析并获取IPS的使用标识位。If the usage flag of the IPF is '0', parse and obtain the usage flag of the IPS.
若IPS的使用标识位为‘0’,则不对当前预测块做额外操作;If the use flag bit of IPS is '0', no additional operation is performed on the current prediction block;
若IPS的使用标识位为‘1’,则执行f5);If the use flag of IPS is '1', then execute f5);
f5)使用IPS器对输入的预测块进行两次滤波,得到滤波后的当前解码单元预测块;f5) use the IPS device to filter the input prediction block twice to obtain the filtered current decoding unit prediction block;
g5)将预测块叠加还原后的残差信息得到当前解码单元的重建块,经后处理输出;g5) the residual information obtained by superimposing the restored residual information of the prediction block to obtain the reconstructed block of the current decoding unit, which is output after post-processing;
本技术方案2在解码端帧内预测具体流程如下:The specific process of intra-frame prediction at the decoding end in the technical solution 2 is as follows:
解码器获取码流,解析码流得到当前视频序列的IPF允许标识位和IPS允许标识位,解析码流并对得到的残差信息进行反变换和反量化。The decoder obtains the code stream, parses the code stream to obtain the IPF allowable flag bit and the IPS allowable flag bit of the current video sequence, parses the code stream and performs inverse transformation and inverse quantization on the obtained residual information.
在帧内预测解码过程中,During the intra-frame prediction decoding process,
①若IPF的允许标识位和IPS的标识位都为‘1’,则执行如下所有步骤;①If the allowable flag bit of IPF and the flag bit of IPS are both '1', perform all the following steps;
②若IPF的允许标识位为‘1’且IPS的标识位为‘0’,则仅执行a6)、b6)、c6)、d6)和g6)步骤;②If the allowable identification bit of IPF is '1' and the identification bit of IPS is '0', then only steps a6), b6), c6), d6) and g6) are performed;
③若IPF的允许标识位为‘0’且IPS的标识位为‘1’,且当前CU面积大于等于64且小于4096,则仅执行a6)、b6)、e6)、f6)和g6)步骤;③If the allowable flag bit of IPF is '0' and the flag bit of IPS is '1', and the current CU area is greater than or equal to 64 and less than 4096, then only steps a6), b6), e6), f6) and g6) are performed ;
④若IPF的允许标识位和IPS的标识位都为‘0’,则仅执行a6)、b6)和g6)步骤;④If the allowable identification bit of IPF and the identification bit of IPS are all '0', then only a6), b6) and g6) steps are performed;
a6)获取码流并解码得到残差信息,经过反变换与反量化等过程得到时域残差信息;a6) Obtain the code stream and decode to obtain residual information, and obtain time-domain residual information through processes such as inverse transformation and inverse quantization;
b6)解析码流得到当前解码单元的预测模式,根据当前解码单元的预测模式和相邻重建块计算得到预测块;b6) parse the code stream to obtain the prediction mode of the current decoding unit, and calculate and obtain the prediction block according to the prediction mode of the current decoding unit and the adjacent reconstruction block;
c6)解析并获取IPF的使用标识位,c6) Parse and obtain the usage flag of IPF,
若IPF的使用标识位为‘0’,则不对当前预测块做额外操作,并跳过d6)步骤;If the use flag of IPF is '0', no additional operation is performed on the current prediction block, and step d6) is skipped;
若IPF的使用标识位为‘1’,则执行d6);If the use flag of IPF is '1', execute d6);
d6)根据当前解码单元的预测模式归类信息选择相对应的滤波器,根据当前解码单元的尺寸大小选择相对应的滤波器系数组,之后对预测块内各个像素进行滤波得到预测块;d6) selecting the corresponding filter according to the prediction mode classification information of the current decoding unit, selecting the corresponding filter coefficient group according to the size of the current decoding unit, then filtering each pixel in the prediction block to obtain the prediction block;
e6)获取IPF的使用标识位,e6) Obtain the usage flag of IPF,
若IPF的使用标识位为‘1’,则跳过本步骤剩余过程,并跳过f6)步骤;If the use identification bit of IPF is '1', then skip the remaining process of this step, and skip step f6);
若IPF的使用标识位为‘0’,则解析并获取IPS的使用标识位。If the usage flag of the IPF is '0', parse and obtain the usage flag of the IPS.
若IPS的使用标识位为‘0’,则不对当前预测块做额外操作;If the use flag bit of IPS is '0', no additional operation is performed on the current prediction block;
若IPS的使用标识位为‘1’,则执行f6);If the use flag of IPS is '1', then execute f6);
f6)使用IPS器对输入的预测块进行一次滤波,得到滤波后的当前解码单元预测块;f6) use the IPS device to filter the input prediction block once to obtain the filtered current decoding unit prediction block;
g6)将预测块叠加还原后的残差信息得到当前解码单元的重建块,经后处理输出;g6) superimposing the restored residual information of the prediction block to obtain the reconstructed block of the current decoding unit, and outputting after post-processing;
本技术方案作用在编解码框架中的帧内预测部分。上述使用IPS技术对当前编码单元或解码单元进行滤波时,需要先对当前块进行填充,步骤如下:The technical solution acts on the intra-frame prediction part in the coding and decoding framework. When using the IPS technology to filter the current coding unit or decoding unit, the current block needs to be filled first, and the steps are as follows:
a7)若当前预测块外的左侧和上侧的参考像素可用,即左侧和上侧有重建像素,则左侧一列和上侧一行使用重建像素进行填充;a7) If the reference pixels on the left side and the upper side outside the current prediction block are available, that is, there are reconstructed pixels on the left side and the upper side, then the left column and the upper row are filled with reconstructed pixels;
b7)若当前预测块外的左侧或上侧的参考像素不可用,即左侧或上侧没有重建像素,则没有重建像素的一侧使用当前预测块最靠近那一侧的行或列进行填充;b7) If the reference pixels on the left side or the upper side outside the current prediction block are unavailable, that is, there are no reconstructed pixels on the left side or the upper side, the side without reconstructed pixels uses the row or column closest to that side of the current prediction block for filling;
c7)对当前预测块外的右侧相邻列使用当前预测块的最右列预测值进行填充;c7) use the rightmost column prediction value of the current prediction block to fill the right adjacent column outside the current prediction block;
d7)对当前预测块外的下侧相邻行使用当前预测块的最下行预测值进行填充;d7) using the lowest row prediction value of the current prediction block to fill the lower adjacent row outside the current prediction block;
对当前预测块外的右上角像素点使用当前预测块外上侧已填充的最右侧像素点进行填充,对当前预测块外的右下角像素点使用当前预测块外下侧已填充的最右侧像素点进行填充,对当前预测块外的左下角像素点使用当前预测块外左侧已填充填充额的最下侧像素点进行填充。Fill the upper right corner pixel outside the current prediction block with the rightmost pixel filled in the upper side of the current prediction block, and use the filled rightmost pixel outside the current prediction block at the lower right corner of the current prediction block. Fill in the side pixels, and fill the lower-left corner pixels outside the current prediction block with the bottom-most pixel points that have been filled with padding on the left side outside the current prediction block.
图11A给出了预测块的一种填充示意图,其中,Pred.Pixel表示预测块的像素,Recon.Pixel表示填充的像素。FIG. 11A shows a filling schematic diagram of the prediction block, wherein Pred.Pixel represents the pixel of the prediction block, and Recon.Pixel represents the filled pixel.
图11B给出了预测块的另一种填充示意图,其中,Pred.Pixel表示预测块的像素,Recon.Pixel表示填充的像素。FIG. 11B shows another filling schematic diagram of the prediction block, wherein Pred.Pixel represents the pixel of the prediction block, and Recon.Pixel represents the filled pixel.
上述IPS技术采用简化的高斯卷积核对预测块进行滤波,滤波器共有9个抽头,9个不同滤波系数,如下所示:The above IPS technology uses a simplified Gaussian convolution kernel to filter the prediction block. The filter has a total of 9 taps and 9 different filter coefficients, as shown below:
Figure PCTCN2021109173-appb-000004
Figure PCTCN2021109173-appb-000004
filter_coefficients表示滤波器系数。filter_coefficients represents filter coefficients.
对预测块中的每个预测像素进行滤波,滤波公式如下:Filter each predicted pixel in the predicted block, and the filtering formula is as follows:
P′(x,y)=c 1·P(x-1,y-1)+c 2·P(x,y-1)+c 1·P(x+1,y-1)+c 1·P(x-1,y)+c 3·P(x,y)+c 2·P(x+1,y)+c 1·P(x-1,y+1)+c 2·P(x,y+1)+c 1·P(x+1,y+1) P'(x,y)=c 1 ·P(x-1,y-1)+c 2 ·P(x,y-1)+c 1 ·P(x+1,y-1)+c 1 P(x-1,y)+c 3 P(x,y)+c 2 P(x+1,y)+c 1 P(x-1,y+1)+c 2 P (x,y+1)+c 1 ·P(x+1,y+1)
上述式子中,P′(x,y)为当前编码单元(x,y)处的最终预测值,c 1、c 2和c 3分别为上述滤波器中的系数,在上述近似高斯卷积核系数中,c 1为0075,c 2为0.124,c 3为0.204。P(x,y)与其他如P(x-1,y-1)为位于当前编码单元(x,y)与(x-1,y-1)处的预测值,其中x与y的取值范围均不超过当前编码单元块的宽与高。 In the above formula, P'(x, y) is the final predicted value at the current coding unit (x, y), c 1 , c 2 and c 3 are the coefficients in the above filters, respectively, in the above approximate Gaussian convolution In the kernel coefficient, c 1 is 0075, c 2 is 0.124, and c 3 is 0.204. P(x, y) and others such as P(x-1, y-1) are the predicted values located at the current coding units (x, y) and (x-1, y-1), where the values of x and y are The value range does not exceed the width and height of the current coding unit block.
上述IPS技术所采用的卷积核系数可以近似为整数且所有系数和为2的指数幂,既可以避免计算机的浮点计算又可以避免除法运算,大大减少了计算复杂度,如下所示:The convolution kernel coefficients used by the above IPS technology can be approximated as integers and the sum of all coefficients is an exponential power of 2, which can avoid both floating-point calculations and division operations of the computer, which greatly reduces the computational complexity, as shown below:
Figure PCTCN2021109173-appb-000005
Figure PCTCN2021109173-appb-000005
上述滤波系数总和为64,即计算得到的预测值需要向右移6位。The sum of the above filter coefficients is 64, that is, the calculated predicted value needs to be shifted to the right by 6 bits.
上述技术方案2中IPS技术采用简化的高斯卷积核对预测块进行滤波,滤波器共有25个抽头,6个不同滤波系数,如下所示:In the above technical solution 2, the IPS technology uses a simplified Gaussian convolution kernel to filter the prediction block. The filter has a total of 25 taps and 6 different filter coefficients, as shown below:
Figure PCTCN2021109173-appb-000006
Figure PCTCN2021109173-appb-000006
对预测块中的每个预测像素进行滤波,滤波公式如下:Filter each predicted pixel in the predicted block, and the filtering formula is as follows:
P′(x,y)=c 1·P(x-2,y-2)+c 2·P(x-1,y-2)+c 3·P(x,y-2)+c 2·P(x+1,y-2)+c 1·P(x+2,y-2)+c 2·P(x-2,y-1)+c 4·P(x-1,y-1)+c 5·P(x,y-1)+c 4·P(x+1,y-1)+c 2·P(x+2,y-1)+c 3·P(x-2,y)+c 5·P(x-1,y)+c 6·P(x,y)+c 5·P(x+1,y)+c 3·P(x+2,y)+c 2·P(x-2,y+1)+c 4·P(x-1,y+1)+c 5·P(x,y+1)+c 4·P(x+1,y+1)+c 2·P(x+2,y+1)+c 1·P(x-2,y+2)+c 2·P(x-1,y+2)+c 3·P(x,y+2)+c 2·P(x+1,y+2)+c 1·P(x+2,y+2) P'(x,y)=c 1 ·P(x-2,y-2)+c 2 ·P(x-1,y-2)+c 3 ·P(x,y-2)+c 2 ·P(x+1,y-2)+c 1 ·P(x+2,y- 2 )+c2 ·P(x-2,y- 1 )+c4 ·P(x-1,y -1)+c 5 P(x,y-1)+c 4 P(x+1,y-1)+c 2 P(x+2,y-1)+c 3 P(x -2,y)+c 5 P(x-1,y)+c 6 P(x,y)+c 5 P(x+1,y)+c 3 P(x+2,y )+c 2 P(x-2,y+1)+c 4 P(x-1,y+1)+c 5 P(x,y+1)+c 4 P(x+1 ,y+1)+c 2 P(x+2,y+1)+c 1 P(x-2,y+2)+c 2 P(x-1,y+2)+c 3 ·P(x,y+2)+c 2 ·P(x+1,y+2)+c 1 ·P(x+2,y+2)
上述式子中,P′(x,y)为当前编码单元(x,y)处的最终预测值,c 1、c 2、c 3、c 4、c 5和c 6分别为上述滤波器中的系数,在上述近似高斯卷积核系数中,c 1为0.0030,c 2为0.0133,c 3为0.0219,c 4为0.0596,c 5为0.0983,c 6为0.1621。P(x,y)与其他如P(x-1,y-1)为位于当前编码单元(x,y)与(x-1,y-1)处的预测值,其中x与y的取值范围均不超过当前编码单元块的宽与高。 In the above formula, P'(x, y) is the final predicted value at the current coding unit (x, y), and c 1 , c 2 , c 3 , c 4 , c 5 and c 6 are the In the above approximate Gaussian convolution kernel coefficients, c 1 is 0.0030, c 2 is 0.0133, c 3 is 0.0219, c 4 is 0.0596, c 5 is 0.0983, and c 6 is 0.1621. P(x, y) and others such as P(x-1, y-1) are the predicted values located at the current coding units (x, y) and (x-1, y-1), where the values of x and y are The value range does not exceed the width and height of the current coding unit block.
上述IPS技术所采用的卷积核系数可以近似为整数且所有系数和为2的指数幂,既可以避免计算机的浮点计算又可以避免除法运算,大大减少了计算复杂度,如下所示:The convolution kernel coefficients used by the above IPS technology can be approximated as integers and the sum of all coefficients is an exponential power of 2, which can avoid both floating-point calculations and division operations of the computer, which greatly reduces the computational complexity, as shown below:
Figure PCTCN2021109173-appb-000007
Figure PCTCN2021109173-appb-000007
上述滤波系数总和为1024,即计算得到的预测值需要向右移10位。The sum of the above filter coefficients is 1024, that is, the calculated predicted value needs to be shifted to the right by 10 bits.
上述技术方案2中IPS技术还可以采用简化的高斯卷积核对预测块进行滤波,滤波器共有13个抽头,4个不同滤波系数,如下所示:In the above technical solution 2, the IPS technology can also use a simplified Gaussian convolution kernel to filter the prediction block. The filter has a total of 13 taps and 4 different filter coefficients, as shown below:
Figure PCTCN2021109173-appb-000008
Figure PCTCN2021109173-appb-000008
对预测块中的每个预测像素进行滤波,滤波公式如下:Filter each predicted pixel in the predicted block, and the filtering formula is as follows:
滤波公式如下:The filtering formula is as follows:
P′(x,y)=c 1·P(x,y-2)+c 2·P(x-1,y-1)+c 3·P(x,y)+c 2·P(x+1,y-1)+c 1·P(x-2,y)+c 3·P(x-1,y)+c 4·P(x,y)+c 3·P(x+1,y)+c 1·P(x+2,y)+c 2·P(x-1,y+1)+c 3·P(x,y+1)+c 2·P(x+1,y+1)+c 1·P(x,y+2) P'(x,y)=c 1 ·P(x,y-2)+c 2 ·P(x-1,y-1)+c 3 ·P(x,y)+c 2 ·P(x +1,y-1)+c 1 ·P(x-2,y)+c 3 ·P(x-1,y)+c 4 ·P(x,y)+c 3 ·P(x+1 ,y)+c 1 P(x+2,y)+c 2 P(x-1,y+1)+c 3 P(x,y+1)+c 2 P(x+1 ,y+1)+c 1 ·P(x,y+2)
上述式子中,P′(x,y)为当前编码单元(x,y)处的最终预测值,c 1、c 2、c 3和c 4分别为上述滤波器中的系数,在上述近似高斯卷积核系数中,c 1为13,c 2为18,c 3为25,c 4为32。P(x,y)与其他如P(x-1,y-1)为位于当前编码单元(x,y)与(x-1,y-1)处的预测值,其中x与y的取值范围均不超过当前编码单元块的宽与高。 In the above formula, P'(x, y) is the final predicted value at the current coding unit (x, y), c 1 , c 2 , c 3 and c 4 are the coefficients in the above filter, respectively, in the above approximation Among the Gaussian convolution kernel coefficients, c 1 is 13, c 2 is 18, c 3 is 25, and c 4 is 32. P(x, y) and others such as P(x-1, y-1) are the predicted values located at the current coding units (x, y) and (x-1, y-1), where the values of x and y are The value range does not exceed the width and height of the current coding unit block.
上述滤波系数总和为256,即计算得到的预测值需要向右移8位。The sum of the above filter coefficients is 256, that is, the calculated predicted value needs to be shifted to the right by 8 bits.
本技术方案将适用于帧内预测编解码部分,为帧内预测在需要平滑处理或局部模糊等操作上提供选择,对于图像纹理不需要太锐化的部分,使用该技术使得预测像素更加平滑,预测块更加接近原始图像,最终将提高编码效率。This technical solution will be applied to the encoding and decoding part of intra-frame prediction, providing options for intra-frame prediction operations that require smoothing or local blurring. The predicted block is closer to the original image, which will ultimately improve coding efficiency.
技术方案1在AVS的官方仿真平台HPM7.0上进行了测试,对帧内预测块进行平滑滤波,在全帧内测试条件和随机接入条件下,测试结果如表2和表3所示。The technical solution 1 was tested on the official simulation platform HPM7.0 of AVS, and the intra-frame prediction block was smoothed and filtered. Under the full-frame test conditions and random access conditions, the test results are shown in Table 2 and Table 3.
表2 All Intra测试结果Table 2 All Intra test results
ClassClass YY UU VV
4K4K -0.61%-0.61% -0.67%-0.67% -0.84%-0.84%
1080P1080P -0.45%-0.45% -0.78%-0.78% -0.48%-0.48%
720P720P -0.22%-0.22% -0.08%-0.08% -0.66%-0.66%
平均性能Average performance -0.42%-0.42% -0.51%-0.51% -0.66%-0.66%
表3 Random Access测试结果Table 3 Random Access test results
ClassClass YY UU VV
4K4K -0.25%-0.25% -0.37%-0.37% -0.57%-0.57%
1080P1080P -0.22%-0.22% -0.41%-0.41% -0.64%-0.64%
720P720P -0.22%-0.22% -0.01%-0.01% -0.73%-0.73%
平均性能Average performance -0.23%-0.23% -0.26%-0.26% -0.65%-0.65%
从表2和表3种可以看出,本方案在两种测试条件下都具有不错的性能提升。It can be seen from Table 2 and Table 3 that this scheme has a good performance improvement under both test conditions.
在AI测试条件下,亮度分量具有0.42%的BDBR节省,UV分量各有0.51%和0.66%的BDBR节省,能够明显看出具有较高的性能,有效提升编码器的编码效率。Under the AI test conditions, the luminance component has a BDBR saving of 0.42%, and the UV component has a BDBR saving of 0.51% and 0.66% respectively. It can be clearly seen that it has high performance and effectively improves the coding efficiency of the encoder.
从各个分辨率来看,本方案在4K分辨率的视频上均具有较大的编码性能提升,这将有利于未来超高清视频的发展,为超高分辨率视频节省更多码率,节省更多带宽。From the perspective of various resolutions, this solution has a large coding performance improvement on 4K resolution videos, which will be beneficial to the development of ultra-high-definition videos in the future, saving more bit rates and saving more for ultra-high-resolution videos. multiple bandwidths.
本方案提出在帧内预测过程中,对帧内预测模式计算得到的预测块进行平滑滤波,提高帧内预测精度,有效提升编码效率,具体如下:This scheme proposes to perform smooth filtering on the prediction block calculated by the intra-frame prediction mode during the intra-frame prediction process, so as to improve the intra-frame prediction accuracy and effectively improve the coding efficiency. The details are as follows:
1.提出对帧内编码的预测块进行平滑滤波;1. Propose smooth filtering for intra-coded prediction blocks;
2.提出IPS技术与IPF在两个技术的允许标识位均为‘1’的情况下,同一编码单元中IPF与IPS不会同时被确定使用;2. It is proposed that when the allowable flag bits of the IPS technology and IPF are both '1', the IPF and IPS in the same coding unit will not be determined to be used at the same time;
3.提出编码器决定对当前编码单元使用IPF技术时,不传输IPS的标识位,解码器不需要解析IPS的使用标识位;3. It is proposed that when the encoder decides to use the IPF technology for the current coding unit, the identification bit of the IPS is not transmitted, and the decoder does not need to parse the use identification bit of the IPS;
编码器决定对当前编码单元不使用IPF技术时,需要传输IPS的标识位,解码器需要解析IPS的使用标识位;When the encoder decides not to use the IPF technology for the current coding unit, it needs to transmit the identification bit of the IPS, and the decoder needs to parse the use identification bit of the IPS;
4.提出IPS卷积核为简化的9抽头滤波高斯卷积核;4. The IPS convolution kernel is proposed as a simplified 9-tap filtering Gaussian convolution kernel;
5.提出对浮点数的卷积核进行近似取值,对滤波系数取整以避免浮点计算,滤波系数总和为2的指数幂以移位操作代替除法运算,节省计算资源和降低复杂度;5. It is proposed to approximate the value of the convolution kernel of floating-point numbers, round the filter coefficients to avoid floating-point calculations, and the sum of the filter coefficients is an exponential power of 2. The shift operation replaces the division operation, which saves computing resources and reduces complexity;
6.提出9抽头整数高斯卷积核滤波器系数为,第一滤波系数为5,第二滤波系数为8以及第三滤波系数为12,经过滤波后的预测值需要向右移6位;6. A 9-tap integer Gaussian convolution kernel filter coefficient is proposed, the first filter coefficient is 5, the second filter coefficient is 8 and the third filter coefficient is 12, and the predicted value after filtering needs to be shifted to the right by 6 bits;
7.提出25抽头与13抽头滤波器。7. Propose 25-tap and 13-tap filters.
本申请还可以从以下方向进行进一步扩展。The present application can also be further expanded from the following directions.
扩展方案1:将本技术方案中的9抽头高斯卷积核替换成更多抽头的滤波卷积核,以达到更好的平滑滤波效果。Extension 1: Replace the 9-tap Gaussian convolution kernel in this technical solution with a filter convolution kernel with more taps to achieve a better smoothing filtering effect.
扩展方案2:将本技术方案中的亮度分量和色度分量分别使用独立标识位表示IPS的使用与否。Extended solution 2: The luminance component and the chrominance component in this technical solution are respectively used with independent identification bits to indicate whether the IPS is used or not.
扩展方案3:将本技术方案中的使用范围进行限制,对于预测块面积较小的单元不使用IPS技术,以减少传输标识位和降低计算复杂度。Extended solution 3: The scope of use in this technical solution is limited, and IPS technology is not used for units with smaller prediction block areas, so as to reduce transmission identification bits and reduce computational complexity.
扩展方案4:将本技术方案中的使用范围进行限制,对于当前编码单元的预测模式进行筛选,若为均值模式,则不使用IPS技术,以减少传输标识位和降低计算复杂度。Extended solution 4: The scope of use in this technical solution is limited, and the prediction mode of the current coding unit is screened. If it is an average mode, the IPS technology is not used to reduce transmission identification bits and computational complexity.
本申请实施例提供一种图像编码装置,该图像编码装置可以为视频解码器或视频编码器。具体的,图像编码装置用于执行以上解码方法中的视频解码器所执行的步骤。本申请实施例提供的图像编码装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an image encoding apparatus, and the image encoding apparatus may be a video decoder or a video encoder. Specifically, the image encoding apparatus is configured to perform the steps performed by the video decoder in the above decoding method. The image encoding apparatus provided by the embodiments of the present application may include modules corresponding to corresponding steps.
本申请实施例可以根据上述方法示例对图像编码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the image coding apparatus may be divided into functional modules according to the foregoing method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图12示出上述实施例中所涉及的图像编码装置的一种可能的结构示意图。如图12所示,图像编码装置12包括确定单元120、设置单元121、传输单元122、叠加单元123。In the case where each functional module is divided according to each function, FIG. 12 shows a possible schematic structural diagram of the image coding apparatus involved in the above embodiment. As shown in FIG. 12 , the image encoding apparatus 12 includes a determination unit 120 , a setting unit 121 , a transmission unit 122 , and a superimposition unit 123 .
确定单元120,用于确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;The determining unit 120 is configured to determine intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, and the first indication information is used to indicate whether to allow the use of the first indication information. an intra-frame prediction filtering mode, the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
设置单元121,用于若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;The setting unit 121 is configured to filter the first intra-frame prediction of the current coding block if it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode The first use identification bit of the mode is set to the first value;
传输单元122,用于将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;a transmission unit 122, configured to write the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream;
叠加单元123叠加单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。The superimposing unit 123 is a superimposing unit configured to, according to the intra-frame prediction filtering indication information and the first use flag, determine to use the first frame rate prediction filtering mode to predict the current decoding block, and obtain the current decoding block. The predicted block of the decoded block.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的图像编码装置包括但不限于上述模块,例如:图像编码装置还可以包括存储单元。存储单元可以用于存储该图像编码装置的程序代码和数据。Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here. Certainly, the image encoding apparatus provided in the embodiment of the present application includes but is not limited to the above-mentioned modules. For example, the image encoding apparatus may further include a storage unit. The storage unit may be used to store program codes and data of the image encoding apparatus.
在采用集成的单元的情况下,本申请实施例提供的图像编码装置的结构示意图如图13所示。在图13中,图像编码装置13包括:处理模块130和通信模块131。处理模块130用于对图像编码装置的动作进行控制管理,例如,执行确定单元120、设置单元121、传输单元122、叠加单元123执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块131用于支持图像编码装置与其他设备之间的交互。如图13所示,图像编码装置还可以包括存储模块132,存储模块132用于存储图像编码装置的程序代码和数据,例如存储上述存储单元所保存的内容。In the case of using an integrated unit, a schematic structural diagram of the image encoding apparatus provided by the embodiment of the present application is shown in FIG. 13 . In FIG. 13 , the image encoding apparatus 13 includes a processing module 130 and a communication module 131 . The processing module 130 is used to control and manage the actions of the image encoding apparatus, for example, to perform the steps performed by the determination unit 120, the setting unit 121, the transmission unit 122, the superimposition unit 123, and/or to perform other techniques described herein. process. The communication module 131 is used to support the interaction between the image coding apparatus and other devices. As shown in FIG. 13 , the image encoding apparatus may further include a storage module 132, and the storage module 132 is configured to store program codes and data of the image encoding apparatus, for example, to store the content stored in the above-mentioned storage unit.
其中,处理模块130可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性 的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块131可以是收发器、RF电路或通信接口等。存储模块132可以是存储器。Wherein, the processing module 130 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), ASIC, FPGA or other programmable Logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 131 may be a transceiver, an RF circuit, a communication interface, or the like. The storage module 132 may be a memory.
其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。上述图像编码装置可执行上述图像编码方法,图像编码装置具体可以是视频图像编码装置或者其他具有视频编码功能的设备。Wherein, all the relevant contents of the scenarios involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here. The above-mentioned image encoding apparatus can perform the above-mentioned image encoding method, and the image encoding apparatus may specifically be a video image encoding apparatus or other equipment having a video encoding function.
本申请还提供一种视频编码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的图像编码方法。The present application also provides a video encoder, including a non-volatile storage medium, and a central processing unit, where the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium. The medium is connected, and the executable program is executed to implement the image encoding method of the embodiment of the present application.
本申请实施例提供一种图像解码装置,该图像解码装置可以为视频解码器或视频解码器。具体的,图像解码装置用于执行以上解码方法中的视频解码器所执行的步骤。本申请实施例提供的图像解码装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an image decoding apparatus, and the image decoding apparatus may be a video decoder or a video decoder. Specifically, the image decoding apparatus is configured to perform the steps performed by the video decoder in the above decoding method. The image decoding apparatus provided by the embodiments of the present application may include modules corresponding to corresponding steps.
本申请实施例可以根据上述方法示例对图像解码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the embodiments of the present application, the image decoding apparatus may be divided into functional modules according to the above method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图14示出上述实施例中所涉及的图像解码装置的一种可能的结构示意图。如图14所示,图像解码装置14包括解析单元140、确定单元141。In the case where each functional module is divided according to each function, FIG. 14 shows a possible schematic structural diagram of the image decoding apparatus involved in the above embodiment. As shown in FIG. 14 , the image decoding apparatus 14 includes an analysis unit 140 and a determination unit 141 .
解析单元,用于确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;a parsing unit, configured to determine intra-frame prediction filtering indication information and a first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate Whether to allow the use of the first intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is the intra-frame prediction filtering IPF mode, the The first use flag is the use flag of the first intra-frame prediction filtering mode;
确定单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。A determining unit, configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block's prediction block.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的图像解码装置包括但不限于上述模块,例如:图像解码装置还可以包括存储单元。存储单元可以用于存储该图像解码装置的程序代码和数据。Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here. Certainly, the image decoding apparatus provided in the embodiment of the present application includes but is not limited to the above-mentioned modules. For example, the image decoding apparatus may further include a storage unit. The storage unit may be used to store program codes and data of the image decoding apparatus.
在采用集成的单元的情况下,本申请实施例提供的图像解码装置的结构示意图如图15所示。在图15中,图像解码装置15包括:处理模块150和通信模块151。处理模块150用于对图像解码装置的动作进行控制管理,例如,执行解析单元140、确定单元141执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块151用于支持图像解码装置与其他设备之间的交互。如图13所示,图像解码装置还可以包括存储模块152,存储模块152用于存储图像解码装置的程序代码和数据,例如存储上述存储单元所保存的内容。In the case of using an integrated unit, a schematic structural diagram of an image decoding apparatus provided by an embodiment of the present application is shown in FIG. 15 . In FIG. 15 , the image decoding apparatus 15 includes a processing module 150 and a communication module 151 . The processing module 150 is used to control and manage the actions of the image decoding apparatus, eg, to perform the steps performed by the parsing unit 140, the determination unit 141, and/or other processes for performing the techniques described herein. The communication module 151 is used to support the interaction between the image decoding apparatus and other devices. As shown in FIG. 13 , the image decoding apparatus may further include a storage module 152, and the storage module 152 is configured to store program codes and data of the image decoding apparatus, for example, to store the content stored in the above-mentioned storage unit.
其中,处理模块150可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块151可以是收发器、RF电路或通信接口等。存储模块152可以是存储器。The processing module 150 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), ASIC, FPGA or other programmable Logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 151 may be a transceiver, an RF circuit, a communication interface, or the like. The storage module 152 may be a memory.
其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。上述图像解码装置可执行上述图像解码方法,图像解码装置具体可以是视频图像解码装置或者其他具有视频解码功能的设备。Wherein, all the relevant contents of the scenarios involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here. The above-mentioned image decoding apparatus can execute the above-mentioned image decoding method, and the image decoding apparatus may specifically be a video image decoding apparatus or other equipment having a video decoding function.
本申请还提供一种视频解码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的图像解码方法。The present application also provides a video decoder, including a non-volatile storage medium, and a central processing unit, where the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium. The medium is connected, and the executable program is executed to implement the image decoding method of the embodiment of the present application.
本申请还提供一种终端,该终端包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处 理器执行指令时,终端执行本申请实施例的图像编码和/或图像解码方法。这里的终端可以是视频显示设备,智能手机,便携式电脑以及其它可以处理视频或者播放视频的设备。The present application also provides a terminal, where the terminal includes: one or more processors, a memory, and a communication interface. The memory and the communication interface are coupled with one or more processors; the memory is used to store computer program codes, and the computer program codes include instructions. When the one or more processors execute the instructions, the terminal executes the image encoding and/or the image coding and/or the embodiments of the present application. or image decoding method. The terminal here can be a video display device, a smart phone, a portable computer, and other devices that can process or play videos.
本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括一个或多个程序代码,该一个或多个程序包括指令,当解码设备中的处理器在执行该程序代码时,该解码设备执行本申请实施例的图像编码方法、图像解码方法。Another embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes one or more program codes, and the one or more programs include instructions, when the processor in the decoding device executes the program When coding, the decoding device executes the image encoding method and the image decoding method of the embodiments of the present application.
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;解码设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得终端实施执行本申请实施例的图像编码方法、图像解码方法。In another embodiment of the present application, there is also provided a computer program product, the computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; at least one processor of the decoding device can be obtained from a computer The readable storage medium reads the computer-executable instruction, and at least one processor executes the computer-executable instruction to cause the terminal to implement the image encoding method and the image decoding method of the embodiments of the present application.
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it may take the form of a computer program product, in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. . Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (30)

  1. 一种图像编码方法,其特征在于,包括:An image coding method, comprising:
    确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;determining intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, where the first indication information is used to indicate whether the first intra-frame prediction filtering mode is allowed to be used , the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
    若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;If it is determined according to the intra-frame prediction filtering indication information that the current coding block needs to use the first intra-frame prediction filtering mode, the first use flag of the first intra-frame prediction filtering mode of the current coding block is set bit is set to the first value;
    将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;Writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use flag into the code stream;
    根据所述第一帧内预测滤波模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。According to the first intra-frame prediction filtering mode, the current coding block is predicted to obtain a prediction block, the prediction block is encoded, and the encoding result is written into the code stream.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,包括:The method according to claim 1, wherein the determining that the current coding block needs to use the first intra-frame prediction filtering mode according to the intra-frame prediction filtering indication information comprises:
    检测到所述第一指示信息指示允许使用所述第一帧内预测滤波模式,且所述第二指示信息指示允许使用所述第二帧内预测滤波模式;detecting that the first indication information indicates that the first intra prediction filtering mode is allowed to be used, and the second indication information indicates that the second intra prediction filtering mode is allowed to be used;
    对所述当前编码块遍历多种帧内预测模式,分别计算当前编码块在每一种帧内预测模式下的第一预测块;Traverse multiple intra-frame prediction modes for the current coding block, and calculate the first prediction block of the current coding block under each intra-frame prediction mode;
    针对所述每一种帧内预测模式,根据所述第一预测块和所述当前编码块的原始块计算得到所述当前编码块在所述每一种预测模式下的第一率失真代价信息;确定最小的第一率失真代价信息的第一帧内预测模式和对应的第一率失真代价信息作为第一代价值;For each intra prediction mode, calculate and obtain first rate-distortion cost information of the current coding block under each prediction mode according to the first prediction block and the original block of the current coding block ; determine the first intra-frame prediction mode of the minimum first rate-distortion cost information and the corresponding first rate-distortion cost information as the first generation value;
    针对所述每一种帧内预测模式,选择与所述每一种帧内预测模式相对应的滤波器,根据所述当前编码块的尺寸选择与所述每一种帧内预测模式相对应的滤波系数组,根据所述滤波器和所述滤波系数组对所述当前编码块的预测块进行IPF滤波,得到所述当前编码块的预测块在所述每一种帧内预测模式下的第二预测块;根据所述第二预测块和所述当前编码块的原始块计算得到所述每一种预测模式的第二率失真代价信息;记录最小第二率失真代价信息的第二帧内预测模式和对应的第二率失真代价信息作为第二代价值;For each intra prediction mode, select a filter corresponding to each intra prediction mode, and select a filter corresponding to each intra prediction mode according to the size of the current coding block A filter coefficient group, performing IPF filtering on the prediction block of the current encoding block according to the filter and the filter coefficient group, to obtain the first number of the prediction block of the current encoding block under each intra prediction mode. Two prediction blocks; calculate and obtain the second rate-distortion cost information of each prediction mode according to the second prediction block and the original block of the current coding block; record the second intra-frame of the minimum second rate-distortion cost information The prediction mode and the corresponding second rate-distortion cost information are used as the second generation value;
    针对所述每一种帧内预测模式,对所述当前编码块的预测块进行帧内预测平滑IPS滤波,得到所述当前编码块的预测块在所述每一种帧内预测模式下的第三预测块;根据所述第三预测块和所述当前编码块的原始块计算得到所述每一种预测模式的第三率失真代价信息;确定最小的第三率失真代价信息的第三帧内预测模式和对应的第三率失真代价信息作为第三代价值;For each intra prediction mode, perform intra prediction smoothing IPS filtering on the prediction block of the current coding block to obtain the first IPS filter of the prediction block of the current coding block under each intra prediction mode Three prediction blocks; calculating the third rate-distortion cost information of each prediction mode according to the third prediction block and the original block of the current coding block; determining the third frame with the smallest third rate-distortion cost information The intra-prediction mode and the corresponding third rate-distortion cost information are used as the third generation value;
    若检测到所述第一代价值、所述第二代价值、所述第三代价值中数值最小的代价值为所述第二代价值,则确定所述当前编码块需要使用所述第一帧内预测滤波模式。If it is detected that the cost value with the smallest value among the first generation value, the second generation value and the third generation value is the second generation value, it is determined that the current coding block needs to use the first generation value. Intra prediction filter mode.
  3. 根据权利要求2所述的方法,其特征在于,所述将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流,包括:将所述帧内预测滤波指示信息、所述第二帧内预测模式、所述第一使用标识位写入码流;The method according to claim 2, wherein the writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first usage flag into the code stream comprises: The intra-frame prediction filtering indication information, the second intra-frame prediction mode, and the first use flag are written into the code stream;
    所述方法还包括:将所述当前编码块的所述第二预测块和经反变换、反量化后得到的残差块叠加,得到重建后的重建块,作为下一个编码块的预测参考块。The method further includes: superimposing the second prediction block of the current coding block and the residual block obtained after inverse transformation and inverse quantization to obtain a reconstructed reconstructed block, which is used as a prediction reference block for the next coding block. .
  4. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    若检测到所述第一代价值、所述第二代价值、所述第三代价值中数值最小的代价值为所述第一代价值,则确定所述当前编码块无需使用所述第一帧内预测滤波模式和所述第二帧内预测滤波模式;If it is detected that the first-generation value, the second-generation value, and the third-generation value have the smallest cost value, it is determined that the current coding block does not need to use the first-generation value. an intra-frame prediction filter mode and the second intra-frame prediction filter mode;
    将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位和所述第二帧内预测滤波模式的第二使用标识位均设置为不使用;setting the first use flag of the first intra-frame prediction filter mode of the current coding block and the second use flag of the second intra-frame prediction filter mode to not use;
    将所述帧内预测滤波指示信息、所述第一帧内预测模式、所述第一使用标识位和所述第二使用标识位写入码流;Writing the intra-frame prediction filtering indication information, the first intra-frame prediction mode, the first use identification bit and the second use identification bit into a code stream;
    根据所述第一帧内预测模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。According to the first intra-frame prediction mode, the current coding block is predicted to obtain a prediction block, the prediction block is encoded, and the encoding result is written into the code stream.
  5. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    若检测到所述第一代价值、所述第二代价值、所述第三代价值中数值最小的代价值为所述第三代价值,则确定所述当前编码块需要使用所述第二帧内预测滤波模式且无需使用所述第一帧内预测滤波模式;If it is detected that the cost value with the smallest value among the first generation value, the second generation value and the third generation value is the third generation value, it is determined that the current coding block needs to use the second generation value. an intra-prediction filter mode without using the first intra-prediction filter mode;
    将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第二值,将所述第二帧内预测滤波模式的第二使用标识位均设置为使用;setting the first use flag of the first intra prediction filtering mode of the current coding block to a second value, and setting the second use flag of the second intra prediction filtering mode to use;
    将所述帧内预测滤波指示信息、所述第三帧内预测模式、所述第一使用标识位和所述第二使用标识位写入码流;writing the intra-frame prediction filtering indication information, the third intra-frame prediction mode, the first use identification bit and the second use identification bit into a code stream;
    根据所述第三帧内预测模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。According to the third intra-frame prediction mode, the current coding block is predicted to obtain a prediction block, the prediction block is encoded, and the encoding result is written into the code stream.
  6. 根据权利要求1所述的方法,其特征在于,所述根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,包括:The method according to claim 1, wherein the determining that the current coding block needs to use the first intra-frame prediction filtering mode according to the intra-frame prediction filtering indication information comprises:
    检测到所述第一指示信息指示允许使用所述第一帧内预测滤波模式,且所述第二指示信息指示不允许使用所述第二帧内预测滤波模式;detecting that the first indication information indicates that the first intra-frame prediction filtering mode is allowed to be used, and the second indication information indicates that the second intra-frame prediction filtering mode is not allowed to be used;
    对所述当前编码块遍历多种帧内预测模式,分别计算当前编码块在每一种帧内预测模式下的第一预测块;Traverse multiple intra-frame prediction modes for the current coding block, and calculate the first prediction block of the current coding block under each intra-frame prediction mode;
    针对所述每一种帧内预测模式,根据所述第一预测块和所述当前编码块的原始块计算得到所述当前编码块在所述每一种预测模式下的第一率失真代价信息;确定最小的第一率失真代价信息的第一帧内预测模式和对应的第一率失真代价信息作为第一代价值;For each intra prediction mode, calculate and obtain first rate-distortion cost information of the current coding block under each prediction mode according to the first prediction block and the original block of the current coding block ; determine the first intra-frame prediction mode of the minimum first rate-distortion cost information and the corresponding first rate-distortion cost information as the first generation value;
    针对所述每一种帧内预测模式,选择与所述每一种帧内预测模式相对应的滤波器,根据所述当前编码块的尺寸选择与所述每一种帧内预测模式相对应的滤波系数组,根据所述滤波器和所述滤波系数组对所述当前编码块的预测块进行IPF滤波,得到所述当前编码块的预测块在所述每一种帧内预测模式下的第二预测块;根据所述第二预测块和所述当前编码块的原始块计算得到所述每一种预测模式的第二率失真代价信息;记录最小第二率失真代价信息的第二帧内预测模式和对应的第二率失真代价信息作为第二代价值;For each intra prediction mode, select a filter corresponding to each intra prediction mode, and select a filter corresponding to each intra prediction mode according to the size of the current coding block A filter coefficient group, performing IPF filtering on the prediction block of the current encoding block according to the filter and the filter coefficient group, to obtain the first number of the prediction block of the current encoding block under each intra prediction mode. Two prediction blocks; calculate and obtain the second rate-distortion cost information of each prediction mode according to the second prediction block and the original block of the current coding block; record the second intra-frame of the minimum second rate-distortion cost information The prediction mode and the corresponding second rate-distortion cost information are used as the second generation value;
    若检测到所述第一代价值、所述第二代价值中数值最小的代价值为所述第二代价值,则确定所述当前编码块需要使用所述第一帧内预测滤波模式。If it is detected that the cost value with the smallest value among the first generation value and the second generation value is the second generation value, it is determined that the current coding block needs to use the first intra-frame prediction filtering mode.
  7. 根据权利要求6所述的方法,其特征在于,所述将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流,包括:将所述帧内预测滤波指示信息、所述第一帧内预测模式、所述第一使用标识位写入码流;The method according to claim 6, wherein the writing the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first usage flag into the code stream comprises: The intra-frame prediction filtering indication information, the first intra-frame prediction mode, and the first use flag bit are written into the code stream;
    所述方法还包括:将所述当前编码块的所述第二预测块和经反变换、反量化后得到的残差块叠加,得到重建后的重建块,作为下一个编码块的预测参考块。The method further includes: superimposing the second prediction block of the current coding block and the residual block obtained after inverse transformation and inverse quantization to obtain a reconstructed reconstructed block, which is used as a prediction reference block for the next coding block. .
  8. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    若检测到所述第一代价值、所述第二代价值中数值最小的代价值为所述第一代价值,则确定所述当前编码块无需使用所述第一帧内预测滤波模式;If it is detected that the cost value with the smallest value among the first generation value and the second generation value is the first generation value, determining that the current coding block does not need to use the first intra-frame prediction filtering mode;
    将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第二值;setting the first use flag of the first intra-frame prediction filter mode of the current coding block to a second value;
    将所述帧内预测滤波指示信息、所述第一帧内预测模式、所述第一使用标识位写入码流;writing the intra-frame prediction filtering indication information, the first intra-frame prediction mode, and the first use identification bit into a code stream;
    根据所述第一帧内预测模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。According to the first intra-frame prediction mode, the current coding block is predicted to obtain a prediction block, the prediction block is encoded, and the encoding result is written into the code stream.
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    检测到所述第一指示信息指示不允许使用所述第一帧内预测滤波模式,且所述第二指示信息指示不允许使用所述第二帧内预测滤波模式;detecting that the first indication information indicates that the first intra prediction filtering mode is not allowed to be used, and the second indication information indicates that the second intra prediction filtering mode is not allowed to be used;
    对所述当前编码块遍历多种帧内预测模式,分别计算当前编码块在每一种帧内预测模式下的第一预测块;Traverse multiple intra-frame prediction modes for the current coding block, and calculate the first prediction block of the current coding block under each intra-frame prediction mode;
    针对所述每一种帧内预测模式,根据所述第一预测块和所述当前编码块的原始块计算得到所述当前编码块在所述每一种预测模式下的第一率失真代价信息;确定最小的第一率失真代价信息的第一帧内预测模式和对应的第一率失真代价信息作为第一代价值;For each intra prediction mode, calculate and obtain first rate-distortion cost information of the current coding block under each prediction mode according to the first prediction block and the original block of the current coding block ; determine the first intra-frame prediction mode of the minimum first rate-distortion cost information and the corresponding first rate-distortion cost information as the first generation value;
    将所述帧内预测滤波指示信息、所述第一帧内预测模式、所述第一使用标识位和所述第二使用标识位写入码流;writing the intra-frame prediction filtering indication information, the first intra-frame prediction mode, the first use identification bit and the second use identification bit into a code stream;
    根据所述第一帧内预测模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流。According to the first intra-frame prediction mode, the current coding block is predicted to obtain a prediction block, the prediction block is encoded, and the encoding result is written into the code stream.
  10. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    检测到所述第一指示信息指示不允许使用所述第一帧内预测滤波模式,且所述第二指示信息指示允许使用所述第二帧内预测滤波模式,且所述当前解码块的面积大于等于64且小于4096;It is detected that the first indication information indicates that the use of the first intra prediction filtering mode is not allowed, and the second indication information indicates that the use of the second intra prediction filtering mode is allowed, and the area of the current decoding block greater than or equal to 64 and less than 4096;
    针对所述每一种帧内预测模式,根据所述第一预测块和所述当前编码块的原始块计算得到所述当前编码块在所述每一种预测模式下的第一率失真代价信息;确定最小的第一率失真代价信息的第一帧内预测模式和对应的第一率失真代价信息作为第一代价值;For each intra prediction mode, calculate and obtain first rate-distortion cost information of the current coding block under each prediction mode according to the first prediction block and the original block of the current coding block ; determine the first intra-frame prediction mode of the minimum first rate-distortion cost information and the corresponding first rate-distortion cost information as the first generation value;
    针对所述每一种帧内预测模式,对所述当前编码块的预测块进行帧内预测平滑IPS滤波,得到所述当前编码块的预测块在所述每一种帧内预测模式下的第三预测块;根据所述第三预测块和所述当前编码块的原始块计算得到所述每一种预测模式的第三率失真代价信息;确定最小的第三率失真代价信息的第三帧内预测模式和对应的第三率失真代价信息作为第三代价值;For each intra prediction mode, perform intra prediction smoothing IPS filtering on the prediction block of the current coding block to obtain the first IPS filter of the prediction block of the current coding block under each intra prediction mode Three prediction blocks; calculating the third rate-distortion cost information of each prediction mode according to the third prediction block and the original block of the current coding block; determining the third frame with the smallest third rate-distortion cost information The intra-prediction mode and the corresponding third rate-distortion cost information are used as the third generation value;
    若检测到所述第一代价值、所述第三代价值中数值最小的代价值为所述第一代价值,则确定所述当前编码块无需使用所述第一帧内预测滤波模式;将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第二值;将所述帧内预测滤波指示信息、所述第一帧内预测模式、所述第一使用标识位写入码流;根据所述第一帧内预测模式,对所述当前编码块进行预测得到预测块,对所述预测块进行编码,将编码结果写入码流;If it is detected that the cost value with the smallest value among the first generation value and the third generation value is the first generation value, it is determined that the current coding block does not need to use the first intra-frame prediction filtering mode; setting the first use flag of the first intra prediction filtering mode of the current coding block to a second value; setting the intra prediction filtering indication information, the first intra prediction mode, the first intra prediction Writing a code stream using an identification bit; according to the first intra-frame prediction mode, predicting the current encoding block to obtain a prediction block, encoding the prediction block, and writing the encoding result into the code stream;
    若检测到所述第一代价值、所述第三代价值中数值最小的代价值为所述第三代价值,则确定所述当前编码块需要使用所述第二帧内预测滤波模式;将所述当前编码块的所述第二帧内预测滤波模式的第二使用标识位设置为使用;将所述帧内预测滤波指示信息、所述第三帧内预测模式、所述第二使用标识位写入码流;将所述当前编码块的所述第三预测块和经反变换、反量化后得到的残差块叠加,得到重建后的重建块,作为下一个编码块的预测参考块。If it is detected that the cost value with the smallest value among the first generation value and the third generation value is the third generation value, it is determined that the current coding block needs to use the second intra-frame prediction filtering mode; setting the second use flag of the second intra prediction filtering mode of the current coding block to use; setting the intra prediction filtering indication information, the third intra prediction mode, the second use flag Bits are written into the code stream; the third prediction block of the current coding block and the residual block obtained after inverse transformation and inverse quantization are superimposed to obtain the reconstructed reconstructed block as the prediction reference block of the next coding block .
  11. 根据权利要求2或6所述的方法,其特征在于,所述IPF滤波采用9抽头滤波器,所述滤波器为高斯卷积核。The method according to claim 2 or 6, wherein the IPF filtering adopts a 9-tap filter, and the filter is a Gaussian convolution kernel.
  12. 根据权利要求11所述的方法,其特征在于,所述9抽头滤波器的滤波系数总和为2的指数幂。The method of claim 11, wherein the sum of the filter coefficients of the 9-tap filter is an exponential power of 2.
  13. 根据权利要求11所述的方法,其特征在于,所述9抽头滤波器的第一滤波系数为5,第二滤波系数为8,第三滤波系数为12,经过滤波后的预测值向右移6位。The method according to claim 11, wherein the first filter coefficient of the 9-tap filter is 5, the second filter coefficient is 8, and the third filter coefficient is 12, and the predicted value after filtering is shifted to the right 6 bits.
  14. 根据权利要求2或6所述的方法,其特征在于,所述IPF滤波采用25抽头滤波器或者13抽头滤波器。The method according to claim 2 or 6, wherein the IPF filtering adopts a 25-tap filter or a 13-tap filter.
  15. 一种图像解码方法,其特征在于,包括:An image decoding method, comprising:
    解析码流,确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;Parse the code stream, and determine the intra-frame prediction filtering indication information and the first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate whether The first intra-frame prediction filtering mode is allowed to be used, and the second indication information is used to indicate whether the second intra-frame prediction filtering mode is allowed to be used, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode, and the a use flag bit is the use flag bit of the first intra-frame prediction filtering mode;
    根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。According to the intra-frame prediction filtering indication information and the first usage flag, it is determined to use the first frame rate prediction filtering mode to perform prediction on the current decoding block, to obtain a prediction block of the current decoding block.
  16. 根据权利要求15所述的方法,其特征在于,所述根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块,包括:The method according to claim 15, characterized in that, according to the intra-frame prediction filtering indication information and the first use flag, determining to use the first frame rate prediction filtering mode for the current decoding block Perform prediction to obtain the prediction block of the current decoding block, including:
    检测到所述第一指示信息指示允许使用所述第一帧内预测滤波模式,且所述第二指示信息指示允许使用或者不允许使用所述第二帧内预测滤波模式;detecting that the first indication information indicates that the first intra-frame prediction filtering mode is allowed to be used, and the second indication information indicates that the use of the second intra-frame prediction filtering mode is allowed or not allowed;
    获取所述码流并解码得到所述当前解码块的残差块;obtaining the code stream and decoding to obtain the residual block of the current decoding block;
    解析所述码流得到所述当前解码块的预测模式,根据所述预测模式和相邻重建块计算得到所述当前解码块的原始预测块;Parsing the code stream to obtain the prediction mode of the current decoding block, and calculating and obtaining the original prediction block of the current decoding block according to the prediction mode and the adjacent reconstructed block;
    若所述第一使用标识位指示使用所述第一帧内预测滤波模式;if the first use flag indicates to use the first intra-frame prediction filtering mode;
    根据所述当前解码块的所述预测模式选择相对应的滤波器,根据所述当前解码块的尺寸选择相对应的滤波器系数组,根据所述滤波器和所述滤波器系数组对所述当前解码块的原始预测块进行IPF滤波以得到所述解码块的预测块。The corresponding filter is selected according to the prediction mode of the current decoding block, the corresponding filter coefficient group is selected according to the size of the current decoding block, and the corresponding filter coefficient group is selected according to the filter and the filter coefficient group. The original predicted block of the current decoded block is IPF filtered to obtain the predicted block of said decoded block.
  17. 根据权利要求15所述的方法,其特征在于,所述方法还包括:The method of claim 15, wherein the method further comprises:
    若所述第一指示信息指示不允许使用所述第一帧内预测滤波模式,且所述第二指示信息指示允许使用 所述第二帧内预测滤波模式,且所述当前解码块的面积大于等于64且小于4096;If the first indication information indicates that the first intra prediction filtering mode is not allowed to be used, and the second indication information indicates that the second intra prediction filtering mode is allowed to be used, and the area of the current decoding block is larger than equal to 64 and less than 4096;
    获取所述码流并解码得到所述当前解码块的残差块;obtaining the code stream and decoding to obtain the residual block of the current decoding block;
    解析所述码流得到所述当前解码块的预测模式,根据所述预测模式和相邻重建块计算得到所述当前解码块的原始预测块;Parsing the code stream to obtain the prediction mode of the current decoding block, and calculating and obtaining the original prediction block of the current decoding block according to the prediction mode and the adjacent reconstructed block;
    检测到所述第一使用标识位指示不使用所述第一帧内预测滤波模式;Detecting that the first use flag indicates that the first intra-frame prediction filtering mode is not used;
    解析所述码流并获取所述当前解码块的第二使用标识位,所述第二使用标识位为帧内预测平滑滤波IPS使用标识位;Parse the code stream and obtain the second use flag of the current decoding block, and the second use flag is the intra-frame prediction smoothing filter IPS use flag;
    检测到所述第二使用标识位指示使用第二帧内预测滤波模式;It is detected that the second use flag indicates that the second intra-frame prediction filtering mode is used;
    对所述当前解码块的所述原始预测块进行帧内预测平滑IPS滤波,得到所述当前解码块的预测块。Intra-frame prediction smoothing IPS filtering is performed on the original prediction block of the current decoding block to obtain the prediction block of the current decoding block.
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method of claim 17, wherein the method further comprises:
    检测到所述第二使用标识位指示不使用所述第二帧内预测滤波模式;detecting that the second use flag indicates that the second intra-frame prediction filtering mode is not used;
    确定所述当前解码块的所述原始预测块为所述当前解码块的预测块。The original prediction block of the current decoding block is determined to be the prediction block of the current decoding block.
  19. 根据权利要求15-18任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 15-18, wherein the method further comprises:
    将所述预测块叠加所述残差信息得到所述当前解码块的重建块。A reconstructed block of the current decoding block is obtained by superimposing the residual information on the prediction block.
  20. 根据权利要求16所述的方法,其特征在于,所述IPF滤波采用9抽头滤波器,所述滤波器为高斯卷积核。The method according to claim 16, wherein the IPF filtering adopts a 9-tap filter, and the filter is a Gaussian convolution kernel.
  21. 根据权利要求20所述的方法,其特征在于,所述9抽头滤波器的滤波系数总和为2的指数幂。The method of claim 20, wherein the sum of the filter coefficients of the 9-tap filter is an exponential power of 2.
  22. 根据权利要求20所述的方法,其特征在于,所述9抽头滤波器的第一滤波系数为5,第二滤波系数为8,第三滤波系数为12,经过滤波后的预测值向右移6位。The method according to claim 20, wherein the first filter coefficient of the 9-tap filter is 5, the second filter coefficient is 8, and the third filter coefficient is 12, and the predicted value after filtering is shifted to the right 6 bits.
  23. 根据权利要求16所述的方法,其特征在于,所述IPF滤波采用25抽头滤波器或者13抽头滤波器。The method according to claim 16, wherein the IPF filtering adopts a 25-tap filter or a 13-tap filter.
  24. 一种图像编码装置,其特征在于,包括:An image encoding device, comprising:
    确定单元,用于确定当前编码块的帧内预测滤波指示信息,所述帧内预测滤波指示信息包括第一指示信息和第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式;a determining unit, configured to determine intra-frame prediction filtering indication information of the current coding block, where the intra-frame prediction filtering indication information includes first indication information and second indication information, the first indication information is used to indicate whether to allow the use of the first indication information an intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, and the first intra-frame prediction filtering mode is an intra-frame prediction filtering IPF mode;
    设置单元,用于若根据所述帧内预测滤波指示信息确定所述当前编码块需要使用所述第一帧内预测滤波模式,则将所述当前编码块的所述第一帧内预测滤波模式的第一使用标识位设置为第一值;a setting unit, configured to set the first intra prediction filtering mode of the current coding block to The first use identification bit of is set to the first value;
    传输单元,用于将所述帧内预测滤波指示信息、所述第一帧内预测滤波模式和所述第一使用标识位写入码流;a transmission unit, configured to write the intra-frame prediction filtering indication information, the first intra-frame prediction filtering mode and the first use identification bit into a code stream;
    叠加单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。The superposition unit is configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block prediction block.
  25. 一种图像解码装置,其特征在于,包括:An image decoding device, comprising:
    解析单元,用于确定当前解码块的帧内预测滤波指示信息和第一使用标识位,所述帧内预测指示信息包括第一指示信息、第二指示信息,所述第一指示信息用于指示是否允许使用第一帧内预测滤波模式,所述第二指示信息用于指示是否允许使用第二帧内预测滤波模式,所述第一帧内预测滤波模式为帧内预测滤波IPF模式,所述第一使用标志位为所述第一帧内预测滤波模式的使用标识位;a parsing unit, configured to determine intra-frame prediction filtering indication information and a first use flag of the current decoding block, where the intra-frame prediction indication information includes first indication information and second indication information, and the first indication information is used to indicate Whether to allow the use of the first intra-frame prediction filtering mode, the second indication information is used to indicate whether to allow the use of the second intra-frame prediction filtering mode, the first intra-frame prediction filtering mode is the intra-frame prediction filtering IPF mode, the The first use flag is the use flag of the first intra-frame prediction filtering mode;
    确定单元,用于根据所述帧内预测滤波指示信息和所述第一使用标识位,确定使用所述第一帧率预测滤波模式对所述当前解码块进行预测,得到所述当前解码块的预测块。A determining unit, configured to determine to use the first frame rate prediction filtering mode to predict the current decoding block according to the intra-frame prediction filtering indication information and the first use flag, and obtain the current decoding block's prediction block.
  26. 一种编码器,包括非易失性存储介质以及中央处理器,其特征在于,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,当所述中央处理器执行所述可执行程序时,所述编码器执行如权利要求1-14任一项所述的图像编码方法。An encoder comprising a non-volatile storage medium and a central processing unit, wherein the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium , when the central processing unit executes the executable program, the encoder executes the image encoding method according to any one of claims 1-14.
  27. 一种解码器,包括非易失性存储介质以及中央处理器,其特征在于,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,当所述中央处理器执行所述可执行程序时,所述解码器执行如权利要求15-23任一项所述的图像解码方法。A decoder includes a non-volatile storage medium and a central processing unit, wherein the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium , when the central processing unit executes the executable program, the decoder executes the image decoding method according to any one of claims 15-23.
  28. 一种终端,其特征在于,所述终端包括:一个或多个处理器、存储器和通信接口;所述存储器、所述通信接口与所述一个或多个处理器连接;所述终端通过所述通信接口与其他设备通信,所述存储器用 于存储计算机程序代码,所述计算机程序代码包括指令,A terminal, characterized in that the terminal comprises: one or more processors, a memory and a communication interface; the memory and the communication interface are connected to the one or more processors; a communication interface to communicate with other devices, the memory for storing computer program code, the computer program code including instructions,
    当所述一个或多个处理器执行所述指令时,所述终端执行如权利要求1-14任一项所述的图像编码方法和/或如权利要求15-23任一项所述的图像解码方法。When the one or more processors execute the instructions, the terminal executes the image encoding method according to any one of claims 1-14 and/or the image according to any one of claims 15-23 decoding method.
  29. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在终端上运行时,使得所述终端执行如权利要求1-14任一项所述的图像编码方法和/或如权利要求15-23任一项所述的图像解码方法。A computer program product containing instructions, characterized in that, when the computer program product is run on a terminal, the terminal is made to execute the image encoding method according to any one of claims 1-14 and/or the image coding method according to claim 1. The image decoding method according to any one of claims 15-23.
  30. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在终端上运行时,使得所述终端执行如权利要求1-14任一项所述的图像编码方法和/或如权利要求15-23任一项所述的图像解码方法。A computer-readable storage medium, comprising instructions, characterized in that, when the instructions are executed on a terminal, the terminal is made to execute the image encoding method according to any one of claims 1-14 and/or the image coding method according to claim 1. The image decoding method according to any one of claims 15-23.
PCT/CN2021/109173 2020-07-29 2021-07-29 Image coding method, image decoding method, and related apparatus WO2022022622A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202180060486.6A CN116250240A (en) 2020-07-29 2021-07-29 Image encoding method, image decoding method and related devices

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010748924.5 2020-07-29
CN202010748924.5A CN114071162A (en) 2020-07-29 2020-07-29 Image encoding method, image decoding method and related device

Publications (1)

Publication Number Publication Date
WO2022022622A1 true WO2022022622A1 (en) 2022-02-03

Family

ID=80037645

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/109173 WO2022022622A1 (en) 2020-07-29 2021-07-29 Image coding method, image decoding method, and related apparatus

Country Status (3)

Country Link
CN (2) CN114071162A (en)
TW (1) TW202209878A (en)
WO (1) WO2022022622A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114567775B (en) * 2022-04-29 2022-09-09 中国科学技术大学 Image dividing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200400A (en) * 2012-01-09 2013-07-10 中兴通讯股份有限公司 Coder and decoder method, coder decoder and electronic equipment of picture layer and sharding layer
CN105141948A (en) * 2015-09-22 2015-12-09 天津师范大学 Improved HEVC sample point self-adaption compensation method
CN109889852A (en) * 2019-01-22 2019-06-14 四川大学 A kind of HEVC intraframe coding optimization method based on neighbor
CN110650349A (en) * 2018-06-26 2020-01-03 中兴通讯股份有限公司 Image encoding method, decoding method, encoder, decoder and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200400A (en) * 2012-01-09 2013-07-10 中兴通讯股份有限公司 Coder and decoder method, coder decoder and electronic equipment of picture layer and sharding layer
CN105141948A (en) * 2015-09-22 2015-12-09 天津师范大学 Improved HEVC sample point self-adaption compensation method
CN110650349A (en) * 2018-06-26 2020-01-03 中兴通讯股份有限公司 Image encoding method, decoding method, encoder, decoder and storage medium
CN109889852A (en) * 2019-01-22 2019-06-14 四川大学 A kind of HEVC intraframe coding optimization method based on neighbor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHEN HAOMING; ZHANG TAO; SUN MING-TING; SAXENA ANKUR; BUDAGAVI MADHUKAR: "Improving Intra Prediction in High-Efficiency Video Coding", IEEE TRANSACTIONS ON IMAGE PROCESSING, IEEE, USA, vol. 25, no. 8, 1 August 2016 (2016-08-01), USA, pages 3671 - 3682, XP011614846, ISSN: 1057-7149, DOI: 10.1109/TIP.2016.2573585 *

Also Published As

Publication number Publication date
TW202209878A (en) 2022-03-01
CN116250240A (en) 2023-06-09
CN114071162A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
TWI782904B (en) Merging filters for multiple classes of blocks for video coding
WO2021238540A1 (en) Image encoding method, image decoding method, and related apparatuses
WO2022088631A1 (en) Image encoding method, image decoding method, and related apparatuses
WO2020220884A1 (en) Intra-frame prediction method and apparatus for video sequence
WO2021185257A1 (en) Image coding method, image decoding method and related apparatuses
WO2021244197A1 (en) Image encoding method, image decoding method, and related apparatuses
TW202209879A (en) Image encoding method, image decoding method and related devices capable of improving the accuracy of intra-frame prediction and encoding efficiency
WO2022166462A1 (en) Encoding/decoding method and related device
WO2019179401A1 (en) Image filtering method and apparatus, and video codec
WO2022022622A1 (en) Image coding method, image decoding method, and related apparatus
WO2022037300A1 (en) Encoding method, decoding method, and related devices
CN118101967A (en) Position dependent spatially varying transform for video coding
WO2023092256A1 (en) Video encoding method and related apparatus therefor
CN112055211B (en) Video encoder and QP setting method
CN113965764B (en) Image encoding method, image decoding method and related device
WO2020007187A1 (en) Image block decoding method and device
WO2020000487A1 (en) Transformation method, inverse transformation method and apparatus
CN114071148A (en) Video coding method, device, equipment and product
WO2023154359A1 (en) Methods and devices for multi-hypothesis-based prediction

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21851101

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21851101

Country of ref document: EP

Kind code of ref document: A1