[FFmpeg] libx265のupdate

以前の記事からのアップデート

[[FFmpeg] ffmpeg に libx265 をリンクする](http://qiita.com/pb_tmz08/items/29165f4c3ef9bc4285ab)

### ソースコードのアップデート

```shell-session
$ cd /path/to/libx265
$ hg update
$ cd build
$ cmake .
-- cmake version 2.8.8
-- Detected x86 target processor
-- Could NOT find NUMA (missing:  NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY)
-- Found Yasm 1.2.0 to build assembly primitives
-- hg found at /usr/bin/hg
-- x265 version 1.6+298-4a7176bab742
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/x265/build
```

NUMAってなんぞや？

[NUMA -wikipedia-](http://ja.wikipedia.org/wiki/NUMA)

### NUMA のインストール

```shell-session
# yum install numactl numactl-devel

# ls /usr/lib64/libnuma.*
/usr/lib64/libnuma.a  /usr/lib64/libnuma.so  /usr/lib64/libnuma.so.1

$ cmake .
-- cmake version 2.8.8
-- Detected x86 target processor
-- Found NUMA: /usr
-- Looking for numa_node_of_cpu
-- Looking for numa_node_of_cpu - found
-- libnuma found, building with support for NUMA nodes
-- Found Yasm 1.2.0 to build assembly primitives
-- hg found at /usr/bin/hg
-- x265 version 1.6+298-4a7176bab742
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/x265/build
```

### x265 のビルドとインストール

```shell-session
$ make
# make install
[ 63%] Built target common
[ 87%] Built target encoder
[ 87%] Built target x265-shared
[100%] Built target cli
[100%] Built target x265-static
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libx265.a
-- Installing: /usr/local/include/x265.h
-- Installing: /usr/local/include/x265_config.h
-- Installing: /usr/local/lib/libx265.so.56
-- Installing: /usr/local/lib/libx265.so
-- Installing: /usr/local/lib/pkgconfig/x265.pc
-- Installing: /usr/local/bin/x265
-- Removed runtime path from "/usr/local/bin/x265"
```

### 確認

```shell-session
$ ldd /usr/local/bin/x265
        linux-vdso.so.1 =>  (0x00007fff090d7000)
        libx265.so.56 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003c24400000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003c25000000)
        libnuma.so.1 => /usr/lib64/libnuma.so.1 (0x00007f1a94dd7000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003c28c00000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003c24000000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003c27800000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003c23c00000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003c23800000)
```

前回同様、リンクしてない

```shell-session
# ldconfig -v
# ldd /usr/local/bin/x265
        linux-vdso.so.1 =>  (0x00007fff491ff000)
        libx265.so.56 => /usr/local/lib/libx265.so.56 (0x00007f33cc80e000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003c24400000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003c25000000)
        libnuma.so.1 => /usr/lib64/libnuma.so.1 (0x00007f33cc602000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003c28c00000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003c24000000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003c27800000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003c23c00000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003c23800000)

# x265 -h
x265 [info]: HEVC encoder version 1.6+298-4a7176bab742
x265 [info]: build info [Linux][GCC 4.4.7][64 bit] 8bpp

```


おｋ！