Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
a1db1fc4
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,发现更多精彩内容 >>
提交
a1db1fc4
编写于
2月 21, 2006
作者:
A
Alex Beregszaszi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
explain extradata and pass avctx to av_log's
Originally committed as revision 5042 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
b0ca5735
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
13 deletion
+29
-13
libavcodec/alac.c
libavcodec/alac.c
+29
-13
未找到文件。
libavcodec/alac.c
浏览文件 @
a1db1fc4
...
...
@@ -32,6 +32,22 @@
* bytes 0-3 atom size (0x24), big-endian
* bytes 4-7 atom type ('alac', not the 'alac' tag from start of stsd)
* bytes 8-35 data bytes needed by decoder
*
* Extradata:
* 32bit size
* 32bit tag (=alac)
* 32bit zero?
* 32bit max sample per frame
* 8bit ?? (zero?)
* 8bit sample size
* 8bit history mult
* 8bit initial history
* 8bit kmodifier
* 8bit channels?
* 16bit ??
* 32bit max coded frame size
* 32bit bitrate?
* 32bit samplerate
*/
...
...
@@ -99,14 +115,14 @@ static void alac_set_info(ALACContext *alac)
alac
->
setinfo_rice_historymult
=
*
ptr
++
;
alac
->
setinfo_rice_initialhistory
=
*
ptr
++
;
alac
->
setinfo_rice_kmodifier
=
*
ptr
++
;
alac
->
setinfo_7f
=
*
ptr
++
;
alac
->
setinfo_7f
=
*
ptr
++
;
// channels?
alac
->
setinfo_80
=
BE_16
(
ptr
);
ptr
+=
2
;
alac
->
setinfo_82
=
BE_32
(
ptr
);
alac
->
setinfo_82
=
BE_32
(
ptr
);
// max coded frame size
ptr
+=
4
;
alac
->
setinfo_86
=
BE_32
(
ptr
);
alac
->
setinfo_86
=
BE_32
(
ptr
);
// bitrate ?
ptr
+=
4
;
alac
->
setinfo_8a_rate
=
BE_32
(
ptr
);
alac
->
setinfo_8a_rate
=
BE_32
(
ptr
);
// samplerate
ptr
+=
4
;
allocate_buffers
(
alac
);
...
...
@@ -444,7 +460,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
/* initialize from the extradata */
if
(
!
alac
->
context_initialized
)
{
if
(
alac
->
avctx
->
extradata_size
!=
ALAC_EXTRADATA_SIZE
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"alac: expected %d extradata bytes
\n
"
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"alac: expected %d extradata bytes
\n
"
,
ALAC_EXTRADATA_SIZE
);
return
input_buffer_size
;
}
...
...
@@ -500,7 +516,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
int
prediction_quantitization
;
int
i
;
/* skip 16 bits, not sure what they are. seem to be used in
/*
FIXME:
skip 16 bits, not sure what they are. seem to be used in
* two channel case */
get_bits
(
&
alac
->
gb
,
8
);
get_bits
(
&
alac
->
gb
,
8
);
...
...
@@ -520,7 +536,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
/* these bytes seem to have something to do with
* > 2 channel files.
*/
av_log
(
NULL
,
AV_LOG_ERROR
,
"FIXME: unimplemented, unhandling of wasted_bytes
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FIXME: unimplemented, unhandling of wasted_bytes
\n
"
);
}
bastardized_rice_decompress
(
alac
,
...
...
@@ -542,7 +558,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
predictor_coef_num
,
prediction_quantitization
);
}
else
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"FIXME: unhandled prediction type: %i
\n
"
,
prediction_type
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FIXME: unhandled prediction type: %i
\n
"
,
prediction_type
);
/* i think the only other prediction type (or perhaps this is just a
* boolean?) runs adaptive fir twice.. like:
* predictor_decompress_fir_adapt(predictor_error, tempout, ...)
...
...
@@ -594,7 +610,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
case
20
:
case
24
:
case
32
:
av_log
(
NULL
,
AV_LOG_ERROR
,
"FIXME: unimplemented sample size %i
\n
"
,
alac
->
setinfo_sample_size
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FIXME: unimplemented sample size %i
\n
"
,
alac
->
setinfo_sample_size
);
break
;
default:
break
;
...
...
@@ -679,7 +695,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
/*********************/
if
(
wasted_bytes
)
{
/* see mono case */
av_log
(
NULL
,
AV_LOG_ERROR
,
"FIXME: unimplemented, unhandling of wasted_bytes
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FIXME: unimplemented, unhandling of wasted_bytes
\n
"
);
}
/* channel 1 */
...
...
@@ -703,7 +719,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
prediction_quantitization_a
);
}
else
{
/* see mono case */
av_log
(
NULL
,
AV_LOG_ERROR
,
"FIXME: unhandled prediction type: %i
\n
"
,
prediction_type_a
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FIXME: unhandled prediction type: %i
\n
"
,
prediction_type_a
);
}
/* channel 2 */
...
...
@@ -726,7 +742,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
predictor_coef_num_b
,
prediction_quantitization_b
);
}
else
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"FIXME: unhandled prediction type: %i
\n
"
,
prediction_type_b
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FIXME: unhandled prediction type: %i
\n
"
,
prediction_type_b
);
}
}
else
{
/* not compressed, easy case */
...
...
@@ -782,7 +798,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
case
20
:
case
24
:
case
32
:
av_log
(
NULL
,
AV_LOG_ERROR
,
"FIXME: unimplemented sample size %i
\n
"
,
alac
->
setinfo_sample_size
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"FIXME: unimplemented sample size %i
\n
"
,
alac
->
setinfo_sample_size
);
break
;
default:
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录