Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
6bb925f4
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,发现更多精彩内容 >>
提交
6bb925f4
编写于
10月 31, 2002
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dont call emms_c() for each MB
Originally committed as revision 1127 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
0aa7875a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
5 deletion
+10
-5
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+4
-5
libavcodec/utils.c
libavcodec/utils.c
+6
-0
未找到文件。
libavcodec/mpegvideo.c
浏览文件 @
6bb925f4
...
...
@@ -1819,7 +1819,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
/* if previous was skipped too, then nothing to do !
skip only during decoding as we might trash the buffers during encoding a bit */
if
(
*
mbskip_ptr
>=
s
->
ip_buffer_count
&&
!
s
->
encoding
)
goto
the_end
;
return
;
}
else
{
*
mbskip_ptr
=
0
;
/* not skipped */
}
...
...
@@ -1866,7 +1866,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
/* skip dequant / idct if we are really late ;) */
if
(
s
->
hurry_up
>
1
)
goto
the_end
;
if
(
s
->
hurry_up
>
1
)
return
;
/* add dct residue */
if
(
s
->
encoding
||
!
(
s
->
mpeg2
||
s
->
h263_msmpeg4
||
s
->
codec_id
==
CODEC_ID_MPEG1VIDEO
...
...
@@ -1916,8 +1916,6 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
}
}
the_end:
emms_c
();
//FIXME remove
}
static
inline
void
dct_single_coeff_elimination
(
MpegEncContext
*
s
,
int
n
,
int
threshold
)
...
...
@@ -2574,7 +2572,6 @@ static void encode_picture(MpegEncContext *s, int picture_number)
// s->mb_type[mb_y*s->mb_width + mb_x]=MB_TYPE_INTER;
}
}
emms_c
();
}
else
/* if(s->pict_type == I_TYPE) */
{
/* I-Frame */
//FIXME do we need to zero them?
...
...
@@ -2601,6 +2598,8 @@ static void encode_picture(MpegEncContext *s, int picture_number)
}
}
}
emms_c
();
if
(
s
->
scene_change_score
>
0
&&
s
->
pict_type
==
P_TYPE
){
s
->
pict_type
=
I_TYPE
;
memset
(
s
->
mb_type
,
MB_TYPE_INTRA
,
sizeof
(
UINT8
)
*
s
->
mb_width
*
s
->
mb_height
);
...
...
libavcodec/utils.c
浏览文件 @
6bb925f4
...
...
@@ -120,6 +120,9 @@ int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size,
int
ret
;
ret
=
avctx
->
codec
->
encode
(
avctx
,
buf
,
buf_size
,
(
void
*
)
pict
);
emms_c
();
//needed to avoid a emms_c() call before every return;
avctx
->
frame_number
++
;
return
ret
;
}
...
...
@@ -135,6 +138,9 @@ int avcodec_decode_video(AVCodecContext *avctx, AVPicture *picture,
ret
=
avctx
->
codec
->
decode
(
avctx
,
picture
,
got_picture_ptr
,
buf
,
buf_size
);
emms_c
();
//needed to avoid a emms_c() call before every return;
if
(
*
got_picture_ptr
)
avctx
->
frame_number
++
;
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录