1 /*
2 * SMV JPEG decoder
3 * Copyright (c) 2013 Ash Hughes
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 * SMV JPEG decoder.
25 */
26
27 // #define DEBUG
33
41
43 int src_linesize,
int height,
int nlines)
44 {
45 if (!dst || !src)
46 return;
47 src += (nlines) * src_linesize * height;
49 }
50
52 const int src_linesizes[4],
54 int nlines)
55 {
57 int i, planes_nb = 0;
58
60 return;
61
64
65 for (i = 0; i < planes_nb; i++) {
67 if (i == 1 || i == 2) {
69 }
71 src_linesizes[i], h, nlines);
72 }
75 dst_data[1] = src_data[1];
76 }
77
79 {
84
86
90
94
96
99
102 ret = -1;
103 }
104
106 if (!codec) {
108 ret = -1;
109 }
110
112
119 ret = -1;
120 }
122
124 }
125
128 {
132 int i, cur_frame = 0,
ret = 0;
133
135
136 /* Are we at the start of a block? */
137 if (!cur_frame) {
142
147 }
148
149 /*use the last lot... */
151
153
154 /* We shouldn't get here if frames_per_jpeg <= 0 because this was rejected
155 in init */
158
159 if (*data_size) {
164 /* ff_init_buffer_info(avctx, &s->picture[1]); */
169
171 }
172
174 }
175
177 {
180
186 return 0;
187 }
188
193 };
194
204 .priv_class = &smvjpegdec_class,
205 };