[x265-commits] [x265] level: add --high-tier and auto-configure VBV if --crf N ...

Steve Borho steve at borho.org
Wed Jul 23 08:07:42 CEST 2014


details:   http://hg.videolan.org/x265/rev/5510d559c2bd
branches:  
changeset: 7512:5510d559c2bd
user:      Steve Borho <steve at borho.org>
date:      Mon Jul 21 19:49:19 2014 -0500
description:
level: add --high-tier and auto-configure VBV if --crf N --level M (refs #61)

This patch is a major overhaul of the level enforcement logic. The first obvious
difference is that the user may specify the tier. The second difference is that
x265 will no longer run any configuration that might generate non-compliant
bitstreams.

Any of these conditions will cause the encode to abort if a minimum decoder
level was specified:

* picture size is too large
* frame rate is too high
* constant QP rate control is configured
* the specified level does not exist

Further, if CRF was specified, we now configure VBV using the maximum CPB size
and bitrate for their level/tier (and issue a warning that the output may now
be non-deterministic).

Note that the encoder will still encode the minimum decoder level which covers
the encode parameters.  So even if you specify --level 5.1, we may signal the
stream as level 4.0-High if the stream should be decodable at that level.

This further fixes the CLI to allow --level-idc or the shortened --level, just
as it now also supports --high-tier or the shortened --high.
Subject: [x265] rest: update --profile, --level, --high-tier docs

details:   http://hg.videolan.org/x265/rev/08da00a7e719
branches:  
changeset: 7513:08da00a7e719
user:      Steve Borho <steve at borho.org>
date:      Mon Jul 21 21:31:41 2014 -0500
description:
rest: update --profile, --level, --high-tier docs
Subject: [x265] level: fix GCC signed/unsigned comparison

details:   http://hg.videolan.org/x265/rev/345bc6231fa3
branches:  
changeset: 7514:345bc6231fa3
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 22 13:08:31 2014 -0500
description:
level: fix GCC signed/unsigned comparison
Subject: [x265] remove very obsolete regression batch files

details:   http://hg.videolan.org/x265/rev/fe3f3ec46306
branches:  
changeset: 7515:fe3f3ec46306
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 22 13:10:55 2014 -0500
description:
remove very obsolete regression batch files
Subject: [x265] param: re-order code to avoid unreachable code warnings in 10bit builds

details:   http://hg.videolan.org/x265/rev/e3ad03b7c485
branches:  
changeset: 7516:e3ad03b7c485
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 22 13:28:54 2014 -0500
description:
param: re-order code to avoid unreachable code warnings in 10bit builds
Subject: [x265] TComPrediction: remove TComDataCU as pointer to private functions

details:   http://hg.videolan.org/x265/rev/d8d26a695cf6
branches:  
changeset: 7517:d8d26a695cf6
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Mon Jul 21 16:06:31 2014 +0530
description:
TComPrediction: remove TComDataCU as pointer to private functions
Subject: [x265] TComPrediction: save CU data (partAddr, width, height) as member fields

details:   http://hg.videolan.org/x265/rev/a5422a41c85a
branches:  
changeset: 7518:a5422a41c85a
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Jul 22 17:03:38 2014 +0530
description:
TComPrediction: save CU data (partAddr, width, height) as member fields

Before motion compensation, save CU related data inside the TComPrediction structure
Subject: [x265] TComPrediction: remove redundant colorspace information

details:   http://hg.videolan.org/x265/rev/30f41c3ef7d3
branches:  
changeset: 7519:30f41c3ef7d3
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Tue Jul 22 19:59:06 2014 +0530
description:
TComPrediction: remove redundant colorspace information

m_csp is sufficient inside the TEncSearch, TComPrediction structures
Subject: [x265] TComPrediction: white space nits, remove isPSlice (next series)

details:   http://hg.videolan.org/x265/rev/5fdc394bc5e0
branches:  
changeset: 7520:5fdc394bc5e0
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Wed Jul 23 10:20:55 2014 +0530
description:
TComPrediction: white space nits, remove isPSlice (next series)
Subject: [x265] analysis: setQPforQuant in checkIntraInter to fix the hash mismatch at rd=5&6

details:   http://hg.videolan.org/x265/rev/c1823bb20eed
branches:  
changeset: 7521:c1823bb20eed
user:      Gopu Govindaswamy <gopu at multicorewareinc.com>
date:      Wed Jul 23 11:16:33 2014 +0530
description:
analysis: setQPforQuant in checkIntraInter to fix the hash mismatch at rd=5&6

diffstat:

 build/regression/01build-and-smoke-test.bat |   97 ---------
 build/regression/02perftest.bat             |   26 --
 build/regression/commandlines-example.txt   |   15 -
 build/regression/config-example.txt         |    8 -
 build/regression/email-csv.py               |   49 ----
 build/regression/run.bat                    |   56 -----
 doc/reST/cli.rst                            |   47 ++++-
 source/CMakeLists.txt                       |    2 +-
 source/Lib/TLibCommon/TComPrediction.cpp    |  276 +++++++++++----------------
 source/Lib/TLibCommon/TComPrediction.h      |   28 +-
 source/Lib/TLibEncoder/TEncSearch.cpp       |  161 +++++++++-------
 source/common/param.cpp                     |   14 +-
 source/encoder/analysis.cpp                 |   19 +
 source/encoder/api.cpp                      |   12 +-
 source/encoder/level.cpp                    |  161 +++++++++++-----
 source/encoder/level.h                      |    2 +-
 source/x265.cpp                             |    7 +-
 source/x265.h                               |    6 +-
 18 files changed, 427 insertions(+), 559 deletions(-)

diffs (truncated from 1872 to 300 lines):

diff -r b85dbec30cc5 -r c1823bb20eed build/regression/01build-and-smoke-test.bat
--- a/build/regression/01build-and-smoke-test.bat	Tue Jul 22 16:46:22 2014 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
- at echo off
-
-if not exist %buildconfig% mkdir %buildconfig%
-cd %buildconfig%
-if exist *.txt del *.txt
-
-call:makesolution 8bpp "-D ENABLE_PPA:BOOL=ON"
-call:makesolution 16bpp "-D HIGH_BIT_DEPTH:BOOL=ON"
-exit /B
-
-:makesolution
-set depth=%~1
-if not exist %depth% mkdir %depth%
-cd %depth%
-set name=%generator%-%depth%
-
-:: nuke existing cmake cache
-if exist CMakeFiles rd /s /q CMakeFiles
-if exist CMakeCache.txt del CMakeCache.txt
-if exist cmake_install.cmake del cmake_install.cmake
-
-echo Running cmake for %name%
-if "%buildconfig%" == "msys" (
-
-  echo cd "%CD%" > buildscript.sh
-  echo cmake -D ENABLE_TESTS:BOOL=ON %~2 -G "%generator%" ../../../../source >> buildscript.sh
-  echo make >> buildscript.sh
-
-  %msys% -l "%CD%\buildscript.sh"
-  if exist x265.exe (
-    rem We cannot test MSYS x265 without running in MSYS environment
-    cd ..
-    exit /b 0
-  ) else (
-    echo %name% could not create an x265.exe >> "%LOG%"
-    cd ..
-    exit /b 1
-  )
-
-) else (
-
-  call "%compiler%\..\..\VC\vcvarsall.bat"
-  cmake -D ENABLE_TESTS:BOOL=ON %~2 -G "%generator%" ..\..\..\..\source >> ..\cmake%depth%.txt
-  if not exist x265.sln (
-    echo %name% solution was not created >> "%LOG%"
-    cd ..
-    exit /b 1
-  )
-
-  echo Compiling for release...
-  MSBuild /property:Configuration="Release" x265.sln >> ..\build%depth%_release.txt
-  if %errorlevel% equ 1 (
-    echo Release %name% build failed, refer the build log >> "%LOG%"
-    cd ..
-    exit /b 1
-  )
-  
-  echo Compiling for debug...
-  MSBuild /property:Configuration="Debug" x265.sln >> ..\build%depth%_debug.txt
-  if %errorlevel% equ 1 (
-    echo Debug %name% build failed, refer the build log >> "%LOG%"
-    cd ..
-    exit /b 1
-  )
-)
-
-echo Smoke tests...
-if exist Release\x265.exe (
-  Release\x265.exe %video1% -f %testframes% --wpp --hash 1 -o str1.out -r rec1.yuv --no-progress >> ..\encoder_%depth%.txt 2>&1
-  Release\x265.exe %video2% -f %testframes% --wpp --hash 1 -o str2.out -r rec2.yuv --no-progress >> ..\encoder_%depth%.txt 2>&1
-  Release\x265.exe %video3% -f %testframes% --wpp --hash 1 -o str3.out -r rec3.yuv --no-progress >> ..\encoder_%depth%.txt 2>&1
-
-  %decoder% -b str1.out -o str1.yuv >> ..\decoder_%depth%.txt
-  %decoder% -b str2.out -o str2.yuv >> ..\decoder_%depth%.txt
-  %decoder% -b str3.out -o str3.yuv >> ..\decoder_%depth%.txt
-
-  FC /b rec1.yuv str1.yuv > NUL || echo Reconstructed frame mismatch for %name% %video1% >> ..\..\DiffBin.txt
-  FC /b rec2.yuv str2.yuv > NUL || echo Reconstructed frame mismatch for %name% %video2% >> ..\..\DiffBin.txt
-  FC /b rec3.yuv str3.yuv > NUL || echo Reconstructed frame mismatch for %name% %video3% >> ..\..\DiffBin.txt
-)
-
-echo Leak test...
-if exist Debug\x265.exe (
-:: hopefully you have VLD installed so this will check for leaks
-  Debug\x265.exe %video1% -f %testframes% --wpp -o str4.out -r rec4.yuv --no-progress >> ..\encoder_%depth%.txt 2>&1
-  %decoder% -b str4.out -o str4.yuv >> ..\decoder_%depth%.txt
-  FC /b rec4.yuv str4.yuv > NUL || echo Reconstructed frames mismatch for debug %name% >> ..\..\DiffBin.txt
-)
-
-echo Testbench...
-if exist test\Release\TestBench.exe (
-  test\Release\TestBench.exe >> ..\testbench.txt 2>&1 || echo %name% testbench failed >> "%LOG%"
-)
-if exist test\TestBench.exe (
-  test\TestBench.exe >> ..\testbench.txt 2>&1 || echo %name% testbench failed >> "%LOG%"
-)
-cd ..
diff -r b85dbec30cc5 -r c1823bb20eed build/regression/02perftest.bat
--- a/build/regression/02perftest.bat	Tue Jul 22 16:46:22 2014 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-if not exist vc11-x86_64\8bpp\Release\x265.exe (
-  echo Perf test expects VC11 x64 8bpp build of x265, not found. Skipping perf tests
-  exit /b 1
-)
-if not exist commandlines.txt (
-  echo commandlines.txt does not exist.
-  echo Copy commandlines-example to commandlines.txt and edit as necessary
-  exit /b 1
-)
-
-set CSV=perflog.csv
-set LOG=perflog.txt
-if exist %LOG% del %LOG%
-
-FOR /F "delims=EOF" %%i IN (commandlines.txt) do (
-  echo Encoding videos with options: %%i
-  call:encoder %video1% "%%i"
-  call:encoder %video2% "%%i"
-  call:encoder %video3% "%%i"
-)
-EXIT /B
-
-:encoder
- at echo x265.exe %1 %~2 -f %perfframes% -o hevc.out --hash 1 >> %LOG%
-vc11-x86_64\8bpp\Release\x265.exe %1 %~2 --no-progress -f %perfframes% -o hevc.out --csv %CSV% --hash 1 >> %LOG% 2>&1
-%decoder% -b hevc.out >> %LOG%
diff -r b85dbec30cc5 -r c1823bb20eed build/regression/commandlines-example.txt
--- a/build/regression/commandlines-example.txt	Tue Jul 22 16:46:22 2014 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
---wpp --tu-intra-depth 1 --tu-inter-depth 2 --no-tskip --max-merge 1 --threads 4
---wpp --rect --max-merge 1 --no-rdoq
---wpp --tu-intra-depth 1 --tu-inter-depth 2 --no-tskip --max-merge 1 --threads 4 --no-rdoq
---rect --max-merge 1
---wpp --rect --max-merge 1
---rect --max-merge 1 --cpuid 1
---wpp --rect --max-merge 1 --cpuid 1
---no-rect --no-amp
---no-rect --no-amp --max-merge 1
---wpp --no-rect --no-amp --max-merge 1
---max-merge 1 --wpp --no-rdoq
---rect --amp
---sao
---keyint 1
---bframes 1
diff -r b85dbec30cc5 -r c1823bb20eed build/regression/config-example.txt
--- a/build/regression/config-example.txt	Tue Jul 22 16:46:22 2014 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-repository=https://bitbucket.org/multicoreware/x265
-testframes=10
-perfframes=100
-decoder=D:\TAppDecoder.exe
-msys=C:\MinGW\bin\sh.exe
-video1=D:\BasketballDrive_1920x1080_50.y4m
-video2=D:\Kimono1_1920x1080_24.y4m
-video3=D:\FourPeople_1280x720_60.y4m
diff -r b85dbec30cc5 -r c1823bb20eed build/regression/email-csv.py
--- a/build/regression/email-csv.py	Tue Jul 22 16:46:22 2014 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-# this script requires python3
-
-import os
-import smtplib
-import glob
-from email.mime.image import MIMEImage
-from email.mime.multipart import MIMEMultipart
-from email.mime.text import MIMEText
-
-SMTP_SERVER = 'smtp.gmail.com'
-SMTP_PORT = 587
-sender = os.getenv("SMTP_USER", "sender at email.com")
-password = os.getenv("SMTP_PASSWD", "mypassword")
-recipient = 'receiver at email.com'
-subject = 'Performance results from regression test'
-message = 'results attached'
-
-def main():
-    msg = MIMEMultipart()
-    msg['Subject'] = 'Performance Results'
-    msg['To'] = recipient
-    msg['From'] = sender
-
-    for csvfile in glob.glob("*.csv"):
-        if not os.path.isfile(csvfile):
-            continue
-        text = MIMEImage(open(csvfile, 'rb').read(), _subtype="csv")
-        text.add_header('Content-Disposition', 'attachment', filename=csvfile)
-        msg.attach(text)
-
-    part = MIMEText('text', "plain")
-    part.set_payload(message)
-    msg.attach(part)
-    session = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
-    try:
-        session.ehlo()
-        session.starttls()
-        session.ehlo
-        session.login(sender, password)
-        session.sendmail(sender, recipient, msg.as_string())
-        print('your message has been sent')
-    except Exception as e:
-        print('Unable to send email', e)
-    finally:
-        session.quit()
-
-if __name__ == '__main__':
-    main()
diff -r b85dbec30cc5 -r c1823bb20eed build/regression/run.bat
--- a/build/regression/run.bat	Tue Jul 22 16:46:22 2014 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
- at echo off
-
-if not exist config.txt (
-  echo config.txt does not exist.
-  echo Copy config-example to config.txt and edit as necessary
-  exit /b 1
-)
-if not exist commandlines.txt (
-  echo commandlines.txt does not exist.
-  echo Copy commandlines-example to commandlines.txt and edit as necessary
-  exit /b 1
-)
-
-for /f "tokens=1,2,3,4,5,6,7,8 delims==" %%a in (config.txt) do (
-  if %%a==repository set repository=%%b
-  if %%a==testframes set testframes=%%b
-  if %%a==perfframes set perfframes=%%b
-  if %%a==msys set msys=%%b
-  if %%a==decoder set decoder=%%b
-  if %%a==video1 set video1=%%b
-  if %%a==video2 set video2=%%b
-  if %%a==video3 set video3=%%b
-)
-
-set CWD=%CD%
-set LOG="%CWD%"\regression.log
-if exist %LOG% del %LOG%
-
-hg pull -u "%repository%"
-if %errorlevel% equ 1 (
-  echo "Pull failed" >> "%LOG%"
-  exit /b 1
-)
-hg summary >> "%LOG%"
-hg summary
-
-call:buildconfigs "%msys%" msys "MSYS Makefiles"
-call:buildconfigs "%VS110COMNTOOLS%" vc11-x86_64 "Visual Studio 11 Win64"
-call:buildconfigs "%VS110COMNTOOLS%" vc11-x86 "Visual Studio 11"
-call:buildconfigs "%VS100COMNTOOLS%" vc10-x86_64 "Visual Studio 10 Win64"
-call:buildconfigs "%VS100COMNTOOLS%" vc10-x86 "Visual Studio 10"
-call:buildconfigs "%VS90COMNTOOLS%" vc9-x86_64 "Visual Studio 9 2008 Win64"
-call:buildconfigs "%VS90COMNTOOLS%" vc9-x86 "Visual Studio 9 2008 Win64"
-
-call 02perftest.bat
-EXIT /B
-
-:buildconfigs
-set compiler=%~1
-set buildconfig=%2
-set generator=%~3
-
-if exist %compiler% (
-  echo Detected %generator%, building >> "%LOG%"
-  cmd /c 01build-and-smoke-test.bat
-)
diff -r b85dbec30cc5 -r c1823bb20eed doc/reST/cli.rst
--- a/doc/reST/cli.rst	Tue Jul 22 16:46:22 2014 +0530
+++ b/doc/reST/cli.rst	Wed Jul 23 11:16:33 2014 +0530
@@ -594,15 +594,36 @@ Slice decision options
 
 	Use B-frames as references, when possible. Default enabled
 
-.. option:: --level <integer|float>
+.. option:: --profile <string>
 
-	Minimum decoder requirement level. Defaults to -1, which implies
+	Enforce the requirements of the specified profile, ensuring the
+	output stream will be decodable by a decoder which supports that
+	profile.  May abort the encode if the specified profile is
+	impossible to be supported by the compile options chosen for the
+	encoder (a high bit depth encoder will be unable to output
+	bitstreams compliant with Main or Mainstillpicture).
+
+	API users must use x265_param_apply_profile() after configuring
+	their param structure. Any changes made to the param structure after
+	this call might make the encode non-compliant.
+
+	**Values:** main, main10, mainstillpicture
+
+	**CLI ONLY**


More information about the x265-commits mailing list