Skip to content

Commit d7d421d

Browse files
committed
include: Update headers
1 parent dec420d commit d7d421d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+9215
-3169
lines changed

include/libavcodec/avcodec.h

Lines changed: 653 additions & 694 deletions
Large diffs are not rendered by default.

include/libavcodec/avfft.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#ifndef AVCODEC_AVFFT_H
2020
#define AVCODEC_AVFFT_H
2121

22+
#include "libavutil/attributes.h"
23+
#include "version_major.h"
24+
#if FF_API_AVFFT
25+
2226
/**
2327
* @file
2428
* @ingroup lavc_fft
@@ -44,26 +48,42 @@ typedef struct FFTContext FFTContext;
4448
* Set up a complex FFT.
4549
* @param nbits log2 of the length of the input array
4650
* @param inverse if 0 perform the forward transform, if 1 perform the inverse
51+
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_FFT
4752
*/
53+
attribute_deprecated
4854
FFTContext *av_fft_init(int nbits, int inverse);
4955

5056
/**
5157
* Do the permutation needed BEFORE calling ff_fft_calc().
58+
* @deprecated without replacement
5259
*/
60+
attribute_deprecated
5361
void av_fft_permute(FFTContext *s, FFTComplex *z);
5462

5563
/**
5664
* Do a complex FFT with the parameters defined in av_fft_init(). The
5765
* input data must be permuted before. No 1.0/sqrt(n) normalization is done.
66+
* @deprecated use the av_tx_fn value returned by av_tx_init, which also does permutation
5867
*/
68+
attribute_deprecated
5969
void av_fft_calc(FFTContext *s, FFTComplex *z);
6070

71+
attribute_deprecated
6172
void av_fft_end(FFTContext *s);
6273

74+
/**
75+
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_MDCT,
76+
* with a flag of AV_TX_FULL_IMDCT for a replacement to av_imdct_calc.
77+
*/
78+
attribute_deprecated
6379
FFTContext *av_mdct_init(int nbits, int inverse, double scale);
80+
attribute_deprecated
6481
void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
82+
attribute_deprecated
6583
void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
84+
attribute_deprecated
6685
void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
86+
attribute_deprecated
6787
void av_mdct_end(FFTContext *s);
6888

6989
/* Real Discrete Fourier Transform */
@@ -81,9 +101,14 @@ typedef struct RDFTContext RDFTContext;
81101
* Set up a real FFT.
82102
* @param nbits log2 of the length of the input array
83103
* @param trans the type of transform
104+
*
105+
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_RDFT
84106
*/
107+
attribute_deprecated
85108
RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
109+
attribute_deprecated
86110
void av_rdft_calc(RDFTContext *s, FFTSample *data);
111+
attribute_deprecated
87112
void av_rdft_end(RDFTContext *s);
88113

89114
/* Discrete Cosine Transform */
@@ -106,13 +131,19 @@ enum DCTTransformType {
106131
* @param type the type of transform
107132
*
108133
* @note the first element of the input of DST-I is ignored
134+
*
135+
* @deprecated use av_tx_init from libavutil/tx.h with an appropriate type of AV_TX_FLOAT_DCT
109136
*/
137+
attribute_deprecated
110138
DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
139+
attribute_deprecated
111140
void av_dct_calc(DCTContext *s, FFTSample *data);
141+
attribute_deprecated
112142
void av_dct_end (DCTContext *s);
113143

114144
/**
115145
* @}
116146
*/
117147

148+
#endif /* FF_API_AVFFT */
118149
#endif /* AVCODEC_AVFFT_H */

include/libavcodec/bsf.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx);
164164
/**
165165
* Prepare the filter for use, after all the parameters and options have been
166166
* set.
167+
*
168+
* @param ctx a AVBSFContext previously allocated with av_bsf_alloc()
167169
*/
168170
int av_bsf_init(AVBSFContext *ctx);
169171

@@ -174,6 +176,7 @@ int av_bsf_init(AVBSFContext *ctx);
174176
* av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or
175177
* AVERROR_EOF.
176178
*
179+
* @param ctx an initialized AVBSFContext
177180
* @param pkt the packet to filter. The bitstream filter will take ownership of
178181
* the packet and reset the contents of pkt. pkt is not touched if an error occurs.
179182
* If pkt is empty (i.e. NULL, or pkt->data is NULL and pkt->side_data_elems zero),
@@ -192,6 +195,7 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);
192195
/**
193196
* Retrieve a filtered packet.
194197
*
198+
* @param ctx an initialized AVBSFContext
195199
* @param[out] pkt this struct will be filled with the contents of the filtered
196200
* packet. It is owned by the caller and must be freed using
197201
* av_packet_unref() when it is no longer needed.

include/libavcodec/cabac.h

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder
3+
* Copyright (c) 2003 Michael Niedermayer <[email protected]>
4+
*
5+
* This file is part of FFmpeg.
6+
*
7+
* FFmpeg is free software; you can redistribute it and/or
8+
* modify it under the terms of the GNU Lesser General Public
9+
* License as published by the Free Software Foundation; either
10+
* version 2.1 of the License, or (at your option) any later version.
11+
*
12+
* FFmpeg is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
* Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public
18+
* License along with FFmpeg; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+
*/
21+
22+
/**
23+
* @file
24+
* Context Adaptive Binary Arithmetic Coder.
25+
*/
26+
27+
#ifndef AVCODEC_CABAC_H
28+
#define AVCODEC_CABAC_H
29+
30+
#include <stdint.h>
31+
32+
extern const uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
33+
#define H264_NORM_SHIFT_OFFSET 0
34+
#define H264_LPS_RANGE_OFFSET 512
35+
#define H264_MLPS_STATE_OFFSET 1024
36+
#define H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET 1280
37+
38+
#define CABAC_BITS 16
39+
#define CABAC_MASK ((1<<CABAC_BITS)-1)
40+
41+
typedef struct CABACContext{
42+
int low;
43+
int range;
44+
const uint8_t *bytestream_start;
45+
const uint8_t *bytestream;
46+
const uint8_t *bytestream_end;
47+
}CABACContext;
48+
49+
int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size);
50+
51+
#endif /* AVCODEC_CABAC_H */

include/libavcodec/codec.h

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@
5050
* avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer.
5151
*/
5252
#define AV_CODEC_CAP_DR1 (1 << 1)
53-
#if FF_API_FLAG_TRUNCATED
54-
/**
55-
* @deprecated Use parsers to always send proper frames.
56-
*/
57-
#define AV_CODEC_CAP_TRUNCATED (1 << 3)
58-
#endif
5953
/**
6054
* Encoder or decoder requires flushing with NULL input at the end in order to
6155
* give the complete and correct output.
@@ -86,6 +80,7 @@
8680
*/
8781
#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
8882

83+
#if FF_API_SUBFRAMES
8984
/**
9085
* Codec can output multiple frames per AVPacket
9186
* Normally demuxers return one frame at a time, demuxers which do not do
@@ -98,6 +93,8 @@
9893
* as a last resort.
9994
*/
10095
#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
96+
#endif
97+
10198
/**
10299
* Codec is experimental and is thus avoided in favor of non experimental
103100
* encoders
@@ -125,9 +122,6 @@
125122
* multithreading-capable external libraries.
126123
*/
127124
#define AV_CODEC_CAP_OTHER_THREADS (1 << 15)
128-
#if FF_API_AUTO_THREADS
129-
#define AV_CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_OTHER_THREADS
130-
#endif
131125
/**
132126
* Audio encoder supports receiving a different number of samples in each call.
133127
*/
@@ -143,17 +137,6 @@
143137
*/
144138
#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
145139

146-
#if FF_API_UNUSED_CODEC_CAPS
147-
/**
148-
* Deprecated and unused. Use AVCodecDescriptor.props instead
149-
*/
150-
#define AV_CODEC_CAP_INTRA_ONLY 0x40000000
151-
/**
152-
* Deprecated and unused. Use AVCodecDescriptor.props instead
153-
*/
154-
#define AV_CODEC_CAP_LOSSLESS 0x80000000
155-
#endif
156-
157140
/**
158141
* Codec is backed by a hardware implementation. Typically used to
159142
* identify a non-hwaccel hardware decoder. For information about hwaccels, use
@@ -169,9 +152,9 @@
169152
#define AV_CODEC_CAP_HYBRID (1 << 19)
170153

171154
/**
172-
* This codec takes the reordered_opaque field from input AVFrames
173-
* and returns it in the corresponding field in AVCodecContext after
174-
* encoding.
155+
* This encoder can reorder user opaque values from input AVFrames and return
156+
* them with corresponding output packets.
157+
* @see AV_CODEC_FLAG_COPY_OPAQUE
175158
*/
176159
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
177160

@@ -182,6 +165,14 @@
182165
*/
183166
#define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21)
184167

168+
/**
169+
* The encoder is able to output reconstructed frame data, i.e. raw frames that
170+
* would be produced by decoding the encoded bitstream.
171+
*
172+
* Reconstructed frame output is enabled by the AV_CODEC_FLAG_RECON_FRAME flag.
173+
*/
174+
#define AV_CODEC_CAP_ENCODER_RECON_FRAME (1 << 22)
175+
185176
/**
186177
* AVProfile.
187178
*/
@@ -214,19 +205,21 @@ typedef struct AVCodec {
214205
*/
215206
int capabilities;
216207
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
217-
const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}
218-
const enum AVPixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
219-
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
220-
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
221-
#if FF_API_OLD_CHANNEL_LAYOUT
208+
222209
/**
223-
* @deprecated use ch_layouts instead
210+
* Deprecated codec capabilities.
224211
*/
225212
attribute_deprecated
226-
const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
227-
#endif
213+
const AVRational *supported_framerates; ///< @deprecated use avcodec_get_supported_config()
214+
attribute_deprecated
215+
const enum AVPixelFormat *pix_fmts; ///< @deprecated use avcodec_get_supported_config()
216+
attribute_deprecated
217+
const int *supported_samplerates; ///< @deprecated use avcodec_get_supported_config()
218+
attribute_deprecated
219+
const enum AVSampleFormat *sample_fmts; ///< @deprecated use avcodec_get_supported_config()
220+
228221
const AVClass *priv_class; ///< AVClass for the private context
229-
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
222+
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN}
230223

231224
/**
232225
* Group name of the codec implementation.
@@ -242,7 +235,9 @@ typedef struct AVCodec {
242235

243236
/**
244237
* Array of supported channel layouts, terminated with a zeroed layout.
238+
* @deprecated use avcodec_get_supported_config()
245239
*/
240+
attribute_deprecated
246241
const AVChannelLayout *ch_layouts;
247242
} AVCodec;
248243

include/libavcodec/codec_desc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef struct AVCodecDescriptor {
6060
const char *const *mime_types;
6161
/**
6262
* If non-NULL, an array of profiles recognized for this codec.
63-
* Terminated with FF_PROFILE_UNKNOWN.
63+
* Terminated with AV_PROFILE_UNKNOWN.
6464
*/
6565
const struct AVProfile *profiles;
6666
} AVCodecDescriptor;
@@ -90,6 +90,12 @@ typedef struct AVCodecDescriptor {
9090
* equal.
9191
*/
9292
#define AV_CODEC_PROP_REORDER (1 << 3)
93+
94+
/**
95+
* Video codec supports separate coding of fields in interlaced frames.
96+
*/
97+
#define AV_CODEC_PROP_FIELDS (1 << 4)
98+
9399
/**
94100
* Subtitle codec is bitmap based
95101
* Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field.

0 commit comments

Comments
 (0)