Revision eba9ae3c

View differences:

configure
53 53
echo "  --tune=PROCESSOR         tune code for a particular CPU (may fails or misperforms on other CPUs)"
54 54
echo "  --powerpc-perf-enable    enable performance report on PPC (requires enabling PMC)"
55 55
echo "  --disable-mmx            disable mmx usage"
56
echo "  --disable-iwmmxt         disable iwmmxt usage"
56 57
echo "  --disable-altivec        disable AltiVec usage"
57 58
echo "  --disable-audio-oss      disable OSS audio support [default=no]"
58 59
echo "  --disable-audio-beos     disable BeOS audio support [default=no]"
......
112 113
tune="generic"
113 114
powerpc_perf="no"
114 115
mmx="default"
116
iwmmxt="default"
115 117
altivec="default"
116 118
mmi="default"
117 119
case "$cpu" in
......
403 405

  
404 406
for opt do
405 407
  case "$opt" in
406
  --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
408
  --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes
407 409
  ;;
408
  --libdir=*) libdir=`echo $opt | cut -d '=' -f 2`
410
  --libdir=*) libdir=`echo $opt | cut -d '=' -f 2`; force_libdir=yes
409 411
  ;;
410 412
  --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
411 413
  ;;
......
413 415
  ;;
414 416
  --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
415 417
  ;;
416
  --cc=*) cc=`echo $opt | cut -d '=' -f 2`
418
  --cc=*) cc=`echo $opt | cut -d '=' -f 2-`
417 419
  ;;
418 420
  --make=*) make=`echo $opt | cut -d '=' -f 2`
419 421
  ;;
......
433 435
  ;;
434 436
  --disable-mmx) mmx="no"
435 437
  ;;
438
  --disable-iwmmxt) iwmmxt="no"
439
  ;;
436 440
  --disable-altivec) altivec="no"
437 441
  ;;
438 442
  --enable-gprof) gprof="yes"
......
614 618
    fi
615 619
fi
616 620

  
621
# check iwmmxt support
622
if test $iwmmxt = "default" -a $cpu = "armv4l"; then
623
    cat > $TMPC << EOF
624
        int main(void) { 
625
        __asm__ __volatile__ ("wunpckelub wr6, wr4");
626
        }
627
EOF
628

  
629
    iwmmxt=no
630
    if ${cross_prefix}${cc} -o $TMPO $TMPC 2> /dev/null ; then
631
        iwmmxt=yes
632
    fi
633
fi
634

  
617 635
#Darwin CC versions
618 636
needmdynamicnopic="no"
619 637
if test $targetos = Darwin; then
......
792 810
    SLIBPREF=""
793 811
    SLIBSUF=".dll"
794 812
    EXESUF=".exe"
795
    prefix="/c/Program Files/FFmpeg"
796
    bindir="$prefix"
813
    if test "$force_prefix" != yes; then prefix="/c/Program Files/FFmpeg"; fi
814
    if test "$force_libdir" != yes; then bindir="$prefix"; fi
797 815
fi
798 816

  
799 817
cc="${cross_prefix}${cc}"
......
1144 1162
echo "MMX enabled      $mmx"
1145 1163
echo "Vector Builtins  $builtin_vector"
1146 1164
fi
1165
if test $cpu = "armv4l"; then
1166
echo "IWMMXT enabled   $iwmmxt"
1167
fi
1147 1168
if test $cpu = "mips"; then
1148 1169
echo "MMI enabled      $mmi"
1149 1170
fi
......
1299 1320
  echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
1300 1321
  echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
1301 1322
fi
1323
if test "$iwmmxt" = "yes" ; then
1324
  echo "TARGET_IWMMXT=yes" >> config.mak
1325
  echo "#define HAVE_IWMMXT 1" >> $TMPH
1326
fi
1302 1327
if test "$mmi" = "yes" ; then
1303 1328
  echo "TARGET_MMI=yes" >> config.mak
1304 1329
  echo "#define HAVE_MMI 1" >> $TMPH
libavcodec/armv4l/dsputil_arm.c
240 240
    c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm; //OK
241 241
/*     c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;//NG */
242 242

  
243
#if 1
244 243
#ifdef HAVE_IWMMXT
245 244
    dsputil_init_iwmmxt(c, avctx);
246 245
#endif
247
#endif
248 246
}
libavcodec/armv4l/dsputil_iwmmxt.c
126 126
    return;
127 127
}
128 128

  
129
int mm_flags; /* multimedia extension flags */
130

  
131
int mm_support(void)
132
{
133
    return 0; /* TODO, implement proper detection */
134
}
135

  
129 136
void dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx)
130 137
{
138
    mm_flags = mm_support();
139

  
140
    if (avctx->dsp_mask) {
141
	if (avctx->dsp_mask & FF_MM_FORCE)
142
	    mm_flags |= (avctx->dsp_mask & 0xffff);
143
	else
144
	    mm_flags &= ~(avctx->dsp_mask & 0xffff);
145
    }
146

  
147
    if (!(mm_flags & MM_IWMMXT)) return;
148

  
131 149
    c->add_pixels_clamped = add_pixels_clamped_iwmmxt;
132 150

  
133 151
    c->put_pixels_tab[0][0] = put_pixels16_iwmmxt;
libavcodec/armv4l/mpegvideo_iwmmxt.c
90 90

  
91 91
void MPV_common_init_iwmmxt(MpegEncContext *s)
92 92
{
93
    if (!(mm_flags & MM_IWMMXT)) return;
94

  
93 95
    s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_iwmmxt;
94 96
#if 0
95 97
    s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_iwmmxt;
libavcodec/avcodec.h
17 17

  
18 18
#define FFMPEG_VERSION_INT     0x000409
19 19
#define FFMPEG_VERSION         "0.4.9-pre1"
20
#define LIBAVCODEC_BUILD       4756
20
#define LIBAVCODEC_BUILD       4757
21 21

  
22 22
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
23 23
#define LIBAVCODEC_VERSION     FFMPEG_VERSION
......
1193 1193
#define FF_IDCT_SIMPLEARM    10
1194 1194
#define FF_IDCT_H264         11
1195 1195
#define FF_IDCT_VP3          12
1196
#define FP_IDCT_IPP          13
1196
#define FF_IDCT_IPP          13
1197 1197

  
1198 1198
    /**
1199 1199
     * slice count.
......
1236 1236
#define FF_MM_SSE2	0x0010 /* PIV SSE2 functions */
1237 1237
#define FF_MM_3DNOWEXT	0x0020 /* AMD 3DNowExt */
1238 1238
#endif /* HAVE_MMX */
1239
#ifdef HAVE_IWMMXT
1240
#define FF_MM_IWMMXT	0x0100 /* XScale IWMMXT */
1241
#endif /* HAVE_IWMMXT */
1239 1242

  
1240 1243
    /**
1241 1244
     * bits per sample/pixel from the demuxer (needed for huffyuv).
libavcodec/dsputil.h
432 432
#define __align8 __attribute__ ((aligned (4)))
433 433
#define STRIDE_ALIGN 4
434 434

  
435
#define MM_IWMMXT    0x0100 /* XScale IWMMXT */
436

  
437
extern int mm_flags;
438

  
435 439
void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx);
436 440

  
437 441
#elif defined(HAVE_MLIB)

Also available in: Unified diff