Video coding and decoding method and apparatus, medium, electronic device, and program product

By determining pixel areas and identifying skipped areas within frames, the method enhances video coding and decoding efficiency by reducing bit usage and complexity, adapting to various shapes, and improving flexibility.

US20260379955A1Pending Publication Date: 2026-11-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/741866
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Priority Date
2024-10-31
Filing Date
2026-07-14
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing video coding technologies require complex block division and large bit information to describe skipped areas, leading to reduced video coding and decoding efficiency.

Method used

The method involves determining pixel areas in a frame, identifying skipped areas within these pixel areas, and generating reconstructed data based on the position relationship between the current block and the skipped area, reducing the need for bit information to describe the skipped area contours.

Benefits of technology

This approach improves coding and decoding efficiency by accurately identifying skipped areas and reducing the bit requirement, while adapting to static areas of any shape, thus lowering complexity and enhancing flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260379955A1-D00000_ABST
    Figure US20260379955A1-D00000_ABST
Patent Text Reader

Abstract

Embodiments of this application provide a video decoding method performed by an electronic device. The method includes: determining a plurality of pixel areas in a current frame based on a preset pixel area size; selecting, from the plurality of pixel areas, a skipped area in the current frame on which a skip mode is applied; and generating reconstructed data corresponding to the current block from a video bitstream based on a position relationship between a current block and the skipped area in the current frame.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is a continuation application of PCT Patent Application No. PCT / CN2025 / 118174, entitled “VIDEO CODING AND DECODING METHOD AND APPARATUS, MEDIUM, ELECTRONIC DEVICE, AND PROGRAM PRODUCT” filed on Sep. 1, 2025, which claims priority to Chinese Patent Application No. 2024115529948, entitled “VIDEO CODING AND DECODING METHOD AND APPARATUS, COMPUTER-READABLE MEDIUM, AND ELECTRONIC DEVICE” filed with the China National Intellectual Property Administration on Oct. 31, 2024, all of which are incorporated herein by reference in their entirety.FIELD OF THE TECHNOLOGY

[0002] This application relates to the fields of computer and communication technologies, and to a video coding and decoding method and apparatus, a medium, an electronic device, and a program product.BACKGROUND OF THE DISCLOSURE

[0003] In a video coding and decoding process, content of some areas remains unchanged between consecutive video frames. To optimize coding efficiency of such videos, a skip mode is provided in a related technology, that is, when detecting that content of an area does not change between consecutive video frames, a coder is allowed to skip coding of the area and directly reuse data of a previous frame.

[0004] However, to accurately describe contours of these areas (referred to as skipped areas for ease of description), the coder needs to perform complex block division on the video frames, and needs to use a large quantity of bit information to describe positions of the skipped areas, severely reducing video coding and decoding efficiency.SUMMARY

[0005] Embodiments of this application provide a video coding and decoding method and apparatus, a medium, an electronic device, and a program product, to improve coding and decoding efficiency, and reduce coding and decoding complexity.

[0006] According to an aspect, an embodiment of this application provides a video decoding method. The method includes:

[0007] determining a plurality of pixel areas in a current frame based on a preset pixel area size;

[0008] selecting, from the plurality of pixel areas, a skipped area in the current frame on which a skip mode is applied; and

[0009] generating reconstructed data corresponding to the current block from a video bitstream based on a position relationship between a current block and the skipped area in the current frame.

[0010] According to another aspect, an embodiment of this application provides a video encoding method, performed by an electronic device. The method includes:

[0011] determining a plurality of pixel areas in a current frame based on a preset pixel area size;

[0012] determining a skipped area in the current frame on whether a skip mode is applied; and

[0013] encoding a current block in the current frame based on a position relationship between the current block and the skipped area in the current frame.

[0014] According to another aspect, an embodiment of this application provides a computer-readable medium having a video bitstream stored therein, the video bitstream is to be processed by the video decoding method or generated by the video coding method according to the foregoing embodiments.

[0015] According to another aspect, an embodiment of this application provides an electronic device, including: at least one processor; and a storage apparatus, configured to store at least one computer program, the at least one computer program, when being executed by the at least one processor, causing the electronic device to implement the video decoding method or the video encoding method according to the foregoing embodiments.BRIEF DESCRIPTION OF THE DRAWINGS

[0016] FIG. 1 is a diagram of an exemplary system architecture to which technical solutions in embodiments of this application may be applied.

[0017] FIG. 2 is a diagram of an arrangement manner of a video coding apparatus and a video decoding apparatus in a streaming transmission system.

[0018] FIG. 3 is a basic flowchart of a video coder.

[0019] FIG. 4 is a diagram of an inter-frame prediction process according to some embodiments.

[0020] FIG. 5 is a diagram of an inter-frame prediction process according to some embodiments.

[0021] FIG. 6 is a diagram of a shape of a skipped area.

[0022] FIG. 7 is a diagram of shapes of some skipped areas.

[0023] FIG. 8 is a flowchart of a video decoding method according to some embodiments.

[0024] FIG. 9 is a flowchart of a video coding method according to some embodiments.

[0025] FIG. 10 is a block diagram of a video decoding apparatus according to some embodiments.

[0026] FIG. 11 is a block diagram of a video coding apparatus according to some embodiments.

[0027] FIG. 12 is a diagram of a structure of an electronic device adapted to implement an embodiment of this application.DESCRIPTION OF EMBODIMENTS

[0028] Exemplary implementations are now described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary implementations may be implemented in various forms, and are not to be understood as being limited to the examples. Instead, the implementations are provided to make this application more thorough and complete, and fully convey the idea of the exemplary implementations to a person skilled in the art.

[0029] In addition, the features, structures or characteristics described in this application may be combined in one or more embodiments in any appropriate manner. The following descriptions have many specific details, so that embodiments of this application can be fully understood. However, a person skilled in the art is to be aware that, technical solutions in this application may be implemented without using all detailed features in the embodiments, one or more details may be omitted, or other methods, elements, apparatuses, or operations may be used.

[0030] In embodiments of this application, the term “module” or “unit” refers to a computer program with a preset function or a part of the computer program and works, together with other related parts, to implement a preset target, and may be completely or partially implemented by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or a plurality of processors or memories) may be configured to implement at least one module or unit. In addition, each module or unit may be a part of an overall module or unit including a function of the module or unit.

[0031] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. These functional entities may be implemented in a software form, or in at least one hardware module or integrated circuit, or in different networks and / or processor apparatuses and / or microcontroller apparatuses.

[0032] The flowcharts shown in the accompanying drawings are merely exemplary descriptions, and do not necessarily include all content and operations / processes and are not necessarily performed in the described orders either. For example, some operations / steps may be further divided, while some operations / steps may be merged or partially merged. Therefore, an actual execution order may change according to an actual case.

[0033] “Plurality of” mentioned in the specification means two or more. The “and / or” describes an association relationship for describing associated objects and represents that three relationships may exist. For example, A and / or B may represent the following three cases: Only A exists, both A and B exist, and only B exists. The character “ / ” represents an “or” relationship between the associated objects.

[0034] FIG. 1 is a diagram of an exemplary system architecture to which technical solutions in embodiments of this application may be applied.

[0035] As shown in FIG. 1, the system architecture 100 includes a plurality of terminal apparatuses. The terminal apparatuses may communicate with each other through, for example, a network 150. For example, the system architecture 100 may include a first terminal apparatus 110 and a second terminal apparatus 120 that are connected to each other through the network 150. In the embodiment of FIG. 1, the first terminal apparatus 110 and the second terminal apparatus 120 perform unidirectional data transmission.

[0036] For example, the first terminal apparatus 110 may code video data (for example, a video picture stream acquired by the terminal apparatus 110) for transmission to the second terminal apparatus 120 through the network 150, and coded video data is transmitted in a form of at least one coded video bitstream. The second terminal apparatus 120 may receive the coded video data from the network 150, decode the coded video data to restore the video data, and display a video picture based on the restored video data.

[0037] In an embodiment of this application, the system architecture 100 may include a third terminal apparatus 130 and a fourth terminal apparatus 140 that perform bidirectional transmission of the coded video data. The bidirectional transmission may occur, for example, during a video conference. For bidirectional data transmission, one of the third terminal apparatus 130 and the fourth terminal apparatus 140 may code the video data (for example, the video picture stream acquired by the terminal apparatus) for transmission to the other of the third terminal apparatus 130 and the fourth terminal apparatus 140 through the network 150. One of the third terminal apparatus 130 and the fourth terminal apparatus 140 may further receive coded video data transmitted by the other of the third terminal apparatus 130 and the fourth terminal apparatus 140, decode the coded video data to restore the video data, and display the video picture on an accessible display apparatus based on the restored video data.

[0038] In the embodiment shown in FIG. 1, the first terminal apparatus 110, the second terminal apparatus 120, the third terminal apparatus 130, and the fourth terminal apparatus 140 may be servers or terminals, but principles disclosed in this application are not limited thereto.

[0039] The server may be an independent physical server, or may be a server cluster or a distributed system including a plurality of physical servers, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a content delivery network (CDN), big data, and an artificial intelligence platform. The terminal may be a smartphone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart voice interaction device, a smartwatch, a smart appliance, an on-board terminal, an aircraft, or the like, but is not limited thereto.

[0040] The network 150 shown in FIG. 1 represents any quantity of networks that transmit the coded video data among the first terminal apparatus 110, the second terminal apparatus 120, the third terminal apparatus 130, and the fourth terminal apparatus 140, and includes, for example, a wired communication network and / or a wireless communication network. The communication network 150 may exchange data in a circuit-switched channel and / or a packet-switched channel. The network may include a telecommunication network, a local area network, a wide area network, and / or the Internet. For the purposes of this application, unless explained below, the architecture and topology of the network 150 may be immaterial to operations disclosed in this application.

[0041] In an embodiment of this application, FIG. 2 shows an arrangement manner of a video coding apparatus and a video decoding apparatus in a streaming transmission environment. The subject disclosed in this application may be equally applicable to other video-enabled applications, including, for example, a video conference, a digital television (TV), and storage of compressed videos on digital media including a compact disc (CD), a digital versatile disc (DVD), a memory stick, and the like.

[0042] A streaming transmission system may include an acquisition subsystem 213. The acquisition subsystem 213 may include a video source 201, for example, a digital camera. The video source creates an uncompressed video picture stream 202. In this embodiment, the video picture stream 202 includes samples photographed by the digital camera. Compared with coded video data 204 (or a coded video bitstream 204), the video picture stream 202 is depicted as a bold line to emphasize a video picture stream with a high data volume. The video picture stream 202 may be processed by an electronic apparatus 220. The electronic apparatus 220 includes a video coding apparatus 203 coupled to the video source 201. The video coding apparatus 203 may include hardware, software, or a combination of software and hardware, to implement or carry out aspects of the disclosed subject described below in more detail. Compared with the video picture stream 202, the coded video data 204 (or the coded video bitstream 204) is depicted as a thin line to emphasize the coded video data 204 (or the coded video bitstream 204) with a low data volume, and may be stored on a streaming transmission server 205 for future use. At least one streaming transmission client subsystem, such as a client subsystem 206 and a client subsystem 208 in FIG. 2, may access the streaming transmission server 205 to retrieve a copy 207 and a copy 209 of the coded video data 204. The client subsystem 206 may include, for example, a video decoding apparatus 210 in an electronic apparatus 230. The video decoding apparatus 210 decodes the incoming copy 207 of the coded video data and generates an output video picture stream 211 that may be presented on a display 212 (for example, a display screen) or another display apparatus. In some streaming transmission systems, the coded video data 204, video data 207, and video data 209 (for example, a video bitstream) may be coded according to some video coding / compression standards.

[0043] The electronic apparatus 220 and the electronic apparatus 230 may include other components not shown in the figure. For example, the electronic apparatus 220 may include a video decoding apparatus, and the electronic apparatus 230 may further include a video coding apparatus.

[0044] In an embodiment of this application, international video coding standards such as high efficiency video coding (HEVC), versatile video coding (VVC), and the Chinese national video coding standard like the audio video coding standard (AVS) are used as examples. After a video frame image is input, the video frame image is divided into several non-overlapping processing units based on a block size, and a similar compression operation is performed on each processing unit. The processing unit is referred to as a coding tree unit (CTU) or a largest coding unit (LCU). The CTU may be further divided more finely, to obtain at least one basic coding unit (CU). The CU is a most basic element in a coding process.

[0045] In another embodiment, the processing unit may also be referred to as a tile, and is a rectangular area of a multimedia data frame that can be independently decoded and coded. In an alliance for open media video 1 (AV1) standard formulated by the Alliance for Open Media, a tile may be further divided more finely, to obtain at least one superblock (SB). The SB is a starting point of block division, and may be further divided into a plurality of subblocks. Then, the superblock is further divided, to obtain at least one block. Each block is a most basic element in a coding process. In an embodiment, one SB may include several Bs.

[0046] The foregoing division manner of the video frame image may be referred to as a block partition structure. The following describes some concepts in a coding process.

[0047] Predictive coding: The predictive coding includes manners such as intra-frame prediction and inter-frame prediction. After an original video signal is predicted by using a selected reconstructed video signal, a residual video signal is obtained. A coder side needs to determine a predictive coding mode to be selected for a current coding unit (or a coding block), and inform a decoder side. The intra-frame prediction means that a predicted signal comes from an area that is already coded and reconstructed in the same image; and the inter-frame prediction means that a predicted signal comes from another image (referred to as a reference image) that is already coded and is different from a current image.

[0048] Transform & quantization: After the residual video signal undergoes a transform operation, for example, discrete Fourier transform (DFT) or discrete cosine transform (DCT), the signal is converted into a transform domain, which is referred to as a transform coefficient. A lossy quantization operation is further performed on the transform coefficient, and some information is lost, so that a quantized signal facilitates a compressed expression. In some video coding standards, more than one transform manners may be selected. Therefore, the coder side also needs to select one of the transform manners for the current coding unit (or the coding block), and inform the decoder side. Fineness of quantization is determined by a quantization parameter (QP). A larger QP value indicates that coefficients with a larger value range are to be quantized to the same output, which may usually bring greater distortion and a lower bit rate. On the contrary, a smaller QP value indicates that coefficients with a smaller value range are to be quantized to the same output, which usually bring less distortion and correspond to a higher bit rate.

[0049] Entropy coding or statistical coding: Statistical compression coding is performed on a quantized transform domain signal based on a frequency of occurrence of each value, and finally a binary (0 or 1) compressed bitstream is output. In addition, entropy coding also needs to be performed on other information generated through coding, for example, a selected coding mode and motion vector data, to reduce the bit rate. The statistical coding is a lossless coding mode that can effectively reduce a bit rate required to express the same signal. A common statistical coding manner includes variable length coding (VLC) or context adaptive binary arithmetic coding (CABAC).

[0050] A context adaptive binary arithmetic coding (CABAC) process includes 3 operations: binarization, context modeling, and binary arithmetic coding. After binarization is performed on an input syntax element, binary data may be coded in a normal coding mode and a bypass coding mode. In the bypass coding mode, a specific probability model does not need to be assigned to each binary bit, and an input binary bit bin value is directly coded by using a simple bypass coder to accelerate an entire coding and decoding process. In general, different syntax elements are not completely independent, and the same syntax elements also have memory properties. Therefore, according to a conditional entropy theory, using other coded syntax elements for conditional coding can further improve coding performance compared with independent coding or memoryless coding. Such coded symbolic information that is used as a condition is referred to as a context. In a regular coding mode, binary bits of a syntax element sequentially enter a context modeler. The coder assigns a suitable probability model to each input binary bit based on a value of a previously coded syntax element or binary bit. This process is referred to as context modeling. A context model corresponding to the syntax element may be positioned by using a context index increment (ctxIdxInc) and a context index start (ctxIdxStart). After the bin value and the assigned probability model are sent together into a binary arithmetic coder for coding, the context model needs to be updated based on the bin value. This is an adaptive process in coding.

[0051] Loop filtering: Operations such as inverse quantization, inverse transform, and predictive compensation are performed on a transformed and quantized signal to obtain a reconstructed image. The reconstructed image has a part of information different from that in an original image because of quantization, that is, distortion may occur in the reconstructed image. Therefore, a filtering operation may be performed on the reconstructed image. For example, filters such as a deblocking filter (DB), a sample adaptive offset (SAO) filter, or an adaptive loop filter (ALF) are used, so that a degree of distortion caused by quantization can be effectively reduced. Since the filtered reconstructed images are to be used as a reference for subsequently coded images to predict future image signals, the foregoing filtering operation is also referred to as the loop filtering, that is, a filtering operation in a coding loop.

[0052] In an embodiment of this application, FIG. 3 is a basic flowchart of a video coder. In this procedure, intra-frame prediction is used as an example for description. A difference operation is performed on an original image signal sk[x,y] and a predicted image signal ŝk[x,y] to obtain a residual signal uk[x,y]. The residual signal uk[x,y] is transformed and quantized to obtain a quantization coefficient. For the quantization coefficient, entropy coding is performed to obtain a coded bitstream, and inverse quantization and inverse transform are performed to obtain a reconstructed residual signal u′k[x,y]. The predicted image signal ŝk{[x,y] and the reconstructed residual signal u′k} [x,y] are superimposed to generate an image signalsk*[x,y].The image signalsk*[x,y]is input into an intra-frame mode decision module and an intra-frame prediction module for intra-frame prediction, and outputs a reconstructed image signal s′k[x,y] through loop filtering. The reconstructed image signal s′k[x,y] may be used as a reference image of a next frame for motion estimation and motion compensation prediction. Then, a predicted image signal ŝk[x,y] of the next frame is obtained based on a motion compensation prediction result s′r[x+m, y+m,] and an intra-frame prediction resultf⁡(sk*[x,y]).The foregoing process is repeated until coding is completed.Based on the foregoing coding process, on a decoder side, for each coding unit (or coding block), after the compressed bitstream (that is, the bitstream) is obtained, entropy decoding is performed to obtain various pieces of pattern information and various quantization coefficients. Then, inverse quantization and inverse transform processing are performed on the quantization coefficients to obtain the residual signal. Based on known coding mode information, a predicted signal corresponding to the coding unit (or the coding block) may be obtained, then the residual signal and the predicted signal are added to obtain a reconstructed signal, and then operations such as loop filtering are performed on the reconstructed signal to generate a final output signal.In the field of coding technologies, inter-frame prediction is a common predictive coding technology. As shown in FIG. 4, in inter-frame prediction, correlation in a video time domain is used, and pixels of an adjacent coded image are used to predict pixels of a current image, to effectively remove time domain redundancy of a video, and effectively save bits of coding residual data. P represents a current frame, Pr represents a reference frame, B represents a current coding block, and Br represents a reference block of B. Coordinates of B′ in the reference frame are the same as coordinates of B in the current frame. Coordinates of Br are (xr,yr), coordinates of B′ are (x,y), and displacement between the current coding block and the reference block of the current coding block is referred to as a motion vector (MV), where MV=(xr−x,yr−y). In other words, the inter-frame prediction refers to a process in which the adjacent coded image (that is, the reference frame) is searched based on a to-be-coded current block in the current frame, to obtain the reference block, to remove time domain redundancy of a video signal. As shown in FIG. 5, searching is performed in a specific range (that is, in a search area formed by a search box) in a reference frame based on a to-be-coded current block in a current frame according to a block matching criterion, to obtain an optimal matching block. In an embodiment, common block matching criteria in video coding include matching criteria such as a minimum mean square error (MSE) and a sum of absolute difference (SAD).It can be learned from the foregoing descriptions, predicted pixels in an inter-frame prediction mode are obtained by searching a reconstructed reference frame or searching a sub-pixel interpolation image of the reconstructed reference frame. For a chrominance component the chrominance component has a motion vector or a block vector like that of a luminance component by default. Therefore, the motion vector or the block vector of the chrominance component is obtained through simple derivation based on the motion vector or the block vector of the luminance component.In this matching search process, an image matching degree needs to be considered, and coding costs of the motion vector also needs be considered. Therefore, this matching search process is not necessarily optimal in terms of the matching degree alone. In other words, prediction accuracy may still be improved to some extent.If a motion vector of a coding block may be completely derived from a specified predicted motion vector (for example, motion vector prediction of an adjacent block in space domain), a residual value of the motion vector prediction does not need to be additionally identified, and a residual of the coding block after prediction is also all 0, the coding block may be coded by using a skip mode. Specifically, for a current block for which the skip mode is used and whose motion vector is 0, reconstruction work may be completed by copying pixels at the same position in the reference frame.

[0058] In an actual application scenario, for a generated content part like a background part or a subtitle of video content, when local content of previous and following video frames does not change, the skip mode may be used for processing.

[0059] In this embodiment of this application, in video content, an area that is processed by using the skip mode may be referred to as a skipped area. The skipped area in a video frame may have any shape, and the shape of the skipped area may change in different video frames.

[0060] As shown in FIG. 6, a skipped area 601 in a current frame may have a rectangular shape, and includes a part of a pixel area C31, a pixel area C32, and a pixel area C33 in the current frame. During reconstruction, pixels at the same position in a reference frame may be copied as reconstructed pixels.

[0061] As shown in FIG. 7, a skipped area may have any shape, for example, rectangles shown by a shape 701 and a shape 702, or a trapezoid shown by a shape 703.

[0062] In a related technology, to accurately describe a contour of a skipped area, a coder needs to perform complex block division on a video frame. This usually involves a multi-level progressively refined block division process, until a boundary of the skipped area can be accurately delineated. Such refined division increases coding complexity, and results in the fact that a large quantity of bit information is needed in a video bitstream to describe positions and shapes of divided blocks.

[0063] In addition, for each block obtained through division, the coder further needs additional bits for identifying whether a skip mode is used for the block. The additional identification information further increases overheads of data coding, offsetting improvement in coding efficiency caused by the skip mode.

[0064] Based on the foregoing technical problem, the technical solution in embodiments of this application provides a new video coding and decoding solution, so that a skipped area in a current frame can be accurately and efficiently identified, and a quantity of bits needed for describing a contour of the skipped area is reduced, thereby significantly improving coding and decoding efficiency. In addition, as processing is performed based on a pixel area in the technical solution in embodiments of this application, the technical solution can adapt to a static area of any shape, thereby reducing coding and decoding complexity while improving coding flexibility.

[0065] Implementation details of the technical solution in embodiments of this application are described in the following.

[0066] FIG. 8 is a flowchart of a video decoding method according to some embodiments. The video decoding method may be performed by an electronic device. The electronic device has a computing processing function, for example, the method may be performed by a terminal device or a server. With reference to FIG. 8, the video decoding method includes at least S810 to S830. Detailed descriptions are provided as follows.

[0067] In S810, a plurality of pixel areas are determined in a current frame based on a preset pixel area size.

[0068] In this operation, each of the plurality of pixel areas includes at least one pixel.

[0069] In some embodiments, the preset pixel area size may be preset in a video coding device and a video decoding device, and may be, for example, a pixel size of 1, a pixel size of 2×2, and a pixel size of 3×3.

[0070] In some embodiments, the video coding device may determine the preset pixel area size, and then indicate the preset pixel area size to the video decoding device by adding a flag bit to a video bitstream. In this way, the video decoding device decodes the video bitstream to obtain the flag bit that indicates the pixel area size.

[0071] In an embodiment, the flag bit may include at least one of the following flag bits: a flag bit included in a sequence header, a flag bit included in an image header, a flag bit included in a slice header, a flag bit included in a coding tree unit (CTU) header, and a flag bit included in a coding block. In this case, the video decoding device may decode the video bitstream to obtain the flag bit that indicates the pixel area size.

[0072] The flag bit included in the sequence header may indicate a pixel area size that is set for an entire image sequence. The flag bit included in the image header may indicate a pixel area size that is set for an entire image. The flag bit included in the slice header may indicate a pixel area size that is set for an entire slice. The flag bit included in the coding tree unit (CTU) header may indicate a pixel area size that is set for an entire CTU. The flag bit included in the coding block may indicate a pixel area size that is set for a current coding block.

[0073] In S820, a skipped area in the current frame is selected, from the plurality of pixel areas, on which a skip mode is applied.

[0074] In some embodiments, whether each pixel area is processed by using the skip mode may be determined based on pixels included in the pixel area and depending on whether each pixel in the current frame is processed by using the skip mode. For example, when all pixels included in a pixel area are processed by using the skip mode, it may be determined that the pixel area is processed by using the skip mode. In other words, when all the pixels in the pixel area are processed by using the skip mode, it may be determined that the pixel area is processed by using the skip mode.

[0075] In an embodiment, when most pixels in a pixel area are processed by using the skip mode, it may be determined that the pixel area is processed by using the skip mode. For example, a ratio threshold may be set, and when pixels in the pixel area that exceed the ratio threshold are processed by using the skip mode, it may be determined that the pixel area is processed by using the skip mode.

[0076] In some embodiments, when determining whether each pixel is processed by using the skip mode, the video decoding device may directly decode the video stream to obtain a corresponding flag bit, to determine, based on the flag bit, whether each pixel is processed by using the skip mode. Correspondingly, in the video bitstream, the video coding device indicates, by using the flag bit, whether each pixel is processed by using the skip mode.

[0077] In some embodiments, the video decoding device may alternatively determine, through deduction, whether each pixel is processed by using the skip mode. Specifically, a position of a pixel in the current frame is determined as a target pixel position. For every two adjacent frames in a preset quantity of consecutive image frames immediately preceding the current frame, when a pixel difference between the every two adjacent frames at the target pixel position is less than or equal to a pixel threshold, it is determined that the pixel is processed by using the skip mode. In this embodiment, for every two adjacent frames in N (N≥2) consecutive frames before the current frame, if a pixel difference between the every two adjacent frames at the target pixel position is less than or equal to the specified pixel threshold (for example, 0, 1, or another value), it is determined that the pixel at the target pixel position in the current frame is processed by using the skip mode.

[0078] For another example, when motion vectors of the preset quantity of consecutive image frames immediately preceding the current frame are all 0 at the target pixel position, it is determined that the pixel at the target pixel position is processed by using the skip mode.

[0079] When the motion vectors are 0, a residual value obtained through prediction based on the motion vectors is also close to 0. Therefore, in another embodiment, if motion vectors of the N (N≥2) consecutive frames before the current frame are all 0 and / or predicted residual values at the target pixel position are all less than or equal to a specified residual threshold (for example, 0, 1, or another value), it may be determined that the pixel at the target pixel position is processed by using the skip mode.

[0080] In S830, reconstructed data corresponding to the current block is generated from the video bitstream based on a position relationship between a current block and the skipped area in the current frame.

[0081] In some embodiments, a video includes a video image frame sequence, the video image frame sequence includes a series of images, each image may be further divided into a slice, the slice may be further divided into a series of LCUs (or CTUs), and the LCU includes several CUs. A video image frame is coded by using a block as a unit. In some video coding standards, for example, the H.264 standard, a macroblock (MB) is defined, and the macroblock may be further divided into a plurality of prediction blocks that may be configured for predictive coding. In the HEVC standard, various block units including a coding unit (CU), a prediction unit (PU), and a transform unit (TU) are divided in terms of functions, and are described by using a tree structure. For example, the CU may be divided into smaller CUs according to a quadtree, and the smaller CUs may be further divided, to form a quadtree structure. The current block in this embodiment of this application may be a CU or a block smaller than the CU, for example, a smaller block obtained by dividing the CU.

[0082] In some embodiments, when the current block is in the skipped area, based on an area in which the current block is located in the current frame, a plurality of pixel values in an area corresponding to the skipped area in a previous frame or a reference frame of the current frame may be used as the reconstructed data corresponding to the current block. According to the technical solution in this embodiment, for the current block in the skipped area, a pixel value at a corresponding position (for example, the same position) in the previous frame of image or the reference frame of image may be directly copied as the reconstructed data. This reduces a quantity of bits configured for transmitting data of the current block in a coding process, reduces calculation load of a coder and a decoder, and improves overall coding efficiency and a decoding speed.

[0083] In some embodiments, when the current block is partially in the skipped area, the current block may be decoded to obtain decoded data corresponding to the current block; and based on each position of the part of pixels in the current frame, data at each position in the decoded data is replaced with a pixel value at each position in the previous frame of image of the current frame or in the reference frame of image of the current frame, to obtain the reconstructed data corresponding to the current block. According to the technical solution in this embodiment, a decoding result of a pixel that is not based on skipping processing in the current block is kept, and optimization processing may be performed on a pixel that is based on the skipping processing, to further reduce a data volume needed for coding while ensuring high image quality, to improve the overall coding efficiency.

[0084] In some embodiments, the video coding device may add a first flag bit to the video bitstream to indicate whether a skipped area-based decoding solution, that is, the technical solution in the foregoing embodiment, is used for the current frame. In this case, for each pixel in the current frame, the video decoding device may determine, based on the first flag bit obtained by decoding the video bitstream, whether the skip mode is used to process the pixel.

[0085] In some embodiments, the video coding device may add a second flag bit to the video bitstream to indicate whether the skipped area-based decoding solution, that is, the technical solution in the foregoing embodiment, is used for each image block in the current frame. In this case, the video decoding device may determine, based on the second flag bit obtained by decoding the video bitstream, whether the technical solution in the foregoing embodiment is used for each image block in the current frame. For example, some image blocks in the current frame use the technical solution in the foregoing embodiment, and other image blocks do not use the technical solution in the foregoing embodiment.

[0086] In some embodiments, the video coding device may add a third flag bit to the video stream to indicate whether the skipped area-based decoding solution is used for each slice in the current frame. In this case, the video decoding device may determine, based on the third flag bit obtained by decoding the video bitstream, whether the technical solution in the foregoing embodiment is used for each slice in the current frame. For example, some slices in the current frame use the technical solution in the foregoing embodiment, and other slices do not use the technical solution in the foregoing embodiment.

[0087] In some embodiments, the first flag bit, the second flag bit, and the third flag bit may be the same flag bit, or may be different flag bits. For example, a plurality of the following flag bits may be added to the video bitstream: the first flag bit that indicates whether skipped area-based decoding is used for the current frame, the second flag bit that indicates whether the skipped area-based decoding is used for each image block in the current frame, and the third flag bit that indicates whether the skipped area-based decoding is used for each slice in the current frame.

[0088] In an embodiment, if the first flag bit and the second flag bit are used to indicate whether the skipped area-based decoding solution is used, the first flag bit indicates that the skipped area-based decoding is used for the current frame, and the second flag bit indicates that the skipped area-based decoding is used for a specified image block in the current frame, so that it is determined that the skipped area-based decoding solution is needed by the specified image block.

[0089] FIG. 8 describes the technical solution in embodiments of this application from a perspective of video decoding. The following describes the technical solution in embodiments of this application again from a perspective of video coding with reference to FIG. 9.

[0090] FIG. 9 is a flowchart of a video coding method according to some embodiments. The video coding method may be performed by an electronic device. The electronic device has a computing processing function. For example, the method may be performed by a terminal device or a server. With reference to FIG. 9, the video coding method includes at least S910 to S930. Detailed descriptions are provided as follows.

[0091] In S910, a plurality of pixel areas are determined in a current frame based on a preset pixel area size.

[0092] In this operation, each pixel area includes at least one pixel.

[0093] In an embodiment, for specific implementation details of S910, refer to the implementation details of S810 in the foregoing embodiment. Details are not described herein again.

[0094] In S920, a skipped area in the current frame is selected, from the plurality of pixel areas, on which a skip mode is applied.

[0095] In an embodiment, for specific implementation details of S920, refer to the implementation details of S820 in the foregoing embodiment. A video coding device may further determine, by comparing the current frame with M (M≥1) previous frames of the current frame, whether the skip mode is used to process each pixel.

[0096] In an embodiment, for every two adjacent frames in a preset quantity of consecutive image frames including the current frame, when a pixel difference between the every two adjacent frames at a target pixel position is less than or equal to a pixel threshold, it may be determined that a pixel at the target pixel position in the current frame is processed by using the skip mode.

[0097] In another embodiment, if motion vectors of the preset quantity of consecutive image frames including the current frame at the target pixel position between the adjacent frames are 0 and / or a residual value at the target pixel position is less than or equal to a residual threshold, it may be determined that the pixel at the target pixel position in the current frame is processed by using the skip mode.

[0098] In S930, a current block is encoded into the video bistream based on a position relationship between the current block and the skipped area in the current frame.

[0099] In some embodiments, if the current block is in the skipped area, the video coding device may skip a coding process of the current block, for example, may skip a transform and quantization process of the current block. Correspondingly, a video decoding device may skip inverse quantization and inverse transform processing of the current block, and directly copy a pixel value at a corresponding position (for example, the same position) in a previous frame of image or a reference frame of image as reconstructed data.

[0100] In some embodiments, if the current block is partially in the skipped area, when determining a coding mode and a coding parameter of the current block, the video coding device may exclude (or not calculate) distortion of the pixels in the current block that are in the skipped area. According to the technical solution in this embodiment, pixel distortion in the skipped area is excluded, so that the coding process can focus on optimizing pixels in a non-skipped area that have larger impact on video quality, thereby effectively reducing unnecessary calculation overheads and bit rate consumption while ensuring the video quality. This facilitates improving video coding and decoding efficiency.

[0101] In some embodiments, if the current block is partially in the skipped area, the video coding device may fill the part of pixels with pixels adjacent to the skipped area in the current block, and determine a coding mode and a coding parameter of the current block based on the filled part of pixels. According to the technical solution in this embodiment, the pixels adjacent to the skipped area are used for filling, to maintain continuity and smoothness of an image at an edge of the skipped area, and effectively avoid an adverse effect of a pixel information loss caused by the skipped area on selection of the coding mode and the parameter.

[0102] A processing process of the video coding device is like another processing process of the video decoding device. For details, refer to the foregoing processing process related to the video decoding device, and details are not described herein again.

[0103] In conclusion, according to the technical solution in embodiments of solution, the skipped area in the current frame can be accurately and efficiently identified, and a quantity of bits needed for describing a contour of the skipped area is reduced, thereby significantly improving the coding and decoding efficiency. In addition, as processing is performed based on a pixel area in the technical solution in embodiments of this application, the technical solution can adapt to a static area of any shape, thereby reducing coding and decoding complexity while improving coding flexibility.

[0104] In a specific application scenario of this application, for a to-be-processed current image frame, when a shape of a skipped area is determined, a size of a pixel block (that is, the pixel area in the foregoing embodiment) configured for determining the skipped area may be first defined. For example, the size of the pixel block may be 1 pixel or 2×2 pixels. For the current frame, a binary map may be constructed by using the pixel block as a unit. Whether each pixel block is processed by using the skip mode is described on the map, and pixel blocks processed by using the skip mode form the skipped area. In an embodiment, the size of the pixel block may be defined or updated in an image header, a sequence header, or other high-level syntax.

[0105] In some embodiments, when a value of each pixel block in the binary map is derived, the following possible methods are included.

[0106] Method 1: Calculate a difference between pixel pairs at the same position of a previous frame and a following frame, and if a pixel difference between every two adjacent frames in M (M≥2) consecutive frames at a position is 0 (or less than a threshold), determine that a pixel at the position is a skipped pixel (that is, a pixel processed by using the skip mode). If all pixels in the pixel block are processed by using the skip mode, the pixel block may be defined as a skipped pixel block. Then, on the binary map, the skipped pixel block is marked as 1, and other pixel blocks are marked as 0.

[0107] For the video coding device, when the method 1 is implemented, the M consecutive frames may include the current frame. For the video decoding device, when the method 1 is implemented, the M consecutive frames may be M frames immediately preceding the current frame.

[0108] Method 2: For any pixel in a pixel block, if motion vectors of M (M≥2) consecutive frames at a position of the pixel are 0 and / or a residual value at a corresponding position is 0 (or less than a threshold), determine that the pixel at the position is a skipped pixel. If all pixels in the pixel block are processed by using the skip mode, the pixel block may be defined as a skipped pixel block. Then, on the binary map, the skipped pixel block is marked as 1, and other pixel blocks are marked as 0.

[0109] For the video coding device, when the method 2 is implemented, the M consecutive frames may include the current frame. For the video decoding device, when the method 2 is implemented, the M consecutive frames may be M frames immediately preceding the current frame.

[0110] In some embodiments, a switch may be set at a frame level or an area level, to determine whether an area skipping method needs to be used. For example, if a frame-level switch is used, all skipped pixel blocks in the current frame do not need to be coded or decoded, and pixel values at corresponding positions in a previous frame or a reference frame are directly copied.

[0111] For another example, if an area-level switch is used, the current frame may be divided into sub-images or slices of a fixed size. For example, in FIG. 6, the current frame is divided into 12 sub-images, and a switch may be separately set for each sub-image to determine whether the area skipping method is used. For example, in the example shown in FIG. 6, the area skipping method may be used for sub-images C31, C32, and C33. For each sub-image for which the area skipping method is selected to be used, a skipped pixel block in the sub-image does not need to be coded or decoded, and a pixel value at a corresponding position in a previous frame or a reference frame is directly copied.

[0112] In some embodiments, for the video coding device, if the entirety of the current block is in the skipped area, a coding process of the current block may be skipped (for example, a transform and quantization process is skipped), and transmission of a syntax element related to the current block in the bitstream may be ignored.

[0113] In an embodiment, in an exemplary solution, if the current block is partially in the skipped area, when evaluating various coding parameters and modes of the current block for selection, a coder may exclude the part of pixels in the current block that belong to the skipped area when calculating pixel distortion, that is, does not calculate distortion of the part of pixels.

[0114] In another exemplary solution, if the current block is partially in the skipped area, when evaluating various coding parameters and modes of the current block for selection, the coder may extend, through copying, pixels in the current block that are adjacent to the skipped area part and on a boundary of a non-skipped area to positions of skipped pixels in the current block, so that pixel continuity of a coding process in the non-skipped area is maintained.

[0115] In some embodiments, for the video decoding device, if the entirety of the current block is in the skipped area, a decoding process of the current block may be skipped, and a pixel value at a corresponding position of a previous frame or a reference frame is directly used as reconstructed data of the current block.

[0116] In an embodiment, if the current block is partially in the skipped area, a decoding block may be normally decoded. After the decoding is completed, pixels in the decoding block that belong to the skipped area may be replaced with pixels at corresponding positions in a previous frame or a reference frame.

[0117] According to the technical solution in the foregoing embodiments, a quantity of bits needed for block division and skip mode identification can be reduced while an accurate description of a skipped area contour is kept, thereby effectively improving efficiency of predictive coding.

[0118] The following describes apparatus embodiments of this application, which may be configured for performing the method in the foregoing embodiments of this application. For details not disclosed in the apparatus embodiments of this application, refer to the foregoing method embodiments of this application.

[0119] FIG. 10 is a block diagram of a video decoding apparatus according to some embodiments. The video decoding apparatus may be arranged in a device having a computing processing function, for example, may be arranged in a terminal device or a server.

[0120] Referring to FIG. 10, a video decoding apparatus 1000 according to some embodiments includes: a determining unit 1002, a processing unit 1004, and a generation unit 1006.

[0121] The determining unit 1002 is configured to determine a plurality of pixel areas in a current frame based on a preset pixel area size;

[0122] the processing unit 1004 is configured to determine a skipped area in the current frame depending on whether a skip mode is used to process the plurality of pixel areas; and

[0123] the generation unit 1006 is configured to generate, based on a position relationship between a current block and the skipped area in the current frame, reconstructed data corresponding to the current block.

[0124] In some embodiments of this application, based on the foregoing solutions, the processing unit 1004 is further configured to:

[0125] determine, for each pixel in the current frame, whether to process the pixel by using the skip mode; and

[0126] for each of the plurality of pixel areas, determine, depending on whether each pixel included in the pixel area is processed by using the skip mode, whether to process the pixel area by using the skip mode.

[0127] In some embodiments of this application, based on the foregoing solutions, the processing unit 1004 is further configured to:

[0128] determine a position of the pixel in the current frame; and

[0129] for every two adjacent frames in a preset quantity of consecutive image frames immediately preceding the current frame, when a pixel difference between the every two adjacent frames at the position is less than or equal to a pixel threshold, determine to process the pixel by using the skip mode.

[0130] In some embodiments of this application, based on the foregoing solutions, the processing unit 1004 is further configured to:

[0131] determine a position of the pixel in the current frame; and

[0132] when motion vectors of a preset quantity of consecutive image frames immediately preceding the current frame are all 0 at the position, determine to process the pixel by using the skip mode.

[0133] In some embodiments of this application, based on the foregoing solutions, the processing unit 1004 is further configured to:

[0134] determining, based on a flag bit obtained by decoding a video bitstream, whether to process the pixel by using the skip mode.

[0135] In some embodiments of this application, based on the foregoing solutions, the processing unit 1004 is configured to:

[0136] when all pixels included in the pixel area are processed by using the skip mode, determine to process the pixel area by using the skip mode.

[0137] In some embodiments of this application, based on the foregoing solutions, the generation unit 1006 is configured to:

[0138] when the current block is in the skipped area, use, based on an area in which the current block is located in the current frame, a plurality of pixel values in an area corresponding to the skipped area in a previous frame or a reference frame of the current frame as the reconstructed data corresponding to the current block.

[0139] In some embodiments of this application, based on the foregoing solutions, the generation unit 1006 is configured to:

[0140] when the current block is partially in the skipped area,

[0141] decoding the current block to obtain decoded data corresponding to the current block; and

[0142] replacing, based on each position of the part of pixels in the current frame, data at each position in the decoded data with a pixel value at each position in a previous frame or a reference frame of the current frame, to obtain the reconstructed data corresponding to the current block.

[0143] In some embodiments of this application, based on the foregoing solutions, the determining unit 1002 is further configured to:

[0144] decode the video bitstream to obtain the flag bit that indicates the pixel area size,

[0145] where the flag bit includes at least one of the following flag bits: a flag bit included in a sequence header, a flag bit included in an image header, a flag bit included in a slice header, a flag bit included in a coding tree unit (CTU) header, and a flag bit included in a coding block.

[0146] In some embodiments of this application, based on the foregoing solutions, the determining unit 1002 is further configured to:

[0147] decode the video bitstream to obtain a first flag bit, where the first flag bit indicates whether to decode the current frame based on the skipped area;

[0148] decode the video bitstream to obtain a second flag bit, where the second flag bit indicates whether to decode each image block in the current frame based on the skipped area; and

[0149] decode the video bitstream to obtain a third flag bit, where the third flag bit indicates whether to decode each slice in the current frame based on the skipped area.

[0150] FIG. 11 is a block diagram of a video coding apparatus according to some embodiments. The video coding apparatus may be arranged in a device having a computing processing function, for example, may be arranged in a terminal device or a server.

[0151] Referring to FIG. 11, a video coding apparatus 1100 according to some embodiments includes: a determining unit 1102, a processing unit 1104, and a coding unit 1106.

[0152] The determining unit 1102 is configured to determine a plurality of pixel areas in a current frame based on a preset pixel area size;

[0153] the processing unit 1104 is configured to determine a skipped area in the current frame depending on whether a skip mode is used to process the plurality of pixel areas; and

[0154] the coding unit 1106 is configured to code a current block based on a position relationship between the current block in the current frame and the skipped area.

[0155] In some embodiments of this application, based on the foregoing solutions, the coding unit 1106 is configured to: skip, when the current block is in the skipped area, a process of coding the current block.

[0156] In some embodiments of this application, based on the foregoing solutions, the coding unit 1106 is configured to: when the current block is partially in the skipped area, exclude, when determining a coding mode and a coding parameter of the current block, distortion of the pixels in the current block that are in the skipped area.

[0157] In some embodiments of this application, based on the foregoing solutions, the coding unit 1106 is configured to: when the current block is partially in the skipped area, fill the part of pixels with pixels adjacent to the skipped area in the current block, and determine a coding mode and a coding parameter of the current block based on the filled part of pixels.

[0158] FIG. 12 is a diagram of a structure of an electronic device adapted to implement an embodiment of this application. The electronic device may be the video coding apparatus or the video decoding apparatus in the foregoing embodiments.

[0159] An electronic device 1200 shown in FIG. 12 is merely an example, and does not constitute any limitation on functions and use ranges of embodiments of this application.

[0160] As shown in FIG. 12, a computer system 1200 may include a central processing unit (CPU) 1201, which may perform various suitable actions and processing based on a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 into a random access memory (RAM) 1203, for example, perform the method in the foregoing embodiments. The RAM 1203 further stores various programs and data required for system operations. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0161] The following components may be connected to the I / O interface 1205: an input part 1206, including a keyboard, a mouse, or the like; an output part 1207, including a cathode ray tube (CRT), a liquid crystal display (LCD), a speaker, or the like; the storage part 1208, including a hard disk, or the like; and a communication part 1209, including a network interface card like a local area network (LAN) card or a modem. The communication part 1209 performs communication processing by using a network such as the Internet. A driver 1210 is also connected to the I / O interface 1205 as required. A removable medium 1211, for example, a magnetic disk, an optical disc, a magneto-optical disk, or a semiconductor memory, is installed on the driver 1210 as required, so that a computer program read from the removable medium is installed into the storage part 1208 as required.

[0162] Specifically, according to some embodiments, the processes described in the foregoing by referring to the flowcharts may be implemented as computer software programs. For example, embodiments of this application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program is configured for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the CPU 1201, the various functions defined in the system of this application are executed.

[0163] The computer-readable medium shown in embodiments of this application may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may be, for example, but is not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semi-conductive system, apparatus, or component, or any combination thereof. A more specific example of the computer-readable storage medium may include but is not limited to: an electrical connection having at least one wire, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In this application, the computer-readable storage medium may be any tangible medium that includes a computer program or has a computer program stored therein. The computer program may be used by or used in conjunction with an instruction execution system, apparatus, or device. In this application, the computer-readable signal medium may include a data signal transmitted in a baseband or as a part of a carrier, and carries a computer-readable computer program. A data signal propagated in such a way may assume a plurality of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any appropriate combination thereof. The computer-readable signal medium may further be any computer-readable medium in addition to a computer-readable storage medium. The computer-readable medium may send, propagate, or transmit a program that is used by or used in conjunction with an instruction execution system, an apparatus, or a device. The computer program included in the computer-readable medium may be transmitted by using any suitable medium, including but not limited to: a wireless medium, a wire, or the like, or any suitable combination thereof.

[0164] The flowcharts and block diagrams in the accompanying drawings illustrate system architectures, functions and operations that may be implemented by a system, a method, and a computer program product according to various embodiments of this application. Each box in the flowcharts or the block diagrams may represent a module, a program segment, or a part of code. The module, the program segment, or the part of code includes at least one executable instruction configured for implementing specified logic functions. In some alternative implementations, functions annotated in boxes may occur in a sequence different from that annotated in the accompanying drawing. For example, two boxes shown in succession may be performed in parallel, or may sometimes be performed in a reverse sequence. This is determined by a related function. Each box in the block diagrams or the flowcharts and combinations of the boxes in the block diagrams or the flowcharts may be implemented by a dedicated hardware-based system that performs specified functions or operations, or may be implemented by a combination of dedicated hardware and a computer program.

[0165] The related units described in embodiments of this application may be implemented in a software manner, or may be implemented in a hardware manner, and the units described may also be arranged in a processor. Names of these units do not constitute a limitation on the units in a case.

[0166] According to another aspect, this application further provides a computer-readable medium. The computer-readable medium may be included in the electronic devices described in the foregoing embodiments, or may exist alone and is not disposed in the electronic devices. The foregoing computer-readable medium carries one or more computer programs. The foregoing one or more computer programs, when executed by one of the electronic devices, cause the electronic device to implement the methods described in the foregoing embodiments.

[0167] Although a plurality of modules or units of a device configured to perform actions are discussed in the foregoing detailed description, such division is not mandatory. According to the implementations of this application, the features and functions of two or more modules or units described above may be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above may be further divided to be embodied by a plurality of modules or units.

[0168] According to the foregoing descriptions of the implementations, a person skilled in the art may readily understand that the exemplary implementations described herein may be implemented by using software, or may be implemented by combining software and necessary hardware. Therefore, the technical solutions according to the implementations of this application may be embodied in a form of a software product. The software product may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a removable hard disk, or the like) or on the network, and includes several instructions to cause an electronic device to perform the methods according to the implementations of this application.

[0169] For example, the electronic device may be a video decoding apparatus, and the video decoding apparatus may perform the video decoding method shown in FIG. 8. For another example, the electronic device may be a video coding apparatus, and the video coding apparatus may perform the video coding method shown in FIG. 9.

[0170] After considering the specification and practicing the implementations disclosed herein, a person skilled in the art may easily conceive of other implementations of this application. This application is intended to cover any variation, use, or adaptive change of this application. These variations, uses, or adaptive changes follow the general principles of this application and include common general knowledge or common technical means in the art that are not disclosed in this application.

[0171] This application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope of this application. The scope of this application is limited only by the appended claims.

Claims

1. A video decoding method, the method comprising:determining a plurality of pixel areas in a current frame based on a preset pixel area size;selecting, from the plurality of pixel areas, a skipped area in the current frame on which a skip mode is applied; andgenerating reconstructed data corresponding to the current block from a video bitstream based on a position relationship between a current block and the skipped area in the current frame.

2. The method according to claim 1, further comprising:for each pixel in the current frame, determining whether to process the pixel by using the skip mode; andfor each of the plurality of pixel areas, determining whether to process the pixel area by using the skip mode in accordance with whether each pixel in the pixel area is processed by using the skip mode.

3. The method according to claim 2, wherein the determining whether to process the pixel by using the skip mode comprises:determining a position of the pixel in the current frame; andfor every two adjacent frames of a preset quantity of consecutive image frames immediately preceding the current frame, determining to process the pixel by using the skip mode when a pixel difference between the two adjacent frames at the position is less than or equal to a pixel threshold.

4. The method according to claim 2, wherein the determining whether to process the pixel by using the skip mode comprises:determining a position of the pixel in the current frame; anddetermining to process the pixel by using the skip mode when motion vectors of a preset quantity of consecutive image frames immediately preceding the current frame are 0 at the position.

5. The method according to claim 2, wherein the determining whether to process the pixel by using the skip mode comprises:determining whether to process the pixel by using the skip mode, based on a flag bit obtained by decoding the video bitstream.

6. The method according to claim 2, wherein the determining whether to process the pixel area by using the skip mode in accordance with whether each pixel in the pixel area is processed by using the skip mode comprises:determining to process the pixel area by using the skip mode when each pixel in the pixel area is processed by using the skip mode.

7. The method according to claim 1, wherein the generating reconstructed data corresponding to the current block based on a position relationship between a current block and the skipped area in the current frame comprises:when the current block is in the skipped area, using a plurality of pixel values in an area corresponding to the skipped area in a previous frame or a reference frame of the current frame as the reconstructed data corresponding to the current block.

8. The method according to claim 1, wherein the generating reconstructed data corresponding to the current block based on a position relationship between a current block and the skipped area in the current frame comprises:when the current block is partially in the skipped area,decoding the current block to obtain decoded data corresponding to the current block; andfor each position of the current block that is in the skipped area, replacing data at the position in the decoded data with a pixel value at a corresponding position in a previous frame or a reference frame of the current frame.

9. The method according to claim 1, further comprising:decoding the video bitstream to obtain a flag bit that indicates the pixel area size,the flag bit being a member of at least one of the following data structures: a sequence header, an image header, a slice header, a coding tree unit (CTU) header, and a coding block.

10. The method according to claim 1, further comprising at least one of the following operations:decoding the video bitstream to obtain a first flag bit, the first flag bit indicating whether to decode the current frame based on the skipped area;decoding the video bitstream to obtain a second flag bit, the second flag bit indicating whether to decode each image block in the current frame based on the skipped area; anddecoding the video bitstream to obtain a third flag bit, the third flag bit indicating whether to decode each slice in the current frame based on the skipped area.

11. An electronic device, comprising:at least one processor; anda memory, configured to store at least one computer program, the at least one computer program, when being executed by the at least one processor, causing the electronic device to implement a video decoding method including:determining a plurality of pixel areas in a current frame based on a preset pixel area size;selecting, from the plurality of pixel areas, a skipped area in the current frame on which a skip mode is applied; andgenerating reconstructed data corresponding to the current block from a video bitstream based on a position relationship between a current block and the skipped area in the current frame.

12. The electronic device according to claim 11, wherein the method further comprises:for each pixel in the current frame, determining whether to process the pixel by using the skip mode; andfor each of the plurality of pixel areas, determining whether to process the pixel area by using the skip mode in accordance with whether each pixel in the pixel area is processed by using the skip mode.

13. The electronic device according to claim 12, wherein the determining whether to process the pixel by using the skip mode comprises:determining a position of the pixel in the current frame; andfor every two adjacent frames of a preset quantity of consecutive image frames immediately preceding the current frame, determining to process the pixel by using the skip mode when a pixel difference between the two adjacent frames at the position is less than or equal to a pixel threshold.

14. The electronic device according to claim 12, wherein the determining whether to process the pixel by using the skip mode comprises:determining a position of the pixel in the current frame; anddetermining to process the pixel by using the skip mode when motion vectors of a preset quantity of consecutive image frames immediately preceding the current frame are 0 at the position.

15. The electronic device according to claim 12, wherein the determining whether to process the pixel by using the skip mode comprises:determining whether to process the pixel by using the skip mode, based on a flag bit obtained by decoding the video bitstream.

16. The electronic device according to claim 12, wherein the determining whether to process the pixel area by using the skip mode in accordance with whether each pixel in the pixel area is processed by using the skip mode comprises:determining to process the pixel area by using the skip mode when each pixel in the pixel area is processed by using the skip mode.

17. The electronic device according to claim 11, wherein the generating reconstructed data corresponding to the current block based on a position relationship between a current block and the skipped area in the current frame comprises:when the current block is in the skipped area, using a plurality of pixel values in an area corresponding to the skipped area in a previous frame or a reference frame of the current frame as the reconstructed data corresponding to the current block.

18. The electronic device according to claim 11, wherein the generating reconstructed data corresponding to the current block based on a position relationship between a current block and the skipped area in the current frame comprises:when the current block is partially in the skipped area,decoding the current block to obtain decoded data corresponding to the current block; andfor each position of the current block that is in the skipped area, replacing data at the position in the decoded data with a pixel value at a corresponding position in a previous frame or a reference frame of the current frame.

19. The electronic device according to claim 11, wherein the method further comprises:decoding the video bitstream to obtain a flag bit that indicates the pixel area size,the flag bit being a member of at least one of the following data structures: a sequence header, an image header, a slice header, a coding tree unit (CTU) header, and a coding block.

20. A non-transitory computer-readable medium storing a video bitstream that is processed by a video decoding method, the method comprising:determining a plurality of pixel areas in a current frame based on a preset pixel area size;selecting, from the plurality of pixel areas, a skipped area in the current frame on which a skip mode is applied; andgenerating reconstructed data corresponding to the current block from the video bitstream based on a position relationship between a current block and the skipped area in the current frame.