Mercurial > libavcodec.hg
comparison avcodec.h @ 67:cdd89f96cbe1 libavcodec
added draw_horiz_band test
| author | glantau |
|---|---|
| date | Wed, 15 Aug 2001 13:09:47 +0000 |
| parents | 0d1f70657c73 |
| children | 1d3eb6cdc6b5 |
comparison
equal
deleted
inserted
replaced
| 66:2bb522261514 | 67:cdd89f96cbe1 |
|---|---|
| 6 CODEC_ID_H263, | 6 CODEC_ID_H263, |
| 7 CODEC_ID_RV10, | 7 CODEC_ID_RV10, |
| 8 CODEC_ID_MP2, | 8 CODEC_ID_MP2, |
| 9 CODEC_ID_AC3, | 9 CODEC_ID_AC3, |
| 10 CODEC_ID_MJPEG, | 10 CODEC_ID_MJPEG, |
| 11 CODEC_ID_OPENDIVX, | 11 CODEC_ID_MPEG4, |
| 12 CODEC_ID_PCM, | 12 CODEC_ID_PCM, |
| 13 CODEC_ID_RAWVIDEO, | 13 CODEC_ID_RAWVIDEO, |
| 14 CODEC_ID_MSMPEG4, | 14 CODEC_ID_MSMPEG4, |
| 15 CODEC_ID_H263P, | 15 CODEC_ID_H263P, |
| 16 CODEC_ID_H263I, | 16 CODEC_ID_H263I, |
| 42 | 42 |
| 43 /* encoding support */ | 43 /* encoding support */ |
| 44 | 44 |
| 45 #define CODEC_FLAG_HQ 0x0001 /* high quality (non real time) encoding */ | 45 #define CODEC_FLAG_HQ 0x0001 /* high quality (non real time) encoding */ |
| 46 #define CODEC_FLAG_QSCALE 0x0002 /* use fixed qscale */ | 46 #define CODEC_FLAG_QSCALE 0x0002 /* use fixed qscale */ |
| 47 | |
| 48 /* codec capabilities */ | |
| 49 | |
| 50 /* decoder can use draw_horiz_band callback */ | |
| 51 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 | |
| 47 | 52 |
| 48 #define FRAME_RATE_BASE 10000 | 53 #define FRAME_RATE_BASE 10000 |
| 49 | 54 |
| 50 typedef struct AVCodecContext { | 55 typedef struct AVCodecContext { |
| 51 int bit_rate; | 56 int bit_rate; |
| 55 /* video only */ | 60 /* video only */ |
| 56 int frame_rate; /* frames per sec multiplied by FRAME_RATE_BASE */ | 61 int frame_rate; /* frames per sec multiplied by FRAME_RATE_BASE */ |
| 57 int width, height; | 62 int width, height; |
| 58 int gop_size; /* 0 = intra only */ | 63 int gop_size; /* 0 = intra only */ |
| 59 int pix_fmt; /* pixel format, see PIX_FMT_xxx */ | 64 int pix_fmt; /* pixel format, see PIX_FMT_xxx */ |
| 65 | |
| 66 /* if non NULL, 'draw_horiz_band' is called by the libavcodec | |
| 67 decoder to draw an horizontal band. It improve cache usage. Not | |
| 68 all codecs can do that. You must check the codec capabilities | |
| 69 before */ | |
| 70 void (*draw_horiz_band)(struct AVCodecContext *s, | |
| 71 UINT8 **src_ptr, int linesize, | |
| 72 int y, int width, int height); | |
| 73 | |
| 60 /* audio only */ | 74 /* audio only */ |
| 61 int sample_rate; /* samples per sec */ | 75 int sample_rate; /* samples per sec */ |
| 62 int channels; | 76 int channels; |
| 63 | 77 |
| 64 /* the following data should not be initialized */ | 78 /* the following data should not be initialized */ |
| 70 (between 1 (good) and 31 (bad)) */ | 84 (between 1 (good) and 31 (bad)) */ |
| 71 struct AVCodec *codec; | 85 struct AVCodec *codec; |
| 72 void *priv_data; | 86 void *priv_data; |
| 73 | 87 |
| 74 /* the following fields are ignored */ | 88 /* the following fields are ignored */ |
| 89 void *opaque; /* can be used to carry app specific stuff */ | |
| 75 char codec_name[32]; | 90 char codec_name[32]; |
| 76 int codec_type; /* see CODEC_TYPE_xxx */ | 91 int codec_type; /* see CODEC_TYPE_xxx */ |
| 77 int codec_id; /* see CODEC_ID_xxx */ | 92 int codec_id; /* see CODEC_ID_xxx */ |
| 78 unsigned int codec_tag; /* codec tag, only used if unknown codec */ | 93 unsigned int codec_tag; /* codec tag, only used if unknown codec */ |
| 79 } AVCodecContext; | 94 } AVCodecContext; |
| 86 int (*init)(AVCodecContext *); | 101 int (*init)(AVCodecContext *); |
| 87 int (*encode)(AVCodecContext *, UINT8 *buf, int buf_size, void *data); | 102 int (*encode)(AVCodecContext *, UINT8 *buf, int buf_size, void *data); |
| 88 int (*close)(AVCodecContext *); | 103 int (*close)(AVCodecContext *); |
| 89 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, | 104 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, |
| 90 UINT8 *buf, int buf_size); | 105 UINT8 *buf, int buf_size); |
| 106 int capabilities; | |
| 91 struct AVCodec *next; | 107 struct AVCodec *next; |
| 92 } AVCodec; | 108 } AVCodec; |
| 93 | 109 |
| 94 /* three components are given, that's all */ | 110 /* three components are given, that's all */ |
| 95 typedef struct AVPicture { | 111 typedef struct AVPicture { |
| 102 extern AVCodec mpeg1video_encoder; | 118 extern AVCodec mpeg1video_encoder; |
| 103 extern AVCodec h263_encoder; | 119 extern AVCodec h263_encoder; |
| 104 extern AVCodec h263p_encoder; | 120 extern AVCodec h263p_encoder; |
| 105 extern AVCodec rv10_encoder; | 121 extern AVCodec rv10_encoder; |
| 106 extern AVCodec mjpeg_encoder; | 122 extern AVCodec mjpeg_encoder; |
| 107 extern AVCodec opendivx_encoder; | 123 extern AVCodec mpeg4_encoder; |
| 108 extern AVCodec msmpeg4_encoder; | 124 extern AVCodec msmpeg4_encoder; |
| 109 | 125 |
| 110 extern AVCodec h263_decoder; | 126 extern AVCodec h263_decoder; |
| 111 extern AVCodec opendivx_decoder; | 127 extern AVCodec mpeg4_decoder; |
| 112 extern AVCodec msmpeg4_decoder; | 128 extern AVCodec msmpeg4_decoder; |
| 113 extern AVCodec mpeg_decoder; | 129 extern AVCodec mpeg_decoder; |
| 114 extern AVCodec h263i_decoder; | 130 extern AVCodec h263i_decoder; |
| 115 extern AVCodec rv10_decoder; | 131 extern AVCodec rv10_decoder; |
| 116 extern AVCodec mjpeg_decoder; | 132 extern AVCodec mjpeg_decoder; |
