[x265] [PATCH] stats: add scenecut value for each frame

Divya Manivannan divya at multicorewareinc.com
Thu Aug 27 12:04:53 CEST 2015


# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1440669829 -19800
#      Thu Aug 27 15:33:49 2015 +0530
# Node ID 1147ddda23b93d7698191be48401231be99efb89
# Parent  d8091487bc9749e702c468786b0cd9e663478a91
stats: add scenecut value for each frame

diff -r d8091487bc97 -r 1147ddda23b9 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Tue Aug 25 16:39:12 2015 -0700
+++ b/source/CMakeLists.txt	Thu Aug 27 15:33:49 2015 +0530
@@ -30,7 +30,7 @@
 mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 72)
+set(X265_BUILD 73)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r d8091487bc97 -r 1147ddda23b9 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Tue Aug 25 16:39:12 2015 -0700
+++ b/source/encoder/encoder.cpp	Thu Aug 27 15:33:49 2015 +0530
@@ -1134,6 +1134,7 @@
         frameStats->poc = poc;
         frameStats->qp = curEncData.m_avgQpAq;
         frameStats->bits = bits;
+        frameStats->bScenecut = curFrame->m_lowres.bScenecut;
         if (m_param->rc.rateControlMode == X265_RC_CRF)
             frameStats->rateFactor = curEncData.m_rateFactor;
         frameStats->psnrY = psnrY;
diff -r d8091487bc97 -r 1147ddda23b9 source/x265-extras.cpp
--- a/source/x265-extras.cpp	Tue Aug 25 16:39:12 2015 -0700
+++ b/source/x265-extras.cpp	Thu Aug 27 15:33:49 2015 +0530
@@ -61,7 +61,7 @@
         {
             if (level)
             {
-                fprintf(csvfp, "Encode Order, Type, POC, QP, Bits, ");
+                fprintf(csvfp, "Encode Order, Type, POC, QP, Bits, Scenecut, ");
                 if (param.rc.rateControlMode == X265_RC_CRF)
                     fprintf(csvfp, "RateFactor, ");
                 if (param.bEnablePsnr)
@@ -128,7 +128,7 @@
         return;
 
     const x265_frame_stats* frameStats = &pic.frameData;
-    fprintf(csvfp, "%d, %c-SLICE, %4d, %2.2lf, %10d,", frameStats->encoderOrder, frameStats->sliceType, frameStats->poc, frameStats->qp, (int)frameStats->bits);
+    fprintf(csvfp, "%d, %c-SLICE, %4d, %2.2lf, %10d, %d,", frameStats->encoderOrder, frameStats->sliceType, frameStats->poc, frameStats->qp, (int)frameStats->bits, frameStats->bScenecut);
     if (param.rc.rateControlMode == X265_RC_CRF)
         fprintf(csvfp, "%.3lf,", frameStats->rateFactor);
     if (param.bEnablePsnr)
diff -r d8091487bc97 -r 1147ddda23b9 source/x265.h
--- a/source/x265.h	Tue Aug 25 16:39:12 2015 -0700
+++ b/source/x265.h	Thu Aug 27 15:33:49 2015 +0530
@@ -142,6 +142,7 @@
     int              list1POC[16];
     uint16_t         maxLumaLevel;
     char             sliceType;
+    bool             bScenecut;
     x265_cu_stats    cuStats;
 } x265_frame_stats;
 


More information about the x265-devel mailing list