comparison vcr1.c @ 7783:12a25666f1e4 libavcodec

Surround some encoding-specific functions with the appropriate encoding-specific #ifdef.
author diego
date Wed, 03 Sep 2008 12:35:17 +0000
parents 6efb15a24e91
children e3f2d90a2295
comparison
equal deleted inserted replaced
7782:6efb15a24e91 7783:12a25666f1e4
112 112
113 return buf_size; 113 return buf_size;
114 } 114 }
115 115
116 #if 0 116 #if 0
117 #ifdef CONFIG_VCR1_ENCODER
117 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ 118 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
118 VCR1Context * const a = avctx->priv_data; 119 VCR1Context * const a = avctx->priv_data;
119 AVFrame *pict = data; 120 AVFrame *pict = data;
120 AVFrame * const p= (AVFrame*)&a->picture; 121 AVFrame * const p= (AVFrame*)&a->picture;
121 int size; 122 int size;
134 size= get_bit_count(&a->pb)/32; 135 size= get_bit_count(&a->pb)/32;
135 136
136 return size*4; 137 return size*4;
137 } 138 }
138 #endif 139 #endif
140 #endif
139 141
140 static av_cold void common_init(AVCodecContext *avctx){ 142 static av_cold void common_init(AVCodecContext *avctx){
141 VCR1Context * const a = avctx->priv_data; 143 VCR1Context * const a = avctx->priv_data;
142 144
143 avctx->coded_frame= (AVFrame*)&a->picture; 145 avctx->coded_frame= (AVFrame*)&a->picture;
152 154
153 return 0; 155 return 0;
154 } 156 }
155 157
156 #if 0 158 #if 0
159 #ifdef CONFIG_VCR1_ENCODER
157 static av_cold int encode_init(AVCodecContext *avctx){ 160 static av_cold int encode_init(AVCodecContext *avctx){
158 161
159 common_init(avctx); 162 common_init(avctx);
160 163
161 return 0; 164 return 0;
162 } 165 }
166 #endif
163 #endif 167 #endif
164 168
165 AVCodec vcr1_decoder = { 169 AVCodec vcr1_decoder = {
166 "vcr1", 170 "vcr1",
167 CODEC_TYPE_VIDEO, 171 CODEC_TYPE_VIDEO,