WO2020042177A1 - 视频编码质量平滑度的优化方法、装置、设备及存储介质 - Google Patents

视频编码质量平滑度的优化方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020042177A1
WO2020042177A1 PCT/CN2018/103661 CN2018103661W WO2020042177A1 WO 2020042177 A1 WO2020042177 A1 WO 2020042177A1 CN 2018103661 W CN2018103661 W CN 2018103661W WO 2020042177 A1 WO2020042177 A1 WO 2020042177A1
Authority
WO
WIPO (PCT)
Prior art keywords
current
encoding
video
frame
video encoding
Prior art date
Application number
PCT/CN2018/103661
Other languages
English (en)
French (fr)
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 CN201880001619.0A priority Critical patent/CN109219960B/zh
Priority to PCT/CN2018/103661 priority patent/WO2020042177A1/zh
Publication of WO2020042177A1 publication Critical patent/WO2020042177A1/zh

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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel

Definitions

  • the invention belongs to the field of video technology, and particularly relates to a method, a device, a device and a storage medium for optimizing the smoothness of video coding quality.
  • High Efficiency Video Coding H.265 / HEVC
  • QP Quantization parameters
  • the quantization parameters of the current video encoding frame are generally predicted according to the rate distortion function model of the current video encoding frame.
  • the QP of the first video encoding frame in an encoding refresh cycle (that is, the initial quantization parameter of the encoding refresh cycle) has an important impact on the decision and optimization of the QP of the subsequent video encoding frames. Therefore, we only need to optimize each encoding
  • the initial QP of the refresh cycle can accurately predict the optimal value of the initial QP, so that the video encoding quality can be smoothly optimized globally.
  • the purpose of the present invention is to provide a method, device, equipment and storage medium for optimizing smoothness of video coding quality, which aims to solve the problem that the prior art cannot provide an effective method for optimizing smoothness of video coding quality, which leads to the initial quantization of prediction.
  • the present invention provides a method for optimizing the smoothness of video coding quality.
  • the method includes the following steps:
  • the current video encoding frame is the first video encoding frame of the current encoding refresh period, determining whether the current encoding refresh period is the first encoding refresh period of the video to be encoded;
  • the current encoding refresh period is the first encoding refresh period, obtaining a target number of pixels per pixel of a currently unencoded video encoding frame of the video to be encoded, and according to the target number of pixels per pixel of the video to be encoded And the trained first preset SVR model predicts initial quantization parameters of the current encoding refresh cycle;
  • the current encoding refresh period is not the first encoding refresh period, obtaining a target number of pixels per pixel of the current unencoded video encoding frame, and each video encoding frame of a previous encoding refresh period of the current encoding refresh period.
  • the average value and standard deviation of the quantization parameter, and according to the number of target bits per pixel of the current unencoded video encoding frame, the average and standard deviation of the quantization parameters of each video encoding frame in the last encoding refresh cycle, and the trained first Two preset SVR models predict initial quantization parameters of the current encoding refresh cycle.
  • the present invention provides a device for optimizing smoothness of video coding quality, the device includes:
  • a receiving determining unit configured to receive a current video encoding frame of a video to be encoded, and determine whether the current video encoding frame is a first video encoding frame of a current encoding refresh period
  • a period judging unit configured to determine whether the current encoding refresh period is the first encoding refresh period of the video to be encoded when the current video encoding frame is the first video encoding frame of the current encoding refresh period;
  • a first prediction unit configured to obtain, when the current encoding refresh period is the first encoding refresh period, a target number of pixels per pixel of a currently unencoded video encoding frame in the video to be encoded, and The number of target bits per pixel of the video and the trained first preset SVR model predicts the initial quantization parameters of the current encoding refresh cycle;
  • a second prediction unit configured to: when the current encoding refresh period is not the first encoding refresh period, obtain a target number of bits per pixel of the current unencoded video encoding frame, and a previous one of the current encoding refresh period The average and standard deviation of the quantization parameters of each video encoding frame in the encoding refresh cycle, and based on the target number of bits per pixel of the current unencoded video encoding frame, the average of the quantization parameters of each video encoding frame in the previous encoding refresh cycle, and The standard variance and the trained second preset SVR model predict the initial quantization parameters of the current encoding refresh cycle.
  • the present invention also provides a video encoding device including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • a processor executes the computer program, Implement the steps of the prediction method for the initial quantization parameters as described above.
  • the present invention also provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements the steps of the method for predicting an initial quantization parameter as described above.
  • the present invention first receives the current video encoding frame of the video to be encoded, determines whether the current video encoding frame is the first video encoding frame of the current encoding refresh cycle, and judges when the current video encoding frame is the first video encoding frame of the current encoding refresh cycle.
  • the current encoding refresh cycle is the first encoding refresh cycle of the video to be encoded, and then based on the encoding refresh cycle of the current video encoding frame, obtain the characteristics of the current video encoding frame, and then predict the current based on the characteristics and the trained corresponding SVR model
  • the initial quantization parameters of the encoding refresh cycle thereby improving the accuracy of the quantization parameters of the current video encoding frame in the corresponding encoding refresh cycle by accurately predicting the optimal value of the initial quantization parameters of each encoding refresh cycle, thereby improving the smoothness of the video encoding quality.
  • FIG. 1 is an implementation flowchart of a method for optimizing smoothness of video coding quality provided by Embodiment 1 of the present invention
  • FIG. 2 is an implementation flowchart of a method for optimizing smoothness of video coding quality provided by Embodiment 2 of the present invention
  • Embodiment 3 is a schematic structural diagram of an apparatus for optimizing smoothness of video coding quality provided by Embodiment 3 of the present invention
  • FIG. 4 is a schematic structural diagram of an apparatus for optimizing smoothness of video coding quality provided by Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of a video encoding device according to a fifth embodiment of the present invention.
  • FIG. 1 shows the implementation process of the method for optimizing the smoothness of video coding quality provided by the first embodiment of the present invention. For convenience of explanation, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
  • step S101 a current video encoding frame of a video to be encoded is received, and it is determined whether the current video encoding frame is the first video encoding frame of the current encoding refresh cycle.
  • the embodiments of the present invention are applicable to a video encoding device, such as a video camera, a mobile phone, and the like.
  • a video encoding device such as a video camera, a mobile phone, and the like.
  • the optimization degree of the initial quantization parameter of the first video encoding frame in the same encoding refresh period has an important impact on other video encoding frames and the overall encoding process in the encoding refresh period
  • step S102 when the current video encoding frame is the first code video encoding frame of the current encoding refresh period, it is determined whether the current encoding refresh period is the first encoding refresh period of the video to be encoded.
  • the initial quantization parameter of the first encoding refresh cycle since the initial quantization parameter of the first encoding refresh cycle is predicted, there is no quantization parameter data of each video encoding frame of the previous encoding refresh cycle, and less information can be extracted from the video encoding frame.
  • the video encoding frame is the first video encoding frame of the current encoding refresh period, judging whether the current encoding refresh period is the first encoding refresh period of the video to be encoded, which is convenient for determining which feature set is used to predict the quantization parameters of the frame to be encoded.
  • step S103 when the current encoding refresh period is the first encoding refresh period, the number of target bits per pixel of the current unencoded video encoding frame of the video to be encoded is obtained, and according to the number of target bits per pixel of the video to be encoded and the trained The first preset SVR model predicts initial quantization parameters of the current encoding refresh cycle.
  • the first preset SVR (Support Vector Regression) model is a support vector machine regression model trained by the SVR model. Because when predicting the initial quantization parameters of the first encoding cycle, there is no quantization parameter data of each video frame of the previous encoding cycle, and the target number of bits per pixel of the currently unencoded video encoding frame is all the video encoding of the video to be encoded Therefore, when predicting the initial quantization parameters of the first encoding cycle, when the number of target bits per pixel of all video encoding frames is used as a feature, the number of target bits per pixel of all video encoding frames and the trained preset SVR are used. The model predicts the initial quantization parameters for the current encoding cycle.
  • step S104 when the current encoding refresh period is not the first encoding refresh period, the target bit number per pixel of the current unencoded video encoding frame and the average of the quantization parameters of each video encoding frame in the previous encoding refresh period of the current encoding refresh period are obtained. Value and standard deviation, and predict the current encoding based on the number of target bits per pixel of the currently unencoded video encoding frame, the average and standard deviation of the quantization parameters of each video encoding frame in the last encoding refresh cycle, and the trained second preset SVR model Initial quantization parameters for the refresh cycle.
  • the second preset SVR model is a support vector machine regression model trained by the SVR model. Based on testing various feature combinations of the video data, it can be obtained that when each of the currently unencoded video encoded frames is used, When the number of pixel target bits, the average and standard deviation of the quantization parameters of each video encoding frame in the current encoding refresh cycle are used as features, the predicted initial quantization parameter has the smallest error with the optimal value. However, when predicting the initial quantization parameters of the video to be encoded, There is no quantization parameter data for each video encoding frame of the current encoding refresh cycle, so the quantization parameters of each video encoding frame of the previous encoding refresh cycle that is closest to it are taken.
  • the current encoding refresh cycle is not the first encoding refresh cycle
  • the current The number of target bits per pixel of the encoded video encoding frame, the average and standard deviation of the quantization parameters of each video encoding frame in the previous encoding refresh cycle are used as features, and the initial quantization of the current encoding refresh cycle is predicted by the trained second preset SVR model parameter.
  • the current video encoding frame of the video to be encoded is received, and it is determined whether the current video encoding frame is the first video encoding frame of the current encoding refresh cycle.
  • Frame determine whether the current encoding refresh cycle is the first encoding refresh cycle of the video to be encoded, and then obtain the characteristics of the current video encoding frame according to the encoding refresh cycle of the current video encoding frame, and then according to the characteristics and the trained corresponding
  • the SVR model predicts the initial quantization parameters of the current encoding refresh cycle, thereby improving the accuracy of the quantization parameters of the current video encoding frame in the corresponding encoding refresh cycle by accurately predicting the optimal value of the initial quantization parameters of each encoding refresh cycle, thereby improving the quality of video encoding. Smoothness.
  • FIG. 2 shows the implementation flow of the method for optimizing the smoothness of video coding quality provided by the second embodiment of the present invention.
  • FIG. 2 shows the implementation flow of the method for optimizing the smoothness of video coding quality provided by the second embodiment of the present invention.
  • the details are as follows:
  • step S201 initial quantization parameters of the first feature set, the second feature set, and the training samples of each training sample in the preset video sequence are obtained, and the initial quantization parameters of the training samples are set as the learning labels of the initial SVR model.
  • the video sequence is a plurality of videos for training the initial SVR model, and each encoding refresh period of the video in the video sequence is used as a training sample.
  • the learning label of the SVR model represents the output data of the SVR model (each training sample).
  • Initial quantization parameters) the first feature set contains the number of target bits per pixel of the current uncoded video coded frame of each training sample, and the second feature set contains the number of target bits per pixel of the current uncoded video coded frame of each training sample and The average and standard deviation of the quantization parameters of each video encoding frame of each training sample.
  • the closest quantization parameter of each video encoding frame in the previous encoding refresh cycle is taken. Mean and standard deviation.
  • the training SVR model Before training the initial SVR model, the training SVR model can be optimized by optimizing the initial quantization parameters of the learning labels. Therefore, when obtaining the initial quantization parameters of the training samples, it is preferable to train the training by the penalty term of the expected bit accuracy.
  • the initial quantization parameters of the samples are filtered, thereby improving the training effect of the model. Specifically, when it is larger than the preset threshold, the corresponding initial quantization parameter is retained as an alternative to the optimal value of the initial quantization parameter. Otherwise, the corresponding initial quantization parameter is discarded from the optimal value of the initial initial quantization parameter, thereby optimizing for training.
  • the preset learning labels of the SVR model further improve the accuracy of predicting the initial quantization parameters, where BRA is the expected bit accuracy, TBR is the target bit rate, and ABR is the actual bit rate.
  • step S202 the initial SVR model is respectively trained through the first feature set and the second feature set to obtain a trained first preset SVR model and a second preset SVR model.
  • the initial SVR model is trained through the first feature set and the second feature set, respectively, so as to obtain a trained first preset SVR model and a second preset SVR model.
  • the initial SVR model is an ⁇ -SVR algorithm model with a Radial Basis Function (RBF) kernel, thereby improving the accuracy of model regression.
  • RBF Radial Basis Function
  • step S203 the current video encoding frame of the video to be encoded is received, and it is determined whether the current video encoding frame is the first video encoding frame of the current encoding refresh cycle.
  • the optimization degree of the initial quantization parameter of the first video encoding frame in the same encoding refresh period has an important impact on other video encoding frames and the overall encoding process in the encoding refresh period
  • step S204 when the current video encoding frame is the first code video encoding frame of the current encoding refresh period, it is determined whether the current encoding refresh period is the first encoding refresh period of the video to be encoded.
  • the initial quantization parameter of the first encoding refresh cycle since the initial quantization parameter of the first encoding refresh cycle is predicted, there is no quantization parameter data of each video encoding frame of the previous encoding refresh cycle, and less information can be extracted from the video encoding frame.
  • the video encoding frame is the first video encoding frame of the current encoding refresh period, it is determined whether the current encoding refresh period is the first encoding refresh period of the video to be encoded, which is convenient for determining which feature set is used to predict the quantization parameters of the frame to be encoded.
  • step S205 when the current encoding refresh cycle is the first encoding refresh cycle, the number of target bits per pixel of the current unencoded video encoding frame of the video to be encoded is obtained, and according to the number of target bits per pixel of the video to be encoded and the trained The first preset SVR model predicts initial quantization parameters of the current encoding refresh cycle.
  • the initial quantization parameter of the first encoding cycle when the initial quantization parameter of the first encoding cycle is predicted, there is no quantization parameter data of each video frame in the previous encoding cycle, and the target number of bits per pixel of the currently unencoded video encoding frame is All video encoding frames of the video to be encoded. Therefore, when predicting the initial quantization parameters of the first encoding cycle, using the target number of bits per pixel of all video encoding frames as a feature, and passing the target number of bits per pixel of all video encoding frames And the trained preset SVR model predicts the initial quantization parameters of the current encoding cycle.
  • step S206 when the current encoding refresh period is not the first encoding refresh period, the target number of pixels per pixel of the current unencoded video encoding frame and the average of the quantization parameters of each video encoding frame in the previous encoding refresh period of the current encoding refresh period are obtained. Value and standard deviation, and predict the current encoding based on the number of target bits per pixel of the currently unencoded video encoding frame, the average and standard deviation of the quantization parameters of each video encoding frame in the last encoding refresh cycle, and the trained second preset SVR model Initial quantization parameters for the refresh cycle.
  • the target number of bits per pixel of the current uncoded video coding frame the average value of the quantization parameters of each video coding frame, and
  • the predicted initial quantization parameter has the smallest error with the optimal value.
  • the closest one is taken. Quantization parameters of each video encoding frame in the last encoding refresh cycle.
  • the target number of bits per pixel of the current unencoded video encoding frame is obtained first, and each video encoding in the last encoding refresh cycle is obtained.
  • the average and standard deviation of the frame quantization parameters are used as features, and the initial quantization parameters of the current encoding refresh cycle are predicted by the trained second preset SVR model.
  • the available average bandwidth of the current video encoding frame, the average bandwidth of all video encoding frames in the video to be encoded, and the current encoding refresh are obtained.
  • the initial quantization parameters of the previous encoding refresh cycle of the cycle and the initial quantization parameters of the first two encoding refresh cycles of the current encoding refresh cycle are used to calculate the preset first parameter range and the preset second parameter range of the initial quantization parameters of the current encoding refresh cycle.
  • the predicted initial quantization parameters of the current encoding refresh cycle are clipped according to a preset first parameter range.
  • the available average bandwidth of the current video encoding frames is not greater than all
  • the predicted initial quantization parameters of the current encoding refresh period are clipped according to a preset second parameter range, thereby improving the accuracy of the predicted initial quantization parameters and further improving the quality smoothness of the video encoding.
  • the preset first parameter range is (min 1 QP, max 1 QP)
  • the preset second parameter range is (min 2 QP, max 2 QP).
  • IQP 1 and IQP 2 represent the initial quantization parameters of the previous encoding refresh cycle and the initial quantization parameters of the first two encoding refresh cycles.
  • D is the allowable floating constant of the quantization parameter. To ensure the smoothness of the frame-level video quality, it is generally set to 2 Between -3, when the current encoding refresh cycle is the second encoding refresh cycle, IQP 1 and IQP 2 both take the initial quantization parameters of the first encoding refresh cycle of the video to be encoded.
  • a learning label of an initial SVR model is set, a corresponding SVR model is trained according to different feature sets, and then a current video encoding frame of a video to be encoded is received to determine whether the current video encoding frame is a current encoding refresh cycle.
  • the first video encoding frame of When the current video encoding frame is the first video encoding frame of the current encoding refresh cycle, determine whether the current encoding refresh cycle is the first encoding refresh cycle of the video to be encoded, and then according to where the current video encoding frame is located.
  • Encoding refresh cycle obtain the characteristics of the current video encoding frame, and then predict the initial quantization parameters of the current encoding refresh cycle based on the characteristics and the trained corresponding SVR model, thereby accurately predicting the optimal values of the initial quantization parameters of each encoding refresh cycle. Improve the accuracy of the quantization parameters of the current video encoding frame during the corresponding encoding refresh cycle, thereby improving the smoothness of the video encoding quality.
  • FIG. 3 shows the structure of an apparatus for optimizing the smoothness of video coding quality provided by Embodiment 3 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown, including:
  • the receiving determining unit 31 is configured to receive a current video encoding frame of a video to be encoded, and determine whether the current video encoding frame is a first video encoding frame of a current encoding refresh period;
  • a period judging unit 32 configured to determine whether the current encoding refresh period is the first encoding refresh period of the video to be encoded when the current video encoding frame is the first code video encoding frame of the current encoding refresh period;
  • the first prediction unit 33 is configured to obtain, when the current encoding refresh period is the first encoding refresh period, the number of target bits per pixel of the current unencoded video encoding frame of the video to be encoded, and according to the number of target bits per pixel of the video to be encoded and
  • the trained first preset SVR model predicts initial quantization parameters of the current encoding refresh cycle
  • the second prediction unit 34 is configured to obtain the number of target bits per pixel of the current unencoded video encoding frame and the quantization of each video encoding frame of the previous encoding refresh period of the current encoding refresh period when the current encoding refresh period is not the first encoding refresh period.
  • the average and standard deviation of the parameters, and according to the number of target bits per pixel of the currently unencoded video encoding frame, the average and standard deviation of the quantization parameters of each video encoding frame in the last encoding refresh cycle, and the trained second preset SVR model Predict the initial quantization parameters for the current encoding refresh cycle.
  • the current video encoding frame of the video to be encoded is received, and it is determined whether the current video encoding frame is the first video encoding frame of the current encoding refresh cycle.
  • Frame determine whether the current encoding refresh cycle is the first encoding refresh cycle of the video to be encoded, and then obtain the characteristics of the current video encoding frame according to the encoding refresh cycle of the current video encoding frame, and then according to the characteristics and the trained corresponding
  • the SVR model predicts the initial quantization parameters of the current encoding refresh cycle, thereby improving the accuracy of the quantization parameters of the current video encoding frame in the corresponding encoding refresh cycle by accurately predicting the optimal value of the initial quantization parameters of each encoding refresh cycle, thereby improving the quality of video encoding. Smoothness.
  • each unit of the device for predicting the initial quantization parameter may be implemented by a corresponding hardware or software unit.
  • Each unit may be an independent software and hardware unit, or may be integrated into one software and hardware unit. Limit the invention. For specific implementation of each unit, reference may be made to the description in Embodiment 1, and details are not described herein again.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • FIG. 4 shows the structure of an apparatus for optimizing the smoothness of video coding quality provided by Embodiment 4 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown, including:
  • the obtaining and setting unit 41 is configured to obtain the first feature set, the second feature set, and the initial quantization parameters of the training samples of each training sample in the preset video sequence, and set the initial quantization parameters of the training samples as the learning labels of the initial SVR model;
  • a model training unit 42 is configured to separately train an initial SVR model through a first feature set and a second feature set to obtain a trained first preset SVR model and a second preset SVR model;
  • the receiving determining unit 43 is configured to receive a current video encoding frame of a video to be encoded, and determine whether the current video encoding frame is a first video encoding frame of a current encoding refresh period;
  • a period judging unit 44 configured to determine whether the current encoding refresh period is the first encoding refresh period of the video to be encoded when the current video encoding frame is the first code video encoding frame of the current encoding refresh period;
  • the first prediction unit 45 is configured to obtain, when the current encoding refresh period is the first encoding refresh period, the number of target bits per pixel of the currently unencoded video encoding frame of the video to be encoded, and according to the number of target bits per pixel of the video to be encoded and
  • the trained first preset SVR model predicts initial quantization parameters of the current encoding refresh cycle
  • the second prediction unit 46 is configured to obtain the number of target bits per pixel of the current unencoded video encoding frame and the quantization of each video encoding frame of the previous encoding refresh period of the current encoding refresh period when the current encoding refresh period is not the first encoding refresh period.
  • the average and standard deviation of the parameters, and according to the number of target bits per pixel of the currently unencoded video encoding frame, the average and standard deviation of the quantization parameters of each video encoding frame in the last encoding refresh cycle, and the trained second preset SVR model Predict the initial quantization parameters of the current encoding refresh cycle;
  • An obtaining calculation unit 47 configured to obtain an available average bandwidth of a current video encoding frame, an average bandwidth of all video encoding frames in a video to be encoded, an initial quantization parameter of a previous encoding refresh period of a current encoding refresh period, and a first two of a current encoding refresh period.
  • the initial quantization parameter of the encoding refresh cycle calculating a preset first parameter range and a preset second parameter range of the initial quantization parameter of the current encoding refresh cycle;
  • a first cropping unit 48 configured to crop the predicted initial quantization parameters of the current encoding refresh cycle according to a preset first parameter range when the available average bandwidth of the current video encoding frame is greater than the average bandwidth of all video encoding frames;
  • a second cropping unit 49 is configured to crop the predicted initial quantization parameters of the current encoding refresh cycle according to a preset second parameter range when the available average bandwidth of the current video encoding frame is not greater than the average bandwidth of all video encoding frames.
  • the obtaining and setting unit 41 includes:
  • a parameter screening unit 411 is configured to filter the initial quantization parameters of the training samples by using a penalty term of the expected bit accuracy.
  • a learning label of an initial SVR model is set, a corresponding SVR model is trained according to different feature sets, and then a current video encoding frame of a video to be encoded is received to determine whether the current video encoding frame is a current encoding refresh cycle.
  • the first video encoding frame of When the current video encoding frame is the first video encoding frame of the current encoding refresh cycle, determine whether the current encoding refresh cycle is the first encoding refresh cycle of the video to be encoded, and then according to where the current video encoding frame is located.
  • Encoding refresh cycle obtain the characteristics of the current video encoding frame, and then predict the initial quantization parameters of the current encoding refresh cycle based on the characteristics and the trained corresponding SVR model, thereby accurately predicting the optimal values of the initial quantization parameters of each encoding refresh cycle. Improve the accuracy of the quantization parameters of the current video encoding frame during the corresponding encoding refresh cycle, thereby improving the smoothness of the video encoding quality.
  • each unit of the device for predicting the initial quantization parameter may be implemented by a corresponding hardware or software unit.
  • Each unit may be an independent software and hardware unit, or may be integrated into one software and hardware unit. Limit the invention. For specific implementation of each unit, reference may be made to the descriptions of Embodiment 1 and Embodiment 2, and details are not described herein again.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • FIG. 5 shows the structure of a video encoding device provided in Embodiment 5 of the present invention. For ease of description, only parts related to the embodiment of the present invention are shown, including:
  • the video encoding device 5 includes a processor 51, a memory 52, and a computer program 53 stored in the memory 52 and executable on the processor 51.
  • the processor 41 executes the computer program 53, the steps in the embodiment of the method for predicting the initial quantization parameters are implemented, such as steps S101 to S104 shown in FIG. 1 and steps S201 to S206 shown in FIG. 2.
  • the processor 41 executes the computer program 53, the functions of the units in the embodiment of the prediction device for each initial quantization parameter described above are implemented, for example, the functions of the units 31 to 34 shown in FIG. 3 and the units 41 to 49 shown in FIG. 4.
  • the processor when the processor executes a computer program, the processor receives the current video encoding frame of the video to be encoded, determines whether the current video encoding frame is the first video encoding frame of the current encoding refresh cycle, and when the current video encoding frame is the current When encoding the first video encoding frame of the encoding refresh cycle, determine whether the current encoding refresh cycle is the first encoding refresh cycle of the video to be encoded, and then obtain the characteristics of the current video encoding frame according to the encoding refresh cycle of the current video encoding frame, and then According to this feature and the trained corresponding SVR model, the initial quantization parameters of the current encoding refresh cycle are predicted, thereby improving the accuracy of the quantization parameters of the current video encoding frame in the corresponding encoding refresh cycle by accurately predicting the optimal value of the initial quantization parameters of each encoding refresh cycle. Degree, thereby improving the smoothness of video encoding quality.
  • Embodiment 6 is a diagrammatic representation of Embodiment 6
  • a computer-readable storage medium stores a computer program.
  • the steps in the embodiment of the method for predicting the foregoing initial quantization parameters are implemented. For example, steps S101 to S104 shown in FIG. 1 and steps S201 to S206 shown in FIG. 2.
  • the functions of the units in the embodiment of the prediction device for each initial quantization parameter described above are implemented, such as the functions of units 31 to 34 shown in FIG. 3 and the units 41 to 49 shown in FIG. 4.
  • the current video encoding frame of the video to be encoded is received, and it is determined whether the current video encoding frame is the first video encoding frame of the current encoding refresh cycle.
  • the current video encoding frame is When the first video encoding frame of the current encoding refresh period, determine whether the current encoding refresh period is the first encoding refresh period of the video to be encoded, and then obtain the characteristics of the current video encoding frame according to the encoding refresh period of the current video encoding frame.
  • the initial quantization parameters of the current encoding refresh cycle are predicted, so as to accurately predict the optimal value of the initial quantization parameters of each encoding refresh cycle to improve the quantization parameters of the current video encoding frame in the corresponding encoding refresh cycle. Accuracy, which in turn improves the smoothness of video encoding quality.
  • the computer-readable storage medium of the embodiment of the present invention may include any entity or device capable of carrying computer program code, and a storage medium, for example, a memory such as a ROM / RAM, a magnetic disk, an optical disk, a flash memory, or the like.
  • a storage medium for example, a memory such as a ROM / RAM, a magnetic disk, an optical disk, a flash memory, or the like.

Landscapes

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

Abstract

本发明适用于视频技术领域,提供了一种视频编码质量平滑度的优化方法、装置、设备及存储介质,该方法包括:接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提高视频编码质量的平滑度。

Description

视频编码质量平滑度的优化方法、装置、设备及存储介质 技术领域
本发明属于视频技术领域,尤其涉及一种视频编码质量平滑度的优化方法、装置、设备及存储介质。
背景技术
随着多媒体技术的发展,计算机网络中各种不同应用系统产生了大量的视频数据,而大量视频数据的存储与传输给信息系统带来了很大的负担,因此高效视频编码(High Efficiency Video Coding,H.265/HEVC)算法被提出,以消除视频数据冗余和减少存储与传输的压力,在降低数据量的同时,人们也不断追求更高质量的视觉体验,因此,人们在优化视频编码方案时,不仅需要面向更高的率失真性能,而且也需要保证平滑的编码质量。量化参数(Quantization Parameter,QP)可以控制编码失真和编码比特,如QP小,大部分的细节都会被保留,码率较大,而QP增大,一些细节丢失,码率降低,在一个编码刷新周期中,当前视频编码帧的量化参数一般依据当前视频编码帧的率失真函数模型进行预测。一个编码刷新周期中的第一个视频编码帧的QP(即该编码刷新周期的初始量化参数)对后面视频编码帧的QP的判决和优化具有重要的影响,因此,我们只需要优化每个编码刷新周期的初始QP,将初始QP最优值预测准确,即可使视频编码质量得到全局的平滑优化。
发明内容
本发明的目的在于提供一种视频编码质量平滑度的优化方法、装置、设备以及存储介质,旨在解决由于现有技术无法提供一种有效的视频编码质量平滑度的优化方法,导致预测初始量化参数最优值的偏差较大以及视频编码质量波 动过大的问题。
一方面,本发明提供了一种视频编码质量平滑度的优化方法,所述方法包括下述步骤:
接收待编码视频的当前视频编码帧,确定所述当前视频编码帧是否为当前编码刷新周期的首个视频编码帧;
当所述当前视频编码帧为所述当前编码刷新周期的首个视频编码帧时,判断所述当前编码刷新周期是否为所述待编码视频的首个编码刷新周期;
当所述当前编码刷新周期为所述首个编码刷新周期时,获取所述待编码视频的当前未编码视频编码帧的每像素目标比特数目,并根据所述待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测所述当前编码刷新周期的初始量化参数;
当所述当前编码刷新周期不为所述首个编码刷新周期时,获取所述当前未编码视频编码帧的每像素目标比特数目、所述当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据所述当前未编码视频编码帧的每像素目标比特数目、所述上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测所述当前编码刷新周期的初始量化参数。
另一方面,本发明提供了一种视频编码质量平滑度的优化装置,所述装置包括:
接收确定单元,用于接收待编码视频的当前视频编码帧,确定所述当前视频编码帧是否为当前编码刷新周期的首个视频编码帧;
周期判断单元,用于当所述当前视频编码帧为所述当前编码刷新周期的首个视频编码帧时,判断所述当前编码刷新周期是否为所述待编码视频的首个编码刷新周期;
第一预测单元,用于当所述当前编码刷新周期为所述首个编码刷新周期时,获取所述待编码视频中当前未编码视频编码帧的每像素目标比特数目,并根据 所述待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测所述当前编码刷新周期的初始量化参数;以及
第二预测单元,用于当所述当前编码刷新周期不为所述首个编码刷新周期时,获取所述当前未编码视频编码帧的每像素目标比特数目、所述当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据所述当前未编码视频编码帧的每像素目标比特数目、所述上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测所述当前编码刷新周期的初始量化参数。
另一方面,本发明还提供了一种视频编码设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述初始量化参数的预测方法的步骤。
另一方面,本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述初始量化参数的预测方法的步骤。
本发明先接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提高视频编码质量的平滑度。
附图说明
图1是本发明实施例一提供的视频编码质量平滑度的优化方法的实现流程图;
图2是本发明实施例二提供的视频编码质量平滑度的优化方法的实现流程图
图3是本发明实施例三提供的视频编码质量平滑度的优化装置的结构示意图;
图4是本发明实施例四提供的视频编码质量平滑度的优化装置的结构示意图;以及
图5是本发明实施例五提供的一种视频编码设备的结构示意图。
具体实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
以下结合具体实施例对本发明的具体实现进行详细描述:
实施例一:
图1示出了本发明实施例一提供的视频编码质量平滑度的优化方法的实现流程,为了便于说明,仅示出了与本发明实施例相关的部分,详述如下:
在步骤S101中,接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧。
本发明实施例适用于视频编码设备,例如,摄像机、手机等。在本发明实施例中,由于在同一编码刷新周期中,第一个视频编码帧的初始量化参数的优化程度对该编码刷新周期内其他视频编码帧和整体的编码过程有重要影响,因此,在接收待编码视频的当前视频编码帧时,先确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧。
在步骤S102中,当当前视频编码帧为当前编码刷新周期的首个码视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期。
在本发明实施例中,由于在预测首个编码刷新周期的初始量化参数时,没 有上一个编码刷新周期各个视频编码帧的量化参数数据,可提取的视频编码帧信息较少,因此,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,便于确定使用何种特征集合对待编码帧的量化参数进行预测。
在步骤S103中,当当前编码刷新周期为首个编码刷新周期时,获取待编码视频的当前未编码视频编码帧的每像素目标比特数目,并根据待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测当前编码刷新周期的初始量化参数。
在本发明实施例中,第一预设SVR(Support Vector Regression,支撑向量机回归模型)模型是由SVR模型训练好的支撑向量机回归模型。由于在预测首个编码周期的初始量化参数时,没有上一个编码周期各个视频帧的量化参数数据,且此时当前未编码视频编码帧的每像素目标比特数目即为待编码视频的所有视频编码帧,因此,在预测首个编码周期的初始量化参数时,以所有视频编码帧的每像素目标比特数目作为特征时,并通过所有视频编码帧的每像素目标比特数目以及训练好的预设SVR模型预测当前编码周期的初始量化参数。
在步骤S104中,当当前编码刷新周期不为首个编码刷新周期时,获取当前未编码视频编码帧的每像素目标比特数目、当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据当前未编码视频编码帧的每像素目标比特数目、上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测当前编码刷新周期的初始量化参数。
在本发明实施例中,第二预设SVR模型是由SVR模型训练好的支撑向量机回归模型,根据对视频数据的各个特征组合进行测试,可得出当使用当前未编码视频编码帧的每像素目标比特数目、当前编码刷新周期各个视频编码帧量化参数的平均值和标准方差作为特征时,预测的初始量化参数与最优值误差最小,然而在预测待编码视频的初始量化参数时,并没有当前编码刷新周期各个 视频编码帧量化参数数据,故取与其最相近的上一编码刷新周期各个视频编码帧量化参数,因此,当当前编码刷新周期不为首个编码刷新周期时,先获取当前未编码视频编码帧的每像素目标比特数目、上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差作为特征,再通过训练好的第二预设SVR模型预测当前编码刷新周期的初始量化参数。
在本发明实施例中,接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提高视频编码质量的平滑度。
实施例二:
图2示出了本发明实施例二提供的视频编码质量平滑度的优化方法的实现流程,为了便于说明,仅示出了与本发明实施例相关的部分,详述如下:
在步骤S201中,获取预设视频序列中各个训练样本的第一特征集合、第二特征集合和训练样本的初始量化参数,将训练样本的初始量化参数设置为初始SVR模型的学习标签。
在本发明实施例中,视频序列为训练初始SVR模型的多个视频,将视频序列中视频的各个编码刷新期作为训练样本,SVR模型的学习标签表示了该SVR模型的输出数据(各个训练样本的初始量化参数),第一特征集合包含各个训练样本的当前未编码视频编码帧的每像素目标比特数目,第二特征集合包含各个训练样本的当前未编码视频编码帧的每像素目标比特数目以及各个训练样本的各个视频编码帧量化参数的平均值和标准方差,在预测过程中,由于没有当前编码刷新周期的量化参数数据,所以取最接近的上一编码刷新周期各个视频 编码帧量化参数的平均值和标准方差。
在训练初始SVR模型之前,通过优化学习标签的初始量化参数,即可优化训练得到的SVR模型,因此,优选地,在获取训练样本的初始量化参数时,通过预期比特准确度的惩罚项对训练样本的初始量化参数进行筛选,从而提高了模型的训练效果。具体地,当
Figure PCTCN2018103661-appb-000001
大于预设阈值时,保留对应的初始量化参数,作为初始量化参数最优值的备选,否则,将对应的初始量化参数从备选初始量化参数最优值中丢弃,从而优化了用于训练预设SVR模型的学习标签,进而提高了预测初始量化参数的准确度,其中,BRA为预期的比特准确度,TBR表示目标比特码率,ABR表示实际比特码率。
在步骤S202中,通过第一特征集合以及第二特征集合分别对初始SVR模型进行训练,以得到训练好的第一预设SVR模型和第二预设SVR模型。
在本发明实施例中,分别通过第一特征集合和第二特征集合对初始SVR模型进行训练,从而得到训练好的第一预设SVR模型和第二预设SVR模型。
优选地,该初始SVR模型为具有径向基函数(Radial Basis Function,RBF)内核的ε-SVR算法模型,从而提高了模型回归的准确度。
在步骤S203中,接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧。
在本发明实施例中,由于在同一编码刷新周期中,第一个视频编码帧的初始量化参数的优化程度对该编码刷新周期内其他视频编码帧和整体的编码过程有重要影响,因此,在接收待编码视频中的当前视频编码帧时,先确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧。
在步骤S204中,当当前视频编码帧为当前编码刷新周期的首个码视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期。
在本发明实施例中,由于在预测首个编码刷新周期的初始量化参数时,没有上一个编码刷新周期各个视频编码帧的量化参数数据,可提取的视频编码帧信息较少,因此,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时, 判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,便于确定使用何种特征集合对待编码帧的量化参数进行预测。
在步骤S205中,当当前编码刷新周期为首个编码刷新周期时,获取待编码视频的当前未编码视频编码帧的每像素目标比特数目,并根据待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测当前编码刷新周期的初始量化参数。
在本发明实施例中,由于在预测首个编码周期的初始量化参数时,没有上一个编码周期各个视频帧的量化参数数据,且此时当前未编码视频编码帧的每像素目标比特数目即为待编码视频的所有视频编码帧,因此,在预测首个编码周期的初始量化参数时,以所有视频编码帧的每像素目标比特数目作为特征时,并通过所有视频编码帧的每像素目标比特数目以及训练好的预设SVR模型预测当前编码周期的初始量化参数。
在步骤S206中,当当前编码刷新周期不为首个编码刷新周期时,获取当前未编码视频编码帧的每像素目标比特数目、当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据当前未编码视频编码帧的每像素目标比特数目、上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测当前编码刷新周期的初始量化参数。
在本发明实施例中,根据对视频数据的各个特征组合进行测试,可得出当使用当前未编码视频编码帧的每像素目标比特数目、当前编码刷新周期各个视频编码帧量化参数的平均值和标准方差作为特征时,预测的初始量化参数与最优值误差最小,然而在预测待编码视频的初始量化参数时,并没有当前编码刷新周期各个视频编码帧量化参数数据,故取与其最相近的上一编码刷新周期各个视频编码帧量化参数,因此,当当前编码刷新周期不为首个编码刷新周期时,先获取当前未编码视频编码帧的每像素目标比特数目、上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差作为特征,再通过训练好的第二预设 SVR模型预测当前编码刷新周期的初始量化参数。
在通过训练好的第二预设SVR模型预测当前编码刷新周期的初始量化参数之后,优选地,获取当前视频编码帧的可用平均带宽、待编码视频中所有视频编码帧的平均带宽、当前编码刷新周期的前一编码刷新周期初始量化参数和当前编码刷新周期的前两编码刷新周期初始量化参数,计算当前编码刷新周期初始量化参数的预设第一参数范围和预设第二参数范围,当当前视频编码帧的可用平均带宽大于所有视频编码帧的平均带宽时,根据预设第一参数范围对预测的当前编码刷新周期的初始量化参数进行裁剪,当当前视频编码帧的可用平均带宽不大于所有视频编码帧的平均带宽时,根据预设第二参数范围对预测的当前编码刷新周期的初始量化参数进行裁剪,从而提高了预测初始量化参数的准确度,进而提高视频编码的质量平滑度。具体地,预设第一参数范围为(min 1QP,max 1QP),预设第二参数范围为(min 2QP,max 2QP)。
其中,
Figure PCTCN2018103661-appb-000002
Figure PCTCN2018103661-appb-000003
IQP 1和IQP 2表示前一编码刷新周期初始量化参数和前两编码刷新周期初始量化参数,d为量化参数的可允许浮动的常数,为为保证帧级别视频质量的平滑度,一般设置为2-3之间,当当前编码刷新周期为第二个编码刷新周期时,IQP 1、IQP 2都取待编码视频的首个编码刷新周期的初始量化参数。
在本发明实施例中,先设置初始SVR模型的学习标签,根据不同的特征集合训练好对应的SVR模型,再接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量 化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提高视频编码质量的平滑度。
实施例三:
图3示出了本发明实施例三提供的视频编码质量平滑度的优化装置的结构,为了便于说明,仅示出了与本发明实施例相关的部分,其中包括:
接收确定单元31,用于接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧;
周期判断单元32,用于当当前视频编码帧为当前编码刷新周期的首个码视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期;
第一预测单元33,用于当当前编码刷新周期为首个编码刷新周期时,获取待编码视频的当前未编码视频编码帧的每像素目标比特数目,并根据待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测当前编码刷新周期的初始量化参数;以及
第二预测单元34,用于当当前编码刷新周期不为首个编码刷新周期时,获取当前未编码视频编码帧的每像素目标比特数目、当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据当前未编码视频编码帧的每像素目标比特数目、上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测当前编码刷新周期的初始量化参数。
在本发明实施例中,接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提 高视频编码质量的平滑度。
在本发明实施例中,初始量化参数的预测装置的各单元可由相应的硬件或软件单元实现,各单元可以为独立的软、硬件单元,也可以集成为一个软、硬件单元,在此不用以限制本发明。各单元的具体实施方式可参考实施例一的描述,在此不再赘述。
实施例四:
图4示出了本发明实施例四提供的视频编码质量平滑度的优化装置的结构,为了便于说明,仅示出了与本发明实施例相关的部分,其中包括:
获取设置单元41,用于获取预设视频序列中各个训练样本的第一特征集合、第二特征集合和训练样本的初始量化参数,将训练样本的初始量化参数设置为初始SVR模型的学习标签;
模型训练单元42,用于通过第一特征集合以及第二特征集合分别对初始SVR模型进行训练,以得到训练好的第一预设SVR模型和第二预设SVR模型;
接收确定单元43,用于接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧;
周期判断单元44,用于当当前视频编码帧为当前编码刷新周期的首个码视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期;
第一预测单元45,用于当当前编码刷新周期为首个编码刷新周期时,获取待编码视频的当前未编码视频编码帧的每像素目标比特数目,并根据待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测当前编码刷新周期的初始量化参数;
第二预测单元46,用于当当前编码刷新周期不为首个编码刷新周期时,获取当前未编码视频编码帧的每像素目标比特数目、当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据当前未编码视频编码帧的每像素目标比特数目、上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测当前编码刷新周 期的初始量化参数;
获取计算单元47,用于获取当前视频编码帧的可用平均带宽、待编码视频中所有视频编码帧的平均带宽、当前编码刷新周期的前一编码刷新周期初始量化参数和当前编码刷新周期的前两编码刷新周期初始量化参数,计算当前编码刷新周期初始量化参数的预设第一参数范围和预设第二参数范围;
第一裁剪单元48,用于当当前视频编码帧的可用平均带宽大于所有视频编码帧的平均带宽时,根据预设第一参数范围对预测的当前编码刷新周期的初始量化参数进行裁剪;以及
第二裁剪单元49,用于当当前视频编码帧的可用平均带宽不大于所有视频编码帧的平均带宽时,根据预设第二参数范围对预测的当前编码刷新周期的初始量化参数进行裁剪。
其中,获取设置单元41包括:
参数筛选单元411,用于通过预期比特准确度的惩罚项对训练样本的初始量化参数进行筛选。
在本发明实施例中,先设置初始SVR模型的学习标签,根据不同的特征集合训练好对应的SVR模型,再接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提高视频编码质量的平滑度。
在本发明实施例中,初始量化参数的预测装置的各单元可由相应的硬件或软件单元实现,各单元可以为独立的软、硬件单元,也可以集成为一个软、硬件单元,在此不用以限制本发明。各单元的具体实施方式可参考实施例一和实 施例二的描述,在此不再赘述。
实施例五:
图5示出了本发明实施例五提供的视频编码设备的结构,为了便于说明,仅示出了与本发明实施例相关的部分,其中包括:
本发明实施例的视频编码设备5包括处理器51、存储器52以及存储在存储器52中并可在处理器51上运行的计算机程序53。该处理器41执行计算机程序53时实现上述各个初始量化参数的预测方法实施例中的步骤,例如图1所示的步骤S101至S104以及图2所示的步骤S201至S206。或者,处理器41执行计算机程序53时实现上述各个初始量化参数的预测装置实施例中各单元的功能,例如图3所示单元31至34以及图4所示单元41至49的功能。
在本发明实施例中,该处理器执行计算机程序时,接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提高视频编码质量的平滑度。
该处理器执行计算机程序时实现上述初始量化参数的预测方法实施例中的步骤可参考实施例一和实施例二的描述,在此不再赘述。
实施例六:
在本发明实施例中,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现上述各个初始量化参数的预测方法实施例中的步骤,例如,图1所示的步骤S101至S104以及图2所示的步骤S201至S206。或者,该计算机程序被处理器执行时实现上述各个初始量化参数的预测装置实施例中各单元的功能,例如图3所示单元31至 34以及图4所示单元41至49的功能。
在本发明实施例中,在计算机程序被处理器执行后,接收待编码视频的当前视频编码帧,确定当前视频编码帧是否为当前编码刷新周期的首个视频编码帧,当当前视频编码帧为当前编码刷新周期的首个视频编码帧时,判断当前编码刷新周期是否为待编码视频的首个编码刷新周期,然后根据当前视频编码帧所处的编码刷新周期,获取当前视频编码帧的特征,再根据该特征以及训练好的相应SVR模型预测当前编码刷新周期的初始量化参数,从而通过准确地预测各个编码刷新周期的初始量化参数最优值提高相应编码刷新周期内当前视频编码帧的量化参数准确度,进而提高视频编码质量的平滑度。
该处理器执行计算机程序时实现上述初始量化参数的预测方法实施例中的步骤可参考实施例一和实施例二的描述,在此不再赘述。
本发明实施例的计算机可读存储介质可以包括能够携带计算机程序代码的任何实体或装置、存储介质,例如,ROM/RAM、磁盘、光盘、闪存等存储器。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种视频编码质量平滑度的优化方法,其特征在于,所述方法包括下述步骤:
    接收待编码视频的当前视频编码帧,确定所述当前视频编码帧是否为当前编码刷新周期的首个视频编码帧;
    当所述当前视频编码帧为所述当前编码刷新周期的首个视频编码帧时,判断所述当前编码刷新周期是否为所述待编码视频的首个编码刷新周期;
    当所述当前编码刷新周期为所述首个编码刷新周期时,获取所述待编码视频的当前未编码视频编码帧的每像素目标比特数目,并根据所述待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测所述当前编码刷新周期的初始量化参数;
    当所述当前编码刷新周期不为所述首个编码刷新周期时,获取所述当前未编码视频编码帧的每像素目标比特数目、所述当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据所述当前未编码视频编码帧的每像素目标比特数目、所述上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测所述当前编码刷新周期的初始量化参数。
  2. 如权利要求1所述的方法,其特征在于,确定所述当前视频编码帧是否为当前编码刷新周期的首个视频编码帧的步骤之前,所述方法还包括:
    获取预设视频序列中各个训练样本的第一特征集合、第二特征集合和所述训练样本的初始量化参数,将所述训练样本的初始量化参数设置为初始SVR模型的学习标签;
    通过所述第一特征集合以及所述第二特征集合分别对所述初始SVR模型进行训练,以得到训练好的所述第一预设SVR模型和所述第二预设SVR模型。
  3. 如权利要求1所述的方法,其特征在于,获取预设视频序列中各个训练样本的第一特征集合、第二特征集合和所述训练样本的初始量化参数的步骤, 包括:
    通过预期比特准确度的惩罚项对所述训练样本的初始量化参数进行筛选。
  4. 如权利要求1所述的方法,其特征在于,根据所述当前未编码视频编码帧的每像素目标比特数目、所述上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测所述当前编码刷新周期的初始量化参数的步骤之后,所述方法还包括:
    获取所述当前视频编码帧的可用平均带宽、所述待编码视频中所有视频编码帧的平均带宽、所述当前编码刷新周期的前一编码刷新周期初始量化参数和所述当前编码刷新周期的前两编码刷新周期初始量化参数,计算所述当前编码刷新周期初始量化参数的预设第一参数范围和预设第二参数范围;
    当所述当前视频编码帧的可用平均带宽大于所述所有视频编码帧的平均带宽时,根据所述预设第一参数范围对预测的所述当前编码刷新周期的初始量化参数进行裁剪;
    当所述当前视频编码帧的可用平均带宽不大于所述所有视频编码帧的平均带宽时,根据所述预设第二参数范围对预测的所述当前编码刷新周期的初始量化参数进行裁剪。
  5. 一种视频编码质量平滑度的优化装置,其特征在于,所述装置包括:
    接收确定单元,用于接收待编码视频的当前视频编码帧,确定所述当前视频编码帧是否为当前编码刷新周期的首个视频编码帧;
    周期判断单元,用于当当所述当前视频编码帧为所述当前编码刷新周期的首个视频编码帧时,判断所述当前编码刷新周期是否为所述待编码视频的首个编码刷新周期;
    第一预测单元,用于当所述当前编码刷新周期为所述首个编码刷新周期时,获取所述待编码视频的当前未编码视频编码帧的每像素目标比特数目,并根据所述待编码视频的每像素目标比特数目以及训练好的第一预设SVR模型预测所述当前编码刷新周期的初始量化参数;以及
    第二预测单元,用于当所述当前编码刷新周期不为所述首个编码刷新周期时,获取所述当前未编码视频编码帧的每像素目标比特数目、所述当前编码刷新周期的上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差,并根据所述当前未编码视频编码帧的每像素目标比特数目、所述上一编码刷新周期各个视频编码帧量化参数的平均值和标准方差以及训练好的第二预设SVR模型预测所述当前编码刷新周期的初始量化参数。
  6. 如权利要求5所述的装置,其特征在于,所述装置还包括:
    获取设置单元,用于获取预设视频序列中各个训练样本的第一特征集合、第二特征集合和所述训练样本的初始量化参数,将所述训练样本的初始量化参数设置为初始SVR模型的学习标签;以及
    模型训练单元,用于通过所述第一特征集合以及所述第二特征集合分别对所述初始SVR模型进行训练,以得到训练好的所述第一预设SVR模型和所述第二预设SVR模型。
  7. 如权利要求6所述的装置,其特征在于,所述获取设置单元包括:
    量化筛选单元,用于通过预期比特准确度的惩罚项对所述训练样本的初始量化参数进行筛选。
  8. 如权利要求5所述的装置,其特征在于,所述装置还包括:
    获取计算单元,用于获取所述当前视频编码帧的可用平均带宽、所述待编码视频中所有视频编码帧的平均带宽、所述当前编码刷新周期的前一编码刷新周期初始量化参数和所述当前编码刷新周期的前两编码刷新周期初始量化参数,计算所述当前编码刷新周期初始量化参数的预设第一参数范围和预设第二参数范围;
    第一裁剪单元,用于当所述当前视频编码帧的可用平均带宽大于所述所有视频编码帧的平均带宽时,根据所述预设第一参数范围对预测的所述当前编码刷新周期的初始量化参数进行裁剪;以及
    第二裁剪单元,用于当所述当前视频编码帧的可用平均带宽不大于所述所 有视频编码帧的平均带宽时,根据所述预设第二参数范围对预测的所述当前编码刷新周期的初始量化参数进行裁剪。
  9. 一种视频编码设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至4项所述方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至4项所述方法的步骤。
PCT/CN2018/103661 2018-08-31 2018-08-31 视频编码质量平滑度的优化方法、装置、设备及存储介质 WO2020042177A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880001619.0A CN109219960B (zh) 2018-08-31 2018-08-31 视频编码质量平滑度的优化方法、装置、设备及存储介质
PCT/CN2018/103661 WO2020042177A1 (zh) 2018-08-31 2018-08-31 视频编码质量平滑度的优化方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/103661 WO2020042177A1 (zh) 2018-08-31 2018-08-31 视频编码质量平滑度的优化方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020042177A1 true WO2020042177A1 (zh) 2020-03-05

Family

ID=64994196

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103661 WO2020042177A1 (zh) 2018-08-31 2018-08-31 视频编码质量平滑度的优化方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN109219960B (zh)
WO (1) WO2020042177A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374841A (zh) * 2021-12-15 2022-04-19 杭州未名信科科技有限公司 视频编码码率控制的优化方法、装置及电子设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427317A (zh) * 2019-07-05 2019-11-08 深圳壹账通智能科技有限公司 一种相关值确定方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895759A (zh) * 2010-07-28 2010-11-24 南京信息工程大学 一种h.264码率控制方法
CN104469367A (zh) * 2014-12-16 2015-03-25 南京仟壹视讯信息技术有限公司 基于丢帧和量化参数调整的视频码率控制方法
US20150326857A1 (en) * 2014-05-12 2015-11-12 Ximin Zhang Video coding quantization parameter determination suitable for video conferencing
CN107888931A (zh) * 2017-11-28 2018-04-06 上海大学 一种利用视频统计特征预测差错敏感度的方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219522B (zh) * 2013-06-04 2018-02-16 北京大学 一种视频图像编码中的码率控制方法及装置
CN104683804B (zh) * 2015-02-14 2017-12-29 北京航空航天大学 基于视频内容特征的参数自适应多维码率控制方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895759A (zh) * 2010-07-28 2010-11-24 南京信息工程大学 一种h.264码率控制方法
US20150326857A1 (en) * 2014-05-12 2015-11-12 Ximin Zhang Video coding quantization parameter determination suitable for video conferencing
CN104469367A (zh) * 2014-12-16 2015-03-25 南京仟壹视讯信息技术有限公司 基于丢帧和量化参数调整的视频码率控制方法
CN107888931A (zh) * 2017-11-28 2018-04-06 上海大学 一种利用视频统计特征预测差错敏感度的方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374841A (zh) * 2021-12-15 2022-04-19 杭州未名信科科技有限公司 视频编码码率控制的优化方法、装置及电子设备

Also Published As

Publication number Publication date
CN109219960A (zh) 2019-01-15
CN109219960B (zh) 2022-05-24

Similar Documents

Publication Publication Date Title
WO2023016155A1 (zh) 图像处理方法、装置、介质及电子设备
WO2021068598A1 (zh) 共享屏幕的编码方法、装置、存储介质及电子设备
US20160360202A1 (en) Banding prediction for video encoding
CN105516720B (zh) 一种监控摄像机码流的自适应控制方法
WO2006004605B1 (en) Multi-pass video encoding
JP2008504750A5 (zh)
WO2017140230A1 (zh) 目标码率调整方法及装置
US11197021B2 (en) Coding resolution control method and terminal
US20140169473A1 (en) Texture sensitive temporal filter based on motion estimation
US10536696B2 (en) Image encoding device and image encoding method
US20210120230A1 (en) Image encoding control method and apparatus, storage medium, and unmanned aerial vehicle
CN112437301B (zh) 一种面向视觉分析的码率控制方法、装置、存储介质及终端
CN114900692A (zh) 视频流帧率调整方法及其装置、设备、介质、产品
WO2020042177A1 (zh) 视频编码质量平滑度的优化方法、装置、设备及存储介质
KR20230028250A (ko) 강화 학습 기반 속도 제어
US20230045884A1 (en) Rio-based video coding method and deivice
CN111050169B (zh) 图像编码中量化参数的生成方法、装置及终端
TWI411305B (zh) 動態參照訊框選擇方法和系統
He et al. End-edge coordinated joint encoding and neural enhancement for low-light video analytics
JP6867275B2 (ja) 映像符号化パラメータ調整装置、映像符号化パラメータ調整方法及びプログラム
CN117478886A (zh) 多媒体数据编码方法、装置、电子设备及存储介质
CN113452996A (zh) 一种视频编码、解码方法及装置
CN105049853A (zh) 一种基于片源分析的sao编码方法及系统
CN112399177A (zh) 一种视频编码方法、装置、计算机设备及存储介质
US11825088B2 (en) Adaptively encoding video frames based on complexity

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 09.06.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18931388

Country of ref document: EP

Kind code of ref document: A1