Mercurial > libavcodec.hg
diff huffyuv.c @ 3777:20545fbb6f7c libavcodec
add some #ifdef CONFIG_ENCODERS/DECODERS
author | mru |
---|---|
date | Wed, 27 Sep 2006 19:54:07 +0000 |
parents | f76861f4d5ca |
children | c8c591fe26f8 |
line wrap: on
line diff
--- a/huffyuv.c Wed Sep 27 19:47:39 2006 +0000 +++ b/huffyuv.c Wed Sep 27 19:54:07 2006 +0000 @@ -236,6 +236,7 @@ return 0; } +#ifdef CONFIG_ENCODERS static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){ uint64_t counts[2*size]; int up[2*size]; @@ -291,6 +292,7 @@ if(i==size) break; } } +#endif /* CONFIG_ENCODERS */ static int read_huffman_tables(HYuvContext *s, uint8_t *src, int length){ GetBitContext gb; @@ -375,6 +377,7 @@ return 0; } +#ifdef CONFIG_DECODERS static int decode_init(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; @@ -470,7 +473,9 @@ return 0; } +#endif +#ifdef CONFIG_ENCODERS static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){ int i; int index= 0; @@ -612,6 +617,7 @@ return 0; } +#endif /* CONFIG_ENCODERS */ static void decode_422_bitstream(HYuvContext *s, int count){ int i; @@ -637,6 +643,7 @@ } } +#ifdef CONFIG_ENCODERS static int encode_422_bitstream(HYuvContext *s, int count){ int i; @@ -711,6 +718,7 @@ } return 0; } +#endif /* CONFIG_ENCODERS */ static void decode_bgr_bitstream(HYuvContext *s, int count){ int i; @@ -748,6 +756,7 @@ } } +#ifdef CONFIG_DECODERS static void draw_slice(HYuvContext *s, int y){ int h, cy; int offset[4]; @@ -1014,6 +1023,7 @@ return (get_bits_count(&s->gb)+31)/32*4 + table_size; } +#endif static int common_end(HYuvContext *s){ int i; @@ -1024,6 +1034,7 @@ return 0; } +#ifdef CONFIG_DECODERS static int decode_end(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; @@ -1038,7 +1049,9 @@ return 0; } +#endif +#ifdef CONFIG_ENCODERS static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ HYuvContext *s = avctx->priv_data; AVFrame *pict = data; @@ -1218,7 +1231,9 @@ return 0; } +#endif /* CONFIG_ENCODERS */ +#ifdef CONFIG_DECODERS AVCodec huffyuv_decoder = { "huffyuv", CODEC_TYPE_VIDEO, @@ -1244,6 +1259,7 @@ CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND, NULL }; +#endif #ifdef CONFIG_ENCODERS