WO2021093060A1 - Video encoding method, system, and apparatus - Google Patents
Video encoding method, system, and apparatus Download PDFInfo
- Publication number
- WO2021093060A1 WO2021093060A1 PCT/CN2019/123710 CN2019123710W WO2021093060A1 WO 2021093060 A1 WO2021093060 A1 WO 2021093060A1 CN 2019123710 W CN2019123710 W CN 2019123710W WO 2021093060 A1 WO2021093060 A1 WO 2021093060A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- interest
- coding
- region
- current frame
- basic unit
- Prior art date
Links
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/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/56—Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
-
- 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/103—Selection of coding mode or of prediction mode
-
- 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/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- 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/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
Definitions
- the present invention relates to the technical field of image processing, in particular to a video coding method, system and equipment.
- the purpose of this application is to provide a video encoding method, system, and equipment, which can improve the accuracy of video encoding.
- the video frame of the video to be coded includes a region of interest and a region of non-interest; the method includes: according to the current frame and the current frame in the video to be coded.
- the encoding sequence of the video to be encoded obtaining a current image set in the video to be encoded, the current image set including the current frame and a specified number of video frames located after the current frame in the encoding sequence;
- the reverse order of the coding sequence is reversed to sequentially update the region of interest in each video frame in the current image set;
- the coding basis for the updated region of interest and non-interest region in the current frame is basically The units respectively calculate quantization parameters to perform coding for each basic coding unit in the current frame according to the calculated quantization parameters.
- the video frame of the video to be encoded includes a region of interest and a region of non-interest; the system includes: a current image set acquisition unit for The current frame in the video to be encoded and the encoding sequence of the video to be encoded, the current image set is acquired in the video to be encoded, the current image set includes the current frame and is located in the current frame in the encoding order A specified number of video frames afterwards; a reverse update unit, which is used to reversely update the region of interest in each video frame in the current image set in the reverse order opposite to the encoding order; a quantization coding unit, It is used for calculating quantization parameters for the updated coding basic units in the region of interest and non-interesting regions in the current frame respectively, so as to perform coding for the coding basic units in the current frame according to the calculated quantization parameters.
- another aspect of the present application also provides a video encoding device.
- the device includes a processor and a memory.
- the memory is used to store a computer program.
- the computer program is executed by the processor, the foregoing Video encoding method.
- the technical solutions provided by one or more implementation manners of the present application can be combined and analyzed together with multiple video frames located after the current frame in the encoding sequence when the current frame is encoded.
- the region of interest in each video frame may be updated in the reverse order from the last video frame in the order opposite to the encoding order.
- the reverse update can be used to slow down or eliminate this sudden change in the region of interest, and finally make the adjacent frames interesting After coding, the region will not appear too much abruptly.
- the quantization parameter can be calculated for each basic coding unit in the current frame from the perspective of the basic coding unit.
- different code rates can be assigned to different coding basic units, so that the code rate is allocated in a video frame more refined, so that the accuracy of video encoding is higher.
- Figure 1 is a step diagram of a video encoding method in an embodiment of the present invention
- Fig. 2 is a schematic diagram of functional modules of a video encoding system in an embodiment of the present invention
- Fig. 3 is a schematic structural diagram of a video encoding device in an embodiment of the present invention.
- An embodiment of the present application provides a video encoding method, which can encode each video frame in the video to be encoded.
- each video frame in the video to be encoded may have its own saliency image.
- the saliency image may be an image whose width (W) and height (Height, H) are consistent with the video frame, the saliency image may be a grayscale image, and in the saliency image, each pixel
- the pixel value of can be located in the interval of [0,1], and the pixel value can be used as the saliency value of the corresponding pixel in the video frame. The larger the pixel value, the greater the significance of the corresponding pixel in the video frame.
- each video frame in the to-be-coded video can be processed according to a visual saliency detection algorithm, so as to obtain a saliency image of each video frame.
- the saliency value of each pixel in the saliency image can be represented by S(i,j). It can be seen from the above that S(i,j) can satisfy the following conditions:
- W represents the width of the saliency image
- H represents the height of the saliency image
- each video frame in the video to be encoded can be divided into a region of interest and a region of non-interest, where the region of interest can be the area that the user pays attention to when watching the video, while the non-interest area is the area that the user does not pay much attention to. area.
- the region of interest can be identified through a variety of algorithms, and this application does not limit the process of identifying the region of interest.
- the above-mentioned video encoding method may include multiple steps as shown in FIG. 1.
- S1 Acquire a current image set in the to-be-encoded video according to the current frame in the to-be-encoded video and the encoding order of the to-be-encoded video.
- the current image set includes the current frame and is located in the encoding order. The specified number of video frames after the current frame.
- each video frame in the video to be encoded and the saliency image corresponding to each video frame can be processed as input data.
- the video frame currently being processed can be used as the current frame.
- multiple video frames located after the current frame in the encoding order can be combined for analysis.
- the current frame and the N video frames located after the current frame in the encoding order may be used as the current image set obtained from the video to be encoded according to a predetermined number N configured in advance.
- Each video frame in the current image set can be numbered according to the coding order, specifically, it can be denoted as:
- P 0 may be the current frame
- P N may be the last frame in the encoding sequence of the current image.
- the saliency image of the t-th video frame in the current image set can be denoted as St (i, j), so that St (i, j) and P t can have a corresponding relationship.
- S3 Reversely update the regions of interest in each video frame in the current image set in a reverse order that is opposite to the encoding order.
- each video frame in the current frame can be divided according to basic coding units, so that each video frame is divided into several basic coding units.
- the basic coding unit may be a rectangle with the same size, and the size of the basic coding unit may also be different according to different coding methods.
- the coding basic unit may be a 16*16 macro block.
- the coding basic unit may be the smallest HEVC coding unit allowed by the encoder, and the typical size of the smallest HEVC coding unit may be 8*8.
- the width and height of the coding basic unit can be denoted as W bu and H bu respectively .
- each basic coding unit may be further divided into multiple blocks during the coding process.
- the coding mode can be selected for each video frame in the current image set, with the coding basic unit as a unit.
- the coding mode may include an inter prediction mode and an intra prediction mode.
- the intra-frame prediction mode may include information such as the division of intra-frame blocks and the direction of intra-frame prediction
- the inter-frame prediction mode may include the division of inter-frame blocks, the selection of the reference frame of the block, and the motion vector of the block.
- the selection process of the coding mode can be appropriately simplified. For example, when searching for inter-frame motion, you can use only integer pixel accuracy. For another example, when performing intra-frame prediction, only horizontal, vertical, and 45-degree directions may be used, without entropy coding or quantization.
- the optimal prediction mode of each basic coding unit in the video frame can be recorded. Whether the optimal prediction mode is inter-frame prediction or intra-frame prediction can be determined according to the difference between the original value and the predicted value in different prediction modes, and the amount of additional information that needs to be recorded. If the original value of the block in the coding basic unit is closer to the predicted value in a certain prediction mode, and the amount of information that needs to be recorded is less, then the prediction mode can be used as the optimal prediction mode. Finally, by separately detecting the inter-frame prediction mode and the intra-frame prediction mode, the optimal prediction mode of each coding basic unit in the video frame can be determined.
- the complexity of each block in the coding basic unit can also be calculated. This complexity can play a role in the subsequent reverse update of the region of interest.
- the complexity of the block can be the sum of the absolute transform error of the block (Sum of Absolute Transformed Difference, SATD).
- SATD Absolute Transformed Difference
- the original pixel value of the block can be obtained first and predicted by the optimal prediction mode. The obtained predicted pixel value. It should be noted that both the original pixel value and the predicted pixel value can be a pixel matrix, and are not limited to a specific pixel value.
- the original pixel value and the predicted pixel value can be subtracted, and the subtracted result can be subjected to hadamad transformation to obtain a transformed pixel matrix.
- the SATD value of the block can be obtained, and the SATD value can be used as the complexity of the block.
- the process of inversely updating the region of interest can be performed. Specifically, firstly, the sequence of the reverse update of the region of interest can be determined, and the sequence can be the reverse sequence opposite to the encoding sequence. For example, if the coding sequence is from P 0 to P N , then the sequence of the reverse update of the region of interest can be from P N to P 0 .
- the following takes the first video frame P N that undergoes reverse update as an example to illustrate the specific process of reverse update.
- the coding basic unit in the region of interest in the video frame can be identified, and the same operation is performed on each block in the coding basic unit in the region of interest.
- the optimal prediction mode adopted by the block can be identified first.
- the optimal prediction mode adopted by the block may be consistent with the optimal prediction mode of the coding basic unit to which the block belongs. If the optimal prediction mode is an intra-frame prediction mode, the sub-block may not be processed and directly jump to the next sub-block. If the optimal prediction mode is the inter prediction mode, then the reference block corresponding to the sub-block can be found in the reference frame of the video frame according to various information recorded in the inter prediction mode.
- the reference frame may be a video frame located before the video frame P N in the current image set. If the reference block does not belong to the region of interest in the reference frame, the reference block may be set as the region of interest. In this way, after the same processing is performed on each block in the region of interest, the process of updating the region of interest in the reverse direction to the reference frame can be completed.
- the saliency value can be re-set for the updated region of interest in the reference frame by passing the saliency value backward.
- the significance value to determine the transfer coefficient based on the complexity of the video frame P N equatorial blocks reverse transmission, a product of significant value and pass coefficient block pixel points as the significance values to be transmitted.
- the transfer coefficient can be obtained by substituting the complexity of the block into a preset transfer function.
- the transfer function can be a function with a calculation result in the interval [0, 1].
- the degree of similarity between the block and the reference block is relatively low.
- the saliency value transferred to the reference block is also It should be relatively small.
- the transfer function should be a decreasing function of complexity.
- the preset transfer function ⁇ (x) should meet the following conditions:
- the transfer coefficient can be obtained. After the transfer coefficient is multiplied by the saliency value of the pixel in the block, the saliency to be transferred can be obtained. value. Then, the saliency value to be transferred can be used as the saliency value of the corresponding pixel in the reference block. According to this method of updating the region of interest in the reverse direction and resetting the saliency value for the updated region of interest in the reference frame, the sudden change of the picture between the block and the reference block can be reduced.
- the transfer coefficient can be determined according to the complexity of the target block, and the transfer coefficient The product of the saliency value of the pixel in the target block is used as the saliency value to be transferred. Then, the reference block of the target block may be determined in the reference frame, and the saliency value of the corresponding pixel in the reference block of the target block may be replaced with the saliency value to be transferred.
- the above is just taking the video frame PN as an example to illustrate the process of reversely updating the region of interest. Those skilled in the art should know that for any target video frame in the current image set, the above-mentioned method can be used to reversely update the region of interest. , And finally the saliency image of the current frame can be updated.
- the inter-frame prediction mode adopted by the video frame PN uses two or more reference frames, the above-mentioned processing can be performed for each reference frame, which will not be repeated here.
- S5 Calculate quantization parameters for the updated coding basic units in the region of interest and non-interest region in the current frame respectively, so as to perform coding for each basic coding unit in the current frame according to the calculated quantization parameters.
- the region of interest in the video frame in the current image set may all be updated in units of blocks. Since the coding basic unit is used as the unit in the coding process, the region of interest in the current video frame can be adjusted according to the basic coding unit, and for the convenience of subsequent data processing, it can be the adjusted region of interest. Each coding basic unit is set to represent the significance value.
- the region of interest when the region of interest is adjusted according to the coding basic unit, it can be flexibly set according to actual application scenarios. For example, for any basic coding unit in the current frame, if the basic coding unit contains blocks belonging to the region of interest, the basic coding unit may be set as the region of interest. For another example, for any basic coding unit in the current frame, if each block in the basic coding unit belongs to the region of interest, then the basic coding unit is set as the region of interest. This way of adjustment The latter region of interest will be smaller than the region of interest obtained by adjustment in the previous method. Specifically, an appropriate adjustment method of the region of interest can be flexibly selected according to the processing accuracy or the computing capability of the device.
- the representative saliency value of each basic coding unit in the adjusted region of interest can be determined. According to different application scenarios and accuracy, the above-mentioned representative significance value can be flexibly determined.
- the largest saliency value in the current basic coding unit may be used as the representative saliency value.
- the saliency value of each pixel in the current basic coding unit can be read, and the saliency value of each pixel can be averagely filtered Or median filter processing, and use the processed result as the representative significance value.
- the saliency value of each pixel can be average filtered according to the following formula:
- S'(x, y) can represent the saliency value after mean filtering
- W bu and H bu can respectively represent the width and height of the coding basic unit.
- the representative saliency value can be used to calculate each coding basic unit in the updated region of interest.
- the code rate adjustment coefficient may indicate the degree of increase in the code rate of the basic coding unit during the encoding process. The larger the code rate adjustment coefficient, the more code rate allocated to the corresponding basic coding unit. In practical applications, the value of the code rate adjustment coefficient may be greater than or equal to 1, and the representative saliency value of the basic coding unit may be used as an independent variable. The larger the representative saliency value, the larger the corresponding code rate adjustment coefficient.
- the code rate adjustment coefficient may be determined according to the following formula:
- g(s) represents the code rate adjustment coefficient
- s represents the representative significance value of a certain coding basic unit
- k and n are self-defined constants.
- the code rate adjustment coefficient can also be determined according to the following formula:
- the code rate adjustment coefficient of the basic coding unit can be represented by g i .
- the scaling complexity of each coding basic unit in the region of interest after the current frame is updated can be determined according to the original complexity of each basic coding unit. Specifically, if the original encoder uses the same quantization parameter for each basic coding unit in the current frame, the scaling complexity of each basic coding unit may be equal to the original complexity. If the original encoder sets different quantization parameters for each basic coding unit in the current frame, then the average quantization parameter of the current frame may be calculated first according to the original quantization parameter of each basic coding unit in the current frame.
- any basic coding unit in the current frame it can be calculated according to the average quantization parameter of the current frame, the complexity of each block in the basic coding unit, and the original quantization parameter of the basic coding unit The scaling complexity of the coding basic unit.
- the calculation formula of the average quantization parameter can be as follows:
- QP avg represents the average quantization parameter of the current frame
- QP i represents the original quantization parameter of the i-th coding basic unit in the current frame
- NBU represents the total number of coding basic units in the current frame.
- FS i represents the scaling complexity of the i-th coding basic unit
- F i (j) represents the complexity of the j-th block in the i-th coding basic unit
- NPU i represents the block in the i-th coding basic unit The total number of.
- non-interest region code rate protection coefficient B which The protection coefficient can represent the degree to which the code rate of a video frame can be transferred from the non-interest area to the interest area.
- the protection coefficient B of the non-interest area can be a number greater than 0 and less than 1. The larger the value of the protection coefficient, the lower the code rate for transferring from the non-interest area to the interest area, that is, the greater the protection coefficient. Larger, the less the code rate of the non-interest area is reduced, and correspondingly, the less the additional code rate available for the area of interest.
- the code rate of transferring from the non-interest area to the interest area may be restricted under the premise of the same output bit rate.
- the restriction can be set by It is represented by a value, which can be referred to as the completion degree of bit rate adjustment.
- the code of the current frame can be calculated Rate adjustment completion degree P.
- the sum of the scaling complexity of each coding basic unit in the updated non-interest region in the current frame may be calculated, and the updated The first product of the sum of the scaling complexity of each coding basic unit in the non-interest area and the protection coefficient.
- the second product of the scaling complexity of each coding basic unit in the updated region of interest and the respective code rate adjustment coefficient can be calculated, and the second product of each coding basic unit in the updated region of interest can be calculated.
- the sum of two products the difference between the sum of the scaling complexity of each coding basic unit of the current frame and the first product can be calculated, and the ratio of the difference to the sum of the second product can be calculated, and the ratio can be used as the total value. Describes the completion degree of bit rate adjustment of the current frame.
- NROI represents the region of non-interest in the current frame
- ROI represents the region of interest in the current frame
- the completion degree of bit rate adjustment calculated by the above formula is less than 1, it means that the bit rate for transferring from the non-interest area to the interest area in the current frame may be restricted.
- the code rate adjustment completion degree is greater than or equal to 1, it means that according to the code rate adjustment coefficient of each coding basic unit, the code rate for transferring from the non-interest area to the interest area is not limited, which conforms to the expected situation.
- the completion degree of the rate adjustment of the region of interest of different video frames may be different, so that the rate allocation of each video frame can be accurately performed.
- the quantization parameter of each coding basic unit in the updated region of interest in the current frame can be calculated.
- the process of calculating the quantization parameters of each coding basic unit in the region of interest may also be different.
- the quantization parameter of each coding basic unit can be recalculated according to the following formula:
- QP' i represents the quantization parameter of the i-th coding basic unit after recalculation.
- the quantization parameter can be recalculated using the following formula:
- the quantization adjustment value of the target coding basic unit may be determined according to the product of the code rate adjustment completion degree and the code rate adjustment coefficient of the target coding basic unit, and the original quantization parameter of the target coding basic unit and the The difference or ratio of the quantization adjustment value is used as the quantization parameter of the target coding basic unit.
- the quantization adjustment value of the target encoding basic unit may be determined according to the rate adjustment coefficient of the target encoding basic unit, and the target encoding The difference or ratio between the original quantization parameter of the basic unit and the quantization adjustment value is used as the quantization parameter of the target coding basic unit.
- the above specified threshold can be 1 in the formula.
- the value of the specified threshold and code rate adjustment completion degree can also be changed accordingly.
- the quantization parameters of each coding basic unit in the non-interest region can be continued to be calculated.
- the code rate adjustment completion degree of the current frame may be adjusted first, the scaling complexity of each basic coding unit in the current frame, and the code rate adjustment coefficient of each basic coding unit in the updated region of interest, Calculate the code rate reduction coefficient of the updated non-interest region. Then, according to the code rate reduction coefficient of the non-interest area and the original quantization parameter of each basic coding unit in the non-interest area, the quantization parameter of each basic coding unit in the non-interest area is calculated.
- the code rate reduction coefficient D of the non-interest area can be calculated according to the following formula:
- the protection coefficient may be used as the updated code rate reduction coefficient of the non-interest area. If the rate adjustment completion degree of the current frame is greater than or equal to the specified threshold, the sum of the scaling complexity of each coding basic unit in the non-interest region after the update in the current frame can be calculated, and the update is calculated After the product of the scaling complexity of each coding basic unit in the region of interest and the respective code rate adjustment coefficient, and calculating the sum of each of the products.
- the above specified threshold can be 1 in the formula.
- the value of the specified threshold and code rate adjustment completion degree can also be changed accordingly.
- the code rate of the non-interest area can be reduced
- the coefficient determines the quantization adjustment value of the target coding basic unit, and uses the difference or ratio between the original quantization parameter of the target coding basic unit and the quantization adjustment value as the quantization parameter of the target coding basic unit.
- the quantization parameter of each coding basic unit in the non-interest area can be calculated according to the following formula:
- the following formula can be used to calculate the quantization parameter of each basic coding unit in the non-interest area:
- the quantization parameters of each coding basic unit can be performed according to the recalculated quantization parameters. coding. As the quantization step size of the coding basic unit in the region of interest becomes smaller after adjustment in the above manner, the quantization step size of the coding basic unit in the non-region of interest becomes larger, so that the region of interest can be encoded more finely. , Get more bit rate allocation, thus more clear.
- the present application also provides a video encoding system.
- the video frame of the video to be encoded includes a region of interest and a region of non-interest; the system includes:
- a current image set acquiring unit configured to acquire a current image set in the video to be encoded according to the current frame in the video to be encoded and the encoding sequence of the video to be encoded, and the current image set includes the current frame And a specified number of video frames located after the current frame in the coding order;
- a reverse update unit configured to reversely update the region of interest in each video frame in the current image set in a reverse order opposite to the encoding order
- the quantization coding unit is used to calculate quantization parameters for the coding basic units in the updated region of interest and non-interest region in the current frame, respectively, to use the calculated quantization parameters as the coding basic unit in the current frame Encode.
- the quantization coding unit includes:
- the saliency value reset module is used to reset the saliency value for the updated region of interest
- the quantization parameter calculation module is used to determine the scaling complexity of each basic coding unit in the current frame, and based on the scaling complexity and the re-set saliency value in the current frame, it is the updated value in the current frame
- the coding basic unit in the region of interest and non-interest region respectively calculates the quantization parameter.
- the reverse update unit includes:
- An encoding basic unit configuration module configured to divide each video frame in the current image set according to an encoding basic unit, and determine an optimal prediction mode for each encoding basic unit obtained by the division;
- the region of interest resetting module is used to traverse each basic coding unit in the region of interest of the target video frame for any target video frame in the current image set, and for any one of the current coding basic units Perform block analysis. If the optimal prediction mode adopted by the block is the inter prediction mode, search for the reference block corresponding to the block in the reference frame of the target video frame, and if the reference block is in the The reference frame does not belong to the region of interest, and the reference block is set as the region of interest.
- system further includes:
- the complexity calculation unit is used to calculate the complexity of each block in the coding basic unit, wherein for any block in the coding basic unit, the prediction of the block is determined according to the optimal prediction mode And calculate the sum of absolute transformation errors according to the original pixel value of the block and the predicted pixel value, and use the sum of absolute transformation errors as the complexity of the block.
- the quantization coding unit includes:
- the code rate adjustment coefficient calculation module is used to calculate the code rate of each coding basic unit in the updated region of interest according to the representative saliency value of each coding basic unit in the updated region of interest in the current frame Adjustment coefficient;
- the code rate adjustment completion degree calculation module is used to determine the protection coefficient of the non-interest area, and is based on the protection coefficient, the scaling complexity of each coding basic unit in the current frame, and each of the updated areas of interest Encoding the code rate adjustment coefficient of the basic unit of encoding, and calculating the completion degree of the code rate adjustment of the current frame; wherein the protection coefficient is used to characterize the degree to which the code rate is transferred from the non-interest area to the interest area;
- the region of interest calculation module is configured to adjust the code rate according to the degree of completion of the code rate adjustment, the code rate adjustment coefficient of each basic unit of coding in the updated region of interest, and the value of each basic unit of coding in the updated region of interest.
- the original quantization parameter calculates the quantization parameter of each coding basic unit in the updated region of interest in the current frame.
- the code rate adjustment completion degree calculation module includes:
- the first product calculation module is used to calculate the sum of the scaling complexity of each coding basic unit in the updated non-interest area in the current frame, and calculate the sum of the coding basic units in the updated non-interest area The first product of the sum of the scaling complexity and the protection coefficient;
- the second product sum calculation module is used to calculate the second product of the scaling complexity of each coding basic unit in the updated region of interest and the respective code rate adjustment coefficient, and calculate the updated region of interest The sum of the second products of each basic coding unit in;
- the ratio calculation module is used to calculate the difference between the sum of the scaling complexity of each coding basic unit in the current frame and the first product, and calculate the ratio of the difference to the sum of the second product, and The ratio is used as the rate adjustment completion degree of the current frame.
- an embodiment of the present application also provides a video encoding device, the device includes a processor and a memory, the memory is used to store a computer program, when the computer program is executed by the processor, can realize The above-mentioned video coding method.
- the memory may include a physical device for storing information, which is usually digitized and then stored in a medium using electrical, magnetic, or optical methods.
- the memory described in this embodiment may also include: a device that uses electrical energy to store information, such as RAM or ROM, etc.; a device that uses magnetic energy to store information, such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, or U disk ; A device that uses optical means to store information, such as CD or DVD.
- a device that uses electrical energy to store information such as RAM or ROM, etc.
- a device that uses magnetic energy to store information such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, or U disk
- a device that uses optical means to store information such as CD or DVD.
- quantum memory or graphene memory there are other types of memory, such as quantum memory or graphene memory.
- the processor can be implemented in any suitable manner.
- the processor may take the form of, for example, a microprocessor or a processor, and a computer-readable medium storing computer-readable program codes (for example, software or firmware) executable by the (micro)processor, logic gates, switches, dedicated integrated circuits, etc. Circuit (Application Specific Integrated Circuit, ASIC), programmable logic controller and embedded microcontroller form, etc.
- ASIC Application Specific Integrated Circuit
- ASIC Application Specific Integrated Circuit
- the technical solutions provided by one or more implementation manners of the present application can be combined and analyzed together with multiple video frames located after the current frame in the encoding sequence when the current frame is encoded. Specifically, starting from the last video frame, the regions of interest in each video frame can be updated in the reverse order from the encoding sequence, and the saliency value can be reset for the updated region of interest. In this way, for temporally adjacent video frames, if there is a sudden change in the region of interest at the same position, the reverse update can be used to slow down or eliminate this sudden change in the region of interest, and finally make the adjacent frames interesting After coding, the region will not appear too much abruptly.
- the quantization parameter can be calculated for each basic coding unit in the current frame from the perspective of the basic coding unit.
- the quantization parameters of each basic coding unit in the current frame may also be different. the same.
- different code rates can be assigned to different coding basic units, so that the code rate is allocated in a video frame more refined, so that the accuracy of video encoding is higher.
- the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt a form of a complete hardware implementation, a complete software implementation, or a combination of software and hardware implementations. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
- the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
- the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
- the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-permanent memory in a computer readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
- RAM random access memory
- ROM read-only memory
- flash RAM flash memory
- Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
- the information can be computer-readable instructions, data structures, program modules, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Disclosed are a video encoding method, a system, and an apparatus. The method comprises: acquiring, according to a current frame and an encoding order of the video, a current image set from a video to be encoded; sequentially performing, in reverse order to the encoding order, reverse updating on a region of interest in each video frame in the current image set; and calculating quantization parameters for coding units in the updated region of interest and a non-region of interest in the current frame, respectively, and encoding the coding units in the current frame according to the calculated quantization parameters. The technical solution provided in the present application enhances the accuracy of video encoding.
Description
本发明涉及图像处理技术领域,特别涉及一种视频编码方法、系统及设备。The present invention relates to the technical field of image processing, in particular to a video coding method, system and equipment.
随着视频往高清化方向的不断发展,传输高清视频所需的带宽也越来越大。考虑到带宽的成本,当前在对高清视频进行编码时,通常会为视频帧中不同的区域分配不同的码率,这样可以在保证总码率不变的情况下,尽可能将重点区域的清晰度提高。With the continuous development of high-definition video, the bandwidth required to transmit high-definition video is also increasing. Taking into account the cost of bandwidth, currently when encoding high-definition video, different areas in the video frame are usually assigned different bit rates, so that the key areas can be as clear as possible while ensuring that the total bit rate remains unchanged.度 Increase.
为了实现上述的方案,在对视频进行编码时,需要识别出各个视频帧中人眼感兴趣的区域,然后针对人眼感兴趣的区域可以分配较多的码率,而对于其它部分的区域则可以分配较少的码率。这种编码方式,对于人眼感兴趣的区域通常采用相同的量化参数进行编码。但实际上,人眼感兴趣的区域中,也并非每个位置都是人眼关注的,因此当前的这种编码方式还是不够精确。In order to achieve the above solution, when encoding the video, it is necessary to identify the area of interest to the human eye in each video frame, and then more bitrates can be allocated to the area of interest to the human eye, while for other parts of the area, Can allocate less bit rate. In this coding method, the same quantization parameter is usually used for coding the region of interest to the human eye. But in fact, not every position in the area of interest to the human eye is concerned by the human eye, so the current encoding method is still not accurate enough.
发明内容Summary of the invention
本申请的目的在于提供一种视频编码方法、系统及设备,能够提高视频编码的精确度。The purpose of this application is to provide a video encoding method, system, and equipment, which can improve the accuracy of video encoding.
为实现上述目的,本申请一方面提供一种视频编码方法,待编码视频的视频帧中包括感兴趣区域和非感兴趣区域;所述方法包括:根据所述待编码视频中的当前帧和所述待编码视频的编码顺序,在所述待编码视频中获取当前图像集,所述当前图像集中包括所述当前帧以及在编码顺序上位于所述当前帧之后的指定数量的视频帧;按照与所述编码顺序相反的逆顺序,依次对所述当前图像集中各个视频帧内的感兴趣区域进行反向更新;为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数,以根据计算得到的量化参数为所述当前帧中的各个编码基本单元进行编码。In order to achieve the above-mentioned objective, one aspect of the present application provides a video coding method. The video frame of the video to be coded includes a region of interest and a region of non-interest; the method includes: according to the current frame and the current frame in the video to be coded. The encoding sequence of the video to be encoded, obtaining a current image set in the video to be encoded, the current image set including the current frame and a specified number of video frames located after the current frame in the encoding sequence; The reverse order of the coding sequence is reversed to sequentially update the region of interest in each video frame in the current image set; the coding basis for the updated region of interest and non-interest region in the current frame is basically The units respectively calculate quantization parameters to perform coding for each basic coding unit in the current frame according to the calculated quantization parameters.
为实现上述目的,本申请另一方面还提供一种视频编码系统,待编码视频 的视频帧中包括感兴趣区域和非感兴趣区域;所述系统包括:当前图像集获取单元,用于根据所述待编码视频中的当前帧和所述待编码视频的编码顺序,在所述待编码视频中获取当前图像集,所述当前图像集中包括所述当前帧以及在编码顺序上位于所述当前帧之后的指定数量的视频帧;反向更新单元,用于按照与所述编码顺序相反的逆顺序,依次对所述当前图像集中各个视频帧内的感兴趣区域进行反向更新;量化编码单元,用于为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数,以根据计算得到的量化参数为所述当前帧中的编码基本单元进行编码。In order to achieve the above-mentioned object, another aspect of the present application also provides a video encoding system. The video frame of the video to be encoded includes a region of interest and a region of non-interest; the system includes: a current image set acquisition unit for The current frame in the video to be encoded and the encoding sequence of the video to be encoded, the current image set is acquired in the video to be encoded, the current image set includes the current frame and is located in the current frame in the encoding order A specified number of video frames afterwards; a reverse update unit, which is used to reversely update the region of interest in each video frame in the current image set in the reverse order opposite to the encoding order; a quantization coding unit, It is used for calculating quantization parameters for the updated coding basic units in the region of interest and non-interesting regions in the current frame respectively, so as to perform coding for the coding basic units in the current frame according to the calculated quantization parameters.
为实现上述目的,本申请另一方面还提供一种视频编码设备,所述设备包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的视频编码方法。In order to achieve the foregoing objective, another aspect of the present application also provides a video encoding device. The device includes a processor and a memory. The memory is used to store a computer program. When the computer program is executed by the processor, the foregoing Video encoding method.
由上可见,本申请一个或者多个实施方式提供的技术方案,在对当前帧进行编码时,可以结合在编码顺序上位于当前帧之后的多个视频帧一起分析。具体地,可以按照与编码顺序相反的顺序,从最后一个视频帧开始,依次向前反向更新各个视频帧内的感兴趣区域。这样,对于时间上相邻的视频帧,如果相同位置处出现感兴趣区域突变的情况,能够通过反向更新的方式减缓或者消除这种感兴趣区域突变的情况,最终使得相邻帧的感兴趣区域在编码后从视觉上也不会出现太大的突变。在反向更新感兴趣区域之后,可以从编码基本单元的角度,为当前帧中各个编码基本单元计算量化参数。后续在对当前帧进行编码时,可以针对不同的编码基本单元分配不同的码率,从而更加精细化地在一个视频帧内进行码率分配,使得视频编码的精确度更高。It can be seen from the above that the technical solutions provided by one or more implementation manners of the present application can be combined and analyzed together with multiple video frames located after the current frame in the encoding sequence when the current frame is encoded. Specifically, the region of interest in each video frame may be updated in the reverse order from the last video frame in the order opposite to the encoding order. In this way, for temporally adjacent video frames, if there is a sudden change in the region of interest at the same position, the reverse update can be used to slow down or eliminate this sudden change in the region of interest, and finally make the adjacent frames interesting After coding, the region will not appear too much abruptly. After the region of interest is updated in the reverse direction, the quantization parameter can be calculated for each basic coding unit in the current frame from the perspective of the basic coding unit. When the current frame is subsequently encoded, different code rates can be assigned to different coding basic units, so that the code rate is allocated in a video frame more refined, so that the accuracy of video encoding is higher.
为了更清楚地说明本发明实施方式中的技术方案,下面将对实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained from these drawings without creative work.
图1是本发明实施方式中视频编码方法的步骤图;Figure 1 is a step diagram of a video encoding method in an embodiment of the present invention;
图2是本发明实施方式中视频编码系统的功能模块示意图;Fig. 2 is a schematic diagram of functional modules of a video encoding system in an embodiment of the present invention;
图3是本发明实施方式中视频编码设备的结构示意图。Fig. 3 is a schematic structural diagram of a video encoding device in an embodiment of the present invention.
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施方式及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施方式仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。In order to make the purpose, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described implementations are only a part of the implementations of the present application, rather than all of the implementations. Based on the implementation manners in this application, all other implementation manners obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请的一个实施方式提供了一种视频编码方法,该方法可以针对待编码视频中的各个视频帧进行编码。在实际应用中,待编码视频中的各个视频帧可以具备各自的显著性图像。该显著性图像可以是宽(Width,W)和高(Height,H)与视频帧保持一致的图像,该显著性图像可以是一个灰度图像,并且在该显著性图像中,每个像素点的像素值可以位于[0,1]的区间内,该像素值便可以作为视频帧中对应像素点的显著性值。该像素值越大,则表示视频帧中对应像素点的显著性越大。具体地,可以按照视觉显著性检测算法,对待编码视频中的各个视频帧进行处理,从而得到各个视频帧的显著性图像。在本实施方式中,显著性图像中各个像素点的显著性值可以通过S(i,j)来表示,由上可见,S(i,j)可以满足以下条件:An embodiment of the present application provides a video encoding method, which can encode each video frame in the video to be encoded. In practical applications, each video frame in the video to be encoded may have its own saliency image. The saliency image may be an image whose width (W) and height (Height, H) are consistent with the video frame, the saliency image may be a grayscale image, and in the saliency image, each pixel The pixel value of can be located in the interval of [0,1], and the pixel value can be used as the saliency value of the corresponding pixel in the video frame. The larger the pixel value, the greater the significance of the corresponding pixel in the video frame. Specifically, each video frame in the to-be-coded video can be processed according to a visual saliency detection algorithm, so as to obtain a saliency image of each video frame. In this embodiment, the saliency value of each pixel in the saliency image can be represented by S(i,j). It can be seen from the above that S(i,j) can satisfy the following conditions:
0≤S(i,j)≤1,0≤i<W,0≤j<H0≤S(i,j)≤1,0≤i<W,0≤j<H
其中,W表示显著性图像的宽,H表示显著性图像的高。Among them, W represents the width of the saliency image, and H represents the height of the saliency image.
此外,待编码视频中各个视频帧可以被分为感兴趣区域和非感兴趣区域,其中,感兴趣区域可以是用户在观看视频时关注的区域,而非感兴趣区域则是用户不太关注的区域。感兴趣区域可以通过多种算法识别得到,本申请对感兴趣区域的识别过程并不做限定。In addition, each video frame in the video to be encoded can be divided into a region of interest and a region of non-interest, where the region of interest can be the area that the user pays attention to when watching the video, while the non-interest area is the area that the user does not pay much attention to. area. The region of interest can be identified through a variety of algorithms, and this application does not limit the process of identifying the region of interest.
在一个实施方式中,上述的视频编码方法可以包括如图1所示的多个步骤。In an embodiment, the above-mentioned video encoding method may include multiple steps as shown in FIG. 1.
S1:根据所述待编码视频中的当前帧和所述待编码视频的编码顺序,在所述待编码视频中获取当前图像集,所述当前图像集中包括所述当前帧以及在编码顺序上位于所述当前帧之后的指定数量的视频帧。S1: Acquire a current image set in the to-be-encoded video according to the current frame in the to-be-encoded video and the encoding order of the to-be-encoded video. The current image set includes the current frame and is located in the encoding order. The specified number of video frames after the current frame.
在本实施方式中,可以将待编码视频中的各个视频帧以及各个视频帧对应的显著性图像作为输入数据进行处理。具体地,当前正在处理的视频帧可以作为当前帧,为了准确地对当前帧进行编码,可以结合在编码顺序上位于当前帧 之后的多个视频帧一起进行分析。例如,可以按照预先配置的指定数量N,将当前帧以及在编码顺序上位于当前帧之后的N个视频帧,作为从待编码视频中获取的当前图像集。该当前图像集中的各个视频帧可以按照编码顺序进行编号,具体地,可以记为:In this embodiment, each video frame in the video to be encoded and the saliency image corresponding to each video frame can be processed as input data. Specifically, the video frame currently being processed can be used as the current frame. In order to accurately encode the current frame, multiple video frames located after the current frame in the encoding order can be combined for analysis. For example, the current frame and the N video frames located after the current frame in the encoding order may be used as the current image set obtained from the video to be encoded according to a predetermined number N configured in advance. Each video frame in the current image set can be numbered according to the coding order, specifically, it can be denoted as:
P
0,P
1...P
N
P 0 ,P 1 ...P N
其中,P
0可以是当前帧,P
N可以是当前图像集中在编码顺序上的最后一帧。
Among them, P 0 may be the current frame, and P N may be the last frame in the encoding sequence of the current image.
在本实施方式中,当前图像集中的第t个视频帧的显著性图像可以记为S
t(i,j),这样,S
t(i,j)与P
t便可以具备对应关系。
In this embodiment, the saliency image of the t-th video frame in the current image set can be denoted as St (i, j), so that St (i, j) and P t can have a corresponding relationship.
S3:按照与所述编码顺序相反的逆顺序,依次对所述当前图像集中各个视频帧内的感兴趣区域进行反向更新。S3: Reversely update the regions of interest in each video frame in the current image set in a reverse order that is opposite to the encoding order.
在本实施方式中,考虑到编码时间上相邻的视频帧在相同位置处的画面可能存在显著性值突变的情况,这种情况会导致感兴趣区域也会发生突变。存在突变的感兴趣区域在编码后,可能会引起用户视觉上的冲突。为了消除这种情况的影响,可以采用反向更新感兴趣区域的方式,以使得相邻视频帧之间相同位置处的画面的显著性值比较连贯。In this embodiment, it is considered that there may be a sudden change in the saliency value in the pictures of adjacent video frames at the same position in the encoding time, and this situation may cause a sudden change in the region of interest. After encoding, regions of interest with mutations may cause visual conflicts for users. In order to eliminate the influence of this situation, the method of updating the region of interest in the reverse direction can be used to make the saliency values of the pictures at the same position between adjacent video frames more consistent.
具体地,针对当前帧中的各个视频帧,可以按照编码基本单元进行划分,从而将每个视频帧划分为若干个编码基本单元。在实际应用中,编码基本单元可以是大小相同的矩形,并且根据不同的编码方式,编码基本单元的尺寸也可以不同。例如,对于H.264编码器而言,编码基本单元可以是16*16的宏块。而对于HEVC编码器而言,编码基本单元可以是该编码器所允许的最小HEVC编码单元,该最小HEVC编码单元的典型大小可以是8*8。其中,编码基本单元的宽和高可以分别记为W
bu和H
bu。
Specifically, each video frame in the current frame can be divided according to basic coding units, so that each video frame is divided into several basic coding units. In practical applications, the basic coding unit may be a rectangle with the same size, and the size of the basic coding unit may also be different according to different coding methods. For example, for the H.264 encoder, the coding basic unit may be a 16*16 macro block. For an HEVC encoder, the coding basic unit may be the smallest HEVC coding unit allowed by the encoder, and the typical size of the smallest HEVC coding unit may be 8*8. Among them, the width and height of the coding basic unit can be denoted as W bu and H bu respectively .
在本实施方式中,在将各个视频帧按照编码基本单元进行划分后,每个编码基本单元在编码过程中还可以进一步划分为多个分块。具体地,按照编码顺序,可以为当前图像集中的各个视频帧,以编码基本单元为单位,进行编码模式的选择。其中,编码模式可以包括帧间预测模式和帧内预测模式。帧内预测模式可以包括帧内分块的划分、帧内预测方向等信息,帧间预测模式可以包括帧间分块的划分,分块的参考帧的选择以及分块的运动矢量等信息。In this embodiment, after each video frame is divided according to basic coding units, each basic coding unit may be further divided into multiple blocks during the coding process. Specifically, according to the coding sequence, the coding mode can be selected for each video frame in the current image set, with the coding basic unit as a unit. Wherein, the coding mode may include an inter prediction mode and an intra prediction mode. The intra-frame prediction mode may include information such as the division of intra-frame blocks and the direction of intra-frame prediction, and the inter-frame prediction mode may include the division of inter-frame blocks, the selection of the reference frame of the block, and the motion vector of the block.
当然,在实际应用中,为了减低编码的计算量,可以适当简化编码模式的选择过程。例如,在进行帧间运动搜索时,可以只使用整像素精度。又例如,在进行帧内预测时,可以只使用水平、竖直、45度等方向,而不进行熵编码, 也不进行量化等操作。Of course, in practical applications, in order to reduce the amount of coding calculations, the selection process of the coding mode can be appropriately simplified. For example, when searching for inter-frame motion, you can use only integer pixel accuracy. For another example, when performing intra-frame prediction, only horizontal, vertical, and 45-degree directions may be used, without entropy coding or quantization.
在本实施方式中,可以记录视频帧中各个编码基本单元的最优预测模式。最优预测模式是帧间预测还是帧内预测,可以根据不同预测模式中,原始值和预测值之间的差距,以及需要记录的额外信息的多少来决定。如果某个预测模式下,编码基本单元中分块的原始值与预测值越接近,以及需要记录的信息量越少,那么该预测模式便可以作为最优的预测模式。最终,通过分别对帧间预测模式和帧内预测模式进行检测,从而可以确定出视频帧中各个编码基本单元的最优预测模式。In this embodiment, the optimal prediction mode of each basic coding unit in the video frame can be recorded. Whether the optimal prediction mode is inter-frame prediction or intra-frame prediction can be determined according to the difference between the original value and the predicted value in different prediction modes, and the amount of additional information that needs to be recorded. If the original value of the block in the coding basic unit is closer to the predicted value in a certain prediction mode, and the amount of information that needs to be recorded is less, then the prediction mode can be used as the optimal prediction mode. Finally, by separately detecting the inter-frame prediction mode and the intra-frame prediction mode, the optimal prediction mode of each coding basic unit in the video frame can be determined.
在本实施方式中,在确定了编码基本单元的最优预测模式后,还可以计算编码基本单元中各个分块的复杂度。该复杂度可以在后续的反向更新感兴趣区域的过程中发挥作用。具体地,分块的复杂度可以是该分块的绝对变换误差和(Sum of Absolute Transformed Difference,SATD),在计算SATD值时,可以先获取分块的原始像素值和经过最优预测模式预测得到的预测像素值。需要说明的是,原始像素值和预测像素值均可以是像素矩阵,并不局限于一个具体的像素值。然后,可以将原始像素值和预测像素值相减,并对相减后的结果进行hadamard变换,得到变换像素矩阵。最终,将该变换像素矩阵中的各个元素的绝对值求和,便可以得到分块的SATD值,该SATD值便可以作为分块的复杂度。In this embodiment, after the optimal prediction mode of the coding basic unit is determined, the complexity of each block in the coding basic unit can also be calculated. This complexity can play a role in the subsequent reverse update of the region of interest. Specifically, the complexity of the block can be the sum of the absolute transform error of the block (Sum of Absolute Transformed Difference, SATD). When calculating the SATD value, the original pixel value of the block can be obtained first and predicted by the optimal prediction mode. The obtained predicted pixel value. It should be noted that both the original pixel value and the predicted pixel value can be a pixel matrix, and are not limited to a specific pixel value. Then, the original pixel value and the predicted pixel value can be subtracted, and the subtracted result can be subjected to hadamad transformation to obtain a transformed pixel matrix. Finally, by summing the absolute values of the elements in the transformed pixel matrix, the SATD value of the block can be obtained, and the SATD value can be used as the complexity of the block.
在本实施方式中,在计算出各个分块的复杂度后,便可以进行反向更新感兴趣区域的过程。具体地,首先可以确定反向更新感兴趣区域的顺序,该顺序可以是与编码顺序相反的逆顺序。例如,编码顺序是从P
0到P
N,那么反向更新感兴趣区域的顺序便可以是从P
N到P
0。下面以第一个进行反向更新的视频帧P
N为例,来阐述反向更新的具体过程。
In this embodiment, after the complexity of each block is calculated, the process of inversely updating the region of interest can be performed. Specifically, firstly, the sequence of the reverse update of the region of interest can be determined, and the sequence can be the reverse sequence opposite to the encoding sequence. For example, if the coding sequence is from P 0 to P N , then the sequence of the reverse update of the region of interest can be from P N to P 0 . The following takes the first video frame P N that undergoes reverse update as an example to illustrate the specific process of reverse update.
首先,可以识别出该视频帧中的感兴趣区域中的编码基本单元,针对感兴趣区域中编码基本单元内的各个分块都进行相同的操作。遍历视频帧的感兴趣区域中的各个编码基本单元,并针对当前的编码基本单元中的任一分块,可以先识别该分块采用的最优预测模式。该分块采用的最优预测模式,可以与该分块所属的编码基本单元的最优预测模式保持一致。如果该最优预测模式为帧内预测模式,可以不对该分块进行处理,直接跳转至下一个分块。而如果该最优预测模式为帧间预测模式,那么可以根据帧间预测模式记录的各项信息,在该 视频帧的参考帧中,查找到与该分块对应的参考块。该参考帧可以是当前图像集中位于视频帧P
N之前的视频帧。若该参考块在所述参考帧中不属于感兴趣区域,则可以将所述参考块设置为感兴趣区域。这样,对感兴趣区域内的每个分块都进行相同的处理后,便可以完成向参考帧反向更新感兴趣区域的过程。
First, the coding basic unit in the region of interest in the video frame can be identified, and the same operation is performed on each block in the coding basic unit in the region of interest. Traverse each coding basic unit in the region of interest of the video frame, and for any block in the current coding basic unit, the optimal prediction mode adopted by the block can be identified first. The optimal prediction mode adopted by the block may be consistent with the optimal prediction mode of the coding basic unit to which the block belongs. If the optimal prediction mode is an intra-frame prediction mode, the sub-block may not be processed and directly jump to the next sub-block. If the optimal prediction mode is the inter prediction mode, then the reference block corresponding to the sub-block can be found in the reference frame of the video frame according to various information recorded in the inter prediction mode. The reference frame may be a video frame located before the video frame P N in the current image set. If the reference block does not belong to the region of interest in the reference frame, the reference block may be set as the region of interest. In this way, after the same processing is performed on each block in the region of interest, the process of updating the region of interest in the reverse direction to the reference frame can be completed.
在本实施方式中,在反向更新感兴趣区域后,还需要为更新后的感兴趣区域中的各个像素点重新设置对应的显著性值。具体地,可以通过反向传递显著性值的方式,为参考帧中更新后的感兴趣区域重新设置显著性值。在反向传递显著性值时,可以先根据视频帧P
N中分块的复杂度确定传递系数,并将传递系数与分块中像素点的显著性值的乘积作为待传递的显著性值。该传递系数可以通过将分块的复杂度代入预先设置的传递函数中得到。考虑到在反向更新感兴趣区域时,传递给参考块的显著性值不应该超过分块本身的显著性值,因此该传递函数可以是一个计算结果在[0,1]区间内的函数。此外,考虑到如果分块的复杂度比较大,则意味着分块与参考块之间的相似程度比较低,这时候为了不过分影响参考块的真实性,向参考块传递的显著性值也应当比较小。鉴于此,该传递函数应当是关于复杂度的递减函数。综上,预先设置的传递函数φ(x)应当满足以下条件:
In this embodiment, after the region of interest is updated in the reverse direction, it is also necessary to reset the corresponding saliency value for each pixel in the updated region of interest. Specifically, the saliency value can be re-set for the updated region of interest in the reference frame by passing the saliency value backward. When the significance value, to determine the transfer coefficient based on the complexity of the video frame P N equatorial blocks reverse transmission, a product of significant value and pass coefficient block pixel points as the significance values to be transmitted. The transfer coefficient can be obtained by substituting the complexity of the block into a preset transfer function. Considering that when the region of interest is updated in the reverse direction, the saliency value passed to the reference block should not exceed the saliency value of the block itself, so the transfer function can be a function with a calculation result in the interval [0, 1]. In addition, considering that if the complexity of the block is relatively large, it means that the degree of similarity between the block and the reference block is relatively low. At this time, in order not to excessively affect the authenticity of the reference block, the saliency value transferred to the reference block is also It should be relatively small. In view of this, the transfer function should be a decreasing function of complexity. In summary, the preset transfer function φ(x) should meet the following conditions:
(1)0≤φ(x)≤1(1) 0≤φ(x)≤1
(2)对于任意的0≤a<b,满足φ(a)≥φ(b)(2) For any 0≤a<b, satisfy φ(a)≥φ(b)
在本实施方式中,将分块的复杂度代入上述的传递函数,便可以得到传递系数,将该传递系数与分块中像素点的显著性值相乘后,便可以得到待传递的显著性值。然后,可以将待传递的显著性值作为参考块中对应像素点的显著性值。按照这种反向更新感兴趣区域,以及为参考帧中更新后的感兴趣区域重新设置显著性值的方式,可以减少分块与参考块的画面突变。In this embodiment, by substituting the complexity of the block into the above transfer function, the transfer coefficient can be obtained. After the transfer coefficient is multiplied by the saliency value of the pixel in the block, the saliency to be transferred can be obtained. value. Then, the saliency value to be transferred can be used as the saliency value of the corresponding pixel in the reference block. According to this method of updating the region of interest in the reverse direction and resetting the saliency value for the updated region of interest in the reference frame, the sudden change of the picture between the block and the reference block can be reduced.
由上可见,在进行重新设置显著性值时,针对目标视频帧中参与反向更新感兴趣区域的目标分块,可以根据所述目标分块的复杂度确定传递系数,并将所述传递系数与所述目标分块中像素点的显著性值的乘积,作为待传递的显著性值。然后,可以在所述参考帧中确定所述目标分块的参考块,并利用所述待传递的显著性值替换所述目标分块的参考块中对应像素点的显著性值。以上只是以视频帧P
N为例阐述了反向更新感兴趣区域的过程,本领域人员应当知晓,针对当前图像集中的任一目标视频帧,均可以采用上述的方式进行反向更新感 兴趣区域,最终可以将当前帧的显著性图像进行更新。
It can be seen from the above that when the saliency value is reset, for the target block participating in the reverse update of the region of interest in the target video frame, the transfer coefficient can be determined according to the complexity of the target block, and the transfer coefficient The product of the saliency value of the pixel in the target block is used as the saliency value to be transferred. Then, the reference block of the target block may be determined in the reference frame, and the saliency value of the corresponding pixel in the reference block of the target block may be replaced with the saliency value to be transferred. The above is just taking the video frame PN as an example to illustrate the process of reversely updating the region of interest. Those skilled in the art should know that for any target video frame in the current image set, the above-mentioned method can be used to reversely update the region of interest. , And finally the saliency image of the current frame can be updated.
需要说明的是,若视频帧P
N采用的帧间预测模式使用了两个或者更多个参考帧,那么可以针对每个参考帧均进行上述的处理,这里便不再赘述。
It should be noted that if the inter-frame prediction mode adopted by the video frame PN uses two or more reference frames, the above-mentioned processing can be performed for each reference frame, which will not be repeated here.
S5:为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数,以根据计算得到的量化参数为所述当前帧中的各个编码基本单元进行编码。S5: Calculate quantization parameters for the updated coding basic units in the region of interest and non-interest region in the current frame respectively, so as to perform coding for each basic coding unit in the current frame according to the calculated quantization parameters.
在本实施方式中,在进行感兴趣区域的反向更新后,当前图像集中视频帧内的感兴趣区域可能都以分块为单位进行了更新。由于在编码过程中是以编码基本单元为单位,因此可以按照编码基本单元,对当前视频帧中的感兴趣区域进行调整,并且为了后续数据处理的方便,可以为调整后的感兴趣区域中的各个编码基本单元设置代表显著性值。In this embodiment, after the inverse update of the region of interest is performed, the region of interest in the video frame in the current image set may all be updated in units of blocks. Since the coding basic unit is used as the unit in the coding process, the region of interest in the current video frame can be adjusted according to the basic coding unit, and for the convenience of subsequent data processing, it can be the adjusted region of interest. Each coding basic unit is set to represent the significance value.
具体地,按照编码基本单元进行感兴趣区域的调整时,可以根据实际应用场景进行灵活设置。例如,对于所述当前帧中的任一编码基本单元,若所述编码基本单元中包含属于感兴趣区域的分块,可以将所述编码基本单元设置为感兴趣区域。又例如,对于所述当前帧中的任一编码基本单元,若所述编码基本单元中的各个分块均属于感兴趣区域,才将所述编码基本单元设置为感兴趣区域,这种方式调整后的感兴趣区域,会比前一种方式调整得到的感兴趣区域小一些,具体可以按照处理精度或者设备的运算能力,灵活选用合适的感兴趣区域的调整方式。Specifically, when the region of interest is adjusted according to the coding basic unit, it can be flexibly set according to actual application scenarios. For example, for any basic coding unit in the current frame, if the basic coding unit contains blocks belonging to the region of interest, the basic coding unit may be set as the region of interest. For another example, for any basic coding unit in the current frame, if each block in the basic coding unit belongs to the region of interest, then the basic coding unit is set as the region of interest. This way of adjustment The latter region of interest will be smaller than the region of interest obtained by adjustment in the previous method. Specifically, an appropriate adjustment method of the region of interest can be flexibly selected according to the processing accuracy or the computing capability of the device.
在对当前帧中感兴趣区域进行调整后,可以确定调整后的感兴趣区域中各个编码基本单元的代表显著性值。根据应用场景和精度的不同,可以灵活地确定上述的代表显著性值。例如,在一个实施方式中,针对当前的编码基本单元,可以将所述当前的编码基本单元中最大的显著性值作为代表显著性值。又例如,在另一个实施方式中,针对当前的编码基本单元,可以读取所述当前的编码基本单元中各个像素点的显著性值,并对各个所述像素点的显著性值进行均值滤波或者中值滤波处理,并将处理后的结果作为代表显著性值。在实际应用中,可以按照以下公式来对各个像素点的显著性值进行均值滤波:After adjusting the region of interest in the current frame, the representative saliency value of each basic coding unit in the adjusted region of interest can be determined. According to different application scenarios and accuracy, the above-mentioned representative significance value can be flexibly determined. For example, in one embodiment, for the current basic coding unit, the largest saliency value in the current basic coding unit may be used as the representative saliency value. For another example, in another embodiment, for the current basic coding unit, the saliency value of each pixel in the current basic coding unit can be read, and the saliency value of each pixel can be averagely filtered Or median filter processing, and use the processed result as the representative significance value. In practical applications, the saliency value of each pixel can be average filtered according to the following formula:
其中,S'(x,y)可以表示均值滤波后的显著性值,W
bu和H
bu可以分别表示编码基本单元的宽和高。
Among them, S'(x, y) can represent the saliency value after mean filtering, and W bu and H bu can respectively represent the width and height of the coding basic unit.
当然,在实际应用中还存在更多的方式来确定编码基本单元的代表显著性值,这里就不一一例举。Of course, there are more ways to determine the representative saliency value of the basic coding unit in practical applications, and I will not list them one by one here.
在本实施方式中,在确定出当前帧更新后的感兴趣区域内各个编码基本单元的代表显著性值后,可以根据该代表显著性值,分别计算更新后的感兴趣区域中各个编码基本单元的码率调整系数。该码率调整系数,可以表示编码过程中,对编码基本单元的码率提升程度。该码率调整系数越大,表示分配给对应的编码基本单元的码率越多。在实际应用中,码率调整系数的值可以大于或者等于1,并且可以将编码基本单元的代表显著性值作为自变量,代表显著性值越大,对应的码率调整系数也越大。具体地,在一个实施方式中,码率调整系数可以按照以下公式确定:In this embodiment, after determining the representative saliency value of each coding basic unit in the region of interest after the current frame is updated, the representative saliency value can be used to calculate each coding basic unit in the updated region of interest. The bit rate adjustment factor. The code rate adjustment coefficient may indicate the degree of increase in the code rate of the basic coding unit during the encoding process. The larger the code rate adjustment coefficient, the more code rate allocated to the corresponding basic coding unit. In practical applications, the value of the code rate adjustment coefficient may be greater than or equal to 1, and the representative saliency value of the basic coding unit may be used as an independent variable. The larger the representative saliency value, the larger the corresponding code rate adjustment coefficient. Specifically, in one embodiment, the code rate adjustment coefficient may be determined according to the following formula:
g(s)=k*s
n+1
g(s)=k*s n +1
其中,g(s)表示码率调整系数,s表示某个编码基本单元的代表显著性值,k和n是自定义的常数。Among them, g(s) represents the code rate adjustment coefficient, s represents the representative significance value of a certain coding basic unit, and k and n are self-defined constants.
此外,在另一个实施方式中,码率调整系数还可以按照以下公式确定:In addition, in another embodiment, the code rate adjustment coefficient can also be determined according to the following formula:
g(s)=k
s
g(s)=k s
当然,只要码率调整系数的计算方式符合以上的设定,在实际应用中还可以存在更多的方式来计算码率调整系数,这里就不一一例举了,对于当前帧中第i个编码基本单元的码率调整系数,可以用g
i来表示。
Of course, as long as the calculation method of the code rate adjustment coefficient conforms to the above settings, there can be more ways to calculate the code rate adjustment coefficient in practical applications. I will not list them one by one here. For the i-th one in the current frame The code rate adjustment coefficient of the basic coding unit can be represented by g i .
在本实施方式中,还可以计算当前帧更新后的感兴趣区域内各个编码基本单元的缩放复杂度。该缩放复杂度可以根据各个编码基本单元的原始复杂度来确定。具体地,若原始的编码器对于当前帧中的各个编码基本单元都使用了相同的量化参数,那么每个编码基本单元的缩放复杂度可以等同于原始复杂度。而如果原始的编码器对于当前帧中的各个编码基本单元设置了不同的量化参数,那么可以先根据所述当前帧中各个编码基本单元的原始量化参数,计算所述当前帧的平均量化参数。然后,针对所述当前帧中的任一编码基本单元,可以根据所述当前帧的平均量化参数、所述编码基本单元中各个分块的复杂度和所述编码基本单元的原始量化参数,计算所述编码基本单元的缩放复杂度。在一个具体应用场景下,平均量化参数的计算公式可以如下所示:In this embodiment, it is also possible to calculate the scaling complexity of each coding basic unit in the region of interest after the current frame is updated. The scaling complexity can be determined according to the original complexity of each basic coding unit. Specifically, if the original encoder uses the same quantization parameter for each basic coding unit in the current frame, the scaling complexity of each basic coding unit may be equal to the original complexity. If the original encoder sets different quantization parameters for each basic coding unit in the current frame, then the average quantization parameter of the current frame may be calculated first according to the original quantization parameter of each basic coding unit in the current frame. Then, for any basic coding unit in the current frame, it can be calculated according to the average quantization parameter of the current frame, the complexity of each block in the basic coding unit, and the original quantization parameter of the basic coding unit The scaling complexity of the coding basic unit. In a specific application scenario, the calculation formula of the average quantization parameter can be as follows:
其中,QP
avg表示当前帧的平均量化参数,QP
i表示当前帧中第i个编码基本 单元的原始量化参数,NBU表示当前帧中编码基本单元的总数。
Among them, QP avg represents the average quantization parameter of the current frame, QP i represents the original quantization parameter of the i-th coding basic unit in the current frame, and NBU represents the total number of coding basic units in the current frame.
在具体实施过程中,对于量化参数和量化步长是以2为底的指数关系的编码标准(例如H.264和HEVC),可以采用以下公式计算缩放复杂度:In the specific implementation process, for coding standards (such as H.264 and HEVC) where the quantization parameter and the quantization step size are based on an exponential relationship of 2, the following formula can be used to calculate the scaling complexity:
其中,FS
i表示第i个编码基本单元的缩放复杂度,F
i(j)表示第i个编码基本单元中第j个分块的复杂度,NPU
i表示第i个编码基本单元中分块的总数量。
Among them, FS i represents the scaling complexity of the i-th coding basic unit, F i (j) represents the complexity of the j-th block in the i-th coding basic unit , and NPU i represents the block in the i-th coding basic unit The total number of.
对于量化参数等于量化步长的编码标准,则可以采用以下公式计算缩放复杂度:For coding standards where the quantization parameter is equal to the quantization step size, the following formula can be used to calculate the scaling complexity:
在一个实施方式中,为了防止非感兴趣区域码率过低而导致编码出来的画面出现花屏、模糊等问题,在实际实施过程中,需要设定一个非感兴趣区域码率保护系数B,该保护系数可以代表一个视频帧内码率可以从非感兴趣区域转移到感兴趣区域的程度。非感兴趣区域的保护系数B可以是一个大于0小于1的数,该保护系数的值越大,代表从非感兴趣区域转移到感兴趣区域的码率越少,也就是说,保护系数越大,则非感兴趣区域减少的码率越少,相应地,感兴趣区域可用的额外码率也越少。In one embodiment, in order to prevent the code rate of the non-interest region from being too low and causing the coded picture to appear blurry, blurring, etc., in the actual implementation process, it is necessary to set a non-interest region code rate protection coefficient B, which The protection coefficient can represent the degree to which the code rate of a video frame can be transferred from the non-interest area to the interest area. The protection coefficient B of the non-interest area can be a number greater than 0 and less than 1. The larger the value of the protection coefficient, the lower the code rate for transferring from the non-interest area to the interest area, that is, the greater the protection coefficient. Larger, the less the code rate of the non-interest area is reduced, and correspondingly, the less the additional code rate available for the area of interest.
在具体实施过程中,由于非感兴趣区域的保护系数B的限制,使得在相同输出码率的前提下,从非感兴趣区域中转移到感兴趣区域的码率可能受到限制,该限制可以由一个值来表示,该值可以称为码率调整完成度。具体地,基于所述保护系数、所述当前帧中各个编码基本单元的缩放复杂度以及所述更新后的感兴趣区域中各个编码基本单元的码率调整系数,可以计算所述当前帧的码率调整完成度P。In the specific implementation process, due to the limitation of the protection coefficient B of the non-interest area, the code rate of transferring from the non-interest area to the interest area may be restricted under the premise of the same output bit rate. The restriction can be set by It is represented by a value, which can be referred to as the completion degree of bit rate adjustment. Specifically, based on the protection coefficient, the scaling complexity of each coding basic unit in the current frame, and the code rate adjustment coefficient of each coding basic unit in the updated region of interest, the code of the current frame can be calculated Rate adjustment completion degree P.
在一个实施方式中,在计算当前帧的码率调整完成度时,可以计算所述当前帧中更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和,并计算所述更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和与所述保护系数的第一乘积。然后,可以计算所述更新后的感兴趣区域中各个编码基本单元的缩放复杂度与各自的码率调整系数的第二乘积,并计算所述更新后的感兴趣区域中各个编码基本单元的第二乘积之和。最终,可以计算当前帧各个编码基本单元的缩放复杂度之和与所述第一乘积的差值,并计算所述差值与所述第 二乘积之和的比值,并将所述比值作为所述当前帧的码率调整完成度。In one embodiment, when calculating the rate adjustment completion degree of the current frame, the sum of the scaling complexity of each coding basic unit in the updated non-interest region in the current frame may be calculated, and the updated The first product of the sum of the scaling complexity of each coding basic unit in the non-interest area and the protection coefficient. Then, the second product of the scaling complexity of each coding basic unit in the updated region of interest and the respective code rate adjustment coefficient can be calculated, and the second product of each coding basic unit in the updated region of interest can be calculated. The sum of two products. Finally, the difference between the sum of the scaling complexity of each coding basic unit of the current frame and the first product can be calculated, and the ratio of the difference to the sum of the second product can be calculated, and the ratio can be used as the total value. Describes the completion degree of bit rate adjustment of the current frame.
上述的过程可以通过以下的公式来表示:The above process can be expressed by the following formula:
其中,NROI表示当前帧中的非感兴趣区域,ROI表示当前帧中的感兴趣区域。Among them, NROI represents the region of non-interest in the current frame, and ROI represents the region of interest in the current frame.
如果上式计算的码率调整完成度小于1,则代表当前帧中从非感兴趣区域转移到感兴趣区域的码率可能受到了限制。比如P=0.8则代表,由于非感兴趣区域码率保护系数的限制,当前帧中从非感兴趣区域中转移到感兴趣区域的码率只有预期的80%。如果码率调整完成度大于或者等于1,则意味着根据各编码基本单元的码率调整系数,从非感兴趣区域转移到感兴趣区域的码率没有受到限制,符合预期的情况。按照上述的方式,在具体实施过程中,不同视频帧的感兴趣区域码率调整完成度可能是不同的,从而能够精确地对各个视频帧进行码率分配。If the completion degree of bit rate adjustment calculated by the above formula is less than 1, it means that the bit rate for transferring from the non-interest area to the interest area in the current frame may be restricted. For example, P=0.8 means that due to the limitation of the code rate protection coefficient of the non-interest area, the code rate of the current frame from the non-interest area to the area of interest is only 80% of the expected rate. If the code rate adjustment completion degree is greater than or equal to 1, it means that according to the code rate adjustment coefficient of each coding basic unit, the code rate for transferring from the non-interest area to the interest area is not limited, which conforms to the expected situation. According to the above method, in the specific implementation process, the completion degree of the rate adjustment of the region of interest of different video frames may be different, so that the rate allocation of each video frame can be accurately performed.
在本实施方式中,根据所述码率调整完成度、所述更新后的感兴趣区域中各个编码基本单元的码率调整系数以及所述更新后的感兴趣区域中各个编码基本单元的原始量化参数,便可以计算所述当前帧中更新后的感兴趣区域中各个编码基本单元的量化参数。对于不同的编码标准,计算感兴趣区域内各个编码基本单元的量化参数的过程也可以不同。In this embodiment, according to the completion degree of the code rate adjustment, the code rate adjustment coefficient of each coding basic unit in the updated region of interest, and the original quantization of each coding basic unit in the updated region of interest Parameter, the quantization parameter of each coding basic unit in the updated region of interest in the current frame can be calculated. For different coding standards, the process of calculating the quantization parameters of each coding basic unit in the region of interest may also be different.
具体地,对于量化参数和量化步长是以2为底的指数关系的编码标准(如H.264和HEVC编码标准),可以按照以下公式来重新计算各个编码基本单元的量化参数:Specifically, for coding standards (such as H.264 and HEVC coding standards) where the quantization parameter and the quantization step size are based on an exponential relationship of 2, the quantization parameter of each coding basic unit can be recalculated according to the following formula:
其中,QP'
i表示重新计算后的第i个编码基本单元的量化参数。
Among them, QP' i represents the quantization parameter of the i-th coding basic unit after recalculation.
而对于量化参数等于量化步长的编码标准,可以采用以下公式重新计算量化参数:For coding standards where the quantization parameter is equal to the quantization step size, the quantization parameter can be recalculated using the following formula:
由上可见,在重新计算感兴趣区域内各个编码基本单元的量化参数时,对 于更新后的感兴趣区域中的任一目标编码基本单元,若所述当前帧的码率调整完成度小于指定阈值,可以根据所述码率调整完成度和所述目标编码基本单元的码率调整系数的乘积确定所述目标编码基本单元的量化调整值,并将所述目标编码基本单元的原始量化参数和所述量化调整值的差值或者比值作为所述目标编码基本单元的的量化参数。若所述当前帧的码率调整完成度大于或者等于所述指定阈值,可以根据所述目标编码基本单元的码率调整系数确定所述目标编码基本单元的量化调整值,并将所述目标编码基本单元的原始量化参数和所述量化调整值的差值或者比值作为所述目标编码基本单元的的量化参数。上述的指定阈值,可以是公式中的1。当然,根据应用场景的不同,指定阈值和码率调整完成度的数值也可以相应变化。It can be seen from the above that when recalculating the quantization parameters of each coding basic unit in the region of interest, for any target coding basic unit in the updated region of interest, if the rate adjustment completion degree of the current frame is less than the specified threshold , The quantization adjustment value of the target coding basic unit may be determined according to the product of the code rate adjustment completion degree and the code rate adjustment coefficient of the target coding basic unit, and the original quantization parameter of the target coding basic unit and the The difference or ratio of the quantization adjustment value is used as the quantization parameter of the target coding basic unit. If the rate adjustment completion degree of the current frame is greater than or equal to the specified threshold, the quantization adjustment value of the target encoding basic unit may be determined according to the rate adjustment coefficient of the target encoding basic unit, and the target encoding The difference or ratio between the original quantization parameter of the basic unit and the quantization adjustment value is used as the quantization parameter of the target coding basic unit. The above specified threshold can be 1 in the formula. Of course, according to different application scenarios, the value of the specified threshold and code rate adjustment completion degree can also be changed accordingly.
在本实施方式中,计算出感兴趣区域内各个编码基本单元的量化参数后,可以继续计算非感兴趣区域内各个编码基本单元的量化参数。具体地,可以先根据所述当前帧的码率调整完成度、所述当前帧中各个编码基本单元的缩放复杂度以及所述更新后的感兴趣区域中各个编码基本单元的码率调整系数,计算所述更新后的非感兴趣区域的码率降低系数。然后,再根据所述非感兴趣区域的码率降低系数和所述非感兴趣区域中各个编码基本单元的原始量化参数,计算所述非感兴趣区域中各个编码基本单元的量化参数。In this embodiment, after calculating the quantization parameters of each coding basic unit in the region of interest, the quantization parameters of each coding basic unit in the non-interest region can be continued to be calculated. Specifically, the code rate adjustment completion degree of the current frame may be adjusted first, the scaling complexity of each basic coding unit in the current frame, and the code rate adjustment coefficient of each basic coding unit in the updated region of interest, Calculate the code rate reduction coefficient of the updated non-interest region. Then, according to the code rate reduction coefficient of the non-interest area and the original quantization parameter of each basic coding unit in the non-interest area, the quantization parameter of each basic coding unit in the non-interest area is calculated.
其中,非感兴趣区域的码率降低系数D可以按照以下公式计算:Among them, the code rate reduction coefficient D of the non-interest area can be calculated according to the following formula:
可见,若所述当前帧的码率调整完成度小于指定阈值,可以将所述保护系数作为所述更新后的非感兴趣区域的码率降低系数。若所述当前帧的码率调整完成度大于或者等于所述指定阈值,可以计算所述当前帧中更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和,并计算所述更新后的感兴趣区域中各个编码基本单元的缩放复杂度与各自的码率调整系数的乘积,以及计算各个所述乘积之和。然后,还可以计算当前帧中各个编码基本单元的复杂度之和与所述乘积之和的差值,并将所述差值与所述缩放复杂度之和的比值作为所述更新后的非感兴趣区域的码率降低系数。上述的指定阈值,可以是公式中的1。当然,根据应用场景的不同,指定阈值和码率调整完成度的数值也可以相应变化。It can be seen that if the rate adjustment completion degree of the current frame is less than a specified threshold, the protection coefficient may be used as the updated code rate reduction coefficient of the non-interest area. If the rate adjustment completion degree of the current frame is greater than or equal to the specified threshold, the sum of the scaling complexity of each coding basic unit in the non-interest region after the update in the current frame can be calculated, and the update is calculated After the product of the scaling complexity of each coding basic unit in the region of interest and the respective code rate adjustment coefficient, and calculating the sum of each of the products. Then, it is also possible to calculate the difference between the sum of the complexity of each coding basic unit and the sum of the products in the current frame, and use the ratio of the difference to the sum of the scaling complexity as the updated non The code rate reduction factor of the region of interest. The above specified threshold can be 1 in the formula. Of course, according to different application scenarios, the value of the specified threshold and code rate adjustment completion degree can also be changed accordingly.
在本实施方式中,计算出非感兴趣区域的码率降低系数后,对于所述更新后的非感兴趣区域中的任一目标编码基本单元,可以根据所述非感兴趣区域的码率降低系数确定所述目标编码基本单元的量化调整值,并将所述目标编码基本单元的原始量化参数和所述量化调整值的差值或者比值作为所述目标编码基本单元的的量化参数。具体地,上述过程可以按照以下公式来表示:In this embodiment, after the code rate reduction coefficient of the non-interest area is calculated, for any target coding basic unit in the updated non-interest area, the code rate of the non-interest area can be reduced The coefficient determines the quantization adjustment value of the target coding basic unit, and uses the difference or ratio between the original quantization parameter of the target coding basic unit and the quantization adjustment value as the quantization parameter of the target coding basic unit. Specifically, the above process can be expressed according to the following formula:
对于量化参数和量化步长是以2为底的指数关系的编码标准(如H.264和HEVC编码标准),可以按照以下公式来计算非感兴趣区域中各个编码基本单元的量化参数:For coding standards (such as H.264 and HEVC coding standards) where the quantization parameter and the quantization step are based on an exponential relationship of 2, the quantization parameter of each coding basic unit in the non-interest area can be calculated according to the following formula:
QP'
i=QP
i-6log
2D
QP' i =QP i -6log 2 D
而对于量化参数等于量化步长的编码标准,可以采用以下公式计算非感兴趣区域中各个编码基本单元的量化参数:For coding standards where the quantization parameter is equal to the quantization step size, the following formula can be used to calculate the quantization parameter of each basic coding unit in the non-interest area:
在本实施方式中,在按照上述方式重新计算出当前帧中感兴趣区域和非感兴趣区域内各个编码基本单元的量化参数后,便可以按照重新计算出的量化参数,对各个编码基本单元进行编码。由于按照上述方式调整后感兴趣区域内编码基本单元的量化步长变小,而非感兴趣区域内的编码基本单元的量化步长变大,因此能够使得对感兴趣区域进行更为精细的编码,获得更多的码率分配,从而更为清晰。In this embodiment, after recalculating the quantization parameters of each coding basic unit in the region of interest and non-interest region in the current frame in the above-mentioned manner, the quantization parameters of each coding basic unit can be performed according to the recalculated quantization parameters. coding. As the quantization step size of the coding basic unit in the region of interest becomes smaller after adjustment in the above manner, the quantization step size of the coding basic unit in the non-region of interest becomes larger, so that the region of interest can be encoded more finely. , Get more bit rate allocation, thus more clear.
请参阅图2,本申请还提供一种视频编码系统,待编码视频的视频帧中包括感兴趣区域和非感兴趣区域;所述系统包括:Please refer to FIG. 2. The present application also provides a video encoding system. The video frame of the video to be encoded includes a region of interest and a region of non-interest; the system includes:
当前图像集获取单元,用于根据所述待编码视频中的当前帧和所述待编码视频的编码顺序,在所述待编码视频中获取当前图像集,所述当前图像集中包括所述当前帧以及在编码顺序上位于所述当前帧之后的指定数量的视频帧;A current image set acquiring unit, configured to acquire a current image set in the video to be encoded according to the current frame in the video to be encoded and the encoding sequence of the video to be encoded, and the current image set includes the current frame And a specified number of video frames located after the current frame in the coding order;
反向更新单元,用于按照与所述编码顺序相反的逆顺序,依次对所述当前图像集中各个视频帧内的感兴趣区域进行反向更新;A reverse update unit, configured to reversely update the region of interest in each video frame in the current image set in a reverse order opposite to the encoding order;
量化编码单元,用于为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数,以根据计算得到的量化参数为所述当前帧中的编码基本单元进行编码。The quantization coding unit is used to calculate quantization parameters for the coding basic units in the updated region of interest and non-interest region in the current frame, respectively, to use the calculated quantization parameters as the coding basic unit in the current frame Encode.
在一个实施方式中,所述量化编码单元包括:In an embodiment, the quantization coding unit includes:
显著性值重置模块,用于为更新后的感兴趣区域重新设置显著性值;The saliency value reset module is used to reset the saliency value for the updated region of interest;
量化参数计算模块,用于确定所述当前帧中各个编码基本单元的缩放复杂度,并基于所述缩放复杂度和所述当前帧中重新设置的显著性值,为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数。The quantization parameter calculation module is used to determine the scaling complexity of each basic coding unit in the current frame, and based on the scaling complexity and the re-set saliency value in the current frame, it is the updated value in the current frame The coding basic unit in the region of interest and non-interest region respectively calculates the quantization parameter.
在一个实施方式中,所述反向更新单元包括:In an embodiment, the reverse update unit includes:
编码基本单元配置模块,用于将所述当前图像集中的各个视频帧按照编码基本单元进行划分,并为划分得到的各个编码基本单元确定最优预测模式;An encoding basic unit configuration module, configured to divide each video frame in the current image set according to an encoding basic unit, and determine an optimal prediction mode for each encoding basic unit obtained by the division;
感兴趣区域重置模块,用于针对所述当前图像集中的任一目标视频帧,遍历所述目标视频帧的感兴趣区域内的各个编码基本单元,并针对当前的编码基本单元中的任一分块进行分析,若所述分块采用的最优预测模式为帧间预测模式,在所述目标视频帧的参考帧中查找所述分块对应的参考块,若所述参考块在所述参考帧中不属于感兴趣区域,将所述参考块设置为感兴趣区域。The region of interest resetting module is used to traverse each basic coding unit in the region of interest of the target video frame for any target video frame in the current image set, and for any one of the current coding basic units Perform block analysis. If the optimal prediction mode adopted by the block is the inter prediction mode, search for the reference block corresponding to the block in the reference frame of the target video frame, and if the reference block is in the The reference frame does not belong to the region of interest, and the reference block is set as the region of interest.
在一个实施方式中,所述系统还包括:In one embodiment, the system further includes:
复杂度计算单元用于分别计算所述编码基本单元中各个分块的复杂度,其中,针对所述编码基本单元中的任一分块,按照所述最优预测模式确定所述分块的预测像素值,并根据所述分块的原始像素值和所述预测像素值计算绝对变换误差和,并将所述绝对变换误差和作为所述分块的复杂度。The complexity calculation unit is used to calculate the complexity of each block in the coding basic unit, wherein for any block in the coding basic unit, the prediction of the block is determined according to the optimal prediction mode And calculate the sum of absolute transformation errors according to the original pixel value of the block and the predicted pixel value, and use the sum of absolute transformation errors as the complexity of the block.
在一个实施方式中,所述量化编码单元包括:In an embodiment, the quantization coding unit includes:
码率调整系数计算模块,用于根据所述当前帧中更新后的感兴趣区域中各个编码基本单元的代表显著性值,分别计算所述更新后的感兴趣区域中各个编码基本单元的码率调整系数;The code rate adjustment coefficient calculation module is used to calculate the code rate of each coding basic unit in the updated region of interest according to the representative saliency value of each coding basic unit in the updated region of interest in the current frame Adjustment coefficient;
码率调整完成度计算模块,用于确定非感兴趣区域的保护系数,并基于所述保护系数、所述当前帧中各个编码基本单元的缩放复杂度以及所述更新后的感兴趣区域中各个编码基本单元的码率调整系数,计算所述当前帧的码率调整完成度;其中,所述保护系数用于表征码率从非感兴趣区域转移至感兴趣区域的程度;The code rate adjustment completion degree calculation module is used to determine the protection coefficient of the non-interest area, and is based on the protection coefficient, the scaling complexity of each coding basic unit in the current frame, and each of the updated areas of interest Encoding the code rate adjustment coefficient of the basic unit of encoding, and calculating the completion degree of the code rate adjustment of the current frame; wherein the protection coefficient is used to characterize the degree to which the code rate is transferred from the non-interest area to the interest area;
感兴趣区域计算模块,用于根据所述码率调整完成度、所述更新后的感兴趣区域中各个编码基本单元的码率调整系数以及所述更新后的感兴趣区域中各个编码基本单元的原始量化参数,计算所述当前帧中更新后的感兴趣区域中各个编码基本单元的量化参数。The region of interest calculation module is configured to adjust the code rate according to the degree of completion of the code rate adjustment, the code rate adjustment coefficient of each basic unit of coding in the updated region of interest, and the value of each basic unit of coding in the updated region of interest. The original quantization parameter calculates the quantization parameter of each coding basic unit in the updated region of interest in the current frame.
在一个实施方式中,所述码率调整完成度计算模块包括:In an embodiment, the code rate adjustment completion degree calculation module includes:
第一乘积计算模块,用于计算所述当前帧中更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和,并计算所述更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和与所述保护系数的第一乘积;The first product calculation module is used to calculate the sum of the scaling complexity of each coding basic unit in the updated non-interest area in the current frame, and calculate the sum of the coding basic units in the updated non-interest area The first product of the sum of the scaling complexity and the protection coefficient;
第二乘积之和计算模块,用于计算所述更新后的感兴趣区域中各个编码基本单元的缩放复杂度与各自的码率调整系数的第二乘积,并计算所述更新后的感兴趣区域中各个编码基本单元的第二乘积之和;The second product sum calculation module is used to calculate the second product of the scaling complexity of each coding basic unit in the updated region of interest and the respective code rate adjustment coefficient, and calculate the updated region of interest The sum of the second products of each basic coding unit in;
比值计算模块,用于计算所述当前帧中各个编码基本单元的缩放复杂度之和与所述第一乘积的差值,并计算所述差值与所述第二乘积之和的比值,并将所述比值作为所述当前帧的码率调整完成度。The ratio calculation module is used to calculate the difference between the sum of the scaling complexity of each coding basic unit in the current frame and the first product, and calculate the ratio of the difference to the sum of the second product, and The ratio is used as the rate adjustment completion degree of the current frame.
请参阅图3,本申请一个实施方式还提供一种视频编码设备,所述设备包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,可以实现上述的视频编码方法。3, an embodiment of the present application also provides a video encoding device, the device includes a processor and a memory, the memory is used to store a computer program, when the computer program is executed by the processor, can realize The above-mentioned video coding method.
在本实施方式中,所述存储器可以包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方法的媒体加以存储。本实施方式所述的存储器又可以包括:利用电能方式存储信息的装置,如RAM或ROM等;利用磁能方式存储信息的装置,如硬盘、软盘、磁带、磁芯存储器、磁泡存储器或U盘;利用光学方式存储信息的装置,如CD或DVD。当然,还有其他方式的存储器,例如量子存储器或石墨烯存储器等等。In this embodiment, the memory may include a physical device for storing information, which is usually digitized and then stored in a medium using electrical, magnetic, or optical methods. The memory described in this embodiment may also include: a device that uses electrical energy to store information, such as RAM or ROM, etc.; a device that uses magnetic energy to store information, such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, or U disk ; A device that uses optical means to store information, such as CD or DVD. Of course, there are other types of memory, such as quantum memory or graphene memory.
在本实施方式中,所述处理器可以按任何适当的方式实现。例如,所述处理器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式等等。In this embodiment, the processor can be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or a processor, and a computer-readable medium storing computer-readable program codes (for example, software or firmware) executable by the (micro)processor, logic gates, switches, dedicated integrated circuits, etc. Circuit (Application Specific Integrated Circuit, ASIC), programmable logic controller and embedded microcontroller form, etc.
由上可见,本申请一个或者多个实施方式提供的技术方案,在对当前帧进行编码时,可以结合在编码顺序上位于当前帧之后的多个视频帧一起分析。具体地,可以按照与编码顺序相反的顺序,从最后一个视频帧开始,依次向前反向更新各个视频帧内的感兴趣区域,并可以为更新后的感兴趣区域重新设置显著性值。这样,对于时间上相邻的视频帧,如果相同位置处出现感兴趣区域突变的情况,能够通过反向更新的方式减缓或者消除这种感兴趣区域突变的情况, 最终使得相邻帧的感兴趣区域在编码后从视觉上也不会出现太大的突变。在反向更新感兴趣区域之后,可以从编码基本单元的角度,为当前帧中各个编码基本单元计算量化参数。其中,由于各个编码基本单元的缩放复杂度和显著性值不同,并且感兴趣区域和非感兴趣区域的量化参数的计算方式也不同,因此当前帧中各个编码基本单元的量化参数也可能各不相同。后续在对当前帧进行编码时,可以针对不同的编码基本单元分配不同的码率,从而更加精细化地在一个视频帧内进行码率分配,使得视频编码的精确度更高。It can be seen from the above that the technical solutions provided by one or more implementation manners of the present application can be combined and analyzed together with multiple video frames located after the current frame in the encoding sequence when the current frame is encoded. Specifically, starting from the last video frame, the regions of interest in each video frame can be updated in the reverse order from the encoding sequence, and the saliency value can be reset for the updated region of interest. In this way, for temporally adjacent video frames, if there is a sudden change in the region of interest at the same position, the reverse update can be used to slow down or eliminate this sudden change in the region of interest, and finally make the adjacent frames interesting After coding, the region will not appear too much abruptly. After the region of interest is updated in the reverse direction, the quantization parameter can be calculated for each basic coding unit in the current frame from the perspective of the basic coding unit. Among them, since the scaling complexity and saliency value of each basic coding unit are different, and the calculation methods of the quantization parameters of the region of interest and the non-interest region are also different, the quantization parameters of each basic coding unit in the current frame may also be different. the same. When the current frame is subsequently encoded, different code rates can be assigned to different coding basic units, so that the code rate is allocated in a video frame more refined, so that the accuracy of video encoding is higher.
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。尤其,针对系统和设备的实施方式来说,均可以参照前述方法的实施方式的介绍对照解释。The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the implementation of the system and the device, both can be explained with reference to the introduction of the implementation of the foregoing method.
本领域内的技术人员应明白,本发明的实施方式可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施方式、完全软件实施方式、或结合软件和硬件方面的实施方式的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt a form of a complete hardware implementation, a complete software implementation, or a combination of software and hardware implementations. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本发明是参照根据本发明实施方式的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个 流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory in a computer readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or equipment including a series of elements includes not only those elements, but also Other elements that are not explicitly listed, or they also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.
以上所述仅为本申请的实施方式而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only the implementation manners of this application, and are not intended to limit this application. For those skilled in the art, this application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of the claims of this application.
Claims (20)
- 一种视频编码方法,其特征在于,待编码视频的视频帧中包括感兴趣区域和非感兴趣区域;所述方法包括:A video encoding method, characterized in that the video frame of the video to be encoded includes a region of interest and a region of non-interest; the method includes:根据所述待编码视频中的当前帧和所述待编码视频的编码顺序,在所述待编码视频中获取当前图像集,所述当前图像集中包括所述当前帧以及在编码顺序上位于所述当前帧之后的指定数量的视频帧;According to the current frame in the video to be encoded and the encoding order of the video to be encoded, a current image set is acquired in the video to be encoded, and the current image set includes the current frame and is located in the encoding order. The specified number of video frames after the current frame;按照与所述编码顺序相反的逆顺序,依次对所述当前图像集中各个视频帧内的感兴趣区域进行反向更新;In a reverse order that is opposite to the encoding order, sequentially update the regions of interest in each video frame in the current image set in reverse order;为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数,以根据计算得到的量化参数为所述当前帧中的各个编码基本单元进行编码。Calculating quantization parameters for the updated coding basic units in the region of interest and non-interesting regions in the current frame respectively, so as to perform coding for each coding basic unit in the current frame according to the calculated quantization parameters.
- 根据权利要求1所述的方法,其特征在于,为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数包括:The method according to claim 1, wherein calculating quantization parameters for the updated coding basic units in the region of interest and the non-interest region in the current frame respectively comprises:为更新后的感兴趣区域重新设置显著性值;Reset the significance value for the updated region of interest;确定所述当前帧中各个编码基本单元的缩放复杂度,并基于所述缩放复杂度和所述当前帧中重新设置的显著性值,为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数。Determine the scaling complexity of each coding basic unit in the current frame, and based on the scaling complexity and the saliency value reset in the current frame, determine the updated region of interest and non-sensitivity in the current frame The coding basic units in the region of interest calculate the quantization parameters respectively.
- 根据权利要求2所述的方法,其特征在于,依次对所述当前图像集中各个视频帧内的感兴趣区域进行反向更新包括:The method according to claim 2, wherein, sequentially updating the region of interest in each video frame in the current image set comprises:将所述当前图像集中的各个视频帧按照编码基本单元进行划分,并为划分得到的各个编码基本单元确定最优预测模式;Dividing each video frame in the current image set according to basic coding units, and determining an optimal prediction mode for each basic coding unit obtained by the division;针对所述当前图像集中的任一目标视频帧,遍历所述目标视频帧的感兴趣区域内的各个编码基本单元,并针对当前的编码基本单元中的任一分块进行分析,若所述分块采用的最优预测模式为帧间预测模式,在所述目标视频帧的参考帧中查找所述分块对应的参考块,若所述参考块在所述参考帧中不属于感兴趣区域,将所述参考块设置为感兴趣区域。For any target video frame in the current image set, traverse each coding basic unit in the region of interest of the target video frame, and analyze any block in the current coding basic unit. The optimal prediction mode adopted by the block is the inter-frame prediction mode. The reference block corresponding to the block is searched in the reference frame of the target video frame, and if the reference block does not belong to the region of interest in the reference frame, Set the reference block as the region of interest.
- 根据权利要求3所述的方法,其特征在于,在为划分得到的各个编码基本单元确定最优预测模式时,所述方法还包括:The method according to claim 3, wherein when determining the optimal prediction mode for each of the divided coding basic units, the method further comprises:分别计算所述编码基本单元中各个分块的复杂度,其中,针对所述编码基本单元中的任一分块,按照所述最优预测模式确定所述分块的预测像素值,并根据所述分块的原始像素值和所述预测像素值计算绝对变换误差和,并将所述绝对变换误差和作为所述分块的复杂度。The complexity of each block in the basic coding unit is calculated separately, wherein for any block in the basic coding unit, the predicted pixel value of the block is determined according to the optimal prediction mode, and the predicted pixel value of the block is determined according to the The original pixel value of the block and the predicted pixel value calculate an absolute transformation error sum, and use the absolute transformation error sum as the complexity of the block.
- 根据权利要求4所述的方法,其特征在于,为更新后的感兴趣区域重新设置显著性值包括:The method according to claim 4, wherein resetting the saliency value for the updated region of interest comprises:针对所述目标视频帧中参与反向更新感兴趣区域的目标分块,根据所述目标分块的复杂度确定传递系数,并将所述传递系数与所述目标分块中像素点的显著性值的乘积,作为待传递的显著性值;For the target block participating in the reverse update of the region of interest in the target video frame, the transfer coefficient is determined according to the complexity of the target block, and the transfer coefficient is compared with the saliency of the pixel in the target block The product of the values is used as the significance value to be passed;在所述参考帧中确定所述目标分块的参考块,并利用所述待传递的显著性值替换所述目标分块的参考块中对应像素点的显著性值。The reference block of the target block is determined in the reference frame, and the saliency value of the corresponding pixel in the reference block of the target block is replaced with the saliency value to be transferred.
- 根据权利要求2所述的方法,其特征在于,在为更新后的感兴趣区域重新设置显著性值之后,所述方法还包括:The method according to claim 2, wherein after resetting the saliency value for the updated region of interest, the method further comprises:在所述当前帧中以编码基本单元为单位,调整所述当前帧中的感兴趣区域,并为调整后的感兴趣区域中的各个编码基本单元设置代表显著性值;Adjusting the region of interest in the current frame in the current frame with a coding basic unit as a unit, and setting a representative saliency value for each coding basic unit in the adjusted region of interest;其中,对于所述当前帧中的任一编码基本单元,若所述编码基本单元中包含属于感兴趣区域的分块,将所述编码基本单元设置为感兴趣区域;Wherein, for any basic coding unit in the current frame, if the basic coding unit contains a block belonging to a region of interest, the basic coding unit is set as the region of interest;或者or对于所述当前帧中的任一编码基本单元,若所述编码基本单元中的各个分块均属于感兴趣区域,将所述编码基本单元设置为感兴趣区域。For any basic coding unit in the current frame, if each block in the basic coding unit belongs to the region of interest, the basic coding unit is set as the region of interest.
- 根据权利要求2或6所述的方法,其特征在于,为所述当前帧中更新后的感兴趣区域中的编码基本单元计算量化参数包括:The method according to claim 2 or 6, wherein calculating a quantization parameter for the coding basic unit in the updated region of interest in the current frame comprises:根据所述当前帧中更新后的感兴趣区域中各个编码基本单元的代表显著性值,分别计算所述更新后的感兴趣区域中各个编码基本单元的码率调整系数;Respectively calculating the code rate adjustment coefficient of each coding basic unit in the updated region of interest according to the representative saliency value of each coding basic unit in the updated region of interest in the current frame;确定非感兴趣区域的保护系数,并基于所述保护系数、所述当前帧中各个 编码基本单元的缩放复杂度以及所述更新后的感兴趣区域中各个编码基本单元的码率调整系数,计算所述当前帧的码率调整完成度;其中,所述保护系数用于表征码率从非感兴趣区域转移至感兴趣区域的程度;Determine the protection coefficient of the non-interest area, and calculate based on the protection coefficient, the scaling complexity of each basic coding unit in the current frame, and the code rate adjustment coefficient of each basic coding unit in the updated area of interest The completion degree of bit rate adjustment of the current frame; wherein, the protection coefficient is used to characterize the degree to which the bit rate is transferred from the non-interest area to the interest area;根据所述码率调整完成度、所述更新后的感兴趣区域中各个编码基本单元的码率调整系数以及所述更新后的感兴趣区域中各个编码基本单元的原始量化参数,计算所述当前帧中更新后的感兴趣区域中各个编码基本单元的量化参数。According to the completion degree of code rate adjustment, the code rate adjustment coefficient of each basic coding unit in the updated region of interest, and the original quantization parameter of each basic coding unit in the updated region of interest, the current The quantization parameter of each basic coding unit in the updated region of interest in the frame.
- 根据权利要求7所述的方法,其特征在于,计算所述当前帧的码率调整完成度包括:The method according to claim 7, wherein calculating the rate adjustment completion degree of the current frame comprises:计算所述当前帧中更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和,并计算所述更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和与所述保护系数的第一乘积;Calculate the sum of the scaling complexity of each coding basic unit in the updated non-interest area in the current frame, and calculate the sum of the scaling complexity of each coding basic unit in the updated non-interest area and the The first product of the protection coefficient;计算所述更新后的感兴趣区域中各个编码基本单元的缩放复杂度与各自的码率调整系数的第二乘积,并计算所述更新后的感兴趣区域中各个编码基本单元的第二乘积之和;Calculate the second product of the scaling complexity of each coding basic unit in the updated region of interest and the respective code rate adjustment coefficient, and calculate the second product of each coding basic unit in the updated region of interest with;计算所述当前帧中各个编码基本单元的缩放复杂度之和与所述第一乘积的差值,并计算所述差值与所述第二乘积之和的比值,并将所述比值作为所述当前帧的码率调整完成度。Calculate the difference between the sum of the scaling complexity of each coding basic unit in the current frame and the first product, and calculate the ratio of the difference to the sum of the second product, and use the ratio as the Describes the completion degree of bit rate adjustment of the current frame.
- 根据权利要求7所述的方法,其特征在于,计算所述当前帧中更新后的感兴趣区域中各个编码基本单元的量化参数包括:The method according to claim 7, wherein calculating the quantization parameter of each coding basic unit in the updated region of interest in the current frame comprises:对于所述更新后的感兴趣区域中的任一目标编码基本单元,若所述当前帧的码率调整完成度小于指定阈值,根据所述码率调整完成度和所述目标编码基本单元的码率调整系数的乘积确定所述目标编码基本单元的量化调整值,并将所述目标编码基本单元的原始量化参数和所述量化调整值的差值或者比值作为所述目标编码基本单元的的量化参数;For any target coding basic unit in the updated region of interest, if the rate adjustment completion degree of the current frame is less than a specified threshold, the rate adjustment completion degree and the code of the target coding basic unit The product of the rate adjustment coefficient determines the quantization adjustment value of the target coding basic unit, and the difference or ratio between the original quantization parameter of the target coding basic unit and the quantization adjustment value is used as the quantization of the target coding basic unit parameter;若所述当前帧的码率调整完成度大于或者等于所述指定阈值,根据所述目标编码基本单元的码率调整系数确定所述目标编码基本单元的量化调整值,并将所述目标编码基本单元的原始量化参数和所述量化调整值的差值或者比值作为所述目标编码基本单元的的量化参数。If the rate adjustment completion degree of the current frame is greater than or equal to the specified threshold, the quantization adjustment value of the target coding basic unit is determined according to the rate adjustment coefficient of the target coding basic unit, and the target coding basic unit The difference or ratio between the original quantization parameter of the unit and the quantization adjustment value is used as the quantization parameter of the target coding basic unit.
- 根据权利要求7所述的方法,其特征在于,为所述当前帧中更新后的非感兴趣区域中的编码基本单元分别计算量化参数包括:The method according to claim 7, wherein calculating quantization parameters for the updated coding basic units in the non-interest region in the current frame respectively comprises:根据所述当前帧的码率调整完成度、所述当前帧中各个编码基本单元的缩放复杂度以及所述更新后的感兴趣区域中各个编码基本单元的码率调整系数,计算所述更新后的非感兴趣区域的码率降低系数;According to the code rate adjustment completion degree of the current frame, the scaling complexity of each coding basic unit in the current frame, and the code rate adjustment coefficient of each coding basic unit in the updated region of interest, calculate the updated The code rate reduction coefficient of the non-interest area;根据所述非感兴趣区域的码率降低系数和所述非感兴趣区域中各个编码基本单元的原始量化参数,计算所述非感兴趣区域中各个编码基本单元的量化参数。Calculate the quantization parameter of each coding basic unit in the non-interest area according to the code rate reduction coefficient of the non-interest area and the original quantization parameter of each coding basic unit in the non-interest area.
- 根据权利要求10所述的方法,其特征在于,计算所述更新后的非感兴趣区域的码率降低系数包括:The method according to claim 10, wherein calculating the code rate reduction coefficient of the updated non-interest region comprises:若所述当前帧的码率调整完成度小于指定阈值,将所述保护系数作为所述更新后的非感兴趣区域的码率降低系数;If the code rate adjustment completion degree of the current frame is less than a specified threshold, use the protection coefficient as the code rate reduction coefficient of the updated non-interest region;若所述当前帧的码率调整完成度大于或者等于所述指定阈值,计算所述当前帧中更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和,并计算所述更新后的感兴趣区域中各个编码基本单元的缩放复杂度与各自的码率调整系数的乘积,以及计算各个所述乘积之和;计算所述当前帧中各个编码基本单元的缩放复杂度之和与所述乘积之和的差值,并将所述差值与所述缩放复杂度之和的比值作为所述更新后的非感兴趣区域的码率降低系数。If the rate adjustment completion degree of the current frame is greater than or equal to the specified threshold, calculate the sum of the scaling complexity of each coding basic unit in the updated non-interest area in the current frame, and calculate the updated The product of the scaling complexity of each coding basic unit in the region of interest and the respective code rate adjustment coefficient, and calculating the sum of each of the products; calculating the sum of the scaling complexity of each coding basic unit in the current frame and the total The difference value of the sum of the products, and the ratio of the difference value and the sum of the scaling complexity as the code rate reduction coefficient of the updated non-interest area.
- 根据权利要求10所述的方法,其特征在于,计算所述非感兴趣区域中各个编码基本单元的量化参数包括:The method according to claim 10, wherein calculating the quantization parameter of each coding basic unit in the non-interest area comprises:对于所述更新后的非感兴趣区域中的任一目标编码基本单元,根据所述非感兴趣区域的码率降低系数确定所述目标编码基本单元的量化调整值,并将所述目标编码基本单元的原始量化参数和所述量化调整值的差值或者比值作为所述目标编码基本单元的的量化参数。For any target coding basic unit in the updated non-interest region, the quantization adjustment value of the target coding basic unit is determined according to the code rate reduction coefficient of the non-interest region, and the target coding basic unit The difference or ratio between the original quantization parameter of the unit and the quantization adjustment value is used as the quantization parameter of the target coding basic unit.
- 根据权利要求2所述的方法,其特征在于,确定所述当前帧中各个编码基本单元的缩放复杂度包括:The method according to claim 2, wherein determining the scaling complexity of each coding basic unit in the current frame comprises:根据所述当前帧中各个编码基本单元的原始量化参数,计算所述当前帧的平均量化参数;Calculating the average quantization parameter of the current frame according to the original quantization parameter of each basic coding unit in the current frame;针对所述当前帧中的任一编码基本单元,根据所述当前帧的平均量化参数、所述编码基本单元中各个分块的复杂度和所述编码基本单元的原始量化参数,计算所述编码基本单元的缩放复杂度。For any basic coding unit in the current frame, the coding is calculated according to the average quantization parameter of the current frame, the complexity of each block in the coding basic unit, and the original quantization parameter of the coding basic unit The scaling complexity of the basic unit.
- 一种视频编码系统,其特征在于,待编码视频的视频帧中包括感兴趣区域和非感兴趣区域;所述系统包括:A video encoding system, characterized in that the video frame of the video to be encoded includes a region of interest and a region of non-interest; the system includes:当前图像集获取单元,用于根据所述待编码视频中的当前帧和所述待编码视频的编码顺序,在所述待编码视频中获取当前图像集,所述当前图像集中包括所述当前帧以及在编码顺序上位于所述当前帧之后的指定数量的视频帧;A current image set acquiring unit, configured to acquire a current image set in the video to be encoded according to the current frame in the video to be encoded and the encoding sequence of the video to be encoded, and the current image set includes the current frame And a specified number of video frames located after the current frame in the coding order;反向更新单元,用于按照与所述编码顺序相反的逆顺序,依次对所述当前图像集中各个视频帧内的感兴趣区域进行反向更新;A reverse update unit, configured to reversely update the region of interest in each video frame in the current image set in a reverse order opposite to the encoding order;量化编码单元,用于为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数,以根据计算得到的量化参数为所述当前帧中的编码基本单元进行编码。The quantization coding unit is used to calculate quantization parameters for the coding basic units in the updated region of interest and non-interest region in the current frame, respectively, to use the calculated quantization parameters as the coding basic unit in the current frame Encode.
- 根据权利要求14所述的系统,其特征在于,所述量化编码单元包括:The system according to claim 14, wherein the quantization coding unit comprises:显著性值重置模块,用于为更新后的感兴趣区域重新设置显著性值;The saliency value reset module is used to reset the saliency value for the updated region of interest;量化参数计算模块,用于确定所述当前帧中各个编码基本单元的缩放复杂度,并基于所述缩放复杂度和所述当前帧中重新设置的显著性值,为所述当前帧中更新后的感兴趣区域和非感兴趣区域中的编码基本单元分别计算量化参数。The quantization parameter calculation module is used to determine the scaling complexity of each basic coding unit in the current frame, and based on the scaling complexity and the re-set saliency value in the current frame, it is the updated value in the current frame The coding basic unit in the region of interest and non-interest region respectively calculates the quantization parameter.
- 根据权利要求15所述的系统,其特征在于,所述反向更新单元包括:The system according to claim 15, wherein the reverse update unit comprises:编码基本单元配置模块,用于将所述当前图像集中的各个视频帧按照编码基本单元进行划分,并为划分得到的各个编码基本单元确定最优预测模式;An encoding basic unit configuration module, configured to divide each video frame in the current image set according to an encoding basic unit, and determine an optimal prediction mode for each encoding basic unit obtained by the division;感兴趣区域重置模块,用于针对所述当前图像集中的任一目标视频帧,遍历所述目标视频帧的感兴趣区域内的各个编码基本单元,并针对当前的编码基本单元中的任一分块进行分析,若所述分块采用的最优预测模式为帧间预测模 式,在所述目标视频帧的参考帧中查找所述分块对应的参考块,若所述参考块在所述参考帧中不属于感兴趣区域,将所述参考块设置为感兴趣区域。The region of interest resetting module is used to traverse each basic coding unit in the region of interest of the target video frame for any target video frame in the current image set, and for any one of the current coding basic units Perform block analysis. If the optimal prediction mode adopted by the block is the inter prediction mode, search for the reference block corresponding to the block in the reference frame of the target video frame, and if the reference block is in the The reference frame does not belong to the region of interest, and the reference block is set as the region of interest.
- 根据权利要求16所述的系统,其特征在于,所述系统还包括:The system according to claim 16, wherein the system further comprises:复杂度计算单元用于分别计算所述编码基本单元中各个分块的复杂度,其中,针对所述编码基本单元中的任一分块,按照所述最优预测模式确定所述分块的预测像素值,并根据所述分块的原始像素值和所述预测像素值计算绝对变换误差和,并将所述绝对变换误差和作为所述分块的复杂度。The complexity calculation unit is used to calculate the complexity of each block in the coding basic unit, wherein for any block in the coding basic unit, the prediction of the block is determined according to the optimal prediction mode And calculate the sum of absolute transformation errors according to the original pixel value of the block and the predicted pixel value, and use the sum of absolute transformation errors as the complexity of the block.
- 根据权利要求15所述的系统,其特征在于,所述量化编码单元包括:The system according to claim 15, wherein the quantization coding unit comprises:码率调整系数计算模块,用于根据所述当前帧中更新后的感兴趣区域中各个编码基本单元的代表显著性值,分别计算所述更新后的感兴趣区域中各个编码基本单元的码率调整系数;The code rate adjustment coefficient calculation module is used to calculate the code rate of each coding basic unit in the updated region of interest according to the representative saliency value of each coding basic unit in the updated region of interest in the current frame Adjustment coefficient;码率调整完成度计算模块,用于确定非感兴趣区域的保护系数,并基于所述保护系数、所述当前帧中各个编码基本单元的缩放复杂度以及所述更新后的感兴趣区域中各个编码基本单元的码率调整系数,计算所述当前帧的码率调整完成度;其中,所述保护系数用于表征码率从非感兴趣区域转移至感兴趣区域的程度;The code rate adjustment completion degree calculation module is used to determine the protection coefficient of the non-interest area, and is based on the protection coefficient, the scaling complexity of each coding basic unit in the current frame, and each of the updated areas of interest Encoding the code rate adjustment coefficient of the basic unit of encoding, and calculating the completion degree of the code rate adjustment of the current frame; wherein the protection coefficient is used to characterize the degree to which the code rate is transferred from the non-interest area to the interest area;感兴趣区域计算模块,用于根据所述码率调整完成度、所述更新后的感兴趣区域中各个编码基本单元的码率调整系数以及所述更新后的感兴趣区域中各个编码基本单元的原始量化参数,计算所述当前帧中更新后的感兴趣区域中各个编码基本单元的量化参数。The region of interest calculation module is configured to adjust the code rate according to the degree of completion of the code rate adjustment, the code rate adjustment coefficient of each basic unit of coding in the updated region of interest, and the value of each basic unit of coding in the updated region of interest. The original quantization parameter calculates the quantization parameter of each coding basic unit in the updated region of interest in the current frame.
- 根据权利要求18所述的系统,其特征在于,所述码率调整完成度计算模块包括:The system according to claim 18, wherein the code rate adjustment completion degree calculation module comprises:第一乘积计算模块,用于计算所述当前帧中更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和,并计算所述更新后的非感兴趣区域中各个编码基本单元的缩放复杂度之和与所述保护系数的第一乘积;The first product calculation module is used to calculate the sum of the scaling complexity of each coding basic unit in the updated non-interest area in the current frame, and calculate the sum of the coding basic units in the updated non-interest area The first product of the sum of the scaling complexity and the protection coefficient;第二乘积之和计算模块,用于计算所述更新后的感兴趣区域中各个编码基本单元的缩放复杂度与各自的码率调整系数的第二乘积,并计算所述更新后的 感兴趣区域中各个编码基本单元的第二乘积之和;The second product sum calculation module is used to calculate the second product of the scaling complexity of each coding basic unit in the updated region of interest and the respective code rate adjustment coefficient, and calculate the updated region of interest The sum of the second products of each basic coding unit in;比值计算模块,用于计算所述当前帧中各个编码基本单元的缩放复杂度之和与所述第一乘积的差值,并计算所述差值与所述第二乘积之和的比值,并将所述比值作为所述当前帧的码率调整完成度。The ratio calculation module is used to calculate the difference between the sum of the scaling complexity of each coding basic unit in the current frame and the first product, and calculate the ratio of the difference to the sum of the second product, and The ratio is used as the rate adjustment completion degree of the current frame.
- 一种视频编码设备,其特征在于,所述设备包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至13中任一所述的方法。A video encoding device, characterized in that the device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, it can implement any one of claims 1 to 13 The method described.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911122051.0A CN110996099B (en) | 2019-11-15 | 2019-11-15 | Video coding method, system and equipment |
CN201911122051.0 | 2019-11-15 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021093060A1 true WO2021093060A1 (en) | 2021-05-20 |
Family
ID=70084489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/123710 WO2021093060A1 (en) | 2019-11-15 | 2019-12-06 | Video encoding method, system, and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110996099B (en) |
WO (1) | WO2021093060A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111479113B (en) * | 2020-04-15 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Code rate control method and device, storage medium and electronic equipment |
CN112788336B (en) * | 2020-12-30 | 2023-04-14 | 北京大数据研究院 | Data element sequencing reduction method, system, terminal and marking method |
CN112788344B (en) * | 2020-12-30 | 2023-03-21 | 北京大数据研究院 | Video decoding method, device, system, medium and terminal based on coding unit recombination |
CN112804562B (en) * | 2020-12-30 | 2022-01-07 | 北京大学 | Video coding method, device, terminal and medium based on slice recombination |
CN112822488B (en) * | 2020-12-30 | 2023-04-07 | 北京大学 | Video encoding and decoding system, method, device, terminal and medium based on block recombination |
CN114339218A (en) * | 2022-01-04 | 2022-04-12 | 维沃移动通信有限公司 | Image encoding method, image encoding device, electronic apparatus, and readable storage medium |
CN115314722B (en) * | 2022-06-17 | 2023-12-08 | 百果园技术(新加坡)有限公司 | Video code rate distribution method, system, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107770525A (en) * | 2016-08-15 | 2018-03-06 | 华为技术有限公司 | A kind of method and device of Image Coding |
US20190069033A1 (en) * | 2017-08-29 | 2019-02-28 | Samsung Electronics Co., Ltd. | Video encoding apparatus and video encoding system |
CN109429065A (en) * | 2017-09-05 | 2019-03-05 | 联咏科技股份有限公司 | Video coding apparatus and method for video coding |
CN109429063A (en) * | 2017-08-29 | 2019-03-05 | 三星电子株式会社 | Video coding apparatus |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8150155B2 (en) * | 2006-02-07 | 2012-04-03 | Qualcomm Incorporated | Multi-mode region-of-interest video object segmentation |
CN102682454B (en) * | 2012-04-28 | 2013-05-08 | 中国科学技术大学 | Method and device for tracking region of interest in video |
GB201301445D0 (en) * | 2013-01-28 | 2013-03-13 | Microsoft Corp | Adapting robustness in video coding |
CN104539962B (en) * | 2015-01-20 | 2017-12-01 | 北京工业大学 | It is a kind of merge visually-perceptible feature can scalable video coding method |
JP6794737B2 (en) * | 2015-12-01 | 2020-12-02 | 株式会社リコー | Information processing equipment, information processing methods, programs and inspection systems |
US20180068451A1 (en) * | 2016-09-08 | 2018-03-08 | Qualcomm Incorporated | Systems and methods for creating a cinemagraph |
KR102498597B1 (en) * | 2017-08-22 | 2023-02-14 | 삼성전자 주식회사 | Electronic device and method for identifying object based on setting region-of-interest by using the same |
-
2019
- 2019-11-15 CN CN201911122051.0A patent/CN110996099B/en active Active
- 2019-12-06 WO PCT/CN2019/123710 patent/WO2021093060A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107770525A (en) * | 2016-08-15 | 2018-03-06 | 华为技术有限公司 | A kind of method and device of Image Coding |
US20190069033A1 (en) * | 2017-08-29 | 2019-02-28 | Samsung Electronics Co., Ltd. | Video encoding apparatus and video encoding system |
CN109429063A (en) * | 2017-08-29 | 2019-03-05 | 三星电子株式会社 | Video coding apparatus |
CN109429065A (en) * | 2017-09-05 | 2019-03-05 | 联咏科技股份有限公司 | Video coding apparatus and method for video coding |
Also Published As
Publication number | Publication date |
---|---|
CN110996099B (en) | 2021-05-25 |
CN110996099A (en) | 2020-04-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021093060A1 (en) | Video encoding method, system, and apparatus | |
US11070803B2 (en) | Method and apparatus for determining coding cost of coding unit and computer-readable storage medium | |
CN110876060B (en) | Code rate adjusting method and device in coding process | |
WO2018192235A1 (en) | Coding unit depth determination method and device | |
US20240267553A1 (en) | Filtering method for removing blocking artifact and apparatus | |
WO2019072248A1 (en) | Motion estimation method and device, electronic apparatus and computer readable storage medium | |
CN109688407B (en) | Reference block selection method and device for coding unit, electronic equipment and storage medium | |
CN110769254B (en) | Code rate configuration method, system and equipment for video frame | |
WO2016054975A1 (en) | Method for partitioning prediction block, encoding device and decoding device | |
US11330254B2 (en) | Video encoding method and apparatus, video decoding method and apparatus, computer device, and storage medium | |
US11190766B2 (en) | Method and apparatus for determining division of coding unit, computing device, and readable storage medium | |
US10034016B2 (en) | Coding apparatus, computer system, coding method, and computer product | |
WO2020248715A1 (en) | Coding management method and apparatus based on high efficiency video coding | |
US10666970B2 (en) | Encoding apparatus, encoding method, and storage medium | |
CN110944211B (en) | Interpolation filtering method, device, medium and electronic device for intra-frame prediction | |
WO2021093059A1 (en) | Method, system and device for recognizing region of interest | |
WO2018205781A1 (en) | Method for use in achieving motion estimation and electronic device | |
CN105706447B (en) | Moving picture encoding equipment, animated image decoding device, moving picture encoding method and animated image coding/decoding method | |
CN113691814A (en) | Video encoding method, video encoding device, electronic device, and storage medium | |
WO2018205780A1 (en) | Motion estimation method and electronic device | |
WO2020258052A1 (en) | Image component prediction method and device, and computer storage medium | |
WO2020042268A1 (en) | Method and device for determining video frame complexity measure | |
WO2024222387A1 (en) | Coding method, decoding method, and apparatus | |
US11076167B2 (en) | Device and method for coding video data | |
CN116074507A (en) | Intra-frame prediction mode determination method, device, chip and program product |
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: 19952531 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19952531 Country of ref document: EP Kind code of ref document: A1 |