Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
74e2a078
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,发现更多精彩内容 >>
提交
74e2a078
编写于
3月 08, 2009
作者:
K
Kostya Shishkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make Musepack decoders use LFG pseudorandom generator
Originally committed as revision 17880 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
d2f532c8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
9 deletion
+8
-9
libavcodec/mpc.c
libavcodec/mpc.c
+0
-1
libavcodec/mpc.h
libavcodec/mpc.h
+2
-2
libavcodec/mpc7.c
libavcodec/mpc7.c
+3
-3
libavcodec/mpc8.c
libavcodec/mpc8.c
+3
-3
未找到文件。
libavcodec/mpc.c
浏览文件 @
74e2a078
...
...
@@ -25,7 +25,6 @@
* divided into 32 subbands.
*/
#include "libavutil/random.h"
#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"
...
...
libavcodec/mpc.h
浏览文件 @
74e2a078
...
...
@@ -28,7 +28,7 @@
#ifndef AVCODEC_MPC_H
#define AVCODEC_MPC_H
#include "libavutil/
random
.h"
#include "libavutil/
lfg
.h"
#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"
...
...
@@ -62,7 +62,7 @@ typedef struct {
int
cur_frame
,
frames
;
uint8_t
*
bits
;
int
buf_size
;
AV
RandomState
rnd
;
AV
LFG
rnd
;
int
frames_to_skip
;
/* for synthesis */
DECLARE_ALIGNED_16
(
MPA_INT
,
synth_buf
[
MPA_MAX_CHANNELS
][
512
*
2
]);
...
...
libavcodec/mpc7.c
浏览文件 @
74e2a078
...
...
@@ -25,7 +25,7 @@
* divided into 32 subbands.
*/
#include "libavutil/
random
.h"
#include "libavutil/
lfg
.h"
#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"
...
...
@@ -53,7 +53,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
return
-
1
;
}
memset
(
c
->
oldDSCF
,
0
,
sizeof
(
c
->
oldDSCF
));
av_
random
_init
(
&
c
->
rnd
,
0xDEADBEEF
);
av_
lfg
_init
(
&
c
->
rnd
,
0xDEADBEEF
);
dsputil_init
(
&
c
->
dsp
,
avctx
);
c
->
dsp
.
bswap_buf
((
uint32_t
*
)
buf
,
(
const
uint32_t
*
)
avctx
->
extradata
,
4
);
ff_mpc_init
();
...
...
@@ -118,7 +118,7 @@ static inline void idx_to_quant(MPCContext *c, GetBitContext *gb, int idx, int *
switch
(
idx
){
case
-
1
:
for
(
i
=
0
;
i
<
SAMPLES_PER_BAND
;
i
++
){
*
dst
++
=
(
av_
random
(
&
c
->
rnd
)
&
0x3FC
)
-
510
;
*
dst
++
=
(
av_
lfg_get
(
&
c
->
rnd
)
&
0x3FC
)
-
510
;
}
break
;
case
1
:
...
...
libavcodec/mpc8.c
浏览文件 @
74e2a078
...
...
@@ -25,7 +25,7 @@
* divided into 32 subbands.
*/
#include "libavutil/
random
.h"
#include "libavutil/
lfg
.h"
#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"
...
...
@@ -100,7 +100,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
return
-
1
;
}
memset
(
c
->
oldDSCF
,
0
,
sizeof
(
c
->
oldDSCF
));
av_
random
_init
(
&
c
->
rnd
,
0xDEADBEEF
);
av_
lfg
_init
(
&
c
->
rnd
,
0xDEADBEEF
);
dsputil_init
(
&
c
->
dsp
,
avctx
);
ff_mpc_init
();
...
...
@@ -284,7 +284,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx,
switch
(
res
){
case
-
1
:
for
(
j
=
0
;
j
<
SAMPLES_PER_BAND
;
j
++
)
c
->
Q
[
ch
][
off
+
j
]
=
(
av_
random
(
&
c
->
rnd
)
&
0x3FC
)
-
510
;
c
->
Q
[
ch
][
off
+
j
]
=
(
av_
lfg_get
(
&
c
->
rnd
)
&
0x3FC
)
-
510
;
break
;
case
0
:
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录