[x265] [PATCH 1 of 4] add analysis data structures and param options

sagar at multicorewareinc.com sagar at multicorewareinc.com
Thu Sep 11 15:55:15 CEST 2014


# HG changeset patch
# User Sagar Kotecha <sagar at multicorewareinc.com>
# Date 1410443320 -19800
#      Thu Sep 11 19:18:40 2014 +0530
# Node ID 5524e76b14e4b532925cd094da039fe8fa0d2edc
# Parent  012f315d3eda8044f5a49865e15ba2943fbab094
add analysis data structures and param options

diff -r 012f315d3eda -r 5524e76b14e4 source/x265.h
--- a/source/x265.h	Wed Sep 10 17:27:20 2014 +0200
+++ b/source/x265.h	Thu Sep 11 19:18:40 2014 +0530
@@ -88,6 +88,37 @@
     uint8_t* payload;
 } x265_nal;
 
+/* Used to dump intra-inter analysis data, this data can be used in future calls
+ * of the encoder with diffrent bitrate of the same clip. */
+struct x265_inter_data
+{
+    uint32_t zOrder;
+    int      ref[2];
+    int      costZero[2];
+    int16_t  mvx[2];
+    int16_t  mvy[2];
+    uint8_t  depth;
+    int      poc;
+    uint32_t cuAddr;
+};
+
+struct x265_intra_data
+{
+    uint8_t*  depth;
+    uint8_t*  modes;
+    char*     partSizes;
+    int*      poc;
+    uint32_t* cuAddr;
+};
+
+struct x265_analysis_data
+{
+    x265_inter_data* interData;
+    x265_intra_data* intraData;
+    uint32_t         numCUsInFrame;
+    uint32_t         numPartitions;
+};
+
 /* Used to pass pictures into the encoder, and to get picture data back out of
  * the encoder.  The input and output semantics are different */
 typedef struct x265_picture
@@ -134,6 +165,10 @@
     /* force quantizer for != X265_QP_AUTO */
     int     forceqp;
 
+    /* Holds analysis data when analysisMode and analysisData member pointers
+     * are valid */
+    x265_analysis_data analysisData;
+
     /* new data members to this structure must be added to the end so that
      * users of x265_picture_alloc/free() can be assured of future safety */
 } x265_picture;
@@ -637,6 +672,12 @@
      * effect in presets which use RDOQ (rd-levels 4 and 5). Default 0.0 */
     double    psyRdoq;
 
+    /* If analysisMode = save, write analysis information into analysis buffers.
+     * if analysisMode = load, read analysis information into analysis buffer
+     * and use this analysis information to reduce the amount of work those 
+     * encoder must performs. Default 0 */
+    int       analysisMode;
+
     /*== Coding tools ==*/
 
     /* Enable the implicit signaling of the sign bit of the last coefficient of


More information about the x265-devel mailing list