Revision e69364b7

View differences:

libavcodec/cabac.h
376 376
#define BYTE        "16"
377 377
#define BYTEEND     "20"
378 378
#endif
379
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE)
379
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
380 380
    int bit;
381 381

  
382 382
#ifndef BRANCHLESS_CABAC_DECODER
......
532 532
    );
533 533
    bit&=1;
534 534
#endif /* BRANCHLESS_CABAC_DECODER */
535
#else /* defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) */
535
#else /* defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
536 536
    int s = *state;
537 537
    int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s];
538 538
    int bit, lps_mask attribute_unused;
......
571 571
    if(!(c->low & CABAC_MASK))
572 572
        refill2(c);
573 573
#endif /* BRANCHLESS_CABAC_DECODER */
574
#endif /* defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) */
574
#endif /* defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
575 575
    return bit;
576 576
}
577 577

  
......
680 680

  
681 681
//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!)
682 682
//FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard)
683
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE)
683
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
684 684
static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){
685 685
    void *end= significant_coeff_ctx_base + max_coeff - 1;
686 686
    int minusstart= -(int)significant_coeff_ctx_base;
......
786 786
    );
787 787
    return coeff_count;
788 788
}
789
#endif /* defined(ARCH_X86) && && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) */
789
#endif /* defined(ARCH_X86) && && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS) */
790 790

  
791 791
/**
792 792
 *
libavcodec/h264.c
6111 6111
            index[coeff_count++] = last;\
6112 6112
        }
6113 6113
        const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD];
6114
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE)
6114
#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(HAVE_EBX_AVAILABLE) && !defined(BROKEN_RELOCATIONS)
6115 6115
        coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off);
6116 6116
    } else {
6117 6117
        coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index);
libavutil/x86_cpu.h
61 61
#  define CONFIG_7REGS 1
62 62
#endif
63 63

  
64
#if defined(ARCH_X86_64) && defined(PIC)
65
#  define BROKEN_RELOCATIONS 1
66
#endif
67

  
64 68
#endif /* AVUTIL_X86CPU_H */

Also available in: Unified diff