Video coding method and apparatus, video decoding method and apparatus, computer-readable medium, and electronic device
By adjusting the extrapolation filter coefficients and optimizing the reference region filter coefficients, the problem of decreased prediction performance in intra-frame prediction mode was solved, thus improving the efficiency and accuracy of video encoding and decoding.
Patent Information
- Application Number
- PCT/CN2025/113399
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-09
- Filing Date
- 2025-08-08
- Publication Date
- 2026-02-12
AI Technical Summary
In existing technologies, intra-frame prediction modes based on extrapolation filters exhibit decreased prediction performance when the current block is far from the reference region, affecting the accuracy of intra-frame prediction and reducing encoding/decoding efficiency.
By obtaining the filter coefficients and compensation values of the current block, adjusted filter coefficients are generated, the filter coefficients of the reference region are optimized, and the accuracy of intra-frame prediction is improved.
It improves video encoding and decoding efficiency and increases the accuracy of intra-frame prediction.
Smart Images

Figure CN2025113399_12022026_PF_FP_ABST
Abstract
Description
Video coding method and device, computer readable medium and electronic device
[0001] The present application claims priority to the Chinese patent application No. 2024110999824, filed on August 9, 2024, and entitled "Video coding method and device, computer readable medium and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of video coding, in particular, to a video coding method, device, computer readable medium and electronic device. BACKGROUND
[0003] In the field of video coding, the intra prediction mode is based on the correlation of the pixels of the video image existing in the spatial domain, and the prediction value of the current block is derived from the adjacent region. The extrapolation filter-based intra prediction (EIP) mode is to obtain the extrapolation filter coefficients from the reference region adjacent to the current block using a predetermined filter template, and then generate the prediction pixels in the current block in a certain order.
[0004] For the current block using the EIP mode, the filter coefficients are derived using the pixels in the reference region adjacent to the current block, which leads to the prediction effect decreasing as the pixels in the current block move away from the reference region, thereby affecting the accuracy of intra prediction and reducing the coding efficiency. SUMMARY
[0005] Embodiments of the present application provide a video coding method, device, computer readable medium and electronic device, which can optimize the reference region filter coefficients corresponding to the current block, thereby improving the accuracy of intra prediction and being beneficial to improving the video coding efficiency.
[0006] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.
[0007] In a first aspect, embodiments of the present application provide a video decoding method, comprising: obtaining an encoded video bitstream; obtaining filter coefficients of a current block, the filter coefficients being used for an extrapolation filter-based intra prediction mode; decoding a compensation value of the filter coefficients from the video bitstream; generating adjusted filter coefficients based on the compensation value and the filter coefficients; and predicting the current block using the adjusted filter coefficients.
[0008] In a second aspect, an embodiment of the present application provides a video encoding method, comprising: obtaining filter coefficients of a current block and a compensation value of the filter coefficients, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; generating adjusted filter coefficients based on the compensation value and the filter coefficients; performing intra prediction on the current block using the adjusted filter coefficients; and encoding the compensation value into a video bitstream.
[0009] In a third aspect, an embodiment of the present application provides a video decoding apparatus, comprising: an obtaining unit configured to obtain an encoded video bitstream; obtain filter coefficients of a current block, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; and a decoding unit configured to decode a compensation value of the filter coefficients of the current block from the video bitstream.
[0010] a generating unit configured to generate adjusted filter coefficients based on the compensation value and the filter coefficients; and a processing unit configured to predict the current block using the adjusted filter coefficients.
[0011] In a fourth aspect, an embodiment of the present application provides a video encoding apparatus, comprising: an obtaining unit configured to obtain filter coefficients of a current block and a compensation value of the filter coefficients, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; a generating unit configured to generate adjusted filter coefficients based on the compensation value and the filter coefficients; and a processing unit configured to perform intra prediction on the current block using the adjusted filter coefficients; and encode the compensation value into a video bitstream.
[0012] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; and a storage apparatus configured to store one or more computer programs, when the one or more computer programs are executed by the one or more processors, the electronic device is caused to implement the video decoding method or the video encoding method as described in the above embodiments.
[0013] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored in a computer readable storage medium. A processor of an electronic device reads and executes the computer program from the computer readable storage medium, so that the electronic device performs the video decoding method or the video encoding method provided in the various optional embodiments described above. BRIEF DESCRIPTION OF DRAWINGS
[0014] FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied;
[0015] FIG. 2 shows a schematic diagram of the placement of a video encoding device and a video decoding device in a streaming system;
[0016] FIG. 3 shows a basic flowchart of a video encoder;
[0017] FIG. 4 shows a schematic diagram of an angular prediction direction in an intra prediction mode;
[0018] FIG. 5 shows a schematic diagram of intra prediction;
[0019] FIG. 6 shows a schematic diagram of intra prediction residual distribution according to an embodiment of the present application;
[0020] FIG. 7 shows a schematic diagram of filter template shapes that can be used in EIP according to an embodiment of the present application;
[0021] FIG. 8 shows a schematic diagram of reference region shapes that can be used in EIP according to an embodiment of the present application;
[0022] FIG. 9 shows a schematic diagram of generating prediction pixels using a diagonal scan order according to an embodiment of the present application;
[0023] FIG. 10 shows a flowchart of a video decoding method according to an embodiment of the present application;
[0024] FIG. 11 shows a schematic diagram of region division in a current block according to an embodiment of the present application;
[0025] FIG. 12 shows a schematic diagram of region division in a current block according to an embodiment of the present application;
[0026] FIG. 13 shows a schematic diagram of region division in a current block according to an embodiment of the present application;
[0027] FIG. 14 shows a flowchart of a video decoding method according to an embodiment of the present application;
[0028] FIG. 15 shows a flowchart of a video encoding method according to an embodiment of the present application;
[0029] FIG. 16 shows a block diagram of a video decoding device according to an embodiment of the present application;
[0030] FIG. 17 shows a block diagram of a video encoding device according to an embodiment of the present application;
[0031] FIG. 18 shows a structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0032] Example implementations are now described with reference to the drawings. Example implementations can, however, be implemented in many different forms and should not be construed as limited to the examples presented in this disclosure; rather, these examples are provided so that this disclosure will be thorough and complete, and fully convey the inventive aspects to those skilled in the art. In the drawings, like reference numerals refer to like elements throughout.
[0033] In addition, the features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are recited to provide a thorough understanding of embodiments of the disclosure. One skilled in the relevant art, however, will recognize that the disclosure can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures, materials, or operations are not shown or described in detail.
[0034] In embodiments of the present disclosure, the term "module" or "unit" refers to a computer program or a part of a computer program having a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.
[0035] The block diagrams shown in the drawings are merely functional entities, and do not necessarily have to correspond to physically independent entities. That is, these functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0036] The flowcharts shown in the drawings are merely exemplary illustrations, and do not necessarily include all contents and operations / steps, nor do they necessarily have to be executed in the order described. For example, some operations / steps can be further divided, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to the actual situation.
[0037] It should be noted that "multiple" referred to herein means two or more. The association relationship of "and / or" between associated objects is described, which means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0038] FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of embodiments of the present disclosure can be applied.
[0039] As shown in FIG. 1, system architecture 100 includes multiple terminal devices that can communicate with each other via, for example, network 150. For example, system architecture 100 can include a first terminal device 110 and a second terminal device 120 interconnected via network 150. In the example of FIG. 1, first terminal device 110 and second terminal device 120 perform unidirectional transmission of data.
[0040] For example, first terminal device 110 can encode video data (e.g., a stream of video pictures that are captured by terminal device 110) for communication to second terminal device 120 via network 150. The encoded video data can be transmitted in the form of one or more coded video bitstreams via network 150. Second terminal device 120 can receive the encoded video data from network 150, decode the encoded video data to recover the video pictures, and display video pictures according to the recovered video data.
[0041] In an embodiment of the present disclosure, system architecture 100 can include a third terminal device 130 and a fourth terminal device 140 that perform bidirectional transmission of encoded video data, which can occur, for example, during a videoconferencing session. For bidirectional transmission of data, each terminal device of the third and fourth terminal devices 130, 140 can code video data (e.g., a stream of video pictures that are captured by the terminal device) for communication to the other terminal device of the third and fourth terminal devices 130, 140 via network 150. Each terminal device of the third and fourth terminal devices 130, 140 also can receive the coded video data transmitted by the other terminal device of the third and fourth terminal devices 130, 140, and can decode the coded video data to recover the video pictures, and can display video pictures on an accessible display according to the recovered video data.
[0042] In the example of FIG. 1, first terminal device 110, second terminal device 120, third terminal device 130, and fourth terminal device 140 can be servers or terminals, although the principles of this disclosure can not be limited to this.
[0043] The server can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content delivery network (CDN), and basic cloud computing services such as big data and artificial intelligence platform. The terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart voice interaction device, a smart watch, a smart home appliance, a vehicle-mounted terminal, an aircraft, and the like, but is not limited thereto.
[0044] The network 150 shown in FIG. 1 represents any number of networks that convey coded video data among the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140, including, for example, wired and / or wireless communication networks. The communication network 150 can exchange data in circuit- switched and / or packet-switched channels. The network can include telecommunication networks, local area and / or wide area networks, and / or the Internet. For the purposes of the present application, the architecture and topology of the network 150 can be immaterial to the operation of the disclosed subject matter unless explained in the following narratives.
[0045] In an embodiment of the application, FIG. 2 shows the placement of video encoding and video decoding devices in a streaming environment. The disclosed subject matter can be equally applicable to other video enabled applications including, for example, video conferencing, digital television (TV), storing of compressed video on digital media including CD, DVD, memory stick and the like, and so forth.
[0046] The streaming system 200 can include a capture subsystem 213 that can include a video source 201, such as a digital camera, creating a stream of uncompressed video pictures 202. In an embodiment, the stream of video pictures 202 includes samples as taken by the digital camera. In contrast to encoded video data 204 (or coded video bitstreams 204), the stream of video pictures 202 is depicted as a thick line to emphasize the high data volume video picture stream 202 that can be processed by the electronic device 220 including a video encoding device 203 coupled to the video source 201. The video encoding device 203 can include hardware, software, or a combination thereof to enable or implement aspects of the disclosed subject matter as described in more detail below. In contrast to the stream of video pictures 202, the encoded video data 204 (or coded video bitstream 204) is depicted as a thin line to emphasize the lower data volume of the encoded video data 204 (or coded video bitstream 204) that can be stored on a streaming server 205 for future use. One or more streaming client subsystems, such as client subsystems 206 and 208 in FIG. 2, can access the streaming server 205 to retrieve copies 207 and 209 of the encoded video data 204. A client subsystem 206 can include a video decoding device 210, such as in the electronic device 230. The video decoding device 210 decodes the incoming copy 207 of encoded video data and creates an outgoing stream of video pictures 211 that can be rendered on a display 212, such as a display screen, or other presentation devices. In some streaming systems, the encoded video data 204, 207, and 209 (e.g., video bitstreams) can be encoded according to certain video coding / compression standards.
[0047] It is noted that the electronic device 220 and the electronic device 230 can include other components not shown in the figures. For example, the electronic device 220 can include a video decoding device, and the electronic device 230 can also include a video encoding device.
[0048] In an embodiment of the present application, taking the High Efficiency Video Coding (HEVC) in the international video coding standard, the Versatile Video Coding (VVC), and the Chinese national video coding standard AVS as examples, when an input video frame image is input, the video frame image is divided into a plurality of non-overlapping processing units according to a block size, and each processing unit will perform similar compression operations. This processing unit is called a Coding Tree Unit (CTU), or also called a Largest Coding Unit (LCU). The CTU can be further divided into one or more basic Coding Units (CUs) for more detailed division. The CU is the most basic element in the coding link.
[0049] In another embodiment, this processing unit can also be called a coding tile (i.e., a tile), which is a rectangular area of a multimedia data frame that can be independently decoded and encoded. In the first generation video coding standard (Alliance for Open Media Video 1, AV1) standard formulated by the Alliance for Open Media, the coding tile can be further divided into one or more Superblocks (SBs) for more detailed division. The SB is the starting point of block division and can be further divided into a plurality of subblocks. Then the superblock is further divided into one or more blocks (B). Each block is the most basic element in the coding link. Alternatively, a SB can contain a plurality of B.
[0050] The above division method of the video frame image can be called a block partition structure. Some concepts in the coding process are introduced as follows:
[0051] Predictive Coding: Predictive coding includes Intra prediction and Inter prediction, etc. The original video signal is predicted by the selected reconstructed video signal, and the residual video signal is obtained. The encoder needs to determine which prediction coding mode is selected for the current coding unit (or coding block) and inform the decoder. Intra prediction refers to the predicted signal coming from the already coded and reconstructed area within the same image; Inter prediction refers to the predicted signal coming from the already coded image (referred to as reference image) other than the current image.
[0052] Transform & Quantization: The residual video signal is transformed into the transform domain by Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT), etc. The signal is converted into transform coefficients. The transform coefficients are further subjected to lossy quantization operation, losing some information, so that the quantized signal is conducive to compressed expression. In some video coding standards, more than one transform method can be selected, so the encoder also needs to select one of the transform methods for the current coding unit (or coding block) and inform the decoder. The quantization precision is usually determined by the quantization parameter (QP). A larger QP value indicates that coefficients with a larger value range will be quantized to the same output, so it usually brings larger distortion and lower code rate. Conversely, a smaller QP value indicates that coefficients with a smaller value range will be quantized to the same output, so it usually brings smaller distortion and higher code rate.
[0053] Entropy Coding or Statistical Coding: The quantized transform domain signal will be statistically compressed and coded according to the frequency of each value, and finally output the binary (0 or 1) compressed code stream. At the same time, other information generated by encoding, such as the selected coding mode, motion vector data, etc., also needs to be entropy coded to reduce the code rate. Statistical coding is a lossless coding method that can effectively reduce the code rate required to express the same signal. Common statistical coding methods include variable length coding (VLC) or context-based binary arithmetic coding (CABAC).
[0054] The CABAC process mainly includes three steps: binarization, context modeling and binary arithmetic coding. After the input syntax elements are binarized, the binary data can be encoded by regular coding mode and bypass coding mode. The bypass coding mode does not need to assign a specific probability model to each binary bit, and the input binary bit bin value is directly encoded by a simple bypass encoder to speed up the entire encoding and decoding speed. Generally, different syntax elements are not completely independent, and the same syntax element also has certain memory. Therefore, according to the conditional entropy theory, the use of other coded syntax elements for conditional coding can further improve the coding performance compared with independent coding or non-memory coding. These coded symbol information used as conditions are called contexts. In the regular coding mode, the binary bits of the syntax elements enter the context modeler in order, and the encoder assigns an appropriate probability model to each input binary bit according to the value of the previously coded syntax element or binary bit. This process is called context modeling. The context model corresponding to the syntax element can be located through the context index increment (ctxIdxInc) and the context index start (ctxIdxStart). After the bin value and the assigned probability model are sent to the binary arithmetic encoder for coding, the context model needs to be updated according to the bin value, that is, the adaptive process in coding.
[0055] Loop filtering: The signal after transformation and quantization is obtained by inverse quantization, inverse transformation and prediction compensation to obtain the reconstructed image. Compared with the original image, the reconstructed image has some differences due to the influence of quantization, that is, the reconstructed image will produce distortion. Therefore, the reconstructed image can be filtered, for example, deblocking filter (DB), sample adaptive offset (SAO) or adaptive loop filter (ALF) filter, which can effectively reduce the distortion degree caused by quantization. Since these filtered reconstructed images will be used as references for subsequent encoded images to predict future image signals, the above filtering operation is also called loop filtering, that is, the filtering operation in the coding loop.
[0056] In an embodiment of the present application, FIG. 3 shows a basic flowchart of a video encoder, in which the intra prediction is taken as an example for illustration. In the flowchart, the original image signal s k[x, y] and the prediction image signal Difference operation is performed to obtain the residual signal u k [x, y], the residual signal u k After the transform and quantization, the quantized coefficients are obtained, which are encoded into bitstream by entropy coding, and are also used to reconstruct the residual signal u' by inverse quantization and inverse transform k [x, y], the prediction image signal and the reconstructed residual signal u' k [x, y] to generate the image signal the image signal On one hand, it is input to the intra mode decision module and the intra prediction module for intra prediction, and on the other hand, it is output as the reconstructed image signal s' by loop filtering k [x, y], the reconstructed image signal s' k [x, y] can be used as the reference image for motion estimation and motion compensation prediction of the next frame. Then, based on the result s' of the motion compensation prediction r [x + m x , y + m y ] and the intra prediction result to obtain the prediction image signal of the next frame and the above process is repeated until the encoding is completed.
[0057] Based on the above encoding process, at the decoding end, for each coding unit (or coding block), after the compressed code stream (i.e. bitstream) is obtained, entropy decoding is performed to obtain various mode information and quantized coefficients. Then, the quantized coefficients are processed by inverse quantization and inverse transform to obtain the residual signal. On the other hand, according to the known encoding mode information, the prediction signal corresponding to the coding unit (or coding block) can be obtained, and then the residual signal and the prediction signal are added to obtain the reconstructed signal. The reconstructed signal is further processed by loop filtering and the like to generate the final output signal.
[0058] In the field of coding technology, intra prediction is a commonly used prediction coding technology. Intra prediction is based on the correlation of pixels in a video image in the spatial domain, and derives a prediction value of a current coding block from adjacent coded regions. The AVS3 second stage adopts an extended intra angle prediction mode (EIPM). In the previous generation of AVS2, there are 33 intra prediction modes, including 30 angle prediction modes and 3 special prediction modes (Plane prediction mode, DC prediction mode and Bilinear prediction mode), 2 most probable prediction modes (MPM) are used for coding, and the remaining modes are coded using 5-bit fixed length coding. To support more precise angle prediction, the angle prediction mode is extended to 62 in AVS3, as shown in FIG. 4, and the newly added angle prediction mode numbers are 34 to 65.
[0059] When using an angle prediction mode, the pixel points in the current prediction block take the reference pixel values at the corresponding positions in the reference pixel row or column according to the direction corresponding to the angle of the prediction mode as the prediction values. As shown in FIG. 5, for a pixel point P in the prediction block, first, according to the prediction angle in the figure, the position of the reference pixel in the already coded pixel row above will be determined, and then the reference pixel value is taken as the prediction value of the pixel point P. It should be noted that not all pixel positions point to reference pixel positions with integer pixel accuracy, such as the reference pixel position of pixel point P in FIG. 5, which is a certain sub-pixel position between pixels B and C, so the prediction pixel value at this position needs to be obtained by interpolation using the surrounding pixels. In order to improve the efficiency of intra prediction, on-chip memory is usually used to store the reference pixels for intra prediction.
[0060] For intra non-angle prediction modes, such as the DC (average) prediction mode, the average of the surrounding reference pixels is calculated, and the average value is filled into each position of the prediction block.
[0061] Since the reference pixels come from the left and upper regions of the current block, for the pixels in the left or upper regions of the current block, since they are relatively close to the reference pixels, the correlation between them is relatively strong in a statistical sense, and the absolute value of the prediction residual is relatively small; for the pixels in the lower or right regions of the current block, since they are relatively far from the reference pixels, the absolute value of the prediction residual is relatively large. An exemplary intra prediction residual distribution of the present application can be as shown in FIG. 6, which is an example of a 45-degree prediction direction in the lower right. The filled area in the figure represents the current block, and the unfilled area represents the reference region of the current block. As can be seen from FIG. 6, the prediction residual of the pixel sample at the lower right corner of the current block is 4, which is much larger than the prediction residual at the upper left corner.
[0062] The Extrapolation-based Intra Prediction (EIP) mode is mainly to define a neighboring (above+left) reference region for the current block, and then generate the prediction pixels of the current block by weighted combination based on the pixels in the reference region. If the position of the pixel in the reference region has not been reconstructed, the prediction pixel of the position can be used to replace the reconstructed pixel. Therefore, EIP is a technology that can simultaneously synchronize the prediction of multiple positions in the current block.
[0063] In EIP, the extrapolation filter coefficients of the reference region of the current block need to be obtained, and the filter coefficients can be obtained by fitting the relationship between the template pixels and the target pixels in the neighboring reference region, or can be obtained by inheriting the extrapolation filter coefficients of the already coded block.
[0064] In some optional embodiments, when fitting the filter coefficients in EIP, the shape of the reference region (i.e., the reconstructed region referenced by the current block) and the filter template shape need to be determined, and then the selected filter is made to slide horizontally or vertically in the selected reference region to construct the autocorrelation matrix and the cross-correlation vector, and then the filter coefficients are calculated based on the autocorrelation matrix and the cross-correlation vector, which is similar to the process of determining the filter coefficients in the Convolutional Cross-Component intra prediction Model (CCCM). Specifically, in the CCCM, the autocorrelation matrix is used to represent the correlation between the luminance reconstructed pixels in the reference region; the cross-correlation vector is used to represent the correlation between the luminance reconstructed pixels and the chrominance reconstructed pixels in the reference region, and then the Mean Squared Error (MSE) minimization is performed to solve the filter coefficients.
[0065] Optionally, the three filter template shapes that can be used in EIP are shown in FIG. 7; the reference region shapes that can be used are shown in FIG. 8, and there can also be three. Optionally, the size of the reference region depends on min(blockWidth, blockHeight) and the selected filter template shape. For example, if the size of the current block is 8x16 (i.e., blockWidth is 8 and blockHeight is 16), and the selected filter template shape is 4x4, then the aboveSize of the reference region is equal to min(8, 16)+4-1=11, and the leftSize of the reference region is equal to min(8, 16)+4-1=11.
[0066] After obtaining the EIP filter template shape and the corresponding filter coefficients, the prediction pixels generated based on the EIP mode can be constructed in a certain scanning order in the current block, one position at a time, until the prediction values of all pixels are generated. FIG. 9 shows a schematic diagram of generating prediction pixels in a diagonal scanning order. Alternatively, the formula for generating the prediction value of a pixel at a certain position in the current block can be as follows:
[0067] wherein pred (x,y) represents the prediction pixel value at the coordinate position (x, y) in the current block; c i represents the filter coefficient in the filter shape, and there are 15 filter coefficients for the filter template shape shown in FIG. 7; represents the reconstructed pixel or prediction pixel value in the filter template (if the position of the reconstructed pixel has not been obtained, the prediction pixel value can be used); offsetX i and offsetY i respectively represent the position offset in the x and y directions to the current position (x, y).
[0068] As can be known from the above description, for the current block using the EIP mode, the filter coefficients are derived using the pixels in the reference region adjacent to the current block, which leads to a decrease in the prediction effect as the pixels in the current block move away from the reference region, which has a more significant impact on the region to the right / below of the current block, and further affects the accuracy of the intra prediction and reduces the coding efficiency. Based on this, in the technical solution proposed in the embodiments of the present application, for the current block using the intra prediction mode based on the extrapolation filter, the filter coefficient compensation value can be used to adjust the reference region filter coefficients corresponding to the current block, the reference region filter coefficients corresponding to the current block are optimized, and thus the accuracy of the intra prediction can be improved, which is conducive to improving the video coding efficiency.
[0069] The implementation details of the technical solution of the embodiments of the present application are described in detail as follows:
[0070] FIG. 10 shows a flowchart of a video decoding method according to an embodiment of the present application, which can be executed by a device with a computing processing function, such as a terminal device or a server. Referring to FIG. 10, the video decoding method includes at least S1010 to S1050, which are described in detail as follows:
[0071] In S1010, an encoded video bitstream is obtained.
[0072] In S1020, filter coefficients of the current block are obtained, the filter coefficients being used for an extrapolation filter-based intra prediction mode. In other words, for the current block using the extrapolation filter-based intra prediction mode, the filter coefficients of the current block are obtained.
[0073] In the extrapolation filter-based intra prediction (EIP) mode, a filter is used to predict a pixel value (i.e., a predicted pixel value) of a pixel in the current block. The filter in the EIP mode includes a plurality of input positions and one output position. The filter coefficients of the filter are used to weight and combine the reconstructed pixel values (if not reconstructed, the predicted pixel values are used to replace the reconstructed pixel values) of the plurality of input positions to determine the predicted pixel value of the output position. For example, each filled block in FIG. 7 corresponds to an input position, and each unfilled block corresponds to an output position. In some alternative embodiments, a video includes a sequence of video image frames, and the sequence of video image frames includes a series of images, each of which can be further divided into slices, and each slice can be further divided into a series of LCUs (or CTUs), and each LCU includes a plurality of CUs. The video image frames are encoded in units of blocks. In some new video encoding standards, such as the H.264 standard, a macroblock (MB) is used, and the macroblock can be further divided into a plurality of prediction blocks (PBs) for prediction encoding. In the HEVC standard, a CU, a prediction unit (PU), and a transform unit (TU) are used to divide the blocks into a plurality of block units in terms of functions, and a new tree-based structure is used for description. For example, a CU can be divided into smaller CUs according to a quadtree, and the smaller CUs can be further divided, thereby forming a quadtree structure. In the embodiments of the present application, the current block, the reference block, and the neighboring block can be a CU or a smaller block than the CU, such as a smaller block obtained by dividing the CU.
[0074] In some alternative embodiments, when the filter coefficients of the current block are obtained, the filter coefficients of the decoded block can be used as the filter coefficients of the current block, that is, the filter coefficients of the current block can be obtained by inheriting the filter coefficients of the decoded block.
[0075] In some alternative embodiments, when the filter coefficients of the current block are obtained, the filter coefficients of the current block can be determined according to the reconstructed pixels or the predicted pixels in the neighboring reference region of the current block.
[0076] In some embodiments, the reference region can include at least one of a neighboring region left of the current block and a neighboring region above the current block. The shape of the reference region can be one of the three shapes of the reference regions in FIG. 8, for example. The size of the reference region depends on min(blockWidth, blockHeight) and the shape of the selected filter. The shape of the filter can be rectangular. The shape of the filter can be one of the three filter templates shown in FIG. 7, for example. For example, if the size of the current block is 8x16 (i.e., blockWidth is 8 and blockHeight is 16) and the shape of the selected filter is 4x4, then the aboveSize of the reference region is equal to min(8, 16) + 4 - 1 = 11 and the leftSize of the reference region is equal to min(8, 16) + 4 - 1 = 11.
[0077] In some embodiments, to determine the filter coefficients in the EIP, embodiments of the present application first select the shape of the reference region and the filter according to relevant syntax elements from the video bitstream. Here, the relevant syntax elements can indicate the type of the reference region and indicate the shape of the filter. For example, a first syntax element indicates the type of the reference region and a second syntax element indicates the shape of the filter.
[0078] Then, embodiments of the present application use the selected filter to construct an autocorrelation matrix and a cross-correlation vector by sliding horizontally or vertically in the selected reference region, and then calculate the filter coefficients based on the autocorrelation matrix and the cross-correlation vector. For example, the filter coefficients can be calculated according to the following Wiener-Hopf equation:
[0079] R1 · w1 = p1
[0080] where R1 represents the autocorrelation matrix of the reconstructed pixel values of the reference sub-block, p1 represents the cross-correlation vector of the reconstructed pixel values of the reference sub-block and the target pixel value, and w1 represents the filter coefficients to be solved. Embodiments of the present application can determine the filter coefficients by minimizing the mean square value (MSE) of the prediction error based on the autocorrelation matrix of the reconstructed pixel values of the reference sub-block and the cross-correlation vector. Wherein, for each sliding position in the sliding process, the reconstructed pixel values of the reference sub-block of the filter (i.e., the block composed of the pixels of the multiple input positions of the filter) and the target pixel value (i.e., the reconstructed pixel value of the output position of the filter) can be determined.
[0081] In S1030, a compensation value for the filter coefficients is decoded from the video bitstream.
[0082] In some optional embodiments, the process of decoding the compensation value of the filter coefficient from the video bitstream can be: decoding the absolute value and the sign corresponding to the compensation value from the video bitstream, and then determining the filter coefficient compensation value according to the absolute value and the sign.
[0083] In some optional embodiments, the absolute value corresponding to the filter coefficient compensation value can be entropy encoded using context-based adaptive binary arithmetic coding. For example, in a sequence of absolute values corresponding to multiple filter coefficients, the value of the i th bit in the bit string used to represent an absolute value in the sequence can be used as the context for the value of the i th bit in the bit string used to represent the adjacent next absolute value in the sequence; where i is less than or equal to the length of the bit string used to represent the absolute value. The technical solution of this embodiment can use the correlation between the absolute values to improve the coding efficiency.
[0084] In some optional embodiments, the process of decoding the compensation value of the filter coefficient from the video bitstream can be: decoding the index of the compensation value from the video bitstream, and then determining the compensation value from a predetermined compensation value list according to the index. Optionally, the predetermined compensation value list can only contain the absolute values of the compensation values, and the signs need to be indicated separately; or the predetermined compensation value list can contain both the absolute values of the compensation values and the signs of the compensation values.
[0085] In S1040, an adjusted filter coefficient is generated based on the compensation value and the filter coefficient.
[0086] In S1050, the current block is predicted using the adjusted filter coefficient.
[0087] In summary, for the current block using the EIP mode, the filter coefficient used to derive is the pixel in the reference region adjacent to the current block, which leads to the prediction effect to decline as the pixel in the current block moves away from the reference region, which has a more significant impact on the area to the right / below of the current block, and further affects the accuracy of the intra prediction, thereby reducing the coding efficiency. Based on this, in the technical solution proposed in the embodiments of the present application, for the current block using the intra prediction mode based on the extrapolation filter, the filter coefficient compensation value can be used to adjust the reference region filter coefficient corresponding to the current block, thereby optimizing the reference region filter coefficient corresponding to the current block, and further improving the accuracy of the intra prediction, which is conducive to improving the video coding efficiency. In some optional embodiments: the process of generating an adjusted filter coefficient based on the compensation value and the filter coefficient can be: adjusting the filter coefficient using the compensation value to obtain the adjusted filter coefficient. In this case, the adjusted filter coefficient can be used for intra prediction processing on the specified area in the current block.
[0088] In some embodiments, step S1050 can generate the prediction value of the pixel at each position in the current block according to the following manner:
[0089] wherein pred (x,y) represents the prediction value of the pixel at coordinate position (x, y) in the current block; c i represents the adjusted filter coefficient in the filter shape. For the filter template shape shown in FIG. 7, there are 15 filter coefficients in total. represents the reconstructed pixel value or the prediction value of the pixel at the input position in the filter template (if the reconstructed pixel value at the position has not been obtained, the prediction value of the pixel can be used instead of the reconstructed pixel value); offsetX i and offsetY i respectively represent the position offset in x and y directions to the current position (x, y).
[0090] Optionally, the specified region in the current block can be the entire region in the current block, or can be a partial region in the current block. If the specified region is a partial region in the current block, the intra prediction processing can be performed on the other regions in the current block except the specified region using the reference region filter coefficients (i.e. the unadjusted filter coefficients) corresponding to the current block.
[0091] In one specific example, the specified region can include the region in the current block except the top M rows and the left N columns; wherein 0≤M
[0092] It is to be noted that if M is 0 and N is not 0, it means that the specified region can be the region in the current block except the left N columns; if M is not 0 and N is 0, it means that the specified region can be the region in the current block except the top M rows.
[0093] In one specific example, the specified region can include the region in the current block except the top H / T rows and the left W / S columns; wherein H represents the total number of rows in the current block; W represents the total number of columns in the current block; and T and S represent positive integer powers of 2. For example, in the example shown in FIG. 12, the specified region is the non-filled region in the figure, and H=W=6 and T=S=2, i.e. 1 power of 2.
[0094] It is to be noted that the specified region can also include only the region in the current block except the top H / T rows; or the specified region can also include only the region in the current block except the left W / S columns.
[0095] In one specific example, the specified region can include a bottom-right corner region of the current block divided in a direction from the top-right corner to the bottom-left corner. Optionally, the bottom-right corner region of the current block divided in the direction from the top-right corner to the bottom-left corner can have the same area as the top-left corner region or can have a different area. For example, in the example shown in FIG. 13, the specified region is the non-filled region in the figure.
[0096] It should be noted that in other embodiments of the present application, the specified region can also be a combination of the regions shown in the above embodiments. In the embodiments of the present application, the specified region is arranged as much as possible in the right lower side, right side or lower side of the current block, mainly considering that the pixel points close to the right side and lower side of the current block are far away from the reference region of the current block, which can cause the prediction effect to decrease as the pixels in the current block are far away from the reference region, and further affect the accuracy of the intra prediction. By optimizing the filter coefficient of the reference region corresponding to the specified region, these problems can be avoided to ensure the accuracy of the intra prediction.
[0097] In some optional embodiments, for S1040 and S1050 shown in FIG. 10, there can be other implementation manners, specifically, when the adjusted filter coefficient is generated based on the compensation value and the filter coefficient, the filter coefficient can be used to perform intra prediction on other regions in the current block except the specified region to obtain the predicted pixels in the other regions, and then the filter coefficient of the specified region is determined based on the reconstructed pixels in the other regions. For example, the reconstructed pixels in the other regions are used as the pixels in the reference region corresponding to the specified region, the filter coefficient corresponding to the specified region is determined, and then the compensation value is used to adjust the filter coefficient corresponding to the specified region to obtain the adjusted filter coefficient. Here, the manner of determining the filter coefficient is consistent with the manner of determining the filter coefficient by the Wiener equation. That is, in this embodiment, the filter coefficient of the reference region corresponding to the current block can be used to perform intra prediction on other regions except the specified region, and after the reconstructed pixels are obtained, the filter coefficient of the specified region in the current block can be determined by using the scheme introduced in the foregoing embodiments, so that the filter coefficient of the specified region can be more suitable for the pixel points in the specified region, and then after the compensation value is used to adjust the filter coefficient of the reference region corresponding to the specified region, the adjusted filter coefficient can be used to perform intra prediction on the specified region. FIG. 14 shows the specific process of this embodiment, including S1410 to S1470.
[0098] In S1410, the encoded video bitstream is obtained.
[0099] In S1420, the filter coefficient of the current block is obtained, and the filter coefficient is used for an intra prediction mode based on an extrapolation filter.
[0100] Optionally, the implementation details of S1420 can refer to the description of S1020 in the foregoing embodiments, and will not be described herein.
[0101] In S1430, a compensation value of the filter coefficient is decoded from the video bitstream.
[0102] Optionally, the implementation details of S1430 can refer to the description of S1030 in the foregoing embodiments, and will not be described herein.
[0103] In S1440, the filter coefficient is used to perform intra prediction on other regions in the current block except the specified region, to obtain reconstructed pixels in the other regions.
[0104] Optionally, the specified region can also be the various regions shown in the foregoing embodiments, such as the regions shown in FIGS. 11-13. In this embodiment, the reference region filter coefficient corresponding to the obtained current block can be used only to perform intra prediction on other regions in the current block except the specified region.
[0105] In S1450, the filter coefficient of the specified region is determined based on the reconstructed pixels in the other regions.
[0106] Optionally, the filter coefficient of the specified region in the current block can be determined by using the schemes described in the foregoing embodiments.
[0107] In S1460, the filter coefficient of the specified region is adjusted using the compensation value, to obtain an adjusted filter coefficient of the specified region.
[0108] In S1470, the specified region is predicted using the adjusted filter coefficient.
[0109] As can be seen, in the embodiment shown in FIG. 14, the filter coefficient of the current block can be used to perform prediction on a part of the regions in the current block, and then the filter coefficient of the specified region is re-determined based on the prediction result, so that the filter coefficient of the specified region can be more suitable for the pixels in the specified region, and then after the filter coefficient of the specified region is adjusted using the compensation value, the specified region can be predicted using the adjusted filter coefficient. In this way, the filter coefficient of the specified region can be optimized, and the accuracy of the intra prediction can also be improved.
[0110] It should be noted that the execution order of the steps shown in FIGS. 10 and 14 is only an example, and in other embodiments of the present application, the execution order between these steps can be changed, for example, S1430 can also be performed after S1440, or can be performed after S1450.
[0111] FIG. 10 and FIG. 14 are illustrations of the technical solutions of the embodiments of the present application from the perspective of video decoding, and the technical solutions of the embodiments of the present application are illustrated again from the perspective of video encoding in the following in combination with FIG. 15.
[0112] FIG. 15 shows a flowchart of a video encoding method according to one embodiment of the present application, which can be executed by a device with a computing processing function, such as a terminal device or a server. Referring to FIG. 15, the video encoding method at least includes S1510 to S1540, which are described in detail as follows:
[0113] In S1510, filter coefficients of a current block and a compensation value for the filter coefficients are obtained, the filter coefficients being used for an extrapolation filter based intra prediction mode. In other words, for a current block using an extrapolation filter based intra prediction mode, the filter coefficients of the current block and the compensation value for the filter coefficients are obtained.
[0114] In S1520, adjusted filter coefficients are generated based on the compensation value and the filter coefficients.
[0115] In S1530, the current block is intra predicted using the adjusted filter coefficients.
[0116] In S1540, the compensation value is encoded into a video bitstream.
[0117] It should be noted that the processing process at the video encoding end is similar to the processing process at the video decoding end, and details can be referred to the aforementioned processing process at the decoding end, which will not be described herein.
[0118] In summary, the technical solutions of the embodiments of the present application can improve the prediction accuracy of the EIP mode by optimizing the filter coefficient value of the EIP mode, so as to reduce the prediction residual of the overall block, and thus improve the coding efficiency. Specifically, the actual filter coefficient used by the reference region of the current block can be represented as c i_final The filter coefficient of the current block determined based on the reconstructed pixels or inherited can be represented as c i_derived The compensation value for the filter coefficient can be represented as c i_delta Then, c i_final = c i_derived + c i_delta .
[0119] In some optional embodiments, at the encoding end, c i_final can be derived by referring to the true value of the pixel point in the reference region, or can also be obtained by inheriting the filter coefficient of the encoded block.
[0120] In some embodiments, the actual filter coefficients used by the reference region of the current block are obtained in the following way:
[0121] To determine the actual filter coefficients used by the reference region, embodiments of the present application use the selected filter to slide horizontally or vertically in the reference region to construct an autocorrelation matrix and a cross-correlation vector, and then calculate the filter coefficients based on the autocorrelation matrix and the cross-correlation vector. For example, the filter coefficients can be calculated according to the following Wiener-Hopf equation:
[0122] R2·w2=p2
[0123] wherein R2 represents the autocorrelation matrix of the true pixel values of the reference sub-block, p represents the cross-correlation vector of the true pixel values of the reference sub-block and the true pixel value of the target pixel, and w represents the filter coefficients to be solved. Embodiments of the present application can determine the filter coefficients by minimizing the mean square value (MSE) of the prediction error based on the autocorrelation matrix and the cross-correlation vector. Wherein for each sliding position in the sliding process, the true pixel values of the reference sub-block of the filter (i.e. the block composed of the pixels of the multiple input positions of the filter) and the target pixel (i.e. the pixel of the output position of the filter) can be determined.
[0124] In some embodiments, c i_derived is determined in the following way:
[0125] R1·w1=p1
[0126] wherein R1 represents the autocorrelation matrix of the reconstructed pixel values of the reference sub-block, p1 represents the cross-correlation vector of the reconstructed pixel values of the reference sub-block and the target pixel value, and w1 represents the filter coefficients to be solved. Embodiments of the present application can determine the filter coefficients by minimizing the mean square value (MSE) of the prediction error based on the autocorrelation matrix of the reconstructed pixel values of the reference sub-block and the cross-correlation vector. Wherein for each sliding position in the sliding process, the reconstructed pixel values of the reference sub-block of the filter (i.e. the block composed of the pixels of the multiple input positions of the filter) and the target pixel value (i.e. the reconstructed pixel value of the output position of the filter) can be determined.
[0127] After determining the actual filter coefficients used by the reference region of the current block and the filter coefficients of the current block at the encoding side, the compensation value can be determined by calculating the difference between the two. It should be noted that the adjusted filter coefficients obtained at the decoding side can be used to represent the actual filter coefficients used by the reference region of the current block.
[0128] Optionally, when it is necessary to indicate c i_deltaWhen the absolute value is in the range of [0, 0.5], the quantization can be used to identify the absolute value with a fixed bit length. For example, a fixed 4-bit length is used to identify the absolute value in the range of [0, 0.5], and a 1-bit is used to indicate the sign.
[0129] Optionally, for c i_delta When the absolute value is represented by a binary bit string, the i-th bit (i = 1, 2,...) in the bit string can be designed by a CABAC context model. For example, the previous c i_delta The i-th bit in the bit string of the absolute value can be used as the current c i_delta The i-th bit in the bit string of the absolute value can be used as the current c
[0130] Optionally, when c i_delta is needed to be indicated, a look-up table can be used, and then an index is added in the code stream to indicate the c
[0131] Table 1
[0132] In Table 1, the c i_delta with the sign can be indicated by an index.
[0133] Table 2
[0134] In Table 2, the c i_delta without the sign can be indicated by an index, and the sign can be indicated separately.
[0135] In some optional embodiments, the actual filter coefficient c i_final used by the reference region of the current block using the EIP mode can be used as the filter coefficient to act on all pixels of the current block. Or act on part of the pixels of the current block. For example, the current block can be divided into two regions, and only the pixels in one region are predicted by the EIP mode using the c i_final coefficient; the pixels in the other region are still predicted by the EIP mode using the c i_derived coefficient.
[0136] Optionally, for the first M rows and the first N columns of pixels of the current block (as the filled region in FIG. 11), the c i_derived coefficient is used to predict the EIP mode; the remaining pixels (as the non-filled region in FIG. 11) use the c i_final coefficient to predict the EIP mode. M and N are positive integers, and 0≤M≤H; 0≤N≤W.
[0137] Optionally, for the first H / T rows and the first W / S columns of the current block (W columns x H rows) (as the filled region in FIG. 12), c i_derived is used for EIP mode prediction; and the rest of the pixels (as the non-filled region in FIG. 12) use c i_final for EIP mode prediction. T and S are positive integer powers of 2, i.e., 2, 4, 8, etc.
[0138] Optionally, for the current block (W columns x H rows), a split from the top-right to the bottom-left is performed, resulting in a top-left region (as the filled region in FIG. 13) and a bottom-right region (as the non-filled region in FIG. 13), which can or can not have the same area. The top-left region uses c i_derived for EIP mode prediction; and the rest of the pixels use c i_final for EIP mode prediction.
[0139] In some optional embodiments, the current block can be divided into 2 regions, c i_derived is used for EIP mode prediction on the pixels in the first region, and then the filter coefficients are derived based on the reconstructed pixels in the first region, and the actual filter coefficients c i_delta are obtained by adjusting c i_final , and c i_final is used as the filter coefficients for the pixels in the second region.
[0140] Optionally, for the first M rows and the first N columns of the current block (W columns x H rows) (as the filled region in FIG. 11), c i_derived is used for EIP mode prediction; and the rest of the pixels (as the non-filled region in FIG. 11) use c i_final for EIP mode prediction. M and N are positive integers, and 0≤M≤H; 0≤N≤W.
[0141] Optionally, for the first H / T rows and the first W / S columns of the current block (W columns x H rows) (as the filled region in FIG. 12), c i_derived is used for EIP mode prediction; and the rest of the pixels (as the non-filled region in FIG. 12) use c i_final for EIP mode prediction. T and S are positive integer powers of 2, i.e., 2, 4, 8, etc.
[0142] Optionally, for the current block (W columns x H rows), a split from the top-right to the bottom-left is performed, resulting in a top-left region (as the filled region in FIG. 13) and a bottom-right region (as the non-filled region in FIG. 13), which can or can not have the same area. The top-left region uses c i_derivedcoefficients are predicted using EIP mode; the rest of the pixels use c i_final coefficients are predicted using EIP mode.
[0143] The device embodiments of the present application are described below, which can be used to perform the methods described in the above embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the above method embodiments of the present application.
[0144] FIG. 16 shows a block diagram of a video decoding device according to an embodiment of the present application, which can be arranged in a device with computing processing function, such as a terminal device or a server.
[0145] Referring to FIG. 16, a video decoding device 1600 according to an embodiment of the present application includes an obtaining unit 1602, a decoding unit 1604, a generating unit 1606, and a processing unit 1608.
[0146] The obtaining unit 1602 is configured to obtain a coded video bitstream, and obtain filter coefficients of a current block, the filter coefficients being used for an intra prediction mode based on an extrapolation filter. The decoding unit 1604 is configured to decode a compensation value of the filter coefficients from the video bitstream. The generating unit 1606 is configured to generate adjusted filter coefficients based on the compensation value and the filter coefficients. The processing unit 1608 is configured to predict the current block using the adjusted filter coefficients.
[0147] In some embodiments of the present application, based on the foregoing scheme, the decoding unit 1604 is configured to decode an absolute value and a sign corresponding to the compensation value from the video bitstream, and determine the compensation value according to the absolute value and the sign.
[0148] In some embodiments of the present application, based on the foregoing scheme, the absolute value is entropy encoded using context-based adaptive binary arithmetic coding. In a sequence of absolute values corresponding to a plurality of filter coefficients, a value of an i-th bit in a bit string used to represent one absolute value in the sequence can be used as a context for a value of an i-th bit in a bit string used to represent a neighboring next absolute value in the sequence; i is less than or equal to a length of the bit string used to represent the absolute value.
[0149] In some embodiments of the present application, based on the foregoing scheme, the decoding unit 1604 is configured to decode an index of the compensation value from the video bitstream, and determine the compensation value from a predetermined compensation value list according to the index.
[0150] In some embodiments of the present application, based on the foregoing scheme, the generating unit 1606 is configured to adjust the filter coefficients using the compensation value to obtain adjusted filter coefficients; and the processing unit 1608 is configured to predict the specified region in the current block using the adjusted filter coefficients.
[0151] In some embodiments of the present application, based on the foregoing scheme, the processing unit 1608 is further configured to, if the specified region is a partial region in the current block, predict other regions in the current block except the specified region using filter coefficients of the current block.
[0152] In some embodiments of the present application, based on the foregoing scheme, the generating unit 1606 is configured to use the filter coefficients to perform intra prediction on other regions in the current block except a specified region to obtain reconstructed pixels in the other regions; determine filter coefficients of the specified region based on the reconstructed pixels in the other regions; adjust the filter coefficients of the specified region using the compensation value to obtain adjusted filter coefficients of the specified region; and predict the current block using the adjusted filter coefficients, including predicting the specified region using the adjusted filter coefficients.
[0153] In some embodiments of the present application, based on the foregoing scheme, the specified region includes a region in the current block except the top M rows and the left N columns; and 0≤M
[0154] In some embodiments of the present application, based on the foregoing scheme, the specified region includes a region in the current block except the top H / T rows and the left W / S columns; H represents the total number of rows of the current block; W represents the total number of columns of the current block; and T and S represent positive integer powers of 2.
[0155] In some embodiments of the present application, based on the foregoing scheme, the specified region includes a lower-right corner region obtained by dividing the current block in a direction from the upper right to the lower left.
[0156] In some embodiments of the present application, based on the foregoing scheme, the obtaining unit 1602 is configured to determine the filter coefficients of the current block according to reconstructed pixels or predicted pixels in a reference region adjacent to the current block; or use filter coefficients of a decoded block as the filter coefficients of the current block.
[0157] FIG. 17 shows a block diagram of a video encoding apparatus according to an embodiment of the present application, which can be arranged in a device with computing processing function, such as a terminal device or a server.
[0158] Referring to FIG. 17, a video encoding apparatus 1700 according to an embodiment of the present application includes an obtaining unit 1702, a generating unit 1704 and a processing unit 1706.
[0159] The obtaining unit 1702 is configured to obtain filter coefficients of a current block and a compensation value for the filter coefficients, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; the generating unit 1704 is configured to generate adjusted filter coefficients based on the compensation value and the filter coefficients; the processing unit 1706 is configured to perform intra prediction on the current block using the adjusted filter coefficients; and encode the compensation value into a video bitstream.
[0160] FIG. 18 shows a structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application, which can be the video encoding apparatus or the video decoding apparatus in the foregoing embodiments.
[0161] It should be noted that the computer system 1800 of the electronic device shown in FIG. 18 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0162] As shown in FIG. 18, the computer system 1800 can include a central processing unit (CPU) 1801, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1802 or programs loaded from a storage portion 1808 into a random access memory (RAM) 1803, such as performing the methods described in the foregoing embodiments. Various programs and data required for system operation are also stored in the RAM 1803. The CPU 1801, the ROM 1802 and the RAM 1803 are connected to each other through a bus 1804. An input / output (I / O) interface 1805 is also connected to the bus 1804.
[0163] The following components can be connected to the I / O interface 1805: an input part 1806 including a keyboard, a mouse, etc.; an output part 1807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage part 1808 including a hard disk, etc.; and a communication part 1809 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to the I / O interface 1805 as necessary. A removable media 1811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1810 as necessary, so that a computer program read therefrom is installed in the storage part 1808 as necessary.
[0164] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program for performing the methods illustrated by the flowcharts carried on a computer readable medium. In such embodiments, the computer program can be downloaded and installed from a network via the communication part 1809, and / or installed from the removable media 1811. When the computer program is executed by the central processing unit (CPU) 1801, various functions defined in the system of the present application are performed.
[0165] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a computer program that can be used by or in conjunction with an instruction execution system, device or apparatus. In this application, the computer-readable signal medium can include a data signal carrying computer-readable computer programs in a baseband or as a part of a carrier wave. Such a propagated data signal can take on various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium that can transmit, propagate or transport a program for use by or in connection with an instruction execution system, device or apparatus. The computer program contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.
[0166] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In the flowcharts or block diagrams, each block can represent a module, a program segment or a part of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer programs.
[0167] The units described in the embodiments of the present application can be implemented by software, or can be implemented by hardware, and the units described can also be arranged in a processor. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0168] As another aspect, the present application also provides a computer readable medium, which can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device. The computer readable medium carries one or more computer programs, which, when executed by the electronic device, enable the electronic device to implement the method described in the above embodiments.
[0169] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into several modules or units.
[0170] From the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes several instructions to enable an electronic device to perform the method according to the embodiments of the present application.
[0171] For example, the electronic device can be a video decoding apparatus, which can perform the video decoding method shown in FIG. 10 or FIG. 14; for another example, the electronic device can be a video encoding apparatus, which can perform the video encoding method shown in FIG. 15.
[0172] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains.
[0173] It is to be understood that the application is not limited to the precise construction already described above and shown in the drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application should only be limited by the claims appended hereto.
Claims
1. A method of video decoding, performed in an electronic device, the method comprising: obtaining a coded video bitstream; obtaining filter coefficients of a current block, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; decoding a compensation value for the filter coefficients from the video bitstream; generating adjusted filter coefficients based on the compensation value and the filter coefficients; predicting the current block using the adjusted filter coefficients.
2. The video decoding method of claim 1, wherein, The decoding of the compensation value for the filter coefficients from the video bitstream comprises: decoding an absolute value and a sign corresponding to the compensation value from the video bitstream; determining the compensation value according to the absolute value and the sign.
3. The video decoding method of claim 2, wherein, The absolute value is entropy coded using context-based adaptive binary arithmetic coding.
4. The video decoding method of any of claims 1-3, wherein, The decoding of the compensation value for the filter coefficients from the video bitstream comprises: decoding an index of the compensation value from the video bitstream; determining the compensation value from a predetermined list of compensation values according to the index.
5. The video decoding method of any of claims 1-4, wherein, The generating of the adjusted filter coefficients based on the compensation value and the filter coefficients comprises adjusting the filter coefficients using the compensation value to obtain the adjusted filter coefficients. The predicting of the current block using the adjusted filter coefficients comprises predicting a specified region in the current block using the adjusted filter coefficients.
6. The video decoding method of claim 5, wherein, If the specified region is a partial region in the current block, the method further comprises: predicting other regions in the current block except the specified region using the filter coefficients of the current block.
7. The video decoding method of any of claims 1-6, wherein, The generating of the adjusted filter coefficients based on the compensation value and the filter coefficients comprises: performing intra prediction on other regions in the current block except the specified region using the filter coefficients to obtain reconstructed pixels in the other regions; determining the filter coefficients of the specified region based on the reconstructed pixels in the other regions; adjusting the filter coefficients of the specified region using the compensation value to obtain adjusted filter coefficients of the specified region; The predicting of the current block using the adjusted filter coefficients comprises predicting the specified region using the adjusted filter coefficients.
8. The video decoding method of any of claims 5-7, wherein, The specified region comprises a region in the current block except top M rows and left N columns. 0≤M 9. The video decoding method of any of claims 5-7, wherein, The specified region comprises a region in the current block except top H / T rows and left W / S columns. H represents a total number of rows of the current block; W represents a total number of columns of the current block; T and S represent positive integer powers of 2.
10. The video decoding method of any of claims 5-7, wherein, The specified region comprises a bottom-right corner region obtained by dividing the current block in a direction from top-right to bottom-left.
11. The video decoding method of any of claims 1-10, wherein, The obtaining of the filter coefficients of the current block comprises: determining the filter coefficients of the current block according to reconstructed pixels or predicted pixels in a reference region adjacent to the current block; or use filter coefficients of a decoded block as filter coefficients of the current block.
12. A video encoding method, implemented in an electronic device, comprising: obtaining filter coefficients of a current block and a compensation value for the filter coefficients, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; generating adjusted filter coefficients based on the compensation value and the filter coefficients; performing intra prediction on the current block using the adjusted filter coefficients; encoding the compensation value into a video bitstream.
13. A video decoding apparatus, comprising: an obtaining unit configured to obtain an encoded video bitstream; obtaining filter coefficients of a current block, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; a decoding unit configured to decode a compensation value for the filter coefficients from the video bitstream; a generating unit configured to generate adjusted filter coefficients based on the compensation value and the filter coefficients; a processing unit configured to predict the current block using the adjusted filter coefficients.
14. A video encoding apparatus, comprising: comprising: an obtaining unit configured to obtain filter coefficients of a current block and a compensation value for the filter coefficients, the filter coefficients being used for an intra prediction mode based on an extrapolation filter; a generating unit configured to generate adjusted filter coefficients based on the compensation value and the filter coefficients; a processing unit configured to perform intra prediction on the current block using the adjusted filter coefficients; and encode the compensation value into a video bitstream.
15. A computer readable medium having stored thereon a computer program, wherein, the computer program, when executed by a processor, implements the video decoding method of any one of claims 1 to 11; or the video encoding method of claim 12.
16. An electronic device, comprising: comprising: one or more processors; a memory for storing one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the video decoding method of any one of claims 1 to 11; or the video encoding method of claim 12.
17. A computer program product, wherein, the computer program product comprises a computer program stored in a computer readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer readable storage medium, so that the electronic device executes the video decoding method of any one of claims 1 to 11; or the video encoding method of claim 12. the computer program product comprises a computer program stored in a computer readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer readable storage medium, so that the electronic device executes the video decoding method of any one of claims 1 to 11; or the video encoding method of claim 12.
Citation Information
Patent Citations
Method and device for motion compensated temporal filter
CN101662678A
Filtering method for intra-frame prediction, filter and device
CN111787334A
Adaptive filter intra prediction modes in image / video compression
CN113491129A
Video encoding and decoding method and device
CN117499643A
Filter apparatus and methods
WO2018134362A1