Mercurial > libavcodec.hg
comparison indeo3.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 | c32be43b52b2 |
children | a4104482ceef |
comparison
equal
deleted
inserted
replaced
6516:dbb902bb2347 | 6517:48759bfbd073 |
---|---|
60 128, 79, 79, 79, 79, 79, 79, 79 | 60 128, 79, 79, 79, 79, 79, 79, 79 |
61 }; | 61 }; |
62 | 62 |
63 static const int corrector_type_2[8] = { 9, 7, 6, 8, 5, 4, 3, 2 }; | 63 static const int corrector_type_2[8] = { 9, 7, 6, 8, 5, 4, 3, 2 }; |
64 | 64 |
65 static void build_modpred(Indeo3DecodeContext *s) | 65 static av_cold void build_modpred(Indeo3DecodeContext *s) |
66 { | 66 { |
67 int i, j; | 67 int i, j; |
68 | 68 |
69 s->ModPred = (unsigned char *) av_malloc (8 * 128); | 69 s->ModPred = (unsigned char *) av_malloc (8 * 128); |
70 | 70 |
95 unsigned char *ref, int width, int height, const unsigned char *buf1, | 95 unsigned char *ref, int width, int height, const unsigned char *buf1, |
96 long fflags2, const unsigned char *hdr, | 96 long fflags2, const unsigned char *hdr, |
97 const unsigned char *buf2, int min_width_160); | 97 const unsigned char *buf2, int min_width_160); |
98 | 98 |
99 /* ---------------------------------------------------------------------- */ | 99 /* ---------------------------------------------------------------------- */ |
100 static void iv_alloc_frames(Indeo3DecodeContext *s) | 100 static av_cold void iv_alloc_frames(Indeo3DecodeContext *s) |
101 { | 101 { |
102 int luma_width, luma_height, luma_pixels, chroma_width, chroma_height, | 102 int luma_width, luma_height, luma_pixels, chroma_width, chroma_height, |
103 chroma_pixels, i; | 103 chroma_pixels, i; |
104 unsigned int bufsize; | 104 unsigned int bufsize; |
105 | 105 |
153 s->iv_frame[1].Vbuf[chroma_pixels+i-1] = 0x80; | 153 s->iv_frame[1].Vbuf[chroma_pixels+i-1] = 0x80; |
154 } | 154 } |
155 } | 155 } |
156 | 156 |
157 /* ---------------------------------------------------------------------- */ | 157 /* ---------------------------------------------------------------------- */ |
158 static void iv_free_func(Indeo3DecodeContext *s) | 158 static av_cold void iv_free_func(Indeo3DecodeContext *s) |
159 { | 159 { |
160 int i; | 160 int i; |
161 | 161 |
162 for(i = 0 ; i < 2 ; i++) { | 162 for(i = 0 ; i < 2 ; i++) { |
163 if(s->iv_frame[i].the_buf != NULL) | 163 if(s->iv_frame[i].the_buf != NULL) |
1046 } | 1046 } |
1047 } | 1047 } |
1048 } | 1048 } |
1049 } | 1049 } |
1050 | 1050 |
1051 static int indeo3_decode_init(AVCodecContext *avctx) | 1051 static av_cold int indeo3_decode_init(AVCodecContext *avctx) |
1052 { | 1052 { |
1053 Indeo3DecodeContext *s = avctx->priv_data; | 1053 Indeo3DecodeContext *s = avctx->priv_data; |
1054 | 1054 |
1055 s->avctx = avctx; | 1055 s->avctx = avctx; |
1056 s->width = avctx->width; | 1056 s->width = avctx->width; |
1113 *(AVFrame*)data= s->frame; | 1113 *(AVFrame*)data= s->frame; |
1114 | 1114 |
1115 return buf_size; | 1115 return buf_size; |
1116 } | 1116 } |
1117 | 1117 |
1118 static int indeo3_decode_end(AVCodecContext *avctx) | 1118 static av_cold int indeo3_decode_end(AVCodecContext *avctx) |
1119 { | 1119 { |
1120 Indeo3DecodeContext *s = avctx->priv_data; | 1120 Indeo3DecodeContext *s = avctx->priv_data; |
1121 | 1121 |
1122 iv_free_func(s); | 1122 iv_free_func(s); |
1123 | 1123 |