2014-04-17 13:51:03 +03:00
|
|
|
/*
|
2022-10-03 20:48:09 +02:00
|
|
|
* Opus common header
|
2014-04-17 13:51:03 +03:00
|
|
|
* Copyright (c) 2012 Andrew D'Addesio
|
|
|
|
* Copyright (c) 2013-2014 Mozilla Corporation
|
|
|
|
*
|
2014-05-15 15:50:12 +03:00
|
|
|
* This file is part of FFmpeg.
|
2014-04-17 13:51:03 +03:00
|
|
|
*
|
2014-05-15 15:50:12 +03:00
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2014-04-17 13:51:03 +03:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
2014-05-15 15:50:12 +03:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2014-04-17 13:51:03 +03:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2014-05-15 15:50:12 +03:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2014-04-17 13:51:03 +03:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AVCODEC_OPUS_H
|
|
|
|
#define AVCODEC_OPUS_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-10-07 19:36:09 +02:00
|
|
|
#define OPUS_MAX_FRAME_SIZE 1275
|
|
|
|
#define OPUS_MAX_FRAMES 48
|
|
|
|
#define OPUS_MAX_PACKET_DUR 5760
|
2014-04-17 13:51:03 +03:00
|
|
|
|
2014-10-18 02:25:16 +03:00
|
|
|
#define OPUS_TS_HEADER 0x7FE0 // 0x3ff (11 bits)
|
|
|
|
#define OPUS_TS_MASK 0xFFE0 // top 11 bits
|
|
|
|
|
|
|
|
static const uint8_t opus_default_extradata[30] = {
|
|
|
|
'O', 'p', 'u', 's', 'H', 'e', 'a', 'd',
|
|
|
|
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
};
|
|
|
|
|
2014-04-17 13:51:03 +03:00
|
|
|
enum OpusMode {
|
|
|
|
OPUS_MODE_SILK,
|
|
|
|
OPUS_MODE_HYBRID,
|
2017-02-11 02:25:07 +02:00
|
|
|
OPUS_MODE_CELT,
|
|
|
|
|
|
|
|
OPUS_MODE_NB
|
2014-04-17 13:51:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
enum OpusBandwidth {
|
|
|
|
OPUS_BANDWIDTH_NARROWBAND,
|
|
|
|
OPUS_BANDWIDTH_MEDIUMBAND,
|
|
|
|
OPUS_BANDWIDTH_WIDEBAND,
|
|
|
|
OPUS_BANDWIDTH_SUPERWIDEBAND,
|
2017-02-11 02:25:07 +02:00
|
|
|
OPUS_BANDWIDTH_FULLBAND,
|
|
|
|
|
|
|
|
OPUS_BANDWITH_NB
|
2014-04-17 13:51:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* AVCODEC_OPUS_H */
|