Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Side by Side Diff: third_party/openmax_dl/dl/sp/src/omxSP_FFTGetBufSize_C_SC32.c

Issue 12317152: Add openmax dl routines for review. MUST NOT BE LANDED (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 *
16 * File Name: omxSP_FFTGetBufSize_C_SC32.c
17 * OpenMAX DL: v1.0.2
18 * Last Modified Revision: 9468
19 * Last Modified Date: Thu, 03 Jan 2008
20 *
21 * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
22 *
23 *
24 * Description:
25 * Compute the size of the specification structure required
26 */
27
28 #include "dl/api/armOMX.h"
29 #include "dl/api/omxtypes.h"
30 #include "dl/sp/api/armSP.h"
31 #include "dl/sp/api/omxSP.h"
32
33
34 /**
35 * Function: omxSP_FFTGetBufSize_C_SC32 (2.2.4.1.6)
36 *
37 * Description:
38 * These functions compute the size of the specification structure
39 * required for the length 2^order complex FFT and IFFT functions. The function
40 * <FFTGetBufSize_C_SC32> is used in conjunction with the 32-bit functions
41 * <FFTFwd_CToC_SC32_Sfs> and <FFTInv_CToC_SC32_Sfs>.
42 *
43 * Input Arguments:
44 *
45 * order - base-2 logarithm of the desired block length; valid in the range
46 * [0,12]
47 *
48 * Output Arguments:
49 *
50 * pSize - pointer to the number of bytes required for the specification
51 * structure
52 *
53 * Return Value:
54 *
55 * OMX_Sts_NoErr - no error
56 *
57 *
58 */
59
60
61 OMXResult omxSP_FFTGetBufSize_C_SC32(
62 OMX_INT order,
63 OMX_INT *pSize)
64 {
65
66 OMX_INT N,twiddleSize;
67
68 /* Check for order zero */
69 if (order == 0)
70 {
71 *pSize = sizeof(ARMsFFTSpec_SC32);
72 return OMX_Sts_NoErr;
73 }
74
75
76 N = 1 << order;
77
78 /*The max size of the twiddle table needed is 3N/4 for a radix-4 stage*/
79 twiddleSize = 3*N/4;
80
81 *pSize = sizeof(ARMsFFTSpec_SC32)
82 /* N Twiddle factors */
83 + sizeof(OMX_SC32) * twiddleSize
84 /* Ping Pong buffer */
85 + sizeof(OMX_SC32) * N
86 + 62 ; /* Extra bytes to get 32 byte alignment of ptwiddle and pBuf */
87
88 return OMX_Sts_NoErr;
89 }
90
91 /*****************************************************************************
92 * END OF FILE
93 *****************************************************************************/
94
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698