Mercurial > libavcodec.hg
comparison armv4l/dsputil_arm.c @ 3726:49fb1958d8e1 libavcodec
clean up #ifdef HAVE_IPP
author | mru |
---|---|
date | Fri, 15 Sep 2006 23:20:58 +0000 |
parents | 0b546eab515d |
children | eae401c5bf30 |
comparison
equal
deleted
inserted
replaced
3725:3e5ef8f13f1b | 3726:49fb1958d8e1 |
---|---|
162 static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block) | 162 static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block) |
163 { | 163 { |
164 simple_idct_ARM (block); | 164 simple_idct_ARM (block); |
165 ff_add_pixels_clamped(block, dest, line_size); | 165 ff_add_pixels_clamped(block, dest, line_size); |
166 } | 166 } |
167 | |
168 #ifdef HAVE_IPP | |
167 static void simple_idct_ipp(DCTELEM *block) | 169 static void simple_idct_ipp(DCTELEM *block) |
168 { | 170 { |
169 #ifdef HAVE_IPP | |
170 ippiDCT8x8Inv_Video_16s_C1I(block); | 171 ippiDCT8x8Inv_Video_16s_C1I(block); |
171 #endif | |
172 } | 172 } |
173 static void simple_idct_ipp_put(uint8_t *dest, int line_size, DCTELEM *block) | 173 static void simple_idct_ipp_put(uint8_t *dest, int line_size, DCTELEM *block) |
174 { | 174 { |
175 #ifdef HAVE_IPP | |
176 ippiDCT8x8Inv_Video_16s8u_C1R(block, dest, line_size); | 175 ippiDCT8x8Inv_Video_16s8u_C1R(block, dest, line_size); |
177 #endif | |
178 } | 176 } |
179 | 177 |
180 void add_pixels_clamped_iwmmxt(const DCTELEM *block, uint8_t *pixels, int line_size); | 178 void add_pixels_clamped_iwmmxt(const DCTELEM *block, uint8_t *pixels, int line_size); |
181 | 179 |
182 static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block) | 180 static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block) |
183 { | 181 { |
184 #ifdef HAVE_IPP | |
185 ippiDCT8x8Inv_Video_16s_C1I(block); | 182 ippiDCT8x8Inv_Video_16s_C1I(block); |
186 #ifdef HAVE_IWMMXT | 183 #ifdef HAVE_IWMMXT |
187 add_pixels_clamped_iwmmxt(block, dest, line_size); | 184 add_pixels_clamped_iwmmxt(block, dest, line_size); |
188 #else | 185 #else |
189 add_pixels_clamped_ARM(block, dest, line_size); | 186 add_pixels_clamped_ARM(block, dest, line_size); |
190 #endif | 187 #endif |
191 #endif | 188 } |
192 } | 189 #endif |
193 | 190 |
194 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) | 191 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) |
195 { | 192 { |
196 const int idct_algo= avctx->idct_algo; | 193 int idct_algo= avctx->idct_algo; |
197 | 194 |
198 ff_put_pixels_clamped = c->put_pixels_clamped; | 195 ff_put_pixels_clamped = c->put_pixels_clamped; |
199 ff_add_pixels_clamped = c->add_pixels_clamped; | 196 ff_add_pixels_clamped = c->add_pixels_clamped; |
200 | 197 |
201 #ifdef HAVE_IPP | 198 if(idct_algo == FF_IDCT_AUTO){ |
199 #ifdef HAVE_IPP | |
200 idct_algo = FF_IDCT_IPP; | |
201 #else | |
202 idct_algo = FF_IDCT_ARM; | |
203 #endif | |
204 } | |
205 | |
202 if(idct_algo==FF_IDCT_ARM){ | 206 if(idct_algo==FF_IDCT_ARM){ |
203 #else | |
204 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){ | |
205 #endif | |
206 c->idct_put= j_rev_dct_ARM_put; | 207 c->idct_put= j_rev_dct_ARM_put; |
207 c->idct_add= j_rev_dct_ARM_add; | 208 c->idct_add= j_rev_dct_ARM_add; |
208 c->idct = j_rev_dct_ARM; | 209 c->idct = j_rev_dct_ARM; |
209 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */ | 210 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */ |
210 } else if (idct_algo==FF_IDCT_SIMPLEARM){ | 211 } else if (idct_algo==FF_IDCT_SIMPLEARM){ |
211 c->idct_put= simple_idct_ARM_put; | 212 c->idct_put= simple_idct_ARM_put; |
212 c->idct_add= simple_idct_ARM_add; | 213 c->idct_add= simple_idct_ARM_add; |
213 c->idct = simple_idct_ARM; | 214 c->idct = simple_idct_ARM; |
214 c->idct_permutation_type= FF_NO_IDCT_PERM; | 215 c->idct_permutation_type= FF_NO_IDCT_PERM; |
215 #ifdef HAVE_IPP | 216 #ifdef HAVE_IPP |
216 } else if (idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_IPP){ | |
217 #else | |
218 } else if (idct_algo==FF_IDCT_IPP){ | 217 } else if (idct_algo==FF_IDCT_IPP){ |
219 #endif | |
220 c->idct_put= simple_idct_ipp_put; | 218 c->idct_put= simple_idct_ipp_put; |
221 c->idct_add= simple_idct_ipp_add; | 219 c->idct_add= simple_idct_ipp_add; |
222 c->idct = simple_idct_ipp; | 220 c->idct = simple_idct_ipp; |
223 c->idct_permutation_type= FF_NO_IDCT_PERM; | 221 c->idct_permutation_type= FF_NO_IDCT_PERM; |
222 #endif | |
224 } | 223 } |
225 | 224 |
226 /* c->put_pixels_tab[0][0] = put_pixels16_arm; */ // NG! | 225 /* c->put_pixels_tab[0][0] = put_pixels16_arm; */ // NG! |
227 c->put_pixels_tab[0][1] = put_pixels16_x2_arm; //OK! | 226 c->put_pixels_tab[0][1] = put_pixels16_x2_arm; //OK! |
228 c->put_pixels_tab[0][2] = put_pixels16_y2_arm; //OK! | 227 c->put_pixels_tab[0][2] = put_pixels16_y2_arm; //OK! |