@@ -91,8 +91,8 @@
#include "libavutil/channel_layout.h"
#include "libavutil/thread.h"
+#include "avcodecinternal.h"
#include "decode.h"
-#include "internal.h"
static VLC vlc_scalefactors;
static VLC vlc_spectral[11];
@@ -34,8 +34,8 @@
#include "libavutil/time.h"
#include "amfenc.h"
+#include "avcodecinternal.h"
#include "encode.h"
-#include "internal.h"
#if CONFIG_D3D11VA
#include <d3d11.h>
@@ -19,8 +19,8 @@
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "amfenc.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
-#include "internal.h"
#define OFFSET(x) offsetof(AmfContext, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
@@ -20,8 +20,8 @@
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "amfenc.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
-#include "internal.h"
#include <AMF/components/PreAnalysis.h>
#define OFFSET(x) offsetof(AmfContext, x)
@@ -19,8 +19,8 @@
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "amfenc.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
-#include "internal.h"
#include <AMF/components/PreAnalysis.h>
#define OFFSET(x) offsetof(AmfContext, x)
@@ -25,9 +25,9 @@
#include "libavutil/channel_layout.h"
#include "aptx.h"
#include "audio_frame_queue.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "encode.h"
-#include "internal.h"
typedef struct AptXEncContext {
AptXContext common;
@@ -28,10 +28,10 @@
#include "config.h"
#include "audio_frame_queue.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.h"
-#include "internal.h"
#include "libavformat/isom.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
@@ -26,6 +26,7 @@
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "av1_parse.h"
#include "decode.h"
#include "av1dec.h"
@@ -33,7 +34,6 @@
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
-#include "internal.h"
#include "hwconfig.h"
#include "profiles.h"
#include "thread.h"
@@ -28,17 +28,16 @@
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
-#include "libavutil/fifo.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/thread.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "avcodec_internal.h"
#include "bsf.h"
#include "codec_internal.h"
#include "decode.h"
-#include "encode.h"
#include "frame_thread_encoder.h"
#include "hwconfig.h"
#include "internal.h"
new file mode 100644
@@ -0,0 +1,139 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Header containing AVCodecInternal, to be included by codecs
+ * and internal APIs for codecs needing to access it.
+ */
+
+#ifndef AVCODEC_AVCODECINTERNAL_H
+#define AVCODEC_AVCODECINTERNAL_H
+
+#include <stdint.h>
+
+#include "config.h"
+
+#include "libavutil/buffer.h"
+#include "libavutil/channel_layout.h"
+#include "libavutil/frame.h"
+#include "packet.h"
+
+#if CONFIG_LCMS2
+# include "fflcms2.h"
+#endif
+
+typedef struct AVCodecInternal {
+ /**
+ * When using frame-threaded decoding, this field is set for the first
+ * worker thread (e.g. to decode extradata just once).
+ */
+ int is_copy;
+
+ /**
+ * Audio encoders can set this flag during init to indicate that they
+ * want the small last frame to be padded to a multiple of pad_samples.
+ */
+ int pad_samples;
+
+ AVBufferRef *pool;
+
+ void *thread_ctx;
+
+ /**
+ * This packet is used to hold the packet given to decoders
+ * implementing the .decode API; it is unused by the generic
+ * code for decoders implementing the .receive_frame API and
+ * may be freely used (but not freed) by them with the caveat
+ * that the packet will be unreferenced generically in
+ * avcodec_flush_buffers().
+ */
+ AVPacket *in_pkt;
+ struct AVBSFContext *bsf;
+
+ /**
+ * Properties (timestamps+side data) extracted from the last packet passed
+ * for decoding.
+ */
+ AVPacket *last_pkt_props;
+
+ /**
+ * temporary buffer used for encoders to store their bitstream
+ */
+ uint8_t *byte_buffer;
+ unsigned int byte_buffer_size;
+
+ void *frame_thread_encoder;
+
+ /**
+ * The input frame is stored here for encoders implementing the simple
+ * encode API.
+ *
+ * Not allocated in other cases.
+ */
+ AVFrame *in_frame;
+
+ /**
+ * When the AV_CODEC_FLAG_RECON_FRAME flag is used. the encoder should store
+ * here the reconstructed frame corresponding to the last returned packet.
+ *
+ * Not allocated in other cases.
+ */
+ AVFrame *recon_frame;
+
+ /**
+ * If this is set, then FFCodec->close (if existing) needs to be called
+ * for the parent AVCodecContext.
+ */
+ int needs_close;
+
+ /**
+ * Number of audio samples to skip at the start of the next decoded frame
+ */
+ int skip_samples;
+
+ /**
+ * hwaccel-specific private data
+ */
+ void *hwaccel_priv_data;
+
+ /**
+ * checks API usage: after codec draining, flush is required to resume operation
+ */
+ int draining;
+
+ /**
+ * Temporary buffers for newly received or not yet output packets/frames.
+ */
+ AVPacket *buffer_pkt;
+ AVFrame *buffer_frame;
+ int draining_done;
+
+ /* used when avctx flag AV_CODEC_FLAG_DROPCHANGED is set */
+ int changed_frames_dropped;
+ int initial_format;
+ int initial_width, initial_height;
+ int initial_sample_rate;
+ AVChannelLayout initial_ch_layout;
+
+#if CONFIG_LCMS2
+ FFIccContext icc; /* used to read and write embedded ICC profiles */
+#endif
+} AVCodecInternal;
+
+#endif /* AVCODEC_AVCODECINTERNAL_H */
@@ -37,10 +37,10 @@
#define BITSTREAM_READER_LE
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "decode.h"
#include "get_bits.h"
#include "codec_internal.h"
-#include "internal.h"
#include "wma_freqs.h"
#define MAX_DCT_CHANNELS 6
@@ -24,17 +24,16 @@
*/
#include "libavutil/attributes.h"
-#include "libavutil/buffer.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
-#include "internal.h"
#include "thread.h"
#include "cfhd.h"
@@ -23,12 +23,11 @@
#include "libavutil/common.h"
#include "libavutil/ffmath.h"
-#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "celp_filters.h"
#include "codec_internal.h"
#include "decode.h"
-#include "internal.h"
#include "libavutil/lfg.h"
typedef struct CNGContext {
@@ -57,9 +57,9 @@
#include <libcrystalhd/libcrystalhd_if.h>
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
-#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
@@ -34,12 +34,12 @@
#include "libavutil/pixdesc.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "bsf.h"
#include "codec_internal.h"
#include "decode.h"
#include "hwconfig.h"
#include "nvdec.h"
-#include "internal.h"
#if !NVDECAPI_CHECK_VERSION(9, 0)
#define cudaVideoSurfaceFormat_YUV444 2
@@ -28,19 +28,15 @@
#endif
#include "libavutil/avassert.h"
-#include "libavutil/avstring.h"
-#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
-#include "libavutil/fifo.h"
#include "libavutil/frame.h"
#include "libavutil/hwcontext.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
-#include "libavutil/intmath.h"
-#include "libavutil/opt.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "avcodec_internal.h"
#include "bytestream.h"
#include "bsf.h"
@@ -51,7 +51,7 @@
#include "libavutil/hwcontext.h"
#include "avcodec.h"
-#include "internal.h"
+#include "avcodecinternal.h"
typedef void DECODER_BUFFER_DESC;
@@ -27,11 +27,11 @@
#include "libavutil/samplefmt.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "avcodec_internal.h"
#include "codec_internal.h"
#include "encode.h"
#include "frame_thread_encoder.h"
-#include "internal.h"
typedef struct EncodeContext {
AVCodecInternal avci;
@@ -27,8 +27,8 @@
#include "libavutil/opt.h"
#include "libavutil/thread.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "encode.h"
-#include "internal.h"
#include "pthread_internal.h"
#define MAX_THREADS 64
@@ -31,6 +31,7 @@
#include "libavutil/version.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "internal.h"
typedef struct FramePool {
@@ -35,6 +35,7 @@
#include "libavutil/thread.h"
#include "libavutil/video_enc_params.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "internal.h"
#include "error_resilience.h"
@@ -37,6 +37,7 @@
#include "libavutil/pixdesc.h"
#include "libavutil/timecode.h"
+#include "avcodecinternal.h"
#include "bswapdsp.h"
#include "bytestream.h"
#include "cabac_functions.h"
@@ -48,7 +49,6 @@
#include "hevc_parse.h"
#include "hevcdec.h"
#include "hwconfig.h"
-#include "internal.h"
#include "profiles.h"
#include "thread.h"
#include "threadframe.h"
@@ -26,17 +26,11 @@
#include <stdint.h>
-#include "libavutil/buffer.h"
-#include "libavutil/channel_layout.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
#include "config.h"
-#if CONFIG_LCMS2
-# include "fflcms2.h"
-#endif
-
#define FF_SANE_NB_CHANNELS 512U
#if HAVE_SIMD_ALIGN_64
@@ -49,104 +43,6 @@
# define STRIDE_ALIGN 8
#endif
-typedef struct AVCodecInternal {
- /**
- * When using frame-threaded decoding, this field is set for the first
- * worker thread (e.g. to decode extradata just once).
- */
- int is_copy;
-
- /**
- * Audio encoders can set this flag during init to indicate that they
- * want the small last frame to be padded to a multiple of pad_samples.
- */
- int pad_samples;
-
- AVBufferRef *pool;
-
- void *thread_ctx;
-
- /**
- * This packet is used to hold the packet given to decoders
- * implementing the .decode API; it is unused by the generic
- * code for decoders implementing the .receive_frame API and
- * may be freely used (but not freed) by them with the caveat
- * that the packet will be unreferenced generically in
- * avcodec_flush_buffers().
- */
- AVPacket *in_pkt;
- struct AVBSFContext *bsf;
-
- /**
- * Properties (timestamps+side data) extracted from the last packet passed
- * for decoding.
- */
- AVPacket *last_pkt_props;
-
- /**
- * temporary buffer used for encoders to store their bitstream
- */
- uint8_t *byte_buffer;
- unsigned int byte_buffer_size;
-
- void *frame_thread_encoder;
-
- /**
- * The input frame is stored here for encoders implementing the simple
- * encode API.
- *
- * Not allocated in other cases.
- */
- AVFrame *in_frame;
-
- /**
- * When the AV_CODEC_FLAG_RECON_FRAME flag is used. the encoder should store
- * here the reconstructed frame corresponding to the last returned packet.
- *
- * Not allocated in other cases.
- */
- AVFrame *recon_frame;
-
- /**
- * If this is set, then FFCodec->close (if existing) needs to be called
- * for the parent AVCodecContext.
- */
- int needs_close;
-
- /**
- * Number of audio samples to skip at the start of the next decoded frame
- */
- int skip_samples;
-
- /**
- * hwaccel-specific private data
- */
- void *hwaccel_priv_data;
-
- /**
- * checks API usage: after codec draining, flush is required to resume operation
- */
- int draining;
-
- /**
- * Temporary buffers for newly received or not yet output packets/frames.
- */
- AVPacket *buffer_pkt;
- AVFrame *buffer_frame;
- int draining_done;
-
- /* used when avctx flag AV_CODEC_FLAG_DROPCHANGED is set */
- int changed_frames_dropped;
- int initial_format;
- int initial_width, initial_height;
- int initial_sample_rate;
- AVChannelLayout initial_ch_layout;
-
-#if CONFIG_LCMS2
- FFIccContext icc; /* used to read and write embedded ICC profiles */
-#endif
-} AVCodecInternal;
-
/**
* Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
* If there is no such matching pair then size is returned.
@@ -40,6 +40,7 @@
#include "av1.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "bsf.h"
#include "codec_internal.h"
#include "encode.h"
@@ -20,8 +20,8 @@
*/
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
-#include "internal.h"
#include "libavcodec/ass.h"
#include "libavutil/avstring.h"
#include "libavutil/avutil.h"
@@ -32,10 +32,10 @@
#include "atsc_a53.h"
#include "av1_parse.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
-#include "internal.h"
#define FF_DAV1D_VERSION_AT_LEAST(x,y) \
(DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y))
@@ -35,9 +35,9 @@
#include "libavutil/frame.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
-#include "internal.h"
#include <jxl/decode.h>
#include <jxl/thread_parallel_runner.h>
@@ -28,9 +28,9 @@
#include "libavutil/opt.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
-#include "internal.h"
#include "mathops.h"
#include "libopus.h"
#include "vorbis_data.h"
@@ -31,9 +31,9 @@
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "encode.h"
-#include "internal.h"
typedef struct librav1eContext {
const AVClass *class;
@@ -31,6 +31,7 @@
#include "libavutil/time.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "encode.h"
#include "internal.h"
@@ -33,13 +33,13 @@
#include "libavutil/internal.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
#include "h264_parse.h"
#include "h264_ps.h"
#include "hevc_parse.h"
#include "hwconfig.h"
-#include "internal.h"
#include "jni.h"
#include "mediacodec_wrapper.h"
#include "mediacodecdec_common.h"
@@ -22,13 +22,13 @@
#define _WIN32_WINNT 0x0602
#endif
+#include "avcodecinternal.h"
#include "encode.h"
#include "mf_utils.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "codec_internal.h"
-#include "internal.h"
#include "compat/w32dlfcn.h"
typedef struct MFContext {
@@ -37,20 +37,19 @@
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "blockdsp.h"
#include "codec_internal.h"
#include "copy_block.h"
#include "decode.h"
#include "hwconfig.h"
#include "idctdsp.h"
-#include "internal.h"
#include "jpegtables.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "jpeglsdec.h"
#include "profiles.h"
#include "put_bits.h"
-#include "tiff.h"
#include "exif.h"
#include "bytestream.h"
#include "tiff_common.h"
@@ -34,10 +34,10 @@
#include <stdatomic.h>
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
#include "hwconfig.h"
-#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
#include "libavutil/common.h"
@@ -27,7 +27,6 @@
#include "avcodec.h"
#include "encode.h"
-#include "internal.h"
#include "decode.h"
#include "motion_est.h"
#include "mpegpicture.h"
@@ -43,6 +43,7 @@
#include "libavutil/opt.h"
#include "libavutil/thread.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "dct.h"
#include "encode.h"
#include "idctdsp.h"
@@ -32,9 +32,9 @@
#include "libavutil/pixfmt.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "decode.h"
#include "nvdec.h"
-#include "internal.h"
#if !NVDECAPI_CHECK_VERSION(9, 0)
#define cudaVideoSurfaceFormat_YUV444 2
@@ -21,9 +21,9 @@
*/
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "nvdec.h"
#include "decode.h"
-#include "internal.h"
#include "av1dec.h"
@@ -24,9 +24,9 @@
#include <string.h>
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "nvdec.h"
#include "decode.h"
-#include "internal.h"
#include "h264dec.h"
static void dpb_add(const H264Context *h, CUVIDH264DPBENTRY *dst, const H264Picture *src,
@@ -24,9 +24,9 @@
#include <string.h>
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "nvdec.h"
#include "decode.h"
-#include "internal.h"
#include "hevcdec.h"
#include "hevc_data.h"
@@ -21,7 +21,7 @@
*/
#include "avcodec.h"
-#include "internal.h"
+#include "avcodecinternal.h"
#include "mjpegdec.h"
#include "nvdec.h"
#include "decode.h"
@@ -23,7 +23,7 @@
#include "config_components.h"
#include "avcodec.h"
-#include "internal.h"
+#include "avcodecinternal.h"
#include "mpegvideo.h"
#include "nvdec.h"
#include "decode.h"
@@ -21,7 +21,7 @@
*/
#include "avcodec.h"
-#include "internal.h"
+#include "avcodecinternal.h"
#include "mpeg4videodec.h"
#include "mpeg4videodefs.h"
#include "nvdec.h"
@@ -23,7 +23,7 @@
#include "config_components.h"
#include "avcodec.h"
-#include "internal.h"
+#include "avcodecinternal.h"
#include "nvdec.h"
#include "decode.h"
#include "vc1.h"
@@ -21,9 +21,9 @@
*/
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "nvdec.h"
#include "decode.h"
-#include "internal.h"
#include "vp8.h"
static unsigned char safe_get_ref_idx(VP8Frame *frame)
@@ -23,9 +23,9 @@
#include "libavutil/pixdesc.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "nvdec.h"
#include "decode.h"
-#include "internal.h"
#include "vp9shared.h"
static int nvdec_vp9_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
@@ -32,7 +32,7 @@
#include "libavutil/mem.h"
#include "avcodec.h"
-#include "internal.h"
+#include "avcodecinternal.h"
#include "mathops.h"
#include "opus.h"
#include "opus_parse.h"
@@ -28,11 +28,11 @@
#include <stdint.h>
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "avcodec_internal.h"
#include "codec_internal.h"
#include "decode.h"
#include "hwconfig.h"
-#include "internal.h"
#include "pthread_internal.h"
#include "thread.h"
#include "threadframe.h"
@@ -22,15 +22,12 @@
* @see doc/multithreading.txt
*/
-#include "config.h"
-
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
-#include "internal.h"
#include "pthread_internal.h"
#include "thread.h"
-#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
@@ -44,8 +44,8 @@
#include "libavutil/mastering_display_metadata.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
-#include "internal.h"
#include "decode.h"
#include "hwconfig.h"
#include "qsv.h"
@@ -25,11 +25,11 @@
*/
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "bswapdsp.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
-#include "internal.h"
#include "raw.h"
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
@@ -24,9 +24,9 @@
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "encode.h"
-#include "internal.h" //For AVCodecInternal.recon_frame
#include "me_cmp.h"
#include "packet_internal.h"
#include "snow_dwt.h"
@@ -20,7 +20,6 @@
*/
#include "bytestream.h"
-#include "internal.h"
static void RENAME(v210_enc)(AVCodecContext *avctx,
uint8_t *dst, const AVFrame *pic)
@@ -20,9 +20,9 @@
#include "libavutil/frame.h"
#include "libavutil/pixdesc.h"
+#include "avcodecinternal.h"
#include "hwconfig.h"
#include "vaapi_decode.h"
-#include "internal.h"
#include "av1dec.h"
#include "thread.h"
@@ -23,8 +23,8 @@
#include "libavutil/pixdesc.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "decode.h"
-#include "internal.h"
#include "vaapi_decode.h"
#include "vaapi_hevc.h"
@@ -26,8 +26,8 @@
#include <limits.h>
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "decode.h"
-#include "internal.h"
#include "mpegvideodec.h"
#include "vc1.h"
#include "vdpau.h"
@@ -23,7 +23,7 @@
#include <vdpau/vdpau.h>
#include "libavutil/pixdesc.h"
#include "avcodec.h"
-#include "internal.h"
+#include "avcodecinternal.h"
#include "av1dec.h"
#include "hwconfig.h"
#include "vdpau.h"
@@ -28,9 +28,9 @@
#include "libavutil/avutil.h"
#include "libavutil/hwcontext.h"
#include "libavutil/pixdesc.h"
+#include "avcodecinternal.h"
#include "bytestream.h"
#include "decode.h"
-#include "internal.h"
#include "h264dec.h"
#include "hevcdec.h"
#include "mpegvideo.h"
@@ -21,6 +21,7 @@
*/
#include "config.h"
+#include "avcodecinternal.h"
#include "videotoolbox.h"
#include "libavutil/hwcontext_videotoolbox.h"
#include "vt_internal.h"
@@ -31,7 +32,6 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/pixdesc.h"
#include "decode.h"
-#include "internal.h"
#include "vp9shared.h"
enum VPX_CHROMA_SUBSAMPLING
@@ -24,6 +24,7 @@
#include <TargetConditionals.h>
#include <Availability.h>
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
@@ -31,7 +32,6 @@
#include "libavutil/pixdesc.h"
#include "libavutil/hwcontext_videotoolbox.h"
#include "codec_internal.h"
-#include "internal.h"
#include <pthread.h>
#include "atsc_a53.h"
#include "encode.h"
@@ -35,10 +35,10 @@
#define BITSTREAM_READER_LE
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
-#include "internal.h"
#include "vorbis.h"
#include "vorbisdsp.h"
#include "vorbis_data.h"
@@ -19,9 +19,9 @@
#ifndef AVCODEC_VULKAN_DECODE_H
#define AVCODEC_VULKAN_DECODE_H
+#include "avcodecinternal.h"
#include "decode.h"
#include "hwconfig.h"
-#include "internal.h"
#include "vulkan_video.h"
@@ -39,9 +39,9 @@
#include "libavutil/ffmath.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
-#include "internal.h"
#include "wma.h"
#define EXPVLCBITS 8
@@ -98,10 +98,10 @@
#include "libavutil/thread.h"
#include "avcodec.h"
+#include "avcodecinternal.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
-#include "internal.h"
#include "put_bits.h"
#include "wmaprodata.h"
#include "sinewin.h"
This allows to avoid exposing AVCodecInternal to files that don't need it and only include internal.h for something else (like the avpriv functions which are of course included outside of libavcodec where AVCodecInternal should never be visible). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/aacdec_template.c | 2 +- libavcodec/amfenc.c | 2 +- libavcodec/amfenc_av1.c | 2 +- libavcodec/amfenc_h264.c | 2 +- libavcodec/amfenc_hevc.c | 2 +- libavcodec/aptxenc.c | 2 +- libavcodec/audiotoolboxenc.c | 2 +- libavcodec/av1dec.c | 2 +- libavcodec/avcodec.c | 3 +- libavcodec/avcodecinternal.h | 139 ++++++++++++++++++++++++++++++ libavcodec/binkaudio.c | 2 +- libavcodec/cfhd.c | 3 +- libavcodec/cngdec.c | 3 +- libavcodec/crystalhd.c | 2 +- libavcodec/cuviddec.c | 2 +- libavcodec/decode.c | 6 +- libavcodec/dxva2_internal.h | 2 +- libavcodec/encode.c | 2 +- libavcodec/frame_thread_encoder.c | 2 +- libavcodec/get_buffer.c | 1 + libavcodec/h264dec.c | 1 + libavcodec/hevcdec.c | 2 +- libavcodec/internal.h | 104 ---------------------- libavcodec/libaomenc.c | 1 + libavcodec/libaribcaption.c | 2 +- libavcodec/libdav1d.c | 2 +- libavcodec/libjxldec.c | 2 +- libavcodec/libopusdec.c | 2 +- libavcodec/librav1e.c | 2 +- libavcodec/libx264.c | 1 + libavcodec/mediacodecdec.c | 2 +- libavcodec/mfenc.c | 2 +- libavcodec/mjpegdec.c | 3 +- libavcodec/mmaldec.c | 2 +- libavcodec/mpegpicture.c | 1 - libavcodec/mpegvideo_enc.c | 1 + libavcodec/nvdec.c | 2 +- libavcodec/nvdec_av1.c | 2 +- libavcodec/nvdec_h264.c | 2 +- libavcodec/nvdec_hevc.c | 2 +- libavcodec/nvdec_mjpeg.c | 2 +- libavcodec/nvdec_mpeg12.c | 2 +- libavcodec/nvdec_mpeg4.c | 2 +- libavcodec/nvdec_vc1.c | 2 +- libavcodec/nvdec_vp8.c | 2 +- libavcodec/nvdec_vp9.c | 2 +- libavcodec/opus_parse.c | 2 +- libavcodec/pthread_frame.c | 2 +- libavcodec/pthread_slice.c | 5 +- libavcodec/qsvdec.c | 2 +- libavcodec/rawdec.c | 2 +- libavcodec/snowenc.c | 2 +- libavcodec/v210_template.c | 1 - libavcodec/vaapi_av1.c | 2 +- libavcodec/vaapi_decode.c | 2 +- libavcodec/vdpau.c | 2 +- libavcodec/vdpau_av1.c | 2 +- libavcodec/videotoolbox.c | 2 +- libavcodec/videotoolbox_vp9.c | 2 +- libavcodec/videotoolboxenc.c | 2 +- libavcodec/vorbisdec.c | 2 +- libavcodec/vulkan_decode.h | 2 +- libavcodec/wmadec.c | 2 +- libavcodec/wmaprodec.c | 2 +- 64 files changed, 199 insertions(+), 172 deletions(-) create mode 100644 libavcodec/avcodecinternal.h