1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

364 Commits

Author SHA1 Message Date
Hendrik Leppkes
5e8b053452 Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'
* commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6':
  lavc: add profiles to AVCodecDescriptor

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-01 16:20:39 +01:00
Anton Khirnov
d6dc5d15af aacdec: fix aac_static_table_init() prototype 2015-12-07 11:42:26 +01:00
Derek Buitenhuis
504e3f75bf aac: Make codec init run under ff_thread_once
This makes AAC init threadsafe.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-10-15 14:00:24 -04:00
Derek Buitenhuis
1a29804558 aac: Make codec init run under ff_thread_once
This makes AAC init threadsafe.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-10-15 13:48:55 -04:00
Luca Barbato
d5eab59a53 aac: Make sure to set err on the failure path
Bug-Id: CID 1308153
2015-08-23 21:44:38 +02:00
Michael Niedermayer
7f46a641bf avcodec/aacdec: Fix integer overflow in argument to decode_audio_specific_config()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-03 01:41:13 +02:00
Michael Niedermayer
29d147c94d Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
* commit '059a934806d61f7af9ab3fd9f74994b838ea5eba':
  lavc: Consistently prefix input buffer defines

Conflicts:
	doc/examples/decoding_encoding.c
	libavcodec/4xm.c
	libavcodec/aac_adtstoasc_bsf.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.h
	libavcodec/asvenc.c
	libavcodec/avcodec.h
	libavcodec/avpacket.c
	libavcodec/dvdec.c
	libavcodec/ffv1enc.c
	libavcodec/g2meet.c
	libavcodec/gif.c
	libavcodec/h264.c
	libavcodec/h264_mp4toannexb_bsf.c
	libavcodec/huffyuvdec.c
	libavcodec/huffyuvenc.c
	libavcodec/jpeglsenc.c
	libavcodec/libxvid.c
	libavcodec/mdec.c
	libavcodec/motionpixels.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/noise_bsf.c
	libavcodec/nuv.c
	libavcodec/nvenc.c
	libavcodec/options.c
	libavcodec/parser.c
	libavcodec/pngenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/qsvdec.c
	libavcodec/svq1enc.c
	libavcodec/tiffenc.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/utvideoenc.c
	libavcodec/vc1dec.c
	libavcodec/wmalosslessdec.c
	libavformat/adxdec.c
	libavformat/aiffdec.c
	libavformat/apc.c
	libavformat/apetag.c
	libavformat/avidec.c
	libavformat/bink.c
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/id3v2.c
	libavformat/isom.c
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/mpc.c
	libavformat/mpc8.c
	libavformat/mpegts.c
	libavformat/mvi.c
	libavformat/mxfdec.c
	libavformat/mxg.c
	libavformat/nutdec.c
	libavformat/oggdec.c
	libavformat/oggparsecelt.c
	libavformat/oggparseflac.c
	libavformat/oggparseopus.c
	libavformat/oggparsespeex.c
	libavformat/omadec.c
	libavformat/rawdec.c
	libavformat/riffdec.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_qdm2.c
	libavformat/rtpdec_svq3.c
	libavformat/sierravmd.c
	libavformat/smacker.c
	libavformat/smush.c
	libavformat/spdifenc.c
	libavformat/takdec.c
	libavformat/tta.c
	libavformat/utils.c
	libavformat/vqf.c
	libavformat/westwood_vqa.c
	libavformat/xmv.c
	libavformat/xwma.c
	libavformat/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:15:19 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara
7c6eb0a1b7 lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Jovan Zelincevic
f21b4472ef libavcodec: Implementation of AAC_fixed_decoder (LC-module) [4/4]
Build system modified

There are several warnings occurring during build after this patch is
applied. The cause of most of these warnings is in that some definitions
needed here are logical part of sbr module and are added in later patches.
When this patches are applied these warnings stop occurring.

The only warning that is added here and is not fixed with later patches
is warning that warns that type mismatch for table ff_aac_eld_window_480.

The reason for this warning is in that ER AAC ELD 480 is not integrated in
to the fixed point implementation at this moment and there is no fixed point
version of this table.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:41 +02:00
Djordje Pesut
b04f46cb4b libavcodec: Implementation of AAC_fixed_decoder (LC-module) [3/4]
Add fixed point implementation

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:31 +02:00
Jovan Zelincevic
f497a9e84e libavcodec: Implementation of AAC_fixed_decoder (LC-module) [1/4]
Move existing code to the new template files

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:35:44 +02:00
Michael Niedermayer
990605768c avcodec/aacdec: Do not return a uninitialized value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 02:33:39 +02:00
Michael Niedermayer
153d23ee39 Merge commit 'bc76c46943272515805d7ac48ca39f14826d1fed'
* commit 'bc76c46943272515805d7ac48ca39f14826d1fed':
  aac: Wait to know the channels before allocating frame

Conflicts:
	libavcodec/aacdec.c

See: 676a395ab9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 02:28:44 +02:00
Michael Niedermayer
476692abdb Merge commit 'a188108ebf28ebac9d2b8fc7d5b391aef45698b3'
* commit 'a188108ebf28ebac9d2b8fc7d5b391aef45698b3':
  aac: Support channel configurations 11 and 12

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 01:31:15 +02:00
Michael Niedermayer
8eb2c411c1 Merge commit '677c804aa3a78d61b21e6423165a252846c20f0e'
* commit '677c804aa3a78d61b21e6423165a252846c20f0e':
  aac: correctly map 7.1ch-wide AAC from FDK AAC encoder

Sample: FDK_7.1ch_wide.aac
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 01:29:36 +02:00
Luca Barbato
bc76c46943 aac: Wait to know the channels before allocating frame
The channel configuration can be delivered only by the PCE,
try to parse it first and not try to decode until a channel
configuration is set.

CC: libav-stable@libav.org
2015-06-07 10:14:46 +02:00
Sebastian Dröge
a188108ebf aac: Support channel configurations 11 and 12
These are defined in ISO/IEC 14496-3:2009/PDAM 4 for 6.1 and 7.1.
It also defines another 7.1 layout with configuration 14, that one
is not added here for now.

11: 3/3.1    FC FL+FR BL+BR BC LFE
12: 3/2/2.1  FC FL+FR SiL+SiR BL+BR LFE

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-07 10:14:46 +02:00
nu774
677c804aa3 aac: correctly map 7.1ch-wide AAC from FDK AAC encoder
FDK AAC encoder outputs SCE(front)+CPE(front)+CPE(back)+CPE(back) on
MODE_7_1_REAR_SURROUND configuration.
Since decoder couldn't properly map 4 back channels, decoding failed
unless -request_channel_layout 0x8000000000000000 has been specified.
Now we treat first CPE(back) as CPE(side) on channel mapping.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-07 10:14:45 +02:00
Michael Niedermayer
1200289687 Merge commit '0289f81241e720452b5a77713488d54d3ec252d7'
* commit '0289f81241e720452b5a77713488d54d3ec252d7':
  aac: Correctly map multichannel ADTS AAC with non-zero channel_config + PCE

Conflicts:
	libavcodec/aacdec.c

Sample: 5.1ch_PCE_issue.aac
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 19:23:34 +02:00
nu774
0289f81241 aac: Correctly map multichannel ADTS AAC with non-zero channel_config + PCE
The decoder assigns channels using default channel configuration
for 5.1ch when it parses an ADTS frame header using consecutive
channel ids.

When a PCE comes, it reassigns channels using PCE configuration
using directly the ids provided. They can be arbitrary.

Always use consecutive channel ids to avoid decoding glitches due
spurious reconfigurations due the channel ids mismatch between the
two otherwise-identical channel maps.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-03 14:40:10 +02:00
Andreas Cadhalpun
a7c0c79333 aacdec: remove a duplicated line
got_frame_ptr is set again after the if block.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 01:59:51 +02:00
Andreas Cadhalpun
ec38a1ba40 aacdec: don't return frames without data
Since commit 676a395a aac->frame->data is not necessarily allocated at
the end of aac_decode_frame_int if avctx->channels is 0.

In this case a bogus frame without any data, but non-zero nb_samples is
returned.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-12 21:19:35 +02:00
Michael Niedermayer
8f7b022c8c Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
  lavc: Replace av_dlog and tprintf with internal macros

Conflicts:
	libavcodec/aacdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/bitstream.c
	libavcodec/dcadec.c
	libavcodec/dnxhddec.c
	libavcodec/dvbsubdec.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/get_bits.h
	libavcodec/gifdec.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/imc.c
	libavcodec/interplayvideo.c
	libavcodec/jpeglsdec.c
	libavcodec/libopencore-amr.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_parser.c
	libavcodec/pngdec.c
	libavcodec/ratecontrol.c
	libavcodec/rv10.c
	libavcodec/svq1dec.c
	libavcodec/vqavideo.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Andreas Cadhalpun
09bd7ddf20 aacdec: consistently use avctx for logging in decode_eld_specific_config
ac may be NULL and then accessing ac->avctx results in a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-04-19 23:45:35 +01:00
Vittorio Giovara
6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Andreas Cadhalpun
5b75689b98 aacdec: consistently use avctx for logging in decode_eld_specific_config
ac may be NULL and then accessing ac->avctx results in a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 18:44:18 +02:00
Rostislav Pehlivanov
a61c75e9f7 aacdec: Use macros for constants
This commit replaces the previous hardcoded constants with both new and previously
defined macros from aac.h. This change makes it easy for anyone reading the code
to know how encoding and decoding scalefactors works. It's also possibly
a step in unifying some of the code across both the encoder and decoder.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 18:04:02 +02:00
Michael Niedermayer
e88b3852ae avcodec/aacdec: Fix storing state before PCE decode
Fixes Ticket4460

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-09 00:42:25 +02:00
Michael Niedermayer
b5ca158935 Merge commit '87e85a133f3ce2f037b90e9c7bbca99951df6c15'
* commit '87e85a133f3ce2f037b90e9c7bbca99951df6c15':
  aac: Relax reserved_bit validation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-04 19:49:05 +01:00
Vittorio Giovara
87e85a133f aac: Relax reserved_bit validation
Although the specification mandates this bit to zero, it may happen
that software tools incorrectly flip it to one, invalidating a possibly
valid stream.

Relax this restriction, by failing only when AV_EF_BITSTREAM is set.
This behaviour is similar to aac decoders in Firefox and Quicktime.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-04 16:36:16 +00:00
Michael Niedermayer
e82b0e6126 Merge commit 'ee964145b5d229571e00bf6883a44189d02babe2'
* commit 'ee964145b5d229571e00bf6883a44189d02babe2':
  lavc: remove unused traces of fmtconvert usage

Conflicts:
	libavcodec/aac.h
	libavcodec/aacdec.c
	libavcodec/atrac3.c
	libavcodec/vorbisdec.c
	libavcodec/wma.c
	libavcodec/wma.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 23:41:36 +01:00
Anton Khirnov
ee964145b5 lavc: remove unused traces of fmtconvert usage
Those decoders have been switched to float output and so do not use
fmtconvert anymore.
2015-02-28 21:51:24 +01:00
Michael Niedermayer
ba4fba8f48 Merge commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e'
* commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e':
  aacdec: Support for ER AAC ELD 480.

Conflicts:
	libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 13:49:17 +01:00
Michael Niedermayer
dd72e26d0c Merge commit '7640c4a371a97899dfb443d980fd0bf8ac587754'
* commit '7640c4a371a97899dfb443d980fd0bf8ac587754':
  aacdec: Tables for length 480 AAC ELD.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 13:40:23 +01:00
Michael Niedermayer
f53aa3f4f3 Merge commit '0ee2573347ecdb9cb5656001f7201d819eec16d8'
* commit '0ee2573347ecdb9cb5656001f7201d819eec16d8':
  aacdec: Support for ER AAC in LATM

Conflicts:
	libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 13:31:24 +01:00
Michael Niedermayer
5348d7b605 Merge commit 'edd9ea3ffba1d5873dead1c57c74b1e3cc912167'
* commit 'edd9ea3ffba1d5873dead1c57c74b1e3cc912167':
  aacdec: Refactor aac_er_decode_frame.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 13:18:51 +01:00
Michael Niedermayer
0afc26d330 Merge commit '82bd8a57692d8f3643ad0903c97e4a0f84393f53'
* commit '82bd8a57692d8f3643ad0903c97e4a0f84393f53':
  aacdec: Refactor decode_ics_info.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 13:09:52 +01:00
Alex Converse
d615187f74 aacdec: Support for ER AAC ELD 480.
Based in part on work from Niel van der Westhuizen <espes@pequalsnp.com>.
2015-02-03 20:32:16 -08:00
Niel van der Westhuizen
7640c4a371 aacdec: Tables for length 480 AAC ELD. 2015-02-03 20:32:16 -08:00
Niel van der Westhuizen
0ee2573347 aacdec: Support for ER AAC in LATM 2015-02-03 20:32:16 -08:00
Alex Converse
edd9ea3ffb aacdec: Refactor aac_er_decode_frame. 2015-02-03 20:32:15 -08:00
Alex Converse
82bd8a5769 aacdec: Refactor decode_ics_info. 2015-02-03 20:32:15 -08:00
Michael Niedermayer
a73c411809 avcodec/aacdec: remove unneeded #include, theres no assert() in aacdec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-30 02:29:38 +01:00
Michael Niedermayer
5fe026f2bd avcodec/aacdec: reduce noisiness of missing channel elements
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-04 01:52:32 +01:00
Michael Niedermayer
61d0a6dd95 Merge commit '7464e98f74c03d3efa0cdc8d7abad06e4c3c277a'
* commit '7464e98f74c03d3efa0cdc8d7abad06e4c3c277a':
  aac: Simplify decode_mid_side_stereo

Conflicts:
	libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 21:29:48 +01:00
Michael Niedermayer
68b8e21b8b avcodec/aacdec: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 19:32:45 +01:00
Luca Barbato
7464e98f74 aac: Simplify decode_mid_side_stereo
Might spare few cycles if the compiler is naive and
makes the function more readable.
2014-12-02 15:28:22 +00:00