Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Strogin
flac
Commits
b6a32196
Commit
b6a32196
authored
Oct 04, 2002
by
Josh Coalson
Browse files
add support for 64bit datapath through inverse filter
parent
eac1024a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libFLAC/stream_decoder.c
View file @
b6a32196
...
...
@@ -78,6 +78,7 @@ typedef struct FLAC__StreamDecoderPrivate {
FLAC__StreamDecoderMetadataCallback
metadata_callback
;
FLAC__StreamDecoderErrorCallback
error_callback
;
void
(
*
local_lpc_restore_signal
)(
const
FLAC__int32
residual
[],
unsigned
data_len
,
const
FLAC__int32
qlp_coeff
[],
unsigned
order
,
int
lp_quantization
,
FLAC__int32
data
[]);
void
(
*
local_lpc_restore_signal_64bit
)(
const
FLAC__int32
residual
[],
unsigned
data_len
,
const
FLAC__int32
qlp_coeff
[],
unsigned
order
,
int
lp_quantization
,
FLAC__int32
data
[]);
void
(
*
local_lpc_restore_signal_16bit
)(
const
FLAC__int32
residual
[],
unsigned
data_len
,
const
FLAC__int32
qlp_coeff
[],
unsigned
order
,
int
lp_quantization
,
FLAC__int32
data
[]);
void
*
client_data
;
FLAC__BitBuffer
*
input
;
...
...
@@ -260,6 +261,7 @@ FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder *decoder)
FLAC__cpu_info
(
&
decoder
->
private_
->
cpuinfo
);
/* first default to the non-asm routines */
decoder
->
private_
->
local_lpc_restore_signal
=
FLAC__lpc_restore_signal
;
decoder
->
private_
->
local_lpc_restore_signal_64bit
=
FLAC__lpc_restore_signal_wide
;
decoder
->
private_
->
local_lpc_restore_signal_16bit
=
FLAC__lpc_restore_signal
;
/* now override with asm where appropriate */
#ifndef FLAC__NO_ASM
...
...
@@ -1741,8 +1743,10 @@ FLAC__bool read_subframe_lpc_(FLAC__StreamDecoder *decoder, unsigned channel, un
memcpy
(
decoder
->
private_
->
output
[
channel
],
subframe
->
warmup
,
sizeof
(
FLAC__int32
)
*
order
);
if
(
bps
<=
16
&&
subframe
->
qlp_coeff_precision
<=
16
)
decoder
->
private_
->
local_lpc_restore_signal_16bit
(
decoder
->
private_
->
residual
[
channel
],
decoder
->
private_
->
frame
.
header
.
blocksize
-
order
,
subframe
->
qlp_coeff
,
order
,
subframe
->
quantization_level
,
decoder
->
private_
->
output
[
channel
]
+
order
);
else
else
if
(
bps
+
subframe
->
qlp_coeff_precision
+
order
<=
32
)
decoder
->
private_
->
local_lpc_restore_signal
(
decoder
->
private_
->
residual
[
channel
],
decoder
->
private_
->
frame
.
header
.
blocksize
-
order
,
subframe
->
qlp_coeff
,
order
,
subframe
->
quantization_level
,
decoder
->
private_
->
output
[
channel
]
+
order
);
else
decoder
->
private_
->
local_lpc_restore_signal_64bit
(
decoder
->
private_
->
residual
[
channel
],
decoder
->
private_
->
frame
.
header
.
blocksize
-
order
,
subframe
->
qlp_coeff
,
order
,
subframe
->
quantization_level
,
decoder
->
private_
->
output
[
channel
]
+
order
);
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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