comparison vcr1.c @ 8590:7a463923ecd1 libavcodec

Change semantic of CONFIG_*, HAVE_* and ARCH_*. They are now always defined to either 0 or 1.
author aurel
date Tue, 13 Jan 2009 23:44:16 +0000
parents e3f2d90a2295
children e9d9d946f213
comparison
equal deleted inserted replaced
8589:a29b5b5c3c9d 8590:7a463923ecd1
30 //#undef NDEBUG 30 //#undef NDEBUG
31 //#include <assert.h> 31 //#include <assert.h>
32 32
33 /* Disable the encoder. */ 33 /* Disable the encoder. */
34 #undef CONFIG_VCR1_ENCODER 34 #undef CONFIG_VCR1_ENCODER
35 #define CONFIG_VCR1_ENCODER 0
35 36
36 typedef struct VCR1Context{ 37 typedef struct VCR1Context{
37 AVCodecContext *avctx; 38 AVCodecContext *avctx;
38 AVFrame picture; 39 AVFrame picture;
39 int delta[16]; 40 int delta[16];
114 emms_c(); 115 emms_c();
115 116
116 return buf_size; 117 return buf_size;
117 } 118 }
118 119
119 #ifdef CONFIG_VCR1_ENCODER 120 #if CONFIG_VCR1_ENCODER
120 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ 121 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
121 VCR1Context * const a = avctx->priv_data; 122 VCR1Context * const a = avctx->priv_data;
122 AVFrame *pict = data; 123 AVFrame *pict = data;
123 AVFrame * const p= (AVFrame*)&a->picture; 124 AVFrame * const p= (AVFrame*)&a->picture;
124 int size; 125 int size;
154 avctx->pix_fmt= PIX_FMT_YUV410P; 155 avctx->pix_fmt= PIX_FMT_YUV410P;
155 156
156 return 0; 157 return 0;
157 } 158 }
158 159
159 #ifdef CONFIG_VCR1_ENCODER 160 #if CONFIG_VCR1_ENCODER
160 static av_cold int encode_init(AVCodecContext *avctx){ 161 static av_cold int encode_init(AVCodecContext *avctx){
161 162
162 common_init(avctx); 163 common_init(avctx);
163 164
164 return 0; 165 return 0;
176 decode_frame, 177 decode_frame,
177 CODEC_CAP_DR1, 178 CODEC_CAP_DR1,
178 .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"), 179 .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"),
179 }; 180 };
180 181
181 #ifdef CONFIG_VCR1_ENCODER 182 #if CONFIG_VCR1_ENCODER
182 AVCodec vcr1_encoder = { 183 AVCodec vcr1_encoder = {
183 "vcr1", 184 "vcr1",
184 CODEC_TYPE_VIDEO, 185 CODEC_TYPE_VIDEO,
185 CODEC_ID_VCR1, 186 CODEC_ID_VCR1,
186 sizeof(VCR1Context), 187 sizeof(VCR1Context),