[FFmpeg-devel] [RFC]AIX support

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Jun 29 03:50:32 CEST 2013


Hi!

With attached patch, fate fails on aix for tak and some aac tests, everything 
else works with --disable-shared.

shared library support is missing, I have no idea what to do.

uname -m is "machine ID number of the hardware" on aix, the configure patch is 
from malc (qemu).

I had to rename "AVClass class" because math.h defines "extern int class()" 
for c compilation.

sys/thread.h defines "void thread_init(unsigned long long, unsigned long 
long);" so I renamed thread_init in */pthread.c

FRAMESIZE in ra144 is bad because sys/mstsave.h defines FRAMESIZE as 
_FRAMESIZE.

HZ (used in af_biquads.c) is defined as _HZ in sys/m_param.h, is there a 
better name?

aix assembler does not support local labels, so the current timer.h 
implementation does not work, an alternative is a relative jump afaict, I am 
not sure if I am able to implement that.

Flames, comments?

Carl Eugen
-------------- next part --------------
diff --git a/configure b/configure
index 32473a9..267f82b 100755
--- a/configure
+++ b/configure
@@ -2246,7 +2246,7 @@ yasmexe_default="yasm"
 nogas=":"
 
 # machine
-arch_default=$(uname -m)
+arch_default=`test $(uname -s) = AIX && uname -p || uname -m`
 cpu="generic"
 
 # OS
@@ -3392,6 +3392,8 @@ enabled spic && enable_weak pic
 
 # OS specific
 case $target_os in
+    aix)
+        ;;
     haiku)
         prefix_default="/boot/common"
         network_extralibs="-lnetwork"
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index 2120864..cf004b4 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -168,7 +168,7 @@ static const AVOption options[] = {
     { NULL },
 };
 
-static const AVClass class = {
+static const AVClass cljr_class = {
     .class_name = "cljr encoder",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -185,6 +185,6 @@ AVCodec ff_cljr_encoder = {
     .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
                                                    AV_PIX_FMT_NONE },
     .long_name      = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
-    .priv_class     = &class,
+    .priv_class     = &cljr_class,
 };
 #endif
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 3b11183..0af948e 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -43,7 +43,7 @@ static const AVOption options[]={
 {NULL}
 };
 
-static const AVClass class = {
+static const AVClass dnxhd_class = {
     .class_name = "dnxhd",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -1049,6 +1049,6 @@ AVCodec ff_dnxhd_encoder = {
                                                   AV_PIX_FMT_YUV422P10,
                                                   AV_PIX_FMT_NONE },
     .long_name      = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
-    .priv_class     = &class,
+    .priv_class     = &dnxhd_class,
     .defaults       = dnxhd_defaults,
 };
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 38af768..19c31dc 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -591,7 +591,7 @@ static const AVOption options[] = {
     { "palette", "set the global palette", OFFSET(palette_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, VD },
     { NULL }
 };
-static const AVClass class = {
+static const AVClass dvdsub_class = {
     .class_name = "dvdsubdec",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -606,5 +606,5 @@ AVCodec ff_dvdsub_decoder = {
     .init           = dvdsub_init,
     .decode         = dvdsub_decode,
     .long_name      = NULL_IF_CONFIG_SMALL("DVD subtitles"),
-    .priv_class     = &class,
+    .priv_class     = &dvdsub_class,
 };
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 2e58f95..128eeb2 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1135,7 +1135,7 @@ static const AVOption options[] = {
     { NULL }
 };
 
-static const AVClass class = {
+static const AVClass ffv1_class = {
     .class_name = "ffv1 encoder",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -1169,5 +1169,5 @@ AVCodec ff_ffv1_encoder = {
     },
     .long_name      = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
     .defaults       = ffv1_defaults,
-    .priv_class     = &class,
+    .priv_class     = &ffv1_class,
 };
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 58d0468..7884f36 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -368,7 +368,7 @@ static const AVOption options[] = {
     { NULL },
 };
 
-static const AVClass class = {
+static const AVClass g726_class = {
     .class_name = "g726",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -391,7 +391,7 @@ AVCodec ff_adpcm_g726_encoder = {
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                      AV_SAMPLE_FMT_NONE },
     .long_name      = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
-    .priv_class     = &class,
+    .priv_class     = &g726_class,
     .defaults       = defaults,
 };
 #endif
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index dc976c1..f449b58 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1434,7 +1434,7 @@ static const AVProfile profiles[] = {
     { FF_PROFILE_UNKNOWN },
 };
 
-static const AVClass class = {
+static const AVClass jpeg2000_class = {
     .class_name = "jpeg2000",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -1450,7 +1450,7 @@ AVCodec ff_jpeg2000_decoder = {
     .priv_data_size   = sizeof(Jpeg2000DecoderContext),
     .init_static_data = jpeg2000_init_static_data,
     .decode           = jpeg2000_decode_frame,
-    .priv_class       = &class,
+    .priv_class       = &jpeg2000_class,
     .max_lowres       = 5,
     .profiles         = NULL_IF_CONFIG_SMALL(profiles)
 };
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 7404f87..af3ef2d 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -249,7 +249,7 @@ static int avcodec_thread_execute2(AVCodecContext *avctx, action_func2* func2, v
     return avcodec_thread_execute(avctx, NULL, arg, ret, job_count, 0);
 }
 
-static int thread_init(AVCodecContext *avctx)
+static int avcodec_thread_init(AVCodecContext *avctx)
 {
     int i;
     ThreadContext *c;
@@ -1103,7 +1103,7 @@ int ff_thread_init(AVCodecContext *avctx)
     validate_thread_parameters(avctx);
 
     if (avctx->active_thread_type&FF_THREAD_SLICE)
-        return thread_init(avctx);
+        return avcodec_thread_init(avctx);
     else if (avctx->active_thread_type&FF_THREAD_FRAME)
         return frame_thread_init(avctx);
 
diff --git a/libavcodec/ra144.h b/libavcodec/ra144.h
index 426fea3..5993ebd 100644
--- a/libavcodec/ra144.h
+++ b/libavcodec/ra144.h
@@ -30,7 +30,7 @@
 #define BLOCKSIZE       40      ///< subblock size in 16-bit words
 #define BUFFERSIZE      146     ///< the size of the adaptive codebook
 #define FIXED_CB_SIZE   128     ///< size of fixed codebooks
-#define FRAMESIZE       20      ///< size of encoded frame
+#define RA144_FRAMESIZE  20      ///< size of encoded frame
 #define LPC_ORDER       10      ///< order of LPC filter
 
 typedef struct RA144Context {
diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
index 63f77e0..1c22ede 100644
--- a/libavcodec/ra144dec.c
+++ b/libavcodec/ra144dec.c
@@ -76,7 +76,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data,
     RA144Context *ractx = avctx->priv_data;
     GetBitContext gb;
 
-    if (buf_size < FRAMESIZE) {
+    if (buf_size < RA144_FRAMESIZE) {
         av_log(avctx, AV_LOG_ERROR,
                "Frame too small (%d bytes). Truncated file?\n", buf_size);
         *got_frame_ptr = 0;
@@ -89,7 +89,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data,
         return ret;
     samples = (int16_t *)frame->data[0];
 
-    init_get_bits(&gb, buf, FRAMESIZE * 8);
+    init_get_bits(&gb, buf, RA144_FRAMESIZE * 8);
 
     for (i = 0; i < LPC_ORDER; i++)
         lpc_refl[i] = ff_lpc_refl_cb[i][get_bits(&gb, sizes[i])];
@@ -122,7 +122,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data,
 
     *got_frame_ptr = 1;
 
-    return FRAMESIZE;
+    return RA144_FRAMESIZE;
 }
 
 AVCodec ff_ra_144_decoder = {
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index 2eac343..5533c47 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -447,7 +447,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     if (ractx->last_frame)
         return 0;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, FRAMESIZE)) < 0)
+    if ((ret = ff_alloc_packet2(avctx, avpkt, RA144_FRAMESIZE)) < 0)
         return ret;
 
     /**
@@ -536,7 +536,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     ff_af_queue_remove(&ractx->afq, avctx->frame_size, &avpkt->pts,
                        &avpkt->duration);
 
-    avpkt->size = FRAMESIZE;
+    avpkt->size = RA144_FRAMESIZE;
     *got_packet_ptr = 1;
     return 0;
 }
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index ab3e0c7..4da212f 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -48,7 +48,7 @@ static const AVOption options[]={
 {NULL}
 };
 
-static const AVClass class = {
+static const AVClass rawdec_class = {
     .class_name = "rawdec",
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
@@ -351,5 +351,5 @@ AVCodec ff_rawvideo_decoder = {
     .close          = raw_close_decoder,
     .decode         = raw_decode,
     .long_name      = NULL_IF_CONFIG_SMALL("raw video"),
-    .priv_class     = &class,
+    .priv_class     = &rawdec_class,
 };
diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c
index 0141ffd..fce3837 100644
--- a/libavfilter/af_biquads.c
+++ b/libavfilter/af_biquads.c
@@ -83,7 +83,7 @@ enum FilterType {
 
 enum WidthType {
     NONE,
-    HZ,
+    WIDTH_HZ,
     OCTAVE,
     QFACTOR,
     SLOPE,
@@ -250,7 +250,7 @@ static int config_output(AVFilterLink *outlink)
     case NONE:
         alpha = 0.0;
         break;
-    case HZ:
+    case WIDTH_HZ:
         alpha = sin(w0) / (2 * p->frequency / p->width);
         break;
     case OCTAVE:
@@ -470,8 +470,8 @@ AVFilter avfilter_af_##name_ = {                         \
 static const AVOption equalizer_options[] = {
     {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 999999, FLAGS},
     {"f",         "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
@@ -488,8 +488,8 @@ DEFINE_BIQUAD_FILTER(equalizer, "Apply two-pole peaking equalization (EQ) filter
 static const AVOption bass_options[] = {
     {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS},
     {"f",         "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
@@ -506,8 +506,8 @@ DEFINE_BIQUAD_FILTER(bass, "Boost or cut lower frequencies.");
 static const AVOption treble_options[] = {
     {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
     {"f",         "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
@@ -524,8 +524,8 @@ DEFINE_BIQUAD_FILTER(treble, "Boost or cut upper frequencies.");
 static const AVOption bandpass_options[] = {
     {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
     {"f",         "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
@@ -541,8 +541,8 @@ DEFINE_BIQUAD_FILTER(bandpass, "Apply a two-pole Butterworth band-pass filter.")
 static const AVOption bandreject_options[] = {
     {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
     {"f",         "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
@@ -557,8 +557,8 @@ DEFINE_BIQUAD_FILTER(bandreject, "Apply a two-pole Butterworth band-reject filte
 static const AVOption lowpass_options[] = {
     {"frequency", "set frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=500}, 0, 999999, FLAGS},
     {"f",         "set frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=500}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
@@ -575,8 +575,8 @@ DEFINE_BIQUAD_FILTER(lowpass, "Apply a low-pass filter with 3dB point frequency.
 static const AVOption highpass_options[] = {
     {"frequency", "set frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
     {"f",         "set frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
@@ -593,8 +593,8 @@ DEFINE_BIQUAD_FILTER(highpass, "Apply a high-pass filter with 3dB point frequenc
 static const AVOption allpass_options[] = {
     {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
     {"f",         "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
-    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=HZ}, HZ, SLOPE, FLAGS, "width_type"},
-    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HZ}, 0, 0, FLAGS, "width_type"},
+    {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=WIDTH_HZ}, WIDTH_HZ, SLOPE, FLAGS, "width_type"},
+    {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=WIDTH_HZ}, 0, 0, FLAGS, "width_type"},
     {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
     {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
     {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
diff --git a/libavfilter/pthread.c b/libavfilter/pthread.c
index eb40f00..29faa28 100644
--- a/libavfilter/pthread.c
+++ b/libavfilter/pthread.c
@@ -146,7 +146,7 @@ static int thread_execute(AVFilterContext *ctx, action_func *func,
     return 0;
 }
 
-static int thread_init(ThreadContext *c, int nb_threads)
+static int avfilter_thread_init(ThreadContext *c, int nb_threads)
 {
     int i, ret;
 
@@ -208,7 +208,7 @@ int ff_graph_thread_init(AVFilterGraph *graph)
     if (!graph->internal->thread)
         return AVERROR(ENOMEM);
 
-    ret = thread_init(graph->internal->thread, graph->nb_threads);
+    ret = avfilter_thread_init(graph->internal->thread, graph->nb_threads);
     if (ret <= 1) {
         av_freep(&graph->internal->thread);
         graph->thread_type = 0;
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index d13238f..69e2bee 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -911,7 +911,7 @@ static const AVOption options[] = {
     { NULL }
 };
 
-static const AVClass class = {
+static const AVClass flv_class = {
     .class_name = "flvdec",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -928,5 +928,5 @@ AVInputFormat ff_flv_demuxer = {
     .read_seek      = flv_read_seek,
     .read_close     = flv_read_close,
     .extensions     = "flv",
-    .priv_class     = &class,
+    .priv_class     = &flv_class,
 };
diff --git a/libavformat/gsmdec.c b/libavformat/gsmdec.c
index 9899266..a51822a 100644
--- a/libavformat/gsmdec.c
+++ b/libavformat/gsmdec.c
@@ -80,7 +80,7 @@ static const AVOption options[] = {
     { NULL },
 };
 
-static const AVClass class = {
+static const AVClass gsm_class = {
     .class_name = "gsm demuxer",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -96,5 +96,5 @@ AVInputFormat ff_gsm_demuxer = {
     .flags          = AVFMT_GENERIC_INDEX,
     .extensions     = "gsm",
     .raw_codec_id   = AV_CODEC_ID_GSM,
-    .priv_class     = &class,
+    .priv_class     = &gsm_class,
 };
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 36b17c1..37030a5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3414,7 +3414,7 @@ static const AVOption options[] = {
     {NULL}
 };
 
-static const AVClass class = {
+static const AVClass mov_class = {
     .class_name = "mov,mp4,m4a,3gp,3g2,mj2",
     .item_name  = av_default_item_name,
     .option     = options,
@@ -3430,6 +3430,6 @@ AVInputFormat ff_mov_demuxer = {
     .read_packet    = mov_read_packet,
     .read_close     = mov_read_close,
     .read_seek      = mov_read_seek,
-    .priv_class     = &class,
+    .priv_class     = &mov_class,
     .flags          = AVFMT_NO_BYTE_SEEK,
 };
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index 857c20d..17501f8 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -92,7 +92,7 @@ static const AVOption options[] = {
 { NULL },
 };
 
-static const AVClass class = {
+static const AVClass spdif_class = {
     .class_name     = "spdif",
     .item_name      = av_default_item_name,
     .option         = options,
@@ -552,5 +552,5 @@ AVOutputFormat ff_spdif_muxer = {
     .write_packet      = spdif_write_packet,
     .write_trailer     = spdif_write_trailer,
     .flags             = AVFMT_NOTIMESTAMPS,
-    .priv_class        = &class,
+    .priv_class        = &spdif_class,
 };
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 3abc3e5..9b1458c 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -52,7 +52,7 @@ typedef struct Parser {
     double *var;
 } Parser;
 
-static const AVClass class = { "Eval", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(Parser,log_offset), offsetof(Parser,log_ctx) };
+static const AVClass eval_class = { "Eval", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(Parser,log_offset), offsetof(Parser,log_ctx) };
 
 static const int8_t si_prefixes['z' - 'E' + 1] = {
     ['y'-'E']= -24,
@@ -657,7 +657,7 @@ int av_expr_parse(AVExpr **expr, const char *s,
         if (!av_isspace(*s++)) *wp++ = s[-1];
     *wp++ = 0;
 
-    p.class      = &class;
+    p.class      = &eval_class;
     p.stack_index=100;
     p.s= w;
     p.const_names = const_names;
diff --git a/libavutil/timer.h b/libavutil/timer.h
index 3e242f3..9676065 100644
--- a/libavutil/timer.h
+++ b/libavutil/timer.h
@@ -36,7 +36,7 @@
 #   include "arm/timer.h"
 #elif ARCH_BFIN
 #   include "bfin/timer.h"
-#elif ARCH_PPC
+#elif ARCH_PPC && !defined(_AIX)
 #   include "ppc/timer.h"
 #elif ARCH_X86
 #   include "x86/timer.h"


More information about the ffmpeg-devel mailing list