Mercurial > libavcodec.hg
comparison g726.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 | 931ca319f2fe |
children | a4104482ceef |
comparison
equal
deleted
inserted
replaced
6516:dbb902bb2347 | 6517:48759bfbd073 |
---|---|
264 c->se >>= 1; | 264 c->se >>= 1; |
265 | 265 |
266 return av_clip(re_signal << 2, -0xffff, 0xffff); | 266 return av_clip(re_signal << 2, -0xffff, 0xffff); |
267 } | 267 } |
268 | 268 |
269 static int g726_reset(G726Context* c, int bit_rate) | 269 static av_cold int g726_reset(G726Context* c, int bit_rate) |
270 { | 270 { |
271 int i; | 271 int i; |
272 | 272 |
273 c->tbls = &G726Tables_pool[bit_rate/8000 - 2]; | 273 c->tbls = &G726Tables_pool[bit_rate/8000 - 2]; |
274 for (i=0; i<2; i++) { | 274 for (i=0; i<2; i++) { |
317 int bits_left; | 317 int bits_left; |
318 int bit_buffer; | 318 int bit_buffer; |
319 int code_size; | 319 int code_size; |
320 } AVG726Context; | 320 } AVG726Context; |
321 | 321 |
322 static int g726_init(AVCodecContext * avctx) | 322 static av_cold int g726_init(AVCodecContext * avctx) |
323 { | 323 { |
324 AVG726Context* c = (AVG726Context*)avctx->priv_data; | 324 AVG726Context* c = (AVG726Context*)avctx->priv_data; |
325 | 325 |
326 if (avctx->channels != 1 || | 326 if (avctx->channels != 1 || |
327 (avctx->bit_rate != 16000 && avctx->bit_rate != 24000 && | 327 (avctx->bit_rate != 16000 && avctx->bit_rate != 24000 && |
344 avctx->coded_frame->key_frame = 1; | 344 avctx->coded_frame->key_frame = 1; |
345 | 345 |
346 return 0; | 346 return 0; |
347 } | 347 } |
348 | 348 |
349 static int g726_close(AVCodecContext *avctx) | 349 static av_cold int g726_close(AVCodecContext *avctx) |
350 { | 350 { |
351 av_freep(&avctx->coded_frame); | 351 av_freep(&avctx->coded_frame); |
352 return 0; | 352 return 0; |
353 } | 353 } |
354 | 354 |