CN115174908B - Transformation quantization method, device, equipment and storage medium for video coding - Google Patents

Transformation quantization method, device, equipment and storage medium for video coding Download PDF

Info

Publication number
CN115174908B
CN115174908B CN202210771833.2A CN202210771833A CN115174908B CN 115174908 B CN115174908 B CN 115174908B CN 202210771833 A CN202210771833 A CN 202210771833A CN 115174908 B CN115174908 B CN 115174908B
Authority
CN
China
Prior art keywords
pixel block
residual pixel
quantization
residual
transform
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
Application number
CN202210771833.2A
Other languages
Chinese (zh)
Other versions
CN115174908A (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

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

Landscapes

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

Abstract

The disclosure provides a transformation quantization method, a device, equipment, a storage medium and a program product for video coding, relates to the field of artificial intelligence, in particular to cloud computing, video processing and media cloud technology, and can be applied to intelligent cloud scenes. One embodiment of the method comprises the following steps: encoding the video to obtain a residual pixel block; selecting a partial residual pixel block from the residual pixel blocks; and transforming and quantizing the selected residual pixel blocks by using a first transformation and quantization algorithm, and transforming and quantizing the residual pixel blocks by using a second transformation and quantization algorithm to obtain quantized signals, wherein the first transformation and quantization algorithm transforms and quantizes part of coefficients, and the second transformation and quantization algorithm transforms and quantizes all coefficients. The embodiment selects partial residual pixel blocks to transform and quantize partial coefficients, so that the computational complexity of the transformation and quantization process is reduced.

Description

Transformation quantization method, device, equipment 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 technology, which can be applied to intelligent cloud scenes.
Background
HEVC (High Efficiency Video Coding ) is a new video compression standard whose coding scheme includes prediction, transformation, quantization, entropy coding, inverse quantization, inverse transformation, and loop filtering.
Currently, the transformation quantization mode in the HEVC encoder is to transform and quantize all coefficients of a residual pixel block, and its calculation amount increases exponentially with the increase of the residual pixel block size.
Disclosure of Invention
The embodiment of the disclosure provides a transformation quantization method, a transformation quantization device, a storage medium and a program product for video coding.
In a first aspect, an embodiment of the present disclosure provides a transform quantization method for video coding, including: encoding the video to obtain a residual pixel block; selecting a partial residual pixel block from the residual pixel blocks; and transforming and quantizing the selected residual pixel blocks by using a first transformation and quantization algorithm, and transforming and quantizing the residual pixel blocks by using a second transformation and quantization algorithm to obtain quantized signals, wherein the first transformation and quantization algorithm transforms and quantizes part of coefficients, and the second transformation and quantization algorithm transforms and quantizes all coefficients.
In a second aspect, an embodiment of the present disclosure proposes a transform quantization apparatus for video coding, including: the encoding module is configured to encode the video to obtain a residual pixel block; a selection module configured to select a partial residual pixel block from among the residual pixel blocks; and a transformation quantization module configured to transform-quantize the selected residual pixel block using a first transformation quantization algorithm, and transform-quantize the remaining residual pixel block using a second transformation quantization algorithm, resulting in a quantized signal, wherein the first transformation quantization algorithm transforms and quantizes a portion of the coefficients and the second transformation quantization algorithm transforms and quantizes all of the coefficients.
In a third aspect, an embodiment of the present disclosure proposes 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, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method as described in any one of the implementations of the first aspect.
In a fifth aspect, embodiments of the present disclosure propose a computer program product comprising a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
According to the transformation and quantization method for video coding, provided by the embodiment of the disclosure, the partial residual pixel blocks are selected to transform and quantize partial coefficients, so that the computational complexity of transformation and quantization processes is reduced, the overall time consumption of the transformation and quantization processes in the coding process is reduced, and the video coding speed is further improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a coding flow block diagram of HEVC.
FIG. 2 is a flow chart of one embodiment of a transform quantization method of video encoding according to the present disclosure;
FIG. 3 is a flow chart 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 block of pixels is transformed;
FIG. 5 is a schematic diagram of a calculation process of a first transform quantization algorithm;
FIG. 6 is a schematic diagram of the architecture of one embodiment of a transform quantization apparatus for video encoding according to the present disclosure;
fig. 7 is a block diagram of an electronic device for implementing a transform quantization method of video coding of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. 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 diagram of HEVC. As shown in fig. 1, the coding flow of HEVC may include prediction, transformation, quantization, entropy coding, inverse quantization, inverse transformation, and loop filtering.
For the prediction process, the video is first divided into several CTUs (Coding tree units, tree Coding units), then each CTU quadtree is divided down into CUs (Coding units), and finally the CUs are prediction-coded. Among them, prediction may include inter prediction and intra prediction. A CU may be an original pixel block of a video, and inter-prediction or intra-prediction may be performed on the CU to obtain a predicted pixel block of the video. The original pixel block and the predicted pixel block are subtracted to obtain a residual pixel block of the video.
For the transform flow, the input is a residual pixel block, and the output is a transform coefficient block into which the residual pixel block is transformed by matrix multiplication transformation. 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, also of size 2n×2n. Y is a transform coefficient block, which is frequency domain information, and its size is also 2n×2n. Wherein N is a positive integer. In practical application, 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, performing signal processing on the transformation coefficient block, and reducing the amplitude of the signal to obtain a quantized signal.
And for the entropy coding flow, entropy coding is carried out on the quantized signal, and a coding code stream of the video is obtained.
And for the processes of inverse quantization, inverse transformation and loop filtering, performing inverse quantization and inverse transformation on the quantized signals, adding the quantized signals with the predicted pixel blocks, and performing loop filtering on the obtained result to reconstruct video images.
The existing transformation and quantization flow needs to transform and quantize all coefficients of a 2n×2n residual pixel block, the calculated amount increases exponentially with the increase of the residual pixel block size, and the calculation complexity is high. In order to solve this problem, the present disclosure proposes a transformation quantization method for video coding, which can select a part of residual pixel blocks to transform and quantize a part of coefficients, so as to reduce the computational complexity of the transformation and quantization processes.
Fig. 2 illustrates a flow 200 of one embodiment of a transform quantization method of video coding according to the present disclosure. The transformation quantization method of video coding comprises the following steps:
step 201, encoding the video to obtain a residual pixel block.
In this embodiment, the execution body of the transformation quantization method for video coding may code the video to obtain the residual pixel block.
In the coding process of HEVC, a residual block of pixels of a video may be obtained. In general, video is predictively encoded to yield an original block of pixels and a predicted block of pixels. 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 then each CTU quadtree is divided down into CUs, so that an original pixel block can be obtained. And carrying out inter prediction or intra prediction on the CU to obtain a predicted pixel block. And subtracting the original pixel block from the predicted pixel block to obtain a residual pixel block of the video. Among them, prediction may include inter prediction and intra prediction.
Step 202, selecting a partial residual pixel block from the residual pixel blocks.
In this embodiment, the execution body may select a partial residual pixel block from among residual pixel blocks. Wherein the selected residual pixel block is the selected residual pixel block and the unselected residual pixel block is the remaining pixel block.
Here, the specific implementation of selecting the residual pixel block is not limited, and the residual pixel block may be selected randomly or may satisfy a specific condition. For example, the residual pixel block may be selected based on the low frequency coefficients. Specifically, according to the characteristic that the left upper corner of the energy low-frequency component after transformation of the residual pixel block is concentrated, the residual pixel block with smaller coefficient of the low-frequency edge position after transformation is selected.
In step 203, the selected residual pixel block is transformed quantized using a first transformation quantization algorithm, and the remaining residual pixel block is transformed quantized using a second transformation quantization algorithm, resulting in a quantized signal.
In this embodiment, the execution body may perform transform quantization on the selected residual pixel block using a first transform quantization algorithm, and perform transform quantization on the remaining residual pixel block using a second transform quantization algorithm, to obtain the 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 transformation quantization algorithm is not limited to the coefficients subjected to transformation and quantization, 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 left upper corner of the energy low-frequency component is concentrated after the transformation of the residual pixel block, only the left upper corner pixel block of the residual pixel block is transformed and quantized, and the coefficients at other positions of the residual pixel block are not transformed and quantized and are directly set to 0, so that the whole time consumption of the transformation and quantization process in the encoding process is reduced.
According to the transformation and quantization method for video coding, provided by the embodiment of the disclosure, the partial residual pixel blocks are selected to transform and quantize partial coefficients, so that the computational complexity of transformation and quantization processes is reduced, the overall time consumption of the transformation and quantization processes 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 according to the present disclosure is shown. The transformation quantization method of video coding comprises the following steps:
step 301, encoding the video to obtain a residual pixel block.
In this embodiment, the execution body of the transformation quantization method for video coding may code the video to obtain the residual pixel block. Wherein the size of the residual pixel block is 2n×2n, N being a positive integer.
Step 302, calculating a threshold value according to the quantized coefficients.
In this embodiment, the execution body may calculate the threshold value based on the quantization coefficient. Wherein the quantization coefficients may be determined jointly according to an external setting of the HEVC encoder and an internal algorithm.
Here, the threshold value may be calculated based on the idea that the quantized coefficient is 0. For example, the thresholds TSZ may be calculated from the quantization coefficients qp first, and then from qbits, MF, and f. The calculation formula is as follows:
TSZ=a*tsz;
wherein qbits is a parameter for quantization. MF is a constant in the HEVC standard and is obtained by looking up a table according to qp% 6. f is a factor, f=1/3 if CU uses intra prediction coding, and f=1/6 if CU uses inter prediction coding. tsz is an intermediate threshold parameter. a is a constant whose value is adjusted according to the algorithm in HEVC.
In step 303, the absolute value of the edge coefficient is calculated from 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 coefficients may be coefficients after the edge positions except the top left corner pixel block in the residual pixel block are transformed, and the coefficients are obtained by calculating the sum of each row of pixels except the top left corner pixel block and each column of pixels and multiplying the sum by matrix coefficients, and the calculation formula is as follows:
wherein the size of the upper left corner pixel block of the residual pixel block is n×n. j=n to 2N-1, sj is the coefficient after the edge position (0, j) is transformed, and Tj is the 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 block of transform coefficients after transformation of a residual block of pixels. As shown in fig. 4, the gray area is a coefficient block transformed by the upper left pixel block, and has a size of n×n. The black region is an edge coefficient point after the edge position transformation except for the upper left corner pixel block in the residual pixel block. The white region is the block of all zero coefficients after the pixel block transform except the upper left corner pixel block in the residual pixel block.
Step 304, selecting a residual pixel block with an edge coefficient absolute value not greater than a threshold value from the residual pixel blocks.
In this embodiment, the execution body may select a residual pixel block having an edge coefficient absolute value not greater than a threshold value from among the residual pixel blocks.
For example, the absolute values of Sc and Tc may be compared to a threshold TSZ. If abs (Sc) exist>TSZ or abs (Tc)>TSZ, the residual pixel block is selected. Wherein,,b=1,2,4…N。
in step 305, the left upper corner pixel block of the selected residual pixel block is subjected to matrix multiplication and quantization by using the residual block coefficients, and the pixels except the left upper corner pixel block in the selected residual pixel block are zeroed out, and the residual pixel block is subjected to matrix multiplication and quantization by using the residual block coefficients, so as to obtain a quantized signal.
In this embodiment, the execution body may perform matrix multiplication and quantization on the left upper corner pixel block of the selected residual pixel block using the residual block coefficient, zero-set pixels other than the left upper corner pixel block in the selected residual pixel block, and perform matrix multiplication and quantization on the remaining residual pixel block using the residual block coefficient, to obtain the quantized signal.
For the selected 2n×2n residual pixel block, only the coefficients of the n×n top left pixel block are subjected to a correlation transform operation, and the coefficients at the rest positions are not calculated any more and are directly set to 0. For ease of understanding, fig. 5 shows a schematic diagram of the transformation process of the first transformation 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, the size of the coefficients that need to be calculated is 2n×2n. A and B are coefficient matrices, the size of the coefficient a needs to calculate is n×2n, and the size of the coefficient B needs to calculate is 2n×n. Y is a transform coefficient block whose size of coefficients to be calculated is nxn. According to the transformation formula, the calculated amount of transverse transformation is 1/2 of the original calculated amount, and the calculated amount of longitudinal transformation is 1/4 of the original calculated amount.
For the remaining 2n×2n residual pixel blocks, a correlation transform operation is performed on all 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, the size of the coefficients that need to be calculated is 2n×2n. A and B are coefficient matrices whose coefficients to be calculated are also 2N x2N in size. Y is a block of transform coefficients, the size of the coefficients that need to be calculated is also 2n×2n.
To increase encoding speed, SIMD (Single Instruction Multiple Data, single instruction multiple data stream) optimization may also be performed on the first transform quantization algorithm, including but not limited to MMX (Multi Media Extensions, multimedia extension instruction set), SSE (Streaming SIMD Extensions, single instruction multiple data stream extension), SSE 2, SSE 3, SSE 41, AVX (Advanced Vector Extensions, advanced vector extension), AVX 2, AVX 512, NEON (ARM architecture processor extension structure), and the like. For example, DCT (Discrete Cosine Transform ) matrix multiplication in the transformation process can be implemented using butterfly transforms and SIMD optimization according to the target operating platform.
For the 2NX2N residual pixel block selected for carrying out the first transformation quantization algorithm, only the coefficient of the upper left corner pixel block of NXN is subjected to relevant transformation operation, transformation and quantization of other coefficient positions are not calculated any more, the value is directly set to 0, and the whole time consumption of the transformation and quantization process in the encoding process is reduced. And the SIMD instructions of each platform and the butterfly transformation of the first transformation quantization algorithm are combined to accelerate the instruction set, so that the method has the characteristics of low computational complexity and short encoding time.
As can be seen from fig. 3, compared to the corresponding embodiment of fig. 2, the residual pixel block selection step and the transform quantization step are highlighted by a flow 300 of the transform quantization method of video coding in this embodiment. Thus, the scheme described in this embodiment proposes a fast SIMD transform quantization algorithm based on low frequency coefficient selection according to the characteristic that the residual pixel block is concentrated in the upper left corner of the energy low frequency component after transformation, and taking into account the quantization thought. And flexibly selecting whether to adopt a rapid transformation algorithm or not according to comparison between the transformed low-frequency edge position coefficient and a threshold value. The residual pixel block selected for carrying out the rapid algorithm only carries out transformation and quantization on the upper left corner pixel block, the transformation and quantization of other coefficient positions are not calculated any more, the residual pixel block is directly set to 0, the whole 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 method shown in the foregoing figures, the present disclosure provides an embodiment of a transformation quantization apparatus for video coding, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 6, the transformation quantization apparatus 600 of video coding of the present embodiment may include: a coding module 601, a selection module 602, and a transform quantization module 603. Wherein, the encoding module 601 is configured to encode the video to obtain a residual pixel block; a selection module 602 configured to select a partial residual pixel block from the residual pixel blocks; the transform quantization module 603 is configured to transform quantize the selected residual pixel block using a first transform quantization algorithm, and transform quantize the remaining residual pixel block using a second transform quantization algorithm, resulting in a quantized signal, wherein the first transform quantization algorithm transforms and quantizes a portion of the coefficients and the second transform quantization algorithm transforms and quantizes all of the coefficients.
In the present embodiment, in the transform quantization apparatus 600 for video coding: the specific processing and the technical effects of the encoding module 601, the selecting module 602, and the transformation quantization module 603 may refer to the relevant descriptions of steps 201-203 in the corresponding embodiment of fig. 2, and are not repeated herein.
In some alternative implementations of the present embodiment, the selection module 602 is further configured to: calculating a threshold value according to the quantization coefficient; calculating an absolute value of an edge coefficient according to pixels of the residual pixel block; and selecting a residual pixel block with an edge coefficient absolute value not greater than a threshold value from the residual pixel blocks.
In some optional implementations of this embodiment, the edge coefficients are coefficients of the residual block of pixels after the edge locations other than the block of pixels in the upper left corner are transformed, by calculating the sum of each row of pixels and each column of pixels other than the block of pixels in the upper left corner, and multiplying the sum by the matrix coefficients.
In some alternative implementations of the present embodiment, the transform quantization module 603 includes: a first transform quantization sub-module configured to matrix multiply transform and quantize an upper left corner pixel block of the selected residual pixel block using residual block coefficients and zero pixels of the selected residual pixel block other than the upper left corner pixel block.
In some optional implementations of this embodiment, the transform quantization module 603 further includes: and the optimizing sub-module is configured to optimize the single-instruction multi-data stream for the first transformation quantization algorithm.
In some alternative implementations of the present embodiment, the transform quantization module 603 includes: a second transform quantization sub-module configured to matrix multiply transform and quantize the residual pixel block remaining using residual block coefficients.
In some alternative implementations of the present embodiment, the encoding module 601 is further configured to: performing predictive coding on the video 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.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 illustrates 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. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate 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 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an 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.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The calculation unit 701 performs the respective methods and processes described above, for example, a transform quantization method of video coding. For example, in some embodiments, the transform quantization method of video encoding may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM 702 and/or communication unit 709. When a 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 computing unit 701 may be configured to perform the transform quantization method of video encoding by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out 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/operations specified in the flowchart and/or block diagram to be implemented. 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. The 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 portable 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions provided by the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (12)

1. A method of transform quantization for video coding, comprising:
encoding the video to obtain a residual pixel block;
selecting a partial residual pixel block from the residual pixel blocks;
transforming and quantizing the selected residual pixel blocks by using a first transformation and quantization algorithm, and transforming and quantizing the residual pixel blocks by using a second transformation and quantization algorithm to obtain quantized signals, wherein the first transformation and quantization algorithm transforms and quantizes part of coefficients, and the second transformation and quantization algorithm transforms and quantizes all coefficients;
wherein said selecting a partial residual pixel block from said residual pixel blocks comprises:
calculating a threshold value according to the quantization coefficient;
calculating an absolute value of an edge coefficient according to pixels of the residual pixel block, wherein the edge coefficient is a coefficient obtained by converting edge positions except for an upper left corner pixel block in the residual pixel block, and is obtained by calculating a sum of each row of pixels except for the upper left corner pixel block and each column of pixels and multiplying the sum of matrix coefficients;
and selecting a residual pixel block with an edge coefficient absolute value not larger than the threshold value from the residual pixel blocks.
2. The method of claim 1, wherein the transform quantizing the selected residual pixel block using the first transform quantization algorithm comprises:
matrix multiplication and quantization are performed on the upper left corner pixel block of the selected residual pixel block by using the residual block coefficients, and pixels in the selected residual pixel block except for the upper left corner pixel block are zeroed out.
3. The method of claim 2, wherein after said transform quantizing the selected residual pixel block using the first transform quantization algorithm, further comprising:
and carrying out single-instruction multi-data stream optimization on the first transformation quantization algorithm.
4. A method according to any of claims 1-3, wherein said using a second transform quantization algorithm to transform quantize the remaining residual pixel block comprises:
and performing matrix multiplication transformation and quantization on the residual pixel blocks by using the residual block coefficients.
5. A method according to any of claims 1-3, wherein said encoding the video resulting in a residual block of pixels, comprising:
performing predictive coding on the video to obtain an original pixel block and a predicted pixel block;
and subtracting the original pixel block from the predicted pixel block to obtain the residual pixel block.
6. A transform quantization apparatus for video coding, comprising:
the encoding module is configured to encode the video to obtain a residual pixel block;
a selection module configured to select a partial residual pixel block from the residual pixel blocks;
a transform quantization module configured to transform quantize the selected residual pixel block using a first transform quantization algorithm that transforms and quantizes a portion of the coefficients, and transform quantize the remaining residual pixel block using a second transform quantization algorithm that transforms and quantize all of the coefficients, resulting in a quantized signal;
wherein the selection module is further configured to:
calculating a threshold value according to the quantization coefficient;
calculating an absolute value of an edge coefficient according to pixels of the residual pixel block, wherein the edge coefficient is a coefficient obtained by converting edge positions except for an upper left corner pixel block in the residual pixel block, and is obtained by calculating a sum of each row of pixels except for the upper left corner pixel block and each column of pixels and multiplying the sum of matrix coefficients;
and selecting a residual pixel block with an edge coefficient absolute value not larger than the threshold value from the residual pixel blocks.
7. The apparatus of claim 6, wherein the transform quantization module comprises:
a first transform quantization sub-module configured to matrix multiply transform and quantize an upper left corner pixel block of the selected residual pixel block using residual block coefficients and zero pixels of the selected residual pixel block other than the upper left corner pixel block.
8. The apparatus of claim 7, wherein the transform quantization module further comprises:
and the optimizing sub-module is configured to optimize the single-instruction multi-data stream for the first transformation quantization algorithm.
9. The apparatus of any of claims 6-8, wherein the transform quantization module comprises:
a second transform quantization sub-module configured to matrix multiply transform and quantize the residual pixel block remaining using residual block coefficients.
10. The apparatus of any of claims 6-8, wherein the encoding module is further configured to:
performing predictive coding on the video to obtain an original pixel block and a predicted pixel block;
and subtracting the original pixel block from the predicted pixel block to obtain the residual pixel block.
11. An electronic device, comprising:
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 of any one of claims 1-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
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 CN115174908A (en) 2022-10-11
CN115174908B true 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 (9)

* 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
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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11153594B2 (en) * 2016-08-29 2021-10-19 Apple Inc. Multidimensional quantization techniques for video coding/decoding systems
EP3939312A4 (en) * 2019-03-11 2022-04-27 Tencent America Llc Improvement for inter pdpc mode

Patent Citations (9)

* 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
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
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
CN115174908A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
US11694125B2 (en) Image encoder using machine learning and data processing method of the image encoder
US20070019877A1 (en) Variable length coding for clustered transform coefficients in video compression
CN106937111B (en) Method and system for optimizing image compression quality
JP6698142B2 (en) Method and apparatus for encoding video data
WO2023045420A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN107211133A (en) Method, device and the decoding device of inverse quantization conversion coefficient
US20230336733A1 (en) Sample Adaptive Offset
CN104602030A (en) Encoding method and device and server
WO2022193916A1 (en) Method and apparatus for sample adaptive offset, device, and medium
CN113259667B (en) Video quantization method, video quantization device, electronic equipment and computer-readable storage medium
US8036471B2 (en) Joint amplitude and position coding of coefficients for video compression
JP2022520295A (en) Prediction method for decoding, its device, and computer storage medium
CN115174908B (en) Transformation quantization method, device, equipment and storage medium for video coding
US10735733B2 (en) Method and device for encoding video data
CN113422957B (en) Quantization method, apparatus, device and storage medium in video coding
CN113099241B (en) Reference frame list updating method, device, equipment and storage medium
CN115118972A (en) Video image coding and decoding method and related equipment
Lu et al. Image Compression Based on Mean Value Predictive Vector Quantization.
WO2022258055A1 (en) Point cloud attribute information encoding and decoding method and apparatus, and related device
CN115883832A (en) Video coding processing method, device, equipment and medium based on artificial intelligence
CN115661273B (en) Motion vector prediction method, motion vector prediction device, electronic equipment and storage medium
CN113068033B (en) Multimedia inverse quantization processing method, device, equipment and storage medium
US11330258B1 (en) Method and system to enhance video quality in compressed video by manipulating bit usage
WO2023025024A1 (en) Point cloud attribute coding method, point cloud attribute decoding method and terminal
CN117061753A (en) Method and apparatus for predicting inter-coded motion vector

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