Video encoding method, apparatus, computer readable medium, and electronic device
Patent Information
- Authority / Receiving Office
- HK · HK
- Patent Type
- Patents
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-06-30
- Publication Date
- 2026-07-17
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] This application is a divisional application filed on August 21, 2020, with application number 2020108556251 and the invention title "Video 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 coding method, apparatus, computer-readable medium, and electronic device. Background Technology
[0003] In video encoding, the encoder typically needs to transform, quantize, and entropy-encode the residual data between the original and predicted video data before sending it to the decoder. Due to the diversity of residual data, a single DCT (Discrete Cosine Transform) kernel cannot adapt to all residual characteristics. Therefore, multiple DCT kernels may need to be selected as a combination of transform matrices for a single residual block. Furthermore, since some residual blocks have weak correlation, skipping the transform process and directly performing quantization can actually improve encoding efficiency. However, this approach requires encoding a transform skip flag for each coding unit (CU) to indicate whether the transform process should be skipped, thus impacting encoding efficiency. Summary of the Invention
[0004] Embodiments of this application provide a video encoding method, apparatus, computer-readable medium, and electronic device, which can at least to some extent effectively improve video encoding efficiency.
[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0006] According to one aspect of the embodiments of this application, a video encoding method is provided, comprising: acquiring residual data corresponding to video image frames; performing transformation or skipping transformation processing on the residual data, and performing quantization processing to obtain a quantization coefficient block; implicitly indicating whether the decoding end skips the inverse transformation process through the quantization coefficient statistical values in a specified area of the quantization coefficient block.
[0007] According to one aspect of the embodiments of this application, a video encoding apparatus is provided, comprising: an acquisition unit configured to acquire residual data corresponding to video image frames; a processing unit configured to perform transformation or skip transformation processing on the residual data, and perform quantization processing to obtain a quantization coefficient block; and implicitly indicate whether the decoding end skips the inverse transformation process through the quantization coefficient statistical values in a specified area of the quantization coefficient block.
[0008] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured as follows:
[0009] Encode a specified index identifier in the sequence header of the first encoded data corresponding to the video image frame sequence to indicate whether all coded blocks in the first encoded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or
[0010] Encode a specified index identifier in the image header of the second coded data corresponding to the video image frame to indicate whether all coded blocks in the second coded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or
[0011] Encode a specified index identifier in the strip header information of the third coded data corresponding to a strip of a video image frame, to indicate whether all coded blocks in the third coded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or
[0012] The specified index identifier is encoded in the LCU header information of the fourth encoded data corresponding to a maximum coding unit (LCU) of a video image frame, to indicate that all coding blocks in the fourth encoded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
[0013] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured to: encode an index identifier with a first value in the sequence header of the first encoded data corresponding to the video image frame sequence, so as to indicate that all encoded blocks in the first encoded data do not need to determine whether to skip the inverse transform processing based on the quantization coefficients in the quantization coefficient block; or
[0014] An index identifier encoded as a second value is used in the sequence header, and an index identifier encoded as a first value is used in the image header of the second encoded data corresponding to a video image frame in the video image frame sequence, to indicate that all coded blocks in the second encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
[0015] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured to: encode an index identifier as a second value in the sequence header and an index identifier as a second value in the image header, so as to indicate that all encoding blocks in the second encoded data need to determine whether to skip the inverse transform process according to the quantization coefficients in the quantization coefficient block.
[0016] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured as follows: an index identifier encoded as a second value in the sequence header, an index identifier encoded as a second value in the image header, and an index identifier encoded as a first value in the strip header information of the third encoded data corresponding to a strip of the video image frame, so as to indicate that all encoding blocks in the third encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
[0017] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured as: an index identifier encoded as a second value in the sequence header, an index identifier encoded as a second value in the image header, and an index identifier encoded as a second value in the strip header information, so as to indicate that all encoding blocks in the third encoding data need to determine whether to skip the inverse transform process according to the quantization coefficients in the quantization coefficient block.
[0018] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured as follows: an index identifier encoded as a second value in the sequence header, an index identifier encoded as a second value in the image header, an index identifier encoded as a second value in the strip header information, and an index identifier encoded as a first value in the LCU header information of the fourth encoded data corresponding to one LCU of the strip, so as to indicate that all encoding blocks in the fourth encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
[0019] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured as follows: an index identifier encoded as a second value in the sequence header, an index identifier encoded as a second value in the image header, an index identifier encoded as a second value in the strip header information, and an index identifier encoded as a second value in the LCU header information, so as to indicate that all encoding blocks in the fourth encoding data need to determine whether to skip the inverse transform process according to the quantization coefficients in the quantization coefficient block.
[0020] In some embodiments of this application, based on the foregoing scheme, the encoding unit is configured as: an index identifier encoded as a second value in the sequence header, an index identifier encoded as a second value in the image header, an index identifier encoded as a second value in the strip header information, and an index identifier encoded as a second value in the LCU header information, to indicate that all encoding blocks in the fourth encoded data need to determine whether to skip the inverse transform processing based on the quantization coefficients in the quantization coefficient block; or
[0021] The index identifier encoded as the second value in the sequence header, the index identifier encoded as the second value in the image header, the index identifier encoded as the second value in the strip header information, and the index identifier encoded as the second value in the LCU header information are used to indicate whether the coding block needs to skip the inverse transform process based on the relationship between the size of the coding block in the LCU and the preset threshold range.
[0022] In some embodiments of this application, based on the foregoing scheme, the statistical value of the quantization coefficient includes: the statistical result of the quantization coefficient in the specified area, or the remainder of the statistical result of the quantization coefficient in the specified area relative to a set value.
[0023] In some embodiments of this application, based on the foregoing scheme, the numerical statistical results of the quantization coefficients within the specified region are obtained through the following methods:
[0024] Calculate the sum of the quantization coefficients within the specified region, and use the sum as the statistical result; or
[0025] Calculate the sum of the absolute values of the quantization coefficients within the specified region, and use the sum as the numerical statistical result; or
[0026] The values of quantization coefficients with odd values within the specified region are converted into first values, and the values of quantization coefficients with even values are converted into second values. The sum of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is used as the statistical result of the values. In this case, one of the first value and the second value is odd, and the other is even.
[0027] In some embodiments of this application, based on the foregoing scheme, the numerical statistical results of the quantization coefficients within the specified region are obtained through the following methods:
[0028] Calculate the sum of the number of quantization coefficients with odd values within the specified region, and use the sum as the numerical statistical result; or
[0029] Calculate the sum of the quantization coefficients within the specified region that are odd-numbered, and use the sum as the statistical result; or
[0030] Calculate the sum of the absolute values of the quantization coefficients within the specified region that are odd numbers, and use the sum as the statistical result of the numerical values; or
[0031] The values of quantization coefficients with odd values within the specified region are converted into first values, and the values of quantization coefficients with even values are converted into second values. The sum of the odd values of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is used as the statistical result of the values. In this case, one of the first value and the second value is odd, and the other is even.
[0032] In some embodiments of this application, based on the foregoing scheme, the numerical statistical results of the quantization coefficients within the specified region are obtained through the following methods:
[0033] Calculate the sum of the number of quantization coefficients with even values within the specified region, and use the sum as the statistical result; or
[0034] Calculate the sum of the quantization coefficients within the specified region that are even numbers, and use the sum as the statistical result; or
[0035] Calculate the sum of the absolute values of the quantization coefficients within the specified region that are even numbers, and use the sum as the statistical result of the numerical values; or
[0036] The values of quantization coefficients with odd values within the specified region are converted into first values, and the values of quantization coefficients with even values are converted into second values. The sum of the even values of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is taken as the statistical result of the values. In this case, one of the first value and the second value is odd and the other is even.
[0037] In some embodiments of this application, based on the foregoing scheme, the designated region includes any one of the following:
[0038] The entire region within the quantization coefficient block;
[0039] One or more positions specified in the quantization coefficient block;
[0040] At least one row specified in the quantization coefficient block;
[0041] At least one column specified in the quantization coefficient block;
[0042] The quantization coefficient block specifies at least one row and at least one column;
[0043] The quantization coefficient block is located on at least one diagonal line.
[0044] In some embodiments of this application, based on the foregoing scheme, the designated region includes any one of the following:
[0045] The SRCC (Scan Region Coefficient Coding) region in the quantization coefficient block;
[0046] One or more locations are specified in the SRCC region;
[0047] At least one row specified in the SRCC area;
[0048] At least one column is specified in the SRCC region;
[0049] The SRCC area specifies at least one row and at least one column;
[0050] The SRCC region is located on at least one diagonal line.
[0051] In some embodiments of this application, based on the foregoing scheme, one or more positions specified in the SRCC region include: the first N positions in the scanning order, where N is a non-zero natural number.
[0052] In some embodiments of this application, based on the foregoing scheme, if the quantization coefficient statistical value is odd, the inverse transformation process is skipped; if the quantization coefficient statistical value is even, the inverse transformation process is executed.
[0053] If the quantization coefficient statistical value is odd, the inverse transformation process is executed; if the quantization coefficient statistical value is even, the inverse transformation process is skipped.
[0054] In some embodiments of this application, based on the foregoing scheme, if the quantization coefficient statistical value belongs to the first numerical set, the inverse transformation process is skipped; otherwise, the inverse transformation process is executed.
[0055] If the quantization coefficient statistics belong to the first set of values, then the inverse transformation process is executed; otherwise, the inverse transformation process is skipped.
[0056] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the video encoding method as described in the above embodiments.
[0057] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the video encoding method as described in the above embodiments.
[0058] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the video encoding methods provided in the various alternative embodiments described above.
[0059] In some embodiments of this application, the statistical values of quantization coefficients in a specified area of the quantization coefficient block implicitly indicate whether to skip the inverse transform process. This implicitly indicates whether the decoding end should perform the inverse transform process, avoiding the need for the encoding end to encode a skip flag for each encoding unit, thereby effectively improving video encoding efficiency.
[0060] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0061] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0062] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown;
[0063] Figure 2 This diagram illustrates the placement of the video encoding and decoding devices in a streaming system.
[0064] Figure 3 A basic flowchart of a video encoder is shown;
[0065] Figure 4 The scanned area marked using SRCC technology is shown.
[0066] Figure 5 A schematic diagram showing the sequence of scanning the marked scanning area is provided.
[0067] Figure 6 A flowchart of a video decoding method according to an embodiment of this application is shown;
[0068] Figure 7 A schematic diagram illustrating the division of a designated area according to an embodiment of this application is shown;
[0069] Figure 8 A schematic diagram illustrating the division of a designated area according to an embodiment of this application is shown;
[0070] Figure 9 A schematic diagram illustrating the division of a designated area according to an embodiment of this application is shown;
[0071] Figure 10 A block diagram of a video decoding apparatus according to an embodiment of this application is shown;
[0072] Figure 11 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0073] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0074] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0075] 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 one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0076] 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.
[0077] 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.
[0078] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.
[0079] like Figure 1 As shown, 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. Figure 1 In one embodiment, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.
[0080] 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 one or more encoded video streams. 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.
[0081] 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.
[0082] exist Figure 1In the embodiments disclosed herein, the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 may be servers, personal computers, and smartphones, but the principles disclosed herein are not limited to these. The embodiments disclosed herein are applicable to laptop computers, tablet computers, media players, and / or dedicated video conferencing equipment. Network 150 refers to any number of 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, including, for example, wired and / or wireless communication networks. Communication network 150 may exchange data in circuit-switched and / or packet-switched channels. This network may include telecommunications networks, local area networks, wide area networks, 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 this application.
[0083] In one embodiment of this application, Figure 2 The illustration shows the placement of video encoding and decoding devices 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 (television), storing compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0084] 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 carry out 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. One or more streaming client subsystems, such as Figure 2Client subsystems 206 and 208 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 streams) may be encoded according to certain video coding / compression standards. Examples of such standards include ITU-T H.265. In embodiments, the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and this application can be used in the context of the VVC standard.
[0085] 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.
[0086] In one embodiment of this application, taking the international video coding standards HEVC (High Efficiency Video Coding) and VVC (Versatile Video Coding), and the Chinese national video coding standard AVS (Audio Video Coding Standard) as examples, after an input video frame image is obtained, the video frame image is divided into several non-overlapping processing units according to a block size. Each processing unit will perform a similar compression operation. This processing unit is called a CTU (Coding Tree Unit), or LCU. The CTU can be further subdivided into one or more basic coding units CU, which are the most basic elements in a coding process. The following introduces some concepts when encoding CU:
[0087] 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 determine which predictive coding mode to choose for the current CU and inform the decoder. Intra-frame prediction refers to predicting a signal from a region within the same image that has already been encoded and reconstructed; inter-frame prediction refers to predicting a signal from another encoded image (called a reference image) that is different from the current image.
[0088] Transform and Quantization: After the residual video signal undergoes transform operations such as DFT (Discrete Fourier Transform) and DCT, the signal is transformed into the transform domain, which 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 transform method for the current CU 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 results in 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 results in less distortion and a higher bit rate.
[0089] 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).
[0090] 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 such as deblocking filters (DB), Sample Adaptive Offset (SAO), or Adaptive Loop Filter (ALF) can effectively reduce the distortion caused by quantization. Since these filtered reconstructed images serve as a reference for subsequent coded images in predicting future image signals, the aforementioned filtering operations are also called loop filtering, i.e., filtering operations within the coding loop.
[0091] In one embodiment of this application, Figure 3 A basic flowchart of a video encoder is shown, illustrating the process using intra-frame prediction as an example. The original image signal... With predicted image signal Perform the difference operation to obtain the residual signal. , the residual signal After transformation and quantization, quantization coefficients are obtained. These coefficients are then used to obtain the encoded bitstream through entropy encoding, and to obtain the reconstructed residual signal through inverse quantization and inverse transform. Predicting image signals With reconstructed residual signal Image signals generated by superposition 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 is output through loop filtering. Reconstructing image signals It can be used as a reference image for the next frame for motion estimation and motion compensation prediction. Then, based on the results of the motion compensation prediction... Intra-frame prediction results Obtain the predicted image signal for the next frame. And continue repeating the above process until the encoding is complete.
[0092] Furthermore, since the non-zero coefficients in the quantized coefficient block after transformation and quantization are more likely to be concentrated in the left and upper regions of the block, while the right and lower regions are often zero, the SRCC technique is introduced. SRCC marks the size SRx×SRy of the upper-left region of non-zero coefficients within each quantized coefficient block (size W×H), where SRx is the x-coordinate of the rightmost non-zero coefficient in the block, and SRy is the y-coordinate of the bottommost non-zero coefficient, with 1≤SRx≤W and 1≤SRy≤H. Coefficients outside this region are all zero. SRCC uses (SRx, SRy) to determine the quantized coefficient region to be scanned within a quantized coefficient block. Figure 4 As shown, only the quantization coefficients within the scan region marked (SRx, SRy) need to be encoded, and the encoding scan order is as follows. Figure 5 As shown, it can be a reverse Z-shaped scan from the bottom right corner to the top left corner.
[0093] Based on the above encoding process, at the decoding end, for each CU, 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 CU can be obtained. Then, the residual signal and the prediction signal are added together to obtain the reconstructed signal. The reconstructed signal is then subjected to loop filtering and other operations to generate the final output signal.
[0094] In the aforementioned encoding and decoding process, the transformation of the residual signal concentrates its energy in a smaller number of low-frequency coefficients, meaning most coefficient values are small. After subsequent quantization, these smaller coefficient values become zero, significantly reducing the cost of encoding the residual signal. However, due to the diversity of residual distributions, a single DCT transform cannot adapt to all residual characteristics. Therefore, transform cores such as DST7 and DCT8 are introduced into the transform process, and different transform cores can be used for horizontal and vertical transforms of the residual signal. Taking AMT (Adaptive Multiple Core Transform) technology as an example, possible transform combinations for a residual signal are as follows: (DCT2, DCT2), (DCT8, DCT8), (DCT8, DST7), (DST7, DCT8), and (DST7, DST7).
[0095] The specific transform combination to choose for the residual signal needs to be decided using RDO (Rate-Distortion Optimization) at the encoder. Furthermore, since some residual blocks have weak correlation, skipping the transform process and directly performing quantization can actually improve coding efficiency. Whether to skip the transform process also needs to be decided using RDO at the encoder. However, this approach requires encoding a transform skip flag for each coding unit to indicate whether the transform process has been skipped, thus resulting in lower coding efficiency.
[0096] To address the aforementioned issues, embodiments of this application propose using quantization coefficients in a quantization coefficient block to implicitly indicate whether the transformation process of the residual data has been skipped. This eliminates the need to encode the transformation skip flag, effectively improving video coding efficiency.
[0097] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0098] Figure 6 A flowchart of a video decoding method according to an embodiment of this application is shown. This video decoding method can be executed by a device with computing processing capabilities, such as a terminal device or a server. (Refer to...) Figure 6 As shown, the video decoding method includes at least steps S610 to S630, which are described in detail below:
[0099] In step S610, entropy decoding is performed on the encoded block of the video image frame to obtain the quantization coefficient block of the residual data corresponding to the encoded block.
[0100] In one embodiment of this application, the video image frame sequence includes a series of images, each of which can be further divided into slices, and each slice can be further divided into a series of LCUs (or CTUs), with each LCU containing several CUs. Video image frames are encoded in blocks. In some newer video coding standards, such as H.264, there are macroblocks (MBs), which can be further divided into multiple prediction blocks for predictive coding. In the HEVC standard, basic concepts such as coding units (CUs), prediction units (PUs), and transform units (TUs) are used to functionally divide various block units, and a novel tree-based structure is used for description. For example, a CU can be divided into smaller CUs according to a quadtree, and these smaller CUs can be further divided to form a quadtree structure. The coding block in this embodiment can be a CU, or a block smaller than a CU, such as a smaller block obtained by dividing a CU.
[0101] In step S620, if it is determined that the decision to skip the inverse transformation process needs to be based on the quantization coefficients in the quantization coefficient block, then the quantization coefficients in the specified region of the quantization coefficient block are counted to obtain the quantization coefficient statistics.
[0102] In one embodiment of this application, a specified index identifier contained in the sequence header of the first encoded data corresponding to a video image frame sequence can be used to indicate whether all coded blocks in the first encoded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. This embodiment's technical solution enables the indication of all coded blocks corresponding to the entire video image frame sequence through an index identifier in the sequence header of the first encoded data corresponding to the video image frame sequence, thereby effectively reducing the number of bits occupied by the index identifier and improving video coding efficiency.
[0103] In one embodiment of this application, a specified index identifier contained in the image header of the second encoded data corresponding to a video image frame can be used to indicate whether all coded blocks in the second encoded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. This embodiment's technical solution enables the indication of all coded blocks corresponding to the entire video image frame through an index identifier in the image header of the second encoded data corresponding to the video image frame, while also reducing the number of bits occupied by the index identifier and improving video coding efficiency.
[0104] In one embodiment of this application, a specified index identifier contained in the slice header of the third coded data corresponding to a slice of a video image frame can be used to indicate whether all coded blocks in the third coded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. This embodiment's technical solution enables the indication of all coded blocks corresponding to the entire slice through an index identifier in the slice header of the third coded data corresponding to a slice of a video image frame, thereby reducing the number of bits occupied by the index identifier and improving video coding efficiency.
[0105] In one embodiment of this application, a specified index identifier contained in the LCU header of the fourth encoded data corresponding to one LCU of a video image frame can be used to indicate whether all coded blocks in the fourth encoded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. This embodiment's technical solution enables the indication of all coded blocks corresponding to the entire LCU through an index identifier in the LCU header of the fourth encoded data corresponding to one LCU of a video image frame, while also reducing the number of bits occupied by the index identifier and improving video coding efficiency.
[0106] In one embodiment of this application, the relationship between the size of the coding block and a preset threshold range can be used to determine whether the coding block needs to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. For example, if the size of the coding block is small (e.g., less than a certain preset threshold), it can be determined that the coding block needs to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding; conversely, if the size of the coding block is large (e.g., greater than a certain preset threshold), it can be determined that the coding block does not need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. The technical solution of this embodiment can implicitly indicate whether the inverse transform process needs to be skipped based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding according to the size of the coding block, without the need for additional bits, thus improving video coding efficiency.
[0107] In one embodiment of this application, if the index identifier contained in the sequence header of the first encoded data corresponding to a video image frame sequence is a first value (e.g., it can be 0), then it is determined that all encoded blocks in the first encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. If the index identifier contained in the sequence header is a second value (e.g., it can be 1), then a decision can be further made based on the index identifier contained in the image header of the second encoded data corresponding to the video image frames in the video image frame sequence.
[0108] In one embodiment of this application, if the index identifier contained in the aforementioned sequence header is a second value (e.g., it can be 1), and the index identifier contained in the aforementioned image header is a first value (e.g., it can be 0), then it can be determined that all coded blocks in the second coded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. If both the index identifier contained in the aforementioned sequence header and the index identifier contained in the aforementioned image header are second values (e.g., they can be 1), then it can be determined that all coded blocks in the second coded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. In this case, the decision can be made without using the strip header, LCU header, and the size of the coded block.
[0109] Of course, in one embodiment of this application, if the index identifier contained in the aforementioned sequence header and the index identifier contained in the aforementioned image header are both second values (e.g., they can be 1), then the decision can be further made based on the index identifier contained in the strip header of the third encoded data corresponding to the strip of the video image frame. For example, if the index identifier contained in the aforementioned sequence header and the index identifier contained in the aforementioned image header are both second values, but the index identifier contained in the strip header information of the third encoded data corresponding to a strip is a first value (e.g., it can be 0), then it can be determined that all coded blocks in the third encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. If the index identifier contained in the aforementioned sequence header, the index identifier contained in the aforementioned image header, and the index identifier contained in the aforementioned strip header are all second values (e.g., they can be 1), then it can be determined that all coded blocks in the third encoded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. In this case, the decision can be made without using the size of the LCU header and the coded block.
[0110] Of course, in one embodiment of this application, if the index identifier contained in the aforementioned sequence header, the index identifier contained in the aforementioned image header, and the index identifier contained in the aforementioned strip header are all second values (e.g., they can be 1), then the decision can be further made based on the index identifier contained in the LCU header of the fourth encoded data corresponding to the LCU in the strip. For example, if the index identifier contained in the aforementioned sequence header, the index identifier contained in the aforementioned image header, and the index identifier contained in the aforementioned strip header are all second values, but the index identifier contained in the LCU header information of the fourth encoded data corresponding to an LCU is a first value (e.g., it can be 0), then it can be determined that all encoded blocks in the fourth encoded data do not need to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. If the index identifier contained in the aforementioned sequence header, the index identifier contained in the aforementioned image header, the index identifier contained in the aforementioned strip header, and the index identifier contained in the aforementioned LCU header information are all second values (e.g., they can be 1), then it can be determined that all encoded blocks in the fourth encoded data need to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding. In this case, the decision can no longer be made based on the size of the encoded block.
[0111] Of course, in one embodiment of this application, if the index identifier contained in the aforementioned sequence header, the index identifier contained in the aforementioned image header, the index identifier contained in the aforementioned strip header, and the index identifier contained in the aforementioned LCU header information are all second values (e.g., they can be 1), then the decision can be further made based on the size of the coding block. For example, if the index identifier contained in the aforementioned sequence header, the index identifier contained in the aforementioned image header, the index identifier contained in the aforementioned strip header, and the index identifier contained in the aforementioned LCU header information are all second values, but the size of a coding block is small (e.g., less than a certain preset threshold), then it can be determined that the coding block needs to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding; conversely, if the size of the coding block is large (e.g., greater than a certain preset threshold), then it can be determined that the coding block does not need to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0112] In summary, when determining whether to select the combination of transformation matrices corresponding to the coding block based on the quantization coefficients in the quantization coefficient block, the following methods can be used:
[0113] 1. The decision is made solely by the index identifier in the sequence header, no longer based on the size of the image header, strip header, LCU header, and coding block. In this case, an index identifier of 1 in the sequence header (the value is only an example) indicates that all coding blocks in the first coded data corresponding to the video image frame sequence need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0114] 2. The decision is made solely based on the index identifier in the aforementioned image header, rather than the sequence header, strip header, LCU header, and the size of the coded blocks. In this case, an index identifier of 1 in the image header (the value is only an example) indicates that all coded blocks in the second coded data corresponding to the video image frame need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0115] 3. The decision is made solely based on the index identifier in the aforementioned strip header, no longer relying on the sequence header, image header, LCU header, or the size of the coding block. In this case, an index identifier of 1 in the strip header (the value is only an example) indicates that all coding blocks in the third coding data corresponding to the strip need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0116] 4. The decision is made solely based on the index identifier in the LCU header, no longer relying on the sequence header, image header, stripe header, or the size of the coded block. In this case, an index identifier of 1 in the LCU header (the value is only an example) indicates that all coded blocks in the fourth coded data corresponding to the LCU need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0117] 5. The size of the encoded block is used as the implicit indicator, instead of relying on the sequence header, image header, strip header, and LCU header for decision-making. In this case, if the size of the encoded block is small (e.g., less than a certain preset threshold), it can be determined that the encoded block needs to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding; conversely, if the size of the encoded block is large (e.g., greater than a certain preset threshold), it can be determined that the encoded block does not need to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0118] 6. The decision is no longer based on the size of the strip header, LCU header, and coding block, but instead uses the index identifiers in the sequence header and image header. If both the index identifiers in the sequence header and image header are 1 (values are for example only), it means that all coding blocks in the second coded data corresponding to the video image frame need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding. If the index identifier in the sequence header is 1, and the index identifier in the image header is 0 (values are for example only), it means that all coding blocks in the second coded data corresponding to the video image frame do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0119] 7. The index identifiers in the sequence header, image header, and stripe header are used to indicate whether to skip the inverse transform process, instead of relying on the LCU header and the size of the coding block. In this case, if the index identifiers in the sequence header, image header, and stripe header are all 1 (values are for illustrative purposes only), it means that all coding blocks in the third coding data corresponding to the stripe need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding. If the index identifiers in the sequence header and image header are 1, while the index identifier in the stripe header is 0 (values are for illustrative purposes only), it means that all coding blocks in the third coding data corresponding to the stripe do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0120] 8. The index identifiers in the sequence header, image header, strip header, and LCU header are used to indicate whether to skip the inverse transform process, instead of relying on the size of the coded block. If all the index identifiers in the sequence header, image header, strip header, and LCU header are 1 (values are for illustrative purposes only), it means that all coded blocks in the fourth coded data corresponding to the LCU need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding. If all the index identifiers in the sequence header, image header, and strip header are 1, while the index identifier in the LCU header is 0 (values are for illustrative purposes only), it means that all coded blocks in the fourth coded data corresponding to the LCU do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0121] 9. Decisions are made based on the index identifiers in the sequence header, image header, strip header, LCU header, and the size of the coding block. If all the index identifiers in the sequence header, image header, strip header, and LCU header are 1 (values are for illustrative purposes only), and the size of the coding block is less than a set threshold, then the coding block needs to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding. If all the index identifiers in the sequence header, image header, strip header, and LCU header are 1, but the size of the coding block is greater than a set threshold, then the coding block does not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0122] Of course, the following methods are also possible:
[0123] 10. The index identifiers in the image header and the strip header are used for indication, instead of relying on the sequence header, LCU header, and the size of the coding block for decision-making. In this case, if both the index identifier in the image header and the index identifier in the strip header are 1 (values are for example only), it means that all coding blocks in the third coding data corresponding to the strip need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding; if the index identifier in the image header is 1, and the index identifier in the strip header is 0 (values are for example only), it means that all coding blocks in the third coding data corresponding to the strip do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0124] 11. The index identifiers in the image header, strip header, and LCU header are used for indication, instead of relying on the sequence header and the size of the coding block for decision-making. In this case, if the index identifiers in the image header, strip header, and LCU header are all 1 (values are for illustrative purposes only), it means that all coding blocks in the fourth coding data corresponding to the LCU need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding. If the index identifiers in the image header and strip header are 1, while the index identifier in the LCU header is 0 (values are for illustrative purposes only), it means that all coding blocks in the fourth coding data corresponding to the LCU do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0125] 12. Decisions are made using the index identifiers in the image header, strip header, LCU header, and the size of the coding block, instead of the sequence header. In this case, if the index identifiers in the image header, strip header, and LCU header are all 1 (values are for illustrative purposes only), and the size of the coding block is less than a set threshold, then the coding block needs to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding. If the index identifiers in the image header, strip header, and LCU header are all 1, but the size of the coding block is greater than the set threshold, then the coding block does not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained from entropy decoding.
[0126] Furthermore, there are many other indication methods in the embodiments of this application, which will not be described in detail here.
[0127] In one embodiment of this application, when calculating the quantization coefficients within a specified region in the quantization coefficient block, the quantization coefficients within the specified region can be statistically analyzed based on their numerical values to obtain a statistical result, which can then be directly used as the statistical value of the quantization coefficients. Alternatively, after obtaining the statistical result, the remainder of the statistical result with respect to a set value can be calculated, and this remainder can be used as the statistical value of the quantization coefficients. This set value can be any non-zero number, such as 2, 3, or 4.
[0128] In one embodiment of this application, when performing statistics on the quantization coefficients within a specified region based on the values of the quantization coefficients within that region in the quantization coefficient block, the sum of the values of the quantization coefficients within the specified region can be calculated, and the resulting sum can be used as the statistical result; or the sum of the absolute values of the quantization coefficients within the specified region can be calculated, and the resulting sum can be used as the statistical result; or the values of the quantization coefficients with odd values within the specified region can be converted into a first value, and the values of the quantization coefficients with even values can be converted into a second value, and then the sum of the values of the quantization coefficients within the specified region after the value conversion can be calculated, and the resulting sum can be used as the statistical result, wherein one of the first value and the second value is odd and the other is even.
[0129] For example, convert the quantization coefficients with odd values in the specified area to 1 and the quantization coefficients with even values to 0; or convert the quantization coefficients with odd values in the specified area to 0 and the quantization coefficients with even values to 1; or convert the quantization coefficients with odd values in the specified area to 3 and the quantization coefficients with even values to 2; or convert the quantization coefficients with odd values in the specified area to 2 and the quantization coefficients with even values to 3.
[0130] In one embodiment of this application, when statistically analyzing the quantization coefficients within a specified region based on their values, the following methods can be used: 1) Calculate the sum of the number of quantization coefficients with odd values within the specified region and use the sum as the statistical result; 2) Calculate the sum of the values of quantization coefficients with odd values within the specified region and use the sum as the statistical result; 3) Calculate the sum of the absolute values of quantization coefficients with odd values within the specified region and use the sum as the statistical result; 4) Convert the values of quantization coefficients with odd values within the specified region to a first value, convert the values of quantization coefficients with even values to a second value, and then calculate the sum of the odd values of the quantization coefficients within the specified region after the value conversion, using the sum as the statistical result, where one of the first value and the second value is odd and the other is even.
[0131] In one embodiment of this application, when statistically analyzing the quantization coefficients within a specified region based on their values, the method can be as follows: First, calculate the sum of the number of even-valued quantization coefficients within the specified region and use the sum as the statistical result. Second, calculate the sum of the values of even-valued quantization coefficients within the specified region and use the sum as the statistical result. Third, calculate the sum of the absolute values of even-valued quantization coefficients within the specified region and use the sum as the statistical result. Fourth, convert the values of odd-valued quantization coefficients within the specified region to a first value, convert the values of even-valued quantization coefficients to a second value, and then calculate the sum of the even-valued quantization coefficients within the specified region after the value conversion, using the sum as the statistical result. In this case, one of the first and second values is odd, and the other is even.
[0132] In summary, the embodiments of this application can perform statistical analysis on the quantization coefficients within a specified region based on the values of the quantization coefficients within that region in the quantization coefficient block, in the following ways:
[0133] 1. Directly sum the values of the quantization coefficients within a specified area;
[0134] 2. Calculate the sum of the absolute values of the quantization coefficients within a specified area;
[0135] 3. First, convert odd and even numbers according to the parity of the quantization coefficients in the specified area, and then sum all the converted values in the specified area.
[0136] 4. Calculate the sum of the number of quantization coefficients with odd values within a specified region;
[0137] 5. Sum the values of the quantization coefficients that are odd numbers within a specified area;
[0138] 6. Calculate the sum of the absolute values of the quantization coefficients within a specified region that are odd numbers;
[0139] 7. First, convert odd and even numbers according to the parity of the quantization coefficients in the specified area, and then sum the odd numbers among all the converted values in the specified area.
[0140] 8. Calculate the sum of the number of quantization coefficients with even values within a specified region;
[0141] 9. Sum the values of the quantization coefficients that are even numbers within a specified region;
[0142] 10. Calculate the sum of the absolute values of the quantization coefficients within a specified region that are even numbers;
[0143] 11. First, convert odd and even numbers according to the parity of the quantization coefficients in the specified area, and then sum the even numbers among all the converted values in the specified area.
[0144] In one embodiment of this application, the designated region mentioned above may be the entire region in the quantization coefficient block.
[0145] In one embodiment of this application, the specified region may be one or more locations specified in the quantization coefficient block.
[0146] In one embodiment of this application, the designated region described above may be at least one row specified in the quantization coefficient block. For example... Figure 7 As shown, assuming the quantization coefficient block is a 4×4 block, with each square representing a quantization coefficient, then it can be done as follows: Figure 7 As shown in (a), the first row of the gray area is used as the specified area; or it can be as follows: Figure 7 As shown in (b), the two rows of the gray area are used as the specified area. Optionally, this at least one row can be the top row in the quantization coefficient block.
[0147] In one embodiment of this application, the designated region described above may be at least one column specified in the quantization coefficient block. For example... Figure 7 As shown, assuming the quantization coefficient block is a 4×4 block, with each square representing a quantization coefficient, then it can be done as follows: Figure 7 As shown in (c), column 1 of the gray area is used as the specified area; or it can be as follows: Figure 7 As shown in (d), the two columns of the gray area are designated as the specified area. Optionally, at least one of these columns can be the leftmost column in the quantization coefficient block.
[0148] In one embodiment of this application, the designated region described above may be at least one row and at least one column specified in the quantization coefficient block. For example... Figure 8 As shown, assuming the quantization coefficient block is a 4×4 block, with each square representing a quantization coefficient, then it can be done as follows: Figure 8 As shown in (a), the bottom row and the right column (i.e., the gray area) are designated as the area; or it can be as follows: Figure 8 As shown in (b), the bottom two rows and the right two columns (i.e., the gray area) are designated as the area; or it can be done as follows: Figure 8 As shown in (c), the top row and the left column (i.e., the gray area) are designated as the area; or it can be as follows: Figure 8 As shown in (d), the top two rows and the left two columns (i.e., the gray areas) are designated as the area.
[0149] In one embodiment of this application, the designated region described above may be a position within a quantization coefficient block located on at least one diagonal line. For example... Figure 9 As shown, assuming the quantization coefficient block is a 4×4 coefficient block, with each block representing a quantization coefficient, then as shown in (a) and (b) of 9, the position on one diagonal line can be used as the designated area; or as shown in (c) and (d) of 9, the position on two diagonal lines can be used as the designated area.
[0150] In one embodiment of this application, the designated region mentioned above may be an SRCC region within the quantization coefficient block. The SRCC region is the scan region marked using SRCC technology.
[0151] In one embodiment of this application, the designated region described above may be one or more locations specified in the SRCC region. Optionally, the one or more locations specified in the SRCC region may include the first N locations in the scanning order, where N is a non-zero natural number.
[0152] In one embodiment of this application, the designated area described above may be at least one row specified in the SRCC area. For example... Figure 7 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then it can be represented as follows: Figure 7 As shown in (a), the first row of the gray area is used as the specified area; or it can be as follows: Figure 7 As shown in (b), the two rows of the gray area are used as the specified area. Optionally, this at least one row can be the top row in the quantization coefficient block.
[0153] In one embodiment of this application, the designated region described above may be at least one column specified in the SRCC region. For example... Figure 7 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then it can be represented as follows: Figure 7 As shown in (c), column 1 of the gray area is used as the specified area; or it can be as follows: Figure 7 As shown in (d), the two columns of the gray area are designated as the specified area. Optionally, at least one of these columns can be the leftmost column in the quantization coefficient block.
[0154] In one embodiment of this application, the designated area described above may be at least one row and at least one column specified in the SRCC area. For example... Figure 8 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then it can be represented as follows: Figure 8 As shown in (a), the bottom row and the right column (i.e., the gray area) are designated as the area; or it can be as follows: Figure 8As shown in (b), the bottom two rows and the right two columns (i.e., the gray area) are designated as the area; or it can be done as follows: Figure 8 As shown in (c), the top row and the left column (i.e., the gray area) are designated as the area; or it can be as follows: Figure 8 As shown in (d), the top two rows and the left two columns (i.e., the gray areas) are designated as the area.
[0155] In one embodiment of this application, the designated area described above may be located within the SRCC region on at least one diagonal line. For example... Figure 9 As shown, assuming the SRCC region is a 4×4 coefficient block, with each block representing a quantization coefficient, then the position on one diagonal line can be used as the designated region, as shown in (a) and (b) of 9; or the position on two diagonal lines can be used as the designated region, as shown in (c) and (d) of 9.
[0156] In other embodiments of this application, the specified region division methods in the above embodiments can also be combined to use the combined region as the specified region.
[0157] Continue to refer to Figure 6 As shown, in step S630, the decision on whether to skip the inverse transformation process is made based on the statistical value of the quantization coefficients.
[0158] In one embodiment of this application, the decision to skip the inverse transformation process can be based on the parity of the quantization coefficient statistical value. For example, if the quantization coefficient statistical value is odd, the inverse transformation process is skipped; if the quantization coefficient statistical value is even, the inverse transformation process is executed. Alternatively, if the quantization coefficient statistical value is odd, the inverse transformation process is executed; if the quantization coefficient statistical value is even, the inverse transformation process is skipped.
[0159] In one embodiment of this application, the decision to skip the inverse transformation process can be made based on the numerical value of the quantization coefficient statistics. For example, if the quantization coefficient statistics belong to a first set of values, the inverse transformation process is skipped; otherwise, the inverse transformation process is executed.
[0160] In a specific example of this application, it is assumed that if the quantization coefficient statistical value belongs to the first set of values, the inverse transformation process is skipped; otherwise, the inverse transformation process is executed. It is also assumed that the quantization coefficient statistical value is the remainder of the statistical result of the quantization coefficient divided by 4 (the value is only an example), and the first set of values is (0, 1, 2). Therefore, when the quantization coefficient statistical value is 2, the inverse transformation process is skipped; when the quantization coefficient statistical value is 3, the inverse transformation process is executed.
[0161] Similarly, assuming the quantization coefficient statistical value belongs to the first set of values, the inverse transformation process is executed; otherwise, it is skipped. Also assuming the quantization coefficient statistical value is the remainder of the quantization coefficient statistical result divided by 4 (the value is only an example), and the first set of values is (0, 1, 2), then when the quantization coefficient statistical value is 2, the inverse transformation process is executed; when the quantization coefficient statistical value is 3, the inverse transformation process is skipped.
[0162] In one embodiment of this application, if it is decided to skip the inverse transform process, the quantization coefficient block is directly dequantized, and the result of the dequantization process is used as the reconstructed residual data. If it is decided to perform the inverse transform process, the quantization coefficient block is first dequantized, and then the dequantization result is inversely transformed based on the transform matrix combination used by the coding block during the encoding process to obtain the reconstructed residual data. Optionally, the transform matrix combination selected when performing the inverse transform process can be any one of (DCT2, DCT2), (DCT8, DCT8), (DCT8, DST7), (DST7, DCT8), and (DST7, DST7).
[0163] The technical solution of the above embodiments of this application enables the quantization coefficients in the quantization coefficient block to implicitly indicate whether the encoding end has skipped the transformation process, so that the decoding end can decide whether to perform the inverse transformation process. This avoids the encoding end encoding the index of the transformation skip flag bit for each encoding unit, thereby effectively improving the video encoding efficiency.
[0164] The following describes an apparatus embodiment of this application, which can be used to execute the video decoding method described above in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the video decoding method described above in this application.
[0165] Figure 10 A block diagram of a video decoding apparatus according to an embodiment of the present application is shown. The video decoding apparatus can be installed in a device with computing processing capabilities, such as a terminal device or a server.
[0166] Reference Figure 10As shown, a video decoding apparatus 1000 according to an embodiment of this application includes: a decoding unit 1002, a statistics unit 1004, and a decision unit 1006.
[0167] The decoding unit 1002 is configured to perform entropy decoding on the encoded block of the video image frame to obtain the quantization coefficient block of the residual data corresponding to the encoded block; the statistics unit 1004 is configured to count the quantization coefficients in a specified region of the quantization coefficient block to obtain the quantization coefficient statistics value when it is determined that it is necessary to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; and the decision unit 1006 is configured to decide whether to skip the inverse transform process based on the quantization coefficient statistics value.
[0168] In some embodiments of this application, based on the foregoing scheme, the video decoding device 1000 further includes: a first determining unit, configured to determine whether to skip the inverse transform process when the sequence header of the first encoded data corresponding to a video image frame sequence contains a specified index identifier.
[0169] In some embodiments of this application, based on the foregoing scheme, the video decoding device 1000 further includes: a second determining unit, configured to determine whether to skip the inverse transform process when the image header of the second encoded data corresponding to a video image frame contains a specified index identifier.
[0170] In some embodiments of this application, based on the foregoing scheme, the video decoding device 1000 further includes: a third determining unit, configured to determine whether to skip the inverse transform process when the strip header information of the third encoded data corresponding to a strip of a video image frame contains a specified index identifier, all encoded blocks in the third encoded data need to be determined based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0171] In some embodiments of this application, based on the foregoing scheme, the video decoding device 1000 further includes: a fourth determining unit, configured to determine whether to skip the inverse transform process when the LCU header information of the fourth encoded data corresponding to an LCU of a video image frame contains a specified index identifier, all encoded blocks in the fourth encoded data need to be determined based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0172] In some embodiments of this application, based on the foregoing scheme, the video decoding device 1000 further includes: a fifth determining unit, configured to determine whether the encoding block needs to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding, according to the relationship between the size of the encoding block and a preset threshold range.
[0173] In some embodiments of this application, based on the foregoing scheme, the video decoding device 1000 further includes: a sixth determining unit, configured to determine, when the index identifier contained in the sequence header of the first encoded data corresponding to a video image frame sequence is a first value, that all encoded blocks in the first encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding; and configured to determine, when the index identifier contained in the sequence header is a second value, and the index identifier contained in the image header of the second encoded data corresponding to a video image frame in the video image frame sequence is a first value, that all encoded blocks in the second encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0174] In some embodiments of this application, based on the foregoing scheme, the sixth determining unit is further configured to determine whether to skip the inverse transform process when the index identifier contained in the sequence header is a second value and the index identifier contained in the image header is a second value.
[0175] In some embodiments of this application, based on the foregoing scheme, the sixth determining unit is further configured to determine that when the index identifier contained in the sequence header is a second value, the index identifier contained in the image header is a second value, and the index identifier contained in the strip header information of the third encoded data corresponding to a strip of the video image frame is a first value, all encoded blocks in the third encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0176] In some embodiments of this application, based on the foregoing scheme, the sixth determining unit is further configured to determine whether to skip the inverse transform process when the index identifier contained in the sequence header is a second value, the index identifier contained in the image header is a second value, and the index identifier contained in the strip header information is a second value.
[0177] In some embodiments of this application, based on the foregoing scheme, the sixth determining unit is further configured to determine that when the index identifier contained in the sequence header is a second value, the index identifier contained in the image header is a second value, the index identifier contained in the strip header information is a second value, and the index identifier contained in the LCU header information of the fourth encoded data corresponding to one LCU of the strip is a first value, all encoded blocks in the fourth encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0178] In some embodiments of this application, based on the foregoing scheme, the sixth determining unit is further configured to determine whether to skip the inverse transform process when the index identifier contained in the sequence header is a second value, the index identifier contained in the image header is a second value, the index identifier contained in the strip header information is a second value, and the index identifier contained in the LCU header information is a second value.
[0179] In some embodiments of this application, based on the foregoing scheme, the sixth determining unit is further configured to determine, when the index identifier contained in the sequence header is a second value, the index identifier contained in the image header is a second value, the index identifier contained in the strip header information is a second value, and the index identifier contained in the LCU header information is a second value, whether all coding blocks in the fourth coding data need to be skipped based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding; or the sixth determining unit is further configured to determine, based on the relationship between the size of the coding block in the LCU and the preset threshold range, whether the coding block needs to be skipped based on the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
[0180] In some embodiments of this application, based on the foregoing scheme, the statistical unit 1004 is configured to: perform statistical analysis on the quantization coefficients within a specified region of the quantization coefficient block according to the numerical values of the quantization coefficients, and use the statistical results as the statistical values of the quantization coefficients; or
[0181] Based on the values of the quantization coefficients within a specified region in the quantization coefficient block, statistical results are obtained by statistically analyzing the quantization coefficients within the specified region. The remainder of the statistical results with respect to a set value is calculated, and the remainder is used as the statistical value of the quantization coefficients.
[0182] In some embodiments of this application, based on the foregoing scheme, the statistical unit 1004 is configured to: calculate the sum of the values of the quantization coefficients within the specified region according to the values of the quantization coefficients within the specified region, and use the obtained sum as the statistical result; or
[0183] Based on the values of the quantization coefficients within a specified region in the quantization coefficient block, calculate the sum of the absolute values of the quantization coefficients within that specified region, and use the resulting sum as the statistical result; or
[0184] Based on the values of the quantization coefficients within the specified region, the values of the quantization coefficients with odd values within the specified region are converted into a first value, and the values of the quantization coefficients with even values are converted into a second value. The sum of the values of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is taken as the statistical result. In this case, one of the first value and the second value is odd, and the other is even.
[0185] In some embodiments of this application, based on the foregoing scheme, the statistical unit 1004 is configured to: calculate the sum of the number of quantization coefficients with odd values within the specified region, based on the values of the quantization coefficients within the specified region, and use the resulting sum as the statistical result; or
[0186] Based on the values of the quantization coefficients within the specified region, calculate the sum of the quantization coefficients within the specified region that have odd values, and use the sum as the statistical result; or
[0187] Based on the values of the quantization coefficients within the specified region, calculate the sum of the absolute values of the quantization coefficients within the specified region that have odd values, and use the sum as the statistical result; or
[0188] Based on the values of the quantization coefficients within the specified region, the values of the quantization coefficients with odd values within the specified region are converted into a first value, and the values of the quantization coefficients with even values are converted into a second value. The sum of the odd values of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is taken as the statistical result. In this case, one of the first value and the second value is odd, and the other is even.
[0189] In some embodiments of this application, based on the foregoing scheme, the statistical unit 1004 is configured to: calculate the sum of the number of quantization coefficients with even values in the specified region according to the values of the quantization coefficients in the specified region, and use the obtained sum as the statistical result; or
[0190] Based on the values of the quantization coefficients within the specified region, calculate the sum of the quantization coefficients within the specified region that are even numbers, and use the sum as the statistical result; or
[0191] Based on the values of the quantization coefficients within the specified region, calculate the sum of the absolute values of the quantization coefficients within the specified region that are even numbers, and use the sum as the statistical result; or
[0192] Based on the values of the quantization coefficients within the specified region, the values of the quantization coefficients with odd values within the specified region are converted into a first value, and the values of the quantization coefficients with even values are converted into a second value. The sum of the even values of the quantization coefficients within the specified region after the value conversion is calculated, and the resulting sum is used as the statistical result. Here, one of the first value and the second value is odd, and the other is even.
[0193] In some embodiments of this application, based on the foregoing scheme, the designated region includes any one of the following:
[0194] The entire region within the quantization coefficient block;
[0195] One or more positions specified in the quantization coefficient block;
[0196] At least one row specified in the quantization coefficient block;
[0197] At least one column specified in the quantization coefficient block;
[0198] The quantization coefficient block specifies at least one row and at least one column;
[0199] The quantization coefficient block is located on at least one diagonal line.
[0200] In some embodiments of this application, based on the foregoing scheme, the designated region includes any one of the following:
[0201] The SRCC region in the quantization coefficient block;
[0202] One or more locations are specified in the SRCC region;
[0203] At least one row specified in the SRCC area;
[0204] At least one column is specified in the SRCC region;
[0205] The SRCC area specifies at least one row and at least one column;
[0206] The SRCC region is located on at least one diagonal line.
[0207] In some embodiments of this application, based on the foregoing scheme, one or more positions specified in the SRCC region include: the first N positions in the scanning order, where N is a non-zero natural number.
[0208] In some embodiments of this application, based on the foregoing scheme, the decision unit 1006 is configured to: if the quantization coefficient statistical value is odd, then decide to skip the inverse transformation process; if the quantization coefficient statistical value is even, then decide to execute the inverse transformation process; or
[0209] If the quantization coefficient statistical value is odd, then the inverse transformation process is executed; if the quantization coefficient statistical value is even, then the inverse transformation process is skipped.
[0210] In some embodiments of this application, based on the foregoing scheme, the decision unit 1006 is configured to: if the quantization coefficient statistical value belongs to the first numerical set, then decide to skip the inverse transformation process; otherwise, decide to execute the inverse transformation process; or
[0211] If the quantization coefficient statistics belong to the first set of values, then the inverse transformation process is executed; otherwise, the inverse transformation process is skipped.
[0212] Figure 11 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0213] It should be noted that, Figure 11 The computer system 1100 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0214] like Figure 11 As shown, the computer system 1100 includes a Central Processing Unit (CPU) 1101, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1102 or programs loaded from storage portion 1108 into Random Access Memory (RAM) 1103, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1103. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. An Input / Output (I / O) interface 1105 is also connected to bus 1104.
[0215] The following components are connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1110 as needed so that computer programs read from them can be installed into storage section 1108 as needed.
[0216] 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, the computer program including a computer program 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 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit (CPU) 1101, it performs various functions defined in the system of this application.
[0217] 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 one or more wires, 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 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.
[0218] 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 one or more executable instructions 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, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0219] 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.
[0220] 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 programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0221] 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.
[0222] Through 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, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0223] 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.
[0224] 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 encoding method, characterized in that, include: Obtain the residual data corresponding to the video image frames; The residual data is transformed or skipped, and then quantized to obtain a quantization coefficient block. By determining the parity of the quantization coefficient statistics within a specified region of the quantization coefficient block or whether it belongs to the first set of values, the decoder implicitly indicates whether to skip the inverse transformation process. An index identifier is encoded in the encoded data to indicate whether the corresponding encoded block needs to decide whether to skip the inverse transformation process based on the quantization coefficient statistics. The index identifier includes at least one of the following: an index identifier in the sequence header corresponding to the video image frame sequence, an index identifier in the image header, an index identifier in the strip header information, and an index identifier in the maximum coding unit (LCU) header information.
2. The video encoding method according to claim 1, characterized in that, Encoding an index identifier in the encoded data to indicate whether the corresponding encoded block needs to skip the inverse transform process based on the quantization coefficient statistics, including: Encode a specified index identifier in the sequence header of the first encoded data corresponding to the video image frame sequence to indicate whether all coded blocks in the first encoded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or Encode a specified index identifier in the image header of the second coded data corresponding to the video image frame to indicate whether all coded blocks in the second coded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or Encode a specified index identifier in the strip header information of the third coded data corresponding to a strip of a video image frame, to indicate whether all coded blocks in the third coded data need to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or The specified index identifier is encoded in the LCU header information of the fourth encoded data corresponding to a maximum coding unit (LCU) of a video image frame, to indicate that all coding blocks in the fourth encoded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
3. The video encoding method according to claim 1, characterized in that, Encoding index identifiers in the encoded data to indicate whether the corresponding encoded block needs to skip the inverse transform process based on the quantization coefficient statistics includes: An index identifier encoded as a first value is placed in the sequence header of the first encoded data corresponding to the video image frame sequence to indicate that none of the coded blocks in the first encoded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or An index identifier encoded as a second value is used in the sequence header, and an index identifier encoded as a first value is used in the image header of the second encoded data corresponding to a video image frame in the video image frame sequence, to indicate that all coded blocks in the second encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
4. The video encoding method according to claim 3, characterized in that, Also includes: An index identifier encoded as a second value in the sequence header and an index identifier encoded as a second value in the image header are used to indicate that all coded blocks in the second coded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
5. The video encoding method according to claim 3, characterized in that, Also includes: The index identifier encoded as the second value in the sequence header, the index identifier encoded as the second value in the image header, and the index identifier encoded as the first value in the strip header information of the third coded data corresponding to a strip of the video image frame, are used to indicate that all coded blocks in the third coded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
6. The video encoding method according to claim 5, characterized in that, Also includes: The index identifier encoded as the second value in the sequence header, the index identifier encoded as the second value in the image header, and the index identifier encoded as the second value in the strip header information are used to indicate whether all coded blocks in the third coded data need to decide whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
7. The video encoding method according to claim 5, characterized in that, Also includes: The index identifier encoded as the second value in the sequence header, the index identifier encoded as the second value in the image header, the index identifier encoded as the second value in the strip header information, and the index identifier encoded as the first value in the LCU header information of the fourth encoded data corresponding to one LCU of the strip, are used to indicate that all encoded blocks in the fourth encoded data do not need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
8. The video encoding method according to claim 7, characterized in that, Also includes: The index identifier encoded as the second value in the sequence header, the image header, the strip header information, and the LCU header information indicates that all coded blocks in the fourth coded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block.
9. The video encoding method according to claim 7, characterized in that, Also includes: The index identifier encoded as the second value in the sequence header, the index identifier encoded as the second value in the image header, the index identifier encoded as the second value in the strip header information, and the index identifier encoded as the second value in the LCU header information are used to indicate that all coded blocks in the fourth coded data need to determine whether to skip the inverse transform process based on the quantization coefficients in the quantization coefficient block; or The index identifier encoded as the second value in the sequence header, the index identifier encoded as the second value in the image header, the index identifier encoded as the second value in the strip header information, and the index identifier encoded as the second value in the LCU header information are used to indicate whether the coding block needs to skip the inverse transform process based on the relationship between the size of the coding block in the LCU and the preset threshold range.
10. The video encoding method according to claim 1, characterized in that, The statistical values of the quantification coefficients include: The statistical result of the quantization coefficients within the specified area, or the remainder of the statistical result of the quantization coefficients within the specified area relative to a set value.
11. The video encoding method according to claim 10, characterized in that, The statistical results of the quantization coefficients within the specified area are obtained through the following method: Calculate the sum of the quantization coefficients within the specified region, and use the sum as the statistical result. or Calculate the sum of the absolute values of the quantization coefficients within the specified region, and use the sum as the numerical statistical result; or The values of quantization coefficients with odd values within the specified region are converted into first values, and the values of quantization coefficients with even values are converted into second values. The sum of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is used as the statistical result of the values. In this case, one of the first value and the second value is odd, and the other is even.
12. The video encoding method according to claim 10, characterized in that, The statistical results of the quantization coefficients within the specified area are obtained through the following method: Calculate the sum of the number of quantization coefficients with odd values within the specified region, and use the sum as the numerical statistical result; or Calculate the sum of the quantization coefficients with odd values within the specified region, and use the sum as the statistical result of the values; or Calculate the sum of the absolute values of the quantization coefficients that are odd numbers within the specified region, and use the sum as the statistical result of the numerical values; or The values of quantization coefficients with odd values within the specified region are converted into first values, and the values of quantization coefficients with even values are converted into second values. The sum of the odd values of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is used as the statistical result of the values. In this case, one of the first value and the second value is odd, and the other is even.
13. The video encoding method according to claim 10, characterized in that, The statistical results of the quantization coefficients within the specified area are obtained through the following method: Calculate the sum of the number of quantization coefficients with even values within the specified region, and use the sum as the numerical statistical result; or Calculate the sum of the quantization coefficients that are even numbers within the specified region, and use the sum as the statistical result of the values. or Calculate the sum of the absolute values of the quantization coefficients that are even numbers within the specified region, and use the sum as the numerical statistical result; or The values of quantization coefficients with odd values within the specified region are converted into first values, and the values of quantization coefficients with even values are converted into second values. The sum of the even values of the quantization coefficients within the specified region after the value conversion is calculated, and the sum is taken as the statistical result of the values. In this case, one of the first value and the second value is odd and the other is even.
14. The video coding method according to any one of claims 1 to 13, characterized in that, The designated area includes any one of the following: The entire region within the quantization coefficient block; One or more positions specified in the quantization coefficient block; At least one row specified in the quantization coefficient block; At least one column specified in the quantization coefficient block; The quantization coefficient block specifies at least one row and at least one column; The quantization coefficient block is located on at least one diagonal line.
15. The video coding method according to any one of claims 1 to 13, characterized in that, The designated area includes any one of the following: The scan region coefficient encoding SRCC region in the quantization coefficient block; One or more locations are specified in the SRCC region; At least one row specified in the SRCC area; At least one column is specified in the SRCC region; The SRCC area specifies at least one row and at least one column; The SRCC region is located on at least one diagonal line.
16. The video encoding method according to claim 15, characterized in that, The one or more positions specified in the SRCC region include: the first N positions in the scanning order, where N is a non-zero natural number.
17. The video coding method according to any one of claims 1 to 13, characterized in that, If the quantization coefficient statistical value is odd, the inverse transformation process is skipped; if the quantization coefficient statistical value is even, the inverse transformation process is executed. or If the quantization coefficient statistical value is odd, the inverse transformation process is executed; if the quantization coefficient statistical value is even, the inverse transformation process is skipped.
18. The video coding method according to any one of claims 1 to 13, characterized in that, If the quantization coefficient statistics belong to the first set of values, then the inverse transformation process is skipped; otherwise, the inverse transformation process is executed. or If the quantization coefficient statistics belong to the first set of values, then the inverse transformation process is executed; otherwise, the inverse transformation process is skipped.
19. A video encoding device, characterized in that, include: The acquisition unit is configured to acquire residual data corresponding to video image frames; The processing unit is configured to transform or skip the transformation process on the residual data and perform quantization to obtain a quantization coefficient block; and to implicitly indicate whether the decoding end should skip the inverse transformation process by the parity of the quantization coefficient statistical values in a specified region of the quantization coefficient block or whether it belongs to a first set of values, and to encode an index identifier in the encoded data to indicate whether the corresponding encoded block needs to decide whether to skip the inverse transformation process based on the quantization coefficient statistical values. The index identifier includes at least one of the following: an index identifier in the sequence header corresponding to the video image frame sequence, an index identifier in the image header, an index identifier in the strip header information, and an index identifier in the maximum coding unit (LCU) header information.
20. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the video encoding method as described in any one of claims 1 to 18.
21. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the video encoding method according to any one of claims 1 to 18.
22. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, wherein a processor of a computer device reads from the computer-readable storage medium and executes the computer program, causing the computer device to perform the video encoding method according to any one of claims 1 to 18.
23. A method for storing video streams, characterized in that, The video encoding method according to any one of claims 1 to 18 is used to generate a video stream; and the video stream is stored.