1 /*
2 * v410 decoder
3 *
4 * Copyright (c) 2011 Derek Buitenhuis
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
27
29 {
32
33 if (avctx->
width & 1) {
37 } else {
39 }
40 }
41
42 return 0;
43 }
44
47 {
53
57 }
58
61
64
65 y = (uint16_t *)pic->
data[0];
66 u = (uint16_t *)pic->
data[1];
67 v = (uint16_t *)pic->
data[2];
68
70 for (j = 0; j < avctx->
width; j++) {
72
73 u[j] = (val >> 2) & 0x3FF;
74 y[j] = (val >> 12) & 0x3FF;
75 v[j] = (val >> 22);
76
77 src += 4;
78 }
79
83 }
84
85 *got_frame = 1;
86
88 }
89
98 };