WO2022179355A1 - 样点自适应补偿的边带补偿模式的数据处理方法、装置 - Google Patents
样点自适应补偿的边带补偿模式的数据处理方法、装置 Download PDFInfo
- Publication number
- WO2022179355A1 WO2022179355A1 PCT/CN2022/072880 CN2022072880W WO2022179355A1 WO 2022179355 A1 WO2022179355 A1 WO 2022179355A1 CN 2022072880 W CN2022072880 W CN 2022072880W WO 2022179355 A1 WO2022179355 A1 WO 2022179355A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sideband
- values
- value
- variable
- array
- Prior art date
Links
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 42
- 238000003672 processing method Methods 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 claims abstract description 26
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 12
- 230000010076 replication Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/80—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
- H04N19/82—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/40—Tree coding, e.g. quadtree, octree
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/40—Filling a planar surface by adding surface attributes, e.g. colour or texture
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/117—Filters, e.g. for pre-processing or post-processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
- H04N19/423—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/96—Tree coding, e.g. quad-tree coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Definitions
- the present application relates to the technical field of video image coding, and in particular, to a data processing method and device in a sideband compensation mode of sample adaptive compensation.
- HEVC High Efficiency Video Coding
- SAO Sample Adaptive Offset, sample adaptive compensation
- the pixel compensation can be realized through the EO (Edge Offset, boundary compensation) mode or the BO (Band Offset, side band compensation) mode, wherein the BO mode is classified according to the range of pixel values.
- the pixel value range is [0, 255]
- each sideband contains 8 pixel values
- the kth sideband has 8 pixel values.
- the pixel value range is [8k, 8k+7].
- stats[bt]+ diff; count[bt]++.
- a data processing method, device, computer equipment and computer-readable storage medium of a sideband compensation mode of sample point adaptive compensation are provided, so as to solve the problem of 0-31 sidebands in statistical CTB in the existing BO technology.
- the residual value and the number of pixels are time-consuming.
- the present application provides a data processing method for a sideband compensation mode of sample point adaptive compensation, including:
- each tree coding block For each tree coding block, traverse all reconstructed pixels in the tree coding block, calculate the sideband value to which each reconstructed pixel traversed belongs, and calculate the relationship between each reconstructed pixel traversed and The residual value of the corresponding original pixel point;
- the method further includes:
- n is an integer greater than or equal to 2;
- the accumulated residual values of the n reconstructed pixel points corresponding to the n sideband values are calculated at one time according to the residual values in the second array, and count the accumulated number of the n reconstructed pixel points.
- the judging whether consecutive m sideband values in the first array belong to the same sideband includes:
- the judging whether consecutive n sideband values in the m sideband values belong to the same sideband includes:
- the taking out one of the sideband values from the first variable includes:
- a sideband value at a preset position is retrieved from the first variable.
- each sideband value is represented by an 8-bit value
- the first variable of the preset bit is a 64-bit first variable
- the Obtaining the numerical value of the preset number of bits corresponding to the n sideband values in the first variable and the second variable includes:
- a value of the lower 32 bits or the upper 32 bits is obtained from the first variable and the second variable, respectively.
- the method further includes:
- the residual value and quantity of each reconstructed pixel point are separately counted.
- the present application also provides a data processing device in a sideband compensation mode of sample point adaptive compensation, including:
- an acquisition module for acquiring a target reconstructed image, and dividing the target reconstructed image into a plurality of non-overlapping tree-shaped coding blocks
- the traversal module is used for traversing all reconstructed pixels in the tree coding block for each tree coding block, and calculating the sideband value to which each reconstructed pixel traversed belongs, and calculating each traversed pixel.
- the saving module is used to save the calculated sideband value of each reconstructed pixel point to the first array, and save the calculated residual value between each reconstructed pixel point and the corresponding original pixel point Save to the second array;
- a judgment module used for judging whether consecutive m sideband values in the first array belong to the same sideband, where m is an integer greater than or equal to 2;
- the calculation module is configured to calculate the corresponding m sideband values at one time according to the residual values in the second array if the consecutive m sideband values in the first array belong to the same sideband.
- the accumulated residual values of the m reconstructed pixel points, and the accumulated number of the m reconstructed pixel points is counted.
- the present application also provides a computer device comprising a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor, the processor executing the computer
- a computer device comprising a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor, the processor executing the computer
- the steps of the above method are implemented when the instructions are readable.
- the present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, implement the steps of the above method.
- the target reconstructed image is divided into a plurality of non-overlapping tree-shaped coding blocks; Construct pixel points, calculate the sideband value to which each reconstructed pixel point traversed, and calculate the residual value of each reconstructed pixel point traversed and the corresponding original pixel point;
- the sideband values to which the reconstructed pixels belong are stored in the first array, and the calculated residual value between each reconstructed pixel and the corresponding original pixel is stored in the second array; Whether the consecutive m sideband values in the array belong to the same sideband, m is an integer greater than or equal to 2; if the consecutive m sideband values in the first array belong to the same sideband, according to the The residual values in the second array are used to calculate the accumulated residual values of the m reconstructed pixel points corresponding to the m sideband values at one time, and count the accumulated number of the m reconstructed pixel points.
- the residual calculation and quantity statistics of the pixels belonging to the same sideband are completed at one time, thereby reducing the read and write operations on the memory. , thereby reducing statistical time and power consumption.
- FIG. 1 is an environmental schematic diagram of a data processing method in a sideband compensation mode of sample point adaptive compensation according to an embodiment of the present application
- FIG. 2 is a flowchart of an embodiment of the data processing method of the sample point adaptive compensation sideband compensation mode described in the present application;
- FIG. 3 is a schematic diagram of pixel values of all reconstructed pixel points of a tree-shaped coding block
- FIG. 4 is a schematic diagram of sideband values corresponding to pixel values of all reconstructed pixel points of the tree coding block in FIG. 3;
- FIG. 5 is a flowchart of another embodiment of the data processing method of the sample point adaptive compensation sideband compensation mode described in the present application.
- FIG. 6 is a schematic flowchart of a refinement of steps for judging whether consecutive m sideband values in the first array belong to the same sideband in an embodiment of the present application;
- FIG. 7 is a schematic flowchart of a refinement of steps for judging whether consecutive n sideband values in the m sideband values belong to the same sideband according to an embodiment of the present application;
- FIG. 8 is a program block diagram of an embodiment of the data processing apparatus in the sideband compensation mode of sample point adaptive compensation described in the present application;
- FIG. 9 is a schematic diagram of a hardware structure of a computer device for performing a data processing method in a sideband compensation mode of sample adaptive compensation provided by an embodiment of the present application.
- first, second, third, etc. may be used in this disclosure to describe various pieces of information, such information should not be limited by these terms. These terms are only used to distinguish the same type of information from each other.
- first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information, without departing from the scope of the present disclosure.
- word "if” as used herein can be interpreted as "at the time of” or "when” or "in response to determining.”
- FIG. 1 schematically shows a schematic frame diagram of a data processing method for a sideband compensation mode of sample adaptive compensation according to an embodiment of the present application.
- the system of the application environment may include a computer device 10 and a server 20 .
- the computer device 10 forms a wireless or wired connection with the server 20 .
- the computer device 10 may be a mobile phone, an iPAD, a tablet computer, a server, or the like.
- the server 20 may be a rack-type server, a blade-type server, a tower-type server or a cabinet-type server (including an independent server, or a server cluster composed of multiple servers) and the like.
- FIG. 2 is a schematic flowchart of a data processing method in a sideband compensation mode of sample point adaptive compensation according to an embodiment of the present application. It should be understood that the flowchart in this embodiment of the method is not used to limit the sequence of executing steps. The following is an exemplary description with a computer device as the execution subject.
- the data processing method of the sideband compensation mode of the sample point adaptive compensation provided in this embodiment includes:
- Step S20 acquiring a target reconstructed image, and dividing the target reconstructed image into a plurality of non-overlapping tree-shaped coding blocks.
- the target reconstructed image is an image obtained after deblocking the reconstructed image, which is a reconstructed frame of image.
- the target reconstructed image when the target reconstructed image is divided into tree coding blocks, the whole frame of the image is divided into blocks according to the size of the tree coding unit (Coding Tree Unit, CTU) preset by the encoder, such as , the size of the target reconstructed image is 128*128, and the size of the CTU is 64*64, then the target reconstructed image can be divided into 4 non-overlapping tree-shaped coding blocks.
- CTU Coding Tree Unit
- Step S21 for each tree coding block, traverse all reconstructed pixels in the tree coding block, and calculate the sideband value to which each reconstructed pixel traversed belongs, and calculate each reconstructed traversed.
- the tree coding block may be the luminance CTB included in the tree coding unit (Coding Tree Unit, CTU) in the sample adaptive compensation technology (Sample Adaptive Offset, SAO) in HEVC Or Chroma CTB.
- a tree-shaped coding block is composed of a plurality of reconstructed pixel points, such as 16*16, 32*32 and 64*64 multiple pixel points. As an example, refer to FIG. 3 , which is one 16 of the tree-shaped coding blocks. *A region composed of 16 reconstructed pixel points, and the pixel value of each reconstructed pixel point in this region is as shown in the figure.
- the tree coding block shown in FIG. 3 is an example of an 8-bit image.
- the reconstructed pixels refer to the pixels obtained by restoring each pixel in the original image.
- the sideband value corresponding to each reconstructed pixel point as shown in FIG. 4 can be obtained.
- the sideband values and residual values of all reconstructed pixels in the tree-shaped coding block can be pre-calculated, instead of using the sideband values and the residual values.
- the residual value is calculated.
- Step S22 save the calculated sideband value of each reconstructed pixel point to the first array, and save the calculated residual value of each reconstructed pixel point and the corresponding original pixel point to the first array. in the second array.
- the sideband value can be stored in the first array, and the The residual values are stored in the second array, for example, the sideband values are stored in the bttype array, and the residual values are stored in the btdiff array.
- Step S23 judging whether consecutive m sideband values in the first array belong to the same sideband, where m is an integer greater than or equal to 2.
- Step S24 if the consecutive m sideband values in the first array belong to the same sideband, calculate m corresponding to the m sideband values at one time according to the residual values in the second array. The accumulated residual value of the reconstructed pixel points is calculated, and the accumulated number of the m reconstructed pixel points is counted.
- the residual values of m reconstructed pixels corresponding to the m sideband values can be sorted at one time.
- the difference values are read from the second array, and then the cumulative sum of the m residual values read out is calculated at one time, without the need to read the m residual values from the second array one by one, and without These read residuals are accumulated one by one.
- the obtained accumulated residual value can be added to the sum variable of the corresponding sideband p, and the image accumulated quantity m can be added to the corresponding sideband p.
- the subsequent processing operations are performed. In this embodiment, the subsequent processing operations are the prior art, which will not be repeated in this embodiment.
- the residual calculation and quantity statistics of the pixels belonging to the same sideband are completed at one time, thereby reducing the read and write operations on the memory. , thereby reducing statistical time and power consumption.
- the calculation method in this application can reduce about 67.2% of the memory read and write operations of the BO module.
- memory read and write operations are very slow and power-consuming. Therefore, since the present application reduces memory read and write operations, the computing solution of the present application can greatly At the same time, the calculation method can also speed up the BO module by about 48.2%.
- the processing time of the BO module accounts for about 10% of the entire encoding and decoding time. If the technical solution of the present application is applied to the BO module, the live broadcast encoding can be directly accelerated by 4.8%. It can not only reduce power consumption, but also speed up live encoding.
- the data processing method of the sample point adaptive compensation sideband compensation mode further includes:
- Step S50 if the consecutive m sideband values in the first array do not belong to the same sideband, further judge whether the consecutive n sideband values in the m sideband values belong to the same sideband , where n ⁇ m, n is an integer greater than or equal to 2.
- these consecutive n sideband values may be consecutive n sideband values at any position among the m sideband values, for example, may be the first sideband among the m sideband values value to the nth sideband value, or the second sideband value to the n+1th sideband value among the m sideband values, or the third sideband value among the m sideband values Band values to the n+2th sideband value, etc.
- the consecutive n sideband values are the first sideband value to the nth sideband value among the m sideband values, or the m-n+1th sideband value among the m sideband values sideband value to the mth sideband value.
- the consecutive 4 sideband values are the first sideband value to the 4th sideband value among the 8 sideband values, or the consecutive 4 sideband values Values are the 5th sideband value to the 8th sideband value of the 8 sideband values.
- Step S51 if the n sideband values belong to the same sideband, calculate the accumulated residual of the n reconstructed pixels corresponding to the n sideband values at one time according to the residual values in the second array. difference value, and count the accumulated number of the n reconstructed pixel points.
- the residual values of the n reconstructed pixels corresponding to the n sideband values can be read from the second array at one time. Take it out, and then calculate the cumulative sum of the n residual values read out at one time, without needing to read the n residual values from the second array one by one, and without accumulating them one by one. the residual value of .
- the obtained accumulated residual value can be added to the sum variable of the corresponding sideband p, and the image accumulated quantity n can be added to the corresponding sideband p.
- the subsequent processing operations are performed. In this embodiment, the subsequent processing operations are the prior art, which will not be repeated in this embodiment.
- the consecutive m sideband values do not belong to the same sideband
- the residual calculation and quantity statistics of the pixels belonging to the same sideband are completed at one time, so that the read and write operations to the memory can be reduced, thereby reducing the statistical time and power consumption.
- the step of judging whether consecutive m sideband values in the first array belong to the same sideband may include steps S60-S63, wherein:
- Step S60 read consecutive m sideband values from the first array, and store the read sideband values in a first variable of a preset position.
- the first variable may be a global variable or a local variable.
- the first variable is preferably a local variable, such as a local variable classIdx_64.
- the preset bit is a preset value, for example, the preset bit is 64 bits. It can be understood that the preset bit can also be other numerical values, and the specific value can be set according to the actual situation.
- the read sideband value can be stored in the 64-bit local variable classIdx_64.
- Step S61 extracting one of the sideband values from the first variable, and duplicating the extracted sideband value m-1 times, to obtain the sideband value after the duplication process.
- one of the sideband values may be randomly selected from the m sideband values contained in the first variable, for example, the second sideband value may be extracted; or the m sideband values contained in the first variable may be selected. Take out the sideband value at the preset position from the value, wherein the preset position is preset or default, for example, if the preset position is the first position, the sideband at the first position can be taken out value.
- the extracted sideband value may be copied m-1 times to obtain the sideband value after the copying process, and storing the sideband value obtained after the copying process in the second variable of the preset bit to obtain m sideband values.
- step S62 the sideband value obtained after the copying process is stored in the second variable of the preset bit.
- the second variable is of the same type as the first variable, and it may be a global variable or a local variable.
- the second variable is preferably a local variable, such as a local variable classIdx_rep .
- the preset bit is a preset value, for example, the preset bit is 64 bits.
- the sideband value obtained after the replication process can be stored in the 64-bit local variable classIdx_rep.
- Step S63 judging whether the first variable and the second variable are equal, and determining whether consecutive m sideband values in the first array belong to the same sideband according to the judgment result.
- the judgment result is that the first variable and the second variable are equal, it can be determined that m consecutive sideband values in the first array belong to the same sideband;
- a variable is not equal to the second variable, it can be determined that the consecutive m sideband values in the first array do not belong to the same sideband.
- the second variable is generated by duplicating the extracted sideband value m-1 times, which can save the generation time of the second variable.
- steps S70-S71 when the first variable and the second variable are not equal, the judgment is made as to whether consecutive n sideband values in the m sideband values belong to
- the steps of the same sideband may include: steps S70-S71, wherein:
- Step S70 Obtain the numerical value of the preset number of bits corresponding to the n sideband values from the first variable and the second variable, respectively.
- the preset number of bits can be determined according to how many bits each sideband value is represented by. For example, if a sideband value is represented by an 8-bit value, it can be determined that the preset number of bits is 8n; when When a sideband value is represented by a 5-bit value, the preset number of bits can be determined to be 5n; when a sideband value is represented by a 16-bit value, the preset number of bits can be determined to be 16n.
- which number of digits to acquire is related to the positions of the n sideband values in the m sideband values.
- each sideband value is represented by an 8-bit value
- the first variable of the preset bit is a 64-bit first variable
- the 4 sideband values is the first sideband value to the fourth sideband value among the 8 sideband values
- the preset corresponding to the n sideband values is obtained from the first variable and the second variable
- the first value to the 32nd value can be obtained from the first variable and the second variable respectively.
- the 9th to 40th digits may be obtained from the first variable and the second variable respectively.
- each sideband value is represented by an 8-bit value
- the first variable of the preset bit is a 64-bit first variable
- the obtaining from the first variable and the second variable the numerical value of the preset number of bits corresponding to the n sideband values may include:
- a value of the lower 32 bits or the upper 32 bits is obtained from the first variable and the second variable, respectively.
- the lower 32-bit value or the upper 32-bit value can be directly obtained.
- Step S71 judging whether the value obtained from the first variable is equal to the value obtained from the second variable, and determining whether consecutive n sideband values in the m sideband values belong to the same value according to the judgment result. sideband.
- the method further includes:
- the residual value and quantity of each reconstructed pixel point are separately counted.
- the residual value and quantity of each reconstructed pixel point can be counted separately, That is, only one residual value is read from the second array at a time, and then the read residual value is accumulated into the sum variable of the corresponding sideband p, and the number 1 is added to the count variable of the corresponding sideband p, After that, the subsequent processing operations are performed.
- the subsequent processing operations are in the prior art, which will not be repeated in this embodiment.
- FIG. 8 it is a program block diagram of an embodiment of the data processing apparatus 80 in the sideband compensation mode of the sample point adaptive compensation of the present application.
- the data processing apparatus 80 in the sideband compensation mode of the sample point adaptive compensation includes a series of computer-readable instructions stored in the memory.
- the data processing apparatus 80 for the sideband compensation mode of the sample adaptive compensation may be divided into one or more modules based on the specific operations implemented by the various parts of the computer readable instructions.
- the data processing apparatus 80 in the sideband compensation mode of sample adaptive compensation can be divided into an acquisition module 81 , a traversal module 8/2 , a storage module 83 , a judgment module 84 , and a calculation module 85 . in:
- an acquisition module 81 configured to acquire a target reconstructed image, and divide the target reconstructed image into a plurality of non-overlapping tree-shaped coding blocks;
- the traversal module 82 is configured to, for each tree-shaped coding block, traverse all reconstructed pixel points in the tree-shaped coding block, calculate the sideband value to which each reconstructed pixel point traversed, and calculate each traversed reconstructed pixel point. A residual value between the reconstructed pixel and the corresponding original pixel;
- the saving module 83 is used to save the calculated sideband value to which each reconstructed pixel belongs to the first array, and save the calculated residual between each reconstructed pixel and the corresponding original pixel. The value is saved to the second array;
- the judgment module 84 is used to judge whether the consecutive m sideband values in the first array belong to the same sideband, and m is an integer greater than or equal to 2;
- the calculation module 85 is configured to, if the consecutive m sideband values in the first array belong to the same sideband, calculate the corresponding values of the m sideband values at one time according to the residual values in the second array The accumulated residual values of the m reconstructed pixel points, and the accumulated number of the m reconstructed pixel points is counted.
- the judging module 84 is further configured to further judge the m sideband values if the consecutive m sideband values in the first array do not belong to the same sideband. Whether the consecutive n sideband values in the n belong to the same sideband, where n ⁇ m, n is an integer greater than or equal to 2; if the n sideband values belong to the same sideband, according to the second
- the residual values in the array calculate the accumulated residual values of the n reconstructed pixel points corresponding to the n sideband values at one time, and count the accumulated number of the n reconstructed pixel points.
- the judging module 84 is further configured to read consecutive m sideband values from the first array, and store the read sideband values in a preset position.
- the first variable extract one of the sideband values from the first variable, and copy the extracted sideband value m-1 times to obtain the sideband value after copy processing;
- the band value is stored in the second variable of the preset position; it is judged whether the first variable and the second variable are equal, and whether the consecutive m sideband values in the first array are determined according to the judgment result. belong to the same sideband.
- the judging module 84 is further configured to obtain and from the first variable and the second variable respectively.
- the numerical value of the preset number of bits corresponding to the n sideband values judge whether the numerical value obtained from the first variable is equal to the numerical value obtained from the second variable, and determine the m sidebands according to the judgment result Whether consecutive n sideband values in the value belong to the same sideband.
- the judging module 84 is further configured to extract a sideband value located at a preset position from the first variable.
- the judging module 83 is further configured to obtain the lower 32-bit value or the upper 32-bit value from the first variable and the second variable respectively.
- the data processing apparatus 80 of the sample point adaptive compensation sideband compensation mode further includes a statistics module.
- the statistics module is configured to separately count the residual value and quantity of each reconstructed pixel point if the consecutive m sideband values in the first array do not belong to the same sideband.
- the target reconstructed image is divided into a plurality of non-overlapping tree-shaped coding blocks; Construct pixel points, calculate the sideband value to which each reconstructed pixel point traversed, and calculate the residual value of each reconstructed pixel point traversed and the corresponding original pixel point;
- the sideband values to which the reconstructed pixels belong are stored in the first array, and the calculated residual value between each reconstructed pixel and the corresponding original pixel is stored in the second array; Whether the consecutive m sideband values in the array belong to the same sideband, m is an integer greater than or equal to 2; if the consecutive m sideband values in the first array belong to the same sideband, according to the The residual values in the second array are used to calculate the accumulated residual values of the m reconstructed pixel points corresponding to the m sideband values at one time, and count the accumulated number of the m reconstructed pixel points.
- the residual calculation and quantity statistics of the pixels belonging to the same sideband are completed at one time, thereby reducing the read and write operations on the memory. , thereby reducing statistical time and power consumption.
- FIG. 9 schematically shows a schematic diagram of a hardware architecture of a computer device 10 suitable for implementing a data processing method of a sample point adaptive compensation sideband compensation mode according to an embodiment of the present application.
- the computer device 10 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions.
- it can be a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including an independent server, or a server cluster composed of multiple servers) and the like.
- the computer device 10 at least includes but is not limited to: a memory 120 , a processor 121 , and a network interface 122 that can communicate with each other through a system bus. in:
- the memory 120 includes at least one type of computer-readable storage medium, which may be volatile or non-volatile.
- the readable storage medium includes flash memory, hard disk, multimedia card, Card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable Read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
- the memory 120 may be an internal storage module of the computer device 10 , such as a hard disk or memory of the computer device 10 .
- the memory 120 may also be an external storage device of the computer device 10, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC for short), a secure digital (Secure) Digital, referred to as SD) card, flash memory card (Flash Card) and so on.
- the memory 120 may also include both an internal storage module of the computer device 10 and an external storage device thereof.
- the memory 120 is generally used to store the operating system installed in the computer device 10 and various application software, such as program codes of the data processing method in the sideband compensation mode of the sample point adaptive compensation.
- the memory 120 may also be used to temporarily store various types of data that have been output or will be output.
- the processor 121 may be a central processing unit (Central Processing Unit, CPU for short), a controller, a microcontroller, a microprocessor, or other data processing chips in a sideband compensation mode of sample adaptive compensation .
- the processor 121 is generally used to control the overall operation of the computer device 10 , such as performing control and processing related to data interaction or communication with the computer device 10 .
- the processor 121 is configured to execute program codes or process data stored in the memory 120 .
- Network interface 122 which may include a wireless network interface or a wired network interface, is typically used to establish communication links between computer device 10 and other computer devices.
- the network interface 122 is used to connect the computer device 10 with an external terminal through a network, and establish a data transmission channel and a communication link between the computer device 10 and the external terminal.
- the network can be Intranet, Internet, Global System of Mobile communication (GSM for short), Wideband Code Division Multiple Access (WCDMA for short), 4G network , 5G network, Bluetooth (Bluetooth), Wi-Fi and other wireless or wired networks.
- FIG. 9 only shows a computer device having components 120-122, but it should be understood that it is not required to implement all of the shown components, and more or less components may be implemented instead.
- the data processing method of the sample point adaptive compensation sideband compensation mode stored in the memory 120 can be divided into one or more program modules, and the data processing method is executed by one or more processors (in this embodiment: The processor 121) executes to complete the application.
- Embodiments of the present application provide a computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the sidebands of the sample adaptive compensation in the embodiments are implemented The steps of the data processing method of the compensation mode.
- the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Programmable Read-Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
- the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device.
- the computer-readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC for short), a secure digital ( Secure Digital, referred to as SD) card, flash memory card (Flash Card) and so on.
- the computer-readable storage medium may also include both an internal storage unit of a computer device and an external storage device thereof.
- the computer-readable storage medium is generally used to store the operating system and various application software installed in the computer device, for example, the program code of the data processing method of the sample point adaptive compensation sideband compensation mode in the embodiment, etc. .
- the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
- the device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place , or distributed over at least two network elements. Some or all of the modules may be screened out according to actual needs to achieve the purpose of the solutions of the embodiments of the present application. Those of ordinary skill in the art can understand and implement it without creative effort.
- each embodiment can be implemented by means of software plus a general hardware platform, and certainly can also be implemented by hardware.
- Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through computer-readable instructions, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include the flow of the embodiments of the above-mentioned methods.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
一种样点自适应补偿的边带补偿模式的数据处理方法、装置,该方法包括:遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中(S22);判断第一数组中的连续的m个边带值是否属于相同的边带;若第一数组中的连续的m个边带值属于相同的边带,则根据第二数组中的残差值计算m个边带值对应的m个重构像素点的累加残差值,以及统计m个重构像素点的累加数量(S24)。上述方法可以减少对内存的读写操作,及减少统计耗时。
Description
本申请要求于2021年2月24日提交中国专利局、申请号为202110208657.7,发明名称为“样点自适应补偿的边带补偿模式的数据处理方法、装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及视频图像编码技术领域,尤其涉及一种样点自适应补偿的边带补偿模式的数据处理方法、装置。
HEVC(High Efficiency Video Coding)是一种视频压缩标准,在采用HEVC对视频进行压缩后,为了减小重构图像与原图像的失真,会通过SAO(Sample Adaptive Offset,样点自适应补偿)技术对重构图像进行像素补偿。
在采用SAO技术对像素进行补偿时,可以通过EO(Edge Offset,边界补偿)模式或者通过BO(Band Offset,边带补偿)模式实现像素补偿,其中,BO模式是根据像素值的范围进行归类,以将像素值等分为32条边带,例如,8比特图像,像素值范围在[0,255],则在划分边带时,每条边带包含8个像素值,第k条边带的像素值范围是[8k,8k+7]。
现有的BO模式在实现过程中,会通过如下步骤来统计当前CTB(Coding Tree Block,树形编码块)中0~31边带的残差值和像素点的数目:
1.声明两个临时变量stats[32]和count[32],初始都设置为0;
2.计算当前像素值的边带bt,比如,针对8比特像素,重建值为15,则其属于第15/8=1边带;
3.计算当前重构像素和原始像素的差,也就是残差diff;
4.累加残差值和像素点数量,stats[bt]+=diff;count[bt]++。
然而,发明人发现,上述统计方式比较耗时,严重制约了BO技术在直播等场景中的应用,同时也增加了移动设备的功耗。
发明内容
有鉴于此,现提供一种样点自适应补偿的边带补偿模式的数据处理方法、装置、计算机设备及计算机可读存储介质,以解决现有的BO技术在统计CTB中0~31边带的残差值 和像素点的数目时比较耗时的问题。
本申请提供了一种样点自适应补偿的边带补偿模式的数据处理方法,包括:
获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块;
对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;
将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;
判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;
若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构像素点的累加数量。
可选地,所述方法还包括:
若所述第一数组中的连续的m个边带值不属于相同的边带,则进一步判断所述m个边带值中的连续的n个边带值是否属于相同的边带,其中n<m,n为大于或者等于2的整数;
若所述n个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述n个边带值对应的n个重构像素点的累加残差值,以及统计所述n个重构像素点的累加数量。
可选地,所述判断所述第一数组中的连续的m个边带值是否属于相同的边带包括:
从所述第一数组中读取连续的m个边带值,并将读取到的边带值存放在预设位的第一变量中:
从所述第一变量中取出其中的一个边带值,并对取出的边带值复制m-1次,得到复制处理后的边带值;
将经过复制处理后得到的边带值存放在预设位的第二变量中;
判断所述第一变量与所述第二变量是否相等,并根据判断结果确定所述第一数组中的连续的m个边带值是否属于相同的边带。
可选地,在所述第一变量与所述第二变量不相等时,所述判断所述m个边带值中的连续的n个边带值是否属于相同的边带包括:
分别从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值;
判断从第一变量中获取到的数值与从第二变量中获取到的数值是否相等,并根据判断 结果确定所述m个边带值中的连续的n个边带值是否属于相同的边带。
可选地,所述从所述第一变量中取出其中的一个边带值包括:
从所述第一变量中取出位于预设位置的边带值。
可选地,所述m=8,所述n=4,每一个边带值采用8比特数值进行表示,所述预设位的第一变量为64位的第一变量,所述分别从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值包括:
分别从所述第一变量与所述第二变量中获取低32位或者高32位的数值。
可选地,所述方法还包括:
若所述第一数组中的连续的m个边带值不属于相同的边带,则单独统计每一个重构像素点的残差值与数量。
本申请还提供了一种样点自适应补偿的边带补偿模式的数据处理装置,包括:
获取模块,用于获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块;
遍历模块,用于对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;
保存模块,用于将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;
判断模块,用于判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;
计算模块,用于若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构像素点的累加数量。
本申请还提供了一种计算机设备,所述计算机设备,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述方法的步骤。
本申请还提供了一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述方法的步骤。
上述技术方案的有益效果:
本申请实施例中,通过获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块;对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍 历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构像素点的累加数量。在本申请实施例中,通过在遍历到多个像素点属于相同的边带时,一次性完成这些属于相同边带的像素点的残差计算和数量统计,从而可以减少对内存的读写操作,进而减少统计耗时,降低功耗。
图1为本申请实施例的样点自适应补偿的边带补偿模式的数据处理方法的环境示意图;
图2为本申请所述的样点自适应补偿的边带补偿模式的数据处理方法的一种实施例的流程图;
图3为树形编码块的所有重构像素点的像素值示意图;
图4为图3中的树形编码块的所有重构像素点的像素值对应的边带值的示意图;
图5为本申请所述的样点自适应补偿的边带补偿模式的数据处理方法的另一种实施例的流程图;
图6为本申请一实施方式中判断所述第一数组中的连续的m个边带值是否属于相同的边带的步骤细化流程示意图;
图7为本申请一实施方式中判断所述m个边带值中的连续的n个边带值是否属于相同的边带的步骤细化流程示意图;
图8为本申请所述的样点自适应补偿的边带补偿模式的数据处理装置的一种实施例的程序模块图;
图9为本申请实施例提供的执行样点自适应补偿的边带补偿模式的数据处理方法的计算机设备的硬件结构示意图。
以下结合附图与具体实施例进一步阐述本申请的优点。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中 所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
在本申请的描述中,需要理解的是,步骤前的数字标号并不标识执行步骤的前后顺序,仅用于方便描述本申请及区别每一步骤,因此不能理解为对本申请的限制。
图1示意性示出了根据本申请实施例的样点自适应补偿的边带补偿模式的数据处理方法的框架示意图。在示例性的实施例中,该应用环境的系统可包括计算机设备10、服务器20。其中,计算机设备10与服务器20形成无线或有线连接。计算机设备10可以为手机、iPAD,平板电脑、服务器等。服务器20可以为机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。
参阅图2,其为本申请一实施例的样点自适应补偿的边带补偿模式的数据处理方法的流程示意图。本可以理解,本方法实施例中的流程图不用于对执行步骤的顺序进行限定。下面以计算机设备为执行主体进行示例性描述,从图中可以看出,本实施例中所提供的样点自适应补偿的边带补偿模式的数据处理方法包括:
步骤S20,获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块。
具体地,所述目标重构图像为对重建图像在进行deblocking之后后得到的图像,其为重建完成的一帧图像。
在本实施例中,在将目标重构图像划分为树形编码块时,是根据编码器预先设置的树形编码单元(Coding Tree Unit,CTU)的大小对整帧的图像进行分块,比如,目标重构图像的大小为128*128,而CTU的大小为64*64,则可以将目标重构图像划分为4个互不重叠的树形编码块。
步骤S21,对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍 历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值。
具体地,树形编码块(Coding Tree Block,CTB)可以为HEVC中的样点自适应补偿技术(Sample Adaptive Offset,SAO)中的树形编码单元(Coding Tree Unit,CTU)所包含的亮度CTB或者色度CTB。一个树形编码块由多个重构像素点组成,比如由16*16、32*32和64*64个多重像素点组成,作为示例,参照图3,其为树形编码块中的一个16*16个重构像素点组成的区域,且该区域中的各个重构像素点的像素值如图中所示。
需要说明的是,图3所示的树形编码块是以8比特的图像为例的。重构像素点指的是对原始图像中的各个像素点进行还原后得到的像素点。
在本实施例中,在计算各个重构像素点所属的边带值时,可以先根据图像中的像素点的像素值范围来确定每一个边带所包含的像素值范围。比如,若图像中的像素点的像素值范围为0-255,则可以确定每一个边带包含有256/32=8个像素值;若图像中的像素点的像素值范围为0-65535,则可以确定每一个边带包含有2048个像素值。
作为示例,在对图3中的每一个重构像素点进行边带值的计算之后,可以得到如图4所示的各个重构像素点对应的边带值。
其中,每一个重构像素点与对应的原始像素点的残差值diff指的是重构像素点的像素值a与对应的原始像素点的像素值b之差,即diff=a-b。
可以理解的是,本申请实施例中,为了节省数据处理时间,可以预先计算出树形编码块中的所有重构像素点的边带值以及残差值,而不用在需要使用边带值及残差值才计算。
步骤S22,将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中。
具体地,为了便于后续可以顺序获取每一个重构像素点的边带值以及每一个重构像素点与对应的原始像素点的残差值,可以将边带值保存在第一数组中,将残差值保存在第二数组中,比如,将边带值保存在bttype数组中,将残差值保存在btdiff数组中。
步骤S23,判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数。
作为示例,可以判断第一数组中的第一批连续的8个边带值是否属于相同的边带,若该8个边带值属于相同的边带,则可以继续从该第一数组中获取下一批连续的8个边带值是否属于相同的边带,直到该第一数组中所有的边带值都判断完毕为止。
步骤S24,若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统 计所述m个重构像素点的累加数量。
具体地,所述累加残差值为所述m个重构像素点与其对应的原始像素点的残差值的累加和,比如,m=8,且这8个重构像素点与其对应的原始像素点的残差值分别为5、8、7、6、4、3、12、9,则所述累加残差值=5+8+7+6+4+3+12+9=54。
所述累加数量为所述m个重构像素点的数量,比如,m=8,则所述累加数量也为8,若m=4,则所述累加数量即为4。
在本实施例中,当判断出所述第一数组中的连续的m个边带值属于相同的边带,则可以一次性将这m个边带值对应的m个重构像素点的残差值从第二数组中读取出来,然后一次性计算出读取出的m个残差值的累加和,而无需一个一个地从第二数组中读取这m个残差值,以及无需一个一个地累加这些读取到的残差值。
需要说明的是,在完成累加残差值的计算和累加数量的统计之后,可以将得到的累加残差值加到对应边带p的sum变量中,将像累加数量m加到对应边带p的count变量中,之后,再进行后续的处理操作,在本实施例中,后续的处理操作为现有技术,在本实施例中不再赘述。
本申请实施例中,通过遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构像素点的累加数量。在本申请实施例中,通过在遍历到多个像素点属于相同的边带时,一次性完成这些属于相同边带的像素点的残差计算和数量统计,从而可以减少对内存的读写操作,进而减少统计耗时,降低功耗。
经过实验统计,通过本申请中的计算方法可以减少BO模块大约67.2%的内存读写操作。此外,无论是移动设备的Android/IOS或者PC机等,内存读写操作都是非常慢和耗电的,因此,本申请由于减少了内存读写操作,因此,本申请的计算方案可以极大的降低功耗,同时,该计算方法也可以使BO模块加速大约48.2%。现有技术中,在直播这种场景中BO模块的处理时间占整个编解码的10%左右的耗时,若将本申请的技术方案应用于BO模块中,则可以直接让直播编码加速4.8%左右,不仅可以降低功耗,还可以加速直播编码。
在一示例性的实施方式中,参照图5,所述样点自适应补偿的边带补偿模式的数据处 理方法还包括:
步骤S50,若所述第一数组中的连续的m个边带值不属于相同的边带,则进一步判断所述m个边带值中的连续的n个边带值是否属于相同的边带,其中n<m,n为大于或者等于2的整数。
作为示例,m=8,n=4,则在判断出第一数组中连续的8个边带值不属于相同的边带,比如,其中5个连续的边带值属于15边带,另3个边带值属于16边带。在这种情况下,可以进一步判断这8个边带值中是否还在存在连续的4个边带值属于相同的边带。
需要说明的是,这些连续的n个边带值可以为m个边带值中的任意位置的连续的n个边带值,比如,可以为该m个边带值中的第一个边带值到第n个边带值,也可以为该m个边带值中的第二个边带值到第n+1个边带值,或者为该m个边带值中的第三个边带值到第n+2个边带值等。
优选地,该连续的n个边带值为m个边带值中的第一个边带值到第n个边带值,或者为该m个边带值中的第m-n+1个边带值到第m个边带值。作为示例,m=8,n=4时,该连续的4个边带值为8个边带值中的第一个边带值到第4个边带值,或者该连续的4个边带值为8个边带值中的第5个边带值到第8个边带值。
步骤S51,若所述n个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述n个边带值对应的n个重构像素点的累加残差值,以及统计所述n个重构像素点的累加数量。
具体地,当判断出所述连续的n个边带值属于相同的边带,则可以一次性将这n个边带值对应的n个重构像素点的残差值从第二数组中读取出来,然后一次性计算出读取出的n个残差值的累加和,而无需一个一个地从第二数组中读取这n个残差值,以及无需一个一个地累加这些读取到的残差值。
需要说明的是,在完成累加残差值的计算和累加数量的统计之后,可以将得到的累加残差值加到对应边带p的sum变量中,将像累加数量n加到对应边带p的count变量中,之后,再进行后续的处理操作,在本实施例中,后续的处理操作为现有技术,在本实施例中不再赘述。
本实施例中,通过在判断出连续的m个边带值不属于相同的边带时,进一步判断m个边带值中的连续的n个边带值是否属于相同的边带,并在属于相同的边带时,一次性完成这些属于相同边带的像素点的残差计算和数量统计,从而可以减少对内存的读写操作,进而减少统计耗时,降低功耗。
需要说明的是,在本实施例中,在判断出不存在n个连续的边带值属于相同的边带时, 还可以继续判断是否存在k个连续的边带值是否属于相同的边带,其中,k为小于n的整数。在本实施例中,具体执行多少次上述的判断步骤,在本实施例中不做限定,可以根据实际情况进行设定。
在一示例性的实施方式中,参照图6,所述判断所述第一数组中的连续的m个边带值是否属于相同的边带的步骤可以包括步骤S60-S63,其中:
步骤S60,从所述第一数组中读取连续的m个边带值,并将读取到的边带值存放在预设位的第一变量中。
具体地,所述第一变量可以为全局变量,也可以为局部变量,在本实施例中,该第一变量优选为局部变量,比如为局部变量classIdx_64。所述预设位为预先设定的数值,比如,所述预设位为64位。可以理解的是,所述预设位也可以为其他数值,其具体值可以根据实际情况进行设定。
作为示例,可以将读取到的边带值存放在64位的局部变量classIdx_64中。
步骤S61,从所述第一变量中取出其中的一个边带值,并对取出的边带值复制m-1次,得到复制处理后的边带值。
具体地,可以从该第一变量中包含的m个边带值中随机取出其中一个边带值,比如,取出第2个边带值;也可以从该第一变量中包含的m个边带值中取出位于预设位置的边带值,其中,所述预设位置为预先设定的或者默认的,比如,所述预设位置为第一位,则可以取出位于第一位的边带值。
在本实施例中,在取出一个边带值后,为了使得最终得到的边带值的个数与该第一变量中包含的边带值的个数相同,可以对该取出的边带值复制m-1次,得到复制处理后的边带值,将经过复制处理后得到的边带值存放在所述预设位的第二变量中即得到m个边带值。
步骤S62,将经过复制处理后得到的边带值存放在所述预设位的第二变量中。
具体地,所述第二变量与所述第一变量的类型相同,其可以为全局变量,也可以为局部变量,在本实施例中,该第二变量优选为局部变量,比如为局部变量classIdx_rep。所述预设位为预先设定的数值,比如,所述预设位为64位。
作为示例,可以将经过复制处理后得到的边带值存放在64位的局部变量classIdx_rep中。
步骤S63,判断所述第一变量与所述第二变量是否相等,并根据判断结果确定所述第一数组中的连续的m个边带值是否属于相同的边带。
具体地,当判断结果为所述第一变量与所述第二变量相等时,可以确定所述第一数组中的连续的m个边带值属于相同的边带;当判断结果为所述第一变量与所述第二变量不相 等时,可以确定所述第一数组中的连续的m个边带值不属于相同的边带。
本实施例中通过对取出的边带值复制m-1次来生成第二变量,可以节省第二变量的生成时间。
在一示例性的实施方式中,参照图7,在所述第一变量与所述第二变量不相等时,所述判断所述m个边带值中的连续的n个边带值是否属于相同的边带的步骤可以包括:步骤S70-S71,其中:
步骤S70,分别从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值。
具体地,所述预设位数可以根据每一个边带值采用多少比特数值表示来确定,比如,一个边带值采用8比特数值进行表示,则可以确定所述预设位数为8n;当一个边带值采用5比特数值进行表示,则可以确定所述预设位数为5n;当一个边带值采用16比特数值进行表示,则可以确定所述预设位数为16n。
在本实施例中,具体获取哪些位数的数值,则和n个边带值在所述m个边带值中的位置有关。
作为示例,所述m=8,所述n=4,每一个边带值采用8比特数值进行表示,所述预设位的第一变量为64位的第一变量,该4个边带值为8个边带值中的第一个边带值到第四个边带值,则在从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值时,即可以从所述第一变量与所述第二变量中分别获取第一位数值到第32位的数值。
可以理解的是,当该4个边带值为8个边带值中的第2个边带值到第5个边带值时,则在从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值时,可以从所述第一变量与所述第二变量中分别获取第9位数值到第40位的数值。
在一示例性的实施方式中,若所述m=8,所述n=4,每一个边带值采用8比特数值进行表示,所述预设位的第一变量为64位的第一变量,则所述分别从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值可以包括:
分别从所述第一变量与所述第二变量中获取低32位或者高32位的数值。
本实施例中,为了便于从第一变量与第二变量中获取数值,可以直接获取低32位或者高32位的数值。
步骤S71,判断从第一变量中获取到的数值与从第二变量中获取到的数值是否相等,并根据判断结果确定所述m个边带值中的连续的n个边带值是否属于相同的边带。
具体地,当判断结果为从第一变量中获取到的数值与从第二变量中获取到的数值相等时,可以确定所述m个边带值中的连续的n个边带值属于相同的边带;当判断结果为从第 一变量中获取到的数值与从第二变量中获取到的数值不相等时,可以确定所述m个边带值中的连续的n个边带值不属于相同的边带。
在一示例性的实施方式中,所述方法还包括:
若所述第一数组中的连续的m个边带值不属于相同的边带,则单独统计每一个重构像素点的残差值与数量。
具体地,当所述第一数组中的连续的m个边带值不属于相同的边带,即属于不同的边带时,则可以单独统计每一个重构像素点的残差值与数量,即一次只从第二数组中读取一个残差值,然后将读取到的残差值累加到对应边带p的sum变量中,以及将数量1加到对应边带p的count变量中,之后,再进行后续的处理操作,在本实施例中,后续的处理操作为现有技术,在本实施例中不再赘述。
参阅图8所示,是本申请样点自适应补偿的边带补偿模式的数据处理装置80一实施例的程序模块图。
本实施例中,所述样点自适应补偿的边带补偿模式的数据处理装置80包括一系列的存储于存储器上的计算机可读指令,当该计算机可读指令被处理器执行时,可以实现本申请各实施例的样点自适应补偿的边带补偿模式的数据处理功能。在一些实施例中,基于该计算机可读指令各部分所实现的特定的操作,样点自适应补偿的边带补偿模式的数据处理装置80可以被划分为一个或多个模块。例如,在图8中,所述样点自适应补偿的边带补偿模式的数据处理装置80可以被分割成获取模块81、遍历模块8/2、保存模块83、判断模块84、计算模块85。其中:
获取模块81,用于获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块;
遍历模块82,用于对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;
保存模块83,用于将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;
判断模块84,用于判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;
计算模块85,用于若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构像素点的累加数量。
在一示例性的实施方式中,所述判断模块84,还用于若所述第一数组中的连续的m个边带值不属于相同的边带,则进一步判断所述m个边带值中的连续的n个边带值是否属于相同的边带,其中n<m,n为大于或者等于2的整数;若所述n个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述n个边带值对应的n个重构像素点的累加残差值,以及统计所述n个重构像素点的累加数量。
在一示例性的实施方式中,所述判断模块84,还用于从所述第一数组中读取连续的m个边带值,并将读取到的边带值存放在预设位的第一变量中:从所述第一变量中取出其中的一个边带值,并对取出的边带值复制m-1次,得到复制处理后的边带值;将经过复制处理后得到的边带值存放在所述预设位的第二变量中;判断所述第一变量与所述第二变量是否相等,并根据判断结果确定所述第一数组中的连续的m个边带值是否属于相同的边带。
在一示例性的实施方式中,在所述第一变量与所述第二变量不相等时,所述判断模块84,还用于分别从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值;判断从第一变量中获取到的数值与从第二变量中获取到的数值是否相等,并根据判断结果确定所述m个边带值中的连续的n个边带值是否属于相同的边带。
在一示例性的实施方式中,所述判断模块84,还用于从所述第一变量中取出位于预设位置的边带值。
在一示例性的实施方式中,所述m=8,所述n=4,每一个边带值采用8比特数值进行表示,所述预设位的第一变量为64位的第一变量,所述判断模块83,还用于分别从所述第一变量与所述第二变量中获取低32位或者高32位的数值。
在一示例性的实施方式中,所述样点自适应补偿的边带补偿模式的数据处理装置80还包括统计模块。
所述统计模块,用于若所述第一数组中的连续的m个边带值不属于相同的边带,则单独统计每一个重构像素点的残差值与数量。
本申请实施例中,通过获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块;对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构 像素点的累加数量。在本申请实施例中,通过在遍历到多个像素点属于相同的边带时,一次性完成这些属于相同边带的像素点的残差计算和数量统计,从而可以减少对内存的读写操作,进而减少统计耗时,降低功耗。
图9示意性示出了根据本申请实施例的适于实现样点自适应补偿的边带补偿模式的数据处理方法的计算机设备10的硬件架构示意图。本实施例中,计算机设备10是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。例如,可以是平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图9所示,计算机设备10至少包括但不限于:可通过系统总线相互通信链接存储器120、处理器121、网络接口122。其中:
存储器120至少包括一种类型的计算机可读存储介质,该可读存储介质可以是易失性的,也可以是非易失性的,具体而言,可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器120可以是计算机设备10的内部存储模块,例如该计算机设备10的硬盘或内存。在另一些实施例中,存储器120也可以是计算机设备10的外部存储设备,例如该计算机设备10上配备的插接式硬盘,智能存储卡(Smart Media Card,简称为SMC),安全数字(Secure Digital,简称为SD)卡,闪存卡(Flash Card)等。当然,存储器120还可以既包括计算机设备10的内部存储模块也包括其外部存储设备。本实施例中,存储器120通常用于存储安装于计算机设备10的操作系统和各类应用软件,例如样点自适应补偿的边带补偿模式的数据处理方法的程序代码等。此外,存储器120还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器121在一些实施例中可以是中央处理器(Central Processing Unit,简称为CPU)、控制器、微控制器、微处理器、或其它样点自适应补偿的边带补偿模式的数据处理芯片。该处理器121通常用于控制计算机设备10的总体操作,例如执行与计算机设备10进行数据交互或者通信相关的控制和处理等。本实施例中,处理器121用于运行存储器120中存储的程序代码或者处理数据。
网络接口122可包括无线网络接口或有线网络接口,该网络接口122通常用于在计算机设备10与其它计算机设备之间建立通信链接。例如,网络接口122用于通过网络将计算机设备10与外部终端相连,在计算机设备10与外部终端之间的建立数据传输通道和通信链接等。网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,简称为GSM)、宽带码分多址(Wideband Code Division Multiple Access,简称为WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
需要指出的是,图9仅示出了具有部件120~122的计算机设备,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。
在本实施例中,存储于存储器120中的样点自适应补偿的边带补偿模式的数据处理方法可以被分割为一个或者多个程序模块,并由一个或多个处理器(本实施例为处理器121)所执行,以完成本申请。
本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质其上存储有计算机可读指令,计算机可读指令被处理器执行时实现实施例中的样点自适应补偿的边带补偿模式的数据处理方法的步骤。
本实施例中,计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,计算机可读存储介质可以是计算机设备的内部存储单元,例如该计算机设备的硬盘或内存。在另一些实施例中,计算机可读存储介质也可以是计算机设备的外部存储设备,例如该计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,简称为SMC),安全数字(Secure Digital,简称为SD)卡,闪存卡(Flash Card)等。当然,计算机可读存储介质还可以既包括计算机设备的内部存储单元也包括其外部存储设备。本实施例中,计算机可读存储介质通常用于存储安装于计算机设备的操作系统和各类应用软件,例如实施例中的样点自适应补偿的边带补偿模式的数据处理方法的程序代码等。此外,计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的各类数据。
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到至少两个网络单元上。可以根据实际的需要筛选出其中的部分或者全部模块来实现本申请实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域普通技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机可读指令来指令相关的硬件 来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-OnlyMemory,ROM)或随机存储记忆体(RandomAccessMemory,RAM)等。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (10)
- 一种样点自适应补偿的边带补偿模式的数据处理方法,包括:获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块;对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构像素点的累加数量。
- 根据权利要求1所述的样点自适应补偿的边带补偿模式的数据处理方法,所述方法还包括:若所述第一数组中的连续的m个边带值不属于相同的边带,则进一步判断所述m个边带值中的连续的n个边带值是否属于相同的边带,其中n<m,n为大于或者等于2的整数;若所述n个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述n个边带值对应的n个重构像素点的累加残差值,以及统计所述n个重构像素点的累加数量。
- 根据权利要求2所述的样点自适应补偿的边带补偿模式的数据处理方法,所述判断所述第一数组中的连续的m个边带值是否属于相同的边带包括:从所述第一数组中读取连续的m个边带值,并将读取到的边带值存放在预设位的第一变量中:从所述第一变量中取出其中的一个边带值,并对取出的边带值复制m-1次,得到复制处理后的边带值;将经过复制处理后得到的边带值存放在所述预设位的第二变量中;判断所述第一变量与所述第二变量是否相等,并根据判断结果确定所述第一数组中的连续的m个边带值是否属于相同的边带。
- 根据权利要求3所述的样点自适应补偿的边带补偿模式的数据处理方法,在所述第 一变量与所述第二变量不相等时,所述判断所述m个边带值中的连续的n个边带值是否属于相同的边带包括:分别从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值;判断从第一变量中获取到的数值与从第二变量中获取到的数值是否相等,并根据判断结果确定所述m个边带值中的连续的n个边带值是否属于相同的边带。
- 根据权利要求3所述的样点自适应补偿的边带补偿模式的数据处理方法,所述从所述第一变量中取出其中的一个边带值包括:从所述第一变量中取出位于预设位置的边带值。
- 根据权利要求4所述的样点自适应补偿的边带补偿模式的数据处理方法,所述m=8,所述n=4,每一个边带值采用8比特数值进行表示,所述预设位的第一变量为64位的第一变量,所述分别从所述第一变量与所述第二变量中获取与所述n个边带值对应的预设位数的数值包括:分别从所述第一变量与所述第二变量中获取低32位或者高32位的数值。
- 根据权利要求1至6任一项所述的样点自适应补偿的边带补偿模式的数据处理方法,所述方法还包括:若所述第一数组中的连续的m个边带值不属于相同的边带,则单独统计每一个重构像素点的残差值与数量。
- 一种样点自适应补偿的边带补偿模式的数据处理装置,包括:获取模块,用于获取目标重构图像,将所述目标重构图像划分为多个互不重叠的树形编码块;遍历模块,用于对于每一个树形编码块,遍历树形编码块中的所有重构像素点,并计算遍历出的每一个重构像素点所属的边带值,以及计算遍历出的每一个重构像素点与对应的原始像素点的残差值;保存模块,用于将计算得出的每一个重构像素点所属的边带值保存至第一数组中,并将计算得出的每一个重构像素点与对应的原始像素点的残差值保存至第二数组中;判断模块,用于判断所述第一数组中的连续的m个边带值是否属于相同的边带,m为大于或者等于2的整数;计算模块,用于若所述第一数组中的连续的m个边带值属于相同的边带,则根据所述第二数组中的残差值一次性计算所述m个边带值对应的m个重构像素点的累加残差值,以及统计所述m个重构像素点的累加数量。
- 一种计算机设备,所述计算机设备,包括存储器、处理器以及存储在所述存储器上 并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现权利要求1至7任一项所述的样点自适应补偿的边带补偿模式的数据处理方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现权利要求1至7任一项所述的样点自适应补偿的边带补偿模式的数据处理方法的步骤。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP22758721.9A EP4246444A4 (en) | 2021-02-24 | 2022-01-20 | DATA PROCESSING METHOD AND APPARATUS FOR SCANNING ADAPTIVE OFFSET SIDEBAND COMPENSATION MODE |
US18/342,669 US20230353746A1 (en) | 2021-02-24 | 2023-06-27 | Data processing in band offset mode of sample adaptive offset |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110208657.7A CN112927311B (zh) | 2021-02-24 | 2021-02-24 | 样点自适应补偿的边带补偿模式的数据处理方法、装置 |
CN202110208657.7 | 2021-02-24 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/342,669 Continuation US20230353746A1 (en) | 2021-02-24 | 2023-06-27 | Data processing in band offset mode of sample adaptive offset |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022179355A1 true WO2022179355A1 (zh) | 2022-09-01 |
Family
ID=76171653
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/072880 WO2022179355A1 (zh) | 2021-02-24 | 2022-01-20 | 样点自适应补偿的边带补偿模式的数据处理方法、装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20230353746A1 (zh) |
EP (1) | EP4246444A4 (zh) |
CN (1) | CN112927311B (zh) |
WO (1) | WO2022179355A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112927311B (zh) * | 2021-02-24 | 2022-06-03 | 上海哔哩哔哩科技有限公司 | 样点自适应补偿的边带补偿模式的数据处理方法、装置 |
CN113068036B (zh) * | 2021-03-17 | 2022-10-28 | 上海哔哩哔哩科技有限公司 | 用于样点自适应补偿的方法及装置、设备和介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103238318A (zh) * | 2010-11-02 | 2013-08-07 | 联发科技股份有限公司 | 用于高效率视频编码的条带边缘滤波方法及其装置 |
CN103518375A (zh) * | 2012-04-16 | 2014-01-15 | 联发科技股份有限公司 | 用于贯穿条带或图块边界环路滤波的方法及其装置 |
CN105635732A (zh) * | 2014-10-30 | 2016-06-01 | 联想(北京)有限公司 | 自适应样点补偿编码、对视频码流进行解码的方法及装置 |
CN105993174A (zh) * | 2013-12-12 | 2016-10-05 | 三星电子株式会社 | 用于用信号传送sao参数的视频编码方法和设备以及视频解码方法和设备 |
US20170006289A1 (en) * | 2014-03-14 | 2017-01-05 | Samsung Electronics Co., Ltd. | Image encoding method for sample value compensation and apparatus therefor, and image decoding method for sample value compensation and apparatus therefor |
CN112927311A (zh) * | 2021-02-24 | 2021-06-08 | 上海哔哩哔哩科技有限公司 | 样点自适应补偿的边带补偿模式的数据处理方法、装置 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
BR112016011075B1 (pt) * | 2013-11-15 | 2023-04-04 | Mediatek Inc | Método de filtragem de laço adaptativa baseada em blocos |
KR101677242B1 (ko) * | 2014-02-18 | 2016-11-17 | 한국전자통신연구원 | 컨볼루션 기법 기반의 고속 적응적 샘플 오프셋 필터링 장치 및 방법 |
CN105141948A (zh) * | 2015-09-22 | 2015-12-09 | 天津师范大学 | 一种改进的hevc样点自适应补偿方法 |
KR102427789B1 (ko) * | 2017-10-10 | 2022-08-02 | 한국전자통신연구원 | 인터 예측 정보를 사용하는 방법 및 장치 |
CN109963160A (zh) * | 2017-12-26 | 2019-07-02 | 北京君正集成电路股份有限公司 | 基于hevc的简化sao最优补偿值计算方法和装置 |
CN108810543B (zh) * | 2018-06-13 | 2020-08-28 | 北京奇艺世纪科技有限公司 | 视频编码的补偿方法、装置及电子设备 |
CN113228645A (zh) * | 2018-12-28 | 2021-08-06 | 韩国电子通信研究院 | 图像编码/解码方法和装置以及存储有比特流的记录介质 |
-
2021
- 2021-02-24 CN CN202110208657.7A patent/CN112927311B/zh active Active
-
2022
- 2022-01-20 EP EP22758721.9A patent/EP4246444A4/en active Pending
- 2022-01-20 WO PCT/CN2022/072880 patent/WO2022179355A1/zh unknown
-
2023
- 2023-06-27 US US18/342,669 patent/US20230353746A1/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103238318A (zh) * | 2010-11-02 | 2013-08-07 | 联发科技股份有限公司 | 用于高效率视频编码的条带边缘滤波方法及其装置 |
CN103518375A (zh) * | 2012-04-16 | 2014-01-15 | 联发科技股份有限公司 | 用于贯穿条带或图块边界环路滤波的方法及其装置 |
CN105993174A (zh) * | 2013-12-12 | 2016-10-05 | 三星电子株式会社 | 用于用信号传送sao参数的视频编码方法和设备以及视频解码方法和设备 |
US20170006289A1 (en) * | 2014-03-14 | 2017-01-05 | Samsung Electronics Co., Ltd. | Image encoding method for sample value compensation and apparatus therefor, and image decoding method for sample value compensation and apparatus therefor |
CN105635732A (zh) * | 2014-10-30 | 2016-06-01 | 联想(北京)有限公司 | 自适应样点补偿编码、对视频码流进行解码的方法及装置 |
CN112927311A (zh) * | 2021-02-24 | 2021-06-08 | 上海哔哩哔哩科技有限公司 | 样点自适应补偿的边带补偿模式的数据处理方法、装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4246444A4 |
Also Published As
Publication number | Publication date |
---|---|
EP4246444A4 (en) | 2024-04-10 |
CN112927311B (zh) | 2022-06-03 |
US20230353746A1 (en) | 2023-11-02 |
EP4246444A1 (en) | 2023-09-20 |
CN112927311A (zh) | 2021-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110502365B (zh) | 数据存储及恢复的方法、装置及计算机设备 | |
WO2022179355A1 (zh) | 样点自适应补偿的边带补偿模式的数据处理方法、装置 | |
CN107886560B (zh) | 动画资源的处理方法及装置 | |
US20210160515A1 (en) | Method and device for video predicting colour component, and computer storage medium | |
US11902538B2 (en) | Mapping method, encoder, decoder and computer storage medium | |
US20210250404A1 (en) | Video data storage method and device in cloud storage system | |
CN114337678A (zh) | 数据压缩方法、装置、设备及存储介质 | |
CN105828081A (zh) | 编码方法及编码装置 | |
US20230336723A1 (en) | Data processing in edge offset mode of sample adaptive offset | |
CN112783599A (zh) | 虚拟机热迁移方法、装置、终端设备及计算机存储介质 | |
CN111510716B (zh) | 通过图像文件的像素变换提高压缩率的方法和系统 | |
CN106293542B (zh) | 一种文件解压缩的方法及装置 | |
CN111602396B (zh) | 一种视频图像处理方法、设备及存储介质 | |
CN111916155B (zh) | 无参考基因序列的基因数据压缩及还原方法、系统和介质 | |
CN110851433A (zh) | 键值存储系统键优化方法、存储介质、电子设备及系统 | |
CN112800183B (zh) | 内容名称数据处理方法及终端设备 | |
CN112150567A (zh) | 一种heif图像编码方法及相关设备 | |
CN114626994A (zh) | 一种图像处理方法、视频处理方法、计算机设备、存储介质 | |
WO2020258378A1 (zh) | 一种视频图像处理方法、设备及存储介质 | |
WO2024216413A1 (zh) | 编解码方法及装置、编解码器、设备、码流、存储介质 | |
CN115334350A (zh) | 修复文件的方法、装置、终端设备及存储介质 | |
CN112839226B (zh) | 一种图像编码、解码方法、相关装置及存储介质 | |
CN110933442B (zh) | 16*4级参考帧压缩方法和装置 | |
CN117076388A (zh) | 一种文件处理的方法、装置、存储介质及电子设备 | |
CN112686966A (zh) | 图像无损压缩方法和装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22758721 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2022758721 Country of ref document: EP Effective date: 20230613 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |