Mercurial > libavcodec.hg
comparison cabac.h @ 4039:866a83726985 libavcodec
Kill a warning with MSVC
Patch by Jindrich Makovicka makovick A gmail P com
Original thread:
Date: 08:21 AM
Subject Re: [Ffmpeg-devel] Weird line in cabac.h
author | gpoirier |
---|---|
date | Wed, 18 Oct 2006 09:37:25 +0000 |
parents | 53be304c7f54 |
children | 9eaea06c5ba6 |
comparison
equal
deleted
inserted
replaced
4038:16697bdf4ac2 | 4039:866a83726985 |
---|---|
31 | 31 |
32 #define CABAC_BITS 16 | 32 #define CABAC_BITS 16 |
33 #define CABAC_MASK ((1<<CABAC_BITS)-1) | 33 #define CABAC_MASK ((1<<CABAC_BITS)-1) |
34 #define BRANCHLESS_CABAC_DECODER 1 | 34 #define BRANCHLESS_CABAC_DECODER 1 |
35 #define CMOV_IS_FAST 1 | 35 #define CMOV_IS_FAST 1 |
36 //#define ARCH_X86_DISABLED 1 | |
36 | 37 |
37 typedef struct CABACContext{ | 38 typedef struct CABACContext{ |
38 int low; | 39 int low; |
39 int range; | 40 int range; |
40 int outstanding_count; | 41 int outstanding_count; |
46 const uint8_t *bytestream_end; | 47 const uint8_t *bytestream_end; |
47 PutBitContext pb; | 48 PutBitContext pb; |
48 }CABACContext; | 49 }CABACContext; |
49 | 50 |
50 extern uint8_t ff_h264_mlps_state[4*64]; | 51 extern uint8_t ff_h264_mlps_state[4*64]; |
51 extern uint8_t ff_h264_lps_range[4][2*64]; ///< rangeTabLPS | 52 extern uint8_t ff_h264_lps_range[4*2*64]; ///< rangeTabLPS |
52 extern uint8_t ff_h264_mps_state[2*64]; ///< transIdxMPS | 53 extern uint8_t ff_h264_mps_state[2*64]; ///< transIdxMPS |
53 extern uint8_t ff_h264_lps_state[2*64]; ///< transIdxLPS | 54 extern uint8_t ff_h264_lps_state[2*64]; ///< transIdxLPS |
54 extern const uint8_t ff_h264_norm_shift[512]; | 55 extern const uint8_t ff_h264_norm_shift[512]; |
55 | 56 |
56 | 57 |
522 ); | 523 ); |
523 bit&=1; | 524 bit&=1; |
524 #endif /* BRANCHLESS_CABAC_DECODER */ | 525 #endif /* BRANCHLESS_CABAC_DECODER */ |
525 #else /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */ | 526 #else /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */ |
526 int s = *state; | 527 int s = *state; |
527 int RangeLPS= ff_h264_lps_range[0][2*(c->range&0xC0) + s]; | 528 int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s]; |
528 int bit, lps_mask attribute_unused; | 529 int bit, lps_mask attribute_unused; |
529 | 530 |
530 c->range -= RangeLPS; | 531 c->range -= RangeLPS; |
531 #ifndef BRANCHLESS_CABAC_DECODER | 532 #ifndef BRANCHLESS_CABAC_DECODER |
532 if(c->low < (c->range<<17)){ | 533 if(c->low < (c->range<<17)){ |