summaryrefslogtreecommitdiff
authorStephen Hutchinson <qyot27@gmail.com>2013-10-28 20:52:46 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-10-28 21:26:14 (GMT)
commitd10d60be6882357115c4b6a481e38ca1d649ee4e (patch)
treeae9dd1725269abfad70923c23ad28829a81fd46c
parent2c18bfe6af847eb01ad37a690ba39617b712b3d9 (diff)
downloadffmpeg-d10d60be6882357115c4b6a481e38ca1d649ee4e.zip
ffmpeg-d10d60be6882357115c4b6a481e38ca1d649ee4e.tar.gz
ffmpeg-d10d60be6882357115c4b6a481e38ca1d649ee4e.tar.bz2
avisynth: Compact AvxSynth's avoidance of 2.6's colorspaces.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libavformat/avisynth.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index 60f627b..04f9389 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -54,14 +54,6 @@
#define FreeLibrary dlclose
#endif
-// AvxSynth doesn't have these colorspaces, so disable them
-#ifndef _WIN32
-#define avs_is_yv24(vi) 0
-#define avs_is_yv16(vi) 0
-#define avs_is_yv411(vi) 0
-#define avs_is_y8(vi) 0
-#endif
-
typedef struct {
void *library;
#define AVSC_DECLARE_FUNC(name) name ## _func name
@@ -458,7 +450,11 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt,
pkt->dts = n;
pkt->duration = 1;
- // Define the bpp values for the new AviSynth 2.6 colorspaces
+#ifdef USING_AVISYNTH
+ /* Define the bpp values for the new AviSynth 2.6 colorspaces.
+ * Since AvxSynth doesn't have these functions, special-case
+ * it in order to avoid implicit declaration errors. */
+
if (avs_is_yv24(avs->vi))
bits = 24;
else if (avs_is_yv16(avs->vi))
@@ -468,6 +464,7 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt,
else if (avs_is_y8(avs->vi))
bits = 8;
else
+#endif
bits = avs_bits_per_pixel(avs->vi);
/* Without the cast to int64_t, calculation overflows at about 9k x 9k