Video encoding method and apparatus, video decoding method and apparatus, and computer-readable medium

By adjusting the pixel extension regions of adjacent blocks at the boundaries of intra-frame prediction and inter-frame prediction, the problem of discontinuous boundary pixels is solved, thus improving the visual quality of the image.

WO2026026351A1PCT designated stage Publication Date: 2026-02-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/104232
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-31
Filing Date
2025-06-27
Publication Date
2026-02-05

AI Technical Summary

Technical Problem

Discontinuities can easily occur at the boundary pixels between intra-frame prediction and inter-frame prediction, leading to a decrease in image visual quality.

Method used

By obtaining the boundary extension region of adjacent blocks, the boundary pixel value of the current block is adjusted using the pixel value within the pixel extension region to generate the adjusted pixel value to achieve a smooth transition.

Benefits of technology

It improves the boundary pixel continuity between intra-frame prediction and inter-frame prediction, thereby enhancing the visual quality of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025104232_05022026_PF_FP_ABST
    Figure CN2025104232_05022026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a video encoding method and apparatus, a video decoding method and apparatus, a computer-readable medium, and an electronic device. The video decoding method comprises: acquiring a prediction mode used by a current block and a target block adjacent thereto; if one of the current block and the target block uses an intra prediction mode and the other uses an inter prediction mode, acquiring a boundary extension region of the target block, wherein the boundary extension region comprises a set of M rows and / or N columns of pixels extending from the boundary between the target block and the current block into the current block, M and N being positive integers; on the basis of pixel values in the boundary extension region, adjusting the pixel values near the boundary within the current block to obtain adjusted pixel values; and on the basis of the adjusted pixel values, generating decoded data corresponding to the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video coding method and device, and computer readable medium

[0001] This application claims priority to the Chinese patent application No. 202411052948.1, filed on July 31, 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 computer and communication technology, in particular, to a video coding method, device and computer readable medium. BACKGROUND

[0003] In the field of video coding, the intra prediction mode is based on the correlation of pixels in the spatial domain of a video image, and the prediction value of the current coding block is derived from the adjacent coded region; the inter prediction mode is to use the pixels of the adjacent coded image to predict the pixels of the current image, to achieve the purpose of effectively removing the temporal redundancy of the video.

[0004] TECHNICAL CONTENT

[0005] Embodiments of the present application provide a video coding method, device and computer readable medium, which solve the problem that the boundary pixels of intra prediction and inter prediction are prone to discontinuity, improve the continuity of the boundary pixels of intra prediction and inter prediction, and further improve the image visual quality.

[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] The embodiments of the present application provide a video decoding method, comprising: obtaining a prediction mode of a current block and a target block adjacent to the current block; if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtaining a boundary extension region of the target block, the boundary extension region comprising a set of M rows and / or N columns of pixels extended from a boundary of the target block to the current block, M and N being positive integers; adjusting a pixel value close to the boundary position in the current block according to a pixel value in the pixel extension region to obtain an adjusted pixel value; and generating decoding data corresponding to the current block based on the adjusted pixel value.

[0008] The embodiment of the present application provides a video coding method, comprising: obtaining prediction modes adopted by a current block and a target block adjacent to the current block; if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtaining a boundary extension region of the target block, the boundary extension region comprising a set of M rows and / or N columns of pixels of the target block and the current block boundary extending into the current block, M and N being positive integers; adjusting pixel values close to the boundary position in the current block according to pixel values in the pixel extension region to obtain adjusted pixel values; and performing coding processing on the current block based on the adjusted pixel values.

[0009] The embodiment of the present application provides a video decoding device, comprising: a prediction mode obtaining unit configured to obtain prediction modes adopted by a current block and a target block adjacent to the current block; an extension region obtaining unit configured to, if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtain a boundary extension region of the target block, the boundary extension region comprising a set of M rows and / or N columns of pixels of the target block and the current block boundary extending into the current block, M and N being positive integers; an adjusting unit configured to adjust pixel values close to the boundary position in the current block according to pixel values in the pixel extension region to obtain adjusted pixel values; and a processing unit configured to generate decoding data corresponding to the current block based on the adjusted pixel values.

[0010] The embodiment of the present application provides a video decoding device, comprising: a prediction mode obtaining unit configured to obtain prediction modes adopted by a current block and a target block adjacent to the current block; an extension region obtaining unit configured to, if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtain a boundary extension region of the target block, the boundary extension region comprising a set of M rows and / or N columns of pixels of the target block and the current block boundary extending into the current block, M and N being positive integers; an adjusting unit configured to adjust pixel values close to the boundary position in the current block according to pixel values in the pixel extension region to obtain adjusted pixel values; and a processing unit configured to generate decoding data corresponding to the current block based on the adjusted pixel values.

[0011] The embodiment of the present application provides a computer readable medium, which stores a computer program and a bitstream, and the computer program is executed by a processor to implement the video coding method to generate the bitstream.

[0012] The embodiment of the present application further provides a method for storing a bitstream, comprising: executing the video coding method to generate the bitstream; and storing the bitstream.

[0013] The embodiments of the present application also provide a method for transmitting a bitstream, comprising: generating the bitstream by performing the video encoding method described above; and transmitting the bitstream.

[0014] The embodiments of the present application provide an electronic device, comprising: one or more processors; a storage device configured to store one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the video decoding method or the video encoding method described above.

[0015] The embodiments of the present application provide a computer program product, which comprises 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 described above.

[0016] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application.

[0017] BRIEF DESCRIPTION OF DRAWINGS

[0018] 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;

[0019] FIG. 2 shows a schematic diagram of the placement of a video encoding device and a video decoding device in a streaming system;

[0020] FIG. 3 shows a basic flowchart of a video encoder;

[0021] FIG. 4 shows a schematic diagram of an angular prediction direction in an intra prediction mode;

[0022] FIG. 5 shows a schematic diagram of intra prediction;

[0023] FIG. 6 shows a schematic diagram of an inter prediction process;

[0024] FIG. 7 shows a schematic diagram of an inter prediction process;

[0025] FIG. 8 shows a flowchart of a video decoding method according to some embodiments of the present application;

[0026] FIG. 9 shows a flowchart of a video encoding method according to some embodiments of the present application;

[0027] FIG. 10 shows a schematic diagram of a boundary extension region according to some embodiments of the present application;

[0028] FIG. 11 shows a schematic diagram of a boundary extension region of an inter prediction mode according to some embodiments of the present application;

[0029] FIG. 12 shows a schematic diagram of a boundary pixel fusion process according to some embodiments of the present application;

[0030] FIG. 13 shows a block diagram of a video decoding apparatus according to some embodiments of the present application;

[0031] FIG. 14 shows a block diagram of a video encoding apparatus according to some embodiments of the present application;

[0032] FIG. 15 shows a structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present application. DETAILED DESCRIPTION

[0033] Example implementations are now described in greater detail with reference to the figures. However, these example implementations are not meant to limit the application in any way and are merely provided as illustrative examples of how the application can be implemented. Rather, the purpose of these implementations is to present a thorough and complete conceptualization of the example implementations, and to fully convey the scope of the example implementations to those skilled in the art.

[0034] Furthermore, the described features, structures, or characteristics 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 application. However, one skilled in the relevant art will recognize that the embodiments can be practiced without the specific details, that numerous options exist, that the described embodiments are but a few illustrative examples of the possible embodiments, and are not intended to limit the scope of the application. Instead, they are provided to give a thorough and complete perception of the embodiments to one skilled in the art.

[0035] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by 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.

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

[0037] The flowcharts shown in the drawings are merely illustrative, and do not necessarily include all content and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further broken down, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to actual conditions.

[0038] It should be noted that "multiple" referred to in this article means two or more. The association relationship of "and / or" describes the associated objects, 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.

[0039] 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.

[0040] As shown in FIG. 1, the system architecture 100 includes a plurality of terminal devices that can communicate with each other via, for example, a network 150. For example, the system architecture 100 can include a first terminal device 110 and a second terminal device 120 interconnected via the network 150. In the embodiment of FIG. 1, the first terminal device 110 and the second terminal device 120 perform unidirectional transmission of data.

[0041] For example, the first terminal device 110 can encode video data (e.g., a stream of video pictures that are captured by the terminal device 110) for communication to the second terminal device 120 via the network 150, the encoded video data being transmitted in the form of one or more coded video bitstreams, the second terminal device 120 can receive the coded video data from the network 150, decode the coded video data to recover the video pictures, and display video pictures according to the recovered video data.

[0042] In some embodiments of the present application, the 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 video conference. For bidirectional transmission of data, each of the third terminal device 130 and the fourth terminal device 140 can code video data (e.g., a stream of video pictures that are captured by the terminal device) for communication to the other of the third terminal device 130 and the fourth terminal device 140 via the network 150. Each of the third terminal device 130 and the fourth terminal device 140 also can receive the coded video data transmitted by the other of the third terminal device 130 and the fourth terminal device 140, and can decode the coded video data to recover the video pictures, and can display video pictures according to the recovered video data on an accessible display device.

[0043] In the embodiment shown in FIG. 1, the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 can be servers or terminals, but the principles of the present disclosure can not be limited thereto.

[0044] The server can be a stand-alone physical server, a server cluster or a 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.

[0045] The network 150 shown in FIG. 1 represents any number of networks that convey coded video data between the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140, including for example wire- 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 disclosure, the architecture and topology of the network 150 can be immaterial to the operation of the disclosed subject matter unless otherwise explained herein.

[0046] In some embodiments of the present disclosure, FIG. 2 shows the placement of video encoding devices 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 compressed video on digital media including CD, DVD, memory stick, and the like.

[0047] A streaming system can include a capture subsystem 213, that can include a video source 201, for example a digital camera, creating a stream of video pictures 202 that are uncompressed. In an embodiment, the stream of video pictures 202 includes samples as they are 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 bold line to emphasize the high data volume of the stream of video pictures 202 that can be processed by the electronic device 220, which includes 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, respectively, of the encoded video data 204. The client subsystem 206 can include a video decoding device 210, for example, in an 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 rendering device. In some streaming systems, the encoded video data 204, 207, and 209 (e.g., video bitstreams) can be encoded according to certain video encoding / compression standards.

[0048] It is noted that the electronic devices 220 and 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.

[0049] In some embodiments of the present application, taking the High Efficiency Video Coding (HEVC) in the international video coding standard, Versatile Video Coding (VVC), and the Chinese national video coding standard AVS as examples, after 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 referred to as 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.

[0050] In other embodiments, this processing unit can also be referred to as 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 sub-blocks. Then the superblock is further divided into one or more blocks (B). Each block is the most basic element in the coding link. In some embodiments, one SB can contain a plurality of B.

[0051] The above division method of the video frame image can be referred to as a block partition structure. Some concepts in the coding process are introduced as follows:

[0052] Predictive coding (Predictive Coding): Predictive coding includes intra prediction and inter prediction, etc. After the original video signal is predicted by the selected reconstructed video signal, a residual video signal is obtained. The encoding end needs to determine which prediction coding mode is selected for the current coding unit (or coding block) and inform the decoding end. Intra prediction refers to that the predicted signal comes from the already coded and reconstructed area in the same image; inter prediction refers to that the predicted signal comes from the already coded other image (referred to as reference image) different from the current image.

[0053] Transform & Quantization: After the residual video signal is transformed by Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT) or other transform operations, the signal is converted into the transform domain, which is called transform coefficient. The transform coefficient is further subjected to a lossy quantization operation, which loses 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 encoding end also needs to select one of them for the current coding unit (or coding block) and inform the decoding end. The degree of quantization precision is usually determined by the quantization parameter (QP). If the QP value is large, the coefficients with larger value range will be quantized to the same output, so it usually brings larger distortion and lower code rate; on the contrary, if the QP value is small, the coefficients with smaller value range will be quantized to the same output, so it usually brings smaller distortion and higher code rate.

[0054] 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 the binary (0 or 1) compressed code stream will be output. At the same time, other information 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).

[0055] 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.

[0056] Loop filtering: The signal after transformation and quantization is obtained by inverse quantization, inverse transformation and prediction compensation to obtain the reconstructed image. Due to the influence of quantization, the reconstructed image is different from the original image, that is, the reconstructed image will produce distortion. Therefore, the reconstructed image can be filtered, for example, the deblocking filter (DB), the sample adaptive offset (SAO) or the 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 within the coding loop.

[0057] In some embodiments of the present application, FIG. 3 shows a basic flowchart of a video encoder, which is illustrated by taking intra prediction as an example. 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 processing, the quantized coefficients are obtained, which are encoded into bitstream by entropy coding on one hand, and are reconstructed into the reconstructed residual signal u' by inverse quantization and inverse transform processing on the other hand k [x, y], the prediction image signal and the reconstructed residual signal u' k [x, y] is superimposed to generate the image signal the image signal On one hand, it is input into the intra mode decision module and the intra prediction module for intra prediction processing, 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 the prediction image signal of the next frame is obtained and the above process is continued to repeat until the encoding is completed.

[0058] 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 is added to the prediction signal to obtain the reconstructed signal. The reconstructed signal is further processed by loop filtering and other operations to generate the final output signal. In this series of encoding processes, the encoding framework mainly makes decisions based on rate-distortion optimization (RDO) to select the optimal encoding parameters.

[0059] 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 second stage of AVS3 adopts an extended intra angular prediction mode (EIPM). In the previous generation of AVS2, there are 33 intra prediction modes in total, including 30 angular prediction modes and 3 special prediction modes (Plane prediction mode, DC prediction mode and Bilinear prediction mode), 2 most probable modes (MPM) are used for coding, and the remaining modes are coded using 5-bit fixed-length coding. To support more precise angular prediction, the angular prediction mode is extended to 62 in AVS3, as shown in FIG. 4, and the newly added angular prediction modes are numbered 34 to 65.

[0060] When an angular prediction mode is used, 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, the position of the reference pixel in the already coded pixel row above is first determined according to the prediction angle in the figure, 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.

[0061] For intra non-angular prediction modes, such as the DC (average) prediction mode, the average of the surrounding neighboring pixels is calculated, and the average value is filled into each position of the prediction block.

[0062] As shown in FIG. 6, inter prediction uses the correlation in the video time domain to predict the pixels of the current image using the pixels of the adjacent coded image, so as to effectively remove the video time domain redundancy and effectively save the bits of the coded residual data. Among them, P represents the current frame, Pr represents the reference frame, B represents the current coding block, and Br represents the reference block of B. The coordinates of B' in the reference frame are the same as the coordinate positions of B in the current frame, and the coordinates of Br are (x r ,y r ), the coordinates of B' are (x,y), and the displacement between the current coding block and its reference block is called a motion vector (MV), wherein MV=(x r -x,y r- y). In other words, inter prediction refers to a process of searching a reference block from a neighboring coded picture (i.e., reference frame) according to a current block to be coded in a current frame, aiming to remove the temporal redundancy of the video signal. As shown in FIG. 7, the current block to be coded in the current frame is searched in a certain range (i.e., in a search area formed by a search frame) in the reference frame according to a block matching criterion to obtain the best matching block. In some embodiments, the commonly used block matching criterion in video coding includes a minimum mean square error (MSE), a sum of absolute difference (SAD), and the like.

[0063] When coding a video image frame, if there is a common boundary between a current block using an intra prediction mode and a neighboring block using an inter prediction mode, then the pixels on both sides of the boundary are prone to discontinuity, which in turn reduces the image visual quality. Based on this, the technical scheme of the embodiments of the present application can use the pixel expansion area of the adjacent block to adjust the pixel value at the boundary position when there is a boundary between the block using the inter prediction mode and the block using the intra prediction mode, and thus can realize the smoothing processing of the pixel value at the boundary position, solve the problem that the boundary pixels of the intra prediction and the inter prediction are prone to discontinuity, improve the continuity of the boundary pixels of the intra prediction and the inter prediction, and thus improve the image visual quality.

[0064] In the technical scheme provided in some embodiments of the present application, when the adjacent coding blocks use the intra prediction mode and the inter prediction mode respectively, the boundary optimization can be realized by the following scheme: first, the boundary expansion area of the target block (including the set of M rows and / or N columns of pixels expanded from the boundary of the current block and the target block into the current block) is obtained, then the boundary pixel value of the current block is adjusted according to the pixel value in the pixel expansion area to obtain the adjusted pixel value, and then the decoding data corresponding to the current block is generated based on the adjusted pixel value. It can be seen that the technical scheme of the embodiments of the present application adjusts the pixel value at the boundary position of the current block by using the pixel expansion area of the adjacent block, effectively solves the problem of discontinuity of the intra / inter prediction boundary pixels, realizes the smooth transition of the boundary area, and thus significantly improves the visual coherence of the image boundary and the overall decoding quality.

[0065] The implementation details of the technical scheme of the embodiments of the present application are described in detail as follows:

[0066] FIG. 8 shows a flowchart of a video decoding method according to some embodiments 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. 8, the video decoding method at least includes S810 to S840, which are described in detail as follows:

[0067] In S810, a prediction mode of the current block and a target block adjacent to the current block is acquired.

[0068] In some embodiments, a video includes a sequence of video image frames, and each video image frame includes a series of images, each image 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) can be further divided into a plurality of prediction blocks (PBs) for prediction encoding. In the HEVC standard, a plurality of block units are divided 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 target block can be CUs, or smaller blocks obtained by dividing the CUs.

[0069] In some embodiments, the prediction mode of the current block can be an intra prediction mode or an inter prediction mode, and the prediction mode of the target block adjacent to the current block can be an intra prediction mode or an inter prediction mode.

[0070] In some embodiments, the current block and the target block can be horizontally adjacent or vertically adjacent. Since the video is encoded in a top-to-bottom and left-to-right order, the target block can be a block located to the left of the current block or a block located above the current block. In other embodiments of the present application, the positional relationship between the target block and the current block can be other relationships, such as the target block being located above and to the left of the current block.

[0071] In S820, if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, a boundary extension region of the target block is acquired, and the boundary extension region includes a set of M rows and / or N columns of pixels extended from a boundary between the target block and the current block into the current block, where M and N are positive integers.

[0072] In some embodiments, if the current block adopts an intra prediction mode, the target block can adopt an inter prediction mode; if the current block adopts an inter prediction mode, the target block can adopt an intra prediction mode. In other words, in some embodiments of the present application, one of the current block and the target block adopts an intra prediction mode, and the other adopts an inter prediction mode. In other embodiments of the present application, if the current block and the target block adopt the same prediction mode (such as both adopting an intra prediction mode or both adopting an inter prediction mode), the technical solutions of the embodiments of the present application can also be used to adjust the boundary pixels of the current block.

[0073] In some embodiments, when the boundary extension region of the target block is obtained, N columns of pixel regions can be extended to the right of the right boundary of the target block according to the prediction mode adopted by the target block, and the pixel values of the N columns of pixels are determined.

[0074] In some embodiments, when the boundary extension region of the target block is obtained, M rows of pixels can be extended downward according to the prediction mode adopted by the target block, and the pixel values of the M rows of pixels are determined.

[0075] It should be noted that the boundary extension region of the target block can include the right boundary extension region, or the boundary extension region below the target block, or both the right boundary extension region and the boundary extension region below the target block. Of course, in other embodiments of the present application, the boundary extension region of the target block can also be a boundary extension region in other directions, such as a boundary extension region below and to the right of the target block, etc.

[0076] In some embodiments, according to the prediction mode adopted by the target block, the determination of the pixel values of the N columns of pixels can include: determining the prediction values of the N columns of pixels according to the prediction mode adopted by the target block, and generating the compensation values of the N columns of pixels according to the residual values of the pixels in the target block; and then generating the pixel values of the N columns of pixels based on the compensation values and the prediction values. For example, the compensation values and the prediction values of the same column of pixels can be superimposed to obtain the pixel values of the column. Or the compensation values and the prediction values of the same column of pixels can be superimposed, and then the superimposed values can be adjusted (such as increasing a set value, decreasing a set value, multiplying a set coefficient, etc.) to obtain the pixel values of the column.

[0077] In some embodiments, the process of determining the prediction values of the N columns of pixels according to the prediction mode adopted by the target block is an intra prediction process or an inter prediction process, which can be referred to the foregoing descriptions of the intra prediction mode and the inter prediction mode.

[0078] It should be noted that if the target block adopts multiple intra prediction modes, the multiple intra prediction modes can be used to determine the candidate prediction values of the N columns of pixels respectively, and the prediction value of the N columns of pixels can be calculated based on the determined multiple candidate prediction values, such as by means of weighted summation. Alternatively, one of the multiple intra prediction modes can be selected to determine the prediction value of the N columns of pixels, such as randomly selecting one of the multiple intra prediction modes, or selecting the first intra prediction mode.

[0079] If the target block adopts an inter prediction mode and has multiple motion vectors, the multiple motion vectors can be used to determine the candidate prediction values of the N columns of pixels respectively, and the prediction value of the N columns of pixels can be calculated based on the determined multiple candidate prediction values, such as by means of weighted summation. Alternatively, one of the multiple motion vectors can be selected to determine the prediction value of the N columns of pixels, such as randomly selecting one of the multiple motion vectors, or selecting the first motion vector.

[0080] In some embodiments, when generating the compensation values of the N columns of pixels according to the residual values of the pixels in the target block, the compensation values of the pixels in the N columns can be calculated according to the residual values of the pixels in a specified column in the target block and the scaling coefficients corresponding to the pixels in the N columns. In some embodiments, the scaling coefficients corresponding to the pixels in different columns in the N columns can be the same or different. In some embodiments, the specified column can be the rightmost column in the target block, or can be another column in the target block.

[0081] In some embodiments, according to the prediction mode adopted by the target block, the pixel values of the M rows of pixels can be determined by determining the prediction values of the M rows of pixels according to the prediction mode adopted by the target block, and generating the compensation values of the M rows of pixels according to the residual values of the pixels in the target block; and then generating the pixel values of the M rows of pixels based on the compensation values and the prediction values of the M rows of pixels. For example, the compensation value and the prediction value of the same row of pixels can be superimposed to obtain the pixel value of the row. Alternatively, the compensation value and the prediction value of the same row of pixels can be superimposed, and then the superimposed value can be adjusted (such as increasing a set value, decreasing a set value, multiplying a set coefficient, etc.) to obtain the pixel value of the row.

[0082] In some embodiments, the process of determining the prediction values of the M rows of pixels according to the prediction mode adopted by the target block is an intra prediction process or an inter prediction process, and specific details can be referred to the foregoing descriptions of the intra prediction mode and the inter prediction mode.

[0083] It should be noted that if the target block adopts multiple intra prediction modes, the multiple intra prediction modes can be used to determine candidate prediction values of the M rows of pixels respectively, and the prediction value of the M rows of pixels can be calculated based on the determined multiple candidate prediction values, such as by means of weighted summation. Alternatively, one intra prediction mode can be selected from the multiple intra prediction modes to determine the prediction value of the M rows of pixels, such as randomly selecting one from the multiple intra prediction modes, or selecting the first intra prediction mode.

[0084] If the target block adopts an inter prediction mode and has multiple motion vectors, the multiple motion vectors can be used to determine candidate prediction values of the M rows of pixels respectively, and the prediction value of the M rows of pixels can be calculated based on the determined multiple candidate prediction values, such as by means of weighted summation. Alternatively, one motion vector can be selected from the multiple motion vectors to determine the prediction value of the M rows of pixels, such as randomly selecting one from the multiple motion vectors, or selecting the first motion vector.

[0085] In some embodiments, when the compensation values of the M rows of pixels are generated according to the residual values of the pixels in the target block, the compensation values of the pixels in the M rows can be calculated according to the residual values of the pixels in a specified row in the target block and the scaling coefficients corresponding to the pixels in the M rows. In some embodiments, the scaling coefficients corresponding to the pixels in different rows of the M rows can be the same or different. In some embodiments, the specified row can be the lowest row in the target block, or can be another row in the target block.

[0086] Continuing to refer to FIG. 8, in S830, the pixel values near the boundary position in the current block are adjusted according to the pixel values in the pixel extension region, to obtain adjusted pixel values.

[0087] In some embodiments, the process of adjusting the pixel values near the boundary position in the current block according to the pixel values in the pixel extension region can be weighted summation processing of the pixel values in the pixel extension region and the pixel values near the boundary position in the current block, to obtain the adjusted pixel values.

[0088] In some embodiments, if the target block is located on the left side of the current block, the i-th column pixel value in the current block, which is sorted from left to right, can be processed by weighted summation with the i-th column pixel value in the pixel extension region, which is sorted from left to right, to obtain an adjusted pixel value corresponding to the i-th column pixel value in the current block, where i is less than or equal to N and less than or equal to the column number of the current block. For example, the first column pixel value in the current block, which is sorted from left to right, can be processed by weighted summation with the first column pixel value in the pixel extension region, which is sorted from left to right, to obtain an adjusted pixel value corresponding to the first column pixel value in the current block; the second column pixel value in the current block, which is sorted from left to right, can be processed by weighted summation with the second column pixel value in the pixel extension region, which is sorted from left to right, to obtain an adjusted pixel value corresponding to the second column pixel value in the current block.

[0089] In this case, in some embodiments, the weights of the column pixel values in the pixel extension region, which are sorted from left to right, can decrease in turn. For example, the weight of the first column pixel value in the pixel extension region, which is sorted from left to right, can be greater than the weight of the second column pixel value in the pixel extension region, which is sorted from left to right.

[0090] In some embodiments, if the target block is located above the current block, the j-th row pixel value in the current block, which is sorted from top to bottom, can be processed by weighted summation with the j-th row pixel value in the pixel extension region, which is sorted from top to bottom, to obtain an adjusted pixel value corresponding to the j-th row pixel value in the current block; where j is less than or equal to M and less than or equal to the row number of the current block. For example, the first row pixel value in the current block, which is sorted from top to bottom, can be processed by weighted summation with the first row pixel value in the pixel extension region, which is sorted from top to bottom, to obtain an adjusted pixel value corresponding to the first row pixel value in the current block; the second row pixel value in the current block, which is sorted from top to bottom, can be processed by weighted summation with the second row pixel value in the pixel extension region, which is sorted from top to bottom, to obtain an adjusted pixel value corresponding to the second row pixel value in the current block.

[0091] In this case, in some embodiments, the weights of the column pixel values in the pixel extension region, which are sorted from left to right, can decrease in turn. For example, the weight of the first column pixel value in the pixel extension region, which is sorted from left to right, can be greater than the weight of the second column pixel value in the pixel extension region, which is sorted from left to right.

[0092] In S840, based on the adjusted pixel value, the decoding data corresponding to the current block is generated.

[0093] In some embodiments, after adjusting the pixel values at the positions close to the boundary in the current block, the adjusted pixel values at the positions close to the boundary in the current block and the pixel values at other positions (i.e. positions without adjustment) in the current block can be taken as the reconstructed pixel values of the current block to obtain the decoding data corresponding to the current block, and then other blocks in the image frame can be decoded based on the decoding data.

[0094] FIG. 8 is an illustration of the technical solution of the embodiments of the present application from the perspective of video decoding. The technical solution of the embodiments of the present application is illustrated again from the perspective of video encoding in combination with FIG. 9.

[0095] FIG. 9 shows a flowchart of a video encoding method according to some embodiments of the present application, which can be executed by a device with computing processing function, such as a terminal device or a server. Referring to FIG. 9, the video encoding method includes at least S910 to S940, which are described in detail as follows:

[0096] In S910, the prediction modes of a current block and a target block adjacent to the current block are obtained.

[0097] In S920, if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, a boundary extension region of the target block is obtained, the boundary extension region including a set of M rows and / or N columns of pixels extended from the boundary of the target block and the current block into the current block, M and N being positive integers.

[0098] In S930, the pixel values at the positions close to the boundary in the current block are adjusted according to the pixel values in the pixel extension region to obtain adjusted pixel values.

[0099] In S940, the current block is encoded based on the adjusted pixel values.

[0100] 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.

[0101] It can be seen that the technical solution of the embodiments of the present application uses a fusion method for the boundary pixels of intra prediction and inter prediction, maintains the continuity of the boundary pixels, and thus achieves the purpose of improving the visual quality of the boundary region. In addition, the configurable M and N parameters adapt to different block sizes (4x4 to 64x64), which can avoid overfitting caused by fixed extension. By adjusting only the boundary region pixels, the original prediction structure in the current block is preserved, so that the calculation complexity is controllable. Moreover, the extension region data can reuse the existing cache line, reducing the number of memory access times.

[0102] The implementation details of the technical solutions of the embodiments of the present application are described again below in combination with FIG. 10 to FIG. 12:

[0103] In the embodiments of the present application, the blocks in the video image frame can be extended at the boundary, and the following takes the extension of the current block as an example for description.

[0104] In some embodiments, for the current block using the intra prediction mode, on the basis of the current block (which can be S columns x T rows) region, N columns of pixel regions are extended to the right side, and M rows of pixel regions are extended downward. The pixels in the extended region can be generated according to the intra prediction mode corresponding to the current block. In some embodiments, the object of the intra prediction can be regarded as a (S+N) column x (T+M) row block to determine the pixel prediction value in the extended region. For example, the current block uses a horizontal prediction direction, and the N columns of pixels on the right side are all generated by the horizontal prediction of the reference pixels on the left side. The M rows of pixels downward are generated by the horizontal prediction of the M reference pixels on the left side.

[0105] In some embodiments, when the reference pixels on the upper right and the lower left of the current block are needed and some reference pixels do not exist, these reference pixels can be filled by the adjacent existing reference pixels. As shown in FIG. 10, which is an example of the extended region pixels being generated by a 45-degree prediction direction on the lower right, if A0(N+1) does not exist, it can be replaced by A0N (i.e., A04) pixel. In some embodiments, in the example shown in FIG. 10, M can be equal to N, and the value can be 2.

[0106] In some embodiments, the N column pixel regions generated by the above-mentioned extension method have only prediction values and no residual values, and they can have certain differences from the actual reconstructed pixels. Therefore, in the embodiments of the present application, for the N column extended region on the right side, the residual values of the pixels in the rightmost column (such as the fourth column in FIG. 2) of the current block can be multiplied by a scaling coefficient and then added to the prediction pixels in the extended region on the right side to obtain the pixel values in the extended region on the right side. In some embodiments, the scaling coefficients corresponding to each column in the extended region can be the same or different.

[0107] Similarly, the M row prediction pixel regions generated by the above-mentioned extension method have only prediction values and no residual values, and they can have certain differences from the actual reconstructed pixels. Therefore, in the embodiments of the present application, for the M row extended region downward, the residual values of the pixels in the lowermost row (such as the fourth row in FIG. 2) of the current block can be multiplied by a scaling coefficient and then added to the prediction pixels in the extended region downward to obtain the pixel values in the extended region downward. In some embodiments, the scaling coefficients corresponding to each row in the extended region can be the same or different.

[0108] In some embodiments, if the current block employs multiple intra prediction modes (i.e. has multiple prediction blocks), the following approach can be used:

[0109] One approach can generate the prediction pixels for the extended region as a (S+N) column x (T+M) block of pixels, and then for each intra prediction mode, generate prediction pixels for the multiple extended regions according to the above-described embodiments for generating the prediction block for the current block, and then perform a weighted sum to obtain the final prediction pixels for the extended region. In some embodiments, the weighted sum can be performed in a manner similar to the manner in which the final prediction block is generated from the multiple intra prediction modes.

[0110] Another approach can select one of the intra prediction modes, e.g. the first intra prediction mode, to generate the prediction pixels for the extended region.

[0111] In some embodiments, for a current block using inter prediction mode, the current block (e.g. S column x T row) can be extended by N columns of pixels to the right and M rows of pixels to the bottom. The pixels in the extended region can be generated by finding the corresponding reference positions in the reference image according to the motion vector of the current block. As shown in FIG. 11, the prediction values of the pixels in the extended region of the boundary of the current block in the current image are obtained from the pixels in the extended region of the boundary of the reference block in the reference image.

[0112] In some embodiments, the N columns of pixels generated by the above-described extension can only have prediction values, and no residual values, and thus can be different from the actual reconstructed pixels. Therefore, in embodiments of the present application, for the N columns of the extended region to the right, the residual values of the pixels in the rightmost column (e.g. the 4th column in FIG. 2) of the current block can be multiplied by a scaling factor and added to the prediction pixels in the extended region to the right to obtain the pixel values in the extended region to the right. In some embodiments, the scaling factor corresponding to each column in the extended region can be the same or different.

[0113] Similarly, the M rows of prediction pixels generated by the above-described extension can only have prediction values, and no residual values, and thus can be different from the actual reconstructed pixels. Therefore, in embodiments of the present application, for the M rows of the extended region below, the residual values of the pixels in the bottom row (e.g. the 4th row in FIG. 2) of the current block can be multiplied by a scaling factor and added to the prediction pixels in the extended region below to obtain the pixel values in the extended region below. In some embodiments, the scaling factor corresponding to each row in the extended region can be the same or different.

[0114] In some embodiments, if the current block has multiple motion vectors (i.e. has multiple reference blocks), the following approach can be used:

[0115] One way is to take the current block as a (S+N) column x (T+M) row block, and then obtain the reference blocks of the multiple reference regions for each motion vector, and generate the prediction pixels of the extended region according to the way of generating the prediction block of the current block. If the prediction pixels of multiple extended regions are generated, weighted summation can be performed to obtain the prediction pixels of the final extended region.

[0116] Another way is to select one of the motion vectors, for example, select the first motion vector to generate the prediction pixels of the extended region.

[0117] It should be noted that when the blocks in the video image frame are extended at the boundary, the boundary extended region of each block can be generated in advance, so that the boundary extended region of a certain block can be directly obtained when needed; or the boundary extended region of a certain block can be generated by the technical solutions of the above embodiments when needed.

[0118] In some embodiments, for two adjacent coding blocks, if the coding mode satisfies that one is intra prediction and the other is inter prediction, the boundary pixels of the current block can be fused by the boundary pixel fusion method.

[0119] Specifically, each column of pixels in the current block from left to right in the first N columns is weighted and summed with each column in the right side N column extended pixel region of the left block one by one. For example, the first column of pixels in the current block from left to right is weighted and summed with the first column of pixels in the right side extended pixel region of the left block to generate the last reconstructed pixel at the first column position of the current block; the second column of pixels in the current block from left to right is weighted and summed with the second column of pixels in the right side extended pixel region of the left block to generate the last reconstructed pixel at the second column position of the current block; and so on.

[0120] Each row of pixels in the current block from top to bottom in the first M rows is weighted and summed with each row in the lower M row extended pixel region of the upper block one by one. For example, the first row of pixels in the current block from top to bottom is weighted and summed with the first row of pixels in the lower extended pixel region of the upper block to generate the last reconstructed pixel at the first row position of the current block; the second row of pixels in the current block from top to bottom is weighted and summed with the second row of pixels in the lower extended pixel region of the upper block to generate the last reconstructed pixel at the second row position of the current block; and so on.

[0121] In some embodiments, for each row / column in the boundary expansion region, the weight in the weighted summation can be sequentially decreased as the distance from the boundary increases. For example, referring to FIG. 12, assuming M=N=2, the pixel weight of the first row / column in the boundary expansion region is set to 1 / 2 (and the pixel weight of the corresponding position row / column of the current block is set to 1 / 2 accordingly); the pixel weight of the second row / column in the boundary expansion region is set to 1 / 4 (and the pixel weight of the corresponding position row / column of the current block is set to 3 / 4 accordingly).

[0122] It should be noted that the above-mentioned scheme of the above-mentioned embodiments of the present application can improve the boundary continuity of the intra prediction and the inter prediction by performing the smoothing processing on the boundary of the intra prediction and the inter prediction, thereby improving the coding visual quality. The technical scheme of each of the above-mentioned embodiments can be used alone or in combination. Meanwhile, the technical scheme of the embodiments of the present application can be applied to products related to video codec or video compression, etc.

[0123] The device embodiments of the present application are described below, which can be used to execute the methods described in the above-mentioned embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the above-mentioned method embodiments of the present application.

[0124] FIG. 13 shows a block diagram of a video decoding device according to some embodiments of the present application, which can be arranged in a device with computing processing function, such as a terminal device or a server.

[0125] Referring to FIG. 13, the video decoding device 1300 according to some embodiments of the present application includes a prediction mode obtaining unit 1302, an expansion region obtaining unit 1304, an adjusting unit 1306, and a processing unit 1308.

[0126] The prediction mode obtaining unit 1302 is configured to obtain the prediction mode adopted by a current block and a target block adjacent to the current block; the expansion region obtaining unit 1304 is configured to, if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtain a boundary expansion region of the target block, the boundary expansion region including a set of M rows and / or N columns of pixels expanded from the boundary of the target block and the current block into the current block, M and N being positive integers; the adjusting unit 1306 is configured to adjust the pixel value of the pixel close to the boundary position in the current block according to the pixel value in the pixel expansion region to obtain an adjusted pixel value; and the processing unit 1308 is configured to generate the decoding data corresponding to the current block based on the adjusted pixel value.

[0127] FIG. 14 shows a block diagram of a video encoding apparatus according to some embodiments of the present application, which can be arranged in a device with computing processing function, such as a terminal device or a server.

[0128] Referring to FIG. 14, a video encoding apparatus 1400 according to some embodiments of the present application includes a prediction mode obtaining unit 1402, an extension region obtaining unit 1404, an adjusting unit 1406 and a processing unit 1408.

[0129] The prediction mode obtaining unit 1402 is configured to obtain a prediction mode of a current block and a target block adjacent to the current block; the extension region obtaining unit 1404 is configured to obtain a boundary extension region of the target block if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, the boundary extension region including a set of M rows and / or N columns of pixels extended from a boundary of the target block and the current block into the current block, M and N being positive integers; the adjusting unit 1406 is configured to adjust pixel values of pixels close to the boundary position in the current block according to pixel values in the pixel extension region to obtain adjusted pixel values; and the processing unit 1408 is configured to perform encoding processing on the current block based on the adjusted pixel values.

[0130] The specific functions and implementations of the video decoding apparatus shown in FIG. 13 and the video encoding apparatus shown in FIG. 14 can refer to the foregoing method embodiments, which will not be described here.

[0131] FIG. 15 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.

[0132] It should be noted that the computer system 1500 of the electronic device shown in FIG. 15 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0133] As shown in FIG. 15, the computer system 1500 can include a central processing unit (CPU) 1501 which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1502 or loaded into a random access memory (RAM) 1503 from a storage section 1508, such as performing the methods described in the above embodiments. Various programs and data required for the operation of the system are also stored in the RAM 1503. The CPU 1501, the ROM 1502, and the RAM 1503 are connected to each other through a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.

[0134] The following components can be connected to the I / O interface 1505: an input section 1506 including a keyboard, a mouse, etc.; an output section 1507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to the I / O interface 1505 as necessary. A removable recording medium 1511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1510 as necessary, so that a computer program read therefrom is installed into the storage section 1508 as necessary.

[0135] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. 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 section 1509, and / or installed from the removable recording medium 1511. When the computer program is executed by the central processing unit (CPU) 1501, various functions defined in the system of the present application are performed.

[0136] 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.

[0137] 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 involved functions. 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.

[0138] 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.

[0139] 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.

[0140] Some embodiments can relate to systems, methods, and / or computer readable media at any possible level of integration. The computer readable medium can include a computer readable non-transitory storage medium (or media) having computer readable program instructions stored therein to cause a processor to carry out operations, and can also include a bitstream (or video bitstream) generated according to the above encoding method. The computer program / instructions are executed by the processor to implement the steps of the video encoding method to generate the bitstream (or video bitstream), or to implement the steps of the video decoding method to decode the bitstream (or video bitstream).

[0141] 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 a plurality of modules or units.

[0142] 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 a number of instructions to make an electronic device execute the method according to the embodiments of the present application.

[0143] For example, the electronic device can be a video decoding apparatus, which can execute the video decoding method shown in FIG. 8; for another example, the electronic device can be a video encoding apparatus, which can execute the video encoding method shown in FIG. 9.

[0144] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the application embrace any and all variations of the present application that fall within the scope of the general inventive concept as defined by the appended claims and their equivalents. It is intended that the application encompass all such variations as fall within the scope of the appended claims and their equivalents.

[0145] It is to be understood that the application is not limited to particular details described herein and as illustrated in the figures and can be practiced with modification and changes within the scope of the appended claims. The scope of the application is indicated by the claims.

Claims

1. A method of video decoding performed by at least one processor, comprising: obtaining a prediction mode of a current block and a target block adjacent to the current block; if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtaining a boundary extension region of the target block, the boundary extension region comprising a set of M rows and / or N columns of pixels extended from a boundary of the target block and the current block into the current block, M and N being positive integers; adjusting pixel values of pixels close to the boundary in the current block according to pixel values in the set of pixels to obtain adjusted pixel values; generating decoding data corresponding to the current block based on the adjusted pixel values.

2. The video decoding method of claim 1, wherein, The obtaining of the boundary extension region of the target block comprises at least one of the following manners: extending N columns of pixels to the right of a right boundary of the target block according to the prediction mode adopted by the target block, and determining pixel values of the N columns of pixels; extending M rows of pixels downward of a lower boundary of the target block according to the prediction mode adopted by the target block, and determining pixel values of the M rows of pixels.

3. The video decoding method of claim 2, wherein, The determining of the pixel values of the N columns of pixels comprises: determining prediction values of the N columns of pixels according to the prediction mode adopted by the target block; generating compensation values of the N columns of pixels according to residual values of pixels in the target block; and generating the pixel values of the N columns of pixels based on the compensation values and the prediction values of the N columns of pixels.

4. The video decoding method of claim 3, wherein, The generating of the compensation values of the N columns of pixels according to the residual values of the pixels in the target block comprises: calculating the compensation values of the N columns of pixels according to residual values of pixels in a specified column of the target block and scaling coefficients corresponding to the pixels in the N columns of pixels; wherein the scaling coefficients corresponding to different columns of pixels in the N columns of pixels are the same or different.

5. The video decoding method of claim 4, wherein, The specified column comprises a rightmost column of the target block.

6. The video decoding method of any of claims 3 to 5, wherein, The determining of the prediction values of the N columns of pixels according to the prediction mode adopted by the target block comprises: if the target block adopts a plurality of intra prediction modes, determining candidate prediction values of the N columns of pixels respectively according to the plurality of intra prediction modes, and calculating the prediction values of the N columns of pixels based on the plurality of determined candidate prediction values; or selecting one of the plurality of intra prediction modes to determine the prediction values of the N columns of pixels; if the target block adopts an inter prediction mode and has a plurality of motion vectors, determining candidate prediction values of the N columns of pixels respectively according to the plurality of motion vectors, and calculating the prediction values of the N columns of pixels based on the plurality of determined candidate prediction values; or selecting one of the plurality of motion vectors to determine the prediction values of the N columns of pixels.

7. The video decoding method of claim 2, wherein, The determining of the pixel values of the M rows of pixels comprises: determining prediction values of the M rows of pixels according to the prediction mode adopted by the target block; generating compensation values of the M rows of pixels according to residual values of pixels in the target block; and generating the pixel values of the M rows of pixels based on the compensation values and the prediction values of the M rows of pixels.

8. The video decoding method of claim 7, wherein, The generating of the compensation values of the M rows of pixels according to the residual values of the pixels in the target block comprises: calculating compensation values of the pixels in the M rows according to the residual values of the pixels in the specified row in the target block and scaling coefficients corresponding to the pixels in the M rows; wherein the scaling coefficients corresponding to the pixels in different rows in the M rows are the same or different.

9. The video decoding method of claim 8, wherein, The specified row includes a lowermost row in the target block.

10. The video decoding method of any of claims 7 to 9, wherein, According to a prediction mode adopted by the target block, determining the prediction values of the pixels in the M rows, including: if the target block adopts multiple intra prediction modes, respectively determining candidate prediction values of the pixels in the M rows by using the multiple intra prediction modes, and calculating the prediction values of the pixels in the M rows based on the multiple determined candidate prediction values; or selecting one intra prediction mode from the multiple intra prediction modes to determine the prediction values of the pixels in the M rows; if the target block adopts an inter prediction mode and has multiple motion vectors, respectively determining candidate prediction values of the pixels in the M rows by using the multiple motion vectors, and calculating the prediction values of the pixels in the M rows based on the multiple determined candidate prediction values; or selecting one motion vector from the multiple motion vectors to determine the prediction values of the pixels in the M rows.

11. The video decoding method of any of claims 1-10, wherein, adjusting pixel values near the boundary position in the current block according to pixel values in the pixel extension region to obtain adjusted pixel values, including: performing weighted sum processing on the pixel values in the pixel extension region and the pixel values near the boundary position in the current block to obtain the adjusted pixel values.

12. The video decoding method of claim 11, wherein, performing weighted sum processing on the pixel values in the pixel extension region and the pixel values near the boundary position in the current block, including: if the target block is located on the left side of the current block, performing weighted sum processing on the i-th column pixel value in the current block sorted from left to right and the i-th column pixel value in the pixel extension region sorted from left to right to obtain the adjusted pixel value corresponding to the i-th column pixel value in the current block; wherein i is less than or equal to N and less than or equal to the column number of the current block.

13. The video decoding method of claim 12, wherein, The weights of the column pixel values in the pixel extension region sorted from left to right decrease in turn.

14. The video decoding method of claim 11, wherein, performing weighted sum processing on the pixel values in the pixel extension region and the pixel values near the boundary position in the current block, including: if the target block is located above the current block, performing weighted sum processing on the j-th row pixel value in the current block sorted from top to bottom and the j-th row pixel value in the pixel extension region sorted from top to bottom to obtain the adjusted pixel value corresponding to the j-th row pixel value in the target block; wherein j is less than or equal to M and less than or equal to the row number of the current block.

15. The video decoding method of claim 14, wherein, The weights of the column pixel values in the pixel extension region sorted from left to right decrease in turn.

16. A video encoding method, executed by at least one processor, comprising: obtaining prediction modes of a current block and a target block adjacent to the current block; if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtaining a boundary extension region of the target block, the boundary extension region including a set of M rows and / or N columns of pixels extended from a boundary of the target block and the current block into the current block, M and N being positive integers; adjusting pixel values near the boundary position in the current block according to pixel values in the pixel extension region to obtain adjusted pixel values; encoding the current block based on the adjusted pixel values. 17.A video decoding apparatus, comprising: a prediction mode obtaining unit configured to obtain prediction modes of a current block and a target block adjacent to the current block; an extension region obtaining unit configured to, if one of the current block and the target block adopts an intra prediction mode and the other adopts an inter prediction mode, obtain a boundary extension region of the target block, the boundary extension region including a set of M rows and / or N columns of pixels extended from a boundary of the target block and the current block into the current block, M and N being positive integers; an adjusting unit configured to adjust pixel values near the boundary position in the current block according to pixel values in the pixel extension region to obtain adjusted pixel values; a processing unit configured to generate decoding data corresponding to the current block based on the adjusted pixel values.

18. A computer readable medium having stored thereon a computer program and a bitstream, wherein, the computer program is executed by a processor to implement the video encoding method of claim 16 to generate the bitstream.

19. A method of storing a bitstream, comprising: execute the video encoding method of claim 16 to generate the bitstream; and store the bitstream. 20.A method of transmitting a bitstream, comprising executing the video encoding method of claim 16 to generate the bitstream; and transmitting the bitstream.

Citation Information

Patent Citations

  • Method and apparatus of intra-inter prediction mode for video coding

    CN110800302A

  • Inter-frame prediction filtering method and device and computer readable storage medium

    CN111669584A

  • Image encoding method, image decoding method and related devices

    CN114071161A

  • Video coding using compound prediction

    US9609343B1

  • Region-based implicit intra mode derivation and prediction

    WO2023198105A1