Quality issue in video-blend
Submitted by Muthu
Link to original bug (#744395)
Description
While overlaying a logo in video, I have used the following pipeline
gst-launch-1.0 videotestsrc ! gdkpixbufoverlay location=<logo_1240x1900.png> overlay-width=100 overlay-height=152 ! autovideosink
The quality of logo was not upto the mark and I have observed staircase effect. While digging into this, found that the issue was in video-blend.c module
- Chroma sub-sampling is not performed before packing in video-blend.c. Chroma sub-sampling while 4:4:4 to 4:2:0 format conversion should be done before packing. Because this is not done, chroma pixels are directly dropped that led to aliasing.
- The coefficients used in RGB to YUV conversion are not same mentioned for Studio swing for BT.601 or Full swing for BT.601 in http://en.wikipedia.org/wiki/YUV. Use of coefficients from http://en.wikipedia.org/wiki/YUV improves the visual quality in Cb and Cr components. The Y coefficients are not summing to 256. So there seems to be some error.
Other than this, also found resizing by different filters may be added along with bilinear which is already existing. Lanczos2 gives better visual quality. Bilinear doesn’t give good quality though.
Version: 1.4.5