OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 * |
| 10 * This file was originally licensed as follows. It has been |
| 11 * relicensed with permission from the copyright holders. |
| 12 */ |
| 13 |
| 14 /** |
| 15 * File: omxSP.h |
| 16 * Brief: OpenMAX DL v1.0.2 - Signal Processing library |
| 17 * |
| 18 * Copyright 2005-2008 The Khronos Group Inc. All Rights Reserved. |
| 19 * |
| 20 * These materials are protected by copyright laws and contain material |
| 21 * proprietary to the Khronos Group, Inc. You may use these materials |
| 22 * for implementing Khronos specifications, without altering or removing |
| 23 * any trademark, copyright or other notice from the specification. |
| 24 * |
| 25 * Khronos Group makes no, and expressly disclaims any, representations |
| 26 * or warranties, express or implied, regarding these materials, including, |
| 27 * without limitation, any implied warranties of merchantability or fitness |
| 28 * for a particular purpose or non-infringement of any intellectual property. |
| 29 * Khronos Group makes no, and expressly disclaims any, warranties, express |
| 30 * or implied, regarding the correctness, accuracy, completeness, timeliness, |
| 31 * and reliability of these materials. |
| 32 * |
| 33 * Under no circumstances will the Khronos Group, or any of its Promoters, |
| 34 * Contributors or Members or their respective partners, officers, directors, |
| 35 * employees, agents or representatives be liable for any damages, whether |
| 36 * direct, indirect, special or consequential damages for lost revenues, |
| 37 * lost profits, or otherwise, arising from or in connection with these |
| 38 * materials. |
| 39 * |
| 40 * Khronos and OpenMAX are trademarks of the Khronos Group Inc. |
| 41 * |
| 42 */ |
| 43 |
| 44 /* *****************************************************************************
************/ |
| 45 |
| 46 #ifndef _OMXSP_H_ |
| 47 #define _OMXSP_H_ |
| 48 |
| 49 #include "dl/api/omxtypes.h" |
| 50 |
| 51 #ifdef __cplusplus |
| 52 extern "C" { |
| 53 #endif |
| 54 |
| 55 |
| 56 /* 2.1 Vendor-Specific FFT Data Structures */ |
| 57 typedef void OMXFFTSpec_C_SC16; |
| 58 typedef void OMXFFTSpec_C_SC32; |
| 59 typedef void OMXFFTSpec_R_S16S32; |
| 60 typedef void OMXFFTSpec_R_S32; |
| 61 typedef void OMXFFTSpec_R_F32; |
| 62 typedef void OMXFFTSpec_C_FC32; |
| 63 |
| 64 /** |
| 65 * Function: omxSP_Copy_S16 (2.2.1.1.1) |
| 66 * |
| 67 * Description: |
| 68 * Copies the len elements of the vector pointed to by pSrcinto the len |
| 69 * elements of the vector pointed to by pDst. That is: |
| 70 * pDst[i] = pSrc[i], for (i=0, 1, ..., len-1) |
| 71 * |
| 72 * Input Arguments: |
| 73 * |
| 74 * pSrc - pointer to the source vector |
| 75 * len - number of elements contained in the source and destination vectors |
| 76 * |
| 77 * Output Arguments: |
| 78 * |
| 79 * pDst - pointer to the destination vector |
| 80 * |
| 81 * Return Value: |
| 82 * |
| 83 * OMX_Sts_NoErr - no error |
| 84 * OMX_Sts_BadArgErr - bad arguments detected; returned if one or more of |
| 85 * the following is true: |
| 86 * - pSrc or pDst is NULL |
| 87 * - len < 0 |
| 88 * |
| 89 */ |
| 90 OMXResult omxSP_Copy_S16 ( |
| 91 const OMX_S16 *pSrc, |
| 92 OMX_S16 *pDst, |
| 93 OMX_INT len |
| 94 ); |
| 95 |
| 96 |
| 97 |
| 98 /** |
| 99 * Function: omxSP_DotProd_S16 (2.2.2.1.1) |
| 100 * |
| 101 * Description: |
| 102 * Calculates the dot product of the two input vectors. This function does |
| 103 * not perform scaling. The internal accumulator width must be at least 32 |
| 104 * bits. If any of the partially accumulated values exceeds the range of a |
| 105 * signed 32-bit integer then the result is undefined. |
| 106 * |
| 107 * Input Arguments: |
| 108 * |
| 109 * pSrc1 - pointer to the first input vector; must be aligned on an 8-byte |
| 110 * boundary. |
| 111 * pSrc2 - pointer to the second input vector; must be aligned on an 8-byte |
| 112 * boundary. |
| 113 * len - length of the vectors in pSrc1 and pSrc2 |
| 114 * |
| 115 * Output Arguments: |
| 116 * |
| 117 * Return Value: |
| 118 * |
| 119 * The dot product result Note: this function returns the actual result |
| 120 * rather than the standard OMXError. |
| 121 * |
| 122 */ |
| 123 OMX_S32 omxSP_DotProd_S16 ( |
| 124 const OMX_S16 *pSrc1, |
| 125 const OMX_S16 *pSrc2, |
| 126 OMX_INT len |
| 127 ); |
| 128 |
| 129 |
| 130 |
| 131 /** |
| 132 * Function: omxSP_DotProd_S16_Sfs (2.2.2.1.2) |
| 133 * |
| 134 * Description: |
| 135 * Calculates the dot product of the two input signals with output scaling |
| 136 * and saturation, i.e., the result is multiplied by two to the power of the |
| 137 * negative (-)scalefactor (scaled) prior to return. The result is saturated |
| 138 * with rounding if the scaling operation produces a value outside the range |
| 139 * of a signed 32-bit integer. Rounding behavior is defined in section 1.6.7 |
| 140 * Integer Scaling and Rounding Conventions. The internal accumulator width |
| 141 * must be at least 32 bits. The result is undefined if any of the partially |
| 142 * accumulated values exceeds the range of a signed 32-bit integer. |
| 143 * |
| 144 * Input Arguments: |
| 145 * |
| 146 * pSrc1 - pointer to the first input vector; must be aligned on an 8-byte |
| 147 * boundary. |
| 148 * pSrc2 - pointer to the second input vector; must be aligned on an 8-byte |
| 149 * boundary. |
| 150 * len - length of the vectors in pSrc1 and pSrc2 |
| 151 * scaleFactor - integer scalefactor |
| 152 * |
| 153 * Output Arguments: |
| 154 * |
| 155 * Return Value: |
| 156 * |
| 157 * The dot product result Note: This function returns the actual result |
| 158 * rather than the standard OMXError. |
| 159 * |
| 160 */ |
| 161 OMX_S32 omxSP_DotProd_S16_Sfs ( |
| 162 const OMX_S16 *pSrc1, |
| 163 const OMX_S16 *pSrc2, |
| 164 OMX_INT len, |
| 165 OMX_INT scaleFactor |
| 166 ); |
| 167 |
| 168 |
| 169 |
| 170 /** |
| 171 * Function: omxSP_BlockExp_S16 (2.2.2.2.2) |
| 172 * |
| 173 * Description: |
| 174 * Block exponent calculation for 16-bit and 32-bit signals (count leading |
| 175 * sign bits). These functions compute the number of extra sign bits of all |
| 176 * values in the 16-bit and 32-bit input vector pSrc and return the minimum |
| 177 * sign bit count. This is also the maximum shift value that could be used in |
| 178 * scaling the block of data. The functions BlockExp_S16 and |
| 179 * BlockExp_S32 return the values 15 and 31, respectively, for input vectors in |
| 180 * which all entries are equal to zero. |
| 181 * |
| 182 * Note: These functions differ from other DL functions by not returning the |
| 183 * standard OMXError but the actual result. |
| 184 * |
| 185 * Input Arguments: |
| 186 * |
| 187 * pSrc - pointer to the input vector |
| 188 * len - number of elements contained in the input and output |
| 189 * vectors (0 < len < 65536) |
| 190 * |
| 191 * Output Arguments: |
| 192 * |
| 193 * none |
| 194 * |
| 195 * Return Value: |
| 196 * |
| 197 * Maximum exponent that may be used in scaling |
| 198 * |
| 199 */ |
| 200 OMX_INT omxSP_BlockExp_S16 ( |
| 201 const OMX_S16 *pSrc, |
| 202 OMX_INT len |
| 203 ); |
| 204 |
| 205 |
| 206 |
| 207 /** |
| 208 * Function: omxSP_BlockExp_S32 (2.2.2.2.2) |
| 209 * |
| 210 * Description: |
| 211 * Block exponent calculation for 16-bit and 32-bit signals (count leading |
| 212 * sign bits). These functions compute the number of extra sign bits of all |
| 213 * values in the 16-bit and 32-bit input vector pSrc and return the minimum |
| 214 * sign bit count. This is also the maximum shift value that could be used in |
| 215 * scaling the block of data. The functions BlockExp_S16 and |
| 216 * BlockExp_S32 return the values 15 and 31, respectively, for input vectors in |
| 217 * which all entries are equal to zero. |
| 218 * |
| 219 * Note: These functions differ from other DL functions by not returning the |
| 220 * standard OMXError but the actual result. |
| 221 * |
| 222 * Input Arguments: |
| 223 * |
| 224 * pSrc - pointer to the input vector |
| 225 * len - number of elements contained in the input and output |
| 226 * vectors (0 < len < 65536) |
| 227 * |
| 228 * Output Arguments: |
| 229 * |
| 230 * none |
| 231 * |
| 232 * Return Value: |
| 233 * |
| 234 * Maximum exponent that may be used in scaling |
| 235 * |
| 236 */ |
| 237 OMX_INT omxSP_BlockExp_S32 ( |
| 238 const OMX_S32 *pSrc, |
| 239 OMX_INT len |
| 240 ); |
| 241 |
| 242 |
| 243 |
| 244 /** |
| 245 * Function: omxSP_FIR_Direct_S16 (2.2.3.1.1) |
| 246 * |
| 247 * Description: |
| 248 * Block FIR filtering for 16-bit data type. This function applies the |
| 249 * FIR filter defined by the coefficient vector pTapsQ15 to a vector of |
| 250 * input data. The result is saturated with rounding if the operation |
| 251 * produces a value outside the range of a signed 16-bit integer. |
| 252 * Rounding behavior is defined in: |
| 253 * section 1.6.7 "Integer Scaling and Rounding Conventions". |
| 254 * The internal accumulator width must be at least 32 bits. The result |
| 255 * is undefined if any of the partially accumulated values exceeds the |
| 256 * range of a signed 32-bit integer. |
| 257 * |
| 258 * |
| 259 * Input Arguments: |
| 260 * |
| 261 * pSrc - pointer to the vector of input samples to which the |
| 262 * filter is applied |
| 263 * sampLen - the number of samples contained in the input and output |
| 264 * vectors |
| 265 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 266 * represented in Q0.15 format (defined in section 1.6.5). Given |
| 267 * that: |
| 268 * -32768 = pTapsQ15(k) < 32768, |
| 269 * 0 = k <tapsLen, |
| 270 * the range on the actual filter coefficients is -1 = bK <1, and |
| 271 * therefore coefficient normalization may be required during the |
| 272 * filter design process. |
| 273 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 274 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 275 * (state). The user is responsible for allocation, initialization, |
| 276 * and de-allocation. The filter memory elements are initialized to |
| 277 * zero in most applications. |
| 278 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 279 * internally by the function. The user should initialize the value |
| 280 * of this index to zero. |
| 281 * |
| 282 * Output Arguments: |
| 283 * |
| 284 * pDst - pointer to the vector of filtered output samples |
| 285 * |
| 286 * Return Value: |
| 287 * |
| 288 * OMX_Sts_NoErr - no error |
| 289 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 290 * following is true: |
| 291 * - One or more of the following pointers is NULL: |
| 292 * - pSrc, |
| 293 * - pDst, |
| 294 * - pSrcDst, |
| 295 * - pTapsQ15, |
| 296 * - pDelayLine, or |
| 297 * - pDelayLineIndex |
| 298 * - samplen < 0 |
| 299 * - tapslen < 1 |
| 300 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen). |
| 301 * |
| 302 */ |
| 303 OMXResult omxSP_FIR_Direct_S16 ( |
| 304 const OMX_S16 *pSrc, |
| 305 OMX_S16 *pDst, |
| 306 OMX_INT sampLen, |
| 307 const OMX_S16 *pTapsQ15, |
| 308 OMX_INT tapsLen, |
| 309 OMX_S16 *pDelayLine, |
| 310 OMX_INT *pDelayLineIndex |
| 311 ); |
| 312 |
| 313 |
| 314 |
| 315 /** |
| 316 * Function: omxSP_FIR_Direct_S16_I (2.2.3.1.1) |
| 317 * |
| 318 * Description: |
| 319 * Block FIR filtering for 16-bit data type. This function applies the |
| 320 * FIR filter defined by the coefficient vector pTapsQ15 to a vector of |
| 321 * input data. The result is saturated with rounding if the operation |
| 322 * produces a value outside the range of a signed 16-bit integer. |
| 323 * Rounding behavior is defined in: |
| 324 * section 1.6.7 "Integer Scaling and Rounding Conventions". |
| 325 * The internal accumulator width must be at least 32 bits. The result |
| 326 * is undefined if any of the partially accumulated values exceeds the |
| 327 * range of a signed 32-bit integer. |
| 328 * |
| 329 * Input Arguments: |
| 330 * |
| 331 * pSrcDst - pointer to the vector of input samples to which the |
| 332 * filter is applied |
| 333 * sampLen - the number of samples contained in the input and output |
| 334 * vectors |
| 335 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 336 * represented in Q0.15 format (defined in section 1.6.5). Given |
| 337 * that: |
| 338 * -32768 = pTapsQ15(k) < 32768, |
| 339 * 0 = k <tapsLen, |
| 340 * the range on the actual filter coefficients is -1 = bK <1, and |
| 341 * therefore coefficient normalization may be required during the |
| 342 * filter design process. |
| 343 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 344 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 345 * (state). The user is responsible for allocation, initialization, |
| 346 * and de-allocation. The filter memory elements are initialized to |
| 347 * zero in most applications. |
| 348 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 349 * internally by the function. The user should initialize the value |
| 350 * of this index to zero. |
| 351 * |
| 352 * Output Arguments: |
| 353 * |
| 354 * pSrcDst - pointer to the vector of filtered output samples |
| 355 * |
| 356 * Return Value: |
| 357 * |
| 358 * OMX_Sts_NoErr - no error |
| 359 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 360 * following is true: |
| 361 * - One or more of the following pointers is NULL: |
| 362 * - pSrc, |
| 363 * - pDst, |
| 364 * - pSrcDst, |
| 365 * - pTapsQ15, |
| 366 * - pDelayLine, or |
| 367 * - pDelayLineIndex |
| 368 * - samplen < 0 |
| 369 * - tapslen < 1 |
| 370 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen). |
| 371 * |
| 372 */ |
| 373 OMXResult omxSP_FIR_Direct_S16_I ( |
| 374 OMX_S16 *pSrcDst, |
| 375 OMX_INT sampLen, |
| 376 const OMX_S16 *pTapsQ15, |
| 377 OMX_INT tapsLen, |
| 378 OMX_S16 *pDelayLine, |
| 379 OMX_INT *pDelayLineIndex |
| 380 ); |
| 381 |
| 382 |
| 383 |
| 384 /** |
| 385 * Function: omxSP_FIR_Direct_S16_Sfs (2.2.3.1.1) |
| 386 * |
| 387 * Description: |
| 388 * Block FIR filtering for 16-bit data type. This function applies |
| 389 * the FIR filter defined by the coefficient vector pTapsQ15 to a |
| 390 * vector of input data. The output is multiplied by 2 to the negative |
| 391 * power of scalefactor (i.e., 2^-scalefactor) before returning to the caller. |
| 392 * Scaling and rounding conventions are defined in section 1.6.7. |
| 393 * The internal accumulator width must be at least 32 bits. |
| 394 * The result is undefined if any of the partially accumulated |
| 395 * values exceeds the range of a signed 32-bit integer. |
| 396 * |
| 397 * Input Arguments: |
| 398 * |
| 399 * pSrc - pointer to the vector of input samples to which the |
| 400 * filter is applied |
| 401 * sampLen - the number of samples contained in the input and output |
| 402 * vectors |
| 403 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 404 * represented in Q0.15 format (defined in section 1.6.5). Given |
| 405 * that: |
| 406 * -32768 = pTapsQ15(k) < 32768, |
| 407 * 0 = k <tapsLen, |
| 408 * the range on the actual filter coefficients is -1 = bK <1, and |
| 409 * therefore coefficient normalization may be required during the |
| 410 * filter design process. |
| 411 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 412 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 413 * (state). The user is responsible for allocation, initialization, |
| 414 * and de-allocation. The filter memory elements are initialized to |
| 415 * zero in most applications. |
| 416 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 417 * internally by the function. The user should initialize the value |
| 418 * of this index to zero. |
| 419 * scaleFactor - saturation fixed scalefactor |
| 420 * |
| 421 * Output Arguments: |
| 422 * |
| 423 * pDst - pointer to the vector of filtered output samples |
| 424 * |
| 425 * Return Value: |
| 426 * |
| 427 * OMX_Sts_NoErr - no error |
| 428 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 429 * following is true: |
| 430 * - One or more of the following pointers is NULL: |
| 431 * - pSrc, |
| 432 * - pDst, |
| 433 * - pSrcDst, |
| 434 * - pTapsQ15, |
| 435 * - pDelayLine, or |
| 436 * - pDelayLineIndex |
| 437 * - samplen < 0 |
| 438 * - tapslen < 1 |
| 439 * - scaleFactor < 0 |
| 440 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen). |
| 441 * |
| 442 */ |
| 443 OMXResult omxSP_FIR_Direct_S16_Sfs ( |
| 444 const OMX_S16 *pSrc, |
| 445 OMX_S16 *pDst, |
| 446 OMX_INT sampLen, |
| 447 const OMX_S16 *pTapsQ15, |
| 448 OMX_INT tapsLen, |
| 449 OMX_S16 *pDelayLine, |
| 450 OMX_INT *pDelayLineIndex, |
| 451 OMX_INT scaleFactor |
| 452 ); |
| 453 |
| 454 |
| 455 |
| 456 /** |
| 457 * Function: omxSP_FIR_Direct_S16_ISfs (2.2.3.1.1) |
| 458 * |
| 459 * Description: |
| 460 * Block FIR filtering for 16-bit data type. This function applies |
| 461 * the FIR filter defined by the coefficient vector pTapsQ15 to a |
| 462 * vector of input data. The output is multiplied by 2 to the negative |
| 463 * power of scalefactor (i.e., 2^-scalefactor) before returning to the caller. |
| 464 * Scaling and rounding conventions are defined in section 1.6.7. |
| 465 * The internal accumulator width must be at least 32 bits. |
| 466 * The result is undefined if any of the partially accumulated |
| 467 * values exceeds the range of a signed 32-bit integer. |
| 468 * |
| 469 * Input Arguments: |
| 470 * |
| 471 * pSrcDst - pointer to the vector of input samples to which the |
| 472 * filter is applied |
| 473 * sampLen - the number of samples contained in the input and output |
| 474 * vectors |
| 475 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 476 * represented in Q0.15 format (defined in section 1.6.5). Given |
| 477 * that: |
| 478 * -32768 = pTapsQ15(k) < 32768, |
| 479 * 0 = k <tapsLen, |
| 480 * the range on the actual filter coefficients is -1 = bK <1, and |
| 481 * therefore coefficient normalization may be required during the |
| 482 * filter design process. |
| 483 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 484 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 485 * (state). The user is responsible for allocation, initialization, |
| 486 * and de-allocation. The filter memory elements are initialized to |
| 487 * zero in most applications. |
| 488 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 489 * internally by the function. The user should initialize the value |
| 490 * of this index to zero. |
| 491 * scaleFactor - saturation fixed scalefactor |
| 492 * |
| 493 * Output Arguments: |
| 494 * |
| 495 * pSrcDst - pointer to the vector of filtered output samples |
| 496 * |
| 497 * Return Value: |
| 498 * |
| 499 * OMX_Sts_NoErr - no error |
| 500 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 501 * following is true: |
| 502 * - One or more of the following pointers is NULL: |
| 503 * - pSrc, |
| 504 * - pDst, |
| 505 * - pSrcDst, |
| 506 * - pTapsQ15, |
| 507 * - pDelayLine, or |
| 508 * - pDelayLineIndex |
| 509 * - samplen < 0 |
| 510 * - tapslen < 1 |
| 511 * - scaleFactor < 0 |
| 512 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen). |
| 513 * |
| 514 */ |
| 515 OMXResult omxSP_FIR_Direct_S16_ISfs ( |
| 516 OMX_S16 *pSrcDst, |
| 517 OMX_INT sampLen, |
| 518 const OMX_S16 *pTapsQ15, |
| 519 OMX_INT tapsLen, |
| 520 OMX_S16 *pDelayLine, |
| 521 OMX_INT *pDelayLineIndex, |
| 522 OMX_INT scaleFactor |
| 523 ); |
| 524 |
| 525 |
| 526 |
| 527 /** |
| 528 * Function: omxSP_FIROne_Direct_S16 (2.2.3.1.2) |
| 529 * |
| 530 * Description: |
| 531 * Single-sample FIR filtering for 16-bit data type. These functions apply |
| 532 * the FIR filter defined by the coefficient vector pTapsQ15 to a single |
| 533 * sample of input data. The result is saturated with rounding if the |
| 534 * operation produces a value outside the range of a signed 16-bit integer. |
| 535 * Rounding behavior is defined in: |
| 536 * section 1.6.7 "Integer Scaling and Rounding Conventions". |
| 537 * The internal accumulator width must be at least 32 bits. The result is |
| 538 * undefined if any of the partially accumulated values exceeds the range of a |
| 539 * signed 32-bit integer. |
| 540 * |
| 541 * Input Arguments: |
| 542 * |
| 543 * val - the single input sample to which the filter is |
| 544 * applied. |
| 545 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 546 * represented in Q0.15 format (as defined in section 1.6.5). Given |
| 547 * that: |
| 548 * -32768 = pTapsQ15(k) < 32768, |
| 549 * 0 = k < tapsLen, |
| 550 * the range on the actual filter coefficients is -1 = bK <1, and |
| 551 * therefore coefficient normalization may be required during the |
| 552 * filter design process. |
| 553 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 554 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 555 * (state). The user is responsible for allocation, initialization, |
| 556 * and de-allocation. The filter memory elements are initialized to |
| 557 * zero in most applications. |
| 558 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 559 * internally by the function. The user should initialize the value |
| 560 * of this index to zero. |
| 561 * |
| 562 * Output Arguments: |
| 563 * |
| 564 * pResult - pointer to the filtered output sample |
| 565 * |
| 566 * Return Value: |
| 567 * |
| 568 * OMX_Sts_NoErr - no error |
| 569 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 570 * following is true: |
| 571 * - One or more of the following pointers is NULL: |
| 572 * - pResult, |
| 573 * - pTapsQ15, |
| 574 * - pDelayLine, or |
| 575 * - pDelayLineIndex |
| 576 * - tapslen < 1 |
| 577 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen) |
| 578 * |
| 579 */ |
| 580 OMXResult omxSP_FIROne_Direct_S16 ( |
| 581 OMX_S16 val, |
| 582 OMX_S16 *pResult, |
| 583 const OMX_S16 *pTapsQ15, |
| 584 OMX_INT tapsLen, |
| 585 OMX_S16 *pDelayLine, |
| 586 OMX_INT *pDelayLineIndex |
| 587 ); |
| 588 |
| 589 |
| 590 |
| 591 /** |
| 592 * Function: omxSP_FIROne_Direct_S16_I (2.2.3.1.2) |
| 593 * |
| 594 * Description: |
| 595 * Single-sample FIR filtering for 16-bit data type. These functions apply |
| 596 * the FIR filter defined by the coefficient vector pTapsQ15 to a single |
| 597 * sample of input data. The result is saturated with rounding if the |
| 598 * operation produces a value outside the range of a signed 16-bit integer. |
| 599 * Rounding behavior is defined in: |
| 600 * section 1.6.7 "Integer Scaling and Rounding Conventions". |
| 601 * The internal accumulator width must be at least 32 bits. The result is |
| 602 * undefined if any of the partially accumulated values exceeds the range of a |
| 603 * signed 32-bit integer. |
| 604 * |
| 605 * Input Arguments: |
| 606 * |
| 607 * pValResult - pointer to the single input sample to which the filter is |
| 608 * applied. |
| 609 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 610 * represented in Q0.15 format (as defined in section 1.6.5). Given |
| 611 * that: |
| 612 * -32768 = pTapsQ15(k) < 32768, |
| 613 * 0 = k < tapsLen, |
| 614 * the range on the actual filter coefficients is -1 = bK <1, and |
| 615 * therefore coefficient normalization may be required during the |
| 616 * filter design process. |
| 617 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 618 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 619 * (state). The user is responsible for allocation, initialization, |
| 620 * and de-allocation. The filter memory elements are initialized to |
| 621 * zero in most applications. |
| 622 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 623 * internally by the function. The user should initialize the value |
| 624 * of this index to zero. |
| 625 * |
| 626 * Output Arguments: |
| 627 * |
| 628 * pValResult - pointer to the filtered output sample |
| 629 * |
| 630 * Return Value: |
| 631 * |
| 632 * OMX_Sts_NoErr - no error |
| 633 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 634 * following is true: |
| 635 * - One or more of the following pointers is NULL: |
| 636 * - pValResult, |
| 637 * - pTapsQ15, |
| 638 * - pDelayLine, or |
| 639 * - pDelayLineIndex |
| 640 * - tapslen < 1 |
| 641 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen) |
| 642 * |
| 643 */ |
| 644 OMXResult omxSP_FIROne_Direct_S16_I ( |
| 645 OMX_S16 *pValResult, |
| 646 const OMX_S16 *pTapsQ15, |
| 647 OMX_INT tapsLen, |
| 648 OMX_S16 *pDelayLine, |
| 649 OMX_INT *pDelayLineIndex |
| 650 ); |
| 651 |
| 652 |
| 653 |
| 654 /** |
| 655 * Function: omxSP_FIROne_Direct_S16_Sfs (2.2.3.1.2) |
| 656 * |
| 657 * Description: |
| 658 * Single-sample FIR filtering for 16-bit data type. These functions apply |
| 659 * the FIR filter defined by the coefficient vector pTapsQ15 to a single |
| 660 * sample of input data. The output is multiplied by 2 to the negative power |
| 661 * of scalefactor (i.e., 2^-scalefactor) before returning to the user. |
| 662 * Scaling and rounding conventions are defined in section 1.6.7. |
| 663 * The internal accumulator width must be at least 32 bits. |
| 664 * The result is undefined if any of the partially accumulated values exceeds |
| 665 * the range of a signed 32-bit integer. |
| 666 * |
| 667 * Input Arguments: |
| 668 * |
| 669 * val - the single input sample to which the filter is |
| 670 * applied. |
| 671 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 672 * represented in Q0.15 format (as defined in section 1.6.5). Given |
| 673 * that: |
| 674 * -32768 = pTapsQ15(k) < 32768, |
| 675 * 0 = k < tapsLen, |
| 676 * the range on the actual filter coefficients is -1 = bK <1, and |
| 677 * therefore coefficient normalization may be required during the |
| 678 * filter design process. |
| 679 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 680 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 681 * (state). The user is responsible for allocation, initialization, |
| 682 * and de-allocation. The filter memory elements are initialized to |
| 683 * zero in most applications. |
| 684 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 685 * internally by the function. The user should initialize the value |
| 686 * of this index to zero. |
| 687 * scaleFactor - saturation fixed scaleFactor |
| 688 * |
| 689 * Output Arguments: |
| 690 * |
| 691 * pResult - pointer to the filtered output sample |
| 692 * |
| 693 * Return Value: |
| 694 * |
| 695 * OMX_Sts_NoErr - no error |
| 696 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 697 * following is true: |
| 698 * - One or more of the following pointers is NULL: |
| 699 * - pResult, |
| 700 * - pTapsQ15, |
| 701 * - pDelayLine, or |
| 702 * - pDelayLineIndex |
| 703 * - tapslen < 1 |
| 704 * - scaleFactor < 0 |
| 705 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen) |
| 706 * |
| 707 */ |
| 708 OMXResult omxSP_FIROne_Direct_S16_Sfs ( |
| 709 OMX_S16 val, |
| 710 OMX_S16 *pResult, |
| 711 const OMX_S16 *pTapsQ15, |
| 712 OMX_INT tapsLen, |
| 713 OMX_S16 *pDelayLine, |
| 714 OMX_INT *pDelayLineIndex, |
| 715 OMX_INT scaleFactor |
| 716 ); |
| 717 |
| 718 |
| 719 |
| 720 /** |
| 721 * Function: omxSP_FIROne_Direct_S16_ISfs (2.2.3.1.2) |
| 722 * |
| 723 * Description: |
| 724 * Single-sample FIR filtering for 16-bit data type. These functions apply |
| 725 * the FIR filter defined by the coefficient vector pTapsQ15 to a single |
| 726 * sample of input data. The output is multiplied by 2 to the negative power |
| 727 * of scalefactor (i.e., 2^-scalefactor) before returning to the user. |
| 728 * Scaling and rounding conventions are defined in section 1.6.7. |
| 729 * The internal accumulator width must be at least 32 bits. |
| 730 * The result is undefined if any of the partially accumulated values exceeds |
| 731 * the range of a signed 32-bit integer. |
| 732 * |
| 733 * Input Arguments: |
| 734 * |
| 735 * pValResult - the pointer to a single input sample to which the filter is |
| 736 * applied. |
| 737 * pTapsQ15 - pointer to the vector that contains the filter coefficients, |
| 738 * represented in Q0.15 format (as defined in section 1.6.5). Given |
| 739 * that: |
| 740 * -32768 = pTapsQ15(k) < 32768, |
| 741 * 0 = k < tapsLen, |
| 742 * the range on the actual filter coefficients is -1 = bK <1, and |
| 743 * therefore coefficient normalization may be required during the |
| 744 * filter design process. |
| 745 * tapsLen - the number of taps, or, equivalently, the filter order + 1 |
| 746 * pDelayLine - pointer to the 2.tapsLen -element filter memory buffer |
| 747 * (state). The user is responsible for allocation, initialization, |
| 748 * and de-allocation. The filter memory elements are initialized to |
| 749 * zero in most applications. |
| 750 * pDelayLineIndex - pointer to the filter memory index that is maintained |
| 751 * internally by the function. The user should initialize the value |
| 752 * of this index to zero. |
| 753 * scaleFactor - saturation fixed scaleFactor |
| 754 * |
| 755 * Output Arguments: |
| 756 * |
| 757 * pValResult - pointer to the filtered output sample |
| 758 * |
| 759 * Return Value: |
| 760 * |
| 761 * OMX_Sts_NoErr - no error |
| 762 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 763 * following is true: |
| 764 * - One or more of the following pointers is NULL: |
| 765 * - pValResult, |
| 766 * - pTapsQ15, |
| 767 * - pDelayLine, or |
| 768 * - pDelayLineIndex |
| 769 * - tapslen < 1 |
| 770 * - scaleFactor < 0 |
| 771 * - *pDelayLineIndex < 0 or *pDelayLineIndex >= (2 * tapslen) |
| 772 * |
| 773 */ |
| 774 OMXResult omxSP_FIROne_Direct_S16_ISfs ( |
| 775 OMX_S16 *pValResult, |
| 776 const OMX_S16 *pTapsQ15, |
| 777 OMX_INT tapsLen, |
| 778 OMX_S16 *pDelayLine, |
| 779 OMX_INT *pDelayLineIndex, |
| 780 OMX_INT scaleFactor |
| 781 ); |
| 782 |
| 783 |
| 784 |
| 785 /** |
| 786 * Function: omxSP_IIR_Direct_S16 (2.2.3.2.1) |
| 787 * |
| 788 * Description: |
| 789 * Block IIR filtering for 16-bit data. This function applies the direct form |
| 790 * II IIR filter defined by the coefficient vector pTaps to a vector of input |
| 791 * data. The internal accumulator width must be at least 32 bits, and the |
| 792 * result is saturated if the operation produces a value outside the range of |
| 793 * a signed 16-bit integer, i.e., the output will saturate to 0x8000 (-32768) |
| 794 * for a negative overflow or 0x7fff (32767) for a positive overflow. The |
| 795 * result is undefined if any of the partially accumulated values exceeds the |
| 796 * range of a signed 32-bit integer. |
| 797 * |
| 798 * Input Arguments: |
| 799 * |
| 800 * pSrc - pointer to the vector of input samples to which the |
| 801 * filter is applied |
| 802 * len - the number of samples contained in both the input and output |
| 803 * vectors |
| 804 * pTaps - pointer to the 2L+2-element vector that contains the combined |
| 805 * numerator and denominator filter coefficients from the system |
| 806 * transfer function, H(z). Coefficient scaling and coefficient |
| 807 * vector organization should follow the conventions described |
| 808 * above. The value of the coefficient scaleFactor exponent must be |
| 809 * non-negative (sf=0). |
| 810 * order - the maximum of the degrees of the numerator and denominator |
| 811 * coefficient polynomials from the system transfer function, H(z). |
| 812 * In the notation of section 2.2.3.2, the parameter |
| 813 * order=max(K,M)=L gives the maximum delay, in samples, used to |
| 814 * compute each output sample. |
| 815 * pDelayLine - pointer to the L-element filter memory buffer (state). The |
| 816 * user is responsible for allocation, initialization, and |
| 817 * deallocation. The filter memory elements are initialized to zero |
| 818 * in most applications. |
| 819 * |
| 820 * Output Arguments: |
| 821 * |
| 822 * pDst - pointer to the vector of filtered output samples |
| 823 * |
| 824 * Return Value: |
| 825 * |
| 826 * OMX_Sts_NoErr - no error |
| 827 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 828 * following is true: |
| 829 * - one or more of the following pointers is NULL: |
| 830 * - pSrc, |
| 831 * - pDst, |
| 832 * - pTaps, or |
| 833 * - pDelayLine. |
| 834 * - len < 0 |
| 835 * - pTaps[order+1] < 0 (negative scaling) |
| 836 * - order < 1 |
| 837 * |
| 838 */ |
| 839 OMXResult omxSP_IIR_Direct_S16 ( |
| 840 const OMX_S16 *pSrc, |
| 841 OMX_S16 *pDst, |
| 842 OMX_INT len, |
| 843 const OMX_S16 *pTaps, |
| 844 OMX_INT order, |
| 845 OMX_S32 *pDelayLine |
| 846 ); |
| 847 |
| 848 |
| 849 |
| 850 /** |
| 851 * Function: omxSP_IIR_Direct_S16_I (2.2.3.2.1) |
| 852 * |
| 853 * Description: |
| 854 * Block IIR filtering for 16-bit data. This function applies the direct form |
| 855 * II IIR filter defined by the coefficient vector pTaps to a vector of input |
| 856 * data. The internal accumulator width must be at least 32 bits, and the |
| 857 * result is saturated if the operation produces a value outside the range of |
| 858 * a signed 16-bit integer, i.e., the output will saturate to 0x8000 (-32768) |
| 859 * for a negative overflow or 0x7fff (32767) for a positive overflow. The |
| 860 * result is undefined if any of the partially accumulated values exceeds the |
| 861 * range of a signed 32-bit integer. |
| 862 * |
| 863 * Input Arguments: |
| 864 * |
| 865 * pSrcDst - pointer to the vector of input samples to which the |
| 866 * filter is applied |
| 867 * len - the number of samples contained in both the input and output |
| 868 * vectors |
| 869 * pTaps - pointer to the 2L+2-element vector that contains the combined |
| 870 * numerator and denominator filter coefficients from the system |
| 871 * transfer function, H(z). Coefficient scaling and coefficient |
| 872 * vector organization should follow the conventions described |
| 873 * above. The value of the coefficient scaleFactor exponent must be |
| 874 * non-negative (sf>=0). |
| 875 * order - the maximum of the degrees of the numerator and denominator |
| 876 * coefficient polynomials from the system transfer function, H(z). |
| 877 * In the notation of section 2.2.3.2, the parameter |
| 878 * order=max(K,M)=L gives the maximum delay, in samples, used to |
| 879 * compute each output sample. |
| 880 * pDelayLine - pointer to the L-element filter memory buffer (state). The |
| 881 * user is responsible for allocation, initialization, and |
| 882 * deallocation. The filter memory elements are initialized to zero |
| 883 * in most applications. |
| 884 * |
| 885 * Output Arguments: |
| 886 * |
| 887 * pSrcDst - pointer to the vector of filtered output samples |
| 888 * |
| 889 * Return Value: |
| 890 * |
| 891 * OMX_Sts_NoErr - no error |
| 892 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 893 * following is true: |
| 894 * - one or more of the following pointers is NULL: |
| 895 * - pSrcDst, |
| 896 * - pTaps, or |
| 897 * - pDelayLine. |
| 898 * - len < 0 |
| 899 * - pTaps[order+1] < 0 (negative scaling) |
| 900 * - order < 1 |
| 901 * |
| 902 */ |
| 903 OMXResult omxSP_IIR_Direct_S16_I ( |
| 904 OMX_S16 *pSrcDst, |
| 905 OMX_INT len, |
| 906 const OMX_S16 *pTaps, |
| 907 OMX_INT order, |
| 908 OMX_S32 *pDelayLine |
| 909 ); |
| 910 |
| 911 |
| 912 |
| 913 /** |
| 914 * Function: omxSP_IIROne_Direct_S16 (2.2.3.2.2) |
| 915 * |
| 916 * Description: |
| 917 * Single sample IIR filtering for 16-bit data. This function applies the |
| 918 * direct form II IIR filter defined by the coefficient vector pTaps to a |
| 919 * single sample of input data. The internal accumulator width must be at |
| 920 * least 32 bits, and the result is saturated if the operation produces a |
| 921 * value outside the range of a signed 16-bit integer, i.e., the output will |
| 922 * saturate to 0x8000 (-32768) for a negative overflow or 0x7fff (32767) for a |
| 923 * positive overflow. The result is undefined if any of the partially |
| 924 * accumulated values exceeds the range of a signed 32-bit integer. |
| 925 * |
| 926 * Input Arguments: |
| 927 * |
| 928 * val - the single input sample to which the filter is |
| 929 * applied. |
| 930 * pTaps - pointer to the 2L+2 -element vector that contains the combined |
| 931 * numerator and denominator filter coefficients from the system |
| 932 * transfer function, H(z). Coefficient scaling and coefficient |
| 933 * vector organization should follow the conventions described |
| 934 * above. The value of the coefficient scaleFactor exponent must be |
| 935 * non-negative (sf>=0). |
| 936 * order - the maximum of the degrees of the numerator and denominator |
| 937 * coefficient polynomials from the system transfer function, H(z). |
| 938 * In the notation of section 2.2.3.2, the parameter |
| 939 * order=max(K,M)=L gives the maximum delay, in samples, used to |
| 940 * compute each output sample. |
| 941 * pDelayLine - pointer to the L-element filter memory buffer (state). The |
| 942 * user is responsible for allocation, initialization, and |
| 943 * deallocation. The filter memory elements are initialized to zero |
| 944 * in most applications. |
| 945 * |
| 946 * Output Arguments: |
| 947 * |
| 948 * pResult - pointer to the filtered output sample |
| 949 * |
| 950 * Return Value: |
| 951 * |
| 952 * OMX_Sts_NoErr - no error |
| 953 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 954 * following is true: |
| 955 * - one or more of the following pointers is NULL: pResult, |
| 956 * pTaps, or pDelayLine. |
| 957 * - order < 1 |
| 958 * - pTaps[order+1] < 0 (negative scaling) |
| 959 * |
| 960 */ |
| 961 OMXResult omxSP_IIROne_Direct_S16 ( |
| 962 OMX_S16 val, |
| 963 OMX_S16 *pResult, |
| 964 const OMX_S16 *pTaps, |
| 965 OMX_INT order, |
| 966 OMX_S32 *pDelayLine |
| 967 ); |
| 968 |
| 969 |
| 970 |
| 971 /** |
| 972 * Function: omxSP_IIROne_Direct_S16_I (2.2.3.2.2) |
| 973 * |
| 974 * Description: |
| 975 * Single sample IIR filtering for 16-bit data. This function applies the |
| 976 * direct form II IIR filter defined by the coefficient vector pTaps to a |
| 977 * single sample of input data. The internal accumulator width must be at |
| 978 * least 32 bits, and the result is saturated if the operation produces a |
| 979 * value outside the range of a signed 16-bit integer, i.e., the output will |
| 980 * saturate to 0x8000 (-32768) for a negative overflow or 0x7fff (32767) for a |
| 981 * positive overflow. The result is undefined if any of the partially |
| 982 * accumulated values exceeds the range of a signed 32-bit integer. |
| 983 * |
| 984 * Input Arguments: |
| 985 * |
| 986 * pValResult - pointer to the single input sample to which the filter is |
| 987 * applied. |
| 988 * pTaps - pointer to the 2L+2 -element vector that contains the combined |
| 989 * numerator and denominator filter coefficients from the system |
| 990 * transfer function, H(z). Coefficient scaling and coefficient |
| 991 * vector organization should follow the conventions described |
| 992 * above. The value of the coefficient scaleFactor exponent must be |
| 993 * non-negative (sf>=0). |
| 994 * order - the maximum of the degrees of the numerator and denominator |
| 995 * coefficient polynomials from the system transfer function, H(z). |
| 996 * In the notation of section 2.2.3.2, the parameter |
| 997 * order=max(K,M)=L gives the maximum delay, in samples, used to |
| 998 * compute each output sample. |
| 999 * pDelayLine - pointer to the L-element filter memory buffer (state). The |
| 1000 * user is responsible for allocation, initialization, and |
| 1001 * deallocation. The filter memory elements are initialized to zero |
| 1002 * in most applications. |
| 1003 * |
| 1004 * Output Arguments: |
| 1005 * |
| 1006 * pValResult - pointer to the filtered output sample |
| 1007 * |
| 1008 * Return Value: |
| 1009 * |
| 1010 * OMX_Sts_NoErr - no error |
| 1011 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1012 * following is true: |
| 1013 * - one or more of the following pointers is NULL: |
| 1014 * pValResult, pTaps, or pDelayLine. |
| 1015 * - order < 1 |
| 1016 * - pTaps[order+1] < 0 (negative scaling) |
| 1017 * |
| 1018 */ |
| 1019 OMXResult omxSP_IIROne_Direct_S16_I ( |
| 1020 OMX_S16 *pValResult, |
| 1021 const OMX_S16 *pTaps, |
| 1022 OMX_INT order, |
| 1023 OMX_S32 *pDelayLine |
| 1024 ); |
| 1025 |
| 1026 |
| 1027 |
| 1028 /** |
| 1029 * Function: omxSP_IIR_BiQuadDirect_S16 (2.2.3.3.1) |
| 1030 * |
| 1031 * Description: |
| 1032 * Block biquad IIR filtering for 16-bit data type. This function applies the |
| 1033 * direct form II biquad IIR cascade defined by the coefficient vector pTaps |
| 1034 * to a vector of input data. The internal accumulator width must be at least |
| 1035 * 32 bits, and the result is saturated if the operation produces a value |
| 1036 * outside the range of a signed 16-bit integer, i.e., the output will |
| 1037 * saturate to 0x8000 (-32768) for a negative overflow or 0x7fff (32767) for a |
| 1038 * positive overflow. The result is undefined if any of the partially |
| 1039 * accumulated values exceeds the range of a signed 32-bit integer. |
| 1040 * |
| 1041 * Input Arguments: |
| 1042 * |
| 1043 * pSrc - pointer to the vector of input samples to which the |
| 1044 * filter is applied |
| 1045 * len - the number of samples contained in both the input and output |
| 1046 * vectors |
| 1047 * pTaps - pointer to the 6P -element vector that contains the combined |
| 1048 * numerator and denominator filter coefficients from the biquad |
| 1049 * cascade. Coefficient scaling and coefficient vector organization |
| 1050 * should follow the conventions described above. The value of the |
| 1051 * coefficient scaleFactor exponent must be non-negative. (sfp>=0). |
| 1052 * numBiquad - the number of biquads contained in the IIR filter cascade: |
| 1053 * (P) |
| 1054 * pDelayLine - pointer to the 2P -element filter memory buffer (state). |
| 1055 * The user is responsible for allocation, initialization, and |
| 1056 * de-allocation. The filter memory elements are initialized to |
| 1057 * zero in most applications. |
| 1058 * |
| 1059 * Output Arguments: |
| 1060 * |
| 1061 * pDst - pointer to the vector of filtered output samples |
| 1062 * |
| 1063 * Return Value: |
| 1064 * |
| 1065 * OMX_Sts_NoErr - no error |
| 1066 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1067 * following is true: |
| 1068 * - one or more of the following pointers is NULL: pSrc, pDst, |
| 1069 * pTaps, or pDelayLine. |
| 1070 * - len < 0 |
| 1071 * - numBiquad < 1 |
| 1072 * - pTaps[3+n*6] < 0, for 0 <= n < numBiquad (negative scaling) |
| 1073 * |
| 1074 */ |
| 1075 OMXResult omxSP_IIR_BiQuadDirect_S16 ( |
| 1076 const OMX_S16 *pSrc, |
| 1077 OMX_S16 *pDst, |
| 1078 OMX_INT len, |
| 1079 const OMX_S16 *pTaps, |
| 1080 OMX_INT numBiquad, |
| 1081 OMX_S32 *pDelayLine |
| 1082 ); |
| 1083 |
| 1084 |
| 1085 |
| 1086 /** |
| 1087 * Function: omxSP_IIR_BiQuadDirect_S16_I (2.2.3.3.1) |
| 1088 * |
| 1089 * Description: |
| 1090 * Block biquad IIR filtering for 16-bit data type. This function applies the |
| 1091 * direct form II biquad IIR cascade defined by the coefficient vector pTaps |
| 1092 * to a vector of input data. The internal accumulator width must be at least |
| 1093 * 32 bits, and the result is saturated if the operation produces a value |
| 1094 * outside the range of a signed 16-bit integer, i.e., the output will |
| 1095 * saturate to 0x8000 (-32768) for a negative overflow or 0x7fff (32767) for a |
| 1096 * positive overflow. The result is undefined if any of the partially |
| 1097 * accumulated values exceeds the range of a signed 32-bit integer. |
| 1098 * |
| 1099 * Input Arguments: |
| 1100 * |
| 1101 * pSrcDst - pointer to the vector of input samples to which the |
| 1102 * filter is applied |
| 1103 * len - the number of samples contained in both the input and output |
| 1104 * vectors |
| 1105 * pTaps - pointer to the 6P -element vector that contains the combined |
| 1106 * numerator and denominator filter coefficients from the biquad |
| 1107 * cascade. Coefficient scaling and coefficient vector organization |
| 1108 * should follow the conventions described above. The value of the |
| 1109 * coefficient scaleFactor exponent must be non-negative. (sfp>=0). |
| 1110 * numBiquad - the number of biquads contained in the IIR filter cascade: |
| 1111 * (P) |
| 1112 * pDelayLine - pointer to the 2P -element filter memory buffer (state). |
| 1113 * The user is responsible for allocation, initialization, and |
| 1114 * de-allocation. The filter memory elements are initialized to |
| 1115 * zero in most applications. |
| 1116 * |
| 1117 * Output Arguments: |
| 1118 * |
| 1119 * pSrcDst - pointer to the vector of filtered output samples |
| 1120 * |
| 1121 * Return Value: |
| 1122 * |
| 1123 * OMX_Sts_NoErr - no error |
| 1124 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1125 * following is true: |
| 1126 * - one or more of the following pointers is NULL: |
| 1127 * pSrcDst, pTaps, or pDelayLine. |
| 1128 * - len < 0 |
| 1129 * - numBiquad < 1 |
| 1130 * - pTaps[3+n*6] < 0, for 0 <= n < numBiquad (negative scaling) |
| 1131 * |
| 1132 */ |
| 1133 OMXResult omxSP_IIR_BiQuadDirect_S16_I ( |
| 1134 OMX_S16 *pSrcDst, |
| 1135 OMX_INT len, |
| 1136 const OMX_S16 *pTaps, |
| 1137 OMX_INT numBiquad, |
| 1138 OMX_S32 *pDelayLine |
| 1139 ); |
| 1140 |
| 1141 |
| 1142 |
| 1143 /** |
| 1144 * Function: omxSP_IIROne_BiQuadDirect_S16 (2.2.3.3.2) |
| 1145 * |
| 1146 * Description: |
| 1147 * Single-sample biquad IIR filtering for 16-bit data type. This function |
| 1148 * applies the direct form II biquad IIR cascade defined by the coefficient |
| 1149 * vector pTaps to a single sample of input data. The internal accumulator |
| 1150 * width must be at least 32 bits, and the result is saturated if the |
| 1151 * operation produces a value outside the range of a signed 16-bit integer, |
| 1152 * i.e., the output will saturate to 0x8000 (-32768) for a negative overflow |
| 1153 * or 0x7fff (32767) for a positive overflow. The result is undefined if any |
| 1154 * of the partially accumulated values exceeds the range of a signed 32-bit |
| 1155 * integer. |
| 1156 * |
| 1157 * Input Arguments: |
| 1158 * |
| 1159 * val - the single input sample to which the filter is |
| 1160 * applied. |
| 1161 * pTaps - pointer to the 6P-element vector that contains the combined |
| 1162 * numerator and denominator filter coefficients from the biquad |
| 1163 * cascade. Coefficient scaling and coefficient vector organization |
| 1164 * should follow the conventions described above. The value of the |
| 1165 * coefficient scalefactor exponent must be non-negative: (sfp>=0). |
| 1166 * numBiquad - the number of biquads contained in the IIR filter cascade: |
| 1167 * (P) |
| 1168 * pDelayLine - pointer to the 2p-element filter memory buffer (state). The |
| 1169 * user is responsible for allocation, initialization, and |
| 1170 * deallocation. The filter memory elements are initialized to zero |
| 1171 * in most applications. |
| 1172 * |
| 1173 * Output Arguments: |
| 1174 * |
| 1175 * pResult - pointer to the filtered output sample |
| 1176 * |
| 1177 * Return Value: |
| 1178 * |
| 1179 * OMX_Sts_NoErr - no error |
| 1180 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1181 * following is true: |
| 1182 * - one or more of the following pointers is NULL: pResult, |
| 1183 * pValResult, pTaps, or pDelayLine. |
| 1184 * - numBiquad < 1 |
| 1185 * - pTaps[3+n*6] < 0, for 0 <= n < numBiquad (negative scaling) |
| 1186 * |
| 1187 */ |
| 1188 OMXResult omxSP_IIROne_BiQuadDirect_S16 ( |
| 1189 OMX_S16 val, |
| 1190 OMX_S16 *pResult, |
| 1191 const OMX_S16 *pTaps, |
| 1192 OMX_INT numBiquad, |
| 1193 OMX_S32 *pDelayLine |
| 1194 ); |
| 1195 |
| 1196 |
| 1197 |
| 1198 /** |
| 1199 * Function: omxSP_IIROne_BiQuadDirect_S16_I (2.2.3.3.2) |
| 1200 * |
| 1201 * Description: |
| 1202 * Single-sample biquad IIR filtering for 16-bit data type. This function |
| 1203 * applies the direct form II biquad IIR cascade defined by the coefficient |
| 1204 * vector pTaps to a single sample of input data. The internal accumulator |
| 1205 * width must be at least 32 bits, and the result is saturated if the |
| 1206 * operation produces a value outside the range of a signed 16-bit integer, |
| 1207 * i.e., the output will saturate to 0x8000 (-32768) for a negative overflow |
| 1208 * or 0x7fff (32767) for a positive overflow. The result is undefined if any |
| 1209 * of the partially accumulated values exceeds the range of a signed 32-bit |
| 1210 * integer. |
| 1211 * |
| 1212 * Input Arguments: |
| 1213 * |
| 1214 * pValResult - pointer to the single input sample to which the filter is |
| 1215 * applied. |
| 1216 * pTaps - pointer to the 6P-element vector that contains the combined |
| 1217 * numerator and denominator filter coefficients from the biquad |
| 1218 * cascade. Coefficient scaling and coefficient vector organization |
| 1219 * should follow the conventions described above. The value of the |
| 1220 * coefficient scalefactor exponent must be non-negative: (sfp>=0). |
| 1221 * numBiquad - the number of biquads contained in the IIR filter cascade: |
| 1222 * (P) |
| 1223 * pDelayLine - pointer to the 2p-element filter memory buffer (state). The |
| 1224 * user is responsible for allocation, initialization, and |
| 1225 * deallocation. The filter memory elements are initialized to zero |
| 1226 * in most applications. |
| 1227 * |
| 1228 * Output Arguments: |
| 1229 * |
| 1230 * pValResult - pointer to the filtered output sample |
| 1231 * |
| 1232 * Return Value: |
| 1233 * |
| 1234 * OMX_Sts_NoErr - no error |
| 1235 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1236 * following is true: |
| 1237 * - one or more of the following pointers is NULL: |
| 1238 * pValResult, pTaps, or pDelayLine. |
| 1239 * - numBiquad < 1 |
| 1240 * - pTaps[3+n*6] < 0, for 0 <= n < numBiquad (negative scaling) |
| 1241 * |
| 1242 */ |
| 1243 OMXResult omxSP_IIROne_BiQuadDirect_S16_I ( |
| 1244 OMX_S16 *pValResult, |
| 1245 const OMX_S16 *pTaps, |
| 1246 OMX_INT numBiquad, |
| 1247 OMX_S32 *pDelayLine |
| 1248 ); |
| 1249 |
| 1250 |
| 1251 |
| 1252 /** |
| 1253 * Function: omxSP_FilterMedian_S32 (2.2.3.4.1) |
| 1254 * |
| 1255 * Description: |
| 1256 * This function computes the median over the region specified by the median |
| 1257 * mask for the every element of the input array. The median outputs are |
| 1258 * stored in the corresponding elements of the output vector. |
| 1259 * |
| 1260 * Input Arguments: |
| 1261 * |
| 1262 * pSrc - pointer to the input vector |
| 1263 * len - number of elements contained in the input and output vectors (0 < |
| 1264 * len < 65536) |
| 1265 * maskSize - median mask size; if an even value is specified, the function |
| 1266 * subtracts 1 and uses the odd value of the filter mask for median |
| 1267 * filtering (0 < maskSize < 256) |
| 1268 * |
| 1269 * Output Arguments: |
| 1270 * |
| 1271 * pDst - pointer to the median-filtered output vector |
| 1272 * |
| 1273 * Return Value: |
| 1274 * |
| 1275 * OMX_Sts_NoErr - no error |
| 1276 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1277 * following is true: |
| 1278 * - one or more of the following pointers is NULL: pSrc, pDst. |
| 1279 * - len < 0 |
| 1280 * - maskSize < 1 or maskSize> 255 |
| 1281 * OMX_StsSP_EvenMedianMaskSizeErr - even mask size replaced by odd mask |
| 1282 * size |
| 1283 * |
| 1284 */ |
| 1285 OMXResult omxSP_FilterMedian_S32 ( |
| 1286 const OMX_S32 *pSrc, |
| 1287 OMX_S32 *pDst, |
| 1288 OMX_INT len, |
| 1289 OMX_INT maskSize |
| 1290 ); |
| 1291 |
| 1292 |
| 1293 |
| 1294 /** |
| 1295 * Function: omxSP_FilterMedian_S32_I (2.2.3.4.1) |
| 1296 * |
| 1297 * Description: |
| 1298 * This function computes the median over the region specified by the median |
| 1299 * mask for the every element of the input array. The median outputs are |
| 1300 * stored in the corresponding elements of the output vector. |
| 1301 * |
| 1302 * Input Arguments: |
| 1303 * |
| 1304 * pSrcDst - pointer to the input vector |
| 1305 * len - number of elements contained in the input and output vectors (0 < |
| 1306 * len < 65536) |
| 1307 * maskSize - median mask size; if an even value is specified, the function |
| 1308 * subtracts 1 and uses the odd value of the filter mask for median |
| 1309 * filtering (0 < maskSize < 256) |
| 1310 * |
| 1311 * Output Arguments: |
| 1312 * |
| 1313 * pSrcDst - pointer to the median-filtered output vector |
| 1314 * |
| 1315 * Return Value: |
| 1316 * |
| 1317 * OMX_Sts_NoErr - no error |
| 1318 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1319 * following is true: |
| 1320 * - pSrcDst is NULL. |
| 1321 * - len < 0 |
| 1322 * - maskSize < 1 or maskSize> 255 |
| 1323 * OMX_StsSP_EvenMedianMaskSizeErr - even mask size replaced by odd mask |
| 1324 * size |
| 1325 * |
| 1326 */ |
| 1327 OMXResult omxSP_FilterMedian_S32_I ( |
| 1328 OMX_S32 *pSrcDst, |
| 1329 OMX_INT len, |
| 1330 OMX_INT maskSize |
| 1331 ); |
| 1332 |
| 1333 |
| 1334 |
| 1335 /** |
| 1336 * Function: omxSP_FFTInit_C_SC16 (2.2.4.1.2) |
| 1337 * |
| 1338 * Description: |
| 1339 * These functions initialize the specification structures required for the |
| 1340 * complex FFT and IFFT functions. Desired block length is specified as an |
| 1341 * input. The function <FFTInit_C_SC16> is used to initialize the |
| 1342 * specification structures for functions <FFTFwd_CToC_SC16_Sfs> and |
| 1343 * <FFTInv_CToC_SC16_Sfs>. |
| 1344 * |
| 1345 * Memory for the specification structure *pFFTSpec |
| 1346 * must be allocated prior to calling these functions and should be 4-byte |
| 1347 * aligned for omxSP_FFTInit_C_SC16. |
| 1348 * |
| 1349 * The space required for *pFFTSpec, in bytes, can be |
| 1350 * determined using <FFTGetBufSize_C_SC16>. |
| 1351 * |
| 1352 * Input Arguments: |
| 1353 * |
| 1354 * order - base-2 logarithm of the desired block length; |
| 1355 * valid in the range [0,12] |
| 1356 * |
| 1357 * Output Arguments: |
| 1358 * |
| 1359 * pFFTSpec - pointer to initialized specification structure |
| 1360 * |
| 1361 * Return Value: |
| 1362 * |
| 1363 * OMX_Sts_NoErr -no error |
| 1364 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1365 * following is true: |
| 1366 * - pFFTSpec is either NULL or violates the 4-byte alignment |
| 1367 * restrictions |
| 1368 * - order < 0 or order > 12 |
| 1369 * |
| 1370 */ |
| 1371 OMXResult omxSP_FFTInit_C_SC16 ( |
| 1372 OMXFFTSpec_C_SC16 *pFFTSpec, |
| 1373 OMX_INT order |
| 1374 ); |
| 1375 |
| 1376 |
| 1377 |
| 1378 /** |
| 1379 * Function: omxSP_FFTInit_C_SC32 (2.2.4.1.2) |
| 1380 * |
| 1381 * Description: |
| 1382 * These functions initialize the specification structures required for the |
| 1383 * complex FFT and IFFT functions. Desired block length is specified as an |
| 1384 * input. The function <FFTInit_C_SC32> is used to initialize |
| 1385 * the specification structures for the functions <FFTFwd_CToC_SC32_Sfs> and |
| 1386 * <FFTInv_CToC_SC32_Sfs>. |
| 1387 * |
| 1388 * Memory for the specification structure *pFFTSpec must be allocated prior |
| 1389 * to calling these functions and should be 8-byte aligned for |
| 1390 * omxSP_FFTInit_C_SC32. |
| 1391 * |
| 1392 * The space required for *pFFTSpec, in bytes, can be |
| 1393 * determined using <FFTGetBufSize_C_SC32>. |
| 1394 * |
| 1395 * Input Arguments: |
| 1396 * |
| 1397 * order - base-2 logarithm of the desired block length; valid in the range |
| 1398 * [0,12] |
| 1399 * |
| 1400 * Output Arguments: |
| 1401 * |
| 1402 * pFFTSpec - pointer to initialized specification structure |
| 1403 * |
| 1404 * Return Value: |
| 1405 * |
| 1406 * OMX_Sts_NoErr -no error |
| 1407 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1408 * following is true: |
| 1409 * - pFFTSpec is either NULL or violates the 8-byte alignment |
| 1410 * restrictions |
| 1411 * - order < 0 or order > 12 |
| 1412 * |
| 1413 */ |
| 1414 OMXResult omxSP_FFTInit_C_SC32 ( |
| 1415 OMXFFTSpec_C_SC32 *pFFTSpec, |
| 1416 OMX_INT order |
| 1417 ); |
| 1418 |
| 1419 /** |
| 1420 * Function: omxSP_FFTInit_C_FC32 (2.2.4.1.2) |
| 1421 * |
| 1422 * Description: |
| 1423 * These functions initialize the specification structures required for the |
| 1424 * complex FFT and IFFT functions. Desired block length is specified as an |
| 1425 * input. The function <FFTInit_C_FC32> is used to initialize |
| 1426 * the specification structures for the functions <FFTFwd_CToC_FC32_Sfs> and |
| 1427 * <FFTInv_CToC_FC32_Sfs>. |
| 1428 * |
| 1429 * Memory for the specification structure *pFFTSpec must be allocated prior |
| 1430 * to calling these functions and should be 8-byte aligned for |
| 1431 * omxSP_FFTInit_C_FC32. |
| 1432 * |
| 1433 * The space required for *pFFTSpec, in bytes, can be |
| 1434 * determined using <FFTGetBufSize_C_FC32>. |
| 1435 * |
| 1436 * Input Arguments: |
| 1437 * |
| 1438 * order - base-2 logarithm of the desired block length; valid in the range |
| 1439 * [0,12] |
| 1440 * |
| 1441 * Output Arguments: |
| 1442 * |
| 1443 * pFFTSpec - pointer to initialized specification structure |
| 1444 * |
| 1445 * Return Value: |
| 1446 * |
| 1447 * OMX_Sts_NoErr -no error |
| 1448 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1449 * following is true: |
| 1450 * - pFFTSpec is either NULL or violates the 8-byte alignment |
| 1451 * restrictions |
| 1452 * - order < 0 or order > 12 |
| 1453 * |
| 1454 */ |
| 1455 OMXResult omxSP_FFTInit_C_FC32( |
| 1456 OMXFFTSpec_C_FC32* pFFTSpec, |
| 1457 OMX_INT order |
| 1458 ); |
| 1459 |
| 1460 |
| 1461 |
| 1462 /** |
| 1463 * Function: omxSP_FFTInit_R_S16S32 (2.2.4.1.4) |
| 1464 * |
| 1465 * Description: |
| 1466 * These functions initialize specification structures required for the real |
| 1467 * FFT and IFFT functions. The function <FFTInit_R_S16S32> is used to |
| 1468 * initialize the specification structures for functions |
| 1469 * <FFTFwd_RToCCS_S16S32_Sfs> and <FFTInv_CCSToR_S32S16_Sfs>. |
| 1470 * |
| 1471 * Memory for |
| 1472 * *pFFTFwdSpec must be allocated before calling these functions and should be |
| 1473 * 8-byte aligned. The number of bytes required for *pFFTFwdSpec can be |
| 1474 * determined using <FFTGetBufSize_R_S16S32>. |
| 1475 * |
| 1476 * Input Arguments: |
| 1477 * |
| 1478 * order - base-2 logarithm of the desired block length; valid in the range |
| 1479 * [0,12] |
| 1480 * |
| 1481 * Output Arguments: |
| 1482 * |
| 1483 * pFFTFwdSpec - pointer to the initialized specification structure |
| 1484 * |
| 1485 * Return Value: |
| 1486 * |
| 1487 * OMX_Sts_NoErr - no error |
| 1488 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1489 * following is true: |
| 1490 * - pFFTFwdSpec is either NULL or violates the 8-byte alignment |
| 1491 * restrictions |
| 1492 * - order < 0 or order > 12 |
| 1493 * |
| 1494 */ |
| 1495 OMXResult omxSP_FFTInit_R_S16S32( |
| 1496 OMXFFTSpec_R_S16S32* pFFTFwdSpec, |
| 1497 OMX_INT order |
| 1498 ); |
| 1499 |
| 1500 |
| 1501 |
| 1502 /** |
| 1503 * Function: omxSP_FFTInit_R_S32 (2.2.4.1.4) |
| 1504 * |
| 1505 * Description: |
| 1506 * These functions initialize specification structures required for the real |
| 1507 * FFT and IFFT functions. The function <FFTInit_R_S32> is used to initialize |
| 1508 * the specification structures for functions <FFTFwd_RToCCS_S32_Sfs> |
| 1509 * and <FFTInv_CCSToR_S32_Sfs>. |
| 1510 * |
| 1511 * Memory for *pFFTFwdSpec must be allocated before calling these functions |
| 1512 * and should be 8-byte aligned. |
| 1513 * |
| 1514 * The number of bytes required for *pFFTFwdSpec can be |
| 1515 * determined using <FFTGetBufSize_R_S32>. |
| 1516 * |
| 1517 * Input Arguments: |
| 1518 * |
| 1519 * order - base-2 logarithm of the desired block length; valid in the range |
| 1520 * [0,12] |
| 1521 * |
| 1522 * Output Arguments: |
| 1523 * |
| 1524 * pFFTFwdSpec - pointer to the initialized specification structure |
| 1525 * |
| 1526 * Return Value: |
| 1527 * |
| 1528 * OMX_Sts_NoErr - no error |
| 1529 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1530 * following is true: |
| 1531 * - pFFTFwdSpec is either NULL or violates the 8-byte alignment |
| 1532 * restrictions |
| 1533 * - order < 0 or order > 12 |
| 1534 * |
| 1535 */ |
| 1536 OMXResult omxSP_FFTInit_R_S32 ( |
| 1537 OMXFFTSpec_R_S32*pFFTFwdSpec, |
| 1538 OMX_INT order |
| 1539 ); |
| 1540 |
| 1541 /** |
| 1542 * Function: omxSP_FFTInit_R_F32 |
| 1543 * |
| 1544 * Description: |
| 1545 * These functions initialize specification structures required for the real |
| 1546 * FFT and IFFT functions. The function <FFTInit_R_F32> is used to initialize |
| 1547 * the specification structures for functions <FFTFwd_RToCCS_F32_Sfs> |
| 1548 * and <FFTInv_CCSToR_F32_Sfs>. |
| 1549 * |
| 1550 * Memory for *pFFTFwdSpec must be allocated before calling these functions |
| 1551 * and should be 8-byte aligned. |
| 1552 * |
| 1553 * The number of bytes required for *pFFTFwdSpec can be |
| 1554 * determined using <FFTGetBufSize_R_F32>. |
| 1555 * |
| 1556 * Input Arguments: |
| 1557 * |
| 1558 * order - base-2 logarithm of the desired block length; valid in the range |
| 1559 * [0,12] |
| 1560 * |
| 1561 * Output Arguments: |
| 1562 * |
| 1563 * pFFTFwdSpec - pointer to the initialized specification structure |
| 1564 * |
| 1565 * Return Value: |
| 1566 * |
| 1567 * OMX_Sts_NoErr - no error |
| 1568 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1569 * following is true: |
| 1570 * - pFFTFwdSpec is either NULL or violates the 8-byte alignment |
| 1571 * restrictions |
| 1572 * - order < 0 or order > 12 |
| 1573 * |
| 1574 */ |
| 1575 OMXResult omxSP_FFTInit_R_F32( |
| 1576 OMXFFTSpec_R_F32* pFFTFwdSpec, |
| 1577 OMX_INT order |
| 1578 ); |
| 1579 |
| 1580 /** |
| 1581 * Function: omxSP_FFTGetBufSize_C_SC16 (2.2.4.1.6) |
| 1582 * |
| 1583 * Description: |
| 1584 * These functions compute the size of the specification structure |
| 1585 * required for the length 2^order complex FFT and IFFT functions. The function |
| 1586 * <FFTGetBufSize_C_SC16> is used in conjunction with the 16-bit functions |
| 1587 * <FFTFwd_CToC_SC16_Sfs> and <FFTInv_CToC_SC16_Sfs>. |
| 1588 * |
| 1589 * Input Arguments: |
| 1590 * |
| 1591 * order - base-2 logarithm of the desired block length; valid in the range |
| 1592 * [0,12] |
| 1593 * |
| 1594 * Output Arguments: |
| 1595 * |
| 1596 * pSize - pointer to the number of bytes required for the specification |
| 1597 * structure |
| 1598 * |
| 1599 * Return Value: |
| 1600 * |
| 1601 * OMX_Sts_NoErr - no error |
| 1602 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1603 * following is true: |
| 1604 * - pSize is NULL |
| 1605 * - order < 0 or order > 12 |
| 1606 * |
| 1607 */ |
| 1608 OMXResult omxSP_FFTGetBufSize_C_SC16 ( |
| 1609 OMX_INT order, |
| 1610 OMX_INT *pSize |
| 1611 ); |
| 1612 |
| 1613 |
| 1614 |
| 1615 /** |
| 1616 * Function: omxSP_FFTGetBufSize_C_SC32 (2.2.4.1.6) |
| 1617 * |
| 1618 * Description: |
| 1619 * These functions compute the size of the specification structure |
| 1620 * required for the length 2^order complex FFT and IFFT functions. The function |
| 1621 * <FFTGetBufSize_C_SC32> is used in conjunction with the 32-bit functions |
| 1622 * <FFTFwd_CToC_SC32_Sfs> and <FFTInv_CToC_SC32_Sfs>. |
| 1623 * |
| 1624 * Input Arguments: |
| 1625 * |
| 1626 * order - base-2 logarithm of the desired block length; valid in the range |
| 1627 * [0,12] |
| 1628 * |
| 1629 * Output Arguments: |
| 1630 * |
| 1631 * pSize - pointer to the number of bytes required for the specification |
| 1632 * structure |
| 1633 * |
| 1634 * Return Value: |
| 1635 * |
| 1636 * OMX_Sts_NoErr - no error |
| 1637 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1638 * following is true: |
| 1639 * - pSize is NULL |
| 1640 * - order < 0 or order > 12 |
| 1641 * |
| 1642 */ |
| 1643 OMXResult omxSP_FFTGetBufSize_C_SC32 ( |
| 1644 OMX_INT order, |
| 1645 OMX_INT *pSize |
| 1646 ); |
| 1647 |
| 1648 /** |
| 1649 * Function: omxSP_FFTGetBufSize_C_FC32 |
| 1650 * |
| 1651 * Description: |
| 1652 * These functions compute the size of the specification structure |
| 1653 * required for the length 2^order complex FFT and IFFT functions. The function |
| 1654 * <FFTGetBufSize_C_FC32> is used in conjunction with the 32-bit functions |
| 1655 * <FFTFwd_CToC_FC32_Sfs> and <FFTInv_CToC_FC32_Sfs>. |
| 1656 * |
| 1657 * Input Arguments: |
| 1658 * |
| 1659 * order - base-2 logarithm of the desired block length; valid in the range |
| 1660 * [0,12] |
| 1661 * |
| 1662 * Output Arguments: |
| 1663 * |
| 1664 * pSize - pointer to the number of bytes required for the specification |
| 1665 * structure |
| 1666 * |
| 1667 * Return Value: |
| 1668 * |
| 1669 * OMX_Sts_NoErr - no error |
| 1670 * OMX_Sts_BadArgErr - bad arguments; returned if one or more of the |
| 1671 * following is true: |
| 1672 * - pSize is NULL |
| 1673 * - order < 0 or order > 12 |
| 1674 * |
| 1675 */ |
| 1676 OMXResult omxSP_FFTGetBufSize_C_FC32( |
| 1677 OMX_INT order, |
| 1678 OMX_INT* pSize |
| 1679 ); |
| 1680 |
| 1681 |
| 1682 /** |
| 1683 * Function: omxSP_FFTGetBufSize_R_S16S32 (2.2.4.1.8) |
| 1684 * |
| 1685 * Description: |
| 1686 * order These functions compute the size of the specification structure |
| 1687 * required for the length 2^order real FFT and IFFT functions. The function |
| 1688 * <FFTGetBufSize_R_S16S32> is used in conjunction with the 16-bit functions |
| 1689 * <FFTFwd_RToCCS_S16S32_Sfs> and <FFTInv_CCSToR_S32S16_Sfs>. |
| 1690 * |
| 1691 * Input Arguments: |
| 1692 * |
| 1693 * order - base-2 logarithm of the length; valid in the range [0,12] |
| 1694 * |
| 1695 * Output Arguments: |
| 1696 * |
| 1697 * pSize - pointer to the number of bytes required for the specification |
| 1698 * structure |
| 1699 * |
| 1700 * Return Value: |
| 1701 * |
| 1702 * OMX_Sts_NoErr - no error |
| 1703 * OMX_Sts_BadArgErr - bad arguments The function returns |
| 1704 * OMX_Sts_BadArgErr if one or more of the following is true: |
| 1705 * pSize is NULL |
| 1706 * order < 0 or order > 12 |
| 1707 * |
| 1708 */ |
| 1709 OMXResult omxSP_FFTGetBufSize_R_S16S32( |
| 1710 OMX_INT order, |
| 1711 OMX_INT* pSize |
| 1712 ); |
| 1713 |
| 1714 |
| 1715 |
| 1716 /** |
| 1717 * Function: omxSP_FFTGetBufSize_R_S32 (2.2.4.1.8) |
| 1718 * |
| 1719 * Description: |
| 1720 * These functions compute the size of the specification structure |
| 1721 * required for the length 2^order real FFT and IFFT functions. The function |
| 1722 * <FFTGetBufSize_R_S32> is used in conjunction with the 32-bit functions |
| 1723 * <FFTFwd_RToCCS_S32_Sfs> and <FFTInv_CCSToR_S32_Sfs>. |
| 1724 * |
| 1725 * Input Arguments: |
| 1726 * |
| 1727 * order - base-2 logarithm of the length; valid in the range [0,12] |
| 1728 * |
| 1729 * Output Arguments: |
| 1730 * |
| 1731 * pSize - pointer to the number of bytes required for the specification |
| 1732 * structure |
| 1733 * |
| 1734 * Return Value: |
| 1735 * |
| 1736 * OMX_Sts_NoErr - no error |
| 1737 * OMX_Sts_BadArgErr - bad arguments The function returns |
| 1738 * OMX_Sts_BadArgErr if one or more of the following is true: |
| 1739 * pSize is NULL |
| 1740 * order < 0 or order > 12 |
| 1741 * |
| 1742 */ |
| 1743 OMXResult omxSP_FFTGetBufSize_R_S32 ( |
| 1744 OMX_INT order, |
| 1745 OMX_INT *pSize |
| 1746 ); |
| 1747 |
| 1748 /** |
| 1749 * Function: omxSP_FFTGetBufSize_R_F32 |
| 1750 * |
| 1751 * Description: |
| 1752 * These functions compute the size of the specification structure |
| 1753 * required for the length 2^order real FFT and IFFT functions. The function |
| 1754 * <FFTGetBufSize_R_F32> is used in conjunction with the 32-bit functions |
| 1755 * <FFTFwd_RToCCS_F32_Sfs> and <FFTInv_CCSToR_F32_Sfs>. |
| 1756 * |
| 1757 * Input Arguments: |
| 1758 * |
| 1759 * order - base-2 logarithm of the length; valid in the range [0,12] |
| 1760 * |
| 1761 * Output Arguments: |
| 1762 * |
| 1763 * pSize - pointer to the number of bytes required for the specification |
| 1764 * structure |
| 1765 * |
| 1766 * Return Value: |
| 1767 * |
| 1768 * OMX_Sts_NoErr - no error |
| 1769 * OMX_Sts_BadArgErr - bad arguments The function returns |
| 1770 * OMX_Sts_BadArgErr if one or more of the following is true: |
| 1771 * pSize is NULL |
| 1772 * order < 0 or order > 12 |
| 1773 * |
| 1774 */ |
| 1775 OMXResult omxSP_FFTGetBufSize_R_F32( |
| 1776 OMX_INT order, |
| 1777 OMX_INT* pSize |
| 1778 ); |
| 1779 |
| 1780 |
| 1781 |
| 1782 /** |
| 1783 * Function: omxSP_FFTFwd_CToC_SC16_Sfs (2.2.4.2.2) |
| 1784 * |
| 1785 * Description: |
| 1786 * Compute an FFT for a complex signal of length of 2^order, |
| 1787 * where 0 <= order <= 12. |
| 1788 * Transform length is determined by the specification structure, which |
| 1789 * must be initialized prior to calling the FFT function using the appropriate |
| 1790 * helper, i.e., <FFTInit_C_sc32> or <FFTInit_C_SC16>. The relationship |
| 1791 * between the input and output sequences can be expressed in terms of the |
| 1792 * DFT, i.e., |
| 1793 * |
| 1794 * X[k] = 2^(-scaleFactor) . SUM[n=0...N-1]x[n].e^(-jnk.2.pi/N) |
| 1795 * k = 0,1,2,..., N-1 |
| 1796 * N = 2^order |
| 1797 * |
| 1798 * Input Arguments: |
| 1799 * pSrc - pointer to the input signal, a complex-valued vector of length 2^ord
er; |
| 1800 * must be aligned on a 32 byte boundary. |
| 1801 * pFFTSpec - pointer to the preallocated and initialized specification |
| 1802 * structure |
| 1803 * scaleFactor - output scale factor; the range for is [0,16] |
| 1804 * |
| 1805 * Output Arguments: |
| 1806 * pDst - pointer to the complex-valued output vector, of length 2^order; |
| 1807 * must be aligned on an 32-byte boundary. |
| 1808 * |
| 1809 * Return Value: |
| 1810 * |
| 1811 * OMX_Sts_NoErr - no error |
| 1812 * OMX_Sts_BadArgErr - returned if one or more of the following conditions |
| 1813 * is true: |
| 1814 * - one or more of the following pointers is NULL: pSrc, pDst, or |
| 1815 * pFFTSpec. |
| 1816 * - pSrc or pDst is not 32-byte aligned |
| 1817 * - scaleFactor<0 or scaleFactor>16 |
| 1818 * |
| 1819 */ |
| 1820 |
| 1821 OMXResult omxSP_FFTFwd_CToC_SC16_Sfs ( |
| 1822 const OMX_SC16 *pSrc, |
| 1823 OMX_SC16 *pDst, |
| 1824 const OMXFFTSpec_C_SC16 *pFFTSpec, |
| 1825 OMX_INT scaleFactor |
| 1826 ); |
| 1827 |
| 1828 OMXResult omxSP_FFTFwd_CToC_SC16_Sfs_neon ( |
| 1829 const OMX_SC16 *pSrc, |
| 1830 OMX_SC16 *pDst, |
| 1831 const OMXFFTSpec_C_SC16 *pFFTSpec, |
| 1832 OMX_INT scaleFactor |
| 1833 ); |
| 1834 |
| 1835 /** |
| 1836 * Function: omxSP_FFTFwd_CToC_SC32_Sfs (2.2.4.2.2) |
| 1837 * |
| 1838 * Description: |
| 1839 * Compute an FFT for a complex signal of length of 2^order, |
| 1840 * where 0 <= order <= 12. |
| 1841 * Transform length is determined by the specification structure, which |
| 1842 * must be initialized prior to calling the FFT function using the appropriate |
| 1843 * helper, i.e., <FFTInit_C_sc32> or <FFTInit_C_SC16>. The relationship |
| 1844 * between the input and output sequences can be expressed in terms of the |
| 1845 * DFT, i.e., |
| 1846 * |
| 1847 * X[k] = 2^(-scaleFactor) . SUM[n=0...N-1]x[n].e^(-jnk.2.pi/N) |
| 1848 * k = 0,1,2,..., N-1 |
| 1849 * N = 2^order |
| 1850 * |
| 1851 * Input Arguments: |
| 1852 * pSrc - pointer to the input signal, a complex-valued vector of length 2^ord
er; |
| 1853 * must be aligned on a 32 byte boundary. |
| 1854 * pFFTSpec - pointer to the preallocated and initialized specification |
| 1855 * structure |
| 1856 * scaleFactor - output scale factor; the range is [0,32] |
| 1857 * |
| 1858 * Output Arguments: |
| 1859 * pDst - pointer to the complex-valued output vector, of length 2^order; must
be |
| 1860 * aligned on an 32-byte boundary. |
| 1861 * |
| 1862 * Return Value: |
| 1863 * |
| 1864 * OMX_Sts_NoErr - no error |
| 1865 * OMX_Sts_BadArgErr - returned if one or more of the following conditions |
| 1866 * is true: |
| 1867 * - one or more of the following pointers is NULL: pSrc, pDst, or |
| 1868 * pFFTSpec. |
| 1869 * - pSrc or pDst is not 32-byte aligned |
| 1870 * - scaleFactor<0 or scaleFactor >32 |
| 1871 * |
| 1872 */ |
| 1873 OMXResult omxSP_FFTFwd_CToC_SC32_Sfs ( |
| 1874 const OMX_SC32 *pSrc, |
| 1875 OMX_SC32 *pDst, |
| 1876 const OMXFFTSpec_C_SC32 *pFFTSpec, |
| 1877 OMX_INT scaleFactor |
| 1878 ); |
| 1879 |
| 1880 |
| 1881 |
| 1882 /** |
| 1883 * Function: omxSP_FFTInv_CToC_SC16_Sfs (2.2.4.2.4) |
| 1884 * |
| 1885 * Description: |
| 1886 * These functions compute an inverse FFT for a complex signal of length |
| 1887 * of 2^order, where 0 <= order <= 12. Transform length is determined by the |
| 1888 * specification structure, which must be initialized prior to calling the FFT |
| 1889 * function using the appropriate helper, i.e., <FFTInit_C_sc32> or |
| 1890 * <FFTInit_C_SC16>. The relationship between the input and output sequences |
| 1891 * can be expressed in terms of the IDFT, i.e.: |
| 1892 * |
| 1893 * x[n] = (2^(-scalefactor)/N) . SUM[k=0,...,N-1] X[k].e^(jnk.2.pi/N) |
| 1894 * n=0,1,2,...N-1 |
| 1895 * N=2^order. |
| 1896 * |
| 1897 * Input Arguments: |
| 1898 * pSrc - pointer to the complex-valued input signal, of length 2^order ; |
| 1899 * must be aligned on a 32-byte boundary. |
| 1900 * pFFTSpec - pointer to the preallocated and initialized specification |
| 1901 * structure |
| 1902 * scaleFactor - scale factor of the output. Valid value is 0 |
| 1903 * only. |
| 1904 * |
| 1905 * Output Arguments: |
| 1906 * order |
| 1907 * pDst - pointer to the complex-valued output signal, of length 2^order; |
| 1908 * must be aligned on a 32-byte boundary. |
| 1909 * |
| 1910 * Return Value: |
| 1911 * |
| 1912 * Positive value - the shift scale that was performed inside |
| 1913 * OMX_Sts_NoErr - no error |
| 1914 * OMX_Sts_BadArgErr - returned if one or more of the following conditions |
| 1915 * is true: |
| 1916 * - one or more of the following pointers is NULL: pSrc, pDst, or |
| 1917 * pFFTSpec. |
| 1918 * - pSrc or pDst is not 32-byte aligned |
| 1919 * - scaleFactor<0 or scaleFactor>16 |
| 1920 * |
| 1921 */ |
| 1922 OMXResult omxSP_FFTInv_CToC_SC16_Sfs ( |
| 1923 const OMX_SC16 *pSrc, |
| 1924 OMX_SC16 *pDst, |
| 1925 const OMXFFTSpec_C_SC16 *pFFTSpec, |
| 1926 OMX_INT scaleFactor |
| 1927 ); |
| 1928 |
| 1929 OMXResult omxSP_FFTInv_CToC_SC16_Sfs_neon ( |
| 1930 const OMX_SC16 *pSrc, |
| 1931 OMX_SC16 *pDst, |
| 1932 const OMXFFTSpec_C_SC16 *pFFTSpec, |
| 1933 OMX_INT scaleFactor |
| 1934 ); |
| 1935 |
| 1936 |
| 1937 |
| 1938 |
| 1939 /** |
| 1940 * Function: omxSP_FFTInv_CToC_SC32_Sfs (2.2.4.2.4) |
| 1941 * |
| 1942 * Description: |
| 1943 * These functions compute an inverse FFT for a complex signal of length |
| 1944 * of 2^order, where 0 <= order <= 12. Transform length is determined by the |
| 1945 * specification structure, which must be initialized prior to calling the FFT |
| 1946 * function using the appropriate helper, i.e., <FFTInit_C_sc32> or |
| 1947 * <FFTInit_C_SC16>. The relationship between the input and output sequences |
| 1948 * can be expressed in terms of the IDFT, i.e.: |
| 1949 * |
| 1950 * x[n] = (2^(-scalefactor)/N) . SUM[k=0,...,N-1] X[k].e^(jnk.2.pi/N) |
| 1951 * n=0,1,2,...N-1 |
| 1952 * N=2^order. |
| 1953 * |
| 1954 * Input Arguments: |
| 1955 * pSrc - pointer to the complex-valued input signal, of length 2^order ; |
| 1956 * must be aligned on a 32-byte boundary. |
| 1957 * pFFTSpec - pointer to the preallocated and initialized specification |
| 1958 * structure |
| 1959 * scaleFactor - scale factor of the output. Valid range is [0,32]. |
| 1960 * |
| 1961 * Output Arguments: |
| 1962 * order |
| 1963 * pDst - pointer to the complex-valued output signal, of length 2^order; |
| 1964 * must be aligned on a 32-byte boundary. |
| 1965 * |
| 1966 * Return Value: |
| 1967 * |
| 1968 * OMX_Sts_NoErr - no error |
| 1969 * OMX_Sts_BadArgErr - returned if one or more of the following conditions |
| 1970 * is true: |
| 1971 * - one or more of the following pointers is NULL: pSrc, pDst, or |
| 1972 * pFFTSpec. |
| 1973 * - pSrc or pDst is not 32-byte aligned |
| 1974 * - scaleFactor<0 or scaleFactor>32 |
| 1975 * |
| 1976 */ |
| 1977 OMXResult omxSP_FFTInv_CToC_SC32_Sfs ( |
| 1978 const OMX_SC32 *pSrc, |
| 1979 OMX_SC32 *pDst, |
| 1980 const OMXFFTSpec_C_SC32 *pFFTSpec, |
| 1981 OMX_INT scaleFactor |
| 1982 ); |
| 1983 |
| 1984 |
| 1985 |
| 1986 /** |
| 1987 * Function: omxSP_FFTFwd_RToCCS_S16S32_Sfs (2.2.4.4.2) |
| 1988 * |
| 1989 * Description: |
| 1990 * These functions compute an FFT for a real-valued signal of length of 2^order, |
| 1991 * where 0 <= order <= 12. Transform length is determined by the |
| 1992 * specification structure, which must be initialized prior to calling the FFT |
| 1993 * function using the appropriate helper, i.e., <FFTInit_R_S16S32>. |
| 1994 * The relationship between the input and output sequences |
| 1995 * can be expressed in terms of the DFT, i.e.: |
| 1996 * |
| 1997 * x[n] = (2^(-scalefactor)/N) . SUM[k=0,...,N-1] X[k].e^(jnk.2.pi/N) |
| 1998 * n=0,1,2,...N-1 |
| 1999 * N=2^order. |
| 2000 * |
| 2001 * The conjugate-symmetric output sequence is represented using a CCS vector, |
| 2002 * which is of length N+2, and is organized as follows: |
| 2003 * |
| 2004 * Index: 0 1 2 3 4 5 . . . N-2 N-1 N N+1 |
| 2005 * Component: R0 0 R1 I1 R2 I2 . . . R[N/2-1] I[N/2-1] R[N/2] 0 |
| 2006 * |
| 2007 * where R[n] and I[n], respectively, denote the real and imaginary components |
| 2008 * for FFT bin 'n'. Bins are numbered from 0 to N/2, where N is the FFT length.
|
| 2009 * Bin index 0 corresponds to the DC component, and bin index N/2 corresponds to
the |
| 2010 * foldover frequency. |
| 2011 * |
| 2012 * Input Arguments: |
| 2013 * pSrc - pointer to the real-valued input sequence, of length 2^order; |
| 2014 * must be aligned on a 32-byte boundary. |
| 2015 * pFFTSpec - pointer to the preallocated and initialized specification |
| 2016 * structure |
| 2017 * scaleFactor - output scale factor; valid range is [0, 32] |
| 2018 * |
| 2019 * Output Arguments: |
| 2020 * pDst - pointer to output sequence, represented using CCS format, of |
| 2021 * length (2^order)+2; must be aligned on a 32-byte boundary. |
| 2022 * |
| 2023 * Return Value: |
| 2024 * |
| 2025 * OMX_Sts_NoErr - no error |
| 2026 * OMX_Sts_BadArgErr - bad arguments, if one or more of the following is true
: |
| 2027 * - one of the pointers pSrc, pDst, or pFFTSpec is NULL |
| 2028 * - pSrc or pDst is not aligned on a 32-byte boundary |
| 2029 * - scaleFactor<0 or scaleFactor >32 |
| 2030 * |
| 2031 */ |
| 2032 OMXResult omxSP_FFTFwd_RToCCS_S16S32_Sfs ( |
| 2033 const OMX_S16 *pSrc, |
| 2034 OMX_S32 *pDst, |
| 2035 const OMXFFTSpec_R_S16S32 *pFFTSpec, |
| 2036 OMX_INT scaleFactor |
| 2037 ); |
| 2038 |
| 2039 |
| 2040 |
| 2041 /** |
| 2042 * Function: omxSP_FFTFwd_RToCCS_S32_Sfs (2.2.4.4.2) |
| 2043 * |
| 2044 * Description: |
| 2045 * These functions compute an FFT for a real-valued signal of length of 2^order, |
| 2046 * where 0 <= order <= 12. Transform length is determined by the |
| 2047 * specification structure, which must be initialized prior to calling the FFT |
| 2048 * function using the appropriate helper, i.e., <FFTInit_R_S32>. |
| 2049 * The relationship between the input and output sequences |
| 2050 * can be expressed in terms of the DFT, i.e.: |
| 2051 * |
| 2052 * x[n] = (2^(-scalefactor)/N) . SUM[k=0,...,N-1] X[k].e^(jnk.2.pi/N) |
| 2053 * n=0,1,2,...N-1 |
| 2054 * N=2^order. |
| 2055 * |
| 2056 * The conjugate-symmetric output sequence is represented using a CCS vector, |
| 2057 * which is of length N+2, and is organized as follows: |
| 2058 * |
| 2059 * Index: 0 1 2 3 4 5 . . . N-2 N-1 N N+1 |
| 2060 * Component: R0 0 R1 I1 R2 I2 . . . R[N/2-1] I[N/2-1] R[N/2] 0 |
| 2061 * |
| 2062 * where R[n] and I[n], respectively, denote the real and imaginary components |
| 2063 * for FFT bin 'n'. Bins are numbered from 0 to N/2, where N is the FFT length.
|
| 2064 * Bin index 0 corresponds to the DC component, and bin index N/2 corresponds to
the |
| 2065 * foldover frequency. |
| 2066 * |
| 2067 * Input Arguments: |
| 2068 * pSrc - pointer to the real-valued input sequence, of length 2^order; |
| 2069 * must be aligned on a 32-byte boundary. |
| 2070 * pFFTSpec - pointer to the preallocated and initialized specification |
| 2071 * structure |
| 2072 * scaleFactor - output scale factor; valid range is [0, 32] |
| 2073 * |
| 2074 * Output Arguments: |
| 2075 * pDst - pointer to output sequence, represented using CCS format, of |
| 2076 * length (2^order)+2; must be aligned on a 32-byte boundary. |
| 2077 * |
| 2078 * Return Value: |
| 2079 * |
| 2080 * OMX_Sts_NoErr - no error |
| 2081 * OMX_Sts_BadArgErr - bad arguments, if one or more of the following is true
: |
| 2082 * - one of the pointers pSrc, pDst, or pFFTSpec is NULL |
| 2083 * - pSrc or pDst is not aligned on a 32-byte boundary |
| 2084 * - scaleFactor<0 or scaleFactor >32 |
| 2085 * |
| 2086 */ |
| 2087 OMXResult omxSP_FFTFwd_RToCCS_S32_Sfs ( |
| 2088 const OMX_S32 *pSrc, |
| 2089 OMX_S32 *pDst, |
| 2090 const OMXFFTSpec_R_S32 *pFFTSpec, |
| 2091 OMX_INT scaleFactor |
| 2092 ); |
| 2093 |
| 2094 /** |
| 2095 * Function: omxSP_FFTFwd_RToCCS_F32_Sfs |
| 2096 * |
| 2097 * Description: |
| 2098 * These functions compute an FFT for a real-valued signal of length |
| 2099 * of 2^order, where 0 <= order <= 12. Transform length is determined |
| 2100 * by the specification structure, which must be initialized prior to |
| 2101 * calling the FFT function using the appropriate helper, i.e., |
| 2102 * <FFTInit_R_F32>. The relationship between the input and output |
| 2103 * sequences can be expressed in terms of the DFT, i.e.: |
| 2104 * |
| 2105 * x[n] = (2^(-scalefactor)/N) . SUM[k=0,...,N-1] X[k].e^(jnk.2.pi/N) |
| 2106 * n=0,1,2,...N-1 |
| 2107 * N=2^order. |
| 2108 * |
| 2109 * The conjugate-symmetric output sequence is represented using a CCS vector, |
| 2110 * which is of length N+2, and is organized as follows: |
| 2111 * |
| 2112 * Index: 0 1 2 3 4 5 . . . N-2 N-1 N N+1 |
| 2113 * Component: R0 0 R1 I1 R2 I2 . . . R[N/2-1] I[N/2-1] R[N/2] 0 |
| 2114 * |
| 2115 * where R[n] and I[n], respectively, denote the real and imaginary |
| 2116 * components for FFT bin 'n'. Bins are numbered from 0 to N/2, where |
| 2117 * N is the FFT length. Bin index 0 corresponds to the DC component, |
| 2118 * and bin index N/2 corresponds to the foldover frequency. |
| 2119 * |
| 2120 * Input Arguments: |
| 2121 * pSrc - pointer to the real-valued input sequence, of length 2^order; |
| 2122 * must be aligned on a 32-byte boundary. |
| 2123 * pFFTSpec - pointer to the preallocated and initialized specification |
| 2124 * structure |
| 2125 * |
| 2126 * Output Arguments: |
| 2127 * pDst - pointer to output sequence, represented using CCS format, of |
| 2128 * length (2^order)+2; must be aligned on a 32-byte boundary. |
| 2129 * |
| 2130 * Return Value: |
| 2131 * |
| 2132 * OMX_Sts_NoErr - no error |
| 2133 |
| 2134 * OMX_Sts_BadArgErr - bad arguments, if one or more of the |
| 2135 * following is true: - one of the pointers pSrc, pDst, or pFFTSpec |
| 2136 * is NULL - pSrc or pDst is not aligned on a 32-byte boundary |
| 2137 * |
| 2138 */ |
| 2139 OMXResult omxSP_FFTFwd_RToCCS_F32_Sfs( |
| 2140 const OMX_F32* pSrc, |
| 2141 OMX_F32* pDst, |
| 2142 const OMXFFTSpec_R_F32* pFFTSpec |
| 2143 ); |
| 2144 |
| 2145 |
| 2146 |
| 2147 /** |
| 2148 * Function: omxSP_FFTInv_CCSToR_S32S16_Sfs (2.2.4.4.4) |
| 2149 * |
| 2150 * Description: |
| 2151 * These functions compute the inverse FFT for a conjugate-symmetric input |
| 2152 * sequence. Transform length is determined by the specification structure, |
| 2153 * which must be initialized prior to calling the FFT function using |
| 2154 * <FFTInit_R_S16S32>. For a transform of length M, the input sequence is |
| 2155 * represented using a packed CCS vector of length M+2, and is organized |
| 2156 * as follows: |
| 2157 * |
| 2158 * Index: 0 1 2 3 4 5 . . . M-2 M-1 M M+1
|
| 2159 * Component R[0] 0 R[1] I[1] R[2] I[2] . . . R[M/2-1] I[M/2-1] R[M/2] 0 |
| 2160 * |
| 2161 * where R[n] and I[n], respectively, denote the real and imaginary components f
or FFT bin n. |
| 2162 * Bins are numbered from 0 to M/2, where M is the FFT length. Bin index 0 |
| 2163 * corresponds to the DC component, and bin index M/2 corresponds to the |
| 2164 * foldover frequency. |
| 2165 * |
| 2166 * Input Arguments: |
| 2167 * pSrc - pointer to the complex-valued input sequence represented using |
| 2168 * CCS format, of length (2^order) + 2; must be aligned on a 32-byte |
| 2169 * boundary. |
| 2170 * pFFTSpec - pointer to the preallocated and initialized specification |
| 2171 * structure |
| 2172 * scaleFactor - output scalefactor; range is [0,16] |
| 2173 * |
| 2174 * Output Arguments: |
| 2175 * pDst - pointer to the real-valued output sequence, of length 2^order ; must
be |
| 2176 * aligned on a 32-byte boundary. |
| 2177 * |
| 2178 * Return Value: |
| 2179 * |
| 2180 * OMX_Sts_NoErr - no error |
| 2181 * OMX_Sts_BadArgErr - bad arguments if one or more of the following is true:
|
| 2182 * - pSrc, pDst, or pFFTSpec is NULL |
| 2183 * - pSrc or pDst is not aligned on a 32-byte boundary |
| 2184 * - scaleFactor<0 or scaleFactor >16 |
| 2185 * |
| 2186 */ |
| 2187 OMXResult omxSP_FFTInv_CCSToR_S32S16_Sfs ( |
| 2188 const OMX_S32 *pSrc, |
| 2189 OMX_S16 *pDst, |
| 2190 const OMXFFTSpec_R_S16S32 *pFFTSpec, |
| 2191 OMX_INT scaleFactor |
| 2192 ); |
| 2193 |
| 2194 |
| 2195 |
| 2196 /** |
| 2197 * Function: omxSP_FFTInv_CCSToR_S32_Sfs (2.2.4.4.4) |
| 2198 * |
| 2199 * Description: |
| 2200 * These functions compute the inverse FFT for a conjugate-symmetric input |
| 2201 * sequence. Transform length is determined by the specification structure, |
| 2202 * which must be initialized prior to calling the FFT function using |
| 2203 * <FFTInit_R_S32>. For a transform of length M, the input sequence is |
| 2204 * represented using a packed CCS vector of length M+2, and is organized |
| 2205 * as follows: |
| 2206 * |
| 2207 * Index: 0 1 2 3 4 5 . . . M-2 M-1 M M+1
|
| 2208 * Component R[0] 0 R[1] I[1] R[2] I[2] . . . R[M/2-1] I[M/2-1] R[M/2] 0 |
| 2209 * |
| 2210 * where R[n] and I[n], respectively, denote the real and imaginary components f
or FFT bin n. |
| 2211 * Bins are numbered from 0 to M/2, where M is the FFT length. Bin index 0 |
| 2212 * corresponds to the DC component, and bin index M/2 corresponds to the |
| 2213 * foldover frequency. |
| 2214 * |
| 2215 * Input Arguments: |
| 2216 * pSrc - pointer to the complex-valued input sequence represented using |
| 2217 * CCS format, of length (2^order) + 2; must be aligned on a 32-byte |
| 2218 * boundary. |
| 2219 * pFFTSpec - pointer to the preallocated and initialized specification |
| 2220 * structure |
| 2221 * scaleFactor - output scalefactor; range is [0,32] |
| 2222 * |
| 2223 * Output Arguments: |
| 2224 * pDst - pointer to the real-valued output sequence, of length 2^order ; must
be |
| 2225 * aligned on a 32-byte boundary. |
| 2226 * |
| 2227 * Return Value: |
| 2228 * |
| 2229 * OMX_Sts_NoErr - no error |
| 2230 * OMX_Sts_BadArgErr - bad arguments if one or more of the following is true:
|
| 2231 * - pSrc, pDst, or pFFTSpec is NULL |
| 2232 * - pSrc or pDst is not aligned on a 32-byte boundary |
| 2233 * - scaleFactor<0 or scaleFactor >32 |
| 2234 * |
| 2235 */ |
| 2236 OMXResult omxSP_FFTInv_CCSToR_S32_Sfs ( |
| 2237 const OMX_S32 *pSrc, |
| 2238 OMX_S32 *pDst, |
| 2239 const OMXFFTSpec_R_S32 *pFFTSpec, |
| 2240 OMX_INT scaleFactor |
| 2241 ); |
| 2242 |
| 2243 /** |
| 2244 * Function: omxSP_FFTInv_CCSToR_F32_Sfs |
| 2245 * |
| 2246 * Description: |
| 2247 * These functions compute the inverse FFT for a conjugate-symmetric input |
| 2248 * sequence. Transform length is determined by the specification structure, |
| 2249 * which must be initialized prior to calling the FFT function using |
| 2250 * <FFTInit_R_F32>. For a transform of length M, the input sequence is |
| 2251 * represented using a packed CCS vector of length M+2, and is organized |
| 2252 * as follows: |
| 2253 * |
| 2254 * Index: 0 1 2 3 4 5 . . . M-2 M-1 M M+1 |
| 2255 * Comp: R[0] 0 R[1] I[1] R[2] I[2] . . . R[M/2-1] I[M/2-1] R[M/2] 0 |
| 2256 * |
| 2257 * where R[n] and I[n], respectively, denote the real and imaginary |
| 2258 * components for FFT bin n. Bins are numbered from 0 to M/2, where M |
| 2259 * is the FFT length. Bin index 0 corresponds to the DC component, |
| 2260 * and bin index M/2 corresponds to the foldover frequency. |
| 2261 * |
| 2262 * Input Arguments: |
| 2263 * pSrc - pointer to the complex-valued input sequence represented |
| 2264 * using CCS format, of length (2^order) + 2; must be aligned on a |
| 2265 * 32-byte boundary. |
| 2266 * pFFTSpec - pointer to the preallocated and initialized |
| 2267 * specification structure |
| 2268 * |
| 2269 * Output Arguments: |
| 2270 * pDst - pointer to the real-valued output sequence, of length |
| 2271 * 2^order ; must be aligned on a 32-byte boundary. |
| 2272 * |
| 2273 * Return Value: |
| 2274 * |
| 2275 * OMX_Sts_NoErr - no error |
| 2276 |
| 2277 * OMX_Sts_BadArgErr - bad arguments if one or more of the |
| 2278 * following is true: |
| 2279 * - pSrc, pDst, or pFFTSpec is NULL |
| 2280 * - pSrc or pDst is not aligned on a 32-byte boundary |
| 2281 * - scaleFactor<0 or scaleFactor >32 |
| 2282 * |
| 2283 */ |
| 2284 OMXResult omxSP_FFTInv_CCSToR_F32_Sfs( |
| 2285 const OMX_F32* pSrc, |
| 2286 OMX_F32* pDst, |
| 2287 const OMXFFTSpec_R_F32* pFFTSpec |
| 2288 ); |
| 2289 |
| 2290 |
| 2291 |
| 2292 #ifdef __cplusplus |
| 2293 } |
| 2294 #endif |
| 2295 |
| 2296 #endif /** end of #define _OMXSP_H_ */ |
| 2297 |
| 2298 /** EOF */ |
| 2299 |
OLD | NEW |