Commit Graph

108 Commits

Author SHA1 Message Date
Ben Avison b9eb03416d truehd: break out part of output_data into platform-specific callback.
Verified with profiling that this doesn't have a measurable effect upon
overall performance.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-26 19:54:29 +02:00
Ben Avison fcf5fc4445 truehd: tune VLC decoding for ARM.
Profiling on a Raspberry Pi revealed the best performance to correspond
with VLC_BITS = 5. Results for overall audio decode and the get_vlc2 function
in particular are as follows:

              Before          After
              Mean   StdDev   Mean   StdDev  Confidence  Change
6:2 total     348.8  20.1     339.6  15.1    88.8%       +2.7%  (insignificant)
6:2 function  38.1   8.1      26.4   4.1     100.0%      +44.5%
8:2 total     339.1  15.4     324.5  15.5    99.4%       +4.5%
8:2 function  33.8   7.0      27.3   5.6     99.7%       +23.6%
6:6 total     604.6  20.8     572.8  20.6    100.0%      +5.6%
6:6 function  95.8   8.4      68.9   8.2     100.0%      +39.1%
8:8 total     766.4  17.6     741.5  21.2    100.0%      +3.4%
8:8 function  106.0  11.4     86.1   9.9     100.0%      +23.1%

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-26 19:54:12 +02:00
Ben Avison 4e5aa080bb truehd: break out part of rematrix_channels into platform-specific callback.
Verified with profiling that this doesn't have a measurable effect upon
overall performance.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-26 19:54:05 +02:00
Michael Niedermayer f90a4bfc43 mlpdec: fix request_channel_layout behavior.
When request_channel_layout is 0,
all substreams should be decoded.

Signed-off-by: Tim Walker <tdskywalker@gmail.com>
2014-02-08 20:10:35 +01:00
Tim Walker c0c45188e5 mlp: improve request_channel_layout behavior.
Don't decode further substreams if request_channel_layout
is a subset of the current substream's channel_layout.

Before, we would only discard further substreams if
request_channel_layout matched the substream's
channel_layout extactly, thus decoding additional
channels which the caller would probably end up downmixing.
2014-02-08 13:39:37 +01:00
Tim Walker e92123093d mlpdec: set AV_FRAME_DATA_MATRIXENCODING side data. 2014-01-05 16:41:56 +01:00
Tim Walker 4b7f1a7ced mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream. 2014-01-05 16:41:56 +01:00
Diego Biurrun b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Diego Biurrun 7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Luca Barbato e9d394f3fa mlpdec: Do not set invalid context in read_restart_header
The faulty values rippled further down the codepath causing a
hard-to-track segfault in the assembly code.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-12 04:34:49 +02:00
Diego Biurrun 6d97484d72 avcodec: av_log_ask_for_sample() ---> avpriv_request_sample() 2013-03-13 21:20:12 +01:00
Anton Khirnov 759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
Anton Khirnov 0dff40bfb9 mlpdec: do not try to allocate a zero-sized output buffer.
CC:libav-stable@libav.org
2013-02-23 13:05:31 +01:00
Justin Ruggles dc33fbbfd0 mlp/truehd: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Tim Walker ed1b01131e mlp: implement support for AVCodecContext.request_channel_layout.
Also wrap usage of AVCodecContext.request_channels in FF_API_REQUEST_CHANNELS directives.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2013-01-22 16:10:02 -05:00
Tim Walker 1fd2deedcc mlpdec: set the channel layout.
Fixes bug 401.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
2013-01-22 16:10:02 -05:00
Tim Walker 3ffcccb4fb mlpdec: TrueHD: use Libav channel order.
Fixes bug 208.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
2013-01-22 16:10:02 -05:00
Tim Walker 99ccd2ba10 mlp: store the channel layout for each substream.
Also stop storing the channel arrangement in the header info, as it's unused outside of ff_mlp_read_major_sync.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
2013-01-22 16:10:02 -05:00
Anton Khirnov 594d4d5df3 lavc: add a wrapper for AVCodecContext.get_buffer().
It will be useful in the upcoming transition to refcounted AVFrames.
2012-12-04 21:41:59 +01:00
Luca Barbato 2d6caade22 dsputil: split out mlp dsp function 2012-10-11 12:01:08 +02:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Martin Storsjö 00c3b67b8a cosmetics: Align codec declarations
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 22:37:38 +03:00
Paul B Mahol ca085e667b mlpdec: use av_log_ask_for_sample()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-02-21 16:01:31 +01:00
Martin Storsjö 9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Diego Biurrun c68fafe0d2 doxygen: eliminate Qt-style doxygen syntax 2011-12-05 13:06:58 +01:00
Justin Ruggles 0eea212943 Add avcodec_decode_audio4().
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Justin Ruggles 82be06bbb3 mlpdec: return meaningful error codes instead of -1 2011-10-13 15:13:02 -04:00
Justin Ruggles e1b8d88d52 mlpdec: remove unnecessary wrapper function 2011-10-13 15:13:02 -04:00
Justin Ruggles 37b67f1bff mlpdec: only calculate output size once 2011-10-13 15:13:02 -04:00
Justin Ruggles caa845851d mlpdec: validate that the reported channel count matches the actual output
channel count
2011-10-13 15:13:02 -04:00
Anton Khirnov ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02: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
Johan Andersson 21de920472 Update the url to the site website and change ffmpeg-devel to libav-devel
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-13 18:45:29 -04:00
Diego Elio Pettenò d36beb3f69 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:45 +00:00
Stefano Sabatini 5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Måns Rullgård 49bd8e4b84 Fix grammar errors in documentation
Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 15:38:06 +00:00
Nick Brereton 857c30ecba mlpdec: Comment channel_params field in struct SubStream.
Patch by Nick Brereton <nick at nbrereton dot net>

Originally committed as revision 23085 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-11 01:46:13 +00:00
Nick Brereton 22fb814c2f mlpdec: Allocate channel decoding parameters for each substream. Some file
was encountered with a channel range that overlapped the previous substreams,
and the code assumed no such overlap was possible.
Patch by Nick Brereton <nick at nbrereton dot net>

Originally committed as revision 23084 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-11 01:44:52 +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
Stefano Sabatini 72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Reimar Döffinger d780511b94 Reduce log level of "Extracting .. channel downmix" to AV_LOG_DEBUG, the
message is pointless to ordinary users and is printed once per frame.

Originally committed as revision 21486 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 20:02:18 +00:00
Reimar Döffinger 0b882b4009 Fix crash in MLP decoder due to integer overflow.
Probably only DoS, init_get_bits sets buffer to NULL, thus causing a
NULL-dereference directly after.

Originally committed as revision 21426 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:07:29 +00:00
Diego Biurrun 547fc46ca7 Remove pointless CONFIG_MLP_DECODER preprocessor check.
The file is only ever compiled if the MLP decoder is enabled.

Originally committed as revision 20968 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-29 17:20:19 +00:00
Ramiro Polla 52ae1e869b mlp: Indent.
Originally committed as revision 20255 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-16 16:12:04 +00:00
Ramiro Polla 7fd8806924 mlp: Only initialize VLC tables once. This caused a crash when multiple
instances of the decoder were started at different times.
Bug reported by Maxim Anisiutkin.

Originally committed as revision 20254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-16 16:10:00 +00:00
Ramiro Polla 13bd2044d3 mlp: Simplify adressing of state and coeffs arrays for both filters by making
the arrays sequential.

Originally committed as revision 18841 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-15 15:34:22 +00:00
Ramiro Polla e282272667 mlpdec: Fix possible writing out of array bounds introduced by being
under-paranoid in r18651.

Originally committed as revision 18763 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-06 16:01:28 +00:00
Ramiro Polla e8d341ce19 mlpdec: Split sync word error and MLP sync word check.
The previous code would print the wrong error message for MLP streams with
TrueHD noise type.

Originally committed as revision 18762 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-06 15:46:10 +00:00
Ramiro Polla aff42ee0ff mlpdec: Fix indentation that got mangled from copy&paste.
Originally committed as revision 18761 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-06 15:37:25 +00:00
Ramiro Polla bf4f19dc65 mlpdec: Move MLP's filter_channel() to dsputils.
Originally committed as revision 18721 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-30 12:30:05 +00:00