Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
ff794171
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,发现更多精彩内容 >>
提交
ff794171
编写于
2月 01, 2008
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do not cast const away.
Originally committed as revision 11707 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
b1f5712e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
37 addition
and
37 deletion
+37
-37
libavutil/intreadwrite.h
libavutil/intreadwrite.h
+37
-37
未找到文件。
libavutil/intreadwrite.h
浏览文件 @
ff794171
...
...
@@ -38,9 +38,9 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
#else
/* __GNUC__ */
#define AV_RN16(a) (*((uint16_t*)(a)))
#define AV_RN32(a) (*((uint32_t*)(a)))
#define AV_RN64(a) (*((uint64_t*)(a)))
#define AV_RN16(a) (*((
const
uint16_t*)(a)))
#define AV_RN32(a) (*((
const
uint32_t*)(a)))
#define AV_RN64(a) (*((
const
uint64_t*)(a)))
#define AV_WN16(a, b) *((uint16_t*)(a)) = (b)
#define AV_WN32(a, b) *((uint32_t*)(a)) = (b)
...
...
@@ -49,7 +49,7 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
#endif
/* !__GNUC__ */
/* endian macros */
#define AV_RB8(x) (((uint8_t*)(x))[0])
#define AV_RB8(x) (((
const
uint8_t*)(x))[0])
#define AV_WB8(p, d) do { ((uint8_t*)(p))[0] = (d); } while(0)
#define AV_RL8(x) AV_RB8(x)
...
...
@@ -70,29 +70,29 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
# define AV_WL16(p, d) AV_WN16(p, d)
# endif
#else
/* HAVE_FAST_UNALIGNED */
#define AV_RB16(x) ((((
uint8_t*)(x))[0] << 8) | ((
uint8_t*)(x))[1])
#define AV_RB16(x) ((((
const uint8_t*)(x))[0] << 8) | ((const
uint8_t*)(x))[1])
#define AV_WB16(p, d) do { \
((uint8_t*)(p))[1] = (d); \
((uint8_t*)(p))[0] = (d)>>8; } while(0)
#define AV_RL16(x) ((((uint8_t*)(x))[1] << 8) | \
((uint8_t*)(x))[0])
#define AV_RL16(x) ((((
const
uint8_t*)(x))[1] << 8) | \
((
const
uint8_t*)(x))[0])
#define AV_WL16(p, d) do { \
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; } while(0)
#endif
#define AV_RB24(x) ((((uint8_t*)(x))[0] << 16) | \
(((uint8_t*)(x))[1] << 8) | \
((uint8_t*)(x))[2])
#define AV_RB24(x) ((((
const
uint8_t*)(x))[0] << 16) | \
(((
const
uint8_t*)(x))[1] << 8) | \
((
const
uint8_t*)(x))[2])
#define AV_WB24(p, d) do { \
((uint8_t*)(p))[2] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
((uint8_t*)(p))[0] = (d)>>16; } while(0)
#define AV_RL24(x) ((((uint8_t*)(x))[2] << 16) | \
(((uint8_t*)(x))[1] << 8) | \
((uint8_t*)(x))[0])
#define AV_RL24(x) ((((
const
uint8_t*)(x))[2] << 16) | \
(((
const
uint8_t*)(x))[1] << 8) | \
((
const
uint8_t*)(x))[0])
#define AV_WL24(p, d) do { \
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
...
...
@@ -113,20 +113,20 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
# define AV_WL32(p, d) AV_WN32(p, d)
# endif
#else
/* HAVE_FAST_UNALIGNED */
#define AV_RB32(x) ((((uint8_t*)(x))[0] << 24) | \
(((uint8_t*)(x))[1] << 16) | \
(((uint8_t*)(x))[2] << 8) | \
((uint8_t*)(x))[3])
#define AV_RB32(x) ((((
const
uint8_t*)(x))[0] << 24) | \
(((
const
uint8_t*)(x))[1] << 16) | \
(((
const
uint8_t*)(x))[2] << 8) | \
((
const
uint8_t*)(x))[3])
#define AV_WB32(p, d) do { \
((uint8_t*)(p))[3] = (d); \
((uint8_t*)(p))[2] = (d)>>8; \
((uint8_t*)(p))[1] = (d)>>16; \
((uint8_t*)(p))[0] = (d)>>24; } while(0)
#define AV_RL32(x) ((((uint8_t*)(x))[3] << 24) | \
(((uint8_t*)(x))[2] << 16) | \
(((uint8_t*)(x))[1] << 8) | \
((uint8_t*)(x))[0])
#define AV_RL32(x) ((((
const
uint8_t*)(x))[3] << 24) | \
(((
const
uint8_t*)(x))[2] << 16) | \
(((
const
uint8_t*)(x))[1] << 8) | \
((
const
uint8_t*)(x))[0])
#define AV_WL32(p, d) do { \
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
...
...
@@ -149,14 +149,14 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
# define AV_WL64(p, d) AV_WN64(p, d)
# endif
#else
/* HAVE_FAST_UNALIGNED */
#define AV_RB64(x) (((uint64_t)((uint8_t*)(x))[0] << 56) | \
((uint64_t)((uint8_t*)(x))[1] << 48) | \
((uint64_t)((uint8_t*)(x))[2] << 40) | \
((uint64_t)((uint8_t*)(x))[3] << 32) | \
((uint64_t)((uint8_t*)(x))[4] << 24) | \
((uint64_t)((uint8_t*)(x))[5] << 16) | \
((uint64_t)((uint8_t*)(x))[6] << 8) | \
(uint64_t)((uint8_t*)(x))[7])
#define AV_RB64(x) (((uint64_t)((
const
uint8_t*)(x))[0] << 56) | \
((uint64_t)((
const
uint8_t*)(x))[1] << 48) | \
((uint64_t)((
const
uint8_t*)(x))[2] << 40) | \
((uint64_t)((
const
uint8_t*)(x))[3] << 32) | \
((uint64_t)((
const
uint8_t*)(x))[4] << 24) | \
((uint64_t)((
const
uint8_t*)(x))[5] << 16) | \
((uint64_t)((
const
uint8_t*)(x))[6] << 8) | \
(uint64_t)((
const
uint8_t*)(x))[7])
#define AV_WB64(p, d) do { \
((uint8_t*)(p))[7] = (d); \
((uint8_t*)(p))[6] = (d)>>8; \
...
...
@@ -167,14 +167,14 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
((uint8_t*)(p))[1] = (d)>>48; \
((uint8_t*)(p))[0] = (d)>>56; } while(0)
#define AV_RL64(x) (((uint64_t)((uint8_t*)(x))[7] << 56) | \
((uint64_t)((uint8_t*)(x))[6] << 48) | \
((uint64_t)((uint8_t*)(x))[5] << 40) | \
((uint64_t)((uint8_t*)(x))[4] << 32) | \
((uint64_t)((uint8_t*)(x))[3] << 24) | \
((uint64_t)((uint8_t*)(x))[2] << 16) | \
((uint64_t)((uint8_t*)(x))[1] << 8) | \
(uint64_t)((uint8_t*)(x))[0])
#define AV_RL64(x) (((uint64_t)((
const
uint8_t*)(x))[7] << 56) | \
((uint64_t)((
const
uint8_t*)(x))[6] << 48) | \
((uint64_t)((
const
uint8_t*)(x))[5] << 40) | \
((uint64_t)((
const
uint8_t*)(x))[4] << 32) | \
((uint64_t)((
const
uint8_t*)(x))[3] << 24) | \
((uint64_t)((
const
uint8_t*)(x))[2] << 16) | \
((uint64_t)((
const
uint8_t*)(x))[1] << 8) | \
(uint64_t)((
const
uint8_t*)(x))[0])
#define AV_WL64(p, d) do { \
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录