Git Product home page Git Product logo

openvisualcloud / svt-hevc Goto Github PK

View Code? Open in Web Editor NEW
503.0 49.0 169.0 9.39 MB

SVT HEVC encoder. Scalable Video Technology (SVT) is a software-based video coding technology that is highly optimized for Intel® Xeon® processors. Using the open source SVT-HEVC encoder, it is possible to spread video encoding processing across multiple Intel® Xeon® processors to achieve a real advantage of processing efficiency.

License: Other

Shell 0.11% Python 0.73% C 97.99% CMake 0.28% Assembly 0.83% Batchfile 0.05% Meson 0.02%
svt hevc h265

svt-hevc's Introduction

Scalable Video Technology for HEVC Encoder (SVT-HEVC Encoder)

AppVeyor Build Status Travis Build Status

The Scalable Video Technology for HEVC Encoder (SVT-HEVC Encoder) is an HEVC-compliant encoder library core that achieves excellent density-quality tradeoffs, and is highly optimized for Intel® Xeon™ Scalable Processor and Xeon™ D processors.

The whitepaper for SVT-HEVC can be found here: https://01.org/svt

This encoder has been optimized to achieve excellent performance levels using 12 density-quality presets (please refer to the user guide for more details).

License

Scalable Video Technology is licensed under the OSI-approved BSD+Patent license. See LICENSE for details.

Documentation

More details about the encoder usage can be found under:

System Requirements

Operating System

SVT-HEVC may run on any Windows* or Linux* 64 bit operating systems. The list below represents the operating systems that the encoder application and library were tested and validated on:

  • Windows* Operating Systems (64-bit):

    • Windows Server 2016
  • Linux* Operating Systems (64-bit):

    • Ubuntu 16.04 Server LTS

    • Ubuntu 18.04 Server LTS

    • CentOS 7.4/7.5/7.6

Hardware

The SVT-HEVC Encoder library supports x86 architecture

  • CPU Requirements

In order to achieve the performance targeted by the encoder, the specific CPU model listed above would need to be used when running the encoder. Otherwise, the encoder runs on any 5th Generation Intel Core™ Processors (formerly Broadwell) CPUs (Xeon E5-v4) or newer.

  • RAM Requirements

In order to run the highest resolution supported by the encoder, at least 64GB of RAM is required to run a single 8kp50/10-bit encode. The encoder application will display an error if the system does not have enough RAM to support such. The following table shows the minimum amount of RAM required for some standard resolutions of 10bit video per stream:

Resolution Minimum Footprint (GB)
8k 64
4k 16
1080p 6
720p/1080i 4
480p 3

Build and Install

Windows* Operating Systems (64-bit)

  • Build Requirements

    • Visual Studio* 2017 (download here) or 2019 (download here)
    • CMake 3.14 or later (download here)
    • YASM Assembler version 1.2.0 or later
      • Download the yasm exe from the following link
      • Rename yasm-1.3.0-win64.exe to yasm.exe
      • Copy yasm.exe into a location that is in the PATH environment variable
  • Build Instructions

    • Build the project by following the steps below in a windows command prompt:
      • In the main repository directory, cd to <repo dir>\Build\windows
      • Run build.bat [2019|2017|2015] [This will automatically generate and build the project]
    • To Build the project using a generator other than Visual Studio
      • run build.bat [ninja|msys|mingw|unix] instead of the second command
      • Note: These are not officially supported and thus are not displayed in the help message.
  • Binaries Location

    • Binaries can be found under <repo dir>\Bin\Release or <repo dir>\Bin\Debug, depending on whether Debug or Release was selected
  • Installation
    For the binaries to operate properly, the following conditions have to be met:

    • On any of the Windows* Operating Systems listed in the OS requirements section, install Visual Studio* 2017 or 2019
    • Once the build is complete, copy the binaries to a location making sure that both the application SvtHevcEncApp.exe and library SvtHevcEnc.dll are in the same folder.
    • Open the command prompt at the chosen location and run the application to encode. SvtHevcEncApp.exe -i [in.yuv] -w [width] -h [height] -b [out.265]
    • The application also supports reading from pipe. E.g. ffmpeg -i [input.mp4] -nostdin -f rawvideo -pix_fmt yuv420p - | SvtHevcEncApp.exe -i stdin -n [number_of_frames_to_encode] -w [width] -h [height]

Linux* Operating Systems (64-bit)

  • Build Requirements

    • GCC 5.4.0 or later
    • CMake 3.5.1 or later
    • YASM Assembler version 1.2.0 or later
  • Build Instructions

    • In the main repository, run either the provided build script

      cd Build/linux
      ./build.sh [release|debug] [static|shared] [install]
      # Requires sudo permission for installing
      # Run './build.sh -h' to see the full help
    • or run the commands directly

      mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=<Release|Debug> && make -j $(nproc) && sudo make install
  • Sample Binaries location

    • Binaries can be found under $REPO_DIR/Bin/Release
  • Installation
    For the binaries to operate properly, the following conditions have to be met:

    • On any of the Linux* Operating Systems listed above, copy the binaries under a location of your choice.
    • Change the permissions on the sample application “SvtHevcEncApp” executable by running the command: chmod +x SvtHevcEncApp
    • cd into your chosen location
    • Run the sample application to encode. ./SvtHevcEncApp -i [in.yuv] -w [width] -h [height] -b [out.265]
    • Sample application supports reading from pipe. E.g. ffmpeg -i [input.mp4] -nostdin -f rawvideo -pix_fmt yuv420p - | ./SvtHevcEncApp -i stdin -n [number_of_frames_to_encode] -w [width] -h [height]

How to evaluate by ready-to-run executables with docker

Refer to the guide here.

Demo features and limitations

  • VBR BRC mode:
    The VBR functionality implemented in SVT-HEVC Encoder is a demo feature to allow for an easier integration of product level BRC. The algorithm implemented would allow the encoder to generate an output bit stream matching, with a best effort, the target bitrate. The algorithm does not guarantee a certain maximum bitrate or maximum buffer size [does not follow HRD compliance]. When set to encode in VBR mode, the encoder does not produce a bit-exact output from one run to another.

  • Speed Control output:
    The speed control functionality implemented for SVT-HEVC Encoder is a demo feature showcasing the capability of the library to adapt to the resources available on the fly in order to generate the best possible video quality while maintaining a real-time encoding speed. When set to use the Speed Control mode, the encoder does not produce a bit-exact output from one run to another.

  • Multi-instance support:
    The multi-instance functionality is a demo feature implemented in the SVT-HEVC Encoder sample application as an example of one sample application using multiple encoding libraries. Encoding using the multi-instance support is limited to only 6 simultaneous streams. For example two channels encoding on Windows: SvtHevcEncApp.exe -nch 2 -c firstchannel.cfg secondchannel.cfg

How to Contribute

We welcome community contributions to the SVT-HEVC Encoder. Thank you for your time! By contributing to the project, you agree to the license and copyright terms therein and to the release of your contribution under these terms.

Contribution process

  • Follow the coding_guidelines
  • Validate that your changes do not break a build
  • Perform smoke tests and ensure they pass
  • Submit a pull request for review to the maintainer

How to Report Bugs and Provide Feedback

Use the Issues tab on Github

IRC

#svt on Freenode. Join via Freenode Webchat or use your favorite IRC client.

Notices and Disclaimers

The notices and disclaimers can be found here

svt-hevc's People

Contributors

1480c1 avatar arthurkkhi avatar austin-hu avatar cabirdme avatar chkngit avatar dinesh0603 avatar dseah-intel avatar ewouth avatar gokul989 avatar hassount avatar heijligen avatar hwrenx avatar intelmark avatar inteltiger avatar jbeich avatar jsunintel avatar lijing0010 avatar luofalei avatar mypopydev avatar omranabdelkafi avatar ph0b avatar phamd avatar pierreintel avatar seungha-yang avatar tianjunwork avatar tszumski avatar weensy avatar xwu2git avatar yeongjin-jeong avatar zvictoria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svt-hevc's Issues

frame rate in VPS in wrong

The numerator and denominator are inversed.
For example, when the picture rate of a video signal is 25 fps, vps_time_scale may be equal to 27 000 000 and vps_num_units_in_tick may be equal to 1 080 000. in current implementation it will create a "0.04" fps stream.

No parameter for interlaced HEVC encoding on ffmpeg plugin

Hi,

I do not see a parameter to make an interlaced HEVC encoding (1080i29.97). For example, I could generate interlaced HEVC encoding with x265 with below command. What would be a command for SVT? SVT sample application has a parameter ("-interlaced-video") to signal interlaced video though.

Parameter for x265:
-x265-params interlace=1

SVT FFMPEG help message (built on top of ffmpeg 4.1)

/tools/ffmpeg_4.1_svt-hevc -h encoder=libsvt_hevc

ffmpeg version n4.1-64-gbcfd82b Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --pkg-config='pkg-config --static' --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-nonfree --enable-libsvthevc
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Encoder libsvt_hevc [SVT-HEVC(Scalable Video Technology for HEVC) encoder]:
General capabilities: delay threads
Threading capabilities: auto
Supported pixel formats: yuv420p yuv420p10le
libsvt_hevc AVOptions:
-vui E..V..... Enable vui info (default true)
-aud E..V..... Include AUD (default false)
-hielevel E..V..... Hierarchical prediction levels setting (from 1 to 4) (default 4level)
flat E..V.....
2level E..V.....
3level E..V.....
4level E..V.....
-la_depth E..V..... Look ahead distance [0, 256] (from -1 to 256) (default -1)
-preset E..V..... Encoding preset [0, 12] (e,g, for subjective quality tuning mode and >=4k resolution), [0, 10] (for >= 1080p resolution), [0, 9] (for all resolution and modes) (from 0 to 12) (default 9)
-profile E..V..... Profile setting, Main Still Picture Profile not supported (from 1 to 2) (default main10)
main E..V.....
main10 E..V.....
-tier E..V..... Set tier (general_tier_flag) (from 0 to 1) (default main)
main E..V.....
high E..V.....
-level E..V..... Set level (level_idc) (from 0 to 255) (default 0)
1 E..V.....
2 E..V.....
2.1 E..V.....
3 E..V.....
3.1 E..V.....
4 E..V.....
4.1 E..V.....
5 E..V.....
5.1 E..V.....
5.2 E..V.....
6 E..V.....
6.1 E..V.....
6.2 E..V.....
-rc E..V..... Bit rate control mode (from 0 to 1) (default cqp)
cqp E..V.....
vbr E..V.....
-qp E..V..... QP value for intra frames (from 0 to 51) (default 32)
-sc_detection E..V..... Scene change detection (default false)
-tune E..V..... Quality tuning mode (from 0 to 1) (default objective)
subjective E..V..... Subjective quality mode
objective E..V..... Objective quality mode for PSNR / SSIM / VMAF benchmarking
-bl_mode E..V..... Random Access Prediction Structure type setting (default false)
-forced-idr E..V..... If forcing keyframes, force them as IDR frames. (default false)

4K 10bit transcoding doesn't support 16M, 20M bitrate

When transcoding 4KP60 10bit HEVC source (80M) to 16M, 20M, it doesn't generate output file. My script is like this.

ffmpeg_4.1_svt-hevc -loglevel info -r 60 -i input.ts -c:v libsvt_hevc -tune subjective -rc vbr -profile:v main10 -level 5.1 -b:v 16M -bufsize 32M -maxrate 16M -preset 11 -g 120 -y -f mpegts out.ts

Result is core dumped with Out of bound maxBufferSize for level 5.1 and tier 0. When set bufsize same as bit rate, result is still the same. Not setting bufsize, maxrate doesn't help either.

[root@amax Script]# /tools/ffmpeg_4.1_svt-hevc -loglevel info -r 60 -i ../../Source/FFMPEG_80_0M_Netflix_DrivingPOV_3840x2160_P60_GOP120_YUV420P10LE.ts -c:v libsvt_hevc -tune subjective -rc vbr -profile:v main10 -level 5.1 -b:v 16M -bufsize 32M -maxrate 16M -preset 11 -g 120 -y -f mpegts out.ts
ffmpeg version n4.1-64-gbcfd82b Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --pkg-config='pkg-config --static' --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-nonfree --enable-libsvthevc
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, mpegts, from '../../Source/FFMPEG_80_0M_Netflix_DrivingPOV_3840x2160_P60_GOP120_YUV420P10LE.ts':
Duration: 00:01:59.90, start: 1.433333, bitrate: 86489 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv), 3840x2160, 60 fps, 60 tbr, 90k tbn, 60 tbc
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> hevc (libsvt_hevc))
Press [q] to stop, [?] for help
SVT [version]: SVT-HEVC Encoder Lib v1.3.0
SVT [build] : GCC 5.4.0 64 bit
LIB Build date: Jan 29 2019 14:40:33

SVT [Error]: Instance 1: Out of bound maxBufferSize for level 5.1 and tier 0
[libsvt_hevc @ 0x351e140] Error setting encoder parameters
*** Error in `/tools/ffmpeg_4.1_svt-hevc': free(): invalid pointer: 0x00000000095f9c20 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81499)[0x7f288ca1a499]
/usr/local/lib/libSvtHevcEnc.so.1(EbDeinitHandle+0x21)[0x7f288cfbe041]
/tools/ffmpeg_4.1_svt-hevc[0x432b85]
/tools/ffmpeg_4.1_svt-hevc[0xb397c9]
/tools/ffmpeg_4.1_svt-hevc[0x499989]
/tools/ffmpeg_4.1_svt-hevc[0x49eb36]
/tools/ffmpeg_4.1_svt-hevc[0x4a2602]
/tools/ffmpeg_4.1_svt-hevc[0x47ff12]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f288c9bb445]
/tools/ffmpeg_4.1_svt-hevc[0x4800e9]
======= Memory map: ========
00400000-01619000 r-xp 00000000 fd:00 1472583 /tools/ffmpeg_4.1_svt-hevc
01818000-01819000 r--p 01218000 fd:00 1472583 /tools/ffmpeg_4.1_svt-hevc
01819000-01864000 rw-p 01219000 fd:00 1472583 /tools/ffmpeg_4.1_svt-hevc
01864000-02058000 rw-p 00000000 00:00 0
03517000-09a63000 rw-p 00000000 00:00 0 [heap]
7f281c000000-7f281c021000 rw-p 00000000 00:00 0
7f281c021000-7f2820000000 ---p 00000000 00:00 0
7f28205ab000-7f28205c0000 r-xp 00000000 fd:00 61485 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f28205c0000-7f28207bf000 ---p 00015000 fd:00 61485 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f28207bf000-7f28207c0000 r--p 00014000 fd:00 61485 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f28207c0000-7f28207c1000 rw-p 00015000 fd:00 61485 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f28207c1000-7f28207c2000 ---p 00000000 00:00 0
7f28207c2000-7f2820fc2000 rw-p 00000000 00:00 0
7f2820fc2000-7f2820fc3000 ---p 00000000 00:00 0
7f2820fc3000-7f28217c3000 rw-p 00000000 00:00 0
7f28217c3000-7f28217c4000 ---p 00000000 00:00 0
7f28217c4000-7f2821fc4000 rw-p 00000000 00:00 0
7f2821fc4000-7f2821fc5000 ---p 00000000 00:00 0
7f2821fc5000-7f28227c5000 rw-p 00000000 00:00 0
7f28227c5000-7f28227c6000 ---p 00000000 00:00 0
7f28227c6000-7f2822fc6000 rw-p 00000000 00:00 0
7f2822fc6000-7f2822fc7000 ---p 00000000 00:00 0
7f2822fc7000-7f28237c7000 rw-p 00000000 00:00 0
7f28237c7000-7f28237c8000 ---p 00000000 00:00 0
7f28237c8000-7f2823fc8000 rw-p 00000000 00:00 0
7f2823fc8000-7f2823fc9000 ---p 00000000 00:00 0
7f2823fc9000-7f28247c9000 rw-p 00000000 00:00 0
7f28247c9000-7f28247ca000 ---p 00000000 00:00 0
7f28247ca000-7f2824fca000 rw-p 00000000 00:00 0
7f2824fca000-7f2824fcb000 ---p 00000000 00:00 0
7f2824fcb000-7f28257cb000 rw-p 00000000 00:00 0
7f28257cb000-7f28257cc000 ---p 00000000 00:00 0
7f28257cc000-7f2825fcc000 rw-p 00000000 00:00 0
7f2825fcc000-7f2825fcd000 ---p 00000000 00:00 0
7f2825fcd000-7f28267cd000 rw-p 00000000 00:00 0
7f28267cd000-7f28267ce000 ---p 00000000 00:00 0
7f28267ce000-7f2826fce000 rw-p 00000000 00:00 0
7f2826fce000-7f2826fcf000 ---p 00000000 00:00 0
7f2826fcf000-7f28277cf000 rw-p 00000000 00:00 0
7f28277cf000-7f28277d0000 ---p 00000000 00:00 0
7f28277d0000-7f2827fd0000 rw-p 00000000 00:00 0
7f2827fd0000-7f2827fd1000 ---p 00000000 00:00 0
7f2827fd1000-7f28287d1000 rw-p 00000000 00:00 0
7f28287d1000-7f28287d2000 ---p 00000000 00:00 0
7f28287d2000-7f2828fd2000 rw-p 00000000 00:00 0
7f2828fd2000-7f2828fd3000 ---p 00000000 00:00 0
7f2828fd3000-7f28297d3000 rw-p 00000000 00:00 0
7f28297d3000-7f28297d4000 ---p 00000000 00:00 0
7f28297d4000-7f2829fd4000 rw-p 00000000 00:00 0
7f2829fd4000-7f2829fd5000 ---p 00000000 00:00 0
7f2829fd5000-7f282a7d5000 rw-p 00000000 00:00 0
7f282a7d5000-7f282a7d6000 ---p 00000000 00:00 0
7f282a7d6000-7f282afd6000 rw-p 00000000 00:00 0
7f282afd6000-7f282afd7000 ---p 00000000 00:00 0
7f282afd7000-7f282b7d7000 rw-p 00000000 00:00 0
7f282b7d7000-7f282b7d8000 ---p 00000000 00:00 0
7f282b7d8000-7f282bfd8000 rw-p 00000000 00:00 0
7f282bfd8000-7f282bfd9000 ---p 00000000 00:00 0
7f282bfd9000-7f282c7d9000 rw-p 00000000 00:00 0
7f282c7d9000-7f282c7da000 ---p 00000000 00:00 0
7f282c7da000-7f282cfda000 rw-p 00000000 00:00 0
7f282cfda000-7f282cfdb000 ---p 00000000 00:00 0
7f282cfdb000-7f282d7db000 rw-p 00000000 00:00 0
7f282d7db000-7f282d7dc000 ---p 00000000 00:00 0
7f282d7dc000-7f282dfdc000 rw-p 00000000 00:00 0
7f282dfdc000-7f282dfdd000 ---p 00000000 00:00 0
7f282dfdd000-7f282e7dd000 rw-p 00000000 00:00 0
7f282e7dd000-7f282e7de000 ---p 00000000 00:00 0
7f282e7de000-7f282efde000 rw-p 00000000 00:00 0
7f282efde000-7f282efdf000 ---p 00000000 00:00 0
7f282efdf000-7f282f7df000 rw-p 00000000 00:00 0
7f282f7df000-7f282f7e0000 ---p 00000000 00:00 0
7f282f7e0000-7f282ffe0000 rw-p 00000000 00:00 0
7f282ffe0000-7f282ffe1000 ---p 00000000 00:00 0
7f282ffe1000-7f28307e1000 rw-p 00000000 00:00 0
7f28307e1000-7f28307e2000 ---p 00000000 00:00 0
7f28307e2000-7f2830fe2000 rw-p 00000000 00:00 0
7f2830fe2000-7f2830fe3000 ---p 00000000 00:00 0
7f2830fe3000-7f28317e3000 rw-p 00000000 00:00 0
7f28317e3000-7f28317e4000 ---p 00000000 00:00 0
7f28317e4000-7f2831fe4000 rw-p 00000000 00:00 0
7f2831fe4000-7f2831fe5000 ---p 00000000 00:00 0
7f2831fe5000-7f28327e5000 rw-p 00000000 00:00 0
7f28327e5000-7f28327e6000 ---p 00000000 00:00 0
7f28327e6000-7f2832fe6000 rw-p 00000000 00:00 0
7f2832fe6000-7f2832fe7000 ---p 00000000 00:00 0
7f2832fe7000-7f28337e7000 rw-p 00000000 00:00 0
7f28337e7000-7f28337e8000 ---p 00000000 00:00 0
7f28337e8000-7f2833fe8000 rw-p 00000000 00:00 0
7f2833fe8000-7f2833fe9000 ---p 00000000 00:00 0
7f2833fe9000-7f28347e9000 rw-p 00000000 00:00 0
7f28347e9000-7f28347ea000 ---p 00000000 00:00 0
7f28347ea000-7f2834fea000 rw-p 00000000 00:00 0
7f2834fea000-7f2834feb000 ---p 00000000 00:00 0
7f2834feb000-7f28357eb000 rw-p 00000000 00:00 0
7f28357eb000-7f28357ec000 ---p 00000000 00:00 0
7f28357ec000-7f2835fec000 rw-p 00000000 00:00 0
7f2835fec000-7f2835fed000 ---p 00000000 00:00 0
7f2835fed000-7f28367ed000 rw-p 00000000 00:00 0
7f28367ed000-7f28367ee000 ---p 00000000 00:00 0
7f28367ee000-7f2836fee000 rw-p 00000000 00:00 0
7f2836fee000-7f2836fef000 ---p 00000000 00:00 0
7f2836fef000-7f28377ef000 rw-p 00000000 00:00 0
7f28377ef000-7f28377f0000 ---p 00000000 00:00 0
7f28377f0000-7f2837ff0000 rw-p 00000000 00:00 0
7f2837ff0000-7f2837ff1000 ---p 00000000 00:00 0
7f2837ff1000-7f28387f1000 rw-p 00000000 00:00 0
7f28387f1000-7f28387f2000 ---p 00000000 00:00 0
7f28387f2000-7f2838ff2000 rw-p 00000000 00:00 0
7f2838ff2000-7f2838ff3000 ---p 00000000 00:00 0
7f2838ff3000-7f28397f3000 rw-p 00000000 00:00 0
7f28397f3000-7f28397f4000 ---p 00000000 00:00 0
7f28397f4000-7f2839ff4000 rw-p 00000000 00:00 0
7f2839ff4000-7f2839ff5000 ---p 00000000 00:00 0
7f2839ff5000-7f283a7f5000 rw-p 00000000 00:00 0
7f283a7f5000-7f283a7f6000 ---p 00000000 00:00 0
7f283a7f6000-7f283aff6000 rw-p 00000000 00:00 0
7f283aff6000-7f283aff7000 ---p 00000000 00:00 0
7f283aff7000-7f283b7f7000 rw-p 00000000 00:00 0
7f283b7f7000-7f283b7f8000 ---p 00000000 00:00 0
7f283b7f8000-7f283bff8000 rw-p 00000000 00:00 0
7f283bff8000-7f283bff9000 ---p 00000000 00:00 0
7f283bff9000-7f283c7f9000 rw-p 00000000 00:00 0
7f283c7f9000-7f283c7fa000 ---p 00000000 00:00 0
7f283c7fa000-7f283cffa000 rw-p 00000000 00:00 0
7f283cffa000-7f283cffb000 ---p 00000000 00:00 0
7f283cffb000-7f283d7fb000 rw-p 00000000 00:00 0
7f283d7fb000-7f283d7fc000 ---p 00000000 00:00 0
7f283d7fc000-7f283dffc000 rw-p 00000000 00:00 0
7f283dffc000-7f283dffd000 ---p 00000000 00:00 0
7f283dffd000-7f283e7fd000 rw-p 00000000 00:00 0
7f283e7fd000-7f283e7fe000 ---p 00000000 00:00 0
7f283e7fe000-7f283effe000 rw-p 00000000 00:00 0
7f283effe000-7f283efff000 ---p 00000000 00:00 0
7f283efff000-7f283f7ff000 rw-p 00000000 00:00 0
7f283f7ff000-7f283f800000 ---p 00000000 00:00 0
7f283f800000-7f2840000000 rw-p 00000000 00:00 0
7f2840000000-7f2841ef3000 rw-p 00000000 00:00 0
7f2841ef3000-7f2844000000 ---p 00000000 00:00 0
7f2844000000-7f28446f6000 rw-p 00000000 00:00 0
7f28446f6000-7f2848000000 ---p 00000000 00:00 0
7f2848000000-7f2849ee8000 rw-p 00000000 00:00 0
7f2849ee8000-7f284c000000 ---p 00000000 00:00 0
7f284c000000-7f284deeb000 rw-p 00000000 00:00 0
7f284deeb000-7f2850000000 ---p 00000000 00:00 0
7f2850000000-7f2851f9a000 rw-p 00000000 00:00 0
7f2851f9a000-7f2854000000 ---p 00000000 00:00 0
7f2854000000-7f2855efa000 rw-p 00000000 00:00 0
7f2855efa000-7f2858000000 ---p 00000000 00:00 0
7f2858000000-7f2859ee4000 rw-p 00000000 00:00 0
7f2859ee4000-7f285c000000 ---p 00000000 00:00 0
7f285c000000-7f285dee5000 rw-p 00000000 00:00 0
7f285dee5000-7f2860000000 ---p 00000000 00:00 0
7f2860000000-7f2861ee8000 rw-p 00000000 00:00 0
7f2861ee8000-7f2864000000 ---p 00000000 00:00 0
7f2864000000-7f2865ee4000 rw-p 00000000 00:00 0
7f2865ee4000-7f2868000000 ---p 00000000 00:00 0
7f2868000000-7f2869ee3000 rw-p 00000000 00:00 0
7f2869ee3000-7f286c000000 ---p 00000000 00:00 0
7f286c000000-7f286df3d000 rw-p 00000000 00:00 0
7f286df3d000-7f2870000000 ---p 00000000 00:00 0
7f2870000000-7f2871ee3000 rw-p 00000000 00:00 0
7f2871ee3000-7f2874000000 ---p 00000000 00:00 0
7f2874000000-7f2875ee3000 rw-p 00000000 00:00 0
7f2875ee3000-7f2878000000 ---p 00000000 00:00 0
7f2878000000-7f287be04000 rw-p 00000000 00:00 0
7f287be04000-7f287c000000 ---p 00000000 00:00 0
7f287c000000-7f287dee5000 rw-p 00000000 00:00 0
7f287dee5000-7f2880000000 ---p 00000000 00:00 0
7f2880000000-7f2883d79000 rw-p 00000000 00:00 0
7f2883d79000-7f2884000000 ---p 00000000 00:00 0
7f2884188000-7f2884189000 ---p 00000000 00:00 0
7f2884189000-7f2884989000 rw-p 00000000 00:00 0
7f2884989000-7f288498a000 ---p 00000000 00:00 0
7f288498a000-7f288518a000 rw-p 00000000 00:00 0
7f288518a000-7f288518b000 ---p 00000000 00:00 0
7f288518b000-7f288598b000 rw-p 00000000 00:00 0
7f288598b000-7f288598c000 ---p 00000000 00:00 0
7f288598c000-7f288618c000 rw-p 00000000 00:00 0
7f288618c000-7f288618d000 ---p 00000000 00:00 0
7f288618d000-7f288698d000 rw-p 00000000 00:00 0
7f288698d000-7f288698e000 ---p 00000000 00:00 0
7f288698e000-7f288718e000 rw-p 00000000 00:00 0
7f288718e000-7f288718f000 ---p 00000000 00:00 0
7f288718f000-7f288798f000 rw-p 00000000 00:00 0
7f288798f000-7f2887990000 ---p 00000000 00:00 0
7f2887990000-7f2888190000 rw-p 00000000 00:00 0
7f2888190000-7f2888191000 ---p 00000000 00:00 0
7f2888191000-7f2888991000 rw-p 00000000 00:00 0
7f2888991000-7f2888992000 ---p 00000000 00:00 0
7f2888992000-7f2889192000 rw-p 00000000 00:00 0
7f2889192000-7f2889193000 ---p 00000000 00:00 0
7f2889193000-7f2889993000 rw-p 00000000 00:00 0
7f2889993000-7f2889994000 ---p 00000000 00:00 0
7f2889994000-7f288a194000 rw-p 00000000 00:00 0
7f288a194000-7f288a195000 ---p 00000000 00:00 0
7f288a195000-7f288a995000 rw-p 00000000 00:00 0
7f288a995000-7f288a996000 ---p 00000000 00:00 0
7f288a996000-7f288b196000 rw-p 00000000 00:00 0
7f288b196000-7f288b197000 ---p 00000000 00:00 0
7f288b197000-7f288b997000 rw-p 00000000 00:00 0
7f288b997000-7f288b998000 ---p 00000000 00:00 0
7f288b998000-7f288c198000 rw-p 00000000 00:00 0
7f288c198000-7f288c199000 ---p 00000000 00:00 0
7f288c199000-7f288c999000 rw-p 00000000 00:00 0
7f288c999000-7f288cb5c000 r-xp 00000000 fd:00 36162 /usr/lib64/libc-2.17.so
7f288cb5c000-7f288cd5b000 ---p 001c3000 fd:00 36162 /usr/lib64/libc-2.17.so
7f288cd5b000-7f288cd5f000 r--p 001c2000 fd:00 36162 /usr/lib64/libc-2.17.so
7f288cd5f000-7f288cd61000 rw-p 001c6000 fd:00 36162 /usr/lib64/libc-2.17.so
7f288cd61000-7f288cd66000 rw-p 00000000 00:00 0
7f288cd66000-7f288cd7d000 r-xp 00000000 fd:00 809661 /usr/lib64/libpthread-2.17.so
7f288cd7d000-7f288cf7c000 ---p 00017000 fd:00 809661 /usr/lib64/libpthread-2.17.so
7f288cf7c000-7f288cf7d000 r--p 00016000 fd:00 809661 /usr/lib64/libpthread-2.17.so
7f288cf7d000-7f288cf7e000 rw-p 00017000 fd:00 809661 /usr/lib64/libpthread-2.17.so
7f288cf7e000-7f288cf82000 rw-p 00000000 00:00 0
7f288cf82000-7f288d187000 r-xp 00000000 fd:00 72263322 /usr/local/lib/libSvtHevcEnc.so.1
7f288d187000-7f288d387000 ---p 00205000 fd:00 72263322 /usr/local/lib/libSvtHevcEnc.so.1
7f288d387000-7f288d38b000 r--p 00205000 fd:00 72263322 /usr/local/lib/libSvtHevcEnc.so.1
7f288d38b000-7f288d38c000 rw-p 00209000 fd:00 72263322 /usr/local/lib/libSvtHevcEnc.so.1
7f288d38c000-7f288d48d000 r-xp 00000000 fd:00 809643 /usr/lib64/libm-2.17.so
7f288d48d000-7f288d68c000 ---p 00101000 fd:00 809643 /usr/lib64/libm-2.17.so
7f288d68c000-7f288d68d000 r--p 00100000 fd:00 809643 /usr/lib64/libm-2.17.so
7f288d68d000-7f288d68e000 rw-p 00101000 fd:00 809643 /usr/lib64/libm-2.17.so
7f288d68e000-7f288d6b0000 r-xp 00000000 fd:00 809634 /usr/lib64/ld-2.17.so
7f288d892000-7f288d896000 rw-p 00000000 00:00 0
7f288d8ac000-7f288d8af000 rw-p 00000000 00:00 0
7f288d8af000-7f288d8b0000 r--p 00021000 fd:00 809634 /usr/lib64/ld-2.17.so
7f288d8b0000-7f288d8b1000 rw-p 00022000 fd:00 809634 /usr/lib64/ld-2.17.so
7f288d8b1000-7f288d8b2000 rw-p 00000000 00:00 0
7ffc0a537000-7ffc0a558000 rw-p 00000000 00:00 0 [stack]
7ffc0a5d5000-7ffc0a5d7000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)
[root@amax Script]#

ffmpeg plugin (libsvthevc) with -tune 1

Dear.
Today I heard SVT-HEVC support RC mode for OQ (-tune 1) so I tried to test ffmpeg plugin for libsvthevc. there is no issues with RC mode for SQ (-tune 0)
However I showed below error message.
./ffmpeg -y -i ./nvme.mp4 -c:v libsvt_hevc -tune 1 -rc 1 -preset 10 -b:v 6M -r 30 -c:a aac -b:a 192k -tag:v hvc1 -f mp4 ./nvme_h265_1.mp4
ffmpeg version n4.1-14-gddc2843 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-libsvthevc
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './nvme.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2016-06-17T20:43:18.000000Z
Duration: 00:02:43.20, start: 0.000000, bitrate: 3753 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 3429 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
Metadata:
creation_time : 2016-06-17T20:43:18.000000Z
handler_name : ?Mainconcept Video Media Handler
encoder : AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2016-06-17T20:43:18.000000Z
handler_name : #Mainconcept MP4 Sound Media Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (libsvt_hevc))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
SVT [version]: SVT-HEVC Encoder Lib v1.3.0
SVT [build] : GCC 6.3.0 64 bit
LIB Build date: Jan 8 2019 06:51:04

[WARNING] For best speed performance, run with sudo privileges !

Number of logical cores available: 40
Number of PPCS 56

SVT [config]: Main10 Profile Tier (auto) Level (auto)
SVT [config]: EncoderMode / LatencyMode / Tune : 10 / 0 / 1
SVT [config]: EncoderBitDepth / CompressedTenBitFormat : 8 / 0
SVT [config]: SourceWidth / SourceHeight : 1920 / 1080
SVT [config]: Fps_Numerator / Fps_Denominator / Gop Size / IntraRefreshType : 30 / 1 / 12 / 2
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure : 3 / 0 / 2
SVT [config]: RCMode / TargetBitrate / LookaheadDistance / SceneChange : VBR / 6000000 / 11 / 0

Output #0, mp4, to './nvme_h265_1.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
encoder : Lavf58.20.100
Stream #0:0(eng): Video: hevc (libsvt_hevc) (hvc1 / 0x31637668), yuv420p, 1920x1080, q=10-48, 6000 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
creation_time : 2016-06-17T20:43:18.000000Z
handler_name : ?Mainconcept Video Media Handler
encoder : Lavc58.35.100 libsvt_hevc
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
creation_time : 2016-06-17T20:43:18.000000Z
handler_name : #Mainconcept MP4 Sound Media Handler
encoder : Lavc58.35.100 aac
Segmentation fault

I also tested with SvtHevcEncApp and it works well with -tune 1
./SvtHevcEncApp -i ./nvme.yuv -encMode 10 -w 1920 -h 1080 -rc 1 -tune 1 -fps 30 -tbr 4000000 -b ./nvme.h265

SVT-HEVC Encoder
SVT [version]: SVT-HEVC Encoder Lib v1.3.0
SVT [build] : GCC 4.8.5 64 bit
LIB Build date: Jan 8 2019 15:34:39

[WARNING] For best speed performance, run with sudo privileges !

Number of logical cores available: 40
Number of PPCS 76

SVT [config]: Main10 Profile Tier (auto) Level (auto)
SVT [config]: EncoderMode / LatencyMode / Tune : 10 / 0 / 1
SVT [config]: EncoderBitDepth / CompressedTenBitFormat : 8 / 0
SVT [config]: SourceWidth / SourceHeight : 1920 / 1080
SVT [config]: FrameRate / Gop Size : 30 / 32
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure : 3 / 0 / 2
SVT [config]: RCMode / TargetBitrate / LookaheadDistance / SceneChange : VBR / 4000000 / 31 / 1

Encoding 2000
Average System Encoding Speed: 317.06 4000
Average System Encoding Speed: 302.66 4894
SUMMARY --------------------------------- Channel 1 --------------------------------
Total Frames Frame Rate Byte Count Bitrate
4894 30.00 fps 39596619 1941.80 kbps

Channel 1
Average Speed: 302.50 fps
Average Latency: 279 ms
Max Latency: 551 ms
Encoder finished

Thank you

support for macOS?

Is this supported on macOS?

As far as I could find out the Mac Pro uses Xeon processors...

How to build static libSvtHevcEnc.so?

Hi, could you please provide static target for libSvtHevcEnc? It's easier for deploying.
I have tried to manually fix Source/Lib/Codec/CMakeLists.txt but then its failed to Built target SvtHevcEncSimpleApp:

[100%] Linking C executable ../../../Bin/Release/SvtHevcEncApp
[100%] Built target SvtHevcEncSimpleApp
EbEncHandle.c.o (symbol from plugin): In function `EbOutputBufferHeaderCtor':
(.text+0x0): multiple definition of `AllocateFrameBuffer'
CMakeFiles/SvtHevcEncApp.dir/EbAppContext.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function `EbOutputBufferHeaderCtor':
(.text+0x0): multiple definition of `invoke_safe_str_constraint_handler'
CMakeFiles/SvtHevcEncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function `EbOutputBufferHeaderCtor':
(.text+0x0): multiple definition of `ignore_handler_s'
CMakeFiles/SvtHevcEncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function `EbOutputBufferHeaderCtor':
(.text+0x0): multiple definition of `strncpy_ss'
CMakeFiles/SvtHevcEncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function `EbOutputBufferHeaderCtor':
(.text+0x0): multiple definition of `strcpy_ss'
CMakeFiles/SvtHevcEncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function `EbOutputBufferHeaderCtor':
(.text+0x0): multiple definition of `strnlen_ss'
CMakeFiles/SvtHevcEncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbUtility.c.o (symbol from plugin): In function `ZOrderIncrement':
(.text+0x0): multiple definition of `EbStartTime'
CMakeFiles/SvtHevcEncApp.dir/EbTime.c.o (symbol from plugin):(.text+0x0): first defined here
EbUtility.c.o (symbol from plugin): In function `ZOrderIncrement':
(.text+0x0): multiple definition of `EbFinishTime'
CMakeFiles/SvtHevcEncApp.dir/EbTime.c.o (symbol from plugin):(.text+0x0): first defined here
EbUtility.c.o (symbol from plugin): In function `ZOrderIncrement':
(.text+0x0): multiple definition of `EbComputeOverallElapsedTime'
CMakeFiles/SvtHevcEncApp.dir/EbTime.c.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
Source/App/CMakeFiles/SvtHevcEncApp.dir/build.make:230: recipe for target '../Bin/Release/SvtHevcEncApp' failed
make[2]: *** [../Bin/Release/SvtHevcEncApp] Error 1
CMakeFiles/Makefile2:457: recipe for target 'Source/App/CMakeFiles/SvtHevcEncApp.dir/all' failed
make[1]: *** [Source/App/CMakeFiles/SvtHevcEncApp.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

The value of average Speed and Latency are always shown as 0 when set encode frame number (-n) as 2000

While using the latest SVT-HEVC to do encoding test and set the frame number to 2000, the value of average Speed and Latency are always shown as 0.

Detail command and log as below:
--- Command line ---
encoders/SvtHevcEncApp -i yuvs/EuroTruckSimulator2_003_1920x1080_8bit_60Hz_P420.yuv -b bitstreams/Speed_Test_M4_EuroTruckSimulator2_003_1920x1080_8bit_60Hz_P420_SQ_TBR7500.265 -errlog bitstreams/Speed_Test_M4_EuroTruckSimulator2_003_1920x1080_8bit_60Hz_P420_SQ_TBR7500.errlog -w 1920 -h 1080 -bit-depth 8 -fps 60 -intra-period 55 -n 2000 -encMode 4 -compressed-ten-bit-format 0 -rc 1 -tbr 7500 -tune 0

--- Part Log ---
SVT [WARNING]: For best speed performance, run with sudo privileges !

Encoding 2000
Average System Encoding Speed: 129.95

SUMMARY --------------------------------- Channel 1 --------------------------------
Total Frames Frame Rate Byte Count Bitrate
2000 60.00 fps 1827010 438.48 kbps

Channel 1
Average Speed: 0.00 fps
Average Latency: 0 ms

Max Latency: 1583 ms
Encoder finished

4K 10bit decoding bug in EncoderMode=12

I tried to encode in the fastest mode for 4K 10bit sequence, like Netflix_FoodMarket2. There seems to have some bugs in the encoded bit-stream which made the ffmpeg decoder to output wrong images in the bottom rows in some frames.

The sequence could be downloaded from here:
https://media.xiph.org/video/derf/
And I used ffmpeg to convert it from y4m to yuv420p10 format.

The decoding image and bit-stream is public here.
https://github.com/luofalei/svt-hevc-bug-info/tree/master/issue124

decoding image sample

Test CQP PSNR

CommandLine:HevcEncoderApp -i 电视剧_室外_3mins.yuv -w 1920 -h 1080 -intra-period 250 -rc 0 -q 25 -fps 30 -encMode 4 -b 电视剧_室外_3mins.h265
Result:PSNR y:36.215654 u:48.971443 v:48.142267 average:37.851158
Question:12 dB between y and u/v,it is too large

Parameter "-vid-info" not take effect in SVT-HEVC

Hi,
Parameter "-vid-info" doesn't take effect while do encoding with SVT-HEVC.

  • Try to use SVT-HEVC version v1.2.0 to encode HEVC bitstreams with parameter "-vid-info" equals to 0 or 1, then use tools to check generated HEVC bitstreams, the value of "vps_timing_info_present_flag" always is 0.
  • Try to use SVT-HEVC version v1.3.0 to encode HEVC bitstreams with parameter "-vid-info" equals to 0 or 1, then use tools to check generated HEVC bitstreams, the value of "vps_timing_info_present_flag" always is 1.

The encode command line we used as below: (take v1.3.0 app as example)
encoders/SvtHevcEncApp -i Netflix_FoodMarket2_4it_60Hz_P420.yuv -b bitstreams/M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q35_TUNE0_0_1_0_vid_0.265 treams/M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q35_TUNE0_0_1_0.errlog -w 4096 -h 2160 -bit-depth -intra-period 55 -n 20 -compressed-ten-bit-format 0 -q 35 -hierarchical-levels 1 -encMode 9 -rc 0 -vid-info 0

An error(Error encoding at channel 1! Check error log file for more details ...Segmentation fault) occurred in running the following command line.

Hi,
An error (Error encoding at channel 1! Check error log file for more details ...Segmentation fault) occurred in running the following command line.

SvtHevcEncApp -i Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420.yuv -b width_height_test_M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q16_TUNE1_4060_1984.265 -errlog width_height_test_M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q16_TUNE1_4060_1984.errlog -w 4060 -h 1984 -bit-depth 10 -fps 60 -intra-period 55 -n 100 -compressed-ten-bit-format 0 -q 16 -encMode 9 -rc 0 -tune 1

The SVT version we used is v1.3.0 from master.

Thanks!

when encoding 720p YUV to HEVC, real bitrate is bigger than required

SvtHevcEncApp -i mobile-8bit-yuv420p-720p.yuv -errlog -w 1280 -h 720 -profile 2 -fps-num 30 -fps-denom 1 -rc 1 -lad 20 -tbr 1000000 -intra-period 29 -tune 1 -encMode 1 -latency-mode 0 -irefresh-type 2 -n 250 -b outbitrate.hevc

filesize: 2471729 bytes
bitrate:2372.86 Kbps

required bitrate: 1000Kbps
mobile-8bit-yuv420p-720p.yuv is bigger than 10M, can not be uploaded.
The first 100 frames are black, the follow are normal video stream with a smaller portions of video changing in mobile-8bit-yuv420p-720p.yuv.

[FFmpeg plugin] didn't handle PTS/DTS in SVT-HEVC FFmpeg plugin

After apply the FFmpeg plugin patch to FFmpeg, then run the transcode with the command:

./ffmpeg -i ~/Videos/skyfall2-trailer.mp4 -an -c:v libsvt_hevc test_svt.mp4

get the message like:

[mp4 @ 0x556f3d808940] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0x556f3d808940] Encoder did not produce proper pts, making some up.

I think the plugin didn't handle the DTS/PTS.

Question on AVX512 instruction

Question is on ffmpeg plugin. Is it on by default if it runs on skylake? Is there any way to disable AVX512 instruction for SVT HEVC encoder?

No error msg, No output hevc bitstream

$ sudo ./debug/App/HevcEncoderApp -w 960 -h 640 -i mv_960_640.yuv -q 28 -b out.hevc

SVT-HEVC Encoder v1.2.0
Platform: 64 bit
Compiler: GCC
APP Build date: Oct 22 2018 14:51:40
LIB Build date: Oct 22 2018 14:50:52

Number of cores available: 3

[admin@mmtccsp-t4922 mmtccsp-t4922.inc.alipay.net /home/admin/SVT-HEVC/Build/linux]
$ ls -l out.hevc
-rw-r--r-- 1 root root 0 10月 22 14:51 out.hevc

I try to have a test, but there is no any error msg, but no output hevc bitstream...

And I try to gdb it, it hangs every time.

$ sudo gdb ./debug/App/HevcEncoderApp
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-50.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/admin/SVT-HEVC/Build/linux/debug/App/HevcEncoderApp...done.
(gdb) break 88
Breakpoint 1 at 0x2a24: file /home/admin/SVT-HEVC/Source/App/EbAppMain.c, line 88.
(gdb) r -w 600 -h 800 -i img_600_900.yuv -q 28 -b out.hevc
Starting program: /home/admin/SVT-HEVC/Build/linux/debug/App/HevcEncoderApp -w 600 -h 800 -i img_600_900.yuv -q 28 -b out.hevc

^C^C^C^C^C^C^Z
[1]+ Stopped sudo gdb ./debug/App/HevcEncoderApp

VBR CRASH?

cmd:
HevcEncoderApp -i Transcode/3mins/yuv/电视剧_室内_3mins.yuv -w 1920 -h 1080 -intra-period 249 -irefresh-type 2 -rc 1 -vid-info 1 -tune 0 -tbr 4000000 -profile 1 -level 4.1 -tier 0 -fps 30 -encMode 9 -hierarchical-levels 3 -b svt-265/电视剧_室内_3mins.h265

SVT-HEVC Encoder v1.2.0
Platform: 64 bit
Compiler: GCC
APP Build date: Sep 29 2018 09:26:14
LIB Build date: Sep 29 2018 09:25:39

Number of cores available: 32
Encoding 1656Segmentation fault

I've tested three sequences, occurs “Segmentation fault”

System Config:
Linux version 4.4.0-117-generic (buildd@lgw01-amd64-029) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) ) #141-Ubuntu SMP Tue Mar 13 11:58:07 UTC 2018

SvtHevcEncSimpleApp/SvtHevcEncApp both crash in new_api branch

SVT-HEVC-main/Bin/Release$ ./SvtHevcEncSimpleApp ~/Videos/1920x1080_400_yuv420p.yuv test.h265 1920 1080 8
-------------------------------------
SVT-HEVC Encoder Simple Sample Application v1.2.0
Platform:   64 bit
Compiler: GCC
APP Build date: Nov 22 2018 12:59:12
LIB Build date: Nov 22 2018 12:59:01
-------------------------------------

[WARNING] For best speed performance, run with sudo privileges !

Number of cores available: 2
Number of PPCS 90
Encoding          Segmentation fault (core dumped)
./SvtHevcEncApp -i ~/Videos/1920x1080_400_yuv420p.yuv -w 1920 -h 1080 -intra-period 249 -irefresh-type 2 -rc 1 -vid-info 1 -tune 0 -tbr 4000000 -profile 1 -level 4.1 -tier 0 -fps 30 -encMode 9 -hierarchical-levels 3 -b test.h265
-------------------------------------
SVT-HEVC Encoder v1.2.0
Platform:   64 bit
Compiler: GCC
APP Build date: Nov 22 2018 12:59:11
LIB Build date: Nov 22 2018 12:59:01
-------------------------------------

[WARNING] For best speed performance, run with sudo privileges !

Number of cores available: 2
Number of PPCS 45
Encoding          Segmentation fault (core dumped)

in ubuntu 18.04 lts with kernel 4.15

barry@barry-HP-ENVY-Notebook:~/Sources/umd_dev/SVT-HEVC-main/Bin/Release$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic
barry@barry-HP-ENVY-Notebook:~/Sources/umd_dev/SVT-HEVC-main/Bin/Release$ uname -a
Linux barry-HP-ENVY-Notebook 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

SVT-HEVC with the commit "43eb2e332b61a43f5d088e6d8be286f03eda43b8"

Ask for pipe support

As title
An example call could be:
ffmpeg.exe -i "%~dpn1.avs" -f rawvideo -an -| ebHevcEncApp.exe -w 1920 -h 1080 -rc 0 -qp 26 -fps-num 24000 -fps-denom 1001 -i - -b "%~dpn1.hevc"

Get PSNR

How to show PSNR of the video sequences after compression?
By ffmpeg on reconstructive sequences?

build failed

hi, my enviroment is centos6.9, when running build.sh, show the following info which failed to get the executable file. Could anyone have a look, thanks!

[100%] Linking C executable HevcEncoderApp
/home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to EbPictureBufferDescCtor' /home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to memoryMapIndex'
/home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to memoryMap' /home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to totalLibMemory'
/home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to ASM_TYPES' /home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to libMutexCount'
/home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to libSemaphoreCount' /home/workspace/tmp/SVT-HEVC-master/Source/../Bin/Release/libHevcEncoder.so: undefined reference to libMallocCount'
collect2: error: ld returned 1 exit status
make[3]: *** [App/HevcEncoderApp] Error 1
make[2]: *** [App/CMakeFiles/HevcEncoderApp.dir/all] Error 2
make[1]: *** [App/CMakeFiles/HevcEncoderApp.dir/rule] Error 2
make: *** [HevcEncoderApp] Error 2
cp: cannot stat `App/HevcEncoderApp': No such file or directory

4K Performance have some slight drop between Mx+1 and Mx

4K performance have some drop between Mx and Mx+1:

  1. Netflix_Boat_4096x2160_10bit_60Hz_P420_VMAF_TBR13000: M5=51.63 average speed; but M6=49.44 average speed. M8=59.62, but M9=55.42.
  2. Netflix_RitualDance_4096x2160_10bit_60Hz_P420_VMAF_TBR13000: M5=53.26 average speed; but M6=50.53 average speed; M9=63.59, but M10=63.39.
  3. Netflix_Tango_4096x2160_10bit_unpacked_60Hz_P420_2bitspack_VMAF_TBR13000: M7=58.32, but M8=54.31.

Convert user guide to Markdown

An user guide in markdown would be much easier to maintain.

  • Upload original user guide (.docx I think?)
  • Convert user guide to Markdown (using word-to-markdown and/or Pandoc for example).
  • Check Markdown file on errors
  • Upload to user guide in Markdown GitHub

Unable to compile with MinGW-w64

When running "build.sh", CMake returns an error message and stops.
And no, using MSVC is not a proper solution — actually it's not a solution at all.

CheckXcr0Zmm function make the program exit directly

I try to test the program, but it exit directly without any error msg and output bitstream is 0B.

$  sudo ./debug/App/HevcEncoderApp -w 600 -h 800 -i img_600_900.yuv -q 28 -b out.hevc
-------------------------------------
SVT-HEVC Encoder v1.2.0
Platform:   64 bit
Compiler: GCC
APP Build date: Oct 22 2018 15:33:40
LIB Build date: Oct 22 2018 15:32:52
-------------------------------------
Number of cores available: 3

Then I trace the code, and find that CheckXcr0Zmm exit it,

int CheckXcr0Zmm() 
{
    uint32_t xcr0;
    uint32_t zmm_ymm_xmm = (7 << 5) | (1 << 2) | (1 << 1);
#if defined(_MSC_VER)
    xcr0 = (uint32_t)_xgetbv(0);  /* min VS2010 SP1 compiler is required */
#else
    printf("[%s-%d]\n", __func__, __LINE__);
    __asm__ ("xgetbv" : "=a" (xcr0) : "c" (0) : "%edx" );  // program exit here at once
    printf("[%s-%d]\n", __func__, __LINE__);
#endif

    return ((xcr0 & zmm_ymm_xmm) == zmm_ymm_xmm); /* check if xmm, ymm and zmm state are enabled in XCR0 */
}

I mark CheckXcr0Zmm function, and the program test OK.

Is there any problem for mark this code?

[FFmpeg plugin] FFmpeg plugin blocking in new_api branch

in new-api branch (e697a16)

now FFmpeg SVT-HEVC plugin will blocking, this is the output:

./ffmpeg -i ~/Videos/skyfall2-trailer.mp4 -c:v libsvt_hevc test_svt.mp4
ffmpeg version N-92513-gc1d548ec55 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --enable-libx264 --enable-libx265 --enable-gpl --enable-libwebp --disable-optimizations --samples=../fate-suite --enable-openssl --enable-nonfree --enable-libzmq --enable-libkvazaar --enable-libvpx --enable-libvorbis --enable-libsrt --enable-libsvt
  libavutil      56. 23.101 / 56. 23.101
  libavcodec     58. 39.100 / 58. 39.100
  libavformat    58. 22.100 / 58. 22.100
  libavdevice    58.  6.100 / 58.  6.100
  libavfilter     7. 46.100 /  7. 46.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/barry/Videos/skyfall2-trailer.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isom
    creation_time   : 2012-07-31T00:31:48.000000Z
  Duration: 00:02:30.77, start: 0.000000, bitrate: 4002 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 3937 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2012-07-31T00:31:48.000000Z
      handler_name    : MP4 Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 61 kb/s (default)
    Metadata:
      creation_time   : 2012-07-31T00:31:48.000000Z
      handler_name    : MP4 Sound Media Handler
File 'test_svt.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (libsvt_hevc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
LIB Build date: Nov 23 2018 09:06:50

[WARNING] For best speed performance, run with sudo privileges !

Number of cores available: 2
Number of PPCS 36

Encode HEVC bitstream with master SVT-HEVC, then measure PSNR/SSIM using ffmpeg has mismatch issue

Dear,
When we use the SVT-HEVC App with version v1.3.0 which is from Github Master (https://github.com/intel/SVT-HEVC.git) to do encoding with below command, and then measuring PSNR/SSIM using ffmpeg, comparing a bitstream to input yuv, found there is PSNR/SSIM mismatch issue.

- Do encoding with SVT-HEVC app:
encoders/SvtHevcEncApp -i Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420.yuv -b bitstreams/enc_struct_test_M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q35_TUNE0_0_1_0.265 -errlog bitstreams/enc_struct_test_M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q35_TUNE0_0_1_0.errlog -w 4096 -h 2160 -bit-depth 10 -fps 60 -intra-period 55 -n 20 -compressed-ten-bit-format 0 -q 35 -hierarchical-levels 1 -encMode 9 -rc 0 -base-layer-switch-mode 0 -pred-struct 0 -tune 0

- Measure PSNR/SSIM using FFMPEG:
ffmpeg -i bitstreams/enc_struct_test_M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q35_TUNE0_0_1_0.265 -s:v 4096x2160 -c:v rawvideo -pix_fmt yuv420p10le -i Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420.yuv -frames 20 -lavfi ssim="stats_file=enc_struct_test_M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q35_TUNE0_0_1_0.ssim;[0:v][1:v]psnr=stats_file=enc_struct_test_M9_Netflix_FoodMarket2_4096x2160_10bit_60Hz_P420_Q35_TUNE0_0_1_0.psnr" -f null -

Thanks and waiting for your feedback.

[RFC] is it have plan to support other input pixel format.

Encoding 100 NV12 format frames with VBR mode with cmd:

./HevcEncoderApp -i ~/Videos/1920_1080_100fames.yuv -w 1920 -h 1080 -intra-period 249 -irefresh-type 2 -rc 1 -vid-info 1 -tune 0 -tbr 4000000 -profile 1 -level 4.1 -tier 0 -fps 30 -encMode 9 -hierarchical-levels 3 -b test.h265

then use ffplay check test.h265, found the context is wrong.

the commit dc6c637 (mainline/master)

But YUV420P is Ok for this case.

So, is it have plan to support other input pixel format for nv12 or other format ?

Preset 10 not working for Objective VQ mode in FFMPEG

While using FFMPEG with SVT-HEVC plugin, -preset 10 doesn't work for objective VQ mode. Based on the readme document, 1080p should support upto encMode 10 for both tune 0 and tune 1.
below is the command I am using:
/ffmpeg -i <input.mp4> -c:v libsvt_hevc -tune 1 -preset 10 out.mp4


ffmpeg version n4.1-14-gddc2843 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-libsvthevc
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/intel/Downloads/train_dog.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
creation_time : 2009-02-20T00:09:11.000000Z
Duration: 00:05:01.21, start: 0.000000, bitrate: 628 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2009-02-20T00:09:11.000000Z
handler_name : (C) 2007 Google Inc. v08.13.2007.
Stream #0:1(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 480x320 [SAR 1:1 DAR 3:2], 500 kb/s, 29.97 fps, 29.97 tbr, 29967 tbn, 59934 tbc (default)
Metadata:
creation_time : 2009-02-20T00:09:12.000000Z
handler_name : (C) 2007 Google Inc. v08.13.2007.
Stream mapping:
Stream #0:1 -> #0:0 (h264 (native) -> hevc (libsvt_hevc))
Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
SVT [version]: SVT-HEVC Encoder Lib v1.3.0
SVT [build] : GCC 6.3.0 64 bit
LIB Build date: Jan 2 2019 15:30:58

Error instance 1: encMode must be [0 - 9] for this resolution
Error instance 1: encMode must be [0 - 9]
[libsvt_hevc @ 0x40110c0] Error setting encoder parameters
*** Error in `./ffmpeg': free(): invalid pointer: 0x0000000004afcdd0 ***

Incorrect frame rate of the output video

I encode a 4K video by setting the frame rate and the number of frames as follows:

ffmpeg -i "input" -nostdin -f rawvideo -pix_fmt yuv420p - | ./HevcEncoderApp -i stdin -fps 30 -n 60 -w 3840 -h 2048 -b output.bin

The encoder finishes successfully and according to the summary at the end, 60 frames are encoded and the frame rate is 30fps:

SUMMARY --------------------------------- Channel 1 --------------------------------
Total Frames Frame Rate Byte Count Bitrate
60 30.00 fps 963170 3852.68 kbps

However, when I check the frame rate of the output binary video (ffprobe), I get 25fps. The duration and the bit-rate of the output video cannot be estimated because of "missing picture in access unit". I tested the encoder with different videos (in terms of resolution and frame rate) and the software always produces output videos with 25fps.

I run the encoder on Ubuntu 16.04 with 2 cores.

[FFmpeg plugin] segment fault if preset is set as 10 for 720p input or lower resolution input.

Try this command:
ffmpeg -i <720p input>.264 -c:v libsvt_hevc -preset 10 -tune 1 -rc 0 -qp 31 output.265, make sure it's "preset 10" which is not valid for 720p input.

The backtrace is like below:
#0 0x00007ffff57de277 in raise () from /lib64/libc.so.6
#1 0x00007ffff57df968 in abort () from /lib64/libc.so.6
#2 0x00007ffff5820d37 in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff5829499 in _int_free () from /lib64/libc.so.6
#4 0x00007ffff62936a7 in EbH265EncComponentDeInit (h265EncComponent=0x1fc4860) at /home/jerry/Projects/SVT/SVT-HEVC/Source/Lib/Codec/EbEncHandle.c:1602
#5 0x00007ffff62936db in EbDeinitHandle (h265EncComponent=0x1fc4860) at /home/jerry/Projects/SVT/SVT-HEVC/Source/Lib/Codec/EbEncHandle.c:1623
#6 0x0000000000433f5a in eb_enc_close (avctx=) at libavcodec/libsvt_hevc.c:391
#7 0x0000000000af2aa9 in avcodec_open2 (avctx=0x1f90680, codec=codec@entry=0x177baa0 <ff_libsvt_hevc_encoder>, options=options@entry=0x205cde0) at libavcodec/utils.c:1019
#8 0x00000000004a1358 in init_output_stream (ost=ost@entry=0x205cc80, error=error@entry=0x7fffffffcdd0 "", error_len=1024) at fftools/ffmpeg.c:3521
#9 0x00000000004a2fa6 in reap_filters (flush=flush@entry=0) at fftools/ffmpeg.c:1446
#10 0x00000000004a733a in transcode_step () at fftools/ffmpeg.c:4647
#11 transcode () at fftools/ffmpeg.c:4691
#12 0x0000000000485edd in main (argc=, argv=0x7fffffffdb58) at fftools/ffmpeg.c:4898

latency-mode 1 is broken

Set latency-mode 1 will reduce the speed a lot.
./SvtHevcEncApp -i ~/streams/10bit/xiph/Netflix_Boat_4096x2160_10bit_60Hz_P420.yuv -b out_normal_latency.bin -w 4096 -h 2160 -bit-depth 10 -encMode 12 -tune 0 -latency-mode 1 -fps 60 -n 2000 -nb 200

Master build failed

Hi,

I followed the ffmpeg plugin build instruction on https://github.com/intel/SVT-HEVC/blob/master/ffmpeg_plugin/README.txt but it failed as shown below. How can this be fixed?

gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@edisong-ubuntu:/home/Work# cmake --version
cmake version 3.5.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

yasm --version
yasm 1.3.0
Compiled on May 6 2015.
Copyright (c) 2001-2014 Peter Johnson and other Yasm developers.
Run yasm --license for licensing overview and summary.

================
git clone https://github.com/intel/SVT-HEVC
cd SVT-HEVC/
mkdir build && cd build && cmake .. && make -j nproc && sudo make install
git clone https://github.com/FFmpeg/FFmpeg ffmpeg
cd ffmpeg/
git checkout release/4.1
git apply ../SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch
git apply ../SVT-HEVC/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
./configure --enable-libsvthevc
make -j nproc

...
CC libavcodec/kbdwin.o
CC libavcodec/kgv1dec.o
CC libavcodec/kmvc.o
CC libavcodec/lagarith.o
CC libavcodec/lagarithrac.o
CC libavcodec/latm_parser.o
CC libavcodec/lcldec.o
CC libavcodec/libsvt_hevc.o
libavcodec/libsvt_hevc.c: In function ‘eb_enc_init’:
libavcodec/libsvt_hevc.c:296:62: warning: passing argument 2 of ‘EbH265EncStream Header’ from incompatible pointer type [-Wincompatible-pointer-types]
svt_ret = EbH265EncStreamHeader(svt_enc->svt_handle, &headerPtr);
^
In file included from libavcodec/libsvt_hevc.c:25:0:
/usr/local/include/svt-hevc/EbApi.h:244:21: note: expected ‘EB_BUFFERHEADERTYPE ** {aka struct EB_BUFFERHEADERTYPE **}’ but argument is of type ‘EB_BUFFERHEADER TYPE * {aka struct EB_BUFFERHEADERTYPE *}’
EB_API EB_ERRORTYPE EbH265EncStreamHeader(
^
libavcodec/libsvt_hevc.c: In function ‘eb_send_frame’:
libavcodec/libsvt_hevc.c:355:58: error: ‘EB_IDR_SLICE’ undeclared (first use in this function)
headerPtr->sliceType = svt_enc->forced_idr > 0 ? EB_IDR_SLICE : EB_I_SL
^
libavcodec/libsvt_hevc.c:355:58: note: each undeclared identifier is reported on ly once for each function it appears in
libavcodec/libsvt_hevc.c:355:73: error: ‘EB_I_SLICE’ undeclared (first use in th is function)
headerPtr->sliceType = svt_enc->forced_idr > 0 ? EB_IDR_SLICE : EB_I_SLICE;
^
libavcodec/libsvt_hevc.c:358:32: error: ‘EB_P_SLICE’ undeclared (first use in th is function)
headerPtr->sliceType = EB_P_SLICE;
^
libavcodec/libsvt_hevc.c:361:32: error: ‘EB_B_SLICE’ undeclared (first use in th is function)
headerPtr->sliceType = EB_B_SLICE;
^
libavcodec/libsvt_hevc.c:364:32: error: ‘EB_INVALID_SLICE’ undeclared (first use in this function)
headerPtr->sliceType = EB_INVALID_SLICE;
^
libavcodec/libsvt_hevc.c: In function ‘eb_receive_packet’:
libavcodec/libsvt_hevc.c:384:52: warning: passing argument 2 of ‘EbH265GetPacke ’ from incompatible pointer type [-Wincompatible-pointer-types]
svt_ret = EbH265GetPacket(svt_enc->svt_handle, headerPtr, svt_enc->eos_flag
^
In file included from libavcodec/libsvt_hevc.c:25:0:
/usr/local/include/svt-hevc/EbApi.h:265:21: note: expected ‘EB_BUFFERHEADERTYPE ** {aka struct EB_BUFFERHEADERTYPE **}’ but argument is of type ‘EB_BUFFERHEADER TYPE * {aka struct EB_BUFFERHEADERTYPE *}’
EB_API EB_ERRORTYPE EbH265GetPacket(
^
libavcodec/libsvt_hevc.c:391:33: error: ‘EB_IDR_SLICE’ undeclared (first use in this function)
if (headerPtr->sliceType == EB_IDR_SLICE)
^
libavcodec/libsvt_hevc.c:393:33: error: ‘EB_NON_REF_SLICE’ undeclared (first use in this function)
if (headerPtr->sliceType == EB_NON_REF_SLICE)
^
ffbuild/common.mak:60: recipe for target 'libavcodec/libsvt_hevc.o' failed
make: *** [libavcodec/libsvt_hevc.o] Error 1
make: *** Waiting for unfinished jobs....

Library Crash for SlideShow_1280x720_20.yuv

The library crashes with the following command line:
SvtHevcEncApp -i SlideShow_1280x720_20.yuv -w 1280 -h 720 -tune 1 -encMode 8

The crash is due to this secondSearchRegionIndexPosInteg going out of range.

Need help debugging MacOS

(lldb) target create "./SvtHevcEncApp"
Current executable set to './SvtHevcEncApp' (x86_64).
(lldb) settings set -- target.run-args  "-n" "120" "-w" "1920" "-h" "1080" "-fps-num" "2997" "-fps-denom" "50" "-i" "../Release/Morocco1080.yuv" "-b" "test.265"
(lldb) run
Process 5391 launched: './SvtHevcEncApp' (x86_64)
\-------------------------------------------
SVT-HEVC Encoder
SVT [version]:  SVT-HEVC Encoder Lib v1.3.0
SVT [build]  :  GCC 4.2.1        64 bit
LIB Build date: Mar  2 2019 22:35:59
\-------------------------------------------
Process 5391 stopped
\* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
    frame #0: 0x00000001000cdff0 libSvtHevcEnc.1.dylib\`EbDeinitEncoder + 16
libSvtHevcEnc.1.dylib\`EbDeinitEncoder:
->  0x1000cdff0 <+16>: movq   0x8(%rdi), %rdi
    0x1000cdff4 <+20>: movq   %rdi, -0x10(%rbp)
    0x1000cdff8 <+24>: movl   $0x0, -0x14(%rbp)
    0x1000cdfff <+31>: movl   $0x0, -0x18(%rbp)
Target 0: (SvtHevcEncApp) stopped.
valgrind --tool=memcheck --leak-check=full  --show-leak-kinds=all ./SvtHevcEncApp -n 120 -w 1920 -h 1080 -fps-num 2997 -fps-denom 50 -i ../Release/Morocco1080.yuv -b test.265
==25186== Memcheck, a memory error detector
==25186== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==25186== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==25186== Command: ./SvtHevcEncApp -n 120 -w 1920 -h 1080 -fps-num 2997 -fps-denom 50 -i ../Release/Morocco1080.yuv -b test.265
==25186==
-------------------------------------------
SVT-HEVC Encoder
SVT [version]:  SVT-HEVC Encoder Lib v1.3.0
SVT [build]  :  GCC 4.2.1        64 bit
LIB Build date: Mar  3 2019 09:10:12
-------------------------------------------
==25186== Warning: set address range perms: large range [0x1048b5040, 0x150d69040) (undefined)
==25186== Invalid read of size 8
==25186==    at 0x1000E5FF0: EbDeinitEncoder (EbEncHandle.c:1538)
==25186==    by 0x1000E61E4: EbInitHandle (EbEncHandle.c:1610)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==25186==
==25186==
==25186== Process terminating with default action of signal 11 (SIGSEGV)
==25186==  Access not within mapped region at address 0x8
==25186==    at 0x1000E5FF0: EbDeinitEncoder (EbEncHandle.c:1538)
==25186==    by 0x1000E61E4: EbInitHandle (EbEncHandle.c:1610)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==  If you believe this happened as a result of a stack
==25186==  overflow in your program's main thread (unlikely but
==25186==  possible), you can try to increase the size of the
==25186==  main thread stack using the --main-stacksize= flag.
==25186==  The main thread stack size used in this run was 8388608.
==25186==
==25186== HEAP SUMMARY:
==25186==     in use at exit: 1,286,425,122 bytes in 168 blocks
==25186==   total heap usage: 195 allocs, 27 frees, 1,286,445,858 bytes allocated
==25186==
==25186== 4 bytes in 1 blocks are still reachable in loss record 1 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F34FD: EbEncHandleCtor (EbEncHandle.c:417)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 8 bytes in 1 blocks are still reachable in loss record 2 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F39FF: EbEncHandleCtor (EbEncHandle.c:505)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 8 bytes in 1 blocks are still reachable in loss record 3 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F3C83: EbEncHandleCtor (EbEncHandle.c:514)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 8 bytes in 1 blocks are still reachable in loss record 4 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F3F9D: EbEncHandleCtor (EbEncHandle.c:526)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 8 bytes in 1 blocks are still reachable in loss record 5 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F4282: EbEncHandleCtor (EbEncHandle.c:537)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 16 bytes in 1 blocks are still reachable in loss record 6 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F3DD1: EbEncHandleCtor (EbEncHandle.c:517)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 16 bytes in 1 blocks are still reachable in loss record 7 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F40EB: EbEncHandleCtor (EbEncHandle.c:529)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 24 bytes in 1 blocks are still reachable in loss record 8 of 56
==25186==    at 0x1000C02FE: malloc_zone_malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100CB7901: NXCreateMapTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB78D3: NXCreateMapTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6394: __sel_registerName(char const*, int, int) (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6096: sel_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB598C: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CC84E0: map_images (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10001BC64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
==25186==    by 0x10001BE39: dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) (in /usr/lib/dyld)
==25186==    by 0x10078071D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
==25186==    by 0x100CB5073: _objc_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10070AB34: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==25186==
==25186== 24 bytes in 1 blocks are still reachable in loss record 12 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000E6189: EbInitHandle (EbEncHandle.c:1599)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 24 bytes in 1 blocks are still reachable in loss record 13 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F3B45: EbEncHandleCtor (EbEncHandle.c:508)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 24 bytes in 1 blocks are still reachable in loss record 14 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x10014C181: EbSequenceControlSetInstanceCtor (EbSequenceControlSet.c:309)
==25186==    by 0x1000F43CF: EbEncHandleCtor (EbEncHandle.c:540)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 32 bytes in 1 blocks are still reachable in loss record 16 of 56
==25186==    at 0x1000C02FE: malloc_zone_malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100CB7A9E: NXCreateHashTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7A6E: NXCreateHashTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7948: NXCreateMapTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB78D3: NXCreateMapTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6394: __sel_registerName(char const*, int, int) (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6096: sel_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB598C: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CC84E0: map_images (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10001BC64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
==25186==    by 0x10001BE39: dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) (in /usr/lib/dyld)
==25186==    by 0x10078071D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
==25186==
==25186== 32 bytes in 1 blocks are still reachable in loss record 17 of 56
==25186==    at 0x1000C02FE: malloc_zone_malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100CB7ABF: NXCreateHashTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7A6E: NXCreateHashTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7948: NXCreateMapTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB78D3: NXCreateMapTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6394: __sel_registerName(char const*, int, int) (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6096: sel_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB598C: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CC84E0: map_images (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10001BC64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
==25186==    by 0x10001BE39: dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) (in /usr/lib/dyld)
==25186==    by 0x10078071D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
==25186==
==25186== 32 bytes in 1 blocks are still reachable in loss record 18 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100CB7B83: NXCreateHashTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7A6E: NXCreateHashTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7948: NXCreateMapTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB78D3: NXCreateMapTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6394: __sel_registerName(char const*, int, int) (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6096: sel_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB598C: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CC84E0: map_images (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10001BC64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
==25186==    by 0x10001BE39: dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) (in /usr/lib/dyld)
==25186==    by 0x10078071D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
==25186==
==25186== 32 bytes in 1 blocks are still reachable in loss record 19 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100CB79AE: NXCreateMapTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB78D3: NXCreateMapTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6394: __sel_registerName(char const*, int, int) (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6096: sel_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB598C: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CC84E0: map_images (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10001BC64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
==25186==    by 0x10001BE39: dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) (in /usr/lib/dyld)
==25186==    by 0x10078071D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
==25186==    by 0x100CB5073: _objc_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10070AB34: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==25186==
==25186== 48 bytes in 1 blocks are still reachable in loss record 23 of 56
==25186==    at 0x1000C08AD: malloc_zone_calloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100CB7F24: _NXHashRehashToCapacity (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7EA2: NXHashInsert (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7BAD: NXCreateHashTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7A6E: NXCreateHashTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB7948: NXCreateMapTableFromZone (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB78D3: NXCreateMapTable (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6394: __sel_registerName(char const*, int, int) (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB6096: sel_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CB598C: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CC84E0: map_images (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10001BC64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
==25186==
==25186== 72 bytes in 3 blocks are possibly lost in loss record 33 of 56
==25186==    at 0x1000C06EA: calloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100CB57C2: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x100CC84E0: map_images (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10001BC64: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) (in /usr/lib/dyld)
==25186==    by 0x10001BE39: dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) (in /usr/lib/dyld)
==25186==    by 0x10078071D: _dyld_objc_notify_register (in /usr/lib/system/libdyld.dylib)
==25186==    by 0x100CB5073: _objc_init (in /usr/lib/libobjc.A.dylib)
==25186==    by 0x10070AB34: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==25186==    by 0x10070AB1B: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==25186==    by 0x1006199C2: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==25186==    by 0x10002DAC5: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==25186==    by 0x10002DCF5: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==25186==
==25186== 320 bytes in 1 blocks are still reachable in loss record 44 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000087DA: main (EbAppMain.c:128)
==25186==
==25186== 424 bytes in 1 blocks are still reachable in loss record 45 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F4435: EncodeContextCtor (EbEncodeContext.c:23)
==25186==    by 0x10014C24B: EbSequenceControlSetInstanceCtor (EbSequenceControlSet.c:311)
==25186==    by 0x1000F43CF: EbEncHandleCtor (EbEncHandle.c:540)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 728 bytes in 1 blocks are still reachable in loss record 47 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F3405: EbEncHandleCtor (EbEncHandle.c:391)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 1,512 bytes in 1 blocks are still reachable in loss record 48 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100008743: main (EbAppMain.c:119)
==25186==
==25186== 6,400,000 bytes in 1 blocks are still reachable in loss record 55 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x100005789: AllocateMemoryTable (EbAppContext.c:45)
==25186==    by 0x100007C21: InitEncoder (EbAppContext.c:581)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== 1,280,000,000 bytes in 1 blocks are still reachable in loss record 56 of 56
==25186==    at 0x1000C0086: malloc (in /usr/local/Cellar/valgrind/3.14.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==25186==    by 0x1000F3437: EbEncHandleCtor (EbEncHandle.c:396)
==25186==    by 0x1000E62EE: InitH265EncoderHandle (EbEncHandle.c:3728)
==25186==    by 0x1000E61AD: EbInitHandle (EbEncHandle.c:1604)
==25186==    by 0x100007C46: InitEncoder (EbAppContext.c:585)
==25186==    by 0x1000089D4: main (EbAppMain.c:161)
==25186==
==25186== LEAK SUMMARY:
==25186==    definitely lost: 0 bytes in 0 blocks
==25186==    indirectly lost: 0 bytes in 0 blocks
==25186==      possibly lost: 72 bytes in 3 blocks
==25186==    still reachable: 1,286,403,324 bytes in 22 blocks
==25186==         suppressed: 21,726 bytes in 143 blocks
==25186==
==25186== For counts of detected and suppressed errors, rerun with: -v
==25186== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 12 from 12)
Segmentation fault: 11

Artifacts in the output 265 video

Hi,

I used the tool on "Ubuntu" to encode a 2K/HDR video with the following command:

sudo HevcEncoderApp -i input.raw -b ouput.265 -w 1920 -h 1080 -fps 23.976 -bit-depth 10 -tune 0 -rc 1 -tbr 15000000 -encMode 0 -level 6.2 -tier 1

The encoding was finished; however, a lot of artifacts appears when playing the output 265 file with different players.

There are lots of bad blocks and noises here and there in the frames and the artifacts come to its peak especially when there is a big scene difference. Would you mind taking a look at the command and providing some feedback on how to fix it?

Also, processing a 4K video tends to freeze the machine (4 cores). Is there a way to specify number of cores to be used?

Thanks a lot!

MQ

intel_hevc_screenshot

Main10 profile encoding failed

An example of the encoding command line is as follows:
"D:\Encoder\FFMPEG\ffmpeg.exe" -loglevel level+error -i "%~dpn1.mp4" -pix_fmt p010le -strict -1 -f rawvideo -nostdin - | "D:\Encoder\SVT-HEVC\SvtHevcEncApp" -i stdin -encMode 9 -tune 0 -w 1920 -h 1080 -bit-depth 10 -profile 2 -fps-num 24000 -fps-denom 1001 -q 30 -n 300 -b "%~dpn1_SVT-HEVC.hevc"

You can use any H.264 video file encoding to reproduce the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.