CN114556430A - Data processing method and device, image signal processor and movable platform - Google Patents
Data processing method and device, image signal processor and movable platform Download PDFInfo
- Publication number
- CN114556430A CN114556430A CN202080071445.2A CN202080071445A CN114556430A CN 114556430 A CN114556430 A CN 114556430A CN 202080071445 A CN202080071445 A CN 202080071445A CN 114556430 A CN114556430 A CN 114556430A
- Authority
- CN
- China
- Prior art keywords
- target
- coefficient
- interval
- quantization parameter
- dct
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
A data processing method and device, an image signal processor and a movable platform determine a first quantization parameter from a preset search interval, and acquire a code rate (101) corresponding to the first quantization parameter; updating the search interval based on the code rate corresponding to the first quantization parameter, wherein the updated search interval is a subinterval of the search interval before updating (102); and determining a target quantization parameter based on the updated search interval, wherein the code rate corresponding to the target quantization parameter is less than or equal to a preset code rate (103).
Description
The present disclosure relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, an image signal processor, and a movable platform.
When data processing is performed, in order to save storage resources and calculation resources of a processing device, quantization processing is often required on the data. The quantization process generally determines a target quantization parameter, and then performs quantization processing based on the determined target quantization parameter. However, there are generally two conventional methods for determining the target quantization parameter, one is to traverse each quantization parameter in the search space to determine the optimal target quantization parameter, which is inefficient; the other method is to obtain target quantization parameters based on certain characteristics or adopt fixed target quantization parameters, and the quantization error is large in this way, so that the reconstructed image is easy to be seriously distorted in some scenes.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a data processing method and apparatus, an image signal processor, and a movable platform to efficiently determine an optimal target quantization parameter, thereby improving the efficiency of determining the target quantization parameter and reducing quantization errors.
According to a first aspect of embodiments of the present disclosure, there is provided a data processing method, the method including: determining a first quantization parameter from a preset search interval, and acquiring a code rate corresponding to the first quantization parameter; updating the search interval based on the code rate corresponding to the first quantization parameter, wherein the updated search interval is a sub-interval of the search interval before updating; and determining a target quantization parameter based on the updated search interval, wherein the code rate corresponding to the target quantization parameter is less than or equal to a preset code rate.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing apparatus comprising a processor configured to perform the steps of: determining a first quantization parameter from a preset search interval, and acquiring a code rate corresponding to the first quantization parameter; updating the search interval based on the code rate corresponding to the first quantization parameter, wherein the updated search interval is a sub-interval of the search interval before updating; and determining a target quantization parameter based on the updated search interval, wherein the code rate corresponding to the target quantization parameter is less than or equal to a preset code rate.
According to a third aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to any of the embodiments of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, an image signal processor is provided, which includes the data processing apparatus according to any of the embodiments of the present disclosure.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a movable platform, comprising a body; the power system is arranged in the machine body and used for providing power for the movable platform; and one or more processors disposed in the body for performing the method of any of the embodiments of the present disclosure.
By applying the scheme of the embodiment of the disclosure, the first quantization parameter is determined from a large search interval, then the search interval is updated to be a sub-interval of the search interval based on the code rate corresponding to the first quantization parameter, so that the search range is reduced, and then the target quantization parameter is determined from the sub-interval, so that the code rate corresponding to the finally determined target quantization parameter is smaller than or equal to the preset code rate. By the method, the optimal target quantization parameter can be searched by using fewer search times, the search efficiency of the target quantization parameter is improved, and the quantization error is reduced.
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flow chart of a data processing method of an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of image tiling of an embodiment of the present disclosure.
Fig. 3 is a schematic diagram of a rearrangement of UV units in an embodiment of the present disclosure.
Fig. 4 is a schematic diagram of a scanning manner of DCT transform coefficients according to an embodiment of the present disclosure.
Fig. 5 is a schematic diagram of an implementation process of a fixed rate coding scheme according to an embodiment of the present disclosure.
Fig. 6 is a schematic diagram of a discard coefficient of an embodiment of the disclosure.
Fig. 7 is a schematic diagram of a codestream structure according to an embodiment of the present disclosure.
Fig. 8 is an architecture schematic diagram of an encoder of an embodiment of the present disclosure.
Fig. 9 is a schematic diagram of a data processing apparatus of an embodiment of the present disclosure.
FIG. 10 is a schematic view of a movable platform of an embodiment of the disclosure.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to improve the data processing efficiency of the data processing apparatus and reduce the power consumption and bandwidth overhead of the data processing apparatus, it is often necessary to compress data during data processing. One commonly used compression method is to select a certain quantization parameter to perform quantization processing on data, thereby implementing data compression with a certain code rate. In some embodiments, the data may be compressed to a fixed code rate, i.e., the code rate of the compressed data is fixed. However, conventional approaches to determining a target quantization parameter typically require traversing the individual quantization parameters in the search space, which is inefficient.
As shown in fig. 1, an embodiment of the present disclosure provides a data processing method, which may include:
step 101: determining a first quantization parameter from a preset search interval, and acquiring a code rate corresponding to the first quantization parameter;
step 102: updating the search interval based on the code rate corresponding to the first quantization parameter, wherein the updated search interval is a sub-interval of the search interval before updating;
step 103: and determining a target quantization parameter based on the updated search interval, wherein the code rate corresponding to the target quantization parameter is less than or equal to a preset code rate.
According to the method and the device, the first quantization parameter is determined from a large search interval, then the search interval is updated to be a sub-interval of the search interval based on the code rate corresponding to the first quantization parameter, so that the search range is reduced, and then the target quantization parameter is determined from the sub-interval, so that the code rate corresponding to the finally determined target quantization parameter is smaller than or equal to the preset code rate. By the method, the optimal target quantization parameter can be searched by using fewer search times, the search efficiency of the target quantization parameter is improved, and the quantization error is reduced.
The data processing method of the embodiment of the present disclosure may be used to perform quantization processing on various data, for example, the data may be a Transform coefficient (DCT Transform coefficient for short) of Discrete Cosine Transform (DCT), and the DCT Transform coefficient may be obtained by performing DCT Transform on an image. As another example, the data may be input feature data of a convolutional neural network and/or convolution kernel parameters. In practical applications, the data may also be other types of data, which is not described herein again.
The search interval may include a plurality of nodes, adjacent nodes change according to a certain step length, and the change step lengths between different nodes may be the same or different. The step size may be 1 or a value greater than 1. For example, the search interval may be {1,2,3, … … }, i.e., the step size between two adjacent nodes in the search interval is 1. For another example, the search interval may be {1,2,3, … …, m, m +2, m +4, … …, n +3, n +6, n +9, … … }, i.e., the step sizes of different nodes in the search interval are different. The length of the search interval (i.e., the number of nodes included in the search interval) and the step size between the nodes in the search interval may be set according to actual needs.
When determining the target quantization parameter, a first quantization parameter may be determined from the search interval, where the first quantization parameter may be any node in the search interval except an end point, where the end point of the search interval is a node with the largest value and the smallest value in the search interval. For example, for a search interval {1,2,3, … …,100}, the end points of the search interval are two nodes, 1 and 100. In order to improve the search efficiency, the intermediate node of the search interval may be used as the first quantization parameter. Assuming that there are N nodes arranged in sequence according to values in the search interval, the middle node between the searches is the [ N/2] th node, where [ ] represents a rounding operation, which may be rounding up or rounding down.
In some embodiments, a target interval, which is one of the first intervals, may be determined from the search interval by using binary search, and then a target node may be determined from a plurality of nodes included in the target interval by using binary search; determining the first quantization parameter based on the target node. The first interval is a preset sub-interval of the search interval. When a target interval is determined from a search interval, a code rate corresponding to an intermediate node of the search interval can be determined; updating the search interval to a subinterval of the search interval based on the code rate corresponding to the intermediate node; returning to the step of determining the code rate corresponding to the intermediate node of the search interval until a preset condition is met; and determining the subintervals meeting the preset conditions as the target interval. If the code rate corresponding to the intermediate node is greater than a preset code rate, determining a subinterval in the search interval, in which the intermediate node is the left end point, as a target interval (that is, the target interval is a right half part of the search interval, in which the intermediate node is the boundary); and if the code rate corresponding to the intermediate node is less than or equal to a preset code rate, determining a subinterval taking the intermediate node as a right end point in the search interval as a target interval (namely, the target interval is the left half part of the search interval taking the intermediate node as a boundary). The preset condition may be that the number of search times reaches a preset number, that the number of nodes in the searched target interval is less than or equal to the preset number, or other conditions. When determining the target node from the target interval, the target interval may be used as a search interval, and the target node may be determined in the same manner as the above-described determination of the target interval from the search interval until the optimal target node is determined.
In some embodiments, a first one of the plurality of nodes of each of the first intervals is an endpoint of the first interval; the determining a target interval from the search interval by using binary search includes: determining a target endpoint from endpoints of each first interval by adopting binary search; and determining a first interval in which the target endpoint is positioned as the target interval. For example, in another embodiment, the target end point is determined from the right end points of the respective first intervals.
Specifically, the first endpoint may be obtained from endpoints of each first interval, where the first endpoint is an endpoint other than the minimum endpoint and the maximum endpoint in the quota endpoints of each first interval. For example, the first endpoint includes a middle endpoint of the endpoints in the first interval. Because the larger the quantization parameter is, the smaller the corresponding code rate is, if the code rate corresponding to one of the first end points is less than or equal to the preset code rate, the target end point is determined from the end points of other first intervals which are less than the first end point. Similarly, if the code rate corresponding to the first endpoint is greater than the preset code rate, determining a target endpoint from the endpoints greater than the first endpoint.
The nodes in each of the plurality of first intervals may vary according to a preset first step size. In some embodiments, the first step sizes of the node changes in any two of the plurality of first intervals are not equal. For example, the first step size of the node in the first interval a is 1, the first step size of the node in the first interval B is 2, the first step size of the node in the first interval C is 3, and the first step size of the node in the first interval D is 4. It can be understood by those skilled in the art that, in addition to the above embodiments, the first step length of the node in each first interval may also adopt other values, and details are not described here.
Further, the code rate corresponding to the target node can be compared with the code rate corresponding to the calibration node; and the calibration node is obtained by changing a second step length for the target node, wherein the first step length is larger than the second step length. The number of the calibration nodes may be one or more, for example, the target node may be decreased by a second step length to obtain a first calibration node, and a code rate corresponding to the first calibration node is compared with a code rate corresponding to the target node. And increasing a second step length to the target node to obtain a second calibration node, and comparing the code rate corresponding to the second calibration node with the code rate corresponding to the target node. The second step size may be half the first step size or any integer value smaller than the first step size. If no calibration node meeting a first condition exists, determining the target node as the target quantization parameter; and/or if a calibration node meeting a first condition exists, determining the calibration node as the target quantization parameter; the first condition is: and the code rate corresponding to the calibration node is smaller than the code rate corresponding to the target node. In this way, the search accuracy can be improved, thereby improving the quantization performance of the searched target quantization parameter.
As a specific embodiment, the range of the search interval is [0,198], where the search interval includes 4 first intervals, each first interval includes 8 nodes QP, and the first step size of each node in the same first interval is equal. The left end of each first interval is formed into an array of qpgrupstart [4] ═ {0,16,48,96}, which indicates that the left end of each first interval is 0,16,48, and 96, respectively, and the first step of each first interval is formed into an array of qpStep [4] ═ {2,4,6,12}, which indicates that the first step of each first interval is 2,4,6, and 12, respectively. In the search interval, the left calibration node of each node and the first step size of the node form an array of qpFine [32] ═ 0,1,1,1,1,1,1, 2,2,2,2,2,2,3,3,3,3,3,3,3, 6,6,6,6}, for example, in a first interval a with 0 as a left end point, the left calibration node of the node 0 (simply referred to as node 0) does not exist, and thus the first step size of the left calibration node of the node 0 and the node 0 is 0. The left calibration node of node 2 is 1, i.e. the first step size of node 2 and its left calibration node is 1. The relationship between the nodes and the calibration nodes in the other first intervals is similar to the first interval a, and is not described herein again. Firstly, four nodes in the qppgroupstart are used for encoding, and an optimal first interval bestQPGroup can be selected by encoding twice by using a dichotomy. There are 8 nodes QP in the bestQPGroup, and 4 times of encoding can select the optimal node bestQP using the dichotomy. After bestQP is obtained, encoding can be tried again on the left and right calibration nodes of bestQP to obtain the target quantization parameter QPfinal. If the code rate corresponding to the left and right alignment nodes of bestQP is greater than bestQP, then bestQP is determined as the target quantization parameter. By adopting the interval division mode and the node search mode, the optimal target quantization parameter QPfinal can be found only by searching for 7 times, the search efficiency of the target quantization parameter is improved, the target quantization parameter close to the optimal can be found efficiently, and the quantization error is reduced remarkably.
In some embodiments, the target quantization parameter is used for performing quantization processing on a DCT transform coefficient obtained by performing DCT transform on an image. After the target quantization parameters are obtained, the target quantization parameters may be used for quantization processing on the Y component, the U component, and the V component of the image, respectively. The target quantization parameters corresponding to the Y component, the U component, and the V component may be the same. Or, a first weight corresponding to the Y component, a second weight corresponding to the U component, and a third weight corresponding to the V component of the image may be obtained; weighting the target quantization parameter based on the first weight to obtain a target quantization parameter corresponding to the Y component; weighting the target quantization parameter based on the second weight to obtain a target quantization parameter corresponding to the U component; and weighting the target quantization parameter based on the third weight to obtain a target quantization parameter corresponding to the V component. Because human eyes have different sensitivities to the Y component, the U component and the V component, the quantization result can better accord with the observation rule of the human eyes through weighting processing, and therefore user experience is improved. In practical applications, since the human eye is more sensitive to the Y component, the first weight is smaller than the second weight, and the first weight is smaller than the third weight. The second weight and the third weight may be the same or different.
Under the condition that the target quantization parameter is used for performing quantization processing on the DCT coefficient, the image can be partitioned to obtain a plurality of image blocks; and then performing DCT on each image block respectively. In some embodiments, any two image blocks of the plurality of image blocks may be independently encoded. Wherein any two of the plurality of image blocks are non-overlapping such that any two of the plurality of image blocks can be independently encoded. Because each image block can be independently coded, the coding process of one image block does not need to depend on another image block, and thus the coding efficiency of the image block can be improved. As shown in fig. 2, is a schematic diagram of image blocking according to an embodiment of the present disclosure. The original image has a size of 128 × 12, and may be divided into 6 non-overlapping image blocks slice0 to slice5, where each image block has a size of 64 × 4. It should be noted that the above-mentioned partitioning manner is only an exemplary illustration, and in practical applications, the size of the image and the size of the image block may be other values, and the sizes of the image blocks may be equal or different.
In some embodiments, the height of the image block is determined based on a height of a DCT transform kernel that DCT transforms the image, the DCT transform kernel being a matrix used to DCT transform the image. The height of the image block should be greater than or equal to the height of the DCT transformation kernel. For example, in the case where the height of an image block is equal to the height of a DCT transform core, the size of the DCT transform core that can be adopted for an image block of size 64 × 4 is 16 × 4, 8 × 4, or 4 × 4.
Conventional DCT-based transforms are all square and require a large line buffer (lineBuffer) overhead. For example, when DCT-transforming with a DCT-transforming core of size 16 × 16, 16 lines of data in an image block need to be buffered. In some embodiments, the DCT transform employed in embodiments of the present disclosure is an asymmetric DCT transform that employs a DCT transform kernel having a length greater than its width. For example, the DCT transform kernel has a size of 16 × 4 or 8 × 4. The pixels in the vertical direction can be reduced by adopting the asymmetric DCT, so that the overhead of line cache is effectively reduced. In other embodiments, the DCT transform may be a symmetric DCT transform, and the size of a DCT transform kernel used in the DCT transform may be smaller than a predetermined size. For example, the DCT transform kernel has a size of 4 × 4. The line cache overhead can also be reduced by using a smaller size DCT transform kernel. The DCT transformation formula is as follows:
C M×N=T M×B N×M×T' N;
in the formula, CM×NFor a matrix of DCT transform coefficients, T, obtained by means of DCT transformationMAnd TNDCT transformation kernels of order M and N, respectively,' denoted transpose operation, BN×MIs an input image block with M rows and N columns.
In some embodiments, before separately performing the DCT transform on each image block, the image blocks may be rearranged according to a size of a DCT transform core that performs the DCT transform on the image block, so that the size of the image block is adapted to the size of the DCT transform core. Taking YUV420 format as an example, as shown in fig. 3, the number of U components and V components in a 64 × 4 image block is only 32 × 2, and the number of rows does not satisfy the DCT requirement of 8 × 4, so the U components and V components can be rearranged, and each 16 × 2 pixels in the U components and V components are rearranged into an 8 × 4 DCT transform unit. Those skilled in the art will appreciate that the image in the embodiments of the present disclosure is not limited to YUV420 format, and for images in other formats, the image blocks may be rearranged according to the proportion of each component in the format.
Optionally, before rearranging the image block, the pixel value of each pixel point of the input image may be respectively subtracted from the median of the pixel value range, so as to obtain a distribution in which the difference is centered at 0. The pixel value range is all pixel values that can be represented by the bit depth of the pixel, for example, when the pixel depth is 5, the pixel value range is [0,31 ]. By the method, the bit number of data coding can be reduced, and the subsequent DCT transformation is facilitated. The transformation formula is as follows:
DCShifted=Input-2 N-1;
where N denotes the bit depth of a pixel, Input is the pixel value of the Input image, and DCShifted is the pixel value of the transformed image.
After determining the target quantization parameter based on the updated search interval, the DCT transform coefficient may be quantized based on the target quantization parameter to obtain a quantized DCT transform coefficient, and then the quantized DCT transform coefficient may be encoded to obtain an encoded code stream. The formula for quantizing the DCT-transformed coefficients based on QPbest is as follows:
qResi[i]=round(coef[i]/QPfinal)
qResi [ i ] denotes the ith quantized DCT transform coefficient, round () is a rounded function, and coef [ i ] denotes the ith DCT transform coefficient before quantization.
In some embodiments, the quantized DCT transform coefficients may be subjected to grid scanning in a specific order to obtain a one-dimensional array corresponding to the quantized DCT transform coefficients; and sequentially coding each quantized DCT coefficient in the one-dimensional array. Wherein the specific order may be an order of importance. Because human eyes are more sensitive to high-frequency components in the image, the importance of the quantized DCT transform coefficients corresponding to the high-frequency components in the image is higher than that of the quantized DCT transform coefficients corresponding to the low-frequency components, so that the quantized DCT transform coefficients of the high-frequency components with higher importance can be scanned to the front position in the one-dimensional array, and the quantized DCT transform coefficients of the low-frequency components with lower importance can be scanned to the rear position in the one-dimensional array. The quantized DCT transform coefficients are rearranged according to the importance, and the code rate control under the fixed-magnification compression can be effectively realized. Fig. 4 is a schematic diagram of a grid scanning mode according to some embodiments. Wherein the arrow indicates the scanning direction, the upper half of the figure indicates a matrix of quantized DCT transform coefficients, the numbers in the matrix indicate the original arrangement order of the quantized DCT transform coefficients, and the arrow indicates the scanning order. (ii) a The lower half indicates an index number and a transform coefficient type corresponding to the scan order, where, for example, a quantized DCT transform coefficient whose upper half number is 0 corresponds to a Direct Current (DC) coefficient, and a quantized DCT transform coefficient whose upper half number is greater than 0 corresponds to an Alternating Current (AC) coefficient.
Further, the one-dimensional array includes a first one-dimensional array corresponding to the Y component of the image, the one-dimensional array includes a second one-dimensional array corresponding to the U component of the image, and the one-dimensional array includes a third one-dimensional array corresponding to the V component of the image. The quantized DCT transform coefficients of the first one-dimensional array, the quantized DCT transform coefficients of the second one-dimensional array, and the quantized DCT transform coefficients of the third one-dimensional array may be arranged according to an importance parameter of each quantized DCT transform coefficient in the one-dimensional array. The one-dimensional arrays corresponding to the components can be generated in the same scanning mode. Then, each quantized DCT transform coefficient arranged in the first one-dimensional array, each quantized DCT transform coefficient arranged in the second one-dimensional array, and each quantized DCT transform coefficient arranged in the third one-dimensional array may be interleaved, and then each interleaved quantized DCT transform coefficient may be sequentially encoded.
The interleaving pattern is yuyyvyu …. The order of encoding the interleaved quantized DCT transform coefficients is from left to right and from top to bottom, i.e., all DCs in the first column are encoded first, and then all ACs 0 in the second column are encoded, each column being encoded from top to bottom.
In some embodiments, the dc coefficients may be Variable Length Coding (VLC) coded. For example, if the dc coefficient is smaller than a preset threshold, rice golomb encoding is performed on the dc coefficient. For another example, if the dc coefficient is greater than or equal to a predetermined threshold, the dc coefficient is exponentially golomb encoded. The embodiment of the disclosure effectively reduces the hardware overhead while ensuring the coding efficiency by adopting the coding mode combining rice Columbus coding and exponential Columbus coding.
Further, if the dc coefficient is the first dc coefficient in the first quantized DCT transform coefficient, performing variable length coding on the dc coefficient; and if the direct current coefficient is not the first direct current coefficient in the first quantization DCT transform coefficient, performing variable length coding on the residual error of the direct current coefficient. The residual of the ith dc coefficient may be a difference between the ith dc coefficient and the jth dc coefficient, where j is smaller than i. In practical applications, j may be equal to i-1, i.e. the residual of one dc coefficient is the difference between the dc coefficient and its previous dc coefficient. The variable length coding of the residual is performed in the same manner as that of the variable length coding of the dc coefficient, that is, if the residual is smaller than a preset threshold, rice golomb coding is performed on the residual. And if the residual error is greater than or equal to the preset threshold value, carrying out exponential Golomb coding on the residual error.
The ac coefficients may be encoded using a combination of variable length coding and Run-length (Run _ level) coding. For example, the alternating current coefficient before the specified coefficient position may be variable-length coded. For another example, the alternating current coefficient after the designated coefficient position may be run-length coded to obtain a first coded value, and the first coded value may be variable-length coded. The method of variable-length coding the ac coefficient is the same as the method of variable-length coding the dc coefficient. For example, if the ac coefficient is smaller than a preset threshold, rice golomb encoding is performed on the ac coefficient. For another example, if the ac coefficient is greater than or equal to a predetermined threshold, the ac coefficient is exponentially golomb-encoded.
The Run _ level encoding flow is as follows: assume that the quantized coefficients are 10,9,0,3,0,1,0,8,2, -1, -3,0,0,0,0, 1. Level represents a value of a non-zero value, i.e., Level: 10,9,3,1,8,2, -1, -3,1. Run indicates that a non-0 value is preceded by several consecutive 0's, i.e., Run: 0,0,1,1,1,0,0,0,4. Thus Run _ level is (0,10), (0,9), (1,3), (1,1), … (4, 1).
Because the former coefficient in the DCT transform coefficient is more complex, the number of 0 is less, and the coding efficiency using Run _ level is lower. Therefore, the DCT transform coefficients before the specified coefficient position are directly encoded, i.e. only level is retained and encoded. And run-length coding is carried out on the DCT transformation coefficient after the position of the appointed coefficient, and then secondary coding is carried out on the coding result obtained by the run-length coding. By the mode, the coding efficiency can be effectively improved. Wherein the specified coefficient position may be preset empirically.
As shown in fig. 5, the fixed rate coding of the embodiment of the present disclosure obtains the minimum quantization error by continuously searching for a node, where the process of searching for a node is as described in the above quantization process, and the basic principle is to search for the minimum node while satisfying the requirement of compression rate. Specifically, in step 501, DCT transform coefficients obtained by DCT transform may be acquired. In step 502, quantization processing may be performed on the DCT transform coefficients to obtain quantized DCT transform coefficients. In step 503, the quantized DCT transform coefficients may be scanned and then subjected to an encoding process. Comparing the code rate corresponding to the currently searched node with a preset code rate every time a node is searched, and if the code rate is smaller than the preset code rate, executing step 505, namely searching a smaller node; if the code rate is greater than the preset code rate, step 504 is performed, i.e., a larger node is searched. Some DCT transform coefficients may be discarded if the smallest node has been found but the compression rate is still not satisfied. Then, in step 506, the code word obtained by encoding may be filled, and in step 507, a code stream with a preset code rate is obtained.
In the above process, the discarded DCT transform coefficient may be a DCT transform coefficient of lower importance. The principle of discarding is to find the last coefficient that can be coded under the requirement of code rate, and the coefficients after the coefficient are all discarded. If the DCT transform coefficients have been arranged into a one-dimensional array, the third quantized DCT transform coefficient in the one-dimensional array may be directly encoded, and the quantized DCT transform coefficient after the third quantized DCT transform coefficient is discarded, where the code rate of the third quantized DCT transform coefficient is less than or equal to the preset code rate, and the code rate of the quantized DCT transform coefficient after the third quantized DCT transform coefficient is greater than the preset code rate. As shown in fig. 6, the gray italic portion is the coefficient that needs to be discarded at a fixed compression rate.
In some embodiments, as shown in fig. 7, the encoded code stream 700 includes header information 701 and encoded codeword information 702, where the header information includes: the first indication information is used for indicating the number of a first interval in which the target node is positioned; second indication information, which is used for indicating the position of the target node in the corresponding first interval; and third indication information, configured to indicate that the target quantization parameter is a target node in the first interval or a calibration node of the target node in the first interval, where a second step length of the calibration node of the target node and the second step length of the target node are smaller than a first step length corresponding to the first interval where the target node is located.
For example, when the total number of the first intervals is 4, the number of bits of the first indication information is 2bits, and is denoted as qpgrupdix (2 bits). The number of bits of the second indication information may be determined according to the number of nodes in each first interval, for example, if each first interval includes 8 nodes, the number of bits of the second indication information is 8 bits, and is denoted as qpInGroupIdx (3 bits). The number of bits of the third indication information may be 1 bit, where a value of 0 for the third indication information indicates that the target node in the first interval is determined as the target quantization parameter, and a value of 1 indicates that the calibration node of the target node is determined as the target quantization parameter. The above-mentioned code stream structure is only an exemplary illustration, and those skilled in the art can understand that the code stream structure of the embodiments of the present disclosure is not limited thereto, for example, the bit number of each indication information may be changed according to actual needs.
Further, the header information further includes reserved bits. The number of reserved bits can be set according to actual needs. The function of the reserved bits may be set according to actual needs, for example, when the number of nodes in the first interval is greater than 8, at least one of the reserved bits may be used as a part of the second indication information. Optionally, the number of reserved bits is 2 bits.
The method of embodiments of the present disclosure may be implemented by an encoder, and fig. 8 illustrates an architecture of an encoder 800 of some embodiments, including:
an image blocking unit 801, configured to perform blocking processing on an input image in a YUV format to obtain a plurality of image blocks;
a pixel converting unit 802 for converting pixel values of an input image into a distribution centered on 0;
a DCT transforming unit 803, configured to perform DCT transformation on the image output by the pixel transforming unit 802 to obtain a DCT transformation coefficient;
a quantization unit 804, configured to perform quantization processing on the DCT transform coefficient based on the target quantization parameter to obtain a quantized DCT transform coefficient;
a scanning unit 805, configured to scan the quantized DCT transform coefficient to obtain a one-dimensional array; and
and an encoding unit 806, configured to perform encoding processing on the quantized DCT transform coefficients in the one-dimensional array.
The detailed implementation manner of each functional unit is described in the foregoing embodiments, and is not described herein again.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
An embodiment of the present disclosure further provides a data processing apparatus, including a processor, where the processor is configured to execute the following steps:
determining a first quantization parameter from a preset search interval, and acquiring a code rate corresponding to the first quantization parameter;
updating the search interval based on the code rate corresponding to the first quantization parameter, wherein the updated search interval is a sub-interval of the search interval before updating;
and determining a target quantization parameter based on the updated search interval, wherein the code rate corresponding to the target quantization parameter is less than or equal to a preset code rate.
In some embodiments, the processor is configured to: determining a target interval from the search interval by adopting binary search, wherein the target interval is one of the plurality of first intervals; determining a target node from a plurality of nodes included in the target interval by adopting binary search;
determining the first quantization parameter based on the target node.
In some embodiments, a first one of the plurality of nodes of each of the first intervals is an endpoint of the first interval; the processor is configured to: determining a target endpoint from endpoints of each first interval by adopting binary search; and determining a first interval in which the target endpoint is positioned as the target interval.
In some embodiments, the processor is configured to: determining a first endpoint from endpoints of each first interval, wherein the first endpoint is the other endpoints except the minimum endpoint and the maximum endpoint in each endpoint; if the code rate corresponding to the first endpoint is smaller than or equal to the preset code rate, determining a target endpoint from all endpoints smaller than the first endpoint; and/or if the code rate corresponding to the first endpoint is greater than the preset code rate, determining a target endpoint from all endpoints greater than the first endpoint.
In some embodiments, the nodes within each of the plurality of first intervals vary by a preset first step size.
In some embodiments, the first step sizes of the node changes in any two of the plurality of first intervals are not equal.
In some embodiments, the processor is configured to: comparing the code rate corresponding to the target node with the code rate corresponding to the calibration node; the calibration node is obtained by changing a second step length for the target node, wherein the first step length is larger than the second step length; if no calibration node meeting a first condition exists, determining the target node as the target quantization parameter; and/or if a calibration node meeting a first condition exists, determining the calibration node as the target quantization parameter; the first condition is: and the code rate corresponding to the calibration node is smaller than the code rate corresponding to the target node.
In some embodiments, the target quantization parameter is used for performing quantization processing on a DCT transform coefficient obtained by performing DCT transform on an image; the processor is further configured to: acquiring a first weight corresponding to the Y component, a second weight corresponding to the U component and a third weight corresponding to the V component; weighting the target quantization parameter based on the first weight to obtain a target quantization parameter corresponding to the Y component; weighting the target quantization parameter based on the second weight to obtain a target quantization parameter corresponding to the U component; and weighting the target quantization parameter based on the third weight to obtain a target quantization parameter corresponding to the V component.
In some embodiments, the first weight is less than the second weight, and the first weight is less than the third weight.
In some embodiments, the target quantization parameter is used for quantization processing of DCT transform coefficients, the processor is further configured to: and performing DCT (discrete cosine transform) on the image to obtain the DCT coefficient.
In some embodiments, the processor is configured to: partitioning the image to obtain a plurality of image blocks; each image block is separately DCT transformed.
In some embodiments, any two image blocks of the plurality of image blocks are non-overlapping.
In some embodiments, any two image blocks of the plurality of image blocks may be independently encoded.
In some embodiments, the height of the image block is determined based on a height of a DCT transform kernel that DCT transforms the image.
In some embodiments, the DCT transform kernel is of size 16x4, 8x4, or 4x 4.
In some embodiments, the processor is configured to: and carrying out asymmetric DCT transformation on the image.
In some embodiments, the processor is further configured to: before each image block is subjected to DCT, rearranging the image blocks according to the size of a DCT transformation kernel for performing DCT transformation on the image blocks so that the size of the image blocks is matched with the size of the DCT transformation kernel.
In some embodiments, the target quantization parameter is used for performing quantization processing on a DCT transform coefficient used for performing compression processing on an image; the processor is further configured to: after a target quantization parameter is determined based on the updated search interval, carrying out quantization processing on the DCT transform coefficient based on the target quantization parameter to obtain a quantized DCT transform coefficient; and coding the quantized DCT coefficient to obtain a coded code stream.
In some embodiments, the processor is configured to: performing grid scanning on the quantized DCT coefficients according to a specific sequence to obtain a one-dimensional array corresponding to the quantized DCT coefficients; and sequentially coding each quantized DCT coefficient in the one-dimensional array.
In some embodiments, the one-dimensional array comprises a first one-dimensional array corresponding to a Y component of the image, the one-dimensional array comprises a second one-dimensional array corresponding to a U component of the image, and the one-dimensional array comprises a third one-dimensional array corresponding to a V component of the image; the processor is configured to: respectively arranging the quantized DCT coefficients of the first one-dimensional array, the quantized DCT coefficients of the second one-dimensional array and the quantized DCT coefficients of the third one-dimensional array according to the importance parameters of the quantized DCT coefficients of the one-dimensional arrays; interweaving each quantized DCT transform coefficient arranged in the first one-dimensional array, each quantized DCT transform coefficient arranged in the second one-dimensional array and each quantized DCT transform coefficient arranged in the third one-dimensional array; and sequentially coding each interleaved quantized DCT coefficient.
In some embodiments, the processor is configured to: and carrying out variable length coding on the direct current coefficient in the quantized DCT coefficient.
In some embodiments, the processor is configured to: if the direct current coefficient is smaller than a preset threshold value, performing rice Columbus coding on the direct current coefficient; and/or if the direct current coefficient is larger than or equal to a preset threshold value, carrying out exponential Golomb coding on the direct current coefficient.
In some embodiments, the processor is configured to: if the direct current coefficient is the first direct current coefficient in the first quantization DCT coefficient, performing variable length coding on the direct current coefficient; and if the direct current coefficient is not the first direct current coefficient in the first quantization DCT transform coefficient, performing variable length coding on the residual error of the direct current coefficient.
In some embodiments, the processor is configured to: variable length coding is carried out on the alternating current coefficient before the specified coefficient position; and/or carrying out run-length coding on the alternating current coefficient after the position of the specified coefficient to obtain a first coded value, and carrying out variable-length coding on the first coded value.
In some embodiments, the processor is configured to: if the target quantization parameter of the DCT transformation coefficient is not searched from the updated search interval, coding a third quantization DCT transformation coefficient in the one-dimensional array, and discarding the quantization DCT transformation coefficient behind the third quantization DCT transformation coefficient; and the code rate of the third quantized DCT coefficient is less than or equal to the preset code rate, and the code rate of the quantized DCT coefficient after the third quantized DCT coefficient is greater than the preset code rate.
In some embodiments, the encoded code stream includes header information and encoded code words, where the header information includes: the first indication information is used for indicating the number of a first interval in which the target node is positioned; second indication information, which is used for indicating the position of the target node in the corresponding first interval; and third indication information, configured to indicate that the target quantization parameter is a target node in the first interval or a calibration node of the target node in the first interval, where a second step length of the calibration node of the target node and the second step length of the target node are smaller than a first step length corresponding to the first interval where the target node is located.
In some embodiments, the header information further includes reserved bits.
In some embodiments, the processor is configured to: determining a code rate corresponding to a middle node of the search interval; updating the search interval to a subinterval of the search interval based on the code rate corresponding to the intermediate node; returning to the step of determining the code rate corresponding to the intermediate node of the search interval until a preset condition is met; and determining the subintervals meeting the preset conditions as the target interval.
For specific embodiments of the method executed by the processor in the data processing apparatus according to the embodiments of the present disclosure, reference may be made to the foregoing method embodiments, and details are not repeated here.
Fig. 9 is a schematic diagram illustrating a more specific hardware structure of a data processing apparatus according to an embodiment of the present disclosure, where the apparatus may include: a processor 901, a memory 902, an input/output interface 903, a communication interface 904, and a bus 905. Wherein the processor 901, the memory 902, the input/output interface 903 and the communication interface 904 are communicatively connected to each other within the device via a bus 905.
The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 902 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 902 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 902 and called by the processor 901 for execution.
The input/output interface 903 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 904 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
It should be noted that although the above-mentioned device only shows the processor 901, the memory 902, the input/output interface 903, the communication interface 904 and the bus 905, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The data processing device may be a chip or other form of product. In a chip, when multimedia contents such as images and videos are read and written, a large number of read and write times are often required. By searching for target quantization parameters in the mode of the embodiment of the disclosure, and adopting asymmetric DCT and a coding mode based on the combination of rice Columbus coding and exponential Columbus coding, the read-write times can be reduced, the coding efficiency is ensured, the chip bandwidth overhead is effectively reduced, and the chip power consumption is reduced.
The embodiment of the disclosure also includes an image signal processor, which includes the data processing device according to any embodiment of the disclosure.
As shown in fig. 10, an embodiment of the present disclosure further provides a movable platform 1000, including a body 1001; the power system 1002 is arranged in the machine body 1001, and the power system 1002 is used for providing power for the movable platform 1000; and one or more processors 1003 disposed in the body 1001 for performing the method according to any embodiment of the present disclosure.
The movable platform 1000 may be an unmanned aerial vehicle, unmanned ship, movable robot, or the like. At least one of the one or more processors 1003 may be the aforementioned image signal processor. The methods executed by the one or more processors 1003 may refer to the foregoing method embodiments, and are not described herein again.
The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps performed by the second processing unit in the method according to any of the foregoing embodiments.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
Various technical features in the above embodiments may be arbitrarily combined as long as there is no conflict or contradiction in the combination between the features, but the combination is limited by the space and is not described one by one, and therefore, any combination of various technical features in the above embodiments also belongs to the scope of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.
Claims (59)
- A method of data processing, the method comprising:determining a first quantization parameter from a preset search interval, and acquiring a code rate corresponding to the first quantization parameter;updating the search interval based on the code rate corresponding to the first quantization parameter, wherein the updated search interval is a sub-interval of the search interval before updating;and determining a target quantization parameter based on the updated search interval, wherein the code rate corresponding to the target quantization parameter is less than or equal to a preset code rate.
- The method of claim 1, wherein the search interval comprises a plurality of first intervals, each first interval comprising a plurality of nodes; the determining a first quantization parameter from a preset search interval includes:determining a target interval from the search interval by adopting binary search, wherein the target interval is one of the plurality of first intervals;determining a target node from a plurality of nodes included in the target interval by adopting binary search;determining the first quantization parameter based on the target node.
- The method of claim 2, wherein a first one of the plurality of nodes in each of the first intervals is an end point of the first interval; the determining a target interval from the search interval by using binary search includes:determining a target endpoint from endpoints of each first interval by adopting binary search;and determining a first interval in which the target endpoint is positioned as the target interval.
- The method of claim 3, wherein determining the target endpoint from the endpoints of each first interval using binary search comprises:determining a first endpoint from endpoints of each first interval, wherein the first endpoint is the other endpoints except the minimum endpoint and the maximum endpoint in each endpoint;if the code rate corresponding to the first endpoint is less than or equal to the preset code rate, determining a target endpoint from all endpoints which are less than the first endpoint; and/orAnd if the code rate corresponding to the first endpoint is greater than the preset code rate, determining a target endpoint from all endpoints greater than the first endpoint.
- The method of claim 2, wherein nodes within each of the plurality of first intervals vary by a preset first step size.
- The method of claim 5, wherein the first step sizes of the node changes in any two of the plurality of first intervals are not equal.
- The method of claim 5, wherein determining the target quantization parameter based on the target node comprises:comparing the code rate corresponding to the target node with the code rate corresponding to the calibration node; the calibration node is obtained by changing a second step length for the target node, and the first step length is larger than the second step length;if no calibration node meeting a first condition exists, determining the target node as the target quantization parameter; and/or if a calibration node meeting a first condition exists, determining the calibration node as the target quantization parameter;the first condition is: and the code rate corresponding to the calibration node is smaller than the code rate corresponding to the target node.
- The method according to claim 1, wherein the target quantization parameter is used for performing quantization processing on a DCT transform coefficient, the DCT transform coefficient being obtained by performing DCT transform on an image; the method further comprises the following steps:acquiring a first weight corresponding to the Y component, a second weight corresponding to the U component and a third weight corresponding to the V component;weighting the target quantization parameter based on the first weight to obtain a target quantization parameter corresponding to the Y component;weighting the target quantization parameter based on the second weight to obtain a target quantization parameter corresponding to the U component;and weighting the target quantization parameter based on the third weight to obtain a target quantization parameter corresponding to the V component.
- The method of claim 8, wherein the first weight is less than the second weight, and wherein the first weight is less than the third weight.
- The method of claim 1, wherein the target quantization parameter is used for quantization processing of DCT transform coefficients, the method further comprising:and performing DCT (discrete cosine transform) on the image to obtain the DCT coefficient.
- The method of claim 10, wherein said DCT transforming said image to obtain said DCT transform coefficients comprises:partitioning the image to obtain a plurality of image blocks;each image block is separately DCT transformed.
- The method of claim 11, wherein any two image blocks of the plurality of image blocks are non-overlapping.
- The method of claim 11, wherein any two of the plurality of image blocks are independently encoded.
- The method of claim 11, wherein the height of the image block is determined based on a height of a DCT transform kernel that DCT transforms the image.
- The method of claim 14, wherein the DCT transform kernel has a size of 16x4, 8x4, or 4x 4.
- The method of claim 10, wherein said DCT transforming said image comprises:and carrying out asymmetric DCT transformation on the image.
- The method of claim 10, further comprising:before each image block is subjected to DCT, rearranging the image blocks according to the size of a DCT transformation kernel for performing DCT transformation on the image blocks so that the size of the image blocks is matched with the size of the DCT transformation kernel.
- The method according to claim 2, wherein the target quantization parameter is used for performing quantization processing on a DCT transform coefficient used for performing compression processing on an image; the method further comprises the following steps:after a target quantization parameter is determined based on the updated search interval, carrying out quantization processing on the DCT transform coefficient based on the target quantization parameter to obtain a quantized DCT transform coefficient;and coding the quantized DCT coefficient to obtain a coded code stream.
- The method of claim 18, wherein said encoding said quantized DCT transform coefficients comprises:performing grid scanning on the quantized DCT coefficients according to a specific sequence to obtain a one-dimensional array corresponding to the quantized DCT coefficients;and sequentially coding each quantized DCT coefficient in the one-dimensional array.
- The method of claim 19, wherein the one-dimensional array comprises a first one-dimensional array corresponding to a Y component of the image, the one-dimensional array comprises a second one-dimensional array corresponding to a U component of the image, and the one-dimensional array comprises a third one-dimensional array corresponding to a V component of the image; the sequentially encoding each quantized DCT transform coefficient in the one-dimensional array comprises:respectively arranging the quantized DCT coefficients of the first one-dimensional array, the quantized DCT coefficients of the second one-dimensional array and the quantized DCT coefficients of the third one-dimensional array according to the importance parameters of the quantized DCT coefficients of the one-dimensional arrays;interweaving each quantized DCT transform coefficient arranged in the first one-dimensional array, each quantized DCT transform coefficient arranged in the second one-dimensional array and each quantized DCT transform coefficient arranged in the third one-dimensional array;and sequentially coding each interleaved quantized DCT coefficient.
- The method of claim 18, wherein said encoding said quantized DCT transform coefficients comprises:and carrying out variable length coding on direct current coefficients in the quantized DCT coefficients.
- The method according to claim 21, wherein said variable length coding of the dc coefficients of the quantized DCT transform coefficients comprises:if the direct current coefficient is smaller than a preset threshold value, performing rice Columbus coding on the direct current coefficient; and/orAnd if the direct current coefficient is larger than or equal to a preset threshold value, carrying out exponential Golomb coding on the direct current coefficient.
- The method according to claim 21, wherein said variable length coding of the dc coefficients of the quantized DCT transform coefficients comprises:if the direct current coefficient is the first direct current coefficient in the first quantization DCT coefficient, carrying out variable length coding on the direct current coefficient;and if the direct current coefficient is not the first direct current coefficient in the first quantization DCT transform coefficient, performing variable length coding on the residual error of the direct current coefficient.
- The method of claim 18, wherein said encoding said quantized DCT transform coefficients comprises:variable length coding is carried out on the alternating current coefficient before the specified coefficient position; and/orAnd carrying out run-length coding on the alternating current coefficient after the position of the specified coefficient to obtain a first coded value, and carrying out variable-length coding on the first coded value.
- The method of claim 19, wherein said sequentially encoding each quantized DCT transform coefficient in said one-dimensional array comprises:if the target quantization parameter of the DCT transformation coefficient is not searched from the updated search interval, coding a third quantization DCT transformation coefficient in the one-dimensional array, and discarding the quantization DCT transformation coefficient behind the third quantization DCT transformation coefficient;and the code rate of the third quantized DCT coefficient is less than or equal to the preset code rate, and the code rate of the quantized DCT coefficient after the third quantized DCT coefficient is greater than the preset code rate.
- The method of claim 18, wherein the encoded code stream comprises header information and encoded code words, and wherein the header information comprises:the first indication information is used for indicating the number of a first interval in which the target node is positioned;second indication information, which is used for indicating the position of the target node in the corresponding first interval; andthird indication information, configured to indicate that the target quantization parameter is a target node in the first interval or a calibration node of the target node in the first interval, where a second step length of the calibration node of the target node and the second step length of the target node are smaller than a first step length corresponding to the first interval where the target node is located.
- The method of claim 26, wherein the header information further comprises reserved bits.
- The method of claim 2, wherein determining a target interval from the search interval using a binary search comprises:determining a code rate corresponding to a middle node of the search interval;updating the search interval to a subinterval of the search interval based on the code rate corresponding to the intermediate node;returning to the step of determining the code rate corresponding to the intermediate node of the search interval until a preset condition is met;and determining the subintervals meeting the preset conditions as the target interval.
- A data processing apparatus comprising a processor, wherein the processor is configured to perform the steps of:determining a first quantization parameter from a preset search interval, and acquiring a code rate corresponding to the first quantization parameter;updating the search interval based on the code rate corresponding to the first quantization parameter, wherein the updated search interval is a sub-interval of the search interval before updating;and determining a target quantization parameter based on the updated search interval, wherein the code rate corresponding to the target quantization parameter is less than or equal to a preset code rate.
- The apparatus of claim 29, wherein the processor is configured to:determining a target interval from the search interval by adopting binary search, wherein the target interval is one of the plurality of first intervals;determining a target node from a plurality of nodes included in the target interval by adopting binary search;determining the first quantization parameter based on the target node.
- The apparatus according to claim 30, wherein a first one of the plurality of nodes in each of the first intervals is an end point of the first interval; the processor is configured to:determining a target endpoint from endpoints of each first interval by adopting binary search;and determining a first interval in which the target endpoint is positioned as the target interval.
- The apparatus of claim 31, wherein the processor is configured to:determining a first endpoint from endpoints of each first interval, wherein the first endpoint is the other endpoints except the minimum endpoint and the maximum endpoint in each endpoint;if the code rate corresponding to the first end point is less than or equal to the preset code rate, determining a target end point from all end points which are less than the first end point; and/orAnd if the code rate corresponding to the first endpoint is greater than the preset code rate, determining a target endpoint from all endpoints greater than the first endpoint.
- The apparatus of claim 30, wherein nodes within each of the plurality of first intervals vary according to a preset first step size.
- The apparatus of claim 33, wherein the first step sizes of the node changes in any two of the plurality of first intervals are not equal.
- The apparatus of claim 33, wherein the processor is configured to:comparing the code rate corresponding to the target node with the code rate corresponding to the calibration node; the calibration node is obtained by changing a second step length for the target node, wherein the first step length is larger than the second step length;if no calibration node meeting a first condition exists, determining the target node as the target quantization parameter; and/or if a calibration node meeting a first condition exists, determining the calibration node as the target quantization parameter;the first condition is: and the code rate corresponding to the calibration node is smaller than the code rate corresponding to the target node.
- The apparatus according to claim 29, wherein the target quantization parameter is used for performing quantization processing on a DCT transform coefficient, the DCT transform coefficient being obtained by performing DCT transform on an image; the processor is further configured to:acquiring a first weight corresponding to the Y component, a second weight corresponding to the U component and a third weight corresponding to the V component;weighting the target quantization parameter based on the first weight to obtain a target quantization parameter corresponding to the Y component;weighting the target quantization parameter based on the second weight to obtain a target quantization parameter corresponding to the U component;and weighting the target quantization parameter based on the third weight to obtain a target quantization parameter corresponding to the V component.
- The apparatus of claim 36, wherein the first weight is less than the second weight, and wherein the first weight is less than the third weight.
- The apparatus of claim 29, wherein the target quantization parameter is used for quantization processing of DCT transform coefficients, and wherein the processor is further configured to:and performing DCT (discrete cosine transform) on the image to obtain the DCT coefficient.
- The apparatus of claim 38, wherein the processor is configured to:partitioning the image to obtain a plurality of image blocks;each image block is separately DCT transformed.
- The apparatus of claim 39, wherein any two tiles of the plurality of tiles are non-overlapping.
- The apparatus of claim 39, wherein any two image blocks of the plurality of image blocks are independently encoded.
- The apparatus of claim 39, wherein the height of the image block is determined based on a height of a DCT transform kernel that DCT transforms the image.
- The apparatus of claim 42, wherein the DCT transform kernel is sized as 16x4, 8x4, or 4x 4.
- The apparatus of claim 38, wherein the processor is configured to:and carrying out asymmetric DCT transformation on the image.
- The apparatus of claim 38, wherein the processor is further configured to:before each image block is subjected to DCT, rearranging the image blocks according to the size of a DCT transformation kernel for performing DCT transformation on the image blocks so that the size of the image blocks is matched with the size of the DCT transformation kernel.
- The apparatus according to claim 30, wherein the target quantization parameter is used for performing quantization processing on a DCT transform coefficient, and the DCT transform coefficient is used for performing compression processing on an image; the processor is further configured to:after a target quantization parameter is determined based on the updated search interval, carrying out quantization processing on the DCT transform coefficient based on the target quantization parameter to obtain a quantized DCT transform coefficient;and coding the quantized DCT coefficient to obtain a coded code stream.
- The apparatus of claim 46, wherein the processor is configured to:performing grid scanning on the quantized DCT coefficients according to a specific sequence to obtain a one-dimensional array corresponding to the quantized DCT coefficients;and sequentially coding each quantized DCT coefficient in the one-dimensional array.
- The apparatus of claim 47, wherein the one-dimensional array comprises a first one-dimensional array corresponding to a Y component of the image, the one-dimensional array comprises a second one-dimensional array corresponding to a U component of the image, and the one-dimensional array comprises a third one-dimensional array corresponding to a V component of the image; the processor is configured to:respectively arranging the quantized DCT coefficients of the first one-dimensional array, the quantized DCT coefficients of the second one-dimensional array and the quantized DCT coefficients of the third one-dimensional array according to the importance parameters of the quantized DCT coefficients of the one-dimensional arrays;interweaving each quantized DCT transform coefficient arranged in the first one-dimensional array, each quantized DCT transform coefficient arranged in the second one-dimensional array and each quantized DCT transform coefficient arranged in the third one-dimensional array;and sequentially coding each interleaved quantized DCT coefficient.
- The apparatus of claim 46, wherein the processor is configured to:and carrying out variable length coding on the direct current coefficient in the quantized DCT coefficient.
- The apparatus of claim 49, wherein the processor is configured to:if the direct current coefficient is smaller than a preset threshold value, performing rice Columbus coding on the direct current coefficient; and/orAnd if the direct current coefficient is larger than or equal to a preset threshold value, carrying out exponential Golomb coding on the direct current coefficient.
- The apparatus of claim 49, wherein the processor is configured to:if the direct current coefficient is the first direct current coefficient in the first quantization DCT coefficient, carrying out variable length coding on the direct current coefficient;and if the direct current coefficient is not the first direct current coefficient in the first quantization DCT transform coefficient, performing variable length coding on the residual error of the direct current coefficient.
- The apparatus of claim 46, wherein the processor is configured to:variable-length coding is carried out on the alternating current coefficient before the specified coefficient position; and/orAnd carrying out run-length coding on the alternating current coefficient after the position of the specified coefficient to obtain a first coded value, and carrying out variable-length coding on the first coded value.
- The apparatus of claim 47, wherein the processor is configured to:if the target quantization parameter of the DCT transformation coefficient is not searched from the updated search interval, coding a third quantization DCT transformation coefficient in the one-dimensional array, and discarding the quantization DCT transformation coefficient behind the third quantization DCT transformation coefficient;and the code rate of the third quantized DCT coefficient is less than or equal to the preset code rate, and the code rate of the quantized DCT coefficient after the third quantized DCT coefficient is greater than the preset code rate.
- The apparatus of claim 46, wherein the encoded code stream comprises header information and encoded code words, and wherein the header information comprises:the first indication information is used for indicating the number of a first interval in which the target node is positioned;second indication information, which is used for indicating the position of the target node in the corresponding first interval; andthird indication information, configured to indicate that the target quantization parameter is a target node in the first interval or a calibration node of the target node in the first interval, where a second step length of the calibration node of the target node and the second step length of the target node are smaller than a first step length corresponding to the first interval where the target node is located.
- The apparatus of claim 54, wherein the header information further comprises reserved bits.
- The apparatus of claim 30, wherein the processor is configured to:determining a code rate corresponding to a middle node of the search interval;updating the search interval to a subinterval of the search interval based on the code rate corresponding to the intermediate node;returning to the step of determining the code rate corresponding to the intermediate node of the search interval until a preset condition is met;and determining the subintervals meeting the preset conditions as the target interval.
- A computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 28.
- An image signal processor, characterized by comprising the data processing apparatus of any one of claims 29 to 54.
- A movable platform is characterized by comprising a machine body;the power system is arranged in the machine body and used for providing power for the movable platform; andone or more processors disposed within the body for performing the method of any one of claims 1-28.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/125233 WO2022088033A1 (en) | 2020-10-30 | 2020-10-30 | Data processing method and apparatus, image signal processor, and mobile platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114556430A true CN114556430A (en) | 2022-05-27 |
Family
ID=81383476
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202080071445.2A Pending CN114556430A (en) | 2020-10-30 | 2020-10-30 | Data processing method and device, image signal processor and movable platform |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114556430A (en) |
WO (1) | WO2022088033A1 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1241148C (en) * | 2003-04-07 | 2006-02-08 | 西安交通大学 | JPEG 2000 laminated break-in point quick searching algorithm |
US8077775B2 (en) * | 2006-05-12 | 2011-12-13 | Freescale Semiconductor, Inc. | System and method of adaptive rate control for a video encoder |
CN105187835B (en) * | 2014-05-30 | 2019-02-15 | 阿里巴巴集团控股有限公司 | Adaptive video code-transferring method and device based on content |
CN110944200B (en) * | 2019-12-10 | 2022-03-15 | 南京大学 | Method for evaluating immersive video transcoding scheme |
CN111368420A (en) * | 2020-03-02 | 2020-07-03 | 厦门大学 | GPU accelerated parameter curve arc length calculation and arc length parameterization method |
-
2020
- 2020-10-30 CN CN202080071445.2A patent/CN114556430A/en active Pending
- 2020-10-30 WO PCT/CN2020/125233 patent/WO2022088033A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2022088033A1 (en) | 2022-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110024392B (en) | Low complexity symbol prediction for video coding | |
JP6923677B2 (en) | Selective mixing for entropy coding in video compression | |
US10003792B2 (en) | Video encoder for images | |
WO2020190772A1 (en) | Neural network model compression and optimization | |
JP7170669B2 (en) | Coding the last significant coefficient flag | |
US7978103B2 (en) | Code amount estimating device, image coding apparatus including the code amount estimating device, and code amount estimating method | |
US8131096B2 (en) | Variable length coding for clustered transform coefficients in video compression | |
TW201705760A (en) | Advanced arithmetic coder | |
CN112425164B (en) | Transform variants of multiple separable transform choices | |
KR20130018413A (en) | An image compression method with random access capability | |
EP1946246A2 (en) | Extended amplitude coding for clustered transform coefficients | |
US20230086264A1 (en) | Decoding method, encoding method, decoder, and encoder based on point cloud attribute prediction | |
US10735733B2 (en) | Method and device for encoding video data | |
CN114556430A (en) | Data processing method and device, image signal processor and movable platform | |
JP2022522487A (en) | Image component prediction method, encoder, decoder and storage medium | |
JPH0723385A (en) | Highly efficient encoding device | |
US11019366B2 (en) | Image compression and decompression using triangulation | |
CN107431821B (en) | Efficient low complexity video compression | |
CN114222136A (en) | Motion compensation processing method, encoder, decoder and storage medium | |
CN112073729B (en) | Model updating method, device, electronic equipment and computer readable storage medium | |
WO2022033371A1 (en) | Wavelet transform-based image encoding/decoding method and apparatus | |
JP2017183844A (en) | Image compression device, image compression method, and image compression program | |
KR20230012218A (en) | Image encoding/decoding method and apparatus using in-loop filter based on neural network and recording medium for stroing bitstream | |
CN117714684A (en) | Intra-frame prediction mode selection method, device, computer equipment and storage medium | |
JP2024500701A (en) | Point cloud encoding method, point cloud decoding method, point cloud encoding and decoding system, point cloud encoder and point cloud decoder |
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 |