Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
2119bb8f
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,发现更多精彩内容 >>
提交
2119bb8f
编写于
3月 18, 2008
作者:
B
Benoit Fouet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
revert r12489.
Originally committed as revision 12490 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
6544f48f
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
55 addition
and
78 deletion
+55
-78
libavutil/adler32.h
libavutil/adler32.h
+1
-1
libavutil/bswap.h
libavutil/bswap.h
+3
-3
libavutil/common.h
libavutil/common.h
+8
-24
libavutil/crc.h
libavutil/crc.h
+1
-1
libavutil/des.c
libavutil/des.c
+0
-1
libavutil/des.h
libavutil/des.h
+1
-1
libavutil/integer.h
libavutil/integer.h
+9
-9
libavutil/internal.h
libavutil/internal.h
+6
-6
libavutil/intfloat_readwrite.h
libavutil/intfloat_readwrite.h
+6
-6
libavutil/mathematics.h
libavutil/mathematics.h
+3
-3
libavutil/mem.h
libavutil/mem.h
+3
-9
libavutil/rational.h
libavutil/rational.h
+5
-5
libavutil/softfloat.h
libavutil/softfloat.h
+9
-9
未找到文件。
libavutil/adler32.h
浏览文件 @
2119bb8f
...
...
@@ -24,6 +24,6 @@
#include <stdint.h>
unsigned
long
av_adler32_update
(
unsigned
long
adler
,
const
uint8_t
*
buf
,
unsigned
int
len
)
av_pure
;
unsigned
int
len
);
#endif
/* FFMPEG_ADLER32_H */
libavutil/bswap.h
浏览文件 @
2119bb8f
...
...
@@ -40,7 +40,7 @@
# define LEGACY_REGS "=q"
#endif
static
av_always_inline
av_const
uint16_t
bswap_16
(
uint16_t
x
)
static
av_always_inline
uint16_t
bswap_16
(
uint16_t
x
)
{
#if defined(ARCH_X86)
__asm
(
"rorw $8, %0"
:
...
...
@@ -54,7 +54,7 @@ static av_always_inline av_const uint16_t bswap_16(uint16_t x)
return
x
;
}
static
av_always_inline
av_const
uint32_t
bswap_32
(
uint32_t
x
)
static
av_always_inline
uint32_t
bswap_32
(
uint32_t
x
)
{
#if defined(ARCH_X86)
#ifdef HAVE_BSWAP
...
...
@@ -93,7 +93,7 @@ static av_always_inline av_const uint32_t bswap_32(uint32_t x)
return
x
;
}
static
inline
uint64_t
av_const
bswap_64
(
uint64_t
x
)
static
inline
uint64_t
bswap_64
(
uint64_t
x
)
{
#if 0
x= ((x<< 8)&0xFF00FF00FF00FF00ULL) | ((x>> 8)&0x00FF00FF00FF00FFULL);
...
...
libavutil/common.h
浏览文件 @
2119bb8f
...
...
@@ -57,22 +57,6 @@
#endif
#endif
#ifndef av_pure
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define av_pure __attribute__((pure))
#else
# define av_pure
#endif
#endif
#ifndef av_const
#if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 5)
# define av_const __attribute__((const))
#else
# define av_const
#endif
#endif
#ifdef HAVE_AV_CONFIG_H
# include "internal.h"
#endif
/* HAVE_AV_CONFIG_H */
...
...
@@ -110,7 +94,7 @@
/* misc math functions */
extern
const
uint8_t
ff_log2_tab
[
256
];
static
inline
av_const
int
av_log2
(
unsigned
int
v
)
static
inline
int
av_log2
(
unsigned
int
v
)
{
int
n
=
0
;
if
(
v
&
0xffff0000
)
{
...
...
@@ -126,7 +110,7 @@ static inline av_const int av_log2(unsigned int v)
return
n
;
}
static
inline
av_const
int
av_log2_16bit
(
unsigned
int
v
)
static
inline
int
av_log2_16bit
(
unsigned
int
v
)
{
int
n
=
0
;
if
(
v
&
0xff00
)
{
...
...
@@ -139,7 +123,7 @@ static inline av_const int av_log2_16bit(unsigned int v)
}
/* median of 3 */
static
inline
av_const
int
mid_pred
(
int
a
,
int
b
,
int
c
)
static
inline
int
mid_pred
(
int
a
,
int
b
,
int
c
)
{
#ifdef HAVE_CMOV
int
i
=
b
;
...
...
@@ -186,7 +170,7 @@ static inline av_const int mid_pred(int a, int b, int c)
* @param amax maximum value of the clip range
* @return clipped value
*/
static
inline
av_const
int
av_clip
(
int
a
,
int
amin
,
int
amax
)
static
inline
int
av_clip
(
int
a
,
int
amin
,
int
amax
)
{
if
(
a
<
amin
)
return
amin
;
else
if
(
a
>
amax
)
return
amax
;
...
...
@@ -198,7 +182,7 @@ static inline av_const int av_clip(int a, int amin, int amax)
* @param a value to clip
* @return clipped value
*/
static
inline
av_const
uint8_t
av_clip_uint8
(
int
a
)
static
inline
uint8_t
av_clip_uint8
(
int
a
)
{
if
(
a
&
(
~
255
))
return
(
-
a
)
>>
31
;
else
return
a
;
...
...
@@ -209,19 +193,19 @@ static inline av_const uint8_t av_clip_uint8(int a)
* @param a value to clip
* @return clipped value
*/
static
inline
av_const
int16_t
av_clip_int16
(
int
a
)
static
inline
int16_t
av_clip_int16
(
int
a
)
{
if
((
a
+
32768
)
&
~
65535
)
return
(
a
>>
31
)
^
32767
;
else
return
a
;
}
/* math */
int64_t
av_const
ff_gcd
(
int64_t
a
,
int64_t
b
);
int64_t
ff_gcd
(
int64_t
a
,
int64_t
b
);
/**
* converts fourcc string to int
*/
static
inline
av_pure
int
ff_get_fourcc
(
const
char
*
s
){
static
inline
int
ff_get_fourcc
(
const
char
*
s
){
#ifdef HAVE_AV_CONFIG_H
assert
(
strlen
(
s
)
==
4
);
#endif
...
...
libavutil/crc.h
浏览文件 @
2119bb8f
...
...
@@ -37,7 +37,7 @@ typedef enum {
int
av_crc_init
(
AVCRC
*
ctx
,
int
le
,
int
bits
,
uint32_t
poly
,
int
ctx_size
);
const
AVCRC
*
av_crc_get_table
(
AVCRCId
crc_id
);
uint32_t
av_crc
(
const
AVCRC
*
ctx
,
uint32_t
start_crc
,
const
uint8_t
*
buffer
,
size_t
length
)
av_pure
;
uint32_t
av_crc
(
const
AVCRC
*
ctx
,
uint32_t
start_crc
,
const
uint8_t
*
buffer
,
size_t
length
);
#endif
/* FFMPEG_CRC_H */
libavutil/des.c
浏览文件 @
2119bb8f
...
...
@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "common.h"
#include "des.h"
#define T(a, b, c, d, e, f, g, h) 64-a,64-b,64-c,64-d,64-e,64-f,64-g,64-h
...
...
libavutil/des.h
浏览文件 @
2119bb8f
...
...
@@ -34,6 +34,6 @@
* If your input data is in 8-bit blocks treat it as big-endian
* (use e.g. AV_RB64 and AV_WB64).
*/
uint64_t
ff_des_encdec
(
uint64_t
in
,
uint64_t
key
,
int
decrypt
)
av_const
;
uint64_t
ff_des_encdec
(
uint64_t
in
,
uint64_t
key
,
int
decrypt
);
#endif
/* FFMPEG_DES_H */
libavutil/integer.h
浏览文件 @
2119bb8f
...
...
@@ -36,26 +36,26 @@ typedef struct AVInteger{
uint16_t
v
[
AV_INTEGER_SIZE
];
}
AVInteger
;
AVInteger
av_add_i
(
AVInteger
a
,
AVInteger
b
)
av_const
;
AVInteger
av_sub_i
(
AVInteger
a
,
AVInteger
b
)
av_const
;
AVInteger
av_add_i
(
AVInteger
a
,
AVInteger
b
);
AVInteger
av_sub_i
(
AVInteger
a
,
AVInteger
b
);
/**
* returns the rounded down value of the logarithm of base 2 of the given AVInteger.
* this is simply the index of the most significant bit which is 1. Or 0 of all bits are 0
*/
int
av_log2_i
(
AVInteger
a
)
av_const
;
AVInteger
av_mul_i
(
AVInteger
a
,
AVInteger
b
)
av_const
;
int
av_log2_i
(
AVInteger
a
);
AVInteger
av_mul_i
(
AVInteger
a
,
AVInteger
b
);
/**
* returns 0 if a==b, 1 if a>b and -1 if a<b.
*/
int
av_cmp_i
(
AVInteger
a
,
AVInteger
b
)
av_const
;
int
av_cmp_i
(
AVInteger
a
,
AVInteger
b
);
/**
* bitwise shift.
* @param s the number of bits by which the value should be shifted right, may be negative for shifting left
*/
AVInteger
av_shr_i
(
AVInteger
a
,
int
s
)
av_const
;
AVInteger
av_shr_i
(
AVInteger
a
,
int
s
);
/**
* returns a % b.
...
...
@@ -66,18 +66,18 @@ AVInteger av_mod_i(AVInteger *quot, AVInteger a, AVInteger b);
/**
* returns a/b.
*/
AVInteger
av_div_i
(
AVInteger
a
,
AVInteger
b
)
av_const
;
AVInteger
av_div_i
(
AVInteger
a
,
AVInteger
b
);
/**
* converts the given int64_t to an AVInteger.
*/
AVInteger
av_int2i
(
int64_t
a
)
av_const
;
AVInteger
av_int2i
(
int64_t
a
);
/**
* converts the given AVInteger to an int64_t.
* if the AVInteger is too large to fit into an int64_t,
* then only the least significant 64bit will be used
*/
int64_t
av_i2int
(
AVInteger
a
)
av_const
;
int64_t
av_i2int
(
AVInteger
a
);
#endif
/* FFMPEG_INTEGER_H */
libavutil/internal.h
浏览文件 @
2119bb8f
...
...
@@ -172,7 +172,7 @@ extern const uint8_t ff_sqrt_tab[256];
static
inline
int
av_log2_16bit
(
unsigned
int
v
);
static
inline
av_const
unsigned
int
ff_sqrt
(
unsigned
int
a
)
static
inline
unsigned
int
ff_sqrt
(
unsigned
int
a
)
{
unsigned
int
b
;
...
...
@@ -267,35 +267,35 @@ if((y)<(x)){\
}
#ifndef HAVE_LLRINT
static
av_always_inline
av_const
long
long
llrint
(
double
x
)
static
av_always_inline
long
long
llrint
(
double
x
)
{
return
rint
(
x
);
}
#endif
/* HAVE_LLRINT */
#ifndef HAVE_LRINT
static
av_always_inline
av_const
long
int
lrint
(
double
x
)
static
av_always_inline
long
int
lrint
(
double
x
)
{
return
rint
(
x
);
}
#endif
/* HAVE_LRINT */
#ifndef HAVE_LRINTF
static
av_always_inline
av_const
long
int
lrintf
(
float
x
)
static
av_always_inline
long
int
lrintf
(
float
x
)
{
return
(
int
)(
rint
(
x
));
}
#endif
/* HAVE_LRINTF */
#ifndef HAVE_ROUND
static
av_always_inline
av_const
double
round
(
double
x
)
static
av_always_inline
double
round
(
double
x
)
{
return
(
x
>
0
)
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
}
#endif
/* HAVE_ROUND */
#ifndef HAVE_ROUNDF
static
av_always_inline
av_const
float
roundf
(
float
x
)
static
av_always_inline
float
roundf
(
float
x
)
{
return
(
x
>
0
)
?
floor
(
x
+
0
.
5
)
:
ceil
(
x
-
0
.
5
);
}
...
...
libavutil/intfloat_readwrite.h
浏览文件 @
2119bb8f
...
...
@@ -30,11 +30,11 @@ typedef struct AVExtFloat {
uint8_t
mantissa
[
8
];
}
AVExtFloat
;
double
av_int2dbl
(
int64_t
v
)
av_const
;
float
av_int2flt
(
int32_t
v
)
av_const
;
double
av_ext2dbl
(
const
AVExtFloat
ext
)
av_const
;
int64_t
av_dbl2int
(
double
d
)
av_const
;
int32_t
av_flt2int
(
float
d
)
av_const
;
AVExtFloat
av_dbl2ext
(
double
d
)
av_const
;
double
av_int2dbl
(
int64_t
v
);
float
av_int2flt
(
int32_t
v
);
double
av_ext2dbl
(
const
AVExtFloat
ext
);
int64_t
av_dbl2int
(
double
d
);
int32_t
av_flt2int
(
float
d
);
AVExtFloat
av_dbl2ext
(
double
d
);
#endif
/* FFMPEG_INTFLOAT_READWRITE_H */
libavutil/mathematics.h
浏览文件 @
2119bb8f
...
...
@@ -36,17 +36,17 @@ enum AVRounding {
* rescale a 64bit integer with rounding to nearest.
* a simple a*b/c isn't possible as it can overflow
*/
int64_t
av_rescale
(
int64_t
a
,
int64_t
b
,
int64_t
c
)
av_const
;
int64_t
av_rescale
(
int64_t
a
,
int64_t
b
,
int64_t
c
);
/**
* rescale a 64bit integer with specified rounding.
* a simple a*b/c isn't possible as it can overflow
*/
int64_t
av_rescale_rnd
(
int64_t
a
,
int64_t
b
,
int64_t
c
,
enum
AVRounding
)
av_const
;
int64_t
av_rescale_rnd
(
int64_t
a
,
int64_t
b
,
int64_t
c
,
enum
AVRounding
);
/**
* rescale a 64bit integer by 2 rational numbers.
*/
int64_t
av_rescale_q
(
int64_t
a
,
AVRational
bq
,
AVRational
cq
)
av_const
;
int64_t
av_rescale_q
(
int64_t
a
,
AVRational
bq
,
AVRational
cq
);
#endif
/* FFMPEG_MATHEMATICS_H */
libavutil/mem.h
浏览文件 @
2119bb8f
...
...
@@ -42,12 +42,6 @@
#define DECLARE_ASM_CONST(n,t,v) static const t v
#endif
#ifdef __GNUC__
#define av_malloc_attrib __attribute__((__malloc__))
#else
#define av_malloc_attrib
#endif
/**
* Allocate a block of \p size bytes with alignment suitable for all
* memory accesses (including vectors if available on the CPU).
...
...
@@ -56,7 +50,7 @@
* it.
* @see av_mallocz()
*/
void
*
av_malloc
(
unsigned
int
size
)
av_malloc_attrib
;
void
*
av_malloc
(
unsigned
int
size
);
/**
* Allocate or reallocate a block of memory.
...
...
@@ -91,7 +85,7 @@ void av_free(void *ptr);
* it.
* @see av_malloc()
*/
void
*
av_mallocz
(
unsigned
int
size
)
av_malloc_attrib
;
void
*
av_mallocz
(
unsigned
int
size
);
/**
* Duplicate the string \p s.
...
...
@@ -99,7 +93,7 @@ void *av_mallocz(unsigned int size) av_malloc_attrib;
* @return Pointer to a newly allocated string containing a
* copy of \p s or NULL if it cannot be allocated.
*/
char
*
av_strdup
(
const
char
*
s
)
av_malloc_attrib
;
char
*
av_strdup
(
const
char
*
s
);
/**
* Free a memory block which has been allocated with av_malloc(z)() or
...
...
libavutil/rational.h
浏览文件 @
2119bb8f
...
...
@@ -78,7 +78,7 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max)
* @param c second rational.
* @return b*c.
*/
AVRational
av_mul_q
(
AVRational
b
,
AVRational
c
)
av_const
;
AVRational
av_mul_q
(
AVRational
b
,
AVRational
c
);
/**
* Divides one rational by another.
...
...
@@ -86,7 +86,7 @@ AVRational av_mul_q(AVRational b, AVRational c) av_const;
* @param c second rational.
* @return b/c.
*/
AVRational
av_div_q
(
AVRational
b
,
AVRational
c
)
av_const
;
AVRational
av_div_q
(
AVRational
b
,
AVRational
c
);
/**
* Adds two rationals.
...
...
@@ -94,7 +94,7 @@ AVRational av_div_q(AVRational b, AVRational c) av_const;
* @param c second rational.
* @return b+c.
*/
AVRational
av_add_q
(
AVRational
b
,
AVRational
c
)
av_const
;
AVRational
av_add_q
(
AVRational
b
,
AVRational
c
);
/**
* Subtracts one rational from another.
...
...
@@ -102,7 +102,7 @@ AVRational av_add_q(AVRational b, AVRational c) av_const;
* @param c second rational.
* @return b-c.
*/
AVRational
av_sub_q
(
AVRational
b
,
AVRational
c
)
av_const
;
AVRational
av_sub_q
(
AVRational
b
,
AVRational
c
);
/**
* Converts a double precision floating point number to a rational.
...
...
@@ -110,6 +110,6 @@ AVRational av_sub_q(AVRational b, AVRational c) av_const;
* @param max the maximum allowed numerator and denominator
* @return (AVRational) d.
*/
AVRational
av_d2q
(
double
d
,
int
max
)
av_const
;
AVRational
av_d2q
(
double
d
,
int
max
);
#endif
/* FFMPEG_RATIONAL_H */
libavutil/softfloat.h
浏览文件 @
2119bb8f
...
...
@@ -32,7 +32,7 @@ typedef struct SoftFloat{
int32_t
mant
;
}
SoftFloat
;
static
av_const
SoftFloat
av_normalize_sf
(
SoftFloat
a
){
static
SoftFloat
av_normalize_sf
(
SoftFloat
a
){
if
(
a
.
mant
){
#if 1
while
((
a
.
mant
+
0x20000000U
)
<
0x40000000U
){
...
...
@@ -54,7 +54,7 @@ static av_const SoftFloat av_normalize_sf(SoftFloat a){
return
a
;
}
static
inline
av_const
SoftFloat
av_normalize1_sf
(
SoftFloat
a
){
static
inline
SoftFloat
av_normalize1_sf
(
SoftFloat
a
){
#if 1
if
(
a
.
mant
+
0x40000000
<
0
){
a
.
exp
++
;
...
...
@@ -76,7 +76,7 @@ static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
* normalized then the output wont be worse then the other input
* if both are normalized then the output will be normalized
*/
static
inline
av_const
SoftFloat
av_mul_sf
(
SoftFloat
a
,
SoftFloat
b
){
static
inline
SoftFloat
av_mul_sf
(
SoftFloat
a
,
SoftFloat
b
){
a
.
exp
+=
b
.
exp
;
a
.
mant
=
(
a
.
mant
*
(
int64_t
)
b
.
mant
)
>>
ONE_BITS
;
return
av_normalize1_sf
(
a
);
...
...
@@ -87,31 +87,31 @@ static inline av_const SoftFloat av_mul_sf(SoftFloat a, SoftFloat b){
* b has to be normalized and not zero
* @return will not be more denormalized then a
*/
static
av_const
SoftFloat
av_div_sf
(
SoftFloat
a
,
SoftFloat
b
){
static
SoftFloat
av_div_sf
(
SoftFloat
a
,
SoftFloat
b
){
a
.
exp
-=
b
.
exp
+
1
;
a
.
mant
=
((
int64_t
)
a
.
mant
<<
(
ONE_BITS
+
1
))
/
b
.
mant
;
return
av_normalize1_sf
(
a
);
}
static
inline
av_const
int
av_cmp_sf
(
SoftFloat
a
,
SoftFloat
b
){
static
inline
int
av_cmp_sf
(
SoftFloat
a
,
SoftFloat
b
){
int
t
=
a
.
exp
-
b
.
exp
;
if
(
t
<
0
)
return
(
a
.
mant
>>
(
-
t
))
-
b
.
mant
;
else
return
a
.
mant
-
(
b
.
mant
>>
t
);
}
static
inline
av_const
SoftFloat
av_add_sf
(
SoftFloat
a
,
SoftFloat
b
){
static
inline
SoftFloat
av_add_sf
(
SoftFloat
a
,
SoftFloat
b
){
int
t
=
a
.
exp
-
b
.
exp
;
if
(
t
<
0
)
return
av_normalize1_sf
((
SoftFloat
){
b
.
exp
,
b
.
mant
+
(
a
.
mant
>>
(
-
t
))});
else
return
av_normalize1_sf
((
SoftFloat
){
a
.
exp
,
a
.
mant
+
(
b
.
mant
>>
t
)});
}
static
inline
av_const
SoftFloat
av_sub_sf
(
SoftFloat
a
,
SoftFloat
b
){
static
inline
SoftFloat
av_sub_sf
(
SoftFloat
a
,
SoftFloat
b
){
return
av_add_sf
(
a
,
(
SoftFloat
){
b
.
exp
,
-
b
.
mant
});
}
//FIXME sqrt, log, exp, pow, sin, cos
static
inline
av_const
SoftFloat
av_int2sf
(
int
v
,
int
frac_bits
){
static
inline
SoftFloat
av_int2sf
(
int
v
,
int
frac_bits
){
return
av_normalize_sf
((
SoftFloat
){
ONE_BITS
-
frac_bits
,
v
});
}
...
...
@@ -119,7 +119,7 @@ static inline av_const SoftFloat av_int2sf(int v, int frac_bits){
*
* rounding is to -inf
*/
static
inline
av_const
int
av_sf2int
(
SoftFloat
v
,
int
frac_bits
){
static
inline
int
av_sf2int
(
SoftFloat
v
,
int
frac_bits
){
v
.
exp
+=
frac_bits
-
ONE_BITS
;
if
(
v
.
exp
>=
0
)
return
v
.
mant
<<
v
.
exp
;
else
return
v
.
mant
>>
(
-
v
.
exp
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录