annotate rl2.c @ 9371:6de6fb68621c libavcodec

Make sure spatial_decomposition_count is >0.
author michael
date Thu, 09 Apr 2009 19:45:10 +0000
parents 54bc8a2727b0
children 5da84f0d0a55
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,
9355
54bc8a2727b0 Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
rbultje
parents: 8718
diff changeset
184 AVPacket *avpkt)
6523
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
185 {
9355
54bc8a2727b0 Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
rbultje
parents: 8718
diff changeset
186 const uint8_t *buf = avpkt->data;
54bc8a2727b0 Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
rbultje
parents: 8718
diff changeset
187 int buf_size = avpkt->size;
6523
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
188 Rl2Context *s = avctx->priv_data;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
189
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
190 if(s->frame.data[0])
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
191 avctx->release_buffer(avctx, &s->frame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
192
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
193 /** get buffer */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
194 s->frame.reference= 0;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
195 if(avctx->get_buffer(avctx, &s->frame)) {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
196 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
197 return -1;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
198 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
199
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
200 /** run length decode */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
201 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
202
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
203 /** make the palette available on the way out */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
204 memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
205
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
206 *data_size = sizeof(AVFrame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
207 *(AVFrame*)data = s->frame;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
208
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
209 /** report that the buffer was completely consumed */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
210 return buf_size;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
211 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
212
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
213
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
214 /**
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
215 * Uninit decoder
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
216 * @param avctx decoder context
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
217 * @return 0 success, -1 on error
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
218 */
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
219 static av_cold int rl2_decode_end(AVCodecContext *avctx)
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
220 {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
221 Rl2Context *s = avctx->priv_data;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
222
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
223 if(s->frame.data[0])
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
224 avctx->release_buffer(avctx, &s->frame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
225
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
226 av_free(s->back_frame);
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
227
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
228 return 0;
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
229 }
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
230
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
231
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
232 AVCodec rl2_decoder = {
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
233 "rl2",
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
234 CODEC_TYPE_VIDEO,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
235 CODEC_ID_RL2,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
236 sizeof(Rl2Context),
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
237 rl2_decode_init,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
238 NULL,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
239 rl2_decode_end,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
240 rl2_decode_frame,
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
241 CODEC_CAP_DR1,
7040
e943e1409077 Make AVCodec long_names definition conditional depending on CONFIG_SMALL.
stefano
parents: 6712
diff changeset
242 .long_name = NULL_IF_CONFIG_SMALL("RL2 video"),
6523
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
243 };
ae19192241c4 rl2 decoder
faust3
parents:
diff changeset
244