Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
0a570e82
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0a570e82
编写于
8月 12, 2008
作者:
L
Loren Merritt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove mdct tmp buffer
Originally committed as revision 14702 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
e8dd7b0c
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
27 addition
and
48 deletion
+27
-48
libavcodec/ac3dec.c
libavcodec/ac3dec.c
+2
-2
libavcodec/ac3dec.h
libavcodec/ac3dec.h
+0
-1
libavcodec/atrac3.c
libavcodec/atrac3.c
+3
-5
libavcodec/cook.c
libavcodec/cook.c
+1
-3
libavcodec/dsputil.h
libavcodec/dsputil.h
+7
-14
libavcodec/fft-test.c
libavcodec/fft-test.c
+5
-6
libavcodec/i386/fft_3dn2.c
libavcodec/i386/fft_3dn2.c
+1
-2
libavcodec/i386/fft_sse.c
libavcodec/i386/fft_sse.c
+1
-2
libavcodec/mdct.c
libavcodec/mdct.c
+3
-5
libavcodec/nellymoserdec.c
libavcodec/nellymoserdec.c
+1
-3
libavcodec/vorbis_enc.c
libavcodec/vorbis_enc.c
+1
-1
libavcodec/wma.h
libavcodec/wma.h
+0
-1
libavcodec/wmadec.c
libavcodec/wmadec.c
+1
-2
libavcodec/wmaenc.c
libavcodec/wmaenc.c
+1
-1
未找到文件。
libavcodec/ac3dec.c
浏览文件 @
0a570e82
...
...
@@ -605,7 +605,7 @@ static void do_imdct_256(AC3DecodeContext *s, int chindex)
}
/* run standard IMDCT */
s
->
imdct_256
.
fft
.
imdct_calc
(
&
s
->
imdct_256
,
o_ptr
,
x
,
s
->
tmp_imdct
);
s
->
imdct_256
.
fft
.
imdct_calc
(
&
s
->
imdct_256
,
o_ptr
,
x
);
/* reverse the post-rotation & reordering from standard IMDCT */
for
(
k
=
0
;
k
<
32
;
k
++
)
{
...
...
@@ -643,7 +643,7 @@ static inline void do_imdct(AC3DecodeContext *s, int channels)
do_imdct_256
(
s
,
ch
);
}
else
{
s
->
imdct_512
.
fft
.
imdct_calc
(
&
s
->
imdct_512
,
s
->
tmp_output
,
s
->
transform_coeffs
[
ch
]
,
s
->
tmp_imdct
);
s
->
transform_coeffs
[
ch
]);
}
/* For the first half of the block, apply the window, add the delay
from the previous block, and send to output */
...
...
libavcodec/ac3dec.h
浏览文件 @
0a570e82
...
...
@@ -166,7 +166,6 @@ typedef struct {
DECLARE_ALIGNED_16
(
float
,
delay
[
AC3_MAX_CHANNELS
][
AC3_BLOCK_SIZE
]);
///< delay - added to the next block
DECLARE_ALIGNED_16
(
float
,
window
[
AC3_BLOCK_SIZE
]);
///< window coefficients
DECLARE_ALIGNED_16
(
float
,
tmp_output
[
AC3_BLOCK_SIZE
*
2
]);
///< temporary storage for output before windowing
DECLARE_ALIGNED_16
(
float
,
tmp_imdct
[
AC3_BLOCK_SIZE
]);
///< temporary storage for imdct transform
DECLARE_ALIGNED_16
(
float
,
output
[
AC3_MAX_CHANNELS
][
AC3_BLOCK_SIZE
]);
///< output after imdct transform and windowing
DECLARE_ALIGNED_16
(
short
,
int_output
[
AC3_MAX_CHANNELS
-
1
][
AC3_BLOCK_SIZE
]);
///< final 16-bit integer output
///@}
...
...
libavcodec/atrac3.c
浏览文件 @
0a570e82
...
...
@@ -108,7 +108,6 @@ typedef struct {
float
outSamples
[
2048
];
uint8_t
*
decoded_bytes_buffer
;
float
tempBuf
[
1070
];
DECLARE_ALIGNED_16
(
float
,
mdct_tmp
[
512
]);
//@}
//@{
/** extradata */
...
...
@@ -189,10 +188,9 @@ static void iqmf (float *inlo, float *inhi, unsigned int nIn, float *pOut, float
* @param pInput float input
* @param pOutput float output
* @param odd_band 1 if the band is an odd band
* @param mdct_tmp aligned temporary buffer for the mdct
*/
static
void
IMLT
(
float
*
pInput
,
float
*
pOutput
,
int
odd_band
,
float
*
mdct_tmp
)
static
void
IMLT
(
float
*
pInput
,
float
*
pOutput
,
int
odd_band
)
{
int
i
;
...
...
@@ -210,7 +208,7 @@ static void IMLT(float *pInput, float *pOutput, int odd_band, float* mdct_tmp)
FFSWAP
(
float
,
pInput
[
i
],
pInput
[
255
-
i
]);
}
mdct_ctx
.
fft
.
imdct_calc
(
&
mdct_ctx
,
pOutput
,
pInput
,
mdct_tmp
);
mdct_ctx
.
fft
.
imdct_calc
(
&
mdct_ctx
,
pOutput
,
pInput
);
/* Perform windowing on the output. */
dsp
.
vector_fmul
(
pOutput
,
mdct_window
,
512
);
...
...
@@ -757,7 +755,7 @@ static int decodeChannelSoundUnit (ATRAC3Context *q, GetBitContext *gb, channel_
for
(
band
=
0
;
band
<
4
;
band
++
)
{
/* Perform the IMDCT step without overlapping. */
if
(
band
<=
numBands
)
{
IMLT
(
&
(
pSnd
->
spectrum
[
band
*
256
]),
pSnd
->
IMDCT_buf
,
band
&
1
,
q
->
mdct_tmp
);
IMLT
(
&
(
pSnd
->
spectrum
[
band
*
256
]),
pSnd
->
IMDCT_buf
,
band
&
1
);
}
else
memset
(
pSnd
->
IMDCT_buf
,
0
,
512
*
sizeof
(
float
));
...
...
libavcodec/cook.c
浏览文件 @
0a570e82
...
...
@@ -112,7 +112,6 @@ typedef struct cook {
/* transform data */
MDCTContext
mdct_ctx
;
DECLARE_ALIGNED_16
(
FFTSample
,
mdct_tmp
[
1024
]);
/* temporary storage for imlt */
float
*
mlt_window
;
/* gain buffers */
...
...
@@ -734,8 +733,7 @@ static void imlt_gain(COOKContext *q, float *inbuffer,
int
i
;
/* Inverse modified discrete cosine transform */
q
->
mdct_ctx
.
fft
.
imdct_calc
(
&
q
->
mdct_ctx
,
q
->
mono_mdct_output
,
inbuffer
,
q
->
mdct_tmp
);
q
->
mdct_ctx
.
fft
.
imdct_calc
(
&
q
->
mdct_ctx
,
q
->
mono_mdct_output
,
inbuffer
);
q
->
imlt_window
(
q
,
buffer1
,
gains_ptr
,
previous_buffer
);
...
...
libavcodec/dsputil.h
浏览文件 @
0a570e82
...
...
@@ -642,10 +642,8 @@ typedef struct FFTContext {
FFTComplex
*
tmp_buf
;
void
(
*
fft_permute
)(
struct
FFTContext
*
s
,
FFTComplex
*
z
);
void
(
*
fft_calc
)(
struct
FFTContext
*
s
,
FFTComplex
*
z
);
void
(
*
imdct_calc
)(
struct
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
);
void
(
*
imdct_half
)(
struct
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
(
*
imdct_calc
)(
struct
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
(
*
imdct_half
)(
struct
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
}
FFTContext
;
int
ff_fft_init
(
FFTContext
*
s
,
int
nbits
,
int
inverse
);
...
...
@@ -694,20 +692,15 @@ void ff_kbd_window_init(float *window, float alpha, int n);
void
ff_sine_window_init
(
float
*
window
,
int
n
);
int
ff_mdct_init
(
MDCTContext
*
s
,
int
nbits
,
int
inverse
);
void
ff_imdct_calc
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
);
void
ff_imdct_calc
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_imdct_half
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_imdct_calc_3dn
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
);
void
ff_imdct_calc_3dn
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_imdct_half_3dn
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_imdct_calc_3dn2
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
);
void
ff_imdct_calc_3dn2
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_imdct_half_3dn2
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_imdct_calc_sse
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
);
void
ff_imdct_calc_sse
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_imdct_half_sse
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
);
void
ff_mdct_calc
(
MDCTContext
*
s
,
FFTSample
*
out
,
const
FFTSample
*
input
,
FFTSample
*
tmp
);
void
ff_mdct_calc
(
MDCTContext
*
s
,
FFTSample
*
out
,
const
FFTSample
*
input
);
void
ff_mdct_end
(
MDCTContext
*
s
);
#define WRAPPER8_16(name8, name16)\
...
...
libavcodec/fft-test.c
浏览文件 @
0a570e82
...
...
@@ -177,7 +177,7 @@ void help(void)
int
main
(
int
argc
,
char
**
argv
)
{
FFTComplex
*
tab
,
*
tab1
,
*
tab_ref
;
FFTSample
*
tab
tmp
,
*
tab
2
;
FFTSample
*
tab2
;
int
it
,
i
,
c
;
int
do_speed
=
0
;
int
do_mdct
=
0
;
...
...
@@ -214,7 +214,6 @@ int main(int argc, char **argv)
tab
=
av_malloc
(
fft_size
*
sizeof
(
FFTComplex
));
tab1
=
av_malloc
(
fft_size
*
sizeof
(
FFTComplex
));
tab_ref
=
av_malloc
(
fft_size
*
sizeof
(
FFTComplex
));
tabtmp
=
av_malloc
(
fft_size
/
2
*
sizeof
(
FFTSample
));
tab2
=
av_malloc
(
fft_size
*
sizeof
(
FFTSample
));
if
(
do_mdct
)
{
...
...
@@ -246,12 +245,12 @@ int main(int argc, char **argv)
if
(
do_mdct
)
{
if
(
do_inverse
)
{
imdct_ref
((
float
*
)
tab_ref
,
(
float
*
)
tab1
,
fft_nbits
);
ff_imdct_calc
(
m
,
tab2
,
(
float
*
)
tab1
,
tabtmp
);
ff_imdct_calc
(
m
,
tab2
,
(
float
*
)
tab1
);
check_diff
((
float
*
)
tab_ref
,
tab2
,
fft_size
);
}
else
{
mdct_ref
((
float
*
)
tab_ref
,
(
float
*
)
tab1
,
fft_nbits
);
ff_mdct_calc
(
m
,
tab2
,
(
float
*
)
tab1
,
tabtmp
);
ff_mdct_calc
(
m
,
tab2
,
(
float
*
)
tab1
);
check_diff
((
float
*
)
tab_ref
,
tab2
,
fft_size
/
2
);
}
...
...
@@ -278,9 +277,9 @@ int main(int argc, char **argv)
for
(
it
=
0
;
it
<
nb_its
;
it
++
)
{
if
(
do_mdct
)
{
if
(
do_inverse
)
{
ff_imdct_calc
(
m
,
(
float
*
)
tab
,
(
float
*
)
tab1
,
tabtmp
);
ff_imdct_calc
(
m
,
(
float
*
)
tab
,
(
float
*
)
tab1
);
}
else
{
ff_mdct_calc
(
m
,
(
float
*
)
tab
,
(
float
*
)
tab1
,
tabtmp
);
ff_mdct_calc
(
m
,
(
float
*
)
tab
,
(
float
*
)
tab1
);
}
}
else
{
memcpy
(
tab
,
tab1
,
fft_size
*
sizeof
(
FFTComplex
));
...
...
libavcodec/i386/fft_3dn2.c
浏览文件 @
0a570e82
...
...
@@ -142,8 +142,7 @@ void ff_imdct_half_3dn2(MDCTContext *s, FFTSample *output, const FFTSample *inpu
asm
volatile
(
"femms"
);
}
void
ff_imdct_calc_3dn2
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
)
void
ff_imdct_calc_3dn2
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
)
{
x86_reg
j
,
k
;
long
n
=
1
<<
s
->
nbits
;
...
...
libavcodec/i386/fft_sse.c
浏览文件 @
0a570e82
...
...
@@ -171,8 +171,7 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input
);
}
void
ff_imdct_calc_sse
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
)
void
ff_imdct_calc_sse
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
)
{
x86_reg
j
,
k
;
long
n
=
1
<<
s
->
nbits
;
...
...
libavcodec/mdct.c
浏览文件 @
0a570e82
...
...
@@ -150,8 +150,7 @@ void ff_imdct_half(MDCTContext *s, FFTSample *output, const FFTSample *input)
* @param input N/2 samples
* @param tmp N/2 samples
*/
void
ff_imdct_calc
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
,
FFTSample
*
tmp
)
void
ff_imdct_calc
(
MDCTContext
*
s
,
FFTSample
*
output
,
const
FFTSample
*
input
)
{
int
k
;
int
n
=
1
<<
s
->
nbits
;
...
...
@@ -172,11 +171,10 @@ void ff_imdct_calc(MDCTContext *s, FFTSample *output,
* @param out N/2 samples
* @param tmp temporary storage of N/2 samples
*/
void
ff_mdct_calc
(
MDCTContext
*
s
,
FFTSample
*
out
,
const
FFTSample
*
input
,
FFTSample
*
tmp
)
void
ff_mdct_calc
(
MDCTContext
*
s
,
FFTSample
*
out
,
const
FFTSample
*
input
)
{
int
i
,
j
,
n
,
n8
,
n4
,
n2
,
n3
;
FFTSample
re
,
im
,
re1
,
im1
;
FFTSample
re
,
im
;
const
uint16_t
*
revtab
=
s
->
fft
.
revtab
;
const
FFTSample
*
tcos
=
s
->
tcos
;
const
FFTSample
*
tsin
=
s
->
tsin
;
...
...
libavcodec/nellymoserdec.c
浏览文件 @
0a570e82
...
...
@@ -50,7 +50,6 @@ typedef struct NellyMoserDecodeContext {
float
scale_bias
;
DSPContext
dsp
;
MDCTContext
imdct_ctx
;
DECLARE_ALIGNED_16
(
float
,
imdct_tmp
[
NELLY_BUF_LEN
]);
DECLARE_ALIGNED_16
(
float
,
imdct_out
[
NELLY_BUF_LEN
*
2
]);
}
NellyMoserDecodeContext
;
...
...
@@ -120,8 +119,7 @@ static void nelly_decode_block(NellyMoserDecodeContext *s,
memset
(
&
aptr
[
NELLY_FILL_LEN
],
0
,
(
NELLY_BUF_LEN
-
NELLY_FILL_LEN
)
*
sizeof
(
float
));
s
->
imdct_ctx
.
fft
.
imdct_calc
(
&
s
->
imdct_ctx
,
s
->
imdct_out
,
aptr
,
s
->
imdct_tmp
);
s
->
imdct_ctx
.
fft
.
imdct_calc
(
&
s
->
imdct_ctx
,
s
->
imdct_out
,
aptr
);
/* XXX: overlapping and windowing should be part of a more
generic imdct function */
overlap_and_window
(
s
,
s
->
state
,
aptr
,
s
->
imdct_out
);
...
...
libavcodec/vorbis_enc.c
浏览文件 @
0a570e82
...
...
@@ -915,7 +915,7 @@ static int apply_window_and_mdct(venc_context_t * venc, signed short * audio, in
}
for
(
channel
=
0
;
channel
<
venc
->
channels
;
channel
++
)
{
ff_mdct_calc
(
&
venc
->
mdct
[
0
],
venc
->
coeffs
+
channel
*
window_len
,
venc
->
samples
+
channel
*
window_len
*
2
,
venc
->
floor
/*tmp*/
);
ff_mdct_calc
(
&
venc
->
mdct
[
0
],
venc
->
coeffs
+
channel
*
window_len
,
venc
->
samples
+
channel
*
window_len
*
2
);
}
if
(
samples
)
{
...
...
libavcodec/wma.h
浏览文件 @
0a570e82
...
...
@@ -115,7 +115,6 @@ typedef struct WMACodecContext {
DECLARE_ALIGNED_16
(
FFTSample
,
output
[
BLOCK_MAX_SIZE
*
2
]);
MDCTContext
mdct_ctx
[
BLOCK_NB_SIZES
];
float
*
windows
[
BLOCK_NB_SIZES
];
DECLARE_ALIGNED_16
(
FFTSample
,
mdct_tmp
[
BLOCK_MAX_SIZE
]);
///< temporary storage for imdct
/* output buffer for one frame and the last for IMDCT windowing */
DECLARE_ALIGNED_16
(
float
,
frame_out
[
MAX_CHANNELS
][
BLOCK_MAX_SIZE
*
2
]);
/* last frame info */
...
...
libavcodec/wmadec.c
浏览文件 @
0a570e82
...
...
@@ -688,8 +688,7 @@ next:
n
=
s
->
block_len
;
n4
=
s
->
block_len
/
2
;
if
(
s
->
channel_coded
[
ch
]){
s
->
mdct_ctx
[
bsize
].
fft
.
imdct_calc
(
&
s
->
mdct_ctx
[
bsize
],
s
->
output
,
s
->
coefs
[
ch
],
s
->
mdct_tmp
);
s
->
mdct_ctx
[
bsize
].
fft
.
imdct_calc
(
&
s
->
mdct_ctx
[
bsize
],
s
->
output
,
s
->
coefs
[
ch
]);
}
else
memset
(
s
->
output
,
0
,
sizeof
(
s
->
output
));
...
...
libavcodec/wmaenc.c
浏览文件 @
0a570e82
...
...
@@ -89,7 +89,7 @@ static void apply_window_and_mdct(AVCodecContext * avctx, signed short * audio,
s
->
output
[
i
+
window_len
]
=
audio
[
j
]
/
n
*
win
[
window_len
-
i
-
1
];
s
->
frame_out
[
channel
][
i
]
=
audio
[
j
]
/
n
*
win
[
i
];
}
ff_mdct_calc
(
&
s
->
mdct_ctx
[
window_index
],
s
->
coefs
[
channel
],
s
->
output
,
s
->
mdct_tmp
);
ff_mdct_calc
(
&
s
->
mdct_ctx
[
window_index
],
s
->
coefs
[
channel
],
s
->
output
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录