1 /*
2 *
3 * This file is part of FFmpeg.
4 *
5 * FFmpeg is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * FFmpeg is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with FFmpeg; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #ifndef AVCODEC_DEFS_H
21 #define AVCODEC_DEFS_H
22
23 /**
24 * @file
25 * @ingroup libavc
26 * Misc types and constants that do not belong anywhere else.
27 */
28
29 #include <stdint.h>
30 #include <stdlib.h>
31
32 /**
33 * @ingroup lavc_decoding
34 * Required number of additionally allocated bytes at the end of the input bitstream for decoding.
35 * This is mainly needed because some optimized bitstream readers read
36 * 32 or 64 bit at once and could read over the end.<br>
37 * Note: If the first 23 bits of the additional bytes are not 0, then damaged
38 * MPEG bitstreams could cause overread and segfault.
39 */
40 #define AV_INPUT_BUFFER_PADDING_SIZE 64
41
42 /**
43 * @ingroup lavc_decoding
44 */
46 /* We leave some space between them for extensions (drop some
47 * keyframes for intra-only or drop just some bidir frames). */
55 };
56
68 };
69
70 /**
71 * Pan Scan area.
72 * This specifies the area which should be displayed.
73 * Note there may be multiple such areas for one frame.
74 */
76 /**
77 * id
78 * - encoding: Set by user.
79 * - decoding: Set by libavcodec.
80 */
82
83 /**
84 * width and height in 1/16 pel
85 * - encoding: Set by user.
86 * - decoding: Set by libavcodec.
87 */
90
91 /**
92 * position of the top left corner in 1/16 pel for up to 3 fields/frames
93 * - encoding: Set by user.
94 * - decoding: Set by libavcodec.
95 */
98
99 /**
100 * This structure describes the bitrate properties of an encoded bitstream. It
101 * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD
102 * parameters for H.264/HEVC.
103 */
105 /**
106 * Maximum bitrate of the stream, in bits per second.
107 * Zero if unknown or unspecified.
108 */
110 /**
111 * Minimum bitrate of the stream, in bits per second.
112 * Zero if unknown or unspecified.
113 */
115 /**
116 * Average bitrate of the stream, in bits per second.
117 * Zero if unknown or unspecified.
118 */
120
121 /**
122 * The size of the buffer to which the ratecontrol is applied, in bits.
123 * Zero if unknown or unspecified.
124 */
126
127 /**
128 * The delay between the time the packet this structure is associated with
129 * is received and the time when it should be decoded, in periods of a 27MHz
130 * clock.
131 *
132 * UINT64_MAX when unknown or unspecified.
133 */
136
137 /**
138 * Allocate a CPB properties structure and initialize its fields to default
139 * values.
140 *
141 * @param size if non-NULL, the size of the allocated struct will be written
142 * here. This is useful for embedding it in side data.
143 *
144 * @return the newly allocated struct or NULL on failure
145 */
147
148 /**
149 * This structure supplies correlation between a packet timestamp and a wall clock
150 * production time. The definition follows the Producer Reference Time ('prft')
151 * as defined in ISO/IEC 14496-12
152 */
154 /**
155 * A UTC timestamp, in microseconds, since Unix epoch (e.g, av_gettime()).
156 */
160
161 /**
162 * Encode extradata length to a buffer. Used by xiph codecs.
163 *
164 * @param s buffer to write to; must be at least (v/255+1) bytes long
165 * @param v size of extradata in bytes
166 * @return number of bytes written to the buffer.
167 */
169
170 #endif // AVCODEC_DEFS_H