1 /*
2 * RV30/40 parser
3 * Copyright (c) 2011 Konstantin Shishkov
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 * RV30/40 parser
25 */
26
29
35
38 };
39
42 const uint8_t **poutbuf,
int *poutbuf_size,
44 {
47
48 if (buf_size < 13 + *buf * 8) {
50 *poutbuf_size = buf_size;
51 return buf_size;
52 }
53
54 hdr =
AV_RB32(buf + 9 + *buf * 8);
56 type = (hdr >> 27) & 3;
57 pts = (hdr >> 7) & 0x1FFF;
58 } else {
59 type = (hdr >> 29) & 3;
60 pts = (hdr >> 6) & 0x1FFF;
61 }
62
66 } else {
67 if (type != 3)
69 else
71 }
73
75 *poutbuf_size = buf_size;
76 return buf_size;
77 }
78
79 #if CONFIG_RV30_PARSER
84 };
85 #endif
86
87 #if CONFIG_RV40_PARSER
92 };
93 #endif