~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 */
30
30
 
31
31
#include "avcodec.h"
 
32
#include "mathops.h"
32
33
#include "get_bits.h"
33
34
#include "put_bits.h"
34
35
 
46
47
    put_bits(s,s->bit_left & 7,0);
47
48
}
48
49
 
49
 
void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
 
50
void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string)
50
51
{
51
52
    while(*string){
52
53
        put_bits(pb, 8, *string);
114
115
}
115
116
 
116
117
static av_always_inline uint32_t bitswap_32(uint32_t x) {
117
 
    return (uint32_t)av_reverse[x&0xFF]<<24
118
 
         | (uint32_t)av_reverse[(x>>8)&0xFF]<<16
119
 
         | (uint32_t)av_reverse[(x>>16)&0xFF]<<8
120
 
         | (uint32_t)av_reverse[x>>24];
 
118
    return (uint32_t)ff_reverse[x&0xFF]<<24
 
119
         | (uint32_t)ff_reverse[(x>>8)&0xFF]<<16
 
120
         | (uint32_t)ff_reverse[(x>>16)&0xFF]<<8
 
121
         | (uint32_t)ff_reverse[x>>24];
121
122
}
122
123
 
123
124
typedef struct {
168
169
        table[i][0] = -1; //codes
169
170
    }
170
171
 
171
 
    /* first pass: map codes and compute auxillary table sizes */
 
172
    /* first pass: map codes and compute auxiliary table sizes */
172
173
    for (i = 0; i < nb_codes; i++) {
173
174
        n = codes[i].bits;
174
175
        code = codes[i].code;
322
323
{
323
324
    av_freep(&vlc->table);
324
325
}
325