[x265] [PATCH 4 of 5] param: keep the total frame count of the input video in param
aarthi at multicorewareinc.com
aarthi at multicorewareinc.com
Fri Jul 11 13:12:59 CEST 2014
# HG changeset patch
# User Aarthi Thirumalai
# Date 1405076561 -19800
# Fri Jul 11 16:32:41 2014 +0530
# Node ID fc4c54e9f2115d49348e104d962c9073f323987e
# Parent 06957605a135b0bdcbf97e9479277d7e72c560c8
param: keep the total frame count of the input video in param.
to be used in 2 pass. In case this is not available, the value can remain as 0.
diff -r 06957605a135 -r fc4c54e9f211 source/CMakeLists.txt
--- a/source/CMakeLists.txt Fri Jul 11 16:25:23 2014 +0530
+++ b/source/CMakeLists.txt Fri Jul 11 16:32:41 2014 +0530
@@ -19,7 +19,7 @@
include(CheckCXXCompilerFlag)
# X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 25)
+set(X265_BUILD 26)
configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
"${PROJECT_BINARY_DIR}/x265.def")
configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r 06957605a135 -r fc4c54e9f211 source/x265.cpp
--- a/source/x265.cpp Fri Jul 11 16:25:23 2014 +0530
+++ b/source/x265.cpp Fri Jul 11 16:32:41 2014 +0530
@@ -642,9 +642,10 @@
}
if (!param->vui.aspectRatioIdc && info.sarWidth && info.sarHeight)
setParamAspectRatio(param, info.sarWidth, info.sarHeight);
-
if (this->framesToBeEncoded == 0 && info.frameCount > (int)seek)
this->framesToBeEncoded = info.frameCount - seek;
+ param->totalFrames = this->framesToBeEncoded;
+
if (param->logLevel >= X265_LOG_INFO)
{
char buf[128];
diff -r 06957605a135 -r fc4c54e9f211 source/x265.h
--- a/source/x265.h Fri Jul 11 16:25:23 2014 +0530
+++ b/source/x265.h Fri Jul 11 16:32:41 2014 +0530
@@ -480,6 +480,12 @@
* maximum is 16 */
int bframes;
+ /* Total Number of frames to be encoded, caclulated from the user input
+ * (--frames) and (--frames-skip). In case, the input is read from a pipe,
+ * this can remain as 0. It is later used in 2 pass RateControl, hence
+ * storing the value in param */
+ int totalFrames;
+
/* When enabled, the encoder will use the B frame in the middle of each
* mini-GOP larger than 2 B frames as a motion reference for the surrounding
* B frames. This improves compression efficiency for a small performance
More information about the x265-devel
mailing list