Video coding method, apparatus, and computing device
By filtering and/or rearranging the initial reference block, an adjusted reference block is generated to improve video encoding and decoding efficiency, solving the problem of large memory consumption at the decoding end and achieving a more efficient encoding and decoding process.
Patent Information
- Application Number
- CN202110397109.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-13
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2041-04-13
AI Technical Summary
In existing video encoding and decoding methods, the decoding end consumes a large amount of memory when exporting prediction samples, resulting in low encoding and decoding efficiency.
By filtering and/or rearranging the initial reference block, the reference block is adjusted to generate an adjusted reference block, which is used to determine the prediction block of the block to be decoded or encoded.
It effectively eliminates redundancy in the image and improves decoding efficiency.
Smart Images

Figure CN115209140B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a video encoding / decoding method, apparatus, and computing device. Background Technology
[0002] Digital video technology can be integrated into various video devices, such as digital televisions, smartphones, computers, e-readers, and video players. With the development of video technology, the amount of data contained in video data has become increasingly large. To facilitate the transmission of video data, video devices implement video compression technology to enable more efficient transmission or storage of video data.
[0003] Currently, spatial or temporal prediction is used to reduce or eliminate redundant information in video data to achieve video compression. Motion compensation is a commonly used prediction method in video coding. Based on the redundancy characteristics of video content in the temporal or spatial domains, it derives the predicted value of the current coded block from the already encoded region. Motion compensation-based prediction methods include inter-frame prediction, intra-frame block duplication, and intra-frame string duplication. The intra-frame string duplication prediction method divides a coded block into a series of pixel strings according to a certain scanning order. The encoder encodes the type, length, and predicted value information of each string in the current coded block in the bitstream. Correspondingly, the decoder derives the predicted sample of the current image block based on the type, length, and predicted value information of each string carried in the bitstream, and determines the reconstructed value of the current image block based on the predicted sample.
[0004] However, the current decoding end consumes a large amount of memory when exporting predicted samples. Summary of the Invention
[0005] This application provides a video encoding / decoding method, apparatus, and computing device to improve encoding / decoding efficiency.
[0006] Firstly, a video decoding method is provided, including:
[0007] Decode the bitstream of the block to be decoded and determine the initial reference block of the block to be decoded;
[0008] Determine a target adjustment method for adjusting the initial reference block, the target adjustment method being used to perform filtering and / or rearrangement operations on the pixels in the initial reference block;
[0009] According to the target adjustment method, the pixels in the initial reference block are adjusted to obtain the adjusted reference block;
[0010] Based on the adjusted reference block, the prediction block of the block to be decoded is determined.
[0011] Secondly, a video encoding method is provided, including:
[0012] Obtain the block to be encoded and process the block to be encoded to obtain the initial reference block of the block to be encoded;
[0013] Determine a target adjustment method for adjusting the initial reference block, the target adjustment method being used to perform filtering and / or rearrangement operations on the pixels in the initial reference block;
[0014] According to the target adjustment method, the pixels in the initial reference block are adjusted to obtain the adjusted reference block;
[0015] Based on the adjusted reference block, the prediction block of the block to be encoded is determined.
[0016] Thirdly, a video decoding device is provided, comprising:
[0017] A decoding unit is used to decode the bitstream of the block to be decoded and to determine the initial reference block of the block to be decoded.
[0018] A determining unit is configured to determine a target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block.
[0019] An adjustment unit is used to adjust the pixels in the initial reference block according to the target adjustment method to obtain an adjusted reference block;
[0020] A prediction unit is used to determine the prediction block of the block to be decoded based on the adjusted reference block.
[0021] Fourthly, a video encoding apparatus is provided, comprising:
[0022] A processing unit is used to acquire a block to be encoded and process the block to be encoded to obtain an initial reference block of the block to be encoded.
[0023] A determining unit is configured to determine a target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block.
[0024] An adjustment unit is used to adjust the pixels in the initial reference block according to the target adjustment method to obtain an adjusted reference block;
[0025] The encoding unit is used to determine the prediction block of the block to be encoded based on the adjusted reference block.
[0026] Fifthly, a computing device is provided, including a processor and a memory. The memory is used to store a computer program, and the processor is used to invoke and run the computer program stored in the memory to perform the methods described in the first or second aspect above.
[0027] A sixth aspect provides a chip for implementing the methods of the first or second aspect described above. Specifically, the chip includes a processor for retrieving and running a computer program from a memory, causing a device equipped with the chip to perform the methods of the first or second aspect described above.
[0028] In a seventh aspect, a computer-readable storage medium is provided for storing a computer program that causes a computer to perform the methods described in the first or second aspect above.
[0029] Eighthly, a computer program product is provided, including computer program instructions that cause a computer to perform the methods described in the first or second aspect above.
[0030] Ninthly, a computer program is provided that, when run on a computer, causes the computer to perform the methods described in the first or second aspect above.
[0031] The technical solution provided in this application determines a target adjustment method for adjusting an initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block; the pixels in the initial reference block are adjusted according to the target adjustment method to obtain an adjusted reference block; and a prediction block is determined based on the adjusted reference block, thereby effectively eliminating redundancy in the image and improving decoding efficiency. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a schematic block diagram of a video encoding and decoding system according to an embodiment of this application;
[0034] Figure 2 This is a schematic block diagram of the video encoder provided in the embodiments of this application;
[0035] Figure 3 This is a schematic block diagram of the decoding framework provided in the embodiments of this application;
[0036] Figure 4This is a schematic diagram illustrating inter-frame copying as described in an embodiment of this application;
[0037] Figure 5 This is a schematic diagram illustrating an intra-frame block copying method according to an embodiment of this application;
[0038] Figure 6 This is a schematic diagram of an intra-frame string copying method according to an embodiment of this application;
[0039] Figure 7 A flowchart illustrating a video decoding method provided in one embodiment of this application;
[0040] Figure 8 A schematic flowchart illustrating a video decoding method provided in an embodiment of this application;
[0041] Figure 9 A flowchart illustrating a video encoding method provided in an embodiment of this application;
[0042] Figure 10 A flowchart illustrating a video encoding method provided in an embodiment of this application;
[0043] Figure 11 This is a schematic block diagram of the video decoding apparatus provided in the embodiments of this application;
[0044] Figure 12 This is a schematic block diagram of the video encoding apparatus provided in the embodiments of this application;
[0045] Figure 13 This is a schematic block diagram of a computing device provided in an embodiment of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0048] This application can be applied to the fields of image encoding and decoding, video encoding and decoding, hardware video encoding and decoding, dedicated circuit video encoding and decoding, and real-time video encoding and decoding. For example, the solution of this application can be combined with audio video coding standards (AVS), such as H.264 / Audio Video Coding (AVC) standard, H.265 / High Efficiency Video Coding (HEVC) standard, and H.266 / Versatile Video Coding (VVC) standard. Alternatively, the solution of this application can be combined with other proprietary or industry standards, including ITU-TH.261, ISO / IEC MPEG-1 Visual, ITU-TH.262 or ISO / IEC MPEG-2 Visual, ITU-TH.263, ISO / IEC MPEG-4 Visual, ITU-TH.264 (also known as ISO / IEC MPEG-4 AVC), which include Scalable Video Coding (SVC) and Multi-View Video Coding (MVC) extensions. It should be understood that the technology in this application is not limited to any particular codec standard or technology.
[0049] To facilitate understanding, let's first combine... Figure 1 The video encoding and decoding system involved in the embodiments of this application will be described.
[0050] Figure 1 This is a schematic block diagram of a video encoding / decoding system 100 according to an embodiment of this application. It should be noted that... Figure 1 This is merely an example; the video encoding and decoding system in this application includes, but is not limited to, [other systems]. Figure 1 As shown. Figure 1As shown, the video encoding / decoding system 100 includes an encoding device 110 and a decoding device 120. The encoding device encodes (can be understood as compressing) video data to generate a bitstream and transmits the bitstream to the decoding device. The decoding device decodes the bitstream generated by the encoding device to obtain the decoded video data.
[0051] The encoding device 110 in this application embodiment can be understood as a device with video encoding function, and the decoding device 120 can be understood as a device with video decoding function. That is, the encoding device 110 and the decoding device 120 in this application embodiment include a wider range of devices, such as smartphones, desktop computers, mobile computing devices, laptops (e.g., laptop computers), tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, etc.
[0052] In some embodiments, encoding device 110 may transmit encoded video data (such as a bitstream) to decoding device 120 via channel 130. Channel 130 may include one or more media and / or means capable of transmitting encoded video data from encoding device 110 to decoding device 120.
[0053] In one example, channel 130 includes one or more communication media that enable encoding device 110 to transmit encoded video data directly to decoding device 120 in real time. In this example, encoding device 110 can modulate the encoded video data according to a communication standard and transmit the modulated video data to decoding device 120. The communication media includes wireless communication media, such as radio frequency spectrum; optionally, the communication media may also include wired communication media, such as one or more physical transmission lines.
[0054] In another example, channel 130 includes a storage medium that can store video data encoded by encoding device 110. The storage medium includes various local access data storage media, such as optical discs, DVDs, flash memory, etc. In this example, decoding device 120 can retrieve the encoded video data from the storage medium.
[0055] In another example, channel 130 may include a storage server that can store the video data encoded by encoding device 110. In this example, decoding device 120 can download the stored encoded video data from the storage server. Optionally, the storage server can store and transmit the encoded video data to decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
[0056] In some embodiments, the encoding device 110 includes a video encoder 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.
[0057] In some embodiments, the encoding device 110 may include a video source 111 in addition to the video encoder 112 and the input interface 113.
[0058] The video source 111 may include at least one of a video capture device (e.g., a video camera), a video archive, a video input interface, and a computer graphics system, wherein the video input interface is used to receive video data from a video content provider, and the computer graphics system is used to generate video data.
[0059] Video encoder 112 encodes video data from video source 111 to generate a bitstream. The video data may include one or more pictures or a sequence of pictures. The bitstream contains the encoding information of the pictures or picture sequences in the form of a bitstream. The encoding information may include encoded image data and associated data. The associated data may include a sequence parameter set (SPS), a picture parameter set (PPS), and other syntax structures. The SPS may contain parameters applied to one or more sequences. The PPS may contain parameters applied to one or more pictures. A syntax structure refers to a set of zero or more syntax elements arranged in a specified order within the bitstream.
[0060] The video encoder 112 transmits the encoded video data directly to the decoding device 120 via the output interface 113. The encoded video data can also be stored on a storage medium or a storage server for subsequent retrieval by the decoding device 120.
[0061] In some embodiments, the decoding device 120 includes an input interface 121 and a video decoder 122.
[0062] In some embodiments, in addition to the input interface 121 and the video decoder 122, the decoding device 120 may also include a display device 123.
[0063] The input interface 121 includes a receiver and / or a modem. The input interface 121 can receive encoded video data through channel 130.
[0064] The video decoder 122 is used to decode the encoded video data to obtain the decoded video data, and transmit the decoded video data to the display device 123.
[0065] Display device 123 displays the decoded video data. Display device 123 may be integrated with decoding device 120 or external to decoding device 120. Display device 123 may include various display devices, such as liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, or other types of display devices.
[0066] also, Figure 1 This is merely an example; the technical solutions in the embodiments of this application are not limited to... Figure 1 For example, the technology of this application can also be applied to one-sided video encoding or one-sided video decoding.
[0067] The video encoding and decoding framework involved in the embodiments of this application is described below.
[0068] Figure 2 A schematic diagram of the coding framework provided in the embodiments of this application.
[0069] like Figure 2 As shown, the coding framework includes: a prediction unit 11, a residual generation unit 12, a transform unit 13, a quantization unit 14, an inverse quantization unit 15, an inverse transform unit 16, a reconstruction unit 17, a filtering unit 18, and an entropy coding unit 19. The prediction unit 11 includes an inter-frame prediction unit 11a and an intra-frame prediction unit 112. The inter-frame prediction unit 11a includes a motion estimation unit 11a1 and a motion compensation unit 11a2.
[0070] After receiving the video, the encoding end divides each frame of the video into multiple image blocks to be encoded. For the current image block to be encoded, the prediction unit 11 first predicts the current image block by referring to the reconstructed image block, thus obtaining the prediction information for the current image block. The encoding end can use inter-frame prediction or intra-frame prediction techniques to obtain the prediction information.
[0071] Specifically, the motion estimation unit 11a1 in the inter-frame prediction unit 11a can search the list of reference images to find the reference block of the image block to be encoded. The motion estimation unit 11a1 can generate an index indicating the reference block and a motion vector indicating the spatial displacement between the image block to be encoded and the reference block. The motion estimation unit 11a1 can output the index of the reference block and the motion vector as the motion information of the image block to be encoded. The motion compensation unit 11a2 can obtain the prediction information of the image block to be encoded based on the motion information of the image block to be encoded.
[0072] The intra-prediction unit 112 can generate prediction information for the current image block to be encoded using an intra-prediction mode. Currently, there are 15 intra-prediction modes, including Planar mode, DC mode, and 13 angle prediction modes. The intra-prediction unit 112 can also use intra-block copy (IBC) and intra-string copy (ISC) techniques.
[0073] The residual generation unit 12 subtracts the prediction information from the original signal of the current image block to be encoded to obtain the residual signal. After prediction, the amplitude of the residual signal is much smaller than that of the original signal. The transform unit 13 and the quantization unit 14 perform transform and quantization operations on the residual signal. After transform quantization, transform quantization coefficients are obtained. The entropy coding unit 19 encodes the quantization coefficients and other indication information in the encoding using entropy coding technology to obtain the bitstream.
[0074] Furthermore, the encoding end also needs to reconstruct the current image block to be encoded to provide reference pixels for encoding subsequent image blocks. Specifically, after obtaining the transform quantization coefficients of the current image block to be encoded, the inverse quantization unit 15 and the inverse transform unit 16 perform inverse quantization and inverse transform on the transform quantization coefficients of the current image block to be encoded to obtain the reconstructed residual signal. The reconstruction unit 17 adds the reconstructed residual signal to the prediction information corresponding to the current image block to be encoded to obtain the reconstructed signal of the current image block to be encoded, and obtains the reconstructed image block based on the reconstructed signal. Further, the filtering unit 18 can filter the reconstructed image block, which can employ deblocking filtering, Sample Adaptive Offset (SAO), or Adaptive Loop Filter (ALF), etc. The reconstructed image block can then be used to predict subsequent image blocks to be encoded.
[0075] Figure 3 This is a schematic diagram of the decoding framework provided in an embodiment of this application.
[0076] like Figure 3 As shown, the decoding framework includes: an entropy decoding unit 21, a prediction unit 22, an inverse quantization unit 23, an inverse transform unit 24, a reconstruction unit 25, and a filtering unit 26. The prediction unit 22 includes: a motion compensation unit 221 and an intra-frame prediction unit 222.
[0077] Specifically, after the decoding end acquires the bitstream, the entropy decoding unit 21 first performs entropy decoding on the bitstream to obtain the transform quantization coefficients of the current image block to be reconstructed. Then, the inverse quantization unit 23 and the inverse transform unit 24 perform inverse quantization and inverse transform on the transform quantization coefficients to obtain the residual signal of the reconstructed image block. The prediction unit 22 predicts the current image block to be reconstructed to obtain the prediction information of the current image block to be reconstructed. If the prediction unit 22 uses inter-frame prediction, the motion compensation unit 221 can construct a first reference image list (list 0) and a second reference image list (list 1) based on the syntax elements parsed from the bitstream. In addition, the entropy decoding unit 21 can parse the motion information of the image block to be reconstructed. The motion compensation unit 221 can determine one or more reference blocks of the image block to be reconstructed based on this motion information. The motion compensation unit 221 can generate the prediction information of the image block to be reconstructed based on one or more reference blocks. If prediction unit 22 uses intra-frame prediction, entropy decoding unit 21 can parse the index of the intra-frame prediction mode used. Intra-frame prediction unit 222 can then use this intra-frame prediction mode to perform intra-frame prediction based on the index, thereby obtaining the prediction information of the image block to be reconstructed. Intra-frame prediction unit 222 can also use IBC or ISC technologies, etc.
[0078] Further, the reconstruction unit 25 is used to add the prediction information and the reconstructed residual signal to obtain the reconstruction signal of the current image block to be reconstructed, and then obtain the current reconstructed image block corresponding to the current image block to be reconstructed based on the reconstruction signal. The current reconstructed image block can be used to predict other subsequent image blocks to be reconstructed. Similar to the case at the encoding end, optionally, the filtering unit 26 at the decoding end can filter the current reconstructed image block.
[0079] It should be noted that the block partitioning information determined at the encoding end, as well as mode information or parameter information such as prediction, transform, quantization, entropy coding, and loop filtering, are carried in the bitstream when necessary. The decoding end determines the same block partitioning information, prediction, transform, quantization, entropy coding, and loop filtering mode information or parameter information as the encoding end by parsing the bitstream and analyzing existing information, thereby ensuring that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end.
[0080] The above describes the basic flow of a video codec under a block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or flow may be optimized. This application is applicable to the basic flow of a video codec under this block-based hybrid coding framework, but is not limited to this framework and flow.
[0081] Current mainstream video coding standards, such as HEVC, VVC, and AVS3, all employ block-based hybrid coding frameworks. They divide the raw video data into a series of coded blocks and combine prediction, transform, and entropy coding methods to achieve video data compression. Motion compensation is a commonly used prediction method in video coding. Based on the redundancy characteristics of video content in the temporal or spatial domains, motion compensation derives the predicted value of the current coded block from the already coded regions. These prediction methods include inter-frame prediction, intra-frame block copy prediction, and intra-frame string copy prediction. In specific coding implementations, these prediction methods may be used individually or in combination. For coded blocks using these prediction methods, one or more two-dimensional displacement vectors are typically explicitly or implicitly encoded in the bitstream to indicate the displacement of the current block (or its sibling blocks) relative to one or more reference blocks.
[0082] It should be noted that the displacement vector may have different names in different prediction modes and implementations. This application will uniformly describe it in the following manner:
[0083] 1) The displacement vector in inter-frame prediction is called the motion vector (MV);
[0084] 2) The displacement vector in intra-frame block copying is called the block vector (BV);
[0085] 3) The displacement vector in intra-frame string copying is called the string vector (SV).
[0086] The following describes the relevant technologies involved in this application:
[0087] Inter-frame copying
[0088] Figure 4 This is a schematic diagram illustrating inter-frame copying as described in an embodiment of this application. Figure 4 As shown, inter-frame prediction utilizes the correlation in the video's temporal domain to predict the pixels of the current image using pixels from neighboring encoded images, thereby effectively removing temporal redundancy and saving bits of encoded residual data. Here, P is the current frame, Pr is the reference frame, B is the current block to be encoded, and Br is the reference block of B. B' and B have the same coordinate position in the image; Br's coordinates are (xr, yr), and B''s coordinates are (x, y). The displacement between the current encoded block and its reference block is called the motion vector, which is determined according to the following formula (1):
[0089] MV = (xr-x, yr-y) (1)
[0090] Where MV is the motion vector.
[0091] Intra Block Copy (IBC) is an intra-frame coding tool adopted in the HEVC Screen Content Coding (SCC) extension, significantly improving the coding efficiency of screen content. AVS3 and VVC also employ IBC technology to enhance screen content coding performance. IBC leverages the spatial correlation of screen content video, using already encoded image pixels in the current frame to predict the pixels of the current block to be encoded, effectively saving the bits required to encode pixels. For example... Figure 5 As shown, the offset between the current coded block and its reference block in IBC is called the block vector (BV). H.266 / VVC uses a technique similar to inter-frame prediction BV prediction to further save the bits required to encode the BV.
[0092] Intra String Copy (ISC), also known as string-copy intra-prediction, divides a coded block into a series of pixel strings or unmatched pixels according to a certain scanning order (raster scan, round-trip scan, and Zig-Zag scan, etc.). Similar to IBC, each string searches for a reference string of the same shape in the currently coded region of the image, deriving the predicted value of the current string. By encoding the residual between the current string's pixel value and the predicted value, instead of directly encoding the pixel value, bits can be effectively saved. Intra String Copy is employed in this technique. Figure 6 This is a schematic diagram of intra-string copying according to an embodiment of this application. The dark gray area represents the encoded area, the 28 white pixels represent string 1, the 35 light gray pixels represent string 2, and the 1 black pixel represents an unmatched pixel (an unmatched pixel is also called an isolated point; the pixel value of an unmatched pixel is directly encoded instead of being derived from the predicted value of the reference string). The reference string for string 1 is to its left, and the displacement of string 1 to its corresponding reference string is represented by string vector 1. The reference string for string 2 is above it, and the displacement of string 2 to its corresponding reference string is represented by string vector 2.
[0093] Intra-frame string copying requires encoding the string vector (SV), string length, and a flag indicating whether a matching string exists for each string in the current coding block. The string vector (SV) represents the displacement of the string to be encoded from its reference string. The string length represents the number of pixels contained in the string.
[0094] Current prediction methods leverage the spatial correlation of screen content video, using already encoded image pixels in the current image to predict the pixels of the current block to be encoded, effectively saving the bits required for encoding pixels. For an image block, current prediction techniques directly use a reference block as the reference for the current block. However, screen content video often contains a large number of symmetrical and similar image contents, which, after adjustment, can also provide accurate predictions for the current block. Current prediction techniques (such as IBC) fail to utilize this characteristic to eliminate redundancy in the image, resulting in low encoding and decoding efficiency.
[0095] To address the aforementioned technical issues, the video encoding / decoding method provided in this application performs adjustments such as filtering and / or pixel rearrangement on the reference block of the current block for the current block, thereby deriving the predicted value of the current block and improving the efficiency of video encoding / decoding.
[0096] The technical solutions provided in this application will be described in detail below with reference to specific embodiments.
[0097] Figure 7 This is a flowchart illustrating a video decoding method provided in an embodiment of this application. The method of this embodiment is applied to... Figure 1 or Figure 3 The decoding end shown is as follows: Figure 7 As shown, it includes:
[0098] S710. Decode the bitstream of the block to be decoded and determine the initial reference block of the block to be decoded.
[0099] The execution subject of this application embodiment includes, but is not limited to, the following devices: decoder, or device for performing image decoding, such as desktop computer, mobile computing device, laptop (e.g., laptop computer), tablet computer, set-top box, smartphone and other handheld device, television, camera, display device, digital media player, video game console, vehicle computer, or the like.
[0100] In some embodiments, the block to be decoded may also be referred to as the current block, or image block, or current decoding block, or image block to be decoded, or image block to be processed, etc.
[0101] After the decoding end obtains the bitstream of the block to be decoded, it parses the bitstream to obtain the prediction information of the block to be decoded, which includes, for example, the prediction method and block vector information.
[0102] The decoding end determines the reference block of the block to be decoded based on the block vector information of the block to be decoded carried in the bit stream. For ease of description, this reference block is referred to as the initial reference block of the block to be decoded.
[0103] Optionally, the block vector information of the block to be decoded includes a block vector value, so that the decoding end can determine the block vector bv of the block to be decoded based on the block vector value, where the block vector bv is used to indicate the position of the reference block. For example Figure 5 As shown, the block vector is the displacement between the current block and the reference block. This allows us to determine the position of the reference block in the image based on the position information of the current block and the block vector.
[0104] In some embodiments, to reduce the encoding rate, the encoding end can process the block vectors, for example, by processing the block vectors according to the block vector resolution, and then encoding the processed block vectors. Thus, after the decoding end parses the block vector information from the bitstream, it processes the parsed block vector information using the block vector resolution (BVR) to obtain the recovered block vectors. The block vector resolution (BVR) indicates the precision of the block vectors. Next, using the recovered block vectors and the position information of the block to be decoded, the position information of the initial reference block of the block to be decoded is determined.
[0105] Optionally, the decoder can parse the block vector resolution (BVR) of the block to be decoded from the bitstream.
[0106] Optionally, the decoding end may set the default block vector resolution (BVR) to the block vector resolution (BVR) of the block to be decoded.
[0107] S720. Determine the target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block.
[0108] In some embodiments, the filtering and / or rearrangement operation of the reference block described in this application can also be understood as filtering and / or rearrangement operation of the initial prediction value of the block to be decoded.
[0109] In some embodiments, the above target adjustment method is the default adjustment method.
[0110] In some embodiments, the above S720 includes the following S720-A1 and S720-A2:
[0111] S720-A1. Determine the value of the reference block adjustment index pred_adjust_index, wherein the reference block adjustment index pred_adjust_index is used to indicate the target adjustment method;
[0112] S720-A2, Adjust the index value according to the reference block to determine the target adjustment method.
[0113] The correspondence between the reference block adjustment index value and the adjustment method involved in the embodiments of this application includes, but is not limited to, the following examples:
[0114] Example 1: The reference block adjustment index consists of N values, each corresponding to a target adjustment method, where N is a positive integer greater than or equal to 3. In this example, the correspondence between the reference block adjustment index values and the adjustment methods is shown in Table 1.
[0115] Table 1
[0116] Reference block adjustment index Adjustment method 1 Adjustment Method 1 2 Adjustment Method 2 3 Adjustment method 3 …… ……
[0117] The adjustment methods mentioned above are all different.
[0118] For example, the adjustment methods mentioned above include any one of the following: filtering method, rearrangement method, rearrangement after filtering method, filtering after rearrangement method, and partial rearrangement after filtering method. For instance, adjustment method 1 is a filtering method, adjustment method 2 is a rearrangement method, adjustment method 3 is a rearrangement after filtering method, adjustment method 4 is a filtering after rearrangement method, and adjustment method 5 is a partial rearrangement after filtering method.
[0119] Here, filtering refers to filtering the pixels in the initial reference block, such as filtering out block artifacts in the initial reference block. Depending on the filtering function used, filtering methods can be further divided into various different filtering operations, which this application does not limit.
[0120] In some embodiments, the filtering operation of this application may include the following steps:
[0121] Step 1) Determine pixelUp and pixelLeft;
[0122] Step 2) Filter pixel i in the original reference block according to the following formula (2):
[0123] pred_block1(x,y)=w0*pred_block0(x,y)+w1*pixelUp(x)+w2*pixelLeft(y)+b (2)
[0124] Where (x, y) are the position coordinates of the pixel in the reference block, pred_block0(x, y) is the pixel value of pixel i in the original reference block, and pred_block1(x, y) is the filtered pixel value of pixel i.
[0125] The width and height of the reference block and the current block are w and h, respectively.
[0126] In some embodiments, pixelUp and pixelLeft in equation (2) above can be derived according to the following methods one and two:
[0127] Method 1: pixelUp is the row of adjacent pixels above the current block, with a length of w; pixelLeft is the column of adjacent pixels to the left of the current block, with a length of h.
[0128] Method 2: pixelUp is the top row of adjacent pixels in the reference block, with a length of w; pixelLeft is the leftmost column of adjacent pixels in the reference block, with a length of h.
[0129] In some embodiments, the above formula (2) can be used to filter some rows or some columns of the reference block.
[0130] In one example, w0, w1, w2, and b can be fixed values.
[0131] In another example, the values of w0, w1, w2, and b can be derived from other conditions.
[0132] Optionally, w0, w1, w2, and b can have different values depending on the size of the reference block, or they can vary depending on the value of x or y, or they can vary depending on the value of pred_adjust_index.
[0133] Optionally, b can be set to the difference between the pixel adjacent to the current block (e.g., the pixel to the left of the top-left corner of the current block, or the pixel above it) and the pixel at the top-left corner of the reference block.
[0134] Optionally, the values of w1 and w2 can be 0.
[0135] Optionally, for all pred_adjust_index, w0=1, w1=0, w2=0, b=1.
[0136] Optionally, for all pred_adjust_index, w0 = 1, w1 = 0, w2 = 0, b = -1.
[0137] Optionally, when pred_adjust_index is 0, w0 = 0.875, w1 = 0, w2 = 0.125, and b = 0.
[0138] Optionally, when pred_adjust_index is 1, w0 = 0.875, w1 = 0.125, w2 = 0, and b = 0.
[0139] In this context, "rearrangement" refers to the arrangement and combination of pixel positions within the initial reference block, thereby altering the spatial distribution of pixels. In this application, "rearrangement" can be understood as an abbreviation for "reordering." Depending on the rearrangement function used, rearrangement can be further divided into various rearrangement operations. These operations may include horizontal flipping, vertical flipping, simultaneous horizontal or vertical flipping, rotation, translation, or rearrangement operations that arbitrarily adjust the pixel positions within the initial reference block.
[0140] The filtering and rearrangement method refers to first filtering the pixels in the initial reference block, for example, using the filtering method described above to filter the pixels in the initial reference block. Then, the pixels in the filtered initial reference block are rearranged, for example, using the rearrangement method described above to rearrange the pixels in the filtered initial reference block.
[0141] The rearrangement-based filtering method refers to first rearranging the pixels in the initial reference block, for example, using the rearrangement method described above. Then, filtering is performed on the rearranged pixels in the initial reference block, for example, using the filtering method described above.
[0142] The partial filtering and rearrangement method refers to first filtering a portion of the pixels in the initial reference block (e.g., the top, bottom, or near the block to be decoded). For example, the filtering method described above can be used to filter a portion of the pixels in the initial reference block. Then, a rearrangement operation is performed on a portion or all of the pixels in the filtered initial reference block. For example, the rearrangement method described above can be used to rearrange the pixels in the filtered initial reference block.
[0143] It should be noted that the adjustment methods involved in the embodiments of this application include, but are not limited to, the above-mentioned adjustment methods.
[0144] In this example, the method for determining the reference block adjustment index value in S720-A1 above includes parsing the reference block adjustment index value from the bitstream. For example, the encoder calculates the encoding cost corresponding to each of the above adjustment methods, determines the adjustment method with the lowest encoding cost as the target adjustment method, and encodes the reference block adjustment index value corresponding to the target adjustment method into the bitstream. In this way, the decoder directly parses the reference block adjustment index value from the bitstream and, according to Table 1, determines the adjustment method corresponding to the reference block adjustment index value as the target adjustment method.
[0145] Example 2: The reference block adjustment index has two values, each corresponding to a target adjustment method. In this example, the correspondence between the reference block adjustment index values and the adjustment methods is shown in Table 2.
[0146] Table 2
[0147] Reference block adjustment index Adjustment method First value The first adjustment method Second value The second adjustment method
[0148] The first adjustment method includes any of the following: filtering method, rearrangement method, rearrangement after filtering method, filtering after rearrangement method, and partial rearrangement after filtering method.
[0149] The second adjustment method includes any of the following: filtering, rearrangement, rearrangement after filtering, filtering after rearrangement, and partial rearrangement after filtering. However, the first adjustment method differs from the second adjustment method.
[0150] In the example, the methods for determining the value of the reference block adjustment index in S720-A1 above include, but are not limited to, the following:
[0151] Method 1 involves parsing the reference block adjustment index from the bitstream. In this method, the encoder determines the target adjustment mode of the initial reference block for the block to be decoded and directly encodes the reference block adjustment index corresponding to that target adjustment mode into the bitstream. This allows the decoder to directly parse the reference block adjustment index from the bitstream, reducing the workload of the decoder and improving decoding efficiency.
[0152] Method 2: Determine the value of the reference block adjustment index based on the positional relationship between the initial reference block and the block to be decoded.
[0153] Method 3: Determine the value of the reference block adjustment index based on the size of the initial reference block.
[0154] In some embodiments, determining the value of the reference block adjustment index based on the positional relationship between the initial reference block and the block to be decoded in the second method described above includes: if the initial reference block is located above the block to be decoded, then the value of the reference block adjustment index is determined to be a first value; if the initial reference block is located to the left of the block to be decoded, then the value of the reference block adjustment index is determined to be a second value.
[0155] It should be noted that the above example of determining the reference block adjustment index value as the first value if the initial reference block is above the block to be decoded, and as the second value if the initial reference block is to the left of the block to be decoded, is merely an example. This embodiment can also determine the reference block adjustment index value based on other positional relationships between the initial reference block and the block to be decoded. For example, if the initial reference block is to the upper left of the block to be decoded, the reference block adjustment index value is determined to be either the first or the second value; if the initial reference block is to the upper right of the block to be decoded, the reference block adjustment index value is determined to be either the first or the second value.
[0156] In some embodiments, determining the value of the reference block adjustment index based on the size of the initial reference block in Method 2 above includes: if the width of the initial reference block is greater than its height, then determining the value of the reference block adjustment index to be a first value; if the width of the initial reference block is less than or equal to its height, then determining the value of the reference block adjustment index to be a second value.
[0157] It should be noted that the above example of determining the reference block adjustment index value as the first value if the width of the initial reference block is greater than its height, and as the second value if the width of the initial reference block is less than or equal to its height, is just one example. For instance, it could also be that the reference block adjustment index value is determined as the first value if the width of the initial reference block is greater than its preset height, and as the second value if the width of the initial reference block is less than its preset height.
[0158] This embodiment does not impose any restrictions on the specific values of the first and second values mentioned above.
[0159] In the example, the first value is 0.
[0160] In the example, the second value is 1.
[0161] In some embodiments, determining the target adjustment method in S720-A2 above based on the value of the reference block adjustment index includes:
[0162] If the value of the reference block adjustment index is the first value, then the target adjustment method is determined to be the first adjustment method;
[0163] If the value of the reference block adjustment index is the second value, then the target adjustment method is determined to be the second adjustment method.
[0164] The first adjustment method and the second adjustment method include any one of the following adjustment methods: filtering method, rearrangement method, filtering followed by rearrangement method, rearrangement followed by filtering method, and partially filtering followed by rearrangement method, and the first adjustment method and the second adjustment method are different.
[0165] S730. Adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block.
[0166] According to the method of S720 above, the target adjustment method of the block to be decoded is determined, and the pixels in the initial reference block are adjusted using the target adjustment method to obtain the adjusted reference block.
[0167] For example, if the target adjustment method is a filtering and rearrangement method, the pixels in the initial reference block are first filtered. The pixels in the filtered initial reference block are then rearranged to eliminate redundancy in the image and improve decoding efficiency.
[0168] S740. Determine the prediction block of the block to be decoded based on the adjusted reference block.
[0169] In some embodiments, the adjusted reference block is processed to obtain the prediction block of the block to be decoded.
[0170] In some embodiments, the adjusted reference block is used as the prediction block of the block to be decoded.
[0171] This embodiment also includes decoding the bitstream of the block to be decoded, determining the residual block of the block to be decoded, and obtaining the reconstructed block of the block to be decoded based on the residual block and the prediction block of the block to be decoded.
[0172] The methods for determining the residual block of the block to be decoded and for determining the large reconstruction block of the block to be decoded based on the residual block and the prediction block are based on existing technologies and will not be described in detail in this embodiment.
[0173] The decoding method of this application embodiment involves the decoding end determining an initial reference block of the block to be decoded by decoding the bitstream of the block to be decoded; determining a target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block; adjusting the pixels in the initial reference block according to the target adjustment method to obtain an adjusted reference block; and determining a prediction block of the block to be decoded based on the adjusted reference block, thereby effectively eliminating redundancy in the image and improving decoding efficiency.
[0174] Based on the above embodiments, this application embodiment further includes a reference block adjustment flag pred_adjust_flag, which is used to indicate whether the initial reference block of the block to be decoded is adjusted.
[0175] Figure 8 This is a flowchart illustrating a video decoding method provided in an embodiment of this application, as shown below. Figure 8 As shown, the method in this application embodiment includes:
[0176] S801. Determine the value of the reference block adjustment flag. The reference block adjustment flag is used to indicate whether the initial reference block of the block to be decoded should be adjusted.
[0177] S802. Based on the value of the reference block adjustment flag, determine whether to determine the value of the reference block adjustment index.
[0178] For example, if the value of the reference block adjustment flag is determined to be the third value, then the value of the reference block adjustment index is determined. When the value of the reference block adjustment flag is the third value, it indicates that the initial reference block of the block to be decoded should be adjusted.
[0179] For example, if the value of the reference block adjustment flag is determined to be the fourth value, the step of determining the value of the reference block adjustment index is skipped. When the value of the reference block adjustment flag is the fourth value, it indicates that the initial reference block of the block to be decoded is not adjusted.
[0180] This embodiment does not impose any restrictions on the specific values of the third and fourth values.
[0181] For example, the third value is 1.
[0182] For example, the fourth value is 0.
[0183] In some embodiments, determining the value of the reference block adjustment flag in S801 above includes, but is not limited to, the following methods:
[0184] Method 1: Parse the value of the reference block adjustment flag from the bitstream.
[0185] In one possible implementation of this method, when the encoder determines that the initial reference block of the block to be decoded needs adjustment, it encodes the reference block adjustment flag into the bitstream with a third value. If the encoder determines that the initial reference block of the block to be decoded does not need adjustment, it does not encode the reference block adjustment flag into the bitstream. Thus, if the decoder parses the reference block adjustment flag from the bitstream and finds it to be a third value, it determines that the initial reference block of the block to be decoded needs adjustment; if the decoder does not parse the reference block adjustment flag from the bitstream, it determines that the initial reference block of the block to be decoded does not need adjustment.
[0186] In another possible implementation of this method, when the encoder determines that the initial reference block of the block to be decoded needs adjustment, it determines the value of the reference block adjustment flag to be a third value and encodes the third value into the bitstream. If the encoder determines that the initial reference block of the block to be decoded does not need adjustment, it determines the value of the reference block adjustment flag to be a fourth value and encodes the fourth value into the bitstream. Thus, if the decoder parses the reference block adjustment flag from the bitstream and finds that the value is the third value, it determines that the initial reference block of the block to be decoded needs adjustment; if the decoder parses the reference block adjustment flag from the bitstream and finds that the value is the fourth value, it determines that the initial reference block of the block to be decoded does not need adjustment.
[0187] Method 2: Determine the value of the reference block adjustment flag based on the feature information of the block to be decoded.
[0188] This embodiment does not limit the feature information of the block to be decoded, and it can be any feature information of the block to be decoded, such as the size of the block to be decoded, block vector information, etc.
[0189] In some embodiments, the feature information of the block to be decoded includes one or more of the following: the size of the block to be encoded / decoded, the size of the block vector resolution of the block to be decoded, and the block vector value of the block to be decoded.
[0190] In this embodiment, the method for determining the value of the reference block adjustment flag varies depending on the different feature information of the block to be decoded.
[0191] In one possible implementation, if the feature information of the block to be decoded includes the size of the block to be encoded, then determining the value of the reference block adjustment flag based on the feature information of the block to be decoded includes:
[0192] If it is determined that the width and height of the block to be decoded are both equal to the first preset value, the value of the reference block adjustment flag is determined to be the third value;
[0193] If it is determined that the width and height of the block to be decoded are both equal to the first preset value, the value of the reference block adjustment flag is determined to be the fourth value.
[0194] This embodiment does not limit the specific value of the first preset value.
[0195] For example, the first preset value is 16.
[0196] In one possible implementation, if the feature information of the block to be decoded includes the block vector resolution of the block to be decoded, then the value of the reference block adjustment flag is determined based on the feature information of the block to be decoded, including:
[0197] If it is determined that the block vector resolution of the block to be decoded is equal to the second preset value, the value of the reference block adjustment flag is determined to be the third value;
[0198] If it is determined that the block vector resolution of the block to be decoded is greater than the second preset value, the value of the reference block adjustment flag is determined to be the fourth value.
[0199] This embodiment does not limit the specific value of the second preset value.
[0200] For example, the second preset value mentioned above is 1.
[0201] In one possible implementation, if the feature information of the block to be decoded includes the block vector value of the block to be decoded, then the value of the reference block adjustment flag is determined based on the feature information of the block to be decoded, including:
[0202] If the block vector value of the block to be decoded is determined to be less than or equal to the third preset value, the value of the reference block adjustment flag is determined to be the third value.
[0203] If the block vector value of the block to be decoded is determined to be greater than the third preset value, the value of the reference block adjustment flag is determined to be the fourth value.
[0204] This embodiment does not impose any restrictions on the specific value of the third preset value mentioned above.
[0205] S803. If the value of the reference block adjustment flag is the third value, determine the value of the reference block adjustment index.
[0206] Based on the above steps, if the value of the reference block adjustment flag is determined to be the third value, then the initial reference block of the block to be decoded is determined to be adjusted. Next, the value of the reference block adjustment index is determined to determine the target adjustment method.
[0207] The process of determining the value of the reference block adjustment index is described in S720-A1 above, and will not be repeated here.
[0208] S804. Adjust the index value according to the reference block to determine the target adjustment method.
[0209] S805. Adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block.
[0210] S806. Determine the prediction block of the block to be decoded based on the adjusted reference block.
[0211] The execution process of S804 to S806 is described in S720-A2, S730 and S740 above, and will not be repeated here.
[0212] This application embodiment sets a reference block adjustment flag to indicate whether the initial reference block of the block to be decoded should be adjusted. In this way, the decoding end first determines whether to adjust the initial reference block of the block to be decoded based on the value of the reference block adjustment flag. When it is determined that the initial reference block of the block to be decoded should be adjusted, the subsequent adjustment operation is performed, thereby improving the accuracy of the adjustment, avoiding the decoding end from doing useless work, and further improving the decoding efficiency.
[0213] The above text combined Figure 7 and Figure 8 This section introduces the video decoding methods provided by the decoding end. Based on this, the following section takes the encoding end as an example to introduce the video decoding methods of the encoding end.
[0214] Figure 9 This is a schematic flowchart illustrating a video encoding method provided in one embodiment of this application. Figure 9 As shown, the encoding method of this embodiment includes:
[0215] S901. Obtain the block to be encoded and process it to obtain the initial reference block of the block to be encoded.
[0216] In some embodiments, the block to be encoded may also be referred to as the current block, the image block to be encoded, the image block to be processed, the image block currently to be encoded, etc.
[0217] The method for determining the initial reference block of the block to be encoded in this step can refer to existing technologies. For example, the reference block of the block to be encoded can be found in the encoded area of the current image and used as the initial reference block of the block to be encoded.
[0218] S902. Determine the target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block.
[0219] In some embodiments, the filtering and / or rearrangement operation of the reference block described in this application can also be understood as filtering and / or rearrangement operation of the initial prediction value of the block to be encoded.
[0220] In some embodiments, the encoder calculates the encoding cost corresponding to each adjustment method shown in Table 1 above, and selects the adjustment method with the lowest encoding cost as the target adjustment method.
[0221] In some embodiments, the methods for determining the target adjustment method for adjusting the initial reference block in S902 above include, but are not limited to, the following:
[0222] Method 1: Determine the target adjustment method based on the positional relationship between the initial reference block and the block to be encoded.
[0223] In some embodiments, the first method described above includes: if the initial reference block is located above the block to be encoded, then the target adjustment method is determined to be a first adjustment method; if the initial reference block is located to the left of the block to be encoded, then the target adjustment method is determined to be a second adjustment method.
[0224] Optionally, the target adjustment method includes a first adjustment method or a second adjustment method, wherein the first adjustment method and the second adjustment method include any one of the following adjustment methods: filtering method, rearrangement method, filtering followed by rearrangement method, rearrangement followed by filtering method, and partially filtering followed by rearrangement method, and the first adjustment method is different from the second adjustment method.
[0225] It should be noted that the above-described method of determining the target adjustment method as the first adjustment method if the initial reference block is located above the block to be encoded, and as the second adjustment method if the initial reference block is located to the left of the block to be encoded, is merely an example. This embodiment can also determine the target adjustment method based on other positional relationships between the initial reference block and the block to be encoded. For example, if the initial reference block is located to the upper left of the block to be encoded, the target adjustment method is determined to be either the first or second adjustment method; if the initial reference block is located to the upper right of the block to be encoded, the target adjustment method is determined to be either the first or second adjustment method.
[0226] Method 2: Determine the target adjustment method based on the size of the initial reference block.
[0227] In some embodiments, the second method described above includes: if the width of the initial reference block is greater than its height, then the target adjustment method is determined to be a first adjustment method; if the width of the initial reference block is less than or equal to its height, then the target adjustment method is determined to be a second adjustment method.
[0228] It should be noted that the above-described method of determining the target adjustment method as the first adjustment method if the width of the initial reference block is greater than its height, and determining the target adjustment method as the second adjustment method if the width of the initial reference block is less than or equal to its height, is merely an example. For instance, it could also be that if the width of the initial reference block is greater than a preset height value, the target adjustment method is determined as the first adjustment method; and if the width of the initial reference block is less than a preset height value, the target adjustment method is determined as the second adjustment method.
[0229] In some embodiments, the present application further includes: determining a value of a reference block adjustment index according to the target adjustment method, the reference block adjustment index being used to indicate the target adjustment method; and encoding the value of the reference block adjustment index into the bitstream.
[0230] For example, if the target adjustment method is the first adjustment method, then the value of the reference block adjustment index is determined to be a first value.
[0231] For example, if the target adjustment method is the second adjustment method, then the value of the reference block adjustment index is determined to be the second value.
[0232] This embodiment does not impose any restrictions on the specific values of the first and second values.
[0233] For example, the first value is 1.
[0234] For example, the second value is 0.
[0235] In this embodiment, the encoder determines the target adjustment method of the initial reference block of the block to be decoded, and directly encodes the value of the reference block adjustment index corresponding to the target adjustment method into the bitstream. In this way, the decoder can directly parse the value of the reference block adjustment index from the bitstream, reducing the workload of the decoder and improving decoding efficiency.
[0236] S903. Adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block.
[0237] S904. Determine the prediction block of the block to be encoded based on the adjusted reference block.
[0238] The implementation process of S903 and S904 can be referred to the description of S730 and S740 above, and will not be repeated here.
[0239] This embodiment also includes encoding the bitstream of the block to be encoded, determining the residual block of the block to be encoded, and obtaining the reconstructed block of the block to be encoded based on the residual block and the prediction block.
[0240] The methods for determining the residual block of the block to be encoded and the method for determining the large reconstruction block of the block to be encoded based on the residual block and the prediction block are the same as those in the existing technology, and will not be described in detail in this embodiment.
[0241] The encoding method of this application embodiment involves the encoding end acquiring the block to be encoded and determining an initial reference block for the block to be encoded; determining a target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block; adjusting the pixels in the initial reference block according to the target adjustment method to obtain an adjusted reference block; and determining a prediction block for the block to be encoded based on the adjusted reference block, thereby effectively eliminating redundancy in the image and improving encoding efficiency.
[0242] Figure 10 This is a schematic flowchart illustrating a video encoding method provided in one embodiment of this application. Figure 10 As shown, the encoding method in this embodiment includes:
[0243] S101. Based on the feature information of the block to be encoded, determine whether to adjust the initial reference block of the block to be encoded.
[0244] This embodiment does not limit the feature information of the block to be encoded, and it can be any feature information of the block to be encoded, such as the size of the block to be encoded, block vector information, etc.
[0245] In some embodiments, the feature information of the block to be encoded includes one or more of the following: the size of the block to be encoded, the size of the block vector resolution of the block to be encoded, and the block vector value of the block to be encoded.
[0246] In some embodiments, if the feature information of the block to be encoded includes the size of the block to be encoded, then S101 includes: if it is determined that the width and height of the block to be encoded are both equal to a first preset value, then it is determined that the initial reference block of the block to be encoded is adjusted; if it is determined that the width and height of the block to be encoded are both equal to the first preset value, then it is determined that the initial reference block of the block to be encoded is not adjusted.
[0247] In some embodiments, if the feature information of the block to be encoded includes the block vector resolution of the block to be encoded, then S101 includes: if it is determined that the block vector resolution of the block to be encoded is equal to a second preset value, determining to adjust the initial reference block of the block to be encoded; if it is determined that the block vector resolution of the block to be encoded is greater than the second preset value, determining not to adjust the initial reference block of the block to be encoded.
[0248] In some embodiments, if the feature information of the block to be encoded includes the block vector value of the block to be encoded, then S101 includes: if it is determined that the block vector value of the block to be encoded is less than or equal to a third preset value, determining to adjust the initial reference block of the block to be encoded; if it is determined that the block vector value of the block to be encoded is greater than the third preset value, determining not to adjust the initial reference block of the block to be encoded.
[0249] In some embodiments, this embodiment further includes: determining the value of a reference block adjustment flag, the reference block adjustment flag being used to indicate whether the initial reference block of the block to be encoded should be adjusted; and encoding the value of the reference block adjustment flag into the bitstream.
[0250] For example, if it is determined that the initial reference block of the block to be encoded needs to be adjusted, the value of the reference block adjustment flag is determined to be the third value, and the third value is encoded into the bitstream.
[0251] For example, if it is determined that the initial reference block of the block to be encoded will not be adjusted, then the value of the reference block adjustment flag is determined to be the fourth value, and the fourth value is encoded into the bitstream.
[0252] S102. When determining the initial reference block to be adjusted for the block to be encoded, determine the target adjustment method for adjusting the initial reference block.
[0253] The implementation process of S102 can be referred to the description of S902 above, and will not be repeated here.
[0254] S103. Adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block.
[0255] S104. Determine the prediction block of the block to be encoded based on the adjusted reference block.
[0256] The implementation process of S103 and S104 can be referred to the description of S730 and S740 above, and will not be repeated here.
[0257] In some embodiments, this application further includes:
[0258] S105. Determine the value of the reference block adjustment index according to the target adjustment method. The reference block adjustment index is used to indicate the target adjustment method. For example, if the target adjustment method is the first adjustment method, then the value of the reference block adjustment index is determined to be a first value; if the target adjustment method is the second adjustment method, then the value of the reference block adjustment index is determined to be a second value.
[0259] S106. Encode the value of the reference block adjustment index into the bitstream.
[0260] In this embodiment, the first step is to determine whether to adjust the initial reference block of the block to be encoded based on the feature information of the block to be encoded. If it is determined that the initial reference block of the block to be decoded should be adjusted, the subsequent adjustment operation is performed, thereby improving the accuracy of the adjustment, avoiding unnecessary work at the encoding end, and further improving the encoding efficiency.
[0261] It should be understood that Figures 7 to 10 This is merely an example of what is being done and should not be construed as limiting the scope of this application.
[0262] The preferred embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solutions of this application, and these simple modifications all fall within the protection scope of this application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this application will not describe the various possible combinations separately. Furthermore, various different embodiments of this application can also be arbitrarily combined, as long as they do not violate the spirit of this application, they should also be considered as the content disclosed in this application.
[0263] It should also be understood that, in the various method embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. Furthermore, in the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. Specifically, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0264] The above text combined Figures 7 to 10 The method embodiments of this application are described in detail below, in conjunction with... Figures 11 to 13 The following describes in detail the device embodiments of this application.
[0265] Figure 11This is a schematic block diagram of the video decoding device provided in the embodiments of this application.
[0266] like Figure 11 As shown, the video decoding device 100 may include:
[0267] Decoding unit 101 is used to decode the bitstream of the block to be decoded and determine the initial reference block of the block to be decoded;
[0268] The determining unit 102 is used to determine a target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block.
[0269] The adjustment unit 103 is used to adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block;
[0270] The prediction unit 104 is used to determine the prediction block of the block to be decoded based on the adjusted reference block.
[0271] In some embodiments, the determining unit 102 is specifically used to determine the value of a reference block adjustment index, the reference block adjustment index being used to indicate the target adjustment method; and to determine the target adjustment method based on the value of the reference block adjustment index.
[0272] In some embodiments, the determining unit 102 is specifically configured to parse the value of the reference block adjustment index from the bitstream; or...
[0273] The value of the reference block adjustment index is determined based on the positional relationship between the initial reference block and the block to be decoded; or,
[0274] The value of the reference block adjustment index is determined based on the size of the initial reference block.
[0275] In some embodiments, the determining unit 102 is specifically configured to determine that the value of the reference block adjustment index is a first value if the initial reference block is located above the block to be decoded;
[0276] If the initial reference block is located to the left of the block to be decoded, then the value of the reference block adjustment index is determined to be the second value.
[0277] In some embodiments, the determining unit 102 is specifically configured to determine the value of the reference block adjustment index as a first value if the width of the initial reference block is greater than its height;
[0278] If the width of the initial reference block is less than or equal to its height, then the value of the reference block adjustment index is determined to be the second value.
[0279] In some embodiments, the determining unit 102 is specifically used to determine the target adjustment method as a first adjustment method if the value of the reference block adjustment index is a first value;
[0280] If the value of the reference block adjustment index is the second value, then the target adjustment method is determined to be the second adjustment method;
[0281] The first adjustment method and the second adjustment method include any one of the following adjustment methods: filtering method, rearrangement method, filtering followed by rearrangement method, rearrangement followed by filtering method, and partially filtering followed by rearrangement method, and the first adjustment method is different from the second adjustment method.
[0282] In some embodiments, the determining unit 102 is further configured to determine the value of a reference block adjustment flag before determining the value of the reference block adjustment index, the reference block adjustment flag being used to indicate whether the initial reference block of the block to be decoded is adjusted; and to determine whether to determine the value of the reference block adjustment index based on the value of the reference block adjustment flag.
[0283] In some embodiments, the determining unit 102 is specifically configured to determine the value of the reference block adjustment index if the value of the reference block adjustment flag is determined to be a third value, wherein the value of the reference block adjustment flag is a third value and the initial reference block of the block to be decoded is adjusted.
[0284] If the value of the reference block adjustment flag is determined to be the fourth value, the step of determining the value of the reference block adjustment index is skipped. When the value of the reference block adjustment flag is the fourth value, it indicates that the initial reference block of the block to be decoded is not adjusted.
[0285] In some embodiments, the determining unit 102 is specifically configured to parse the value of the reference block adjustment flag from the bitstream; or...
[0286] The value of the reference block adjustment flag is determined based on the feature information of the block to be decoded.
[0287] In some embodiments, the feature information of the block to be decoded includes one or more of the following: the size of the block to be decoded, the size of the block vector resolution of the block to be decoded, and the block vector value of the block to be decoded.
[0288] In some embodiments, if the feature information of the block to be decoded includes the size of the block to be encoded, the determining unit 102 is specifically used to determine the value of the reference block adjustment flag as a third value if it is determined that the width and height of the block to be decoded are both equal to a first preset value.
[0289] If it is determined that the width and height of the block to be decoded are both equal to the first preset value, the value of the reference block adjustment flag is determined to be the fourth value.
[0290] In some embodiments, if the feature information of the block to be decoded includes the block vector resolution of the block to be decoded, then the determining unit 102 is specifically used to determine the value of the reference block adjustment flag as a third value if the block vector resolution of the block to be decoded is determined to be equal to a second preset value.
[0291] If it is determined that the block vector resolution of the block to be decoded is greater than the second preset value, the value of the reference block adjustment flag is determined to be the fourth value.
[0292] In some trial openings, if the feature information of the block to be decoded includes the block vector value of the block to be decoded, then the determining unit 102 is specifically used to determine the value of the reference block adjustment flag as a third value if the block vector value of the block to be decoded is determined to be less than or equal to a third preset value.
[0293] If it is determined that the block vector value of the block to be decoded is greater than the third preset value, the value of the reference block adjustment flag is determined to be the fourth value.
[0294] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 11 The apparatus shown can execute the method embodiment corresponding to the above-described decoding end, and the aforementioned and other operations and / or functions of each module in the apparatus are respectively for implementing the corresponding process of the method embodiment corresponding to the above-described decoding end. For the sake of brevity, they will not be described in detail here.
[0295] Figure 12 This is a schematic block diagram of the video encoding apparatus provided in the embodiments of this application.
[0296] like Figure 12 As shown, the video encoding device 200 may include:
[0297] Processing unit 201 is used to acquire the block to be encoded and process the block to be encoded to obtain the initial reference block of the block to be encoded;
[0298] The determining unit 202 is used to determine a target adjustment method for adjusting the initial reference block, wherein the target adjustment method is used to perform filtering and / or rearrangement operations on the pixels in the initial reference block.
[0299] The adjustment unit 203 is used to adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block;
[0300] The encoding unit 204 is used to determine the prediction block of the block to be encoded based on the adjusted reference block.
[0301] In some embodiments, the determining unit 202 is specifically used to determine the target adjustment method based on the positional relationship between the initial reference block and the block to be encoded; or, to determine the target adjustment method based on the size of the initial reference block.
[0302] In some embodiments, the target adjustment method includes a first adjustment method or a second adjustment method, wherein the first adjustment method and the second adjustment method include any one of the following adjustment methods: filtering method, rearrangement method, filtering followed by rearrangement method, rearrangement followed by filtering method, and partially filtering followed by rearrangement method, and the first adjustment method is different from the second adjustment method.
[0303] In some embodiments, the determining unit 202 is specifically configured to determine the target adjustment method as a first adjustment method if the initial reference block is located above the block to be encoded; and to determine the target adjustment method as a second adjustment method if the initial reference block is located to the left of the block to be encoded.
[0304] In some embodiments, the determining unit 202 is specifically configured to determine the target adjustment method as a first adjustment method if the width of the initial reference block is greater than its height; and to determine the target adjustment method as a second adjustment method if the width of the initial reference block is less than or equal to its height.
[0305] In some embodiments, the determining unit 202 is further configured to determine the value of a reference block adjustment index according to the target adjustment method, wherein the reference block adjustment index is used to indicate the target adjustment method;
[0306] Encoding unit 204 is used to encode the value of the reference block adjustment index into the bitstream.
[0307] In some embodiments, the determining unit 202 is specifically configured to determine the value of the reference block adjustment index as a first value if the target adjustment method is the first adjustment method, and to determine the value of the reference block adjustment index as a second value if the target adjustment method is the second adjustment method.
[0308] In some embodiments, the determining unit 202 is specifically used to determine whether to adjust the initial reference block of the block to be encoded based on the feature information of the block to be encoded before determining the target adjustment method for adjusting the initial reference block; and when determining to adjust the initial reference block of the block to be encoded, to determine the target adjustment method for adjusting the initial reference block.
[0309] In some embodiments, the feature information of the block to be encoded includes one or more of the following: the size of the block to be encoded, the size of the block vector resolution of the block to be encoded, and the block vector value of the block to be encoded.
[0310] In some embodiments, if the feature information of the block to be encoded includes the size of the block to be encoded, then the determining unit 202 is specifically configured to, if it is determined that the width and height of the block to be encoded are both equal to a first preset value, determine to adjust the initial reference block of the block to be encoded; if it is determined that the width and height of the block to be encoded are both equal to the first preset value, determine not to adjust the initial reference block of the block to be encoded.
[0311] In some embodiments, if the feature information of the block to be encoded includes the block vector resolution of the block to be encoded, then the determining unit 202 is specifically used to determine to adjust the initial reference block of the block to be encoded if the block vector resolution of the block to be encoded is equal to a second preset value; and to determine not to adjust the initial reference block of the block to be encoded if the block vector resolution of the block to be encoded is greater than the second preset value.
[0312] In some embodiments, if the feature information of the block to be encoded includes the block vector value of the block to be encoded, then the determining unit 202 is specifically used to determine to adjust the initial reference block of the block to be encoded if it is determined that the block vector value of the block to be encoded is less than or equal to a third preset value; and to determine not to adjust the initial reference block of the block to be encoded if it is determined that the block vector value of the block to be encoded is greater than the third preset value.
[0313] In some embodiments, the determining unit 202 is further configured to determine the value of a reference block adjustment flag, the reference block adjustment flag being used to indicate whether the initial reference block of the block to be encoded is to be adjusted;
[0314] The encoding unit 204 is also used to encode the value of the reference block adjustment flag into the bitstream.
[0315] In some embodiments, the determining unit 202 is specifically configured to determine the value of the reference block adjustment flag as a third value if it is determined that the initial reference block of the block to be encoded should be adjusted; and to determine the value of the reference block adjustment flag as a fourth value if it is determined that the initial reference block of the block to be encoded should not be adjusted.
[0316] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 12 The apparatus shown can execute the method embodiment corresponding to the above-described encoding end, and the foregoing and other operations and / or functions of each module in the apparatus are respectively for implementing the corresponding process of the method embodiment corresponding to the above-described encoding end. For the sake of brevity, they will not be described in detail here.
[0317] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0318] Figure 13 This is a schematic block diagram of a computing device provided in an embodiment of this application.
[0319] like Figure 13 As shown, the computing device 30 can be the video decoder or video encoder described in the embodiments of this application, and the computing device 30 may include:
[0320] The system includes a memory 33 for storing a computer program 34 and a processor 32 for transferring the program code 34 to the processor 32. In other words, the processor 32 can retrieve and run the computer program 34 from the memory 33 to implement the methods described in the embodiments of this application.
[0321] For example, the processor 32 can be used to execute the steps in the method 200 described above according to the instructions in the computer program 34.
[0322] In some embodiments of this application, the processor 32 may include, but is not limited to:
[0323] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0324] In some embodiments of this application, the memory 33 includes, but is not limited to:
[0325] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0326] In some embodiments of this application, the computer program 34 may be divided into one or more units, which are stored in the memory 33 and executed by the processor 32 to complete the method provided in this application. The one or more units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 34 in the decoding device 30.
[0327] like Figure 13 As shown, the decoding device 30 may further include:
[0328] Transceiver 33, which can be connected to processor 32 or memory 33.
[0329] The processor 32 can control the transceiver 33 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 33 may include a transmitter and a receiver. The transceiver 33 may further include antennas, and the number of antennas may be one or more.
[0330] It should be understood that the various components in the decoding device 30 are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0331] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods described in the above method embodiments.
[0332] This application also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the method described in the above method embodiments.
[0333] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0334] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0335] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0336] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional units in the various embodiments of this application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0337] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A video decoding method, characterized in that, include: Decode the bitstream of the block to be decoded and determine the initial reference block of the block to be decoded; A target adjustment method is determined for adjusting the initial reference block. The target adjustment method is used to perform filtering or filtering combined with rearrangement operation on the pixels in the initial reference block. The target adjustment method includes at least one of the following: filtering only, filtering first and then rearrangement, or rearrangement first and then filtering. According to the target adjustment method, the pixels in the initial reference block are adjusted to obtain the adjusted reference block, so that the adjusted reference block is structurally matched with the block to be decoded, and is applicable to screen content videos containing symmetrical and similar content; Based on the adjusted reference block, determine the prediction block of the block to be decoded; The step of determining the target adjustment method for adjusting the initial reference block includes: determining the value of the reference block adjustment index based on the positional relationship between the initial reference block and the block to be decoded, or based on the size of the initial reference block; and determining the target adjustment method based on the value of the reference block adjustment index.
2. The method according to claim 1, characterized in that, Determining the value of the reference block adjustment index includes: The value of the reference block adjustment index is parsed from the bitstream.
3. The method according to claim 1, characterized in that, The step of determining the value of the reference block adjustment index based on the positional relationship between the initial reference block and the block to be decoded includes: If the initial reference block is located above the block to be decoded, then the value of the reference block adjustment index is determined to be a first value; If the initial reference block is located to the left of the block to be decoded, then the value of the reference block adjustment index is determined to be the second value.
4. The method according to claim 1, characterized in that, The step of determining the value of the reference block adjustment index based on the size of the initial reference block includes: If the width of the initial reference block is greater than its height, then the value of the reference block adjustment index is determined to be a first value; If the width of the initial reference block is less than or equal to its height, then the value of the reference block adjustment index is determined to be the second value.
5. The method according to any one of claims 1-4, characterized in that, The step of determining the target adjustment method based on the value of the reference block adjustment index includes: If the value of the reference block adjustment index is a first value, then the target adjustment method is determined to be the first adjustment method; If the value of the reference block adjustment index is the second value, then the target adjustment method is determined to be the second adjustment method; The first adjustment method differs from the second adjustment method.
6. The method according to any one of claims 1-4, characterized in that, Before determining the value of the reference block adjustment index, the method further includes: Determine the value of the reference block adjustment flag, which is used to indicate whether the initial reference block of the block to be decoded should be adjusted; Based on the value of the reference block adjustment flag, determine whether to determine the value of the reference block adjustment index.
7. The method according to claim 6, characterized in that, The step of determining whether to determine the value of the reference block adjustment index based on the value of the reference block adjustment flag includes: If the value of the reference block adjustment flag is determined to be a third value, then the value of the reference block adjustment index is determined. When the value of the reference block adjustment flag is a third value, it indicates that the initial reference block of the block to be decoded should be adjusted. If the value of the reference block adjustment flag is determined to be the fourth value, the step of determining the value of the reference block adjustment index is skipped. When the value of the reference block adjustment flag is the fourth value, it indicates that the initial reference block of the block to be decoded is not adjusted.
8. The method according to claim 6, characterized in that, Determining the value of the reference block adjustment flag includes: The value of the reference block adjustment flag is parsed from the bitstream; or... The value of the reference block adjustment flag is determined based on the feature information of the block to be decoded.
9. The method according to claim 8, characterized in that, The feature information of the block to be decoded includes one or more of the following: the size of the block to be decoded, the size of the block vector resolution of the block to be decoded, and the block vector value of the block to be decoded.
10. The method according to claim 9, characterized in that, If the feature information of the block to be decoded includes the size of the block to be decoded, then determining the value of the reference block adjustment flag based on the feature information of the block to be decoded includes: If it is determined that the width and height of the block to be decoded are both equal to the first preset value, the value of the reference block adjustment flag is determined to be the fourth value.
11. The method according to claim 9, characterized in that, If the feature information of the block to be decoded includes the block vector resolution of the block to be decoded, then determining the value of the reference block adjustment flag based on the feature information of the block to be decoded includes: If it is determined that the block vector resolution of the block to be decoded is equal to the second preset value, the value of the reference block adjustment flag is determined to be the third value; If it is determined that the block vector resolution of the block to be decoded is greater than the second preset value, the value of the reference block adjustment flag is determined to be the fourth value.
12. The method according to claim 9, characterized in that, If the feature information of the block to be decoded includes the block vector value of the block to be decoded, then determining the value of the reference block adjustment flag based on the feature information of the block to be decoded includes: If it is determined that the block vector value of the block to be decoded is less than or equal to a third preset value, the value of the reference block adjustment flag is determined to be the third value. If it is determined that the block vector value of the block to be decoded is greater than the third preset value, the value of the reference block adjustment flag is determined to be the fourth value.
13. A video encoding method, characterized in that, include: Obtain the block to be encoded and process the block to be encoded to obtain the initial reference block of the block to be encoded; A target adjustment method is determined for adjusting the initial reference block. The target adjustment method is used to perform filtering or filtering combined with rearrangement operation on the pixels in the initial reference block. The target adjustment method includes at least one of the following: filtering only, filtering first and then rearrangement, or rearrangement first and then filtering. According to the target adjustment method, the pixels in the initial reference block are adjusted to obtain the adjusted reference block, so that the adjusted reference block matches the block to be encoded in structure, and is suitable for screen content videos containing symmetrical and similar content. Based on the adjusted reference block, determine the prediction block of the block to be encoded; The step of determining the target adjustment method for adjusting the initial reference block includes: determining the target adjustment method based on the positional relationship between the initial reference block and the block to be encoded, or based on the size of the initial reference block.
14. The method according to claim 13, characterized in that, The target adjustment method includes a first adjustment method or a second adjustment method, wherein the first adjustment method is different from the second adjustment method.
15. The method according to claim 13, characterized in that, The step of determining the target adjustment method based on the positional relationship between the initial reference block and the block to be encoded includes: If the initial reference block is located above the block to be encoded, then the target adjustment method is determined to be the first adjustment method; If the initial reference block is located to the left of the block to be encoded, then the target adjustment method is determined to be the second adjustment method.
16. The method according to claim 13, characterized in that, Determining the target adjustment method based on the size of the initial reference block includes: If the width of the initial reference block is greater than its height, then the target adjustment method is determined to be the first adjustment method; If the width of the initial reference block is less than or equal to its height, then the target adjustment method is determined to be the second adjustment method.
17. The method according to any one of claims 14-16, characterized in that, The method further includes: Based on the target adjustment method, the value of the reference block adjustment index is determined, and the reference block adjustment index is used to indicate the target adjustment method; The value of the reference block adjustment index is encoded into the bitstream.
18. The method according to claim 17, characterized in that, Determining the value of the reference block adjustment index according to the target adjustment method includes: If the target adjustment method is the first adjustment method, then the value of the reference block adjustment index is determined to be a first value; If the target adjustment method is the second adjustment method, then the value of the reference block adjustment index is determined to be the second value.
19. The method according to any one of claims 13-16, characterized in that, Before determining the target adjustment method for adjusting the initial reference block, the method includes: Based on the feature information of the block to be encoded, determine whether to adjust the initial reference block of the block to be encoded; The determination of the target adjustment method for adjusting the initial reference block includes: When determining to adjust the initial reference block of the block to be encoded, a target adjustment method for adjusting the initial reference block is determined.
20. The method according to claim 19, characterized in that, The feature information of the block to be encoded includes one or more of the following: the size of the block to be encoded, the size of the block vector resolution of the block to be encoded, and the block vector value of the block to be encoded.
21. The method according to claim 20, characterized in that, If the feature information of the block to be encoded includes the size of the block to be encoded, then determining whether to adjust the initial reference block of the block to be encoded based on the feature information of the block to be encoded includes: If it is determined that the width and height of the block to be encoded are both equal to the first preset value, it is determined that the initial reference block of the block to be encoded will not be adjusted.
22. The method according to claim 21, characterized in that, If the feature information of the block to be encoded includes the block vector resolution of the block to be encoded, then determining whether to adjust the initial reference block of the block to be encoded based on the feature information of the block to be encoded includes: If it is determined that the block vector resolution of the block to be encoded is equal to the second preset value, it is determined that the initial reference block of the block to be encoded will be adjusted. If it is determined that the block vector resolution of the block to be encoded is greater than the second preset value, it is determined that the initial reference block of the block to be encoded will not be adjusted.
23. The method according to claim 21, characterized in that, If the feature information of the block to be encoded includes the block vector value of the block to be encoded, then determining whether to adjust the initial reference block of the block to be encoded based on the feature information of the block to be encoded includes: If it is determined that the block vector value of the block to be encoded is less than or equal to a third preset value, it is determined that the initial reference block of the block to be encoded will be adjusted. If it is determined that the block vector value of the block to be encoded is greater than a third preset value, it is determined that the initial reference block of the block to be encoded will not be adjusted.
24. The method according to claim 19, characterized in that, The method further includes: Determine the value of the reference block adjustment flag, which is used to indicate whether the initial reference block of the block to be encoded should be adjusted; The value of the reference block adjustment flag is encoded into the bitstream.
25. The method according to claim 24, characterized in that, Determining the value of the reference block adjustment flag includes: If it is determined that the initial reference block of the block to be encoded needs to be adjusted, then the value of the reference block adjustment flag is determined to be a third value; If it is determined that the initial reference block of the block to be encoded will not be adjusted, then the value of the reference block adjustment flag is determined to be the fourth value.
26. A video decoding device, characterized in that, include: A decoding unit is used to decode the bitstream of the block to be decoded and to determine the initial reference block of the block to be decoded. A determining unit is configured to determine a target adjustment method for adjusting the initial reference block. The target adjustment method is configured to perform filtering or filtering combined with rearrangement operations on the pixels in the initial reference block. The target adjustment method includes at least one of the following: filtering only, filtering first and then rearrangement, or rearrangement first and then filtering. The adjustment unit is used to adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block, so that the adjusted reference block matches the block to be decoded in structure, and is applicable to screen content videos containing symmetrical and similar content. A prediction unit is used to determine the prediction block of the block to be decoded based on the adjusted reference block; The determining unit is specifically used to determine the value of the reference block adjustment index based on the positional relationship between the initial reference block and the block to be decoded, or based on the size of the initial reference block; and to determine the target adjustment method based on the value of the reference block adjustment index.
27. A video encoding device, characterized in that, include: A processing unit is used to acquire a block to be encoded and process the block to be encoded to obtain an initial reference block of the block to be encoded. A determining unit is configured to determine a target adjustment method for adjusting the initial reference block. The target adjustment method is configured to perform filtering or filtering combined with rearrangement operations on the pixels in the initial reference block. The target adjustment method includes at least one of the following: filtering only, filtering first and then rearrangement, or rearrangement first and then filtering. The adjustment unit is used to adjust the pixels in the initial reference block according to the target adjustment method to obtain the adjusted reference block, so that the adjusted reference block matches the block to be encoded in structure, and is applicable to screen content videos containing symmetrical and similar content. The encoding unit is used to determine the prediction block of the block to be encoded based on the adjusted reference block; The determining unit is specifically used to determine the target adjustment method based on the positional relationship between the initial reference block and the block to be encoded, or based on the size of the initial reference block.
28. A computing device, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to perform the method as claimed in any one of claims 1-12 or 13-25.
29. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1-12 or 13-25.
Citation Information
Patent Citations
Encoding processing method and device, decoding processing method and device, encoder, and decoder
CN106604028A
Methods of palette coding with inter-prediction in video coding
CN107409227A
Video codec method, device, computer equipment and storage medium
CN110730354A
Method and apparatus for intra prediction using adaptive filtering
KR1020140007097A