[x265] [PATCH] api: use generic names for analysis api

sagar at multicorewareinc.com sagar at multicorewareinc.com
Tue Sep 9 11:38:29 CEST 2014


# HG changeset patch
# User Sagar Kotecha <sagar at multicorewareinc.com>
# Date 1410255489 -19800
#      Tue Sep 09 15:08:09 2014 +0530
# Node ID b72e64e9a1c0e9e96ddfddba72b988896fc3213d
# Parent  e546a7da6d486e1bc6c6da09ce7188a5796dff34
api: use generic names for analysis api

diff -r e546a7da6d48 -r b72e64e9a1c0 source/encoder/api.cpp
--- a/source/encoder/api.cpp	Tue Sep 09 14:26:31 2014 +0530
+++ b/source/encoder/api.cpp	Tue Sep 09 15:08:09 2014 +0530
@@ -197,7 +197,7 @@
     return x265_free(p);
 }
 
-int x265_alloc_inter_intra_data(x265_picture* pic, x265_param* param)
+int x265_alloc_analysis_data(x265_picture* pic, x265_param* param)
 {
     uint32_t numPartitions   = 1 << g_maxFullDepth * 2;
     uint32_t widthInCU       = (param->sourceWidth  + g_maxCUSize - 1) >> g_maxLog2CUSize;
@@ -223,11 +223,11 @@
 
 fail:
     x265_log(NULL, X265_LOG_WARNING, "unable to allocate memory for intra-inter analysis");
-    x265_free_inter_intra_data(pic);
+    x265_free_analysis_data(pic);
     return 0;
 }
 
-void x265_free_inter_intra_data(x265_picture* pic)
+void x265_free_analysis_data(x265_picture* pic)
 {
     if (pic->intraInterData.interData)
         X265_FREE(pic->intraInterData.interData);
diff -r e546a7da6d48 -r b72e64e9a1c0 source/x265.cpp
--- a/source/x265.cpp	Tue Sep 09 14:26:31 2014 +0530
+++ b/source/x265.cpp	Tue Sep 09 15:08:09 2014 +0530
@@ -751,7 +751,7 @@
         if (poc != pic->poc || width != p->sourceWidth || height != p->sourceHeight)
         {
             x265_log(NULL, X265_LOG_WARNING, "Error in reading intra-inter data.\n");
-            x265_free_inter_intra_data(pic);
+            x265_free_analysis_data(pic);
             return;
         }
         if (pic->sliceType == X265_TYPE_I || pic->sliceType == X265_TYPE_IDR)
@@ -768,7 +768,7 @@
     else
     {
         x265_log(NULL, X265_LOG_WARNING, "Error in opening file to read analysis data.\n");
-        x265_free_inter_intra_data(pic);
+        x265_free_analysis_data(pic);
     }
 }
 
@@ -797,7 +797,7 @@
     else
     {
         x265_log(NULL, X265_LOG_WARNING, "Error in opening file to write analysis data.\n");
-        x265_free_inter_intra_data(pic);
+        x265_free_analysis_data(pic);
     }
 }
 
@@ -938,13 +938,13 @@
 
         if ((param->bAnalysisDataIn || param->bAnalysisDataOut) && pic_in)
         {
-            x265_alloc_inter_intra_data(pic_in, param);
+            x265_alloc_analysis_data(pic_in, param);
 
             if (param->bAnalysisDataIn)
                 cliopt.readAnalysisFile(pic_in, param);
         }
         else if (param->bAnalysisDataOut && pic_in)
-            x265_alloc_inter_intra_data(pic_in, param);
+            x265_alloc_analysis_data(pic_in, param);
 
         int numEncoded = x265_encoder_encode(encoder, &p_nal, &nal, pic_in, pic_recon);
         if (numEncoded < 0)
@@ -960,7 +960,7 @@
             {
                 if (pic_recon->intraInterData.interData)
                     cliopt.writeAnalysisFile(pic_recon, param);
-                x265_free_inter_intra_data(pic_recon);
+                x265_free_analysis_data(pic_recon);
             }
         }
 
@@ -983,7 +983,7 @@
             {
                 if (param->bAnalysisDataOut)
                     cliopt.writeAnalysisFile(pic_recon, param);
-                x265_free_inter_intra_data(pic_recon);
+                x265_free_analysis_data(pic_recon);
             }
         }
 
diff -r e546a7da6d48 -r b72e64e9a1c0 source/x265.h
--- a/source/x265.h	Tue Sep 09 14:26:31 2014 +0530
+++ b/source/x265.h	Tue Sep 09 15:08:09 2014 +0530
@@ -671,12 +671,12 @@
      * effect in presets which use RDOQ (rd-levels 4 and 5). Default 0.0 */
     double    psyRdoq;
 
-    /* Write analysis information into x265_picture buffer when x265_inter_intra_data
-       is valid */
+    /* Write analysis information into x265_picture buffer when analysis buffers
+     * are valid */
     int       bAnalysisDataOut;
 
-    /* Read analysis information into x265_picture buffer when x265_inter_intra_data is
-       valid */
+    /* Read analysis information into x265_picture buffer when analysis buffers
+     * are valid */
     int       bAnalysisDataIn;
 
     /*== Coding tools ==*/
@@ -1028,14 +1028,14 @@
  *  allocated by x265_picture_alloc() */
 void x265_picture_free(x265_picture *);
 
-/* x265_alloc_inter_intra_data:
- *  Allocate memory to hold inter-intra meta data, returns 1 on success else 0 */
-int x265_alloc_inter_intra_data(x265_picture*, x265_param*);
+/* x265_alloc_analysis_data:
+ *  Allocate memory to hold analysis meta data, returns 1 on success else 0 */
+int x265_alloc_analysis_data(x265_picture*, x265_param*);
 
-/* x265_free_inter_intra_data:
- *  Use x265_free_inter_intra_data to release storage of x265_interIntraData
-    members allocated by x265_alloc_inter_intra_data */
-void x265_free_inter_intra_data(x265_picture*);
+/* x265_free_analysis_data:
+ *  Use x265_free_analysis_data to release storage of members allocated by
+ *  x265_alloc_analysis_data */
+void x265_free_analysis_data(x265_picture*);
 
 /***
  * Initialize an x265_picture structure to default values. It sets the pixel


More information about the x265-devel mailing list