Mercurial > libavcodec.hg
comparison idcinvideo.c @ 6517:48759bfbd073 libavcodec
Apply 'cold' attribute to init/uninit functions in libavcodec
author | zuxy |
---|---|
date | Fri, 21 Mar 2008 03:11:20 +0000 |
parents | 814c8bd77d91 |
children | 5b3acf9fd50a |
comparison
equal
deleted
inserted
replaced
6516:dbb902bb2347 | 6517:48759bfbd073 |
---|---|
111 * huff_nodes[prev][i < HUF_TOKENS] - are the nodes at the base of the tree. | 111 * huff_nodes[prev][i < HUF_TOKENS] - are the nodes at the base of the tree. |
112 * huff_nodes[prev][i >= HUF_TOKENS] - are used to construct the tree. | 112 * huff_nodes[prev][i >= HUF_TOKENS] - are used to construct the tree. |
113 * num_huff_nodes[prev] - contains the index to the root node of the tree. | 113 * num_huff_nodes[prev] - contains the index to the root node of the tree. |
114 * That is: huff_nodes[prev][num_huff_nodes[prev]] is the root node. | 114 * That is: huff_nodes[prev][num_huff_nodes[prev]] is the root node. |
115 */ | 115 */ |
116 static void huff_build_tree(IdcinContext *s, int prev) { | 116 static av_cold void huff_build_tree(IdcinContext *s, int prev) { |
117 hnode_t *node, *hnodes; | 117 hnode_t *node, *hnodes; |
118 int num_hnodes, i; | 118 int num_hnodes, i; |
119 | 119 |
120 num_hnodes = HUF_TOKENS; | 120 num_hnodes = HUF_TOKENS; |
121 hnodes = s->huff_nodes[prev]; | 121 hnodes = s->huff_nodes[prev]; |
141 } | 141 } |
142 | 142 |
143 s->num_huff_nodes[prev] = num_hnodes - 1; | 143 s->num_huff_nodes[prev] = num_hnodes - 1; |
144 } | 144 } |
145 | 145 |
146 static int idcin_decode_init(AVCodecContext *avctx) | 146 static av_cold int idcin_decode_init(AVCodecContext *avctx) |
147 { | 147 { |
148 IdcinContext *s = avctx->priv_data; | 148 IdcinContext *s = avctx->priv_data; |
149 int i, j, histogram_index = 0; | 149 int i, j, histogram_index = 0; |
150 unsigned char *histograms; | 150 unsigned char *histograms; |
151 | 151 |
240 | 240 |
241 /* report that the buffer was completely consumed */ | 241 /* report that the buffer was completely consumed */ |
242 return buf_size; | 242 return buf_size; |
243 } | 243 } |
244 | 244 |
245 static int idcin_decode_end(AVCodecContext *avctx) | 245 static av_cold int idcin_decode_end(AVCodecContext *avctx) |
246 { | 246 { |
247 IdcinContext *s = avctx->priv_data; | 247 IdcinContext *s = avctx->priv_data; |
248 | 248 |
249 if (s->frame.data[0]) | 249 if (s->frame.data[0]) |
250 avctx->release_buffer(avctx, &s->frame); | 250 avctx->release_buffer(avctx, &s->frame); |