diff options
Diffstat (limited to 'src/libffmpeg/libavcodec/avcodec.h')
-rw-r--r-- | src/libffmpeg/libavcodec/avcodec.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/libffmpeg/libavcodec/avcodec.h b/src/libffmpeg/libavcodec/avcodec.h index fe7855740..5155c8fd2 100644 --- a/src/libffmpeg/libavcodec/avcodec.h +++ b/src/libffmpeg/libavcodec/avcodec.h @@ -8,7 +8,7 @@ enum CodecID { CODEC_ID_MP2, CODEC_ID_AC3, CODEC_ID_MJPEG, - CODEC_ID_OPENDIVX, + CODEC_ID_MPEG4, CODEC_ID_PCM, CODEC_ID_RAWVIDEO, CODEC_ID_MSMPEG4, @@ -45,6 +45,11 @@ extern int motion_estimation_method; #define CODEC_FLAG_HQ 0x0001 /* high quality (non real time) encoding */ #define CODEC_FLAG_QSCALE 0x0002 /* use fixed qscale */ +/* codec capabilities */ + +/* decoder can use draw_horiz_band callback */ +#define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 + #define FRAME_RATE_BASE 10000 typedef struct AVCodecContext { @@ -57,6 +62,15 @@ typedef struct AVCodecContext { int width, height; int gop_size; /* 0 = intra only */ int pix_fmt; /* pixel format, see PIX_FMT_xxx */ + + /* if non NULL, 'draw_horiz_band' is called by the libavcodec + decoder to draw an horizontal band. It improve cache usage. Not + all codecs can do that. You must check the codec capabilities + before */ + void (*draw_horiz_band)(struct AVCodecContext *s, + UINT8 **src_ptr, int linesize, + int y, int width, int height); + /* audio only */ int sample_rate; /* samples per sec */ int channels; @@ -72,6 +86,7 @@ typedef struct AVCodecContext { void *priv_data; /* the following fields are ignored */ + void *opaque; /* can be used to carry app specific stuff */ char codec_name[32]; int codec_type; /* see CODEC_TYPE_xxx */ int codec_id; /* see CODEC_ID_xxx */ @@ -88,6 +103,7 @@ typedef struct AVCodec { int (*close)(AVCodecContext *); int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, UINT8 *buf, int buf_size); + int capabilities; struct AVCodec *next; } AVCodec; @@ -104,11 +120,11 @@ extern AVCodec h263_encoder; extern AVCodec h263p_encoder; extern AVCodec rv10_encoder; extern AVCodec mjpeg_encoder; -extern AVCodec opendivx_encoder; +extern AVCodec mpeg4_encoder; extern AVCodec msmpeg4_encoder; extern AVCodec h263_decoder; -extern AVCodec opendivx_decoder; +extern AVCodec mpeg4_decoder; extern AVCodec msmpeg4_decoder; extern AVCodec mpeg_decoder; extern AVCodec h263i_decoder; @@ -147,7 +163,17 @@ void img_resample(ImgReSampleContext *s, void img_resample_close(ImgReSampleContext *s); -int img_convert_to_yuv420(UINT8 *img_out, UINT8 *img, +void avpicture_fill(AVPicture *picture, UINT8 *ptr, + int pix_fmt, int width, int height); +int avpicture_get_size(int pix_fmt, int width, int height); + +/* convert among pixel formats */ +int img_convert(AVPicture *dst, int dst_pix_fmt, + AVPicture *src, int pix_fmt, + int width, int height); + +/* deinterlace a picture */ +int avpicture_deinterlace(AVPicture *dst, AVPicture *src, int pix_fmt, int width, int height); /* external high level API */ |