summaryrefslogtreecommitdiffstats
path: root/libavformat/latmenc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-12/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | avformat/latmenc: auto-insert aac_adtstoasc bitstream filter when neededJames Almer2016-03-301-5/+15
| | | | | | | | | | Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/latmenc: Add assert to avoid coverity warningMichael Niedermayer2015-09-031-1/+2
| | | | | | | | | | | | Fixes CID1322323 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-141-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e': avformat: Don't anonymously typedef structs Conflicts: libavformat/adtsenc.c libavformat/aiffenc.c libavformat/avidec.c libavformat/gif.c libavformat/iff.c libavformat/img2dec.c libavformat/jvdec.c libavformat/matroskadec.c libavformat/udp.c libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Don't anonymously typedef structsDiego Biurrun2015-02-141-1/+1
| |
* | Merge commit 'f792d3cbb8e8e35c54a9358a55dd596b7a40f228'Michael Niedermayer2014-06-181-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'f792d3cbb8e8e35c54a9358a55dd596b7a40f228': lavf: add the notimestamps flag to the muxers missing it Conflicts: libavformat/adtsenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: add the notimestamps flag to the muxers missing itAnton Khirnov2014-06-181-0/+1
| |
* | Reinstate proper FFmpeg license for all files.Thilo Borgmann2013-08-301-4/+4
| |
* | avformat/latmenc: use init_get_bits8()Michael Niedermayer2013-08-051-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | latmenc: Check for LOAS sync wordJames Almer2013-01-171-0/+9
| | | | | | | | | | | | | | | | | | Write the packet unaltered if found. Fixes ticket #1917 Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'Michael Niedermayer2012-09-051-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9': avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member Conflicts: libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libx264.c libavcodec/mpeg12enc.c libavcodec/options_table.h libavcodec/snowenc.c libavcodec/tiffenc.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/af_amix.c libavfilter/af_asyncts.c libavfilter/af_join.c libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_delogo.c libavfilter/vf_drawtext.c libavformat/http.c libavformat/img2dec.c libavformat/img2enc.c libavformat/movenc.c libavformat/mpegenc.c libavformat/mpegtsenc.c libavformat/options_table.h libavformat/segment.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-041-1/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-2/+2
| |
* | latmenc: replace per-frame malloc/free by constant size buffer.Reimar Döffinger2012-04-141-10/+4
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: validate extradata size.Reimar Döffinger2012-04-121-2/+8
| | | | | | | | | | | | | | | | | | Fixes potential out-of-bounds writes. This is mostly possible when muxing ALS files where from an extradata size of about 1050 put_bits would write data outside the buffer. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: simplify using avpriv_copy_bits.Reimar Döffinger2012-04-121-6/+4
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: Document assumptions when copying the AAC header.Reimar Döffinger2012-04-121-0/+2
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: copy pce config from proper location.Reimar Döffinger2012-04-121-3/+3
| | | | | | | | | | | | | | | | | | For the FATE test sample used, this only avoids a warning message. However for other samples like al05_44.mp4 the converted file can be played only after this fix. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: fix muxing of byte-aligned DSE.Reimar Döffinger2012-04-121-1/+14
| | | | | | | | | | | | | | | | This will only work for DSEs that are first in a packet, but that is enough to fix handling of the reference files in fate-suite/aac (though most of them still have other issues). Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: error out when packet size is too large.Reimar Döffinger2012-04-111-1/+11
| | | | | | | | | | | | | | Previously it would just silently write out incorrect data. This also fixes a potential integer overflow in the allocation. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: Fix ALS in LATM.Reimar Döffinger2012-04-111-2/+7
| | | | | | | | | | | | | | | | "Fix" in so far as at least it will no longer overread and possibly crash and makes somewhat sense, but no idea whether there is anything that can play the resulting files (FFmpeg can't). Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: remove unused return value.Reimar Döffinger2012-04-111-3/+1
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | latmenc: remove dead code.Reimar Döffinger2012-04-111-3/+0
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-031-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aac_latm: reconfigure decoder on audio specific config changes latmdec: fix audio specific config parsing Add avcodec_decode_audio4(). avcodec: change number of plane pointers from 4 to 8 at next major bump. Update developers documentation with coding conventions. svq1dec: avoid undefined get_bits(0) call ARM: h264dsp_neon cosmetics ARM: make some NEON macros reusable Do not memcpy raw video frames when using null muxer fate: update asf seektest vp8: flush buffers on size changes. doc: improve general documentation for MacOSX asf: use packet dts as approximation of pts asf: do not call av_read_frame rtsp: Initialize the media_type_mask in the rtp guessing demuxer Cleaned up alacenc.c Conflicts: doc/APIchanges doc/developer.texi libavcodec/8svx.c libavcodec/aacdec.c libavcodec/ac3dec.c libavcodec/avcodec.h libavcodec/nellymoserdec.c libavcodec/tta.c libavcodec/utils.c libavcodec/version.h libavcodec/wmadec.c libavformat/asfdec.c tests/ref/seek/lavf_asf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * latmdec: fix audio specific config parsingJanne Grunau2011-12-031-1/+1
| | | | | | | | | | | | | | | | | | Pass the correct size in bits to mpeg4audio_get_config and add a flag to disable parsing of the sync extension when the size is not known. Latm with AudioMuxVersion 0 does not specify the size of the audio specific config. Data after the audio specific config can be misinterpreted as sync extension resulting in random and wrong configs.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-211-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (47 commits) lavc: hide private symbols. lavc: deprecate img_get_alpha_info(). lavc: use avpriv_ prefix for ff_toupper4. lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits. lavc: use avpriv_ prefix for ff_ac3_parse_header. lavc: use avpriv_ prefix for ff_frame_rate_tab. lavc: rename ff_find_start_code to avpriv_mpv_find_start_code lavc: use avpriv_ prefix for ff_split_xiph_headers. lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header. lavc: use avpriv_ prefix for some dv symbols used in lavf. lavc: use avpriv_ prefix for some flac symbols used in lavf. lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf. lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf. lavc: use avpriv_ prefix for ff_aac_parse_header(). lavf: hide private symbols. lavf: use avpriv_ prefix for some dv functions. lavf: use avpriv_ prefix for ff_new_chapter(). avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2() avcodec: clarify documentation of CODEC_CAP_DELAY ... Conflicts: configure doc/general.texi libavcodec/Makefile libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dv.c libavcodec/dvdata.c libavcodec/dvdata.h libavcodec/libspeexenc.c libavcodec/mpegvideo.c libavcodec/version.h libavformat/avidec.c libavformat/dv.c libavformat/dv.h libavformat/flvenc.c libavformat/mov.c libavformat/mp3enc.c libavformat/oggparsespeex.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.Anton Khirnov2011-10-201-3/+3
| | | | | | | | They are used in lavf.
| * lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.Anton Khirnov2011-10-201-2/+2
| | | | | | | | | | Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and ff_copy_pce_data
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-131-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) tiffenc: initialize forgotten avctx. avplay: free the active audio packet at exit. avplay: free rdft data used for spectrogram analysis. log.h: make AVClass a named struct fix ac3 encoder documentation vc1: more prettyprinting cosmetics vc1: prettyprint some tables vc1: K&R formatting cosmetics AVOptions: bump minor and add APIchanges entry. cmdutils/avtools: simplify show_help() by using av_opt_child_class_next() AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* Remove all uses of deprecated AVOptions API. AVOptions: add av_opt_next, deprecate av_next_option. AVOptions: add functions for evaluating option strings. AVOptions: split get_number(). AVOptions: add av_opt_get*, deprecate av_get*. AVOptions: add av_opt_set*(). AVOptions: add new API for enumerating children. rv34: move inverse transform functions to DSP context flvenc: Write the right metadata entry count ... Conflicts: avconv.c cmdutils.c doc/APIchanges ffplay.c ffprobe.c libavcodec/ac3dec.c libavcodec/h264.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mpeg12enc.c libavcodec/options.c libavdevice/libdc1394.c libavdevice/v4l2.c libavfilter/vf_drawtext.c libavformat/flvdec.c libavformat/mpegtsenc.c libavformat/options.c libavutil/avutil.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov2011-10-121-1/+1
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (34 commits) dpcm: return error if packet is too small dpcm: use smaller data types for static tables dpcm: use sol_table_16 directly instead of through the DPCMContext. dpcm: replace short with int16_t dpcm: check to make sure channels is 1 or 2. dpcm: misc pretty-printing dpcm: remove unnecessary variable by using bytestream functions. dpcm: move codec-specific variable declarations to their corresponding decoding blocks. dpcm: consistently use the variable name 'n' for the next input byte. dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2. dpcm: calculate and check actual output data size prior to decoding. dpcm: factor out the stereo flag calculation dpcm: cosmetics: rename channel_number to ch avserver: Fix a bug where the socket is IPv4, but IPv6 is autoselected for the loopback address. lavf: Avoid using av_malloc(0) in av_dump_format dxva2_h264: pass the correct 8x8 scaling lists dca: NEON optimised high freq VQ decoding avcodec: reject audio packets with NULL data and non-zero size dxva: Add ability to enable workaround for older ATI cards latmenc: Set latmBufferFullness to largest value to indicate it is not used ... Conflicts: libavcodec/dxva2_h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * latmenc: Set latmBufferFullness to largest value to indicate it is not usedKieran Kunhya2011-09-301-1/+1
| | | | | | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-291-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) avconv: Reformat s16 volume adjustment. ARM: NEON optimised vector_fmac_scalar() dca: use vector_fmac_scalar from dsputil dsputil: add vector_fmac_scalar() latmenc: Fix private options vf_unsharp: store hsub/vsub in the filter context vf_unsharp: adopt a more natural order of params in apply_unsharp() vf_unsharp: rename method "unsharpen" to "apply_unsharp" vf_scale: apply the same transform to the aspect during init that is applied per frame vf_pad: fix "vsub" variable value computation vf_scale: add a "sar" variable lavfi: fix realloc size computation in avfilter_add_format() vsrc_color: use internal timebase lavfi: fix signature for avfilter_graph_parse() and avfilter_graph_config() graphparser: prefer void * over AVClass * for log contexts avfiltergraph: use meaningful error codes avconv: Initialize return value for codec copy path. fate: use 'run' helper for seek-test fate: remove seek-mpeg2reuse test Fix memory (re)allocation in matroskadec.c, related to MSVR-11-0080. ... Conflicts: doc/filters.texi libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/avfiltergraph.h libavfilter/graphparser.c libavfilter/vf_scale.c libavfilter/vsrc_color.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * latmenc: Fix private optionsKieran Kunhya2011-09-281-0/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Add loas as an extension for LOAS/LATM.Carl Eugen Hoyos2011-09-081-1/+1
| |
* | Support remuxing aac_latm.Carl Eugen Hoyos2011-09-081-0/+7
|/
* Add LATM muxerKieran Kunhya2011-09-071-0/+190
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
OpenPOWER on IntegriCloud