[FFmpeg-devel] [PATCH]: Video Decoder Acceleration (VDA) HWAccel module for Mac OS X

Hanspeter Niederstrasser niederstrasser at gmail.com
Thu Nov 3 14:39:35 CET 2011


Fresh git pull and this fails to build on OS X 10.7.2:

clang -dynamiclib -Wl,-single_module
-Wl,-install_name,/usr/local/ffmpeg-git/lib/libavcodec.dylib,-current_version,53.27.0,-compatibility_version,53
-Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil
-Llibpostproc -Llibswscale -Llibswresample
-Wl,-dynamic,-search_paths_first -o libavcodec/libavcodec.53.dylib
libavcodec/4xm.o libavcodec/8bps.o libavcodec/8svx.o
libavcodec/a64multienc.o libavcodec/aac_ac3_parser.o
libavcodec/aac_adtstoasc_bsf.o libavcodec/aac_parser.o
libavcodec/aacadtsdec.o libavcodec/aaccoder.o libavcodec/aacdec.o
libavcodec/aacenc.o libavcodec/aacps.o libavcodec/aacpsy.o
libavcodec/aacsbr.o libavcodec/aactab.o libavcodec/aandcttab.o
libavcodec/aasc.o libavcodec/ac3.o libavcodec/ac3_parser.o
libavcodec/ac3dec.o libavcodec/ac3dec_data.o libavcodec/ac3dsp.o
libavcodec/ac3enc.o libavcodec/ac3enc_fixed.o
libavcodec/ac3enc_float.o libavcodec/ac3tab.o
libavcodec/acelp_filters.o libavcodec/acelp_pitch_delay.o
libavcodec/acelp_vectors.o libavcodec/adpcm.o libavcodec/adpcm_data.o
libavcodec/adpcmenc.o libavcodec/adxdec.o libavcodec/adxenc.o
libavcodec/alac.o libavcodec/alacenc.o libavcodec/allcodecs.o
libavcodec/alsdec.o libavcodec/amrnbdec.o libavcodec/amrwbdec.o
libavcodec/anm.o libavcodec/ansi.o libavcodec/apedec.o
libavcodec/ass.o libavcodec/ass_split.o libavcodec/assdec.o
libavcodec/assenc.o libavcodec/asv1.o libavcodec/atrac.o
libavcodec/atrac1.o libavcodec/atrac3.o libavcodec/audioconvert.o
libavcodec/aura.o libavcodec/avfft.o libavcodec/avpacket.o
libavcodec/avs.o libavcodec/bethsoftvideo.o libavcodec/bfi.o
libavcodec/bgmc.o libavcodec/bink.o libavcodec/binkaudio.o
libavcodec/binkdsp.o libavcodec/bintext.o libavcodec/bitstream.o
libavcodec/bitstream_filter.o libavcodec/bmp.o libavcodec/bmpenc.o
libavcodec/c93.o libavcodec/cabac.o libavcodec/cavs.o
libavcodec/cavs_parser.o libavcodec/cavsdec.o libavcodec/cavsdsp.o
libavcodec/cdgraphics.o libavcodec/celp_filters.o
libavcodec/celp_math.o libavcodec/cga_data.o libavcodec/chomp_bsf.o
libavcodec/cinepak.o libavcodec/cljr.o libavcodec/cook.o
libavcodec/cscd.o libavcodec/cyuv.o libavcodec/dca.o
libavcodec/dca_parser.o libavcodec/dcadsp.o libavcodec/dcaenc.o
libavcodec/dct.o libavcodec/dct32_fixed.o libavcodec/dct32_float.o
libavcodec/dfa.o libavcodec/dirac.o libavcodec/dirac_arith.o
libavcodec/dirac_parser.o libavcodec/diracdec.o libavcodec/diracdsp.o
libavcodec/dnxhd_parser.o libavcodec/dnxhddata.o libavcodec/dnxhddec.o
libavcodec/dnxhdenc.o libavcodec/dpcm.o libavcodec/dpx.o
libavcodec/dpxenc.o libavcodec/dsicinav.o libavcodec/dsputil.o
libavcodec/dump_extradata_bsf.o libavcodec/dv.o libavcodec/dvbsub.o
libavcodec/dvbsub_parser.o libavcodec/dvbsubdec.o libavcodec/dvdata.o
libavcodec/dvdsub_parser.o libavcodec/dvdsubdec.o
libavcodec/dvdsubenc.o libavcodec/dwt.o libavcodec/dxa.o
libavcodec/eac3_data.o libavcodec/eac3dec.o libavcodec/eac3enc.o
libavcodec/eacmv.o libavcodec/eaidct.o libavcodec/eamad.o
libavcodec/eatgq.o libavcodec/eatgv.o libavcodec/eatqi.o
libavcodec/elbg.o libavcodec/error_resilience.o libavcodec/escape124.o
libavcodec/faandct.o libavcodec/faanidct.o libavcodec/faxcompr.o
libavcodec/fft_fixed.o libavcodec/fft_float.o libavcodec/ffv1.o
libavcodec/flac.o libavcodec/flac_parser.o libavcodec/flacdata.o
libavcodec/flacdec.o libavcodec/flacenc.o libavcodec/flashsv.o
libavcodec/flashsv2enc.o libavcodec/flashsvenc.o
libavcodec/flicvideo.o libavcodec/flvdec.o libavcodec/flvenc.o
libavcodec/fmtconvert.o libavcodec/fraps.o libavcodec/frwu.o
libavcodec/g722.o libavcodec/g722dec.o libavcodec/g722enc.o
libavcodec/g723_1.o libavcodec/g726.o libavcodec/g729dec.o
libavcodec/g729postfilter.o libavcodec/gif.o libavcodec/gifdec.o
libavcodec/golomb.o libavcodec/gsmdec.o libavcodec/gsmdec_data.o
libavcodec/h261.o libavcodec/h261_parser.o libavcodec/h261dec.o
libavcodec/h261enc.o libavcodec/h263.o libavcodec/h263_parser.o
libavcodec/h263dec.o libavcodec/h264.o libavcodec/h264_cabac.o
libavcodec/h264_cavlc.o libavcodec/h264_direct.o
libavcodec/h264_loopfilter.o libavcodec/h264_mp4toannexb_bsf.o
libavcodec/h264_parser.o libavcodec/h264_ps.o libavcodec/h264_refs.o
libavcodec/h264_sei.o libavcodec/h264dsp.o libavcodec/h264idct.o
libavcodec/h264pred.o libavcodec/huffman.o libavcodec/huffyuv.o
libavcodec/idcinvideo.o libavcodec/iff.o libavcodec/iirfilter.o
libavcodec/imc.o libavcodec/imgconvert.o
libavcodec/imx_dump_header_bsf.o libavcodec/indeo2.o
libavcodec/indeo3.o libavcodec/indeo5.o libavcodec/intelh263dec.o
libavcodec/interplayvideo.o libavcodec/intrax8.o
libavcodec/intrax8dsp.o libavcodec/inverse.o libavcodec/ituh263dec.o
libavcodec/ituh263enc.o libavcodec/ivi_common.o libavcodec/ivi_dsp.o
libavcodec/j2k.o libavcodec/j2k_dwt.o libavcodec/j2kdec.o
libavcodec/j2kenc.o libavcodec/jfdctfst.o libavcodec/jfdctint.o
libavcodec/jpegls.o libavcodec/jpeglsdec.o libavcodec/jpeglsenc.o
libavcodec/jrevdct.o libavcodec/jvdec.o libavcodec/kbdwin.o
libavcodec/kgv1dec.o libavcodec/kmvc.o libavcodec/lagarith.o
libavcodec/lagarithrac.o libavcodec/latm_parser.o libavcodec/lcldec.o
libavcodec/lclenc.o libavcodec/libcelt_dec.o
libavcodec/libdirac_libschro.o libavcodec/libdiracenc.o
libavcodec/libmp3lame.o libavcodec/libopencore-amr.o
libavcodec/libopenjpeg.o libavcodec/libschroedinger.o
libavcodec/libschroedingerdec.o libavcodec/libschroedingerenc.o
libavcodec/libspeexdec.o libavcodec/libspeexenc.o
libavcodec/libtheoraenc.o libavcodec/libvorbis.o
libavcodec/libvpxdec.o libavcodec/libvpxenc.o libavcodec/libx264.o
libavcodec/libxvid_rc.o libavcodec/libxvidff.o libavcodec/ljpegenc.o
libavcodec/loco.o libavcodec/lpc.o libavcodec/lsp.o libavcodec/lzw.o
libavcodec/lzwenc.o libavcodec/mace.o libavcodec/mdct_fixed.o
libavcodec/mdct_float.o libavcodec/mdec.o libavcodec/mimic.o
libavcodec/mjpeg.o libavcodec/mjpeg2jpeg_bsf.o
libavcodec/mjpeg_parser.o libavcodec/mjpega_dump_header_bsf.o
libavcodec/mjpegbdec.o libavcodec/mjpegdec.o libavcodec/mjpegenc.o
libavcodec/mlp.o libavcodec/mlp_parser.o libavcodec/mlpdec.o
libavcodec/mlpdsp.o libavcodec/mmvideo.o libavcodec/motion_est.o
libavcodec/motionpixels.o libavcodec/movsub_bsf.o
libavcodec/mp3_header_compress_bsf.o
libavcodec/mp3_header_decompress_bsf.o libavcodec/mpc.o
libavcodec/mpc7.o libavcodec/mpc8.o libavcodec/mpeg12.o
libavcodec/mpeg12data.o libavcodec/mpeg12enc.o libavcodec/mpeg4audio.o
libavcodec/mpeg4video.o libavcodec/mpeg4video_parser.o
libavcodec/mpeg4videodec.o libavcodec/mpeg4videoenc.o
libavcodec/mpegaudio.o libavcodec/mpegaudio_parser.o
libavcodec/mpegaudiodata.o libavcodec/mpegaudiodec.o
libavcodec/mpegaudiodec_float.o libavcodec/mpegaudiodecheader.o
libavcodec/mpegaudiodsp.o libavcodec/mpegaudiodsp_fixed.o
libavcodec/mpegaudiodsp_float.o libavcodec/mpegaudioenc.o
libavcodec/mpegvideo.o libavcodec/mpegvideo_enc.o
libavcodec/mpegvideo_parser.o libavcodec/mpegvideo_xvmc.o
libavcodec/mqc.o libavcodec/mqcdec.o libavcodec/mqcenc.o
libavcodec/msgsmdec.o libavcodec/msmpeg4.o libavcodec/msmpeg4data.o
libavcodec/msrle.o libavcodec/msrledec.o libavcodec/msvideo1.o
libavcodec/msvideo1enc.o libavcodec/mxpegdec.o libavcodec/nellymoser.o
libavcodec/nellymoserdec.o libavcodec/nellymoserenc.o
libavcodec/noise_bsf.o libavcodec/nuv.o libavcodec/options.o
libavcodec/pamenc.o libavcodec/parser.o libavcodec/pcm-mpeg.o
libavcodec/pcm.o libavcodec/pcx.o libavcodec/pcxenc.o
libavcodec/pgssubdec.o libavcodec/pictordec.o libavcodec/png.o
libavcodec/pngdec.o libavcodec/pngenc.o libavcodec/pnm.o
libavcodec/pnm_parser.o libavcodec/pnmdec.o libavcodec/pnmenc.o
libavcodec/proresdec2.o libavcodec/proresdec_lgpl.o
libavcodec/proresdsp.o libavcodec/proresenc.o libavcodec/psymodel.o
libavcodec/pthread.o libavcodec/ptx.o libavcodec/qcelpdec.o
libavcodec/qdm2.o libavcodec/qdrw.o libavcodec/qpeg.o
libavcodec/qtrle.o libavcodec/qtrleenc.o libavcodec/r210dec.o
libavcodec/ra144.o libavcodec/ra144dec.o libavcodec/ra144enc.o
libavcodec/ra288.o libavcodec/rangecoder.o libavcodec/ratecontrol.o
libavcodec/raw.o libavcodec/rawdec.o libavcodec/rawenc.o
libavcodec/rdft.o libavcodec/remove_extradata_bsf.o
libavcodec/resample.o libavcodec/resample2.o libavcodec/rl2.o
libavcodec/rle.o libavcodec/roqaudioenc.o libavcodec/roqvideo.o
libavcodec/roqvideodec.o libavcodec/roqvideoenc.o libavcodec/rpza.o
libavcodec/rtjpeg.o libavcodec/rv10.o libavcodec/rv10enc.o
libavcodec/rv20enc.o libavcodec/rv30.o libavcodec/rv30dsp.o
libavcodec/rv34.o libavcodec/rv34_parser.o libavcodec/rv34dsp.o
libavcodec/rv40.o libavcodec/rv40dsp.o libavcodec/s302m.o
libavcodec/s3tc.o libavcodec/sgidec.o libavcodec/sgienc.o
libavcodec/shorten.o libavcodec/simple_idct.o libavcodec/sinewin.o
libavcodec/sipr.o libavcodec/sipr16k.o libavcodec/smacker.o
libavcodec/smc.o libavcodec/snow.o libavcodec/sonic.o
libavcodec/sp5xdec.o libavcodec/srtdec.o libavcodec/srtenc.o
libavcodec/sunrast.o libavcodec/svq1.o libavcodec/svq1dec.o
libavcodec/svq1enc.o libavcodec/svq3.o libavcodec/synth_filter.o
libavcodec/targa.o libavcodec/targaenc.o libavcodec/tiertexseqv.o
libavcodec/tiff.o libavcodec/tiffenc.o libavcodec/timecode.o
libavcodec/tmv.o libavcodec/truemotion1.o libavcodec/truemotion2.o
libavcodec/truespeech.o libavcodec/tscc.o libavcodec/tta.o
libavcodec/twinvq.o libavcodec/txd.o libavcodec/ulti.o
libavcodec/utils.o libavcodec/utvideo.o libavcodec/v210dec.o
libavcodec/v210enc.o libavcodec/v210x.o libavcodec/vb.o
libavcodec/vc1.o libavcodec/vc1_parser.o libavcodec/vc1data.o
libavcodec/vc1dec.o libavcodec/vc1dsp.o libavcodec/vcr1.o
libavcodec/vda.o libavcodec/vda_h264.o libavcodec/vmdav.o
libavcodec/vmnc.o libavcodec/vorbis.o libavcodec/vorbis_data.o
libavcodec/vorbisdec.o libavcodec/vorbisenc.o libavcodec/vp3.o
libavcodec/vp3_parser.o libavcodec/vp3dsp.o libavcodec/vp5.o
libavcodec/vp56.o libavcodec/vp56data.o libavcodec/vp56dsp.o
libavcodec/vp56rac.o libavcodec/vp6.o libavcodec/vp6dsp.o
libavcodec/vp8.o libavcodec/vp8_parser.o libavcodec/vp8dsp.o
libavcodec/vqavideo.o libavcodec/wavpack.o libavcodec/wma.o
libavcodec/wmadec.o libavcodec/wmaenc.o libavcodec/wmalosslessdec.o
libavcodec/wmaprodec.o libavcodec/wmavoice.o libavcodec/wmv2.o
libavcodec/wmv2dec.o libavcodec/wmv2enc.o libavcodec/wnv1.o
libavcodec/ws-snd1.o libavcodec/x86/ac3dsp.o
libavcodec/x86/ac3dsp_mmx.o libavcodec/x86/cavsdsp_mmx.o
libavcodec/x86/dct32_sse.o libavcodec/x86/deinterlace.o
libavcodec/x86/diracdsp_mmx.o libavcodec/x86/diracdsp_yasm.o
libavcodec/x86/dnxhd_mmx.o libavcodec/x86/dsputil_mmx.o
libavcodec/x86/dsputil_yasm.o libavcodec/x86/dsputilenc_mmx.o
libavcodec/x86/dsputilenc_yasm.o libavcodec/x86/dwt.o
libavcodec/x86/dwt_yasm.o libavcodec/x86/fdct_mmx.o
libavcodec/x86/fft.o libavcodec/x86/fft_3dn.o
libavcodec/x86/fft_3dn2.o libavcodec/x86/fft_mmx.o
libavcodec/x86/fft_sse.o libavcodec/x86/fmtconvert.o
libavcodec/x86/fmtconvert_mmx.o libavcodec/x86/h264_chromamc.o
libavcodec/x86/h264_chromamc_10bit.o libavcodec/x86/h264_deblock.o
libavcodec/x86/h264_deblock_10bit.o libavcodec/x86/h264_idct.o
libavcodec/x86/h264_idct_10bit.o libavcodec/x86/h264_intrapred.o
libavcodec/x86/h264_intrapred_10bit.o
libavcodec/x86/h264_intrapred_init.o libavcodec/x86/h264_qpel_10bit.o
libavcodec/x86/h264_weight.o libavcodec/x86/h264_weight_10bit.o
libavcodec/x86/h264dsp_mmx.o libavcodec/x86/idct_mmx.o
libavcodec/x86/idct_mmx_xvid.o libavcodec/x86/idct_sse2_xvid.o
libavcodec/x86/lpc_mmx.o libavcodec/x86/mlpdsp.o
libavcodec/x86/motion_est_mmx.o libavcodec/x86/mpegaudiodec_mmx.o
libavcodec/x86/mpegvideo_mmx.o libavcodec/x86/png_mmx.o
libavcodec/x86/proresdsp-init.o libavcodec/x86/proresdsp.o
libavcodec/x86/rv40dsp.o libavcodec/x86/simple_idct_mmx.o
libavcodec/x86/snowdsp_mmx.o libavcodec/x86/v210-init.o
libavcodec/x86/v210.o libavcodec/x86/vc1dsp_mmx.o
libavcodec/x86/vc1dsp_yasm.o libavcodec/x86/vp3dsp.o
libavcodec/x86/vp56dsp.o libavcodec/x86/vp56dsp_init.o
libavcodec/x86/vp8dsp-init.o libavcodec/x86/vp8dsp.o libavcodec/xan.o
libavcodec/xiph.o libavcodec/xl.o libavcodec/xsubdec.o
libavcodec/xsubenc.o libavcodec/xxan.o libavcodec/yop.o
libavcodec/zmbv.o libavcodec/zmbvenc.o -lavutil -lX11 -lXext -lXfixes
-lcdio_paranoia -lcdio_cdda -lcdio -L/sw/lib -Wl,-framework,Cocoa
-lSDLmain -lSDL -lxvidcore -lx264 -lvpx -lvpx -lvorbisenc -lvorbis
-logg -ltheoraenc -ltheoradec -logg -lspeex -L/sw/lib
-lschroedinger-1.0 -lpthread -loil-0.3 -L/sw/lib -lrtmp -lssl -lcrypto
-lz -lopenjpeg -L/sw/lib -lopencv_core -lopencv_imgproc
-lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d
-lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy
-lopencv_flann -lopencore-amrwb -lopencore-amrnb -lmp3lame -lmodplug
-L/sw/lib -lfreetype -L/sw/lib -ldirac_encoder -ldirac_decoder -lm
-lstdc++ -lcelt0 -lm -lbz2 -lz -L/sw/lib -L/usr/X11/lib
Undefined symbols for architecture x86_64:
  "_kVDADecoderConfiguration_Height", referenced from:
      _ff_vda_create_decoder in vda.o
  "_kVDADecoderConfiguration_Width", referenced from:
      _ff_vda_create_decoder in vda.o
  "_kVDADecoderConfiguration_SourceFormat", referenced from:
      _ff_vda_create_decoder in vda.o
  "_kVDADecoderConfiguration_avcCData", referenced from:
      _ff_vda_create_decoder in vda.o
  "_VDADecoderCreate", referenced from:
      _ff_vda_create_decoder in vda.o
  "_CVPixelBufferGetPixelFormatType", referenced from:
      _vda_decoder_callback in vda.o
  "_CVPixelBufferRetain", referenced from:
      _vda_decoder_callback in vda.o
  "_VDADecoderDestroy", referenced from:
      _ff_vda_destroy_decoder in vda.o
  "_CVPixelBufferRelease", referenced from:
      _ff_vda_destroy_decoder in vda.o
      _ff_vda_release_vda_frame in vda.o
  "_VDADecoderDecode", referenced from:
      _ff_vda_decoder_decode in vda.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libavcodec/libavcodec.53.dylib] Error 1

Manually adding "-framework CoreFoundation -framework
VideoDecodeAcceleration -framework QuartzCore" (copied from configure)
to the linker command successfully builds libavcodec.dylib.  My
configure line is:

../configure --prefix=/usr/local/ffmpeg-git --enable-shared
--disable-static --enable-gpl --enable-version3 --enable-pthreads
--enable-x11grab --enable-bzlib --enable-libcelt --enable-frei0r
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopencv --enable-libcdio --enable-libdirac
--enable-libfreetype --enable-libmodplug --enable-libmp3lame
--enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxvid --enable-zlib
--extra-cflags='-I/sw/include -I/usr/X11/include'
--extra-libs='-L/sw/lib -L/usr/X11/lib' --cc=clang

and the output from configure says:

Enabled hwaccels:
h264_vda

Hanspeter

-- 
Disclaimer:
By sending an email to ANY of my addresses you are agreeing that:
1. I am by definition, "the intended recipient"
2. All information in the email is mine to do with as I see fit and
make such financial profit, political mileage, or good joke as it
lends itself to.
3. I may take the contents as representing the views of your company.
4. This overrides any disclaimer or statement of confidentiality that
may be included with your message.


More information about the ffmpeg-devel mailing list