comparison qtrleenc.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 2265a9c096a4
children 5b3acf9fd50a
comparison
equal deleted inserted replaced
6516:dbb902bb2347 6517:48759bfbd073
55 * Will contain at ith position the number of consecutive pixels equal to the previous 55 * Will contain at ith position the number of consecutive pixels equal to the previous
56 * frame starting from pixel i */ 56 * frame starting from pixel i */
57 uint8_t* skip_table; 57 uint8_t* skip_table;
58 } QtrleEncContext; 58 } QtrleEncContext;
59 59
60 static int qtrle_encode_init(AVCodecContext *avctx) 60 static av_cold int qtrle_encode_init(AVCodecContext *avctx)
61 { 61 {
62 QtrleEncContext *s = avctx->priv_data; 62 QtrleEncContext *s = avctx->priv_data;
63 63
64 if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { 64 if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
65 return -1; 65 return -1;
301 /* save the current frame */ 301 /* save the current frame */
302 av_picture_copy(&s->previous_frame, (AVPicture *)p, avctx->pix_fmt, avctx->width, avctx->height); 302 av_picture_copy(&s->previous_frame, (AVPicture *)p, avctx->pix_fmt, avctx->width, avctx->height);
303 return chunksize; 303 return chunksize;
304 } 304 }
305 305
306 static int qtrle_encode_end(AVCodecContext *avctx) 306 static av_cold int qtrle_encode_end(AVCodecContext *avctx)
307 { 307 {
308 QtrleEncContext *s = avctx->priv_data; 308 QtrleEncContext *s = avctx->priv_data;
309 309
310 avpicture_free(&s->previous_frame); 310 avpicture_free(&s->previous_frame);
311 av_free(s->rlecode_table); 311 av_free(s->rlecode_table);