FFmpeg
libavcodec
opus.h
Go to the documentation of this file.
1
/*
2
* Opus common header
3
* Copyright (c) 2012 Andrew D'Addesio
4
* Copyright (c) 2013-2014 Mozilla Corporation
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
23
#ifndef AVCODEC_OPUS_H
24
#define AVCODEC_OPUS_H
25
26
#include <stdint.h>
27
28
#define OPUS_MAX_FRAME_SIZE 1275
29
#define OPUS_MAX_FRAMES 48
30
#define OPUS_MAX_PACKET_DUR 5760
31
32
#define OPUS_TS_HEADER 0x7FE0 // 0x3ff (11 bits)
33
#define OPUS_TS_MASK 0xFFE0 // top 11 bits
34
35
static
const
uint8_t
opus_default_extradata
[30] = {
36
'O'
,
'p'
,
'u'
,
's'
,
'H'
,
'e'
,
'a'
,
'd'
,
37
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
38
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
39
};
40
41
enum
OpusMode
{
42
OPUS_MODE_SILK
,
43
OPUS_MODE_HYBRID
,
44
OPUS_MODE_CELT
,
45
46
OPUS_MODE_NB
47
};
48
49
enum
OpusBandwidth
{
50
OPUS_BANDWIDTH_NARROWBAND
,
51
OPUS_BANDWIDTH_MEDIUMBAND
,
52
OPUS_BANDWIDTH_WIDEBAND
,
53
OPUS_BANDWIDTH_SUPERWIDEBAND
,
54
OPUS_BANDWIDTH_FULLBAND
,
55
56
OPUS_BANDWITH_NB
57
};
58
59
#endif
/* AVCODEC_OPUS_H */
OPUS_BANDWIDTH_NARROWBAND
@ OPUS_BANDWIDTH_NARROWBAND
Definition:
opus.h:50
opus_default_extradata
static const uint8_t opus_default_extradata[30]
Definition:
opus.h:35
OpusMode
OpusMode
Definition:
opus.h:41
OPUS_BANDWIDTH_FULLBAND
@ OPUS_BANDWIDTH_FULLBAND
Definition:
opus.h:54
OPUS_BANDWIDTH_WIDEBAND
@ OPUS_BANDWIDTH_WIDEBAND
Definition:
opus.h:52
OPUS_MODE_NB
@ OPUS_MODE_NB
Definition:
opus.h:46
OPUS_MODE_CELT
@ OPUS_MODE_CELT
Definition:
opus.h:44
OPUS_BANDWITH_NB
@ OPUS_BANDWITH_NB
Definition:
opus.h:56
OPUS_BANDWIDTH_SUPERWIDEBAND
@ OPUS_BANDWIDTH_SUPERWIDEBAND
Definition:
opus.h:53
OPUS_MODE_HYBRID
@ OPUS_MODE_HYBRID
Definition:
opus.h:43
OPUS_MODE_SILK
@ OPUS_MODE_SILK
Definition:
opus.h:42
OPUS_BANDWIDTH_MEDIUMBAND
@ OPUS_BANDWIDTH_MEDIUMBAND
Definition:
opus.h:51
OpusBandwidth
OpusBandwidth
Definition:
opus.h:49
Generated on Thu Sep 26 2024 23:15:15 for FFmpeg by
1.8.17