Data processing method, electronic device and medium thereof
In the data processing of the palette mode, the second index value and the preset color information correspondence relationship are used to reduce the amount of calculated data, and the problems of low efficiency and high cost of data processing of the palette mode are solved, and efficient decoding and reducing hardware costs are achieved.
Patent Information
- Application Number
- CN202211098821.4
- 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
The palette mode involves a large amount of data and complex calculations during the data processing, resulting in inefficiency and increased costs.
By determining the second index value of the pixel point to be decoded, based on the correspondence between the preset color information and the first index value, the amount of data involved in the calculation during the decoding process is reduced, and the decoding efficiency is improved.
Effectively reduce the amount of data calculated during the decoding process, improve decoding efficiency, and reduce hardware design costs.
Smart Images

Figure CN115580728B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video coding and decoding, and in particular to a data processing method, an electronic device and a medium thereof. Background Art
[0002] Palette token is a video encoding format developed by the Alliance for Open Media (AOM). It is generally used to encode images with fewer colors, such as 8-color images (8-color images refer to color images composed of 8 colors, which have fewer colors than 16-color, 24-color, and 256-color images). It is a compression algorithm that can effectively reduce the size of the storage space occupied during image encoding. In certain cases, such as for the above-mentioned images with fewer colors, the use of palette token for encoding has the advantages of high precision and low error.
[0003] However, the data processing process of the palette mode involves a large amount of data and complex calculations. Therefore, based on the comprehensive consideration of data processing efficiency, encoding and decoding performance and cost, a high-performance and low-cost data processing method is needed. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a data processing method, an electronic device and a medium thereof, which are described in detail below.
[0005] In a first aspect, the present application provides a data processing method, which is applied to an electronic device, and the method includes:
[0006] Determine a pixel to be decoded in a first image to be decoded, determine multiple first pixel points adjacent to the pixel to be decoded according to the position of the pixel to be decoded, and determine the first index value corresponding to the color information of the multiple first pixel points based on the correspondence between preset color information and the first index value; determine the second index value corresponding to the pixel to be decoded according to the color information of the multiple first pixel points; and determine the color information corresponding to the pixel to be decoded according to the second index value of the pixel to be decoded based on the correspondence between the preset color information and the first index value.
[0007] In some implementations, the first image may be the 8-color image a mentioned below. The position of the pixel to be decoded is the current decoding position mentioned below, and the multiple first pixel points adjacent to the pixel points are the pixel points at the positions adjacent to the current decoding position. For example, if the current decoding position is pixel point A in image a, the pixel points at the positions adjacent to pixel point A are pixel points B, C, and D.
[0008] In some implementations, the correspondence between the preset color information and the first index value may be as follows:Figure 1b The color index table shown in FIG. 1 is a color index value, and the preset color information is the RGB value corresponding to each color. It can be understood that when the corresponding relationship between the color information and the first index value is determined, the first index value corresponding to the first pixel can be determined according to the color information of the first pixel.
[0009] In some implementations, the second index value of the pixel to be decoded is the color hash index value described below. Each color hash index value of the pixel to be decoded has a unique corresponding color hash value, and the color hash value can be related to the position and color information of multiple pixels adjacent to the pixel to be decoded, such as the contents shown in Tables 4 and 5 below. Therefore, in some implementations, the color hash index value of the pixel to be decoded, that is, the second index value, can be determined based on the color information of multiple first pixels. Then, based on the second index value and the corresponding relationship between the above-mentioned preset color information and the first index value, the color information corresponding to the pixel to be decoded is determined. In this way, the amount of data involved in the calculation during the decoding process can be effectively reduced. For example, there is no need to sort the color weights (or color scores) of the first pixels based on the distance between them and the pixel to be decoded and the color information, thereby improving the decoding efficiency.
[0010] In combination with the first aspect, in a possible implementation method of the first aspect, the first image is decoded based on a first decoding method; and multiple first pixel points adjacent to the pixel point to be decoded are determined according to the position of the pixel point to be decoded, including: according to the position of the pixel point to be decoded, determining the pixel points adjacent to the pixel point to be decoded and above, to the left, and diagonally above the left of the pixel point to be decoded.
[0011] In some implementations, the first decoding method may be as follows: Figure 3a It can be understood that in this decoding mode, the plurality of first pixel points adjacent to the pixel point to be decoded are the pixel points above, to the left and to the upper left of the pixel point to be decoded.
[0012] In combination with the first aspect and the above-mentioned possible implementation methods, in a possible implementation method of the first aspect, the second index value corresponding to the pixel to be decoded is determined according to the color information of multiple first pixel points, including: based on the correspondence between the preset first index value and the color information of multiple second pixel points at different positions, the second index value is determined according to the relative positions of the multiple first pixel points and the pixel to be decoded, and the color information of the multiple first pixel points, wherein the first image is decoded based on the first decoding method, and the multiple second pixel points at different positions include each pixel point above, to the left, and diagonally above the left of any pixel point in the first image.
[0013] In some implementations, the correspondence between multiple first index values and the color information of second pixels at multiple different positions may be as shown in Table 4 and Table 5 below.
[0014] In combination with the first aspect and the above-mentioned possible implementation manners, in a possible implementation manner of the first aspect, according to the second index value of the pixel to be decoded, based on the correspondence between the preset color information and the first index value, the color information corresponding to the pixel to be decoded is determined, including: according to the first index value corresponding to the color information of multiple first pixels, a first array is determined, the first array includes multiple elements, and the number of the multiple elements is greater than the number corresponding to the color types included in the first image; starting from the first element of the first array, according to the color information of the multiple first pixels, the values of the first first preset number of elements in the first array are determined, wherein the first preset number is equal to the number of first pixels, and the color information corresponding to the multiple first pixels is different, and the first index values corresponding to the color information of the multiple first pixels are respectively used as the values of the first first preset number of elements of the first array; corresponding to the second number of first pixels among the multiple first pixels, the color information of the multiple first pixels is different, and the first index values corresponding to the color information of the multiple first pixels are respectively used as the values of the first first preset number of elements of the first array; corresponding to the second number of first pixels among the multiple first pixels, the second number of elements among the first first preset number of elements are marked as invalid values, and the first index values corresponding to the color information of the remaining first pixels among the multiple first pixels are used as the values of the remaining elements among the first first preset number of elements, wherein the second number is less than the first preset number.
[0015] In some implementations, the first array may be a color_order that is bit-extended as described below. The number of elements in the first array is related to the number of color types included in the first image and is greater than the number of color types included in the first image. More specifically, the number of the first array is determined by the color types of the first image and the number of the first pixel points. For example, if the first image is an 8-color image and the number of the first pixel points is 3, then the number of elements in the first array should be 8+3=11.
[0016] In some implementations, it is necessary to determine the value of each element in the first array based on the color information of each first pixel in the plurality of first pixels. More specifically, the values of the first first preset number of elements in the first array are determined based on the color information of each first pixel in the plurality of first pixels, and the first preset number is equal to the number of first pixels.
[0017] In some implementations, if the color information of the first pixels is different, the first index values corresponding to the color information of the first pixels are respectively used as the values of the first first preset number of elements of the first array.
[0018] In some implementations, if some of the first pixels have the same color information, that is, there are a second number of first pixels whose color information is different. Since each element in the first array represents the first index value of the first pixel, when there are a second number of first pixels whose color information is different, it indicates that some of the first preset number of elements do not have corresponding first index values. For example, if there are three first pixels, namely pixels B, C, and D, and the color information of pixels B and C is the same, that is, the first index value is the same, then among the first three elements of the first array, only two elements have corresponding first index values, and the first index values corresponding to these two elements are the first index values corresponding to pixel B or (pixel C) and pixel D, respectively.
[0019] In some implementations, the invalidation mark may be to set the element value of the element to any array, for example, for the first array corresponding to the 8-color image a, when an element in the array is invalidated, the element value of the element may be set to 8. This application does not limit this.
[0020] In combination with the first aspect and the above-mentioned possible implementation methods, in a possible implementation method of the first aspect, the method also includes: sorting the first first preset number of elements in the first array in ascending order to obtain a second array, wherein the number of elements of the second array is the same as the first preset number, and determining the color information corresponding to the pixel to be decoded based on the second index value of the pixel to be decoded and the second array.
[0021] In some implementations, the second array is color_sort below.
[0022] In combination with the first aspect and the above-mentioned possible implementation methods, in a possible implementation method of the first aspect, the color information corresponding to the pixel to be decoded is determined according to the second index value of the pixel to be decoded and the second array, including: corresponding to the second index value being less than the number of valid values in the second array, based on the correspondence between the preset color information and the first index value, the color information corresponding to the pixel to be decoded is determined according to the second index value; corresponding to the second index value being greater than the number of valid values in the second array, based on the correspondence between the preset color information and the first index value, the color information corresponding to the pixel to be decoded is determined according to the difference between the second index value and the number of valid values in the second array.
[0023] In some implementations, the number of valid values in the second array is counter below.
[0024] When the second index value, that is, the color hash index value of the pixel to be decoded is less than the counter, the color information corresponding to the pixel to be decoded can be determined by using the corresponding relationship between the second index value and the preset color information and the first index value.
[0025] When the second index value is greater than the counter, the color information corresponding to the pixel to be decoded is determined according to the difference between the second index value and the number of valid values in the second array and the correspondence between the preset color information and the first index value. More specifically, the color information corresponding to the pixel to be decoded needs to be determined according to the difference between the second index value and the number of valid values in the second array and the size of each element value in the second array, as well as the correspondence between the preset color information and the first index value. For details, please refer to the relevant description below, which will not be repeated here.
[0026] In combination with the first aspect and the foregoing possible implementation manners, in a possible implementation manner of the first aspect, the color information includes an RGB value of a pixel.
[0027] In combination with the first aspect and the foregoing possible implementation manners, in a possible implementation manner of the first aspect, the first decoding method includes a palette compression algorithm.
[0028] In a second aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing computer program instructions; and a processor, wherein the processor and the memory are coupled, and when the computer program instructions stored in the memory are executed by the processor, the electronic device implements the method described in any one of the above-mentioned first aspect and possible implementation methods of the first aspect.
[0029] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, characterized in that when the computer program is executed by a processor, it implements the method described in the first aspect and any one of the possible implementation methods of the first aspect.
[0030] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the methods in the above-mentioned first aspect and possible implementations of the first aspect.
[0031] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1a According to an embodiment of the present application, a schematic diagram of an 8-color image a is shown;
[0033] Figure 1b According to an embodiment of the present application, a schematic diagram of a color palette or a color index table established based on an 8-color image a is shown;
[0034] Figure 2 According to an embodiment of the present application, a schematic diagram of a decoding process without using the data processing method of the present application is shown;
[0035] Figure 3a According to an embodiment of the present application, a decoding method for image a is shown;
[0036] Figure 3b According to an embodiment of the present application, a schematic diagram of the positions of neighboring pixels is shown, taking pixel point A as the current decoding position as an example;
[0037] Figure 4 According to an embodiment of the present application, a schematic diagram of the distance relationship between pixel point A and its adjacent pixel points is shown;
[0038] Figure 5 According to an embodiment of the present application, a schematic diagram of a sorting process for color score groups corresponding to pixel point A is shown;
[0039] Figure 6 According to an embodiment of the present application, a schematic diagram of the positional relationship between pixel point A and its adjacent pixel points is shown;
[0040] Figure 7 According to an embodiment of the present application, a schematic diagram of a decoding process using the data processing method of the present application is shown;
[0041] Figure 8 According to an embodiment of the present application, a hardware structure diagram of an electronic device 100 is shown. DETAILED DESCRIPTION
[0042] The present application provides a data processing method, an electronic device and a medium thereof.
[0043] The following will use terms commonly used by those skilled in the art to describe various aspects of the illustrative embodiments. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A or B exists at the same time, and B exists alone. In addition, in the description of the implementation of the present application, "multiple" means two or more than two.
[0044] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.
[0045] The palette mode or palette compression algorithm is a coding method for encoding images with fewer colors. It can effectively reduce the storage space occupied during the image encoding process and improve the image encoding and decoding efficiency.
[0046] For example, Figure 1a As shown, assuming Figure 1a Image a is an 8-color image with a resolution of 450 (pixels) × 500 (pixels), so there are a total of 8 colors used in this image a. If the color pixel value of each pixel (hereinafter referred to as pixel value) is represented by three color components R (red), G (green), and B (blue) (values between 0 and 255), then the data size corresponding to each color component of each pixel is 8 bits. Each pixel has three color components R, G, and B. Therefore, storing a pixel requires a storage space of 3×8 bits, that is, 3 bytes. Then the storage space required to store this image a is:
[0047] Size1=450×500×3 Byte=675000Byte
[0048] However, if a palette compression algorithm is used, it is only necessary to create a color index table that records the 8 colors involved in image a, and then use a data size of approximately 4 bytes to represent the positions of these 8 colors in the index table (that is, the data size of the index value), as well as the color pixel value corresponding to each index value, to fully represent the image a.
[0049] For example, assuming that the colors involved in image a are black, dark red, dark green, dark yellow, dark blue, dark purple, dark cyan, and light gray, then these 8 colors, the pixel values corresponding to each color, and their corresponding index values can be as follows: Figure 1b shown.
[0050] The storage space occupied by the color index table is only 3 Bytes × 8 = 24 Bytes, and the storage space required to store the image a and the index table is only:
[0051] Size2=(450×500×0.5Byte)+(3Byte×8)=112524Byte
[0052] Comparing Size1 and Size2, we can see that the storage space required to represent image a using the palette mode is approximately 1 / 6 of the original size, thus achieving the purpose of saving storage space.
[0053] However, when the palette mode is used to process images, the amount of data involved is relatively large and the calculation is relatively complex, thereby increasing the corresponding data processing cost when the electronic device uses the palette mode to process data.
[0054] Specifically, Figure 2 According to an embodiment of the present application, a schematic flow chart of a method for processing data using a palette mode is shown. It can be understood that the method is executed by a processor of an electronic device, wherein the introduction of the electronic device will be combined with Figure 7 If Figure 2 As shown, the method includes:
[0055] 201, initialize the pixel matrix corresponding to image a. In some implementations, the position of each pixel in image a can be represented by x, y, for example Figure 3a Pixel A can be expressed as (x, y), pixel B can be expressed as (x, y-1), pixel C can be expressed as (x-1, y-1), and pixel D can be expressed as (x-1, y).
[0056] 202, determine the current decoding position, and obtain the neighboring position information of the current decoding position.
[0057] It should be noted that the decoding principle is to predict the information of the pixel to be decoded using the information of other pixels adjacent to the pixel to be decoded. The information of the pixel includes the color information, motion information, etc. of the pixel, which is not limited in this application.
[0058] In some implementations, the decoding schematic diagram for each pixel point of image a may be as follows: Figure 3a As shown, starting from the first row and the first column, the pixels of image a are decoded in sequence according to the order shown in the figure. It is not difficult to see that when decoding pixel A, pixel B, pixel C, and pixel D have all been decoded, so pixel A can be decoded using the pixel information of pixel B, pixel C, and pixel D. It can be understood that in other implementations of the present application, the decoding order for image a can also be performed in other ways, which should be well known to those skilled in the art and is not limited here.
[0059] In some implementations, taking the current decoding position as pixel A as an example, the neighboring position information of pixel A includes pixel information of pixel B above it, pixel C above its left, and pixel D to its left, that is, color information, motion information, etc. of pixel B, pixel C, and pixel D. Among them, color information includes Figure 1b The color pixel value of the pixel shown or the color index value corresponding to the color pixel value.
[0060] 203, initialize the color score array color_score and the color index array color_order.
[0061] Among them, the color index array color_order corresponds to the color index value and color type in Table 1 shown below. The value of each element in the color score array corresponds one-to-one to the value of each element in the color index array, that is, the color score array is used to record the occurrence of each color in the color index array. It can be understood that the color information of the pixel point at the neighboring position that is closer to the current decoding position will have a greater impact on the color information of the pixel point corresponding to the current decoding position. Therefore, the value of each element in the color score array can represent the weight of each color appearing at the neighboring position of the current decoding position, and the weight can reflect the impact of each color appearing at the neighboring position of the current decoding position on the color of the current decoding position. In addition, in some implementations, the color score array color_score and the color index array color_order correspond to the current decoding position, that is, after completing the pixel point corresponding to the current decoding position (for example Figure 3b After decoding the pixel A in , the next pixel is decoded, for example Figure 3b When the pixel point E(x+1, y-1) is initialized, the color score array and color index array need to be reinitialized.
[0062] In some implementations, the color score array color_score and the color index array color_order are related to the attribute of the image a. The attribute of the image a refers to whether the image a is an 8-color image, a 16-color image, or a 24-color image.
[0063] That is to say, if image a is an 8-color image, the color score array of image a should be color_scores[i], where i is an integer greater than or equal to 0 and less than or equal to 7, and correspondingly, the color index array of image a should be color_order[j], where j is an integer greater than or equal to 7. Similarly, if image a is a 16-color image, the color score array of image a should be colorscores[m], where m is an integer greater than or equal to 0 and less than or equal to 15, and correspondingly, the color index array of image a should be color_order[n], where n is an integer greater than or equal to 0 and less than or equal to 15. In the implementation of the present application, for ease of explanation, image a is taken as an 8-color image for example, but it should be understood that the present application does not impose any limitation on this.
[0064] Exemplarily, the correspondence between the element values in the color index array of the initialized 8-color image a and the color index values in the above index table can be shown in the following Table 1:
[0065] Table 1 Correspondence between the element values in the color index array and the color index values in the above index table
[0066] Each element of the color index array Color index value color RGB Value color_oder[0] 1 black 000000 color_oder[1] 2 Dark Red 800000 color_oder[2] 3 Dark Green 008000 color_oder[3] 4 Dark yellow 808000 color_oder[4] 5 Dark Blue 000080 coloroder[5] 6 Dark Purple 800080 color_oder[6] 7 dark cyan 008080 color_oder[7] 8 Light Gray C0C0C0
[0067] In some implementations, the values of each element in the initialized color score array may all be 0, that is, color_score[0]=0, color_score[1]=0, color_score[2]=0, color_score[3]=0, color_score[4]=0, color_score[5]=0, color_score[6]=0, color_score[7]=0.
[0068] 204 , using the color information of the pixel points corresponding to the neighboring positions of the current decoding position, update the color score array color_score to obtain an updated color score array n_color_score.
[0069] As mentioned above, during the decoding process, pixel information of the current decoding position is predicted using pixel information of positions adjacent to the current decoding position. More specifically, in some implementations, color information of the current decoding position can be predicted using color information of pixels of positions adjacent to the current decoding position.
[0070] Furthermore, as mentioned above, the color information of the pixel points at the neighboring position that is closer to the current decoding position has a greater impact on the color information of the current decoding position. Figure 4As shown in the figure, since the distance between pixel point B and pixel point A is closer than the distance between pixel point C and pixel point A, and similarly, the distance between pixel point D and pixel point A is also closer than the distance between pixel point C and pixel point A, the pixel point information of pixel point B and pixel point D has a greater impact on the pixel point information of pixel point A. Therefore, the scores of pixel point B and pixel point D can be set higher than the score of pixel point C. For example, the scores of pixel point B and pixel point D can be 2, and the score of pixel point C can be 1. The distance between pixels can be based on Figure 4 The distance between the center points of the grids is measured in units of grids, and this application does not impose any restrictions on this.
[0071] For example, assume that the color of the pixel B is dark blue, the color of the pixel C is dark cyan, and the color of the pixel D is dark purple, that is, the color index value corresponding to the pixel B in the above color index table is 4, the color index value corresponding to the pixel C in the above color index table is 5, and the color index value corresponding to the pixel D in the above color index table is 6.
[0072] Then the color score array updated by using pixel point B, pixel point C and pixel point D can be shown in the following Table 2:
[0073] Table 2 Updated color score array
[0074] The value of each element in the color score array Value before update Updated value color_score[0] 0 0 color_score[1] 0 0 color_score[2] 0 0 color_score[3] 0 2 color_score[4] 0 1 color_score[5] 0 2 color_score[6] 0 0 color_score[7] 0 0
[0075] That is, when decoding pixel A, the values in the corresponding color score array n_color_score are color_score[0]=0, color_score[1]=0, color_score[2]=0, color_score[3]=2, color_score[4]=1, color_score[5]=2, color_score[6]=0, color_score[7]=0.
[0076] 205 , sorting the values of the elements in the updated color score array n_color_score to determine the color scores that meet the first preset condition.
[0077] In some implementations, the values of each element in the updated color score array n_color_score are sorted in descending order to obtain a sorted color score array. The method for sorting the values of each element in the updated color score array includes but is not limited to bubble sorting, binary sorting, etc. Exemplarily, the method for sorting the color score array may be as follows: Figure 5 shown.
[0078] It can be understood that since the values of each element in the color score array correspond one-to-one to the values of each element in the color index array, that is, color_score[0] corresponds to color_order[0], color_score[1] corresponds to color_order[1], ..., color_score[7] corresponds to color_order[7], therefore, while sorting the values of each element in the color score array, it is also necessary to synchronously adjust the values of each element in the color index array accordingly. For example, before the update, the color score array color_score corresponds to each element in the color index array color_order one by one, that is, color_score[3] corresponds to color_order[3], color_score[4] corresponds to color_order[4], and color_score[5] corresponds to color_order[5]. After sorting, color_score[3], color_score[4], and color_score[5] are adjusted to n_color_score[0], n_color_score[1], and n_color_score[2]. Correspondingly, the updated n_color_order[0] should be 4, n_color_order[1] should be 6, and n_color_order[2] should be 5.
[0079] That is, the updated color score array n_color_score and its corresponding color index array n_color_order may be shown in Table 3 below:
[0080] Table 3 Updated color score array and its corresponding color index array
[0081]
[0082] In some implementations, the first preset condition may be the first three element values after the element values in the color score array are sorted from large to small. For example, taking the updated color score array shown in Table 3 above as an example, the first three element values in the updated color score array are: n_color_score[0]=2, n_color_score[1]=2, n_color_score[2]=1.
[0083] In some implementations, more or fewer element values may be taken from the updated color score array, and it is understood that this depends on the number of pixels at the neighboring positions that the current decoding position depends on. This application does not impose any limitation on this.
[0084] 206 , calculating a color hash value of a current decoding position according to a color score that meets a first preset condition.
[0085] In some implementations, a hash weight may be set for each color score in the updated color score array n_color_score, and then the hash weighted sum of the color scores is calculated. The hash weight is an empirical value or an experimental value, for example, the weight for n_colorscore[0] may be set to 2, the weight for ncolor_score[1] may be set to 1, and the weight for n_color_score[2] may be set to 2, and the present application does not limit this.
[0086] For example, if the weight of n_color_score[0] is 2, the weight of n_color_score[1] is 1, and the weight of n_color_score[2] is 2, then the color hash value corresponding to the current decoding position (i.e., pixel A) is: (color_score[0]×2+color_score[1]×1+color_score[2]×2)=(2×2+2×1+2×2)=10. In other implementations of the present application, the color hash value corresponding to the current decoding position may also be calculated in other ways.
[0087] 207 , determining a pixel value corresponding to the current decoding position according to the color hash value.
[0088] In some implementations, it is necessary to determine the color index value corresponding to the current decoding position according to the color hash value, and then determine the pixel value corresponding to the current decoding position according to the color index value corresponding to the current decoding position.
[0089] For example, assuming that the color index value determined by the color hash value of pixel A is 3, the updated color index grouping n_color_order in Table 3 can determine that n_color_order[3]=1 corresponds to the current decoding position (i.e., pixel A). According to Table 1, it can be seen that the color corresponding to n_color_order[3]=1 is black, and its pixel value should be: 000000.
[0090] The above method can be used to determine the color information corresponding to the current decoding position based on the three pixel points adjacent to the current decoding position.
[0091] However, it can be seen from the above methods 201 to 207 that the decoding process of each pixel point depends on the sorting of the color scores of a series of pixel points adjacent to the pixel point. For example, the decoding of pixel point A needs to be based on the sorting of the color scores of pixel points B, pixel point C, and pixel point D adjacent to pixel point A. In hardware implementation, it is necessary to rely on the comparator of the electronic device. Moreover, if a general comparator is used to implement the above sorting, it often takes multiple system clock cycles (for the sorting of the 8 element values in the above color_score, it is generally necessary to perform 8+7+6=21 times) to obtain the largest three element values. If a parallel comparator structure is used, multiple comparators are required to form a parallel structure, which increases the chip area required for the decoding device, and thus also increases the design cost of the electronic device hardware.
[0092] In order to solve the above technical problems, the present application has improved the data processing method. The principle and implementation details of the data processing method of the present application are introduced below in combination with the various diagrams in the text.
[0093] It can be seen from 201 to 207 above that the color index value of the current decoding position is related to the color hash value of the current decoding position (refer to 206 to 207 above), and the color hash value of the current decoding position is only related to the weighted sum of the three largest color scores in the color score array corresponding to the current decoding position (refer to 202 to 205 above). The three largest color scores in the color score array of the current decoding position are actually the color scores of the three pixel points adjacent to the current decoding position.
[0094] Then, when the current decoding position is determined, the three color scores of its adjacent positions can be determined, and the sum of these three color scores can also be determined, so the color hash value corresponding to the current decoding position can also be determined.
[0095] Therefore, when the current decoding position is determined, the elements in the color score array may not be sorted, that is, the above 204 is not performed, but the color hash value corresponding to the current decoding position is determined according to the color scores of the positions adjacent to the current decoding position.
[0096] For example, Figure 6 As shown, assuming that the current decoding position is pixel A (x, y), the color weights (or scores) of pixel B, pixel C, and pixel D adjacent to pixel A are 2, 1, and 2, respectively. Then the color score array corresponding to pixel A can be determined based on the colors of pixel B, pixel C, and pixel D.
[0097] Specifically, if the colors of pixels B, C, and D are the same, that is, the pixels adjacent to pixel A are all of the same color, then only color_score[0] in the color score array has a color score, and the color score is: 2+2+1=5. It can be understood that the same color between pixels in the various embodiments of the present application includes the same color index values of the pixels or the same color pixel values, and the difference between the color index value and the color pixel value is that the data size required for the color index value (4 bits) is smaller than the data size required for the color pixel value (8 bits).
[0098] If the colors of pixels B, C, and D are different, that is, the colors of the pixels adjacent to pixel A are different, then color_score[0], color_score[1], and color_score[2] in the color score array all have color scores, and the color scores are: color_score[0]=2, color_score[1]=2, and color_score[2]=1.
[0099] If the colors of pixels B and C are the same, that is, the pixels adjacent to pixel A have two colors, then color_score[0] and color_score[1] should have color scores in the color score array, and the color scores are: color_score[0]=3, color_score[1]=2.
[0100] Similarly, if the colors of pixels D and C are the same, that is, the pixels adjacent to pixel A have two colors, then color_score[0] and color_score[1] should have color scores in the color score array, and the color scores are: color_score[0]=3, color_score[1]=2.
[0101] If the colors of pixels B and D are the same, that is, the pixels adjacent to pixel A have two colors, then color_score[0] and color_score[1] should have color scores in the color score array, and the color scores are: color_score[0]=2+2=4, color_score[1]=1.
[0102] If the colors of pixels B and C are the same, that is, the pixels adjacent to pixel A have two colors, then color_score[0] and color_score[1] should have color scores in the color score array, and the color scores are: color_score[0]=3, color_score[1]=2.
[0103] If pixel A is the first row of pixels, then pixel A actually only has pixels adjacent to its left, that is, pixels adjacent to pixel A have only one color. Then color_score[0] should have a color score in the color score array, and the color score is: color_score[0]=2.
[0104] If pixel A is the first column of pixels, then pixel A actually only has the pixels in the upper adjacent position, that is, the pixels in the adjacent position of pixel A also have only one color, then color_score[0] should have a color score in the color score array, and the color score is: color_score[0] = 2.
[0105] Specifically, the relationship between the position of pixel A and the colors of pixel B, C, D and the color score array corresponding to pixel A can be shown in Table 4 below:
[0106] Table 4 The colors of pixels B, C, and D adjacent to pixel A and the color score array corresponding to pixel A
[0107] Pixels B, C, D Color score array color_score Pixels B, C, and D have the same color {5,0,0,……,0,0} The colors of pixels B, C, and D are different {2,2,1,……,0,0} Pixels B and C have the same color {3,2,0,……,0,0} Pixels B and D have the same color {4,1,0,……,0,0} Pixels C and D have the same color {3,2,0,……,0,0} Pixel A is the pixel in the first row {2,0,0,……,0,0} Pixel A is the pixel in the first column {2,0,0,……,0,0}
[0108] Correspondingly, after obtaining the color score array in each case, the color hash value corresponding to each color score array can be calculated using the above method 206. Exemplarily, based on the color score array shown in Table 4, and assuming that the hash weight of color_score[0] is 1, the hash weight of color_score[1] is 2, and the weight of color_score[2] is also 2, the color hash value corresponding to each case can be obtained according to color_score[0]×1+color_score[1]×2+color_score[2]×2, as shown in Table 5:
[0109] Table 5 Color score arrays and their corresponding color hash values in various cases
[0110] Color score array color_score Color hash value {5,0,0,……,0,0} 5×1+0×2+0×2=5 {2,2,1,……,0,0} 2×1+2×2+1×2=8 {3,2,0,……,0,0} 3×1+2×2+0×2=7 {4,1,0,……,0,0} 4×1+1×2+0×2=6 {3,2,0,……,0,0} 3×1+2×2+0×2=7 {2,0,0,……,0,0} 2×1+0×2+0×2=2 {2,0,0,……,0,0} 2×1+0×2+0×2=2
[0111] In the case of a color hash value that may correspond to the current decoding position, the color hash value that actually corresponds to the current decoding position can be determined based on the actual conditions of the pixels at the neighboring positions corresponding to the current decoding. Furthermore, the color pixel value corresponding to the current decoding position can be determined based on the color hash value corresponding to the current decoding position.
[0112] Therefore, in the data processing method of the present application, the relationship between the color hash value that may correspond to the position to be decoded and the color information of the pixel points at the positions adjacent to the position to be decoded can be pre-set, and then the color hash value corresponding to the position to be decoded is determined according to the actual situation of the color information of the pixel points at the positions adjacent to the position to be decoded, so as to facilitate the subsequent determination of the color pixel value corresponding to the position to be decoded according to the color hash value. Through this method, the calculation of the color hash value and the sorting of the color score array are decoupled, and there is no need to wait for the sorting of the color score array to be completed, and then calculate the color hash value according to the sorting result (that is, the updated n_color_score mentioned above), thereby improving the efficiency of decoding.
[0113] In addition, the update of the color index array (such as n_color_order in Table 3 above) is actually only caused by the change of the position of each element in the color score array when it is sorted. Moreover, it can be seen from the comparison between Table 1 and Table 3 that, except for the adjustment to the first three elements of the color index array, the corresponding relationship between the array number and the element value of the other elements only changes in sequence, or does not change. For example, the array number of the element value 1 changes from 0 in Table 1 to 3 in Table 3, the array number of the element value 2 changes from 1 in Table 1 to 4 in Table 3, the array number of the element value 3 changes from 2 in Table 1 to 5 in Table 3, and from 1 in Table 1 to 4 in Table 3. For another example, the array numbers of the element values 7 and 8 do not change.
[0114] Therefore, in the data processing method of the present application, when the color index array is updated, it is only necessary to sequentially adjust or not adjust the array indices of other elements according to the corresponding position changes of the three color scores in the color index array.
[0115] Continuing with the example of the 8-color image shown in FIG1 , in some implementations, color_order can be expanded to 11 bits, and then the first 3 bits of color_order, i.e., color_order[0], color_order[1], color_order[2], are used to represent the color index values corresponding to the 3 pixels adjusted in front, and color_order[0], color_order[1], color_order[2] are sorted in ascending order, and the array color_sort[k] is used to record the values of the sorted color_order[0], color_order[1], color_order[2], where k is an integer greater than or equal to 0 and less than or equal to 1.
[0116] Since the pixels near pixel A may have the same color, for example, pixel B and pixel C have the same color. In other words, in fact, only the color index values corresponding to two colors are adjusted to color_order[0] and color_order[1], while color_order[2] has no corresponding color index value. Therefore, in order to indicate this situation, the elements without corresponding element values can be marked as invalid (for example, 8), and counter is used to record the number of valid values in color_order[0], color_order[1], and color_order[2]. It can be understood that the value of counter is less than or equal to 3.
[0117] Finally, the color index value can be determined based on the calculated color hash index value, the element values in color_order[0], color_order[1], color_order[2], the value of counter, and the element values in color_sort[0], color_sort[1], color_sort[2], and the corresponding color pixel value can be further determined based on the color index value.
[0118] Specifically, if the color hash index value index is less than counter, it indicates that the color hash index value is 0, 1, or 2, which means that the color pixel value can be determined from color_order[0], color_order[1], and color_order[2].
[0119] If the color hash index value index is greater than counter, it means that the color pixel value needs to be determined from the data after color_order[2], that is, color_order[3], color_order[4], ..., color_order[9], color_order
[10] .
[0120] Furthermore, the size between the color index value index-counter (denoted as in_counter) and color_sort[0] is calculated. If in_counter is less than color_sort[0], it indicates that the order of elements from color_order[3] to color_order[3+in_counter] has not changed, and therefore, the color pixel value can be determined according to color_order[in_counter].
[0121] If the color index value in_counter is greater than or equal to color_sort[0] and in_counter is less than color_sort[1], it means that an element from color_order[3] to color_order[3+in_counter] is moved forward to color_order[0], color_order[1], color_order[2].
[0122] Therefore, the color pixel value can be determined according to color_order[in_counter+3+1].
[0123] If the color index value in_counter is greater than or equal to color_sort[1] and in_counter is less than color_sort[2], it means that two elements from color_order[3] to color_order[3+in_counter] are moved forward to color_order[0], color_order[1], and color_order[2].
[0124] Therefore, the color pixel value can be determined according to color_order[in_counter+3+2].
[0125] If in_counter is greater than or equal to color_sort[2], it means that 3 elements from color_order[3] to color_order[3+in_counter] are moved forward to color_order[0], color_order[1], and color_order[2].
[0126] Therefore, the color pixel value can be determined according to color_order[in_counter+3+3].
[0127] By comparing the above method with methods 201 to 207, it can be seen that the method of the present application reduces the amount of data involved in sorting, and no longer requires overall adjustment of the color index array, thereby reducing the amount of data involved in the calculation and improving the decoding efficiency. The present application scheme also does not require the addition of any hardware equipment, which further reduces the hardware design cost of electronic equipment.
[0128] Let's take the 8-color image a shown in Figure 1 as an example. Figure 7 The process of implementing the decoding method of the present application on a decoding device is introduced. Figure 2 The same method can be referred to the above description, and will not be repeated below. Figure 7 As shown, the method includes:
[0129] 701, initialize the pixel matrix corresponding to the image a. Please refer to the relevant description of 201 above, which will not be repeated here.
[0130] 702, initialize the color index array color_order.
[0131] In some implementations, the difference here from the above 202 is that the color_order of the color index array is expanded to obtain an array with 11-bit elements, and the value of each element is used to represent the color index value corresponding to each pixel point (for example, the color pixel value of pixel points B, C, and D). The other initialization processes are consistent with the above 202 and will not be repeated here.
[0132] 703, determine the current decoding position, and obtain the neighboring position information of the current decoding position. Please refer to the relevant description of 203 above, which will not be repeated here.
[0133] 704 , determine the color hash index value index according to the color information of each point at the adjacent position, and determine the color index array color_order and the number of valid values of the first three digits in the array counter.
[0134] In some implementations, after determining the color information of the pixel points corresponding to the current decoding position and the neighboring positions of the current decoding position, the color hash value corresponding to the current decoding position can be determined according to the content shown in Table 5 above, and then hash decoding is performed on the color hash value to obtain the color hash index value corresponding to the color hash value. The process of hash decoding the color hash value can refer to the description of 207 above, which will not be repeated here.
[0135] The method of determining the color index array color_order and the first three bits in the array as valid values may refer to the related description above and will not be repeated here.
[0136] 705, sort the first three digits of the color index array color_order in ascending order to obtain color_sort.
[0137] 706 , determine the color index value idx according to the relationship among counter, color_sort[0], color_sort[1], color_sort[2], and the color hash index value index.
[0138] For example, the color hash index value index is greater than counter and the color index value in_counter is less than color_sort[1]. Figure 5, assuming that the neighboring points of pixel A(x, y) are pixels B, C, and D, and the color index value of pixel B is 2, the color index value of pixel C is 2, and the color index value of pixel D is 5.
[0139] Therefore, in the color index array color_order of pixel A, color_order[0]=2, color_order[1]=5, color_order[2]=8, that is, color_order[0:2]={2, 5, 8}, and correspondingly, color_sort[0:2]={2, 5, 8}, counter=2.
[0140] Furthermore, since the colors of pixel B and pixel C are the same, and the colors of pixel B and pixel D are different, according to Table 4 and Table 5, the color hash value corresponding to pixel A is 7, and the corresponding color index value index is 4, in_counter=index-counter=2.
[0141] Since the color index value index is greater than counter, and in_counter is greater than or equal to color_sort[0] and less than color_sort[1], the color pixel value of pixel point A is color_order[2+1]. According to Table 1, the color pixel value of pixel point A is color_order[3]=8080000.
[0142] The remaining situations are similar to the above and will not be described in detail in this application.
[0143] 707, determine the pixel value corresponding to the color according to the color index value idx.
[0144] Figure 8 According to some embodiments of the present application, a schematic diagram of the structure of an electronic device 100 is shown. Figure 8 As shown, the electronic device 100 includes one or more processors 101, a system memory 102, a non-volatile memory (NVM) 103, a communication interface 104, an input / output (I / O) device 105, and a system control logic 106 for coupling the processor 101, the system memory 102, the non-volatile memory 103, the communication interface 104 and the input / output (I / O) device 105. Among them:
[0145] The processor 101 may include one or more processing units, for example, a data processing unit or processing circuit including a central processing unit CPU (Central Processing Unit), an image processor GPU (Graphics Processing Unit), a digital signal processor DSP (Digital Signal Processor), a microprocessor MCU (Micro-programmed Control Unit), an AI (Artificial Intelligence, artificial intelligence) processor or a programmable logic device FPGA (Field Programmable Gate Array), a neural network processor (Neural-network Processing Unit, NPU), etc. may include one or more single-core or multi-core processors. In some embodiments, the processor 101 can be used to execute instructions to implement the relevant functions of the above-mentioned data processing unit, marking unit, and data storage unit.
[0146] The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store instructions of the data processing unit 21, the marking unit 22, and the data storage unit 12, and can also be used to store original data objects and changed data objects.
[0147] The non-volatile memory 103 may include one or more tangible, non-temporary computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card, etc. In other embodiments, the non-volatile memory 103 may be used to store instructions of the data processing unit 21, the marking unit 22, and the data storage unit 12, and may also be used to store original data objects and changed data objects.
[0148] In particular, the system memory 102 and the non-volatile memory 103 may respectively include: a temporary copy and a permanent copy of the instruction 107. The instruction 107 may include: when executed by at least one of the processors 101, the electronic device 100 implements the data processing method provided by each embodiment of the present application.
[0149] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the electronic device 100, so as to communicate with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the electronic device 100, for example, the communication interface 104 may be integrated into the processor 101. In some embodiments, the electronic device 100 may communicate with other devices through the communication interface 104, for example, the electronic device 100 may establish a communication connection with the electronic device 200 through the communication interface 104, so as to send a data change request to the electronic device 200, obtain an original data object, and send a changed data object through the communication connection.
[0150] The input / output (I / O) device 105 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the electronic device 100 via the input / output (I / O) device 105. For example, a business person may input / select content for data change via the input / output (I / O) device 105.
[0151] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of electronic device 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.
[0152] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).
[0153] Understandably, Figure 8 The structure of the electronic device 100 shown is only an example. In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine some components, or separate 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.
[0154] It can be understood that in some embodiments, the electronic device 200 may have the same or similar structure as the electronic device 100, may include more or fewer components than the electronic device 100, or may have other structures, which is not limited in the embodiments of the present application.
[0155] The embodiments of the present application also provide a program product for implementing the data processing methods provided in the above embodiments.
[0156] 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. The embodiments of the present application can be implemented as a computer module or module code executed on a programmable system, and the programmable system includes 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.
[0157] The module code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For 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.
[0158] Module code can be implemented with high-level modular language or object-oriented programming language to communicate with the processing system. When necessary, module 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.
[0159] 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).
[0160] 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.
[0161] 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.
Claims
1. A data processing method, characterized in that: Applied to electronic equipment, the method comprises: Determine a pixel to be decoded in the first image to be decoded, Determine, according to the position of the pixel to be decoded, a plurality of decoded first pixel points adjacent to the pixel to be decoded, Based on a preset correspondence between the color information and the first index value, determining the first index value corresponding to the color information of the plurality of first pixel points; Determine, according to the color information of the first pixels, a second index value corresponding to the pixel to be decoded; wherein the second index value corresponding to the pixel to be decoded is a color hash index value corresponding to the pixel to be decoded, and the second index value is determined according to a preset corresponding relationship, and the preset corresponding relationship refers to a corresponding relationship between the color information of the first pixels and the color hash values; According to the second index value of the pixel to be decoded, based on the correspondence between the preset color information and the first index value, determining the color information corresponding to the pixel to be decoded; Wherein, determining the color information corresponding to the pixel to be decoded according to the second index value of the pixel to be decoded and based on the correspondence between the preset color information and the first index value includes: According to the first index values corresponding to the color information of the first pixels, a first array is determined, wherein the first array includes a plurality of elements, and the number of the plurality of elements is greater than the number corresponding to the color types included in the first image; starting from the first element of the first array, according to the color information of the first pixels, the values of the first preset number of elements in the first array are determined, wherein the first preset number is equal to the number of the first pixels, and, The color information corresponding to the plurality of first pixel points is different, and the first index values corresponding to the color information of the plurality of first pixel points are respectively used as the values of the first first preset number of elements of the first array; Corresponding to the presence of a second number of different color information in the plurality of first pixel points, marking the first first preset number of elements in the first array except for the second number of elements as invalid values, and using the first index values corresponding to the second number of different color information in the plurality of first pixel points as the values of the second number of elements in the first first preset number of elements, wherein the second number is greater than 0 and less than the first preset number; Determine color information corresponding to the pixel to be decoded based on the first array according to the second index value.
2. The method according to claim 1, characterized in that The first image is decoded based on a first decoding method; And, determining a plurality of decoded first pixel points adjacent to the pixel point to be decoded according to the position of the pixel point to be decoded, comprising: According to the position of the pixel to be decoded, pixel points adjacent to the pixel to be decoded and above, to the left, and diagonally above and to the left of the pixel to be decoded are determined.
3. The method according to claim 1, characterized in that The determining, according to the color information of the plurality of first pixels, the second index value corresponding to the pixel to be decoded comprises: Based on the correspondence between the preset first index value and the color information of the first pixels at different positions, the second index value is determined according to the relative positions of the first pixels and the pixels to be decoded, and the color information of the first pixels. The first image is decoded based on a first decoding method, and the first pixels at different positions include pixels above, to the left, and diagonally above the left of the pixel to be decoded in the first image.
4. The method according to claim 1, characterized in that: The method further comprises: sorting the first preset number of elements in the first array in ascending order to obtain a second array, wherein the number of elements in the second array is the same as the first preset number, and According to the second index value of the pixel to be decoded and the second array, color information corresponding to the pixel to be decoded is determined.
5. The method according to claim 4, characterized in that The determining, according to the second index value of the pixel to be decoded and the second array, color information corresponding to the pixel to be decoded includes: Corresponding to the second index value being less than the number of valid values in the second array, based on the correspondence between the preset color information and the first index value, determining the color information corresponding to the pixel to be decoded according to the second index value; Corresponding to the second index value being greater than the number of valid values in the second array, based on the correspondence between the preset color information and the first index value, the color information corresponding to the pixel to be decoded is determined according to the difference between the second index value and the number of valid values in the second array.
6. The method according to claim 1, characterized in that The color information includes the RGB value of the pixel.
7. The method according to claim 2, characterized in that The first decoding method includes a palette compression algorithm.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium contains instructions, which, when executed by a processor of an electronic device, enable the electronic device to implement any one of the methods of claims 1 to 7.
9. An electronic device, characterized in that: include: a memory for storing instructions to be executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, configured to execute the instructions so that the electronic device implements the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The invention comprises a computer program, which, when being executed on an electronic device, enables the electronic device to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Palette index binarization for palette-based video coding
CN106797484A