Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
ec0350c9
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,发现更多精彩内容 >>
提交
ec0350c9
编写于
8月 17, 2008
作者:
J
Justin Ruggles
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use LFG instead of Mersenne Twister for AC-3 PRNG
Originally committed as revision 14815 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
defa0cd6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
5 deletion
+5
-5
libavcodec/ac3dec.c
libavcodec/ac3dec.c
+2
-3
libavcodec/ac3dec.h
libavcodec/ac3dec.h
+2
-2
libavutil/Makefile
libavutil/Makefile
+1
-0
未找到文件。
libavcodec/ac3dec.c
浏览文件 @
ec0350c9
...
...
@@ -33,7 +33,6 @@
#include <string.h>
#include "libavutil/crc.h"
#include "libavutil/random.h"
#include "avcodec.h"
#include "ac3_parser.h"
#include "bitstream.h"
...
...
@@ -198,7 +197,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
ff_mdct_init
(
&
s
->
imdct_512
,
9
,
1
);
ff_kbd_window_init
(
s
->
window
,
5
.
0
,
256
);
dsputil_init
(
&
s
->
dsp
,
avctx
);
av_
init_random
(
0
,
&
s
->
dith_state
);
av_
lfg_init
(
&
s
->
dith_state
,
0
);
/* set bias values for float to int16 conversion */
if
(
s
->
dsp
.
float_to_int16_interleave
==
ff_float_to_int16_interleave_c
)
{
...
...
@@ -450,7 +449,7 @@ static void get_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, mant_grou
tbap
=
bap
[
i
];
switch
(
tbap
)
{
case
0
:
coeffs
[
i
]
=
(
av_
random
(
&
s
->
dith_state
)
&
0x7FFFFF
)
-
0x400000
;
coeffs
[
i
]
=
(
av_
lfg_get
(
&
s
->
dith_state
)
&
0x7FFFFF
)
-
0x400000
;
break
;
case
1
:
...
...
libavcodec/ac3dec.h
浏览文件 @
ec0350c9
...
...
@@ -27,7 +27,7 @@
#ifndef FFMPEG_AC3DEC_H
#define FFMPEG_AC3DEC_H
#include "libavutil/
random
.h"
#include "libavutil/
lfg
.h"
#include "ac3tab.h"
#include "ac3.h"
#include "bitstream.h"
...
...
@@ -143,7 +143,7 @@ typedef struct {
///@defgroup dithering zero-mantissa dithering
int
dither_all
;
///< true if all channels are dithered
int
dither_flag
[
AC3_MAX_CHANNELS
];
///< dither flags (dithflg)
AV
RandomState
dith_state
;
///< for dither generation
AV
LFG
dith_state
;
///< for dither generation
///@}
///@defgroup imdct IMDCT
...
...
libavutil/Makefile
浏览文件 @
ec0350c9
...
...
@@ -9,6 +9,7 @@ OBJS = adler32.o \
des.o
\
fifo.o
\
intfloat_readwrite.o
\
lfg.o
\
lls.o
\
log.o
\
lzo.o
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录