Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
bac47ae6
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,发现更多精彩内容 >>
提交
bac47ae6
编写于
4月 01, 2008
作者:
B
Baptiste Coudurier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use mpeg4audio common code in aac parser
Originally committed as revision 12665 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
83edd509
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
17 deletion
+6
-17
libavcodec/Makefile
libavcodec/Makefile
+1
-1
libavcodec/aac_parser.c
libavcodec/aac_parser.c
+5
-16
未找到文件。
libavcodec/Makefile
浏览文件 @
bac47ae6
...
...
@@ -326,7 +326,7 @@ OBJS-$(CONFIG_LIBX264) += libx264.o
OBJS-$(CONFIG_LIBXVID)
+=
libxvidff.o libxvid_rc.o
OBJS-$(CONFIG_AAC_PARSER)
+=
aac_parser.o aac_ac3_parser.o
OBJS-$(CONFIG_AAC_PARSER)
+=
aac_parser.o aac_ac3_parser.o
mpeg4audio.o
OBJS-$(CONFIG_AC3_PARSER)
+=
ac3_parser.o ac3tab.o aac_ac3_parser.o
OBJS-$(CONFIG_CAVSVIDEO_PARSER)
+=
cavs_parser.o
OBJS-$(CONFIG_DCA_PARSER)
+=
dca_parser.o
...
...
libavcodec/aac_parser.c
浏览文件 @
bac47ae6
...
...
@@ -23,21 +23,10 @@
#include "parser.h"
#include "aac_ac3_parser.h"
#include "bitstream.h"
#include "mpeg4audio.h"
#define AAC_HEADER_SIZE 7
static
const
int
aac_sample_rates
[
16
]
=
{
96000
,
88200
,
64000
,
48000
,
44100
,
32000
,
24000
,
22050
,
16000
,
12000
,
11025
,
8000
,
7350
};
static
const
int
aac_channels
[
8
]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
8
};
static
int
aac_sync
(
AACAC3ParseContext
*
hdr_info
,
AACAC3FrameFlag
*
flag
)
{
GetBitContext
bits
;
...
...
@@ -53,11 +42,11 @@ static int aac_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
skip_bits1
(
&
bits
);
/* protection_absent */
skip_bits
(
&
bits
,
2
);
/* profile_objecttype */
sr
=
get_bits
(
&
bits
,
4
);
/* sample_frequency_index */
if
(
!
aac
_sample_rates
[
sr
])
if
(
!
ff_mpeg4audio
_sample_rates
[
sr
])
return
0
;
skip_bits1
(
&
bits
);
/* private_bit */
ch
=
get_bits
(
&
bits
,
3
);
/* channel_configuration */
if
(
!
aac
_channels
[
ch
])
if
(
!
ff_mpeg4audio
_channels
[
ch
])
return
0
;
skip_bits1
(
&
bits
);
/* original/copy */
skip_bits1
(
&
bits
);
/* home */
...
...
@@ -72,8 +61,8 @@ static int aac_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
skip_bits
(
&
bits
,
11
);
/* adts_buffer_fullness */
rdb
=
get_bits
(
&
bits
,
2
);
/* number_of_raw_data_blocks_in_frame */
hdr_info
->
channels
=
aac
_channels
[
ch
];
hdr_info
->
sample_rate
=
aac
_sample_rates
[
sr
];
hdr_info
->
channels
=
ff_mpeg4audio
_channels
[
ch
];
hdr_info
->
sample_rate
=
ff_mpeg4audio
_sample_rates
[
sr
];
hdr_info
->
samples
=
(
rdb
+
1
)
*
1024
;
hdr_info
->
bit_rate
=
size
*
8
*
hdr_info
->
sample_rate
/
hdr_info
->
samples
;
*
flag
=
FRAME_COMPLETE
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录