]> git.sesse.net Git - x264/blobdiff - common/cabac.h
x86: Add asm for mbtree fixed point conversion
[x264] / common / cabac.h
index cec4e51ab3a384bb7a794f63107a4e9ba5dae1fb..cf07254fe95e60e4e581b0f9aad1462d6c09d2a9 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
- * cabac.h: h264 encoder library
+ * cabac.h: arithmetic coder
  *****************************************************************************
- * Copyright (C) 2003-2008 x264 project
+ * Copyright (C) 2003-2016 x264 project
  *
  * Authors: Loren Merritt <lorenm@u.washington.edu>
  *          Laurent Aimar <fenrir@via.ecp.fr>
@@ -19,6 +19,9 @@
  * 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 licensing@x264.com.
  *****************************************************************************/
 
 #ifndef X264_CABAC_H
@@ -42,14 +45,17 @@ typedef struct
     ALIGNED_16( int f8_bits_encoded ); // only if using x264_cabac_size_decision()
 
     /* context */
-    uint8_t state[460];
+    uint8_t state[1024];
+
+    /* for 16-byte alignment */
+    uint8_t padding[12];
 } x264_cabac_t;
 
 extern const uint8_t x264_cabac_transition[128][2];
 extern const uint16_t x264_cabac_entropy[128];
 
 /* init the contexts given i_slice_type, the quantif and the model */
-void x264_cabac_context_init( x264_cabac_t *cb, int i_slice_type, int i_qp, int i_model );
+void x264_cabac_context_init( x264_t *h, x264_cabac_t *cb, int i_slice_type, int i_qp, int i_model );
 
 void x264_cabac_encode_init_core( x264_cabac_t *cb );
 void x264_cabac_encode_init ( x264_cabac_t *cb, uint8_t *p_data, uint8_t *p_end );
@@ -62,7 +68,11 @@ void x264_cabac_encode_terminal_asm( x264_cabac_t *cb );
 void x264_cabac_encode_ue_bypass( x264_cabac_t *cb, int exp_bits, int val );
 void x264_cabac_encode_flush( x264_t *h, x264_cabac_t *cb );
 
-#ifdef HAVE_MMX
+#if HAVE_MMX
+#define x264_cabac_encode_decision x264_cabac_encode_decision_asm
+#define x264_cabac_encode_bypass x264_cabac_encode_bypass_asm
+#define x264_cabac_encode_terminal x264_cabac_encode_terminal_asm
+#elif defined(ARCH_AARCH64)
 #define x264_cabac_encode_decision x264_cabac_encode_decision_asm
 #define x264_cabac_encode_bypass x264_cabac_encode_bypass_asm
 #define x264_cabac_encode_terminal x264_cabac_encode_terminal_asm