«

»

Mag 21

x264 OpenCL lookahead, test 2

Un nuovo commit per x264 (versione 133), vediamo se migliora le performance di OpenCL che come visto nel test precedente non erano stati particolarmente brillanti.

\n

\n

Solita piattaforma, debian sid 64, Intel Q8300, NVIDIA GeForce GT 440.

\n

Ora non è più necessario modificare il configure, in presenza delle librerie OpenCL, il supporto viene attivato automaticamente. e si compila anche la libreria condivisa.
\nAnche via ffmpeg si può attivare OpenCL con
\n-x264opts opencl.

\n

Senza OpenCL
\n$ time ./x264 –threads 0 –sar 4:3 \
\n–bitrate 1800 –preset fast –tune film \
\n-o video.mkv /media/scambio/Amazing_Caves_1080.wmv

\n

lavf [info]: 1440x1080p 0:1 @ 0/0 fps (vfr)
\nx264 [info]: using SAR=4/3
\nx264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
\nx264 [info]: profile High, level 4.0

\n

encoded 2037 frames, 24.58 fps, 1640.35 kb/s

\n

real 1m22.962s
\n1 minuto e 23 secondi.

\n

Con OpenCl
\n$ time ./x264 –threads 0 –opencl –sar 4:3 \
\n –bitrate 1800 –preset fast –tune film \
\n-o video.mkv /media/scambio/Amazing_Caves_1080.wmv

\n

lavf [info]: 1440x1080p 0:1 @ 0/0 fps (vfr)
\nx264 [info]: using SAR=4/3
\nx264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
\nx264 [info]: OpenCL acceleration enabled with NVIDIA Corporation GeForce GT 440
\nx264 [info]: profile High, level 4.0

\n

encoded 2037 frames, 25.72 fps, 1637.46 kb/s

\n

real 1m19.390s
\n1 minuto e 19 secondi circa.

\n

Con il preset slow (rc-lookahead 50 contro rc-lookahead 20 di faster).

\n

Senza OpenCL
\n$ time ./x264 –threads 0 –sar 4:3 \
\n–bitrate 1800 –preset slow –pass 1 –tune film \
\n-o /dev/null /media/scambio/Amazing_Caves_1080.wmv

\n

lavf [info]: 1440x1080p 0:1 @ 0/0 fps (vfr)
\nx264 [info]: using SAR=4/3
\nx264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
\nx264 [info]: profile Main, level 4.0

\n

encoded 2037 frames, 34.57 fps, 1637.09 kb/s

\n

real 0m59.130s
\npoco più di 59 secondi.

\n

Con OpenCL
\n$ time ./x264 –threads 0 –sar 4:3 \
\n–bitrate 1800 –preset slow –opencl –pass 1 –tune film \
\n-o /dev/null /media/scambio/Amazing_Caves_1080.wmv

\n

lavf [info]: 1440x1080p 0:1 @ 0/0 fps (vfr)
\nx264 [info]: using SAR=4/3
\nx264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
\nx264 [info]: OpenCL acceleration enabled with NVIDIA Corporation GeForce GT 440
\nx264 [info]: profile Main, level 4.0

\n

encoded 2037 frames, 30.93 fps, 1643.33 kb/s

\n

real 1m6.115s
\n1 minuto e 6 secondi.

\n

Stessi risultati usando ffmpeg.

\n

Senza OpenCL
\n$ time ffmpeg2 -y -i /media/scambio/Amazing_Caves_1080.wmv \
\n-threads 0 \
\n-c:v libx264 -preset slow -tune film \
\n-b:v 1800k -x264opts sar=4/3 \
\n-pass 1 -fastfirstpass 1 -an \
\n-f matroska /dev/null

\n

ffmpeg version N-53323-gb8a9876 Copyright (c) 2000-2013 the FFmpeg developers
\n built on May 21 2013 18:41:38 with gcc 4.7 (Debian 4.7.3-4)

\n

Duration: 00:01:25.50, start: 0.000000, bitrate: 8295 kb/s
\n Stream #0:0(eng): Audio: wmapro (b[1][0][0] / 0x0162), 48000 Hz, 5.1, fltp, 384 kb/s
\n Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 1440×1080, 8000 kb/s, SAR 4:3 DAR 16:9, 23.98 tbr, 1k tbn, 1k tbc
\n[libx264 @ 0x194d720] using SAR=4/3
\n[libx264 @ 0x194d720] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
\n[libx264 @ 0x194d720] profile Main, level 4.0
\n[libx264 @ 0x194d720] 264 – core 133 – H.264/MPEG-4 AVC codec – Copyleft 2003-2013 \
\nOutput #0, matroska, to ‘/dev/null’:

\n

Stream mapping:
\n Stream #0:1 -> #0:0 (wmv3 -> libx264)
\nPress [q] to stop, [?] for help
\nframe= 2037 fps= 34 q=-1.0 Lsize= 16987kB time=00:01:24.87 bitrate=1639.5kbits/s
\nvideo:16971kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.093150%

\n

real 0m59.253s

\n

Con OpenCL
\n$ time ffmpeg2 -y -i /media/scambio/Amazing_Caves_1080.wmv \
\n -threads 0 \
\n-c:v libx264 -preset slow -tune film \
\n-b:v 1800k -x264opts opencl:sar=4/3 \
\n-pass 1 -fastfirstpass 1 -an \
\n-f matroska /dev/null

\n

ffmpeg version N-53323-gb8a9876 Copyright (c) 2000-2013 the FFmpeg developers
\n built on May 21 2013 18:41:38 with gcc 4.7 (Debian 4.7.3-4)

\n

Duration: 00:01:25.50, start: 0.000000, bitrate: 8295 kb/s
\n Stream #0:0(eng): Audio: wmapro (b[1][0][0] / 0x0162), 48000 Hz, 5.1, fltp, 384 kb/s
\n Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 1440×1080, 8000 kb/s, SAR 4:3 DAR 16:9, 23.98 tbr, 1k tbn, 1k tbc
\n[libx264 @ 0x3044720] using SAR=4/3
\n[libx264 @ 0x3044720] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
\n[libx264 @ 0x3044720] OpenCL acceleration enabled with NVIDIA Corporation GeForce GT 440
\n[libx264 @ 0x3044720] profile Main, level 4.0
\n[libx264 @ 0x3044720] 264 – core 133 – H.264/MPEG-4 AVC codec – Copyleft 2003-2013
\nOutput #0, matroska, to ‘/dev/null’:

\n

Stream mapping:
\n Stream #0:1 -> #0:0 (wmv3 -> libx264)
\nPress [q] to stop, [?] for help
\nframe= 2037 fps= 31 q=-1.0 Lsize= 17051kB time=00:01:24.87 bitrate=1645.7kbits/s
\nvideo:17035kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.092664%

\n

real 1m6.720s

\n

Questi i carichi d lavoro della CPU nei 2 casi:
\n
Uploaded with ImageShack.us

\n

OpenCL più lenta della Cpu,
\nniente “miracoli velocistici” purtroppo.

\n

Commit Opencl
\nAltri test.