changeset 1274:95061e8c5ea9 libavcodec

CONFIG_ENCODERS patch by (Wolfgang Hesseler <qv at multimediaware dot com>)
author michaelni
date Tue, 20 May 2003 00:42:14 +0000
parents a979fab41ed8
children 61317ffc64d5
files asv1.c
diffstat 1 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/asv1.c	Mon May 19 13:30:59 2003 +0000
+++ b/asv1.c	Tue May 20 00:42:14 2003 +0000
@@ -95,6 +95,8 @@
     else        return code - 3;
 }
 
+#ifdef CONFIG_ENCODERS
+
 static inline void put_level(PutBitContext *pb, int level){
     unsigned int index= level + 3;
 
@@ -105,6 +107,8 @@
     }
 }
 
+#endif //CONFIG_ENCODERS
+
 static inline int decode_block(ASV1Context *a, DCTELEM block[64]){
     int i;
 
@@ -130,6 +134,8 @@
     return 0;
 }
 
+#ifdef CONFIG_ENCODERS
+
 static inline void encode_block(ASV1Context *a, DCTELEM block[64]){
     int i;
     int nc_count=0;
@@ -163,6 +169,8 @@
     put_bits(&a->pb, ccp_tab[16][1], ccp_tab[16][0]);
 }
 
+#endif //CONFIG_ENCODERS
+
 static inline int decode_mb(ASV1Context *a, DCTELEM block[6][64]){
     int i;
 
@@ -175,6 +183,8 @@
     return 0;
 }
 
+#ifdef CONFIG_ENCODERS
+
 static inline void encode_mb(ASV1Context *a, DCTELEM block[6][64]){
     int i;
 
@@ -183,6 +193,8 @@
     }
 }
         
+#endif //CONFIG_ENCODERS
+
 static inline void idct_put(ASV1Context *a, int mb_x, int mb_y){
     DCTELEM (*block)[64]= a->block;
     int linesize= a->picture.linesize[0];
@@ -202,6 +214,8 @@
     }
 }
 
+#ifdef CONFIG_ENCODERS
+
 static inline void dct_get(ASV1Context *a, int mb_x, int mb_y){
     DCTELEM (*block)[64]= a->block;
     int linesize= a->picture.linesize[0];
@@ -226,6 +240,8 @@
     }
 }
 
+#endif //CONFIG_ENCODERS
+
 static int decode_frame(AVCodecContext *avctx, 
                         void *data, int *data_size,
                         uint8_t *buf, int buf_size)
@@ -308,6 +324,8 @@
     return (get_bits_count(&a->gb)+31)/32*4;
 }
 
+#ifdef CONFIG_ENCODERS
+
 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
     ASV1Context * const a = avctx->priv_data;
     AVFrame *pict = data;
@@ -356,6 +374,8 @@
     return size*4;
 }
 
+#endif //CONFIG_ENCODERS
+
 static void common_init(AVCodecContext *avctx){
     ASV1Context * const a = avctx->priv_data;
 
@@ -396,6 +416,8 @@
     return 0;
 }
 
+#ifdef CONFIG_ENCODERS
+
 static int encode_init(AVCodecContext *avctx){
     ASV1Context * const a = avctx->priv_data;
     int i;
@@ -419,6 +441,8 @@
     return 0;
 }
 
+#endif //CONFIG_ENCODERS
+
 static int decode_end(AVCodecContext *avctx){
     ASV1Context * const a = avctx->priv_data;
 
@@ -443,6 +467,8 @@
     CODEC_CAP_DR1,
 };
 
+#ifdef CONFIG_ENCODERS
+
 AVCodec asv1_encoder = {
     "asv1",
     CODEC_TYPE_VIDEO,
@@ -452,3 +478,5 @@
     encode_frame,
     //encode_end,
 };
+
+#endif //CONFIG_ENCODERS