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-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: Make ff_alloc_packet() based encoders accept user buffersAndreas Rheinhardt
Up until now, these encoders received non-refcounted packets (whose data was owned by the corresponding AVCodecContext) from ff_alloc_packet(); these packets were made refcounted lateron by av_packet_make_refcounted() generically. This commit makes these encoders accept user-supplied buffers by replacing av_packet_make_refcounted() with an equivalent function that is based upon get_encode_buffer(). (I am pretty certain that one can also set the flag for mpegvideo- based encoders, but I want to double-check this later. What is certain is that it reallocates the buffer owned by the AVCodecContext which should maybe be moved to encode.c, so that proresenc_kostya.c and ttaenc.c can make use of it, too.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05avcodec: Constify frame->data pointers for encoders where possibleAndreas Rheinhardt
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>
2021-09-28avcodec/encoders: Remove redundant setting of AV_PKT_FLAG_KEYAndreas Rheinhardt
It is now set generically for all those encoders whose corresponding AVCodecDescriptor has the AV_CODEC_PROP_INTRA_ONLY. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-06-08avcodec/encode: Always use intermediate buffer in ff_alloc_packet2()Andreas Rheinhardt
Up until now, ff_alloc_packet2() has a min_size parameter: It is supposed to be a lower bound on the final size of the packet to allocate. If it is not too far from the upper bound (namely, if it is at least half the upper bound), then ff_alloc_packet2() already allocates the final, already refcounted packet; if it is not, then the packet is not refcounted and its data only points to a buffer owned by the AVCodecContext (in this case, the packet will be made refcounted in encode_simple_internal() in libavcodec/encode.c). The goal of this was to avoid data copies and intermediate buffers if one has a precise lower bound. Yet those encoders for which precise lower bounds exist have recently been switched to ff_get_encode_buffer() (which automatically allocates final buffers), leaving only two encoders to actually set the min_size to something else than zero (namely aliaspixenc and hapenc). Both of these encoders use a very low lower bound that is not helpful in any nontrivial case. This commit therefore removes the min_size parameter as well as the codepath in ff_alloc_packet2() for the allocation of final buffers. Furthermore, the function has been renamed to ff_alloc_packet() and moved to encode.h alongside ff_get_encode_buffer(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.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-04-27avcodec: Remove deprecated AVCodecContext.coded_frameAndreas Rheinhardt
Deprecated in 40cf1bbacc6220a0aa6bed5c331871d43f9ce370. (The currently disabled filter vf_mcdeint and vf_uspp were users of this field; they have not been changed, so that whoever wants to fix them can see the state of these filters when they were disabled.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avcodec: Remove deprecated coder type optionsAndreas Rheinhardt
Deprecated in be00ec832c519427cd92218abac77dafdc1d5487. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2020-12-04avcodec/sgienc: Combine av_log() statementsAndreas Rheinhardt
Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-04avcodec/sgienc: Mark encoder as init-threadsafeAndreas Rheinhardt
Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-19lavc/sgienc: Fix default 16bit encoding.Carl Eugen Hoyos
Broken since 7c56b879
2015-12-18Merge commit 'c34df422628e6b7b657faee241fe7bb2629e0f57'Hendrik Leppkes
* commit 'c34df422628e6b7b657faee241fe7bb2629e0f57': sgienc: Make sure to initialize skipped header portions Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-18Merge commit 'be00ec832c519427cd92218abac77dafdc1d5487'Hendrik Leppkes
* commit 'be00ec832c519427cd92218abac77dafdc1d5487': lavc: Deprecate coder_type and its symbols Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-07sgienc: Make sure to initialize skipped header portionsVittorio Giovara
Fix fate tests with asan. Introduced during bytestream2 porting (in revision 62cc8f4d79dad119e8efeaae080a58a8dcb1e89d). Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-12-07lavc: Deprecate coder_type and its symbolsVittorio Giovara
Most option values are simply unused or ignored and in practice the majory of codecs only need to check whether to enable rle or not. Add appropriate codec private options which better expose the allowed features. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-29Merge commit '99cb833fc2d9874c62fffbcd3347fae660de0fe5'Hendrik Leppkes
* commit '99cb833fc2d9874c62fffbcd3347fae660de0fe5': sgi: Correctly propagate meaningful error values Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29Merge commit '4a0918cae6394e503b17c71f8f171b4a795eb849'Hendrik Leppkes
* commit '4a0918cae6394e503b17c71f8f171b4a795eb849': sgienc: Support encoding high bit depth images with RLE Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29Merge commit '59e3f4e598ae381600ef54e1f6e6a8a5270ac245'Hendrik Leppkes
* commit '59e3f4e598ae381600ef54e1f6e6a8a5270ac245': sgienc: Use a local RLE encoding function Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29Merge commit '62cc8f4d79dad119e8efeaae080a58a8dcb1e89d'Hendrik Leppkes
* commit '62cc8f4d79dad119e8efeaae080a58a8dcb1e89d': sgienc: Port to bytestream2 Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29Merge commit '99f40fd02f1870c2dee70977b672da9cb198f0be'Hendrik Leppkes
* commit '99f40fd02f1870c2dee70977b672da9cb198f0be': sgienc: Do not end RLE lines with 0s Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-24sgi: Correctly propagate meaningful error valuesVittorio Giovara
2015-11-24sgienc: Support encoding high bit depth images with RLEVittorio Giovara
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-24sgienc: Use a local RLE encoding functionVittorio Giovara
SGI RLE encoding is slighlty different than the one provided by rle module (especially at high bit depth). The pixel count function however does not change, so it is simply made library-public.
2015-11-24sgienc: Port to bytestream2Vittorio Giovara
2015-11-24sgienc: Do not end RLE lines with 0sVittorio Giovara
This is never mentioned in the specifications, and decoders work just as fine without it. Update the fate references since the compressed file is smaller. 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-07-21Merge commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370'Michael Niedermayer
* commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370': Deprecate avctx.coded_frame Conflicts: ffmpeg.c libavcodec/a64multienc.c libavcodec/asvenc.c libavcodec/cljrenc.c libavcodec/dpxenc.c libavcodec/gif.c libavcodec/mpegvideo_enc.c libavcodec/nvenc.c libavcodec/proresenc_kostya.c libavcodec/pthread_frame.c libavcodec/rawenc.c libavcodec/sunrastenc.c libavcodec/tiffenc.c libavcodec/version.h libavcodec/xbmenc.c libavcodec/xwdenc.c libavdevice/v4l2.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'Michael Niedermayer
* commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534': Gather all coded_frame allocations and free functions to a single place Conflicts: libavcodec/a64multienc.c libavcodec/asvenc.c libavcodec/cljrenc.c libavcodec/dpxenc.c libavcodec/dvenc.c libavcodec/gif.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libopenjpegenc.c libavcodec/libtheoraenc.c libavcodec/libvpxenc.c libavcodec/mpegvideo_enc.c libavcodec/nvenc.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/sunrastenc.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/v210enc.c libavcodec/v410enc.c libavcodec/xbmenc.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20Deprecate avctx.coded_frameVittorio Giovara
The rationale is that coded_frame was only used to communicate key_frame, pict_type and quality to the caller, as well as a few other random fields, in a non predictable, let alone consistent way. There was agreement that there was no use case for coded_frame, as it is a full-sized AVFrame container used for just 2-3 int-sized properties, which shouldn't even belong into the AVCodecContext in the first place. The appropriate AVPacket flag can be used instead of key_frame, while quality is exported with the new AVPacketSideData quality factor. There is no replacement for the other fields as they were unreliable, mishandled or just not used at all. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20Gather all coded_frame allocations and free functions to a single placeVittorio Giovara
Allocating coded_frame is what most encoders do anyway, so it makes sense to always allocate and free it in a single place. Moreover a lot of encoders freed the frame with av_freep() instead of the correct API av_frame_free(). This bring uniformity to encoder behaviour and prevents applications from erroneusly accessing this field when not allocated. Additionally this helps isolating encoders that export information with coded_frame, and heavily simplifies its deprecation. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-09avcodec/sgienc: return meaningful error codePaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-04-01Merge commit '6c1df1f2287401b6022773e382ebc3a3bfed0b38'Michael Niedermayer
* commit '6c1df1f2287401b6022773e382ebc3a3bfed0b38': sgi: encode images with 4 channels at 8 and 16 bits Conflicts: Changelog libavcodec/sgienc.c See: 21a100610977a163fe6480b5cf4c25f34f64b86b Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-01Merge commit 'e7cd53bf662a93330810981f1d057bdf2ead669e'Michael Niedermayer
* commit 'e7cd53bf662a93330810981f1d057bdf2ead669e': sgi: check maximum supported resolution Conflicts: libavcodec/sgienc.c See: 59352cc219c4f933c9a83b45043ec4810c2a51ee Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-01Merge commit 'a7dbfcf6cb6ab8a8981d74332fd02fb90360d22f'Michael Niedermayer
* commit 'a7dbfcf6cb6ab8a8981d74332fd02fb90360d22f': sgi: K&R formatting cosmetics Conflicts: libavcodec/sgidec.c libavcodec/sgienc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-01sgi: encode images with 4 channels at 8 and 16 bitsVittorio Giovara
2014-04-01sgi: check maximum supported resolutionPiotr Bandurski
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-01sgi: K&R formatting cosmeticsVittorio Giovara
2013-11-17Merge commit 'e4155f15b35c4272a235f5521d2dc6c2aabdd462'Michael Niedermayer
* commit 'e4155f15b35c4272a235f5521d2dc6c2aabdd462': eamad: use the AVFrame API properly. dpxenc: use the AVFrame API properly. bmpenc: use the AVFrame API properly. sgienc: use the AVFrame API properly. Conflicts: libavcodec/bmpenc.c libavcodec/dpxenc.c libavcodec/eamad.c libavcodec/sgienc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-16sgienc: use the AVFrame API properly.Anton Khirnov
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-07-26sgienc: remove unused SgiContextPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-08Merge commit '716d413c13981da15323c7a3821860536eefdbbb'Michael Niedermayer
* commit '716d413c13981da15323c7a3821860536eefdbbb': Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat Conflicts: doc/examples/muxing.c ffmpeg.h ffmpeg_filter.c ffmpeg_opt.c ffplay.c ffprobe.c libavcodec/8bps.c libavcodec/aasc.c libavcodec/aura.c libavcodec/avcodec.h libavcodec/avs.c libavcodec/bfi.c libavcodec/bmp.c libavcodec/bmpenc.c libavcodec/c93.c libavcodec/cscd.c libavcodec/cyuv.c libavcodec/dpx.c libavcodec/dpxenc.c libavcodec/eatgv.c libavcodec/escape124.c libavcodec/ffv1.c libavcodec/flashsv.c libavcodec/fraps.c libavcodec/h264.c libavcodec/huffyuv.c libavcodec/iff.c libavcodec/imgconvert.c libavcodec/indeo3.c libavcodec/kmvc.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libx264.c libavcodec/ljpegenc.c libavcodec/mjpegdec.c libavcodec/mjpegenc.c libavcodec/motionpixels.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo_enc.c libavcodec/pamenc.c libavcodec/pcxenc.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/pnm.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/ptx.c libavcodec/qdrw.c libavcodec/qpeg.c libavcodec/qtrleenc.c libavcodec/raw.c libavcodec/rawdec.c libavcodec/rl2.c libavcodec/sgidec.c libavcodec/sgienc.c libavcodec/snowdec.c libavcodec/snowenc.c libavcodec/sunrast.c libavcodec/targa.c libavcodec/targaenc.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/tmv.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/vb.c libavcodec/vp3.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/xwddec.c libavcodec/xwdenc.c libavcodec/yop.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/drawutils.c libavfilter/formats.c libavfilter/src_movie.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_format.c libavfilter/vf_hflip.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/movenc.c libavformat/mxf.h libavformat/utils.c libavformat/yuv4mpeg.c libavutil/imgutils.c libavutil/pixdesc.c libswscale/input.c libswscale/output.c libswscale/swscale_internal.h libswscale/swscale_unscaled.c libswscale/utils.c libswscale/x86/swscale_template.c libswscale/x86/yuv2rgb.c libswscale/x86/yuv2rgb_template.c libswscale/yuv2rgb.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov
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