OSDN Git Service

Fixed invalid read access on extra data in cinepak decoder.
[coroid/ffmpeg_saccubus.git] / libavformat / ipmovie.c
1 /*
2  * Interplay MVE File Demuxer
3  * Copyright (c) 2003 The ffmpeg Project
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21
22 /**
23  * @file
24  * Interplay MVE file demuxer
25  * by Mike Melanson (melanson@pcisys.net)
26  * For more information regarding the Interplay MVE file format, visit:
27  *   http://www.pcisys.net/~melanson/codecs/
28  * The aforementioned site also contains a command line utility for parsing
29  * IP MVE files so that you can get a good idea of the typical structure of
30  * such files. This demuxer is not the best example to use if you are trying
31  * to write your own as it uses a rather roundabout approach for splitting
32  * up and sending out the chunks.
33  */
34
35 #include "libavutil/intreadwrite.h"
36 #include "avformat.h"
37
38 #define CHUNK_PREAMBLE_SIZE 4
39 #define OPCODE_PREAMBLE_SIZE 4
40
41 #define CHUNK_INIT_AUDIO   0x0000
42 #define CHUNK_AUDIO_ONLY   0x0001
43 #define CHUNK_INIT_VIDEO   0x0002
44 #define CHUNK_VIDEO        0x0003
45 #define CHUNK_SHUTDOWN     0x0004
46 #define CHUNK_END          0x0005
47 /* these last types are used internally */
48 #define CHUNK_DONE         0xFFFC
49 #define CHUNK_NOMEM        0xFFFD
50 #define CHUNK_EOF          0xFFFE
51 #define CHUNK_BAD          0xFFFF
52
53 #define OPCODE_END_OF_STREAM           0x00
54 #define OPCODE_END_OF_CHUNK            0x01
55 #define OPCODE_CREATE_TIMER            0x02
56 #define OPCODE_INIT_AUDIO_BUFFERS      0x03
57 #define OPCODE_START_STOP_AUDIO        0x04
58 #define OPCODE_INIT_VIDEO_BUFFERS      0x05
59 #define OPCODE_UNKNOWN_06              0x06
60 #define OPCODE_SEND_BUFFER             0x07
61 #define OPCODE_AUDIO_FRAME             0x08
62 #define OPCODE_SILENCE_FRAME           0x09
63 #define OPCODE_INIT_VIDEO_MODE         0x0A
64 #define OPCODE_CREATE_GRADIENT         0x0B
65 #define OPCODE_SET_PALETTE             0x0C
66 #define OPCODE_SET_PALETTE_COMPRESSED  0x0D
67 #define OPCODE_UNKNOWN_0E              0x0E
68 #define OPCODE_SET_DECODING_MAP        0x0F
69 #define OPCODE_UNKNOWN_10              0x10
70 #define OPCODE_VIDEO_DATA              0x11
71 #define OPCODE_UNKNOWN_12              0x12
72 #define OPCODE_UNKNOWN_13              0x13
73 #define OPCODE_UNKNOWN_14              0x14
74 #define OPCODE_UNKNOWN_15              0x15
75
76 #define PALETTE_COUNT 256
77
78 typedef struct IPMVEContext {
79
80     unsigned char *buf;
81     int buf_size;
82
83     uint64_t frame_pts_inc;
84
85     unsigned int video_bpp;
86     unsigned int video_width;
87     unsigned int video_height;
88     int64_t video_pts;
89     uint32_t     palette[256];
90     int          has_palette;
91
92     unsigned int audio_bits;
93     unsigned int audio_channels;
94     unsigned int audio_sample_rate;
95     enum CodecID audio_type;
96     unsigned int audio_frame_count;
97
98     int video_stream_index;
99     int audio_stream_index;
100
101     int64_t audio_chunk_offset;
102     int audio_chunk_size;
103     int64_t video_chunk_offset;
104     int video_chunk_size;
105     int64_t decode_map_chunk_offset;
106     int decode_map_chunk_size;
107
108     int64_t next_chunk_offset;
109
110 } IPMVEContext;
111
112 static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
113     AVPacket *pkt) {
114
115     int chunk_type;
116
117     if (s->audio_chunk_offset) {
118
119         /* adjust for PCM audio by skipping chunk header */
120         if (s->audio_type != CODEC_ID_INTERPLAY_DPCM) {
121             s->audio_chunk_offset += 6;
122             s->audio_chunk_size -= 6;
123         }
124
125         avio_seek(pb, s->audio_chunk_offset, SEEK_SET);
126         s->audio_chunk_offset = 0;
127
128         if (s->audio_chunk_size != av_get_packet(pb, pkt, s->audio_chunk_size))
129             return CHUNK_EOF;
130
131         pkt->stream_index = s->audio_stream_index;
132         pkt->pts = s->audio_frame_count;
133
134         /* audio frame maintenance */
135         if (s->audio_type != CODEC_ID_INTERPLAY_DPCM)
136             s->audio_frame_count +=
137             (s->audio_chunk_size / s->audio_channels / (s->audio_bits / 8));
138         else
139             s->audio_frame_count +=
140                 (s->audio_chunk_size - 6) / s->audio_channels;
141
142         av_dlog(NULL, "sending audio frame with pts %"PRId64" (%d audio frames)\n",
143                 pkt->pts, s->audio_frame_count);
144
145         chunk_type = CHUNK_VIDEO;
146
147     } else if (s->decode_map_chunk_offset) {
148
149         /* send both the decode map and the video data together */
150
151         if (av_new_packet(pkt, s->decode_map_chunk_size + s->video_chunk_size))
152             return CHUNK_NOMEM;
153
154         if (s->has_palette) {
155             uint8_t *pal;
156
157             pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE,
158                                           AVPALETTE_SIZE);
159             if (pal) {
160                 memcpy(pal, s->palette, AVPALETTE_SIZE);
161                 s->has_palette = 0;
162             }
163         }
164
165         pkt->pos= s->decode_map_chunk_offset;
166         avio_seek(pb, s->decode_map_chunk_offset, SEEK_SET);
167         s->decode_map_chunk_offset = 0;
168
169         if (avio_read(pb, pkt->data, s->decode_map_chunk_size) !=
170             s->decode_map_chunk_size) {
171             av_free_packet(pkt);
172             return CHUNK_EOF;
173         }
174
175         avio_seek(pb, s->video_chunk_offset, SEEK_SET);
176         s->video_chunk_offset = 0;
177
178         if (avio_read(pb, pkt->data + s->decode_map_chunk_size,
179             s->video_chunk_size) != s->video_chunk_size) {
180             av_free_packet(pkt);
181             return CHUNK_EOF;
182         }
183
184         pkt->stream_index = s->video_stream_index;
185         pkt->pts = s->video_pts;
186
187         av_dlog(NULL, "sending video frame with pts %"PRId64"\n", pkt->pts);
188
189         s->video_pts += s->frame_pts_inc;
190
191         chunk_type = CHUNK_VIDEO;
192
193     } else {
194
195         avio_seek(pb, s->next_chunk_offset, SEEK_SET);
196         chunk_type = CHUNK_DONE;
197
198     }
199
200     return chunk_type;
201 }
202
203 /* This function loads and processes a single chunk in an IP movie file.
204  * It returns the type of chunk that was processed. */
205 static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
206     AVPacket *pkt)
207 {
208     unsigned char chunk_preamble[CHUNK_PREAMBLE_SIZE];
209     int chunk_type;
210     int chunk_size;
211     unsigned char opcode_preamble[OPCODE_PREAMBLE_SIZE];
212     unsigned char opcode_type;
213     unsigned char opcode_version;
214     int opcode_size;
215     unsigned char scratch[1024];
216     int i, j;
217     int first_color, last_color;
218     int audio_flags;
219     unsigned char r, g, b;
220
221     /* see if there are any pending packets */
222     chunk_type = load_ipmovie_packet(s, pb, pkt);
223     if (chunk_type != CHUNK_DONE)
224         return chunk_type;
225
226     /* read the next chunk, wherever the file happens to be pointing */
227     if (url_feof(pb))
228         return CHUNK_EOF;
229     if (avio_read(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
230         CHUNK_PREAMBLE_SIZE)
231         return CHUNK_BAD;
232     chunk_size = AV_RL16(&chunk_preamble[0]);
233     chunk_type = AV_RL16(&chunk_preamble[2]);
234
235     av_dlog(NULL, "chunk type 0x%04X, 0x%04X bytes: ", chunk_type, chunk_size);
236
237     switch (chunk_type) {
238
239     case CHUNK_INIT_AUDIO:
240         av_dlog(NULL, "initialize audio\n");
241         break;
242
243     case CHUNK_AUDIO_ONLY:
244         av_dlog(NULL, "audio only\n");
245         break;
246
247     case CHUNK_INIT_VIDEO:
248         av_dlog(NULL, "initialize video\n");
249         break;
250
251     case CHUNK_VIDEO:
252         av_dlog(NULL, "video (and audio)\n");
253         break;
254
255     case CHUNK_SHUTDOWN:
256         av_dlog(NULL, "shutdown\n");
257         break;
258
259     case CHUNK_END:
260         av_dlog(NULL, "end\n");
261         break;
262
263     default:
264         av_dlog(NULL, "invalid chunk\n");
265         chunk_type = CHUNK_BAD;
266         break;
267
268     }
269
270     while ((chunk_size > 0) && (chunk_type != CHUNK_BAD)) {
271
272         /* read the next chunk, wherever the file happens to be pointing */
273         if (url_feof(pb)) {
274             chunk_type = CHUNK_EOF;
275             break;
276         }
277         if (avio_read(pb, opcode_preamble, CHUNK_PREAMBLE_SIZE) !=
278             CHUNK_PREAMBLE_SIZE) {
279             chunk_type = CHUNK_BAD;
280             break;
281         }
282
283         opcode_size = AV_RL16(&opcode_preamble[0]);
284         opcode_type = opcode_preamble[2];
285         opcode_version = opcode_preamble[3];
286
287         chunk_size -= OPCODE_PREAMBLE_SIZE;
288         chunk_size -= opcode_size;
289         if (chunk_size < 0) {
290             av_dlog(NULL, "chunk_size countdown just went negative\n");
291             chunk_type = CHUNK_BAD;
292             break;
293         }
294
295         av_dlog(NULL, "  opcode type %02X, version %d, 0x%04X bytes: ",
296                 opcode_type, opcode_version, opcode_size);
297         switch (opcode_type) {
298
299         case OPCODE_END_OF_STREAM:
300             av_dlog(NULL, "end of stream\n");
301             avio_skip(pb, opcode_size);
302             break;
303
304         case OPCODE_END_OF_CHUNK:
305             av_dlog(NULL, "end of chunk\n");
306             avio_skip(pb, opcode_size);
307             break;
308
309         case OPCODE_CREATE_TIMER:
310             av_dlog(NULL, "create timer\n");
311             if ((opcode_version > 0) || (opcode_size > 6)) {
312                 av_dlog(NULL, "bad create_timer opcode\n");
313                 chunk_type = CHUNK_BAD;
314                 break;
315             }
316             if (avio_read(pb, scratch, opcode_size) !=
317                 opcode_size) {
318                 chunk_type = CHUNK_BAD;
319                 break;
320             }
321             s->frame_pts_inc = ((uint64_t)AV_RL32(&scratch[0])) * AV_RL16(&scratch[4]);
322             av_dlog(NULL, "  %.2f frames/second (timer div = %d, subdiv = %d)\n",
323                     1000000.0 / s->frame_pts_inc, AV_RL32(&scratch[0]),
324                     AV_RL16(&scratch[4]));
325             break;
326
327         case OPCODE_INIT_AUDIO_BUFFERS:
328             av_dlog(NULL, "initialize audio buffers\n");
329             if ((opcode_version > 1) || (opcode_size > 10)) {
330                 av_dlog(NULL, "bad init_audio_buffers opcode\n");
331                 chunk_type = CHUNK_BAD;
332                 break;
333             }
334             if (avio_read(pb, scratch, opcode_size) !=
335                 opcode_size) {
336                 chunk_type = CHUNK_BAD;
337                 break;
338             }
339             s->audio_sample_rate = AV_RL16(&scratch[4]);
340             audio_flags = AV_RL16(&scratch[2]);
341             /* bit 0 of the flags: 0 = mono, 1 = stereo */
342             s->audio_channels = (audio_flags & 1) + 1;
343             /* bit 1 of the flags: 0 = 8 bit, 1 = 16 bit */
344             s->audio_bits = (((audio_flags >> 1) & 1) + 1) * 8;
345             /* bit 2 indicates compressed audio in version 1 opcode */
346             if ((opcode_version == 1) && (audio_flags & 0x4))
347                 s->audio_type = CODEC_ID_INTERPLAY_DPCM;
348             else if (s->audio_bits == 16)
349                 s->audio_type = CODEC_ID_PCM_S16LE;
350             else
351                 s->audio_type = CODEC_ID_PCM_U8;
352             av_dlog(NULL, "audio: %d bits, %d Hz, %s, %s format\n",
353                     s->audio_bits, s->audio_sample_rate,
354                     (s->audio_channels == 2) ? "stereo" : "mono",
355                     (s->audio_type == CODEC_ID_INTERPLAY_DPCM) ?
356                     "Interplay audio" : "PCM");
357             break;
358
359         case OPCODE_START_STOP_AUDIO:
360             av_dlog(NULL, "start/stop audio\n");
361             avio_skip(pb, opcode_size);
362             break;
363
364         case OPCODE_INIT_VIDEO_BUFFERS:
365             av_dlog(NULL, "initialize video buffers\n");
366             if ((opcode_version > 2) || (opcode_size > 8)) {
367                 av_dlog(NULL, "bad init_video_buffers opcode\n");
368                 chunk_type = CHUNK_BAD;
369                 break;
370             }
371             if (avio_read(pb, scratch, opcode_size) !=
372                 opcode_size) {
373                 chunk_type = CHUNK_BAD;
374                 break;
375             }
376             s->video_width = AV_RL16(&scratch[0]) * 8;
377             s->video_height = AV_RL16(&scratch[2]) * 8;
378             if (opcode_version < 2 || !AV_RL16(&scratch[6])) {
379                 s->video_bpp = 8;
380             } else {
381                 s->video_bpp = 16;
382             }
383             av_dlog(NULL, "video resolution: %d x %d\n",
384                     s->video_width, s->video_height);
385             break;
386
387         case OPCODE_UNKNOWN_06:
388         case OPCODE_UNKNOWN_0E:
389         case OPCODE_UNKNOWN_10:
390         case OPCODE_UNKNOWN_12:
391         case OPCODE_UNKNOWN_13:
392         case OPCODE_UNKNOWN_14:
393         case OPCODE_UNKNOWN_15:
394             av_dlog(NULL, "unknown (but documented) opcode %02X\n", opcode_type);
395             avio_skip(pb, opcode_size);
396             break;
397
398         case OPCODE_SEND_BUFFER:
399             av_dlog(NULL, "send buffer\n");
400             avio_skip(pb, opcode_size);
401             break;
402
403         case OPCODE_AUDIO_FRAME:
404             av_dlog(NULL, "audio frame\n");
405
406             /* log position and move on for now */
407             s->audio_chunk_offset = avio_tell(pb);
408             s->audio_chunk_size = opcode_size;
409             avio_skip(pb, opcode_size);
410             break;
411
412         case OPCODE_SILENCE_FRAME:
413             av_dlog(NULL, "silence frame\n");
414             avio_skip(pb, opcode_size);
415             break;
416
417         case OPCODE_INIT_VIDEO_MODE:
418             av_dlog(NULL, "initialize video mode\n");
419             avio_skip(pb, opcode_size);
420             break;
421
422         case OPCODE_CREATE_GRADIENT:
423             av_dlog(NULL, "create gradient\n");
424             avio_skip(pb, opcode_size);
425             break;
426
427         case OPCODE_SET_PALETTE:
428             av_dlog(NULL, "set palette\n");
429             /* check for the logical maximum palette size
430              * (3 * 256 + 4 bytes) */
431             if (opcode_size > 0x304) {
432                 av_dlog(NULL, "demux_ipmovie: set_palette opcode too large\n");
433                 chunk_type = CHUNK_BAD;
434                 break;
435             }
436             if (avio_read(pb, scratch, opcode_size) != opcode_size) {
437                 chunk_type = CHUNK_BAD;
438                 break;
439             }
440
441             /* load the palette into internal data structure */
442             first_color = AV_RL16(&scratch[0]);
443             last_color = first_color + AV_RL16(&scratch[2]) - 1;
444             /* sanity check (since they are 16 bit values) */
445             if ((first_color > 0xFF) || (last_color > 0xFF)) {
446                 av_dlog(NULL, "demux_ipmovie: set_palette indexes out of range (%d -> %d)\n",
447                     first_color, last_color);
448                 chunk_type = CHUNK_BAD;
449                 break;
450             }
451             j = 4;  /* offset of first palette data */
452             for (i = first_color; i <= last_color; i++) {
453                 /* the palette is stored as a 6-bit VGA palette, thus each
454                  * component is shifted up to a 8-bit range */
455                 r = scratch[j++] * 4;
456                 g = scratch[j++] * 4;
457                 b = scratch[j++] * 4;
458                 s->palette[i] = (r << 16) | (g << 8) | (b);
459             }
460             s->has_palette = 1;
461             break;
462
463         case OPCODE_SET_PALETTE_COMPRESSED:
464             av_dlog(NULL, "set palette compressed\n");
465             avio_skip(pb, opcode_size);
466             break;
467
468         case OPCODE_SET_DECODING_MAP:
469             av_dlog(NULL, "set decoding map\n");
470
471             /* log position and move on for now */
472             s->decode_map_chunk_offset = avio_tell(pb);
473             s->decode_map_chunk_size = opcode_size;
474             avio_skip(pb, opcode_size);
475             break;
476
477         case OPCODE_VIDEO_DATA:
478             av_dlog(NULL, "set video data\n");
479
480             /* log position and move on for now */
481             s->video_chunk_offset = avio_tell(pb);
482             s->video_chunk_size = opcode_size;
483             avio_skip(pb, opcode_size);
484             break;
485
486         default:
487             av_dlog(NULL, "*** unknown opcode type\n");
488             chunk_type = CHUNK_BAD;
489             break;
490
491         }
492     }
493
494     /* make a note of where the stream is sitting */
495     s->next_chunk_offset = avio_tell(pb);
496
497     /* dispatch the first of any pending packets */
498     if ((chunk_type == CHUNK_VIDEO) || (chunk_type == CHUNK_AUDIO_ONLY))
499         chunk_type = load_ipmovie_packet(s, pb, pkt);
500
501     return chunk_type;
502 }
503
504 static const char signature[] = "Interplay MVE File\x1A\0\x1A";
505
506 static int ipmovie_probe(AVProbeData *p)
507 {
508     uint8_t *b = p->buf;
509     uint8_t *b_end = p->buf + p->buf_size - sizeof(signature);
510     do {
511         if (memcmp(b++, signature, sizeof(signature)) == 0)
512             return AVPROBE_SCORE_MAX;
513     } while (b < b_end);
514
515     return 0;
516 }
517
518 static int ipmovie_read_header(AVFormatContext *s,
519                                AVFormatParameters *ap)
520 {
521     IPMVEContext *ipmovie = s->priv_data;
522     AVIOContext *pb = s->pb;
523     AVPacket pkt;
524     AVStream *st;
525     unsigned char chunk_preamble[CHUNK_PREAMBLE_SIZE];
526     int chunk_type;
527     uint8_t signature_buffer[sizeof(signature)];
528
529     avio_read(pb, signature_buffer, sizeof(signature_buffer));
530     while (memcmp(signature_buffer, signature, sizeof(signature))) {
531         memmove(signature_buffer, signature_buffer + 1, sizeof(signature_buffer) - 1);
532         signature_buffer[sizeof(signature_buffer) - 1] = avio_r8(pb);
533         if (url_feof(pb))
534             return AVERROR_EOF;
535     }
536     /* initialize private context members */
537     ipmovie->video_pts = ipmovie->audio_frame_count = 0;
538     ipmovie->audio_chunk_offset = ipmovie->video_chunk_offset =
539     ipmovie->decode_map_chunk_offset = 0;
540
541     /* on the first read, this will position the stream at the first chunk */
542     ipmovie->next_chunk_offset = avio_tell(pb) + 4;
543
544     /* process the first chunk which should be CHUNK_INIT_VIDEO */
545     if (process_ipmovie_chunk(ipmovie, pb, &pkt) != CHUNK_INIT_VIDEO)
546         return AVERROR_INVALIDDATA;
547
548     /* peek ahead to the next chunk-- if it is an init audio chunk, process
549      * it; if it is the first video chunk, this is a silent file */
550     if (avio_read(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
551         CHUNK_PREAMBLE_SIZE)
552         return AVERROR(EIO);
553     chunk_type = AV_RL16(&chunk_preamble[2]);
554     avio_seek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR);
555
556     if (chunk_type == CHUNK_VIDEO)
557         ipmovie->audio_type = CODEC_ID_NONE;  /* no audio */
558     else if (process_ipmovie_chunk(ipmovie, pb, &pkt) != CHUNK_INIT_AUDIO)
559         return AVERROR_INVALIDDATA;
560
561     /* initialize the stream decoders */
562     st = av_new_stream(s, 0);
563     if (!st)
564         return AVERROR(ENOMEM);
565     av_set_pts_info(st, 63, 1, 1000000);
566     ipmovie->video_stream_index = st->index;
567     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
568     st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO;
569     st->codec->codec_tag = 0;  /* no fourcc */
570     st->codec->width = ipmovie->video_width;
571     st->codec->height = ipmovie->video_height;
572     st->codec->bits_per_coded_sample = ipmovie->video_bpp;
573
574     if (ipmovie->audio_type) {
575         st = av_new_stream(s, 0);
576         if (!st)
577             return AVERROR(ENOMEM);
578         av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
579         ipmovie->audio_stream_index = st->index;
580         st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
581         st->codec->codec_id = ipmovie->audio_type;
582         st->codec->codec_tag = 0;  /* no tag */
583         st->codec->channels = ipmovie->audio_channels;
584         st->codec->sample_rate = ipmovie->audio_sample_rate;
585         st->codec->bits_per_coded_sample = ipmovie->audio_bits;
586         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
587             st->codec->bits_per_coded_sample;
588         if (st->codec->codec_id == CODEC_ID_INTERPLAY_DPCM)
589             st->codec->bit_rate /= 2;
590         st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
591     }
592
593     return 0;
594 }
595
596 static int ipmovie_read_packet(AVFormatContext *s,
597                                AVPacket *pkt)
598 {
599     IPMVEContext *ipmovie = s->priv_data;
600     AVIOContext *pb = s->pb;
601     int ret;
602
603     ret = process_ipmovie_chunk(ipmovie, pb, pkt);
604     if (ret == CHUNK_BAD)
605         ret = AVERROR_INVALIDDATA;
606     else if (ret == CHUNK_EOF)
607         ret = AVERROR(EIO);
608     else if (ret == CHUNK_NOMEM)
609         ret = AVERROR(ENOMEM);
610     else if (ret == CHUNK_VIDEO)
611         ret = 0;
612     else
613         ret = -1;
614
615     return ret;
616 }
617
618 AVInputFormat ff_ipmovie_demuxer = {
619     .name           = "ipmovie",
620     .long_name      = NULL_IF_CONFIG_SMALL("Interplay MVE format"),
621     .priv_data_size = sizeof(IPMVEContext),
622     .read_probe     = ipmovie_probe,
623     .read_header    = ipmovie_read_header,
624     .read_packet    = ipmovie_read_packet,
625 };