FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavcodec
dcadec.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 foo86
3
*
4
* This file is part of FFmpeg.
5
*
6
* FFmpeg is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* FFmpeg is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with FFmpeg; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef AVCODEC_DCADEC_H
22
#define AVCODEC_DCADEC_H
23
24
#include "
libavutil/common.h
"
25
#include "
libavutil/float_dsp.h
"
26
27
#include "
avcodec.h
"
28
#include "
get_bits.h
"
29
#include "
dca.h
"
30
#include "
dcadsp.h
"
31
#include "
dca_core.h
"
32
#include "
dca_exss.h
"
33
#include "
dca_xll.h
"
34
35
#define DCA_BUFFER_PADDING_SIZE 1024
36
37
#define DCA_PACKET_CORE 0x01
38
#define DCA_PACKET_EXSS 0x02
39
#define DCA_PACKET_XLL 0x04
40
#define DCA_PACKET_RECOVERY 0x08
41
42
typedef
struct
DCAContext
{
43
const
AVClass
*
class
;
///< class for AVOptions
44
AVCodecContext
*
avctx
;
45
46
DCACoreDecoder
core
;
///< Core decoder context
47
DCAExssParser
exss
;
///< EXSS parser context
48
DCAXllDecoder
xll
;
///< XLL decoder context
49
50
DCADSPContext
dcadsp
;
51
52
uint8_t
*
buffer
;
///< Packet buffer
53
unsigned
int
buffer_size
;
54
55
int
packet
;
///< Packet flags
56
57
int
core_residual_valid
;
///< Core valid for residual decoding
58
59
int
request_channel_layout
;
///< Converted from avctx.request_channel_layout
60
int
core_only
;
///< Core only decoding flag
61
}
DCAContext
;
62
63
int
ff_dca_set_channel_layout
(
AVCodecContext
*avctx,
int
*ch_remap,
int
dca_mask);
64
65
int
ff_dca_check_crc
(
GetBitContext
*
s
,
int
p1,
int
p2);
66
67
void
ff_dca_downmix_to_stereo_fixed
(
DCADSPContext
*dcadsp,
int32_t
**samples,
68
int
*coeff_l,
int
nsamples,
int
ch_mask);
69
void
ff_dca_downmix_to_stereo_float
(
AVFloatDSPContext
*fdsp,
float
**samples,
70
int
*coeff_l,
int
nsamples,
int
ch_mask);
71
72
static
inline
int
ff_dca_seek_bits
(
GetBitContext
*
s
,
int
p)
73
{
74
if
(p < s->
index
|| p > s->
size_in_bits
)
75
return
-1;
76
s->
index
= p;
77
return
0;
78
}
79
80
#endif
ff_dca_seek_bits
static int ff_dca_seek_bits(GetBitContext *s, int p)
Definition:
dcadec.h:72
s
const char * s
Definition:
avisynth_c.h:631
DCAContext::core
DCACoreDecoder core
Core decoder context.
Definition:
dcadec.h:46
dca_exss.h
float_dsp.h
dca.h
DCAContext::core_only
int core_only
Core only decoding flag.
Definition:
dcadec.h:60
DCAContext::packet
int packet
Packet flags.
Definition:
dcadec.h:55
DCAContext::buffer
uint8_t * buffer
Packet buffer.
Definition:
dcadec.h:52
dca_core.h
uint8_t
uint8_t
Definition:
audio_convert.c:194
DCACoreDecoder
Definition:
dca_core.h:73
ff_dca_downmix_to_stereo_float
void ff_dca_downmix_to_stereo_float(AVFloatDSPContext *fdsp, float **samples, int *coeff_l, int nsamples, int ch_mask)
Definition:
dcadec.c:137
get_bits.h
bitstream reader API header.
DCAContext::avctx
AVCodecContext * avctx
Definition:
dcadec.h:44
DCAContext::exss
DCAExssParser exss
EXSS parser context.
Definition:
dcadec.h:47
ff_dca_downmix_to_stereo_fixed
void ff_dca_downmix_to_stereo_fixed(DCADSPContext *dcadsp, int32_t **samples, int *coeff_l, int nsamples, int ch_mask)
Definition:
dcadec.c:106
DCAContext
Definition:
dcadec.h:42
GetBitContext::size_in_bits
int size_in_bits
Definition:
get_bits.h:57
int32_t
int32_t
Definition:
audio_convert.c:194
DCAContext::xll
DCAXllDecoder xll
XLL decoder context.
Definition:
dcadec.h:48
AVFloatDSPContext
Definition:
float_dsp.h:24
dca_xll.h
dcadsp.h
DCAContext::core_residual_valid
int core_residual_valid
Core valid for residual decoding.
Definition:
dcadec.h:57
ff_dca_set_channel_layout
int ff_dca_set_channel_layout(AVCodecContext *avctx, int *ch_remap, int dca_mask)
Definition:
dcadec.c:32
avcodec.h
Libavcodec external API header.
AVCodecContext
main external API structure.
Definition:
avcodec.h:1532
DCADSPContext
Definition:
dcadsp.h:30
AVClass
Describe the class of an AVClass context structure.
Definition:
log.h:67
index
int index
Definition:
gxfenc.c:89
DCAContext::dcadsp
DCADSPContext dcadsp
Definition:
dcadec.h:50
DCAExssParser
Definition:
dca_exss.h:71
GetBitContext
Definition:
get_bits.h:54
common.h
common internal and external API header
DCAXllDecoder
Definition:
dca_xll.h:105
DCAContext::request_channel_layout
int request_channel_layout
Converted from avctx.request_channel_layout.
Definition:
dcadec.h:59
DCAContext::buffer_size
unsigned int buffer_size
Definition:
dcadec.h:53
ff_dca_check_crc
int ff_dca_check_crc(GetBitContext *s, int p1, int p2)
Definition:
dcadec.c:97
GetBitContext::index
int index
Definition:
get_bits.h:56
Generated on Mon Feb 15 2016 15:20:37 for FFmpeg by
1.8.6