~ubuntu-branches/ubuntu/intrepid/gstreamer0.10-ffmpeg/intrepid

« back to all changes in this revision

Viewing changes to gst-libs/ext/ffmpeg/libavcodec/bitstream.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-12-13 23:10:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20061213231028-gb7p40u24i5dk331
Tags: 0.10.2-0ubuntu1
* Sync with pkg-gstreamer SVN:
  + debian/rules:
    - Enable the encoders again
* debian/control:
  + Add part about encoders to the description again

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        put_bits(pbc, 8, 0);
48
48
}
49
49
 
50
 
/* bit input functions */
51
 
 
52
 
/**
53
 
 * reads 0-32 bits.
54
 
 */
55
 
unsigned int get_bits_long(GetBitContext *s, int n){
56
 
    if(n<=17) return get_bits(s, n);
57
 
    else{
58
 
        int ret= get_bits(s, 16) << (n-16);
59
 
        return ret | get_bits(s, n-16);
60
 
    }
61
 
}
62
 
 
63
 
/**
64
 
 * shows 0-32 bits.
65
 
 */
66
 
unsigned int show_bits_long(GetBitContext *s, int n){
67
 
    if(n<=17) return show_bits(s, n);
68
 
    else{
69
 
        GetBitContext gb= *s;
70
 
        int ret= get_bits_long(s, n);
71
 
        *s= gb;
72
 
        return ret;
73
 
    }
74
 
}
75
 
 
76
 
void align_get_bits(GetBitContext *s)
77
 
{
78
 
    int n= (-get_bits_count(s)) & 7;
79
 
    if(n) skip_bits(s, n);
80
 
}
81
 
 
82
 
int check_marker(GetBitContext *s, const char *msg)
83
 
{
84
 
    int bit= get_bits1(s);
85
 
    if(!bit)
86
 
            av_log(NULL, AV_LOG_INFO, "Marker bit missing %s\n", msg);
87
 
 
88
 
    return bit;
89
 
}
90
 
 
91
50
/* VLC decoding */
92
51
 
93
52
//#define DEBUG_VLC