You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
* fixes for broken builds on Solaris, OS2 and all bingendian
systems out there. Originally committed as revision 2480 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
8
configure
vendored
8
configure
vendored
@@ -970,13 +970,7 @@ if test "$bigendian" = "yes" ; then
|
|||||||
echo "#define WORDS_BIGENDIAN 1" >> $TMPH
|
echo "#define WORDS_BIGENDIAN 1" >> $TMPH
|
||||||
fi
|
fi
|
||||||
if test "$emu_fast_int" = "yes" ; then
|
if test "$emu_fast_int" = "yes" ; then
|
||||||
#note, we dont try to emulate fast64
|
echo "#define EMULATE_FAST_INT 1" >> $TMPH
|
||||||
echo "typedef signed char int_fast8_t;" >> $TMPH
|
|
||||||
echo "typedef signed int int_fast16_t;" >> $TMPH
|
|
||||||
echo "typedef signed int int_fast32_t;" >> $TMPH
|
|
||||||
echo "typedef unsigned char uint_fast8_t;" >> $TMPH
|
|
||||||
echo "typedef unsigned int uint_fast16_t;" >> $TMPH
|
|
||||||
echo "typedef unsigned int uint_fast32_t;" >> $TMPH
|
|
||||||
fi
|
fi
|
||||||
if test "$mmx" = "yes" ; then
|
if test "$mmx" = "yes" ; then
|
||||||
echo "TARGET_MMX=yes" >> config.mak
|
echo "TARGET_MMX=yes" >> config.mak
|
||||||
|
|||||||
@@ -82,6 +82,22 @@ extern const struct AVOption avoptions_workaround_bug[11];
|
|||||||
# define always_inline inline
|
# define always_inline inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef EMULATE_FAST_INT
|
||||||
|
/* note that we don't emulate 64bit ints */
|
||||||
|
typedef signed char int_fast8_t;
|
||||||
|
typedef signed int int_fast16_t;
|
||||||
|
typedef signed int int_fast32_t;
|
||||||
|
typedef unsigned char uint_fast8_t;
|
||||||
|
typedef unsigned int uint_fast16_t;
|
||||||
|
typedef unsigned int uint_fast32_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_OS2) || defined(CONFIG_SUNOS)
|
||||||
|
static inline float floorf(float f) {
|
||||||
|
return floor(f);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_WIN32
|
#ifdef CONFIG_WIN32
|
||||||
|
|
||||||
/* windows */
|
/* windows */
|
||||||
|
|||||||
@@ -502,10 +502,4 @@ static inline long int lrintf(float x)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_OS2) || defined(CONFIG_SUNOS)
|
|
||||||
static inline float floorf(float f) {
|
|
||||||
return floor(f);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -915,8 +915,8 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
if (st->codec.extradata_size && (st->codec.bits_per_sample <= 8)) {
|
if (st->codec.extradata_size && (st->codec.bits_per_sample <= 8)) {
|
||||||
st->codec.palctrl = av_mallocz(sizeof(AVPaletteControl));
|
st->codec.palctrl = av_mallocz(sizeof(AVPaletteControl));
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
for (i = 0; i < FFMIN(st->codec.extradata_size / 4, 256); i++)
|
for (i = 0; i < FFMIN(st->codec.extradata_size, AVPALETTE_SIZE)/4; i++)
|
||||||
st->codec.palctrl->palette[i] = bswap_32(st->codec.extradata)[i * 4]);
|
st->codec.palctrl->palette[i] = bswap_32(((uint32_t*)st->codec.extradata)[i]);
|
||||||
#else
|
#else
|
||||||
memcpy(st->codec.palctrl->palette, st->codec.extradata,
|
memcpy(st->codec.palctrl->palette, st->codec.extradata,
|
||||||
FFMIN(st->codec.extradata_size, AVPALETTE_SIZE));
|
FFMIN(st->codec.extradata_size, AVPALETTE_SIZE));
|
||||||
|
|||||||
@@ -249,8 +249,8 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
if (st->codec.extradata_size && (st->codec.bits_per_sample <= 8)) {
|
if (st->codec.extradata_size && (st->codec.bits_per_sample <= 8)) {
|
||||||
st->codec.palctrl = av_mallocz(sizeof(AVPaletteControl));
|
st->codec.palctrl = av_mallocz(sizeof(AVPaletteControl));
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
for (i = 0; i < FFMIN(st->codec.extradata_size / 4, 256); i++)
|
for (i = 0; i < FFMIN(st->codec.extradata_size, AVPALETTE_SIZE)/4; i++)
|
||||||
st->codec.palctrl->palette[i] = bswap_32(st->codec.extradata)[i * 4]);
|
st->codec.palctrl->palette[i] = bswap_32(((uint32_t*)st->codec.extradata)[i]);
|
||||||
#else
|
#else
|
||||||
memcpy(st->codec.palctrl->palette, st->codec.extradata,
|
memcpy(st->codec.palctrl->palette, st->codec.extradata,
|
||||||
FFMIN(st->codec.extradata_size, AVPALETTE_SIZE));
|
FFMIN(st->codec.extradata_size, AVPALETTE_SIZE));
|
||||||
|
|||||||
Reference in New Issue
Block a user