Image decoding method, device, chip and electronic device

By using buffers and first-in and later-out storage units to store decoded pixel values ​​during image decoding, the problem of large hardware resource occupancy and slow data reading speed in image decoding is solved, and more efficient resource utilization and performance improvement is achieved.

CN115589491BActive Publication Date: 2025-04-25ARM TECH CHINA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211097648.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-08
Publication Date
2025-04-25
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

During the image decoding process, a large amount of context data needs to be frequently read and stored, resulting in large hardware resources and slow data reading speed.

Method used

An image decoding method is adopted, combining a buffer and a first-in and later-out memory unit to store the decoded pixel values, reducing the memory footprint and improving data reading speed.

Benefits of technology

By reducing the area requirement of buffers and improving data reading speed, more efficient resource utilization and performance improvements are achieved in the decoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115589491B_ABST
    Figure CN115589491B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and discloses an image decoding method, device, chip and electronic device, the method comprising: determining the current pixel to be decoded; obtaining the first context data of the current pixel to be decoded, wherein the first context data comprises a first part of data and a second part of data, the first part of data is obtained from a buffer, the second part of data is obtained from a first-in-last-out storage unit, the first part of data is the same data in the first context data as the second context data of the last decoded pixel of the current pixel to be decoded; obtaining the pixel value of the current pixel to be decoded based on the first context data; and storing the pixel value of the current pixel to be decoded in the first-in-last-out storage unit. Based on this, the speed of reading context data can be accelerated during decoding, and the chip area occupied by storing pixel values ​​can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image decoding method, device, chip and electronic device. Background Art

[0002] In recent years, audio and video data processing has been further applied. With the rapid development of video processing technology, many electronic devices have integrated dedicated video processing chips. Using the integrated dedicated video processing chip, these electronic devices can receive and process video data, thereby converting it into a playable video image. For transmission and storage considerations, video data is usually compressed according to a predetermined coding standard, such as the AV1 (Alliance for Open Media Video 1) protocol, H26.1, H.263, H.264 of ITU-T (International Telecommunication Union Telecommunication Standardization Sector), MPEG-1, MPEG-3, MPEG-4, MPEG-4 AVC of ISO / IEC (International Organization for Standardization), etc. Among them, after the encoded video data is transmitted, it is necessary to decode the encoded video data into data corresponding to the original file before it can be used.

[0003] It is understandable that, since the video is composed of frames of images, encoding and decoding the video data is actually encoding and decoding the image data. According to the protocol, when decoding the binary code stream corresponding to each pixel in the image data, it is necessary to obtain the decoding result based on the context data corresponding to each pixel in the image (i.e., the pixel values ​​of a preset number of adjacent pixels). For example, in the decoding method specified by the AV1 protocol, each pixel in the image needs to be decoded based on the pixel values ​​of 5 adjacent pixels. Therefore, in the process of decoding each pixel in the image in a set order, on the one hand, the pixel values ​​of the decoded pixels need to be stored as input interface data for subsequent operations; on the other hand, the pixel values ​​of the decoded pixels need to be temporarily stored as the context data required for decoding each pixel. When each pixel needs to be decoded, it is necessary to obtain the required context data from the storage area where the decoded pixels are temporarily stored, so as to obtain the pixel values ​​of each pixel according to the context data.

[0004] Therefore, the pixel values ​​of each pixel obtained during the decoding process are temporarily stored in the storage space corresponding to the array, and then the pixel values ​​of a preset number of adjacent pixels are indexed from the storage space corresponding to the array. For example, the pixel values ​​of 5 adjacent pixels corresponding to the AV1 protocol. Since the amount of data that needs to be temporarily stored is large, and the required context data needs to be read out as quickly as possible, there are requirements for the implementation of hardware resources. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide an image decoding method, device, chip and electronic device. During the decoding process, a buffer and a first-in-last-out storage unit are set up to store the decoded pixel values, so as to reduce the memory area occupied and improve the reading speed of the stored data.

[0006] In a first aspect, an embodiment of the present application provides an image decoding method, which is applied to a chip, wherein the chip includes a first-in-last-out storage unit and a buffer; the method includes:

[0007] Determine the current pixel to be decoded;

[0008] Acquire first context data of the current pixel to be decoded, wherein the first context data includes a first portion of data and a second portion of data, the first portion of data is acquired from the buffer, the second portion of data is acquired from the first-in-last-out storage unit, and the first portion of data is data in the first context data that is the same as the second context data of a pixel previously decoded of the current pixel to be decoded;

[0009] Obtaining a pixel value of the current pixel to be decoded based on the first context data;

[0010] The pixel value of the current pixel to be decoded is stored in the first-in-last-out storage unit.

[0011] It can be understood that during the decoding process, part of the context data of the pixel to be decoded is directly stored in the buffer, and the remaining data can be directly read from the first-in last-out storage unit, so the data reading speed is greatly improved. In addition, the buffer only includes the context data of the last decoded pixel, for example, the pixel values ​​of 5 pixels, so compared with caching all previously decoded pixels, the required buffer area is greatly reduced.

[0012] In a possible implementation of the first aspect, a method for acquiring the second part of data includes:

[0013] The second part of data in the first-in-last-out storage unit is stored in the buffer, and the second part of data is obtained from the buffer.

[0014] It can be understood that the second part of the data is stored in the buffer, which now includes the context data of all the current pixels to be decoded, preparing for decoding the next pixel of the currently decoded pixel, thereby saving the time of decoding all the pixels in the image pixel array.

[0015] In a possible implementation of the first aspect, the method further includes:

[0016] The FIFO storage unit comprises a first sub-FIFO storage unit, a second sub-FIFO storage unit and a third sub-FIFO storage unit;

[0017] The second part of data is obtained from the first-in-last-out storage unit, including:

[0018] The second portion of data is obtained from the first sub-FIFO storage unit or the second sub-FIFO storage unit;

[0019] The step of storing the pixel value of the current pixel to be decoded in the first-in-last-out storage unit comprises:

[0020] The pixel value of the current pixel to be decoded is stored in the third sub-first-in-last-out storage unit.

[0021] It can be understood that the first sub-FIFO storage unit, the second sub-FIFO storage unit and the third sub-FIFO storage unit are FIFO storage units with different addresses. The pixels stored in the first sub-FIFO storage unit, the second sub-FIFO storage unit and the third sub-FIFO storage unit are pixels on different oblique lines in the decoded image pixel array. For example, the required context data specified by the AV1 protocol is located on 2 different oblique lines in the decoded image pixel array, and the current pixel to be decoded is located on another oblique line. The context data required for the current pixel to be decoded is stored in two FIFO storage units, so that when decoding the next pixel, it is convenient to read data different from the context data required for decoding the previous pixel.

[0022] In a possible implementation of the first aspect, the method further includes:

[0023] The data in the second context data that is different from the first part of the data is removed from the buffer, and the data in the removed data that is still needed when decoding the remaining pixels is stored in the second sub-first-in-last-out storage unit, wherein the data that is still needed is stored in the buffer from the second sub-first-in-last-out storage unit.

[0024] It can be understood that the data in the second context data that is different from the first part of the data is removed from the buffer. At this time, only the first context data is stored in the buffer. Therefore, during the decoding process, only a small amount of data needs to be stored in the buffer, which greatly reduces the area occupied by the buffer. When decoding the remaining pixels, the data originally stored in the buffer is also needed. For example, the current pixel to be decoded is pixel 48 below. If the remaining pixel to be decoded is pixel 33, it is necessary to use pixel 42 in the context data of the last decoded pixel 41 originally stored in the buffer. Therefore, the data that is still needed needs to be stored in the second sub-first-in-last-out storage unit originally obtained, so as to facilitate the use when decoding the remaining pixels, and will not be confused with pixels that are not on the same diagonal line.

[0025] In a possible implementation of the first aspect, the method further includes:

[0026] If the current pixel to be decoded is a pixel located at the edge of the pixel array of the desired decoded image, and the last decoded pixel of the current pixel to be decoded is not a pixel located at the edge of the pixel array of the desired decoded image,

[0027] Then the pixel value of the next pixel point of the current pixel point to be decoded is stored in the first sub-first-in-last-out storage unit.

[0028] It can be understood that if the current pixel to be decoded is a pixel at the edge of the pixel array of the image to be decoded, and the last decoded pixel of the current pixel to be decoded is not a pixel at the edge of the pixel array of the image to be decoded, then it indicates that the current pixel to be decoded is the last pixel to be decoded on the diagonal line. After the current pixel to be decoded is stored, the first sub-FIFO storage unit is already in an empty state, so it can be used to store the next pixel of the current pixel to be decoded. When decoding the next pixel of the current pixel to be decoded, it is necessary to obtain the partial context data corresponding to the next pixel of the current pixel to be decoded from the second sub-FIFO storage unit and the third sub-FIFO storage unit. Therefore, the number of required sub-FIFO storage units is always determined, for example, 3, that is, the number of required sub-FIFO storage units will not increase with the increase of the number of decoded pixels, reducing the number of FIFO storage units used, thereby reducing the chip area occupied by the storage pixel value.

[0029] In a possible implementation of the first aspect, the method further includes:

[0030] If the current pixel to be decoded is not a pixel located at the edge of the pixel array of the desired decoded image, or the last decoded pixel of the current pixel to be decoded is a pixel located at the edge of the pixel array of the desired decoded image,

[0031] The pixel value of the next pixel point of the current pixel point to be decoded is stored in the third sub-first-in-last-out storage unit.

[0032] It can be understood that if the current pixel to be decoded is not the last pixel to be decoded, it will continue to be stored in the third sub-FIFO storage unit.

[0033] In a possible implementation of the first aspect, the method further includes:

[0034] According to the current pixel to be decoded, the next pixel to be decoded is determined according to the decoding order specified by the encoding and decoding protocol.

[0035] In a possible implementation of the first aspect, obtaining the pixel value of the current pixel to be decoded based on the first context data includes:

[0036] Obtaining a context probability table of the current pixel to be decoded based on the first context data;

[0037] Obtaining a first pixel value based on the context probability table,

[0038] A second pixel value is obtained by combining the first pixel value and the encoding value of the current pixel to be decoded, and the second pixel value is used as the pixel value of the current pixel to be decoded.

[0039] In a second aspect, an embodiment of the present application provides a decoding device, including:

[0040] A state control unit, used to determine the current pixel to be decoded;

[0041] A buffer, used to store a first portion of the first context data of the current pixel to be decoded; wherein the first portion of the data is data in the first context data that is the same as the second context data of a previous pixel of the current pixel to be decoded;

[0042] A first-in-last-out storage unit, used for storing the second part of the first context data of the current pixel to be decoded;

[0043] The first-in-last-out storage unit is also used to store the pixel value of the current pixel to be decoded obtained by decoding;

[0044] A context probability table selection calculation unit, used for performing context calculation on the first context data of the current pixel to be decoded to obtain a context probability table of the current pixel to be decoded;

[0045] The decoding calculation unit is used to perform decoding calculation in combination with the context probability table of the current pixel to be decoded and the encoded value of the current pixel to be decoded to obtain the pixel value of the current pixel to be decoded.

[0046] In a possible implementation of the second aspect, the method further includes:

[0047] The buffer is used to store the first context data.

[0048] In a possible implementation of the second aspect, the buffer stores the first context data in the following manner, including:

[0049] The buffer stores the second part of data sent from the first-in-last-out storage unit, removes data other than the first context data, and stores the data that needs to be removed and is still needed when decoding the remaining pixels in the first-in-last-out storage unit.

[0050] In a third aspect, an embodiment of the present application provides a chip, wherein the chip includes the above-mentioned second aspect and any one of the decoding devices in various implementations of the second aspect.

[0051] In a fourth aspect, an embodiment of the present application provides an electronic device, characterized in that the electronic device includes the chip of the third aspect.

[0052] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that instructions are stored on the storage medium, and when the instructions are executed on a computer, the computer executes the image decoding method of the first aspect and any one of the various implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 According to some embodiments of the present application, a schematic diagram of a scene of image coding is shown;

[0054] Figure 2A According to some embodiments of the present application, a schematic diagram of encoding direction of an image of 8*8 pixel size is shown;

[0055] Figure 2B According to some embodiments of the present application, a schematic diagram of a decoding direction for an image of 8*8 pixel size is shown;

[0056] Figure 3AAccording to some embodiments of the present application, a schematic diagram is shown in which the context data required for decoding the oblique line S3 is the pixel points of the oblique line S1 and the oblique line S2;

[0057] Figure 3B According to some embodiments of the present application, a schematic diagram is shown in which the context data required for decoding the oblique line S4 is the pixel points of the oblique line S2 and the oblique line S3;

[0058] Figure 4A According to some embodiments of the present application, a schematic diagram of the structure of a decoding device 200 is shown;

[0059] Figure 4B According to some embodiments of the present application, a schematic diagram of an interactive process of a decoding method is shown. DETAILED DESCRIPTION

[0060] The illustrative embodiments of the present application include but are not limited to an image decoding method, apparatus, chip, and electronic device.

[0061] For ease of understanding, the terms involved in this application are first explained below.

[0062] First Input Last Output (FILO) memory: access is performed in the order of the last written data being read out first. For example, if the order of stored data is 1-2-3, the order of readout is 3-2-1. The FILO memory in this application is specially processed and has two data ports.

[0063] Random Access Memory (RAM) is a memory that can write (store) or read (retrieve) information from any specified address at any time.

[0064] Registers: Registers are small storage areas inside the chip used to store data. They are used to temporarily store the data involved in the operation and the results of the operation. In this application, they can be used to implement a buffer to temporarily store the pixel values ​​of the decoded pixels.

[0065] It can be understood that the image decoding method proposed in the present application can be applicable to various video coding standards, for example, AV1 (Alliance for Open Media Video 1) protocol, H26.1, H.263, H.264 of ITU-T (International Telecommunication Union Telecommunication Standardization Sector), MPEG-1, MPEG-3, MPEG-4, MPEG-4AVC of ISO / IEC (International Organization for Standardization), etc. For the convenience of explanation, the AV1 protocol standard is used as an example for explanation below.

[0066] The following is a detailed description with reference to the accompanying drawings.

[0067] Figure 1 According to an embodiment of the present application, a scene graph for image coding is shown. Figure 1 The scenario includes: an electronic device 10 and an electronic device 30, and the electronic device 10 and the electronic device 30 may be connected via one or more networks.

[0068] In some embodiments of the present application, the electronic device 30 compresses the video data according to the encoding method specified in the video encoding protocol, AV1 protocol, and transmits it to the electronic device 10. The electronic device 10 receives the encoded video data (binary code stream) sent by the electronic device 30, and then can decode the encoded video data to implement the application. For example, the encoded video data can be decoded, and then the video can be played on the display screen based on the decoded data. It can be understood that since the video is composed of frames of images, encoding the video is actually encoding the image.

[0069] According to the encoding method specified in the AV1 protocol, each pixel in the image is encoded in a specific encoding order, for example Figure 2A As shown, Figure 2A Taking the 8*8 pixel image shown in the figure as an example, the encoding order is as shown by the arrows. First, pixel 0 is encoded, then pixel 1-8, then pixel 16-9-2, ..., and finally pixel 63 is encoded.

[0070] After the coded value is obtained according to the coding order and coding method specified in the video coding protocol, it is necessary to decode it according to the decoding order corresponding to the coding protocol, for example, decoding in the reverse order of the coding order, for example, Figure 2B As shown, the decoding method is performed as shown by the arrows in the figure, first decoding pixel 63, then decoding pixel 62 and pixel 55 in sequence, then decoding pixel 47, pixel 54, pixel 61, ..., and finally decoding pixel 0.

[0071] As mentioned above, according to the AV1 protocol, in the process of decoding the pixel value of a pixel, it is necessary to base the decoding on the context data corresponding to the pixel to be decoded, that is, the pixel values ​​of the five previously decoded pixels at adjacent positions whose relative positions to the decoded position are fixed. Figure 2B When decoding pixel 18 in the image, the pixel values ​​of pixel 26, pixel 34, pixel 19, pixel 20 and pixel 27 are needed for decoding. Therefore, during the decoding process, the decoded pixel values ​​need to be stored for subsequent decoding of pixel points.

[0072] In some embodiments, in order to increase the data reading speed, registers can be used to temporarily store decoded pixel values. However, registers usually occupy a larger area than other memories. For example, compared with RAM memory, when storing the same amount of data, the area of ​​the required register will be larger than the area of ​​the RAM memory. When a dedicated video processing chip is used for video decoding, a larger area resource of the chip will be occupied.

[0073] In other embodiments, in order to reduce the area occupied by the chip, multiple random access memories (RAMs) can be spliced ​​together to store the pixel values ​​of all decoded pixels. Figure 2B The pixel values ​​of the 64 pixels shown are all stored in a storage space composed of multiple random access memories (RAMs). Each memory stores a row of data in the image pixel array (or a column of data, the effect is the same). When the amount of stored data is large, it will also occupy a lot of chip area resources. In addition, if the decoded pixel values ​​are stored in the RAM memory, it will take a long time to read 5 data. For example, when reading the data of two reference points in the same row, since the data is located at different addresses of the same memory, at least 2 read operations are required to get all the data (single-port RAM), and the time consumption is twice that of the ideal state (one operation to obtain all data).

[0074] In order to solve the above problems, the embodiment of the present application proposes an image / video decoding method. During the decoding process, a buffer and a first-in-last-out storage unit are set at the same time to store the decoded pixel values, so as to reduce the memory area occupied and improve the reading speed of the stored data. Specifically, in some embodiments of the present application, considering that two consecutive pixels adjacent to each other in the decoding order have the same part of the context data required for decoding, after the pixel value of the currently decoded pixel is decoded, the context data used for decoding the pixel is stored in the buffer for use in decoding the next pixel. At the same time, three storage units with different storage addresses and first-in-last-out functions are set to store the pixel values ​​of the currently decoded pixel and the previously decoded pixel, so as to facilitate reading of data different from the context data required for decoding the previous pixel when decoding the pixel value of the next pixel.

[0075] For example, Figure 2BAs shown, in the decoding process, for the pixel points 11 and 18 decoded successively, the context data required for decoding the pixel point 11 are: the pixel values ​​of the pixel points 12, 13, 19, 20 and 27, and the context data required for decoding the pixel point 18 are: the pixel values ​​of the pixel points 19, 20, 26, 27 and 34. It can be seen that the pixel points 19, 20 and 27 are the same, so after decoding the pixel value of the pixel point 11, the pixel values ​​of the pixel points 12, 13, 19, 20 and 27 used for decoding the pixel point 11 can be stored in the buffer. Therefore, when decoding the pixel point 18, the pixel values ​​of the pixel points 19, 20 and 27 can be directly read from the buffer. In addition, decoding the pixel point 18 also requires the pixel values ​​of the pixel points 26 and 34, and these two pixel values ​​can be extracted from the storage unit of the first-in-last-out function mentioned above.

[0076] Specifically, in order to be able to quickly extract the pixel value that is different from the context data used for the last decoded pixel in the context data required for the current pixel to be decoded, three storage units with a First Input Last Output (FILO) function can be set. Considering that the context data required for the pixel to be decoded are respectively located on two oblique lines of the image pixel array, and the pixel to be decoded can be used as the context data for the next decoded pixel after being decoded, three FILO storage units are set, two of which store the pixel values ​​of the pixel points on the oblique line of the array where the context data required for the pixel to be decoded is located, and the other stores the pixel values ​​decoded from the pixel points on the oblique line where the pixel to be decoded is located. For example, Figure 3A As shown, the pixel point 48 to be decoded is located on the diagonal line S3. In the required context data, the pixel point 49 and the pixel point 50 are located on the diagonal line S1, and the pixel point 50 and the pixel point 57 are located on the diagonal line S2. Therefore, the pixel values ​​decoded from the pixel points on the diagonal lines S1, S2, and S3 are respectively stored in three FILO memories.

[0077] It can be understood that, during the decoding process, part of the context data of the pixel to be decoded is directly stored in the buffer, and the remaining data can be directly read from the FILO storage unit, so the data reading speed is greatly improved. In addition, the buffer only stores the context data of the previous decoded pixel, that is, the pixel values ​​of 5 pixels, so compared with caching all the previously decoded pixels, the required buffer area is greatly reduced. At the same time, during the decoding of the entire image, when the position of the pixel to be decoded is transferred from one oblique line of the pixel array to the next oblique line, the number of FILO storage units required is always only 3, that is, the number of FILO storage units required will not increase with the increase in the number of decoded pixels, reducing the number of FILO storage units used, thereby reducing the chip area occupied by the storage pixel values.

[0078] Specifically, for example, Figure 3A As shown, taking the decoding of the pixel points on the oblique line S3 as an example, it is necessary to successively decode the pixel points 6→13→20→27→34→41→48 on the oblique line S3. Assuming that the three FILO storage units are F1, F2 and F3, as shown in Table 1 below, the context data required for decoding the pixel points on the oblique line S3 are located on the oblique lines S1 and S2, respectively, and the pixel values ​​of the pixel points located on the oblique lines S1 and S2 previously decoded, and the pixel values ​​of the pixel points located on the oblique line S3 subsequently decoded are stored in the FILO storage units F1, F2 and F3, respectively.

[0079] Table 1

[0080] FILO storage unit Stored Data F1 15-22-29-36-43-50-57 F2 56-49-42-35-28-21-14-7 F3 6-13-20-27-34-41-48

[0081] The following description will be made by taking the decoding of pixel 48 located on the oblique line S3 as an example. Figure 3A As shown, the context data required when decoding pixel 48 includes the pixel values ​​of pixel 56, pixel 49, pixel 57, and pixel 50. At this time, pixel 41 has been decoded, and the context data used when decoding pixel 41 before: the pixel values ​​of pixel 42, pixel 43, pixel 49, pixel 50, and pixel 57 are temporarily stored in the buffer mentioned above, that is, in the context data required for decoding pixel 48, the pixel values ​​of pixel 49, pixel 50, and pixel 57 have been temporarily stored in the buffer, so it is only necessary to read the pixel value of pixel 56 from the FILO storage unit storing the diagonal line S2, so that all the required context data can be obtained. When decoding is performed in the order of the pixels on the decoding diagonal line S3 mentioned above, after decoding pixel 48, the decoding diagonal line S3 is completed.

[0082] It can be understood that the decoded pixel points located on the diagonal line S3 are stored in the FILO storage unit F3 in the order of 6-13-20-27-34-41-48 for decoding the next diagonal line. Figure 3B In addition, since the data stored in the FILO storage unit is no longer stored in the FILO storage unit after being read out, the pixels located on the oblique lines S1 and S2 stored in F1 and F2 are no longer stored in F1 and F2 after being read out in the process of decoding the pixels on the oblique line S3. However, since the pixels on the oblique line S4 are decoded after the pixels on S3 are decoded, Figure 3B As shown, to decode the pixel points on the diagonal line S4, the pixel values ​​of the pixel points on the diagonal line S2 are also needed as context data, so when the pixel values ​​of the pixel points on the diagonal line S2 are read from F2, the read pixel values ​​need to be stored back in F2. The pixel values ​​of the pixel points on the diagonal line S1 stored in F1 are not used when decoding the pixel points on the diagonal line S4, so there is no need to store the saved pixel values ​​back in F1, so F1 can be used to store the pixel values ​​of the pixel points on the diagonal line S4 that are subsequently decoded. Please refer to Table 2 for the specific storage of data.

[0083] Specifically, Figure 3B As shown, after decoding the pixel points on the oblique line S3, the pixel points on the oblique line S4 are decoded, that is, the pixel points 40→53→26→19→12→5 on the oblique line S4 are decoded in sequence. It can be understood that since the pixel points on the oblique line S4 are decoded in the order of 40→53→26→19→12→5, the order in which the pixel points on the oblique line S3 are read out is 48-41-34-27-20-13-6, which is opposite to the order 6-13-20-27-34-41-48 stored in the FILO storage unit F3, and the FILO storage unit has a first-in-last-out function, so the FILO storage unit F3 can output the pixel values ​​of the pixel points on the oblique line S3 in the order of decoding the pixel points of S4.

[0084] Table 2

[0085] FILO storage unit Stored Data F2 56-49-42-35-28-21-14-7 F3 6-13-20-27-34-41-48 F1 40-53-26-19-12-5

[0086] As mentioned above, when decoding the pixel points on the diagonal line S4, the pixel values ​​of the pixel points on the diagonal line S2 are also needed, so when decoding the pixel points on S3, after reading the pixel values ​​of the pixel points on the diagonal line S2 from F2, the read pixel values ​​need to be stored back in F2. As mentioned above, the pixel points on the diagonal line S4 are decoded in the order of 40→53→26→19→12→5, so the order of the pixel values ​​of the pixel points on S2 required is 56→49→42→35→28→21→14→7. When decoding the pixels on the diagonal line S3, the pixel values ​​of the pixels on S2 stored in F2 are read in the order of 7→14→21→→28→35→42→49→56, so the order in which they are stored in F2 again is 7→14→21→→28→35→42→49→56. Since F2 is first-in-last-out, when decoding the pixels on the diagonal line S4, data can be read from F2 in the order of 56→49→42→35→28→21→14→7.

[0087] Since the process of decoding the oblique line S3 and the oblique line S4 requires the use of the pixels on the oblique line S2, Figure 3A or Figure 3B When the oblique line S3 is shown, two ports can be set for F2. One port is used to read the data of the oblique line S2 stored during the original decoding, and the other port is used to store the data of the oblique line S2 that has been read out again to prepare for decoding the oblique line S4.

[0088] Figure 4A According to some embodiments of the present application, a decoding device 200 is shown, which is used to implement decoding of image data in a decoding process. The decoding device 200 includes a to-be-decoded unit 201, a decoding unit 202, and a decoding result output unit 203.

[0089] Specifically, the to-be-decoded data unit 201 may be used to store a coded value. Figure 2A or Figure 2B The coded value of each pixel in the decoder can be sent to the decoding calculation unit 202a. In some embodiments of the present application, the to-be-decoded data unit 201 can be implemented by various types of memory, such as RAM memory.

[0090] The decoding unit 202 is used to decode each pixel in the image pixel array to obtain the pixel value of each pixel. Figure 2A or Figure 2B Each pixel point in the corresponding image pixel array is decoded to obtain the pixel value of each pixel point.

[0091] The decoding result output unit 203 is used to store and output the pixel value of each pixel sent by the decoding unit 202. In some embodiments of the present application, the to-be-decoded data unit 201 may also be implemented by various types of memories, such as RAM memory.

[0092] The decoding unit 202 includes a decoding calculation unit 202a, a context cache unit 202b, a buffer 202c, a context probability table selection calculation unit 202d and a state control unit 202e.

[0093] The state control unit 202e is used to control the state of each sub-unit in the decoding unit 202, for example, to control each sub-unit to send and receive data. In addition, the next pixel to be decoded can be determined based on the currently decoded pixel, for example, Figure 3A As shown, if pixel 48 has been decoded currently, the next pixel to be decoded can be determined, that is, the pixel to be decoded currently is pixel 40. Information indicating the pixel to be decoded currently, such as the position information indicating pixel 40, is sent to context cache unit 202b and buffer 202c. In some embodiments of the present application, state control unit 202e can also be implemented by various basic circuit components.

[0094] The decoding calculation unit 202a is used to perform decoding calculation based on the context probability table of the pixel to be decoded and in combination with the encoded value of the pixel to be decoded, obtain the pixel value of the current pixel to be decoded, and send the decoded pixel value to the decoding result output unit 203 and to the context buffer unit 202b. In some embodiments of the present application, the decoding calculation unit 202a can also be combined with various basic circuit components to implement decoding calculations, etc.

[0095] The context cache unit 202b is not only used to store the pixel values ​​of the pixels decoded by the decoding calculation unit 202a, but also to store the data received in the buffer 202c, and is also used to determine the pixel points (i.e., context) required for the pixel points to be decoded currently according to the information indicating the pixel points to be decoded currently sent by the state control unit 202e, such as position information, read out the required data different from the context data of the previous pixel point according to the determined context, and send it to the buffer 202c.

[0096] Specifically, the context cache unit 202 b includes a first FILO storage unit 2001 , a second FILO storage unit 2002 , and a third FILO storage unit 2003 .

[0097] The first FILO storage unit 2001, the second FILO storage unit 2002, and the third FILO storage unit 2003 are used to store the pixel values ​​of the decoded pixels. In addition, the aforementioned three FILO storage units have corresponding addresses, for example, the first FILO storage unit 2001, the second FILO storage unit 2002, and the third FILO storage unit 2003 correspond to addresses M1, M2, and M3, respectively.

[0098] During the decoding process, the FILO storage unit with a set address (for example, M3) among the above-mentioned three FILO storage units is used to store the pixel value of the current pixel to be decoded decoded by the decoding calculation unit 202a. In addition, the FIFO storage units corresponding to M2 and M3 store the context data of the diagonal line where the current pixel to be decoded is located, and the context data of the diagonal line corresponding to M2 is closer to the diagonal line where the current pixel to be decoded is located.

[0099] If the current pixel to be decoded is the last pixel to be decoded on the diagonal line, after the current pixel to be decoded is decoded, in some implementations, the addresses of the three FILO storage units can be changed so that the pixel values ​​of the pixel points of the next diagonal line obtained by decoding are stored in the FIFO storage unit corresponding to the already vacant set address M3, wherein the change method is: M3 corresponds to the FILO storage unit corresponding to the original M1, M1 corresponds to the FILO storage unit corresponding to the original M2, and M2 corresponds to the FILO storage unit corresponding to the original M3. In some embodiments of the present application, the context cache unit 202b can be a cache, and the first FILO storage unit 2001, the second FILO storage unit 2002, and the third FILO storage unit 2003 can be FILO memories.

[0100] The buffer 202c is used to determine the required context according to the received information indicating the current pixel to be decoded, such as the position information, and obtain all the context data required for decoding according to the received data from the context cache unit 202b and the data stored in the original buffer, and send the data in the original stored data that is not needed for the current decoding but is needed for subsequent use to the buffer 202c. Delete the data that is not needed for the current decoding and is not needed for subsequent use, and then send all the context data to the context probability table selection calculation unit 202d. In some embodiments of the present application, the buffer 202c can be implemented by a register.

[0101] The context probability table selection calculation unit 202d is used to perform context calculation based on the acquired context data to obtain the context probability table of the pixel point to be decoded, and send it to the decoding calculation unit 202a. Among them, the context probability table is a series of probability value arrays that can be used for entropy decoding. In order to select a suitable probability table for decoding the current pixel value to be decoded, it is necessary to obtain the pixel value of its neighboring points, and calculate based on certain rules, and finally determine a certain probability table for decoding the current pixel point. In some embodiments of the present application, the context probability table selection calculation unit 202d can also be combined by various basic circuit components to realize logical operations, etc.

[0102] For ease of understanding, Figure 4B According to the embodiments of the present application, based on Figure 4A The device shown in FIG. 1 is a schematic diagram of an interactive process of a decoding method according to an embodiment of the present application. Figure 4B As shown, the method includes:

[0103] In order to clearly describe the solution of the present application, it is assumed that the corresponding relationship between each storage unit in the context cache unit 202b and M1, M2, and M3 is that the first FILO storage unit 2001, the second FILO storage unit 2002, and the third FILO storage unit 2003 correspond to addresses M1, M2, and M3 respectively.

[0104] S401, the state control unit 202e determines the current pixel to be decoded.

[0105] In some embodiments, the next pixel of the decoded pixel can be determined according to the latest decoded pixel stored in the context cache unit 202b and in accordance with the decoding order specified by the AV1 protocol, that is, the current pixel to be decoded.

[0106] For example, the state control unit 202e determines that the pixel point to be decoded currently is the pixel point 48 according to the pixel point 41 stored in the third FIFO storage unit 2003.

[0107] Among them, for the pixel point 48 on the diagonal line S3, the third FILO storage unit 2003 corresponding to M3 is used to store the pixel value of the pixel point on the diagonal line S3 where the pixel point 48 to be decoded is located, the second FILO storage unit 2002 corresponding to M2 stores the context data required in the adjacent diagonal line S2 of the diagonal line S3 where the decoded pixel point 48 is located, and the first FILO storage unit 2001 corresponding to M1 stores the context data required in the adjacent diagonal line S1 of the diagonal line S3 where the decoded pixel point 48 is located.

[0108] S402, the state control unit 202e sends information indicating the current pixel to be decoded to the context buffer unit 202b.

[0109] The information used to indicate the current pixel to be decoded may be the position of the current pixel to be decoded, for example, the information used to indicate the position of the pixel 48 .

[0110] S403: The context cache unit 202b determines the required context according to the received indication information, and reads the first data from the FIFO storage units corresponding to M1 and M2.

[0111] It can be understood that the first data is data different from the context data of the previous pixel. Since the context data required for decoding the current pixel to be decoded is the same as the context data of the previous pixel, the same data has been read out when decoding the previous pixel, so at this time, the context cache unit 202b only needs to read data different from the context data of the previous pixel.

[0112] In some embodiments, the context cache unit 202b knows the current pixel to be decoded based on the received information indicating the current pixel to be decoded, such as the position information, and then determines the required context according to the relative position of the required context and the current pixel to be decoded specified by the AV1 protocol, and then reads data different from the context data of the previous pixel from the FIFO storage units corresponding to M1 and M2 based on the determined context.

[0113] For example, the context cache unit 202b determines the required context, including pixel 56, pixel 49, pixel 57, and pixel 50, based on the received position information indicating the current pixel 48 to be decoded, and further based on the relative position of the required context and the current pixel to be decoded specified in the AV1 protocol, and the pixel values ​​of pixel 49, pixel 50, and pixel 57 have been read out when decoding the previous pixel 41, and the pixel value of pixel 56 is read from the second FIFO storage unit 2002 corresponding to M2.

[0114] S404: The context cache unit 202b sends first data to the buffer 202c.

[0115] For example, the context cache unit 202 b sends the pixel value of pixel 56 to the buffer 202 c.

[0116] S405: The buffer 202c adjusts the internal storage data according to the received indication information and the received first data.

[0117] It can be understood that the buffer 202c stores the context data of the previous pixel point of the current pixel point to be decoded in advance. Among the data stored in the buffer 202c, there will be data that needs to be saved in the buffer 202c again in the previously saved data determined according to the received position information indicating the current pixel point to be decoded, data that needs to be sent to the context cache unit 202b again, and data that needs to be deleted. Then, the received first data is stored internally, the data that needs to be sent to the context cache unit 202b again is read out, and the data that is no longer needed to be used later is deleted.

[0118] For example, buffer 202c determines the required context, including pixel 56, pixel 49, pixel 57, and pixel 50, based on the received position information indicating the current pixel 48 to be decoded, and saves the pixel value of pixel 56 received from the context cache unit 202b, reads out the pixel value of pixel 42, which is the data stored in the original buffer, and deletes the pixel value of pixel 43, which is the data stored in the original buffer, so that the data stored in buffer 202c includes the pixel values ​​of pixel 56, pixel 49, pixel 57, and pixel 50.

[0119] S406: The buffer 202c sends the read second data to the context cache unit 202b.

[0120] It can be understood that the second data is data that needs to be used again when decoding subsequent pixel points, such as pixel point 42.

[0121] S407: The context cache unit 202b stores the second data.

[0122] It can be understood that the context cache unit 202b stores the second data in the FILO storage unit that originally reads the second data, for example, storing the pixel value of pixel point 42 in the second FILO storage unit 2002 corresponding to M2.

[0123] S408: The buffer 202c sends all the context data required for the current pixel to be decoded to the context probability table selection calculation unit 202d.

[0124] For example, the buffer 202c sends all the context data required for the current pixel point 48 to be decoded to the context probability table selection calculation unit 202d, including the pixel values ​​of pixel point 56, pixel point 49, pixel point 57, and pixel point 50.

[0125] S409: The context probability table selection calculation unit 202d performs context calculation to obtain a context probability table.

[0126] The context probability table selection calculation unit 202d performs context calculation according to all context data of the current pixel to be decoded to obtain a context probability table of the current pixel to be decoded.

[0127] For example, the context probability table selection calculation unit 202d performs context calculation based on all context data of the current pixel point 48 to be decoded, and the pixel values ​​of pixel points 56, 49, 57, and 50 to obtain the context probability table of the current pixel point 48 to be decoded.

[0128] S410: The context probability table selection calculation unit 202d sends the context probability table to the decoding calculation unit 202a.

[0129] S411, the decoding calculation unit 202a obtains a first pixel value based on the context probability table.

[0130] It can be understood that the first pixel value is an intermediate decoding result of the current pixel to be decoded.

[0131] For example, the decoding calculation unit 202a obtains the first pixel value based on the context probability table of the current pixel point 48 to be decoded.

[0132] S412, the decoding calculation unit 202a sends a signal to the unit to be decoded 201 to obtain the coding value.

[0133] It can be understood that after the decoding calculation unit 202a obtains the first pixel value based on the context probability table, it is still necessary to combine the encoding value of the current pixel to be decoded to determine the final pixel value of the current pixel to be decoded.

[0134] For example, after the decoding calculation unit 202a obtains the first pixel value of the current pixel point 48 to be decoded based on the context probability table, it is still necessary to combine the encoding value of the current pixel point 48 to be decoded to determine the final pixel value of the current pixel point 48 to be decoded. Therefore, the decoding calculation unit 202a sends a signal to the decoding unit 201 to obtain the encoding value of the current pixel point 48 to be decoded.

[0135] S413, the unit to be decoded 201 sends the coded value to the decoding calculation unit 202a.

[0136] For example, the unit to be decoded 201 sends the encoded value of the current pixel point 48 to be decoded to the decoding calculation unit 202a.

[0137] S414, the decoding calculation unit 202a combines the encoding value and the first pixel value to obtain a second pixel value.

[0138] For example, the decoding calculation unit 202a combines the encoding value of the current pixel point 48 to be decoded and the first pixel value obtained based on the context data to obtain the second pixel value, that is, the final result of decoding. At this time, the pixel point 48 is the decoded pixel point.

[0139] S415 , the decoding calculation unit 202 a sends the second pixel value to the decoding result output unit 203 .

[0140] For example, the decoding calculation unit 202a sends the decoded pixel value of the pixel point 48 to the decoding result output unit 203.

[0141] S416, the decoding result output unit 203 receives and stores the second pixel value, and outputs it according to subsequent processing conditions.

[0142] For example, the pixel value of pixel point 48 received and decoded by the decoding result output unit 203 is output according to the subsequent need.

[0143] S417, the decoding calculation unit 202a sends the second pixel value and M3 to the context buffer unit 202b.

[0144] It can be understood that M3 is the second pixel value, that is, the pixel value of the currently decoded pixel point, which needs to be stored in the address of the FILO storage unit in the context cache unit 202b. When the context cache unit 202b obtains the address, the decoded pixel value of the current pixel point to be decoded can be stored in the corresponding FILO storage unit.

[0145] For example, the decoding calculation unit 202a sends the decoded pixel value of the current pixel point 48 to be decoded and the address corresponding to the FILO storage unit to be stored, which is M3, to the context cache unit 202b.

[0146] S418, the context cache unit 202b stores the received second pixel value into the FILO storage unit corresponding to M3.

[0147] For example, the context cache unit 202b stores the received pixel value of the currently decoded pixel point 48 in the third FILO storage unit 2003 corresponding to M3.

[0148] S419, the context cache unit 202b determines whether the correspondence between M1, M2 and M3 and each FILO storage unit needs to be changed.

[0149] It can be understood that the pixel point currently decoded is the last pixel point that needs to be decoded on the diagonal line. For example, Figure 3AThe context cache unit 202b needs to change the correspondence between M1, M2 and M3 and each FILO, and enter step S420; if the currently decoded pixel is not the last pixel to be decoded on the diagonal line, for example, Figure 3A For the pixel point 41 shown, there is no need to change the correspondence between M1, M2 and M3 and each FILO, and the process goes to step S421.

[0150] It can be understood that in some implementations, it is possible to determine whether the currently decoded pixel is the last pixel that needs to be decoded on the diagonal line by determining that the currently decoded pixel is located at the edge portion of the image pixel array and the previous pixel that is currently decoded is not at the edge portion.

[0151] S420, the context cache unit 202b changes the correspondence between M1, M2 and M3 and each FILO storage unit.

[0152] In some embodiments, the correspondence is changed by making M3 correspond to the FILO storage unit originally corresponding to M1, M1 correspond to the FILO storage unit originally corresponding to M2, and M2 correspond to the FILO storage unit originally corresponding to M3.

[0153] For example, for the currently decoded pixel 48, M3 corresponds to the first FILO storage unit 2001 originally corresponding to M1, M1 corresponds to the second FILO storage unit 2002 originally corresponding to M2, and M2 corresponds to the third FILO storage unit 2003 originally corresponding to M3.

[0154] It can be understood that after the decoded pixel points are stored and the correspondence between each address and each FILO storage unit is determined, it is necessary to enter the next loop to start decoding the next pixel point and enter S422.

[0155] S421, the context cache unit 202b does not change the correspondence between M1, M2 and M3 and each FILO storage unit.

[0156] It can be understood that after the decoded pixel points are stored and the correspondence between each address and each FILO storage unit is determined, it is necessary to enter the next loop to start decoding the next pixel point and enter S422.

[0157] S422, the state control unit 202e determines the next pixel to be decoded.

[0158] For example, the state control unit 202e determines that the next pixel to be decoded is pixel 40 based on pixel 48 stored in the third FIFO storage unit 2003.

[0159] It can be understood that the execution order of the above steps S401 to S422 is only an illustration. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.

[0160] Understandably, Figure 4A The structure of the decoding device 200 shown is only an example. In other embodiments, the decoding device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0161] It can be understood that each “unit” in the decoding device 200 of the present application is a hardware module composed of circuits and having various functions.

[0162] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. It is understandable that the integrated dedicated video processing chip may include the decoding device 200 of the present application, or include more or less components than shown in the figure, or combine some components, or split some components, or arrange different components.

[0163] Embodiments of the present application may be implemented as a computer program or program code executed on a programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0164] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0165] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0166] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROM), random access memories (RAM), erasable programmable read-only memories (EPROM), electrically erasable programmable read-only memories (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).

[0167] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0168] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0169] It should be noted that in the examples and description of this patent, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises one" does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0170] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0171] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims

1. An image decoding method, applied to a chip, characterized in that: The chip includes a first-in-last-out storage unit and a buffer; the method includes: Determine the current pixel to be decoded; Obtaining first context data of the current pixel to be decoded, wherein the first context data includes a first portion of data and a second portion of data, the first portion of data is obtained from the buffer, and the second portion of data is obtained from the first-in-last-out storage unit, the first portion of data is data in the first context data that is the same as the second context data of a pixel previously decoded of the current pixel to be decoded, and the second portion of data is data in the first context data that is different from the second context data, the first context data is pixel values ​​of a preset number of neighboring pixels used to decode the current pixel to be decoded, and the second context data is pixel values ​​of a preset number of neighboring pixels used to decode the previously decoded pixel; Obtaining a pixel value of the current pixel to be decoded based on the first context data; The pixel value of the current pixel to be decoded is stored in the first-in-last-out storage unit.

2. The method according to claim 1, characterized in that The second part of data is obtained by: The second part of data in the first-in-last-out storage unit is stored in the buffer, and the second part of data is obtained from the buffer.

3. The method according to any one of claims 1 or 2, characterized in that Also includes, The FIFO storage unit comprises a first sub-FIFO storage unit, a second sub-FIFO storage unit and a third sub-FIFO storage unit; The second part of data is obtained from the first-in-last-out storage unit, including: The second portion of data is obtained from the first sub-FIFO storage unit or the second sub-FIFO storage unit; The step of storing the pixel value of the current pixel to be decoded in the first-in-last-out storage unit comprises: The pixel value of the current pixel to be decoded is stored in the third sub-first-in-last-out storage unit.

4. The method according to claim 3, characterized in that Also includes, The data in the second context data that is different from the first part of the data is removed from the buffer, and the data in the removed data that is still needed when decoding the remaining pixels is stored in the second sub-first-in-last-out storage unit, wherein the data that is still needed is stored in the buffer from the second sub-first-in-last-out storage unit.

5. The method according to claim 4, characterized in that Also includes, If the current pixel to be decoded is a pixel located at the edge of the pixel array of the desired decoded image, and the last decoded pixel of the current pixel to be decoded is not a pixel located at the edge of the pixel array of the desired decoded image, Then the pixel value of the next pixel point of the current pixel point to be decoded is stored in the first sub-first-in-last-out storage unit.

6. The method according to claim 4, characterized in that Also includes, If the current pixel to be decoded is not a pixel located at the edge of the pixel array of the desired decoded image, or the last decoded pixel of the current pixel to be decoded is a pixel located at the edge of the pixel array of the desired decoded image, The pixel value of the next pixel point of the current pixel point to be decoded is stored in the third sub-first-in-last-out storage unit.

7. The method according to claim 1, characterized in that Also includes, According to the current pixel to be decoded, the next pixel to be decoded is determined according to the decoding order specified by the encoding and decoding protocol.

8. The method according to claim 1, characterized in that The obtaining the pixel value of the current pixel to be decoded based on the first context data includes: Obtaining a context probability table of the current pixel to be decoded based on the first context data; Obtaining a first pixel value based on the context probability table, A second pixel value is obtained by combining the first pixel value and the encoding value of the current pixel to be decoded, and the second pixel value is used as the pixel value of the current pixel to be decoded.

9. A decoding device, characterized in that: include, A state control unit, used to determine the current pixel to be decoded; A buffer, used to store a first portion of first context data of the current pixel to be decoded; wherein the first portion of data is data in the first context data that is the same as the second context data of the last decoded pixel of the current pixel to be decoded, the first context data is the pixel values ​​of a preset number of neighboring pixels used to decode the current pixel to be decoded, and the second context data is the pixel values ​​of a preset number of neighboring pixels used to decode the last decoded pixel; A first-in-last-out storage unit, used for storing a second portion of the first context data of the current pixel to be decoded, where the second portion of the data is data in the first context data that is different from the second context data; The first-in-last-out storage unit is also used to store the pixel value of the current pixel to be decoded obtained by decoding; A context probability table selection calculation unit, used for performing context calculation on the first context data of the current pixel to be decoded to obtain a context probability table of the current pixel to be decoded; The decoding calculation unit is used to perform decoding calculation in combination with the context probability table of the current pixel to be decoded and the encoded value of the current pixel to be decoded to obtain the pixel value of the current pixel to be decoded.

10. The device according to claim 9, characterized in that Also includes, The buffer is used to store the first context data.

11. The device according to claim 9 or 10, characterized in that The buffer stores the first context data in the following manner, including: The buffer stores the second part of data sent from the first-in-last-out storage unit, removes data other than the first context data, and stores the data that needs to be removed and is still needed when decoding the remaining pixels in the first-in-last-out storage unit.

12. A chip, characterized in that: The chip comprises the decoding device according to any one of claims 9 to 11.

13. An electronic device, characterized in that: The electronic device comprises the chip as claimed in claim 12.

14. A computer-readable storage medium, characterized in that: The storage medium stores instructions, which, when executed on a computer, cause the computer to execute the image decoding method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Video decoding caching method suitable for multiple reference frames, computer device and computer readable storage medium

    CN111355962A

  • Image processing method and device, electronic equipment and computer readable medium

    CN112950456A