Browse Source

Merge remote-tracking branch 'newdev/master'

* newdev/master:
  mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
  Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder.
  Use audio_service_type to set stream disposition.
  Add APIchanges entry for audio_service_type.
  Add audio_service_type field to AVCodecContext for encoding and reporting of the service type in the audio bitstream.
  configure: in check_ld, place new -l flags before existing ones
  support @heading, @subheading, @subsubheading, and @subsubsection in texi2pod.pl
  doc: update build system documentation
  aacenc: indentation
  aacenc: fix the side calculation in search_for_ms
  vp8.c: rename EDGE_* to VP8_EDGE_*.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/vp8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 14 years ago
parent
commit
27ef7b1bcd
10 changed files with 112 additions and 24 deletions
  1. 1 1
      configure
  2. 3 0
      doc/APIchanges
  3. 32 19
      doc/build_system.txt
  4. 45 0
      doc/fate.txt
  5. 22 0
      doc/ffmpeg.texi
  6. 4 2
      doc/texi2pod.pl
  7. 1 0
      ffmpeg.c
  8. 1 0
      libavcodec/aac_ac3_parser.c
  9. 1 0
      libavcodec/aac_ac3_parser.h
  10. 2 2
      libavcodec/aaccoder.c

+ 1 - 1
configure

@@ -642,7 +642,7 @@ check_ld(){
         test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
     done
     check_cc $($filter_cflags $flags) || return
-    check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
+    check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs
 }
 
 check_cppflags(){

+ 3 - 0
doc/APIchanges

@@ -12,6 +12,9 @@ libavutil:   2009-03-08
 
 API changes, most recent first:
 
+2011-03-25 - 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
+  Add audio_service_type field to AVCodecContext.
+
 2011-XX-XX - XXXXXXX - lavu  XX.XXX.X - pixfmt.h
   Add PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
 

+ 32 - 19
doc/build_system.txt

@@ -1,11 +1,38 @@
 FFmpeg currently uses a custom build system, this text attempts to document
 some of its obscure features and options.
 
-Options to make:
-make V=1 <target>
-    Build target with verbosity 1, instead of 1, 2 can be used too
-make SAMPLES=<path to the fate samples> <target>
-    specify the path to the fate samples at make time
+Makefile variables:
+
+V
+    Disable the default terse mode, the full command issued by make and its
+    output will be shown on the screen.
+
+DESTDIR
+    Destination directory for the install targets, useful to prepare packages
+    or install Libav in cross-environments.
+
+Makefile targets:
+
+all
+    Default target, builds all the libraries and the executables.
+
+fate
+    Run the fate test suite, note you must have installed it
+
+fate-list
+    Will list all fate/regression test targets
+
+install
+    Install headers, libraries and programs.
+
+libavformat/output-example
+    Build the libavformat basic example.
+
+libavcodec/api-example
+    Build the libavcodec basic example.
+
+libswscale/swscale-test
+    Build the swscale self-test (useful also as example).
 
 
 Useful standard make commands:
@@ -21,17 +48,3 @@ make -k
     continue build in case of errors, this is useful for the regression tests
     sometimes but note it will still not run all reg tests.
 
-
-Targets to make:
-fate-list
-    Will list all fate/regression test targets
-
-fate
-    Run the fate test suite, note you must have installed it
-
-
-Setting up local fate:
-use the following command to get the fate test samples
-rsync -aL rsync://rsync.mplayerhq.hu:/samples/fate-suite/ fate/fate-suite
-pass --samples=<path to the samples> to configure or pass the path with the
-SAMPLES variable to make

+ 45 - 0
doc/fate.txt

@@ -0,0 +1,45 @@
+FATE Automated Testing Environment
+
+FATE provides a regression testsuite that can be run locally or configured
+to send reports to fate.ffmpeg.org.
+In order to run, it needs a large amount of data (samples and references)
+that is provided separately from the actual source distribution.
+
+Use the following command to get the fate test samples
+
+# rsync -aL rsync://rsync.mplayerhq.hu:/samples/fate-suite/ fate/fate-suite
+
+To inform the build system about the testsuite location, pass
+`--samples=<path to the samples>` to configure or set the SAMPLES Make
+variable or the FATE_SAMPLES environment variable to a suitable value.
+
+For information on how to set up FATE to send results to the official FFmpeg
+testing framework, please refer to the following wiki page:
+http://wiki.multimedia.cx/index.php?title=FATE
+
+FATE Makefile targets:
+
+fate-list
+    Will list all fate/regression test targets.
+
+fate
+    Run the FATE test suite (requires the fate-suite dataset).
+
+Fate Makefile variables:
+
+V
+    Verbosity level, can be set to 0, 1 or 2.
+    * 0: show just the test arguments
+    * 1: show just the command used in the test
+    * 2: show everything
+
+SAMPLES
+    Specify or override the path to the FATE samples at make time, it has a
+    meaning only while running the regression tests.
+
+THREADS
+    Specify how many threads to use while running regression tests, it is
+    quite useful to detect thread-related regressions.
+
+Example:
+    make V=1 SAMPLES=/var/fate/samples THREADS=2 fate

+ 22 - 0
doc/ffmpeg.texi

@@ -586,6 +586,28 @@ Set the ISO 639 language code (3 letters) of the current audio stream.
 @table @option
 @item -atag @var{fourcc/tag}
 Force audio tag/fourcc.
+@item -audio_service_type @var{type}
+Set the type of service that the audio stream contains.
+@table @option
+@item ma
+Main Audio Service (default)
+@item ef
+Effects
+@item vi
+Visually Impaired
+@item hi
+Hearing Impaired
+@item di
+Dialogue
+@item co
+Commentary
+@item em
+Emergency
+@item vo
+Voice Over
+@item ka
+Karaoke
+@end table
 @item -absf @var{bitstream_filter}
 Bitstream filters available are "dump_extra", "remove_extra", "noise", "mp3comp", "mp3decomp".
 @end table

+ 4 - 2
doc/texi2pod.pl

@@ -231,10 +231,12 @@ while(<$inf>) {
 
     # Single line command handlers.
 
-    /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
+    /^\@(?:section|unnumbered|unnumberedsec|center|heading)\s+(.+)$/
         and $_ = "\n=head2 $1\n";
-    /^\@subsection\s+(.+)$/
+    /^\@(?:subsection|subheading)\s+(.+)$/
         and $_ = "\n=head3 $1\n";
+    /^\@(?:subsubsection|subsubheading)\s+(.+)$/
+        and $_ = "\n=head4 $1\n";
 
     # Block command handlers:
     /^\@itemize\s*(\@[a-z]+|\*|-)?/ and do {

+ 1 - 0
ffmpeg.c

@@ -2123,6 +2123,7 @@ static int transcode(AVFormatContext **output_files,
                 codec->sample_rate = icodec->sample_rate;
                 codec->channels = icodec->channels;
                 codec->frame_size = icodec->frame_size;
+                codec->audio_service_type = icodec->audio_service_type;
                 codec->block_align= icodec->block_align;
                 if(codec->block_align == 1 && codec->codec_id == CODEC_ID_MP3)
                     codec->block_align= 0;

+ 1 - 0
libavcodec/aac_ac3_parser.c

@@ -94,6 +94,7 @@ get_next:
             avctx->channel_layout = s->channel_layout;
         }
         avctx->frame_size = s->samples;
+        avctx->audio_service_type = s->service_type;
     }
 
     avctx->bit_rate = s->bit_rate;

+ 1 - 0
libavcodec/aac_ac3_parser.h

@@ -49,6 +49,7 @@ typedef struct AACAC3ParseContext {
     int bit_rate;
     int samples;
     int64_t channel_layout;
+    int service_type;
 
     int remaining_size;
     uint64_t state;

+ 2 - 2
libavcodec/aaccoder.c

@@ -817,7 +817,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
                 int prevsc = sce->sf_idx[w*16+g];
                 if (dists[w*16+g] > uplims[w*16+g] && sce->sf_idx[w*16+g] > 60) {
                     if (find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]-1))
-                    sce->sf_idx[w*16+g]--;
+                        sce->sf_idx[w*16+g]--;
                     else //Try to make sure there is some energy in every band
                         sce->sf_idx[w*16+g]-=2;
                 }
@@ -1057,7 +1057,7 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
                     for (i = 0; i < sce0->ics.swb_sizes[g]; i++) {
                         M[i] = (sce0->coeffs[start+w2*128+i]
                               + sce1->coeffs[start+w2*128+i]) * 0.5;
-                        S[i] =  sce0->coeffs[start+w2*128+i]
+                        S[i] =  M[i]
                               - sce1->coeffs[start+w2*128+i];
                     }
                     abs_pow34_v(L34, sce0->coeffs+start+w2*128, sce0->ics.swb_sizes[g]);

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