Projects
Staging
x265
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 14
View file
x265.changes
Changed
@@ -1,4 +1,34 @@ ------------------------------------------------------------------- +Fri Mar 26 12:02:14 UTC 2021 - Luigi Baldoni <aloisio@gmx.com> + +- Update to version 3.5 + New features: + * Real-time VBV for ABR (Average BitRate) encodes in –pass 2 + using --vbv-live-multi-pass. Improves VBV compliance with no + significant impact on coding efficiency. + Enhancements to existing features: + * Improved hist-based scene cut algorithm: Reduces false + positives by leveraging motion and scene transition info. + * Support for RADL pictures at IDR scene cuts: Improves coding + efficiency with no significant impact on performance. + * Bidirectional scene cut aware Frame Quantizer Selection: + Saves bits than forward masking with no noticeable perceptual + quality difference. + API changes: + * Additions to x265_param structure to support the newly added + features and encoder enhancements. + * New x265_param options --min-vbv-fullness and + --max-vbv-fullness to control min and max VBV fullness. + Bug fixes: + * Incorrect VBV lookahead in --analysis-load + --scale-factor. + * Encoder hang when VBV is used with slices. + * QP spikes in the row-level VBV rate-control when WPP enabled. + * Encoder crash in --abr-ladder. +- Use new homepage and download URLs. +- Add subpackage for HDR10+ library +- Add update.sh + +------------------------------------------------------------------- Mon Jun 1 17:51:22 UTC 2020 - Luigi Baldoni <aloisio@gmx.com> - Update to version 3.4
View file
x265.spec
Changed
@@ -1,7 +1,7 @@ # # spec file for package x265 # -# Copyright (c) 2020 Packman Team <packman@links2linux.de> +# Copyright (c) 2021 Packman Team <packman@links2linux.de> # Copyright (c) 2014 Torsten Gruner <t.gruner@katodev.de> # # All modifications and additions to the file contributed by third parties @@ -17,17 +17,18 @@ # -%define sover 192 +%define sover 199 %define libname lib%{name} %define libsoname %{libname}-%{sover} +%define uver 3_5 Name: x265 -Version: 3.4 +Version: 3.5 Release: 0 Summary: A free h265/HEVC encoder - encoder binary License: GPL-2.0-or-later Group: Productivity/Multimedia/Video/Editors and Convertors -URL: https://bitbucket.org/multicoreware/x265/wiki/Home -Source0: https://bitbucket.org/multicoreware/x265/downloads/%{name}_%{version}.tar.gz +URL: https://bitbucket.org/multicoreware/x265_git +Source0: https://bitbucket.org/multicoreware/x265_git/downloads/%{name}_%{version}.tar.gz Patch0: arm.patch Patch1: x265.pkgconfig.patch Patch2: x265-fix_enable512.patch @@ -51,10 +52,18 @@ x265 is a free library for encoding next-generation H265/HEVC video streams. +%package -n libhdr10plus-%{uver} +Summary: A free HDR10+ library +Group: Productivity/Multimedia/Video/Editors and Convertors + +%description -n libhdr10plus-%{uver} +A free library supporting HDR10+. + %package -n %{libname}-devel Summary: Libraries and include file for the %{libname} encoder Group: Development/Libraries/C and C++ Requires: %{libsoname} = %{version}-%{release} +Requires: libhdr10plus-%{uver} = %{version}-%{release} Provides: %{name}-devel = %{version} Obsoletes: %{name}-devel < %{version} @@ -67,12 +76,15 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 -sed -i -e "s/0.0/%{sover}.0/g" source/cmake/version.cmake - +# set the version by hand +sed -i "/^include(Version)/d" source/CMakeLists.txt +# force version number in the soname +sed -i 's/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus/hdr10plus-shared PROPERTIES OUTPUT_NAME hdr10plus-%{version}/' \ + source/CMakeLists.txt %build SOURCE_DIR="$PWD"/source -COMMON_FLAGS="-DENABLE_TESTS=OFF -DENABLE_PIC=ON" +COMMON_FLAGS="-DENABLE_TESTS=OFF -DENABLE_PIC=ON -Wno-dev" HIGH_BIT_DEPTH_FLAGS="-DENABLE_CLI=OFF -DENABLE_SHARED=OFF -DEXPORT_C_API=OFF -DHIGH_BIT_DEPTH=ON" %if 0%{?suse_version} >= 1500 @@ -104,16 +116,24 @@ # Build general version of the library linking in the 10/12bit depth versions %define __builddir ./source/build %cmake -DENABLE_TESTS=OFF \ + -DENABLE_SHARED=ON \ + -DX265_LATEST_TAG="%{sover}.0" \ + -DX265_VERSION="%{version}" \ + -DENABLE_HDR10_PLUS=ON \ -DENABLE_PIC=ON \ -DENABLE_CLI=ON \ -DLINKED_10BIT=ON \ -DLINKED_12BIT=ON \ -DEXTRA_LINK_FLAGS="-L$SOURCE_DIR/build-10bit -L$SOURCE_DIR/build-12bit" \ - -DEXTRA_LIB="x265_main10.a;x265_main12.a" - + -DEXTRA_LIB="x265_main10.a;x265_main12.a" \ + -Wno-dev %else cd source -%cmake $COMMON_FLAGS +%cmake $COMMON_FLAGS \ + -DENABLE_SHARED=ON \ + -DX265_LATEST_TAG="%{sover}.0" \ + -DX265_VERSION="%{version}" \ + -DENABLE_HDR10_PLUS=ON %endif make %{?_smp_mflags} cd ../../ @@ -123,15 +143,20 @@ cd source %endif %cmake_install -rm -f %{buildroot}%{_libdir}/%{libname}.a -echo "%{libname}-%{sover}" > %{_sourcedir}/baselibs.conf +find %{buildroot} -type f -name "*.a" -delete -print0 %post -n %{libsoname} -p /sbin/ldconfig %postun -n %{libsoname} -p /sbin/ldconfig +%post -n libhdr10plus-%{uver} -p /sbin/ldconfig +%postun -n libhdr10plus-%{uver} -p /sbin/ldconfig + %files -n %{libsoname} %{_libdir}/%{libname}.so.%{sover}* +%files -n libhdr10plus-%{uver} +%{_libdir}/libhdr10plus-%{version}.so + %files %{_bindir}/%{name} @@ -140,6 +165,7 @@ %doc readme.rst %{_includedir}/%{name}.h %{_includedir}/%{name}_config.h +%{_includedir}/hdr10plus.h %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/%{libname}.so
View file
baselibs.conf
Changed
@@ -1,1 +1,1 @@ -libx265-192 +libx265-199
View file
update.sh
Added
@@ -0,0 +1,10 @@ +#!/bin/sh + +rm -f x265_*.tar.gz +osc service disabledrun download_files +version=$(grep ^Version x265.spec|awk '{print $2}') +echo "The new version is:" $version +api=$(tar xzfO x265_${version}.tar.gz x265_${version}/source/CMakeLists.txt|grep "set(X265_BUILD"|sed 's/^.* \([1-9][0-9]*\).*$/\1/') +echo "The new api version is:" $api +echo "libx265-${api}" > baselibs.conf +sed -i "/^%define sover/c%define sover ${api}" x265.spec
View file
x265_3.4.tar.gz/.hg_archival.txt
Deleted
@@ -1,4 +0,0 @@ -repo: 09fe40627f03a0f9c3e6ac78b22ac93da23f9fdf -node: 2a65b720985096bcb1664f7cb05c3d04aeb576f5 -branch: Release_3.4 -tag: 3.4
View file
x265_3.4.tar.gz/source/cmake/version.cmake
Deleted
@@ -1,105 +0,0 @@ -if(CMAKE_VERSION VERSION_LESS "2.8.10") - find_program(HG_EXECUTABLE hg) -else() - find_package(Hg QUIET) -endif() -find_package(Git QUIET) # present in 2.8.8 - -# defaults, in case everything below fails -set(X265_VERSION "unknown") -set(X265_LATEST_TAG "0.0") -set(X265_TAG_DISTANCE "0") - -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.hg_archival.txt) - # read the lines of the archive summary file to extract the version - file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../.hg_archival.txt archive) - STRING(REGEX REPLACE "\n" ";" archive "${archive}") - foreach(f ${archive}) - string(FIND "${f}" ": " pos) - string(SUBSTRING "${f}" 0 ${pos} key) - string(SUBSTRING "${f}" ${pos} -1 value) - string(SUBSTRING "${value}" 2 -1 value) - set(hg_${key} ${value}) - endforeach() - if(DEFINED hg_tag) - set(X265_LATEST_TAG ${hg_tag}) - elseif(DEFINED hg_node) - set(X265_LATEST_TAG ${hg_latesttag}) - set(X265_TAG_DISTANCE ${hg_latesttagdistance}) - string(SUBSTRING "${hg_node}" 0 12 X265_REVISION_ID) - endif() -elseif(HG_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.hg) - if(EXISTS "${HG_EXECUTABLE}.bat") - # mercurial source installs on Windows require .bat extension - set(HG_EXECUTABLE "${HG_EXECUTABLE}.bat") - endif() - message(STATUS "hg found at ${HG_EXECUTABLE}") - - execute_process(COMMAND - ${HG_EXECUTABLE} log -r. --template "{latesttag}" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE X265_LATEST_TAG - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process(COMMAND - ${HG_EXECUTABLE} log -r. --template "{latesttagdistance}" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE X265_TAG_DISTANCE - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND - ${HG_EXECUTABLE} log -r. --template "{node}" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE X265_REVISION_ID - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - string(SUBSTRING "${X265_REVISION_ID}" 0 12 X265_REVISION_ID) - - if(X265_LATEST_TAG MATCHES "^r") - string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG) - endif() -elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) - execute_process( - COMMAND - ${GIT_EXECUTABLE} rev-list --tags --max-count=1 - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE X265_LATEST_TAG_COMMIT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND - ${GIT_EXECUTABLE} describe --tags ${X265_LATEST_TAG_COMMIT} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE X265_LATEST_TAG - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND - ${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count --first-parent - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE X265_TAG_DISTANCE - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND - ${GIT_EXECUTABLE} log -1 --format=g%h - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE X265_REVISION_ID - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -endif() -if(X265_TAG_DISTANCE STREQUAL "0") - set(X265_VERSION "${X265_LATEST_TAG}") -else() - set(X265_VERSION "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") -endif() - -message(STATUS "x265 version ${X265_VERSION}")
View file
x265_3.5.tar.gz/.
Added
+(directory)
View file
x265_3.5.tar.gz/build
Added
+(directory)
View file
x265_3.5.tar.gz/build/aarch64-linux
Added
+(directory)
View file
x265_3.5.tar.gz/build/arm-linux
Added
+(directory)
View file
x265_3.5.tar.gz/build/linux
Added
+(directory)
View file
x265_3.5.tar.gz/build/msys
Added
+(directory)
View file
x265_3.5.tar.gz/build/msys-cl
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc10-x86
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc10-x86_64
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc11-x86
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc11-x86_64
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc12-x86
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc12-x86_64
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc15-x86
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc15-x86_64
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc9-x86
Added
+(directory)
View file
x265_3.5.tar.gz/build/vc9-x86_64
Added
+(directory)
View file
x265_3.5.tar.gz/build/xcode
Added
+(directory)
View file
x265_3.5.tar.gz/doc
Added
+(directory)
View file
x265_3.5.tar.gz/doc/intra
Added
+(directory)
View file
x265_3.5.tar.gz/doc/reST
Added
+(directory)
View file
x265_3.4.tar.gz/doc/reST/cli.rst -> x265_3.5.tar.gz/doc/reST/cli.rst
Changed
@@ -36,13 +36,26 @@ .. option:: --help, -h - Display help text + Displays help text **CLI ONLY** .. option:: --version, -V - Display version details + Displays version details in the following manner *[Version Name]+/-[Number of commits from the release changeset]-/+[repository's head changeset SHA-1 paraphrase identifier]* + along with the compilation platform, build information and supported cpu capabilities. + + In case of release tar balls version information is partly derived from configuration file *x265Version.txt* + .. seeAlso:: For more information on how to configure the version file please refer to `<https://bitbucket.org/multicoreware/x265_git/wiki/Home>`_ and Contribute pages for updates specific + release and version control management. + + **Example:** + + *x265 [info]: HEVC encoder version 3.4+27-'d9217cf00'* + + *x265 [info]: build info [Windows][MSVC 1916][64 bit] 10bit* + + *x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2* **CLI ONLY** @@ -141,7 +154,7 @@ **Residual Energy** Average residual energy. SSE is calculated on fenc and pred(before quantization). - **Luma/Chroma Values** minumum, maximum and average(averaged by area) + **Luma/Chroma Values** minimum, maximum and average(averaged by area) luma and chroma values of source for each frame. **PU Statistics** percentage of PU modes at each depth. @@ -246,7 +259,7 @@ .. option:: --pools <string>, --numa-pools <string> - Comma seperated list of threads per NUMA node. If "none", then no worker + Comma separated list of threads per NUMA node. If "none", then no worker pools are created and only frame parallelism is possible. If NULL or "" (default) x265 will use all available threads on each NUMA node:: @@ -284,7 +297,7 @@ the last thread pool is spawned only if it has more than 32 threads for 64-bit machines, or 16 for 32-bit machines. If the total number of threads in the system doesn't obey this constraint, we may spawn fewer threads - than cores which has been emperically shown to be better for performance. + than cores which has been empirically shown to be better for performance. If the four pool features: :option:`--wpp`, :option:`--pmode`, :option:`--pme` and :option:`--lookahead-slices` are all disabled, @@ -409,7 +422,7 @@ Allow encoder to copy input x265 pictures to internal frame buffers. When disabled, x265 will not make an internal copy of the input picture and will work with the - application's buffers. While this allows for deeper integration, it is the responsbility + application's buffers. While this allows for deeper integration, it is the responsibility of the application to (a) ensure that the allocated picture has extra space for padding that will be done by the library, and (b) the buffers aren't recycled until the library has completed encoding this frame (which can be figured out by tracking NALs output by x265) @@ -554,7 +567,7 @@ .. option:: --chunk-start <integer> - First frame of the chunk. Frames preceeding this in display order will + First frame of the chunk. Frames preceding this in display order will be encoded, however, they will be discarded in the bitstream. This feature can be enabled only in closed GOP structures. Default 0 (disabled). @@ -562,7 +575,7 @@ .. option:: --chunk-end <integer> Last frame of the chunk. Frames following this in display order will be - used in taking lookahead decisions, but, they will not be encoded. + used in taking lookahead decisions, but they will not be encoded. This feature can be enabled only in closed GOP structures. Default 0 (disabled). @@ -638,7 +651,7 @@ If :option:`--level-idc` has been specified, --high-tier allows the support of high tier at that level. The encoder will first attempt to encode at the specified level, main tier first, turning on high tier only if - necessary and available at that level.If your requested level does not + necessary and available at that level. If your requested level does not support a High tier, high tier will not be supported. If --no-high-tier has been specified, then the encoder will attempt to encode only at the main tier. @@ -647,8 +660,8 @@ .. option:: --ref <1..16> Max number of L0 references to be allowed. This number has a linear - multiplier effect on the amount of work performed in motion search, - but will generally have a beneficial affect on compression and + multiplier effect on the amount of work performed in motion search + but will generally have a beneficial effect on compression and distortion. Note that x265 allows up to 16 L0 references but the HEVC @@ -668,7 +681,7 @@ .. option:: --allow-non-conformance, --no-allow-non-conformance Allow libx265 to generate a bitstream with profile and level NONE. - By default it will abort any encode which does not meet strict level + By default, it will abort any encode which does not meet strict level compliance. The two most likely causes for non-conformance are :option:`--ctu` being too small, :option:`--ref` being too high, or the bitrate or resolution being out of specification. @@ -727,7 +740,7 @@ used. The lower the value the faster the encode, the higher the value the smaller the bitstream (in general). Default 3 - Note that this table aims for accuracy, but is not necessarily our + Note that this table aims for accuracy but is not necessarily our final target behavior for each mode. +-------+---------------------------------------------------------------+ @@ -758,7 +771,7 @@ Maximum CU size (width and height). The larger the maximum CU size, the more efficiently x265 can encode flat areas of the picture, - giving large reductions in bitrate. However this comes at a loss of + giving large reductions in bitrate. However, this comes at a loss of parallelism with fewer rows of CUs that can be encoded in parallel, and less frame parallelism as well. Because of this the faster presets use a CU size of 32. Default: 64 @@ -799,7 +812,7 @@ For all non-zero values of limit-refs, the current depth will evaluate intra mode (in inter slices), only if intra mode was chosen as the best - mode for atleast one of the 4 sub-blocks. + mode for at least one of the 4 sub-blocks. You can often increase the number of references you are using (within your decoder level limits) if you enable one or @@ -863,13 +876,12 @@ Provides minimal quality degradation at good performance gains for non-zero modes. :option:`--rskip mode 0` means disabled. Default: 1, disabled when :option:`--tune grain` is used. - This is a integer value representing the edge-density percentage within the CU. Internally normalized to a number between 0.0 to 1.0 in x265. - Recommended low thresholds for slow encodes and high for fast encodes. .. option:: --rskip-edge-threshold <0..100> Denotes the minimum expected edge-density percentage within the CU, below which the recursion is skipped. - Default: 5, requires :option:`--rskip mode 2` to be enabled. + Internally normalized to decimal value in x265 library. Recommended low thresholds for slow encodes and high + for fast encodes. Default: 5, requires :option:`--rskip mode 2` to be enabled. .. option:: --splitrd-skip, --no-splitrd-skip @@ -928,7 +940,7 @@ .. option:: --analysis-load <filename> - Encoder reuses analysis information from the file specified. By reading the analysis data writen by + Encoder reuses analysis information from the file specified. By reading the analysis data written by an earlier encode of the same sequence, substantial redundant work may be avoided. Requires cutree, pmode to be off. Default disabled. @@ -1082,7 +1094,7 @@ Note that when the CU intra prediction is NxN (only possible with 8x8 CUs), a TU split is implied, and thus the residual quad-tree - begins at 4x4 and cannot split any futhrer. + begins at 4x4 and cannot split any further. .. option:: --tu-inter-depth <1..4> @@ -1101,7 +1113,7 @@ Enables early exit from TU depth recursion, for inter coded blocks. Level 1 - decides to recurse to next higher depth based on cost - comparison of full size TU and split TU. + comparison of full-size TU and split TU. Level 2 - based on first split subTU's depth, limits recursion of other split subTUs. @@ -1109,13 +1121,13 @@ Level 3 - based on the average depth of the co-located and the neighbor CUs' TU depth, limits recursion of the current CU. - Level 4 - uses the depth of the neighbouring/ co-located CUs TU depth + Level 4 - uses the depth of the neighboring/ co-located CUs TU depth to limit the 1st subTU depth. The 1st subTU depth is taken as the limiting depth for the other subTUs. Enabling levels 3 or 4 may cause a mismatch in the output bitstreams between :option:`--analysis-save` and :option:`--analysis-load` - as all neighbouring CUs TU depth may not be available in the + as all neighboring CUs TU depth may not be available in the :option:`--analysis-load` run as only the best mode's information is available to it. @@ -1216,14 +1228,14 @@ Motion search method. Generally, the higher the number the harder
View file
x265_3.4.tar.gz/doc/reST/introduction.rst -> x265_3.5.tar.gz/doc/reST/introduction.rst
Changed
@@ -43,7 +43,7 @@ features and optimizations from the x264 AVC encoder project. The x265 software is available for free under the GNU GPL 2 license, -from https://bitbucket.org/multicoreware/x265. For commercial companies +from https://bitbucket.org/multicoreware/x265_git. For commercial companies that wish to distribute x265 without being subject to the open source requirements of the GPL 2 license, commercial licenses are available with competitive terms. Contact license @ x265.com to inquire about
View file
x265_3.4.tar.gz/doc/reST/releasenotes.rst -> x265_3.5.tar.gz/doc/reST/releasenotes.rst
Changed
@@ -2,6 +2,33 @@ Release Notes ************* +Version 3.5 +=========== + +Release date - 16th March, 2021. + +New feature +----------- +1. Real-time VBV for ABR (Average BitRate) encodes in –pass 2 using :option:`--vbv-live-multi-pass`: Improves VBV compliance with no significant impact on coding efficiency. + +Enhancements to existing features +--------------------------------- +1. Improved hist-based scene cut algorithm: Reduces false positives by leveraging motion and scene transition info. +2. Support for RADL pictures at IDR scene cuts: Improves coding efficiency with no significant impact on performance. +3. Bidirectional scene cut aware Frame Quantizer Selection: Saves bits than forward masking with no noticeable perceptual quality difference. + +API changes +----------- +1. Additions to x265_param structure to support the newly added features and encoder enhancements. +2. New x265_param options :option:`--min-vbv-fullness` and :option:`--max-vbv-fullness` to control min and max VBV fullness. + +Bug fixes +--------- +1. Incorrect VBV lookahead in :option:`--analysis-load` + :option:`--scale-factor`. +2. Encoder hang when VBV is used with slices. +3. QP spikes in the row-level VBV rate-control when WPP enabled. +4. Encoder crash in :option:`--abr-ladder`. + Version 3.4 ===========
View file
x265_3.5.tar.gz/doc/uncrustify
Added
+(directory)
View file
x265_3.5.tar.gz/source
Added
+(directory)
View file
x265_3.4.tar.gz/source/CMakeLists.txt -> x265_3.5.tar.gz/source/CMakeLists.txt
Changed
@@ -29,7 +29,7 @@ option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF) mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD) # X265_BUILD must be incremented each time the public API is changed -set(X265_BUILD 192) +set(X265_BUILD 199) configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" "${PROJECT_BINARY_DIR}/x265.def") configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" @@ -485,7 +485,7 @@ endif() endif() -include(version) # determine X265_VERSION and X265_LATEST_TAG +include(Version) # determine X265_VERSION and X265_LATEST_TAG include_directories(. common encoder "${PROJECT_BINARY_DIR}") option(ENABLE_PPA "Enable PPA profiling instrumentation" OFF)
View file
x265_3.4.tar.gz/source/abrEncApp.cpp -> x265_3.5.tar.gz/source/abrEncApp.cpp
Changed
@@ -98,13 +98,15 @@ x265_picture_init(m_passEnc[pass]->m_param, m_inputPicBuffer[pass][idx]); } - m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, m_queueSize); + CHECKED_MALLOC_ZERO(m_analysisBuffer[pass], x265_analysis_data, m_queueSize); m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize]; m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize]; m_analysisRead[pass] = new ThreadSafeInteger[m_queueSize]; m_readFlag[pass] = X265_MALLOC(int, m_queueSize); } return true; + fail: + return false; } void AbrEncoder::destroy() @@ -315,6 +317,7 @@ x265_analysis_data *m_analysisInfo = &m_parent->m_analysisBuffer[m_id][index]; + x265_free_analysis_data(m_param, m_analysisInfo); memcpy(m_analysisInfo, src, sizeof(x265_analysis_data)); x265_alloc_analysis_data(m_param, m_analysisInfo); @@ -814,7 +817,7 @@ api->encoder_get_stats(m_encoder, &stats, sizeof(stats)); if (m_param->csvfn && !b_ctrl_c) #if ENABLE_LIBVMAF - api->vmaf_encoder_log(m_encoder, m_cliopt.argCount, m_cliopt.argString, m_cliopt.param, vmafdata); + api->vmaf_encoder_log(m_encoder, m_cliopt.argCnt, m_cliopt.argString, m_cliopt.param, vmafdata); #else api->encoder_log(m_encoder, m_cliopt.argCnt, m_cliopt.argString); #endif
View file
x265_3.5.tar.gz/source/cmake
Added
+(directory)
View file
x265_3.5.tar.gz/source/cmake/Version.cmake
Added
@@ -0,0 +1,179 @@ + ################################################################################################################# + # + # Copyright (C) 2013-2020 MulticoreWare, Inc + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. + # + # This program is also available under a commercial proprietary license. + # For more information, contact us at license @ x265.com + # + # Authors: Janani T.E <janani.te@multicorewareinc.com>, Srikanth Kurapati <srikanthkurapati@multicorewareinc.com> + # + ################################################################################################################# + # PURPOSE: Identity version control software version display, also read version files to present x265 version. + ################################################################################################################# + #Default Settings, for user to be vigilant about x265 version being reported during product build. +set(X265_VERSION "unknown") +set(X265_LATEST_TAG "0.0") +set(X265_TAG_DISTANCE "0") + +#Find version control software to be used for live and extracted repositories from compressed tarballs +if(CMAKE_VERSION VERSION_LESS "2.8.10") + find_program(HG_EXECUTABLE hg) + if(EXISTS "${HG_EXECUTABLE}.bat") + set(HG_EXECUTABLE "${HG_EXECUTABLE}.bat") + endif() + message(STATUS "hg found at ${HG_EXECUTABLE}") +else() + find_package(Hg QUIET) +endif() +if(HG_EXECUTABLE) + #Set Version Control binary for source code kind + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.hg_archival.txt) + set(HG_ARCHETYPE "1") + elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.hg) + set(HG_ARCHETYPE "0") + endif() +endif(HG_EXECUTABLE) +find_package(Git QUIET) #No restrictions on Git versions used, any versions from 1.8.x to 2.2.x or later should do. +if(GIT_FOUND) + find_program(GIT_EXECUTABLE git) + message(STATUS "GIT_EXECUTABLE ${GIT_EXECUTABLE}") + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git) + set(GIT_ARCHETYPE "0") + elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../x265Version.txt) + set(GIT_ARCHETYPE "1") + endif() +endif(GIT_FOUND) +if(HG_ARCHETYPE) + #Read the lines of the archive summary file to extract the version + message(STATUS "SOURCE CODE IS FROM x265 HG ARCHIVED ZIP OR TAR BALL") + file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../.hg_archival.txt archive) + STRING(REGEX REPLACE "\n" ";" archive "${archive}") + foreach(f ${archive}) + string(FIND "${f}" ": " pos) + string(SUBSTRING "${f}" 0 ${pos} key) + string(SUBSTRING "${f}" ${pos} -1 value) + string(SUBSTRING "${value}" 2 -1 value) + set(hg_${key} ${value}) + endforeach() + if(DEFINED hg_tag) + set(X265_LATEST_TAG ${hg_tag}) + elseif(DEFINED hg_node) + set(X265_LATEST_TAG ${hg_latesttag}) + set(X265_TAG_DISTANCE ${hg_latesttagdistance}) + string(SUBSTRING "${hg_node}" 0 12 X265_REVISION_ID) + endif() + message(STATUS "HG ARCHIVAL INFORMATION PROCESSED") +elseif(NOT DEFINED GIT_ARCHETYPE) +# means that's its neither hg archive nor git clone/archive hence it has to be hg live repo as these are only four cases that need to processed in mutual exclusion. + execute_process(COMMAND + ${HG_EXECUTABLE} log -r. --template "{latesttag}" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE X265_LATEST_TAG + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + execute_process(COMMAND + ${HG_EXECUTABLE} log -r. --template "{latesttagdistance}" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE X265_TAG_DISTANCE + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + execute_process( + COMMAND + ${HG_EXECUTABLE} log -r. --template "{node}" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE X265_REVISION_ID + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(SUBSTRING "${X265_REVISION_ID}" 0 12 X265_REVISION_ID) + if(X265_LATEST_TAG MATCHES "^r") + string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG) + endif() + message(STATUS "HG LIVE REPO STATUS CHECK DONE") +elseif(GIT_ARCHETYPE) + message(STATUS "SOURCE CODE IS FROM x265 GIT ARCHIVED ZIP OR TAR BALL") + #Read the lines of the archive summary file to extract the version + file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../x265Version.txt filebuf) + STRING(REGEX REPLACE "\n" ";" filebuf "${filebuf}") + foreach(line ${filebuf}) + string(FIND "${line}" ": " pos) + string(SUBSTRING "${line}" 0 ${pos} key) + string(SUBSTRING "${line}" ${pos} -1 value) + string(SUBSTRING "${value}" 2 -1 value) + set(git_${key} ${value}) + endforeach() + if(DEFINED git_releasetag) + set(X265_LATEST_TAG ${git_releasetag}) + if(DEFINED git_releasetagdistance) + set(X265_TAG_DISTANCE ${git_releasetagdistance}) + if(X265_TAG_DISTANCE STRGREATER "0" OR X265_TAG_DISTANCE STREQUAL "0") + #for x265 the repository changeset has to be a tag id or commit id after the tag + #hence mandating it's presence in version file always for valid tag distances. + if(DEFINED git_repositorychangeset) + string(SUBSTRING "${git_repositorychangeset}" 0 9 X265_REVISION_ID) + else() + message(WARNING "X265 LATEST COMMIT TIP INFORMATION NOT AVAILABLE") + endif() + else() + message(WARNING "X265 TAG DISTANCE INVALID") + endif() + else() + message(WARNING "COMMIT INFORMATION AFTER LATEST REVISION UNAVAILABLE") + endif() + else() + message(WARNING "X265 RELEASE VERSION LABEL MISSING: ${X265_LATEST_TAG}") + endif() + message(STATUS "GIT ARCHIVAL INFORMATION PROCESSED") +else() + execute_process( + COMMAND + ${GIT_EXECUTABLE} describe --abbrev=0 --tags + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE X265_LATEST_TAG + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + execute_process( + COMMAND + ${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count --first-parent + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE X265_TAG_DISTANCE + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + execute_process( + COMMAND + ${GIT_EXECUTABLE} log --pretty=format:%h -n 1 + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE X265_REVISION_ID + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + message(STATUS "GIT LIVE REPO VERSION RETRIEVED") +endif() + +# formatting based on distance from tag +if(X265_TAG_DISTANCE STREQUAL "0") + set(X265_VERSION "${X265_LATEST_TAG}") +elseif(X265_TAG_DISTANCE STRGREATER "0") + set(X265_VERSION "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${X265_REVISION_ID}") +endif() + +#will always be printed in its entirety based on version file configuration to avail revision monitoring by repo owners +message(STATUS "X265 RELEASE VERSION ${X265_VERSION}")
View file
x265_3.5.tar.gz/source/common
Added
+(directory)
View file
x265_3.5.tar.gz/source/common/aarch64
Added
+(directory)
View file
x265_3.5.tar.gz/source/common/arm
Added
+(directory)
View file
x265_3.4.tar.gz/source/common/frame.cpp -> x265_3.5.tar.gz/source/common/frame.cpp
Changed
@@ -63,6 +63,7 @@ m_thetaPic = NULL; m_edgeBitPlane = NULL; m_edgeBitPic = NULL; + m_isInsideWindow = 0; } bool Frame::create(x265_param *param, float* quantOffsets)
View file
x265_3.4.tar.gz/source/common/frame.h -> x265_3.5.tar.gz/source/common/frame.h
Changed
@@ -141,6 +141,8 @@ pixel* m_edgeBitPlane; pixel* m_edgeBitPic; + int m_isInsideWindow; + Frame(); bool create(x265_param *param, float* quantOffsets);
View file
x265_3.4.tar.gz/source/common/lowres.cpp -> x265_3.5.tar.gz/source/common/lowres.cpp
Changed
@@ -266,6 +266,10 @@ indB = 0; memset(costEst, -1, sizeof(costEst)); memset(weightedCostDelta, 0, sizeof(weightedCostDelta)); + interPCostPercDiff = 0.0; + intraCostPercDiff = 0.0; + m_bIsMaxThres = false; + m_bIsHardScenecut = false; if (qpAqOffset && invQscaleFactor) memset(costEstAq, -1, sizeof(costEstAq));
View file
x265_3.4.tar.gz/source/common/lowres.h -> x265_3.5.tar.gz/source/common/lowres.h
Changed
@@ -234,6 +234,12 @@ uint16_t* propagateCost; double weightedCostDelta[X265_BFRAME_MAX + 2]; ReferencePlanes weightedRef[X265_BFRAME_MAX + 2]; + /* For hist-based scenecut */ + bool m_bIsMaxThres; + double interPCostPercDiff; + double intraCostPercDiff; + bool m_bIsHardScenecut; + bool create(x265_param* param, PicYuv *origPic, uint32_t qgSize); void destroy(); void init(PicYuv *origPic, int poc);
View file
x265_3.4.tar.gz/source/common/param.cpp -> x265_3.5.tar.gz/source/common/param.cpp
Changed
@@ -168,7 +168,7 @@ param->bFrameAdaptive = X265_B_ADAPT_TRELLIS; param->bBPyramid = 1; param->scenecutThreshold = 40; /* Magic number pulled in from x264 */ - param->edgeTransitionThreshold = 0.01; + param->edgeTransitionThreshold = 0.03; param->bHistBasedSceneCut = 0; param->lookaheadSlices = 8; param->lookaheadThreads = 0; @@ -179,8 +179,12 @@ param->bEnableHRDConcatFlag = 0; param->bEnableFades = 0; param->bEnableSceneCutAwareQp = 0; - param->scenecutWindow = 500; - param->maxQpDelta = 5; + param->fwdScenecutWindow = 500; + param->fwdRefQpDelta = 5; + param->fwdNonRefQpDelta = param->fwdRefQpDelta + (SLICE_TYPE_DELTA * param->fwdRefQpDelta); + param->bwdScenecutWindow = 100; + param->bwdRefQpDelta = -1; + param->bwdNonRefQpDelta = -1; /* Intra Coding Tools */ param->bEnableConstrainedIntra = 0; @@ -254,6 +258,8 @@ param->rc.vbvBufferInit = 0.9; param->vbvBufferEnd = 0; param->vbvEndFrameAdjust = 0; + param->minVbvFullness = 50; + param->maxVbvFullness = 80; param->rc.rfConstant = 28; param->rc.bitrate = 0; param->rc.qCompress = 0.6; @@ -287,6 +293,7 @@ param->bResetZoneConfig = 1; param->reconfigWindowSize = 0; param->decoderVbvMaxRate = 0; + param->bliveVBV2pass = 0; /* Video Usability Information (VUI) */ param->vui.aspectRatioIdc = 0; @@ -1122,7 +1129,7 @@ p->vui.bEnableOverscanInfoPresentFlag = 1; p->vui.bEnableOverscanAppropriateFlag = 1; } - else if (!strcmp(value, "undef")) + else if (!strcmp(value, "unknown")) p->vui.bEnableOverscanInfoPresentFlag = 0; else bError = true; @@ -1340,9 +1347,72 @@ p->selectiveSAO = atoi(value); } OPT("fades") p->bEnableFades = atobool(value); - OPT("scenecut-aware-qp") p->bEnableSceneCutAwareQp = atobool(value); - OPT("scenecut-window") p->scenecutWindow = atoi(value); - OPT("max-qp-delta") p->maxQpDelta = atoi(value); + OPT("scenecut-aware-qp") p->bEnableSceneCutAwareQp = atoi(value); + OPT("masking-strength") + { + int window1; + double refQpDelta1, nonRefQpDelta1; + + if (p->bEnableSceneCutAwareQp == FORWARD) + { + if (3 == sscanf(value, "%d,%lf,%lf", &window1, &refQpDelta1, &nonRefQpDelta1)) + { + if (window1 > 0) + p->fwdScenecutWindow = window1; + if (refQpDelta1 > 0) + p->fwdRefQpDelta = refQpDelta1; + if (nonRefQpDelta1 > 0) + p->fwdNonRefQpDelta = nonRefQpDelta1; + } + else + { + x265_log(NULL, X265_LOG_ERROR, "Specify all the necessary offsets for masking-strength \n"); + bError = true; + } + } + else if (p->bEnableSceneCutAwareQp == BACKWARD) + { + if (3 == sscanf(value, "%d,%lf,%lf", &window1, &refQpDelta1, &nonRefQpDelta1)) + { + if (window1 > 0) + p->bwdScenecutWindow = window1; + if (refQpDelta1 > 0) + p->bwdRefQpDelta = refQpDelta1; + if (nonRefQpDelta1 > 0) + p->bwdNonRefQpDelta = nonRefQpDelta1; + } + else + { + x265_log(NULL, X265_LOG_ERROR, "Specify all the necessary offsets for masking-strength \n"); + bError = true; + } + } + else if (p->bEnableSceneCutAwareQp == BI_DIRECTIONAL) + { + int window2; + double refQpDelta2, nonRefQpDelta2; + if (6 == sscanf(value, "%d,%lf,%lf,%d,%lf,%lf", &window1, &refQpDelta1, &nonRefQpDelta1, &window2, &refQpDelta2, &nonRefQpDelta2)) + { + if (window1 > 0) + p->fwdScenecutWindow = window1; + if (refQpDelta1 > 0) + p->fwdRefQpDelta = refQpDelta1; + if (nonRefQpDelta1 > 0) + p->fwdNonRefQpDelta = nonRefQpDelta1; + if (window2 > 0) + p->bwdScenecutWindow = window2; + if (refQpDelta2 > 0) + p->bwdRefQpDelta = refQpDelta2; + if (nonRefQpDelta2 > 0) + p->bwdNonRefQpDelta = nonRefQpDelta2; + } + else + { + x265_log(NULL, X265_LOG_ERROR, "Specify all the necessary offsets for masking-strength \n"); + bError = true; + } + } + } OPT("field") p->bField = atobool( value ); OPT("cll") p->bEmitCLL = atobool(value); OPT("frame-dup") p->bEnableFrameDuplication = atobool(value); @@ -1373,6 +1443,9 @@ sscanf(value, "%d,%d,%d", &p->hmeRange[0], &p->hmeRange[1], &p->hmeRange[2]); p->bEnableHME = true; } + OPT("vbv-live-multi-pass") p->bliveVBV2pass = atobool(value); + OPT("min-vbv-fullness") p->minVbvFullness = atof(value); + OPT("max-vbv-fullness") p->maxVbvFullness = atof(value); else return X265_PARAM_BAD_NAME; } @@ -1643,23 +1716,23 @@ "Sample Aspect Ratio height must be greater than 0"); CHECK(param->vui.videoFormat < 0 || param->vui.videoFormat > 5, "Video Format must be component," - " pal, ntsc, secam, mac or undef"); + " pal, ntsc, secam, mac or unknown"); CHECK(param->vui.colorPrimaries < 0 || param->vui.colorPrimaries > 12 || param->vui.colorPrimaries == 3, - "Color Primaries must be undef, bt709, bt470m," + "Color Primaries must be unknown, bt709, bt470m," " bt470bg, smpte170m, smpte240m, film, bt2020, smpte-st-428, smpte-rp-431 or smpte-eg-432"); CHECK(param->vui.transferCharacteristics < 0 || param->vui.transferCharacteristics > 18 || param->vui.transferCharacteristics == 3, - "Transfer Characteristics must be undef, bt709, bt470m, bt470bg," + "Transfer Characteristics must be unknown, bt709, bt470m, bt470bg," " smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e," " iec61966-2-1, bt2020-10, bt2020-12, smpte-st-2084, smpte-st-428 or arib-std-b67"); CHECK(param->vui.matrixCoeffs < 0 || param->vui.matrixCoeffs > 14 || param->vui.matrixCoeffs == 3, - "Matrix Coefficients must be undef, bt709, fcc, bt470bg, smpte170m," - " smpte240m, GBR, YCgCo, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c or ictcp"); + "Matrix Coefficients must be unknown, bt709, fcc, bt470bg, smpte170m," + " smpte240m, gbr, ycgco, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c or ictcp"); CHECK(param->vui.chromaSampleLocTypeTopField < 0 || param->vui.chromaSampleLocTypeTopField > 5, "Chroma Sample Location Type Top Field must be 0-5"); @@ -1688,8 +1761,8 @@ "scenecutThreshold must be greater than 0"); CHECK(param->scenecutBias < 0 || 100 < param->scenecutBias, "scenecut-bias must be between 0 and 100"); - CHECK(param->edgeTransitionThreshold < 0.0 || 2.0 < param->edgeTransitionThreshold, - "hist-threshold must be between 0.0 and 2.0"); + CHECK(param->edgeTransitionThreshold < 0.0 || 1.0 < param->edgeTransitionThreshold, + "hist-threshold must be between 0.0 and 1.0"); CHECK(param->radl < 0 || param->radl > param->bframes, "radl must be between 0 and bframes"); CHECK(param->rdPenalty < 0 || param->rdPenalty > 2, @@ -1712,6 +1785,10 @@ "Valid vbv-end-fr-adj must be a fraction 0 - 1"); CHECK(!param->totalFrames && param->vbvEndFrameAdjust, "vbv-end-fr-adj cannot be enabled when total number of frames is unknown"); + CHECK(param->minVbvFullness < 0 && param->minVbvFullness > 100, + "min-vbv-fullness must be a fraction 0 - 100"); + CHECK(param->maxVbvFullness < 0 && param->maxVbvFullness > 100, + "max-vbv-fullness must be a fraction 0 - 100"); CHECK(param->rc.bitrate < 0, "Target bitrate can not be less than zero"); CHECK(param->rc.qCompress < 0.5 || param->rc.qCompress > 1.0, @@ -1756,11 +1833,9 @@ CHECK((param->rc.vbvMaxBitrate <= 0 || param->rc.vbvBufferSize <= 0), "Dolby Vision requires VBV settings to enable HRD.\n"); CHECK((param->internalBitDepth != 10), "Dolby Vision profile - 5, profile - 8.1 and profile - 8.2 is Main10 only\n"); CHECK((param->internalCsp != X265_CSP_I420), "Dolby Vision profile - 5, profile - 8.1 and profile - 8.2 requires YCbCr 4:2:0 color space\n"); - if (param->dolbyProfile == 81) CHECK(!(param->masteringDisplayColorVolume), "Dolby Vision profile - 8.1 requires Mastering display color volume information\n"); } - if (param->bField && param->interlaceMode) { CHECK( (param->bFrameAdaptive==0), "Adaptive B-frame decision method should be closed for field feature.\n" ); @@ -1768,13 +1843,38 @@
View file
x265_3.5.tar.gz/source/common/ppc
Added
+(directory)
View file
x265_3.5.tar.gz/source/common/vec
Added
+(directory)
View file
x265_3.5.tar.gz/source/common/x86
Added
+(directory)
View file
x265_3.5.tar.gz/source/compat
Added
+(directory)
View file
x265_3.5.tar.gz/source/compat/getopt
Added
+(directory)
View file
x265_3.5.tar.gz/source/compat/msvc
Added
+(directory)
View file
x265_3.5.tar.gz/source/dynamicHDR10
Added
+(directory)
View file
x265_3.5.tar.gz/source/dynamicHDR10/json11
Added
+(directory)
View file
x265_3.5.tar.gz/source/encoder
Added
+(directory)
View file
x265_3.4.tar.gz/source/encoder/api.cpp -> x265_3.5.tar.gz/source/encoder/api.cpp
Changed
@@ -33,7 +33,7 @@ #include "svt.h" #if ENABLE_LIBVMAF -#include "libvmaf.h" +#include "libvmaf/libvmaf.h" #endif /* multilib namespace reflectors */
View file
x265_3.4.tar.gz/source/encoder/encoder.cpp -> x265_3.5.tar.gz/source/encoder/encoder.cpp
Changed
@@ -222,12 +222,9 @@ uint32_t pixelbytes = m_param->internalBitDepth > 8 ? 2 : 1; m_edgePic = X265_MALLOC(pixel, m_planeSizes[0] * pixelbytes); m_edgeHistThreshold = m_param->edgeTransitionThreshold; - m_chromaHistThreshold = m_edgeHistThreshold * 10.0; - m_chromaHistThreshold = x265_min(m_chromaHistThreshold, MAX_SCENECUT_THRESHOLD); - m_scaledEdgeThreshold = m_edgeHistThreshold * SCENECUT_STRENGTH_FACTOR; - m_scaledEdgeThreshold = x265_min(m_scaledEdgeThreshold, MAX_SCENECUT_THRESHOLD); - m_scaledChromaThreshold = m_chromaHistThreshold * SCENECUT_STRENGTH_FACTOR; - m_scaledChromaThreshold = x265_min(m_scaledChromaThreshold, MAX_SCENECUT_THRESHOLD); + m_chromaHistThreshold = x265_min(m_edgeHistThreshold * 10.0, MAX_SCENECUT_THRESHOLD); + m_scaledEdgeThreshold = x265_min(m_edgeHistThreshold * SCENECUT_STRENGTH_FACTOR, MAX_SCENECUT_THRESHOLD); + m_scaledChromaThreshold = x265_min(m_chromaHistThreshold * SCENECUT_STRENGTH_FACTOR, MAX_SCENECUT_THRESHOLD); if (m_param->sourceBitDepth != m_param->internalBitDepth) { int size = m_param->sourceWidth * m_param->sourceHeight; @@ -1437,7 +1434,6 @@ } size_t bufSize = sizeof(pixel) * m_planeSizes[0]; - int32_t planeCount = x265_cli_csps[m_param->internalCsp].planes; memset(m_edgePic, 0, bufSize); if (!computeEdge(m_edgePic, src, NULL, pic->width, pic->height, pic->width, false, 1)) @@ -1448,88 +1444,96 @@ pixel pixelVal; int32_t *edgeHist = m_curEdgeHist; - memset(edgeHist, 0, 2 * sizeof(int32_t)); - for (int64_t i = 0; i < m_planeSizes[0]; i++) + memset(edgeHist, 0, EDGE_BINS * sizeof(int32_t)); + for (uint32_t i = 0; i < m_planeSizes[0]; i++) { - if (!m_edgePic[i]) - edgeHist[0]++; + if (m_edgePic[i]) + edgeHist[1]++; else - edgeHist[1]++; + edgeHist[0]++; + } + + /* Y Histogram Calculation */ + int32_t *yHist = m_curYUVHist[0]; + memset(yHist, 0, HISTOGRAM_BINS * sizeof(int32_t)); + for (uint32_t i = 0; i < m_planeSizes[0]; i++) + { + pixelVal = src[i]; + yHist[pixelVal]++; } if (pic->colorSpace != X265_CSP_I400) { /* U Histogram Calculation */ - int32_t *uHist = m_curUVHist[0]; - memset(uHist, 0, HISTOGRAM_BINS * sizeof(int32_t)); - - for (int64_t i = 0; i < m_planeSizes[1]; i++) + int32_t *uHist = m_curYUVHist[1]; + memset(uHist, 0, sizeof(m_curYUVHist[1])); + for (uint32_t i = 0; i < m_planeSizes[1]; i++) { pixelVal = planeU[i]; uHist[pixelVal]++; } /* V Histogram Calculation */ - if (planeCount == 3) + pixelVal = 0; + int32_t *vHist = m_curYUVHist[2]; + memset(vHist, 0, sizeof(m_curYUVHist[2])); + for (uint32_t i = 0; i < m_planeSizes[2]; i++) { - pixelVal = 0; - int32_t *vHist = m_curUVHist[1]; - memset(vHist, 0, HISTOGRAM_BINS * sizeof(int32_t)); - - for (int64_t i = 0; i < m_planeSizes[2]; i++) - { - pixelVal = planeV[i]; - vHist[pixelVal]++; - } - for (int i = 0; i < HISTOGRAM_BINS; i++) - { - m_curMaxUVHist[i] = x265_max(uHist[i], vHist[i]); - } - } - else - { /* in case of bi planar color space */ - memcpy(m_curMaxUVHist, m_curUVHist[0], HISTOGRAM_BINS * sizeof(int32_t)); + pixelVal = planeV[i]; + vHist[pixelVal]++; } } return true; } -void Encoder::computeHistogramSAD(double *maxUVNormalizedSad, double *edgeNormalizedSad, int curPoc) +void Encoder::computeHistogramSAD(double *normalizedMaxUVSad, double *normalizedEdgeSad, int curPoc) { if (curPoc == 0) { /* first frame is scenecut by default no sad computation for the same. */ - *maxUVNormalizedSad = 0.0; - *edgeNormalizedSad = 0.0; + *normalizedMaxUVSad = 0.0; + *normalizedEdgeSad = 0.0; } else { - /* compute sum of absolute difference of normalized histogram bins for maxUV and edge histograms. */ - int32_t edgefreqDiff = 0; - int32_t maxUVfreqDiff = 0; - double edgeProbabilityDiff = 0; + /* compute sum of absolute differences of histogram bins of chroma and luma edge response between the current and prev pictures. */ + int32_t edgeHistSad = 0; + int32_t uHistSad = 0; + int32_t vHistSad = 0; + double normalizedUSad = 0.0; + double normalizedVSad = 0.0; for (int j = 0; j < HISTOGRAM_BINS; j++) { if (j < 2) { - edgefreqDiff = abs(m_curEdgeHist[j] - m_prevEdgeHist[j]); - edgeProbabilityDiff = (double) edgefreqDiff / m_planeSizes[0]; - *edgeNormalizedSad += edgeProbabilityDiff; + edgeHistSad += abs(m_curEdgeHist[j] - m_prevEdgeHist[j]); } - maxUVfreqDiff = abs(m_curMaxUVHist[j] - m_prevMaxUVHist[j]); - *maxUVNormalizedSad += (double)maxUVfreqDiff / m_planeSizes[2]; + uHistSad += abs(m_curYUVHist[1][j] - m_prevYUVHist[1][j]); + vHistSad += abs(m_curYUVHist[2][j] - m_prevYUVHist[2][j]); } + *normalizedEdgeSad = normalizeRange(edgeHistSad, 0, 2 * m_planeSizes[0], 0.0, 1.0); + normalizedUSad = normalizeRange(uHistSad, 0, 2 * m_planeSizes[1], 0.0, 1.0); + normalizedVSad = normalizeRange(vHistSad, 0, 2 * m_planeSizes[2], 0.0, 1.0); + *normalizedMaxUVSad = x265_max(normalizedUSad, normalizedVSad); } /* store histograms of previous frame for reference */ - size_t bufsize = HISTOGRAM_BINS * sizeof(int32_t); - memcpy(m_prevMaxUVHist, m_curMaxUVHist, bufsize); - memcpy(m_prevEdgeHist, m_curEdgeHist, 2 * sizeof(int32_t)); + memcpy(m_prevEdgeHist, m_curEdgeHist, sizeof(m_curEdgeHist)); + memcpy(m_prevYUVHist, m_curYUVHist, sizeof(m_curYUVHist)); +} + +double Encoder::normalizeRange(int32_t value, int32_t minValue, int32_t maxValue, double rangeStart, double rangeEnd) +{ + return (double)(value - minValue) * (rangeEnd - rangeStart) / (maxValue - minValue) + rangeStart; } -void Encoder::findSceneCuts(x265_picture *pic, bool& bDup, double maxUVSad, double edgeSad) +void Encoder::findSceneCuts(x265_picture *pic, bool& bDup, double maxUVSad, double edgeSad, bool& isMaxThres, bool& isHardSC) { + double minEdgeT = m_edgeHistThreshold * MIN_EDGE_FACTOR; + double minChromaT = minEdgeT * SCENECUT_CHROMA_FACTOR; + double maxEdgeT = m_edgeHistThreshold * MAX_EDGE_FACTOR; + double maxChromaT = maxEdgeT * SCENECUT_CHROMA_FACTOR; pic->frameData.bScenecut = false; if (pic->poc == 0) @@ -1544,20 +1548,25 @@ { bDup = true; } - else if (edgeSad > m_edgeHistThreshold && maxUVSad >= m_chromaHistThreshold) + else if (edgeSad < minEdgeT && maxUVSad < minChromaT) + { + pic->frameData.bScenecut = false; + } + else if (edgeSad > maxEdgeT && maxUVSad > maxChromaT) { pic->frameData.bScenecut = true; - bDup = false; + isMaxThres = true; + isHardSC = true; } - else if (edgeSad > m_scaledEdgeThreshold || maxUVSad >= m_scaledChromaThreshold) + else if (edgeSad > m_scaledEdgeThreshold || maxUVSad >= m_scaledChromaThreshold + || (edgeSad > m_edgeHistThreshold && maxUVSad >= m_chromaHistThreshold)) { pic->frameData.bScenecut = true; bDup = false; + if (edgeSad > m_scaledEdgeThreshold || maxUVSad >= m_scaledChromaThreshold) + isHardSC = true; } } - - if (pic->frameData.bScenecut) - x265_log(m_param, X265_LOG_DEBUG, "scene cut at %d \n", pic->poc); } /** @@ -1588,6 +1597,8 @@ bool dontRead = false; bool bdropFrame = false; bool dropflag = false;
View file
x265_3.4.tar.gz/source/encoder/encoder.h -> x265_3.5.tar.gz/source/encoder/encoder.h
Changed
@@ -163,8 +163,11 @@ class ThreadPool; class FrameData; -#define MAX_SCENECUT_THRESHOLD 2.0 +#define MAX_SCENECUT_THRESHOLD 1.0 #define SCENECUT_STRENGTH_FACTOR 2.0 +#define MIN_EDGE_FACTOR 0.5 +#define MAX_EDGE_FACTOR 1.5 +#define SCENECUT_CHROMA_FACTOR 10.0 class Encoder : public x265_encoder { @@ -256,9 +259,8 @@ /* For histogram based scene-cut detection */ pixel* m_edgePic; pixel* m_inputPic[3]; - int32_t m_curUVHist[2][HISTOGRAM_BINS]; - int32_t m_curMaxUVHist[HISTOGRAM_BINS]; - int32_t m_prevMaxUVHist[HISTOGRAM_BINS]; + int32_t m_curYUVHist[3][HISTOGRAM_BINS]; + int32_t m_prevYUVHist[3][HISTOGRAM_BINS]; int32_t m_curEdgeHist[2]; int32_t m_prevEdgeHist[2]; uint32_t m_planeSizes[3]; @@ -373,7 +375,8 @@ bool computeHistograms(x265_picture *pic); void computeHistogramSAD(double *maxUVNormalizedSAD, double *edgeNormalizedSAD, int curPoc); - void findSceneCuts(x265_picture *pic, bool& bDup, double m_maxUVSADVal, double m_edgeSADVal); + double normalizeRange(int32_t value, int32_t minValue, int32_t maxValue, double rangeStart, double rangeEnd); + void findSceneCuts(x265_picture *pic, bool& bDup, double m_maxUVSADVal, double m_edgeSADVal, bool& isMaxThres, bool& isHardSC); void initRefIdx(); void analyseRefIdx(int *numRefIdx);
View file
x265_3.4.tar.gz/source/encoder/frameencoder.cpp -> x265_3.5.tar.gz/source/encoder/frameencoder.cpp
Changed
@@ -47,8 +47,6 @@ m_slicetypeWaitTime = 0; m_activeWorkerCount = 0; m_completionCount = 0; - m_bAllRowsStop = false; - m_vbvResetTriggerRow = -1; m_outStreams = NULL; m_backupStreams = NULL; m_substreamSizes = NULL; @@ -88,6 +86,8 @@ delete[] m_outStreams; delete[] m_backupStreams; X265_FREE(m_sliceBaseRow); + X265_FREE((void*)m_bAllRowsStop); + X265_FREE((void*)m_vbvResetTriggerRow); X265_FREE(m_sliceMaxBlockRow); X265_FREE(m_cuGeoms); X265_FREE(m_ctuGeomMap); @@ -118,6 +118,8 @@ bool ok = !!m_numRows; m_sliceBaseRow = X265_MALLOC(uint32_t, m_param->maxSlices + 1); + m_bAllRowsStop = X265_MALLOC(bool, m_param->maxSlices); + m_vbvResetTriggerRow = X265_MALLOC(int, m_param->maxSlices); ok &= !!m_sliceBaseRow; m_sliceGroupSize = (uint16_t)(m_numRows + m_param->maxSlices - 1) / m_param->maxSlices; uint32_t sliceGroupSizeAccu = (m_numRows << 8) / m_param->maxSlices; @@ -438,8 +440,8 @@ m_stallStartTime = 0; m_completionCount = 0; - m_bAllRowsStop = false; - m_vbvResetTriggerRow = -1; + memset((void*)m_bAllRowsStop, 0, sizeof(bool) * m_param->maxSlices); + memset((void*)m_vbvResetTriggerRow, -1, sizeof(int) * m_param->maxSlices); m_rowSliceTotalBits[0] = 0; m_rowSliceTotalBits[1] = 0; @@ -1469,16 +1471,16 @@ curRow.bufferedEntropy.copyState(rowCoder); curRow.bufferedEntropy.loadContexts(rowCoder); } - if (bFirstRowInSlice && m_vbvResetTriggerRow != intRow) + if (bFirstRowInSlice && m_vbvResetTriggerRow[curRow.sliceId] != intRow) { curEncData.m_rowStat[row].rowQp = curEncData.m_avgQpRc; curEncData.m_rowStat[row].rowQpScale = x265_qp2qScale(curEncData.m_avgQpRc); } FrameData::RCStatCU& cuStat = curEncData.m_cuStat[cuAddr]; - if (m_param->bEnableWavefront && rowInSlice >= col && !bFirstRowInSlice && m_vbvResetTriggerRow != intRow) + if (m_param->bEnableWavefront && rowInSlice >= col && !bFirstRowInSlice && m_vbvResetTriggerRow[curRow.sliceId] != intRow) cuStat.baseQp = curEncData.m_cuStat[cuAddr - numCols + 1].baseQp; - else if (!m_param->bEnableWavefront && !bFirstRowInSlice && m_vbvResetTriggerRow != intRow) + else if (!m_param->bEnableWavefront && !bFirstRowInSlice && m_vbvResetTriggerRow[curRow.sliceId] != intRow) cuStat.baseQp = curEncData.m_rowStat[row - 1].rowQp; else cuStat.baseQp = curEncData.m_rowStat[row].rowQp; @@ -1655,7 +1657,7 @@ x265_log(m_param, X265_LOG_DEBUG, "POC %d row %d - encode restart required for VBV, to %.2f from %.2f\n", m_frame->m_poc, row, qpBase, curEncData.m_cuStat[cuAddr].baseQp); - m_vbvResetTriggerRow = row; + m_vbvResetTriggerRow[curRow.sliceId] = row; m_outStreams[0].copyBits(&m_backupStreams[0]); rowCoder.copyState(curRow.bufferedEntropy); @@ -1707,8 +1709,8 @@ m_frame->m_poc, row, qpBase, curEncData.m_cuStat[cuAddr].baseQp); // prevent the WaveFront::findJob() method from providing new jobs - m_vbvResetTriggerRow = row; - m_bAllRowsStop = true; + m_vbvResetTriggerRow[curRow.sliceId] = row; + m_bAllRowsStop[curRow.sliceId] = true; for (uint32_t r = m_sliceBaseRow[sliceId + 1] - 1; r >= row; r--) { @@ -1720,7 +1722,7 @@ stopRow.lock.acquire(); while (stopRow.active) { - if (dequeueRow(r * 2)) + if (dequeueRow(m_row_to_idx[r] * 2)) stopRow.active = false; else { @@ -1758,13 +1760,13 @@ curEncData.m_rowStat[r].sumQpAq = 0; } - m_bAllRowsStop = false; + m_bAllRowsStop[curRow.sliceId] = false; } } } if (m_param->bEnableWavefront && curRow.completed >= 2 && !bLastRowInSlice && - (!m_bAllRowsStop || intRow + 1 < m_vbvResetTriggerRow)) + (!m_bAllRowsStop[curRow.sliceId] || intRow + 1 < m_vbvResetTriggerRow[curRow.sliceId])) { /* activate next row */ ScopedLock below(m_rows[row + 1].lock); @@ -1779,7 +1781,7 @@ } ScopedLock self(curRow.lock); - if ((m_bAllRowsStop && intRow > m_vbvResetTriggerRow) || + if ((m_bAllRowsStop[curRow.sliceId] && intRow > m_vbvResetTriggerRow[curRow.sliceId]) || (!bFirstRowInSlice && ((curRow.completed < numCols - 1) || (m_rows[row - 1].completed < numCols)) && m_rows[row - 1].completed < curRow.completed + 2)) { curRow.active = false;
View file
x265_3.4.tar.gz/source/encoder/frameencoder.h -> x265_3.5.tar.gz/source/encoder/frameencoder.h
Changed
@@ -140,9 +140,9 @@ int m_localTldIdx; bool m_reconfigure; /* reconfigure in progress */ volatile bool m_threadActive; - volatile bool m_bAllRowsStop; + volatile bool *m_bAllRowsStop; volatile int m_completionCount; - volatile int m_vbvResetTriggerRow; + volatile int *m_vbvResetTriggerRow; volatile int m_sliceCnt; uint32_t m_numRows;
View file
x265_3.4.tar.gz/source/encoder/ratecontrol.cpp -> x265_3.5.tar.gz/source/encoder/ratecontrol.cpp
Changed
@@ -356,6 +356,8 @@ m_bufferFillFinal = m_bufferSize * m_param->rc.vbvBufferInit; m_bufferFillActual = m_bufferFillFinal; m_bufferExcess = 0; + m_minBufferFill = m_param->minVbvFullness / 100; + m_maxBufferFill = 1 - (m_param->maxVbvFullness / 100); m_initVbv = true; } @@ -580,7 +582,7 @@ double totalQpAq = 0; for (int i = 0; i < m_numEntries; i++) { - RateControlEntry *rce; + RateControlEntry *rce, *rcePocOrder; int frameNumber; int encodeOrder; char picType; @@ -597,13 +599,16 @@ return false; } rce = &m_rce2Pass[encodeOrder]; + rcePocOrder = &m_rce2Pass[frameNumber]; m_encOrder[frameNumber] = encodeOrder; if (!m_param->bMultiPassOptRPS) { - e += sscanf(p, " in:%*d out:%*d type:%c q:%lf q-aq:%lf q-noVbv:%lf q-Rceq:%lf tex:%d mv:%d misc:%d icu:%lf pcu:%lf scu:%lf", + int scenecut = 0; + e += sscanf(p, " in:%*d out:%*d type:%c q:%lf q-aq:%lf q-noVbv:%lf q-Rceq:%lf tex:%d mv:%d misc:%d icu:%lf pcu:%lf scu:%lf sc:%d", &picType, &qpRc, &qpAq, &qNoVbv, &qRceq, &rce->coeffBits, &rce->mvBits, &rce->miscBits, &rce->iCuCount, &rce->pCuCount, - &rce->skipCuCount); + &rce->skipCuCount, &scenecut); + rcePocOrder->scenecut = scenecut != 0; } else { @@ -1311,7 +1316,8 @@ copyRceData(rce, &m_rce2Pass[index]); } rce->isActive = true; - rce->scenecut = false; + if (!m_param->rc.bStatRead) + rce->scenecut = false; rce->isFadeEnd = curFrame->m_lowres.bIsFadeEnd; bool isRefFrameScenecut = m_sliceType!= I_SLICE && m_curSlice->m_refFrameList[0][0]->m_lowres.bScenecut; m_isFirstMiniGop = m_sliceType == I_SLICE ? true : m_isFirstMiniGop; @@ -1751,34 +1757,32 @@ g_sliceTypeToChar[m_sliceType], g_sliceTypeToChar[rce->sliceType]); } } - else + + if ((m_param->bliveVBV2pass && m_param->rc.rateControlMode == X265_RC_ABR) || m_isAbr) { - if (m_isAbr) + int pos = m_sliderPos % s_slidingWindowFrames; + int addPos = (pos + s_slidingWindowFrames - 1) % s_slidingWindowFrames; + if (m_sliderPos > s_slidingWindowFrames) { - int pos = m_sliderPos % s_slidingWindowFrames; - int addPos = (pos + s_slidingWindowFrames - 1) % s_slidingWindowFrames; - if (m_sliderPos > s_slidingWindowFrames) - { - const static double base = pow(0.5, s_slidingWindowFrames - 1); - m_movingAvgSum -= m_lastRemovedSatdCost * base; - m_movingAvgSum *= 0.5; - m_movingAvgSum += m_satdCostWindow[addPos]; - } - else if (m_sliderPos == s_slidingWindowFrames) - { - m_movingAvgSum += m_satdCostWindow[addPos]; - } - else if (m_sliderPos > 0) - { - m_movingAvgSum += m_satdCostWindow[addPos]; - m_movingAvgSum *= 0.5; - } - - rce->movingAvgSum = m_movingAvgSum; - m_lastRemovedSatdCost = m_satdCostWindow[pos]; - m_satdCostWindow[pos] = rce->lastSatd; - m_sliderPos++; + const static double base = pow(0.5, s_slidingWindowFrames - 1); + m_movingAvgSum -= m_lastRemovedSatdCost * base; + m_movingAvgSum *= 0.5; + m_movingAvgSum += m_satdCostWindow[addPos]; + } + else if (m_sliderPos == s_slidingWindowFrames) + { + m_movingAvgSum += m_satdCostWindow[addPos]; + } + else if (m_sliderPos > 0) + { + m_movingAvgSum += m_satdCostWindow[addPos]; + m_movingAvgSum *= 0.5; } + + rce->movingAvgSum = m_movingAvgSum; + m_lastRemovedSatdCost = m_satdCostWindow[pos]; + m_satdCostWindow[pos] = rce->lastSatd; + m_sliderPos++; } if (m_sliceType == B_SLICE) @@ -1856,11 +1860,15 @@ { double lqmin = m_lmin[m_sliceType]; double lqmax = m_lmax[m_sliceType]; - qScale = scenecutAwareQp(curFrame, qScale); + if (m_param->bEnableSceneCutAwareQp & FORWARD) + qScale = forwardMasking(curFrame, qScale); + if (m_param->bEnableSceneCutAwareQp & BACKWARD) + qScale = backwardMasking(curFrame, qScale); qScale = x265_clip3(lqmin, lqmax, qScale); q = x265_qScale2qp(qScale); rce->qpNoVbv = q; } + if (m_isVbv) { lmin = m_lastQScaleFor[P_SLICE] / m_lstep; @@ -1882,7 +1890,7 @@ qScale = x265_clip3(lqmin, lqmax, qScale); } - if (!m_2pass) + if (!m_2pass || m_param->bliveVBV2pass) { /* clip qp to permissible range after vbv-lookahead estimation to avoid possible * mispredictions by initial frame size predictors */ @@ -1950,7 +1958,9 @@ else q /= zone->bitrateFactor; } - q /= x265_clip3(0.5, 2.0, (double)(abrBuffer - diff) / abrBuffer); + /*Existing ABR conformance check may not be valid with real time VBV*/ + if(!m_param->bliveVBV2pass) + q /= x265_clip3(0.5, 2.0, (double)(abrBuffer - diff) / abrBuffer); if (m_expectedBitsSum > 0) { /* Adjust quant based on the difference between @@ -1971,26 +1981,51 @@ m_avgPFrameQp = (m_avgPFrameQp + rce->qpNoVbv) / 2; } + /* Scenecut Aware QP offsets*/ + if (m_param->bEnableSceneCutAwareQp) + { + double qmin = m_lmin[m_sliceType]; + double qmax = m_lmax[m_sliceType]; + + if (m_param->bEnableSceneCutAwareQp & FORWARD) + q = forwardMasking(curFrame, q); + if (m_param->bEnableSceneCutAwareQp & BACKWARD) + q = backwardMasking(curFrame, q); + + q = x265_clip3(qmin, qmax, q); + rce->qpNoVbv = x265_qScale2qp(q); + } + if (m_isVbv) { - /* Do not overflow vbv */ - double expectedSize = qScale2bits(rce, q); - double expectedVbv = m_bufferFill + m_bufferRate - expectedSize; - double expectedFullness = rce->expectedVbv / m_bufferSize; - double qmax = q * (2 - expectedFullness); - double sizeConstraint = 1 + expectedFullness; - qmax = X265_MAX(qmax, rce->newQScale); - if (expectedFullness < .05) - qmax = lmax; - qmax = X265_MIN(qmax, lmax); - while (((expectedVbv < rce->expectedVbv/sizeConstraint) && (q < qmax)) || + if (!m_param->bliveVBV2pass) + { + /* Do not overflow vbv */ + double expectedSize = qScale2bits(rce, q); + double expectedVbv = m_bufferFill + m_bufferRate - expectedSize; + double expectedFullness = rce->expectedVbv / m_bufferSize; + double qmax = q * (2 - expectedFullness); + double sizeConstraint = 1 + expectedFullness; + qmax = X265_MAX(qmax, rce->newQScale); + if (expectedFullness < .05) + qmax = lmax; + qmax = X265_MIN(qmax, lmax); + while (((expectedVbv < rce->expectedVbv / sizeConstraint) && (q < qmax)) || ((expectedVbv < 0) && (q < lmax))) + { + q *= 1.05; + expectedSize = qScale2bits(rce, q); + expectedVbv = m_bufferFill + m_bufferRate - expectedSize; + } + } + else { - q *= 1.05; - expectedSize = qScale2bits(rce, q); - expectedVbv = m_bufferFill + m_bufferRate - expectedSize; + /* clip qp to permissible range after vbv-lookahead estimation to avoid possible
View file
x265_3.4.tar.gz/source/encoder/ratecontrol.h -> x265_3.5.tar.gz/source/encoder/ratecontrol.h
Changed
@@ -47,11 +47,9 @@ #define CLIP_DURATION(f) x265_clip3(MIN_FRAME_DURATION, MAX_FRAME_DURATION, f) /*Scenecut Aware QP*/ -#define I_SLICE_DELTA 2 /* Subtracted from base QP for the scenecut I frames*/ -#define SLICE_TYPE_DELTA 0.3 /* The offset decremented or incremented for P-frames or b-frames respectively*/ -#define WINDOW1_DELTA 0 /* The offset for the frames coming in the window-1*/ -#define WINDOW2_DELTA 0.3 /* The offset for the frames coming in the window-2*/ -#define WINDOW3_DELTA 0.6 /* The offset for the frames coming in the window-3*/ +#define WINDOW1_DELTA 1.0 /* The offset for the frames coming in the window-1*/ +#define WINDOW2_DELTA 0.7 /* The offset for the frames coming in the window-2*/ +#define WINDOW3_DELTA 0.4 /* The offset for the frames coming in the window-3*/ struct Predictor { @@ -166,6 +164,8 @@ double m_avgPFrameQp; double m_bufferFillActual; double m_bufferExcess; + double m_minBufferFill; + double m_maxBufferFill; bool m_isFirstMiniGop; Predictor m_pred[4]; /* Slice predictors to preidct bits for each Slice type - I,P,Bref and B */ int64_t m_leadingNoBSatd; @@ -271,7 +271,8 @@ int writeRateControlFrameStats(Frame* curFrame, RateControlEntry* rce); bool initPass2(); - double scenecutAwareQp(Frame* curFrame, double q); + double forwardMasking(Frame* curFrame, double q); + double backwardMasking(Frame* curFrame, double q); protected:
View file
x265_3.4.tar.gz/source/encoder/slicetype.cpp -> x265_3.5.tar.gz/source/encoder/slicetype.cpp
Changed
@@ -1497,14 +1497,15 @@ } } - if (m_lastNonB && !m_param->rc.bStatRead && + if (m_lastNonB && ((m_param->bFrameAdaptive && m_param->bframes) || m_param->rc.cuTree || m_param->scenecutThreshold || m_param->bHistBasedSceneCut || (m_param->lookaheadDepth && m_param->rc.vbvBufferSize))) { - slicetypeAnalyse(frames, false); + if(!m_param->rc.bStatRead) + slicetypeAnalyse(frames, false); bool bIsVbv = m_param->rc.vbvBufferSize > 0 && m_param->rc.vbvMaxBitrate > 0; - if (m_param->analysisLoad && m_param->scaleFactor && bIsVbv) + if ((m_param->analysisLoad && m_param->scaleFactor && bIsVbv) || m_param->bliveVBV2pass) { int numFrames; for (numFrames = 0; numFrames < maxSearch; numFrames++) @@ -1513,13 +1514,14 @@ if (!fenc) break; } - vbvLookahead(frames, numFrames, true); + vbvLookahead(frames, numFrames, false); } } int bframes, brefs; if (!m_param->analysisLoad || m_param->bAnalysisType == HEVC_INFO) { + bool isClosedGopRadl = m_param->radl && (m_param->keyframeMax != m_param->keyframeMin); for (bframes = 0, brefs = 0;; bframes++) { Lowres& frm = list[bframes]->m_lowres; @@ -1579,6 +1581,15 @@ else frm.sliceType = X265_TYPE_IDR; } + if (frm.sliceType == X265_TYPE_IDR && frm.bScenecut && isClosedGopRadl) + { + if (!m_param->bHistBasedSceneCut || (m_param->bHistBasedSceneCut && frm.m_bIsHardScenecut)) + { + for (int i = bframes; i < bframes + m_param->radl; i++) + list[i]->m_lowres.sliceType = X265_TYPE_B; + list[(bframes + m_param->radl)]->m_lowres.sliceType = X265_TYPE_IDR; + } + } if (frm.sliceType == X265_TYPE_IDR) { /* Closed GOP */ @@ -1739,7 +1750,7 @@ } } - bool isKeyFrameAnalyse = (m_param->rc.cuTree || (m_param->rc.vbvBufferSize && m_param->lookaheadDepth)) && !m_param->rc.bStatRead; + bool isKeyFrameAnalyse = (m_param->rc.cuTree || (m_param->rc.vbvBufferSize && m_param->lookaheadDepth)); if (isKeyFrameAnalyse && IS_X265_TYPE_I(m_lastNonB->sliceType)) { m_inputLock.acquire(); @@ -1754,9 +1765,10 @@ m_inputLock.release(); frames[j + 1] = NULL; - slicetypeAnalyse(frames, true); + if (!m_param->rc.bStatRead) + slicetypeAnalyse(frames, true); bool bIsVbv = m_param->rc.vbvBufferSize > 0 && m_param->rc.vbvMaxBitrate > 0; - if (m_param->analysisLoad && m_param->scaleFactor && bIsVbv) + if ((m_param->analysisLoad && m_param->scaleFactor && bIsVbv) || m_param->bliveVBV2pass) { int numFrames; for (numFrames = 0; numFrames < maxSearch; numFrames++) @@ -1774,7 +1786,7 @@ void Lookahead::vbvLookahead(Lowres **frames, int numFrames, int keyframe) { int prevNonB = 0, curNonB = 1, idx = 0; - while (curNonB < numFrames && frames[curNonB]->sliceType == X265_TYPE_B) + while (curNonB < numFrames && IS_X265_TYPE_B(frames[curNonB]->sliceType)) curNonB++; int nextNonB = keyframe ? prevNonB : curNonB; int nextB = prevNonB + 1; @@ -1841,7 +1853,7 @@ } prevNonB = curNonB; curNonB++; - while (curNonB <= numFrames && frames[curNonB]->sliceType == X265_TYPE_B) + while (curNonB <= numFrames && IS_X265_TYPE_B(frames[curNonB]->sliceType)) curNonB++; } @@ -2001,10 +2013,41 @@ int numAnalyzed = numFrames; bool isScenecut = false; - /* When scenecut threshold is set, use scenecut detection for I frame placements */ + /* Temporal computations for scenecut detection */ if (m_param->bHistBasedSceneCut) - isScenecut = frames[1]->bScenecut; - else + { + for (int i = numFrames - 1; i > 0; i--) + { + if (frames[i]->interPCostPercDiff > 0.0) + continue; + int64_t interCost = frames[i]->costEst[1][0]; + int64_t intraCost = frames[i]->costEst[0][0]; + if (interCost < 0 || intraCost < 0) + continue; + int times = 0; + double averagePcost = 0.0, averageIcost = 0.0; + for (int j = i - 1; j >= 0 && times < 5; j--, times++) + { + if (frames[j]->costEst[0][0] > 0 && frames[j]->costEst[1][0] > 0) + { + averageIcost += frames[j]->costEst[0][0]; + averagePcost += frames[j]->costEst[1][0]; + } + else + times--; + } + if (times) + { + averageIcost = averageIcost / times; + averagePcost = averagePcost / times; + frames[i]->interPCostPercDiff = abs(interCost - averagePcost) / X265_MIN(interCost, averagePcost) * 100; + frames[i]->intraCostPercDiff = abs(intraCost - averageIcost) / X265_MIN(intraCost, averageIcost) * 100; + } + } + } + + /* When scenecut threshold is set, use scenecut detection for I frame placements */ + if (!m_param->bHistBasedSceneCut || (m_param->bHistBasedSceneCut && frames[1]->bScenecut)) isScenecut = scenecut(frames, 0, 1, true, origNumFrames); if (isScenecut && (m_param->bHistBasedSceneCut || m_param->scenecutThreshold)) @@ -2018,17 +2061,16 @@ m_extendGopBoundary = false; for (int i = m_param->bframes + 1; i < origNumFrames; i += m_param->bframes + 1) { - if (!m_param->bHistBasedSceneCut) + if (!m_param->bHistBasedSceneCut || (m_param->bHistBasedSceneCut && frames[i + 1]->bScenecut)) scenecut(frames, i, i + 1, true, origNumFrames); for (int j = i + 1; j <= X265_MIN(i + m_param->bframes + 1, origNumFrames); j++) { - if ((!m_param->bHistBasedSceneCut && frames[j]->bScenecut && scenecutInternal(frames, j - 1, j, true)) || - (m_param->bHistBasedSceneCut && frames[j]->bScenecut)) - { - m_extendGopBoundary = true; - break; - } + if (frames[j]->bScenecut && scenecutInternal(frames, j - 1, j, true)) + { + m_extendGopBoundary = true; + break; + } } if (m_extendGopBoundary) break; @@ -2117,7 +2159,7 @@ } int zoneRadl = m_param->rc.zonefileCount && m_param->bResetZoneConfig ? m_param->rc.zones->zoneParam->radl : 0; - bool bForceRADL = (m_param->radl || zoneRadl) && !m_param->bOpenGOP; + bool bForceRADL = zoneRadl || (m_param->radl && (m_param->keyframeMax == m_param->keyframeMin)); bool bLastMiniGop = (framecnt >= m_param->bframes + 1) ? false : true; int radl = m_param->radl ? m_param->radl : zoneRadl; int preRADL = m_lastKeyframe + m_param->keyframeMax - radl - 1; /*Frame preceeding RADL in POC order*/ @@ -2133,14 +2175,15 @@ { for (int j = 1; j < numBFrames + 1; j++) { - if ((!m_param->bHistBasedSceneCut && scenecut(frames, j, j + 1, false, origNumFrames)) || - (m_param->bHistBasedSceneCut && frames[j + 1]->bScenecut) || - (bForceRADL && (frames[j]->frameNum == preRADL))) - { - frames[j]->sliceType = X265_TYPE_P; - numAnalyzed = j; - break; - } + bool isNextScenecut = false; + if (!m_param->bHistBasedSceneCut || (m_param->bHistBasedSceneCut && frames[j + 1]->bScenecut)) + isNextScenecut = scenecut(frames, j, j + 1, false, origNumFrames); + if (isNextScenecut || (bForceRADL && frames[j]->frameNum == preRADL)) + { + frames[j]->sliceType = X265_TYPE_P; + numAnalyzed = j; + break; + } } } resetStart = bKeyframe ? 1 : X265_MIN(numBFrames + 2, numAnalyzed + 1); @@ -2203,7 +2246,7 @@ * and not considered a scenecut. */ for (int cp1 = p1; cp1 <= maxp1; cp1++) { - if (!scenecutInternal(frames, p0, cp1, false)) + if (!scenecutInternal(frames, p0, cp1, false) && !m_param->bHistBasedSceneCut) {
View file
x265_3.4.tar.gz/source/encoder/slicetype.h -> x265_3.5.tar.gz/source/encoder/slicetype.h
Changed
@@ -42,6 +42,7 @@ #define LOWRES_COST_SHIFT 14 #define AQ_EDGE_BIAS 0.5 #define EDGE_INCLINATION 45 +#define TEMPORAL_SCENECUT_THRESHOLD 50 #if HIGH_BIT_DEPTH #define EDGE_THRESHOLD 1023.0
View file
x265_3.5.tar.gz/source/input
Added
+(directory)
View file
x265_3.5.tar.gz/source/output
Added
+(directory)
View file
x265_3.5.tar.gz/source/profile
Added
+(directory)
View file
x265_3.5.tar.gz/source/profile/PPA
Added
+(directory)
View file
x265_3.5.tar.gz/source/profile/vtune
Added
+(directory)
View file
x265_3.5.tar.gz/source/test
Added
+(directory)
View file
x265_3.4.tar.gz/source/test/rate-control-tests.txt -> x265_3.5.tar.gz/source/test/rate-control-tests.txt
Changed
@@ -44,6 +44,9 @@ RaceHorses_416x240_30_10bit.yuv,--preset medium --crf 26 --vbv-maxrate 1000 --vbv-bufsize 1000 --pass 1::--preset fast --bitrate 1000 --vbv-maxrate 1000 --vbv-bufsize 700 --pass 3 -F4::--preset slow --bitrate 500 --vbv-maxrate 500 --vbv-bufsize 700 --pass 2 -F4 sita_1920x1080_30.yuv, --preset ultrafast --crf 20 --no-cutree --keyint 50 --min-keyint 50 --no-open-gop --pass 1 --vbv-bufsize 7000 --vbv-maxrate 5000:: --preset ultrafast --crf 20 --no-cutree --keyint 50 --min-keyint 50 --no-open-gop --pass 2 --vbv-bufsize 7000 --vbv-maxrate 5000 --repeat-headers sita_1920x1080_30.yuv, --preset medium --crf 20 --no-cutree --keyint 50 --min-keyint 50 --no-open-gop --pass 1 --vbv-bufsize 7000 --vbv-maxrate 5000 --repeat-headers --multi-pass-opt-rps:: --preset medium --crf 20 --no-cutree --keyint 50 --min-keyint 50 --no-open-gop --pass 2 --vbv-bufsize 7000 --vbv-maxrate 5000 --repeat-headers --multi-pass-opt-rps +sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp 1 +sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --hist-scenecut --pass 1::--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --hist-scenecut --pass 2 --scenecut-aware-qp 3 --masking-strength 300,-1,7,100,2,3 +sintel_trailer_2k_1920x1080_24.yuv,--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 1::--preset medium --bitrate 6000 --no-cutree --aq-mode 0 --pass 2 --scenecut-aware-qp 2 --masking-strength 100,-1,-1 # multi-pass rate control and analysis ducks_take_off_1080p50.y4m,--bitrate 6000 --pass 1 --multi-pass-opt-analysis --hash 1 --ssim --psnr:: --bitrate 6000 --pass 2 --multi-pass-opt-analysis --hash 1 --ssim --psnr
View file
x265_3.4.tar.gz/source/test/regression-tests.txt -> x265_3.5.tar.gz/source/test/regression-tests.txt
Changed
@@ -158,7 +158,6 @@ ducks_take_off_420_1_720p50.y4m,--preset medium --selective-sao 4 --sao --crf 20 Traffic_4096x2048_30p.y4m, --preset medium --frame-dup --dup-threshold 60 --hrd --bitrate 10000 --vbv-bufsize 15000 --vbv-maxrate 12000 Kimono1_1920x1080_24_400.yuv,--preset superfast --qp 28 --zones 0,139,q=32 -Island_960x540_24.yuv,--no-cutree --aq-mode 0 --bitrate 6000 --scenecut-aware-qp sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut --hist-threshold 0.02 --frame-dup --dup-threshold 60 --hrd --bitrate 10000 --vbv-bufsize 15000 --vbv-maxrate 12000 sintel_trailer_2k_1920x1080_24.yuv, --preset medium --hist-scenecut --hist-threshold 0.02 sintel_trailer_2k_1920x1080_24.yuv, --preset ultrafast --hist-scenecut --hist-threshold 0.02
View file
x265_3.4.tar.gz/source/x265.cpp -> x265_3.5.tar.gz/source/x265.cpp
Changed
@@ -46,9 +46,11 @@ using namespace X265_NS; #define X265_HEAD_ENTRIES 3 +#define CONSOLE_TITLE_SIZE 200 #ifdef _WIN32 #define strdup _strdup +static char orgConsoleTitle[CONSOLE_TITLE_SIZE] = ""; #endif #ifdef _WIN32
View file
x265_3.4.tar.gz/source/x265.h -> x265_3.5.tar.gz/source/x265.h
Changed
@@ -204,6 +204,9 @@ }x265_analysis_distortion_data; #define MAX_NUM_REF 16 +#define EDGE_BINS 2 +#define MAX_HIST_BINS 1024 + /* Stores all analysis data for a single frame */ typedef struct x265_analysis_data { @@ -214,6 +217,8 @@ uint32_t numCUsInFrame; uint32_t numPartitions; uint32_t depthBytes; + int32_t edgeHist[EDGE_BINS]; + int32_t yuvHist[3][MAX_HIST_BINS]; int bScenecut; x265_weight_param* wt; x265_analysis_inter_data* interData; @@ -602,6 +607,13 @@ #define X265_ANALYSIS_SAVE 1 #define X265_ANALYSIS_LOAD 2 +#define FORWARD 1 +#define BACKWARD 2 +#define BI_DIRECTIONAL 3 +#define SLICE_TYPE_DELTA 0.3 /* The offset decremented or incremented for P-frames or b-frames respectively*/ +#define BACKWARD_WINDOW 1 /* Scenecut window before a scenecut */ +#define FORWARD_WINDOW 2 /* Scenecut window after a scenecut */ + typedef struct x265_cli_csp { int planes; @@ -1838,24 +1850,29 @@ Default 1 (Enabled). API only. */ int bResetZoneConfig; - /* Enables a ratecontrol algorithm for reducing the bits spent on the inter-frames - * within the scenecutWindow after a scenecut by increasing their QP without - * any deterioration in visual quality. It also increases the quality of scenecut I-Frames by reducing their QP. - * Default is disabled. */ + /* It reduces the bits spent on the inter-frames within the scenecutWindow before and / or after a scenecut + * by increasing their QP in ratecontrol pass2 algorithm without any deterioration in visual quality. + * 0 - Disabled (default). + * 1 - Forward masking. + * 2 - Backward masking. + * 3 - Bi-directional masking. */ int bEnableSceneCutAwareQp; /* The duration(in milliseconds) for which there is a reduction in the bits spent on the inter-frames after a scenecut - * by increasing their QP, when bEnableSceneCutAwareQp is set. Default is 500ms.*/ - int scenecutWindow; + * by increasing their QP, when bEnableSceneCutAwareQp is 1 or 3. Default is 500ms.*/ + int fwdScenecutWindow; - /* The offset by which QP is incremented for inter-frames when bEnableSceneCutAwareQp is set. + /* The offset by which QP is incremented for inter-frames after a scenecut when bEnableSceneCutAwareQp is 1 or 3. * Default is +5. */ - int maxQpDelta; + double fwdRefQpDelta; + + /* The offset by which QP is incremented for non-referenced inter-frames after a scenecut when bEnableSceneCutAwareQp is 1 or 3. */ + double fwdNonRefQpDelta; /* A genuine threshold used for histogram based scene cut detection. * This threshold determines whether a frame is a scenecut or not * when compared against the edge and chroma histogram sad values. - * Default 0.01. Range: Real number in the interval (0,2). */ + * Default 0.03. Range: Real number in the interval (0,1). */ double edgeTransitionThreshold; /* Enables histogram based scenecut detection algorithm to detect scenecuts. Default disabled */ @@ -1909,6 +1926,28 @@ /* Maxrate that could be signaled to the decoder. Default 0. API only. */ int decoderVbvMaxRate; + + /*Enables Qp tuning with respect to real time VBV buffer fullness in rate + control 2 pass. Experimental.Default is disabled*/ + int bliveVBV2pass; + + /* Minimum VBV fullness to be maintained. Default 50. Keep the buffer + * at least 50% full */ + double minVbvFullness; + + /* Maximum VBV fullness to be maintained. Default 80. Keep the buffer + * at max 80% full */ + double maxVbvFullness; + + /* The duration(in milliseconds) for which there is a reduction in the bits spent on the inter-frames before a scenecut + * by increasing their QP, when bEnableSceneCutAwareQp is 2 or 3. Default is 100ms.*/ + int bwdScenecutWindow; + + /* The offset by which QP is incremented for inter-frames before a scenecut when bEnableSceneCutAwareQp is 2 or 3. */ + double bwdRefQpDelta; + + /* The offset by which QP is incremented for non-referenced inter-frames before a scenecut when bEnableSceneCutAwareQp is 2 or 3. */ + double bwdNonRefQpDelta; } x265_param; /* x265_param_alloc:
View file
x265_3.4.tar.gz/source/x265cli.cpp -> x265_3.5.tar.gz/source/x265cli.cpp
Changed
@@ -127,9 +127,8 @@ H0(" --[no-]ssim-rd Enable ssim rate distortion optimization, 0 to disable. Default %s\n", OPT(param->bSsimRd)); H0(" --[no-]rd-refine Enable QP based RD refinement for rd levels 5 and 6. Default %s\n", OPT(param->bEnableRdRefine)); H0(" --[no-]early-skip Enable early SKIP detection. Default %s\n", OPT(param->bEnableEarlySkip)); - H0(" --rskip <mode> Set mode for early exit from recursion. Mode 1: exit using rdcost & CU homogenity. Mode 2: exit using CU edge density.\n" - " Mode 0: disabled. Default %d\n", param->recursionSkipMode); - H1(" --rskip-edge-threshold Threshold in terms of percentage (integer of range [0,100]) for minimum edge density in CUs used to prun the recursion depth. Applicable only for rskip mode 2. Value is preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f); + H0(" --rskip <Integer> Enable recursion skip for early exit from CTU analysis during inter prediction. 1: exit using RD cost & CU homogeneity. 2: exit using CU edge density. 0: disabled. Default %d\n", param->recursionSkipMode); + H1(" --rskip-edge-threshold Threshold in terms of percentage (an integer of range [0,100]) for minimum edge density in CU's used to prune the recursion depth. Applicable only to rskip mode 2. Value is preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f); H1(" --[no-]tskip-fast Enable fast intra transform skipping. Default %s\n", OPT(param->bEnableTSkipFast)); H1(" --[no-]splitrd-skip Enable skipping split RD analysis when sum of split CU rdCost larger than one split CU rdCost for Intra CU. Default %s\n", OPT(param->bEnableSplitRdSkip)); H1(" --nr-intra <integer> An integer value in range of 0 to 2000, which denotes strength of noise reduction in intra CUs. Default 0\n"); @@ -175,11 +174,14 @@ H1(" --scenecut-bias <0..100.0> Bias for scenecut detection. Default %.2f\n", param->scenecutBias); H0(" --hist-scenecut Enables histogram based scene-cut detection using histogram based algorithm.\n"); H0(" --no-hist-scenecut Disables histogram based scene-cut detection using histogram based algorithm.\n"); - H1(" --hist-threshold <0.0..2.0> Luma Edge histogram's Normalized SAD threshold for histogram based scenecut detection Default %.2f\n", param->edgeTransitionThreshold); + H1(" --hist-threshold <0.0..1.0> Luma Edge histogram's Normalized SAD threshold for histogram based scenecut detection Default %.2f\n", param->edgeTransitionThreshold); H0(" --[no-]fades Enable detection and handling of fade-in regions. Default %s\n", OPT(param->bEnableFades)); - H1(" --[no-]scenecut-aware-qp Enable increasing QP for frames inside the scenecut window after scenecut. Default %s\n", OPT(param->bEnableSceneCutAwareQp)); - H1(" --scenecut-window <0..1000> QP incremental duration(in milliseconds) when scenecut-aware-qp is enabled. Default %d\n", param->scenecutWindow); - H1(" --max-qp-delta <0..10> QP offset to increment with base QP for inter-frames. Default %d\n", param->maxQpDelta); + H1(" --scenecut-aware-qp <0..3> Enable increasing QP for frames inside the scenecut window around scenecut. Default %s\n", OPT(param->bEnableSceneCutAwareQp)); + H1(" 0 - Disabled\n"); + H1(" 1 - Forward masking\n"); + H1(" 2 - Backward masking\n"); + H1(" 3 - Bidirectional masking\n"); + H1(" --masking-strength <string> Comma separated values which specify the duration and offset for the QP increment for inter-frames when scenecut-aware-qp is enabled.\n"); H0(" --radl <integer> Number of RADL pictures allowed in front of IDR. Default %d\n", param->radl); H0(" --intra-refresh Use Periodic Intra Refresh instead of IDR frames\n"); H0(" --rc-lookahead <integer> Number of frames for frame-type lookahead (determines encoder latency) Default %d\n", param->lookaheadDepth); @@ -211,6 +213,8 @@ H0(" --vbv-bufsize <integer> Set size of the VBV buffer (kbit). Default %d\n", param->rc.vbvBufferSize); H0(" --vbv-init <float> Initial VBV buffer occupancy (fraction of bufsize or in kbits). Default %.2f\n", param->rc.vbvBufferInit); H0(" --vbv-end <float> Final VBV buffer emptiness (fraction of bufsize or in kbits). Default 0 (disabled)\n"); + H0(" --min-vbv-fullness <double> Minimum VBV fullness percentage to be maintained. Default %.2f\n", param->minVbvFullness); + H0(" --max-vbv-fullness <double> Maximum VBV fullness percentage to be maintained. Default %.2f\n", param->maxVbvFullness); H0(" --vbv-end-fr-adj <float> Frame from which qp has to be adjusted to achieve final decode buffer emptiness. Default 0\n"); H0(" --chunk-start <integer> First frame of the chunk. Default 0 (disabled)\n"); H0(" --chunk-end <integer> Last frame of the chunk. Default 0 (disabled)\n"); @@ -220,6 +224,7 @@ " - 3 : Nth pass, overwrites stats file\n"); H0(" --[no-]multi-pass-opt-analysis Refine analysis in 2 pass based on analysis information from pass 1\n"); H0(" --[no-]multi-pass-opt-distortion Use distortion of CTU from pass 1 to refine qp in 2 pass\n"); + H0(" --[no-]vbv-live-multi-pass Enable realtime VBV in rate control 2 pass.Default %s\n", OPT(param->bliveVBV2pass)); H0(" --stats Filename for stats file in multipass pass rate control. Default x265_2pass.log\n"); H0(" --[no-]analyze-src-pics Motion estimation uses source frame planes. Default disable\n"); H0(" --[no-]slow-firstpass Enable a slow first pass in a multipass rate control mode. Default %s\n", OPT(param->rc.bEnableSlowFirstPass)); @@ -295,16 +300,16 @@ H0(" 5=40:33, 6=24:11, 7=20:11, 8=32:11, 9=80:33, 10=18:11, 11=15:11,\n"); H0(" 12=64:33, 13=160:99, 14=4:3, 15=3:2, 16=2:1 or custom ratio of <int:int>. Default %d\n", param->vui.aspectRatioIdc); H1(" --display-window <string> Describe overscan cropping region as 'left,top,right,bottom' in pixels\n"); - H1(" --overscan <string> Specify whether it is appropriate for decoder to show cropped region: undef, show or crop. Default undef\n"); - H0(" --videoformat <string> Specify video format from undef, component, pal, ntsc, secam, mac. Default undef\n"); + H1(" --overscan <string> Specify whether it is appropriate for decoder to show cropped region: unknown, show or crop. Default unknown\n"); + H0(" --videoformat <string> Specify video format from unknown, component, pal, ntsc, secam, mac. Default unknown\n"); H0(" --range <string> Specify black level and range of luma and chroma signals as full or limited Default limited\n"); H0(" --colorprim <string> Specify color primaries from bt709, unknown, reserved, bt470m, bt470bg, smpte170m,\n"); - H0(" smpte240m, film, bt2020, smpte428, smpte431, smpte432. Default undef\n"); + H0(" smpte240m, film, bt2020, smpte428, smpte431, smpte432. Default unknown\n"); H0(" --transfer <string> Specify transfer characteristics from bt709, unknown, reserved, bt470m, bt470bg, smpte170m,\n"); H0(" smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1,\n"); - H0(" bt2020-10, bt2020-12, smpte2084, smpte428, arib-std-b67. Default undef\n"); - H1(" --colormatrix <string> Specify color matrix setting from undef, bt709, fcc, bt470bg, smpte170m,\n"); - H1(" smpte240m, GBR, YCgCo, bt2020nc, bt2020c, smpte2085, chroma-derived-nc, chroma-derived-c, ictcp. Default undef\n"); + H0(" bt2020-10, bt2020-12, smpte2084, smpte428, arib-std-b67. Default unknown\n"); + H1(" --colormatrix <string> Specify color matrix setting from unknown, bt709, fcc, bt470bg, smpte170m,\n"); + H1(" smpte240m, gbr, ycgco, bt2020nc, bt2020c, smpte2085, chroma-derived-nc, chroma-derived-c, ictcp. Default unknown\n"); H1(" --chromaloc <integer> Specify chroma sample location (0 to 5). Default of %d\n", param->vui.chromaSampleLocTypeTopField); H0(" --master-display <string> SMPTE ST 2086 master display color volume info SEI (HDR)\n"); H0(" format: G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)\n");
View file
x265_3.4.tar.gz/source/x265cli.h -> x265_3.5.tar.gz/source/x265cli.h
Changed
@@ -33,11 +33,9 @@ #include <getopt.h> -#define CONSOLE_TITLE_SIZE 200 #ifdef _WIN32 #include <windows.h> #define SetThreadExecutionState(es) -static char orgConsoleTitle[CONSOLE_TITLE_SIZE] = ""; #else #define GetConsoleTitle(t, n) #define SetConsoleTitle(t) @@ -148,10 +146,8 @@ { "hist-threshold", required_argument, NULL, 0}, { "fades", no_argument, NULL, 0 }, { "no-fades", no_argument, NULL, 0 }, - { "scenecut-aware-qp", no_argument, NULL, 0 }, - { "no-scenecut-aware-qp", no_argument, NULL, 0 }, - { "scenecut-window",required_argument, NULL, 0 }, - { "max-qp-delta", required_argument, NULL, 0 }, + { "scenecut-aware-qp", required_argument, NULL, 0 }, + { "masking-strength", required_argument, NULL, 0 }, { "radl", required_argument, NULL, 0 }, { "ctu-info", required_argument, NULL, 0 }, { "intra-refresh", no_argument, NULL, 0 }, @@ -283,6 +279,8 @@ { "no-multi-pass-opt-analysis", no_argument, NULL, 0 }, { "multi-pass-opt-distortion", no_argument, NULL, 0 }, { "no-multi-pass-opt-distortion", no_argument, NULL, 0 }, + { "vbv-live-multi-pass", no_argument, NULL, 0 }, + { "no-vbv-live-multi-pass", no_argument, NULL, 0 }, { "slow-firstpass", no_argument, NULL, 0 }, { "no-slow-firstpass", no_argument, NULL, 0 }, { "multi-pass-opt-rps", no_argument, NULL, 0 }, @@ -373,6 +371,8 @@ { "no-cll", no_argument, NULL, 0 }, { "hme-range", required_argument, NULL, 0 }, { "abr-ladder", required_argument, NULL, 0 }, + { "min-vbv-fullness", required_argument, NULL, 0 }, + { "max-vbv-fullness", required_argument, NULL, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
View file
x265_3.5.tar.gz/x265Version.txt
Added
@@ -0,0 +1,4 @@ +#Attribute: Values +repositorychangeset: f0c1022b6 +releasetagdistance: 1 +releasetag: 3.5
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.