Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
9cd4bc41
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,发现更多精彩内容 >>
提交
9cd4bc41
编写于
2月 15, 2014
作者:
T
Tim Walker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ac3dec: set AV_FRAME_DATA_DOWNMIX_INFO side data.
上级
c98f3169
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
2 deletion
+39
-2
libavcodec/ac3dec.c
libavcodec/ac3dec.c
+38
-0
libavcodec/eac3dec.c
libavcodec/eac3dec.c
+0
-1
libavcodec/version.h
libavcodec/version.h
+1
-1
未找到文件。
libavcodec/ac3dec.c
浏览文件 @
9cd4bc41
...
...
@@ -31,6 +31,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/downmix_info.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "aac_ac3_parser.h"
...
...
@@ -77,6 +78,15 @@ static const float gain_levels[9] = {
LEVEL_MINUS_9DB
};
/** Adjustments in dB gain (LFE, +10 to -21 dB) */
static
const
float
gain_levels_lfe
[
32
]
=
{
3
.
162275
,
2
.
818382
,
2
.
511886
,
2
.
238719
,
1
.
995261
,
1
.
778278
,
1
.
584893
,
1
.
412536
,
1
.
258924
,
1
.
122018
,
1
.
000000
,
0
.
891251
,
0
.
794328
,
0
.
707946
,
0
.
630957
,
0
.
562341
,
0
.
501187
,
0
.
446683
,
0
.
398107
,
0
.
354813
,
0
.
316227
,
0
.
281838
,
0
.
251188
,
0
.
223872
,
0
.
199526
,
0
.
177828
,
0
.
158489
,
0
.
141253
,
0
.
125892
,
0
.
112201
,
0
.
100000
,
0
.
089125
};
/**
* Table for default stereo downmixing coefficients
* reference: Section 7.8.2 Downmixing Into Two Channels
...
...
@@ -1308,6 +1318,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
const
uint8_t
*
channel_map
;
const
float
*
output
[
AC3_MAX_CHANNELS
];
enum
AVMatrixEncoding
matrix_encoding
;
AVDownmixInfo
*
downmix_info
;
/* copy input buffer to decoder context to avoid reading past the end
of the buffer, which can be caused by a damaged input stream. */
...
...
@@ -1478,6 +1489,33 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
if
((
ret
=
ff_side_data_update_matrix_encoding
(
frame
,
matrix_encoding
))
<
0
)
return
ret
;
/* AVDownmixInfo */
if
((
downmix_info
=
av_downmix_info_update_side_data
(
frame
)))
{
switch
(
s
->
preferred_downmix
)
{
case
AC3_DMIXMOD_LTRT
:
downmix_info
->
preferred_downmix_type
=
AV_DOWNMIX_TYPE_LTRT
;
break
;
case
AC3_DMIXMOD_LORO
:
downmix_info
->
preferred_downmix_type
=
AV_DOWNMIX_TYPE_LORO
;
break
;
case
AC3_DMIXMOD_DPLII
:
downmix_info
->
preferred_downmix_type
=
AV_DOWNMIX_TYPE_DPLII
;
break
;
default:
downmix_info
->
preferred_downmix_type
=
AV_DOWNMIX_TYPE_UNKNOWN
;
break
;
}
downmix_info
->
center_mix_level
=
gain_levels
[
s
->
center_mix_level
];
downmix_info
->
center_mix_level_ltrt
=
gain_levels
[
s
->
center_mix_level_ltrt
];
downmix_info
->
surround_mix_level
=
gain_levels
[
s
->
surround_mix_level
];
downmix_info
->
surround_mix_level_ltrt
=
gain_levels
[
s
->
surround_mix_level_ltrt
];
if
(
s
->
lfe_mix_level_exists
)
downmix_info
->
lfe_mix_level
=
gain_levels_lfe
[
s
->
lfe_mix_level
];
else
downmix_info
->
lfe_mix_level
=
0
.
0
;
// -inf dB
}
else
return
AVERROR
(
ENOMEM
);
*
got_frame_ptr
=
1
;
return
FFMIN
(
buf_size
,
s
->
frame_size
);
...
...
libavcodec/eac3dec.c
浏览文件 @
9cd4bc41
...
...
@@ -360,7 +360,6 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
/* lfe mix level */
if
(
s
->
lfe_on
&&
(
s
->
lfe_mix_level_exists
=
get_bits1
(
gbc
)))
{
// TODO: use LFE mix level
s
->
lfe_mix_level
=
get_bits
(
gbc
,
5
);
}
...
...
libavcodec/version.h
浏览文件 @
9cd4bc41
...
...
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 34
#define LIBAVCODEC_VERSION_MICRO
0
#define LIBAVCODEC_VERSION_MICRO
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录