Libav
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavcodec
internal.h
Go to the documentation of this file.
1
/*
2
* This file is part of Libav.
3
*
4
* Libav is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* Libav is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with Libav; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
24
#ifndef AVCODEC_INTERNAL_H
25
#define AVCODEC_INTERNAL_H
26
27
#include <stdint.h>
28
29
#include "
libavutil/buffer.h
"
30
#include "
libavutil/channel_layout.h
"
31
#include "
libavutil/mathematics.h
"
32
#include "
libavutil/pixfmt.h
"
33
#include "
avcodec.h
"
34
#include "config.h"
35
36
#define FF_SANE_NB_CHANNELS 63U
37
38
typedef
struct
FramePool
{
43
AVBufferPool
*
pools
[4];
44
45
/*
46
* Pool parameters
47
*/
48
int
format
;
49
int
width
,
height
;
50
int
stride_align
[
AV_NUM_DATA_POINTERS
];
51
int
linesize
[4];
52
int
planes
;
53
int
channels
;
54
int
samples
;
55
}
FramePool
;
56
57
typedef
struct
AVCodecInternal
{
64
int
is_copy
;
65
79
int
allocate_progress
;
80
85
int
last_audio_frame
;
86
87
AVFrame
*
to_free
;
88
89
FramePool
*
pool
;
90
91
void
*
thread_ctx
;
92
97
AVPacket
*
pkt
;
98
}
AVCodecInternal
;
99
100
struct
AVCodecDefault
{
101
const
uint8_t
*
key
;
102
const
uint8_t
*
value
;
103
};
104
112
AVHWAccel
*
ff_find_hwaccel
(
AVCodecContext
*avctx);
113
118
int
ff_match_2uint16
(
const
uint16_t (*
tab
)[2],
int
size
,
int
a,
int
b
);
119
120
unsigned
int
avpriv_toupper4
(
unsigned
int
x);
121
122
int
avpriv_lock_avformat
(
void
);
123
int
avpriv_unlock_avformat
(
void
);
124
130
#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - FF_INPUT_BUFFER_PADDING_SIZE)
131
148
int
ff_alloc_packet
(
AVPacket
*avpkt,
int
size
);
149
153
static
av_always_inline
int64_t
ff_samples_to_time_base
(
AVCodecContext
*avctx,
154
int64_t
samples
)
155
{
156
return
av_rescale_q
(samples, (
AVRational
){ 1, avctx->
sample_rate
},
157
avctx->
time_base
);
158
}
159
165
int
ff_get_buffer
(
AVCodecContext
*avctx,
AVFrame
*frame,
int
flags
);
166
171
int
ff_reget_buffer
(
AVCodecContext
*avctx,
AVFrame
*frame);
172
173
const
uint8_t
*
avpriv_find_start_code
(
const
uint8_t
*
restrict
p,
174
const
uint8_t
*end,
175
uint32_t *
restrict
state
);
176
181
int
ff_set_dimensions
(
AVCodecContext
*s,
int
width
,
int
height
);
182
186
int
ff_side_data_update_matrix_encoding
(
AVFrame
*frame,
187
enum
AVMatrixEncoding
matrix_encoding);
188
189
#endif
/* AVCODEC_INTERNAL_H */
Generated on Thu Sep 30 2021 23:03:11 for Libav by
1.8.1.2