diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-09-27 10:27:57 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-09-27 10:27:57 +0000 |
commit | 202ef8b8196a107df242b29ebee8cbbd72549057 (patch) | |
tree | 5f6ac42c30e27ed2a3307c6c79f7f3c159267ec9 /libavcodec/common.h | |
parent | 0c2dd16eb65bb0ade97346aabecc4762f6bcac31 (diff) | |
download | ffmpeg-202ef8b8196a107df242b29ebee8cbbd72549057.tar.gz |
ff_get_fourcc() & XVIX support
Originally committed as revision 975 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.h')
-rw-r--r-- | libavcodec/common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h index c3010896e9..9fce80f8a1 100644 --- a/libavcodec/common.h +++ b/libavcodec/common.h @@ -922,6 +922,16 @@ static inline int ff_sqrt(int a) } return ret; } + +/** + * converts fourcc string to int + */ +static inline int ff_get_fourcc(char *s){ + assert( strlen(s)==4 ); + + return (s[0]) + (s[1]<<8) + (s[2]<<16) + (s[3]<<24); +} + #if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT) #define COPY3_IF_LT(x,y,a,b,c,d)\ asm volatile (\ |