Tecnologia e non solo

maggio 21, 2013

x264 OpenCL lookahead, test 2

Filed under: Debian,Video — telperion @ 12:53 pm

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.

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

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

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

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

encoded 2037 frames, 24.58 fps, 1640.35 kb/s

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

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

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

encoded 2037 frames, 25.72 fps, 1637.46 kb/s

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

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

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

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

encoded 2037 frames, 34.57 fps, 1637.09 kb/s

real 0m59.130s
poco più di 59 secondi.

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

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

encoded 2037 frames, 30.93 fps, 1643.33 kb/s

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

Stessi risultati usando ffmpeg.

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

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

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

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

real 0m59.253s

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

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

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

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

real 1m6.720s

Questi i carichi d lavoro della CPU nei 2 casi:

Uploaded with ImageShack.us

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

Commit Opencl
Altri test.

About these ads

1 commento

  1. Disponibile anche in debian multimedia unstable: x264 libx264-133

    Commento di telperion — maggio 21, 2013 @ 3:16 pm


RSS feed dei commenti a questo articolo.

The Rubric Theme. Crea un sito o un blog gratuitamente presso WordPress.com.

Iscriviti

Ricevi al tuo indirizzo email tutti i nuovi post del sito.

Unisciti agli altri 31 follower

%d blogger cliccano Mi Piace per questo: