Quality-based processing of video
There is provided a computer-implemented method for processing a video. The computer-implemented method includes: (a) determining a target frame-level quality required for a frame of the video to be encoded, the determining of the target frame-level quality is based on, at least, a rate-quantization (R-Q) model that relates bit-rate and quantization step size and a quality-quantization model that relates quality measure and the quantization step size; and (b) determining one or more coding parameters for encoding the frame based on the determined target frame-level quality.
1 . A computer-implemented method for processing a video, comprising:
(a) determining a target frame-level quality required for a frame of the video to be encoded, the determining of the target frame-level quality is based on, at least, a rate-quantization (R-Q) model that relates bit-rate and quantization step size and a quality-quantization model that relates quality measure and the quantization step size; and
(b) determining one or more coding parameters for encoding the frame based on the determined target frame-level quality,
wherein the R-Q model is defined by
R
=
γ
Q
,
where R is bit-rate, Q is quantization step size, and γ is model parameter of the R-Q model,
wherein the quality-quantization model comprises a DISTS-quantization (D-Q) model that relates DISTS value and the quantization step size, and the D-Q model is defined as D=αQ 62 , where D is DISTS value, Q is quantization step size, and α and β are model parameters of the D-Q model, and
wherein the model parameters of the R-Q model and the D-Q model are updated by actual coding results for encoding a next frame.
2 . The computer-implemented method of claim 1 , further comprises determining a target GOP-level quality required for a GOP of the video, the GOP comprising a plurality of frames including the frame to be encoded, and
wherein the determining of the target frame-level quality is further based on the determined target GOP-level quality.
3 . The computer-implemented method of claim 2 , wherein the determining of the target frame-level quality required for the frame of the video comprises distributing or allocating at least part of the target GOP-level quality to the plurality of frames of the GOP.
4 . The computer-implemented method of claim 2 , wherein the determining of the target frame-level quality required for the frame of the video comprises determining the target frame-level quality while optimizing a GOP-level rate-distortion (R-D) cost function.
5 . The computer-implemented method of claim 4 , wherein the GOP-level rate-distortion cost function is defined based on, at least, a GOP-level Lagrangian multiplier for the GOP.
6 . The computer-implemented method of claim 5 ,
wherein the GOP-level Lagrangian multiplier is related to the target GOP-level quality through the R-Q model and the D-Q model;
wherein the determining of the target frame-level quality required for the frame of the video comprises determining the target frame-level quality required for the frame of the video based on the GOP-level Lagrangian multiplier; or
wherein the GOP-level Lagrangian multiplier is related to the target GOP-level quality through the R-Q model and the D-Q model, and the determining of the target frame-level quality required for the frame of the video comprises determining the target frame-level quality required for the frame of the video based on the GOP-level Lagrangian multiplier.
7 . The computer-implemented method of claim 1 , wherein the one or more the coding parameters comprises a quantization parameter and a Lagrangian multiplier.
8 . The computer-implemented method of claim 7 , wherein the determining of the quantization parameter in (b) is based on
Q
=
(
D
α
)
1
β
and
QP
=
log
X
(
Q
)
×
A
+
B
where D is the target frame-level quality represented as a target frame-level DISTS value, Q is the quantization step size, α and β are model parameters of the D-Q model, QP is the quantization parameter, A, B, and X are constants.
9 . The computer-implemented method of claim 8 , wherein the determining of the Lagrangian multiplier in (b) is based on
λ
=
C
×
D
QP
E
where λ is the Lagrangian multiplier, QP is the quantization parameter, C, D, and E are constants.
10 . The computer-implemented method of claim 1 , further comprising:
(c) encoding the frame based on the one or more determined coding parameters.
11 . The computer-implemented method of claim 10 , wherein the encoding in (c) is performed based on versatile video coding (VVC) based technique.
12 . The computer-implemented method of claim 10 , further comprising:
(d) determining, based on the encoding of the frame, an output bit-rate and an output quality of the frame; and
(e) updating, based on the determined output bit-rate and output quality, the model parameters of the R-Q model and the quality-quantization model.
13 . The computer-implemented method of claim 12 , wherein the updating in (e) is performed based on a gradient descent update method.
14 . The computer-implemented method of claim 12 , further comprising:
performing or repeating steps (a) to (e) for multiple frames of the video.
15 . A system for processing a video, comprising:
one or more processors; and
memory storing one or more programs configured to be executed by the one or more processors, the one or more programs including instructions for performing or facilitating performing of to the computer-implemented method of claim 1 .
16 . A non-transitory computer readable medium having instructions stored thereon which, when executed by one or more processors, cause the one or more processors to execute the computer-implemented method of claim 1 .