WO2020019279A1 - Video compression method and apparatus, computer system, and mobile device - Google Patents

Video compression method and apparatus, computer system, and mobile device Download PDF

Info

Publication number
WO2020019279A1
WO2020019279A1 PCT/CN2018/097343 CN2018097343W WO2020019279A1 WO 2020019279 A1 WO2020019279 A1 WO 2020019279A1 CN 2018097343 W CN2018097343 W CN 2018097343W WO 2020019279 A1 WO2020019279 A1 WO 2020019279A1
Authority
WO
WIPO (PCT)
Prior art keywords
quantization
video
specific
content analysis
quantization matrix
Prior art date
Application number
PCT/CN2018/097343
Other languages
French (fr)
Chinese (zh)
Inventor
朱磊
高修峰
林茂疆
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201880038972.6A priority Critical patent/CN110771167A/en
Priority to PCT/CN2018/097343 priority patent/WO2020019279A1/en
Publication of WO2020019279A1 publication Critical patent/WO2020019279A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation

Definitions

  • the present application relates to the field of video processing, and more particularly, to a method, an apparatus, a computer system, and a mobile device for video compression.
  • Video content analysis is the use of visual algorithms to analyze the saved video in order to use the video content analysis results for corresponding applications.
  • the video content analysis of the video stored in the black box of the flight system can be used to analyze the cause of the accident.
  • the embodiments of the present application provide a method, a device, a computer system, and a mobile device for video compression, which can improve the efficiency of video compression.
  • a video compression method including: obtaining a first quantization matrix, wherein the quantization parameter of a high frequency component in the first quantization matrix is smaller than the quantization parameter of a low frequency component, and the quantization parameter of the high frequency component The corresponding frequency is higher than the frequency corresponding to the quantization parameter of the low-frequency component; the first video is compressed according to the first quantization matrix.
  • an apparatus for video compression including: an acquisition module for acquiring a first quantization matrix, wherein a quantization parameter of a high frequency component in the first quantization matrix is smaller than a quantization parameter of a low frequency component, and the high frequency component The frequency corresponding to the quantization parameter of is higher than the frequency corresponding to the quantization parameter of the low-frequency component; a compression module is configured to compress the first video according to the first quantization matrix.
  • a computer system including: a memory for storing computer-executable instructions; a processor for accessing the memory and executing the computer-executable instructions to perform the method of the first aspect Operation.
  • a mobile device including: the video compression device of the second aspect; or the computer system of the third aspect.
  • a computer storage medium stores program code, where the program code may be used to instruct execution of the method of the first aspect.
  • the technical solution of the embodiment of the present application compresses a video according to a quantization matrix with a quantization parameter of a high-frequency component smaller than a quantization parameter of a low-frequency component, and can compress a video while satisfying a video content analysis requirement, thereby improving the efficiency of video compression.
  • FIG. 1 is an architecture diagram of a technical solution to which an embodiment of the present application is applied.
  • FIG. 2 is a schematic diagram of data to be processed according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a coding framework according to an embodiment of the present application.
  • FIG. 4 is a schematic architecture diagram of a mobile device according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a video compression method according to an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a video compression apparatus according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a video compression apparatus according to another embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a computer system according to an embodiment of the present application.
  • the size of the sequence number of each process does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not deal with the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • FIG. 1 is an architecture diagram of a technical solution to which an embodiment of the present application is applied.
  • the system 100 may receive data to be processed 102, process the data to be processed 102, and generate processed data 108.
  • the system 100 may receive a video to be compressed, and perform processing such as encoding on the video to be compressed to compress the video.
  • the components in the system 100 may be implemented by one or more processors, which may be processors in a computing device or processors in a removable device (such as a drone).
  • the processor may be any kind of processor, which is not limited in the embodiment of the present application.
  • the processor may include an encoder, a decoder, or a codec.
  • the system 100 may also include one or more memories.
  • the memory may be used to store instructions and data, for example, computer-executable instructions that implement the technical solutions of the embodiments of the present application, data to be processed 102, data 108 to be processed, and the like.
  • the memory may be any kind of memory, which is not limited in the embodiment of the present application.
  • FIG. 2 is a schematic diagram of data to be processed according to an embodiment of the present application.
  • the data to be processed 202 may include a plurality of frames 204.
  • multiple frames 204 may represent consecutive image frames in a video stream.
  • Each frame 204 may include one or more tiles or tiles 206.
  • Each slice or tile 206 may include one or more macroblocks or coding units 208.
  • Each macroblock or coding unit 208 may include one or more blocks 210.
  • Each block 210 may include one or more pixels 212.
  • Each pixel 212 may include one or more data sets corresponding to one or more data portions, such as a luminance data portion and a chrominance data portion.
  • the data unit may be a frame, a slice, a tile, a coding unit, a macro block, a block, a pixel, or a group of any of the above.
  • the size of the data unit may vary.
  • a frame 204 may include 100 slices 206, each slice 206 may include 10 macro blocks 208, each macro block 208 may include 4 (for example, 2x2) blocks 210, and each block 210 may include 64 (e.g., 8x8) pixels 212.
  • the video data In order to reduce the bandwidth occupied by video storage and transmission, the video data needs to be encoded and compressed. Any suitable encoding technique can be used to encode the data to be encoded. The type of encoding depends on the data being encoded and the specific encoding requirements.
  • the encoder may implement one or more different codecs.
  • Each codec can include code, instructions, or computer programs that implement different encoding algorithms. Based on various factors, including the type and / or source of the data to be encoded, the receiving entity of the encoded data, available computing resources, network environment, business environment, rules and standards, etc., a suitable encoding algorithm can be selected to encode a given Data to be encoded.
  • the encoder may be configured to encode a series of video frames.
  • a series of steps can be used to encode the data in each frame.
  • the encoding step may include processing steps such as prediction, transform, quantization, and entropy encoding.
  • Prediction includes two types of intra prediction and inter prediction, the purpose of which is to remove redundant information of the current image block to be encoded by using prediction block information.
  • Intra prediction uses the information of the image in this frame to obtain prediction block data.
  • Inter prediction uses the information of the reference frame to obtain prediction block data, and the process includes dividing the image block to be encoded into several sub-image blocks; then, for each sub-image block, searching in the reference image for an image that best matches the current sub-image block The block is used as a prediction block; thereafter, the sub-pixel block is subtracted from the corresponding pixel value of the prediction block to obtain a residual, and the residuals corresponding to the obtained sub-image blocks are combined to obtain the residual of the image block.
  • Using a transformation matrix to transform the residual block of the image can remove the correlation of the residual of the image block, that is, remove the redundant information of the image block in order to improve the coding efficiency.
  • the transformation of the data block in the image block usually uses two-dimensional transformation. That is, at the encoding end, the residual information of the data block is respectively multiplied with an NxM transform matrix and its transpose matrix, and the transform coefficients are obtained after the multiplication. Transform coefficients can be quantized to obtain quantized coefficients. Finally, the quantized coefficients are entropy encoded. Finally, the bit stream obtained by entropy encoding and the encoding mode information after encoding are performed, such as intra prediction mode and motion vector information. Store or send to the decoder.
  • the entropy-coded bitstream is first obtained and then the entropy decoding is performed to obtain the corresponding residuals.
  • the predicted image block corresponding to the information image block such as the motion vector or intra prediction obtained by the decoding according to the predicted image block and the image block Residual to get the value of each pixel in the current sub-image block.
  • FIG. 3 is a schematic diagram of a coding framework according to an embodiment of the present application.
  • the encoding process can be as follows:
  • a current frame image is acquired.
  • a reference frame image is acquired.
  • a reference frame image is used to perform motion estimation to obtain a motion vector (MV) of each image block of the current frame image.
  • the motion vector obtained by the motion estimation is used to perform motion compensation to obtain an estimated value / predicted value of the current image block.
  • the estimated value / predicted value of the current image block is subtracted from the current image block to obtain a residual error.
  • the residuals are transformed to obtain transformation coefficients.
  • the transform coefficient is quantized to obtain a quantized coefficient.
  • the quantized coefficients are subjected to entropy encoding, and finally the bit stream obtained by entropy encoding and the encoding mode information after encoding are stored or sent to the decoding end.
  • the quantized result is inversely quantized.
  • the inverse quantization result is inversely transformed.
  • the inverse transform result and the motion compensation result are used to obtain a reconstructed pixel.
  • the reconstructed pixels are filtered (ie, video compressed).
  • the filtered reconstructed pixels are output. Subsequently, the reconstructed image can be used as a reference frame image for other frame images for inter-frame prediction.
  • the encoding process can be as follows:
  • a current frame image is acquired.
  • intra prediction selection is performed on the current frame image.
  • the current image block in the current frame is intra-predicted.
  • the estimated value of the current image block is subtracted from the current image block to obtain a residual.
  • the residuals of the image blocks are transformed to obtain transformation coefficients.
  • the transform coefficient is quantized to obtain a quantized coefficient.
  • the quantized coefficients are subjected to entropy encoding, and finally the bit stream obtained by the entropy encoding and the encoding mode information after encoding are stored or sent to the decoding end.
  • the quantization result is inversely quantized.
  • the inverse quantization result is inversely transformed.
  • the inverse transform result and the intra prediction result are used to obtain a reconstructed pixel.
  • the reconstructed image block can be used for intra prediction of the next image block.
  • the residual information is obtained by using entropy decoding, inverse quantization and inverse transformation, and it is determined whether the current image block uses intra prediction or inter prediction according to the decoded code stream. If it is intra prediction, use the reconstructed image blocks in the current frame to construct prediction information according to the intra prediction method; if it is inter prediction, you need to parse out the motion information, and use the parsed motion information to reconstruct the image
  • the reference block is determined in order to obtain the prediction information.
  • the prediction information and the residual information are superimposed, and the reconstruction information can be obtained after the filtering operation.
  • the technical solution of the embodiment of the present application mainly relates to a quantization step in the encoding process, that is, to improve the compression efficiency of a video through improvement in the quantization step, and other steps may refer to related steps in the encoding process.
  • the mobile device may use the technical solution of the embodiment of the present application to compress the captured video.
  • the movable device may be an unmanned aerial vehicle, an unmanned boat, an autonomous vehicle, a robot, or an aerial photography vehicle, but the embodiment of the present application is not limited thereto.
  • FIG. 4 is a schematic architecture diagram of a mobile device 400 according to an embodiment of the present application.
  • the mobile device 400 may include a power system 410, a control system 420, a sensing system 430, and a processing system 440.
  • the power system 410 is used to power the mobile device 400.
  • the power system of the drone may include an electronic governor (referred to as an ESC), a propeller, and a motor corresponding to the propeller.
  • the motor is connected between the electronic governor and the propeller, and the motor and the propeller are arranged on the corresponding arm; the electronic governor is used to receive the driving signal generated by the control system and provide the driving current to the motor according to the driving signal to control the Rotating speed.
  • the motor is used to drive the propellers to rotate, thereby powering the drone's flight.
  • the sensing system 430 may be used to measure the posture information of the mobile device 400, that is, the position information and status information of the mobile device 400 in space, such as three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, and three-dimensional angular velocity.
  • the sensing system 430 may include, for example, at least one of a gyroscope, an electronic compass, an Inertial Measurement Unit (IMU), a vision sensor, a Global Positioning System (GPS), a barometer, and an airspeed meter. Species.
  • the sensing system 430 may also be used to acquire an image, that is, the sensing system 430 includes a sensor for acquiring an image, such as a camera.
  • the control system 420 is used to control the movement of the mobile device 400.
  • the control system 420 may control the mobile device 400 according to a preset program instruction.
  • the control system 420 may control the movement of the mobile device 400 according to the posture information of the mobile device 400 measured by the sensing system 430.
  • the control system 420 may also control the mobile device 400 according to a control signal from a remote controller.
  • the control system 420 may be a flight control system (flight control), or a control circuit in the flight control.
  • the processing system 440 may process images acquired by the sensing system 430.
  • the processing system 440 may be an image signal processing (Image Signal Processing, ISP) type chip.
  • ISP Image Signal Processing
  • the processing system 440 may be the system 100 in FIG. 1, or the processing system 440 may include the system 100 in FIG. 1.
  • the mobile device 400 may further include other components not shown in FIG. 4, which is not limited in the embodiment of the present application.
  • FIG. 5 shows a schematic flowchart of a video compression method 500 according to an embodiment of the present application.
  • the method 500 may be performed by the system 100 shown in FIG. 1; or may be performed by the mobile device 400 shown in FIG. 4. Specifically, when executed by the mobile device 400, it may be executed by the processing system 440 in FIG. 4.
  • 510 Obtain a first quantization matrix, wherein the quantization parameter of the high-frequency component in the first quantization matrix is smaller than the quantization parameter of the low-frequency component, and the frequency corresponding to the quantization parameter of the high-frequency component is higher than the quantization parameter of the low-frequency component. Frequency of.
  • Quantization implements video compression by dividing the transformed transform coefficients by the corresponding quantization step size.
  • the quantization step size is indicated by a quantization parameter in the quantization matrix.
  • the quantization matrix includes quantization parameters corresponding to each frequency, and the quantization parameters of different frequencies may be different to achieve selective energy region loss. The larger the quantization parameter, the larger the quantization step size, and the larger the compression ratio.
  • the quantization parameter of the high frequency component in the first quantization matrix used is smaller than the quantization parameter of the low frequency component. That is, in the technical solution of the embodiment of the present application, low-frequency information is more lost, and high-frequency information is retained.
  • the first video is quantized by using the first quantization matrix in the embodiment of the present application. Specifically, in the quantization process, each frequency component (transformation coefficient) is divided by a quantization step size indicated by a corresponding quantization parameter. Because the quantization parameter of the high frequency component in the first quantization matrix is smaller than the quantization parameter of the low frequency component, that is, the quantization step size used for the high frequency component is small, and the quantization step size used for the low frequency component is large. Therefore, after quantization, the compression ratio of the high frequency component Small, compression loss is small, low frequency component compression ratio is large, compression loss is large. Using this asymmetric quantization strategy can not only achieve a higher compression rate as a whole, increase the compression time, but also meet the quality requirements of video content analysis. Therefore, the video compression method in the embodiments of the present application can improve the efficiency of video compression.
  • different quantization matrices can be configured for different scenarios. That is, based on the basic setting that the quantization parameter of the high frequency component is smaller than the quantization parameter of the low frequency component, the quantization matrix of different scenes can be set with different quantization parameters.
  • multiple quantization matrices can be pre-configured, and each scene corresponds to a quantization matrix.
  • the first quantization matrix corresponding to the scene of the first video may be selected from multiple quantization matrices according to the scene of the first video.
  • a quantization matrix can be configured for each scene of video content analysis.
  • a corresponding quantization matrix is found according to the scene of the video, and the quantization matrix is used for video compression.
  • the correspondence between the scene and the quantization matrix may be one-to-one or one-to-many, which is not limited in this application.
  • the multiple quantization matrices may be determined according to video samples of multiple scenes.
  • a quantization matrix corresponding to the scene may be trained in advance based on video samples of the scene.
  • the training process may be to gradually adjust the quantization parameters in the quantization matrix, and finally obtain a quantization matrix that meets the requirements.
  • the quantization parameters in the initial quantization matrix are adjusted according to the specific video samples of the specific scenes and the difference threshold of the video content analysis result to obtain A specific quantization matrix corresponding to the specific scene, wherein a difference between a video content analysis result corresponding to the specific video sample compressed by using the specific quantization matrix and a video content analysis result corresponding to the uncompressed specific video sample is not different Greater than the difference threshold of the video content analysis result.
  • the difference threshold of the video content analysis result is the difference threshold of the video content analysis result that can be tolerated when the video content analysis is performed. That is to say, the difference between the video content analysis result obtained from the video content analysis based on the compressed video and the video content analysis result obtained from the video content analysis based on the uncompressed video is within the threshold of the video content analysis result difference.
  • the video content analysis results obtained from the compressed video meet the requirements. In this way, when determining a specific quantization matrix corresponding to a specific scene, based on the initial quantization matrix, the quantization parameters in the initial quantization matrix can be adjusted, the specific video samples are compressed with the adjusted quantization matrix, and then video content analysis is performed. Compare the obtained video content analysis result with the video content analysis result corresponding to the uncompressed specific video sample.
  • the difference between the two is greater than the difference threshold of the video content analysis result, continue to adjust, if the difference is not greater than the difference of the video content analysis result
  • the threshold is adjusted, and the adjusted quantization matrix is a specific quantization matrix corresponding to the specific scene.
  • the above initial quantization matrix may be a standard quantization matrix, or may be another quantization matrix, for example, a predefined quantization matrix, a quantization matrix used before, and the like, which are not limited in this embodiment of the present application.
  • the quantization parameters in the initial quantization matrix may be adjusted in the following manner:
  • the next quantization parameter is adjusted; wherein the first set includes M quantization parameters in the initial quantization matrix, and the M quantization parameters correspond to The lowest M frequencies, M is a predetermined value;
  • the adjustment is stopped to obtain the specific quantization matrix; wherein the second set Including other quantization parameters in the initial quantization matrix except the M quantization parameters.
  • the quantization parameters in the initial quantization matrix may be different adjustment directions.
  • the quantization parameters of the low frequency part (quantization parameters in the first set)
  • Adjust in the direction of increasing the quantization parameters is adopted
  • the quantization parameters of the high frequency part (quantization parameters in the second set)
  • Adjust in the direction of decreasing the quantization parameter For example, the above-mentioned M may be 4, that is, for the DC component and the first three AC main components, it is adjusted in the direction of increasing the quantization parameter, and the other AC components are adjusted in the direction of decreasing the quantization parameter.
  • the quantization parameters in the first set are adjusted first. Because the adjustment is in the direction of increasing the quantization parameters, the adjusted video content analysis results will be worse, that is, the above differences will become larger. When the differences converge (that is, the differences are basically When it does not change), adjust the next quantization parameter.
  • the quantization parameters in the first set may be adjusted in order from low to high frequency.
  • the quantization parameters in the first set After adjusting the quantization parameters in the first set, adjust the quantization parameters in the second set. Because the adjustment is to reduce the quantization parameters, the adjusted video content analysis results will be better, that is, the above differences will become smaller. Before the difference is not greater than the difference threshold of the video content analysis result, after adjusting to the convergence of the difference, the next quantization parameter is adjusted until the difference is not greater than the difference threshold of the video content analysis result.
  • the adjusted quantization matrix is a specific quantization matrix corresponding to the specific scene.
  • the quantization parameters in the second set may be adjusted in order of frequency from low to high, or adjusted in order of frequency from high to low, or may be adjusted in predetermined order.
  • the predetermined order may be related to the degree of dependence of the video content analysis on each frequency component, for example, it may be adjusted in the order of the degree of dependence from high to low, but this embodiment of the present application is not limited thereto.
  • the adjustment of the initial quantization matrix may be adjusted by a scaling matrix.
  • Qr is an initial quantization matrix
  • Scl is a scaling matrix
  • Q ' is a quantization matrix finally used for quantization.
  • Scl includes a scaling factor corresponding to each quantization parameter.
  • Each quantization parameter is scaled by Scl to adjust its quantization intensity.
  • the process of adjusting the quantization parameters is the process of adjusting the scaling factor corresponding to each quantization parameter.
  • the scaling factor corresponding to each quantization parameter is determined, that is, the scaling matrix Scl is determined, and thus the quantization matrix Q 'is determined.
  • the scaling matrix Scl can be obtained in the following manner.
  • Adjust the scaling factors one by one in Scl (the initial value of each scaling factor can be 1). Taking the adjustment from the lowest frequency as an example, adjust to g convergence, or g ⁇ T; if g ⁇ T, stop adjusting; if g convergence , That is, the difference in the analysis results of the video content between the two adjustments is small, for example, ⁇ 0.01T, the adjustment of the current frequency is stopped, and the adjustment of the next frequency is started.
  • the first component the DC component, which is adjusted in the direction of the amplification and quantization parameter, that is, the zoom factor is greater than 1;
  • the second, third, and fourth components the AC main component, which is adjusted in the direction of the enlarged quantization parameter, that is, the scaling factor is greater than 1; if the g distortion is large during the first adjustment, the adjustment of the quantization parameter of the corresponding component can be abandoned;
  • the remaining components are adjusted in the direction of reducing the quantization parameter, that is, the scaling factor is ⁇ 1.
  • subsequent video content analysis may be performed based on the compressed first video.
  • the above quantization matrix is used for video compression, which retains high-frequency information such as edges, structures, and textures that are meaningful for video content analysis, and simultaneously reduces low-frequency energy, achieving the purpose of compression rate and the quality of compression for offline analysis effectiveness.
  • the technical solution of the embodiment of the present application compresses a video according to a quantization matrix with a quantization parameter of a high-frequency component smaller than a quantization parameter of a low-frequency component, and can compress the video under a condition that satisfies video content analysis requirements, thereby improving effectiveness.
  • the video compression method in the embodiment of the present application is described in detail above.
  • the video compression device, computer system, and mobile device in the embodiment of the present application will be described below.
  • FIG. 6 shows a schematic block diagram of a video compression apparatus 600 according to an embodiment of the present application.
  • the apparatus 600 may execute the video compression method in the embodiment of the present application.
  • the apparatus 600 may include:
  • the obtaining module 610 is configured to obtain a first quantization matrix, wherein a quantization parameter of a high frequency component in the first quantization matrix is smaller than a quantization parameter of a low frequency component, and a frequency corresponding to the quantization parameter of the high frequency component is higher than the low frequency component.
  • a compression module 620 is configured to compress a first video according to the first quantization matrix.
  • the compressed first video is used for video content analysis.
  • the obtaining module 610 is configured to:
  • the first quantization matrix corresponding to the scene of the first video is selected from a plurality of quantization matrices.
  • the apparatus 600 further includes:
  • a configuration module 630 is configured to pre-configure the multiple quantization matrices.
  • the configuration module 630 is configured to:
  • the multiple quantization matrices are determined according to video samples of multiple scenes.
  • the configuration module 630 is configured to:
  • a difference between a video content analysis result corresponding to the specific video sample compressed by using the specific quantization matrix and a video content analysis result corresponding to the uncompressed specific video sample is not greater than a difference threshold of the video content analysis result.
  • the configuration module 630 is configured to:
  • the next quantization parameter is adjusted; wherein the first set includes M quantization parameters in the initial quantization matrix, and the M quantization parameters correspond to The lowest M frequencies, M is a predetermined value;
  • the adjustment is stopped to obtain the specific quantization matrix; wherein the second set Including other quantization parameters in the initial quantization matrix except the M quantization parameters.
  • the configuration module 630 is configured to adjust the quantization parameters in the first set in a descending order of frequency.
  • the configuration module 630 is configured to adjust the quantization parameters in the second set according to a frequency from low to high or from high to low.
  • the configuration module 630 is configured to adjust the quantization parameters in the second set in a predetermined order.
  • the M is 4.
  • the initial quantization matrix is a standard quantization matrix
  • the foregoing video compression device in the embodiment of the present application may be a chip, which may be specifically implemented by a circuit, but the embodiment of the present application does not limit a specific implementation form.
  • An embodiment of the present invention further provides an encoder, and the encoder includes the foregoing video compression apparatus according to various embodiments of the present invention.
  • FIG. 8 shows a schematic block diagram of a computer system 800 according to an embodiment of the present application.
  • the computer system 800 may include a processor 810 and a memory 820.
  • computer system 800 may also include components generally included in other computer systems, such as input-output devices, communication interfaces, and the like, which is not limited in the embodiments of the present application.
  • the memory 820 is configured to store computer-executable instructions.
  • the memory 820 may be various types of memory, for example, it may include high-speed random access memory (Random Access Memory, RAM), and may also include non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Examples are not limited to this.
  • RAM Random Access Memory
  • non-volatile memory such as at least one magnetic disk memory. Examples are not limited to this.
  • the processor 810 is configured to access the memory 820 and execute the computer-executable instructions to perform operations in the video compression method in the embodiment of the present application.
  • the processor 810 may include a microprocessor, a Field-Programmable Gate Array (FPGA), a Central Processing Unit (CPU), and a Graphics Processing Unit (GPU). Examples are not limited to this.
  • FPGA Field-Programmable Gate Array
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the embodiment of the present application further provides a movable device, and the movable device may include the video compression device or the computer system of the various embodiments of the present application described above.
  • the video compression device, computer system, and mobile device may correspond to the execution subject of the video compression method according to the embodiments of the present application. And other operations and / or functions are respectively used to implement the corresponding processes of the foregoing methods, and for the sake of brevity, they are not repeated here.
  • An embodiment of the present application further provides a computer storage medium, and the computer storage medium stores a program code, where the program code may be used to instruct to perform the foregoing video compression method in the embodiment of the present application.
  • the term “and / or” is merely an association relationship describing an associated object, and indicates that there may be three relationships.
  • a and / or B can indicate that there are three cases in which A exists alone, A and B exist, and B exists alone.
  • the character "/" in this article generally indicates that the related objects are an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions in the embodiments of the present application.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of this application is essentially a part that contributes to the existing technology, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium
  • Included are instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
  • the foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Disclosed are a video compression method and apparatus, a computer system, and a mobile device. The method comprises: obtaining a first quantization matrix, wherein a quantization parameter of a high frequency component in the first quantization matrix is smaller than a quantization parameter of a low frequency component therein, and the frequency corresponding to the quantization parameter of the high frequency component is higher than the frequency corresponding to the quantization parameter of the low frequency component; and compressing a first video according to the first quantization matrix. The technical solution of embodiments of the present application can improve the video compression efficiency.

Description

视频压缩的方法、装置、计算机系统和可移动设备Video compression method, device, computer system and mobile device
版权申明Copyright statement
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The content disclosed in this patent document contains material which is subject to copyright protection. The copyright is owned by the copyright owner. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the official records and archives of the Patent and Trademark Office.
技术领域Technical field
本申请涉及视频处理领域,并且更具体地,涉及一种视频压缩的方法、装置、计算机系统和可移动设备。The present application relates to the field of video processing, and more particularly, to a method, an apparatus, a computer system, and a mobile device for video compression.
背景技术Background technique
视频内容分析是利用视觉算法对保存下来的视频进行分析,以利用视频内容分析结果进行相应的应用。例如,对飞行系统的黑匣子保存的视频进行视频内容分析,可以用于进行事故原因分析等。Video content analysis is the use of visual algorithms to analyze the saved video in order to use the video content analysis results for corresponding applications. For example, the video content analysis of the video stored in the black box of the flight system can be used to analyze the cause of the accident.
为了保证视频内容分析结果的准确性,需要视频有较高的质量。然而,较高质量的视频通常是无损压缩或低压缩率压缩,这又会增大资源需求。In order to ensure the accuracy of the analysis results of the video content, a higher quality video is required. However, higher quality video is usually lossless or low compression, which in turn increases resource requirements.
因此,需要一种适应于视频内容分析的视频压缩的方法,以提高视频压缩的效率。Therefore, there is a need for a video compression method suitable for video content analysis to improve the efficiency of video compression.
发明内容Summary of the Invention
本申请实施例提供了一种视频压缩的方法、装置、计算机系统和可移动设备,能够提高视频压缩的效率。The embodiments of the present application provide a method, a device, a computer system, and a mobile device for video compression, which can improve the efficiency of video compression.
第一方面,提供了一种视频压缩的方法,包括:获取第一量化矩阵,其中,所述第一量化矩阵中高频分量的量化参数小于低频分量的量化参数,所述高频分量的量化参数对应的频率高于所述低频分量的量化参数对应的频率;根据所述第一量化矩阵对第一视频进行压缩。In a first aspect, a video compression method is provided, including: obtaining a first quantization matrix, wherein the quantization parameter of a high frequency component in the first quantization matrix is smaller than the quantization parameter of a low frequency component, and the quantization parameter of the high frequency component The corresponding frequency is higher than the frequency corresponding to the quantization parameter of the low-frequency component; the first video is compressed according to the first quantization matrix.
第二方面,提供了视频压缩的装置,包括:获取模块,用于获取第一量化矩阵,其中,所述第一量化矩阵中高频分量的量化参数小于低频分量的量化参数,所述高频分量的量化参数对应的频率高于所述低频分量的量化参数对应的频率;压缩模块,用于根据所述第一量化矩阵对第一视频进行压缩。。In a second aspect, an apparatus for video compression is provided, including: an acquisition module for acquiring a first quantization matrix, wherein a quantization parameter of a high frequency component in the first quantization matrix is smaller than a quantization parameter of a low frequency component, and the high frequency component The frequency corresponding to the quantization parameter of is higher than the frequency corresponding to the quantization parameter of the low-frequency component; a compression module is configured to compress the first video according to the first quantization matrix. .
第三方面,提供了一种计算机系统,包括:存储器,用于存储计算机可执行指令;处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行上述第一方面的方法中的操作。According to a third aspect, a computer system is provided, including: a memory for storing computer-executable instructions; a processor for accessing the memory and executing the computer-executable instructions to perform the method of the first aspect Operation.
第四方面,提供了一种可移动设备,包括:上述第二方面的视频压缩的装置;或者,上述第三方面的计算机系统。According to a fourth aspect, a mobile device is provided, including: the video compression device of the second aspect; or the computer system of the third aspect.
第五方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述第一方面的方法。According to a fifth aspect, a computer storage medium is provided, and the computer storage medium stores program code, where the program code may be used to instruct execution of the method of the first aspect.
本申请实施例的技术方案,根据高频分量的量化参数小于低频分量的量化参数的量化矩阵对视频进行压缩,可以在满足视频内容分析需求的情况下压缩视频,从而能够提高视频压缩的效率。The technical solution of the embodiment of the present application compresses a video according to a quantization matrix with a quantization parameter of a high-frequency component smaller than a quantization parameter of a low-frequency component, and can compress a video while satisfying a video content analysis requirement, thereby improving the efficiency of video compression.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是应用本申请实施例的技术方案的架构图。FIG. 1 is an architecture diagram of a technical solution to which an embodiment of the present application is applied.
图2是本申请实施例的待处理数据的示意图。FIG. 2 is a schematic diagram of data to be processed according to an embodiment of the present application.
图3是本申请实施例的编码框架示意图。FIG. 3 is a schematic diagram of a coding framework according to an embodiment of the present application.
图4是本申请实施例的可移动设备的示意性架构图。FIG. 4 is a schematic architecture diagram of a mobile device according to an embodiment of the present application.
图5是本申请实施例的视频压缩的方法的示意性流程图。FIG. 5 is a schematic flowchart of a video compression method according to an embodiment of the present application.
图6是本申请一个实施例的视频压缩的装置的示意性框图。FIG. 6 is a schematic block diagram of a video compression apparatus according to an embodiment of the present application.
图7是本申请另一个实施例的视频压缩的装置的示意性框图。FIG. 7 is a schematic block diagram of a video compression apparatus according to another embodiment of the present application.
图8是本申请实施例的计算机系统的示意性框图。FIG. 8 is a schematic block diagram of a computer system according to an embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
应理解,本文中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。It should be understood that the specific examples in this document are only to help those skilled in the art to better understand the embodiments of the present application, but not to limit the scope of the embodiments of the present application.
还应理解,本申请实施例中的公式只是一种示例,而非限制本申请实施例的范围,各公式可以进行变形,这些变形也应属于本申请保护的范围。It should also be understood that the formulas in the embodiments of the present application are merely examples, and do not limit the scope of the embodiments of the present application. Each formula can be modified, and these modifications should also belong to the scope of protection of the present application.
还应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should also be understood that, in the various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not deal with the embodiments of the present application. The implementation process constitutes any limitation.
还应理解,本说明书中描述的各种实施方式,既可以单独实施,也可 以组合实施,本申请实施例对此并不限定。It should also be understood that the various embodiments described in this specification may be implemented individually or in combination, which is not limited in the examples of the present application.
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。本申请所使用的术语“和/或”包括一个或多个相关的所列项的任意的和所有的组合。Unless otherwise stated, all technical and scientific terms used in the examples of this application have the same meanings as commonly understood by those skilled in the technical field of this application. The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the scope of the application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
图1是应用本申请实施例的技术方案的架构图。FIG. 1 is an architecture diagram of a technical solution to which an embodiment of the present application is applied.
如图1所示,系统100可以接收待处理数据102,对待处理数据102进行处理,产生处理后数据108。例如,系统100可以接收待压缩的视频,对待压缩的视频进行编码等处理,以压缩视频。在一些实施例中,系统100中的部件可以由一个或多个处理器实现,该处理器可以是计算设备中的处理器,也可以是可移动设备(例如无人机)中的处理器。该处理器可以为任意种类的处理器,本申请实施例对此不做限定。在一些可能的设计中,该处理器可以包括编码器、解码器或编解码器等。系统100中还可以包括一个或多个存储器。该存储器可用于存储指令和数据,例如,实现本申请实施例的技术方案的计算机可执行指令,待处理数据102、处理后数据108等。该存储器可以为任意种类的存储器,本申请实施例对此也不做限定。As shown in FIG. 1, the system 100 may receive data to be processed 102, process the data to be processed 102, and generate processed data 108. For example, the system 100 may receive a video to be compressed, and perform processing such as encoding on the video to be compressed to compress the video. In some embodiments, the components in the system 100 may be implemented by one or more processors, which may be processors in a computing device or processors in a removable device (such as a drone). The processor may be any kind of processor, which is not limited in the embodiment of the present application. In some possible designs, the processor may include an encoder, a decoder, or a codec. The system 100 may also include one or more memories. The memory may be used to store instructions and data, for example, computer-executable instructions that implement the technical solutions of the embodiments of the present application, data to be processed 102, data 108 to be processed, and the like. The memory may be any kind of memory, which is not limited in the embodiment of the present application.
图2示出了本申请实施例的待处理数据的示意图。FIG. 2 is a schematic diagram of data to be processed according to an embodiment of the present application.
如图2所示,待处理数据202可以包括多个帧204。例如,多个帧204可以表示视频流中的连续的图像帧。每个帧204可以包括一个或多个条带或贴砖(tile)206。每个条带或tile206可以包括一个或多个宏块或编码单元208。每个宏块或编码单元208可以包括一个或多个块210。每个块210可以包括一个或多个像素212。每个像素212可以包括一个或多个数据集,对应于一个或多个数据部分,例如,亮度数据部分和色度数据部分。数据单元可以为帧,条带,tile,编码单元,宏块,块,像素或以上任一种的组。在不同的实施例中,数据单元的大小可以变化。作为举例,一个帧204可以包括100个条带206,每个条带206可以包括10个宏块208,每个宏块208可以包括4个(例如,2x2)块210,每个块210可以包括64个(例如,8x8)像素212。As shown in FIG. 2, the data to be processed 202 may include a plurality of frames 204. For example, multiple frames 204 may represent consecutive image frames in a video stream. Each frame 204 may include one or more tiles or tiles 206. Each slice or tile 206 may include one or more macroblocks or coding units 208. Each macroblock or coding unit 208 may include one or more blocks 210. Each block 210 may include one or more pixels 212. Each pixel 212 may include one or more data sets corresponding to one or more data portions, such as a luminance data portion and a chrominance data portion. The data unit may be a frame, a slice, a tile, a coding unit, a macro block, a block, a pixel, or a group of any of the above. In different embodiments, the size of the data unit may vary. As an example, a frame 204 may include 100 slices 206, each slice 206 may include 10 macro blocks 208, each macro block 208 may include 4 (for example, 2x2) blocks 210, and each block 210 may include 64 (e.g., 8x8) pixels 212.
为了减少视频存储和传输所占用的带宽,需要对视频数据进行编码压缩处理。任何合适的编码技术都可以用于编码待编码数据。编码类型依赖于被编码的数据和具体的编码需求。In order to reduce the bandwidth occupied by video storage and transmission, the video data needs to be encoded and compressed. Any suitable encoding technique can be used to encode the data to be encoded. The type of encoding depends on the data being encoded and the specific encoding requirements.
在一些实施例中,编码器可以实现一种或多种不同的编解码器。每种 编解码器可以包括实现不同编码算法的代码,指令或计算机程序。基于各种因素,包括待编码数据的类型和/或来源,编码数据的接收实体,可用的计算资源,网络环境,商业环境,规则和标准等,可以选择一种合适的编码算法编码给定的待编码数据。In some embodiments, the encoder may implement one or more different codecs. Each codec can include code, instructions, or computer programs that implement different encoding algorithms. Based on various factors, including the type and / or source of the data to be encoded, the receiving entity of the encoded data, available computing resources, network environment, business environment, rules and standards, etc., a suitable encoding algorithm can be selected to encode a given Data to be encoded.
例如,编码器可以被配置为编码一系列视频帧。编码每个帧中的数据可以采用一系列步骤。在一些实施例中,编码步骤可以包括预测、变换、量化、熵编码等处理步骤。For example, the encoder may be configured to encode a series of video frames. A series of steps can be used to encode the data in each frame. In some embodiments, the encoding step may include processing steps such as prediction, transform, quantization, and entropy encoding.
预测包括帧内预测和帧间预测两种类型,其目的在于利用预测块信息去除当前待编码图像块的冗余信息。帧内预测利用本帧图像的信息获得预测块数据。帧间预测利用参考帧的信息获得预测块数据,其过程包括将待编码图像块划分成若干个子图像块;然后,针对每个子图像块,在参考图像中搜索与当前子图像块最匹配的图像块作为预测块;其后,将该子图像块与预测块的相应像素值相减得到残差,并将得到的各子图像块对应的残差组合在一起,得到图像块的残差。Prediction includes two types of intra prediction and inter prediction, the purpose of which is to remove redundant information of the current image block to be encoded by using prediction block information. Intra prediction uses the information of the image in this frame to obtain prediction block data. Inter prediction uses the information of the reference frame to obtain prediction block data, and the process includes dividing the image block to be encoded into several sub-image blocks; then, for each sub-image block, searching in the reference image for an image that best matches the current sub-image block The block is used as a prediction block; thereafter, the sub-pixel block is subtracted from the corresponding pixel value of the prediction block to obtain a residual, and the residuals corresponding to the obtained sub-image blocks are combined to obtain the residual of the image block.
使用变换矩阵对图像的残差块进行变换可以去除图像块的残差的相关性,即去除图像块的冗余信息,以便提高编码效率,图像块中的数据块的变换通常采用二维变换,即在编码端将数据块的残差信息分别与一个NxM的变换矩阵及其转置矩阵相乘,相乘之后得到的是变换系数。变换系数经量化可得到量化后的系数,最后将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信息,如帧内预测模式、运动矢量信息等,进行存储或发送到解码端。在图像的解码端,首先获得熵编码比特流后进行熵解码,得到相应的残差,根据解码得到的运动矢量或帧内预测等信息图像块对应的预测图像块,根据预测图像块与图像块的残差得到当前子图像块中各像素点的值。Using a transformation matrix to transform the residual block of the image can remove the correlation of the residual of the image block, that is, remove the redundant information of the image block in order to improve the coding efficiency. The transformation of the data block in the image block usually uses two-dimensional transformation. That is, at the encoding end, the residual information of the data block is respectively multiplied with an NxM transform matrix and its transpose matrix, and the transform coefficients are obtained after the multiplication. Transform coefficients can be quantized to obtain quantized coefficients. Finally, the quantized coefficients are entropy encoded. Finally, the bit stream obtained by entropy encoding and the encoding mode information after encoding are performed, such as intra prediction mode and motion vector information. Store or send to the decoder. At the decoding side of the image, the entropy-coded bitstream is first obtained and then the entropy decoding is performed to obtain the corresponding residuals. According to the predicted image block corresponding to the information image block such as the motion vector or intra prediction obtained by the decoding, according to the predicted image block and the image block Residual to get the value of each pixel in the current sub-image block.
图3示出了本申请实施例的编码框架示意图。FIG. 3 is a schematic diagram of a coding framework according to an embodiment of the present application.
如图3所示,在采用帧间预测时,编码的流程可以如下所示:As shown in Figure 3, when inter prediction is used, the encoding process can be as follows:
在301中,获取当前帧图像。在302中,获取参考帧图像。在303a中,利用参考帧图像,进行运动估计,以得到当前帧图像的各个图像块的运动矢量(Motion Vector,MV)。在304a中,利用运动估计得到的运动矢量,进行运动补偿,以得到当前图像块的估计值/预测值。在305中,将当前图像块的估计值/预测值与当前图像块相减,得到残差。在306中,对残差进行变 换,以得到变换系数。在307中,变换系数经量化可得到量化后的系数。在308中,将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信息进行存储或发送到解码端。在309中,对量化的结果进行反量化。在310中,对反量化结果进行反变换。在311中,利用反变换结果以及运动补偿结果,得到重建像素。在312中,对重建像素进行滤波(即视频压缩)。在313中,输出滤波后的重建像素。后续,重建后的图像可以作为其他帧图像的参考帧图像进行帧间预测。In 301, a current frame image is acquired. In 302, a reference frame image is acquired. In 303a, a reference frame image is used to perform motion estimation to obtain a motion vector (MV) of each image block of the current frame image. In 304a, the motion vector obtained by the motion estimation is used to perform motion compensation to obtain an estimated value / predicted value of the current image block. In 305, the estimated value / predicted value of the current image block is subtracted from the current image block to obtain a residual error. In 306, the residuals are transformed to obtain transformation coefficients. In 307, the transform coefficient is quantized to obtain a quantized coefficient. In 308, the quantized coefficients are subjected to entropy encoding, and finally the bit stream obtained by entropy encoding and the encoding mode information after encoding are stored or sent to the decoding end. In 309, the quantized result is inversely quantized. In 310, the inverse quantization result is inversely transformed. In 311, the inverse transform result and the motion compensation result are used to obtain a reconstructed pixel. In 312, the reconstructed pixels are filtered (ie, video compressed). In 313, the filtered reconstructed pixels are output. Subsequently, the reconstructed image can be used as a reference frame image for other frame images for inter-frame prediction.
在采用帧内预测时,编码的流程可以如下所示:When using intra prediction, the encoding process can be as follows:
在302中,获取当前帧图像。在303b中,对当前帧图像进行帧内预测选择。在304b中,当前帧中的当前图像块进行帧内预测。在305中,将当前图像块的估计值与当前图像块相减,得到残差。在306中,对图像块的残差进行变换,以得到变换系数。在307中,变换系数经量化可得到量化后的系数。在308中,将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信进行存储或发送到解码端。在309中,对量化结果进行反量化。在310中,对反量化结果进行反变换,在311中,利用反变换结果以及帧内预测结果,得到重建像素。重建后的图像块可以用于下一图像块的帧内预测。In 302, a current frame image is acquired. In 303b, intra prediction selection is performed on the current frame image. In 304b, the current image block in the current frame is intra-predicted. In 305, the estimated value of the current image block is subtracted from the current image block to obtain a residual. In 306, the residuals of the image blocks are transformed to obtain transformation coefficients. In 307, the transform coefficient is quantized to obtain a quantized coefficient. In 308, the quantized coefficients are subjected to entropy encoding, and finally the bit stream obtained by the entropy encoding and the encoding mode information after encoding are stored or sent to the decoding end. In 309, the quantization result is inversely quantized. In 310, the inverse quantization result is inversely transformed. In 311, the inverse transform result and the intra prediction result are used to obtain a reconstructed pixel. The reconstructed image block can be used for intra prediction of the next image block.
对于解码端,则进行与编码端相对应的操作。首先利用熵解码以及反量化和反变换得到残差信息,并根据解码码流确定当前图像块使用帧内预测还是帧间预测。如果是帧内预测,则利用当前帧中已重建图像块按照帧内预测方法构建预测信息;如果是帧间预测,则需要解析出运动信息,并使用所解析出的运动信息在已重建的图像中确定参考块,得到预测信息;接下来,再将预测信息与残差信息进行叠加,并经过滤波操作便可以得到重建信息。For the decoding end, operations corresponding to the encoding end are performed. First, the residual information is obtained by using entropy decoding, inverse quantization and inverse transformation, and it is determined whether the current image block uses intra prediction or inter prediction according to the decoded code stream. If it is intra prediction, use the reconstructed image blocks in the current frame to construct prediction information according to the intra prediction method; if it is inter prediction, you need to parse out the motion information, and use the parsed motion information to reconstruct the image The reference block is determined in order to obtain the prediction information. Next, the prediction information and the residual information are superimposed, and the reconstruction information can be obtained after the filtering operation.
本申请实施例的技术方案主要涉及编码过程中的量化步骤,即,通过量化步骤中的改进,提高视频的压缩效率,其他步骤可以参考编码过程中的相关步骤。The technical solution of the embodiment of the present application mainly relates to a quantization step in the encoding process, that is, to improve the compression efficiency of a video through improvement in the quantization step, and other steps may refer to related steps in the encoding process.
本申请实施例的视频压缩的技术方案可以应用于视频内容分析(视觉分析),但本申请实施例对此并不限定。The technical solution of video compression in the embodiments of the present application can be applied to video content analysis (visual analysis), but the embodiments of the present application are not limited thereto.
在一些设计中,可移动设备可以采用本申请实施例的技术方案压缩采集的视频。该可移动设备可以是无人机、无人驾驶船、自动驾驶车辆、机器人或航拍飞行器等,但本申请实施例对此并不限定。In some designs, the mobile device may use the technical solution of the embodiment of the present application to compress the captured video. The movable device may be an unmanned aerial vehicle, an unmanned boat, an autonomous vehicle, a robot, or an aerial photography vehicle, but the embodiment of the present application is not limited thereto.
图4是本申请一个实施例的可移动设备400的示意性架构图。FIG. 4 is a schematic architecture diagram of a mobile device 400 according to an embodiment of the present application.
如图4所示,可移动设备400可以包括动力系统410、控制系统420、传感系统430和处理系统440。As shown in FIG. 4, the mobile device 400 may include a power system 410, a control system 420, a sensing system 430, and a processing system 440.
动力系统410用于为该可移动设备400提供动力。The power system 410 is used to power the mobile device 400.
以无人机为例,无人机的动力系统可以包括电子调速器(简称为电调)、螺旋桨以及与螺旋桨相对应的电机。电机连接在电子调速器与螺旋桨之间,电机和螺旋桨设置在对应的机臂上;电子调速器用于接收控制系统产生的驱动信号,并根据驱动信号提供驱动电流给电机,以控制电机的转速。电机用于驱动螺旋桨旋转,从而为无人机的飞行提供动力。Taking a drone as an example, the power system of the drone may include an electronic governor (referred to as an ESC), a propeller, and a motor corresponding to the propeller. The motor is connected between the electronic governor and the propeller, and the motor and the propeller are arranged on the corresponding arm; the electronic governor is used to receive the driving signal generated by the control system and provide the driving current to the motor according to the driving signal to control the Rotating speed. The motor is used to drive the propellers to rotate, thereby powering the drone's flight.
传感系统430可以用于测量可移动设备400的姿态信息,即可移动设备400在空间的位置信息和状态信息,例如,三维位置、三维角度、三维速度、三维加速度和三维角速度等。传感系统430例如可以包括陀螺仪、电子罗盘、惯性测量单元(Inertial Measurement Unit,IMU)、视觉传感器、全球定位系统(Global Positioning System,GPS)、气压计、空速计等传感器中的至少一种。The sensing system 430 may be used to measure the posture information of the mobile device 400, that is, the position information and status information of the mobile device 400 in space, such as three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration, and three-dimensional angular velocity. The sensing system 430 may include, for example, at least one of a gyroscope, an electronic compass, an Inertial Measurement Unit (IMU), a vision sensor, a Global Positioning System (GPS), a barometer, and an airspeed meter. Species.
在本申请实施例中,传感系统430还可用于采集图像,即传感系统430包括用于采集图像的传感器,例如相机等。In the embodiment of the present application, the sensing system 430 may also be used to acquire an image, that is, the sensing system 430 includes a sensor for acquiring an image, such as a camera.
控制系统420用于控制可移动设备400的移动。控制系统420可以按照预先设置的程序指令对可移动设备400进行控制。例如,控制系统420可以根据传感系统430测量的可移动设备400的姿态信息控制可移动设备400的移动。控制系统420也可以根据来自遥控器的控制信号对可移动设备400进行控制。例如,对于无人机,控制系统420可以为飞行控制系统(飞控),或者为飞控中的控制电路。The control system 420 is used to control the movement of the mobile device 400. The control system 420 may control the mobile device 400 according to a preset program instruction. For example, the control system 420 may control the movement of the mobile device 400 according to the posture information of the mobile device 400 measured by the sensing system 430. The control system 420 may also control the mobile device 400 according to a control signal from a remote controller. For example, for a drone, the control system 420 may be a flight control system (flight control), or a control circuit in the flight control.
处理系统440可以处理传感系统430采集的图像。例如,处理系统440可以为图像信号处理(Image Signal Processing,ISP)类芯片。The processing system 440 may process images acquired by the sensing system 430. For example, the processing system 440 may be an image signal processing (Image Signal Processing, ISP) type chip.
处理系统440可以为图1中的系统100,或者,处理系统440可以包括图1中的系统100。The processing system 440 may be the system 100 in FIG. 1, or the processing system 440 may include the system 100 in FIG. 1.
应理解,上述对于可移动设备400的各组成部件的划分和命名仅仅是示例性的,并不应理解为对本申请实施例的限制。It should be understood that the foregoing division and naming of each component of the mobile device 400 is merely exemplary, and should not be construed as limiting the embodiments of the present application.
还应理解,可移动设备400还可以包括图4中未示出的其他部件,本申请实施例对此并不限定。It should also be understood that the mobile device 400 may further include other components not shown in FIG. 4, which is not limited in the embodiment of the present application.
图5示出了本申请一个实施例的视频压缩的方法500的示意性流程图。该方法500可以由图1所示的系统100执行;或者由图4所示的可移动设备400执行。具体地,在由可移动设备400执行时,可以由图4中的处理系统440执行。FIG. 5 shows a schematic flowchart of a video compression method 500 according to an embodiment of the present application. The method 500 may be performed by the system 100 shown in FIG. 1; or may be performed by the mobile device 400 shown in FIG. 4. Specifically, when executed by the mobile device 400, it may be executed by the processing system 440 in FIG. 4.
510,获取第一量化矩阵,其中,所述第一量化矩阵中高频分量的量化参数小于低频分量的量化参数,所述高频分量的量化参数对应的频率高于所述低频分量的量化参数对应的频率。510: Obtain a first quantization matrix, wherein the quantization parameter of the high-frequency component in the first quantization matrix is smaller than the quantization parameter of the low-frequency component, and the frequency corresponding to the quantization parameter of the high-frequency component is higher than the quantization parameter of the low-frequency component. Frequency of.
量化通过将变换后的变换系数除以相应的量化步长,实现视频压缩。量化步长通过量化矩阵中的量化参数指示。量化矩阵中包括对应各个频率的量化参数,其中,不同频率的量化参数可以不同,以实现选择性的能量区域损失。量化参数越大,量化步长越大,压缩率越大。Quantization implements video compression by dividing the transformed transform coefficients by the corresponding quantization step size. The quantization step size is indicated by a quantization parameter in the quantization matrix. The quantization matrix includes quantization parameters corresponding to each frequency, and the quantization parameters of different frequencies may be different to achieve selective energy region loss. The larger the quantization parameter, the larger the quantization step size, and the larger the compression ratio.
在本申请实施例中,采用的第一量化矩阵中高频分量的量化参数小于低频分量的量化参数。也就是说,在本申请实施例的技术方案中,更多地损失低频信息,保留高频信息。In the embodiment of the present application, the quantization parameter of the high frequency component in the first quantization matrix used is smaller than the quantization parameter of the low frequency component. That is, in the technical solution of the embodiment of the present application, low-frequency information is more lost, and high-frequency information is retained.
在视频内容分析时,视觉算法更需要清晰地保留视觉对象的边缘、纹理、结构等高频区域信息;而对于低频区域,例如,蓝天、白云、大片的墙等信息,视觉意义较小,因为其不提供任何信息量。因此,在本申请实施例中,针对视觉算法的上述特点,采用非对称量化策略,更多损失低频信息,而保留高频信息,这样可以达到更低码率,更长的压缩时长,同时又能保证视觉算法的还原度和有效性。In the analysis of video content, visual algorithms need to clearly retain high-frequency area information such as the edges, textures, and structures of visual objects. For low-frequency areas, such as blue sky, white clouds, and large walls, the visual significance is small because It does not provide any amount of information. Therefore, in the embodiment of the present application, according to the above characteristics of the visual algorithm, an asymmetric quantization strategy is adopted, and more low-frequency information is lost, while retaining high-frequency information. This can achieve a lower code rate, a longer compression time, and Can guarantee the reduction and effectiveness of visual algorithms.
520,根据所述第一量化矩阵对第一视频进行压缩。520: Compress the first video according to the first quantization matrix.
采用本申请实施例中的第一量化矩阵对第一视频进行量化,具体而言,在量化过程中,各个频率分量(变换系数)除以对应的量化参数所指示的量化步长。由于第一量化矩阵中高频分量的量化参数小于低频分量的量化参数,即,高频分量采用的量化步长小,低频分量采用的量化步长大,因此,量化后,高频分量的压缩比小,压缩损失小,低频分量压缩比大,压缩损失大。采用这种非对称量化策略,既能整体上获得较高的压缩率,提高压缩时长,又能满足视频内容分析的质量要求。因此,本申请实施例的视频压缩的方法,能够提高视频压缩的效率。The first video is quantized by using the first quantization matrix in the embodiment of the present application. Specifically, in the quantization process, each frequency component (transformation coefficient) is divided by a quantization step size indicated by a corresponding quantization parameter. Because the quantization parameter of the high frequency component in the first quantization matrix is smaller than the quantization parameter of the low frequency component, that is, the quantization step size used for the high frequency component is small, and the quantization step size used for the low frequency component is large. Therefore, after quantization, the compression ratio of the high frequency component Small, compression loss is small, low frequency component compression ratio is large, compression loss is large. Using this asymmetric quantization strategy can not only achieve a higher compression rate as a whole, increase the compression time, but also meet the quality requirements of video content analysis. Therefore, the video compression method in the embodiments of the present application can improve the efficiency of video compression.
可选地,对于不同的场景,可以配置不同的量化矩阵。也就是说,在高频分量的量化参数小于低频分量的量化参数这一基本设置的基础上,不同 场景的量化矩阵可以采用不同的量化参数设置。Optionally, different quantization matrices can be configured for different scenarios. That is, based on the basic setting that the quantization parameter of the high frequency component is smaller than the quantization parameter of the low frequency component, the quantization matrix of different scenes can be set with different quantization parameters.
具体而言,可以预配置多个量化矩阵,每种场景对应一个量化矩阵。在这种情况下,可以根据第一视频的场景,在多个量化矩阵中选择第一视频的场景对应的第一量化矩阵。Specifically, multiple quantization matrices can be pre-configured, and each scene corresponds to a quantization matrix. In this case, the first quantization matrix corresponding to the scene of the first video may be selected from multiple quantization matrices according to the scene of the first video.
例如,可以为每种视频内容分析的场景配置一个量化矩阵,在对视频进行压缩时,根据视频的场景,查找对应的量化矩阵,采用该量化矩阵进行视频压缩。For example, a quantization matrix can be configured for each scene of video content analysis. When compressing a video, a corresponding quantization matrix is found according to the scene of the video, and the quantization matrix is used for video compression.
应理解,场景与量化矩阵的对应关系可以为一对一,也可以为一对多,本申请对此并不限定。It should be understood that the correspondence between the scene and the quantization matrix may be one-to-one or one-to-many, which is not limited in this application.
可选地,在本申请一个实施例中,可以根据多个场景的视频样本,确定所述多个量化矩阵。Optionally, in an embodiment of the present application, the multiple quantization matrices may be determined according to video samples of multiple scenes.
具体而言,对于每种场景,可以预先根据该场景的视频样本,训练该场景对应的量化矩阵。训练过程可以为,逐渐调整量化矩阵中的量化参数,最终得到满足要求的量化矩阵。Specifically, for each scene, a quantization matrix corresponding to the scene may be trained in advance based on video samples of the scene. The training process may be to gradually adjust the quantization parameters in the quantization matrix, and finally obtain a quantization matrix that meets the requirements.
可选地,在本申请一个实施例中,对于所述多个场景中的特定场景,根据所述特定场景的特定视频样本和视频内容分析结果差异门限,调整初始量化矩阵中的量化参数,得到所述特定场景对应的特定量化矩阵,其中,采用所述特定量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限。Optionally, in an embodiment of the present application, for specific scenes in the multiple scenes, the quantization parameters in the initial quantization matrix are adjusted according to the specific video samples of the specific scenes and the difference threshold of the video content analysis result to obtain A specific quantization matrix corresponding to the specific scene, wherein a difference between a video content analysis result corresponding to the specific video sample compressed by using the specific quantization matrix and a video content analysis result corresponding to the uncompressed specific video sample is not different Greater than the difference threshold of the video content analysis result.
视频内容分析结果差异门限为视频内容分析时,可以容忍的视频内容分析结果差异门限。也就是说,基于压缩后的视频进行视频内容分析得到的视频内容分析结果,与基于未压缩的视频进行视频内容分析得到的视频内容分析结果的差异,在视频内容分析结果差异门限内时,基于压缩后的视频得到的视频内容分析结果是满足要求的。这样,在确定特定场景对应的特定量化矩阵时,可以在初始量化矩阵的基础上,调整初始量化矩阵中的量化参数,用调整后的量化矩阵对特定视频样本进行压缩,然后进行视频内容分析,将得到的视频内容分析结果与未压缩的特定视频样本对应的视频内容分析结果进行比较,若二者差异大于视频内容分析结果差异门限,则继续调整,若二者差异不大于视频内容分析结果差异门限,则调整结束,调整后的量化矩阵为所述特定场景对应的特定量化矩阵。The difference threshold of the video content analysis result is the difference threshold of the video content analysis result that can be tolerated when the video content analysis is performed. That is to say, the difference between the video content analysis result obtained from the video content analysis based on the compressed video and the video content analysis result obtained from the video content analysis based on the uncompressed video is within the threshold of the video content analysis result difference. The video content analysis results obtained from the compressed video meet the requirements. In this way, when determining a specific quantization matrix corresponding to a specific scene, based on the initial quantization matrix, the quantization parameters in the initial quantization matrix can be adjusted, the specific video samples are compressed with the adjusted quantization matrix, and then video content analysis is performed. Compare the obtained video content analysis result with the video content analysis result corresponding to the uncompressed specific video sample. If the difference between the two is greater than the difference threshold of the video content analysis result, continue to adjust, if the difference is not greater than the difference of the video content analysis result The threshold is adjusted, and the adjusted quantization matrix is a specific quantization matrix corresponding to the specific scene.
上述初始量化矩阵可以为标准量化矩阵,也可以为其他量化矩阵,例如,预定义的量化矩阵,之前使用的量化矩阵等,本申请实施例对此并不限定。The above initial quantization matrix may be a standard quantization matrix, or may be another quantization matrix, for example, a predefined quantization matrix, a quantization matrix used before, and the like, which are not limited in this embodiment of the present application.
可选地,可以采用如下方式调整初始量化矩阵中的量化参数:Optionally, the quantization parameters in the initial quantization matrix may be adjusted in the following manner:
对于所述初始量化矩阵中的第一集合中的每一个量化参数,往增大量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异收敛,则调整下一个量化参数;其中,所述第一集合包括所述初始量化矩阵中的M个量化参数,所述M个量化参数对应最低的M个频率,M为预定值;For each quantization parameter in the first set of the initial quantization matrix, adjust in the direction of increasing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed The difference of the video content analysis result corresponding to the specific video sample converges, then the next quantization parameter is adjusted; wherein the first set includes M quantization parameters in the initial quantization matrix, and the M quantization parameters correspond to The lowest M frequencies, M is a predetermined value;
对于所述初始量化矩阵中的第二集合中的每一个量化参数,往减小量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异收敛,且大于所述视频内容分析结果差异门限,则调整下一个量化参数;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限,则停止调整,得到所述特定量化矩阵;其中,所述第二集合包括所述初始量化矩阵中除所述M个量化参数外的其他量化参数。For each quantization parameter in the second set of the initial quantization matrix, adjust in the direction of reducing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed If the difference between the video content analysis results corresponding to the specific video sample converges and is greater than the video content analysis result difference threshold, the next quantization parameter is adjusted; if the adjusted specific quantization matrix is used to compress the specific video sample, the corresponding The difference between the video content analysis result and the uncompressed video content analysis result corresponding to the specific video sample is not greater than the video content analysis result difference threshold, then the adjustment is stopped to obtain the specific quantization matrix; wherein the second set Including other quantization parameters in the initial quantization matrix except the M quantization parameters.
具体而言,针对初始量化矩阵中的不同的量化参数,可以采用不同的调整方向。在本实施例中,对于低频部分的量化参数(第一集合中的量化参数),采用往增大量化参数的方向调整,对于高频部分的量化参数(第二集合中的量化参数),采用往减小量化参数的方向调整。例如,上述M可以为4,即,对于直流分量,以及前三个交流主分量,往增大量化参数的方向调整,其他交流分量,往减小量化参数的方向调整。在调整过程中,先调整第一集合中的量化参数,由于是往增大量化参数的方向调整,调整后视频内容分析结果会变差,即上述差异会变大,当差异收敛(即差异基本不再变化)时,再调整下一个量化参数。Specifically, for different quantization parameters in the initial quantization matrix, different adjustment directions may be adopted. In this embodiment, for the quantization parameters of the low frequency part (quantization parameters in the first set), adjustment in the direction of increasing the quantization parameters is adopted, and for the quantization parameters of the high frequency part (quantization parameters in the second set), Adjust in the direction of decreasing the quantization parameter. For example, the above-mentioned M may be 4, that is, for the DC component and the first three AC main components, it is adjusted in the direction of increasing the quantization parameter, and the other AC components are adjusted in the direction of decreasing the quantization parameter. In the adjustment process, the quantization parameters in the first set are adjusted first. Because the adjustment is in the direction of increasing the quantization parameters, the adjusted video content analysis results will be worse, that is, the above differences will become larger. When the differences converge (that is, the differences are basically When it does not change), adjust the next quantization parameter.
可选地,对于第一集合中的量化参数,可按照频率从低到高的顺序进行调整。Optionally, the quantization parameters in the first set may be adjusted in order from low to high frequency.
当调整完第一集合中的量化参数后,再调整第二集合中的量化参数, 由于是往减小量化参数的方向调整,调整后视频内容分析结果会变好,即上述差异会变小,在差异不大于所述视频内容分析结果差异门限之前,调整到差异收敛后,再调整下一个量化参数,直到差异不大于所述视频内容分析结果差异门限。这样调整后的量化矩阵即为所述特定场景对应的特定量化矩阵。After adjusting the quantization parameters in the first set, adjust the quantization parameters in the second set. Because the adjustment is to reduce the quantization parameters, the adjusted video content analysis results will be better, that is, the above differences will become smaller. Before the difference is not greater than the difference threshold of the video content analysis result, after adjusting to the convergence of the difference, the next quantization parameter is adjusted until the difference is not greater than the difference threshold of the video content analysis result. The adjusted quantization matrix is a specific quantization matrix corresponding to the specific scene.
可选地,对于所述第二集合中的量化参数,可按照频率从低到高的顺序进行调整,也可按照频率从高到低的顺序进行调整,也可按照预定顺序进行调整。可选地,该预定顺序可以与视频内容分析对各频率分量的依赖程度关联,例如,可以按照依赖程度从高到低的顺序进行调整,但本申请实施例对此并不限定。Optionally, the quantization parameters in the second set may be adjusted in order of frequency from low to high, or adjusted in order of frequency from high to low, or may be adjusted in predetermined order. Optionally, the predetermined order may be related to the degree of dependence of the video content analysis on each frequency component, for example, it may be adjusted in the order of the degree of dependence from high to low, but this embodiment of the present application is not limited thereto.
可选地,对初始量化矩阵的调整可以采用缩放矩阵调整。例如,可以根据以下公式进行调整:Optionally, the adjustment of the initial quantization matrix may be adjusted by a scaling matrix. For example, you can adjust based on the following formula:
Q’=Scl*QrQ ’= Scl * Qr
其中,Qr是初始量化矩阵,Scl是缩放矩阵,Q’为最终用于量化的量化矩阵。Among them, Qr is an initial quantization matrix, Scl is a scaling matrix, and Q 'is a quantization matrix finally used for quantization.
Scl包括每个量化参数对应的缩放因子,通过Scl对每个量化参数进行缩放,调整其量化强度。在这种情况下,调整量化参数的过程即为调整每个量化参数对应的缩放因子的过程。确定了每个量化参数对应的缩放因子,即确定了缩放矩阵Scl,从而就确定了量化矩阵Q’。Scl includes a scaling factor corresponding to each quantization parameter. Each quantization parameter is scaled by Scl to adjust its quantization intensity. In this case, the process of adjusting the quantization parameters is the process of adjusting the scaling factor corresponding to each quantization parameter. The scaling factor corresponding to each quantization parameter is determined, that is, the scaling matrix Scl is determined, and thus the quantization matrix Q 'is determined.
举例来说,假设可以容忍的视频内容分析结果差异门限为T,可以采用如下方式得到缩放矩阵Scl。For example, assuming that the difference threshold of the tolerable video content analysis result is T, the scaling matrix Scl can be obtained in the following manner.
获取视频内容分析的场景的视频(样本);Obtain a video (sample) of a scene analyzed by video content;
用视觉算法对原始未压缩视频进行视频内容分析,获得原始分析结果;Perform visual content analysis on the original uncompressed video with a visual algorithm to obtain the original analysis results;
使用Q’=Qr对原始视频压缩,再用视觉算法对解压缩后的视频进行视频内容分析,获得分析结果,计算当前分析结果和原始分析结果的保真度(差异),定义为g,如果g<T,则无需调整,否则,继续下面的调整;Use Q '= Qr to compress the original video, and then use visual algorithms to perform video content analysis on the decompressed video to obtain the analysis results, calculate the fidelity (difference) between the current analysis result and the original analysis result, and define it as g, if g <T, there is no need to adjust, otherwise, continue with the following adjustments;
调整Scl中的逐个缩放因子(每个缩放因子初始值可为1),以从最低频开始调整为例,调整到g收敛,或者g<T;如果g<T,则停止调整;如果g收敛,即前后两次调整的视频内容分析结果的差异很小,例如<0.01T,则停止当前频率的调整,开始调整下一个频率。Adjust the scaling factors one by one in Scl (the initial value of each scaling factor can be 1). Taking the adjustment from the lowest frequency as an example, adjust to g convergence, or g <T; if g <T, stop adjusting; if g convergence , That is, the difference in the analysis results of the video content between the two adjustments is small, for example, <0.01T, the adjustment of the current frequency is stopped, and the adjustment of the next frequency is started.
例如,上述调整中,可采用如下的调整方向:For example, in the above adjustment, the following adjustment directions can be adopted:
第一个分量:直流分量,往放大量化参数的方向调整,即缩放因子>1;The first component: the DC component, which is adjusted in the direction of the amplification and quantization parameter, that is, the zoom factor is greater than 1;
第二、三、四个分量:交流主分量,往放大量化参数的方向调整,即缩放因子>1;如果第一次调整时,g失真很大,则可放弃相应分量的量化参数调整;The second, third, and fourth components: the AC main component, which is adjusted in the direction of the enlarged quantization parameter, that is, the scaling factor is greater than 1; if the g distortion is large during the first adjustment, the adjustment of the quantization parameter of the corresponding component can be abandoned;
其余分量,往缩小量化参数的方向调整,即缩放因子<1。The remaining components are adjusted in the direction of reducing the quantization parameter, that is, the scaling factor is <1.
最终通过上述的调整,获得g<T的Scl矩阵,从而得到量化矩阵Q’。Finally, through the above adjustment, an Scl matrix with g <T is obtained, thereby obtaining a quantization matrix Q '.
根据所述第一量化矩阵对第一视频进行压缩后,后续可以基于压缩后的第一视频,进行视频内容分析。After the first video is compressed according to the first quantization matrix, subsequent video content analysis may be performed based on the compressed first video.
采用上述量化矩阵进行视频压缩,保留住了对视频内容分析有意义的边缘、结构、纹理等高频信息,又同时压低了低频能量,达到了压缩率和离线分析有效性的压缩质量的目的。The above quantization matrix is used for video compression, which retains high-frequency information such as edges, structures, and textures that are meaningful for video content analysis, and simultaneously reduces low-frequency energy, achieving the purpose of compression rate and the quality of compression for offline analysis effectiveness.
因此,本申请实施例的技术方案,根据高频分量的量化参数小于低频分量的量化参数的量化矩阵对视频进行压缩,可以在满足视频内容分析需求的情况下压缩视频,从而能够提高视频压缩的效率。Therefore, the technical solution of the embodiment of the present application compresses a video according to a quantization matrix with a quantization parameter of a high-frequency component smaller than a quantization parameter of a low-frequency component, and can compress the video under a condition that satisfies video content analysis requirements, thereby improving effectiveness.
上文中详细描述了本申请实施例的视频压缩的方法,下面将描述本申请实施例的视频压缩的装置、计算机系统和可移动设备。The video compression method in the embodiment of the present application is described in detail above. The video compression device, computer system, and mobile device in the embodiment of the present application will be described below.
图6示出了本申请一个实施例的视频压缩的装置600的示意性框图。该装置600可以执行上述本申请实施例的视频压缩的方法。FIG. 6 shows a schematic block diagram of a video compression apparatus 600 according to an embodiment of the present application. The apparatus 600 may execute the video compression method in the embodiment of the present application.
如图6所示,该装置600可以包括:As shown in FIG. 6, the apparatus 600 may include:
获取模块610,用于获取第一量化矩阵,其中,所述第一量化矩阵中高频分量的量化参数小于低频分量的量化参数,所述高频分量的量化参数对应的频率高于所述低频分量的量化参数对应的频率;The obtaining module 610 is configured to obtain a first quantization matrix, wherein a quantization parameter of a high frequency component in the first quantization matrix is smaller than a quantization parameter of a low frequency component, and a frequency corresponding to the quantization parameter of the high frequency component is higher than the low frequency component. The corresponding frequency of the quantization parameter;
压缩模块620,用于根据所述第一量化矩阵对第一视频进行压缩。A compression module 620 is configured to compress a first video according to the first quantization matrix.
可选地,在本申请实施例中,压缩后的所述第一视频用于进行视频内容分析。Optionally, in the embodiment of the present application, the compressed first video is used for video content analysis.
可选地,在本申请实施例中,所述获取模块610用于:Optionally, in the embodiment of the present application, the obtaining module 610 is configured to:
根据所述第一视频的场景,在多个量化矩阵中选择所述第一视频的场景对应的所述第一量化矩阵。According to the scene of the first video, the first quantization matrix corresponding to the scene of the first video is selected from a plurality of quantization matrices.
可选地,在本申请实施例中,如图7所示,该装置600还包括:Optionally, in the embodiment of the present application, as shown in FIG. 7, the apparatus 600 further includes:
配置模块630,用于预配置所述多个量化矩阵。A configuration module 630 is configured to pre-configure the multiple quantization matrices.
可选地,在本申请实施例中,所述配置模块630用于:Optionally, in the embodiment of the present application, the configuration module 630 is configured to:
根据多个场景的视频样本,确定所述多个量化矩阵。The multiple quantization matrices are determined according to video samples of multiple scenes.
可选地,在本申请实施例中,所述配置模块630用于:Optionally, in the embodiment of the present application, the configuration module 630 is configured to:
对于所述多个场景中的特定场景,根据所述特定场景的特定视频样本和视频内容分析结果差异门限,调整初始量化矩阵中的量化参数,得到所述特定场景对应的特定量化矩阵,For a specific scene in the multiple scenes, adjusting a quantization parameter in an initial quantization matrix according to a difference threshold of a specific video sample and a video content analysis result of the specific scene to obtain a specific quantization matrix corresponding to the specific scene,
其中,采用所述特定量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限。Wherein, a difference between a video content analysis result corresponding to the specific video sample compressed by using the specific quantization matrix and a video content analysis result corresponding to the uncompressed specific video sample is not greater than a difference threshold of the video content analysis result.
可选地,在本申请实施例中,所述配置模块630用于:Optionally, in the embodiment of the present application, the configuration module 630 is configured to:
对于所述初始量化矩阵中的第一集合中的每一个量化参数,往增大量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异收敛,则调整下一个量化参数;其中,所述第一集合包括所述初始量化矩阵中的M个量化参数,所述M个量化参数对应最低的M个频率,M为预定值;For each quantization parameter in the first set of the initial quantization matrix, adjust in the direction of increasing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed The difference of the video content analysis result corresponding to the specific video sample converges, then the next quantization parameter is adjusted; wherein the first set includes M quantization parameters in the initial quantization matrix, and the M quantization parameters correspond to The lowest M frequencies, M is a predetermined value;
对于所述初始量化矩阵中的第二集合中的每一个量化参数,往减小量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异收敛,且大于所述视频内容分析结果差异门限,则调整下一个量化参数;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限,则停止调整,得到所述特定量化矩阵;其中,所述第二集合包括所述初始量化矩阵中除所述M个量化参数外的其他量化参数。For each quantization parameter in the second set of the initial quantization matrix, adjust in the direction of reducing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed If the difference between the video content analysis results corresponding to the specific video sample converges and is greater than the video content analysis result difference threshold, the next quantization parameter is adjusted; if the adjusted specific quantization matrix is used to compress the specific video sample, the corresponding The difference between the video content analysis result and the uncompressed video content analysis result corresponding to the specific video sample is not greater than the video content analysis result difference threshold, then the adjustment is stopped to obtain the specific quantization matrix; wherein the second set Including other quantization parameters in the initial quantization matrix except the M quantization parameters.
可选地,在本申请实施例中,所述配置模块630用于:对于所述第一集合中的量化参数,按照频率从低到高的顺序进行调整。Optionally, in the embodiment of the present application, the configuration module 630 is configured to adjust the quantization parameters in the first set in a descending order of frequency.
可选地,在本申请实施例中,所述配置模块630用于:对于所述第二集合中的量化参数,按照频率从低到高或者从高到低的顺序进行调整。Optionally, in the embodiment of the present application, the configuration module 630 is configured to adjust the quantization parameters in the second set according to a frequency from low to high or from high to low.
可选地,在本申请实施例中,所述配置模块630用于:对于所述第二集合中的量化参数,按照预定顺序进行调整。Optionally, in the embodiment of the present application, the configuration module 630 is configured to adjust the quantization parameters in the second set in a predetermined order.
可选地,在本申请实施例中,所述M为4。Optionally, in the embodiment of the present application, the M is 4.
可选地,在本申请实施例中,所述初始量化矩阵为标准量化矩阵Optionally, in the embodiment of the present application, the initial quantization matrix is a standard quantization matrix
应理解,上述本申请实施例的视频压缩的装置可以是芯片,其具体可以由电路实现,但本申请实施例对具体的实现形式不做限定。It should be understood that the foregoing video compression device in the embodiment of the present application may be a chip, which may be specifically implemented by a circuit, but the embodiment of the present application does not limit a specific implementation form.
本发明实施例还提供了一种编码器,该编码器包括上述本发明各种实施例的视频压缩的装置。An embodiment of the present invention further provides an encoder, and the encoder includes the foregoing video compression apparatus according to various embodiments of the present invention.
图8示出了本申请实施例的计算机系统800的示意性框图。FIG. 8 shows a schematic block diagram of a computer system 800 according to an embodiment of the present application.
如图8所示,该计算机系统800可以包括处理器810和存储器820。As shown in FIG. 8, the computer system 800 may include a processor 810 and a memory 820.
应理解,该计算机系统800还可以包括其他计算机系统中通常所包括的部件,例如,输入输出设备、通信接口等,本申请实施例对此并不限定。It should be understood that the computer system 800 may also include components generally included in other computer systems, such as input-output devices, communication interfaces, and the like, which is not limited in the embodiments of the present application.
存储器820用于存储计算机可执行指令。The memory 820 is configured to store computer-executable instructions.
存储器820可以是各种种类的存储器,例如可以包括高速随机存取存储器(Random Access Memory,RAM),还可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器,本申请实施例对此并不限定。The memory 820 may be various types of memory, for example, it may include high-speed random access memory (Random Access Memory, RAM), and may also include non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Examples are not limited to this.
处理器810用于访问该存储器820,并执行该计算机可执行指令,以进行上述本申请实施例的视频压缩的方法中的操作。The processor 810 is configured to access the memory 820 and execute the computer-executable instructions to perform operations in the video compression method in the embodiment of the present application.
处理器810可以包括微处理器,现场可编程门阵列(Field-Programmable Gate Array,FPGA),中央处理器(Central Processing unit,CPU),图形处理器(Graphics Processing Unit,GPU)等,本申请实施例对此并不限定。The processor 810 may include a microprocessor, a Field-Programmable Gate Array (FPGA), a Central Processing Unit (CPU), and a Graphics Processing Unit (GPU). Examples are not limited to this.
本申请实施例还提供了一种可移动设备,该可移动设备可以包括上述本申请各种实施例的视频压缩的装置或者计算机系统。The embodiment of the present application further provides a movable device, and the movable device may include the video compression device or the computer system of the various embodiments of the present application described above.
本申请实施例的视频压缩的装置、计算机系统和可移动设备可对应于本申请实施例的视频压缩的方法的执行主体,并且视频压缩的装置、计算机系统和可移动设备中的各个模块的上述和其它操作和/或功能分别为了实现前述各个方法的相应流程,为了简洁,在此不再赘述。The video compression device, computer system, and mobile device according to the embodiments of the present application may correspond to the execution subject of the video compression method according to the embodiments of the present application. And other operations and / or functions are respectively used to implement the corresponding processes of the foregoing methods, and for the sake of brevity, they are not repeated here.
本申请实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述本申请实施例的视频压缩的方法。An embodiment of the present application further provides a computer storage medium, and the computer storage medium stores a program code, where the program code may be used to instruct to perform the foregoing video compression method in the embodiment of the present application.
应理解,在本申请实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单 独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that, in the embodiments of the present application, the term “and / or” is merely an association relationship describing an associated object, and indicates that there may be three relationships. For example, A and / or B can indicate that there are three cases in which A exists alone, A and B exist, and B exists alone. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art may realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the hardware and software Interchangeability. In the above description, the composition and steps of each example have been described generally in terms of functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions in the embodiments of the present application.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存 储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application is essentially a part that contributes to the existing technology, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium Included are instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. The foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above is only a specific implementation of this application, but the scope of protection of this application is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, and these modifications or replacements should be covered by the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (26)

  1. 一种视频压缩的方法,其特征在于,包括:A video compression method, comprising:
    获取第一量化矩阵,其中,所述第一量化矩阵中高频分量的量化参数小于低频分量的量化参数,所述高频分量的量化参数对应的频率高于所述低频分量的量化参数对应的频率;A first quantization matrix is obtained, wherein the quantization parameter of the high frequency component in the first quantization matrix is smaller than the quantization parameter of the low frequency component, and the frequency corresponding to the quantization parameter of the high frequency component is higher than the frequency corresponding to the quantization parameter of the low frequency component. ;
    根据所述第一量化矩阵对第一视频进行压缩。Compress the first video according to the first quantization matrix.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    基于压缩后的所述第一视频,进行视频内容分析。Perform video content analysis based on the compressed first video.
  3. 根据权利要求1或2所述的方法,其特征在于,所述获取第一量化矩阵,包括:The method according to claim 1 or 2, wherein the acquiring the first quantization matrix comprises:
    根据所述第一视频的场景,在多个量化矩阵中选择所述第一视频的场景对应的所述第一量化矩阵。According to the scene of the first video, the first quantization matrix corresponding to the scene of the first video is selected from a plurality of quantization matrices.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, further comprising:
    预配置所述多个量化矩阵。The plurality of quantization matrices are pre-configured.
  5. 根据权利要求4所述的方法,其特征在于,所述预配置所述多个量化矩阵,包括:The method according to claim 4, wherein the pre-configuring the plurality of quantization matrices comprises:
    根据多个场景的视频样本,确定所述多个量化矩阵。The multiple quantization matrices are determined according to video samples of multiple scenes.
  6. 根据权利要求5所述的方法,其特征在于,所述根据多个场景的视频样本,确定所述多个量化矩阵,包括:The method according to claim 5, wherein the determining the multiple quantization matrices based on video samples of multiple scenes comprises:
    对于所述多个场景中的特定场景,根据所述特定场景的特定视频样本和视频内容分析结果差异门限,调整初始量化矩阵中的量化参数,得到所述特定场景对应的特定量化矩阵,For a specific scene in the multiple scenes, adjusting a quantization parameter in an initial quantization matrix according to a difference threshold of a specific video sample and a video content analysis result of the specific scene to obtain a specific quantization matrix corresponding to the specific scene,
    其中,采用所述特定量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限。Wherein, a difference between a video content analysis result corresponding to the specific video sample compressed by using the specific quantization matrix and a video content analysis result corresponding to the uncompressed specific video sample is not greater than a difference threshold of the video content analysis result.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述特定场景的特定视频样本和视频内容分析结果差异门限,调整初始量化矩阵中的量化参数,包括:The method according to claim 6, wherein the adjusting a quantization parameter in an initial quantization matrix according to a difference threshold of a specific video sample and a video content analysis result of the specific scene comprises:
    对于所述初始量化矩阵中的第一集合中的每一个量化参数,往增大量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果 的差异收敛,则调整下一个量化参数;其中,所述第一集合包括所述初始量化矩阵中的M个量化参数,所述M个量化参数对应最低的M个频率,M为预定值;For each quantization parameter in the first set of the initial quantization matrix, adjust in the direction of increasing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed The difference of the video content analysis result corresponding to the specific video sample converges, then the next quantization parameter is adjusted; wherein the first set includes M quantization parameters in the initial quantization matrix, and the M quantization parameters correspond to The lowest M frequencies, M is a predetermined value;
    对于所述初始量化矩阵中的第二集合中的每一个量化参数,往减小量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异收敛,且大于所述视频内容分析结果差异门限,则调整下一个量化参数;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限,则停止调整,得到所述特定量化矩阵;其中,所述第二集合包括所述初始量化矩阵中除所述M个量化参数外的其他量化参数。For each quantization parameter in the second set of the initial quantization matrix, adjust in the direction of reducing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed If the difference between the video content analysis results corresponding to the specific video sample converges and is greater than the video content analysis result difference threshold, the next quantization parameter is adjusted; if the adjusted specific quantization matrix is used to compress the specific video sample, the corresponding The difference between the video content analysis result and the uncompressed video content analysis result corresponding to the specific video sample is not greater than the video content analysis result difference threshold, then the adjustment is stopped to obtain the specific quantization matrix; wherein the second set Including other quantization parameters in the initial quantization matrix except the M quantization parameters.
  8. 根据权利要求7所述的方法,其特征在于,对于所述第一集合中的量化参数,按照频率从低到高的顺序进行调整。The method according to claim 7, wherein the quantization parameters in the first set are adjusted in order from low to high frequency.
  9. 根据权利要求7或8所述的方法,其特征在于,对于所述第二集合中的量化参数,按照频率从低到高或者从高到低的顺序进行调整。The method according to claim 7 or 8, wherein the quantization parameters in the second set are adjusted in order of frequency from low to high or from high to low.
  10. 根据权利要求7或8所述的方法,其特征在于,对于所述第二集合中的量化参数,按照预定顺序进行调整。The method according to claim 7 or 8, wherein the quantization parameters in the second set are adjusted in a predetermined order.
  11. 根据权利要求7至10中任一项所述的方法,其特征在于,所述M为4。The method according to any one of claims 7 to 10, wherein the M is 4.
  12. 根据权利要求6至11中任一项所述的方法,其特征在于,所述初始量化矩阵为标准量化矩阵。The method according to any one of claims 6 to 11, wherein the initial quantization matrix is a standard quantization matrix.
  13. 一种视频压缩的装置,其特征在于,包括:A video compression device, comprising:
    获取模块,用于获取第一量化矩阵,其中,所述第一量化矩阵中高频分量的量化参数小于低频分量的量化参数,所述高频分量的量化参数对应的频率高于所述低频分量的量化参数对应的频率;The obtaining module is configured to obtain a first quantization matrix, wherein the quantization parameter of the high frequency component in the first quantization matrix is smaller than the quantization parameter of the low frequency component, and the frequency corresponding to the quantization parameter of the high frequency component is higher than that of the low frequency component. The frequency corresponding to the quantization parameter;
    压缩模块,用于根据所述第一量化矩阵对第一视频进行压缩。A compression module, configured to compress a first video according to the first quantization matrix.
  14. 根据权利要求13所述的装置,其特征在于,压缩后的所述第一视频用于进行视频内容分析。The apparatus according to claim 13, wherein the compressed first video is used for video content analysis.
  15. 根据权利要求13或14所述的装置,其特征在于,所述获取模块用于:The apparatus according to claim 13 or 14, wherein the obtaining module is configured to:
    根据所述第一视频的场景,在多个量化矩阵中选择所述第一视频的场景对应的所述第一量化矩阵。According to the scene of the first video, the first quantization matrix corresponding to the scene of the first video is selected from a plurality of quantization matrices.
  16. 根据权利要求15所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 15, further comprising:
    配置模块,用于预配置所述多个量化矩阵。A configuration module, configured to pre-configure the multiple quantization matrices.
  17. 根据权利要求16所述的装置,其特征在于,所述配置模块用于:The apparatus according to claim 16, wherein the configuration module is configured to:
    根据多个场景的视频样本,确定所述多个量化矩阵。The multiple quantization matrices are determined according to video samples of multiple scenes.
  18. 根据权利要求17所述的装置,其特征在于,所述配置模块用于:The apparatus according to claim 17, wherein the configuration module is configured to:
    对于所述多个场景中的特定场景,根据所述特定场景的特定视频样本和视频内容分析结果差异门限,调整初始量化矩阵中的量化参数,得到所述特定场景对应的特定量化矩阵,For a specific scene in the multiple scenes, adjusting a quantization parameter in an initial quantization matrix according to a difference threshold of a specific video sample and a video content analysis result of the specific scene to obtain a specific quantization matrix corresponding to the specific scene,
    其中,采用所述特定量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限。Wherein, a difference between a video content analysis result corresponding to the specific video sample compressed by using the specific quantization matrix and a video content analysis result corresponding to the uncompressed specific video sample is not greater than a difference threshold of the video content analysis result.
  19. 根据权利要求18所述的装置,其特征在于,所述配置模块用于:The apparatus according to claim 18, wherein the configuration module is configured to:
    对于所述初始量化矩阵中的第一集合中的每一个量化参数,往增大量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异收敛,则调整下一个量化参数;其中,所述第一集合包括所述初始量化矩阵中的M个量化参数,所述M个量化参数对应最低的M个频率,M为预定值;For each quantization parameter in the first set of the initial quantization matrix, adjust in the direction of increasing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed The difference of the video content analysis result corresponding to the specific video sample converges, then the next quantization parameter is adjusted; wherein the first set includes M quantization parameters in the initial quantization matrix, and the M quantization parameters correspond to The lowest M frequencies, M is a predetermined value;
    对于所述初始量化矩阵中的第二集合中的每一个量化参数,往减小量化参数的方向调整;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异收敛,且大于所述视频内容分析结果差异门限,则调整下一个量化参数;若采用调整的量化矩阵压缩后的所述特定视频样本对应的视频内容分析结果与未压缩的所述特定视频样本对应的视频内容分析结果的差异不大于所述视频内容分析结果差异门限,则停止调整,得到所述特定量化矩阵;其中,所述第二集合包括所述初始量化矩阵中除所述M个量化参数外的其他量化参数。For each quantization parameter in the second set of the initial quantization matrix, adjust in the direction of reducing the quantization parameter; if the adjusted quantization matrix is used to compress the video content analysis result corresponding to the specific video sample and the uncompressed If the difference between the video content analysis results corresponding to the specific video sample converges and is greater than the video content analysis result difference threshold, the next quantization parameter is adjusted; if the adjusted specific quantization matrix is used to compress the specific video sample, the corresponding The difference between the video content analysis result and the uncompressed video content analysis result corresponding to the specific video sample is not greater than the video content analysis result difference threshold, then the adjustment is stopped to obtain the specific quantization matrix; wherein the second set Including other quantization parameters in the initial quantization matrix except the M quantization parameters.
  20. 根据权利要求19所述的装置,其特征在于,所述配置模块用于:对于所述第一集合中的量化参数,按照频率从低到高的顺序进行调整。The device according to claim 19, wherein the configuration module is configured to adjust the quantization parameters in the first set in order from low to high frequency.
  21. 根据权利要求19或20所述的装置,其特征在于,所述配置模块用于:对于所述第二集合中的量化参数,按照频率从低到高或者从高到低的顺序进行调整。The device according to claim 19 or 20, wherein the configuration module is configured to adjust the quantization parameters in the second set in a sequence from low to high or high to low.
  22. 根据权利要求19或20所述的装置,其特征在于,所述配置模块用于:对于所述第二集合中的量化参数,按照预定顺序进行调整。The device according to claim 19 or 20, wherein the configuration module is configured to adjust the quantization parameters in the second set in a predetermined order.
  23. 根据权利要求19至22中任一项所述的装置,其特征在于,所述M为4。The device according to any one of claims 19 to 22, wherein the M is 4.
  24. 根据权利要求18至23中任一项所述的装置,其特征在于,所述初始量化矩阵为标准量化矩阵。The apparatus according to any one of claims 18 to 23, wherein the initial quantization matrix is a standard quantization matrix.
  25. 一种计算机系统,其特征在于,包括:A computer system, comprising:
    存储器,用于存储计算机可执行指令;Memory for storing computer-executable instructions;
    处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行根据权利要求1至12中任一项所述的方法中的操作。A processor for accessing the memory and executing the computer-executable instructions to perform operations in the method according to any one of claims 1 to 12.
  26. 一种可移动设备,其特征在于,包括:A movable device, comprising:
    根据权利要求13至24中任一项所述的装置;或者,The device according to any one of claims 13 to 24; or,
    根据权利要求25所述的计算机系统。The computer system of claim 25.
PCT/CN2018/097343 2018-07-27 2018-07-27 Video compression method and apparatus, computer system, and mobile device WO2020019279A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880038972.6A CN110771167A (en) 2018-07-27 2018-07-27 Video compression method, device, computer system and movable equipment
PCT/CN2018/097343 WO2020019279A1 (en) 2018-07-27 2018-07-27 Video compression method and apparatus, computer system, and mobile device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097343 WO2020019279A1 (en) 2018-07-27 2018-07-27 Video compression method and apparatus, computer system, and mobile device

Publications (1)

Publication Number Publication Date
WO2020019279A1 true WO2020019279A1 (en) 2020-01-30

Family

ID=69180715

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097343 WO2020019279A1 (en) 2018-07-27 2018-07-27 Video compression method and apparatus, computer system, and mobile device

Country Status (2)

Country Link
CN (1) CN110771167A (en)
WO (1) WO2020019279A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437301B (en) * 2020-10-13 2021-11-02 北京大学 Code rate control method and device for visual analysis, storage medium and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695132A (en) * 2004-01-20 2010-04-14 松下电器产业株式会社 Picture coding method, picture decoding method, picture coding apparatus, picture decoding apparatus, and program thereof
US20130188692A1 (en) * 2012-01-25 2013-07-25 Yi-Jen Chiu Systems, methods, and computer program products for transform coefficient sub-sampling
CN103444180A (en) * 2011-03-09 2013-12-11 日本电气株式会社 Video encoding device, video decoding device, video encoding method, and video decoding method
CN106063265A (en) * 2014-02-26 2016-10-26 杜比实验室特许公司 Luminance based coding tools for video compression

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695132A (en) * 2004-01-20 2010-04-14 松下电器产业株式会社 Picture coding method, picture decoding method, picture coding apparatus, picture decoding apparatus, and program thereof
CN103444180A (en) * 2011-03-09 2013-12-11 日本电气株式会社 Video encoding device, video decoding device, video encoding method, and video decoding method
US20130188692A1 (en) * 2012-01-25 2013-07-25 Yi-Jen Chiu Systems, methods, and computer program products for transform coefficient sub-sampling
CN106063265A (en) * 2014-02-26 2016-10-26 杜比实验室特许公司 Luminance based coding tools for video compression

Also Published As

Publication number Publication date
CN110771167A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
US11783512B2 (en) Attribute value of reconstructed position associated with plural original points
US10666979B2 (en) Image processing device and image processing method for encoding/decoding omnidirectional image divided vertically
US10911781B2 (en) Image processing device and image processing method for encoding/decoding omnidirectional images at different resolutions
US20210211698A1 (en) Parallel video encoding
KR102599314B1 (en) Quantization step parameters for point cloud compression
KR20130136170A (en) Apparatus and method for image processing for 3d image
CN112771859A (en) Video data coding method and device based on region of interest and storage medium
US20230239516A1 (en) Entropy encoding/decoding method and apparatus
US10735724B2 (en) Method and device for compressing image on basis of photography information
US11113866B2 (en) Method and apparatus for point cloud compression
US20210014486A1 (en) Image transmission
JP2023504408A (en) Method and apparatus for chroma sampling
WO2021098030A1 (en) Method and apparatus for video encoding
KR20220143859A (en) Methods for processing chroma signals
JP2023507259A (en) How to perform wraparound motion compensation
US20240205435A1 (en) Encoding and decoding method and apparatus
WO2020019279A1 (en) Video compression method and apparatus, computer system, and mobile device
US20230239500A1 (en) Intra Prediction Method and Apparatus
WO2012118569A1 (en) Visually optimized quantization
US20240070924A1 (en) Compression of temporal data by using geometry-based point cloud compression
JP2022548203A (en) Method and apparatus for signaling sub-block transform information
CN116325732A (en) Decoding and encoding method, decoder, encoder and encoding and decoding system of point cloud
CN110876061A (en) Chroma block prediction method and device
RU2778377C1 (en) Method and apparatus for encoding a point cloud
US20240129546A1 (en) Artificial intelligence-based image encoding and decoding apparatus, and image encoding and decoding method thereby

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: 18927971

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: 18927971

Country of ref document: EP

Kind code of ref document: A1