[FFmpeg-devel] Performance of P010LE/BE pixel convertion
Ali KIZIL
alikizil at gmail.com
Thu Sep 1 14:54:31 EEST 2016
Hi All,
I want to give answers to some questions:
1) @Oliver, thank you for explanations. I tried yuv444p16le, fps is a bit
less to 32-34 fps. Here is a short log:
Stream #0:0(und): Video: hevc (nvenc_hevc) (Main 10), 1 reference
frame, yuv444p16le, 3840x2160 [SAR 1:1 DAR 16:9], q=-1--1, 28000 kb/s, 60
fps, 90k tbn, 60 tbc (default)
Metadata:
creation_time : 2013-12-17T16:40:26.000000Z
handler_name : GPAC ISO Video Handler
encoder : Lavc57.54.101 nvenc_hevc
Side data:
cpb: bitrate max/min/avg: 28000000/0/28000000 buffer size: 28000000
vbv_delay: -1
Stream #0:1(und): Audio: mp2, 48000 Hz, stereo, s16, delay 481, padding
0, 384 kb/s (default)
Metadata:
creation_time : 2013-12-17T16:40:28.000000Z
handler_name : GPAC ISO Audio Handler
encoder : Lavc57.54.101 mp2
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (nvenc_hevc))
Stream #0:2 -> #0:1 (ac3 (native) -> mp2 (native))
Press [q] to stop, [?] for help
[h264 @ 0x1549cc0] Reinit context to 3840x2160, pix_fmt: yuv420p
[AVBSFContext @ 0x15da860] The input looks like it is Annex B alreadyA
speed= 0x
frame= 1225 fps= 34 q=16.0 Lsize= 74899kB time=00:00:20.43
bitrate=30027.8kbits/s speed=0.565x
2) @Timo, I just want to share my test results on the work done to see if
we can catch a chance to increase performance by solving the bottleneck. If
you target to do real time UHD HEVC 10 bits encoding via Nvidia Pascal
GPUs, 50 fps is a need to reach as standart currently stands there.
3) @Ronald, you are totally right 8 bits to 10 bits convertion makes no
sense. I did it as my sample in hand was so. Now, I did the same test from
YUV420P10LE to P010LE as below. FPS waves from 41-42 fps:
root at kizil105:/opt/ffmpeg# /opt/ffmpeg/bin/ffmpeg -loglevel verbose
-ignore_unknown -probesize 100000000 -async 1 -thread_queue_size 2048
-err_detect compliant -i
/media/usb1/4K_TS/SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv
-c:v:0 rawvideo -c:a:0 pcm_s16le -f nut -pix_fmt p010le -y /dev/null
ffmpeg version N-81508-g99882d0 Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --prefix=/opt/ffmpeg --enable-shared --enable-static
--enable-nonfree --enable-gpl --extra-cflags='-I/opt/ffmpeg/include
-I/usr/local/include' --extra-ldflags=-L/opt/ffmpeg/lib
--bindir=/opt/ffmpeg/bin --extra-libs=-ldl --enable-libx264
--enable-libx265 --enable-nonfree --enable-gpl --enable-nvenc
--enable-vdpau --enable-libzvbi --enable-libfdk-aac --enable-libzimg
--enable-avresample --enable-libnpp --enable-cuda
libavutil 55. 29.100 / 55. 29.100
libavcodec 57. 54.101 / 57. 54.101
libavformat 57. 48.101 / 57. 48.101
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 58.100 / 6. 58.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Routing option err_detect to both codec and muxer layer
Input #0, matroska,webm, from
'/media/usb1/4K_TS/SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv':
Metadata:
encoder : libebml v1.3.1 + libmatroska v1.4.2
creation_time : 2015-10-03T13:49:42.000000Z
Duration: 00:01:49.29, start: 0.816000, bitrate: 18484 kb/s
Stream #0:0: Video: hevc (Main 10), 1 reference frame, yuv420p10le(tv),
3840x2160 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn, 60 tbc (default)
Metadata:
BPS : 18497251
BPS-eng : 18497251
DURATION : 00:01:48.450000000
DURATION-eng : 00:01:48.450000000
NUMBER_OF_FRAMES: 6507
NUMBER_OF_FRAMES-eng: 6507
NUMBER_OF_BYTES : 250753360
NUMBER_OF_BYTES-eng: 250753360
_STATISTICS_WRITING_APP: mkvmerge v8.0.0 ('Til The Day That I Die')
64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v8.0.0 ('Til The Day That I
Die') 64bit
_STATISTICS_WRITING_DATE_UTC: 2015-10-03 13:49:42
_STATISTICS_WRITING_DATE_UTC-eng: 2015-10-03 13:49:42
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
Metadata:
BPS : 124607
BPS-eng : 124607
DURATION : 00:01:49.267000000
DURATION-eng : 00:01:49.267000000
NUMBER_OF_FRAMES: 4669
NUMBER_OF_FRAMES-eng: 4669
NUMBER_OF_BYTES : 1701940
NUMBER_OF_BYTES-eng: 1701940
_STATISTICS_WRITING_APP: mkvmerge v8.0.0 ('Til The Day That I Die')
64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v8.0.0 ('Til The Day That I
Die') 64bit
_STATISTICS_WRITING_DATE_UTC: 2015-10-03 13:49:42
_STATISTICS_WRITING_DATE_UTC-eng: 2015-10-03 13:49:42
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[graph 0 input from stream 0:0 @ 0x20822a0] w:3840 h:2160
pixfmt:yuv420p10le tb:1/1000 fr:60/1 sar:1/1 sws_param:flags=2
[auto-inserted scaler 0 @ 0x20836a0] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x2082880] auto-inserting filter 'auto-inserted scaler 0' between
the filter 'Parsed_null_0' and the filter 'format'
[auto-inserted scaler 0 @ 0x20836a0] w:3840 h:2160 fmt:yuv420p10le sar:1/1
-> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x4
[graph 1 input from stream 0:1 @ 0x2076080] tb:1/44100 samplefmt:fltp
samplerate:44100 chlayout:0x3
-async is forwarded to lavfi similarly to -af
aresample=async=1:min_hard_comp=0.100000:first_pts=0.
[graph 1 aresample for input stream 0:1 @ 0x20b4460] ch:2 chl:stereo
fmt:fltp r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
[nut @ 0x208f9a0] Using AVStream.codec to pass codec parameters to muxers
is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, nut, to '/dev/null':
Metadata:
encoder : Lavf57.48.101
Stream #0:0: Video: rawvideo, 1 reference frame (RGB[15] / 0xF424752),
p010le, 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 fps, 61440 tbn,
60 tbc (default)
Metadata:
BPS : 18497251
BPS-eng : 18497251
DURATION : 00:01:48.450000000
DURATION-eng : 00:01:48.450000000
NUMBER_OF_FRAMES: 6507
NUMBER_OF_FRAMES-eng: 6507
NUMBER_OF_BYTES : 250753360
NUMBER_OF_BYTES-eng: 250753360
_STATISTICS_WRITING_APP: mkvmerge v8.0.0 ('Til The Day That I Die')
64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v8.0.0 ('Til The Day That I
Die') 64bit
_STATISTICS_WRITING_DATE_UTC: 2015-10-03 13:49:42
_STATISTICS_WRITING_DATE_UTC-eng: 2015-10-03 13:49:42
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
encoder : Lavc57.54.101 rawvideo
Stream #0:1: Audio: pcm_s16le (PSD[16] / 0x10445350), 44100 Hz, stereo,
s16, 1411 kb/s (default)
Metadata:
BPS : 124607
BPS-eng : 124607
DURATION : 00:01:49.267000000
DURATION-eng : 00:01:49.267000000
NUMBER_OF_FRAMES: 4669
NUMBER_OF_FRAMES-eng: 4669
NUMBER_OF_BYTES : 1701940
NUMBER_OF_BYTES-eng: 1701940
_STATISTICS_WRITING_APP: mkvmerge v8.0.0 ('Til The Day That I Die')
64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v8.0.0 ('Til The Day That I
Die') 64bit
_STATISTICS_WRITING_DATE_UTC: 2015-10-03 13:49:42
_STATISTICS_WRITING_DATE_UTC-eng: 2015-10-03 13:49:42
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
encoder : Lavc57.54.101 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> rawvideo (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[graph 1 aresample for input stream 0:1 @ 0x20b4460] [SWR @ 0x20efe60]
adding 1014 audio samples of silence
frame= 603 fps= 41 q=-0.0 Lsize=14654712kB time=00:00:10.30
bitrate=11644810.9kbits/s speed=0.702x
video:14652900kB audio:1776kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.000243%
Input file #0
(/media/usb1/4K_TS/SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv):
Input stream #0:0 (video): 617 packets read (21889901 bytes); 604 frames
decoded;
Input stream #0:1 (audio): 443 packets read (161636 bytes); 443 frames
decoded (453632 samples);
Total: 1060 packets (22051537 bytes) demuxed
Output file #0 (/dev/null):
Output stream #0:0 (video): 603 frames encoded; 603 packets muxed
(15004569600 bytes);
Output stream #0:1 (audio): 443 frames encoded (454646 samples); 443
packets muxed (1818584 bytes);
Total: 1046 packets (15006388184 bytes) muxed
Exiting normally, received signal 2.
(Sorry for cutting previous discussion texts as I wanted to make email
message to be not too long.)
More information about the ffmpeg-devel
mailing list