Mercurial > libavcodec.hg
comparison cljr.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 |
---|---|
80 | 80 |
81 return buf_size; | 81 return buf_size; |
82 } | 82 } |
83 | 83 |
84 #if 0 | 84 #if 0 |
85 #ifdef CONFIG_CLJR_ENCODER | |
85 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ | 86 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ |
86 CLJRContext * const a = avctx->priv_data; | 87 CLJRContext * const a = avctx->priv_data; |
87 AVFrame *pict = data; | 88 AVFrame *pict = data; |
88 AVFrame * const p= (AVFrame*)&a->picture; | 89 AVFrame * const p= (AVFrame*)&a->picture; |
89 int size; | 90 int size; |
102 size= get_bit_count(&a->pb)/32; | 103 size= get_bit_count(&a->pb)/32; |
103 | 104 |
104 return size*4; | 105 return size*4; |
105 } | 106 } |
106 #endif | 107 #endif |
108 #endif | |
107 | 109 |
108 static av_cold void common_init(AVCodecContext *avctx){ | 110 static av_cold void common_init(AVCodecContext *avctx){ |
109 CLJRContext * const a = avctx->priv_data; | 111 CLJRContext * const a = avctx->priv_data; |
110 | 112 |
111 avctx->coded_frame= (AVFrame*)&a->picture; | 113 avctx->coded_frame= (AVFrame*)&a->picture; |
120 | 122 |
121 return 0; | 123 return 0; |
122 } | 124 } |
123 | 125 |
124 #if 0 | 126 #if 0 |
127 #ifdef CONFIG_CLJR_ENCODER | |
125 static av_cold int encode_init(AVCodecContext *avctx){ | 128 static av_cold int encode_init(AVCodecContext *avctx){ |
126 | 129 |
127 common_init(avctx); | 130 common_init(avctx); |
128 | 131 |
129 return 0; | 132 return 0; |
130 } | 133 } |
134 #endif | |
131 #endif | 135 #endif |
132 | 136 |
133 AVCodec cljr_decoder = { | 137 AVCodec cljr_decoder = { |
134 "cljr", | 138 "cljr", |
135 CODEC_TYPE_VIDEO, | 139 CODEC_TYPE_VIDEO, |