Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
1550f45a
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,发现更多精彩内容 >>
提交
1550f45a
编写于
5月 13, 2011
作者:
M
Mans Rullgard
提交者:
Ronald S. Bultje
5月 13, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add av_clip_uintp2() function
Signed-off-by:
N
Mans Rullgard
<
mans@mansr.com
>
上级
2c9a5172
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
3 deletion
+16
-3
libavcodec/vp8.c
libavcodec/vp8.c
+1
-3
libavutil/common.h
libavutil/common.h
+15
-0
未找到文件。
libavcodec/vp8.c
浏览文件 @
1550f45a
...
...
@@ -1329,9 +1329,7 @@ static av_always_inline void filter_level_for_mb(VP8Context *s, VP8Macroblock *m
filter_level
+=
s
->
lf_delta
.
mode
[
mb
->
mode
];
}
/* Like av_clip for inputs 0 and max, where max is equal to (2^n-1) */
#define POW2CLIP(x,max) (((x) & ~max) ? (-(x))>>31 & max : (x));
filter_level
=
POW2CLIP
(
filter_level
,
63
);
filter_level
=
av_clip_uintp2
(
filter_level
,
6
);
interior_limit
=
filter_level
;
if
(
s
->
filter
.
sharpness
)
{
...
...
libavutil/common.h
浏览文件 @
1550f45a
...
...
@@ -169,6 +169,18 @@ static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
else
return
a
;
}
/**
* Clip a signed integer to an unsigned power of two range.
* @param a value to clip
* @param p bit position to clip at
* @return clipped value
*/
static
av_always_inline
av_const
unsigned
av_clip_uintp2_c
(
int
a
,
int
p
)
{
if
(
a
&
~
((
1
<<
p
)
-
1
))
return
-
a
>>
31
&
((
1
<<
p
)
-
1
);
else
return
a
;
}
/**
* Clip a float value into the amin-amax range.
* @param a value to clip
...
...
@@ -362,6 +374,9 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
#ifndef av_clipl_int32
# define av_clipl_int32 av_clipl_int32_c
#endif
#ifndef av_clip_uintp2
# define av_clip_uintp2 av_clip_uintp2_c
#endif
#ifndef av_clipf
# define av_clipf av_clipf_c
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录