Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d3a6c2ab
Commit
d3a6c2ab
authored
May 19, 2011
by
Nathan Caldwell
Committed by
Alex Converse
Jun 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psymodel: Remove the single channel analysis function
parent
01344fe4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
17 deletions
+6
-17
aacenc.c
libavcodec/aacenc.c
+1
-1
aacpsy.c
libavcodec/aacpsy.c
+4
-5
psymodel.h
libavcodec/psymodel.h
+1
-11
No files found.
libavcodec/aacenc.c
View file @
d3a6c2ab
...
...
@@ -572,7 +572,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
put_bits
(
&
s
->
pb
,
4
,
chan_el_counter
[
tag
]
++
);
for
(
ch
=
0
;
ch
<
chans
;
ch
++
)
coeffs
[
ch
]
=
cpe
->
ch
[
ch
].
coeffs
;
s
->
psy
.
model
->
analyze
_group
(
&
s
->
psy
,
start_ch
,
coeffs
,
wi
);
s
->
psy
.
model
->
analyze
(
&
s
->
psy
,
start_ch
,
coeffs
,
wi
);
for
(
ch
=
0
;
ch
<
chans
;
ch
++
)
{
s
->
cur_channel
=
start_ch
*
2
+
ch
;
s
->
coder
->
search_for_quantizers
(
avctx
,
s
,
&
cpe
->
ch
[
ch
],
s
->
lambda
);
...
...
libavcodec/aacpsy.c
View file @
d3a6c2ab
...
...
@@ -557,8 +557,8 @@ static float calc_reduced_thr_3gpp(AacPsyBand *band, float min_snr,
/**
* Calculate band thresholds as suggested in 3GPP TS26.403
*/
static
void
psy_3gpp_analyze
(
FFPsyContext
*
ctx
,
int
channel
,
const
float
*
coefs
,
const
FFPsyWindowInfo
*
wi
)
static
void
psy_3gpp_analyze
_channel
(
FFPsyContext
*
ctx
,
int
channel
,
const
float
*
coefs
,
const
FFPsyWindowInfo
*
wi
)
{
AacPsyContext
*
pctx
=
(
AacPsyContext
*
)
ctx
->
model_priv_data
;
AacPsyChannel
*
pch
=
&
pctx
->
ch
[
channel
];
...
...
@@ -741,14 +741,14 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
memcpy
(
pch
->
prev_band
,
pch
->
band
,
sizeof
(
pch
->
band
));
}
static
void
psy_3gpp_analyze
_group
(
FFPsyContext
*
ctx
,
int
channel
,
static
void
psy_3gpp_analyze
(
FFPsyContext
*
ctx
,
int
channel
,
const
float
**
coeffs
,
const
FFPsyWindowInfo
*
wi
)
{
int
ch
;
FFPsyChannelGroup
*
group
=
ff_psy_find_group
(
ctx
,
channel
);
for
(
ch
=
0
;
ch
<
group
->
num_ch
;
ch
++
)
psy_3gpp_analyze
(
ctx
,
channel
+
ch
,
coeffs
[
ch
],
&
wi
[
ch
]);
psy_3gpp_analyze
_channel
(
ctx
,
channel
+
ch
,
coeffs
[
ch
],
&
wi
[
ch
]);
}
static
av_cold
void
psy_3gpp_end
(
FFPsyContext
*
apc
)
...
...
@@ -931,6 +931,5 @@ const FFPsyModel ff_aac_psy_model =
.
init
=
psy_3gpp_init
,
.
window
=
psy_lame_window
,
.
analyze
=
psy_3gpp_analyze
,
.
analyze_group
=
psy_3gpp_analyze_group
,
.
end
=
psy_3gpp_end
,
};
libavcodec/psymodel.h
View file @
d3a6c2ab
...
...
@@ -111,16 +111,6 @@ typedef struct FFPsyModel {
*/
FFPsyWindowInfo
(
*
window
)(
FFPsyContext
*
ctx
,
const
int16_t
*
audio
,
const
int16_t
*
la
,
int
channel
,
int
prev_type
);
/**
* Perform psychoacoustic analysis and set band info (threshold, energy) for a single channel.
*
* @param ctx model context
* @param channel audio channel number
* @param coeffs pointer to the transformed coefficients
* @param wi window information
*/
void
(
*
analyze
)(
FFPsyContext
*
ctx
,
int
channel
,
const
float
*
coeffs
,
const
FFPsyWindowInfo
*
wi
);
/**
* Perform psychoacoustic analysis and set band info (threshold, energy) for a group of channels.
*
...
...
@@ -129,7 +119,7 @@ typedef struct FFPsyModel {
* @param coeffs array of pointers to the transformed coefficients
* @param wi window information for the channels in the group
*/
void
(
*
analyze
_group
)(
FFPsyContext
*
ctx
,
int
channel
,
const
float
**
coeffs
,
const
FFPsyWindowInfo
*
wi
);
void
(
*
analyze
)(
FFPsyContext
*
ctx
,
int
channel
,
const
float
**
coeffs
,
const
FFPsyWindowInfo
*
wi
);
void
(
*
end
)
(
FFPsyContext
*
apc
);
}
FFPsyModel
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment