Install necessary software packages

x265 is an open-source H.265/HVEC encoder that offers very high compression efficiency and performance. There have been significant efforts to optimize the open-source libx265 implementation of the H.265 encoder on Arm Neoverse platforms which supports Neon instructions. The optimized code is available on Bitbucket

Install GCC for your Arm Linux distribution. Refer to the install guide for additional information.

Install Cmake and other dependencies:

    

        
        
            sudo apt install git wget cmake cmake-curses-gui -y
        
    

Install Build-essential and yasm

    

        
        
            sudo apt install build-essential yasm -y
        
    

Download and build x265 source

    

        
        
            git clone https://bitbucket.org/multicoreware/x265_git.git
cd x265_git/build/linux
./make-Makefiles.bash
make
        
    

For detailed instructions refer to this README .

Download video streams to run x265 on and measure performance

To benchmark the compression efficiency and performance of x265, you will need a set of video streams to run the codec on. You can use the video files from the Google YouTube UGC data set with different resolutions.

Download the 360P and 1080P video files:

    

        
        
            wget https://storage.googleapis.com/ugc-dataset/original_videos/Sports/360P/Sports_360P-02c3.mkv
wget https://storage.googleapis.com/ugc-dataset/original_videos/Sports/1080P/Sports_1080P-0640.mkv
        
    

Run x265 on the sample video files

To benchmark the performance of x265 over 50 frames of the 360P video file, run the command:

    

        
        
            ./x265 --preset ultrafast --frames 50 Sports_360P-02c3.mkv --input-res 640x360 --fps 24 --output outfile.265 --frame-threads 1 --no-wpp --pools ','
        
    

To benchmark the performance of x265, using the 1080P video file, run the command:

    

        
        
            ./x265 --preset ultrafast --frames 50 Sports_1080P-0640.mkv --input-res 1920x1080 --fps 24 --output outfile.265 --frame-threads 1 --no-wpp --pools ','
        
    

You can vary the preset settings on the different resolution images and measure the impact on performance.

For full usage instructions, refer to the command line documentation , or see the help:

    

        
        
            ./x265 --help
        
    

View Results

The encoding Frame Rate (Frames per second) for the video files is output at the end of each run.

Shown below is example output from running the codec on the 1080P sample video file:

    

        
        yuv  [info]: 1920x1080 fps 24000/1000 i420p8 frames 0 - 49 of 500
raw  [info]: output file: outfile.265
x265 [info]: HEVC encoder version 3.5+38-20255e6f0
x265 [info]: build info [Linux][GCC 9.4.0][32 bit] 8bit
x265 [info]: using cpu capabilities: NEON
x265 [info]: Main profile, Level-4 (Main tier)
x265 [warning]: No thread pool allocated, --lookahead-slices disabled
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 1 / none
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip mode=1 tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing deblock
x265 [info]: frame I:      1, Avg QP:32.43  kb/s: 41945.86
x265 [info]: frame P:     13, Avg QP:32.29  kb/s: 30498.79
x265 [info]: frame B:     36, Avg QP:35.31  kb/s: 9951.11
x265 [info]: consecutive B-frames: 14.3% 0.0% 0.0% 85.7%

encoded 50 frames in 13.74s (3.64 fps), 15933.41 kb/s, Avg QP:34.47

        
    
Back
Next