Browse Source

Merge branch 'master' into oldabi

* master: (403 commits)
  Initial caf muxer.
  Support decoding of amr_nb and gsm in caf.
  Fix decoding of msrle samples with 1bpp.
  udp: remove resource.h inclusion, it breaks mingw compilation.
  ffmpeg: Allow seting and cycling through debug modes.
  Fix FSF address copy paste error in some license headers.
  Add an aac sample which uses LTP to fate-aac.
  ffmpeg: Help for interactive keys.
  UDP: dont use thread_t as truth value.
  swscale: fix compile on mingw32
  [PATCH] Update pixdesc_be fate refs after adding 9/10bit YUV420P formats.
  arm: properly mark external symbol call
  ffmpeg: Interactivity support. Try pressing +-hs.
  swscale: 10l forgot git add this change from ronald.
  AVFrame: only set parameters from AVCodecContext in decode_video*() when no frame reordering is used.
  avcodec_default_get_buffer: init picture parameters.
  swscale: properly inline bits/endianness in yuv2yuvX16inC().
  swscale: fix clipping of 9/10bit YUV420P.
  Add av_clip_uintp2() function
  Support more QT 1bpp rawvideo files.
  ...

Conflicts:
	libavcodec/flacenc.c
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/mpeg12.c
	libavcodec/msrle.c
	libavcodec/options.c
	libavcodec/qpeg.c
	libavcodec/rv34.c
	libavcodec/svq1dec.c
	libavcodec/svq3.c
	libavcodec/vc1dec.c
	libavcodec/version.h
	libavfilter/avfilter.h
	libavformat/file.c
	libavformat/options.c
	libavformat/rtpproto.c
	libavformat/udp.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 14 years ago
parent
commit
d46aada5c2
10 changed files with 114 additions and 33 deletions
  1. 3 0
      Changelog
  2. 5 1
      Makefile
  3. 4 1
      cmdutils.c
  4. 2 1
      cmdutils.h
  5. 34 19
      configure
  6. 33 3
      doc/APIchanges
  7. 0 1
      doc/avutil.txt
  8. 17 7
      doc/developer.texi
  9. 12 0
      doc/encoders.texi
  10. 4 0
      doc/eval.texi

+ 3 - 0
Changelog

@@ -12,6 +12,9 @@ version <next>:
 - Lots of deprecated API cruft removed
 - fft and imdct optimizations for AVX (Sandy Bridge) processors
 - showinfo filter added
+- DPX image encoder
+- SMPTE 302M AES3 audio decoder
+- Apple Core Audio Format muxer
 
 
 version 0.7_beta1:

+ 5 - 1
Makefile

@@ -280,9 +280,13 @@ fate-seek:   $(FATE_SEEK)
 
 ifdef SAMPLES
 FATE += $(FATE_TESTS)
+fate-rsync:
+	rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
 else
+fate-rsync:
+	@echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
 $(FATE_TESTS):
-	@echo "SAMPLES not specified, cannot run FATE"
+	@echo "SAMPLES not specified, cannot run FATE. See doc/fate.txt for more information."
 endif
 
 FATE_UTILS = base64 tiny_psnr

+ 4 - 1
cmdutils.c

@@ -84,6 +84,7 @@ void uninit_opts(void)
     }
     av_freep(&opt_names);
     av_freep(&opt_values);
+    opt_name_count = 0;
 }
 
 void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
@@ -434,7 +435,7 @@ void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec)
         const char *str;
         if (priv_ctx) {
             if (av_find_opt(priv_ctx, opt_names[i], NULL, flags, flags)) {
-                if (av_set_string3(priv_ctx, opt_names[i], opt_values[i], 0, NULL) < 0) {
+                if (av_set_string3(priv_ctx, opt_names[i], opt_values[i], 1, NULL) < 0) {
                     fprintf(stderr, "Invalid value '%s' for option '%s'\n",
                             opt_names[i], opt_values[i]);
                     exit(1);
@@ -907,10 +908,12 @@ int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame,
 
     memcpy(frame->data,     picref->data,     sizeof(frame->data));
     memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize));
+    frame->pkt_pos          = picref->pos;
     frame->interlaced_frame = picref->video->interlaced;
     frame->top_field_first  = picref->video->top_field_first;
     frame->key_frame        = picref->video->key_frame;
     frame->pict_type        = picref->video->pict_type;
+    frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;
 
     return 1;
 }

+ 2 - 1
cmdutils.h

@@ -122,7 +122,8 @@ typedef struct {
 #define OPT_FUNC2  0x0400
 #define OPT_INT64  0x0800
 #define OPT_EXIT   0x1000
-#define OPT_DUMMY  0x2000
+#define OPT_DATA   0x2000
+#define OPT_DUMMY  0x4000
      union {
         void (*func_arg)(const char *); //FIXME passing error code as int return would be nicer then exit() in the func
         int *int_arg;

+ 34 - 19
configure

@@ -88,13 +88,12 @@ Configuration options:
   --disable-avcodec        disable libavcodec build
   --disable-avformat       disable libavformat build
   --disable-swscale        disable libswscale build
-  --enable-postproc        enable GPLed postprocessing support [no]
+  --disable-postproc       disable libpostproc build
   --disable-avfilter       disable video filter support [no]
   --disable-pthreads       disable pthreads [auto]
   --enable-w32threads      use Win32 threads [no]
   --enable-x11grab         enable X11 grabbing [no]
   --disable-network        disable network support [no]
-  --disable-mpegaudio-hp   faster (but less accurate) MPEG audio decoding [no]
   --enable-gray            enable full grayscale support (slower color)
   --disable-swscale-alpha  disable alpha channel support in swscale
   --disable-fastdiv        disable table-based division
@@ -761,7 +760,7 @@ check_pkg_config(){
     headers="$2"
     funcs="$3"
     shift 3
-    $pkg_config --exists $pkg || return
+    $pkg_config --exists $pkg 2>/dev/null || return
     pkg_cflags=$($pkg_config --cflags $pkg)
     pkg_libs=$($pkg_config --libs $pkg)
     check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
@@ -957,7 +956,6 @@ CONFIG_LIST="
     mdct
     memalign_hack
     mlib
-    mpegaudio_hp
     network
     nonfree
     pic
@@ -1252,14 +1250,14 @@ aac_encoder_select="mdct sinewin"
 aac_latm_decoder_select="aac_decoder aac_latm_parser"
 ac3_decoder_select="mdct ac3dsp ac3_parser"
 ac3_encoder_select="mdct ac3dsp"
-ac3_fixed_encoder_select="ac3dsp"
+ac3_fixed_encoder_select="mdct ac3dsp"
 alac_encoder_select="lpc"
 amrnb_decoder_select="lsp"
 amrwb_decoder_select="lsp"
 atrac1_decoder_select="mdct sinewin"
 atrac3_decoder_select="mdct"
-binkaudio_dct_decoder_select="mdct rdft dct"
-binkaudio_rdft_decoder_select="mdct rdft"
+binkaudio_dct_decoder_select="mdct rdft dct sinewin"
+binkaudio_rdft_decoder_select="mdct rdft sinewin"
 cavs_decoder_select="golomb"
 cook_decoder_select="mdct sinewin"
 cscd_decoder_suggest="zlib"
@@ -1291,7 +1289,7 @@ h264_dxva2_hwaccel_deps="dxva2api_h"
 h264_dxva2_hwaccel_select="dxva2 h264_decoder"
 h264_vaapi_hwaccel_select="vaapi"
 h264_vdpau_decoder_select="vdpau h264_decoder"
-imc_decoder_select="fft mdct"
+imc_decoder_select="fft mdct sinewin"
 jpegls_decoder_select="golomb"
 jpegls_encoder_select="golomb"
 ljpeg_encoder_select="aandct"
@@ -1459,7 +1457,7 @@ alsa_outdev_deps="alsa_asoundlib_h"
 bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
 dv1394_indev_deps="dv1394 dv_demuxer"
 fbdev_indev_deps="linux_fb_h"
-jack_indev_deps="jack_jack_h"
+jack_indev_deps="jack_jack_h sem_timedwait"
 libdc1394_indev_deps="libdc1394"
 oss_indev_deps_any="soundcard_h sys_soundcard_h"
 oss_outdev_deps_any="soundcard_h sys_soundcard_h"
@@ -1481,7 +1479,7 @@ mmst_protocol_deps="network"
 rtmp_protocol_select="tcp_protocol"
 rtp_protocol_select="udp_protocol"
 tcp_protocol_deps="network"
-udp_protocol_deps="network"
+udp_protocol_deps="network pthreads"
 
 # filters
 blackframe_filter_deps="gpl"
@@ -1490,7 +1488,8 @@ drawtext_filter_deps="libfreetype"
 frei0r_filter_deps="frei0r dlopen strtok_r"
 frei0r_src_filter_deps="frei0r dlopen strtok_r"
 hqdn3d_filter_deps="gpl"
-mp_filter_deps="gpl"
+movie_filter_deps="avcodec avformat"
+mp_filter_deps="gpl avcodec"
 ocv_filter_deps="libopencv"
 scale_filter_deps="swscale"
 yadif_filter_deps="gpl"
@@ -1498,6 +1497,7 @@ yadif_filter_deps="gpl"
 # libraries
 avdevice_deps="avcodec avformat"
 avformat_deps="avcodec"
+postproc_deps="gpl"
 
 # programs
 ffmpeg_deps="avcodec avformat swscale"
@@ -1666,9 +1666,9 @@ enable ffmpeg
 enable ffplay
 enable ffprobe
 enable ffserver
-enable mpegaudio_hp
 enable network
 enable optimizations
+enable postproc
 enable protocols
 enable static
 enable stripping
@@ -1691,7 +1691,7 @@ LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
 
 CC_O='-o $@'
 
-host_cflags='-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3 -g -Wall'
+host_cflags='-D_ISOC99_SOURCE -O3 -g -Wall'
 host_libs='-lm'
 
 target_path='$(CURDIR)'
@@ -1856,6 +1856,11 @@ set_default cc nm pkg_config strip sysinclude
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
 
+if ! $pkg_config --version >/dev/null 2>&1; then
+    warn "$pkg_config not found, library detection may fail."
+    pkg_config=false
+fi
+
 exesuf() {
     case $1 in
         mingw32*|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
@@ -2339,7 +2344,7 @@ if test "$?" != 0; then
     die "C compiler test failed."
 fi
 
-add_cppflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
+add_cppflags -D_ISOC99_SOURCE
 check_cflags -std=c99
 check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
 #include <stdlib.h>
@@ -2387,7 +2392,6 @@ case $target_os in
         disable symver
         oss_indev_extralibs="-lossaudio"
         oss_outdev_extralibs="-lossaudio"
-        add_cppflags -D_XOPEN_SOURCE=600
         ;;
     openbsd)
         enable malloc_aligned
@@ -2481,6 +2485,7 @@ case $target_os in
         enable dos_paths
         ;;
     linux)
+        add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
         enable dv1394
         ;;
     irix*)
@@ -2556,7 +2561,6 @@ die_license_disabled() {
 die_license_disabled gpl libx264
 die_license_disabled gpl libxavs
 die_license_disabled gpl libxvid
-die_license_disabled gpl postproc
 die_license_disabled gpl x11grab
 
 die_license_disabled nonfree libfaac
@@ -2899,7 +2903,7 @@ enabled libdirac   && require_pkg_config dirac                          \
     "libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h"  \
     "dirac_decoder_init dirac_encoder_init"
 enabled libfaac    && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
-enabled libfreetype && add_cflags $(pkg-config --cflags freetype2) && require libfreetype ft2build.h FT_Init_FreeType -lfreetype
+enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
 enabled libgsm     && require  libgsm gsm/gsm.h gsm_create -lgsm
 enabled libmp3lame && require  "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
 enabled libnut     && require  libnut libnut.h nut_demuxer_init -lnut
@@ -2935,10 +2939,20 @@ if enabled libdc1394; then
     die "ERROR: No version of libdc1394 found "
 fi
 
-if check_pkg_config sdl SDL_version.h SDL_Linked_Version; then
+SDL_CONFIG="${cross_prefix}sdl-config"
+if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+    sdl_cflags=$("${SDL_CONFIG}" --cflags)
+    sdl_libs=$("${SDL_CONFIG}" --libs)
+    check_func_headers SDL.h SDL_Init $sdl_cflags $sdl_libs &&
     check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
     enable sdl &&
     check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable sdl_video_size
+else
+    if check_pkg_config sdl SDL_version.h SDL_Linked_Version; then
+        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+        enable sdl &&
+        check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable sdl_video_size
+    fi
 fi
 
 texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
@@ -2975,7 +2989,7 @@ check_header soundcard.h
 
 enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
 
-enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack
+enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait
 
 enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
 
@@ -3017,6 +3031,7 @@ check_cflags -Wwrite-strings
 check_cflags -Wtype-limits
 check_cflags -Wundef
 check_cflags -Wmissing-prototypes
+check_cflags -Wno-pointer-to-int-cast
 enabled extra_warnings && check_cflags -Winline
 
 # add some linker flags

+ 33 - 3
doc/APIchanges

@@ -13,15 +13,45 @@ libavutil:   2011-04-18
 
 API changes, most recent first:
 
-2011-04-XX - bebe72f - lavu 51.1.0 - avutil.h
+2011-05-10 - 188dea1 - lavc 53.3.0 - avcodec.h
+  Deprecate AVLPCType and the following fields in
+  AVCodecContext: lpc_coeff_precision, prediction_order_method,
+  min_partition_order, max_partition_order, lpc_type, lpc_passes.
+  Corresponding FLAC encoder options should be used instead.
+
+2011-05-07 - xxxxxxx - lavfi 2.5.0 - avcodec.h
+  Add libavfilter/avcodec.h header and avfilter_copy_frame_props()
+  function.
+
+2011-05-07 - xxxxxxx - lavc 53.5.0 - AVFrame
+  Add format field to AVFrame.
+
+2011-05-07 - xxxxxxx - lavc 53.4.0 - AVFrame
+  Add width and height fields to AVFrame.
+
+2011-05-01 - xxxxxxx - lavfi 2.4.0 - avfilter.h
+  Rename AVFilterBufferRefVideoProps.pixel_aspect to
+  sample_aspect_ratio.
+
+2011-05-01 - xxxxxxx - lavc 53.3.0 - AVFrame
+  Add a sample_aspect_ratio field to AVFrame.
+
+2011-05-01 - xxxxxxx - lavc 53.2.0 - AVFrame
+  Add a pkt_pos field to AVFrame.
+
+2011-04-xx - xxxxxxx - lavu 51.2.0 - mem.h
+  Add av_dynarray_add function for adding
+  an element to a dynamic array.
+
+2011-04-26 - bebe72f - lavu 51.1.0 - avutil.h
   Add AVPictureType enum and av_get_picture_type_char(), deprecate
   FF_*_TYPE defines and av_get_pict_type_char() defined in
   libavcodec/avcodec.h.
 
-2011-04-xx - 10d3940 - lavfi 2.3.0 - avfilter.h
+2011-04-26 - 10d3940 - lavfi 2.3.0 - avfilter.h
   Add pict_type and key_frame fields to AVFilterBufferRefVideo.
 
-2011-04-xx - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
+2011-04-26 - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
   Add sample_aspect_ratio fields to vsrc_buffer arguments
 
 2011-04-21 - 94f7451 - lavc 53.1.0 - avcodec.h

+ 0 - 1
doc/avutil.txt

@@ -19,7 +19,6 @@ integer.c               128bit integer math
 lls.c
 mathematics.c           greatest common divisor, integer sqrt, integer log2, ...
 mem.c                   memory allocation routines with guaranteed alignment
-softfloat.c
 
 Headers:
 bswap.h                 big/little/native-endian conversion code

+ 17 - 7
doc/developer.texi

@@ -180,10 +180,13 @@ should also be avoided if they don't make the code easier to understand.
    Always fill out the commit log message. Describe in a few lines what you
    changed and why. You can refer to mailing list postings if you fix a
    particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
+   Recommanded format:
+   area changed: Short 1 line description
+
+   details describing what and why and giving references.
 @item
-   If you apply a patch by someone else, include the name and email address in
-   the log message. Since the ffmpeg-cvslog mailing list is publicly
-   archived you should add some SPAM protection to the email address. Send an
+   Make sure the author of the commit is set correctly. (see git commit --author)
+   If you apply a patch, send an
    answer to ffmpeg-devel (or wherever you got the patch from) saying that
    you applied the patch.
 @item
@@ -241,10 +244,10 @@ Note, these rules are mostly borrowed from the MPlayer project.
 
 @section Submitting patches
 
-First, (@pxref{Coding Rules}) above if you did not yet.
+First, read the (@pxref{Coding Rules}) above if you did not yet.
 
-When you submit your patch, try to send a unified diff (diff '-up'
-option). We cannot read other diffs :-)
+When you submit your patch, please use @code{git format-patch} or
+@code{git send-email}. We cannot read other diffs :-)
 
 Also please do not submit a patch which contains several unrelated changes.
 Split it into separate, self-contained pieces. This does not mean splitting
@@ -312,9 +315,14 @@ send a reminder by email. Your patch should eventually be dealt with.
     If it depends on a parser or a library, did you add that dependency in
     configure?
 @item
-    Did you "git add" the appropriate files before committing?
+    Did you @code{git add} the appropriate files before committing?
+@item
+    Did you make sure it compiles standalone, i.e. with
+    @code{configure --disable-everything --enable-decoder=foo}
+    (or @code{--enable-demuxer} or whatever your component is)?
 @end enumerate
 
+
 @section patch submission checklist
 
 @enumerate
@@ -382,6 +390,8 @@ send a reminder by email. Your patch should eventually be dealt with.
 @item
     Lines with similar content should be aligned vertically when doing so
     improves readability.
+@item
+    Consider to add a regression test for your code.
 @end enumerate
 
 @section Patch review process

+ 12 - 0
doc/encoders.texi

@@ -353,4 +353,16 @@ HDCD A/D Converter
 
 @end table
 
+@subheading Other AC-3 Encoding Options
+
+@table @option
+
+@item -stereo_rematrixing @var{boolean}
+Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
+is an optional AC-3 feature that increases quality by selectively encoding
+the left/right channels as mid/side. This option is enabled by default, and it
+is highly recommended that it be left as enabled except for testing purposes.
+
+@end table
+
 @c man end ENCODERS

+ 4 - 0
doc/eval.texi

@@ -72,6 +72,10 @@ integer. For example, "floor(-1.5)" is "-2.0".
 @item trunc(expr)
 Round the value of expression @var{expr} towards zero to the nearest
 integer. For example, "trunc(-1.5)" is "-1.0".
+
+@item sqrt(expr)
+Compute the square root of @var{expr}. This is equivalent to
+"(@var{expr})^.5".
 @end table
 
 Note that:

Some files were not shown because too many files changed in this diff