[FFmpeg-devel] Performance of P010LE/BE pixel convertion

Oliver Collyer ovcollyer at mac.com
Thu Sep 1 14:27:10 EEST 2016


Hi Ali

> On 1 Sep 2016, at 14:00, Ali KIZIL <alikizil at gmail.com> wrote:
> 
> Hi Oliver,
> 
> I just setup my DDR3 RAM speed to 2133 Mhz on i7 4960x server. It dosnt
> make a much difference. FPS is still waiving 41-44 fps for UHD P010LE HEVC
> Main 10 encoding.
> 
> Also, rawvideo P010LE encodding waiving 39-42 fps. For your note;while FPS
> waves from 39-42 fps for YUV420P to P010LE, YUV420P to YUV420P10LE fps is
> like 75-76:
> 

At a guess this is because YUV420P to P010 involves interleaving the UV planes, which is slightly more complex?

Seems a pretty big difference with your results though. Hopefully someone more knowledgeable can comment.

>    Stream #0:0: Video: rawvideo, 1 reference frame (Y3[11][10] /
> 0xA0B3359), yuv420p10le, 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60
> fps, 61440 tbn, 60 tbc (default)
>    Metadata:
>      creation_time   : 2013-12-17T16:40:26.000000Z
>      X-Language      : und
>      handler_name    : GPAC ISO Video Handler
>      encoder         : Lavc57.54.101 rawvideo
>    Stream #0:1: Audio: pcm_s16le (PSD[16] / 0x10445350), 48000 Hz,
> 5.1(side), s16, 4608 kb/s (default)
>    Metadata:
>      creation_time   : 2013-12-17T16:40:28.000000Z
>      X-Language      : und
>      handler_name    : GPAC ISO Audio Handler
>      encoder         : Lavc57.54.101 pcm_s16le
> Stream mapping:
>  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
>  Stream #0:2 -> #0:1 (ac3 (native) -> pcm_s16le (native))
> Press [q] to stop, [?] for help
> [h264 @ 0x1c4e940] Reinit context to 3840x2160, pix_fmt: yuv420p
> frame= 2289 fps= 76 q=-0.0 size=55279649kB time=00:00:38.16
> bitrate=11865083.7kbits/s speed=1.26x
> 
> So, bottleneck for P010LE encoding is not coming from RAM. I will do the
> tests on a more powerful server as I mentioned before (Dual Xeon E5-2630 v4
> with DDR 64 GB Ram)
> 
> And is it a mendetoary for Nvidia SDK to work with P010LE for 10bits
> encoding HEVC?
> 

Here is what is defined in the SDK for 10-bit encoding formats:

/**
 * Input buffer formats
 */
typedef enum _NV_ENC_BUFFER_FORMAT
{
    NV_ENC_BUFFER_FORMAT_UNDEFINED                       = 0x00000000,  /**< Undefined buffer format */
                                                                       
    NV_ENC_BUFFER_FORMAT_NV12                            = 0x00000001,  /**< Semi-Planar YUV [Y plane followed by interleaved UV plane] */
    NV_ENC_BUFFER_FORMAT_YV12                            = 0x00000010,  /**< Planar YUV [Y plane followed by V and U planes] */
    NV_ENC_BUFFER_FORMAT_IYUV                            = 0x00000100,  /**< Planar YUV [Y plane followed by U and V planes] */
    NV_ENC_BUFFER_FORMAT_YUV444                          = 0x00001000,  /**< Planar YUV [Y plane followed by U and V planes] */
    NV_ENC_BUFFER_FORMAT_YUV420_10BIT                    = 0x00010000,  /**< 10 bit Semi-Planar YUV [Y plane followed by interleaved UV plane]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data. */
    NV_ENC_BUFFER_FORMAT_YUV444_10BIT                    = 0x00100000,  /**< 10 bit Planar YUV444 [Y plane followed by U and V planes]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data.  */
    NV_ENC_BUFFER_FORMAT_ARGB                            = 0x01000000,  /**< 8 bit Packed A8R8G8B8 */
    NV_ENC_BUFFER_FORMAT_ARGB10                          = 0x02000000,  /**< 10 bit Packed A2R10G10B10. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data.  */
    NV_ENC_BUFFER_FORMAT_AYUV                            = 0x04000000,  /**< 8 bit Packed A8Y8U8V8 */
    NV_ENC_BUFFER_FORMAT_ABGR                            = 0x10000000,  /**< 8 bit Packed A8B8G8R8 */
    NV_ENC_BUFFER_FORMAT_ABGR10                          = 0x20000000,  /**< 10 bit Packed A2B10G10R10. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data.  */
} NV_ENC_BUFFER_FORMAT;


Of the 10-bit formats, only NV_ENC_BUFFER_FORMAT_YUV420_10BIT and  NV_ENC_BUFFER_FORMAT_YUV444_10BIT are currently implemented in FFmpeg.

Also NV_ENC_BUFFER_FORMAT_YUV420_10BIT above is actually YUVP010 according to the description (i.e. interleaved UV planes).

So if you want to avoid P010 then you can try encoding with YUV444 10 bit by using the FFmpeg pixel format yuv444p16; what sort of encoding speeds do you get with this?

> Regards,
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list