CN112565751B - Video decoding method and device, computer readable medium and electronic equipment - Google Patents
Video decoding method and device, computer readable medium and electronic equipment Download PDFInfo
- Publication number
- CN112565751B CN112565751B CN202011033990.0A CN202011033990A CN112565751B CN 112565751 B CN112565751 B CN 112565751B CN 202011033990 A CN202011033990 A CN 202011033990A CN 112565751 B CN112565751 B CN 112565751B
- Authority
- CN
- China
- Prior art keywords
- value
- coding
- block
- quantization coefficient
- header
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000013139 quantization Methods 0.000 claims abstract description 286
- 239000011159 matrix material Substances 0.000 claims abstract description 169
- 230000009466 transformation Effects 0.000 claims abstract description 57
- 238000012545 processing Methods 0.000 claims abstract description 28
- 238000013507 mapping Methods 0.000 claims description 17
- 230000008569 process Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 14
- 230000003247 decreasing effect Effects 0.000 claims description 6
- -1 DCT8 Proteins 0.000 claims description 4
- 101150089388 dct-5 gene Proteins 0.000 claims description 4
- 101150090341 dst1 gene Proteins 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 19
- 238000006243 chemical reaction Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000001914 filtration Methods 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 3
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/109—Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/80—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
- H04N19/82—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/86—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods 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/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The embodiment of the application provides a video decoding method, a video decoding device, a computer readable medium and electronic equipment. The video decoding method includes: entropy decoding a coding block of a video image frame to obtain a quantization coefficient block of residual error data corresponding to the coding block; counting the quantization coefficients in at least one region in the quantization coefficient block to obtain a statistical result, and calculating the remainder of the statistical result for a set value; selecting a corresponding transformation matrix combination according to the corresponding relation between the remainder and the transformation matrix combination; and performing inverse transform processing on the inverse quantization result of the quantization coefficient block based on the selected transform matrix combination. The technical scheme of the embodiment of the application can effectively improve the video coding efficiency.
Description
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a video decoding method and apparatus, a computer-readable medium, and an electronic device.
Background
In the video encoding process, an encoding end generally needs to transform, quantize, and entropy-encode residual data between original video data and predicted video data, and then send the residual data to a decoding end. Due to the diversity of residual data, a single DCT (Discrete Cosine Transform) Transform kernel cannot adapt to all residual characteristics, and therefore, for one residual block, it may be necessary to select a plurality of DCT Transform kernels or DST (Discrete Sine Transform) Transform kernels as a Transform matrix combination, in which case, although the adaptability of the Transform matrix combination to the residual block is improved, since an index of the Transform kernel needs to be encoded for each Coding Unit (CU), the encoding efficiency is low.
Disclosure of Invention
Embodiments of the present application provide a video decoding method, an apparatus, a computer-readable medium, and an electronic device, so that video encoding efficiency can be effectively improved at least to a certain extent.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a video decoding method including: entropy decoding a coding block of a video image frame to obtain a quantization coefficient block of residual error data corresponding to the coding block; counting the quantization coefficients in at least one region in the quantization coefficient block to obtain a statistical result, and calculating the remainder of the statistical result for a set value; selecting a corresponding transformation matrix combination according to the corresponding relation between the remainder and the transformation matrix combination; and performing inverse transform processing on the inverse quantization result of the quantization coefficient block based on the selected transform matrix combination.
According to an aspect of an embodiment of the present application, there is provided a video decoding apparatus including: the decoding unit is configured to perform entropy decoding processing on a coding block of a video image frame to obtain a quantization coefficient block of residual data corresponding to the coding block; the statistic unit is configured to count the quantization coefficients in at least one region in the quantization coefficient block to obtain a statistic result, and calculate the remainder of the statistic result for a set value; the selection unit is configured to select a corresponding transformation matrix combination according to the corresponding relation between the remainder and the transformation matrix combination; a processing unit configured to perform inverse transform processing on an inverse quantization result of the quantization coefficient block based on the selected transform matrix combination.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus further includes: a first determining unit, configured to determine, according to a value of a specified index identifier, that a target coding block in corresponding coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding, where the specified index identifier is included in at least one of: the video Coding method comprises a sequence header of first Coding data corresponding to a video image frame sequence, an image header of second Coding data corresponding to the video image frame, a slice header of third Coding data corresponding to a slice of the video image frame, and an LCU (Largest Coding Unit) header of fourth Coding data corresponding to an LCU (Largest Coding Unit) of the video image frame.
In some embodiments of the present application, based on the foregoing solution, the first determining unit is configured to determine that a target coding block in first coded data corresponding to one video image frame sequence needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in a sequence header of the first coded data is a first value.
In some embodiments of the present application, based on the foregoing solution, the first determining unit is configured to determine that a target coding block in second coded data corresponding to one video image frame needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in an image header of the second coded data is a first value.
In some embodiments of the present application, based on the foregoing scheme, the first determining unit is configured to determine that a target coding block in third encoded data corresponding to one slice of a video image frame needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in slice header information of the third encoded data is a first value.
In some embodiments of the present application, based on the foregoing scheme, the first determining unit is configured to determine that a target coding block in fourth encoded data corresponding to one LCU of a video image frame needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in LCU header information of the fourth encoded data is a first value.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus further includes: and the second determining unit is configured to determine whether the coding block needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding according to the relation between the size of the coding block and a preset threshold range.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus further includes: a third determining unit, configured to determine that a target coding block in first coded data corresponding to one video image frame sequence does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when an index identifier included in a sequence header of the first coded data is a first value; and when the index identifier contained in the sequence header is a second value and the index identifier contained in the image header of second encoded data corresponding to one video image frame in the video image frame sequence is a first value, determining that a target coding block in the second encoded data does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing solution, the third determining unit is further configured to determine that, when the index identifier included in the sequence header is a second value and the index identifier included in the image header is a second value, the target coding block in the second coded data needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that a target coding block in third coded data corresponding to one slice of the video image frame does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when an index included in the sequence header is identified as a second value, an index included in the image header is identified as a second value, and an index included in slice header information of the third coded data is identified as a first value.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that a target coding block in the third encoded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when an index identifier included in the sequence header is a second value, an index identifier included in the image header is a second value, and an index identifier included in the slice header information is a second value.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that, when the index contained in the sequence header is identified as the second value, the index contained in the image header is identified as the second value, the index contained in the slice header information is identified as the second value, and the index contained in the LCU header information of the fourth encoded data corresponding to one LCU of the slice is identified as the first value, a target coding block in the fourth encoded data does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that, when the index identifier included in the sequence header is a second value, the index identifier included in the image header is a second value, the index identifier included in the slice header information is a second value, and the index identifier included in the LCU header information is a second value, a target coding block in the fourth coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing solution, the third determining unit is further configured to determine, when the index identifier included in the sequence header is a second value, the index identifier included in the image header is a second value, the index identifier included in the slice header information is a second value, and the index identifier included in the LCU header information is a second value, whether each coding block needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding according to a relationship between a size of each coding block in the fourth coded data and a preset threshold range.
In some embodiments of the present application, based on the foregoing scheme, the target coding block is any one of: the coding block adopting the intra-frame coding mode, the coding block adopting the inter-frame coding mode and all the coding blocks in the corresponding coding data.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus further includes: a fourth determining unit, configured to determine, according to a value of a first indication bit and a value of a second indication bit included in a sequence header of first encoded data corresponding to one video image frame sequence, whether a coding block in an intra-frame coding mode and a coding block in an inter-frame coding mode in the first encoded data need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to a value of a first indicating bit and a value of a second indicating bit contained in an image header of second encoded data corresponding to one video image frame, respectively determining whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the second encoded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to a value of a first indicating bit and a value of a second indicating bit contained in slice header information of third coded data corresponding to a slice of a video image frame, respectively determining whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the third coded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to the value of a first indicating bit and the value of a second indicating bit contained in LCU header information of fourth coded data corresponding to one LCU of a video image frame, whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the fourth coded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding or not is determined respectively.
In some embodiments of the present application, based on the foregoing solution, the statistical unit is configured to: calculating the sum of the numerical values of the quantized coefficients in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of absolute values of the quantized coefficients in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of the values of the quantized coefficients with odd numbers in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of absolute values of the quantization coefficients with odd numerical values in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of the numerical values of the quantized coefficients with the numerical values being even numbers or non-zero even numbers in the at least one region, and taking the obtained sum as the statistical result; or
And calculating the sum of absolute values of the quantized coefficients with even or non-zero even values in the at least one region, and taking the obtained sum as the statistical result.
In some embodiments of the present application, based on the foregoing solution, the statistical unit is configured to: performing linear mapping on the numerical values of the quantized coefficients in the at least one region, calculating the sum of the numerical values or absolute values of the quantized coefficients in the at least one region after the linear mapping, and taking the obtained sum as the statistical result, wherein the linear mapping comprises:
converting the value of the quantized coefficient with the odd number in the at least one region into a first value, and converting the value of the quantized coefficient with the even number into a second value, wherein one of the first value and the second value is the odd number, and the other is the even number; or
Converting the value of the non-zero quantized coefficient in the at least one region into a third value, and converting the value of the quantized coefficient with the value of zero into a fourth value, wherein one of the third value and the fourth value is an odd number, and the other is an even number; or
Decreasing or increasing the value of the quantized coefficients within the at least one region by a fifth value; or
Multiplying or dividing the value of the quantized coefficients within the at least one region by a sixth value that is non-zero; or
Multiplying or dividing the value of the quantized coefficients within the at least one region by a non-zero even number.
In some embodiments of the present application, based on the foregoing, the at least one region comprises one or more of:
all regions in the block of quantized coefficients;
a specified location or locations in the block of quantized coefficients;
at least one row specified in the block of quantized coefficients;
at least one column specified in the block of quantized coefficients;
at least one row specified and at least one column specified in the block of quantized coefficients;
a position in the block of quantized coefficients on at least one diagonal line;
a SRCC (Scan Region Coefficient Coding) Region in the quantized Coefficient block;
a specified location or locations in the SRCC area;
at least one row specified in the SRCC area;
at least one column designated in the SRCC area;
at least one designated row and at least one designated column in the SRCC area;
and the SRCC area is positioned on at least one oblique line.
In some embodiments of the present application, based on the foregoing scheme, the one or more locations specified in the SRCC area include: the first N positions in the scanning order or the middle N positions in the scanning order, wherein N is a natural number which is not 0.
In some embodiments of the present application, based on the foregoing scheme, the remainder of the numeric value for a given value is used to indicate that the coding block has skipped the transform process.
In some embodiments of the present application, based on the foregoing scheme, the correspondence between the remainder and the combination of transformation matrices is preset based on a combination between DCT transformation kernels and/or DST transformation kernels according to a value of the remainder.
In some embodiments of the present application, based on the foregoing scheme, the transform matrix combination includes a combination of at least any one of DCT2, DCT5, DCT8, DST1, and DST 7.
According to an aspect of embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a video decoding method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the video decoding method as described in the above embodiments.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the video decoding method provided in the various alternative embodiments described above.
In the technical solutions provided in some embodiments of the present application, a statistical result is obtained by performing statistics on quantization coefficients in at least one region in a quantization coefficient block, and then a remainder of the statistical result is calculated for a set value, so as to select a corresponding transform matrix combination according to a correspondence between the remainder and the transform matrix combination, and perform inverse transform processing on an inverse quantization result of the quantization coefficient block based on the selected transform matrix combination, so that the transform matrix combination corresponding to a coding block can be implicitly indicated by the quantization coefficients in the quantization coefficient block, and a coding end is not required to encode indexes of transform matrices for each coding unit, so that bits occupied by transform matrix indexes are reduced, and further video coding efficiency can be effectively improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
fig. 2 is a schematic diagram showing the placement of a video encoding apparatus and a video decoding apparatus in a streaming system;
FIG. 3 shows a basic flow diagram of a video encoder;
FIG. 4 shows a scan area marked by the SRCC technique;
FIG. 5 shows a sequential schematic view of scanning a marked scan area;
FIG. 6 shows a flow diagram of a video decoding method according to an embodiment of the present application;
FIG. 7 illustrates a schematic diagram of a division of a designated area according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a manner of dividing a designated area according to an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a manner of dividing a designated area according to an embodiment of the present application;
FIG. 10 shows a block diagram of a video decoding apparatus according to an embodiment of the present application;
FIG. 11 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference herein to "a plurality" means two or more. "and/or" describe the association relationship of the associated objects, meaning that there may be three relationships, e.g., A and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture 100 includes a plurality of end devices that may communicate with each other over, for example, a network 150. For example, the system architecture 100 may include a first end device 110 and a second end device 120 interconnected by a network 150. In the embodiment of fig. 1, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.
For example, first terminal device 110 may encode video data (e.g., a stream of video pictures captured by terminal device 110) for transmission over network 150 to second terminal device 120, the encoded video data being transmitted as one or more encoded video streams, second terminal device 120 may receive the encoded video data from network 150, decode the encoded video data to recover the video data, and display the video pictures according to the recovered video data.
In one embodiment of the present application, the system architecture 100 may include a third end device 130 and a fourth end device 140 that perform bi-directional transmission of encoded video data, such as may occur during a video conference. For bi-directional data transmission, each of third end device 130 and fourth end device 140 may encode video data (e.g., a stream of video pictures captured by the end device) for transmission over network 150 to the other of third end device 130 and fourth end 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 decode the encoded video data to recover the video data, and may display a video picture on an accessible display device according to the recovered video data.
In the embodiment of fig. 1, the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 may be a server, a personal computer, and a smart phone, but the principles disclosed herein may not be limited thereto. Embodiments disclosed herein are applicable to laptop computers, tablet computers, media players, and/or dedicated video conferencing equipment. Network 150 represents any number of networks that communicate 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. The communication network 150 may exchange data in circuit-switched and/or packet-switched channels. The network may include a telecommunications network, a local area network, a wide area network, and/or the internet. For purposes of this application, the architecture and topology of the network 150 may be immaterial to the operation of the present disclosure, unless explained below.
In one embodiment of the present application, fig. 2 illustrates the placement of video encoding devices and video decoding devices in a streaming environment. The subject matter disclosed herein is equally applicable to other video-enabled applications including, for example, video conferencing, digital TV (television), storing compressed video on digital media including CDs, DVDs, memory sticks, and the like.
The streaming system may include an acquisition subsystem 213, and the acquisition subsystem 213 may include a video source 201, such as a digital camera, that creates an uncompressed video picture stream 202. In an embodiment, the video picture stream 202 includes samples taken by a digital camera. The video picture stream 202 is depicted as a thick line to emphasize a high data amount video picture stream compared to the encoded video data 204 (or the encoded video codestream 204), the video picture stream 202 can be processed by an electronic device 220, the electronic device 220 comprising a video encoding device 203 coupled to a video source 201. The video encoding device 203 may comprise hardware, software, or a combination of hardware and software to implement or embody aspects of the disclosed subject matter as described in greater detail below. The encoded video data 204 (or encoded video codestream 204) is depicted as a thin line compared to the video picture stream 202 to emphasize the lower data amount of the encoded video data 204 (or encoded video codestream 204), which may be stored on the streaming server 205 for future use. One or more streaming client subsystems, such as client subsystem 206 and client subsystem 208 in fig. 2, 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. Video decoding device 210 decodes incoming copies 207 of the encoded video data and generates an output video picture stream 211 that may be presented on a display 212 (e.g., a display screen) or another presentation device. In some streaming systems, encoded video data 204, video data 207, and video data 209 (e.g., video streams) may be encoded according to certain video encoding/compression standards. Examples of such standards include ITU-T H.265. In an embodiment, the Video Coding standard under development is informally referred to as next generation Video Coding (VVC), and the present application may be used in the context of the VVC standard.
It should be noted that electronic devices 220 and 230 may include other components not shown in the figures. For example, electronic device 220 may comprise a video decoding device, and electronic device 230 may also comprise a video encoding device.
In an embodiment of the present application, taking the international Video Coding Standard HEVC (High Efficiency Video Coding), VVC (scalable Video Coding), and the chinese national Video Coding Standard AVS (source Coding Standard) as examples, after a Video frame image is input, the Video frame image is divided into a plurality of non-overlapping processing units according to a block size, and each processing unit performs similar compression operation. This processing Unit is called a CTU (Coding Tree Unit), or LCU. The CTU can continue to perform finer partitioning further down to obtain one or more basic coding units CU, which are the most basic elements in a coding link. Some concepts when coding a CU are introduced below:
predictive Coding (Predictive Coding): the predictive coding includes intra-frame prediction and inter-frame prediction, and the original video signal is predicted by the selected reconstructed video signal to obtain a residual video signal. The encoding side needs to decide which predictive coding mode to select for the current CU and inform the decoding side. The intra-frame prediction means that a predicted signal comes from an already coded and reconstructed region in the same image; inter-prediction means that the predicted signal is from another picture (called a reference picture) than the current picture that has already been coded.
Transformation and Quantization (Transform & Quantization): the residual video signal is transformed into a Transform domain, called Transform coefficient, by DFT (Discrete Fourier Transform), DCT, and the like. The transform coefficients are further subjected to lossy quantization operations, losing certain information, so that the quantized signal is favorable for compressed representation. In some video coding standards, more than one transform mode may be selectable, so the encoding side also needs to select one of the transform modes for the current CU and inform the decoding side. The Quantization fineness is usually determined by a Quantization Parameter (QP), and the QP has a larger value, and a coefficient indicating a larger value range is quantized into the same output, so that larger distortion and lower code rate are usually brought; conversely, the QP value is smaller, and the coefficients representing a smaller value range will be quantized to the same output, thus usually causing less distortion and corresponding to a higher code rate.
Entropy Coding (Entropy Coding) or statistical Coding: and the quantized transform domain signal is subjected to statistical compression coding according to the frequency of each value, and finally, a compressed code stream of binarization (0 or 1) is output. Meanwhile, other information generated by encoding, such as a selected encoding mode, motion vector data, and the like, also needs to be entropy encoded to reduce the code rate. The statistical Coding is a lossless Coding method, which can effectively reduce the code rate required for expressing the same signal, and the common statistical Coding methods include Variable Length Coding (VLC) or context-based Binary Arithmetic Coding (CABAC).
Loop Filtering (Loop Filtering): the transformed and quantized signal is subjected to inverse quantization, inverse transformation and prediction compensation to obtain a reconstructed image. Compared with the original image, the reconstructed image has a different part of information from the original image due to the quantization effect, i.e., the reconstructed image is distorted (Distortion). Therefore, the reconstructed image may be filtered, for example, by a Filter such as Deblocking Filter (DB), SAO (Sample Adaptive Offset), or ALF (Adaptive Loop Filter), so as to effectively reduce the distortion degree generated by quantization. The above-described filtering operation is also referred to as loop filtering, i.e. a filtering operation within the coding loop, since these filtered reconstructed pictures will be used as references for subsequent coded pictures to predict future picture signals.
In one embodiment of the present application, fig. 3 shows a basic flow chart of a video encoder, in which intra prediction is taken as an example for illustration. Wherein the original image signal sk[x,y]And a predicted image signalPerforming difference operation to obtain a residual signal uk[x,y]Residual signal uk[x,y]Obtaining a quantized coefficient after transformation and quantization processing, wherein the quantized coefficient obtains a coded bit stream through entropy coding on one hand, and obtains a reconstructed residual signal u 'through inverse quantization and inverse transformation processing on the other hand'k[x,y]Predicting an image signalAnd reconstructed residual signal u'k[x,y]Superimposing the generated image signalsImage signalThe signal is input to an intra mode decision module and an intra prediction module for intra prediction processing on the one hand, and a reconstructed image signal s 'is output through loop filtering on the other hand'k[x,y]Reconstruction of the image Signal s'k[x,y]It can be used as the reference image of the next frame for motion estimation and motion compensated prediction. Then s 'based on the result of the motion compensation prediction'r[x+mx,y+my]And intra prediction resultsObtaining a predicted image signal of the next frameAnd continuing to repeat the process until the coding is completed.
In addition, since the residual signal has a high probability of concentrating non-zero coefficients in the quantized coefficient block after the transform and quantization processes in the left and upper regions of the block, and the right and lower regions of the block tend to be 0, the SRCC technique is introduced, by which the size SRx × SRy of the upper left region of the non-zero coefficients contained in each quantized coefficient block (size W × H) can be marked, where SRx is the abscissa of the rightmost non-zero coefficient in the quantized coefficient block, SRy is the ordinate of the bottommost non-zero coefficient in the quantized coefficient block, and 1 ≦ SRx ≦ W, 1 ≦ SRy ≦ H, and the coefficients outside the region are all 0. The SRCC technique uses (SRx, SRy) to determine the quantized coefficient region to be scanned in a quantized coefficient block, as shown in fig. 4, only the quantized coefficients in the (SRx, SRy) marked scan region need to be encoded, and the scanning order of the encoding may be from the bottom right corner to the top left corner, as shown in fig. 5, and may be a reverse zigzag scan.
Based on the above encoding process, after obtaining a compressed code stream (i.e., a bit stream) at a decoding end for each CU, entropy decoding is performed to obtain various mode information and quantization coefficients. And then, carrying out inverse quantization and inverse transformation on the quantized coefficient to obtain a residual signal. On the other hand, according to the known coding mode information, a prediction signal corresponding to the CU can be obtained, then a reconstructed signal can be obtained by adding the residual signal and the prediction signal, and the reconstructed signal is subjected to loop filtering and other operations to generate a final output signal.
In the above-mentioned encoding and decoding processes, the transform processing on the residual signal concentrates the energy of the residual signal on fewer low-frequency coefficients, i.e., most coefficient values are smaller. And then after subsequent quantization modules, the smaller coefficient value becomes a zero value, and the cost of coding a residual signal is greatly reduced. However, a single DCT transform cannot adapt to all residual characteristics due to the diversity of residual distributions, and thus transform kernels such as DST7 and DCT8 are introduced into the transform process, and different transform kernels may be employed for horizontal transform and vertical transform performed on residual signals. Taking AMT (Adaptive multiple core transform) technology as an example, transform combinations that may be selected for performing transform processing on a residual signal are as follows: (DCT 2), (DCT8, DCT8), (DCT8, DST7), (DST7, DCT8), and (DST7 ).
Specifically, which transform combination is selected for the residual signal needs to be decided at an encoding end by using RDO (Rate-Distortion Optimization), and although the adoption of a plurality of transform kernels improves the adaptability of the transform matrix combination to the residual block, the encoding efficiency is low because the index of the transform kernel needs to be encoded for each encoding unit.
In view of the above problems, embodiments of the present application propose to implicitly indicate a transform matrix combination corresponding to a coding block through a quantization coefficient in a quantization coefficient block, so as to reduce bits occupied by a transform matrix index and effectively improve video coding efficiency.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 6 shows a flow diagram of a video decoding method according to an embodiment of the present application, which may be performed by a device having a computing processing function, such as a terminal device or a server. Referring to fig. 6, the video decoding method at least includes steps S610 to S640, which are described in detail as follows:
in step S610, entropy decoding processing is performed on the coding block of the video image frame, and a quantization coefficient block of residual data corresponding to the coding block is obtained.
In one embodiment of the present application, a video image frame sequence includes a series of images, each of which may be further divided into slices (Slice), which may be further divided into a series of LCUs (or CTUs), where an LCU includes several CUs. Video image frames are encoded in units of blocks, and in some new video encoding standards, for example, in the h.264 standard, there are Macroblocks (MBs), which can be further divided into a plurality of prediction blocks (predictions) that can be used for prediction encoding. In the HEVC standard, basic concepts such as a coding unit CU, a Prediction Unit (PU), and a Transform Unit (TU) are used, and various block units are functionally divided and described using a brand-new tree-based structure. For example, a CU may be partitioned into smaller CUs according to a quadtree, and the smaller CUs may be further partitioned to form a quadtree structure. The coding block in the embodiment of the present application may be a CU, or a smaller block than the CU, such as a smaller block obtained by dividing the CU.
In step S620, the quantized coefficients in at least one region in the quantized coefficient block are counted to obtain a statistical result, and a remainder of the statistical result with respect to the set value is calculated.
In an embodiment of the present application, it may be determined, according to a value of a specified index identifier, whether a target coding block in corresponding coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding, where the specified index identifier may be included in at least one of: the video coding method comprises a sequence header of first coding data corresponding to a video image frame sequence, an image header of second coding data corresponding to the video image frame, a strip header of third coding data corresponding to a strip of the video image frame, and an LCU header of fourth coding data corresponding to a largest coding unit LCU of the video image frame. The detailed description is as follows:
in an embodiment of the present application, whether a target coding block in first coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding may be indicated by a value of a specified index flag included in a sequence header of the first coded data corresponding to one video image frame sequence, for example, if the value of the specified index flag in the sequence header of the first coded data is 1, it indicates that the target coding block in the first coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in the quantization coefficient block obtained by entropy decoding. The technical scheme of the embodiment enables the indication of all target coding blocks corresponding to the whole video image frame sequence to be realized through one index mark in the sequence header of the first coding data corresponding to the video image frame sequence, so that the bit occupied by the index mark can be effectively reduced, and the video coding efficiency is improved. It should be noted that: the target coding block in the first coding data may be all coding blocks in the first coding data, or may be a coding block in the first coding data that uses an intra-coding mode, or may also be a coding block in the first coding data that uses an inter-coding mode.
In an embodiment of the present application, whether a target coding block in second coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding may be indicated by a value of a specified index flag included in an image header of the second coded data corresponding to one video image frame, for example, if the value of the specified index flag in the image header of the second coded data is 1, it indicates that the target coding block in the second coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in the quantization coefficient block obtained by entropy decoding. The technical scheme of the embodiment enables the indication of all target coding blocks corresponding to the whole video image frame to be realized through one index mark in the image header of the second coded data corresponding to the video image frame, and can also reduce the bit occupied by the index mark and improve the video coding efficiency. It should be noted that: the target coding block in the second encoded data may be all coding blocks in the second encoded data, or may be a coding block in the second encoded data that uses an intra-coding mode, or may also be a coding block in the second encoded data that uses an inter-coding mode.
In an embodiment of the present application, whether a target coding block in the third encoded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding may be indicated by a value of a specified index flag included in a slice header of the third encoded data corresponding to one slice of the video image frame, for example, if the value of the specified index flag in the slice header of the third encoded data is 1, it indicates that the target coding block in the third encoded data needs to select a corresponding transform matrix combination according to a quantization coefficient in the quantization coefficient block obtained by entropy decoding. According to the technical scheme of the embodiment, the indication of all target coding blocks corresponding to the whole strip is realized through one index mark in the strip header of the third coded data corresponding to one strip of the video image frame, the bit occupied by the index mark can be reduced, and the video coding efficiency is improved. It should be noted that: the target coding block in the third coded data may be all coding blocks in the third coded data, or may be a coding block in the third coded data, which uses an intra-coding mode, or may also be a coding block in the third coded data, which uses an inter-coding mode.
In an embodiment of the present application, whether a target coding block in the fourth encoded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding may be indicated by a value of a specified index flag included in an LCU header of the fourth encoded data corresponding to one LCU of the video image frame, for example, if the value of the specified index flag in the LCU header of the fourth encoded data is 1, it indicates that the target coding block in the fourth encoded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding. The technical scheme of the embodiment enables the indication of all target coding blocks corresponding to the whole LCU to be realized through one index mark in the LCU header of the fourth coding data corresponding to one LCU of the video image frame, and can also reduce the bit occupied by the index mark and improve the video coding efficiency. It should be noted that: the target coding block in the fourth coding data may be all coding blocks in the fourth coding data, or may be a coding block in the fourth coding data, which uses an intra-coding mode, or may also be a coding block in the fourth coding data, which uses an inter-coding mode.
In an embodiment of the present application, it may also be determined whether the coding block needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding according to a relationship between a size of the coding block and a preset threshold range. For example, if the size of the coding block is small (e.g., smaller than a preset threshold), it may be determined that the coding block needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; conversely, if the size of the coding block is larger (e.g., larger than a predetermined threshold), it may be determined that the coding block does not need to select a corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding. The technical scheme of the embodiment can implicitly indicate whether to select the corresponding transformation matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding according to the size of the coding block, and does not need additional bits, so that the video coding efficiency can be improved.
In one embodiment of the present application, if an index contained in a sequence header of first encoded data corresponding to a sequence of video image frames is identified as a first value (for example, may be 0), it is determined that a target encoding block in the first encoded data does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding. If the index identifier included in the sequence header is a second value (for example, may be 1), the decision may be further made according to the index identifier included in the image header of the second encoded data corresponding to the video image frame in the video image frame sequence. It should be noted that: the target coding block in the first coding data may be all coding blocks in the first coding data, or may be a coding block in the first coding data that uses an intra-coding mode, or may also be a coding block in the first coding data that uses an inter-coding mode.
In an embodiment of the present application, if the index contained in the aforementioned sequence header is identified as a second value (for example, may be 1), and the index contained in the aforementioned image header is identified as a first value (for example, may be 0), it may be determined that the target coding block in the second encoded data does not need to select a corresponding transform matrix combination according to the quantized coefficients in the quantized coefficient block obtained by entropy decoding. If the index identifier included in the sequence header and the index identifier included in the image header are both a second value (for example, may be 1), it may be determined that the target coding block in the second coded data needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding, and in this case, the decision may not be made according to the sizes of the slice header, the LCU header, and the coding block. It should be noted that: the target coding block in the second encoded data may be all coding blocks in the second encoded data, or may be a coding block in the second encoded data that uses an intra-coding mode, or may also be a coding block in the second encoded data that uses an inter-coding mode.
Of course, in an embodiment of the present application, if the index identifier included in the foregoing sequence header and the index identifier included in the foregoing image header are both a second value (for example, may be 1), the decision may also be further made according to the index identifier included in the slice header of the third encoded data corresponding to the slice of the video image frame. For example, if the index flag included in the sequence header and the index flag included in the image header are both the second value, but the index flag included in the slice header information of the third encoded data corresponding to one slice is the first value (for example, may be 0), it may be determined that the target encoding block in the third encoded data does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. If the index identifier included in the sequence header, the index identifier included in the image header, and the index identifier included in the slice header are all second values (for example, may be 1), it may be determined that the target coding block in the third encoded data needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding, and in this case, the decision may not be made according to the sizes of the LCU header and the coding block. It should be noted that: the target coding block in the third coded data may be all coding blocks in the third coded data, or may be a coding block in the third coded data, which uses an intra-coding mode, or may also be a coding block in the third coded data, which uses an inter-coding mode.
Of course, in an embodiment of the present application, if 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), the decision may also be further made according to the index identifier included in the LCU header of the fourth encoding data corresponding to the LCU in the slice. For example, if the index flag included in the sequence header, the index flag included in the image header, and the index flag included in the slice header are all second values, but the index flag included in the LCU header information of the fourth encoded data corresponding to one LCU is a first value (for example, may be 0), it may be determined that the target coding block in the fourth encoded data does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. If the index flag contained in the sequence header, the index flag contained in the image header, the index flag contained in the slice header, and the index flag contained in the LCU header information are all second values (for example, may be 1), it may be determined that a target coding block in the fourth coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding, and in this case, a decision may not be made according to the size of the coding block. It should be noted that: the target coding block in the fourth coding data may be all coding blocks in the fourth coding data, or may be a coding block in the fourth coding data, which uses an intra-coding mode, or may also be a coding block in the fourth coding data, which uses an inter-coding mode.
Of course, in an embodiment of the present application, if the index identifier included in the foregoing sequence header, the index identifier included in the foregoing image header, the index identifier included in the foregoing slice header, and the index identifier included in the foregoing LCU header information are all second values (for example, may be 1), the decision may also be further made according to the size of the coding block. For example, if the index identifier included in the sequence header, the index identifier included in the image header, the index identifier included in the slice header, and the index identifier included in the LCU header information are all second values, but the size of a coding block is small (e.g., smaller than a predetermined threshold), it may be determined that the coding block needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; conversely, if the size of the coding block is larger (e.g., larger than a predetermined threshold), it may be determined that the coding block does not need to select a corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
In an embodiment of the present application, whether a corresponding transform matrix combination needs to be selected according to quantization coefficients in a quantization coefficient block obtained by entropy decoding may also be indicated by an indication bit for a coding block in an intra-coding mode and a coding block in an inter-coding mode in coded data. Specifically, the method comprises the following steps:
in an embodiment of the present application, it may be determined whether a coding block in an intra-frame coding mode and a coding block in an inter-frame coding mode in first coded data need to select a corresponding transform matrix combination according to quantization coefficients in a quantization coefficient block obtained by entropy decoding, respectively, according to a value of a first indication bit and a value of a second indication bit included in a sequence header of the first coded data corresponding to one video image frame sequence. For example, when the value of the first indicator bit included in the sequence header of the first encoded data is 0, it indicates that the coding block adopting the intra-frame coding mode in the first encoded data does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; when the value of a first indicating bit contained in the sequence header of the first coded data is 1, indicating that a coding block adopting an intra-frame coding mode in the first coded data needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; when the value of a second indicating bit contained in the sequence header of the first coded data is 0, the coding block adopting the inter-frame coding mode in the first coded data does not need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; when the value of the second indication bit included in the sequence header of the first encoded data is 1, it indicates that the coding block adopting the inter-coding mode in the first encoded data needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding.
In an embodiment of the present application, whether a coding block in an intra-frame coding mode and a coding block in an inter-frame coding mode in second coded data need to select a corresponding transform matrix combination according to quantization coefficients in a quantization coefficient block obtained by entropy decoding may be determined according to a value of a first indication bit and a value of a second indication bit included in an image header of the second coded data corresponding to one video image frame. For example, when the value of the first indicator bit included in the image header of the second encoded data is 0, it indicates that the coding block adopting the intra-frame coding mode in the second encoded data does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; when the value of a first indicating bit contained in the image header of the second coded data is 1, indicating that a coding block adopting an intra-frame coding mode in the second coded data needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; when the value of a second indicating bit contained in the image header of the second coded data is 0, the coding block adopting the inter-frame coding mode in the second coded data does not need to select a corresponding transformation matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; when the value of the second indication bit included in the image header of the second encoded data is 1, it indicates that the coding block adopting the inter-coding mode in the second encoded data needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding.
In an embodiment of the application, according to a value of a first indication bit and a value of a second indication bit contained in slice header information of third encoded data corresponding to a slice of a video image frame, whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the third encoded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding is determined respectively. For example, when the value of the first indicator bit included in the slice header of the third encoded data is 0, it indicates that the coding block adopting the intra-frame coding mode in the third encoded data does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; when the value of a first indicating bit contained in the head of a strip of the third coded data is 1, indicating that a coding block adopting an intra-frame coding mode in the third coded data needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; when the value of a second indicating bit contained in the head of the strip of the third coded data is 0, the coding block adopting the inter-frame coding mode in the third coded data does not need to select a corresponding transformation matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; and when the value of a second indicating bit contained in the slice header of the third encoded data is 1, the coding block adopting the inter-frame coding mode in the third encoded data is indicated to select a corresponding transformation matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding.
In an embodiment of the present application, according to a value of a first indication bit and a value of a second indication bit included in LCU header information of fourth encoded data corresponding to one LCU of a video image frame, whether a coding block in an intra-frame coding mode and a coding block in an inter-frame coding mode in the fourth encoded data need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding is determined, respectively. For example, when the value of the first indicator bit included in the LCU header of the fourth encoded data is 0, it indicates that the coding block adopting the intra-frame coding mode in the fourth encoded data does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; when the value of a first indicating bit contained in the LCU header of the fourth coded data is 1, indicating that a coding block adopting an intra-frame coding mode in the fourth coded data needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; when the value of a second indicating bit contained in the LCU header of the fourth coded data is 0, the LCU header of the fourth coded data indicates that a coding block adopting an inter-frame coding mode in the fourth coded data does not need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; and when the value of a second indicating bit contained in the LCU header of the fourth coded data is 1, the LCU header indicates that a coding block adopting an inter-frame coding mode in the fourth coded data needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding.
It should be noted that: when the coding block in the intra coding mode and the coding block in the inter coding mode respectively indicate whether the corresponding transform matrix combination needs to be selected according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding, a scheme similar to that in the foregoing embodiment may also be adopted, in which the decision is jointly made by the indication bits in the sequence header and the image header, or by the indication bits in the sequence header, the image header, and the slice header, or by the indication bits in the sequence header, the image header, the slice header, and the LCU header, or by the indication bits in the sequence header, the image header, the slice header, the LCU header, and the size of the coding block.
In summary, when determining whether a transform matrix combination corresponding to a coding block needs to be selected according to a quantization coefficient in a quantization coefficient block, there are the following ways:
1. it is only indicated by the index identification in the aforementioned sequence header that the decision is no longer made by the size of the picture header, slice header, LCU header and coding block. At this time, the index flag in the sequence header is 1 (the numerical value is merely an example), which indicates that the target coding block in the first coded data corresponding to the video image frame sequence needs to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the first coding data may be all coding blocks in the first coding data, or may be a coding block in the first coding data that uses an intra-coding mode, or may also be a coding block in the first coding data that uses an inter-coding mode.
In addition, the coding block using the intra coding mode and the coding block using the inter coding mode in the first coded data corresponding to the video image frame sequence may be indicated by only the indication bit in the sequence header. That is, the sequence header includes two indication bits, one indication bit is used to indicate whether the coding block in the intra-frame coding mode in the first coded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding, and the other indication bit is used to indicate whether the coding block in the inter-frame coding mode in the first coded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
2. It is only indicated by the index identification in the aforementioned picture header, and the decision is no longer made by the size of the sequence header, slice header, LCU header and coding block. At this time, the index flag in the picture header is 1 (the numerical value is merely an example), which indicates that the target coding block in the second encoded data corresponding to the video image frame needs to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the second encoded data may be all coding blocks in the second encoded data, or may be a coding block in the second encoded data that uses an intra-coding mode, or may also be a coding block in the second encoded data that uses an inter-coding mode.
In addition, the coding block using the intra coding mode and the coding block using the inter coding mode in the second coded data corresponding to the video image frame may be indicated by only the indication bit in the image header. That is, the image header includes two indication bits, one of which is used to indicate whether the coding block in the intra-frame coding mode in the second coded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding, and the other of which is used to indicate whether the coding block in the inter-frame coding mode in the second coded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
3. It is only indicated by the index identification in the aforementioned slice header, and the decision is no longer made by the size of the sequence header, the picture header, the LCU header and the coding block. At this time, the index flag in the slice header is 1 (the numerical value is merely an example), which indicates that the target coding block in the third encoded data corresponding to the slice needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the third coded data may be all coding blocks in the third coded data, or may be a coding block in the third coded data, which uses an intra-coding mode, or may also be a coding block in the third coded data, which uses an inter-coding mode.
In addition, the coding block using the intra coding mode and the coding block using the inter coding mode in the third coded data corresponding to the slice may be indicated by only the indication bit in the slice header. That is, the slice header includes two indication bits, one of which is used to indicate whether the coding block in the intra-frame coding mode in the third encoded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding, and the other of which is used to indicate whether the coding block in the inter-frame coding mode in the third encoded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
4. It is only indicated by the index identification in the aforementioned LCU header, and the decision is no longer made by the size of the sequence header, the picture header, the slice header, and the coding block. At this time, the index flag in the LCU header is 1 (the numerical value is merely an example), which means that the target coding block in the fourth encoded data corresponding to the LCU needs to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the fourth coding data may be all coding blocks in the fourth coding data, or may be a coding block in the fourth coding data, which uses an intra-coding mode, or may also be a coding block in the fourth coding data, which uses an inter-coding mode.
In addition, the coding block using the intra coding mode and the coding block using the inter coding mode in the fourth coded data corresponding to the LCU may be indicated by only the indication bit in the LCU header. That is, the LCU header includes two indication bits, one indication bit is used to indicate whether the coding block in the intra-frame coding mode in the fourth coded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding, and the other indication bit is used to indicate whether the coding block in the inter-frame coding mode in the fourth coded data needs to select the corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
5. Implicit indication is only by the size of the coding block, no decision is made anymore by the sequence header, the picture header, the slice header and the LCU header. At this time, if the size of the coding block is small (if the size is smaller than a preset threshold), it may be determined that the coding block needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; conversely, if the size of the coding block is larger (e.g., larger than a predetermined threshold), it may be determined that the coding block does not need to select a corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding.
6. Indicated by the index identification in the aforementioned sequence header and the index identification in the picture header, the decision is no longer made by the size of the slice header, LCU header and coding block. At this time, if the index flag in the sequence header and the index flag in the image header are both 1 (numerical values are merely examples), it indicates that the target coding block in the second encoded data corresponding to the video image frame needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; if the index flag in the sequence header is 1 and the index flag in the image header is 0 (the numerical value is merely an example), it means that the target coding block in the second encoded data corresponding to the video image frame does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the second encoded data may be all coding blocks in the second encoded data, or may be a coding block in the second encoded data that uses an intra-coding mode, or may also be a coding block in the second encoded data that uses an inter-coding mode.
7. Indicated by the index flag in the aforementioned sequence header, the index flag in the picture header, and the index flag in the slice header, the decision is no longer made by the size of the LCU header and the coding block. At this time, if the index flag in the sequence header, the index flag in the image header, and the index flag in the slice header are all 1 (numerical values are merely examples), it is described that the target coding block in the third encoded data corresponding to the slice needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; if the index flag in the sequence header and the index flag in the picture header are 1, and the index flag in the slice header is 0 (the numerical values are merely examples), it means that the target coding block in the third encoded data corresponding to the slice does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the third coded data may be all coding blocks in the third coded data, or may be a coding block in the third coded data, which uses an intra-coding mode, or may also be a coding block in the third coded data, which uses an inter-coding mode.
8. Indicated by the index flag in the aforementioned sequence header, the index flag in the picture header, the index flag in the slice header, and the index flag in the LCU header, the decision is no longer made by the size of the coding block. At this time, if the index flag in the sequence header, the index flag in the image header, the index flag in the slice header, and the index flag in the LCU header are all 1 (numerical values are merely examples), it indicates that the target coding block in the fourth encoded data corresponding to the LCU needs to select a corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding; if the index flag in the sequence header, the index flag in the picture header, and the index flag in the slice header are 1, and the index flag in the LCU header is 0 (numerical values are merely examples), it means that the target coding block in the fourth coded data corresponding to the LCU does not need to select the corresponding transform matrix combination according to the quantization coefficient in the entropy-decoded quantization coefficient block. It should be noted that: the target coding block in the fourth coding data may be all coding blocks in the fourth coding data, or may be a coding block in the fourth coding data, which uses an intra-coding mode, or may also be a coding block in the fourth coding data, which uses an inter-coding mode.
9. The decision is made by the index flag in the sequence header, the index flag in the picture header, the index flag in the slice header, the index flag in the LCU header, and the size of the coding block as described above. At this time, if the index flag in the sequence header, the index flag in the picture header, the index flag in the slice header, and the index flag in the LCU header are all 1 (numerical values are merely examples), and the size of the coding block is smaller than a set threshold, it indicates that the coding block needs to select a corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding; if the index flag in the sequence header, the index flag in the picture header, the index flag in the slice header, and the index flag in the LCU header are all 1, but the size of the coding block is larger than the set threshold, it means that the coding block does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding.
Of course, the following may also be used:
10. indicated by the index flag in the aforementioned picture header and the index flag in the slice header, the decision is no longer made by the size of the sequence header, LCU header and coding block. At this time, if the index flag in the picture header and the index flag in the slice header are both 1 (the numerical values are merely examples), it is described that the target coding block in the third encoded data corresponding to the slice needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; if the index flag in the picture header is 1 and the index flag in the slice header is 0 (the numerical values are merely examples), it means that the target coding block in the third encoded data corresponding to the slice does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the third coded data may be all coding blocks in the third coded data, or may be a coding block in the third coded data, which uses an intra-coding mode, or may also be a coding block in the third coded data, which uses an inter-coding mode.
11. Indicated by the index flag in the aforementioned picture header, the index flag in the slice header, and the index flag in the LCU header, the decision is no longer made by the sequence header, the size of the coding block. At this time, if the index flag in the picture header, the index flag in the slice header, and the index flag in the LCU header are all 1 (numerical values are merely examples), it is described that the target coding block in the fourth encoded data corresponding to the LCU needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding; if the index flag in the picture header and the index flag in the slice header are 1, and the index flag in the LCU header is 0 (numerical values are merely examples), it means that the target coding block in the fourth encoded data corresponding to the LCU does not need to select the corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding. It should be noted that: the target coding block in the fourth coding data may be all coding blocks in the fourth coding data, or may be a coding block in the fourth coding data, which uses an intra-coding mode, or may also be a coding block in the fourth coding data, which uses an inter-coding mode.
12. And 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 the decision is not made through the sequence header any more. At this time, if the index flag in the picture header, the index flag in the slice header, and the index flag in the LCU header are all 1 (numerical values are merely examples), and the size of the coding block is smaller than the set threshold, it indicates that the coding block needs to select a corresponding transform matrix combination according to the quantization coefficients in the quantization coefficient block obtained by entropy decoding; if the index flag in the picture header, the index flag in the slice header, and the index flag in the LCU header are all 1, but the size of the coding block is larger than the set threshold, it means that the coding block does not need to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding.
In addition, in the embodiments of the present application, there are other indication manners, which are not described in detail.
In an embodiment of the present application, the counting of the quantized coefficients in at least one region of the block of quantized coefficients is performed by counting the quantized coefficients in the at least one region together, and finally to a statistical result, specifically: the sum of the values of the quantized coefficients in the at least one region may be calculated, and the resulting sum is taken as a statistical result; or the sum of the absolute values of the quantized coefficients in the at least one region may be calculated, and the resulting sum is taken as a statistical result; or the sum of the values of the quantized coefficients with odd numbers in the at least one region can be calculated, and the obtained sum is used as a statistical result; or calculating the sum of absolute values of the quantized coefficients with odd numbers in the at least one region, and taking the obtained sum as a statistical result; or the sum of the values of the quantized coefficients with the even or non-zero even values in the at least one region can be calculated, and the obtained sum is used as a statistical result; or the sum of the absolute values of the quantized coefficients with even or non-zero even values in the at least one region may be calculated, and the obtained sum is used as a statistical result.
In one embodiment of the present application, when the quantized coefficients in at least one region in the quantized coefficient block are counted, the values of the quantized coefficients in the at least one region may be linearly mapped, and then the sum of the values or absolute values of the quantized coefficients in the at least one region after the linear mapping is calculated, and the obtained sum is used as a statistical result.
In an embodiment of the present application, the linear mapping may be to convert the values of the quantized coefficients with odd numbers in the at least one region into a first value and convert the values of the quantized coefficients with even numbers into a second value, where one of the first value and the second value is an odd number and the other is an even number. For example, the value of the quantized coefficient with the odd number in the at least one region is converted into 1, and the value of the quantized coefficient with the even number is converted into 0; or converting the value of the quantized coefficient with the odd number in the at least one region into 0, and converting the value of the quantized coefficient with the even number into 1; or converting the value of the quantized coefficient with the odd number in the at least one region into 3, and converting the value of the quantized coefficient with the even number into 2; or converting the value of the quantized coefficient with the odd number in the at least one region into 2, and converting the value of the quantized coefficient with the even number into 3.
In an embodiment of the present application, the linear mapping may be to convert the value of the non-zero quantized coefficient in the at least one region into a third value and convert the value of the quantized coefficient having a value of zero into a fourth value, where one of the third value and the fourth value is an odd number and the other is an even number. For example, the value of the non-zero quantized coefficient in the at least one region is converted to 1, and the value of the quantized coefficient having a value of zero is converted to 0; or converting the value of the non-zero quantized coefficient in the at least one region into 0, and converting the value of the quantized coefficient with the value of zero into 1; or converting the value of the non-zero quantized coefficient in the at least one region into 3, and converting the value of the quantized coefficient with the value of zero into 2; or converting the value of the non-zero quantized coefficient in the at least one region to 2 and the value of the quantized coefficient having a value of zero to 3.
In an embodiment of the present application, the linear mapping may be to reduce the value of the quantized coefficients in the at least one region by a fifth value. Such as decreasing the value of the quantized coefficients in the at least one region by 1, or by 2.
In an embodiment of the present application, the linear mapping may be to increase the value of the quantized coefficient in the at least one region by a value. Such as increasing the value of the quantized coefficients in the at least one region by 1, or by 2.
In an embodiment of the present application, the linear mapping may be a sixth value that is not zero multiplied by the value of the quantized coefficient in the at least one region. Such as multiplying the values of the quantized coefficients within the at least one region by 1 or by 2. Alternatively, the sixth value may be a non-zero even number, such as 2, 4, 6, etc.
In an embodiment of the present application, the linear mapping may be dividing a value of the quantized coefficient in the at least one region by a value other than zero. Such as dividing the values of the quantized coefficients in the at least one region by 1, or by 2. Alternatively, the value may be a non-zero even number, such as 2, 4, 6, etc.
In an embodiment of the present application, the linear mapping may be to convert the values of the quantized coefficients in the at least one region into opposite numbers.
In one embodiment of the present application, after the statistical result is obtained by counting the quantized coefficients in at least one region in the quantized coefficient block, when the remainder of the statistical result with respect to the set value is calculated, the set value may be any non-zero number, such as 2, 3, 4, and the like.
In summary, the embodiments of the present application may perform statistics on quantized coefficients in at least one region in a quantized coefficient block in the following manner:
1. directly summing the values of the quantized coefficients within the at least one region;
2. summing the absolute values of the quantized coefficients in the at least one region;
3. directly summing the values of the odd-numbered quantized coefficients in the at least one region;
4. summing the absolute values of the quantized coefficients having odd values in the at least one region;
5. directly summing the values of quantized coefficients having an even or non-zero even value in the at least one region;
6. summing the absolute values of the quantized coefficients having even or non-zero even values in the at least one region;
7. firstly, performing numerical value conversion on odd numbers and even numbers according to the parity of the quantized coefficients in the at least one region, and then summing all the converted numerical values in the at least one region;
8. firstly, carrying out numerical value conversion on odd numbers and even numbers according to the parity of the quantized coefficients in the at least one region, and then summing absolute values of all converted numerical values in the at least one region;
9. firstly, carrying out numerical value conversion according to the non-zero quantized coefficient and the quantized coefficient with the numerical value of zero in the at least one region, and then summing all the converted numerical values in the at least one region;
10. firstly, carrying out numerical value conversion according to the non-zero quantized coefficient and the quantized coefficient with the numerical value being zero in the at least one region, and then summing absolute values of all converted numerical values in the at least one region;
11. firstly, performing numerical value conversion operations such as increasing, decreasing, multiplying by a non-zero multiple, dividing by the non-zero multiple or calculating the opposite number on all the quantized coefficients in the at least one region, and then summing all the converted numerical values in the at least one region;
12. the method comprises the steps of firstly carrying out numerical value conversion operations such as increasing, decreasing, multiplying by a non-zero multiple, dividing by a non-zero multiple or solving the opposite number on all quantized coefficients in at least one region, and then summing absolute values of all converted numerical values in at least one region.
Of course, there may be other ways, such as first performing numerical conversion on the quantized coefficients in the at least one region by the aforementioned conversion method in 7 to 12, and then summing only the converted odd or even numbers, etc.
In one embodiment of the present application, the at least one region may be all regions in the quantized coefficient block.
In one embodiment of the present application, the at least one region may be a position or positions specified in the quantized coefficient block.
In one embodiment of the present application, the at least one region may be at least one line designated in the quantized coefficient block. Assuming that the quantized coefficient block is a 4 × 4 coefficient block, each square representing one quantized coefficient, as shown in fig. 7, 1 line of a gray area may be taken as the at least one area, as shown in (a) of fig. 7; or 2 lines of the gray area may be taken as the at least one area as shown in (b) of fig. 7. Alternatively, the at least one row may be an upper row of the quantized coefficient block.
In one embodiment of the present application, the at least one region may be at least one column designated in the quantized coefficient block. Assuming that the quantized coefficient block is a 4 × 4 coefficient block, each square representing one quantized coefficient, as shown in fig. 7, 1 column of a gray area may be taken as the at least one area, as shown in (c) of fig. 7; alternatively, as shown in fig. 7 (d), 2 columns of the gray area may be used as the at least one area. Alternatively, the at least one column may be a left-most column in the quantized coefficient block.
In one embodiment of the present application, the at least one region may be at least one row designated and at least one column designated in the quantized coefficient block. Assuming that the quantized coefficient block is a 4 × 4 coefficient block, each square block represents a quantized coefficient, as shown in fig. 8 (a), the lower 1 row and the right 1 column (i.e., a gray area therein) may be taken as the at least one area, as shown in fig. 8 (a); or, as shown in fig. 8 (b), the lower 2 rows and the right 2 columns (i.e., the gray areas therein) can be used as the at least one area; or, as shown in fig. 8 (c), the upper 1 row and the left 1 column (i.e., the gray area therein) may be used as the at least one area; or, as shown in fig. 8 (d), the upper 2 rows and the left 2 columns (i.e., the gray areas therein) may be used as the at least one area.
In one embodiment of the present application, the at least one region may be a position on at least one oblique line in the quantized coefficient block. Assuming that the quantized coefficient block is a 4 × 4 coefficient block, each square block represents a quantized coefficient, as shown in fig. 9, the position on an oblique line may be taken as the at least one region as shown in (a) and (b) in 9; alternatively, as shown in (c) and (d) of fig. 9, the positions on the two oblique lines are defined as the at least one region.
In one embodiment of the present application, the at least one region may be an SRCC region in the quantized coefficient block. Wherein, the SRCC area is a scanning area marked by the SRCC technology.
In one embodiment of the present application, the at least one area may be a designated location or locations in the SRCC area. Optionally, the one or more locations specified in the SRCC area may include: the first N positions in the scanning order or the middle N positions in the scanning order may be the last N positions in the scanning order, and N is a natural number other than 0.
In one embodiment of the present application, the at least one area may be at least one row designated in the SRCC area. Assuming that the SRCC area is a 4 × 4 block of coefficients, each square representing a quantized coefficient, as shown in fig. 7, 1 line of the gray area may be taken as the at least one area, as shown in (a) of fig. 7; or 2 lines of the gray area may be taken as the at least one area as shown in (b) of fig. 7. Alternatively, the at least one row may be an upper row of the quantized coefficient block.
In one embodiment of the present application, the at least one area may be at least one column designated in the SRCC area. Assuming that the SRCC area is a 4 × 4 block of coefficients, each square representing a quantized coefficient, as shown in fig. 7, 1 column of the gray area may be taken as the at least one area, as shown in (c) of fig. 7; alternatively, as shown in fig. 7 (d), 2 columns of the gray area may be used as the at least one area. Alternatively, the at least one column may be a left-most column in the quantized coefficient block.
In one embodiment of the present application, the at least one region may be at least one row designated and at least one column designated in the SRCC region. Assuming that the SRCC area is a 4 × 4 block of coefficients as shown in fig. 8, and each square represents a quantized coefficient, the at least one area may be 1 row below and 1 column to the right (i.e., a gray area therein) as shown in (a) of fig. 8; or, as shown in fig. 8 (b), the lower 2 rows and the right 2 columns (i.e., the gray areas therein) can be used as the at least one area; or, as shown in fig. 8 (c), the upper 1 row and the left 1 column (i.e., the gray area therein) may be used as the at least one area; or, as shown in fig. 8 (d), the upper 2 rows and the left 2 columns (i.e., the gray areas therein) may be used as the at least one area.
In an embodiment of the present application, the at least one region may be a location in the SRCC region on at least one oblique line. Assuming that the SRCC area is a 4 × 4 block of coefficients as shown in fig. 9, each square block represents a quantized coefficient, a position on an oblique line may be taken as the at least one area as shown in (a) and (b) in fig. 9; alternatively, as shown in (c) and (d) of fig. 9, the positions on the two oblique lines are defined as the at least one region.
In other embodiments of the present application, at least one of the area dividing manners in the above embodiments may be combined, and the combined area may be used as the at least one area.
As shown in fig. 6, in step S630, a corresponding transformation matrix combination is selected according to the correspondence between the remainder and the transformation matrix combination.
In one embodiment of the present application, for example, when the setting value is set to 3 when calculating the remainder, then 3 remainders (i.e., 0, 1, 2) may respectively correspond to different transformation matrix combinations; if the setting value is set to 5, then the 5 remainders (i.e., 0, 1, 2, 3, 4) may correspond to different transform matrix combinations, respectively. Therefore, the technical scheme of the embodiment of the application can realize index indication of various transformation matrix combinations, and can effectively reduce the bit occupied by the transformation matrix indexes.
It should be noted that, in the embodiment of the present application, the combination of transformation matrices corresponding to different numbers of residuals may be different. Of course, the transformation matrix combinations corresponding to different numbers of residuals may also be the same, but the possible results of the residuals may not all correspond to the same transformation matrix combination.
Alternatively, the transform kernels employed by the transform matrix combination may be any combination of known discrete transform kernels (8 DCT transform kernels and 8 DST transform kernels). For example, the optional transformation kernel may include: DCT2, DCT5, DCT8, DST1, DST7, and the like.
In an embodiment of the present application, a correspondence between the remainder and the combination of the transform matrices may be preset based on a combination between the DCT transform kernel and/or the DST transform kernel according to a value of the remainder. Optionally, the transform matrix combination comprises a combination of any at least one of DCT2, DCT5, DCT8, DST1, DST 7. More specifically, for example, if the aforementioned set value is 5, the following correspondence relationship may be set: the corresponding transform matrix combination when the remainder is 0 may be (DCT2 ); the corresponding transform matrix combination when the remainder is 1 may be (DCT8 ); the corresponding transform matrix combination with remainder 2 may be (DCT8, DST 7); the corresponding transform matrix combination with remainder 3 may be (DST7, DCT 8); the corresponding transform matrix combination with remainder 4 may be (DST7 ).
In one embodiment of the present application, the coding block may also be indicated by some value of the remainder to skip the transform process. For example, a value of some remainder indicates that the corresponding transform matrix combination is null (or TS), which indicates that the coding block has skipped the transform process. For example, if the aforementioned setting value is 5, the corresponding transform matrix combination with the remainder being 0 may be (DCT2 ); the corresponding transform matrix combination when the remainder is 1 may be (DCT8 ); the corresponding transform matrix combination with remainder 2 may be (DCT8, DST 7); the corresponding transform matrix combination with remainder 3 may be (DST7, DCT 8); the corresponding transform matrix combination with a remainder of 4 may be a null value (or TS) to indicate that the coding block skips the transform process, in which case the quantized coefficient block may be directly subjected to inverse quantization and then the result of inverse quantization may be used as reconstructed residual data without performing inverse transform on the result of inverse quantization. It should be noted that the remainder for indicating that the coding block skips the transform process may be set according to actual needs, and 4 in this embodiment is merely an example.
As shown with continued reference to fig. 6, in step S640, inverse transform processing is performed on the inverse quantization result of the quantized coefficient block based on the selected transform matrix combination. The process may refer to the related description in the foregoing embodiments, and is not repeated.
According to the technical scheme of the embodiment of the application, the transformation matrix combination corresponding to the coding block can be implicitly indicated through the quantization coefficients in the quantization coefficient block, the coding end does not need to code the index of the transformation matrix aiming at each coding unit, the bit occupied by the transformation matrix index is reduced, and the video coding efficiency can be effectively improved.
The following describes embodiments of the apparatus of the present application, which can be used to perform the video decoding method in the above embodiments of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the video decoding method described above in the present application.
Fig. 10 shows a block diagram of a video decoding apparatus according to an embodiment of the present application, which may be disposed in a device having a calculation processing function, such as a terminal device or a server.
Referring to fig. 10, a video decoding apparatus 1000 according to an embodiment of the present application includes: a decoding unit 1002, a statistics unit 1004, a selection unit 1006 and a processing unit 1008.
The decoding unit 1002 is configured to perform entropy decoding processing on a coding block of a video image frame to obtain a quantization coefficient block of residual data corresponding to the coding block; the statistic unit 1004 is configured to count the quantized coefficients in at least one region in the quantized coefficient block to obtain a statistic result, and calculate a remainder of the statistic result for a set value; the selecting unit 1006 is configured to select a corresponding transformation matrix combination according to a correspondence between the remainder and the transformation matrix combination; the processing unit 1008 is configured to inverse transform the inverse quantization result of the quantized coefficient block based on the selected transform matrix combination.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus 1000 further includes: a first determining unit, configured to determine, according to a value of a specified index identifier, that a target coding block in corresponding coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding, where the specified index identifier is included in at least one of: the video Coding method comprises a sequence header of first Coding data corresponding to a video image frame sequence, an image header of second Coding data corresponding to the video image frame, a slice header of third Coding data corresponding to a slice of the video image frame, and an LCU (Largest Coding Unit) header of fourth Coding data corresponding to an LCU (Largest Coding Unit) of the video image frame.
In some embodiments of the present application, based on the foregoing solution, the first determining unit is configured to determine that a target coding block in first coded data corresponding to one video image frame sequence needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in a sequence header of the first coded data is a first value.
In some embodiments of the present application, based on the foregoing solution, the first determining unit is configured to determine that a target coding block in second coded data corresponding to one video image frame needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in an image header of the second coded data is a first value.
In some embodiments of the present application, based on the foregoing scheme, the first determining unit is configured to determine that a target coding block in third encoded data corresponding to one slice of a video image frame needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in slice header information of the third encoded data is a first value.
In some embodiments of the present application, based on the foregoing scheme, the first determining unit is configured to determine that a target coding block in fourth encoded data corresponding to one LCU of a video image frame needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when a value of a specified index flag included in LCU header information of the fourth encoded data is a first value.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus 1000 further includes: and the second determining unit is configured to determine whether the coding block needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding according to the relation between the size of the coding block and a preset threshold range.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus 1000 further includes: a third determining unit, configured to determine that a target coding block in first coded data corresponding to one video image frame sequence does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when an index identifier included in a sequence header of the first coded data is a first value; and when the index identifier contained in the sequence header is a second value and the index identifier contained in the image header of second encoded data corresponding to one video image frame in the video image frame sequence is a first value, determining that a target coding block in the second encoded data does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing solution, the third determining unit is further configured to determine that, when the index identifier included in the sequence header is a second value and the index identifier included in the image header is a second value, the target coding block in the second coded data needs to select a corresponding transform matrix combination according to the quantization coefficient in the quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that a target coding block in third coded data corresponding to one slice of the video image frame does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when an index included in the sequence header is identified as a second value, an index included in the image header is identified as a second value, and an index included in slice header information of the third coded data is identified as a first value.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that a target coding block in the third encoded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding when an index identifier included in the sequence header is a second value, an index identifier included in the image header is a second value, and an index identifier included in the slice header information is a second value.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that, when the index contained in the sequence header is identified as the second value, the index contained in the image header is identified as the second value, the index contained in the slice header information is identified as the second value, and the index contained in the LCU header information of the fourth encoded data corresponding to one LCU of the slice is identified as the first value, a target coding block in the fourth encoded data does not need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing scheme, the third determining unit is further configured to determine that, when the index identifier included in the sequence header is a second value, the index identifier included in the image header is a second value, the index identifier included in the slice header information is a second value, and the index identifier included in the LCU header information is a second value, a target coding block in the fourth coded data needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding.
In some embodiments of the present application, based on the foregoing solution, the third determining unit is further configured to determine, when the index identifier included in the sequence header is a second value, the index identifier included in the image header is a second value, the index identifier included in the slice header information is a second value, and the index identifier included in the LCU header information is a second value, whether each coding block needs to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding according to a relationship between a size of each coding block in the fourth coded data and a preset threshold range.
In some embodiments of the present application, based on the foregoing scheme, the target coding block is any one of: the coding block adopting the intra-frame coding mode, the coding block adopting the inter-frame coding mode and all the coding blocks in the corresponding coding data.
In some embodiments of the present application, based on the foregoing scheme, the video decoding apparatus further includes: a fourth determining unit, configured to determine, according to a value of a first indication bit and a value of a second indication bit included in a sequence header of first encoded data corresponding to one video image frame sequence, whether a coding block in an intra-frame coding mode and a coding block in an inter-frame coding mode in the first encoded data need to select a corresponding transform matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to a value of a first indicating bit and a value of a second indicating bit contained in an image header of second encoded data corresponding to one video image frame, respectively determining whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the second encoded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to a value of a first indicating bit and a value of a second indicating bit contained in slice header information of third coded data corresponding to a slice of a video image frame, respectively determining whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the third coded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to the value of a first indicating bit and the value of a second indicating bit contained in LCU header information of fourth coded data corresponding to one LCU of a video image frame, whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the fourth coded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding or not is determined respectively.
In some embodiments of the present application, based on the foregoing scheme, the statistical unit 1004 is configured to: calculating the sum of the numerical values of the quantized coefficients in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of absolute values of the quantized coefficients in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of the values of the quantized coefficients with odd numbers in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of absolute values of the quantization coefficients with odd numerical values in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of the numerical values of the quantized coefficients with the numerical values being even numbers or non-zero even numbers in the at least one region, and taking the obtained sum as the statistical result; or
And calculating the sum of absolute values of the quantized coefficients with even or non-zero even values in the at least one region, and taking the obtained sum as the statistical result.
In some embodiments of the present application, based on the foregoing scheme, the statistical unit 1004 is configured to: performing linear mapping on the numerical values of the quantized coefficients in the at least one region, calculating the sum of the numerical values or absolute values of the quantized coefficients in the at least one region after the linear mapping, and taking the obtained sum as the statistical result, wherein the linear mapping comprises:
converting the value of the quantized coefficient with the odd number in the at least one region into a first value, and converting the value of the quantized coefficient with the even number into a second value, wherein one of the first value and the second value is the odd number, and the other is the even number; or
Converting the value of the non-zero quantized coefficient in the at least one region into a third value, and converting the value of the quantized coefficient with the value of zero into a fourth value, wherein one of the third value and the fourth value is an odd number, and the other is an even number; or
Decreasing or increasing the value of the quantized coefficients within the at least one region by a fifth value; or
Multiplying or dividing the value of the quantized coefficients within the at least one region by a sixth value that is non-zero; or
Multiplying or dividing the value of the quantized coefficients within the at least one region by a non-zero even number.
In some embodiments of the present application, based on the foregoing, the at least one region comprises one or more of:
all regions in the block of quantized coefficients;
a specified location or locations in the block of quantized coefficients;
at least one row specified in the block of quantized coefficients;
at least one column specified in the block of quantized coefficients;
at least one row specified and at least one column specified in the block of quantized coefficients;
a position in the block of quantized coefficients on at least one diagonal line;
an SRCC region in the block of quantized coefficients;
a specified location or locations in the SRCC area;
at least one row specified in the SRCC area;
at least one column designated in the SRCC area;
at least one designated row and at least one designated column in the SRCC area;
and the SRCC area is positioned on at least one oblique line.
In some embodiments of the present application, based on the foregoing scheme, the one or more locations specified in the SRCC area include: the first N positions in the scanning order or the middle N positions in the scanning order, wherein N is a natural number which is not 0.
In some embodiments of the present application, based on the foregoing scheme, the remainder of the numeric value for a given value is used to indicate that the coding block has skipped the transform process.
FIG. 11 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1100 of the electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 11, a computer system 1100 includes a Central Processing Unit (CPU)1101, which can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for system operation are also stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An Input/Output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input portion 1106 including a keyboard, mouse, and the like; an output section 1107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1108 including a hard disk and the like; and a communication section 1109 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1109 performs communication processing via a network such as the internet. A driver 1110 is also connected to the I/O interface 1105 as necessary. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1110 as necessary, so that a computer program read out therefrom is mounted into the storage section 1108 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 1109 and/or installed from the removable medium 1111. When the computer program is executed by a Central Processing Unit (CPU)1101, various functions defined in the system of the present application are executed.
It should be noted that 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 two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block 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. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can 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.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (14)
1. A video decoding method, comprising:
entropy decoding a coding block of a video image frame to obtain a quantization coefficient block of residual error data corresponding to the coding block;
counting the quantization coefficients in at least one region in the quantization coefficient block to obtain a statistical result, and calculating the remainder of the statistical result for a set value;
selecting a corresponding transformation matrix combination according to the corresponding relation between the remainder and the transformation matrix combination;
and performing inverse transform processing on the inverse quantization result of the quantization coefficient block based on the selected transform matrix combination.
2. The video decoding method of claim 1, further comprising:
determining whether a target coding block in corresponding coded data needs to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding according to a value of a specified index identifier, wherein the specified index identifier is included in at least one of the following:
the video coding method comprises a sequence header of first coding data corresponding to a video image frame sequence, an image header of second coding data corresponding to the video image frame, a strip header of third coding data corresponding to a strip of the video image frame, and an LCU header of fourth coding data corresponding to a largest coding unit LCU of the video image frame.
3. The video decoding method of claim 2, wherein the target coding block is any one of: the coding block adopting the intra-frame coding mode, the coding block adopting the inter-frame coding mode and all the coding blocks in the corresponding coding data.
4. The video decoding method of claim 1, further comprising:
according to a value of a first indication bit and a value of a second indication bit contained in a sequence header of first coded data corresponding to a video image frame sequence, respectively determining whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the first coded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to a value of a first indicating bit and a value of a second indicating bit contained in an image header of second encoded data corresponding to one video image frame, respectively determining whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the second encoded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to a value of a first indicating bit and a value of a second indicating bit contained in slice header information of third coded data corresponding to a slice of a video image frame, respectively determining whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the third coded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding; or
According to the value of a first indicating bit and the value of a second indicating bit contained in LCU header information of fourth coded data corresponding to one LCU of a video image frame, whether a coding block adopting an intra-frame coding mode and a coding block adopting an inter-frame coding mode in the fourth coded data need to select a corresponding transformation matrix combination according to a quantization coefficient in a quantization coefficient block obtained by entropy decoding or not is determined respectively.
5. The video decoding method of claim 1, wherein counting the quantized coefficients in at least one region of the block of quantized coefficients to obtain a statistical result comprises:
calculating the sum of the numerical values of the quantized coefficients in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of absolute values of the quantized coefficients in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of the values of the quantized coefficients with odd numbers in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of absolute values of the quantization coefficients with odd numerical values in the at least one region, and taking the obtained sum as the statistical result; or
Calculating the sum of the numerical values of the quantized coefficients with the numerical values being even numbers or non-zero even numbers in the at least one region, and taking the obtained sum as the statistical result; or
And calculating the sum of absolute values of the quantized coefficients with even or non-zero even values in the at least one region, and taking the obtained sum as the statistical result.
6. The video decoding method of claim 1, wherein counting the quantized coefficients in at least one region of the block of quantized coefficients to obtain a statistical result comprises: performing linear mapping on the numerical values of the quantized coefficients in the at least one region, calculating the sum of the numerical values or absolute values of the quantized coefficients in the at least one region after the linear mapping, and taking the obtained sum as the statistical result, wherein the linear mapping comprises:
converting the value of the quantized coefficient with the odd number in the at least one region into a first value, and converting the value of the quantized coefficient with the even number into a second value, wherein one of the first value and the second value is the odd number, and the other is the even number; or
Converting the value of the non-zero quantized coefficient in the at least one region into a third value, and converting the value of the quantized coefficient with the value of zero into a fourth value, wherein one of the third value and the fourth value is an odd number, and the other is an even number; or
Decreasing or increasing the value of the quantized coefficients within the at least one region by a fifth value; or
Multiplying or dividing the value of the quantized coefficients within the at least one region by a sixth value that is non-zero; or
Multiplying or dividing the value of the quantized coefficients within the at least one region by a non-zero even number.
7. The video decoding method of any of claims 1-6, wherein the at least one region comprises one or more of:
all regions in the block of quantized coefficients;
a specified location or locations in the block of quantized coefficients;
at least one row specified in the block of quantized coefficients;
at least one column specified in the block of quantized coefficients;
at least one row specified and at least one column specified in the block of quantized coefficients;
a position in the block of quantized coefficients on at least one diagonal line;
a scanning area coefficient coding (SRCC) area in the quantization coefficient block;
a specified location or locations in the SRCC area;
at least one row specified in the SRCC area;
at least one column designated in the SRCC area;
at least one designated row and at least one designated column in the SRCC area;
and the SRCC area is positioned on at least one oblique line.
8. The video decoding method of claim 7, wherein the one or more locations specified in the SRCC area comprise: the first N positions in the scanning order or the middle N positions in the scanning order, wherein N is a natural number which is not 0.
9. The video decoding method according to any of claims 1 to 6, wherein if the remainder is a specified value, it indicates that the coding block has skipped the transform process.
10. The video decoding method according to any one of claims 1 to 6, wherein the correspondence between the remainder and the combination of transform matrices is predetermined based on a combination of Discrete Cosine Transform (DCT) transform kernels and/or Discrete Sine Transform (DST) transform kernels according to a value of the remainder.
11. The video decoding method of any of claims 1 to 6, wherein the transform matrix combination comprises a combination of at least any one of DCT2, DCT5, DCT8, DST1, DST 7.
12. A video decoding apparatus, comprising:
the decoding unit is configured to perform entropy decoding processing on a coding block of a video image frame to obtain a quantization coefficient block of residual data corresponding to the coding block;
the statistic unit is configured to count the quantization coefficients in at least one region in the quantization coefficient block to obtain a statistic result, and calculate the remainder of the statistic result for a set value;
the selection unit is configured to select a corresponding transformation matrix combination according to the corresponding relation between the remainder and the transformation matrix combination;
a processing unit configured to perform inverse transform processing on an inverse quantization result of the quantization coefficient block based on the selected transform matrix combination.
13. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out a video decoding method according to any one of claims 1 to 11.
14. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the video decoding method of any of claims 1 to 11.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011033990.0A CN112565751B (en) | 2020-09-27 | 2020-09-27 | Video decoding method and device, computer readable medium and electronic equipment |
CN202111056629.4A CN113824957B (en) | 2020-09-27 | 2020-09-27 | Video encoding and decoding method and device and electronic equipment |
PCT/CN2021/116451 WO2022062880A1 (en) | 2020-09-27 | 2021-09-03 | Video decoding method and apparatus, computer readable medium, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011033990.0A CN112565751B (en) | 2020-09-27 | 2020-09-27 | Video decoding method and device, computer readable medium and electronic equipment |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111056629.4A Division CN113824957B (en) | 2020-09-27 | 2020-09-27 | Video encoding and decoding method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112565751A CN112565751A (en) | 2021-03-26 |
CN112565751B true CN112565751B (en) | 2021-09-10 |
Family
ID=75042687
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011033990.0A Active CN112565751B (en) | 2020-09-27 | 2020-09-27 | Video decoding method and device, computer readable medium and electronic equipment |
CN202111056629.4A Active CN113824957B (en) | 2020-09-27 | 2020-09-27 | Video encoding and decoding method and device and electronic equipment |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111056629.4A Active CN113824957B (en) | 2020-09-27 | 2020-09-27 | Video encoding and decoding method and device and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (2) | CN112565751B (en) |
WO (1) | WO2022062880A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114079772B (en) * | 2020-08-21 | 2023-04-07 | 腾讯科技(深圳)有限公司 | Video decoding method and device, computer readable medium and electronic equipment |
CN112565751B (en) * | 2020-09-27 | 2021-09-10 | 腾讯科技(深圳)有限公司 | Video decoding method and device, computer readable medium and electronic equipment |
CN112533000B (en) * | 2020-10-16 | 2022-08-05 | 腾讯科技(深圳)有限公司 | Video decoding method and device, computer readable medium and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101771868A (en) * | 2008-12-31 | 2010-07-07 | 华为技术有限公司 | Method and device for processing images in quantification |
EP2348734A1 (en) * | 2008-11-07 | 2011-07-27 | Mitsubishi Electric Corporation | Image encoding device and image decoding device |
KR20170025994A (en) * | 2015-08-31 | 2017-03-08 | 삼성전자주식회사 | Method and apparatus for image transform, and method and apparatus for image inverse transform based on scan order |
CN109831670A (en) * | 2019-02-26 | 2019-05-31 | 北京大学深圳研究生院 | A kind of quantification method, system, equipment and computer-readable medium |
JP2020108179A (en) * | 2010-12-09 | 2020-07-09 | ヴェロス メディア インターナショナル リミテッドVelos Media International Limited | Image processing apparatus, image processing method, program, and recording medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012516626A (en) * | 2009-01-27 | 2012-07-19 | トムソン ライセンシング | Method and apparatus for selection of transforms in video encoding and video decoding |
CN102045560B (en) * | 2009-10-23 | 2013-08-07 | 华为技术有限公司 | Video encoding and decoding method and video encoding and decoding equipment |
US10306229B2 (en) * | 2015-01-26 | 2019-05-28 | Qualcomm Incorporated | Enhanced multiple transforms for prediction residual |
EP3335422B1 (en) * | 2015-12-23 | 2021-12-01 | Huawei Technologies Co., Ltd. | Method and apparatus for transform coding with block-level transform selection and implicit signaling within hierarchical partitioning |
CN111225206B (en) * | 2018-11-23 | 2021-10-26 | 华为技术有限公司 | Video decoding method and video decoder |
CN110519601A (en) * | 2019-09-02 | 2019-11-29 | 北京百度网讯科技有限公司 | The coding method of digital video and device |
CN112565751B (en) * | 2020-09-27 | 2021-09-10 | 腾讯科技(深圳)有限公司 | Video decoding method and device, computer readable medium and electronic equipment |
CN112543337B (en) * | 2020-09-27 | 2023-05-02 | 腾讯科技(深圳)有限公司 | Video decoding method, device, computer readable medium and electronic equipment |
CN112533000B (en) * | 2020-10-16 | 2022-08-05 | 腾讯科技(深圳)有限公司 | Video decoding method and device, computer readable medium and electronic equipment |
-
2020
- 2020-09-27 CN CN202011033990.0A patent/CN112565751B/en active Active
- 2020-09-27 CN CN202111056629.4A patent/CN113824957B/en active Active
-
2021
- 2021-09-03 WO PCT/CN2021/116451 patent/WO2022062880A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2348734A1 (en) * | 2008-11-07 | 2011-07-27 | Mitsubishi Electric Corporation | Image encoding device and image decoding device |
CN101771868A (en) * | 2008-12-31 | 2010-07-07 | 华为技术有限公司 | Method and device for processing images in quantification |
JP2020108179A (en) * | 2010-12-09 | 2020-07-09 | ヴェロス メディア インターナショナル リミテッドVelos Media International Limited | Image processing apparatus, image processing method, program, and recording medium |
KR20170025994A (en) * | 2015-08-31 | 2017-03-08 | 삼성전자주식회사 | Method and apparatus for image transform, and method and apparatus for image inverse transform based on scan order |
CN109831670A (en) * | 2019-02-26 | 2019-05-31 | 北京大学深圳研究生院 | A kind of quantification method, system, equipment and computer-readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN113824957B (en) | 2022-10-28 |
WO2022062880A1 (en) | 2022-03-31 |
CN112565751A (en) | 2021-03-26 |
CN113824957A (en) | 2021-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112533000B (en) | Video decoding method and device, computer readable medium and electronic equipment | |
CN112565751B (en) | Video decoding method and device, computer readable medium and electronic equipment | |
CN112543338B (en) | Video decoding method and device, computer readable medium and electronic equipment | |
CN112543337B (en) | Video decoding method, device, computer readable medium and electronic equipment | |
CN112995671B (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
CN113207002B (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
CN114885160A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
US20230053118A1 (en) | Video decoding method, video coding method, and related apparatus | |
WO2022174637A1 (en) | Video encoding and decoding method, video encoding and decoding apparatus, computer-readable medium and electronic device | |
CN114079772B (en) | Video decoding method and device, computer readable medium and electronic equipment | |
CN114079773B (en) | Video decoding method and device, computer readable medium and electronic equipment | |
CN114286095B (en) | Video decoding method, device and equipment | |
CN115209146A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
WO2022116854A1 (en) | Video decoding method and apparatus, readable medium, electronic device, and program product | |
CN114979642A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
CN114979655A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
CN114979656A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
CN115209141A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40040661 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |