mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-11-23 03:15:21 +01:00
fix ffmpeg header file
This commit is contained in:
parent
7814c6514f
commit
067fe3c18a
32
TMessagesProj/jni/ffmpeg_mathops_fix.h
Normal file
32
TMessagesProj/jni/ffmpeg_mathops_fix.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef FFMPEG_MATHOPS_FIX_H
|
||||
#define FFMPEG_MATHOPS_FIX_H
|
||||
|
||||
#ifndef NEG_USR32
|
||||
# define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s)))
|
||||
#endif
|
||||
|
||||
#ifndef NEG_SSR32
|
||||
# define NEG_SSR32(a,s) ((( int32_t)(a))>>(32-(s)))
|
||||
#endif
|
||||
|
||||
#ifndef sign_extend
|
||||
static inline av_const int sign_extend(int val, unsigned bits)
|
||||
{
|
||||
unsigned shift = 8 * sizeof(int) - bits;
|
||||
union { unsigned u; int s; } v = { (unsigned) val << shift };
|
||||
return v.s >> shift;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef zero_extend
|
||||
static inline av_const unsigned zero_extend(unsigned val, unsigned bits)
|
||||
{
|
||||
return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SUINT
|
||||
#define SUINT unsigned
|
||||
#endif
|
||||
|
||||
#endif
|
@ -4,11 +4,26 @@ set -e
|
||||
|
||||
patch -d ffmpeg -p1 < patches/ffmpeg/0001-compilation-magic.patch
|
||||
|
||||
cp ffmpeg/libavformat/dv.h ffmpeg/build/arm64-v8a/include/libavformat/dv.h
|
||||
cp ffmpeg/libavformat/isom.h ffmpeg/build/arm64-v8a/include/libavformat/isom.h
|
||||
cp ffmpeg/libavformat/dv.h ffmpeg/build/armeabi-v7a/include/libavformat/dv.h
|
||||
cp ffmpeg/libavformat/isom.h ffmpeg/build/armeabi-v7a/include/libavformat/isom.h
|
||||
cp ffmpeg/libavformat/dv.h ffmpeg/build/x86/include/libavformat/dv.h
|
||||
cp ffmpeg/libavformat/isom.h ffmpeg/build/x86/include/libavformat/isom.h
|
||||
cp ffmpeg/libavformat/dv.h ffmpeg/build/x86_64/include/libavformat/dv.h
|
||||
cp ffmpeg/libavformat/isom.h ffmpeg/build/x86_64/include/libavformat/isom.h
|
||||
libavformat=('dv.h' 'isom.h')
|
||||
libavcodec=('bytestream.h' 'get_bits.h' 'put_bits.h' 'golomb.h' 'vlc.h')
|
||||
libavutil=('intmath.h' 'reverse.h')
|
||||
|
||||
for arch in arm64-v8a armeabi-v7a x86 x86_64
|
||||
do
|
||||
for file in ${libavformat[*]}
|
||||
do
|
||||
cp ffmpeg/libavformat/"$file" ffmpeg/build/$arch/include/libavformat/"$file"
|
||||
done
|
||||
|
||||
# fix DrKLo's mystery include since 7.8.0
|
||||
for file in ${libavcodec[*]}
|
||||
do
|
||||
cp ffmpeg/libavcodec/"$file" ffmpeg/build/$arch/include/libavcodec/"$file"
|
||||
done
|
||||
for file in ${libavutil[*]}
|
||||
do
|
||||
cp ffmpeg/libavutil/"$file" ffmpeg/build/$arch/include/libavutil/"$file"
|
||||
done
|
||||
cp ffmpeg_mathops_fix.h ffmpeg/build/$arch/include/libavcodec/ffmpeg_mathops_fix.h
|
||||
sed -i 's/mathops/ffmpeg_mathops_fix/g' ffmpeg/build/$arch/include/libavcodec/get_bits.h
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user