WO2022037478A1 - 视频解码方法、视频编码方法、装置、介质及电子设备 - Google Patents

视频解码方法、视频编码方法、装置、介质及电子设备 Download PDF

Info

Publication number
WO2022037478A1
WO2022037478A1 PCT/CN2021/112359 CN2021112359W WO2022037478A1 WO 2022037478 A1 WO2022037478 A1 WO 2022037478A1 CN 2021112359 W CN2021112359 W CN 2021112359W WO 2022037478 A1 WO2022037478 A1 WO 2022037478A1
Authority
WO
WIPO (PCT)
Prior art keywords
quantization
value
quantized
block
coefficients
Prior art date
Application number
PCT/CN2021/112359
Other languages
English (en)
French (fr)
Inventor
王力强
许晓中
刘杉
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to JP2022556027A priority Critical patent/JP7483029B2/ja
Priority to KR1020227031426A priority patent/KR20220134651A/ko
Priority to EP21857573.6A priority patent/EP4124045A4/en
Publication of WO2022037478A1 publication Critical patent/WO2022037478A1/zh
Priority to US17/890,691 priority patent/US20220394265A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Definitions

  • the present application relates to the field of computer and communication technologies, and in particular, to a video decoding method, a video encoding method, an apparatus, a medium, and an electronic device.
  • the encoder In the video encoding process, the encoder usually needs to transform, quantize, and entropy the residual data between the original video data and the predicted video data before sending it to the decoder. Due to the diversity of residual data, a single DCT (Discrete Cosine Transform, discrete cosine transform) transform kernel cannot adapt to all residual characteristics, so it may be necessary to select multiple DCT transform kernels as a combination of transformation matrices for a residual block. The correlation of some residual blocks is weak. If the transformation process is skipped and the quantization process is performed directly, the coding efficiency will be improved, but this method needs to encode and transform the skip flag for each coding unit (Coding Unit, referred to as CU). Bit to indicate whether to skip the transform process, additional coding transform skip flag bit will affect the video coding efficiency.
  • CU Coding Unit
  • Embodiments of the present application provide a video decoding method, a video encoding method, an apparatus, a medium, and an electronic device, which can effectively improve video encoding efficiency at least to a certain extent.
  • a video decoding method including: performing entropy decoding processing on a coding block of a video image frame to obtain a quantized coefficient block of residual data corresponding to the coding block; The quantized coefficients in the designated area in the coefficient block are obtained, and the statistical value of the quantized coefficient is obtained; according to the statistical value of the quantized coefficient, it is decided whether to skip the inverse transformation process.
  • a video coding method which includes: skipping transformation processing and directly performing quantization processing on residual data required to obtain a coding block of a video image frame, to obtain the first digit of the residual data. a quantized coefficient block; transform and quantize the residual data in sequence to obtain a second quantized coefficient block of the residual data; obtain a third quantized coefficient block based on the first quantized coefficient block, and the The statistical value of the quantized coefficients corresponding to the third block of quantized coefficients is used to instruct to skip the inverse transformation process.
  • a video decoding apparatus including: a decoding unit configured to perform entropy decoding processing on an encoded block of a video image frame, and obtain a quantized coefficient block of residual data corresponding to the encoded block ; Statistical unit; Statistical unit, configured to count the quantized coefficients in the designated area in the quantized coefficient block, to obtain the quantized coefficient statistical value; The decision unit, configured to decide whether to skip the inverse transformation process according to the quantized coefficient statistical value Process.
  • a video encoding apparatus including:
  • a processing unit configured to directly perform quantization processing on the residual data required to obtain the coding block of the video image frame, skipping transformation processing, to obtain a first quantized coefficient block of the residual data; and transform the residual data in sequence processing and quantization processing to obtain a second quantized coefficient block of the residual data; an obtaining unit configured to obtain a third quantized coefficient block based on the first quantized coefficient block, and the quantized coefficient corresponding to the third quantized coefficient block The statistical value is used to indicate skipping the inverse transformation process, and the statistical value of the quantized coefficient corresponding to the third quantized coefficient block is obtained by counting the quantized coefficients in the specified area in the third quantized coefficient block; based on the second quantized coefficient block, obtain a fourth quantization coefficient block, the quantization coefficient statistic value corresponding to the fourth quantization coefficient block is used to instruct the execution of the inverse transformation process, and the quantization coefficient statistic value corresponding to the fourth quantization coefficient block Obtaining the quantized coefficients in the designated area in the fourth quantized coefficient block; the processing unit is further configured
  • a video processing system includes a video encoding apparatus and a video decoding apparatus, and the video encoding apparatus is configured to execute the video encoding method described in the above embodiments,
  • the video decoding apparatus is used to execute the video decoding method described in the above embodiments.
  • a non-transitory computer-readable medium is provided, and a computer program is stored on the non-transitory computer-readable medium, and the computer program is executed by a processor, so that the computer can realize the The video decoding method described in the above embodiment, or the video encoding method described in the above embodiment is implemented.
  • an electronic device including: one or more processors; and a storage device for storing one or more programs, when the one or more programs are stored by the one or more programs When executed by the multiple processors, the electronic device is made to implement the video decoding method described in the foregoing embodiment, or realize the video encoding method described in the foregoing embodiment.
  • a computer program product or computer program where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device implements the video decoding method provided in the above-mentioned various optional embodiments, or realizes the above-mentioned various optional embodiments.
  • the video encoding method provided in the embodiment.
  • the statistical value of the quantized coefficients is obtained by counting the quantized coefficients in the designated area in the quantized coefficient block, and then whether to skip the inverse transformation process is determined according to the statistical value of the quantized coefficients.
  • This method enables the quantization coefficient in the quantization coefficient block to implicitly indicate whether the encoding end skips the transformation process, and then the decoding end can decide whether to perform the inverse transformation process, avoiding the encoding end encoding for each coding unit.
  • the transform skip flag bit can effectively improve the video coding efficiency.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied;
  • FIG. 2 shows a schematic diagram of a placement manner of a video encoding device and a video decoding device in a streaming transmission system
  • Fig. 3 shows the basic flow chart of a video encoder
  • Fig. 4 shows the scanning area marked by SRCC technology
  • Fig. 5 shows the sequence schematic diagram of scanning the marked scanning area
  • FIG. 6 shows a flowchart of a video decoding method according to an embodiment of the present application
  • FIG. 7 shows a schematic diagram of a division manner of a designated area according to an embodiment of the present application.
  • FIG. 8 shows a schematic diagram of a division manner of a designated area according to an embodiment of the present application.
  • FIG. 9 shows a schematic diagram of a division manner of a designated area according to an embodiment of the present application.
  • FIG. 10 shows a flowchart of a video encoding method according to an embodiment of the present application
  • FIG. 11 shows a block diagram of a video decoding apparatus according to an embodiment of the present application.
  • FIG. 12 shows a block diagram of a video encoding apparatus according to an embodiment of the present application.
  • FIG. 13 shows a schematic structural diagram of a computer system suitable for implementing the electronic device according to the embodiment of the present application.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
  • the system architecture 100 includes a plurality of end devices that can communicate with each other through, for example, a network 150 .
  • the system architecture 100 may include a first end device 110 and a second end device 120 interconnected by a network 150 .
  • the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.
  • the first terminal device 110 may encode video data (eg, a video picture stream captured by the first terminal device 110) for transmission to the second terminal device 120 through the network 150, the encoded video data in one or more
  • the second terminal device 120 may receive the encoded video data from the network 150, decode the encoded video data to restore the video data, and display the video picture according to the restored video data.
  • the system architecture 100 may include a third end device 130 and a fourth end device 140 that perform bidirectional transmission of encoded video data, such as may occur during a video conference.
  • each of the third end device 130 and the fourth end device 140 may encode video data (eg, a stream of video pictures captured by the end device) for transmission to the third end device over the network 150 130 and the other terminal device of the fourth terminal device 140 .
  • Each of the third terminal device 130 and the fourth terminal device 140 may also receive encoded video data transmitted by the other of the third terminal device 130 and the fourth terminal device 140, and may The encoded video data is decoded to recover the video data, and a video picture can be displayed on an accessible display device based on the recovered video data.
  • 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 smart phones, but the principles disclosed in this application may not be limited thereto . Embodiments disclosed herein are applicable to laptop computers, tablet computers, media players, and/or dedicated videoconferencing equipment.
  • Network 150 represents any type of network that transmits encoded video data between first end device 110, second end device 120, third end device 130, and fourth end 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.
  • the network 150 may include a telecommunications network, a local area network, a wide area network, and/or the Internet. For the purposes of this application, unless explained below, the architecture and topology of network 150 may be immaterial to the operations disclosed herein.
  • Figure 2 illustrates the placement of video encoding and video decoding devices in a streaming environment.
  • the subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, videoconferencing, digital TV (television, television set), in the including CD (Compact Disk, compact disc), DVD (Digital Video Disc, digital video disc) , memory sticks, etc. to store compressed video on digital media, etc.
  • the streaming transmission system may include a capture subsystem 213 , and the capture subsystem 213 may include a video source 201 such as a digital camera, and the video source 201 creates an uncompressed video picture stream 202 .
  • the video picture stream 202 includes samples captured by a digital camera.
  • the video picture stream 202 is depicted as a thick line to emphasize the high data volume of the video picture stream, which can be processed by the electronic device 220, and the electronic Device 220 includes video encoding device 203 coupled to video source 201 .
  • Video encoding device 203 may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in greater detail below.
  • the encoded video data 204 (or encoded video code stream 204) is depicted as a thin line to emphasize the lower amount of encoded video data 204 (or encoded video code stream 204) 204), the encoded video data 204 (or encoded video stream 204) may be stored on the streaming server 205 for future use.
  • One or more streaming client subsystems may access streaming server 205 to retrieve copies 207 and 209 of encoded video data 204 .
  • Client subsystem 206 may include, for example, video decoding device 210 in electronic device 230 .
  • the 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 presented on a display 212 (eg, a display screen) or another presentation device.
  • the encoded video data 204, a copy 207 of the video data 204, and a copy 209 of the video data 204 may be encoded according to certain video encoding/compression standards. Examples of these standards include ITU-T H.265.
  • the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and this application may be used in the context of the VVC standard.
  • VVC Versatile Video Coding
  • electronic device 220 and the electronic device 230 may include other components not shown in the figures.
  • electronic device 220 may include a video decoding device
  • electronic device 230 may also include a video encoding device.
  • HEVC High Efficiency Video Coding, high-efficiency video coding
  • VVC High Efficiency Video Coding, high-efficiency video coding
  • AVS Anaudio Video coding Standard, source coding standard
  • Predictive Coding includes intra-frame prediction and inter-frame prediction. After the original video signal is predicted by the selected reconstructed video signal, a residual video signal is obtained. The encoder needs to decide which predictive coding mode to select for the current CU and inform the decoder. Among them, intra-frame prediction means that the predicted signal comes from an area that has been coded and reconstructed in the same image; inter-frame prediction means that the predicted signal comes from another image (called a reference image) that has been coded and different from the current image. .
  • Transform & Quantization After the residual video signal undergoes transform operations such as DFT (Discrete Fourier Transform), DCT, etc., the signal is converted into the transform domain to obtain transform coefficients. The transform coefficient is further subjected to a lossy quantization operation, which loses a certain amount of information, so that the quantized signal is beneficial to the compressed expression. In some video coding standards, there may be more than one transformation mode to choose from, so the encoder also needs to select one of the transformation modes for the current CU and inform the decoder. The fineness of quantization is usually determined by the Quantization Parameter (QP for short). If the value of QP is larger, the coefficients representing a larger value range will be quantized into the same output, which usually brings greater distortion and distortion. A lower code rate; on the contrary, if the QP value is smaller, the coefficients representing a smaller value range will be quantized into the same output, so it usually brings less distortion and corresponds to a higher code rate.
  • QP Quantization Parameter
  • Entropy Coding or Statistical Coding The quantized transform domain signal will undergo statistical compression coding according to the frequency of occurrence of each value, and finally output a binarized (0 or 1) compressed code stream. At the same time, other information generated by encoding, such as the selected encoding mode, motion vector data, etc., also needs to be entropy encoded to reduce the bit rate.
  • Statistical coding is a lossless coding method that can effectively reduce the code rate required to express the same signal. Common statistical coding methods include Variable Length Coding (VLC) or context-based binary arithmetic coding ( Content Adaptive Binary Arithmetic Coding, referred to as CABAC).
  • Loop Filtering The transformed and quantized signal will obtain a reconstructed image through the operations of inverse quantization, inverse transformation and prediction compensation. Compared with the original image, the reconstructed image is different from the original image due to the influence of quantization, that is, the reconstructed image will produce distortion (Distortion). Therefore, filtering operations can be performed on the reconstructed image, such as deblocking filter (DB), SAO (Sample Adaptive Offset, adaptive pixel compensation) or ALF (Adaptive Loop Filter, adaptive loop filter) and other filters , which can effectively reduce the degree of distortion caused by quantization. Since these filtered reconstructed images will be used as references for subsequent encoded images to predict future image signals, the above filtering operation is also called in-loop filtering, ie, a filtering operation in an encoding loop.
  • DB deblocking filter
  • SAO Sample Adaptive Offset, adaptive pixel compensation
  • ALF Adaptive Loop Filter, adaptive loop filter
  • FIG. 3 shows a basic flowchart of a video encoder, and intra-frame prediction is used as an example in the flowchart for illustration.
  • Original image signal sk [x,y] and predicted image signal The difference operation is performed to obtain the residual signal uk [x, y], and the residual signal uk [x, y] is transformed and quantized to obtain quantized coefficients.
  • the quantized coefficients obtain the encoded bit stream through entropy coding, and on the other hand, through inverse quantization and inverse transformation processing, the reconstructed residual signal u' k [x, y] is obtained, and the predicted image signal It is superimposed with the reconstructed residual signal u' k [x, y] to generate an image signal image signal
  • it is input to the intra - frame mode decision module and the intra-frame prediction module for intra-frame prediction processing; ] can be used as a reference image for the next frame for motion estimation and motion compensation prediction. Then based on the motion compensation prediction result s' r [x+m x ,y+m y ] and the intra prediction result Get the predicted image signal of the next frame And continue to repeat the above process until the encoding is complete.
  • the non-zero coefficients are more likely to be concentrated in the left and upper regions of the block, while the right and lower regions of the block are often 0, so the introduction of SRCC technology.
  • the size of the upper left region of the non-zero coefficients included in each quantized coefficient block can be marked by SRCC technology SRx ⁇ SRy, where SRx is the abscissa of the rightmost non-zero coefficient in the quantized coefficient block, SRy is the ordinate of the lowest non-zero coefficient in the quantized coefficient block, and 1 ⁇ SRx ⁇ W, 1 ⁇ SRy ⁇ H, and the coefficients outside this area are all 0.
  • the SRCC technology uses (SRx, SRy) to determine the quantized coefficient area to be scanned in a quantized coefficient block. As shown in Figure 4, only the quantized coefficients in the scanning area marked by (SRx, SRy) need to be encoded. Illustratively, as shown in FIG. 5, the scan order of the encoding may be a reverse zigzag scan from the lower right corner to the upper left corner.
  • the decoding end Based on the above encoding process, for each CU, the decoding end performs entropy decoding to obtain various mode information and quantization coefficients after obtaining the compressed code stream (ie, the bit stream). Then, the quantized coefficients undergo inverse quantization and inverse transformation to obtain residual signals.
  • the predicted signal corresponding to the CU can be obtained, and then the reconstructed signal can be obtained by adding the residual signal and the predicted signal. The reconstructed signal is then subjected to loop filtering and other operations to generate the final output signal.
  • the transform processing of the residual signal makes the energy of the residual signal concentrate on less low-frequency coefficients, that is, most coefficients have smaller values. Then after the subsequent quantization module, the smaller coefficient value will become zero value, which greatly reduces the cost of coding the residual signal.
  • DST7 Discrete Sine Transform 7, discrete sine transform 7
  • DCT8 Discrete Cosine Transform 8, discrete cosine transform 8
  • the possible transformation combinations for transform processing of a residual signal are as follows: (DCT2, DCT2), (DCT8, DCT8), (DCT8, DST7) ), (DST7, DCT8) and (DST7, DST7).
  • RDO Rate-Distortion Optimization
  • rate-distortion optimization rate-distortion optimization
  • the embodiment of the present application proposes a transformation process that implicitly indicates whether the residual data is skipped by using the quantization coefficients in the quantization coefficient block, thereby omitting the encoding of the transformation skip flag bit, effectively improving the video coding efficiency.
  • FIG. 6 shows a flowchart of a video decoding method according to an embodiment of the present application.
  • the video decoding method can be executed by an electronic device, and the electronic device is a device with a computing processing function, such as a terminal device or a server. .
  • the video decoding method at least includes steps S610 to S630, which are described in detail as follows:
  • step S610 entropy decoding processing is performed on the coded block of the video image frame to obtain a quantized coefficient block of residual data corresponding to the coded block.
  • the video image frame sequence includes a series of video image frames, each video image frame can be further divided into slices, and the slices can be further divided into a series of LCUs (or CTUs) ), the LCU contains several CUs.
  • the video image frame is encoded in block units.
  • a macroblock MB
  • MB macroblock
  • prediction Prediction block
  • basic concepts such as coding unit CU, prediction unit (PU) and transform unit (TU) are used to functionally divide a variety of block units, and adopt a new tree-based structure for describe.
  • a CU can be divided into smaller CUs according to a quadtree, and the smaller CUs can be further divided to form a quadtree structure.
  • the coding block in this embodiment of the present application may be a block obtained by coding a CU, or a block obtained by coding a smaller block than a CU (eg, a smaller block obtained by dividing a CU).
  • the coding block of the video image frame is obtained by video coding the residual data corresponding to the coding block.
  • the last step of video coding is to perform entropy coding on the quantization coefficient block of the residual data. Therefore, in the process of video decoding Among them, it is necessary to perform entropy decoding processing on the coding block of the video image frame first, and then obtain the quantized coefficient block of residual data corresponding to the coding block after the entropy decoding process.
  • step S620 the quantized coefficients in the designated area in the quantized coefficient block are counted to obtain the statistical value of the quantized coefficients.
  • the quantized coefficients in the designated area in the quantized coefficient block are directly counted. In another embodiment of the embodiment of the present application, if it is determined whether to skip the inverse transformation process according to the quantization coefficients in the quantization coefficient block, the quantization coefficients in the designated area in the quantization coefficient block are counted.
  • a specified index identifier included in the sequence header of the first encoded data corresponding to a video image frame sequence may be used to indicate that all encoded blocks in the first encoded data need to be obtained by entropy decoding.
  • the quantized coefficients in the quantized coefficient block determine whether to skip the inverse transform process.
  • it may be indicated by a specified index identifier included in the image header of the second encoded data corresponding to a video image frame that all encoded blocks in the second encoded data need to be quantized according to entropy decoding.
  • the quantized coefficients in the coefficient block decide whether to skip the inverse transform process.
  • the technical solution of this embodiment enables the indication of all coding blocks corresponding to the entire slice through an index mark in the slice header of the third encoded data corresponding to one slice of the video image frame, and the index mark can also be reduced.
  • the occupied bits improve the video coding efficiency.
  • the technical solution of this embodiment enables the indication of all coding blocks corresponding to the entire LCU through an index identifier in the LCU header of the fourth encoded data corresponding to one LCU of the video image frame, and can also reduce the amount of occupied by the index identifier. bits, which improves the video coding efficiency.
  • the coding block according to the relationship between the size of the coding block and the reference threshold range, it can be determined whether the coding block needs to be skipped according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding. .
  • the coding block needs to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding; If the relationship between the size of the block and the reference threshold range does not satisfy the reference condition, it is determined that the coding block does not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding. Satisfying the reference conditions is set according to experience, or flexibly adjusted according to application scenarios, which is not limited in this embodiment of the present application.
  • satisfying the reference condition means that the size of the coding block is within the reference threshold range.
  • the reference threshold range may refer to a range consisting of a lower threshold and an upper threshold, may also refer to a range smaller than a certain threshold, or may refer to a range larger than a certain threshold, which is not applied in this embodiment of the present application. limited.
  • the reference threshold range refers to a range smaller than a certain threshold, if the size of the coding block is small (for example, smaller than a certain threshold), it can be determined that the coding block needs to be decoded according to the entropy decoding.
  • the quantization coefficient determines whether to skip the inverse transformation process; on the contrary, if the size of the encoding block is large (such as greater than a certain threshold), it can be determined that the encoding block does not need to be determined according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding Whether to skip inverse transform processing.
  • the technical solution of this embodiment can implicitly indicate whether it is necessary to decide whether to skip the inverse transformation process according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding according to the size of the coding block, and no additional bits are needed, so the video can also be improved. coding efficiency.
  • the index identifier included in the sequence header of the first coded data corresponding to a sequence of video image frames is the first value (for example, it may be 0)
  • the blocks do not need to decide whether to skip the inverse transform process according to the quantized coefficients in the block of quantized coefficients obtained by entropy decoding.
  • the index identifier included in the sequence header is the second value (for example, it may be 1), at this time, it can be further determined according to the index identifier included in the image header of the second encoded data corresponding to the video image frame in the sequence of video image frames. make decisions.
  • the index identifier included in the aforementioned sequence header is the second value (for example, it may be 1)
  • the index identifier included in the aforementioned image header is the first value (eg, it may be 0) , it can be determined that all coding blocks in the second coded data do not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the index identifier contained in the foregoing sequence header and the index identifier included in the foregoing image header are both second values (for example, may be 1), then it can be determined that all encoded blocks in the second encoded data need to be obtained by entropy decoding
  • the quantization coefficients in the quantized coefficient block determine whether to skip the inverse transformation process. In this case, the decision can no longer be made through the slice header, the LCU header, and the size of the coding block.
  • the video image The decision is made according to the index identifier contained in the slice header of the third encoded data corresponding to the slice of the frame.
  • the index identifier included in the preceding sequence header and the index identifier included in the preceding image header are both the second value, but the index identifier included in the slice header of the third encoded data corresponding to one slice is the first value ( For example, it can be 0), then it can be determined that all coding blocks in the third coded data do not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the index identifier included in the foregoing sequence header, the index identifier included in the foregoing image header, and the index identifier included in the foregoing slice header are all second values (for example, may be 1), it can be determined that the third encoded data contains For all coding blocks of , it is necessary to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding. In this case, the decision can no longer be made by the LCU header and the size of the coding block.
  • the decision may be further made according to the index identifier included in the LCU header of the fourth encoded data corresponding to the LCU in the slice.
  • the index identifier included in the aforementioned sequence header, the index identifier included in the aforementioned image header, and the index identifier included in the aforementioned slice header are all second values, but the LCU header of the fourth encoded data corresponding to one LCU contains The index identifier of is the first value (for example, it may be 0), then it can be determined that all coding blocks in the fourth coded data do not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the index identifier included in the aforementioned sequence header, the index identifier included in the aforementioned image header, the index identifier included in the aforementioned slice header, and the index identifier included in the aforementioned LCU header are all second values (for example, it may be 1) , then it can be determined that all coding blocks in the fourth coded data need to decide whether to skip the inverse transformation process according to the quantization coefficients in the quantized coefficient blocks obtained by entropy decoding. In this case, the size of the coding block can no longer be determined. make decisions.
  • the decision may be further made according to the size of the coding block.
  • the index identifier included in the aforementioned sequence header, the index identifier included in the aforementioned image header, the index identifier included in the aforementioned slice header, and the index identifier included in the aforementioned LCU header are all second values, but an encoding If the size of the block is small (for example, smaller than a certain threshold), it can be determined that the coding block needs to decide whether to skip the inverse transformation process according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding; on the contrary, if the size of the coding block is larger If the value is larger (for example, greater than a certain threshold), it can be determined that the coding block does not need to decide whether to skip the inverse transformation process according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
  • the index identifier in the aforementioned sequence header is 1 (the numerical value is only an example), which means that all coding blocks in the first coded data corresponding to the video image frame sequence need to be decoded according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
  • the coefficient determines whether to skip the inverse transform process.
  • the index identifier in the aforementioned image header is 1 (the numerical value is only an example), which means that all coding blocks in the second coded data corresponding to the video image frame need to be decoded according to the quantization coefficients in the quantized coefficient blocks obtained by entropy decoding. Determines whether to skip the inverse transformation process.
  • the index identifier in the foregoing slice header is 1 (the numerical value is only an example), which means that all the coded blocks in the third coded data corresponding to the slice need to be decoded according to the quantization coefficients in the quantized coefficient blocks obtained by entropy decoding. Determines whether to skip the inverse transformation process.
  • the index identifier in the LCU header is 1 (the value is only an example), which means that all coding blocks in the fourth coded data corresponding to the LCU need to be determined according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding. Skips the inverse transformation process.
  • the size of the coding block is small (for example, smaller than a certain threshold), it may be determined that the coding block needs to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding; on the contrary, If the size of the coding block is relatively large (eg, larger than a certain threshold), it can be determined that the coding block does not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding.
  • the index identifier in the aforementioned sequence header and the index identifier in the image header determines whether to skip the inverse transformation process; if the index in the sequence header is 1, and the index in the image header is 0 (the value is only an example), it means that the All coding blocks in the second coded data corresponding to the video image frame do not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the index identifier in the sequence header it is indicated by the index identifier in the sequence header, the index identifier in the image header, and the index identifier in the slice header, and the decision is no longer made by the LCU header and the size of the coding block.
  • the index identifier in the sequence header, the index identifier in the image header, and the index identifier in the slice header are all 1 (the numerical value is only an example), it means that the third encoded data corresponding to the slice is 1.
  • All coding blocks need to decide whether to skip the inverse transformation process according to the quantization coefficients in the quantization coefficient blocks obtained by entropy decoding; if the index flag in the sequence header and the index flag in the image header are 1, and The index mark in is 0 (the value is only an example), which means that all the coding blocks in the third coded data corresponding to the strip do not need to decide whether to skip the inverse transformation according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding processing.
  • the index identification in the aforementioned sequence header the index identification in the image header, the index identification in the slice header and the index identification in the LCU header, and no longer makes decisions by the size of the coding block .
  • the index identifier in the sequence header, the index identifier in the image header, the index identifier in the slice header, and the index identifier in the LCU header are all 1 (the value is only an example), it means that the LCU corresponds to All coding blocks in the fourth coded data need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding; if the index identification in the sequence header, the index identification in the image header and the The index identifier in the slice header is 1, and the index identifier in the LCU header is 0 (the value is only an example), which means that all the encoded blocks in the fourth encoded data corresponding to the LCU do not need to be obtained according to entropy decoding.
  • the decision is made based on the index identifier in the sequence header, the index identifier in the image header, the index identifier in the slice header, the index identifier in the LCU header, and the size of the coding block.
  • the index identifier in the sequence header, the index identifier in the image header, the index identifier in the slice header, and the index identifier in the LCU header are all 1 (the value is only an example), and the If the size is less than the set threshold, it means that the coding block needs to decide whether to skip the inverse transformation process according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding; if the index mark in the sequence header, the index mark in the image header, The index identifier in the slice header and the index identifier in the LCU header are both 1, but the size of the coding block is greater than the set threshold, which means that the coding block does not need to be determined according to the quantization coefficients in the quantization coefficient block obtained by entropy
  • the index identifier in the image header and the index identifier in the slice header are both 1 (the value is only an example), it means that all encoding blocks in the third encoded data corresponding to the slice need to be decoded according to entropy.
  • the quantization coefficient in the obtained quantization coefficient block determines whether to skip the inverse transformation process; if the index in the image header is 1, and the index in the slice header is 0 (the value is only an example), it means that the All coding blocks in the third coded data corresponding to the slice do not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the index identifier in the image header, the index identifier in the slice header, and the index identifier in the LCU header are all 1 (the numerical value is only an example), it means that all of the fourth encoded data corresponding to the LCU are
  • the coding block needs to decide whether to skip the inverse transformation process according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; if the index flag in the image header and the index flag in the slice header are 1, and The index is marked as 0 (the value is only an example), which means that all coding blocks in the fourth coded data corresponding to the LCU do not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding .
  • the decision is made through the index identification in the image header, the index identification in the slice header, the index identification in the LCU header, and the size of the coding block, and no longer through the sequence header.
  • the index identifier in the image header, the index identifier in the slice header, and the index identifier in the LCU header are all 1 (the value is only an example), and the size of the encoding block is smaller than the set threshold, it means that the The coding block needs to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding; if the index identification in the image header, the index identification in the slice header and the index identification in the LCU header are If it is 1, but the size of the coding block is larger than the set threshold, it means that the coding block does not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding.
  • the quantization coefficients in the designated area when quantizing coefficients in a designated area in the quantization coefficient block, can be counted according to the value of the quantization coefficients in the designated area in the quantization coefficient block to obtain a statistical result , and then directly use the statistical result as the statistical value of the quantization coefficient.
  • the remainder of the statistical result with respect to the set value may be calculated, and the remainder may be used as the statistical value of the quantization coefficient.
  • the set value may be any non-zero number, such as 2, 3, 4, and so on.
  • the sum of the numerical values of the quantization coefficients in the designated area can be calculated, and the The sum of the quantization coefficients in the specified area can be calculated as the statistical result; or the sum of the absolute values of the quantization coefficients in the specified area can be calculated, and the obtained sum value can be used as the statistical result; or the numerical value of the quantization coefficients with odd values in the specified area can be converted into the first A numerical value, convert the numerical value of the quantization coefficient whose value is an even number into a second numerical value, and then calculate the sum of the numerical values of the quantized coefficients in the specified area after the numerical conversion, and use the obtained sum as the statistical result, where the first numerical value and the One of the second values is odd and the other is even.
  • the value of the even quantization coefficient is converted to 1; or the value of the quantization coefficient with an odd value in the specified area is converted to 3, and the value of the even quantization coefficient is converted to 2; or the value of the specified area is odd.
  • the value of the quantization coefficient is converted to 2, and the value of the quantization coefficient whose value is an even number is converted to 3.
  • the sum of the number of quantization coefficients with odd values in the designated area may be calculated.
  • the sum of the number of quantization coefficients whose values are even numbers in the designated area may be calculated.
  • the following methods may be used when performing statistics on the quantization coefficients in the designated area:
  • the above-mentioned designated area may be all areas in the quantized coefficient block.
  • the above-mentioned designated area may be a designated position or multiple positions in the quantization coefficient block.
  • the above-mentioned designated area may be at least one row designated in the quantized coefficient block.
  • the quantized coefficient block is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient
  • one row of the gray area can be used as the designated area; or you can
  • the two lines in the gray area are designated areas.
  • the at least one row may be an upper row in the block of quantized coefficients.
  • the above-mentioned designated area may be at least one column designated in the quantized coefficient block.
  • the quantized coefficient block is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient
  • one column of the gray area can be used as the designated area; or you can
  • the two columns in the gray area are designated areas.
  • the at least one column may be the left column in the block of quantized coefficients.
  • the above-mentioned designated area may be at least one designated row and at least one designated column in the quantized coefficient block.
  • the quantized coefficient block is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient, then as shown in (a) of FIG.
  • the lower row and the right column (that is, The gray area in it) is used as the designated area; or as shown in (b) in Figure 8, the 2 rows below and the 2 columns on the right (that is, the gray area) can be used as the designated area; or as shown in Figure 8 (c) ), use the upper row and the left column (that is, the gray area) as the designated area; or as shown in (d) in Figure 8, the upper 2 rows and the left 2 columns (that is, where the gray area) as the designated area.
  • the above-mentioned designated area may be a position on at least one oblique line in the quantized coefficient block.
  • the quantized coefficient block is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient
  • the position on a diagonal line can be used as Designated area; or, as shown in (c) and (d) of 9, use the position on the two diagonal lines as the designated area.
  • the above-mentioned designated area may be an SRCC area in the quantized coefficient block.
  • the SRCC area is the scanning area marked by the SRCC technology.
  • the above-mentioned designated area may be one location or multiple locations designated in the SRCC area.
  • the position or positions specified in the SRCC area may include: the first N positions in the scanning order, where N is a natural number other than 0.
  • the above-mentioned designated area may be at least one row designated in the SRCC area.
  • the SRCC area is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient
  • 1 row of the gray area can be used as the designated area;
  • the two lines in the gray area are designated areas.
  • the at least one row may be an upper row in the SRCC region in the quantized coefficient block.
  • the above-mentioned designated area may be at least one column designated in the SRCC area.
  • the SRCC area is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient
  • 1 column of the gray area can be used as the designated area;
  • the two columns in the gray area are designated areas.
  • the at least one column may be the left column in the SRCC region in the quantized coefficient block.
  • the above-mentioned designated area may be at least one designated row and at least one designated column in the SRCC area.
  • the SRCC area is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient
  • the lower row and the right column that is, where The gray area of the As shown in Figure 8 (d), the upper row and the left column (that is, the gray area) are used as the designated area; or as shown in (d) in Figure 8, the upper 2 rows and the left 2 columns (that is, the gray area) as the designated area.
  • the above-mentioned designated area may be a position on at least one diagonal line in the SRCC area.
  • the SRCC area is a 4 ⁇ 4 coefficient block, and each block represents a quantized coefficient, then as shown in (a) and (b) in 9, the position on a diagonal line can be designated as area; or as shown in (c) and (d) in 9, the position on the two diagonal lines is used as the designated area.
  • the designated area division manners in the foregoing embodiments may also be combined, so that the combined area is used as the designated area.
  • step S630 it is determined whether to skip the inverse transformation process according to the statistical value of the quantization coefficient.
  • whether to skip the inverse transformation process may be decided according to the parity of the statistical value of the quantization coefficient. For example, if the statistical value of the quantization coefficient is an odd number, it is decided to skip the inverse transformation process; if the statistical value of the quantization coefficient is an even number, it is decided to perform the inverse transformation process; or if the statistical value of the quantization coefficient is an odd number, it is decided to execute the inverse transformation process. , if the statistical value of the quantization coefficient is an even number, it is decided to skip the inverse transformation process.
  • whether to skip the inverse transformation process may be determined according to the value of the statistical value of the quantization coefficient. For example, if the statistical value of the quantization coefficient belongs to the first numerical set, it is decided to skip the inverse transformation process; if the statistical value of the quantized coefficient does not belong to the first numerical set, it is decided to perform the inverse transformation process; or if the statistical value of the quantization coefficient belongs to In the first numerical set, it is decided to skip the inverse transformation process, and if the quantized coefficient statistics do not belong to the first numerical set, it is decided to perform the inverse transformation process.
  • the first numerical value set is set according to experience, or flexibly adjusted according to the application scenario, for example, the first numerical value set is (0, 2, 4, 6, 8, 10).
  • the statistical value of the quantization coefficient belongs to the first numerical value set, it is decided to skip the inverse transformation process, otherwise, it is decided to execute the inverse transformation process.
  • the statistical value of the quantization coefficient is the remainder of the statistical result of the quantization coefficient for 4 (the value is only an example), and the first numerical set is (0, 1, 2), then when the statistical value of the quantization coefficient is 2, it is decided to skip the inverse Transformation process; when the quantization coefficient statistics value is 3, it is decided to perform the inverse transformation process.
  • the statistical value of the quantized coefficient belongs to the first numerical value set, it is decided to perform the inverse transformation process, otherwise, it is decided to skip the inverse transformation process.
  • the statistical value of the quantization coefficient is the remainder of the statistical result of the quantization coefficient for 4 (the value is only an example), and the first numerical set is (0, 1, 2), then when the statistical value of the quantization coefficient is 2, it is decided to perform the inverse transformation Processing process; when the quantization coefficient statistics value is 3, it is decided to skip the inverse transformation process.
  • the inverse quantization process is directly performed on the quantized coefficient block, and the result of the inverse quantization process is used as the reconstructed residual data. If it is decided to perform the inverse transformation process, first perform the inverse quantization process on the quantized coefficient block, and then perform the inverse transformation process on the inverse quantization result based on the combination of transformation matrices used in the encoding process to obtain reconstructed residual data.
  • the combination of transformation matrices selected during inverse transformation processing may be any one of (DCT2, DCT2), (DCT8, DCT8), (DCT8, DST7), (DST7, DCT8), and (DST7, DST7) .
  • the technical solutions of the above embodiments of the present application enable the quantized coefficients in the quantized coefficient block to implicitly indicate whether the encoding end skips the transformation process, and then the decoding end can decide whether to perform the inverse transformation process, avoiding the need for the encoding end to perform the inverse transformation process for each All coding units encode and transform skip flag bits, which can effectively improve video coding efficiency.
  • Fig. 10 shows a flowchart of a video encoding method according to an embodiment of the present application.
  • the video encoding method is executed by an electronic device, which is a device with a computing processing function, such as a terminal device or a server.
  • the video coding method includes at least steps S810 to S830, and the details are as follows:
  • step S810 the residual data required to obtain the coding block of the video image frame is directly quantized, skipping the transformation process, to obtain a first quantized coefficient block of the residual data; the residual data is sequentially transformed and quantized , to obtain the second quantized coefficient block of the residual data.
  • the method of skipping transform processing (that is, the method of skipping transform processing and directly performing quantization processing) is used to process residual data to obtain the first quantized coefficient block of residual data;
  • the processing method (that is, the method of sequentially performing transform processing and quantization processing) processes the residual data to obtain a second quantized coefficient block of the residual data.
  • a third quantized coefficient block is obtained based on the first quantized coefficient block, the quantized coefficient statistic value corresponding to the third quantized coefficient block is used to indicate skipping the inverse transformation process, and the quantized coefficient statistic value corresponding to the third quantized coefficient block
  • the value is obtained by counting the quantization coefficients in the specified area in the third quantization coefficient block; based on the second quantization coefficient block, the fourth quantization coefficient block is obtained, and the quantization coefficient statistical value corresponding to the fourth quantization coefficient block is used to instruct the execution of the inverse transformation process.
  • the quantization coefficient statistics value corresponding to the fourth quantization coefficient block is obtained by counting the quantization coefficients in the designated area in the fourth quantization coefficient block.
  • the characteristic given to the quantized coefficient block obtained by skipping the transform process is that the quantization coefficient statistic value corresponding to the quantization coefficient block is used to indicate that the inverse transform process is skipped;
  • the characteristic given to the quantized coefficient block obtained in the manner is that the statistical value of the quantized coefficient corresponding to the quantized coefficient block is used to instruct the execution of the inverse transform process. Refer to the embodiment shown in FIG. 6 for the manner of obtaining the quantized coefficient statistical value corresponding to the quantized coefficient block and determining whether the quantized coefficient statistical value is used to indicate skipping the inverse transformation process, which will not be repeated here.
  • the process of obtaining the third quantized coefficient block is: in response to the quantization coefficient statistical value corresponding to the first quantized coefficient block being used to indicate skipping the inverse transformation process, the first quantized coefficient block is The coefficient block is used as the third quantization coefficient block; in response to the quantization coefficient statistic value corresponding to the first quantization coefficient block being used to instruct the execution of the inverse transformation process, the quantization coefficient statistic value corresponding to the adjusted quantization coefficient block is used to indicate the jump.
  • One or more quantized coefficients in the first quantized coefficient block are adjusted in the direction of the inverse transform process, and the adjusted quantized coefficient block is used as the third quantized coefficient block.
  • the manner of adjusting one or more quantization coefficients in the first block of quantized coefficients in a direction in which the statistical value of the quantized coefficients corresponding to the adjusted block of quantized coefficients is used to indicate skipping of the inverse transform process is set empirically, or according to Flexible adjustment of application scenarios.
  • the statistical value of the quantization coefficient is used to indicate that the inverse transformation process is skipped, which means that the statistical value of the quantization coefficient is an odd number. If the statistical value of the quantization coefficient corresponding to the first quantization coefficient block is an even number, the adjusted The statistical value of the quantized coefficients corresponding to the coefficient block is used to indicate the direction of skipping the inverse transform process.
  • the manner of adjusting one or more quantized coefficients in the first quantized coefficient block may be: adding any one of the first quantized coefficient blocks The value of the quantization coefficient is increased by 1 or decreased by 1.
  • the process of obtaining the fourth quantized coefficient block is: in response to the quantized coefficient statistical value corresponding to the second quantized coefficient block being used to instruct to perform an inverse transformation process, the second quantized coefficient block as the fourth quantization coefficient block; in response to the quantization coefficient statistic value corresponding to the second quantization coefficient block being used to instruct to skip the inverse transform process, the quantization coefficient statistic value corresponding to the adjusted quantization coefficient block is used to instruct the execution
  • the direction of the inverse transformation process adjusts one or more quantized coefficients in the second quantized coefficient block, and uses the adjusted quantized coefficient block as the fourth quantized coefficient block.
  • the manner in which the one or more quantization coefficients in the second quantization coefficient block are adjusted toward the direction in which the quantization coefficient statistic value corresponding to the adjusted quantization coefficient block is used to indicate the execution of the inverse transformation process is set empirically, or according to the application The scene can be adjusted flexibly.
  • the statistical value of the quantization coefficient is used to indicate that the inverse transformation process is skipped, which means that the statistical value of the quantization coefficient is an odd number. If the statistical value of the quantization coefficient corresponding to the second quantization coefficient block is an odd number, the adjusted The statistical value of the quantized coefficients corresponding to the coefficient block is used to indicate the direction in which the inverse transform process is performed.
  • the manner of adjusting one or more quantized coefficients in the second quantized coefficient block may be: quantizing any one of the second quantized coefficient blocks The value of the coefficient is increased by 1 or decreased by 1.
  • step S830 entropy coding is performed on the quantized coefficient blocks that satisfy the selection condition among the third quantized coefficient block and the fourth quantized coefficient block, so as to obtain the coded block of the video image frame.
  • entropy encoding processing is performed on the quantized coefficient blocks that satisfy the selection condition among the third and fourth quantized coefficient blocks.
  • the RDO decision is used to determine which quantized coefficient block among the third quantized coefficient block and the fourth quantized coefficient block satisfies the selection condition.
  • a quantized coefficient block with a low coding cost among the third quantized coefficient block and the fourth quantized coefficient block is used as a quantized coefficient block that satisfies the selection condition.
  • the coding block of the video image frame is obtained.
  • both the third quantized coefficient block and the fourth quantized coefficient block can decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block, regardless of whether the quantized coefficient block that satisfies the selection condition is the third quantized coefficient Whether the block is still the fourth quantized coefficient block, it is considered that the obtained coding block needs to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding.
  • a decision-making method for judging whether the encoding block needs to decide whether to skip the inverse transformation process according to the quantization coefficients in the quantized coefficient block obtained by entropy decoding is formulated at the encoding end, and the decision-making method is synchronized to the decoding end to This enables the decoding end to determine whether the encoding block needs to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding.
  • the decision method for determining whether to skip the inverse transform process according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding of the coding block is determined by referring to the embodiment shown in FIG. 6 , which will not be repeated here.
  • the quantization coefficient statistics corresponding to the quantization coefficient block obtained by entropy decoding the coding block are used to indicate skipping the inverse transformation process, it means that the quantization coefficient block that satisfies the selection condition is the third quantization coefficient block.
  • Coefficient block since the third quantized coefficient block is obtained based on the first quantized coefficient block, and the first quantized coefficient block is obtained by skipping the transform process, it can be determined that in the process of decoding the quantized coefficient block, The inverse transformation process needs to be skipped.
  • the quantization coefficient statistic value corresponding to the quantization coefficient block obtained by entropy decoding the coded block is used to instruct the execution of the inverse transformation process, it means that the quantization coefficient block that satisfies the selection condition is the fourth quantization coefficient block, because the fourth quantization coefficient block is Obtained based on the second quantized coefficient block, the second quantized coefficient block is obtained in a manner that does not skip the transform process, so it can be determined that in the process of decoding the quantized coefficient block, it is not necessary to skip the inverse transform process.
  • the technical solutions of the above embodiments of the present application enable the quantization coefficient in the quantization coefficient block to implicitly indicate whether the encoding end skips the transformation process, so as to avoid the encoding end encoding and transforming the skip flag bit for each encoding unit, and furthermore It can effectively improve the video coding efficiency.
  • An embodiment of the present application provides a video processing system, where the video processing system includes a video encoding device and a video decoding device, wherein the video encoding device is used to execute the video encoding method in the embodiment shown in FIG.
  • the video decoding method in the embodiment shown in FIG. 6 is used to execute the video encoding method in the embodiment shown in FIG. 6 .
  • the following describes the device embodiments of the present application, which can be used to execute the video decoding method and the video encoding method in the above-mentioned embodiments of the present application.
  • the device embodiments of the present application please refer to the above-mentioned embodiments of the video decoding method and the video encoding method of the present application.
  • FIG. 11 shows a block diagram of a video decoding apparatus according to an embodiment of the present application.
  • the video decoding apparatus may be set in a device with a computing processing function, such as a terminal device or a server.
  • a video decoding apparatus 1000 includes: a decoding unit 1002 , a statistics unit 1004 and a decision unit 1006 .
  • the decoding unit 1002 is configured to perform entropy decoding processing on the coding block of the video image frame to obtain a quantized coefficient block of residual data corresponding to the coding block;
  • the statistics unit 1004 is configured to count the quantized coefficient blocks in the specified area Quantize the coefficients to obtain a statistical value of the quantized coefficient;
  • the decision unit 1006 is configured to decide whether to skip the inverse transformation process according to the statistical value of the quantized coefficient.
  • the statistics unit 1004 is configured to, when determining whether to skip the inverse transformation process according to the quantization coefficients in the quantization coefficient block, count the number of Quantization coefficients within the specified area.
  • the video decoding apparatus 1000 further includes: a first determination unit, configured to include a specified sequence header of the first encoded data corresponding to a sequence of video image frames When the index is identified, it is determined that all the encoded blocks in the first encoded data need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the video decoding apparatus 1000 further includes: a second determining unit, configured to include a specified index in the image header of the second encoded data corresponding to a video image frame When identifying, it is determined that all coding blocks in the second coded data need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the video decoding apparatus 1000 further includes: a third determination unit, configured to include in the slice header of the third encoded data corresponding to one slice of the video image frame When there is a specified index identifier, it is determined that all coding blocks in the third coded data need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding.
  • the video decoding apparatus 1000 further includes: a fourth determining unit, configured to include a designated LCU header of the fourth encoded data corresponding to one LCU of the video image frame in the LCU header When it is determined that all coding blocks in the fourth coded data need to be determined according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding, whether to skip the inverse transformation process is determined.
  • a fourth determining unit configured to include a designated LCU header of the fourth encoded data corresponding to one LCU of the video image frame in the LCU header
  • the video decoding apparatus 1000 further includes: a fifth determining unit, configured to determine the Whether the coding block needs to skip the inverse transform process is determined according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding.
  • the video decoding apparatus 1000 further includes: a sixth determination unit, configured as an index identifier included in a sequence header of the first encoded data corresponding to a sequence of video image frames
  • a sixth determination unit configured as an index identifier included in a sequence header of the first encoded data corresponding to a sequence of video image frames
  • the sixth determining unit is further configured to identify an index included in the sequence header of the first encoded data corresponding to a sequence of video image frames as a second value, and the video image
  • the index identifier included in the image header of the second encoded data corresponding to a video image frame in the frame sequence is the first value, it is determined that all encoding blocks in the second encoded data do not need to be quantized according to entropy decoding.
  • the quantized coefficients in the coefficient block decide whether to skip the inverse transform process.
  • the sixth determining unit is further configured to include an index identifier included in the sequence header as a second value, and an index identifier included in the image header as a second value When it is determined that all coding blocks in the second coded data need to be determined according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding, whether to skip the inverse transformation process.
  • the sixth determination unit is further configured to identify the index included in the sequence header as a second value, and the index included in the image header as the second value , and when the index identifier included in the slice header of the third encoded data corresponding to one slice of the video image frame is the first value, it is determined that all encoding blocks in the third encoded data do not need to be decoded according to entropy
  • the quantized coefficients in the resulting block of quantized coefficients determine whether to skip the inverse transform process.
  • the sixth determination unit is further configured to identify the index included in the sequence header as a second value, and the index included in the image header as the second value When the index identifier included in the slice header is the second value, it is determined that all encoding blocks in the third encoded data need to be determined according to the quantized coefficients in the quantized coefficient blocks obtained by entropy decoding. Whether to skip the inverse transform processing Process.
  • the sixth determination unit is further configured to identify the index included in the sequence header as a second value, and the index included in the image header as the second value , when the index identifier included in the slice header is the second value, and the index identifier included in the LCU header of the fourth encoded data corresponding to an LCU of the slice is the first value, determine the fourth encoding All coding blocks in the data do not need to decide whether to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding.
  • the sixth determination unit is further configured to identify the index included in the sequence header as a second value, and the index included in the image header as the second value , when the index included in the slice header is identified as the second value, and the index included in the LCU header is identified as the second value, it is determined that all encoding blocks in the fourth encoded data need to be obtained according to entropy decoding
  • the quantized coefficients in the block of quantized coefficients determine whether to skip the inverse transform process.
  • the sixth determination unit is further configured to identify the index included in the sequence header as a second value, and the index included in the image header as the second value , when the index included in the slice header is identified as the second value, and the index included in the LCU header is identified as the second value, according to the relationship between the size of the coding block in the LCU and the reference threshold range , to determine whether the encoding block needs to skip the inverse transformation process according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding.
  • the statistics unit 1004 is configured to: perform statistics on the quantization coefficients in the specified area according to the value of the quantization coefficients in the specified area in the quantization coefficient block to obtain a statistical result, using the statistical result as the statistical value of the quantization coefficient; or
  • the statistics unit 1004 is configured to: calculate the sum of the numerical values of the quantization coefficients in the designated area according to the numerical values of the quantization coefficients in the designated area, and obtain the sum value as a result of said statistics; or
  • the values of the quantization coefficients with odd values in the designated area are converted into first values
  • the values of quantization coefficients with even values in the designated area are converted into second values
  • the calculation of the The sum of the numerical values of the quantization coefficients in the specified area after numerical conversion is used as the statistical result, wherein one of the first numerical value and the second numerical value is an odd number, and the other is an even number.
  • the statistics unit 1004 is configured to: according to the values of the quantization coefficients in the designated area, calculate the sum of the number of quantization coefficients with odd values in the designated area, and calculate the obtained sum as the statistical result; or
  • the quantization coefficient in the designated area calculate the sum of the absolute values of the odd-numbered quantization coefficients in the designated area, and use the obtained sum as the statistical result;
  • the values of the quantization coefficients with odd values in the designated area are converted into first values
  • the values of quantization coefficients with even values in the designated area are converted into second values
  • the calculation of the The sum of the odd values of the quantization coefficients in the specified area after the numerical conversion, and the obtained sum is used as the statistical result, wherein one of the first value and the second value is an odd number, and the other is an even number .
  • the statistics unit 1004 is configured to: according to the value of the quantization coefficient in the designated area, calculate the sum of the number of even quantization coefficients in the designated area, and calculate the obtained sum as the statistical result; or
  • the values of the quantization coefficients with odd values in the designated area are converted into first values
  • the values of quantization coefficients with even values in the designated area are converted into second values
  • the calculation of the The sum of the even values of the quantization coefficients in the specified area after the numerical conversion, and the obtained sum is used as the statistical result, wherein one of the first value and the second value is an odd number, and the other is an even number .
  • the designated area includes any one of the following:
  • the quantized coefficient block is located on at least one oblique line.
  • the designated area includes any one of the following:
  • the SRCC area is located on at least one diagonal line.
  • the specified position or positions in the SRCC area include: the first N positions in the scanning order, where N is a natural number other than 0.
  • the decision unit 1006 is configured to: if the statistical value of the quantization coefficient is an odd number, decide to skip the inverse transformation process, and if the statistical value of the quantization coefficient is an even number, then decides to perform the inverse transformation process; or
  • the statistical value of the quantization coefficient is an odd number, it is decided to execute the inverse transformation process, and if the statistical value of the quantization coefficient is an even number, it is determined to skip the inverse transformation process.
  • the decision unit 1006 is configured to: if the statistical value of the quantization coefficient belongs to the first value set, decide to skip the inverse transformation process, if the statistical value of the quantization coefficient belongs to the first set of values The value does not belong to the first set of values, and it is decided to perform the inverse transformation process; or
  • the statistical value of the quantization coefficient belongs to the first numerical set, it is decided to execute the inverse transformation process; if the statistical value of the quantized coefficient does not belong to the first numerical set, it is decided to skip the inverse transformation processing.
  • FIG. 12 shows a block diagram of a video encoding apparatus according to an embodiment of the present application.
  • the video encoding apparatus may be set in an electronic device with a computing processing function, such as a terminal device or a server.
  • a video encoding apparatus 1200 includes: a processing unit 1202 and an obtaining unit 1204 .
  • the processing unit 1202 is configured to directly perform quantization processing on the residual data required to obtain the coding block of the video image frame, skipping the transformation process, to obtain the first quantized coefficient block of the residual data; performing transformation processing and quantization processing to obtain a second quantized coefficient block of the residual data;
  • the obtaining unit 1204 is configured to obtain a third quantized coefficient block based on the first quantized coefficient block, the quantized coefficient statistic value corresponding to the third quantized coefficient block is used to indicate skipping the inverse transformation process, the third quantized coefficient block
  • the statistical value of the quantization coefficient corresponding to the block is obtained by counting the quantization coefficients in the designated area in the third quantization coefficient block; based on the second quantization coefficient block, a fourth quantization coefficient block is obtained, and the fourth quantization coefficient block corresponds to the quantization coefficient block.
  • the quantization coefficient statistical value is used to instruct the execution of the inverse transformation process, and the quantization coefficient statistical value corresponding to the fourth quantized coefficient block is obtained by counting the quantized coefficients in the designated area in the fourth quantized coefficient block;
  • the processing unit 1202 is further configured to perform entropy coding processing on the quantized coefficient blocks that satisfy the selection condition in the third quantized coefficient block and the fourth quantized coefficient block, so as to obtain the coded block of the video image frame.
  • FIG. 13 shows a schematic structural diagram of a computer system suitable for implementing the electronic device according to the embodiment of the present application.
  • the computer system 1100 includes a central processing unit (Central Processing Unit, CPU) 1101, which can be loaded into the computer according to a program stored in a read-only memory (Read-Only Memory, ROM) 1102 or from a storage part 1108
  • a program in a random access memory (Random Access Memory, RAM) 1103 performs various appropriate actions and processes, such as performing the methods described in the above embodiments.
  • RAM Random Access Memory
  • various programs and data required for system operation are also stored.
  • the CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104.
  • An Input/Output (I/O) interface 1105 is also connected to the bus 1104 .
  • the following components are connected to the I/O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc. ; a storage part 1108 including a hard disk and the like; and a communication part 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like.
  • the communication section 1109 performs communication processing via a network such as the Internet.
  • Drivers 1110 are also connected to I/O interface 1105 as needed.
  • a removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.
  • embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising a computer program for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication portion 1109, and/or installed from the removable medium 1111.
  • CPU central processing unit
  • the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the 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 a combination of any of the above.
  • Computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable 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 of the above The combination.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium carrying a computer-readable computer program may include a data signal in baseband or propagated as part of a carrier wave. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium can also be any computer-readable medium other than computer-readable storage medium.
  • the computer-readable medium can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
  • a computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the above-mentioned module, program segment, or part of code contains one or more executables for realizing the specified logical function instruction.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • the units involved in the embodiments of the present application may be implemented in software or hardware, and the described units may also be provided in a processor. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the present application also provides a computer-readable medium.
  • the computer-readable medium may be included in the electronic device described in the above embodiments; it may also exist alone without being assembled into the electronic device. middle.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by an electronic device, enables the electronic device to implement the methods described in the above-mentioned embodiments.
  • the exemplary embodiments described herein may be implemented by software, or may be implemented by software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application may be embodied in the form of software products, and the software products may be stored in a non-volatile storage medium (which may be CD-ROM, U disk, mobile hard disk, etc.) or on the network , which includes several instructions to cause a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
  • a computing device which may be a personal computer, a server, a touch terminal, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种视频解码方法、视频编码方法、装置、介质及电子设备。该视频解码方法包括:对视频图像帧的编码块进行熵解码处理,获得所述编码块对应的残差数据的量化系数块;统计所述量化系数块中指定区域内的量化系数,得到量化系数统计值;根据所述量化系数统计值决定是否跳过反变换处理过程。该技术方案可以有效提高视频编码效率。

Description

视频解码方法、视频编码方法、装置、介质及电子设备
本申请要求于2020年08月21日提交的申请号为202010855625.1、发明名称为“视频解码方法、装置、计算机可读介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机及通信技术领域,具体而言,涉及一种视频解码方法、视频编码方法、装置、介质及电子设备。
背景技术
在视频编码过程中,编码端通常需要对原始视频数据与预测视频数据之间的残差数据进行变换、量化及熵编码处理之后发送给解码端。由于残差数据的多样性,单一的DCT(Discrete Cosine Transform,离散余弦变换)变换核无法适应所有的残差特性,因此对于一个残差块可能需要选择多个DCT变换核作为变换矩阵组合。某些残差块的相关性较弱,如果跳过变换处理过程直接进行量化处理反而会提高编码效率,但是这种方式需要针对每个编码单元(Coding Unit,简称CU)来编码变换跳过标识位,以指示是否跳过变换处理过程,额外编码变换跳过标识位会影响视频编码效率。
发明内容
本申请的实施例提供了一种视频解码方法、视频编码方法、装置、介质及电子设备,进而至少在一定程度上可以有效提高视频编码效率。
本申请的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本申请的实践而习得。
根据本申请实施例的一个方面,提供了一种视频解码方法,包括:对视频图像帧的编码块进行熵解码处理,获得所述编码块对应的残差数据的量化系数块;统计所述量化系数块中指定区域内的量化系数,得到量化系数统计值;根据所述量化系数统计值决定是否跳过所述反变换处理过程。
根据本申请实施例的一个方面,提供了一种视频编码方法,包括:对获取视频图像帧的编码块所需的残差数据跳过变换处理直接进行量化处理,得到所述残差数据的第一量化系数块;对所述残差数据依次进行变换处理和量化处理,得到所述残差数据的第二量化系数块;基于所述第一量化系数块,获取第三量化系数块,所述第三量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,所述第三量化系数块对应的量化系数统计值通过统计所述第三量化系数块中指定区域内的量化系数得到;基于所述第二量化系数块,获取第四量化系数块,所述第四量化系数块对应的量化系数统计值用于指示执行所述反变换处理过程,所述第四量化系数块对应的量化系数统计值通过统计所述第四量化系数块中指定区域内的量化系数得到;对所述第三量化系数块和所述第四量化系数块中满足选取条件的量化系数块进行熵编码处理,得到所述视频图像帧的编码块。
根据本申请实施例的一个方面,提供了一种视频解码装置,包括:解码单元,配置为对视频图像帧的编码块进行熵解码处理,获得所述编码块对应的残差数据的量化系数块;统计单元;统计单元,配置为统计所述量化系数块中指定区域内的量化系数,得到量化系数统计值;决策单元,配置为根据所述量化系数统计值决定是否跳过所述反变换处理过程。
根据本申请实施例的一个方面,提供了一种视频编码装置,包括:
处理单元,配置为对获取视频图像帧的编码块所需的残差数据跳过变换处理直接进行量化处理,得到所述残差数据的第一量化系数块;对所述残差数据依次进行变换处理和量化处理,得到所述残差数据的第二量化系数块;获取单元,配置为基于所述第一量化系数块,获取第三量化系数块,所述第三量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,所述第三量化系数块对应的量化系数统计值通过统计所述第三量化系数块中指定区域内的量化系数得到;基于所述第二量化系数块,获取第四量化系数块,所述第四量化系数块对应的量化系数统计值用于指示执行所述反变换处理过程,所述第四量化系数块对应的量化系数统计值通过统计所述第四量化系数块中指定区域内的量化系数得到;所述处理单元,还配置为对所述第三量化系数块和所述第四量化系数块中满足选取条件的量化系数块进行熵编码处理,得到所述视频图像帧的编码块。
根据本申请实施例的一个方面,提供了一种视频处理系统,所述视频处理系统包括视频编码装置和视频解码装置,所述视频编码装置用于执行上述实施例中所述的视频编码方法,所述视频解码装置用于执行上述实施例中所述的视频解码方法。
根据本申请实施例的一个方面,提供了一种非临时性计算机可读介质,所述非临时性计算机可读介质上存储有计算机程序,所述计算机程序被处理器执行,以使计算机实现如上述实施例中所述的视频解码方法,或者实现如上述实施例中所述的视频编码方法。
根据本申请实施例的一个方面,提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述电子设备实现如上述实施例中所述的视频解码方法,或者实现如上述实施例中所述的视频编码方法。
根据本申请实施例的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备实现上述各种可选实施例中提供的视频解码方法,或者实现上述各种可选实施例中提供的视频编码方法。
在本申请的一些实施例所提供的技术方案中,通过统计量化系数块中指定区域内的量化系数得到量化系数统计值,然后根据量化系数统计值决定是否跳过反变换处理过程。此种方式使得能够通过量化系数块中的量化系数来隐含指示编码端是否跳过了变换处理过程,进而解码端可以决定是否进行反变换处理过程,避免了编码端针对每个编码单元都编码变换跳过标识位,进而可以有效提高视频编码效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图;
图2示出视频编码装置和视频解码装置在流式传输系统中的放置方式示意图;
图3示出了一个视频编码器的基本流程图;
图4示出了通过SRCC技术标记出的扫描区域;
图5示出了对标记出的扫描区域进行扫描的顺序示意图;
图6示出了根据本申请的一个实施例的视频解码方法的流程图;
图7示出了根据本申请的一个实施例的指定区域的划分方式示意图;
图8示出了根据本申请的一个实施例的指定区域的划分方式示意图;
图9示出了根据本申请的一个实施例的指定区域的划分方式示意图;
图10示出了根据本申请的一个实施例的视频编码方法的流程图;
图11示出了根据本申请的一个实施例的视频解码装置的框图;
图12示出了根据本申请的一个实施例的视频编码装置的框图;
图13示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本申请的各方面。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
需要说明的是:在本文中提及的“多个”是指两个或两个以上。“和/或”描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图。
如图1所示,系统架构100包括多个终端装置,所述终端装置可通过例如网络150彼此通信。举例来说,系统架构100可以包括通过网络150互连的第一终端装置110和第二终端装置120。在图1的实施例中,第一终端装置110和第二终端装置120执行单向数据传输。
举例来说,第一终端装置110可对视频数据(例如由第一终端装置110采集的视频图片流)进行编码以通过网络150传输到第二终端装置120,已编码的视频数据以一个或多个已编码视频码流形式传输,第二终端装置120可从网络150接收已编码的视频数据,对已编码视频数据进行解码以恢复视频数据,并根据恢复的视频数据显示视频图片。
在本申请的一个实施例中,系统架构100可以包括执行已编码的视频数据的双向传输的第三终端装置130和第四终端装置140,所述双向传输比如可以发生在视频会议期间。对于双向数据传输,第三终端装置130和第四终端装置140中的每个终端装置可对视频数据(例如由终端装置采集的视频图片流)进行编码,以通过网络150传输到第三终端装置130和第四终端装置140中的另一终端装置。第三终端装置130和第四终端装置140中的每个终端装置还可接收由第三终端装置130和第四终端装置140中的另一终端装置传输的已编码的视频数据,且可对已编码的视频数据进行解码以恢复视频数据,并可根据恢复的视频数据在可访问的显示装置上显示视频图片。
在图1的实施例中,第一终端装置110、第二终端装置120、第三终端装置130和第四终端装置140可为服务器、个人计算机和智能电话,但本申请公开的原理可不限于此。本申请公开的实施例适用于膝上型计算机、平板电脑、媒体播放器和/或专用视频会议设备。网络150表示在第一终端装置110、第二终端装置120、第三终端装置130和第四终端装置140之间传送已编码的视频数据的任何类型的网络,包括例如有线和/或无线通信网络。通信网络150可在电路交换和/或分组交换信道中交换数据。该网络150可包括电信网络、局域网、广域网和/或互联网。出于本申请的目的,除非在下文中有所解释,否则网络150的架构和拓扑对于本申请公开的操作来说可能是无关紧要的。
在本申请的一个实施例中,图2示出视频编码装置和视频解码装置在流式传输环境中 的放置方式。本申请所公开主题可同等地适用于其它支持视频的应用,包括例如视频会议、数字TV(television,电视机)、在包括CD(Compact Disk,光盘)、DVD(Digital Video Disc,数字影像光盘)、存储棒等的数字介质上存储压缩视频等等。
流式传输系统可包括采集子系统213,采集子系统213可包括数码相机等视频源201,视频源201创建未压缩的视频图片流202。在实施例中,视频图片流202包括由数码相机拍摄的样本。相较于已编码的视频数据204(或已编码的视频码流204),视频图片流202被描绘为粗线以强调高数据量的视频图片流,视频图片流202可由电子装置220处理,电子装置220包括耦接到视频源201的视频编码装置203。视频编码装置203可包括硬件、软件或软硬件组合以实现或实施如下文更详细地描述的所公开主题的各方面。相较于视频图片流202,已编码的视频数据204(或已编码的视频码流204)被描绘为细线以强调较低数据量的已编码的视频数据204(或已编码的视频码流204),已编码的视频数据204(或已编码的视频码流204)可存储在流式传输服务器205上以供将来使用。
一个或多个流式传输客户端子系统,例如图2中的客户端子系统206和客户端子系统208,可访问流式传输服务器205以检索已编码的视频数据204的副本207和副本209。客户端子系统206可包括例如电子装置230中的视频解码装置210。视频解码装置210对已编码的视频数据的传入副本207进行解码,且产生可在显示器212(例如显示屏)或另一呈现装置上呈现的输出视频图片流211。在一些流式传输系统中,可根据某些视频编码/压缩标准对已编码的视频数据204、视频数据204的副本207和视频数据204的副本209(例如视频码流)进行编码。该些标准的实施例包括ITU-T H.265。在实施例中,正在开发的视频编码标准非正式地称为下一代视频编码(Versatile Video Coding,VVC),本申请可用于VVC标准的上下文中。
应注意,电子装置220和电子装置230可包括图中未示出的其它组件。举例来说,电子装置220可包括视频解码装置,且电子装置230还可包括视频编码装置。
在本申请的一个实施例中,以国际视频编码标准HEVC(High Efficiency Video Coding,高效率视频编码)、VVC,以及中国国家视频编码标准AVS(Audio Video coding Standard,信源编码标准)为例,当输入一个视频图像帧之后,会根据一个块大小,将视频图像帧划分成若干个不重叠的处理单元,每个处理单元将进行类似的压缩操作。这个处理单元被称作CTU(Coding Tree Unit,编码树单元),或者称之为LCU。CTU再往下可以继续进行更加精细的划分,得到一个或多个基本的编码单元CU,CU是一个编码环节中最基本的元素。以下介绍对CU进行编码时的一些概念:
预测编码(Predictive Coding):预测编码包括了帧内预测和帧间预测等方式,原始视频信号经过选定的已重建视频信号的预测后,得到残差视频信号。编码端需要为当前CU决定选择哪一种预测编码模式,并告知解码端。其中,帧内预测是指预测的信号来自于同一图像内已经编码重建过的区域;帧间预测是指预测的信号来自已经编码过的、不同于当前图像的其它图像(称之为参考图像)。
变换及量化(Transform&Quantization):残差视频信号经过DFT(Discrete Fourier Transform,离散傅里叶变换)、DCT等变换操作后,将信号转换到变换域中,得到变换系数。变换系数进一步进行有损的量化操作,丢失掉一定的信息,使得量化后的信号有利于压缩表达。在一些视频编码标准中,可能有多于一种变换方式可以选择,因此编码端也需要为当前CU选择其中的一种变换方式,并告知解码端。量化的精细程度通常由量化参数(Quantization Parameter,简称QP)来决定,QP取值较大,表示更大取值范围的系数将被量化为同一个输出,因此通常会带来更大的失真及较低的码率;相反,QP取值较小,表示较小取值范围的系数将被量化为同一个输出,因此通常会带来较小的失真,同时对应较高的码率。
熵编码(Entropy Coding)或统计编码:量化后的变换域信号将根据各个值出现的频率进行统计压缩编码,最后输出二值化(0或者1)的压缩码流。同时,编码产生其他信息, 例如选择的编码模式、运动矢量数据等,也需要进行熵编码以降低码率。统计编码是一种无损的编码方式,可以有效的降低表达同样信号所需要的码率,常见的统计编码方式有变长编码(Variable Length Coding,简称VLC)或者基于上下文的二值化算术编码(Content Adaptive Binary Arithmetic Coding,简称CABAC)。
环路滤波(Loop Filtering):经过变换及量化的信号会通过反量化、反变换及预测补偿的操作获得重建图像。重建图像与原始图像相比由于存在量化的影响,部分信息与原始图像有所不同,即重建图像会产生失真(Distortion)。因此,可以对重建图像进行滤波操作,例如去块效应滤波(Deblocking filter,简称DB)、SAO(Sample Adaptive Offset,自适应像素补偿)或者ALF(Adaptive Loop Filter,自适应环路滤波)等滤波器,可以有效降低量化所产生的失真程度。由于这些经过滤波后的重建图像将作为后续编码图像的参考来对将来的图像信号进行预测,因此上述的滤波操作也被称为环路滤波,即在编码环路内的滤波操作。
在本申请的一个实施例中,图3示出了一个视频编码器的基本流程图,在该流程中以帧内预测为例进行说明。原始图像信号s k[x,y]与预测图像信号
Figure PCTCN2021112359-appb-000001
做差值运算,得到残差信号u k[x,y],残差信号u k[x,y]经过变换及量化处理之后得到量化系数。量化系数一方面通过熵编码得到编码后的比特流,另一方面通过反量化及反变换处理得到重构残差信号u' k[x,y],预测图像信号
Figure PCTCN2021112359-appb-000002
与重构残差信号u' k[x,y]叠加生成图像信号
Figure PCTCN2021112359-appb-000003
图像信号
Figure PCTCN2021112359-appb-000004
一方面输入至帧内模式决策模块和帧内预测模块进行帧内预测处理,另一方面通过环路滤波输出重建图像信号s' k[x,y],重建图像信号s' k[x,y]可以作为下一帧的参考图像进行运动估计及运动补偿预测。然后基于运动补偿预测的结果s' r[x+m x,y+m y]和帧内预测结果
Figure PCTCN2021112359-appb-000005
得到下一帧的预测图像信号
Figure PCTCN2021112359-appb-000006
并继续重复上述过程,直至编码完成。
此外,由于在残差信号经过变换和量化处理后得到的量化系数块中,非零系数较大概率会集中在块的左边和上方区域,而块的右边和下方区域往往为0,因此引入了SRCC技术。通过SRCC技术可以标记出每个量化系数块(尺寸为W×H)中包含的非零系数的左上区域的大小SRx×SRy,其中SRx是量化系数块中最右面的非零系数的横坐标,SRy是量化系数块中最下面的非零系数的纵坐标,且1≤SRx≤W,1≤SRy≤H,而该区域外的系数均为0。SRCC技术利用(SRx,SRy)来确定一个量化系数块中需要扫描的量化系数区域,如图4所示,只有(SRx,SRy)标记的扫描区域内的量化系数需要编码。示例性地,如图5所示,编码的扫描顺序可以是从右下角到左上角的反向Z字型扫描。
基于上述的编码过程,在解码端针对每一个CU,在获取到压缩码流(即比特流)之后,进行熵解码获得各种模式信息及量化系数。然后量化系数经过反量化及反变换处理得到残差信号。另一方面,根据已知的编码模式信息,可获得该CU对应的预测信号,然后将残差信号与预测信号相加之后即可得到重建信号,重建信号再经过环路滤波等操作,产生最终的输出信号。
在上述的编解码过程中,对残差信号的变换处理使得残差信号的能量集中在较少的低频系数,也就是多数系数值较小。然后经过后续的量化模块后,较小系数值将变为零值,极大降低了编码残差信号的代价。但是,由于残差分布的多样性,单一的DCT变换无法适应所有的残差特性,因此,DST7(Discrete Sine Transform 7,离散正弦变换7)和DCT8(Discrete Cosine Transform 8,离散余弦变换8)这样的变换核被引入到变换处理过程中,并且对残差信号进行的水平变换和竖直变换可以采用不同的变换核。以AMT(Adaptive Multiple core Transform,自适应多核变换)技术为例,对于一个残差信号进行变换处理可能选择的变换组合如下所示:(DCT2,DCT2)、(DCT8,DCT8)、(DCT8,DST7)、(DST7,DCT8)和(DST7,DST7)。
对于残差信号具体选择哪种变换组合,需要在编码端使用RDO(Rate–Distortion  Optimization,率失真优化)进行决策。同时由于某些残差块的相关性较弱,如果跳过变换处理过程直接进行量化处理反而会提高编码效率,而是否跳过变换处理过程也需要在编码端使用RDO进行决策,但是这种方式需要针对每个编码单元来编码变换跳过标识位,以用来指示是否跳过了变换处理过程,因此导致视频编码效率较低。
针对上述问题,本申请的实施例提出了通过量化系数块中的量化系数来隐含指示是否跳过了残差数据的变换处理过程,进而可以省掉对变换跳过标识位的编码,有效提高了视频编码效率。
以下对本申请实施例的技术方案的实现细节进行详细阐述:
图6示出了根据本申请的一个实施例的视频解码方法的流程图,该视频解码方法可以由电子设备执行,该电子设备为具有计算处理功能的设备,比如可以由终端设备或服务器来执行。参照图6所示,该视频解码方法至少包括步骤S610至步骤S630,详细介绍如下:
在步骤S610中,对视频图像帧的编码块进行熵解码处理,获得编码块对应的残差数据的量化系数块。
在本申请的一个实施例中,视频图像帧序列包括了一系列视频图像帧,每张视频图像帧可以被进一步划分为条带(Slice),条带又可以划分为一系列的LCU(或CTU),LCU包含有若干CU。视频图像帧在编码时是以块为单位进行编码处理,在一些新的视频编码标准中,比如在H.264标准中有宏块(macroblock,MB),宏块可进一步划分成多个可用于预测编码的预测块(prediction)。在HEVC标准中,采用编码单元CU、预测单元(prediction unit,PU)和变换单元(transform unit,TU)等基本概念,从功能上划分了多种块单元,并采用全新的基于树的结构进行描述。比如CU可以按照四叉树划分为更小的CU,而更小的CU还可以继续划分,从而形成一种四叉树结构。本申请实施例中的编码块可以是对CU进行编码后得到的块,或者是对比CU更小的块(如对CU进行划分得到的更小的块)进行编码后得到的块。
视频图像帧的编码块是通过对编码块对应的残差数据进行视频编码得到的,视频编码的最后一步处理过程为对残差数据的量化系数块进行熵编码处理,因此,在视频解码的过程中,需要先对视频图像帧的编码块进行熵解码处理,在熵解码处理后得到编码块对应的残差数据的量化系数块。
在步骤S620中,统计量化系数块中指定区域内的量化系数,得到量化系数统计值。
在本申请实施例的一个实施例中,在获得残差数据的量化系数块后,直接统计量化系数块中指定区域内的量化系数。在本申请实施例的另一个实施例中,若确定需要根据量化系数块中的量化系数决定是否跳过反变换处理过程,则统计量化系数块中指定区域内的量化系数。
在本申请的一个实施例中,可以通过一个视频图像帧序列对应的第一编码数据的序列头部中包含的指定索引标识来指示第一编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。该实施例的技术方案使得通过视频图像帧序列对应的第一编码数据的序列头部中的一个索引标识实现了对整个视频图像帧序列对应的所有编码块的指示,进而可以有效降低索引标识所占用的比特位,提高了视频编码效率。
在本申请的一个实施例中,可以通过一个视频图像帧对应的第二编码数据的图像头部中包含的指定索引标识来指示第二编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。该实施例的技术方案使得通过视频图像帧对应的第二编码数据的图像头部中的一个索引标识实现了对整个视频图像帧对应的所有编码块的指示,同样可以降低索引标识所占用的比特位,提高了视频编码效率。
在本申请的一个实施例中,可以通过视频图像帧的一个条带对应的第三编码数据的条带头部中包含的指定索引标识来指示第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。该实施例的技术方案使得通过 视频图像帧的一个条带对应的第三编码数据的条带头部中的一个索引标识实现了对整个条带对应的所有编码块的指示,同样可以降低索引标识所占用的比特位,提高了视频编码效率。
在本申请的一个实施例中,可以通过视频图像帧的一个LCU对应的第四编码数据的LCU头部中包含的指定索引标识来指示第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。该实施例的技术方案使得通过视频图像帧的一个LCU对应的第四编码数据的LCU头部中的一个索引标识实现了对整个LCU对应的所有编码块的指示,同样可以降低索引标识所占用的比特位,提高了视频编码效率。
在本申请的一个实施例中,可以根据编码块的尺寸大小和参考阈值范围之间的关系,确定编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。示例性地,若编码块的尺寸大小和参考阈值范围之间的关系满足参考条件,则确定编码块需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若编码块的尺寸大小和参考阈值范围之间的关系不满足参考条件,则确定编码块不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。满足参考条件根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。
示例性地,满足参考条件是指编码块的尺寸大小处于参考阈值范围内。示例性地,参考阈值范围可以是指由下限阈值和上限阈值构成的范围,也可以是指小于某个阈值的范围,还可以是指大于某个阈值的范围,本申请实施例对此不加以限定。比如,在参考阈值范围是指小于某个阈值的范围的情况下,若编码块的尺寸较小(如小于某个阈值),则可以确定该编码块需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;相反地,若编码块的尺寸较大(如大于某个阈值),则可以确定该编码块不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。该实施例的技术方案可以根据编码块的尺寸来隐含指示是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程,无需额外的比特位,因此也可以提高视频编码效率。
在本申请的一个实施例中,如果一个视频图像帧序列对应的第一编码数据的序列头部包含的索引标识为第一值(比如可以为0),则确定第一编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。如果该序列头部包含的索引标识为第二值(比如可以为1),此时可以进一步根据视频图像帧序列中的视频图像帧所对应的第二编码数据的图像头部包含的索引标识来进行决策。
在本申请的一个实施例中,如果前述的序列头部包含的索引标识为第二值(比如可以为1),且前述的图像头部包含的索引标识为第一值(比如可以为0),则可以确定第二编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。如果前述的序列头部包含的索引标识和前述的图像头部包含的索引标识均为第二值(比如可以为1),那么可以确定第二编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程,这种情况下,可以不再通过条带头部、LCU头部和编码块的尺寸大小进行决策。
当然,在本申请的一个实施例中,如果前述的序列头部包含的索引标识和前述的图像头部包含的索引标识均为第二值(比如可以为1),那么也可以进一步根据视频图像帧的条带所对应的第三编码数据的条带头部包含的索引标识来进行决策。比如,若前述序列头部包含的索引标识、前述图像头部包含的索引标识均为第二值,但一个条带对应的第三编码数据的条带头部包含的索引标识为第一值(比如可以为0),那么可以确定第三编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。如果前述的序列头部包含的索引标识、前述的图像头部包含的索引标识和前述条带头部包含的索引标识均为第二值(比如可以为1),那么可以确定第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程, 这种情况下,可以不再通过LCU头部和编码块的尺寸大小进行决策。
当然,在本申请的一个实施例中,如果前述的序列头部包含的索引标识、前述的图像头部包含的索引标识和前述条带头部包含的索引标识均为第二值(比如可以为1),那么也可以进一步根据条带中的LCU所对应的第四编码数据的LCU头部包含的索引标识来进行决策。比如,若前述序列头部包含的索引标识、前述图像头部包含的索引标识和前述条带头部包含的索引标识均为第二值,但一个LCU对应的第四编码数据的LCU头部包含的索引标识为第一值(比如可以为0),那么可以确定第四编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。如果前述的序列头部包含的索引标识、前述的图像头部包含的索引标识、前述条带头部包含的索引标识和前述LCU头部包含的索引标识均为第二值(比如可以为1),那么可以确定第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程,这种情况下,可以不再通过编码块的尺寸大小进行决策。
当然,在本申请的一个实施例中,如果前述的序列头部包含的索引标识、前述的图像头部包含的索引标识、前述条带头部包含的索引标识和前述LCU头部包含的索引标识均为第二值(比如可以为1),那么也可以进一步根据编码块的尺寸大小来进行决策。比如,若前述的序列头部包含的索引标识、前述的图像头部包含的索引标识、前述条带头部包含的索引标识和前述LCU头部包含的索引标识均为第二值,但一个编码块的尺寸较小(如小于某个阈值),则可以确定该编码块需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;相反地,若编码块的尺寸较大(如大于某个阈值),则可以确定该编码块不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
综上,在确定是否需要根据量化系数块中的量化系数决定是否跳过反变换处理过程时,有以下方式:
1、仅通过前述序列头部中的索引标识来指示,不再通过图像头部、条带头部、LCU头部和编码块的尺寸大小来进行决策。示例性地,序列头部中的索引标识为1(数值仅为示例),就说明视频图像帧序列对应的第一编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
2、仅通过前述图像头部中的索引标识来指示,不再通过序列头部、条带头部、LCU头部和编码块的尺寸大小来进行决策。示例性地,图像头部中的索引标识为1(数值仅为示例),就说明视频图像帧对应的第二编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
3、仅通过前述条带头部中的索引标识来指示,不再通过序列头部、图像头部、LCU头部和编码块的尺寸大小来进行决策。示例性地,条带头部中的索引标识为1(数值仅为示例),就说明条带对应的第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
4、仅通过前述LCU头部中的索引标识来指示,不再通过序列头部、图像头部、条带头部和编码块的尺寸大小来进行决策。示例性地,LCU头部中的索引标识为1(数值仅为示例),就说明LCU对应的第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
5、仅通过编码块的尺寸大小来隐含指示,不再通过序列头部、图像头部、条带头部和LCU头部来进行决策。示例性地,若编码块的尺寸较小(如小于某个阈值),则可以确定该编码块需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;相反地,若编码块的尺寸较大(如大于某个阈值),则可以确定该编码块不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
6、通过前述序列头部中的索引标识和图像头部中的索引标识来指示,不再通过条带头部、LCU头部和编码块的尺寸大小来进行决策。示例性地,若序列头部中的索引标识和图像头部中的索引标识均为1(数值仅为示例),则说明视频图像帧对应的第二编码数据中的 所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若序列头部中的索引标识为1,而图像头部中的索引标识为0(数值仅为示例),则说明该视频图像帧对应的第二编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
7、通过前述序列头部中的索引标识、图像头部中的索引标识和条带头部中的索引标识来指示,不再通过LCU头部和编码块的尺寸大小来进行决策。示例性地,若序列头部中的索引标识、图像头部中的索引标识和条带头部的索引标识均为1(数值仅为示例),则说明条带对应的第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若序列头部中的索引标识和图像头部中的索引标识为1,而条带头部中的索引标识为0(数值仅为示例),则说明该条带对应的第三编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
8、通过前述序列头部中的索引标识、图像头部中的索引标识、条带头部中的索引标识和LCU头部中的索引标识来指示,不再通过编码块的尺寸大小来进行决策。示例性地,若序列头部中的索引标识、图像头部中的索引标识、条带头部的索引标识和LCU头部中的索引标识均为1(数值仅为示例),则说明LCU对应的第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若序列头部中的索引标识、图像头部中的索引标识和条带头部中的索引标识为1,而LCU头部中的索引标识为0(数值仅为示例),则说明该LCU对应的第四编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
9、通过前述序列头部中的索引标识、图像头部中的索引标识、条带头部中的索引标识、LCU头部中的索引标识和编码块的尺寸大小来进行决策。示例性地,若序列头部中的索引标识、图像头部中的索引标识、条带头部的索引标识、LCU头部中的索引标识均为1(数值仅为示例),且编码块的尺寸小于设定阈值,则说明该编码块需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若序列头部中的索引标识、图像头部中的索引标识、条带头部中的索引标识和LCU头部中的索引标识均为1,但是编码块的尺寸大于设定阈值,则说明该编码块不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
当然,还可以有如下方式:
10、通过前述图像头部中的索引标识和条带头部中的索引标识来指示,不再通过序列头部、LCU头部和编码块的尺寸大小来进行决策。示例性地,若图像头部中的索引标识和条带头部的索引标识均为1(数值仅为示例),则说明条带对应的第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若图像头部中的索引标识为1,而条带头部中的索引标识为0(数值仅为示例),则说明该条带对应的第三编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
11、通过前述图像头部中的索引标识、条带头部中的索引标识和LCU头部中的索引标识来指示,不再通过序列头部、编码块的尺寸大小来进行决策。示例性地,若图像头部中的索引标识、条带头部的索引标识和LCU头部中的索引标识均为1(数值仅为示例),则说明LCU对应的第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若图像头部中的索引标识和条带头部中的索引标识为1,而LCU头部中的索引标识为0(数值仅为示例),则说明该LCU对应的第四编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
12、通过前述图像头部中的索引标识、条带头部中的索引标识、LCU头部中的索引标识和编码块的尺寸大小来进行决策,不再通过序列头部来进行决策。此时,若图像头部中 的索引标识、条带头部的索引标识、LCU头部中的索引标识均为1(数值仅为示例),且编码块的尺寸小于设定阈值,则说明该编码块需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;若图像头部中的索引标识、条带头部中的索引标识和LCU头部中的索引标识均为1,但是编码块的尺寸大于设定阈值,则说明该编码块不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
此外,在本申请的实施例中,还有其它更多种指示方式,不再详述。
在本申请的一个实施例中,在统计量化系数块中指定区域内的量化系数时,可以根据量化系数块中指定区域内的量化系数的数值,对指定区域内的量化系数进行统计得到统计结果,然后直接将该统计结果作为量化系数统计值。或者,也可以在得到统计结果之后,计算统计结果针对设定值的余数,将该余数作为量化系数统计值。示例性地,该设定值可以是任意非零的数,比如可以是2、3、4等。
在本申请的一个实施例中,在根据量化系数块中指定区域内的量化系数的数值,对指定区域内的量化系数进行统计时,可以计算指定区域内的量化系数的数值之和,将得到的和值作为统计结果;或者可以计算指定区域内的量化系数的绝对值之和,将得到的和值作为统计结果;或者还可以先将指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,然后计算指定区域内的量化系数在数值转换之后的数值之和,将得到的和值作为统计结果,其中,第一数值和第二数值中的一个为奇数,另一个为偶数。
比如,将指定区域内数值为奇数的量化系数的数值转换为1,将数值为偶数的量化系数的数值转换为0;或者将指定区域内数值为奇数的量化系数的数值转换为0,将数值为偶数的量化系数的数值转换为1;或者将指定区域内数值为奇数的量化系数的数值转换为3,将数值为偶数的量化系数的数值转换为2;或者将指定区域内数值为奇数的量化系数的数值转换为2,将数值为偶数的量化系数的数值转换为3。
在本申请的一个实施例中,在根据量化系数块中指定区域内的量化系数的数值,对指定区域内的量化系数进行统计时,可以计算指定区域内数值为奇数的量化系数的个数之和,将得到的和值作为统计结果;或者计算指定区域内数值为奇数的量化系数的数值之和,将得到的和值作为统计结果;或者计算指定区域内数值为奇数的量化系数的绝对值之和,将得到的和值作为统计结果;或者将指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,然后计算指定区域内的量化系数在数值转换之后的奇数值之和,将得到的和值作为统计结果,其中,第一数值和第二数值中的一个为奇数,另一个为偶数。
在本申请的一个实施例中,在根据量化系数块中指定区域内的量化系数的数值,对指定区域内的量化系数进行统计时,可以计算指定区域内数值为偶数的量化系数的个数之和,将得到的和值作为统计结果;或者计算指定区域内数值为偶数的量化系数的数值之和,将得到的和值作为统计结果;或者计算指定区域内数值为偶数的量化系数的绝对值之和,将得到的和值作为统计结果;或者将指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,然后计算指定区域内的量化系数在数值转换之后的偶数值之和,将得到的和值作为统计结果,其中,第一数值和第二数值中的一个为奇数,另一个为偶数。
综上,本申请的实施例在根据量化系数块中指定区域内的量化系数的数值,对指定区域内的量化系数进行统计时可以有如下方式:
1、对指定区域内的量化系数的数值直接求和;
2、对指定区域内的量化系数求数值的绝对值之和;
3、先根据指定区域内的量化系数的奇偶性对奇数和偶数进行转换,然后对指定区域内转换后的所有数值求和;
4、求指定区域内数值为奇数的量化系数的个数求和;
5、对指定区域内数值为奇数的量化系数的数值求和;
6、对指定区域内数值为奇数的量化系数求数值的绝对值之和;
7、先根据指定区域内的量化系数的奇偶性对奇数和偶数进行转换,然后对指定区域内转换后的所有数值中的奇数求和;
8、求指定区域内数值为偶数的量化系数的个数求和;
9、对指定区域内数值为偶数的量化系数的数值求和;
10、对指定区域内数值为偶数的量化系数求数值的绝对值之和;
11、先根据指定区域内的量化系数的奇偶性对奇数和偶数进行转换,然后对指定区域内转换后的所有数值中的偶数求和。
在本申请的一个实施例中,上述的指定区域可以是量化系数块中的全部区域。
在本申请的一个实施例中,上述的指定区域可以是量化系数块中指定的一个位置或多个位置。
在本申请的一个实施例中,上述的指定区域可以是量化系数块中指定的至少一行。如图7所示,假设量化系数块是4×4的系数块,每个方块表示一个量化系数,那么可以如图7中(a)所示,将灰色区域的1行作为指定区域;或者可以如图7中(b)所示,将灰色区域的2行作为指定区域。可选地,这至少一行可以是量化系数块中靠上边的行。
在本申请的一个实施例中,上述的指定区域可以是量化系数块中指定的至少一列。如图7所示,假设量化系数块是4×4的系数块,每个方块表示一个量化系数,那么可以如图7中(c)所示,将灰色区域的1列作为指定区域;或者可以如图7中(d)所示,将灰色区域的2列作为指定区域。可选地,这至少一列可以是量化系数块中靠左边的列。
在本申请的一个实施例中,上述的指定区域可以是量化系数块中指定的至少一行和指定的至少一列。如图8所示,假设量化系数块是4×4的系数块,每个方块表示一个量化系数,那么可以如图8中(a)所示,将下方的1行和右边的1列(即其中的灰色区域)作为指定区域;或者可以如图8中(b)所示,将下方的2行和右边的2列(即其中的灰色区域)作为指定区域;或者可以如图8中(c)所示,将上方的1行和左边的1列(即其中的灰色区域)作为指定区域;或者可以如图8中(d)所示,将上方的2行和左边的2列(即其中的灰色区域)作为指定区域。
在本申请的一个实施例中,上述的指定区域可以是量化系数块中处于至少一条斜线上的位置。如图9所示,假设量化系数块是4×4的系数块,每个方块表示一个量化系数,那么可以如9中的(a)和(b)所示,将一条斜线上的位置作为指定区域;或者如9中的(c)和(d)所示,将两条斜线上的位置作为指定区域。
在本申请的一个实施例中,上述的指定区域可以是量化系数块中的SRCC区域。其中,SRCC区域即为通过SRCC技术标记出的扫描区域。
在本申请的一个实施例中,上述的指定区域可以是SRCC区域中指定的一个位置或多个位置。可选地,SRCC区域中指定的一个位置或多个位置可以包括:按照扫描顺序的前N个位置,N为非0的自然数。
在本申请的一个实施例中,上述的指定区域可以是SRCC区域中指定的至少一行。如图7所示,假设SRCC区域是4×4的系数块,每个方块表示一个量化系数,那么可以如图7中(a)所示,将灰色区域的1行作为指定区域;或者可以如图7中(b)所示,将灰色区域的2行作为指定区域。可选地,这至少一行可以是量化系数块中的SRCC区域中靠上边的行。
在本申请的一个实施例中,上述的指定区域可以是SRCC区域中指定的至少一列。如图7所示,假设SRCC区域是4×4的系数块,每个方块表示一个量化系数,那么可以如图7中(c)所示,将灰色区域的1列作为指定区域;或者可以如图7中(d)所示,将灰色区域的2列作为指定区域。可选地,这至少一列可以是量化系数块中的SRCC区域中靠左边的列。
在本申请的一个实施例中,上述的指定区域可以是SRCC区域中指定的至少一行和指定的至少一列。如图8所示,假设SRCC区域是4×4的系数块,每个方块表示一个量化系数,那么可以如图8中(a)所示,将下方的1行和右边的1列(即其中的灰色区域)作为指定区域;或者可以如图8中(b)所示,将下方的2行和右边的2列(即其中的灰色区域)作为指定区域;或者可以如图8中(c)所示,将上方的1行和左边的1列(即其中的灰色区域)作为指定区域;或者可以如图8中(d)所示,将上方的2行和左边的2列(即其中的灰色区域)作为指定区域。
在本申请的一个实施例中,上述的指定区域可以是SRCC区域中处于至少一条斜线上的位置。如图9所示,假设SRCC区域是4×4的系数块,每个方块表示一个量化系数,那么可以如9中的(a)和(b)所示,将一条斜线上的位置作为指定区域;或者如9中的(c)和(d)所示,将两条斜线上的位置作为指定区域。
在本申请的其它实施例中,也可以将上述实施例中的指定区域划分方式进行组合,以将组合后的区域作为指定区域。
继续参照图6所示,在步骤S630中,根据量化系数统计值决定是否跳过所述反变换处理过程。
在本申请的一个实施例中,可以根据量化系数统计值的奇偶性来决定是否跳过所述反变换处理过程。比如若量化系数统计值是奇数,则决定跳过反变换处理过程,若量化系数统计值是偶数,则决定执行反变换处理过程;或者若量化系数统计值是奇数,则决定执行反变换处理过程,若量化系数统计值是偶数,则决定跳过反变换处理过程。
在本申请的一个实施例中,可以根据量化系数统计值的数值来决定是否跳过所述反变换处理过程。比如,若量化系数统计值归属于第一数值集合,则决定跳过反变换处理过程,若量化系数统计值不归属于第一数值集合,决定执行反变换处理过程;或者若量化系数统计值归属于第一数值集合,则决定跳过反变换处理过程,若量化系数统计值不归属于第一数值集合,决定执行反变换处理过程。第一数值集合根据经验设置,或者根据应用场景灵活调整,比如,第一数值集合为(0、2、4、6、8、10)。
在本申请的一个具体示例中,假设量化系数统计值归属于第一数值集合时,决定跳过反变换处理过程,否则,决定执行反变换处理过程。同时假设量化系数统计值是量化系数的统计结果针对4(数值仅为示例)的余数,第一数值集合为(0、1、2),那么当量化系数统计值为2时,决定跳过反变换处理过程;当量化系数统计值为3时,决定执行反变换处理过程。
类似的,假设量化系数统计值归属于第一数值集合时,决定执行反变换处理过程,否则,决定跳过反变换处理过程。同时假设量化系数统计值是量化系数的统计结果针对4(数值仅为示例)的余数,第一数值集合为(0、1、2),那么当量化系数统计值为2时,决定执行反变换处理过程;当量化系数统计值为3时,决定跳过反变换处理过程。
在本申请的一个实施例中,如果决定跳过反变换处理过程,则直接对量化系数块进行反量化处理,将反量化处理的结果作为重建的残差数据。如果决定执行反变换处理过程,则先对量化系数块进行反量化处理,然后基于编码块在编码过程中采用的变换矩阵组合来对反量化结果进行反变换处理,得到重建的残差数据。可选地,进行反变换处理时所选择的变换矩阵组合可以是(DCT2,DCT2)、(DCT8,DCT8)、(DCT8,DST7)、(DST7,DCT8)和(DST7,DST7)中的任意一个。
本申请上述实施例的技术方案使得能够通过量化系数块中的量化系数来隐含指示编码端是否跳过了变换过程,进而解码端可以决定是否进行反变换处理过程,避免了编码端针对每个编码单元都编码变换跳过标识位,进而可以有效提高视频编码效率。
图10示出了根据本申请的一个实施例的视频编码方法的流程图,该视频编码方法由电子设备执行,该电子设备为具有计算处理功能的设备,比如可以由终端设备或服务器来执 行。参照图10所示,该视频编码方法至少包括步骤S810至步骤S830,详细介绍如下:
在步骤S810中,对获取视频图像帧的编码块所需的残差数据跳过变换处理直接进行量化处理,得到残差数据的第一量化系数块;对残差数据依次进行变换处理和量化处理,得到残差数据的第二量化系数块。
在视频编码过程中,需要分别利用跳过变换处理的方式以及不跳过变换处理的方式获取残差数据的量化系数块,然后挑选一种合适的方式作为获取最终的量化系数块的方式。本申请实施例中,利用跳过变换处理的方式(也即跳过变换处理直接进行量化处理的方式)对残差数据进行处理,得到残差数据的第一量化系数块;利用不跳过变换处理的方式(也即依次进行变换处理和量化处理的方式)对残差数据进行处理,得到残差数据的第二量化系数块。
在步骤S820中,基于第一量化系数块,获取第三量化系数块,第三量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,第三量化系数块对应的量化系数统计值通过统计第三量化系数块中指定区域内的量化系数得到;基于第二量化系数块,获取第四量化系数块,第四量化系数块对应的量化系数统计值用于指示执行反变换处理过程,第四量化系数块对应的量化系数统计值通过统计第四量化系数块中指定区域内的量化系数得到。
为实现利用量化系数块中的量化系数隐含指示是否跳过了变换处理过程的目的,需要为利用跳过变换处理的方式得到的量化系数块以及利用不跳过变换处理的方式得到的量化系数块赋予不同的特性。在本申请实施例中,为利用跳过变换处理的方式得到的量化系数块赋予的特性为量化系数块对应的量化系数统计值用于指示跳过反变换处理过程;为利用不跳过变换处理的方式得到的量化系数块赋予的特性为量化系数块对应的量化系数统计值用于指示执行反变换处理过程。获取量化系数块对应的量化系数统计值以及判断量化系数统计值是否用于指示跳过反变换处理过程的方式参见图6所示的实施例,此处不再赘述。
在一些实施例中,基于第一量化系数块,获取第三量化系数块的过程为:响应于第一量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,将第一量化系数块作为第三量化系数块;响应于第一量化系数块对应的量化系数统计值用于指示执行反变换处理过程,朝着使调整后的量化系数块对应的量化系数统计值用于指示跳过反变换处理过程的方向对第一量化系数块中的一个或者多个量化系数进行调整,将调整后得到的量化系数块作为第三量化系数块。朝着使调整后的量化系数块对应的量化系数统计值用于指示跳过反变换处理过程的方向对第一量化系数块中的一个或者多个量化系数进行调整的方式根据经验设置,或者根据应用场景灵活调整。
示例性地,假设量化系数统计值用于指示跳过反变换处理过程是指量化系数统计值为奇数,若第一量化系数块对应的量化系数统计值为偶数,则朝着使调整后的量化系数块对应的量化系数统计值用于指示跳过反变换处理过程的方向对第一量化系数块中的一个或者多个量化系数进行调整的方式可以为:将第一量化系数块中的任意一个量化系数的数值增加1或者减少1。
在一些实施例中,基于第二量化系数块,获取第四量化系数块的过程为:响应于第二量化系数块对应的量化系数统计值用于指示执行反变换处理过程,将第二量化系数块作为第四量化系数块;响应于第二量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,朝着使调整后的量化系数块对应的量化系数统计值用于指示执行反变换处理过程的方向对第二量化系数块中的一个或者多个量化系数进行调整,将调整后得到的量化系数块作为第四量化系数块。朝着使调整后的量化系数块对应的量化系数统计值用于指示执行反变换处理过程的方向对第二量化系数块中的一个或者多个量化系数进行调整的方式根据经验设置,或者根据应用场景灵活调整。
示例性地,假设量化系数统计值用于指示跳过反变换处理过程是指量化系数统计值为奇数,若第二量化系数块对应的量化系数统计值为奇数,则朝着使调整后的量化系数块对应的量化系数统计值用于指示执行反变换处理过程的方向对第二量化系数块中的一个或者 多个量化系数进行调整的方式可以为:将第二量化系数块中的任意一个量化系数的数值增加1或者减少1。
在步骤S830中,对第三量化系数块和第四量化系数块中满足选取条件的量化系数块进行熵编码处理,得到视频图像帧的编码块。
在得到第三量化系数块和第四量化系数块后,对第三量化系数块和第四量化系数块中满足选取条件的量化系数块进行熵编码处理。示例性地,第三量化系数块和第四量化系数块中的哪个量化系数块满足选取条件使用RDO决策。示例性地,将第三量化系数块和第四量化系数块中编码代价小的量化系数块作为满足选取条件的量化系数块。
在对满足选取条件的量化系数块进行熵编码处理后,得到视频图像帧的编码块。
示例性地,由于第三量化系数块和第四量化系数块均能够根据量化系数块中的量化系数决定是否跳过反变换处理过程,所以,无论满足选取条件的量化系数块为第三量化系数块还是为第四量化系数块,均认为得到的编码块需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。示例性地,在编码端制定一种判断编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程的决策方式,并将该决策方式同步到解码端,以使解码端能够判断编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。判断编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程的决策方式参见图6所示的实施例,此处不再赘述。
基于本申请实施例提供的方案,若对编码块进行熵解码得到的量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,则说明满足选取条件的量化系数块为第三量化系数块,由于第三量化系数块是基于第一量化系数块得到的,第一量化系数块是利用跳过变换处理的方式得到的,因此,能够确定在对量化系数块进行解码的过程中,需要跳过反变换处理过程。若对编码块进行熵解码得到的量化系数块对应的量化系数统计值用于指示执行反变换处理过程,则说明满足选取条件的量化系数块为第四量化系数块,由于第四量化系数块是基于第二量化系数块得到的,第二量化系数块是利用不跳过变换处理的方式得到的,因此,能够确定在对量化系数块进行解码的过程中,不需要跳过反变换处理过程。
本申请上述实施例的技术方案使得能够通过量化系数块中的量化系数来隐含指示编码端是否跳过了变换处理过程,避免了编码端针对每个编码单元都编码变换跳过标识位,进而可以有效提高视频编码效率。
本申请实施例提供了一种视频处理系统,该视频处理系统包括视频编码装置和视频解码装置,其中,视频编码装置用于执行图10所示的实施例中的视频编码方法,视频解码装置用于图6所示的实施例中的视频解码方法。
以下介绍本申请的装置实施例,可以用于执行本申请上述实施例中的视频解码方法和视频编码方法。对于本申请装置实施例中未披露的细节,请参照本申请上述的视频解码方法和视频编码方法的实施例。
图11示出了根据本申请的一个实施例的视频解码装置的框图,该视频解码装置可以设置在具有计算处理功能的设备内,比如可以设置在终端设备或服务器内。
参照图11所示,根据本申请的一个实施例的视频解码装置1000,包括:解码单元1002、统计单元1004和决策单元1006。
其中,解码单元1002配置为对视频图像帧的编码块进行熵解码处理,获得所述编码块对应的残差数据的量化系数块;统计单元1004配置为统计所述量化系数块中指定区域内的量化系数,得到量化系数统计值;决策单元1006配置为根据所述量化系数统计值决定是否跳过所述反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述统计单元1004配置为在确定需要根据 所述量化系数块中的量化系数决定是否跳过反变换处理过程时,统计所述量化系数块中指定区域内的量化系数。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1000还包括:第一确定单元,配置为在一个视频图像帧序列对应的第一编码数据的序列头部包含有指定的索引标识时,确定所述第一编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1000还包括:第二确定单元,配置为在一个视频图像帧对应的第二编码数据的图像头部包含有指定的索引标识时,确定所述第二编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1000还包括:第三确定单元,配置为在视频图像帧的一个条带对应的第三编码数据的条带头部包含有指定的索引标识时,确定所述第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1000还包括:第四确定单元,配置为在视频图像帧的一个LCU对应的第四编码数据的LCU头部包含有指定的索引标识时,确定所述第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1000还包括:第五确定单元,配置为根据所述编码块的尺寸大小和参考阈值范围之间的关系,确定所述编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1000还包括:第六确定单元,配置为在一个视频图像帧序列对应的第一编码数据的序列头部包含的索引标识为第一值时,确定所述第一编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,第六确定单元还配置为在一个视频图像帧序列对应的第一编码数据的序列头部包含的索引标识为第二值,且所述视频图像帧序列中的一个视频图像帧所对应的第二编码数据的图像头部包含的索引标识为第一值时,确定所述第二编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述第六确定单元还配置为在所述序列头部包含的索引标识为第二值,且所述图像头部包含的索引标识为第二值时,确定所述第二编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述第六确定单元还配置为在所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值,且所述视频图像帧的一个条带对应的第三编码数据的条带头部包含的索引标识为第一值时,确定所述第三编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述第六确定单元还配置为在所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、所述条带头部包含的索引标识为第二值时,确定所述第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述第六确定单元还配置为在所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、所述条带头部包含的索引标识为第二值,且所述条带的一个LCU对应的第四编码数据的LCU头部包含的索 引标识为第一值时,确定所述第四编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述第六确定单元还配置为在所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、所述条带头部包含的索引标识为第二值,且所述LCU头部包含的索引标识为第二值时,确定所述第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,所述第六确定单元还配置为在所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、所述条带头部包含的索引标识为第二值、所述LCU头部包含的索引标识为第二值时,根据所述LCU中的编码块的尺寸大小和参考阈值范围之间的关系,确定所述编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
在本申请的一些实施例中,基于前述方案,统计单元1004配置为:根据所述量化系数块中指定区域内的量化系数的数值,对所述指定区域内的量化系数进行统计得到统计结果,将所述统计结果作为所述量化系数统计值;或
根据所述量化系数块中指定区域内的量化系数的数值,对所述指定区域内的量化系数进行统计得到统计结果,计算所述统计结果针对设定值的余数,将所述余数作为所述量化系数统计值。
在本申请的一些实施例中,基于前述方案,统计单元1004配置为:根据所述指定区域内的量化系数的数值,计算所述指定区域内的量化系数的数值之和,将得到的和值作为所述统计结果;或
根据所述量化系数块中指定区域内的量化系数的数值,计算所述指定区域内的量化系数的绝对值之和,将得到的和值作为所述统计结果;或
根据所述指定区域内的量化系数的数值,将所述指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,计算所述指定区域内的量化系数在数值转换之后的数值之和,将得到的和值作为所述统计结果,其中,所述第一数值和所述第二数值中的一个为奇数,另一个为偶数。
在本申请的一些实施例中,基于前述方案,统计单元1004配置为:根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为奇数的量化系数的个数之和,将得到的和值作为所述统计结果;或
根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为奇数的量化系数的数值之和,将得到的和值作为所述统计结果;或
根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为奇数的量化系数的绝对值之和,将得到的和值作为所述统计结果;或
根据所述指定区域内的量化系数的数值,将所述指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,计算所述指定区域内的量化系数在数值转换之后的奇数值之和,将得到的和值作为所述统计结果,其中,所述第一数值和所述第二数值中的一个为奇数,另一个为偶数。
在本申请的一些实施例中,基于前述方案,统计单元1004配置为:根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为偶数的量化系数的个数之和,将得到的和值作为所述统计结果;或
根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为偶数的量化系数的数值之和,将得到的和值作为所述统计结果;或
根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为偶数的量化系数的绝对值之和,将得到的和值作为所述统计结果;或
根据所述指定区域内的量化系数的数值,将所述指定区域内数值为奇数的量化系数的 数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,计算所述指定区域内的量化系数在数值转换之后的偶数值之和,将得到的和值作为所述统计结果,其中,所述第一数值和所述第二数值中的一个为奇数,另一个为偶数。
在本申请的一些实施例中,基于前述方案,所述指定区域包括以下任意一个:
所述量化系数块中的全部区域;
所述量化系数块中指定的一个位置或多个位置;
所述量化系数块中指定的至少一行;
所述量化系数块中指定的至少一列;
所述量化系数块中指定的至少一行和指定的至少一列;
所述量化系数块中处于至少一条斜线上的位置。
在本申请的一些实施例中,基于前述方案,所述指定区域包括以下任意一个:
所述量化系数块中的SRCC区域;
所述SRCC区域中指定的一个位置或多个位置;
所述SRCC区域中指定的至少一行;
所述SRCC区域中指定的至少一列;
所述SRCC区域中指定的至少一行和指定的至少一列;
所述SRCC区域中处于至少一条斜线上的位置。
在本申请的一些实施例中,基于前述方案,所述SRCC区域中指定的一个位置或多个位置包括:按照扫描顺序的前N个位置,N为非0的自然数。
在本申请的一些实施例中,基于前述方案,决策单元1006配置为:若所述量化系数统计值是奇数,则决定跳过所述反变换处理过程,若所述量化系数统计值是偶数,则决定执行所述反变换处理过程;或
若所述量化系数统计值是奇数,则决定执行所述反变换处理过程,若所述量化系数统计值是偶数,则决定跳过所述反变换处理过程。
在本申请的一些实施例中,基于前述方案,决策单元1006配置为:若所述量化系数统计值归属于第一数值集合,则决定跳过所述反变换处理过程,若所述量化系数统计值不归属于所述第一数值集合,决定执行所述反变换处理过程;或
若所述量化系数统计值归属于所述第一数值集合,则决定执行所述反变换处理过程,若所述量化系数统计值不归属于所述第一数值集合,决定跳过所述反变换处理过程。
图12示出了根据本申请的一个实施例的视频编码装置的框图,该视频编码装置可以设置在具有计算处理功能的电子设备内,比如可以设置在终端设备或服务器内。
参照图12所示,根据本申请的一个实施例的视频编码装置1200,包括:处理单元1202和获取单元1204。
其中,处理单元1202配置为对获取视频图像帧的编码块所需的残差数据跳过变换处理直接进行量化处理,得到所述残差数据的第一量化系数块;对所述残差数据依次进行变换处理和量化处理,得到所述残差数据的第二量化系数块;
获取单元1204配置为基于所述第一量化系数块,获取第三量化系数块,所述第三量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,所述第三量化系数块对应的量化系数统计值通过统计所述第三量化系数块中指定区域内的量化系数得到;基于所述第二量化系数块,获取第四量化系数块,所述第四量化系数块对应的量化系数统计值用于指示执行所述反变换处理过程,所述第四量化系数块对应的量化系数统计值通过统计所述第四量化系数块中指定区域内的量化系数得到;
所述处理单元1202还配置为对所述第三量化系数块和所述第四量化系数块中满足选取条件的量化系数块进行熵编码处理,得到所述视频图像帧的编码块。
图13示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
需要说明的是,图13示出的电子设备的计算机系统1100仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图13所示,计算机系统1100包括中央处理单元(Central Processing Unit,CPU)1101,该CPU可以根据存储在只读存储器(Read-Only Memory,ROM)1102中的程序或者从存储部分1108加载到随机访问存储器(Random Access Memory,RAM)1103中的程序而执行各种适当的动作和处理,例如执行上述实施例中所述的方法。在RAM 1103中,还存储有系统操作所需的各种程序和数据。CPU 1101、ROM 1102以及RAM 1103通过总线1104彼此相连。输入/输出(Input/Output,I/O)接口1105也连接至总线1104。
以下部件连接至I/O接口1105:包括键盘、鼠标等的输入部分1106;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分1107;包括硬盘等的存储部分1108;以及包括诸如LAN(Local Area Network,局域网)卡、调制解调器等的网络接口卡的通信部分1109。通信部分1109经由诸如因特网的网络执行通信处理。驱动器1110也根据需要连接至I/O接口1105。可拆卸介质1111,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1110上,以便于从其上读出的计算机程序根据需要被安装入存储部分1108。
示例性地,根据本申请的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,该计算机程序产品包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的计算机程序。在这样的实施例中,该计算机程序可以通过通信部分1109从网络上被下载和安装,和/或从可拆卸介质1111被安装。在该计算机程序被中央处理单元(CPU)1101执行时,执行本申请的系统中限定的各种功能。
需要说明的是,本申请实施例所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,计算机可读信号介质中承载了计算机可读的计算机程序。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质。该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的计算机程序可以用任何适当的介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。其中,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执 行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现上述实施例中所述的方法。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本申请实施方式的方法。
本领域技术人员在考虑说明书及实践这里公开的实施方式后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。

Claims (27)

  1. 一种视频解码方法,其中,所述方法由电子设备执行,包括:
    对视频图像帧的编码块进行熵解码处理,获得所述编码块对应的残差数据的量化系数块;
    统计所述量化系数块中指定区域内的量化系数,得到量化系数统计值;
    根据所述量化系数统计值决定是否跳过所述反变换处理过程。
  2. 根据权利要求1所述的视频解码方法,其中,所述统计所述量化系数块中指定区域内的量化系数,包括:
    若确定需要根据所述量化系数块中的量化系数决定是否跳过反变换处理过程,则统计所述量化系数块中指定区域内的量化系数。
  3. 根据权利要求2所述的视频解码方法,其中,还包括:
    若一个视频图像帧序列对应的第一编码数据的序列头部包含有指定的索引标识,则确定所述第一编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;或者
    若一个视频图像帧对应的第二编码数据的图像头部包含有指定的索引标识,则确定所述第二编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;或者
    若视频图像帧的一个条带对应的第三编码数据的条带头部包含有指定的索引标识,则确定所述第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;或者
    若视频图像帧的一个最大编码单元LCU对应的第四编码数据的LCU头部包含有指定的索引标识,则确定所述第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程;或者
    根据所述编码块的尺寸大小和参考阈值范围之间的关系,确定所述编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  4. 根据权利要求2所述的视频解码方法,其中,还包括:
    若一个视频图像帧序列对应的第一编码数据的序列头部包含的索引标识为第一值,则确定所述第一编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  5. 根据权利要求2所述的视频解码方法,其中,还包括:
    若一个视频图像帧序列对应的第一编码数据的序列头部包含的索引标识为第二值,且所述视频图像帧序列中的一个视频图像帧所对应的第二编码数据的图像头部包含的索引标识为第一值,则确定所述第二编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  6. 根据权利要求5所述的视频解码方法,其中,还包括:
    若所述序列头部包含的索引标识为第二值,且所述图像头部包含的索引标识为第二值,则确定所述第二编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  7. 根据权利要求5所述的视频解码方法,其中,还包括:
    若所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值,且所述视频图像帧的一个条带对应的第三编码数据的条带头部包含的索引标识为第一值,则确定所述第三编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  8. 根据权利要求7所述的视频解码方法,其中,还包括:
    若所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、 所述条带头部包含的索引标识为第二值,则确定所述第三编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  9. 根据权利要求7所述的视频解码方法,其中,还包括:
    若所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、所述条带头部包含的索引标识为第二值,且所述条带的一个LCU对应的第四编码数据的LCU头部包含的索引标识为第一值,则确定所述第四编码数据中的所有编码块均不需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  10. 根据权利要求9所述的视频解码方法,其中,还包括:
    若所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、所述条带头部包含的索引标识为第二值,且所述LCU头部包含的索引标识为第二值,则确定所述第四编码数据中的所有编码块均需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  11. 根据权利要求9所述的视频解码方法,其中,还包括:
    若所述序列头部包含的索引标识为第二值、所述图像头部包含的索引标识为第二值、所述条带头部包含的索引标识为第二值、所述LCU头部包含的索引标识为第二值,则根据所述LCU中的编码块的尺寸大小和参考阈值范围之间的关系,确定所述编码块是否需要根据熵解码得到的量化系数块中的量化系数决定是否跳过反变换处理过程。
  12. 根据权利要求1所述的视频解码方法,其中,所述统计所述量化系数块中指定区域内的量化系数,得到量化系数统计值,包括:
    根据所述量化系数块中指定区域内的量化系数的数值,对所述指定区域内的量化系数进行统计得到统计结果,将所述统计结果作为所述量化系数统计值;或
    根据所述量化系数块中指定区域内的量化系数的数值,对所述指定区域内的量化系数进行统计得到统计结果,计算所述统计结果针对设定值的余数,将所述余数作为所述量化系数统计值。
  13. 根据权利要求12所述的视频解码方法,其中,所述根据所述量化系数块中指定区域内的量化系数的数值,对所述指定区域内的量化系数进行统计得到统计结果,包括:
    根据所述指定区域内的量化系数的数值,计算所述指定区域内的量化系数的数值之和,将得到的和值作为所述统计结果;或
    根据所述量化系数块中指定区域内的量化系数的数值,计算所述指定区域内的量化系数的绝对值之和,将得到的和值作为所述统计结果;或
    根据所述指定区域内的量化系数的数值,将所述指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,计算所述指定区域内的量化系数在数值转换之后的数值之和,将得到的和值作为所述统计结果,其中,所述第一数值和所述第二数值中的一个为奇数,另一个为偶数。
  14. 根据权利要求12所述的视频解码方法,其中,所述根据所述量化系数块中指定区域内的量化系数的数值,对所述指定区域内的量化系数进行统计得到统计结果,包括:
    根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为奇数的量化系数的个数之和,将得到的和值作为所述统计结果;或
    根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为奇数的量化系数的数值之和,将得到的和值作为所述统计结果;或
    根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为奇数的量化系数的绝对值之和,将得到的和值作为所述统计结果;或
    根据所述指定区域内的量化系数的数值,将所述指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,计算所述指定区域内的量化系数在数值转换之后的奇数值之和,将得到的和值作为所述统计结果,其中,所述第一数值和所述第二数值中的一个为奇数,另一个为偶数。
  15. 根据权利要求12所述的视频解码方法,其中,所述根据所述量化系数块中指定区域内的量化系数的数值,对所述指定区域内的量化系数进行统计得到统计结果,包括:
    根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为偶数的量化系数的个数之和,将得到的和值作为所述统计结果;或
    根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为偶数的量化系数的数值之和,将得到的和值作为所述统计结果;或
    根据所述指定区域内的量化系数的数值,计算所述指定区域内数值为偶数的量化系数的绝对值之和,将得到的和值作为所述统计结果;或
    根据所述指定区域内的量化系数的数值,将所述指定区域内数值为奇数的量化系数的数值转换为第一数值,将数值为偶数的量化系数的数值转换为第二数值,计算所述指定区域内的量化系数在数值转换之后的偶数值之和,将得到的和值作为所述统计结果,其中,所述第一数值和所述第二数值中的一个为奇数,另一个为偶数。
  16. 根据权利要求1至15中任一项所述的视频解码方法,其中,所述指定区域包括以下任意一个:
    所述量化系数块中的全部区域;
    所述量化系数块中指定的一个位置或多个位置;
    所述量化系数块中指定的至少一行;
    所述量化系数块中指定的至少一列;
    所述量化系数块中指定的至少一行和指定的至少一列;
    所述量化系数块中处于至少一条斜线上的位置。
  17. 根据权利要求1至15中任一项所述的视频解码方法,其中,所述指定区域包括以下任意一个:
    所述量化系数块中的扫描区域系数编码SRCC区域;
    所述SRCC区域中指定的一个位置或多个位置;
    所述SRCC区域中指定的至少一行;
    所述SRCC区域中指定的至少一列;
    所述SRCC区域中指定的至少一行和指定的至少一列;
    所述SRCC区域中处于至少一条斜线上的位置。
  18. 根据权利要求17所述的视频解码方法,其中,所述SRCC区域中指定的一个位置或多个位置包括:按照扫描顺序的前N个位置,N为非0的自然数。
  19. 根据权利要求1至15中任一项所述的视频解码方法,其中,所述根据所述量化系数统计值决定是否跳过所述反变换处理过程,包括:
    若所述量化系数统计值是奇数,则决定跳过所述反变换处理过程,若所述量化系数统计值是偶数,则决定执行所述反变换处理过程;或
    若所述量化系数统计值是奇数,则决定执行所述反变换处理过程,若所述量化系数统计值是偶数,则决定跳过所述反变换处理过程。
  20. 根据权利要求1至15中任一项所述的视频解码方法,其中,所述根据所述量化系数统计值决定是否跳过所述反变换处理过程,包括:
    若所述量化系数统计值归属于第一数值集合,则决定跳过所述反变换处理过程,若所述量化系数统计值不归属于所述第一数值集合,决定执行所述反变换处理过程;或
    若所述量化系数统计值归属于所述第一数值集合,则决定执行所述反变换处理过程,若所述量化系数统计值不归属于所述第一数值集合,决定跳过所述反变换处理过程。
  21. 一种视频编码方法,其中,所述方法由电子设备执行,包括:
    对获取视频图像帧的编码块所需的残差数据跳过变换处理直接进行量化处理,得到所述残差数据的第一量化系数块;对所述残差数据依次进行变换处理和量化处理,得到所述残差数据的第二量化系数块;
    基于所述第一量化系数块,获取第三量化系数块,所述第三量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,所述第三量化系数块对应的量化系数统计值通过统计所述第三量化系数块中指定区域内的量化系数得到;
    基于所述第二量化系数块,获取第四量化系数块,所述第四量化系数块对应的量化系数统计值用于指示执行所述反变换处理过程,所述第四量化系数块对应的量化系数统计值通过统计所述第四量化系数块中指定区域内的量化系数得到;
    对所述第三量化系数块和所述第四量化系数块中满足选取条件的量化系数块进行熵编码处理,得到所述视频图像帧的编码块。
  22. 一种视频解码装置,其中,包括:
    解码单元,配置为对视频图像帧的编码块进行熵解码处理,获得所述编码块对应的残差数据的量化系数块;
    统计单元,配置为统计所述量化系数块中指定区域内的量化系数,得到量化系数统计值;
    决策单元,配置为根据所述量化系数统计值决定是否跳过所述反变换处理过程。
  23. 一种视频编码装置,其中,包括:
    处理单元,配置为对获取视频图像帧的编码块所需的残差数据跳过变换处理直接进行量化处理,得到所述残差数据的第一量化系数块;对所述残差数据依次进行变换处理和量化处理,得到所述残差数据的第二量化系数块;
    获取单元,配置为基于所述第一量化系数块,获取第三量化系数块,所述第三量化系数块对应的量化系数统计值用于指示跳过反变换处理过程,所述第三量化系数块对应的量化系数统计值通过统计所述第三量化系数块中指定区域内的量化系数得到;基于所述第二量化系数块,获取第四量化系数块,所述第四量化系数块对应的量化系数统计值用于指示执行所述反变换处理过程,所述第四量化系数块对应的量化系数统计值通过统计所述第四量化系数块中指定区域内的量化系数得到;
    所述处理单元,还配置为对所述第三量化系数块和所述第四量化系数块中满足选取条件的量化系数块进行熵编码处理,得到所述视频图像帧的编码块。
  24. 一种视频处理系统,其中,所述视频处理系统包括视频编码装置和视频解码装置,所述视频编码装置用于执行权利要求21所述的视频编码方法,所述视频解码装置用于执行权利要求1至20中任一项所述的视频解码方法。
  25. 一种非临时性计算机可读介质,所述非临时性计算机可读介质上存储有计算机程序,其中,所述计算机程序被处理器执行,以使计算机实现如权利要求1至20中任一项所述的视频解码方法,或者实现如权利要求21所述的视频编码方法。
  26. 一种电子设备,其中,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述电子设备实现如权利要求1至20中任一项所述的视频解码方法,或者实现如权利要求21所述的视频编码方法。
  27. 一种计算机程序,其中,所述计算机程序包括计算机指令,所述计算机指令存储在计算机可读存储介质中,计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,使得所述计算机设备实现如权利要求1至20中任一项所述的视频解码方法,或者实现如权利要求21所述的视频编码方法。
PCT/CN2021/112359 2020-08-21 2021-08-12 视频解码方法、视频编码方法、装置、介质及电子设备 WO2022037478A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022556027A JP7483029B2 (ja) 2020-08-21 2021-08-12 ビデオ復号方法、ビデオ符号化方法、装置、媒体、及び電子機器
KR1020227031426A KR20220134651A (ko) 2020-08-21 2021-08-12 비디오 디코딩 방법, 비디오 인코딩 방법, 장치, 매체, 및 전자 디바이스
EP21857573.6A EP4124045A4 (en) 2020-08-21 2021-08-12 VIDEO DECODING METHOD, VIDEO ENCODING METHOD, APPARATUS, MEDIUM AND ELECTRONIC DEVICE
US17/890,691 US20220394265A1 (en) 2020-08-21 2022-08-18 Video decoding method and apparatus, video coding method and apparatus, storage medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010855625.1 2020-08-21
CN202010855625.1A CN114079773B (zh) 2020-08-21 2020-08-21 视频解码方法、装置、计算机可读介质及电子设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/890,691 Continuation US20220394265A1 (en) 2020-08-21 2022-08-18 Video decoding method and apparatus, video coding method and apparatus, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2022037478A1 true WO2022037478A1 (zh) 2022-02-24

Family

ID=80282762

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/112359 WO2022037478A1 (zh) 2020-08-21 2021-08-12 视频解码方法、视频编码方法、装置、介质及电子设备

Country Status (5)

Country Link
US (1) US20220394265A1 (zh)
EP (1) EP4124045A4 (zh)
KR (1) KR20220134651A (zh)
CN (2) CN116112668A (zh)
WO (1) WO2022037478A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130343448A1 (en) * 2012-06-26 2013-12-26 Research In Motion Limited Modified coding for transform skipping
EP3484151A1 (en) * 2017-11-13 2019-05-15 Thomson Licensing Method and apparatus for generating quantization matrices in video encoding and decoding
CN110800296A (zh) * 2017-06-29 2020-02-14 索尼公司 图像处理装置、图像处理方法和程序
CN112533000A (zh) * 2020-10-16 2021-03-19 腾讯科技(深圳)有限公司 视频解码方法、装置、计算机可读介质及电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5741728B2 (ja) * 2010-12-09 2015-07-01 ソニー株式会社 画像処理装置及び画像処理方法
CN102447907A (zh) * 2012-01-31 2012-05-09 北京工业大学 一种针对hevc的视频序列的编码方法
CN111225206B (zh) * 2018-11-23 2021-10-26 华为技术有限公司 视频解码方法和视频解码器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130343448A1 (en) * 2012-06-26 2013-12-26 Research In Motion Limited Modified coding for transform skipping
CN110800296A (zh) * 2017-06-29 2020-02-14 索尼公司 图像处理装置、图像处理方法和程序
EP3484151A1 (en) * 2017-11-13 2019-05-15 Thomson Licensing Method and apparatus for generating quantization matrices in video encoding and decoding
CN112533000A (zh) * 2020-10-16 2021-03-19 腾讯科技(深圳)有限公司 视频解码方法、装置、计算机可读介质及电子设备

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HEIKO SCHWARZ: "BoG report on CE7-related and Non-CE7 contributions,", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11 15TH MEETING: GOTHENBURG, SE, 3–12 JULY 2019, 12 July 2019 (2019-07-12), XP030208293 *
See also references of EP4124045A4 *

Also Published As

Publication number Publication date
KR20220134651A (ko) 2022-10-05
CN114079773B (zh) 2022-12-27
US20220394265A1 (en) 2022-12-08
CN114079773A (zh) 2022-02-22
EP4124045A4 (en) 2023-10-25
CN116112668A (zh) 2023-05-12
JP2023520314A (ja) 2023-05-17
EP4124045A1 (en) 2023-01-25

Similar Documents

Publication Publication Date Title
WO2022078163A1 (zh) 视频解码方法、视频编码方法及相关装置
WO2022062880A1 (zh) 视频解码方法、装置、计算机可读介质及电子设备
WO2022063033A1 (zh) 视频解码方法、视频编码方法、装置、计算机可读介质及电子设备
WO2022078304A1 (zh) 视频解码方法、装置、计算机可读介质、程序及电子设备
WO2022174660A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
US20230053118A1 (en) Video decoding method, video coding method, and related apparatus
WO2022037478A1 (zh) 视频解码方法、视频编码方法、装置、介质及电子设备
WO2022037477A1 (zh) 视频解码方法、装置、计算机可读介质及电子设备
JP7483029B2 (ja) ビデオ復号方法、ビデオ符号化方法、装置、媒体、及び電子機器
WO2022174637A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2022174701A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
US20230077935A1 (en) Video Encoding Method and Apparatus, Video Decoding Method and Apparatus, Computer-Readable Medium, and Electronic Device
WO2022174638A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2022116854A1 (zh) 视频解码方法、装置、可读介质、电子设备及程序产品
WO2023130899A1 (zh) 环路滤波方法、视频编解码方法、装置、介质及电子设备
CN115209146A (zh) 视频编解码方法、装置、计算机可读介质及电子设备
CN115209141A (zh) 视频编解码方法、装置、计算机可读介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21857573

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20227031426

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2022556027

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021857573

Country of ref document: EP

Effective date: 20221021

NENP Non-entry into the national phase

Ref country code: DE