Video encoding method and apparatus, video decoding method and apparatus, medium, electronic device and program product
By identifying skipped regions based on pixel regions in video frames and generating reconstructed data, the problems of complex block partitioning and high bit usage in existing technologies are solved, achieving efficient video encoding and decoding.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2025-09-01
- Publication Date
- 2026-05-07
AI Technical Summary
In existing technologies, in order to accurately describe the outline of skipped regions during video encoding, complex block division and the use of a large amount of bit information are required, resulting in low encoding efficiency.
By determining skipped regions in video frames based on preset pixel region sizes and generating reconstructed data according to the positional relationship between the skipped regions and the current block, the number of bits required to describe the outline of the skipped regions is reduced, adapting to static regions of arbitrary shapes and reducing encoding and decoding complexity.
It significantly improves video encoding and decoding efficiency, reduces encoding complexity, and enhances encoding flexibility and speed.
Smart Images

Figure CN2025118174_07052026_PF_FP_ABST
Abstract
Description
Video encoding and decoding methods, devices, media, electronic equipment and software products
[0001] This application claims priority to Chinese Patent Application No. 2024115529948, filed on October 31, 2024, entitled "Video Coding / Decoding Method, Apparatus, Computer-Readable Medium and Electronic Device". Technical Field
[0002] This application relates to the fields of computer and communication technology, and more specifically, to a video encoding and decoding method, apparatus, medium, electronic device, and program product.
[0003] Background of the Invention
[0004] During video encoding and decoding, the content of certain regions remains unchanged between consecutive video frames. To optimize the encoding efficiency of such videos, a skip mode has been proposed in related technologies. This mode allows the encoder to skip encoding a region when it detects that the content of a certain region has not changed between consecutive video frames, and directly reuse the data from the previous frame.
[0005] However, in order to accurately describe the outlines of these regions (referred to as skip regions for ease of description), the encoder needs to perform complex block division of video frames and use a lot of bit information to describe the location of skip regions, which seriously reduces the efficiency of video encoding and decoding. Summary of the Invention
[0006] The embodiments of this application provide a video encoding / decoding method, apparatus, medium, electronic device, and program product, which can improve encoding / decoding efficiency and reduce encoding / decoding complexity.
[0007] On one hand, embodiments of this application provide a video decoding method, executed by an electronic device, including:
[0008] Based on a preset pixel region size, multiple pixel regions are determined in the current frame;
[0009] Based on whether the multiple pixel regions are processed using a skip mode, the skipped region in the current frame is determined; and,
[0010] Based on the positional relationship between the current block in the current frame and the skipped region, the reconstruction data corresponding to the current block is generated.
[0011] On the other hand, embodiments of this application provide a video encoding method, executed by an electronic device, including:
[0012] Based on a preset pixel region size, multiple pixel regions are determined in the current frame;
[0013] Based on whether the multiple pixel regions are processed using a skip mode, the skipped region in the current frame is determined; and,
[0014] The current block is encoded based on the positional relationship between the current block in the current frame and the skipped region.
[0015] On the other hand, embodiments of this application provide a video decoding apparatus, including:
[0016] The determination unit is configured to determine multiple pixel regions in the current frame based on a preset pixel region size;
[0017] The processing unit is configured to determine the skipped region in the current frame based on whether a skipped mode is used to process the plurality of pixel regions; and,
[0018] The generation unit is configured to generate reconstructed data corresponding to the current block based on the positional relationship between the current block in the current frame and the skipped region. On the other hand, embodiments of this application provide a video encoding apparatus, including:
[0019] The determination unit is configured to determine multiple pixel regions in the current frame based on a preset pixel region size;
[0020] The processing unit is configured to determine the skipped region in the current frame based on whether a skipped mode is used to process the plurality of pixel regions; and,
[0021] The encoding unit is configured to encode the current block according to the positional relationship between the current block in the current frame and the skipped region.
[0022] On the other hand, embodiments of this application provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the video decoding method or video encoding method as described in the above embodiments.
[0023] On the other hand, embodiments of this application provide an electronic device, including: at least one processor; and a storage device for storing at least one computer program, which, when executed by the at least one processor, causes the electronic device to implement the video decoding method or video encoding method as described in the above embodiments.
[0024] On the other hand, embodiments of this application provide a computer program product comprising a computer program stored in a computer-readable storage medium. The processor of an electronic device reads and executes the computer program from the computer-readable storage medium, causing the electronic device to perform the video decoding or video encoding methods provided in the various alternative embodiments described above.
[0025] Brief description of the attached figures
[0026] Figure 1 illustrates a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied;
[0027] Figure 2 shows a schematic diagram of the placement of the video encoding device and the video decoding device in a streaming system;
[0028] Figure 3 shows a basic flowchart of a video encoder;
[0029] Figure 4 shows a schematic diagram of an inter-frame prediction process;
[0030] Figure 5 shows a schematic diagram of an inter-frame prediction process;
[0031] Figure 6 shows a schematic diagram of the shape of a skipped area;
[0032] Figure 7 shows a schematic diagram of the shapes of some skipped areas;
[0033] Figure 8 shows a flowchart of a video decoding method according to an embodiment of this application;
[0034] Figure 9 shows a flowchart of a video encoding method according to an embodiment of this application;
[0035] Figure 10 shows a block diagram of a video decoding apparatus according to an embodiment of this application;
[0036] Figure 11 shows a block diagram of a video encoding apparatus according to an embodiment of this application;
[0037] Figure 12 shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of this application.
[0038] Implementation
[0039] Exemplary embodiments will now be described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to these examples; rather, these embodiments are provided so that this application will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0040] Furthermore, the features, structures, or characteristics described in this application can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to provide a full understanding of the embodiments of this application. However, those skilled in the art will recognize that when implementing the technical solutions of this application, not all the detailed features in the embodiments may be used, one or more specific details may be omitted, or other methods, elements, devices, steps, etc., may be employed.
[0041] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement at least one module or unit. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0042] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in at least one hardware module or integrated circuit, or in different network and / or processor devices and / or microcontroller devices.
[0043] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0044] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0045] Figure 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied.
[0046] As shown in Figure 1, system architecture 100 includes multiple terminal devices that can communicate with each other via, for example, a network 150. For instance, system architecture 100 may include a first terminal device 110 and a second terminal device 120 interconnected via network 150. In the embodiment of Figure 1, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.
[0047] For example, the first terminal device 110 can encode video data (e.g., a video image stream captured by the terminal device 110) to transmit it to the second terminal device 120 via the network 150. The encoded video data is transmitted in the form of at least one encoded video stream. The second terminal device 120 can receive the encoded video data from the network 150, decode the encoded video data to recover the video data, and display video images based on the recovered video data.
[0048] In one embodiment of this application, system architecture 100 may include a third terminal device 130 and a fourth terminal device 140 that perform bidirectional transmission of encoded video data, such as during a video conference. For bidirectional data transmission, each of the third terminal device 130 and the fourth terminal device 140 may encode video data (e.g., a video image stream captured by the terminal device) for transmission over network 150 to the other terminal device. Each of the third terminal device 130 and the fourth terminal device 140 may also receive encoded video data transmitted by the other terminal device, decode the encoded video data to recover the video data, and display the video images on an accessible display device based on the recovered video data.
[0049] In the embodiment shown in FIG1, the first terminal device 110, the second terminal device 120, the third terminal device 130 and the fourth terminal device 140 may be servers or terminals, but the principles disclosed in this application are not limited to these.
[0050] Servers can be standalone physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals can be smartphones, tablets, laptops, desktop computers, smart speakers, smart voice interaction devices, smartwatches, smart home appliances, in-vehicle terminals, aircraft, etc., but are not limited to these.
[0051] The network 150 shown in Figure 1 represents any number of networks, including, for example, wired and / or wireless communication networks, that transmit encoded video data between the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140. The communication network 150 may exchange data in circuit-switched and / or packet-switched channels. This network may include telecommunications networks, local area networks (LANs), wide area networks (WANs), and / or the Internet. For the purposes of this application, unless explained below, the architecture and topology of network 150 may be irrelevant to the operation of the disclosure herein.
[0052] In one embodiment of this application, Figure 2 illustrates the placement of the video encoding device and the video decoding device in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital television (TV), storing compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0053] The streaming system may include an acquisition subsystem 213, which may include a video source 201 such as a digital camera, which creates an uncompressed video image stream 202. In an embodiment, the video image stream 202 includes samples captured by a digital camera. The video image stream 202 is depicted as a thick line to emphasize the high data volume of the video image stream compared to encoded video data 204 (or encoded video bitstream 204). The video image stream 202 may be processed by an electronic device 220, which includes a video encoding device 203 coupled to the video source 201. The video encoding device 203 may include hardware, software, or a combination of hardware and software to implement or enforce aspects of the disclosed subject matter as described in more detail below. The encoded video data 204 (or encoded video bitstream 204) is depicted as a thin line to emphasize the lower data volume of the encoded video data 204 (or encoded video bitstream 204), which may be stored on a streaming server 205 for future use. At least one streaming client subsystem, such as client subsystems 206 and 208 in FIG. 2, can access streaming server 205 to retrieve copies 207 and 209 of encoded video data 204. Client subsystem 206 may include, for example, a video decoding device 210 in electronic device 230. Video decoding device 210 decodes the incoming copy 207 of the encoded video data and produces an output video picture stream 211 that can be displayed on display 212 (e.g., a screen) or another presentation device. In some streaming systems, the encoded video data 204, video data 207, and video data 209 (e.g., video stream) may be encoded according to certain video encoding / compression standards.
[0054] It should be noted that electronic devices 220 and 230 may include other components not shown in the figures. For example, electronic device 220 may include a video decoding device, and electronic device 230 may also include a video encoding device.
[0055] In one embodiment of this application, taking High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) from international video coding standards, as well as the Chinese national video coding standard AVS, as examples, after an input video frame image, the video frame image is divided into several non-overlapping processing units according to a block size. Each processing unit performs a similar compression operation. This processing unit is called a Coding Tree Unit (CTU) or Largest Coding Unit (LCU). The CTU can be further subdivided into more refined units to obtain at least one basic Coding Unit (CU), which is the most basic element in a coding process.
[0056] In another embodiment, this processing unit can also be called a tile, which is a rectangular area of a multimedia data frame that can be independently decoded and encoded. In the Alliance for Open Media Video 1 (AV1) standard, the tile can be further subdivided into at least one superblock (SB). The SB is the starting point for block partitioning and can be further divided into multiple subblocks. The superblock is then further subdivided to obtain at least one block. Each block is the most basic element in a coding process. Optionally, an SB can contain several blocks (B).
[0057] The above method of dividing video frame images can be called a block partition structure. The following introduces some concepts in the encoding process:
[0058] Predictive coding includes intra-frame prediction and inter-frame prediction. The original video signal is predicted from a selected reconstructed video signal to obtain a residual video signal. The encoder needs to decide which predictive coding mode to choose for the current coding unit (or coding block) and inform the decoder. Intra-frame prediction refers to the predicted signal coming from a region within the same image that has already been encoded and reconstructed; inter-frame prediction refers to the predicted signal coming from another encoded image (called a reference image) that is different from the current image.
[0059] Transform and Quantization: After the residual video signal undergoes transformation operations such as Discrete Fourier Transform (DFT) and Discrete Cosine Transform (DCT), the signal is transformed into the transform domain, and these are called transform coefficients. The transform coefficients are then subjected to lossy quantization, losing some information to make the quantized signal more suitable for compression. In some video coding standards, there may be more than one transform method to choose from. Therefore, the encoder needs to select one of the transform methods for the current coding unit (or coding block) and inform the decoder. The fineness of quantization is usually determined by the quantization parameter (QP). A larger QP value means that coefficients with a wider range of values will be quantized into the same output, which usually leads to greater distortion and a lower bit rate. Conversely, a smaller QP value means that coefficients with a smaller range of values will be quantized into the same output, which usually leads to less distortion and a higher bit rate.
[0060] Entropy coding, or statistical coding, involves statistically compressing the quantized transform-domain signal based on the frequency of each value, ultimately outputting a binary (0 or 1) compressed bitstream. Simultaneously, other information generated during encoding, such as the selected coding mode and motion vector data, also requires entropy coding to reduce the bit rate. Statistical coding is a lossless coding method that effectively reduces the bit rate required to represent the same signal. Common statistical coding methods include Variable Length Coding (VLC) and Content Adaptive Binary Arithmetic Coding (CABAC).
[0061] Context-Based Binary Arithmetic Coding (CABAC) primarily involves three steps: binarization, context modeling, and binary arithmetic coding. After binarizing the input syntax elements, the binary data can be encoded using either a regular coding mode or a bypass coding mode. The bypass coding mode eliminates the need to assign a specific probability model to each binary bit; the input binary bit bin value is directly encoded using a simple bypass encoder, thus accelerating the overall encoding and decoding speed. Generally, different syntax elements are not completely independent, and even identical syntax elements possess a certain degree of memory. Therefore, according to conditional entropy theory, using other encoded syntax elements for conditional coding can further improve coding performance compared to independent coding or memoryless coding. This encoded symbol information used as conditions is called the context. In the regular coding mode, the binary bits of the syntax elements sequentially enter the context modeler. The encoder assigns an appropriate probability model to each input binary bit based on the values of previously encoded syntax elements or binary bits; this process is called context modeling. The context model corresponding to a grammatical element can be located using the context index increment (ctxIdxInc) and the context index start (ctxIdxStart). After the bin value and the assigned probability model are fed into the binary arithmetic encoder for encoding, the context model needs to be updated based on the bin value, which is the adaptive process in encoding.
[0062] Loop Filtering: The transformed and quantized signal undergoes inverse quantization, inverse transform, and prediction compensation to obtain a reconstructed image. Due to the effects of quantization, the reconstructed image differs from the original image in some aspects, resulting in distortion. Therefore, filtering operations can be performed on the reconstructed image, such as deblocking filters (DB), sample adaptive offset (SAO), or adaptive loop filters (ALF), to effectively reduce the distortion caused by quantization. Since these filtered reconstructed images will serve as a reference for subsequent coded images to predict future image signals, the aforementioned filtering operations are also called loop filtering, i.e., filtering operations within the coding loop.
[0063] In one embodiment of this application, Figure 3 shows a basic flowchart of a video encoder, which is illustrated using intra-frame prediction as an example. The original image signal s... k[x,y] and the predicted image signal Perform the difference operation to obtain the residual signal u. k [x,y], residual signal u k After transformation and quantization, [x,y] is obtained as quantization coefficients. These coefficients are then used to obtain the encoded bitstream through entropy encoding, and to obtain the reconstructed residual signal u' through inverse quantization and inverse transform. k [x,y], predict image signal With the reconstructed residual signal u' k [x,y] superimposed to generate image signals Image signal On one hand, the signal is input to the intra-frame mode decision module and the intra-frame prediction module for intra-frame prediction processing; on the other hand, the reconstructed image signal s' is output through loop filtering. k [x,y], reconstruct the image signal s' k [x,y] can be used as a reference image for the next frame for motion estimation and motion compensation prediction. Then, based on the result s' of the motion compensation prediction... r [x+m x ,y+m y ] and intra-frame prediction results Obtain the predicted image signal for the next frame. And continue repeating the above process until the coding is complete.
[0064] Based on the above encoding process, at the decoding end, for each encoding unit (or encoding block), after acquiring the compressed bitstream (i.e., bitstream), entropy decoding is performed to obtain various mode information and quantization coefficients. Then, the quantization coefficients undergo inverse quantization and inverse transform processing to obtain the residual signal. On the other hand, based on the known encoding mode information, the prediction signal corresponding to the encoding unit (or encoding block) can be obtained. Then, the residual signal and the prediction signal are added together to obtain the reconstructed signal. The reconstructed signal then undergoes loop filtering and other operations to generate the final output signal.
[0065] In the field of coding technology, inter-frame prediction is a commonly used predictive coding technique. As shown in Figure 4, inter-frame prediction utilizes the correlation in the temporal domain of video, using pixels from neighboring encoded images to predict pixels in the current image, thereby effectively removing temporal redundancy and saving bits of coding residual data. Here, P represents the current frame, Pr represents the reference frame, B represents the current coding block, and Br represents the reference block of B. The coordinates of B' in the reference frame are the same as the coordinates of B in the current frame, and the coordinates of Br are (x... r ,y r The coordinates of B' are (x, y). The displacement between the current coded block and its reference block is called the motion vector (MV), where MV = (x, y).r -x,y r -y). In other words, inter-frame prediction refers to the process of searching for a reference block in neighboring encoded images (i.e., reference frames) based on the current block to be encoded in the current frame, with the aim of removing temporal redundancy in the video signal. As shown in Figure 5, the current block to be encoded in the current frame is searched within a certain range in the reference frame (i.e., the search area formed by the search box) according to block matching criteria to obtain the best matching block. Optionally, commonly used block matching criteria in video coding include: minimum mean square error (MSE), sum of absolute differences (SAD), and other matching criteria.
[0066] As described above, the predicted pixels in the inter-frame prediction mode are obtained by searching within the reconstructed reference frame or its sub-pixel interpolated image. For the chroma component, it is generally assumed that it has a similar motion vector or block vector to the luma component; therefore, the motion vector or block vector of the chroma component is simply derived from the motion vector or block vector of the luma component.
[0067] Since this matching search process needs to consider not only the matching degree of the image, but also the encoding cost of the motion vector, it may not be optimal in terms of the matching degree alone. In other words, there is still room for improvement in the prediction accuracy.
[0068] If the motion vector of a coded block can be completely derived from a pre-defined predicted motion vector (e.g., motion vector prediction from spatially adjacent blocks), without needing to additionally identify the residual values of the motion vector prediction, and the residual after prediction for that coded block is also all zero, then skip mode can be used to encode that coded block. Specifically, for the current block using skip mode and with a motion vector of 0, reconstruction can be accomplished by copying pixels at the same location in the reference frame.
[0069] In practical applications, if the background or subtitles of a video do not change in the local content of the preceding and following video frames, the skip mode can be used to handle this situation.
[0070] In this embodiment of the application, the area in the video content that is processed using the skip mode can be called the skip area. The skip area in the video frame can be of any shape, and the shape of the skip area may change in different video frames.
[0071] As shown in Figure 6, the shape of the skip region 601 in the current frame can be a rectangle, and it includes part of the pixel regions C31, C32 and C33 in the current frame. When performing reconstruction processing, the pixels at the same position in the reference frame can be copied as the reconstructed pixels.
[0072] As shown in Figure 7, the shape of the skipped area can be arbitrary, such as the rectangle shown in shapes 701 and 702, or the trapezoid shown in shape 703, etc.
[0073] In related technologies, to accurately describe the outline of skipped regions, encoders need to perform complex block divisions on video frames. This typically involves multiple, progressively finer block division processes until the boundaries of skipped regions can be delineated relatively accurately. This fine division not only increases coding complexity but also necessitates the use of a large amount of bit information in the video bitstream to describe the position and shape of these blocks.
[0074] In addition, for each block obtained through partitioning, the encoder needs extra bits to identify whether the block uses skip mode. This extra identification information further increases the overhead of the encoded data, thereby offsetting the coding efficiency improvement brought by skip mode to some extent.
[0075] Based on the aforementioned technical problems, the technical solution of this application proposes a novel video encoding and decoding scheme that can accurately and efficiently identify skipped regions in the current frame, reducing the number of bits required to describe the outline of the skipped regions, thereby significantly improving encoding and decoding efficiency. Furthermore, since the technical solution of this application is based on pixel regions, it can adapt to static regions of arbitrary shapes, reducing encoding and decoding complexity while improving encoding flexibility.
[0076] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0077] Figure 8 shows a flowchart of a video decoding method according to an embodiment of this application. This video decoding method can be executed by an electronic device having computational processing capabilities, such as a terminal device or a server. Referring to Figure 8, the video decoding method includes at least steps S810 to S840, which are described in detail below:
[0078] In S810, multiple pixel regions are determined in the current frame based on a preset pixel region size.
[0079] In this step, each pixel region in the multiple pixel regions contains at least one pixel.
[0080] In some optional embodiments, the preset pixel area size can be pre-set in the video encoding and video decoding devices, such as 1 pixel size, 2×2 pixel size, 3×3 pixel size, etc.
[0081] In some alternative embodiments, the video encoding device can determine a preset pixel region size and then indicate this preset pixel region size to the video decoding device by adding a flag bit to the video bitstream. In this way, the video decoding device decodes the video bitstream to obtain the flag bit used to indicate the pixel region size.
[0082] Optionally, the flag may include at least one of the following flags: flags contained in the sequence header, flags contained in the image header, flags contained in the strip header, flags contained in the coding tree unit (CTU) header, and flags contained in the coding block. In this case, the video decoding device can decode the video stream to obtain the flag used to indicate the size of the pixel region.
[0083] It should be noted that the flags contained in the sequence header can indicate the size of the pixel region set for the entire image sequence; the flags contained in the image header can indicate the size of the pixel region set for the entire image; the flags contained in the strip header can indicate the size of the pixel region set for the entire strip; the flags contained in the coding tree unit (CTU) header can indicate the size of the pixel region set for the entire CTU; and the flags contained in the coding block can indicate the size of the pixel region set for the current coding block.
[0084] In S820, the skip region in the current frame is determined based on whether to use the skip mode to process multiple pixel regions.
[0085] In some optional embodiments, whether a pixel region should be processed in skip mode can be determined based on the pixels contained within each pixel region and whether each pixel in the current frame is processed in skip mode. For example, if all pixels contained in a pixel region are processed in skip mode, then it can be determined that the pixel region should be processed in skip mode. In other words, if all pixels in a pixel region are processed in skip mode, then it can be determined that the pixel region should be processed in skip mode.
[0086] Alternatively, if most pixels in a pixel region are processed using the skip mode, then it can be determined that the pixel region is processed using the skip mode. For example, a proportional threshold can be set. If more than the proportional threshold of a pixel region are processed using the skip mode, then it can be determined that the pixel region is processed using the skip mode.
[0087] In some alternative embodiments, when determining whether each pixel should be processed in skip mode, the video decoding device can directly decode the corresponding flag bit from the video bitstream to determine whether each pixel should be processed in skip mode based on the flag bit. Correspondingly, the video encoding device uses flag bits in the video bitstream to indicate whether each pixel should be processed in skip mode.
[0088] In some optional embodiments, the video decoding device can also determine whether each pixel should be processed using the skip mode by deduction. Specifically, the position of a pixel in the current frame is determined as the target pixel position; when the pixel difference at the target pixel position is less than or equal to a pixel threshold in a preset number of consecutive image frames adjacent to and preceding the current frame, it is determined that the pixel should be processed using the skip mode. In this embodiment, if the pixel difference at the target pixel position in a consecutive N frames (N≥2) preceding the current frame is less than or equal to a set pixel threshold (e.g., 0, 1, or other values), then it can be determined that the pixel at the target pixel position in the current frame should be processed using the skip mode.
[0089] For example, if the motion vectors of a preset number of consecutive image frames adjacent to and preceding the current frame are all 0 at the target pixel location, then the pixel at the target pixel location is determined to be processed using a skip mode.
[0090] Since the residual value predicted based on the motion vector is close to 0 when the motion vector is 0, in another embodiment, if the motion vectors at the target pixel location are all 0 in the previous N consecutive frames (N≥2) and / or the predicted residual values at the target pixel location are all less than or equal to a set residual threshold (e.g., 0, 1, or other values), then it can be determined that the pixel at the target pixel location will be processed using the skip mode.
[0091] In S830, reconstruction data corresponding to the current block is generated based on the positional relationship between the current block and the skipped area in the current frame.
[0092] In some optional embodiments, the video contains a sequence of video image frames, which includes a series of images. Each image can be further divided into slices, and each slice can be further divided into a series of LCUs (or CTUs). Each LCU contains several CUs. Video image frames are encoded in blocks. In some video coding standards, such as H.264, macroblocks (MBs) are defined, which can be further divided into multiple prediction blocks for predictive coding. In the HEVC standard, various block units are functionally divided, including coding units (CUs), prediction units (PUs), and transform units (TUs), and described using a tree structure. For example, a CU can be divided into smaller CUs using a quadtree, and these smaller CUs can be further divided, forming a quadtree structure. In the embodiments of this application, the current block can be a CU, or a block smaller than a CU, such as a smaller block obtained by dividing a CU.
[0093] In some optional embodiments, when the current block is within a skipped region, multiple pixel values from the previous frame or the reference frame within that region can be used as the reconstruction data for the current block, based on the region where the current block is located in the current frame. This embodiment allows for the direct copying of pixel values at corresponding positions (e.g., the same position) from the previous or reference frame as reconstruction data for a current block within a skipped region. This not only saves the number of bits used to transmit the current block data during encoding but also reduces the computational burden on the encoder and decoder, improving overall encoding efficiency and decoding speed.
[0094] In some optional embodiments, when some pixels in the current block are within the skipped region, the current block can be decoded to obtain the corresponding decoded data. Based on the positions of these pixels in the current frame, the pixel values at each position in the previous frame or the reference frame are used to replace the data at each position in the decoded data to obtain the reconstructed data corresponding to the current block. This embodiment's technical solution allows for both preserving the decoding results of pixels in the current block that are not based on skipped processing and optimizing the processing for pixels based on skipped processing. This further reduces the amount of data required for encoding while maintaining high image quality, thereby improving overall encoding efficiency.
[0095] In some optional embodiments, the video encoding device may add a first flag bit to the video bitstream to indicate whether the current frame uses a scheme based on skipped regions for decoding, i.e., the technical solution of the foregoing embodiments. In this case, for each pixel in the current frame, the video decoding device can determine whether to process the pixel using the skipped mode based on the first flag bit decoded from the video bitstream.
[0096] In some optional embodiments, the video encoding device may add a second flag bit to the video bitstream to indicate whether each image block in the current frame adopts a decoding scheme based on skipped regions, i.e., the technical solution of the foregoing embodiments. In this case, the video decoding device can determine whether each image block in the current frame adopts the technical solution of the foregoing embodiments by decoding the second flag bit in the video bitstream. For example, some image blocks in the current frame adopt the technical solution of the foregoing embodiments, while other image blocks do not adopt the technical solution of the foregoing embodiments.
[0097] In some alternative embodiments, the video encoding device may add a third flag bit to the video bitstream to indicate whether each stripe in the current frame uses a decoding scheme based on skipped regions. In this case, the video decoding device can determine whether each stripe in the current frame uses the technical solution of the aforementioned embodiments by decoding the third flag bit in the video bitstream; for example, some stripes in the current frame use the technical solution of the aforementioned embodiments, while other stripes do not.
[0098] In some optional embodiments, the first flag bit, the second flag bit, and the third flag bit mentioned above can be the same flag bit, or they can be different flag bits. For example, multiple of the following flag bits can be added to the video bitstream: a first flag bit for indicating whether the current frame uses decoding based on skip regions, a second flag bit for indicating whether each image block in the current frame uses decoding based on skip regions, and a third flag bit for indicating whether each stripe in the current frame uses decoding based on skip regions.
[0099] In one embodiment, if the first flag bit and the second flag bit are used to indicate whether to use a scheme for decoding based on skipped regions, then if the first flag bit indicates that the current frame uses a scheme for decoding based on skipped regions, and the second flag bit indicates that a specified image block in the current frame uses a scheme for decoding based on skipped regions, then it is determined that the specified image block needs to use a scheme for decoding based on skipped regions.
[0100] Figure 8 illustrates the technical solution of the embodiment of this application from the perspective of video decoding. The technical solution of the embodiment of this application will be described again below from the perspective of video encoding with reference to Figure 9.
[0101] Figure 9 shows a flowchart of a video encoding method according to an embodiment of this application. This video encoding method can be executed by an electronic device, which is a device with computing processing capabilities, such as a terminal device or a server. Referring to Figure 9, the video encoding method includes at least steps S910 to S930, which are described in detail below:
[0102] In S910, multiple pixel regions are determined in the current frame based on a preset pixel region size.
[0103] In this step, each pixel region contains at least one pixel.
[0104] Optionally, the specific implementation details of S910 can be referred to the implementation details of S810 in the aforementioned embodiments, and will not be repeated here.
[0105] In S920, the skip region in the current frame is determined based on whether the skip mode is used to process multiple pixel regions.
[0106] Optionally, the specific implementation details of S920 can refer to the implementation details of S820 in the aforementioned embodiments. Furthermore, when determining whether each pixel should be processed using the skip mode, the video encoding device can also compare the current frame with the previous M frames (M≥1) to make this determination.
[0107] In one embodiment, if the pixel difference between any two adjacent frames at the target pixel position in a consecutive preset number of image frames, including the current frame, is less than or equal to a pixel threshold, then the pixel at the target pixel position in the current frame can be processed using a skip mode.
[0108] In another embodiment, if the motion vector at the target pixel position in a consecutive preset number of image frames, including the current frame, is 0 and / or the residual value at the target pixel position is less than or equal to the residual threshold, then the pixel at the target pixel position in the current frame is determined to be processed using a skip mode.
[0109] In S930, the current block is encoded according to the positional relationship between the current block and the skipped region in the current frame.
[0110] In some alternative embodiments, if the current block is within the skip region, the video encoding device can skip the encoding process of the current block, such as skipping the transformation and quantization process of the current block. Correspondingly, the video decoding device can skip the inverse quantization and inverse transformation processing of the current block and directly copy the pixel value at the corresponding position (such as the same position) in the previous frame image or reference frame image as the reconstruction data.
[0111] In some optional embodiments, if some pixels in the current block are located within a skipped region, the video encoding device can exclude (or not calculate) pixel distortion within the skipped region when determining the encoding mode and encoding parameters for the current block. This embodiment's technical solution, by excluding pixel distortion within the skipped region, allows the encoding process to focus on optimizing pixels in non-skipped regions that have a greater impact on video quality. This effectively reduces unnecessary computational overhead and bitrate consumption while ensuring video quality, thus improving video encoding and decoding efficiency.
[0112] In some optional embodiments, if some pixels in the current block are located within a skipped area, the video encoding device can fill in some pixels using pixels adjacent to the skipped area in the current block, and determine the encoding mode and encoding parameters of the current block based on the filled pixels. This embodiment's technical solution, by utilizing pixels adjacent to the skipped area for filling, not only maintains the continuity and smoothness of the image at the edges of the skipped area, but also effectively avoids the adverse effects of missing pixel information caused by the skipped area on the selection of encoding mode and parameters.
[0113] It should be noted that the processing of video encoding equipment is similar to other processing of video decoding equipment. For details, please refer to the aforementioned processing of video decoding equipment, which will not be repeated here.
[0114] In summary, the technical solution of this application embodiment can accurately and efficiently identify skipped regions in the current frame, reducing the number of bits required to describe the outline of the skipped region, thereby significantly improving encoding and decoding efficiency. Furthermore, since the technical solution of this application embodiment is based on pixel region processing, it can adapt to static regions of arbitrary shapes, reducing encoding and decoding complexity while improving encoding flexibility.
[0115] In a specific application scenario of this application, when determining the shape of the skip region for the current image frame to be processed, the size of the pixel block (i.e., the pixel region in the aforementioned embodiments) used to determine the skip region can be defined first. For example, the size of the pixel block can be 1 pixel, 2×2 pixels, etc. For the current frame, a binary map can be constructed in units of pixel blocks, describing whether each pixel block is processed using the skip mode, and the pixel blocks processed using the skip mode constitute the skip region. Optionally, the size of the pixel block can be defined or updated in the image header, sequence header, or other high-level syntax.
[0116] In some alternative embodiments, possible methods for deriving the value of each pixel block in a binarized map include:
[0117] Method 1: Calculate the difference between pixel pairs at the same position in consecutive frames. If the pixel difference at a certain position is 0 (or less than a certain threshold) in M consecutive (M≥2) frames, the pixel at that position is determined as a skipped pixel (i.e., a pixel processed using the skipped mode). If all pixels in a pixel block are processed using the skipped mode, then the pixel block can be defined as a skipped pixel block. On the binary map, skipped pixel blocks are marked as 1, and other pixel blocks are marked as 0.
[0118] It should be noted that, for video encoding devices, when implementing method 1, consecutive M frames can include the current frame; for video decoding devices, when implementing method 1, consecutive M frames can be M frames that are adjacent to the current frame and located before the current frame.
[0119] Method 2: For any pixel in a pixel block, if the motion vector at that pixel location is 0 for M consecutive frames (M≥2) and / or the residual value at the corresponding location is 0 (or less than a certain threshold), then the pixel at that location is determined as a skipped pixel. If all pixels within a pixel block are processed using the skipped mode, then that pixel block can be defined as a skipped pixel block. On the binary map, skipped pixel blocks are marked as 1, and other pixel blocks are marked as 0.
[0120] It should be noted that, for video encoding devices, when implementing method 2, consecutive M frames can include the current frame; for video decoding devices, when implementing method 2, consecutive M frames can be M frames that are adjacent to the current frame and located before the current frame.
[0121] In some alternative embodiments, switches can be set at the frame level or the region level to determine whether to use the skip region method. For example, if a frame-level switch is used, all skipped pixel blocks in the current frame do not need to be encoded or decoded; the pixel values at the corresponding positions in the previous frame or reference frame are directly copied.
[0122] For example, if a region-level switch is used, the current frame can be divided into sub-images or stripes of fixed size. For instance, in Figure 6, the current frame is divided into 12 sub-images. A switch can be set individually for each sub-image to determine whether to use the skip region method. For example, in the example shown in Figure 6, sub-images C31, C32, and C33 can consider using the skip region method. For each sub-image that selects to use the skip region method, the skipped pixel blocks within it do not need to be encoded or decoded; the pixel values at the corresponding positions in the previous frame or reference frame are directly copied.
[0123] In some alternative embodiments, for a video encoding device, if the current block is entirely within the skip area, the encoding process of the current block can be skipped (e.g., skipping the transform and quantization process), and the transmission of syntax elements related to the current block in the bitstream can be ignored.
[0124] Optionally, in an exemplary scheme, if some pixels in the current block are within the skip region, the encoder can exclude pixels belonging to the skip region in the current block when calculating pixel distortion, i.e., it does not calculate the distortion of these pixels, when evaluating various encoding parameters and mode selections of the current block.
[0125] In another exemplary scheme, if some pixels in the current block are within the skip region, the encoder can extend the pixels in the current block that are adjacent to the skip region and located on the boundary of the non-skip region to the position of the skip pixels in the current block by copying them when evaluating various encoding parameters and mode selections of the current block, thereby maintaining the pixel continuity during the non-skip region encoding process.
[0126] In some optional embodiments, for the video decoding device, if the current block is entirely within the skip area, the decoding process of the current block can be skipped, and the pixel values at the corresponding positions in the previous frame or reference frame can be directly used as the reconstruction data of the current block.
[0127] Optionally, if some pixels in the current block are within the skipped area, the decoding block can be decoded normally. After decoding is complete, the pixels in the skipped area of the decoding block can be replaced by pixels at the corresponding positions in the previous frame or reference frame.
[0128] The technical solutions in the above embodiments can reduce the number of bits required for block partitioning and identifying skip patterns while maintaining accurate description of the skip region outline, thus effectively improving the efficiency of predictive coding.
[0129] The following describes an apparatus embodiment of this application, which can be used to perform the methods described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments described above.
[0130] Figure 10 shows a block diagram of a video decoding apparatus according to an embodiment of the present application. The video decoding apparatus can be installed in a device with computing processing capabilities, such as a terminal device or a server.
[0131] Referring to FIG10, a video decoding apparatus 1000 according to an embodiment of the present application includes: a determining unit 1002, a processing unit 1004, and a generating unit 1006.
[0132] The determining unit 1002 is configured to determine multiple pixel regions in the current frame based on a preset pixel region size.
[0133] Processing unit 1004 is configured to determine the skip region in the current frame based on whether the multiple pixel regions are processed using a skip mode; and,
[0134] The generation unit 1006 is configured to generate reconstruction data corresponding to the current block based on the positional relationship between the current block in the current frame and the skipped area.
[0135] In some embodiments of this application, based on the foregoing scheme, the processing unit 1004 is further configured as follows:
[0136] For each pixel in the current frame, determine whether to process the pixel using the skip mode;
[0137] For each of the plurality of pixel regions, it is determined whether to apply the skip mode to the pixel region based on whether the skip mode is applied to each pixel contained in the pixel region.
[0138] In some embodiments of this application, based on the foregoing scheme, the processing unit 1004 is further configured as follows:
[0139] Determine the position of the pixel in the current frame;
[0140] When the pixel difference between any two adjacent frames at the specified position is less than or equal to a pixel threshold in a preset number of consecutive image frames that are adjacent to and precede the current frame, it is determined that the pixel will be processed using the skip mode.
[0141] In some embodiments of this application, based on the foregoing scheme, the processing unit 1004 is further configured as follows:
[0142] Determine the position of the pixel in the current frame;
[0143] When the motion vectors of a preset number of consecutive image frames adjacent to and preceding the current frame are all 0 at that position, it is determined that the pixel will be processed using the skip mode.
[0144] In some embodiments of this application, based on the foregoing scheme, the processing unit 1004 is further configured as follows:
[0145] Based on the flag bits decoded from the video stream, determine whether to use the skip mode to process the pixel.
[0146] In some embodiments of this application, based on the foregoing scheme, the processing unit 1004 is configured as follows:
[0147] When all pixels in the pixel region are processed using the skip mode, it is determined that the pixel region will be processed using the skip mode.
[0148] In some embodiments of this application, based on the foregoing scheme, the generation unit 1006 is configured as follows:
[0149] When the current block is within the skipped region, based on the region where the current block is located in the current frame, multiple pixel values in the region of the previous frame image of the current frame or the reference frame image of the current frame are used as the reconstruction data corresponding to the current block.
[0150] In some embodiments of this application, based on the foregoing scheme, the generation unit 1006 is configured as follows:
[0151] When some pixels in the current block are in the skipped region
[0152] Decode the current block to obtain the decoded data corresponding to the current block;
[0153] Based on the positions of the partial pixels in the current frame, the pixel values at each position in the previous frame image or the reference frame image of the current frame are used to replace the data at each position in the decoded data to obtain the reconstructed data corresponding to the current block.
[0154] In some embodiments of this application, based on the foregoing scheme, the determining unit 1002 is further configured as follows:
[0155] The video stream is decoded to obtain a flag bit indicating the size of the pixel region;
[0156] The flag bits include at least one of the following flag bits: flag bits contained in the sequence header, flag bits contained in the image header, flag bits contained in the strip header, flag bits contained in the coding tree unit (CTU) header, and flag bits contained in the coding block.
[0157] In some embodiments of this application, based on the foregoing scheme, the determining unit 1002 is further configured as follows:
[0158] The video stream is decoded to obtain a first flag bit, which is used to indicate whether the current frame is decoded based on the skipped region;
[0159] The video stream is decoded to obtain a second flag bit, which is used to indicate whether to decode each image block in the current frame based on the skipped region;
[0160] The video stream is decoded to obtain a third flag bit, which is used to indicate whether to decode each strip in the current frame based on the skipped region.
[0161] Figure 11 shows a block diagram of a video encoding apparatus according to an embodiment of the present application. The video encoding apparatus can be installed in a device with computing processing capabilities, such as a terminal device or a server.
[0162] Referring to FIG11, a video encoding apparatus 1100 according to an embodiment of the present application includes: a determining unit 1102, a processing unit 1104, and an encoding unit 1106.
[0163] The determining unit 1102 is configured to determine multiple pixel regions in the current frame based on a preset pixel region size.
[0164] Processing unit 1104 is configured to determine the skipped region in the current frame based on whether a skipped mode is used to process the plurality of pixel regions; and,
[0165] The encoding unit 1106 is configured to encode the current block according to the positional relationship between the current block in the current frame and the skipped region.
[0166] In some embodiments of this application, based on the foregoing scheme, the encoding unit 1106 is configured to skip the encoding process of the current block when the current block is in the skipped region.
[0167] In some embodiments of this application, based on the foregoing scheme, the encoding unit 1106 is configured to: when some pixels in the current block are within the skipped area, when determining the encoding mode and encoding parameters of the current block, exclude pixel distortion in the current block that is within the skipped area.
[0168] In some embodiments of this application, based on the foregoing scheme, the encoding unit 1106 is configured to: when some pixels in the current block are within the skipped area, fill the some pixels with pixels adjacent to the skipped area in the current block, and determine the encoding mode and encoding parameters of the current block based on the filled some pixels.
[0169] Figure 12 shows a schematic diagram of an electronic device suitable for implementing the embodiments of this application. The electronic device may be a video encoding device or a video decoding device as described in the foregoing embodiments.
[0170] It should be noted that the electronic device 1200 shown in Figure 12 is only an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0171] As shown in Figure 12, the computer system 1200 may include a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1202 or programs loaded from storage portion 1208 into Random Access Memory (RAM) 1203, such as performing the methods described in the above embodiments. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An Input / Output (I / O) interface 1205 is also connected to the bus 1204.
[0172] The following components can be connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.
[0173] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.
[0174] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having at least one wire, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a computer program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0175] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and a computer program.
[0176] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0177] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more computer programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0178] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0179] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, and includes several instructions to cause an electronic device to execute the method according to the embodiments of this application.
[0180] For example, an electronic device can be a video decoding device, in which case the video decoding device can execute the video decoding method shown in Figure 8; or, an electronic device can be a video encoding device, in which case the video encoding device can execute the video encoding method shown in Figure 9.
[0181] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0182] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A video decoding method, executed by an electronic device, comprising: Based on a preset pixel region size, multiple pixel regions are determined in the current frame; The skip region in the current frame is determined based on whether the multiple pixel regions are processed using a skip mode; and, Based on the positional relationship between the current block in the current frame and the skipped region, the reconstruction data corresponding to the current block is generated.
2. The video decoding method according to claim 1 further includes: For each pixel in the current frame, determine whether to process the pixel using the skip mode; For each of the plurality of pixel regions, it is determined whether to apply the skip mode to the pixel region based on whether the skip mode is applied to each pixel contained in the pixel region.
3. The video decoding method according to claim 2, wherein, Determining whether to process each pixel in the current frame using the skip mode includes: Determine the position of the pixel in the current frame; When the pixel difference between any two adjacent frames at the specified position is less than or equal to a pixel threshold in a preset number of consecutive image frames that are adjacent to and precede the current frame, it is determined that the pixel will be processed using the skip mode.
4. The video decoding method according to claim 2, wherein, Determining whether to process each pixel in the current frame using the skip mode includes: Determine the position of the pixel in the current frame; When the motion vectors of a preset number of consecutive image frames adjacent to and preceding the current frame are all 0 at that position, it is determined that the pixel will be processed using the skip mode.
5. The video decoding method according to claim 2, wherein, Determining whether to process each pixel in the current frame using the skip mode includes: Based on the flag bits decoded from the video stream, determine whether to use the skip mode to process the pixel.
6. The video decoding method according to any one of claims 2 to 5, wherein, The step of determining whether to apply the skip mode to a pixel region based on whether each pixel contained in the pixel region is processed using the skip mode includes: When all pixels in the pixel region are processed using the skip mode, it is determined that the pixel region will be processed using the skip mode.
7. The video decoding method according to any one of claims 1 to 6, wherein, The step of generating reconstructed data corresponding to the current block based on the positional relationship between the current block to be decoded in the current frame and the skipped region includes: When the current block is within the skipped region, based on the region where the current block is located in the current frame, multiple pixel values in the region of the previous frame image of the current frame or the reference frame image of the current frame are used as the reconstruction data corresponding to the current block.
8. The video decoding method according to any one of claims 1 to 6, wherein, The step of generating reconstructed data corresponding to the current block based on the positional relationship between the current block to be decoded in the current frame and the skipped region includes: When some pixels in the current block are in the skipped region Decode the current block to obtain the decoded data corresponding to the current block; Based on the positions of the partial pixels in the current frame, the pixel values at each position in the previous frame image or the reference frame image of the current frame are used to replace the data at each position in the decoded data to obtain the reconstructed data corresponding to the current block.
9. The video decoding method according to any one of claims 1 to 8, further comprising: The video stream is decoded to obtain a flag bit used to indicate the size of the pixel region; The flag bits include at least one of the following flag bits: flag bits contained in the sequence header, flag bits contained in the image header, flag bits contained in the strip header, flag bits contained in the coding tree unit (CTU) header, and flag bits contained in the coding block.
10. The video decoding method according to any one of claims 1 to 9, further comprising at least one of the following steps: The video stream is decoded to obtain a first flag bit, which is used to indicate whether the current frame is decoded based on the skipped region; The video stream is decoded to obtain a second flag bit, which is used to indicate whether to decode each image block in the current frame based on the skipped region; The video stream is decoded to obtain a third flag bit, which is used to indicate whether to decode each strip in the current frame based on the skipped region.
11. A video encoding method, performed by an electronic device, comprising: Based on a preset pixel region size, multiple pixel regions are determined in the current frame; The skip region in the current frame is determined based on whether the multiple pixel regions are processed using a skip mode; and, The current block is encoded based on the positional relationship between the current block in the current frame and the skipped region.
12. The video encoding method according to claim 11, wherein, The step of encoding the current block based on the positional relationship between the current block in the current frame and the skipped region includes: When the current block is within the skipped region, the process of encoding the current block is skipped.
13. The video encoding method according to claim 11, wherein, The step of encoding the current block based on the positional relationship between the current block in the current frame and the skipped region includes: When some pixels in the current block are within the skipped region, the pixel distortion in the current block within the skipped region is excluded when determining the encoding mode and encoding parameters of the current block.
14. The video encoding method according to claim 11, wherein, The step of encoding the current block based on the positional relationship between the current block in the current frame and the skipped region includes: When some pixels in the current block are within the skipped area, the pixels in the current block that are adjacent to the skipped area are used to fill the partial pixels, and the encoding mode and encoding parameters of the current block are determined based on the filled partial pixels.
15. A video decoding apparatus, comprising: The determination unit is configured to determine multiple pixel regions in the current frame based on a preset pixel region size; The processing unit is configured to determine the skipped region in the current frame based on whether the multiple pixel regions are processed using a skip mode. and, The generation unit is configured to generate reconstruction data corresponding to the current block based on the positional relationship between the current block in the current frame and the skipped region.
16. A video encoding apparatus, comprising: The determination unit is configured to determine multiple pixel regions in the current frame based on a preset pixel region size; The processing unit is configured to determine the skipped region in the current frame based on whether the multiple pixel regions are processed using a skip mode. and, The encoding unit is configured to encode the current block according to the positional relationship between the current block in the current frame and the skipped region.
17. A computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the video decoding method of any one of claims 1 to 10, or implements the video encoding method of any one of claims 11 to 14.
18. An electronic device comprising: At least one processor; A memory for storing at least one computer program, which, when executed by the at least one processor, causes the electronic device to implement the video decoding method of any one of claims 1 to 10, or the video encoding method of any one of claims 11 to 14.
19. A computer program product comprising a computer program stored in a computer-readable storage medium, wherein a processor of an electronic device reads from and executes the computer program, causing the electronic device to perform the video decoding method of any one of claims 1 to 10, or to implement the video encoding method of any one of claims 11 to 14.