1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/internal: Move ff_reget_buffer() to decode.h

Only used by decoders.

Also clean up the headers a bit while removing now unnecessary
internal.h inclusions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-08-24 20:49:25 +02:00
parent 17e23aed41
commit e2c24e6a29
56 changed files with 55 additions and 91 deletions

View File

@ -24,13 +24,11 @@
* Autodesk RLE Video Decoder by Konstantin Shishkov
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "msrledec.h"
typedef struct AascContext {

View File

@ -27,7 +27,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct AnmContext {
AVFrame *frame;

View File

@ -31,6 +31,7 @@
#include "avcodec.h"
#include "cga_data.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#define ATTR_BOLD 0x01 /**< Bold/Bright-foreground (mode 1) */

View File

@ -19,18 +19,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct ArgoContext {
GetByteContext gb;

View File

@ -21,6 +21,7 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"

View File

@ -32,7 +32,7 @@
#include "bethsoftvideo.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct BethsoftvidContext {
AVFrame *frame;

View File

@ -32,6 +32,7 @@
#include "binkdsp.h"
#include "blockdsp.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "hpeldsp.h"
#include "internal.h"

View File

@ -22,6 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
typedef struct C93DecoderContext {

View File

@ -22,6 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
/**

View File

@ -32,7 +32,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#define CDTOONS_HEADER_SIZE 44
#define CDTOONS_MAX_SPRITES 1200

View File

@ -34,7 +34,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/common.h"
@ -42,7 +41,6 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
typedef uint8_t cvid_codebook[12];

View File

@ -30,6 +30,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "idctdsp.h"
#include "internal.h"

View File

@ -22,10 +22,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "get_bits.h"
#include "internal.h"
#include "decode.h"
#define FRAME_HEADER_SIZE 64

View File

@ -18,12 +18,10 @@
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "libavutil/common.h"
#if CONFIG_ZLIB

View File

@ -112,4 +112,11 @@ int ff_decode_preinit(AVCodecContext *avctx);
*/
int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt);
#define FF_REGET_BUFFER_FLAG_READONLY 1 ///< the returned buffer does not need to be writable
/**
* Identical in function to ff_get_buffer(), except it reuses the existing buffer
* if available.
*/
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags);
#endif /* AVCODEC_DECODE_H */

View File

@ -27,7 +27,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef enum CinVideoBitmapIndex {
CIN_CUR_BMP = 0, /* current */

View File

@ -26,7 +26,7 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "get_bits.h"
#include "golomb.h"

View File

@ -43,6 +43,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"
#include "zlib_wrapper.h"

View File

@ -34,15 +34,13 @@
* in which the header is only 12 bytes.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "mathops.h"
#define FLI_256_COLOR 4

View File

@ -26,6 +26,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#include "lzw.h"
#include "gif.h"

View File

@ -23,7 +23,6 @@
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
typedef struct SimbiosisIMXContext {
AVFrame *frame;

View File

@ -30,10 +30,9 @@
#define BITSTREAM_READER_LE
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "indeo2data.h"
#include "internal.h"
#include "mathops.h"
typedef struct Ir2Context{
AVCodecContext *avctx;

View File

@ -219,13 +219,6 @@ static av_always_inline float ff_exp2fi(int x) {
*/
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags);
#define FF_REGET_BUFFER_FLAG_READONLY 1 ///< the returned buffer does not need to be writable
/**
* Identical in function to ff_get_buffer(), except it reuses the existing buffer
* if available.
*/
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags);
int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx);
int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec);

View File

@ -30,6 +30,7 @@
#include "avcodec.h"
#include "blockdsp.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"

View File

@ -29,7 +29,7 @@
#include "bytestream.h"
#include "codec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "packet.h"
#include "png.h"
#include "pngdsp.h"

View File

@ -19,13 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#define BITSTREAM_READER_LE
@ -33,7 +28,7 @@
#include "get_bits.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct MidiVidContext {
GetByteContext gb;

View File

@ -35,7 +35,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#define MM_PREAMBLE_SIZE 6

View File

@ -27,12 +27,12 @@
#include "libavutil/thread.h"
#include "avcodec.h"
#include "bytestream.h"
#include "bswapdsp.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "golomb.h"
#include "internal.h"
#include "mathops.h"
#define MOBI_RL_VLC_BITS 12
#define MOBI_MV_VLC_BITS 6

View File

@ -27,7 +27,7 @@
#include "get_bits.h"
#include "bswapdsp.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#define MAX_HUFF_CODES 16

View File

@ -28,14 +28,11 @@
* The MS RLE decoder outputs PAL8 colorspace data.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#include "msrledec.h"
#include "libavutil/imgutils.h"

View File

@ -26,7 +26,7 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "mss12.h"
typedef struct MSS1Context {

View File

@ -25,6 +25,7 @@
#include "libavutil/avassert.h"
#include "codec_internal.h"
#include "decode.h"
#include "error_resilience.h"
#include "internal.h"
#include "mpeg_er.h"

View File

@ -27,7 +27,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "mathops.h"
#include "mss34dsp.h"

View File

@ -31,8 +31,8 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"
#include "jpegtables.h"
#include "mss34dsp.h"
#include "unary.h"

View File

@ -26,8 +26,6 @@
* http://www.pcisys.net/~melanson/codecs/
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/internal.h"
@ -35,7 +33,6 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#define PALETTE_COUNT 256
#define CHECK_STREAM_PTR(n) \

View File

@ -30,6 +30,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "idctdsp.h"
#include "internal.h"
#include "rtjpeg.h"

View File

@ -25,7 +25,7 @@
#include "bytestream.h"
#include "copy_block.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
static const uint8_t block_sequences[16][8] = {

View File

@ -31,15 +31,12 @@
* data. 24-bit data is RGB24 and 32-bit data is RGB32.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avcodec.h"
#include "decode.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
typedef struct QtrleContext {
AVCodecContext *avctx;

View File

@ -26,12 +26,11 @@
*/
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "roqvideo.h"
static void roqvideo_decode_frame(RoqContext *ri, GetByteContext *gb)

View File

@ -35,15 +35,12 @@
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/internal.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct RpzaContext {

View File

@ -45,7 +45,6 @@
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#define TILE_SIZE 8

View File

@ -27,6 +27,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#include "scpr.h"
#include "scpr3.h"

View File

@ -34,7 +34,6 @@
*/
#include <stdint.h>
#include <string.h>
#include <zlib.h>
#include "libavutil/imgutils.h"
@ -43,7 +42,7 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct ScreenpressoContext {
AVFrame *current;

View File

@ -51,6 +51,7 @@
#define BITSTREAM_READER_LE
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"
#include "mathops.h"

View File

@ -28,16 +28,12 @@
* The SMC decoder outputs PAL8 colorspace data.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#define CPAIR 2
#define CQUAD 4

View File

@ -27,6 +27,7 @@
#define BITSTREAM_READER_LE
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"

View File

@ -35,6 +35,7 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"

View File

@ -30,8 +30,8 @@
#include "bswapdsp.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"
#define TM2_ESCAPE 0x80000000
#define TM2_DELTAS 64

View File

@ -34,13 +34,9 @@
* Supports: BGR8,BGR555,BGR24 - only BGR8 and BGR555 tested
*/
#include <stdio.h>
#include <stdlib.h>
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#include "msrledec.h"
#include "zlib_wrapper.h"

View File

@ -32,8 +32,8 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "internal.h"
#include "mathops.h"
#include "tscc2data.h"

View File

@ -24,14 +24,10 @@
* IBM Ultimotion Video Decoder.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "ulti_cb.h"

View File

@ -25,14 +25,10 @@
* As Alex Beregszaszi discovered, this is effectively RFB data dump
*/
#include <stdio.h>
#include <stdlib.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "bytestream.h"
enum EncTypes {

View File

@ -78,6 +78,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#define PALETTE_COUNT 256

View File

@ -21,15 +21,13 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "zlib_wrapper.h"
#include <zlib.h>

View File

@ -26,7 +26,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct XanContext {
AVCodecContext *avctx;

View File

@ -26,11 +26,10 @@
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
typedef struct YopDecContext {
AVCodecContext *avctx;