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-07-30avcodec/proresdata: Move data only used by ff_prores_ks_encoder to itAndreas Rheinhardt
In this case, this allows to inline the initial run_cb and lev_cb values. 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-02-11avcodec/proresenc_kostya: Use av_calloc/av_malloc_array()Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11avcodec/proresenc_kostya: Cleanup generically after init failureAndreas Rheinhardt
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-05-02avcodec/proresenc_kostya: 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-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-10avcodec/proresenc_kostya: Remove harmful checkAndreas Rheinhardt
The ProRes encoder allocates huge worst-case buffers just to be safe; and for huge resolutions (8k in this case) these can be so big that the number of bits does no longer fit into a (signed 32-bit) int; this means that one must no longer use the parts of the PutBits API that deal with bit counters. Yet proresenc_kostya did it, namely for a check about whether we are already beyond the end. Yet this check is unnecessary nowadays, because the PutBits API comes with automatic checks (with a log message and a av_assert2() in put_bits() and an av_assert0() in flush_put_bits()), so this is unnecessary. So simply remove the check. Fixes ticket #9173. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-03-30avcodec/proresenc_kostya: Factor flushing PutBitContext outAndreas Rheinhardt
The function to write an ordinary (luma or chroma) plane as well as the function for writing an alpha plane have some similarities: They record the initial bitposition (despite said position always being byte-aligned), flush the PutBitContext themselves and return the amount of bytes they wrote. This commit factors this out; it also replaces bitpositions by bytepositions and it avoids recording the initial byteposition because said information is already available from the position at the end of the last plane. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-01lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov
They are not properly namespaced and not intended for public use.
2020-05-21avcodec: deprecate Lossless and Intra Only encoder capabilitesJames Almer
Both are codec properties and not encoder capabilities. The relevant AVCodecDescriptor.props flags exist for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
2020-03-18remove CHAR_MIN/CHAR_MAX usagePaul B Mahol
It is not needed at all.
2018-12-30avcodec/prores_ks: Fix luma quantization if q >= MAX_STORED_QAlex Mogurenko
The problem occurs in slice quant estimation and slice encoding: If the slice quant is larger than MAX_STORED_Q we don't use pre-calculated quant matrices, but generate a new one, but both qmat and qmat_chroma both point to the same table, so the luma table ends up having chroma table values. Add custom_chroma_q the same way as custom_q. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-11-05prores: Use profile names in the various encoders and decodersVittorio Giovara
Export FF_PROFILE_PRORES_* symbols publicly, add a missing one.
2018-04-22avcodec/prores_ks : use official quant_matrix (for proxy and xq codec luma ↵Martin Vignali
and chroma quant matrix is not the same) disable the use of the official luma xq matrix for now (output appear to be desaturate)
2018-04-05avcodec/prores_ks : do not call estimate_alpha at each quantification stepMartin Vignali
also remove unused arg in estimate_alpha_plane Improve quality of Prores 4444 encoding
2017-06-27avcodec/proresenc_kostya: add 4444XQ profilePaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-26avcodec/proresenc_kostya: enable frame threadingPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-26avcodec/proresenc_kostya: use frame metadata instead of avctxPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-25avcodec/prores_kostya: increase bits usage when alpha is usedPaul B Mahol
Also fix undefined left shift of negative variable. Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-19Merge commit '3fd22538bc0e0de84b31335266b4b1577d3d609e'James Almer
* commit '3fd22538bc0e0de84b31335266b4b1577d3d609e': prores: Change type of stride parameters to ptrdiff_t Merged-by: James Almer <jamrial@gmail.com>
2015-07-28Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer
* 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-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-27Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
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-20Merge commit '05fb4c9aaf84b59f8ab1ce8d4c0f49dd12113024'Michael Niedermayer
* commit '05fb4c9aaf84b59f8ab1ce8d4c0f49dd12113024': proresenc: Do not entangle coded_frame Conflicts: libavcodec/proresenc_kostya.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-04-23Merge commit '0a51c7d42a519c63178a4f3e35b8967f21da3a6a'Michael Niedermayer
* commit '0a51c7d42a519c63178a4f3e35b8967f21da3a6a': prores: Set the bits_per_coded_sample for alpha pix_fmt Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-22avcodec: use av_mod_uintp2() where usefulJames Almer
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
2015-03-03avcodec/proresenc_kostya: fix coded_frame handlingClément Bœsch
2015-02-26Fix buffer_size argument to init_put_bits() in multiple encoders.Dyami Caliri
Several encoders were multiplying the buffer size by 8, in order to get a bit size. However, the buffer_size argument is for the byte size of the buffer. We had experienced crashes encoding prores (Anatoliy) at size 4096x4096.
2014-12-15Merge commit '4690e01c3aaf495c87127e5dc74aa347197dbc0b'Michael Niedermayer
* commit '4690e01c3aaf495c87127e5dc74aa347197dbc0b': prores: Evaluate all the quantizers Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-11proresenc_ks: use chroma sampling in autoselectionChristophe Gisquet
If the chroma planes aren't subsampled, automatically select the 4:4:4:4 profile. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-07avcodec/proresenc_kostya: use av_freep(), do not leave stale pointers in memoryMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-30proresenc_ks: allow auto-selecting profileChristophe Gisquet
The user may not know how to select the profile, nor what he needs, in particular to encode alpha. Therefore, use an automatic selection as default, and warn when the manually selected profile may cause issues. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-19avcodec/proresenc_kostya: allocate 1 slice more to avoid triggering the ↵Michael Niedermayer
reallocation warning when the used space is actually less than the allocated Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-19avcodec/proresenc_kostya: set initial max_slice_size based on ↵Michael Niedermayer
frame_size_upper_bound If the initial max_slice_size is 0 then reallocation is disabled for the first slice. Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-18Merge commit '41e1354c101004ccd46dc08d3dd6e956e83a6b51'Michael Niedermayer
* commit '41e1354c101004ccd46dc08d3dd6e956e83a6b51': proresenc: Properly account for alpha plane Conflicts: libavcodec/proresenc_kostya.c See: 117bc8e6ffc744fedcf77edf2fdb33c964b83370 Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-18Merge commit '45ce880a9b3e50cfa088f111dffaf8685bd7bc6b'Michael Niedermayer
* commit '45ce880a9b3e50cfa088f111dffaf8685bd7bc6b': proresenc: Realloc if buffer is too small Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-18Merge commit '58b68e4fdea22e22178e237bda950b09cc6f363a'Michael Niedermayer
* commit '58b68e4fdea22e22178e237bda950b09cc6f363a': proresenc: Report buffer overflow Conflicts: libavcodec/proresenc_kostya.c See: 52b81ff4635c077b2bc8b8d3637d933b6629d803 Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-18Merge commit 'b16699f2da9c1d41eff852ec3a0c81f74fd44421'Michael Niedermayer
* commit 'b16699f2da9c1d41eff852ec3a0c81f74fd44421': proresenc: Remove unneeded parameters from encode_alpha_plane() Conflicts: libavcodec/proresenc_kostya.c See: bf10f09bccdcfdb41b9f5bbae01d55961bfd0693 Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14proresenc_kostya: properly account for alphaChristophe Gisquet
The packet buffer allocation considered as dct-coded, while it is actually run-coded and thus requires a larger buffer. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-12proresenc_kostya: report buffer overflowChristophe Gisquet
If the allocated size, despite best efforts, is too small, exit with the appropriate error. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>