1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
/****************************************************************************
(C) Copyright Fraunhofer IIS (2005)
All Rights Reserved
Please be advised that this software and/or program delivery is
Confidential Information of Fraunhofer and subject to and covered by the
Fraunhofer IIS Software Evaluation Agreement
between Google Inc. and Fraunhofer
effective and in full force since March 1, 2012.
You may use this software and/or program only under the terms and
conditions described in the above mentioned Fraunhofer IIS Software
Evaluation Agreement. Any other and/or further use requires a separate agreement.
This software and/or program is protected by copyright law and international
treaties. Any reproduction or distribution of this software and/or program,
or any portion of it, may result in severe civil and criminal penalties, and
will be prosecuted to the maximum extent possible under law.
$Id$
*******************************************************************************/
/*!
\file
\brief Memory layout
$Revision: 38012 $
This module declares all static and dynamic memory spaces
*/
#include "sbr_ram.h"
#define WORKBUFFER1_TAG 0
#define WORKBUFFER2_TAG 1
/*!
\name StaticSbrData
Static memory areas, must not be overwritten in other sections of the decoder
*/
/* @{ */
/*! SBR Decoder main structure */
C_ALLOC_MEM(Ram_SbrDecoder, struct SBR_DECODER_INSTANCE, 1)
/*! SBR Decoder element data <br>
Dimension: (4) */
C_ALLOC_MEM2(Ram_SbrDecElement, SBR_DECODER_ELEMENT, 1, (4))
/*! SBR Decoder individual channel data <br>
Dimension: (6) */
C_ALLOC_MEM2(Ram_SbrDecChannel, SBR_CHANNEL, 1, (6)+1)
/*! Filter states for QMF-synthesis. <br>
Dimension: #(6) * (#QMF_FILTER_STATE_SYN_SIZE-#(64)) */
C_AALLOC_MEM2_L(Ram_sbr_QmfStatesSynthesis, FIXP_QSS, (640)-(64), (6)+1, SECT_DATA_L1)
/*! Delayed spectral data needed for the dynamic framing of SBR.
For mp3PRO, 1/3 of a frame is buffered (#(6) 6) */
C_AALLOC_MEM2(Ram_sbr_OverlapBuffer, FIXP_DBL, 2 * (6) * (64), (6)+1)
/*! Static Data of PS */
C_ALLOC_MEM(Ram_ps_dec, PS_DEC, 1)
/* @} */
/*!
\name DynamicSbrData
Dynamic memory areas, might be reused in other algorithm sections,
e.g. the core decoder
<br>
Depending on the mode set by DONT_USE_CORE_WORKBUFFER, workbuffers are
defined additionally to the CoreWorkbuffer.
<br>
The size of WorkBuffers is ((1024)/(32))*(64) = 2048.
<br>
WorkBuffer2 is a pointer to the CoreWorkBuffer wich is reused here in the SBR part. In case of
DONT_USE_CORE_WORKBUFFER, the CoreWorkbuffer is not used and the according
Workbuffer2 is defined locally in this file.
<br>
WorkBuffer1 is reused in the AAC core (-> aacdecoder.cpp, aac_ram.cpp)
<br>
Use of WorkBuffers:
<pre>
-------------------------------------------------------------
AAC core:
CoreWorkbuffer: spectral coefficients
WorkBuffer1: CAacDecoderChannelInfo, CAacDecoderDynamicData
-------------------------------------------------------------
SBR part:
----------------------------------------------
Low Power Mode (useLP=1 or LOW_POWER_SBR_ONLY), see assignLcTimeSlots()
SLOT_BASED_PROTOTYPE_SYN_FILTER
WorkBuffer1 WorkBuffer2(=CoreWorkbuffer)
________________ ________________
| RealLeft | | RealRight |
|________________| |________________|
----------------------------------------------
High Quality Mode (!LOW_POWER_SBR_ONLY and useLP=0), see assignHqTimeSlots()
SLOTBASED_PS
WorkBuffer1 WorkBuffer2(=CoreWorkbuffer)
________________ ________________
| Real/Imag | interleaved | Real/Imag | interleaved
|________________| first half actual ch |________________| second half actual ch
-------------------------------------------------------------
</pre>
*/
/* @{ */
C_ALLOC_MEM_OVERLAY(Ram_SbrDecWorkBuffer1, FIXP_DBL, ((1024)/(32))*(64), SECT_DATA_L1, WORKBUFFER1_TAG)
C_ALLOC_MEM_OVERLAY(Ram_SbrDecWorkBuffer2, FIXP_DBL, ((1024)/(32))*(64), SECT_DATA_L2, WORKBUFFER2_TAG)
/* @} */
|