Tecnologia e non solo

maggio 9, 2013

x264 OpenCL lookahead, test.

Filed under: Debian,Video — telperion @ 1:39 pm

Dal 21 febbraio è stato aggiunto a x264 il supporto OpenCl per lookahead.
Per i dettagli leggete qui.

Ho voluto fare qualche test su Debian sid 64, CPU Intel Q8300, GPU NVIDIA GT 440.
Versione x264-76a5c3a


Uploaded with ImageShack.us

Per attivare la compilazione di x264 con le librerie OpenCl su linux,
è necessario modificare il configure:

--- a/configure 2013-04-29 21:29:38.000000000 +0200
+++ b/configure 2013-05-02 16:11:24.000000000 +0200
@@ -1115,8 +1115,8 @@
# OpenCL support is only well tested on Windows/MinGW. If you
# wish to try it on an unsupported platform, swap the lines
# below. If OpenCL breaks, you get to keep both halves
- #opencl="yes"
- opencl="no"
+ opencl="yes"
+ #opencl="no"
fi
if [ "$opencl" = "yes" ]; then
log_check "looking for perl"
@@ -1125,7 +1125,7 @@
echo 'OpenCL support requires perl to compile.'
echo 'use --disable-opencl to compile without OpenCL.'
exit 1
- elif [[ $cross_prefix != "" && $host_os == mingw* ]] ; then
+ elif [[ $host_os != mingw* ]] ; then
if cc_check "CL/cl.h" "-lOpenCL"; then
echo 'HAVE_OPENCL=yes' >> config.mak
echo 'OPENCL_LIB=OpenCL' >> config.mak

configurazione di x264:

./configure \
--extra-cflags='-g -O3 -mtune=core2 -fstack-protector \
--param=ssp-buffer-size=4 -Wformat -Werror=format-security' \
--extra-ldflags='-Wl,-z,relro' \
--enable-static \
--enable-pic \
--enable-visualize

codifica normale:

~./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
x264 [info]: frame I:14 Avg QP:23.15 size: 85538
x264 [info]: frame P:1211 Avg QP:26.11 size: 11441
x264 [info]: frame B:812 Avg QP:29.11 size: 2906
x264 [info]: consecutive B-frames: 36.3% 24.8% 20.2% 18.7%
x264 [info]: kb/s:1640.28

encoded 2037 frames, 24.73 fps, 1640.35 kb/s

real 1m22.482s

codifica con OpenCl:

~./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
x264 [info]: frame I:14 Avg QP:23.02 size: 83283
x264 [info]: frame P:1138 Avg QP:26.42 size: 11898
x264 [info]: frame B:885 Avg QP:28.41 size: 3023
x264 [info]: consecutive B-frames: 29.6% 31.2% 19.0% 20.2%
x264 [info]: kb/s:1637.39

encoded 2037 frames, 25.49 fps, 1637.46 kb/s

real 1m20.106s

Ho fatto anche un test di codifica a 10Bit, con x264 configurato con:

./configure \
--extra-cflags='-g -O3 -mtune=core2 -fstack-protector \
--param=ssp-buffer-size=4 -Wformat -Werror=format-security' \
--extra-ldflags='-Wl,-z,relro' \
--enable-static \
--enable-pic \
--bit-depth=10 \
--enable-visualize

Codifica a 10 bit:

~./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 10, level 4.0, 4:2:0 10-bit
x264 [info]: frame I:14 Avg QP:33.94 size: 96241
x264 [info]: frame P:1455 Avg QP:38.01 size: 10247
x264 [info]: frame B:568 Avg QP:40.87 size: 2154
x264 [info]: consecutive B-frames: 44.7% 54.4% 0.1% 0.8%
x264 [info]: kb/s:1646.68

encoded 2037 frames, 16.36 fps, 1646.75 kb/s

real 2m4.628s

Che dire, opencl non mi sembra fornire questa grande accelerazione.

“Mi stai diludendo” (cit.)

2 commenti

  1. […] a x264, anche ffmpeg 1.2+git ha incluso l’accelerazione OpenCL, per ora su due filtri deshake e […]

    Pingback di FFmpeg, OpenCL sui filtri deshake e unsharp, test. | Tecnologia e non solo — maggio 9, 2013 @ 2:31 pm

  2. […] nuovo commit per x264 (versione 133) migliora le performance di OpenCL che come visto nel test precedente non erano stati particolarmente […]

    Pingback di x264 OpenCL lookahead, test 2 | Tecnologia e non solo — maggio 21, 2013 @ 12:53 pm


RSS feed for comments on this post.

Blog su WordPress.com.

%d blogger cliccano Mi Piace per questo: