internal.h
Go to the documentation of this file.
1 /*
2  * This file is part of Libav.
3  *
4  * Libav is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * Libav is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with Libav; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
24 #ifndef AVCODEC_INTERNAL_H
25 #define AVCODEC_INTERNAL_H
26 
27 #include <stdint.h>
28 
29 #include "libavutil/pixfmt.h"
30 #include "avcodec.h"
31 
32 typedef struct InternalBuffer {
36  int width;
37  int height;
39  uint8_t **extended_data;
43 
44 typedef struct AVCodecInternal {
50 
56 
63  int is_copy;
64 
65 #if FF_API_OLD_DECODE_AUDIO
66 
70  int sample_count;
71 #endif
73 
75  const uint8_t *key;
76  const uint8_t *value;
77 };
78 
83 
93 
98 int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b);
99 
100 unsigned int avpriv_toupper4(unsigned int x);
101 
102 int avpriv_lock_avformat(void);
103 int avpriv_unlock_avformat(void);
104 
110 #define FF_MAX_EXTRADATA_SIZE ((1 << 28) - FF_INPUT_BUFFER_PADDING_SIZE)
111 
127 int ff_alloc_packet(AVPacket *avpkt, int size);
128 
129 
130 int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame);
131 
132 #endif /* AVCODEC_INTERNAL_H */
int size
Audio Video Frame.
Definition: avcodec.h:985
int avpriv_unlock_avformat(void)
Definition: utils.c:1796
int buffer_count
internal buffer count used by default get/release/reget_buffer().
Definition: internal.h:49
enum PixelFormat pix_fmt
Definition: v4l.c:65
InternalBuffer * buffer
internal buffers used by default get/release/reget_buffer().
Definition: internal.h:55
#define b
Definition: swscale.c:1335
int nb_channels
Definition: internal.h:41
AVHWAccel * ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt)
Return the hardware accelerated codec for codec codec_id and pixel format pix_fmt.
Definition: utils.c:1755
uint8_t * base[AV_NUM_DATA_POINTERS]
Definition: internal.h:33
struct InternalBuffer InternalBuffer
enum CodecID codec_id
Definition: mov_chan.c:417
int is_copy
Whether the parent AVCodecContext is a copy of the context which had init() called on it...
Definition: internal.h:63
uint8_t ** extended_data
Definition: internal.h:39
#define AV_NUM_DATA_POINTERS
Definition: avcodec.h:989
int avpriv_lock_avformat(void)
Definition: utils.c:1787
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Definition: utils.c:1867
int ff_alloc_packet(AVPacket *avpkt, int size)
Check AVPacket size and/or allocate data.
Definition: utils.c:845
enum PixelFormat pix_fmt
Definition: internal.h:38
int audio_data_size
Definition: internal.h:40
external API header
AVHWAccel.
Definition: avcodec.h:3276
uint8_t * data[AV_NUM_DATA_POINTERS]
Definition: internal.h:34
main external API structure.
Definition: avcodec.h:1329
struct AVCodecInternal AVCodecInternal
unsigned int avpriv_toupper4(unsigned int x)
Definition: utils.c:1805
int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt)
Determine whether pix_fmt is a hardware accelerated format.
Definition: imgconvert.c:424
const uint8_t * key
Definition: internal.h:75
const uint8_t * value
Definition: internal.h:76
PixelFormat
Pixel format.
Definition: pixfmt.h:62
CodecID
Identify the syntax and semantics of the bitstream.
Definition: avcodec.h:83
pixel format definitions
static const struct @46 tab
TwinVQ codebooks.
int linesize[AV_NUM_DATA_POINTERS]
Definition: internal.h:35
int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b)
Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
Definition: utils.c:1708