~ubuntu-branches/debian/squeeze/gstreamer0.10-ffmpeg/squeeze

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-02-19 18:14:59 UTC
  • mfrom: (4.1.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20100219181459-mect96st3px2jfsi
Tags: 0.10.9.2-1
* New upstream pre-release:
  + debian/patches/03_restricted-caps.patch,
    debian/patches/04_ignore-vdpau.patch:
    - Dropped, merged upstream.
* debian/patches/03_too-new-codec-ids.patch:
  + Disable some ffmpeg codec IDs because Debian's
    ffmpeg is once again too old...

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 * Decode a frame
59
59
 *
60
60
 */
61
 
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
 
61
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
62
62
{
 
63
        const uint8_t *buf = avpkt->data;
 
64
        int buf_size = avpkt->size;
63
65
        EightBpsContext * const c = avctx->priv_data;
64
66
        const unsigned char *encoded = buf;
65
67
        unsigned char *pixptr, *pixptr_end;
157
159
 
158
160
        c->pic.data[0] = NULL;
159
161
 
160
 
    if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
161
 
        return 1;
162
 
    }
163
 
 
164
162
        switch (avctx->bits_per_coded_sample) {
165
163
                case 8:
166
164
                        avctx->pix_fmt = PIX_FMT_PAL8;
181
179
                case 32:
182
180
                        avctx->pix_fmt = PIX_FMT_RGB32;
183
181
                        c->planes = 4;
184
 
#ifdef WORDS_BIGENDIAN
 
182
#if HAVE_BIGENDIAN
185
183
                        c->planemap[0] = 1; // 1st plane is red
186
184
                        c->planemap[1] = 2; // 2nd plane is green
187
185
                        c->planemap[2] = 3; // 3rd plane is blue