Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
1f9aea9b
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,发现更多精彩内容 >>
提交
1f9aea9b
编写于
4月 01, 2003
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixing msmpeg4v2 encoding
Originally committed as revision 1723 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
30952237
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
11 deletion
+13
-11
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+5
-2
libavcodec/msmpeg4.c
libavcodec/msmpeg4.c
+3
-5
libavcodec/wmv2.c
libavcodec/wmv2.c
+3
-2
tests/ffmpeg.regression.ref
tests/ffmpeg.regression.ref
+2
-2
未找到文件。
libavcodec/mpegvideo.c
浏览文件 @
1f9aea9b
...
...
@@ -648,6 +648,7 @@ int MPV_encode_init(AVCodecContext *avctx)
s
->
h263_pred
=
1
;
s
->
unrestricted_mv
=
1
;
s
->
msmpeg4_version
=
3
;
s
->
flipflop_rounding
=
1
;
avctx
->
delay
=
0
;
s
->
low_delay
=
1
;
break
;
...
...
@@ -657,6 +658,7 @@ int MPV_encode_init(AVCodecContext *avctx)
s
->
h263_pred
=
1
;
s
->
unrestricted_mv
=
1
;
s
->
msmpeg4_version
=
4
;
s
->
flipflop_rounding
=
1
;
avctx
->
delay
=
0
;
s
->
low_delay
=
1
;
break
;
...
...
@@ -666,6 +668,7 @@ int MPV_encode_init(AVCodecContext *avctx)
s
->
h263_pred
=
1
;
s
->
unrestricted_mv
=
1
;
s
->
msmpeg4_version
=
5
;
s
->
flipflop_rounding
=
1
;
avctx
->
delay
=
0
;
s
->
low_delay
=
1
;
break
;
...
...
@@ -2834,8 +2837,8 @@ static void encode_picture(MpegEncContext *s, int picture_number)
s
->
qscale
=
(
int
)(
s
->
frame_qscale
+
0
.
5
);
//FIXME qscale / ... stuff for ME ratedistoration
if
(
s
->
pict_type
==
I_TYPE
){
if
(
s
->
msmpeg4_version
)
s
->
no_rounding
=
1
;
else
s
->
no_rounding
=
0
;
if
(
s
->
msmpeg4_version
>=
3
)
s
->
no_rounding
=
1
;
else
s
->
no_rounding
=
0
;
}
else
if
(
s
->
pict_type
!=
B_TYPE
){
if
(
s
->
flipflop_rounding
||
s
->
codec_id
==
CODEC_ID_H263P
||
s
->
codec_id
==
CODEC_ID_MPEG4
)
s
->
no_rounding
^=
1
;
...
...
libavcodec/msmpeg4.c
浏览文件 @
1f9aea9b
...
...
@@ -439,12 +439,10 @@ void msmpeg4_encode_ext_header(MpegEncContext * s)
put_bits
(
&
s
->
pb
,
11
,
FFMIN
(
s
->
bit_rate
/
1024
,
2047
));
if
(
s
->
msmpeg4_version
<
3
)
s
->
flipflop_rounding
=
0
;
else
{
s
->
flipflop_rounding
=
1
;
if
(
s
->
msmpeg4_version
>=
3
)
put_bits
(
&
s
->
pb
,
1
,
s
->
flipflop_rounding
);
}
else
assert
(
s
->
flipflop_rounding
==
0
);
}
#endif //CONFIG_ENCODERS
...
...
libavcodec/wmv2.c
浏览文件 @
1f9aea9b
...
...
@@ -131,7 +131,10 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number)
w
->
abt_type
=
0
;
w
->
j_type
=
0
;
assert
(
s
->
flipflop_rounding
);
if
(
s
->
pict_type
==
I_TYPE
)
{
assert
(
s
->
no_rounding
==
1
);
if
(
w
->
j_type_bit
)
put_bits
(
&
s
->
pb
,
1
,
w
->
j_type
);
if
(
w
->
per_mb_rl_bit
)
put_bits
(
&
s
->
pb
,
1
,
s
->
per_mb_rl_table
);
...
...
@@ -144,7 +147,6 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number)
put_bits
(
&
s
->
pb
,
1
,
s
->
dc_table_index
);
s
->
inter_intra_pred
=
0
;
s
->
no_rounding
=
1
;
}
else
{
int
cbp_index
;
...
...
@@ -181,7 +183,6 @@ int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number)
put_bits
(
&
s
->
pb
,
1
,
s
->
mv_table_index
);
s
->
inter_intra_pred
=
(
s
->
width
*
s
->
height
<
320
*
240
&&
s
->
bit_rate
<=
II_BITRATE
);
s
->
no_rounding
^=
1
;
}
s
->
esc3_level_length
=
0
;
s
->
esc3_run_length
=
0
;
...
...
tests/ffmpeg.regression.ref
浏览文件 @
1f9aea9b
ffmpeg regression test
dda0ba041aef50a5101884291c06d4d9 *./data/a-mpeg1.mpg
6713259d72260740bbddaea30631ea18 *./data/out.yuv
8
730846cd73f07689bfab061eac3e800
*./data/a-msmpeg4v2.avi
2cfc9307a2fd9651cf9c8e42dea1a80e
*./data/out.yuv
8
836c5e38c7891f04e8e75836e48551e
*./data/a-msmpeg4v2.avi
712aa6c959d1d90a78fe98657cbff19c
*./data/out.yuv
8b2a7f5e105784d65426989e4fce6e94 *./data/a-msmpeg4.avi
8786aa956838234fe3e48d0ef8cbd46c *./data/out.yuv
a0bec32a81f9a4cd174557a49cd26430 *./data/a-wmv1.avi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录