| OLD | NEW |
| 1 /* | 1 /* |
| 2 * IMC compatible decoder | 2 * IMC compatible decoder |
| 3 * Copyright (c) 2002-2004 Maxim Poliakovski | 3 * Copyright (c) 2002-2004 Maxim Poliakovski |
| 4 * Copyright (c) 2006 Benjamin Larsson | 4 * Copyright (c) 2006 Benjamin Larsson |
| 5 * Copyright (c) 2006 Konstantin Shishkov | 5 * Copyright (c) 2006 Konstantin Shishkov |
| 6 * | 6 * |
| 7 * This file is part of FFmpeg. | 7 * This file is part of FFmpeg. |
| 8 * | 8 * |
| 9 * FFmpeg is free software; you can redistribute it and/or | 9 * FFmpeg is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 355 |
| 356 | 356 |
| 357 for(i = 0; i < BANDS/2; i++) { | 357 for(i = 0; i < BANDS/2; i++) { |
| 358 rres = summer - freebits; | 358 rres = summer - freebits; |
| 359 if((rres >= -8) && (rres <= 8)) break; | 359 if((rres >= -8) && (rres <= 8)) break; |
| 360 | 360 |
| 361 summer = 0; | 361 summer = 0; |
| 362 iacc = 0; | 362 iacc = 0; |
| 363 | 363 |
| 364 for(j = (stream_format_code & 0x2)?4:0; j < BANDS; j++) { | 364 for(j = (stream_format_code & 0x2)?4:0; j < BANDS; j++) { |
| 365 cwlen = av_clip((int)((q->flcoeffs4[j] * 0.5) - summa + 0.5), 0, 6); | 365 cwlen = av_clipf(((q->flcoeffs4[j] * 0.5) - summa + 0.5), 0, 6); |
| 366 | 366 |
| 367 q->bitsBandT[j] = cwlen; | 367 q->bitsBandT[j] = cwlen; |
| 368 summer += q->bandWidthT[j] * cwlen; | 368 summer += q->bandWidthT[j] * cwlen; |
| 369 | 369 |
| 370 if (cwlen > 0) | 370 if (cwlen > 0) |
| 371 iacc += q->bandWidthT[j]; | 371 iacc += q->bandWidthT[j]; |
| 372 } | 372 } |
| 373 | 373 |
| 374 flg = t2; | 374 flg = t2; |
| 375 t2 = 1; | 375 t2 = 1; |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 AVCodec imc_decoder = { | 824 AVCodec imc_decoder = { |
| 825 .name = "imc", | 825 .name = "imc", |
| 826 .type = AVMEDIA_TYPE_AUDIO, | 826 .type = AVMEDIA_TYPE_AUDIO, |
| 827 .id = CODEC_ID_IMC, | 827 .id = CODEC_ID_IMC, |
| 828 .priv_data_size = sizeof(IMCContext), | 828 .priv_data_size = sizeof(IMCContext), |
| 829 .init = imc_decode_init, | 829 .init = imc_decode_init, |
| 830 .close = imc_decode_close, | 830 .close = imc_decode_close, |
| 831 .decode = imc_decode_frame, | 831 .decode = imc_decode_frame, |
| 832 .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), | 832 .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), |
| 833 }; | 833 }; |
| OLD | NEW |