Method and apparatus for calculating transform block coefficient coordinates for video decoding, computer storage medium, and chip
By configuring a coefficient position transformation table and dividing the transform block into three regions, and calculating the coefficient coordinates of the transform block based on the characteristics of each region, the problem of high hardware resource consumption in non-SRCC enabling methods is solved, thus achieving hardware resource optimization.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2026-03-19
AI Technical Summary
In the existing AVS3 reference codec, in the non-SRCC enabled method, the transform block coefficients can appear at any position in the transform block, resulting in a large amount of coefficient scan table data, which consumes a lot of hardware resources and increases hardware resource consumption.
A method for calculating the coordinates of transform block coefficients is provided. By configuring a coefficient position conversion table, the transform block is divided into three regions. Based on the characteristics of each region, the coordinates of the transform block coefficients are calculated using the coefficient position conversion table, thereby reducing hardware resource consumption.
By implementing coordinate calculations for various transform block coefficients through simplified combinational logic, the hardware resource consumption during decoding of non-SRCC enabled methods is reduced, thus solving the problem of high hardware resource consumption.
Smart Images

Figure CN2024119066_19032026_PF_FP_ABST
Abstract
Description
Method and device for calculating transform block coefficient coordinates for video decoding, computer storage medium and chip TECHNICAL FIELD
[0001] The present application relates to the technical field of video decoding, in particular to a method and device for calculating transform block coefficient coordinates for video decoding, a computer storage medium and a chip. TECHNICAL BACKGROUND
[0002] With the continuous development of digital video coding technology, the AVS3 audio and video source coding standard is launched. AVS3 is an audio and video source coding standard for 8K ultra-high-definition video and 5G industry application. Compared with the video coding standard HEVC, the performance is improved by nearly 30%, and the AVS3 video quality is significantly higher than that of H.265 / HEVC at the same code rate.
[0003] The AVS3 standard provides two decoding methods for transform block coefficients: SRCC (single region clock cable) enabled method and non-SRCC enabled method. In the SRCC enabled method, the transform block coefficients are only allowed to appear in the range of 32x32; in the non-SRCC enabled method, the transform block coefficients can appear at any position of the transform block, and the maximum transform block is 64x64. In the non-SRCC enabled method, each transform block coefficient can be easily obtained its scan order, but the scan order cannot be directly used in the decoding process and needs to be converted to coordinates before use. TECHNICAL PROBLEM
[0004] The existing AVS3 reference codec (HPM) provides various transform block coefficient scan tables to convert the decoding order of transform block coefficients to coordinates. However, due to the variety of transform blocks and the fact that transform block coefficients can appear at any position of the transform block in the non-SRCC enabled method, the data volume of the coefficient scan table is very large. In order to ensure hardware performance, the coefficient scan table is usually stored by register, which occupies a large amount of hardware resources, thereby increasing the consumption of hardware resources and being not conducive to commercial implementation. TECHNICAL SOLUTION
[0005] The present application aims to provide a method and device for calculating transform block coefficient coordinates for video decoding, a computer storage medium and a chip to solve the problem of large hardware resource consumption in the existing non-SRCC enabled method decoding.
[0006] To solve the above technical problems, the present application provides a method for calculating transform block coefficient coordinates for video decoding, comprising:
[0007] obtaining an original video bitstream and its corresponding transform block;
[0008] a coefficient position conversion table is configured with N elements, each of the elements corresponds to a diagonal line from top-left to bottom-right in an NxN transform block in sequence, and the element value of the element is the number of all coefficients in the top-left of the corresponding diagonal line;
[0009] a coordinate corresponding to a coefficient in the transform block is calculated by using the coefficient position conversion table;
[0010] the original video bitstream is continuously decoded by using the coefficient coordinate to obtain decoded video data.
[0011] Optionally, in the method for calculating the coordinate of the transform block coefficient for video decoding, the coefficient position conversion table is configured with 64 elements, each of the elements corresponds to a diagonal line from top-left to bottom-right in a 64x64 transform block in sequence.
[0012] Optionally, in the method for calculating the coordinate of the transform block coefficient for video decoding, the diagonal line includes a diagonal line with a preset angle from bottom-left to top-right.
[0013] Optionally, in the method for calculating the coordinate of the transform block coefficient for video decoding, the step of calculating the coordinate corresponding to the coefficient in the transform block by using the coefficient position conversion table includes:
[0014] the transform block is divided into a first region, a second region and a third region;
[0015] the region where the current transform block coefficient is located is determined by using the coefficient position conversion table according to the scanning order of the transform block coefficient;
[0016] the coordinate corresponding to the current transform block coefficient is calculated according to the region characteristics of the region where the current transform block coefficient is located.
[0017] Optionally, in the method for calculating the coordinate of the transform block coefficient for video decoding, the step of dividing the transform block into the first region, the second region and the third region includes:
[0018] a diagonal line is arranged on each transform block coefficient from the top-left corner of the transform block, so that the total number of the diagonal lines arranged on the transform block s = w + h - 1, wherein w is the number of transform block coefficients in the width direction of the transform block, h is the number of transform block coefficients in the height direction of the transform block, and t = min(w, h) is set;
[0019] the transform block coefficients corresponding to the first t-1 diagonal lines are divided into the first region from the top-left corner of the transform block;
[0020] the transform block coefficients corresponding to the first t-1 diagonal lines are divided into the third region from the bottom-right corner of the transform block.
[0021] the remaining diagonal corresponding to the transform block coefficient is divided into a second region.
[0022] Optionally, in the method for calculating the coordinates of the transform block coefficients for video decoding, the step of judging the region where the current transform block coefficient is located according to the scanning order of the transform block coefficients and using the coefficient position conversion table comprises:
[0023] calculating a first threshold value and a second threshold value according to the minimum side length of the transform block, the coefficient position conversion table and the total number of the transform block coefficients in the transform block;
[0024] if the scanning order of the current transform block coefficient is less than or equal to the first threshold value, judging that the current transform block coefficient is located in the first region;
[0025] if the scanning order of the current transform block coefficient is greater than the second threshold value, judging that the current transform block coefficient is located in the third region;
[0026] otherwise, judging that the current transform block coefficient is located in the second region.
[0027] Optionally, in the method for calculating the coordinates of the transform block coefficients for video decoding, the step of calculating a first threshold value and a second threshold value according to the minimum side length of the transform block, the coefficient position conversion table and the total number of the transform block coefficients in the transform block comprises:
[0028] the first threshold value is the element value of the t-1th element in the coefficient position conversion table;
[0029] the second threshold value is the difference between the total number of the transform block coefficients in the transform block and the element value of the t-1th element in the coefficient position conversion table.
[0030] Optionally, in the method for calculating the coordinates of the transform block coefficients for video decoding, the step of calculating the coordinates corresponding to the current transform block coefficient according to the region characteristics of the region where the current transform block coefficient is located comprises:
[0031] calculating the position of the diagonal corresponding to the current transform block coefficient according to the scanning order of the current transform block coefficient and the coefficient position conversion table;
[0032] calculating the coordinates of the current transform block coefficient according to the parity of the position of the diagonal corresponding to the current transform block coefficient.
[0033] Optionally, in the method for calculating the coordinates of the transform block coefficients for video decoding, the step of calculating the position of the diagonal corresponding to the current transform block coefficient according to the scanning order of the current transform block coefficient and the coefficient position conversion table comprises:
[0034] According to the scan order of the current transform block coefficient and the coefficient position conversion table, the position of the diagonal line corresponding to the current transform block coefficient is calculated.
[0035] The difference between the position of the maximum coefficient and the position of the current transform block coefficient on the diagonal line corresponding to the current transform block coefficient is calculated.
[0036] Optionally, in the method for calculating the coordinates of the transform block coefficient for video decoding, the step of calculating the position of the diagonal line corresponding to the current transform block coefficient according to the scan order of the current transform block coefficient and the coefficient position conversion table comprises:
[0037] If the current transform block coefficient is located in the first region, it is determined whether the scan order of the current transform block coefficient is greater than the element value of the i th element in the coefficient position conversion table and less than or equal to the element value of the i+1 th element in the coefficient position conversion table; if yes, it is determined that the current transform block coefficient is located on the i th diagonal line.
[0038] If the current transform block coefficient is located in the second region, the current transform block coefficient is located on the j th diagonal line, where j=(scan order-first threshold+minimum side length-1) / minimum side length+minimum side length-2.
[0039] If the current transform block coefficient is located in the third region, the scan order of the current transform block coefficient is first folded to the first region of the transform block, at this time, the new scan order is the difference between the total number of transform block coefficients in the transform block and the original scan order plus 1; then it is determined whether the scan order of the current transform block coefficient is greater than the element value of the i th element in the coefficient position conversion table and less than or equal to the element value of the i+1 th element in the coefficient position conversion table; if yes, it is determined that the current transform block coefficient is located on the i th diagonal line.
[0040] Optionally, in the method for calculating the coordinates of the transform block coefficient for video decoding, the step of calculating the difference between the position of the maximum coefficient and the position of the current transform block coefficient on the diagonal line corresponding to the current transform block coefficient comprises:
[0041] If the current transform block coefficient is located in the first region, the difference between the position of the maximum coefficient and the position of the current transform block coefficient is the difference between the element value of the i+1 th element in the coefficient position conversion table and the scan order of the current transform block coefficient.
[0042] If the current transform block coefficient is located in the second region, the difference between the position of the maximum coefficient and the position of the current transform block coefficient is (((scan order-first threshold+minimum side length-1)>>log of minimum side length)<<log of minimum side length)+first threshold-scan order.
[0043] If the current transform block coefficient is located in the third region, the difference between the maximum coefficient position and the position of the current transform block coefficient is
[0044] Optionally, in the method for calculating the coordinate of a transform block coefficient for video decoding, if the current transform block coefficient is located in the first region, the step of calculating the coordinate of the current transform block coefficient according to the parity of the position of the diagonal line corresponding to the current transform block coefficient comprises:
[0045] When the position of the diagonal line corresponding to the current transform block coefficient is odd, the abscissa of the current transform block coefficient is the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient, and the ordinate is the position of the corresponding diagonal line minus the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient;
[0046] When the position of the diagonal line corresponding to the current transform block coefficient is even, the abscissa of the current transform block coefficient is the position of the corresponding diagonal line minus the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient, and the ordinate is the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient.
[0047] Optionally, in the method for calculating the coordinate of a transform block coefficient for video decoding, if the current transform block coefficient is located in the second region, the step of calculating the coordinate of the current transform block coefficient according to the parity of the position of the diagonal line corresponding to the current transform block coefficient comprises:
[0048] When the position of the diagonal line corresponding to the current transform block coefficient is odd, if the width of the transform block is greater than or equal to the height of the transform block, the abscissa of the current transform block coefficient is the position of the corresponding diagonal line plus the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient minus the height of the transform block plus 1, and the ordinate is the height of the transform block minus 1 minus the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient; if the width of the transform block is less than the height of the transform block, the abscissa of the current transform block coefficient is the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient, and the ordinate is the position of the corresponding diagonal line minus the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient;
[0049] When the position of the diagonal line corresponding to the current transform block coefficient is even, if the width of the transform block is greater than or equal to the height of the transform block, the abscissa of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the ordinate of the current transform block coefficient is the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient; if the width of the transform block is less than the height of the transform block, the abscissa of the current transform block coefficient is the width of the transform block minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the ordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the width of the transform block plus 1.
[0050] Optionally, in the method for calculating the coordinates of transform block coefficients for video decoding, if the current transform block coefficient is located in the third region, the step of calculating the coordinates of the current transform block coefficient according to the parity of the position of the diagonal line corresponding to the current transform block coefficient comprises the following steps:
[0051] When the position of the diagonal line corresponding to the current transform block coefficient is odd, the abscissa of the current transform block coefficient is the width of the transform block minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the ordinate of the current transform block coefficient is the height of the transform block minus 1 plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the position of the diagonal line corresponding to the current transform block coefficient.
[0052] When the position of the diagonal line corresponding to the current transform block coefficient is even, the abscissa of the current transform block coefficient is the width of the transform block minus 1 plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the position of the diagonal line corresponding to the current transform block coefficient, and the ordinate of the current transform block coefficient is the height of the transform block minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient.
[0053] To solve the above technical problems, the present application further provides a device for calculating the coordinates of transform block coefficients for video decoding, which is used to implement any one of the methods for calculating the coordinates of transform block coefficients for video decoding, and comprises:
[0054] The acquisition module is used to acquire the original video code stream and the transform block corresponding thereto.
[0055] The conversion module is used to configure the coefficient position conversion table and calculate the coordinates corresponding to the coefficients in the transform block by using the coefficient position conversion table.
[0056] The decoding module is used to decode the original video by using the coefficient coordinates to obtain the decoded video data.
[0057] To solve the above technical problems, the application further provides a computer storage medium, which stores an executable program; when the executable program is executed, the method for calculating the coordinates of the transform block coefficients for video decoding is realized.
[0058] To solve the above technical problems, the application further provides a chip, which is coupled with a memory and used for executing a computer program stored in the memory to execute the method for calculating the coordinates of the transform block coefficients for video decoding. Advantages
[0059] The method and device for calculating the coordinates of the transform block coefficients for video decoding, the computer storage medium and the chip provided by the application can realize the calculation of the coordinates of the transform block coefficients by using only one coefficient position conversion table and simple combination logic, thereby reducing the hardware resource consumption during the decoding of the non-SRCC enabled method and solving the problem of large hardware resource consumption during the decoding of the existing non-SRCC enabled method. BRIEF DESCRIPTION OF DRAWINGS
[0060] Fig. 1 is a flowchart of the method for calculating the coordinates of the transform block coefficients for video decoding provided by the embodiment;
[0061] Fig. 2 is a structural diagram of a 64x64 transform block provided by the embodiment;
[0062] Fig. 3 is a diagram of the correspondence between the diagonal lines and the element values of the elements in the 64x64 transform block provided by the embodiment;
[0063] Fig. 4 is a flowchart of step S3 provided by the embodiment;
[0064] Fig. 5 is a diagram of the scanning order of the transform block coefficients in an 8x4 transform block provided by the embodiment;
[0065] Fig. 6 is a structural diagram of the device for calculating the coordinates of the transform block coefficients for video decoding provided by the embodiment. Embodiment of the application
[0066] It should be noted that all the drawings are very simplified and use non-precise scales, and are only used to facilitate and clarify the purpose of assisting the description of the embodiments of the application. In addition, the structures shown in the drawings are often a part of the actual structures. In particular, the emphasis of each drawing is different, and sometimes different scales are used.
[0067] It should be noted that the "first", "second", and the like in the description and claims of the present application and the accompanying drawings are used to distinguish similar objects, so as to describe the embodiments of the present application, and are not used to describe a specific order or sequence, and it should be understood that the structures thus used can be interchanged under appropriate circumstances. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0068] In addition, the related technical terms mentioned in the present embodiment are all dependent on the AVS3 standard, and the partial technical terms are explained as follows:
[0069] Transform Block: Transform Block is the basic unit of image data transformation in the AVS3 video coding process, which helps to convert the image from the pixel domain to the frequency domain, so as to more easily remove redundant information and compress; in the AVS3 standard, the size and shape of the transform block can be flexibly adjusted according to the characteristics of the video content, so as to improve the coding efficiency;
[0070] Oblique line: a reference line at a certain angle with the horizontal straight line;
[0071] Coefficient: Transform block coefficient, refers to the value corresponding to the specific coordinate position in the transform block;
[0072] Coefficient position: The position of the coefficient in the transform block corresponding to the decoding order, sometimes also called the scanning order position;
[0073] Coefficient position conversion table: a conversion tool for converting the transform block coefficient position to the coordinate.
[0074] At present, in the AVS3 video decoding process, the non-SRCC enabled method transform block coefficient decoding scanning order jumps greatly, in order to ensure the performance requirement, the coordinate of the transform block coefficient needs to be decoded in the same cycle after the decoding order of the transform block coefficient is decoded. The method used by the reference decoder is to obtain the coordinate through the coefficient order conversion table. However, there are many kinds of transform blocks, including 4x4, 4x8, 8x4, 4x16, 16x4, 4x32, 32x4, 8x8, 8x16, 16x8, 8x32, 32x8, 8x64, 64x8, 16x16, 16x32, 16x64, 32x16, 64x16, 32x32, 32x64, 64x32, 64x64, etc. 23 kinds of coefficient scanning order table, therefore, a total of 14864x12bit registers are needed to store these coefficient scanning order tables, which occupies a large amount of hardware resources.
[0075] Based on the above, the embodiment provides a method for calculating transform block coefficient coordinates for video decoding, as shown in FIG. 1, comprising:
[0076] S1, obtaining original video code stream and corresponding transform block thereof;
[0077] S2, configuring coefficient position conversion table;
[0078] S3, using the coefficient position conversion table to calculate the coordinates corresponding to the coefficients in the transform block;
[0079] S4, using the coefficient coordinates to continue decoding the original video to obtain decoded video data.
[0080] In the coefficient position conversion table, N elements are configured, each of the elements corresponds to a diagonal line from top left to bottom right in an NxN transform block in sequence, and the element value of the element is the number of all coefficients in the top left of the corresponding diagonal line.
[0081] The method for calculating transform block coefficient coordinates for video decoding provided by the embodiment can reduce the hardware resource consumption during decoding by the non-SRCC enabled method by configuring the coefficient position conversion table, dividing the transform block into three regions, and calculating the transform block coefficient coordinates in combination with the region characteristics, so that the decoding order of the current transform block coefficient can be converted into coordinates using only one coefficient position conversion table in combination with simple combination logic to calculate the coordinates of multiple transform block coefficients, thereby reducing the hardware resource consumption during decoding by the non-SRCC enabled method and solving the problem of large hardware resource consumption during decoding by the existing non-SRCC enabled method.
[0082] Specifically, in the embodiment, step S1, obtaining original video code stream and corresponding transform block thereof, in the non-SRCC enabled method, the transform block can be any one of the above-mentioned 23 coefficient scanning order tables.
[0083] Further, considering the diversity of transform blocks, the largest transform block in the non-SRCC enabled method is 64x64, therefore, in order to ensure that all types of transform blocks can use the same coefficient position conversion table to reduce the occupation of hardware storage resources, in the embodiment, step S2, configuring coefficient position conversion table, specifically, 64 elements are configured in the coefficient position conversion table, each of the elements corresponds to a diagonal line from top left to bottom right in a 64x64 transform block in sequence, and the element value of the element is the number of all coefficients in the top left of the corresponding diagonal line.
[0084] As shown in FIG. 2, it is a structure diagram of a 64x64 transform block, wherein the diagonal line is a 45° diagonal line from the lower left to the upper right (as shown by the dotted line in FIG. 2). Each diagonal line passes through a string of transform block coefficients in the 45° direction. It should be noted that when configuring the coefficient position conversion table, the diagonal line only considers the 64 lines passing through the uppermost row of transform block coefficients, i.e., only considers the diagonal line in the upper left half of the transform block.
[0085] Correspondingly, the 64 elements in the coefficient position conversion table sequentially correspond to the diagonal lines from the upper left to the lower right in the 64x64 transform block, and the element value of the element is the number of all coefficients in the upper left of the corresponding diagonal line. If the coefficient position conversion table is denoted as diagonal_line_tb
[0064] , the first element in the coefficient position conversion table is denoted as diagonal_line_tb[0], the fourth element in the coefficient position conversion table is denoted as diagonal_line_tb[3], and the 64th element in the coefficient position conversion table is denoted as diagonal_line_tb
[0063] . Correspondingly, the position of each diagonal line from the upper left to the lower right is 0, 1, 2,..., 63 in turn.
[0086] As shown in FIG. 3, the dotted line represents the fourth diagonal line, the position of which is 3, and the fourth diagonal line corresponds to the fourth element in the coefficient position conversion table. Since the upper left of the diagonal line includes 6 transform block coefficients (as shown by the gray square in FIG. 3), the element value of the fourth element in the coefficient position conversion table is 6, i.e., diagonal_line_tb[3] = 6. In this way, the entire coefficient position conversion table diagonal_line_tb
[0064] = {0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431, 1485, 1540, 1596, 1653, 1711, 1770, 1830, 1891, 1953, 2016} can be obtained.
[0087] Further, in the embodiment, as shown in FIG. 4, the step of calculating the coordinates corresponding to the coefficients in the transform block by using the coefficient position conversion table in step S3 includes:
[0088] S31, dividing the transform block into a first region, a second region, and a third region.
[0089] Specifically, in the embodiment, first, a diagonal line is arranged on each transform block coefficient from the top-left corner of the transform block, so that the total number of diagonal lines arranged on the transform block is s = w + h - 1, where w is the number of transform block coefficients in the width direction of the transform block, and h is the number of transform block coefficients in the height direction of the transform block, and t = min(w, h) is set.
[0090] For example, as shown in FIG. 5, the width w of the transform block is 8, the height h is 4, and there are 32 transform block coefficients, and there is only one diagonal line on each transform block coefficient, and there are 11 diagonal lines in total.
[0091] Then, the transform block coefficients corresponding to the first t-1 diagonal lines are divided into a first region from the top-left corner of the transform block. Still taking FIG. 5 as an example, the transform block coefficients corresponding to the first 3 diagonal lines are divided into a first region from the top-left corner of the transform block, that is, the transform block coefficients marked with scan order 0, 1, 2, 3, 4, and 5 are divided into a first region.
[0092] In addition, the transform block coefficients corresponding to the first t-1 diagonal lines are divided into a third region from the bottom-right corner of the transform block. Still taking FIG. 5 as an example, the transform block coefficients corresponding to the first 3 diagonal lines are divided into a third region from the bottom-right corner of the transform block, that is, the transform block coefficients marked with scan order 26, 27, 28, 29, 30, and 31 are divided into a third region.
[0093] In addition, the transform block coefficients corresponding to the remaining diagonal lines are divided into a second region. Still taking FIG. 5 as an example, the transform block coefficients marked with scan order 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, and 25 are divided into a second region.
[0094] Of course, the transform block shown in FIG. 5 is a rectangle, so the number of diagonal lines corresponding to the first region and the third region is the length of the shorter side minus 1, and the number of diagonal lines corresponding to the second region is the length of the longer side minus the length of the shorter side plus 1. If the transform block is a square, the second region has only one diagonal line on the diagonal, and the first region and the third region are located on both sides of the diagonal.
[0095] In addition, since only the correspondence between the diagonal lines in the upper-left part and the elements in the coefficient position conversion table is considered when the coefficient position conversion table is configured, in order to facilitate subsequent coordinate conversion, in the embodiment, the first region and the third region are limited to have the same number of transform block coefficients.
[0096] S32, according to the scan order of the transform block coefficient, the coefficient position conversion table is used to determine the region where the current transform block coefficient is located.
[0097] Specifically, in the embodiment, the first threshold and the second threshold are calculated according to the minimum side length of the transform block, the coefficient position conversion table and the total number of transform block coefficients in the transform block.
[0098] In a specific embodiment, let the minimum side length of the transform block be min_side, then min_side = min(w, h) = t. In actual application, if the transform block is a rectangle, the minimum side length is the short side; if the transform block is a square, the minimum side length is the side length of the square. Let the total number of transform block coefficients in the transform block be num_coeffs, then num_coeffs = w x h.
[0099] In the embodiment, the first threshold is the element value of the (t-1)th element in the coefficient position conversion table. Let the first threshold be threshold_a, then threshold_a = diagonal_line_tb[t-1].
[0100] In the embodiment, the second threshold is the difference between the total number of transform block coefficients in the transform block and the element value of the (t-1)th element in the coefficient position conversion table. Let the second threshold be threshold_b, then threshold_b = num_coeffs-diagonal_line_tb[t-1].
[0101] In judging the region where the current transform block coefficient is located, the following principles are followed:
[0102] If the scan order of the current transform block coefficient is less than or equal to the first threshold, it is judged that the current transform block coefficient is located in the first region;
[0103] If the scan order of the current transform block coefficient is greater than the second threshold, it is judged that the current transform block coefficient is located in the third region;
[0104] Otherwise, it is judged that the current transform block coefficient is located in the second region.
[0105] S33, according to the region characteristics of the region where the current transform block coefficient is located, the coordinates corresponding to the current transform block coefficient are calculated.
[0106] Specifically, in the embodiment,
[0107] S331, according to the scan order of the current transform block coefficient and the coefficient position conversion table, the position of the diagonal line corresponding to the current transform block coefficient is calculated.
[0108] The scan order of the current transform block coefficient can be obtained by decoding and is part of the AVS3 specification, which can be obtained by AVS3, and the present application will not repeat it.
[0109] In the embodiment, the step specifically comprises:
[0110] Firstly, the position of the diagonal line corresponding to the current transform block coefficient is calculated according to the scan order of the current transform block coefficient and the coefficient position conversion table. In actual application, the step comprises:
[0111] If the current transform block coefficient is located in the first region, it is determined whether the scan order of the current transform block coefficient is greater than the element value of the i th element in the coefficient position conversion table and less than or equal to the element value of the i+1 th element in the coefficient position conversion table; if yes, it is determined that the current transform block coefficient is located on the diagonal line corresponding to the i th element, that is, the current transform block coefficient is located on the i th diagonal line; in the embodiment, when the size of the transform block is 64*64, i=0, 1, …, 62. Assuming that the scan order of the current transform block coefficient after decoding is scan_pos, if scan_pos>diagonal_line_tb[i] and scan_pos≤diagonal_line_tb[i+1], it is determined that the current transform block coefficient is located on the i th diagonal line, that is, the position of the diagonal line corresponding to the current transform block coefficient is i.
[0112] It should be noted that in the following calculation process, the scan order is added by 1, that is, scan_pos’=scan_pos+1.
[0113] If the current transform block coefficient is located in the second region, the current transform block coefficient is located on the j th diagonal line, that is, the position of the diagonal line corresponding to the current transform block coefficient is j; wherein j=((scan_pos-threshold_a+min_side-1)>>min_side_log)+min_side-2, wherein >> represents right shift, and min_side_log=log2(min_side).
[0114] If the current transform block coefficient is located in the third region, the scan order of the current transform block coefficient is first flipped to the first region of the transform block, and the new scan order is the total number of transform block coefficients in the transform block minus the original scan order plus 1, i.e., scan_pos' = num_coeffs-scan_pos+1; then it is judged whether the scan order of the current transform block coefficient is greater than the element value of the i-th element in the coefficient position conversion table and less than or equal to the element value of the (i+1)-th element in the coefficient position conversion table; if yes, it is judged that the current transform block coefficient is located on the diagonal line corresponding to the i-th element, i.e., the current transform block coefficient is located on the i-th diagonal line; wherein i = 0, 1, …, 62. That is, if scan_pos' > diagonal_line_tb[i] and scan_pos' ≤ diagonal_line_tb[i+1], it is judged that the current transform block coefficient is located on the diagonal line corresponding to the i-th element, i.e., the position of the diagonal line corresponding to the current transform block coefficient is i.
[0115] Then, the difference between the maximum coefficient position and the position of the current transform block coefficient on the diagonal line corresponding to the current transform block coefficient is calculated. The maximum coefficient position refers to the position of the last decoded coefficient on the diagonal line. In actual application, the method includes:
[0116] If the current transform block coefficient is located in the first region, the difference between the maximum coefficient position and the position of the current transform block coefficient is the difference between the element value of the (i+1)-th element in the coefficient position conversion table and the scan order of the current transform block coefficient;
[0117] If the current transform block coefficient is located in the second region, the difference between the maximum coefficient position and the position of the current transform block coefficient is (((scan_order-first_threshold+min_size-1)>>log2(min_size))<<log2(min_size))+first_threshold-scan_order, wherein >> represents right shift to remove the remainder part of (scan_order-first_threshold+min_size-1) in the calculation result, and << represents left shift to restore the number of coefficients;
[0118] If the current transform block coefficient is located in the third region, the difference between the maximum coefficient position and the position of the current transform block coefficient is the difference between the element value of the (i+1)-th element in the coefficient position conversion table and the new scan order of the current transform block coefficient after the scan order of the current transform block coefficient is flipped to the first region of the transform block.
[0119] That is, assuming the difference between the maximum coefficient position of the diagonal line corresponding to the current transform block coefficient and the position of the current transform block coefficient is delta_pos, when the current transform block coefficient is located in the first region, delta_pos = diagonal_line_tb[i+1] - scan_pos; when the current transform block coefficient is located in the second region, delta_pos = (((scan_pos - threshold_a + min_side - 1) » min_side_log) << min_side_log) - threshold_a + scan_pos; when the current transform block coefficient is located in the third region, delta_pos = diagonal_line_tb[i+1] - scan_pos'.
[0120] +threshold_a-scan_pos; when the current transform block coefficient is located in the third region, delta_pos = diagonal_line_tb[i+1] - scan_pos'.
[0121] S332, according to the parity of the position of the diagonal line corresponding to the current transform block coefficient, the coordinates of the current transform block coefficient are calculated.
[0122] Specifically, in the embodiment, it is also necessary to calculate according to the region where the current transform block coefficient is located:
[0123] If the current transform block coefficient is located in the first region, when the position of the diagonal line corresponding to the current transform block coefficient is odd, the horizontal coordinate of the current transform block coefficient is the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient. That is, when i is odd, the coordinate x = delta_pos, and the coordinate y = i - delta_pos.
[0124] If the current transform block coefficient is located in the first region, when the position of the diagonal line corresponding to the current transform block coefficient is even, the horizontal coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the difference between the maximum coefficient position of the corresponding diagonal line and the position of the current transform block coefficient. That is, when i is even, the coordinate x = i - delta_pos, and the coordinate y = delta_pos.
[0125] If the current transform block coefficient is located in the second region, when the position of the diagonal line corresponding to the current transform block coefficient is odd, if the transform block width is greater than or equal to the transform block height, the horizontal coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the transform block height plus 1, and the vertical coordinate of the current transform block coefficient is the transform block height minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient. That is, when j is odd and w≥h, the coordinate x=i+delta_pos-h+1, and the coordinate y=h-1-delta_pos. If the transform block width is less than the transform block height, the horizontal coordinate of the current transform block coefficient is the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient. That is, when j is odd and w
[0126] If the current transform block coefficient is located in the second region, when the position of the diagonal line corresponding to the current transform block coefficient is even, if the transform block width is greater than or equal to the transform block height, the horizontal coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate of the current transform block coefficient is the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient. That is, when j is even and w≥h, the coordinate x=i-delta_pos, and the coordinate y=delta_pos. If the transform block width is less than the transform block height, the horizontal coordinate of the current transform block coefficient is the transform block width minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the transform block width plus 1. That is, when j is even and w
[0127] If the current transform block coefficient is located in the third region, when the position of the diagonal line corresponding to the current transform block coefficient is odd, the horizontal coordinate of the current transform block coefficient is the transform block width minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate of the current transform block coefficient is the transform block height minus 1 plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the position of the diagonal line corresponding to the current transform block coefficient. That is, when i is odd, the coordinate x=w-1-delta_pos, and the coordinate y=h-1+delta_pos-i.
[0128] If the current transform block coefficient is located in the third region, when the position of the diagonal line corresponding to the current transform block coefficient is even, the abscissa of the current transform block coefficient is the width of the transform block minus 1 plus the difference between the position of the maximum coefficient of the diagonal line and the position of the current transform block coefficient minus the position of the diagonal line corresponding to the current transform block coefficient, and the ordinate of the current transform block coefficient is the height of the transform block minus 1 minus the difference between the position of the maximum coefficient of the diagonal line and the position of the current transform block coefficient. That is, when i is even, the coordinate x = w-1+delta_pos-i, and the coordinate y = h-1-delta_pos.
[0129] The above steps are repeated until the decoding order of all transform block coefficients in the transform block is converted into coordinates.
[0130] Further, in step S4, the original video is decoded using the coefficient coordinates to obtain decoded video data, and the implementation of this step is in a prior art manner, which will not be described herein.
[0131] The method for calculating transform block coefficients for video decoding provided in the embodiment can convert the decoding order of transform block coefficients into coordinates only using a coefficient position conversion table without a large transform block scanning table. In the application process, a 64x12 bit register can be used to store the coefficient position conversion table. Compared with the prior art, the method can save about 100,000 gate hardware expenses while ensuring performance, greatly reduces the hardware resource consumption when decoding in a non-SRCC enabled method, and solves the problem of large hardware resource consumption when decoding in a prior art non-SRCC enabled method.
[0132] The embodiment further provides a device for calculating transform block coefficient coordinates for video decoding, as shown in FIG. 6, which comprises:
[0133] The obtaining module is configured to obtain an original video code stream and a transform block corresponding to the original video code stream.
[0134] The conversion module is configured to configure a coefficient position conversion table and calculate the coordinates corresponding to the coefficients in the transform block using the coefficient position conversion table.
[0135] The decoding module is configured to continue decoding the original video using the coefficient coordinates to obtain decoded video data.
[0136] The device for calculating the transform block coefficient coordinates for video decoding provided by the embodiment is configured with a coefficient position conversion table through a conversion module, and divides the transform block into three areas, and calculates the transform block coefficient coordinates in combination with the area characteristics, so that when the decoding order of the current transform block coefficient is converted into coordinates by using the coefficient position conversion table, only one kind of coefficient position conversion table can be used to realize the calculation of the coordinates of the transform block coefficients in combination with simple combination logic, thereby reducing the hardware resource consumption when the non-SRCC enabled method is decoded, and solving the problem of large hardware resource consumption when the existing non-SRCC enabled method is decoded.
[0137] In addition, the embodiment further provides a computer storage medium, which stores an executable program; and the executable program is executed to implement the method for calculating the transform block coefficient coordinates for video decoding.
[0138] In addition, the embodiment further provides a chip, which is coupled with a memory and used for executing a computer program stored in the memory to implement the method for calculating the transform block coefficient coordinates for video decoding.
[0139] In actual application, the chip can be a VPU (Video Processing Unit), a GPU (Graphics Processing Unit), an NPU (Net Processing Unit) or the like.
[0140] It should be noted that the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other, and in addition, the different parts of each embodiment can also be used in combination, and the present application is not limited in this regard.
[0141] The method and device for calculating the transform block coefficient coordinates for video decoding, the computer storage medium and the chip provided by the embodiment include: obtaining an original video code stream and a corresponding transform block thereof; configuring a coefficient position conversion table; calculating the coordinates corresponding to the coefficients in the transform block by using the coefficient position conversion table; and continuing to decode the original video by using the coefficient coordinates to obtain decoded video data. By configuring the coefficient position conversion table and dividing the transform block into three areas, the transform block coefficient coordinates are calculated in combination with the area characteristics, so that when the decoding order of the current transform block coefficient is converted into coordinates by using the coefficient position conversion table, only one kind of coefficient position conversion table can be used to realize the calculation of the coordinates of the transform block coefficients in combination with simple combination logic, thereby reducing the hardware resource consumption when the non-SRCC enabled method is decoded, and solving the problem of large hardware resource consumption when the existing non-SRCC enabled method is decoded.
[0142] The above description is only a description of the preferred embodiments of the present application, and is not intended to limit the scope of the present application. Any modification or change made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims. Industrial applicability
[0143] The method and device for calculating the coordinate of the transform block coefficient for video decoding, the computer storage medium and the chip provided by the embodiment can convert the decoding order of the transform block coefficient into the coordinate only by using the coefficient position conversion table without a large number of transform block scanning tables. In the application process, the coefficient position conversion table can be stored in a 64*12 bit register, compared with the prior art, the hardware cost of about 100,000 gates can be saved while the performance is ensured, the hardware resource consumption in the decoding of the non-SRCC enabled method is greatly reduced, and the problem of large hardware resource consumption in the decoding of the prior art non-SRCC enabled method is solved.
Claims
1. A method for computing transform block coefficient coordinates for video decoding, the method comprising: The method comprises the following steps: obtaining an original video bitstream and a corresponding transform block; configuring a coefficient position conversion table, wherein N elements are configured in the coefficient position conversion table, each of the elements corresponds to a diagonal line from top-left to bottom-right in an NxN transform block in sequence, and an element value of the element is a number of all coefficients in a top-left of the corresponding diagonal line; calculating a coordinate corresponding to a coefficient in the transform block by using the coefficient position conversion table; continuing decoding the original video bitstream by using the coefficient coordinate to obtain decoded video data.
2. The method for computing transform block coefficient coordinates for video decoding according to claim 1, wherein, The coefficient position conversion table comprises 64 elements, each of the elements corresponds to a diagonal line from top-left to bottom-right in a 64x64 transform block in sequence.
3. The method for computing transform block coefficient coordinates for video decoding according to claim 1, wherein, The diagonal line comprises a preset angle diagonal line from bottom-left to top-right.
4. The method for computing transform block coefficient coordinates for video decoding according to claim 1, wherein, The step of calculating the coordinate corresponding to the coefficient in the transform block by using the coefficient position conversion table comprises the following steps: dividing the transform block into a first region, a second region and a third region; judging a region where a current transform block coefficient is located by using the coefficient position conversion table according to a scanning order of the transform block coefficient; calculating the coordinate corresponding to the current transform block coefficient according to a region feature of the region where the current transform block coefficient is located.
5. The method for computing transform block coefficient coordinates for video decoding according to claim 4, wherein, The step of dividing the transform block into the first region, the second region and the third region comprises the following steps: arranging a diagonal line on each transform block coefficient from a top-left corner of the transform block, so that a total number s of the diagonal lines arranged on the transform block is w+h-1, wherein w is a number of transform block coefficients in a width direction of the transform block, h is a number of transform block coefficients in a height direction of the transform block, and t is set as min(w, h); dividing transform block coefficients corresponding to the first t-1 diagonal lines into the first region from the top-left corner of the transform block; dividing transform block coefficients corresponding to the last t-1 diagonal lines into the third region from a bottom-right corner of the transform block; dividing transform block coefficients corresponding to the remaining diagonal lines into the second region.
6. The method for computing transform block coefficient coordinates for video decoding according to claim 5, wherein, The step of judging the region where the current transform block coefficient is located by using the coefficient position conversion table according to the scanning order of the transform block coefficient comprises the following steps: calculating a first threshold value and a second threshold value according to a minimum side length of the transform block, the coefficient position conversion table and a total number of transform block coefficients in the transform block; if the scanning order of the current transform block coefficient is less than or equal to the first threshold value, judging that the current transform block coefficient is located in the first region; if the scanning order of the current transform block coefficient is greater than the second threshold value, judging that the current transform block coefficient is located in the third region; otherwise, judging that the current transform block coefficient is located in the second region.
7. The method for computing transform block coefficient coordinates for video decoding according to claim 6, wherein, The step of calculating the first threshold value and the second threshold value according to the minimum side length of the transform block, the coefficient position conversion table and the total number of transform block coefficients in the transform block comprises the following steps: the first threshold value is an element value of a t-1th element in the coefficient position conversion table; the second threshold value is a difference between the total number of transform block coefficients in the transform block and the element value of the t-1th element in the coefficient position conversion table.
8. The method of calculating transform block coefficient coordinates for video decoding according to claim 7, characterized in that, The step of calculating the coordinate corresponding to the current transform block coefficient according to the region feature of the region where the current transform block coefficient is located comprises the following steps: calculating a position of a diagonal line corresponding to the current transform block coefficient according to the scanning order of the current transform block coefficient and the coefficient position conversion table. According to the parity of the position of the diagonal line corresponding to the current transform block coefficient, the coordinate of the current transform block coefficient is calculated.
9. The method for computing transform block coefficient coordinates for video decoding according to claim 8, wherein, The step of calculating the position of the diagonal line corresponding to the current transform block coefficient according to the scanning order of the current transform block coefficient and the coefficient position conversion table comprises: According to the scanning order of the current transform block coefficient and the coefficient position conversion table, the position of the diagonal line corresponding to the current transform block coefficient is calculated. The difference between the maximum coefficient position on the diagonal line corresponding to the current transform block coefficient and the position of the current transform block coefficient is calculated.
10. The method for computing transform block coefficient coordinates for video decoding according to claim 9, wherein, The step of calculating the position of the diagonal line corresponding to the current transform block coefficient according to the scanning order of the current transform block coefficient and the coefficient position conversion table comprises: If the current transform block coefficient is located in the first region, it is determined whether the scanning order of the current transform block coefficient is greater than the element value of the i th element in the coefficient position conversion table and less than or equal to the element value of the i+1 th element in the coefficient position conversion table; if so, it is determined that the current transform block coefficient is located on the i th diagonal line; If the current transform block coefficient is located in the second region, the current transform block coefficient is located on the j th diagonal line, where j=(scanning order-first threshold+minimum side length-1) / minimum side length+minimum side length-2; If the current transform block coefficient is located in the third region, the scanning order of the current transform block coefficient is first folded to the first region of the transform block, at this time, the new scanning order is the difference between the total number of transform block coefficients in the transform block and the original scanning order plus 1; then it is determined whether the scanning order of the current transform block coefficient is greater than the element value of the i th element in the coefficient position conversion table and less than or equal to the element value of the i+1 th element in the coefficient position conversion table; if so, it is determined that the current transform block coefficient is located on the i th diagonal line. The step of calculating the difference between the maximum coefficient position on the diagonal line corresponding to the current transform block coefficient and the position of the current transform block coefficient comprises:
11. The method for computing transform block coefficient coordinates for video decoding according to claim 10, wherein, If the current transform block coefficient is located in the first region, the difference between the maximum coefficient position on the diagonal line corresponding to the current transform block coefficient and the position of the current transform block coefficient is the difference between the element value of the i+1 th element in the coefficient position conversion table and the scanning order of the current transform block coefficient; If the current transform block coefficient is located in the second region, the difference between the maximum coefficient position on the diagonal line corresponding to the current transform block coefficient and the position of the current transform block coefficient is (((scanning order-first threshold+minimum side length-1)>>log of minimum side length)<<log of minimum side length)+first threshold-scanning order; If the current transform block coefficient is located in the third region, the difference between the maximum coefficient position on the diagonal line corresponding to the current transform block coefficient and the position of the current transform block coefficient is the difference between the element value of the i+1 th element in the coefficient position conversion table and the new scanning order of the current transform block coefficient after the scanning order of the current transform block coefficient is folded to the first region of the transform block. If the current transform block coefficient is located in the first region, the step of calculating the coordinate of the current transform block coefficient according to the parity of the position of the diagonal line corresponding to the current transform block coefficient comprises:
12. The method for calculating transform block coefficients for video decoding according to claim 11, wherein, When the position of the diagonal line corresponding to the current transform block coefficient is odd, the horizontal coordinate of the current transform block coefficient is the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient; When the position of the diagonal line corresponding to the current transform block coefficient is even, the horizontal coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient. If the current transform block coefficient is located in the second region, the step of calculating the coordinates of the current transform block coefficient according to the parity of the position of the diagonal line corresponding to the current transform block coefficient comprises:
13. The method for computing transform block coefficient coordinates for video decoding according to claim 11, wherein, When the position of the diagonal line corresponding to the current transform block coefficient is odd, if the transform block width is greater than or equal to the transform block height, the horizontal coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the transform block height plus 1, and the vertical coordinate is the transform block height minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient; if the transform block width is less than the transform block height, the horizontal coordinate of the current transform block coefficient is the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient; When the position of the diagonal line corresponding to the current transform block coefficient is even, if the transform block width is greater than or equal to the transform block height, the horizontal coordinate of the current transform block coefficient is the position of the diagonal line corresponding to the current transform block coefficient minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient; if the transform block width is less than the transform block height, the horizontal coordinate of the current transform block coefficient is the transform block width minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the position of the diagonal line corresponding to the current transform block coefficient plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the transform block width plus 1. If the current transform block coefficient is located in the third region, the step of calculating the coordinates of the current transform block coefficient according to the parity of the position of the diagonal line corresponding to the current transform block coefficient comprises:
14. The method for computing transform block coefficient coordinates for video decoding according to claim 11, wherein, When the position of the diagonal line corresponding to the current transform block coefficient is odd, the horizontal coordinate of the current transform block coefficient is the transform block width minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the transform block height minus 1 plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the position of the diagonal line corresponding to the current transform block coefficient; When the position of the diagonal line corresponding to the current transform block coefficient is even, the horizontal coordinate of the current transform block coefficient is the transform block width minus 1 minus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient, and the vertical coordinate is the transform block height minus 1 plus the difference between the position of the maximum coefficient of the corresponding diagonal line and the position of the current transform block coefficient minus the position of the diagonal line corresponding to the current transform block coefficient. When the position of the diagonal corresponding to the current transform block coefficient is even, the abscissa of the current transform block coefficient is the width of the transform block minus 1 plus the difference between the position of the maximum coefficient of the diagonal and the position of the current transform block coefficient minus the position of the diagonal corresponding to the current transform block coefficient, and the ordinate of the current transform block coefficient is the height of the transform block minus 1 minus the difference between the position of the maximum coefficient of the diagonal and the position of the current transform block coefficient.
15. A computing device for computing coordinates of transform block coefficients for video decoding, for implementing the method for computing coordinates of transform block coefficients for video decoding according to any one of claims 1-14, characterized in that, The device for calculating transform block coefficient coordinates for video decoding comprises: an acquisition module configured to acquire an original video bitstream and a transform block corresponding to the original video bitstream; a conversion module configured to configure a coefficient position conversion table and calculate coordinates corresponding to coefficients in the transform block by using the coefficient position conversion table; a decoding module configured to decode the original video by using the coefficient coordinates to obtain decoded video data.
16. A computer storage medium, comprising, The computer storage medium stores an executable program; when the executable program is executed, the method for calculating transform block coefficient coordinates for video decoding according to any one of claims 1 to 14 is implemented.
17. A chip, characterized by The chip is coupled with the memory and is configured to execute the computer program stored in the memory to execute the method for calculating transform block coefficient coordinates for video decoding according to any one of claims 1 to 14.
Citation Information
Patent Citations
Scanning method and device, and inverse scanning method and device
CN103402095A
Image encoding / decoding method and apparatus therefor
CN114760471A
Feature data encoding method, encoder, feature data decoding method, and decoder
US20230021460A1