Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-29avcodec/codec_internal: Avoid deprecation warnings for channel_layoutsAndreas Rheinhardt
AVCodec.channel_layouts is deprecated and Clang (unlike GCC) warns when setting this field in a codec definition. Fortunately, Clang (unlike GCC) allows to use FF_DISABLE_DEPRECATION_WARNINGS inside a definition (of an FFCodec), so that one can create simple macros to set AVCodec.channel_layouts that also suppress deprecation warnings for Clang. (Notice that some of the codec definitions were already inside FF_DISABLE/ENABLE_DEPRECATION_WARNINGS (that were not guarded by FF_API_OLD_CHANNEL_LAYOUT); these have been removed. Also notice that setting AVCodec.channel_layouts was not guarded by FF_API_OLD_CHANNEL_LAYOUT either, so testing disabling it it without removing all the codeblocks would not have worked.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-03avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt
It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-27avcodec/internal: Move ff_samples_to_time_base() to encode.hAndreas Rheinhardt
It is only used by encoders; in fact, AVCodecContext.time_base is only used by encoders, so it is only useful for encoders. Also constify the AVCodecContext parameter in it. Also fixup the other headers a bit while removing now unnecessary internal.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-18avcodec: Make init-threadsafety the defaultAndreas Rheinhardt
and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-05avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt
This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt
Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt
Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-15g722: convert to new channel layout APIAnton Khirnov
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-22avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt
Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-05avcodec/g722enc: Avoid copying packet data, allow user-supplied buffersAndreas Rheinhardt
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-02avcodec/g722enc: Mark encoder as init-threadsafeAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-04-27avcodec: Constify AVCodecsAndreas Rheinhardt
Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-08avcodec/g722enc: Validate parameters before using themAndreas Rheinhardt
In case trellis is outside of 0..23, an invalid shift and/or a signed integer overflow happens; furthermore, it can lead to the request to allocate nonsense amounts of memory. So validate first. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-19avcodec/g722enc: Cleanup generically on init failureAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2017-06-26avcodec/g722enc: force mono channel layoutKyle Swanson
Signed-off-by: Kyle Swanson <k@ylo.ph>
2015-07-27Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer
* 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-27lavc: AV-prefix all codec capabilitiesVittorio Giovara
Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer
This parameter can be used to inform the allocation code about how much downsizing might occur, and can be used to optimize how to allocate the packet Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-02-21Merge commit '9abc80f1ed673141326341e26a05c3e1f78576d0'Michael Niedermayer
* commit '9abc80f1ed673141326341e26a05c3e1f78576d0': libavcodec: Make use of av_clip functions Conflicts: libavcodec/takdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21libavcodec: Make use of av_clip functionsPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-16Merge commit '10f160768b824f00933f33bc69f1fae89a25dfc8'Michael Niedermayer
* commit '10f160768b824f00933f33bc69f1fae89a25dfc8': g722: Reduce number of pointers passed to g722_apply_qmf() function Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-16Merge commit '67690683130faf37dd9d969ced15eba2a1940ade'Michael Niedermayer
* commit '67690683130faf37dd9d969ced15eba2a1940ade': g722: Split out g722_qmf_apply() function into g722dsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-15g722: Reduce number of pointers passed to g722_apply_qmf() functionPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-15g722: Split out g722_qmf_apply() function into g722dsp.cPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-16avcodec/g722enc: Use av_mallocz_array()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-14Merge commit '2df0c32ea12ddfa72ba88309812bfb13b674130f'Michael Niedermayer
* commit '2df0c32ea12ddfa72ba88309812bfb13b674130f': lavc: use a separate field for exporting audio encoder padding Conflicts: libavcodec/audio_frame_queue.c libavcodec/avcodec.h libavcodec/libvorbisenc.c libavcodec/utils.c libavcodec/version.h libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13lavc: use a separate field for exporting audio encoder paddingAnton Khirnov
Currently, the amount of padding inserted at the beginning by some audio encoders, is exported through AVCodecContext.delay. However - the term 'delay' is heavily overloaded and can have multiple different meanings even in the case of audio encoding. - this field has entirely different meanings, depending on whether the codec context is used for encoding or decoding (and has yet another different meaning for video), preventing generic handling of the codec context. Therefore, add a new field -- AVCodecContext.initial_padding. It could conceivably be used for decoding as well at a later point.
2013-10-04Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer
* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun
2013-08-30Reinstate proper FFmpeg license for all files.Thilo Borgmann
2013-03-13Merge commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5'Michael Niedermayer
* commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5': lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft Conflicts: libavcodec/flacenc.c libavcodec/libgsm.c libavcodec/utils.c libavcodec/version.h The compatibility wrapers are left as they likely sre still in wide use. They will be removed when they break or otherwise cause work without an volunteer being available. Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-09lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruftAnton Khirnov
2013-03-07normalize calls to ff_alloc_packet2James Zern
- check ret < 0 - remove excessive error log Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10Merge commit '6d0beefbf6ee6dbf8efb522a9307e54c6ed5f702'Michael Niedermayer
* commit '6d0beefbf6ee6dbf8efb522a9307e54c6ed5f702': swscale: Do not make ff_ symbols globally visible. rtspdec: use av_strlcpy for writing into fixed size buffer g722enc: fix size argument in memset http: use av_strlcpy instead of strcpy() without size checks avfilter: correct memcpy size avfilter_copy_buf_props() lavc: split asv12 encoder/decoder Conflicts: libavcodec/asvdec.c libavfilter/buffer.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-09g722enc: fix size argument in memsetJanne Grunau
Fixes CID700725.
2012-08-16Merge remote-tracking branch 'qatar/master'Michael Niedermayer
* qatar/master: Fix even more missing includes after the common.h removal build: Factor out rangecoder dependencies to CONFIG_RANGECODER build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE x86: avcodec: Consistently name all init files Add more missing includes after removing the implicit common.h Add some more missing includes after removing the implicit common.h Don't include common.h from avutil.h rtmp: Automatically compute the hash for SWFVerification Conflicts: configure doc/APIchanges doc/examples/decoding_encoding.c libavcodec/Makefile libavcodec/assdec.c libavcodec/audio_frame_queue.c libavcodec/avpacket.c libavcodec/dv_profile.c libavcodec/dwt.c libavcodec/libtheoraenc.c libavcodec/rawdec.c libavcodec/rv40dsp.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/v210dec.h libavcodec/vc1dsp.c libavcodec/x86/Makefile libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/buffer.c libavfilter/formats.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_select.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/version.h libavutil/audioconvert.c libavutil/error.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-15Don't include common.h from avutil.hMartin Storsjö
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-08Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer
* 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>
2012-08-07Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov
2012-08-01g722enc: switch to av_assertMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08Merge remote-tracking branch 'qatar/master'Michael Niedermayer
* qatar/master: rtpdec_asf: Set the no_resync_search option for the chained asf demuxer asfdec: Add an option for not searching for the packet markers cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others cosmetics: Align codec declarations cosmetics: Convert mimic.c to utf-8 avconv: remove an unused function parameter. avconv: remove now pointless variables. avconv: drop support for building without libavfilter. nellymoserenc: fix crash due to memsetting the wrong area. libavformat: Only require first packet to be known for audio/video streams avplay: Don't try to scale timestamps if the tb isn't set Conflicts: Changelog configure ffmpeg.c libavcodec/aacenc.c libavcodec/bmpenc.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/ffv1.c libavcodec/flacenc.c libavcodec/fraps.c libavcodec/huffyuv.c libavcodec/libopenjpegdec.c libavcodec/mpeg12enc.c libavcodec/mpeg4videodec.c libavcodec/pamenc.c libavcodec/pgssubdec.c libavcodec/pngenc.c libavcodec/qtrleenc.c libavcodec/rawdec.c libavcodec/sgienc.c libavcodec/tiffenc.c libavcodec/v210dec.c libavcodec/wmv2dec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06cosmetics: Align codec declarationsMartin Storsjö
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-03-23cosmetics: remove superfluous curly bracketsPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-22g722enc: switch to ff_alloc_packet2()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-21g722enc: use AVCodec.encode2()Justin Ruggles
FATE reference updated due timestamp rounding because of resampling from 44100 Hz to 16000 Hz in avconv.
2012-03-02g722: Fix the QMF scalingMartin Storsjö
This fixes clipping if the encoder input used the full 16 bit input range (samples with a magnitude below 16383 worked fine). The filtered subband samples should be 15 bit maximum, while the code earlier produced them scaled to 16 bit. This makes the decoder output have double the magnitude compared to before. The spec reference samples doesn't test the QMF at all, which was why this part slipped past initially. Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-25g722enc: check for trellis data allocation errorJustin Ruggles
2012-01-07g722enc: validate AVCodecContext.trellisJustin Ruggles
2012-01-07g722enc: set frame_size, and also handle an odd number of input samplesJustin Ruggles
The fate reference is updated because the previous test skipped a sample in each encode() call due each input frame having an odd number of samples.
2012-01-07g722enc: split encoding into separate functions for trellis vs. no trellisJustin Ruggles