Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
6282185e
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,发现更多精彩内容 >>
提交
6282185e
编写于
6月 09, 2002
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
grayscale only encoding
Originally committed as revision 679 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
03987173
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
26 addition
and
8 deletion
+26
-8
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+26
-8
未找到文件。
libavcodec/mpegvideo.c
浏览文件 @
6282185e
...
...
@@ -1421,12 +1421,17 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
get_pixels
(
s
->
block
[
2
],
ptr
+
8
*
wrap
,
wrap
);
get_pixels
(
s
->
block
[
3
],
ptr
+
8
*
wrap
+
8
,
wrap
);
if
(
s
->
flags
&
CODEC_FLAG_GRAY
){
skip_dct
[
4
]
=
1
;
skip_dct
[
5
]
=
1
;
}
else
{
wrap
>>=
1
;
ptr
=
s
->
new_picture
[
1
]
+
(
mb_y
*
8
*
wrap
)
+
mb_x
*
8
;
get_pixels
(
s
->
block
[
4
],
ptr
,
wrap
);
ptr
=
s
->
new_picture
[
2
]
+
(
mb_y
*
8
*
wrap
)
+
mb_x
*
8
;
get_pixels
(
s
->
block
[
5
],
ptr
,
wrap
);
}
}
else
{
op_pixels_func
*
op_pix
;
qpel_mc_func
*
op_qpix
;
...
...
@@ -1466,8 +1471,14 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
diff_pixels
(
s
->
block
[
1
],
ptr_y
+
8
,
dest_y
+
8
,
wrap_y
);
diff_pixels
(
s
->
block
[
2
],
ptr_y
+
8
*
wrap_y
,
dest_y
+
8
*
wrap_y
,
wrap_y
);
diff_pixels
(
s
->
block
[
3
],
ptr_y
+
8
*
wrap_y
+
8
,
dest_y
+
8
*
wrap_y
+
8
,
wrap_y
);
if
(
s
->
flags
&
CODEC_FLAG_GRAY
){
skip_dct
[
4
]
=
1
;
skip_dct
[
5
]
=
1
;
}
else
{
diff_pixels
(
s
->
block
[
4
],
ptr_cb
,
dest_cb
,
wrap_c
);
diff_pixels
(
s
->
block
[
5
],
ptr_cr
,
dest_cr
,
wrap_c
);
}
/* pre quantization */
if
(
s
->
mc_mb_var
[
s
->
mb_width
*
mb_y
+
mb_x
]
<
2
*
s
->
qscale
*
s
->
qscale
){
...
...
@@ -1546,6 +1557,13 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
dct_single_coeff_elimination
(
s
,
i
,
s
->
chroma_elim_threshold
,
1
);
}
if
((
s
->
flags
&
CODEC_FLAG_GRAY
)
&&
s
->
mb_intra
){
s
->
block_last_index
[
4
]
=
s
->
block_last_index
[
5
]
=
0
;
s
->
block
[
4
][
0
]
=
s
->
block
[
5
][
0
]
=
128
;
}
/* huffman encode */
switch
(
s
->
out_format
)
{
case
FMT_MPEG1
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录