[FFmpeg-devel] [PATCH] libswscale/swscale_unscaled.c: UHD Resolution Performance Increase for Color Space Convertions / NVENC Related

Ali KIZIL alikizil at gmail.com
Mon Oct 3 13:54:13 EEST 2016


2016-10-03 13:28 GMT+03:00 Hendrik Leppkes <h.leppkes at gmail.com>:

> On Mon, Oct 3, 2016 at 11:35 AM, Ali KIZIL <alikizil at gmail.com> wrote:
> > Hello,
> >
> > This patch is done for performance increase on UHD or above resolution
> > color space convertions.
> > Some SDI sources provide yuv422p10 for 10bit source and uyvy422 for 8 bit
> > source.
> > To encode these sources with NVENC 10 bits, there is a need to convert
> > these color spaces to P010.
> >
> > Before patch for UHD and above resolutions, convertion could not exceed
> > ~25-30 fps, which can not be used for a 50 fps encoding.
> > This patch fixes this problem.
> >
> > Also, color space convertion speed for 10bit YUV422P to 8bit YUV420P is
> > having the same problem.
> > If anybody wants to encode 10 bits source in 8 bits for UHD or above
> > resolutions could not achive high frame rate ratio as well.
> > This patch also fixes this problem.
> >
> > I think it will be good to apply this patch to avoid performance loss in
> > high resolutions.
> >
>
> These conversion functions butcher quality by using only every second
> row of chroma for 422 -> 420 conversions without any interpolation,
> and they don't dither for 10->8 bit conversions.
> Not sure its a good idea to do that, even more so without an option to
> defeat these low-quality variants with the swscale flags.
>
> - Hendrik
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Hello Hendrik,

Yes, only every second row of chroma for 422 -> 420 conversions without any
interpolation is used.
Where I can find an interpolation example ? Also, the code is done for
performance criteria for UHD and above resolution in real time encoding.
In myside test, I didnt notice a gap. For sure, I am not a video quality
expert. Can you tell me how to compare quality ?

Can you explain more for "they don't dither for 10->8 bit conversions." I
couldnt understand this.

Kind Regards,


More information about the ffmpeg-devel mailing list