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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-07-30 09:00:15 UTC
  • mfrom: (1.1.16) (7.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130730090015-sc1ou2yssu7q5w4e
Tags: 1.1.3-1
* New upstream development snapshot:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.1.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
    s->avctx = avctx;
60
60
 
61
 
    avctx->pix_fmt = PIX_FMT_PAL8;
 
61
    avctx->pix_fmt = AV_PIX_FMT_PAL8;
62
62
 
63
63
    s->frame.reference = 1;
64
64
 
84
84
 */
85
85
static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
86
86
{
87
 
    int i, x, y;
88
 
    i=0; x=0; y=0;
 
87
    int x = 0, y = 0;
89
88
 
90
89
    while (bytestream2_get_bytes_left(&s->gb) > 0) {
91
90
        int run_length, color;
173
172
}
174
173
 
175
174
static int mm_decode_frame(AVCodecContext *avctx,
176
 
                            void *data, int *data_size,
 
175
                            void *data, int *got_frame,
177
176
                            AVPacket *avpkt)
178
177
{
179
178
    const uint8_t *buf = avpkt->data;
210
209
 
211
210
    memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
212
211
 
213
 
    *data_size = sizeof(AVFrame);
 
212
    *got_frame      = 1;
214
213
    *(AVFrame*)data = s->frame;
215
214
 
216
215
    return buf_size;
229
228
AVCodec ff_mmvideo_decoder = {
230
229
    .name           = "mmvideo",
231
230
    .type           = AVMEDIA_TYPE_VIDEO,
232
 
    .id             = CODEC_ID_MMVIDEO,
 
231
    .id             = AV_CODEC_ID_MMVIDEO,
233
232
    .priv_data_size = sizeof(MmContext),
234
233
    .init           = mm_decode_init,
235
234
    .close          = mm_decode_end,
236
235
    .decode         = mm_decode_frame,
237
236
    .capabilities   = CODEC_CAP_DR1,
238
 
    .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"),
 
237
    .long_name      = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"),
239
238
};