How Bitrate and Quantization Parameter(QP) Affect Video Quality
Published:
How Bitrate and Quantization Parameter(QP) Affect Video Quality
Abstract
A report of the different bitrate and Quantization Parameter(QP)’s Influence to the Video Quality, including PSNR/MSE of the frames and processing video of YUV format.
Setup on which the code was tested
- python==3.7
- numpy==1.19.2
I. YUV format
The data I am dealing :
II. MSE and PSNR
When we calculate the MSE and PSNR, we split the Y channel of the YUV only.
1 Plot the PSNR-Y against various bitrate:
With larger bitrate, the quality of the video would be better. On the contrary, with smaller bitrate, the worse will be the quality of the video.
2 Plot the MSE-Y against various bitrate:
PSNR and MSE are inversely proportional. So do the results.
Bitrates
The left is the original image, and the right is the decoding result under different bitrates. The above is the MSE-Y under different bitrates(10 bitrates chosen).
Different bitrate is set on one video, and the MSE is shown below:
Around frame 85, the error generally becomes smaller, indicating that the image change range around frame 85 is small and the coding accuracy is high. And I found that the video doesn’t contain too many objects around frame 85, compared with frame 20.
We could observe that the MSE is larger when it contains more objects.
Quantization Parameter(QP)
Quantization, involved in image processing, is a lossy compression technique achieved by compressing a range of values to a single quantum value. When the number of discrete symbols in a given stream is reduced, the stream becomes more compressible. For example, reducing the number of colors required to represent a digital image makes it possible to reduce its file size. Specific applications include DCT data quantization in JPEG and DWT data quantization in JPEG 2000.
With different QPs, we obtain the curve below:
With larger QP, more information will be compressed, so we will have larger MSE.
Issues
The above is the description of all the work for the How Bitrate and Quantization Parameter(QP) Affect Video Quality. If you encounter unclear or controversial issues, feel free to contact Leslie Wong.