Commit Graph

61 Commits

Author SHA1 Message Date
Michael Niedermayer
0665199e43 Merge remote branch 'qatar/master'
* qatar/master:
  vorbisdec: Rename silly "class_" variable to plain "class".
  simple_idct_alpha: Drop some useless casts.
  Simplify av_log_missing_feature().
  ac3enc: remove check for mismatching channels and channel_layout
  If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is non-zero, set channels based on channel_layout.
  If AVCodecContext.channel_layout and AVCodecContext.channels are both non-zero, check to make sure they do not contradict eachother.
  cosmetics: indentation
  Check AVCodec.supported_samplerates and AVCodec.channel_layouts in avcodec_open().
  aacdec: remove sf_scale and sf_offset.
  aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient table values from the spec.
  Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead of hardcoding 200 everywhere.
  Large intensity stereo and PNS indices are legal. Clip them instead of erroring out. A magnitude of 100 corresponds to 2^25 so the will most likely result in clipped output anyway.
  qpeg: use reget_buffer() in decode_frame()
  ultimotion: use reget_buffer() in ulti_decode_frame()
  smacker: remove unnecessary call to avctx->release_buffer in decode_frame()
  avparser: don't av_malloc(0).

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-28 04:26:01 +02:00
Alex Converse
d70fa4c423 Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.
2011-04-27 12:39:37 -04:00
Michael Niedermayer
d7e5aebae7 Merge remote branch 'qatar/master'
* qatar/master: (23 commits)
  ac3enc: correct the flipped sign in the ac3_fixed encoder
  Eliminate pointless '#if 1' statements without matching '#else'.
  Add AVX FFT implementation.
  Increase alignment of av_malloc() as needed by AVX ASM.
  Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
  mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
  documentation: extend documentation for ffmpeg -aspect option
  APIChanges: update commit hashes for recent additions.
  lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
  aac: add headers needed for log2f()
  lavc: remove FF_API_MB_Q cruft
  lavc: remove FF_API_RATE_EMU cruft
  lavc: remove FF_API_HURRY_UP cruft
  pad: make the filter parametric
  vsrc_movie: add key_frame and pict_type.
  vsrc_movie: fix leak in request_frame()
  lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
  vsrc_buffer: add sample_aspect_ratio fields to arguments.
  lavfi: add fieldorder filter
  scale: make the filter parametric
  ...

Conflicts:
	Changelog
	doc/filters.texi
	ffmpeg.c
	libavcodec/ac3dec.h
	libavcodec/dsputil.c
	libavfilter/avfilter.h
	libavfilter/vf_scale.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_buffer.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-27 03:51:04 +02:00
Michael Niedermayer
30fe971934 aac: add headers needed for log2f()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 08:33:21 +02:00
Michael Niedermayer
3d462373f8 aac: add math.h needed for log2f()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-23 11:06:19 +02:00
Michael Niedermayer
434f248723 Merge remote branch 'qatar/master'
* qatar/master: (22 commits)
  ac3enc: move extract_exponents inner loop to ac3dsp
  avio: deprecate url_get_filename().
  avio: deprecate url_max_packet_size().
  avio: make url_get_file_handle() internal.
  avio: make url_filesize() internal.
  avio: make url_close() internal.
  avio: make url_seek() internal.
  avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together
  avio: make url_write() internal.
  avio: make url_read_complete() internal.
  avio: make url_read() internal.
  avio: make url_open() internal.
  avio: make url_connect internal.
  avio: make url_alloc internal.
  applehttp: Merge two for loops
  applehttp: Restructure the demuxer to use a custom AVIOContext
  applehttp: Move finished and target_duration to the variant struct
  aacenc: reduce the number of loop index variables
  avio: deprecate url_open_protocol
  avio: deprecate url_poll and URLPollEntry
  ...

Conflicts:
	libavformat/applehttp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-05 02:31:56 +02:00
Young Han Lee
57cc1ad35f aacenc: reduce the number of loop index variables
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-04-04 09:12:37 +02:00
Michael Niedermayer
27ef7b1bcd 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>
2011-03-26 03:06:30 +01:00
Young Han Lee
00f0b4b92e aacenc: indentation 2011-03-24 21:13:29 -07:00
Young Han Lee
92efa2bdd9 aacenc: fix the side calculation in search_for_ms 2011-03-24 21:12:23 -07:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Nathan Caldwell
4afedfd8e5 aacenc: cosmetics, indentation, and comment clarification
Correct bad indentation in aaccoder
Clarify and correct comments in 3GPP psymodel, other cosmetics.
2011-03-16 23:35:39 -04:00
Young Han Lee
f578854efc aaccoder: Change FFMAX for allzero flag to OR bit operation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 23:12:43 -04:00
Alex Converse
63e1278d88 aacenc: TLS: Save maximum values for each swb in a table.
This gives an almost 20% speedup.

Originally committed as revision 24484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 17:11:51 +00:00
Alex Converse
031d5cea04 10l: Remove some commented out code that slipped in.
Originally committed as revision 24483 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 17:01:50 +00:00
Alex Converse
fe461767e6 aacenc: TLS: Try to preserve some energy in each non-zero band.
Reduce scalefactors in non-zero bands that underflow by twice as much as those
in bands that just fail to hit psy targets.

Originally committed as revision 24482 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 16:36:01 +00:00
Alex Converse
c226fc5bfb aacenc: Prevent premature termination of the two loop search.
Originally committed as revision 24476 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 04:23:26 +00:00
Alex Converse
51ffd3a62f aacenc: Favor log2f() and sqrtf() over log2() and sqrt().
Originally committed as revision 24473 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 02:10:59 +00:00
Alex Converse
04d72abf17 aacenc: Factorize some scalefactor utilities.
Originally committed as revision 24472 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 22:37:42 +00:00
Alex Converse
581a96976b aacenc: Convert if () abort() to assert().
Originally committed as revision 24336 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-19 20:53:58 +00:00
Alex Converse
6d9f1b67e8 Cosmetics: Whitespace
Originally committed as revision 24333 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-19 18:37:45 +00:00
Alex Converse
a2310d1e41 10l: Add a missing const.
Originally committed as revision 24274 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-16 20:28:55 +00:00
Alex Converse
1676b09994 aacenc: Template quantize_and_encode_band_cost().
Originally committed as revision 24273 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-16 20:02:46 +00:00
Alex Converse
804d489c4a aacenc: Fill in the estimated codebook for the final computed scalefactor in the TLS.
Originally committed as revision 23869 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-28 21:42:57 +00:00
Alex Converse
c91dce994d aacenc: Remove an unnecessary division from the TLS.
Originally committed as revision 23368 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-28 21:29:56 +00:00
Alex Converse
911fbc452b Cosmetics: whitespace
Originally committed as revision 23367 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-28 20:45:35 +00:00
Alex Converse
04d6a54e13 aacenc: Remove unnecessary variables and scopes in the TLS.
Originally committed as revision 23366 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-28 20:42:01 +00:00
Alex Converse
9069b7d35f Fix declaration after statement
Originally committed as revision 23331 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 23:25:29 +00:00
Alex Converse
0ecfa7b7c7 aacenc: Split find_max_val() from find_min_book() to eliminate duplicate searches.
Originally committed as revision 23322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 18:35:01 +00:00
Alex Converse
af2ee6fc49 Remove useless costly inf checks from the trellis scalefactor search.
Originally committed as revision 23319 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 18:32:59 +00:00
Alex Converse
acc9f51fe1 aacenc: Trellis over scalefactors using an estimated codebook rather than every codebook.
The minimal codebook to encode the band without clipping is used (as is done in the TLS).

Originally committed as revision 23318 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 18:31:55 +00:00
Alex Converse
144c5e3dd2 aacenc: Only trellis over a column of 61 scalefactors (reduced from 256).
This still provides plenty of dynamic range, makes every move legal, and greatly reduces the search space.

Originally committed as revision 23317 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 18:28:18 +00:00
Alex Converse
05e659ef83 aacenc: Factor out find_min_book so it can be used by multiple coefficient coders.
Originally committed as revision 23316 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-25 18:24:16 +00:00
Alex Converse
0175d7886f fmaxf -> FFMAX to fix pre-C99 systems
Originally committed as revision 23138 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-14 19:38:17 +00:00
Alex Converse
759510e6af aacenc: Add a rate only trellis for codebook selection for the TLS.
Originally committed as revision 23136 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-14 16:49:51 +00:00
Alex Converse
4d986b7172 aacenc: Use exact values when quantizing, not fuzzy values.
This requires us to code small escapes; we can't avoid it.

Originally committed as revision 23135 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-14 16:49:40 +00:00
Alex Converse
51cbabc792 aacenc: Use an estimated codebook for the TLS (two loop search).
Originally committed as revision 23134 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-14 16:49:30 +00:00
Alex Converse
46174079c9 10l: store the result of clipping added in r23035
Originally committed as revision 23037 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-06 20:38:42 +00:00
Alex Converse
32fa7725d2 Make the faac inspired quantizer search make sense for a slightly narrower definition of "make sense."
Originally committed as revision 23035 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-06 20:18:36 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Alex Converse
508f092a78 aacenc: Merge quantize_band_cost() with quantize_and_encode_band().
If these two functions aren't matched results may be unexpected.

Originally committed as revision 22655 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-24 17:09:21 +00:00
Alex Converse
f5e82fec3d aacenc: Use preprocessor constants for trellis states and stages.
Originally committed as revision 19948 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-21 04:32:51 +00:00
Alex Converse
9072c29e40 aacenc: Split paths in the scalefactor selection trellis into a 2-D array.
Originally committed as revision 19947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-21 04:15:12 +00:00
Alex Converse
9d4f6f10ae aacenc: Replace cbrt() with cbrtf() when the result is destined for float
storage.

Originally committed as revision 19946 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-21 03:53:39 +00:00
Alex Converse
0bd9aa449a aacenc: Multiple distortion by lambda after it's summed and not each individual
term before.

Originally committed as revision 19945 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-21 03:50:59 +00:00
Alex Converse
06d6b962e5 Cosmetics: Reindent after r19943.
Originally committed as revision 19944 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-21 03:42:54 +00:00
Alex Converse
a71e9b6254 aacenc: Don't make unnecessary compares to the escape value in tight loops.
Originally committed as revision 19943 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-21 03:41:08 +00:00
Alex Converse
dd0e43e4bb Re-add search_for_ms to the coefficients encoders to silence warnings
Originally committed as revision 19733 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-27 17:46:13 +00:00
Alex Converse
a62d6cfeff Be sure to increment our position in the coefficient array when skipping a zero
band in the twoloop scalefactor search.

Originally committed as revision 19480 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-22 03:53:30 +00:00
Alex Converse
5cf20d07ad Remove an unused field from the BandCodingPath struct.
Originally committed as revision 19473 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-20 21:52:03 +00:00