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