annotate rl2.c @ 9054:7eedb5796dd8 libavcodec

Use a shared function to validate FLAC extradata.
author jbr
date Thu, 26 Feb 2009 02:29:24 +0000
parents e9d9d946f213
children 54bc8a2727b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6523
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
1 /*
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
2 * RL2 Video Decoder
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
3 * Copyright (C) 2008 Sascha Sommer (saschasommer@freenet.de)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
4 *
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
5 * This file is part of FFmpeg.
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
6 *
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
11 *
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
15 * Lesser General Public License for more details.
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
16 *
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
20 */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
21
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
22 /**
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
23 * RL2 Video Decoder
8718
e9d9d946f213 Use full internal pathname in doxygen @file directives.
diego
parents: 8573
diff changeset
24 * @file libavcodec/rl2.c
6523
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
25 * @author Sascha Sommer (saschasommer@freenet.de)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
26 * For more information about the RL2 format, visit:
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
27 * http://wiki.multimedia.cx/index.php?title=RL2
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
28 */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
29
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
30 #include <stdio.h>
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
31 #include <stdlib.h>
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
32 #include <string.h>
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
33 #include <unistd.h>
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
34
8573
2acf0ae7b041 Fix build: Add intreadwrite.h and bswap.h #includes where necessary.
diego
parents: 7040
diff changeset
35 #include "libavutil/intreadwrite.h"
6523
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
36 #include "avcodec.h"
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
37
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
38
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
39 #define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr count, palette
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
40
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
41 typedef struct Rl2Context {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
42 AVCodecContext *avctx;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
43 AVFrame frame;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
44
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
45 unsigned short video_base; ///< initial drawing offset
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
46 unsigned int clr_count; ///< number of used colors (currently unused)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
47 unsigned char* back_frame; ///< background frame
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
48 unsigned int palette[AVPALETTE_COUNT];
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
49 } Rl2Context;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
50
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
51 /**
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
52 * Run Length Decode a single 320x200 frame
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
53 * @param s rl2 context
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
54 * @param buf input buffer
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
55 * @param size input buffer size
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
56 * @param out ouput buffer
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
57 * @param stride stride of the output buffer
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
58 * @param video_base offset of the rle data inside the frame
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
59 */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
60 static void rl2_rle_decode(Rl2Context *s,const unsigned char* in,int size,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
61 unsigned char* out,int stride,int video_base){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
62 int base_x = video_base % s->avctx->width;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
63 int base_y = video_base / s->avctx->width;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
64 int stride_adj = stride - s->avctx->width;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
65 int i;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
66 const unsigned char* back_frame = s->back_frame;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
67 const unsigned char* in_end = in + size;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
68 const unsigned char* out_end = out + stride * s->avctx->height;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
69 unsigned char* line_end = out + s->avctx->width;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
70
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
71 /** copy start of the background frame */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
72 for(i=0;i<=base_y;i++){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
73 if(s->back_frame)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
74 memcpy(out,back_frame,s->avctx->width);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
75 out += stride;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
76 back_frame += s->avctx->width;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
77 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
78 back_frame += base_x - s->avctx->width;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
79 line_end = out - stride_adj;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
80 out += base_x - stride;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
81
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
82 /** decode the variable part of the frame */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
83 while(in < in_end){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
84 unsigned char val = *in++;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
85 int len = 1;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
86 if(val >= 0x80){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
87 if(in >= in_end)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
88 break;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
89 len = *in++;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
90 if(!len)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
91 break;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
92 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
93
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
94 if(len >= out_end - out)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
95 break;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
96
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
97 if(s->back_frame)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
98 val |= 0x80;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
99 else
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
100 val &= ~0x80;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
101
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
102 while(len--){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
103 *out++ = (val == 0x80)? *back_frame:val;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
104 back_frame++;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
105 if(out == line_end){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
106 out += stride_adj;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
107 line_end += stride;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
108 if(len >= out_end - out)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
109 break;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
110 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
111 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
112 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
113
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
114 /** copy the rest from the background frame */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
115 if(s->back_frame){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
116 while(out < out_end){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
117 memcpy(out, back_frame, line_end - out);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
118 back_frame += line_end - out;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
119 out = line_end + stride_adj;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
120 line_end += stride;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
121 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
122 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
123 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
124
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
125
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
126 /**
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
127 * Initialize the decoder
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
128 * @param avctx decoder context
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
129 * @return 0 success, -1 on error
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
130 */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
131 static av_cold int rl2_decode_init(AVCodecContext *avctx)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
132 {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
133 Rl2Context *s = avctx->priv_data;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
134 int back_size;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
135 int i;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
136 s->avctx = avctx;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
137 avctx->pix_fmt = PIX_FMT_PAL8;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
138
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
139 /** parse extra data */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
140 if(!avctx->extradata || avctx->extradata_size < EXTRADATA1_SIZE){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
141 av_log(avctx, AV_LOG_ERROR, "invalid extradata size\n");
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
142 return -1;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
143 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
144
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
145 /** get frame_offset */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
146 s->video_base = AV_RL16(&avctx->extradata[0]);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
147 s->clr_count = AV_RL32(&avctx->extradata[2]);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
148
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
149 if(s->video_base >= avctx->width * avctx->height){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
150 av_log(avctx, AV_LOG_ERROR, "invalid video_base\n");
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
151 return -1;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
152 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
153
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
154 /** initialize palette */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
155 for(i=0;i<AVPALETTE_COUNT;i++)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
156 s->palette[i] = AV_RB24(&avctx->extradata[6 + i * 3]);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
157
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
158 /** decode background frame if present */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
159 back_size = avctx->extradata_size - EXTRADATA1_SIZE;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
160
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
161 if(back_size > 0){
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
162 unsigned char* back_frame = av_mallocz(avctx->width*avctx->height);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
163 if(!back_frame)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
164 return -1;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
165 rl2_rle_decode(s,avctx->extradata + EXTRADATA1_SIZE,back_size,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
166 back_frame,avctx->width,0);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
167 s->back_frame = back_frame;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
168 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
169 return 0;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
170 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
171
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
172
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
173 /**
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
174 * Decode a single frame
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
175 * @param avctx decoder context
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
176 * @param data decoded frame
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
177 * @param data_size size of the decoded frame
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
178 * @param buf input buffer
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
179 * @param buf_size input buffer size
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
180 * @return 0 success, -1 on error
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
181 */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
182 static int rl2_decode_frame(AVCodecContext *avctx,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
183 void *data, int *data_size,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
184 const uint8_t *buf, int buf_size)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
185 {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
186 Rl2Context *s = avctx->priv_data;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
187
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
188 if(s->frame.data[0])
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
189 avctx->release_buffer(avctx, &s->frame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
190
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
191 /** get buffer */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
192 s->frame.reference= 0;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
193 if(avctx->get_buffer(avctx, &s->frame)) {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
194 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
195 return -1;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
196 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
197
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
198 /** run length decode */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
199 rl2_rle_decode(s,buf,buf_size,s->frame.data[0],s->frame.linesize[0],s->video_base);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
200
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
201 /** make the palette available on the way out */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
202 memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
203
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
204 *data_size = sizeof(AVFrame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
205 *(AVFrame*)data = s->frame;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
206
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
207 /** report that the buffer was completely consumed */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
208 return buf_size;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
209 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
210
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
211
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
212 /**
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
213 * Uninit decoder
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
214 * @param avctx decoder context
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
215 * @return 0 success, -1 on error
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
216 */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
217 static av_cold int rl2_decode_end(AVCodecContext *avctx)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
218 {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
219 Rl2Context *s = avctx->priv_data;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
220
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
221 if(s->frame.data[0])
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
222 avctx->release_buffer(avctx, &s->frame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
223
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
224 av_free(s->back_frame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
225
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
226 return 0;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
227 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
228
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
229
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
230 AVCodec rl2_decoder = {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
231 "rl2",
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
232 CODEC_TYPE_VIDEO,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
233 CODEC_ID_RL2,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
234 sizeof(Rl2Context),
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
235 rl2_decode_init,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
236 NULL,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
237 rl2_decode_end,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
238 rl2_decode_frame,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
239 CODEC_CAP_DR1,
7040
e943e1409077 Make AVCodec long_names definition conditional depending on CONFIG_SMALL.
stefano
parents: 6712
diff changeset
240 .long_name = NULL_IF_CONFIG_SMALL("RL2 video"),
6523
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
241 };
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
242