Skip to content

Commit

Permalink
Merge pull request #11 from vrienstudios/upd
Browse files Browse the repository at this point in the history
Update the cincludes to be up to date with the current FFmpeg version
  • Loading branch information
momeemt authored Feb 10, 2024
2 parents d142e0a + 646b38a commit 1b66579
Show file tree
Hide file tree
Showing 89 changed files with 3,661 additions and 1,476 deletions.
613 changes: 306 additions & 307 deletions src/cinclude/libavcodec/avcodec.h

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions src/cinclude/libavcodec/avfft.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#ifndef AVCODEC_AVFFT_H
#define AVCODEC_AVFFT_H

#include "libavutil/attributes.h"
#include "version_major.h"
#if FF_API_AVFFT

/**
* @file
* @ingroup lavc_fft
Expand All @@ -44,26 +48,42 @@ typedef struct FFTContext FFTContext;
* Set up a complex FFT.
* @param nbits log2 of the length of the input array
* @param inverse if 0 perform the forward transform, if 1 perform the inverse
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_FFT
*/
attribute_deprecated
FFTContext *av_fft_init(int nbits, int inverse);

/**
* Do the permutation needed BEFORE calling ff_fft_calc().
* @deprecated without replacement
*/
attribute_deprecated
void av_fft_permute(FFTContext *s, FFTComplex *z);

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

attribute_deprecated
void av_fft_end(FFTContext *s);

/**
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_MDCT,
* with a flag of AV_TX_FULL_IMDCT for a replacement to av_imdct_calc.
*/
attribute_deprecated
FFTContext *av_mdct_init(int nbits, int inverse, double scale);
attribute_deprecated
void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
attribute_deprecated
void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
attribute_deprecated
void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
attribute_deprecated
void av_mdct_end(FFTContext *s);

/* Real Discrete Fourier Transform */
Expand All @@ -81,9 +101,14 @@ typedef struct RDFTContext RDFTContext;
* Set up a real FFT.
* @param nbits log2 of the length of the input array
* @param trans the type of transform
*
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_RDFT
*/
attribute_deprecated
RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
attribute_deprecated
void av_rdft_calc(RDFTContext *s, FFTSample *data);
attribute_deprecated
void av_rdft_end(RDFTContext *s);

/* Discrete Cosine Transform */
Expand All @@ -106,13 +131,19 @@ enum DCTTransformType {
* @param type the type of transform
*
* @note the first element of the input of DST-I is ignored
*
* @deprecated use av_tx_init from libavutil/tx.h with an appropriate type of AV_TX_FLOAT_DCT
*/
attribute_deprecated
DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
attribute_deprecated
void av_dct_calc(DCTContext *s, FFTSample *data);
attribute_deprecated
void av_dct_end (DCTContext *s);

/**
* @}
*/

#endif /* FF_API_AVFFT */
#endif /* AVCODEC_AVFFT_H */
65 changes: 40 additions & 25 deletions src/cinclude/libavcodec/bsf.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,28 @@
#include "packet.h"

/**
* @addtogroup lavc_core
* @defgroup lavc_bsf Bitstream filters
* @ingroup libavc
*
* Bitstream filters transform encoded media data without decoding it. This
* allows e.g. manipulating various header values. Bitstream filters operate on
* @ref AVPacket "AVPackets".
*
* The bitstream filtering API is centered around two structures:
* AVBitStreamFilter and AVBSFContext. The former represents a bitstream filter
* in abstract, the latter a specific filtering process. Obtain an
* AVBitStreamFilter using av_bsf_get_by_name() or av_bsf_iterate(), then pass
* it to av_bsf_alloc() to create an AVBSFContext. Fill in the user-settable
* AVBSFContext fields, as described in its documentation, then call
* av_bsf_init() to prepare the filter context for use.
*
* Submit packets for filtering using av_bsf_send_packet(), obtain filtered
* results with av_bsf_receive_packet(). When no more input packets will be
* sent, submit a NULL AVPacket to signal the end of the stream to the filter.
* av_bsf_receive_packet() will then return trailing packets, if any are
* produced by the filter.
*
* Finally, free the filter context with av_bsf_free().
* @{
*/

Expand Down Expand Up @@ -107,20 +128,6 @@ typedef struct AVBitStreamFilter {
* code to this class.
*/
const AVClass *priv_class;

/*****************************************************************
* No fields below this line are part of the public API. They
* may not be used outside of libavcodec and can be changed and
* removed at will.
* New public fields should be added right above.
*****************************************************************
*/

int priv_data_size;
int (*init)(AVBSFContext *ctx);
int (*filter)(AVBSFContext *ctx, AVPacket *pkt);
void (*close)(AVBSFContext *ctx);
void (*flush)(AVBSFContext *ctx);
} AVBitStreamFilter;

/**
Expand All @@ -146,9 +153,9 @@ const AVBitStreamFilter *av_bsf_iterate(void **opaque);
* av_bsf_init() before sending any data to the filter.
*
* @param filter the filter for which to allocate an instance.
* @param ctx a pointer into which the pointer to the newly-allocated context
* will be written. It must be freed with av_bsf_free() after the
* filtering is done.
* @param[out] ctx a pointer into which the pointer to the newly-allocated context
* will be written. It must be freed with av_bsf_free() after the
* filtering is done.
*
* @return 0 on success, a negative AVERROR code on failure
*/
Expand All @@ -157,6 +164,8 @@ int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx);
/**
* Prepare the filter for use, after all the parameters and options have been
* set.
*
* @param ctx a AVBSFContext previously allocated with av_bsf_alloc()
*/
int av_bsf_init(AVBSFContext *ctx);

Expand All @@ -167,22 +176,26 @@ int av_bsf_init(AVBSFContext *ctx);
* av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or
* AVERROR_EOF.
*
* @param ctx an initialized AVBSFContext
* @param pkt the packet to filter. The bitstream filter will take ownership of
* the packet and reset the contents of pkt. pkt is not touched if an error occurs.
* If pkt is empty (i.e. NULL, or pkt->data is NULL and pkt->side_data_elems zero),
* it signals the end of the stream (i.e. no more non-empty packets will be sent;
* sending more empty packets does nothing) and will cause the filter to output
* any packets it may have buffered internally.
*
* @return 0 on success. AVERROR(EAGAIN) if packets need to be retrieved from the
* filter (using av_bsf_receive_packet()) before new input can be consumed. Another
* negative AVERROR value if an error occurs.
* @return
* - 0 on success.
* - AVERROR(EAGAIN) if packets need to be retrieved from the filter (using
* av_bsf_receive_packet()) before new input can be consumed.
* - Another negative AVERROR value if an error occurs.
*/
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);

/**
* Retrieve a filtered packet.
*
* @param ctx an initialized AVBSFContext
* @param[out] pkt this struct will be filled with the contents of the filtered
* packet. It is owned by the caller and must be freed using
* av_packet_unref() when it is no longer needed.
Expand All @@ -193,10 +206,12 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);
* overwritten by the returned data. On failure, pkt is not
* touched.
*
* @return 0 on success. AVERROR(EAGAIN) if more packets need to be sent to the
* filter (using av_bsf_send_packet()) to get more output. AVERROR_EOF if there
* will be no further output from the filter. Another negative AVERROR value if
* an error occurs.
* @return
* - 0 on success.
* - AVERROR(EAGAIN) if more packets need to be sent to the filter (using
* av_bsf_send_packet()) to get more output.
* - AVERROR_EOF if there will be no further output from the filter.
* - Another negative AVERROR value if an error occurs.
*
* @note one input packet may result in several output packets, so after sending
* a packet with av_bsf_send_packet(), this function needs to be called
Expand Down
Loading

0 comments on commit 1b66579

Please sign in to comment.