[Ffmpeg-cvslog] r6834 - in trunk/libavcodec: cabac.h h264.c

diego subversion
Sun Oct 29 14:14:38 CET 2006


Author: diego
Date: Sun Oct 29 14:14:37 2006
New Revision: 6834

Modified:
   trunk/libavcodec/cabac.h
   trunk/libavcodec/h264.c

Log:
Fix compilation with PIC enabled, BRANCHLESS_GET_CABAC is defined under
!PIC but gets used without a check for !PIC.


Modified: trunk/libavcodec/cabac.h
==============================================================================
--- trunk/libavcodec/cabac.h	(original)
+++ trunk/libavcodec/cabac.h	Sun Oct 29 14:14:37 2006
@@ -683,7 +683,7 @@
 
 //FIXME the x86 code from this file should be moved into i386/h264 or cabac something.c/h (note ill kill you if you move my code away from under my fingers before iam finished with it!)
 //FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard)
-#ifdef ARCH_X86
+#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
 static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){
     void *end= significant_coeff_ctx_base + max_coeff - 1;
     int minusstart= -(int)significant_coeff_ctx_base;
@@ -789,7 +789,7 @@
     );
     return coeff_count;
 }
-#endif
+#endif /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */
 
 /**
  *

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Sun Oct 29 14:14:37 2006
@@ -6139,7 +6139,7 @@
             index[coeff_count++] = last;\
         }
         const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
-#ifdef ARCH_X86
+#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
         coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
     } else {
         coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);




More information about the ffmpeg-cvslog mailing list