summaryrefslogtreecommitdiff
path: root/apps/codecs/libcook/bitstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libcook/bitstream.h')
-rw-r--r--apps/codecs/libcook/bitstream.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/apps/codecs/libcook/bitstream.h b/apps/codecs/libcook/bitstream.h
index 085d0a1566..9be8e65690 100644
--- a/apps/codecs/libcook/bitstream.h
+++ b/apps/codecs/libcook/bitstream.h
@@ -18,15 +18,10 @@
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21/** 21#ifndef BITSTREAM_H
22 * @file libavcodec/bitstream.h 22#define BITSTREAM_H
23 * bitstream api header.
24 */
25 23
26#ifndef AVCODEC_BITSTREAM_H 24#include <inttypes.h>
27#define AVCODEC_BITSTREAM_H
28
29#include <stdint.h>
30#include <stdlib.h> 25#include <stdlib.h>
31#include <assert.h> 26#include <assert.h>
32#include <string.h> 27#include <string.h>
@@ -51,7 +46,7 @@
51//#define ALT_BITSTREAM_WRITER 46//#define ALT_BITSTREAM_WRITER
52//#define ALIGNED_BITSTREAM_WRITER 47//#define ALIGNED_BITSTREAM_WRITER
53#if !defined(LIBMPEG2_BITSTREAM_READER) && !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER) 48#if !defined(LIBMPEG2_BITSTREAM_READER) && !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER)
54# if ARCH_ARM 49# if defined(ARCH_ARM)
55# define A32_BITSTREAM_READER 50# define A32_BITSTREAM_READER
56# else 51# else
57# define ALT_BITSTREAM_READER 52# define ALT_BITSTREAM_READER
@@ -62,7 +57,7 @@
62 57
63extern const uint8_t ff_reverse[256]; 58extern const uint8_t ff_reverse[256];
64 59
65#if ARCH_X86 60#if defined(ARCH_X86)
66// avoid +32 for shift optimization (gcc should do that ...) 61// avoid +32 for shift optimization (gcc should do that ...)
67static inline int32_t NEG_SSR32( int32_t a, int8_t s){ 62static inline int32_t NEG_SSR32( int32_t a, int8_t s){
68 __asm__ ("sarl %1, %0\n\t" 63 __asm__ ("sarl %1, %0\n\t"
@@ -226,7 +221,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
226 } else { 221 } else {
227 bit_buf<<=bit_left; 222 bit_buf<<=bit_left;
228 bit_buf |= value >> (n - bit_left); 223 bit_buf |= value >> (n - bit_left);
229#if !HAVE_FAST_UNALIGNED 224#if !defined(HAVE_FAST_UNALIGNED)
230 if (3 & (intptr_t) s->buf_ptr) { 225 if (3 & (intptr_t) s->buf_ptr) {
231 AV_WB32(s->buf_ptr, bit_buf); 226 AV_WB32(s->buf_ptr, bit_buf);
232 } else 227 } else
@@ -736,6 +731,7 @@ static inline unsigned int show_bits_long(GetBitContext *s, int n){
736 } 731 }
737} 732}
738 733
734#if 0
739static inline int check_marker(GetBitContext *s, const char *msg) 735static inline int check_marker(GetBitContext *s, const char *msg)
740{ 736{
741 int bit= get_bits1(s); 737 int bit= get_bits1(s);
@@ -744,6 +740,7 @@ static inline int check_marker(GetBitContext *s, const char *msg)
744 740
745 return bit; 741 return bit;
746} 742}
743#endif
747 744
748/** 745/**
749 * init GetBitContext. 746 * init GetBitContext.
@@ -963,4 +960,4 @@ static inline int decode210(GetBitContext *gb){
963 return 2 - get_bits1(gb); 960 return 2 - get_bits1(gb);
964} 961}
965 962
966#endif /* AVCODEC_BITSTREAM_H */ 963#endif /* BITSTREAM_H */