OLD | NEW |
1 /* | 1 /* |
2 * RoQ audio encoder | 2 * RoQ audio encoder |
3 * | 3 * |
4 * Copyright (c) 2005 Eric Lasota | 4 * Copyright (c) 2005 Eric Lasota |
5 * Based on RoQ specs (c)2001 Tim Ferguson | 5 * Based on RoQ specs (c)2001 Tim Ferguson |
6 * | 6 * |
7 * This file is part of FFmpeg. | 7 * This file is part of FFmpeg. |
8 * | 8 * |
9 * FFmpeg is free software; you can redistribute it and/or | 9 * FFmpeg is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
12 * version 2.1 of the License, or (at your option) any later version. | 12 * version 2.1 of the License, or (at your option) any later version. |
13 * | 13 * |
14 * FFmpeg is distributed in the hope that it will be useful, | 14 * FFmpeg is distributed in the hope that it will be useful, |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 * Lesser General Public License for more details. | 17 * Lesser General Public License for more details. |
18 * | 18 * |
19 * You should have received a copy of the GNU Lesser General Public | 19 * You should have received a copy of the GNU Lesser General Public |
20 * License along with FFmpeg; if not, write to the Free Software | 20 * License along with FFmpeg; if not, write to the Free Software |
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 */ | 22 */ |
23 | 23 |
| 24 #include "libavutil/intmath.h" |
24 #include "avcodec.h" | 25 #include "avcodec.h" |
25 #include "bytestream.h" | 26 #include "bytestream.h" |
26 | 27 |
27 #define ROQ_FIRST_FRAME_SIZE (735*8) | 28 #define ROQ_FIRST_FRAME_SIZE (735*8) |
28 #define ROQ_FRAME_SIZE 735 | 29 #define ROQ_FRAME_SIZE 735 |
29 | 30 |
30 | 31 |
31 #define MAX_DPCM (127*127) | 32 #define MAX_DPCM (127*127) |
32 | 33 |
33 | 34 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 CODEC_TYPE_AUDIO, | 158 CODEC_TYPE_AUDIO, |
158 CODEC_ID_ROQ_DPCM, | 159 CODEC_ID_ROQ_DPCM, |
159 sizeof(ROQDPCMContext), | 160 sizeof(ROQDPCMContext), |
160 roq_dpcm_encode_init, | 161 roq_dpcm_encode_init, |
161 roq_dpcm_encode_frame, | 162 roq_dpcm_encode_frame, |
162 roq_dpcm_encode_close, | 163 roq_dpcm_encode_close, |
163 NULL, | 164 NULL, |
164 .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, | 165 .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, |
165 .long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"), | 166 .long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"), |
166 }; | 167 }; |
OLD | NEW |