CN115174908A - Transform quantization method, apparatus, device and storage medium for video coding - Google Patents

Transform quantization method, apparatus, device and storage medium for video coding Download PDF

Info

Publication number
CN115174908A
CN115174908A CN202210771833.2A CN202210771833A CN115174908A CN 115174908 A CN115174908 A CN 115174908A CN 202210771833 A CN202210771833 A CN 202210771833A CN 115174908 A CN115174908 A CN 115174908A
Authority
CN
China
Prior art keywords
pixel block
transform
residual
quantization
block
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.)
Granted
Application number
CN202210771833.2A
Other languages
Chinese (zh)
Other versions
CN115174908B (en
Inventor
李雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210771833.2A priority Critical patent/CN115174908B/en
Publication of CN115174908A publication Critical patent/CN115174908A/en
Application granted granted Critical
Publication of CN115174908B publication Critical patent/CN115174908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Abstract

The present disclosure provides a transform quantization method, apparatus, device, storage medium and program product for video coding, which relate to the field of artificial intelligence, and in particular to cloud computing, video processing, and media cloud technologies, and can be applied in an intelligent cloud scenario. One embodiment of the method comprises: coding a video to obtain a residual error pixel block; selecting a partial residual pixel block from the residual pixel blocks; and performing transform quantization on the selected residual pixel blocks by using a first transform quantization algorithm, and performing transform quantization on the residual pixel blocks by using a second transform quantization algorithm to obtain quantized signals, wherein the first transform quantization algorithm performs transform and quantization on partial coefficients, and the second transform quantization algorithm performs transform and quantization on all the coefficients. The embodiment selects a part of residual pixel blocks to transform and quantize a part of coefficients, thereby reducing the computational complexity of the transformation and quantization process.

Description

Transform quantization method, apparatus, device and storage medium for video coding
Technical Field
The disclosure relates to the field of artificial intelligence, in particular to cloud computing, video processing and media cloud technologies, which can be applied to intelligent cloud scenes.
Background
HEVC (High Efficiency Video Coding) is a new Video compression standard, and its Coding process includes prediction, transformation, quantization, entropy Coding, inverse quantization, inverse transformation and loop filtering.
At present, the transform quantization mode in the HEVC encoder transforms and quantizes all coefficients of a residual pixel block, and the amount of computation increases exponentially with the increase in size of the residual pixel block.
Disclosure of Invention
The disclosed embodiments provide a transform quantization method, apparatus, device, storage medium and program product for video coding.
In a first aspect, an embodiment of the present disclosure provides a transform quantization method for video coding, including: coding a video to obtain a residual error pixel block; selecting a partial residual pixel block from the residual pixel blocks; and performing transform quantization on the selected residual pixel blocks by using a first transform quantization algorithm, and performing transform quantization on the residual pixel blocks by using a second transform quantization algorithm to obtain quantized signals, wherein the first transform quantization algorithm performs transform and quantization on partial coefficients, and the second transform quantization algorithm performs transform and quantization on all the coefficients.
In a second aspect, an embodiment of the present disclosure provides an apparatus for transform quantization in video coding, including: the encoding module is configured to encode the video to obtain a residual error pixel block; a selection module configured to select a partial residual pixel block from among the residual pixel blocks; and the transformation quantization module is configured to transform and quantize the selected residual pixel block by using a first transformation quantization algorithm and transform and quantize the residual pixel block by using a second transformation quantization algorithm to obtain a quantized signal, wherein the first transformation quantization algorithm transforms and quantizes part of coefficients, and the second transformation quantization algorithm transforms and quantizes all the coefficients.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in any one of the implementations of the first aspect.
In a fourth aspect, the disclosed embodiments propose a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in any one of the implementations of the first aspect.
In a fifth aspect, the present disclosure provides a computer program product including a computer program, which when executed by a processor implements the method as described in any implementation manner of the first aspect.
According to the method for transforming and quantizing the video coding, provided by the embodiment of the disclosure, part of residual error pixel blocks are selected to transform and quantize part of coefficients, so that the computational complexity of the transformation and quantization process is reduced, the whole time consumption of the transformation and quantization process in the coding process is reduced, and the video coding speed is further improved.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
Other features, objects, and advantages of the disclosure will become apparent from a reading of the following detailed description of non-limiting embodiments which proceeds with reference to the accompanying drawings. The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a block diagram of an encoding flow of HEVC.
Fig. 2 is a flow diagram of one embodiment of a transform quantization method of video coding according to the present disclosure;
fig. 3 is a flow diagram of yet another embodiment of a transform quantization method of video coding according to the present disclosure;
FIG. 4 is a schematic diagram of a block of transform coefficients after a residual pixel block transform;
FIG. 5 is a schematic diagram of a calculation process of a first transform quantization algorithm;
fig. 6 is a schematic structural diagram of an embodiment of a transform quantization apparatus for video coding according to the present disclosure;
fig. 7 is a block diagram of an electronic device for implementing a transform quantization method of video coding according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 shows a coding flow block diagram of HEVC. As shown in fig. 1, the coding flow of HEVC may include prediction, transform, quantization, entropy coding, inverse quantization, inverse transform, and loop filtering.
For the prediction process, the video is first divided into several CTUs (Coding tree units), then each CTU quadtree is divided down into CUs (Coding units), and finally the CUs are prediction coded. The prediction may include inter prediction and intra prediction, among others. The CU may be an original pixel block of the video, and inter prediction or intra prediction may be performed on the CU to obtain a predicted pixel block of the video. And subtracting the original pixel block from the predicted pixel block to obtain a residual pixel block of the video.
For the transformation process, the input is a residual pixel block, and the output is a transformation coefficient block converted from the residual pixel block through matrix multiplication transformation. The matrix multiplication is Y = a X B. X is a residual pixel block, which is time domain information, and has a size of 2N × 2N. A and B are coefficient matrices, which are also 2N × 2N in size. Y is a transform coefficient block, which is frequency domain information, and is also 2N × 2N in size. Wherein N is a positive integer. In practical applications, the transform coefficient blocks are 32 × 32, 16 × 16, 8 × 8, and 4 × 4 in order from large to small.
And for the quantization flow, the transformation coefficient block is subjected to signal processing, the amplitude of the signal is reduced, and a quantized signal is obtained.
And for the entropy coding process, entropy coding is carried out on the quantized signal to obtain a video coding code stream.
For the inverse quantization, inverse transformation and loop filtering processes, inverse quantization and inverse transformation are carried out on the quantized signals, the quantized signals are added with the prediction pixel blocks, and loop filtering is carried out on the obtained results, so that the video image can be reconstructed.
The existing transformation and quantization process needs to transform and quantize all coefficients of a 2Nx2N residual pixel block, the calculation amount increases exponentially along with the increase of the size of the residual pixel block, and the calculation complexity is high. To solve this problem, the present disclosure proposes a transform quantization method for video coding, which may select a part of residual pixel blocks to transform and quantize a part of coefficients, so as to reduce the computational complexity of the transform and quantization process.
Fig. 2 shows a flow 200 of one embodiment of a transform quantization method of video coding according to the present disclosure. The transform quantization method for video coding comprises the following steps:
step 201, encoding the video to obtain a residual pixel block.
In this embodiment, the main body of the transform quantization method for video coding may encode the video, resulting in residual pixel blocks.
In the coding process of HEVC, residual pixel blocks of a video may be obtained. In general, video is predictively encoded to obtain an original pixel block and a predicted pixel block. And subtracting the original pixel block from the predicted pixel block to obtain a residual pixel block. Specifically, the video is divided into a plurality of CTUs, and each CTU quadtree is divided downward into CUs, so that an original pixel block can be obtained. And carrying out inter-frame prediction or intra-frame prediction on the CU to obtain a prediction pixel block. And subtracting the original pixel block and the predicted pixel block to obtain a residual pixel block of the video. The prediction may include inter prediction and intra prediction, among others.
Step 202, selecting a part of residual pixel blocks from the residual pixel blocks.
In this embodiment, the execution subject may select a part of the residual pixel blocks from among the residual pixel blocks. The selected residual pixel block is the selected residual pixel block, and the unselected residual pixel blocks are the residual pixel blocks.
Here, a specific implementation manner of selecting the residual pixel block is not limited, and the residual pixel block may be randomly selected or may be selected to satisfy a specific condition. For example, the residual pixel block may be selected based on low frequency coefficients. Specifically, according to the characteristic that the energy low-frequency component is concentrated at the upper left corner after the transformation of the residual pixel block, the residual pixel block with a smaller low-frequency edge position coefficient after the transformation is selected.
Step 203, using a first transform quantization algorithm to perform transform quantization on the selected residual pixel block, and using a second transform quantization algorithm to perform transform quantization on the remaining residual pixel block, thereby obtaining a quantized signal.
In this embodiment, the execution body may transform and quantize the selected residual pixel block by using a first transform and quantization algorithm, and transform and quantize the remaining residual pixel block by using a second transform and quantization algorithm, so as to obtain a quantized signal. Wherein the first transform quantization algorithm may transform and quantize a portion of the coefficients. The second transform quantization algorithm may transform and quantize all coefficients.
Here, the first transform/quantization algorithm is not limited to the coefficients to be transformed and quantized, and may be coefficients at random positions of the residual pixel block or coefficients at specific positions of the residual pixel block. For example, according to the characteristic that the energy low-frequency component is concentrated in the upper left corner after the residual pixel block is transformed, only the pixel block in the upper left corner of the residual pixel block is transformed and quantized, and the coefficients in other positions of the residual pixel block are directly set to 0 without being transformed and quantized, so that the whole time consumption of the transformation and quantization process in the encoding process is reduced.
According to the method for transforming and quantizing the video coding, provided by the embodiment of the disclosure, part of residual error pixel blocks are selected to transform and quantize part of coefficients, so that the computational complexity of the transformation and quantization process is reduced, the whole time consumption of the transformation and quantization process in the coding process is reduced, and the video coding speed is further improved.
With continued reference to fig. 3, a flow 300 of yet another embodiment of a transform quantization method of video coding in accordance with the present disclosure is shown. The transform quantization method for video coding comprises the following steps:
step 301, encoding the video to obtain a residual error pixel block.
In this embodiment, the main body of the transform quantization method for video coding may encode the video to obtain residual pixel blocks. The size of the residual pixel block is 2Nx2N, and N is a positive integer.
Step 302, a threshold is calculated according to the quantization factor.
In the present embodiment, the execution subject described above may calculate the threshold value from the quantization coefficient. Wherein the quantized coefficients may be jointly determined according to an external setting and an internal algorithm of the HEVC encoder.
Here, the threshold value may be calculated based on the idea that the quantized coefficient is 0. For example, qbits, MF, and f may be calculated from the quantization coefficients qp, and then the threshold TSZ may be calculated from qbits, MF, and f. The calculation formula is as follows:
TSZ=a*tsz;
Figure BDA0003724478120000061
Figure BDA0003724478120000062
Figure BDA0003724478120000063
wherein qbits is a parameter used for quantization. MF is a constant in HEVC standard, obtained by looking up a table at qp% 6. f is a factor, f =1/3 if the CU employs intra-prediction coding, and f =1/6 if the CU employs inter-prediction coding. tsz is an intermediate threshold parameter. a is a constant whose value is adjusted according to the algorithm in HEVC.
Step 303, calculating the absolute value of the edge coefficient according to the pixels of the residual pixel block.
In this embodiment, the execution body may calculate the edge coefficient absolute value from the pixels of the residual pixel block.
The edge coefficient may be a coefficient after the edge position except the upper left corner pixel block in the residual pixel block is transformed, and is obtained by calculating the sum of each row of pixels except the upper left corner pixel block and each column of pixels, and multiplying the sum by the matrix coefficient, and the calculation formula is as follows:
Figure BDA0003724478120000064
Figure BDA0003724478120000065
and the size of the upper left corner pixel block of the residual pixel block is N multiplied by N. j = N to 2N-1, sj is a coefficient after the edge position (0, j) is transformed, and Tj is a coefficient after the edge position (j, 0) is transformed. pixHorSum [ j ] is the row pixel sum for the j-th row, and pixVerSum [ j ] is the column pixel sum for the j-th column. gt2n line j is the sum matrix coefficient.
For ease of understanding, fig. 4 shows a schematic diagram of a transform coefficient block after residual pixel block transform. As shown in fig. 4, the gray region is a block of coefficients transformed from the top left corner pixel block, and has a size of N × N. The black region is an edge coefficient point after the edge position is transformed except for the upper left corner pixel block in the residual pixel block. The white region is a block of all-zero coefficients after transformation of the pixel blocks except the upper-left corner pixel block among the residual pixel blocks.
Step 304, selecting residual pixel blocks with edge coefficients with absolute values not larger than a threshold value from the residual pixel blocks.
In this embodiment, the execution subject described above may select, from among the residual pixel blocks, a residual pixel block whose edge coefficient absolute value is not greater than a threshold value.
For example, the absolute values of Sc and Tc may be compared to a threshold TSZ. Abs (Sc) if present>TSZ or abs (Tc)>TSZ, then the residual pixel block is selected. Wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003724478120000071
b=1,2,4…N。
and 305, performing matrix multiplication transformation and quantization on the upper left pixel block of the selected residual pixel block by using the residual block coefficient, setting the pixels except the upper left pixel block in the selected residual pixel block to be zero, and performing matrix multiplication transformation and quantization on the residual pixel block by using the residual block coefficient to obtain a quantized signal.
In this embodiment, the execution main body may perform matrix multiplication transformation and quantization on the upper left pixel block of the selected residual pixel block by using the residual block coefficient, set a pixel of the selected residual pixel block except the upper left pixel block to zero, and perform matrix multiplication transformation and quantization on the remaining residual pixel block by using the residual block coefficient to obtain a quantized signal.
For the selected 2N × 2N residual pixel block, only the coefficients of the N × N top-left pixel block are subjected to the correlation transform operation, and the coefficients at the remaining positions are not calculated any more and are set to 0 directly. For ease of understanding, fig. 5 shows a schematic diagram of the transformation process of the first transform quantization algorithm. As shown in fig. 5, the transformation formula is as follows: y = a X B = [ (X B) T *A T ] T . Where X is a residual pixel block whose coefficients need to be calculated are 2N × 2N in size. A and B are coefficient matrixes, the size of the coefficient required to be calculated by A is N multiplied by 2N, and the size of the coefficient required to be calculated by B is 2N multiplied by N. Y is a block of transform coefficients, the size of the coefficients that need to be computed is N × N. According to the transformation formula, the calculation amount of the transverse transformation is 1/2 of the original calculation amount, and the calculation amount of the longitudinal transformation is 1/4 of the original calculation amount.
For the remaining 2N × 2N residual pixel blocks, a correlation transform operation is performed on all the coefficients of the 2N × 2N residual pixel blocks. The transformation formula is as follows: y = a × X B. Where X is a residual pixel block whose coefficients need to be calculated are 2N × 2N in size. A and B are coefficient matrices whose coefficients to be calculated are also 2N × 2N in size. Y is a block of transform coefficients, whose coefficients need to be computed are also of size 2N × 2N.
To improve the encoding speed, SIMD (Single Instruction Multiple Data) optimization may also be performed on the first transform quantization algorithm, including but not limited to MMX (Multi Media Extensions), SSE (Single Instruction Multiple Data stream Extensions), SSE 2, SSE 3, SSE 41, AVX (Advanced Vector Extensions), AVX 2, AVX 512, NEON (ARM architecture processor extension), and the like. For example, DCT (Discrete Cosine Transform) matrix multiplication in the transformation process may be implemented by using butterfly transformation, and SIMD optimization may be performed according to a target operating platform.
For the 2NX2N residual error pixel block selected for carrying out the first transformation quantization algorithm, only the coefficient of the pixel block at the upper left corner of the NX N is subjected to related transformation operation, the transformation and quantization of other coefficient positions are not calculated any more and are directly set to be 0, and the whole time consumption of the transformation and quantization process in the encoding process is reduced. And the instruction set is accelerated by combining the SIMD instruction of each platform and the butterfly transform of the first transform quantization algorithm, and the method has the characteristics of low computational complexity and short coding time.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the flow 300 of the transform quantization method for video coding in the present embodiment highlights the residual pixel block selection step and the transform quantization step. Therefore, the scheme described in this embodiment proposes a fast SIMD transform quantization algorithm based on low-frequency coefficient selection according to the characteristics of the energy in the upper left corner set after residual pixel block transform and considering the quantization idea. And flexibly selecting whether a fast transformation algorithm is adopted or not according to the comparison between the transformed low-frequency edge position coefficient and the threshold value. The residual pixel block selected for carrying out the fast algorithm is only transformed and quantized to the upper left corner pixel block, the transformation and quantization of other coefficient positions are not calculated any more, and are directly set to be 0, so that the overall time consumption of the transformation and quantization process in the encoding process is reduced, and the method has the characteristics of low computational complexity and short encoding time consumption.
With further reference to fig. 6, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a transform quantization apparatus for video coding, which corresponds to the embodiment of the method shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 6, the transform quantization apparatus 600 for video coding of the present embodiment may include: an encoding module 601, a selection module 602 and a transform quantization module 603. The encoding module 601 is configured to encode a video to obtain a residual pixel block; a selection module 602 configured to select a partial residual pixel block from the residual pixel blocks; a transform quantization module 603 configured to transform and quantize the selected residual pixel block by using a first transform quantization algorithm that transforms and quantizes a part of the coefficients, and transform and quantize the remaining residual pixel block by using a second transform quantization algorithm that transforms and quantizes the whole coefficients, to obtain a quantized signal.
In this embodiment, in the transform quantization apparatus 600 for video coding: the specific processes of the encoding module 601, the selecting module 602, and the transform quantization module 603 and the technical effects thereof can refer to the related descriptions of steps 201-203 in the corresponding embodiment of fig. 2, which are not repeated herein.
In some optional implementations of the present embodiment, the selection module 602 is further configured to: calculating a threshold value according to the quantization coefficient; calculating an edge coefficient absolute value according to pixels of the residual error pixel block; selecting a residual pixel block having an edge coefficient absolute value not greater than a threshold value from among the residual pixel blocks.
In some optional implementations of this embodiment, the edge coefficient is a coefficient after transforming edge positions except for the top-left pixel block in the residual pixel block, and is obtained by calculating a sum of each row of pixels except for the top-left pixel block and a sum of each column of pixels, and multiplying the sum by the sum matrix coefficient.
In some optional implementations of this embodiment, the transform quantization module 603 includes: a first transform quantization sub-module configured to matrix-multiply and quantize an upper-left pixel block of the selected residual pixel block using the residual block coefficients, and zero out pixels of the selected residual pixel block other than the upper-left pixel block.
In some optional implementations of this embodiment, the transform quantization module 603 further includes: an optimization sub-module configured to perform single instruction multiple data stream optimization on the first transform quantization algorithm.
In some optional implementations of this embodiment, the transform quantization module 603 includes: and a second transform quantization submodule configured to matrix-multiply transform and quantize the remaining residual pixel blocks using the residual block coefficients.
In some optional implementations of this embodiment, the encoding module 601 is further configured to: carrying out predictive coding on a video to obtain an original pixel block and a predictive pixel block; and subtracting the original pixel block from the predicted pixel block to obtain a residual pixel block.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 shows a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 701 performs the respective methods and processes described above, such as a transform quantization method of video encoding. For example, in some embodiments, the transform quantization method of video coding may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the transform quantization method of video coding described above may be performed. Alternatively, in other embodiments, the calculation unit 701 may be configured by any other suitable means (e.g. by means of firmware) to perform the transform quantization method of video coding.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server combining a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure may be performed in parallel or sequentially or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved, and are not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A method of transform quantization for video coding, comprising:
coding a video to obtain a residual error pixel block;
selecting a partial residual pixel block from the residual pixel blocks;
and performing transform quantization on the selected residual pixel block by using a first transform quantization algorithm, and performing transform quantization on the residual pixel block by using a second transform quantization algorithm to obtain a quantized signal, wherein the first transform quantization algorithm performs transform and quantization on part of coefficients, and the second transform quantization algorithm performs transform and quantization on all the coefficients.
2. The method of claim 1, wherein said selecting a partial block of residual pixels from the block of residual pixels comprises:
calculating a threshold value according to the quantization coefficient;
calculating an edge coefficient absolute value according to the pixels of the residual error pixel block;
selecting a residual pixel block from the residual pixel blocks whose edge coefficient absolute value is not greater than the threshold value.
3. The method according to claim 2, wherein the edge coefficients are transformed coefficients of edge positions except for a top-left pixel block in the residual pixel blocks by calculating a sum of each row of pixels except for the top-left pixel block and each column of pixels and multiplying by a sum matrix coefficient.
4. The method of any of claims 1-3, wherein the transform quantizing the selected block of residual pixels using a first transform quantization algorithm, comprises:
and carrying out matrix multiplication transformation and quantization on the upper left corner pixel block of the selected residual pixel block by using the residual block coefficient, and setting the pixels except the upper left corner pixel block in the selected residual pixel block to be zero.
5. The method of claim 4, wherein after said transform quantizing the selected block of residual pixels using the first transform quantization algorithm, further comprising:
and performing Single Instruction Multiple Data (SIMD) optimization on the first transform quantization algorithm.
6. The method of any of claims 1-5, wherein the transform quantizing the remaining residual pixel blocks using a second transform quantization algorithm, comprises:
and performing matrix multiplication transformation and quantization on the residual pixel blocks by using the residual block coefficients.
7. The method according to any of claims 1-6, wherein said encoding the video resulting in blocks of residual pixels comprises:
carrying out predictive coding on a video to obtain an original pixel block and a predicted pixel block;
and subtracting the prediction pixel block from the original pixel block to obtain the residual pixel block.
8. A transform quantization apparatus for video coding, comprising:
the encoding module is configured to encode the video to obtain a residual error pixel block;
a selection module configured to select a partial residual pixel block from the residual pixel blocks;
and the transformation quantization module is configured to transform and quantize the selected residual pixel block by using a first transformation quantization algorithm and transform and quantize part of coefficients by using a second transformation quantization algorithm to transform and quantize all the coefficients to obtain a quantized signal, and the residual pixel block is subjected to transform quantization by using a second transformation quantization algorithm.
9. The apparatus of claim 8, wherein the selection module is further configured to:
calculating a threshold value according to the quantization coefficient;
calculating an edge coefficient absolute value according to the pixels of the residual error pixel block;
selecting a residual pixel block from the residual pixel blocks whose edge coefficient absolute value is not greater than the threshold value.
10. The apparatus according to claim 9, wherein the edge coefficients are transformed coefficients of edge positions except for a top-left pixel block in the residual pixel blocks by calculating a sum of each row of pixels except for the top-left pixel block and each column of pixels and multiplying by a sum matrix coefficient.
11. The apparatus of any of claims 8-10, wherein the transform quantization module comprises:
a first transform quantization submodule configured to matrix-multiply transform and quantize an upper-left pixel block of the selected residual pixel block using residual block coefficients, and to zero out pixels of the selected residual pixel block other than the upper-left pixel block.
12. The apparatus of claim 11, wherein the transform quantization module further comprises:
an optimization sub-module configured to perform single instruction multiple data stream optimization on the first transform quantization algorithm.
13. The apparatus of any of claims 8-12, wherein the transform quantization module comprises:
and a second transform quantization submodule configured to matrix-multiply transform and quantize the remaining residual pixel blocks using the residual block coefficients.
14. The apparatus of any one of claims 8-13, wherein the encoding module is further configured to:
carrying out predictive coding on a video to obtain an original pixel block and a predictive pixel block;
and subtracting the original pixel block from the predicted pixel block to obtain the residual pixel block.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN202210771833.2A 2022-06-30 2022-06-30 Transformation quantization method, device, equipment and storage medium for video coding Active CN115174908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210771833.2A CN115174908B (en) 2022-06-30 2022-06-30 Transformation quantization method, device, equipment and storage medium for video coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210771833.2A CN115174908B (en) 2022-06-30 2022-06-30 Transformation quantization method, device, equipment and storage medium for video coding

Publications (2)

Publication Number Publication Date
CN115174908A true CN115174908A (en) 2022-10-11
CN115174908B CN115174908B (en) 2023-09-15

Family

ID=83488341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210771833.2A Active CN115174908B (en) 2022-06-30 2022-06-30 Transformation quantization method, device, equipment and storage medium for video coding

Country Status (1)

Country Link
CN (1) CN115174908B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010017837A1 (en) * 2008-08-12 2010-02-18 Nokia Corporation Video coding using spatially varying transform
CN102595112A (en) * 2011-01-12 2012-07-18 北京大学 Method for coding and rebuilding image block in video coding
WO2014055826A2 (en) * 2012-10-05 2014-04-10 Huawei Technologies Co., Ltd. Improved architecture for hybrid video codec
CN104247418A (en) * 2013-07-29 2014-12-24 北京大学深圳研究生院 A conversion quantification method is HEVC video coding and a video coding device
CN106954070A (en) * 2017-04-28 2017-07-14 河南工程学院 One kind slides block of pixels integer DCT kernel matrixs conversion motion compensator and method
US20180063544A1 (en) * 2016-08-29 2018-03-01 Apple Inc. Multidimensional quantization techniques for video coding/decoding systems
CN111052743A (en) * 2017-08-31 2020-04-21 交互数字Vc控股公司 Transform pool for locally selecting transform sets in video coding
US20200296421A1 (en) * 2019-03-11 2020-09-17 Tencent America LLC Nter pdpc mode
CN113039803A (en) * 2018-09-23 2021-06-25 Lg 电子株式会社 Method of encoding/decoding video signal and apparatus therefor
CN113574877A (en) * 2019-03-12 2021-10-29 现代自动车株式会社 Method and apparatus for efficiently encoding residual block
WO2022088631A1 (en) * 2020-10-28 2022-05-05 Oppo广东移动通信有限公司 Image encoding method, image decoding method, and related apparatuses

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010017837A1 (en) * 2008-08-12 2010-02-18 Nokia Corporation Video coding using spatially varying transform
CN102595112A (en) * 2011-01-12 2012-07-18 北京大学 Method for coding and rebuilding image block in video coding
WO2014055826A2 (en) * 2012-10-05 2014-04-10 Huawei Technologies Co., Ltd. Improved architecture for hybrid video codec
CN104247418A (en) * 2013-07-29 2014-12-24 北京大学深圳研究生院 A conversion quantification method is HEVC video coding and a video coding device
US20180063544A1 (en) * 2016-08-29 2018-03-01 Apple Inc. Multidimensional quantization techniques for video coding/decoding systems
CN106954070A (en) * 2017-04-28 2017-07-14 河南工程学院 One kind slides block of pixels integer DCT kernel matrixs conversion motion compensator and method
CN111052743A (en) * 2017-08-31 2020-04-21 交互数字Vc控股公司 Transform pool for locally selecting transform sets in video coding
CN113039803A (en) * 2018-09-23 2021-06-25 Lg 电子株式会社 Method of encoding/decoding video signal and apparatus therefor
US20200296421A1 (en) * 2019-03-11 2020-09-17 Tencent America LLC Nter pdpc mode
CN113574877A (en) * 2019-03-12 2021-10-29 现代自动车株式会社 Method and apparatus for efficiently encoding residual block
WO2022088631A1 (en) * 2020-10-28 2022-05-05 Oppo广东移动通信有限公司 Image encoding method, image decoding method, and related apparatuses

Also Published As

Publication number Publication date
CN115174908B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
US11694125B2 (en) Image encoder using machine learning and data processing method of the image encoder
Cheng et al. Energy compaction-based image compression using convolutional autoencoder
US8670485B2 (en) Context adaptive position and amplitude coding of coefficients for video compression
US6885320B2 (en) Apparatus and method for selecting length of variable length coding bit stream using neural network
CN111741298B (en) Video coding method and device, electronic equipment and readable storage medium
US10652541B2 (en) Method and device for encoding video data
CN107211133A (en) Method, device and the decoding device of inverse quantization conversion coefficient
CN113259667B (en) Video quantization method, video quantization device, electronic equipment and computer-readable storage medium
CN107018416B (en) Adaptive tile data size coding for video and image compression
US20210218958A1 (en) Video picture component prediction method and apparatus, and computer storage medium
US8036471B2 (en) Joint amplitude and position coding of coefficients for video compression
US20230336733A1 (en) Sample Adaptive Offset
US10735733B2 (en) Method and device for encoding video data
CN115174908B (en) Transformation quantization method, device, equipment and storage medium for video coding
US20230056211A1 (en) Video encoding method and apparatus, video decoding method and apparatus, computer program product, computer-readable storage medium, and electronic device
Ameer et al. Image compression using plane fitting with inter-block prediction
CN113422957A (en) Quantization method, apparatus, device and storage medium in video coding
CN114025166A (en) Video compression method, electronic device and computer-readable storage medium
US20240121439A1 (en) Point cloud attribute information encoding method and apparatus, point cloud attribute information decoding method and apparatus, and related device
RU2787217C1 (en) Method and device for interpolation filtration for encoding with prediction
CN115883832A (en) Video coding processing method, device, equipment and medium based on artificial intelligence
CN110677681A (en) Video coding and decoding method and device and terminal equipment
CN115661273A (en) Motion vector prediction method, motion vector prediction device, electronic device, and storage medium
JP5644987B1 (en) Video encoding apparatus, video encoding method, and video encoding program
CN117392416A (en) Multi-objective optimization method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant