summaryrefslogtreecommitdiff
path: root/libavcodec/dvenc.c
Commit message (Collapse)AuthorAge
* avcodec/encoders: Remove redundant setting of AV_PKT_FLAG_KEYAndreas Rheinhardt2021-09-28
| | | | | | | 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>
* avcodec/dvenc: Avoid copying packet data, allow user-supplied buffersAndreas Rheinhardt2021-06-08
| | | | | | | | | | | | When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data; this also makes it easy to allow user-supplied buffers. Only one thing needed to be changed: The earlier code relied on the buffer having been initially zeroed by av_fast_padded_malloc(), so one now needs to zero the packet at first. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dvenc: Make encoder init-threadsafeAndreas Rheinhardt2021-05-06
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | 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>
* avcodec: Remove deprecated AVCodecContext.coded_frameAndreas Rheinhardt2021-04-27
| | | | | | | | | | 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>
* avcodec/dvenc: Avoid using PutBitContext fields directlyAndreas Rheinhardt2021-03-30
| | | | | | Also avoid using bitcounts in case one is actually byte-aligned. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dvenc: Remove dead error messageAndreas Rheinhardt2021-03-30
| | | | | | | The PutBits API checks the available space before every write, so this check for overread is dead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dvenc: dv100_weight_shift never usedPeter Ross2021-01-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* avcodec/dvenc: Fix undefined left shift of negative numbersAndreas Rheinhardt2020-10-04
| | | | | | | | | The earlier code was based on the assumption that AVFrame.linesize can not be negative. Fixes ticket #8280. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: deprecate Lossless and Intra Only encoder capabilitesJames Almer2020-05-21
| | | | | | | 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>
* avcodec/dvenc: support encoding dvcprohdBaptiste Coudurier2019-11-13
|
* avcodec/dvenc: Change quantizer dead zone default to 7Michael Niedermayer2017-08-08
| | | | | | This improves the quality and reduces the "blocking" in flat areas Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dvenc: Support adjusting the quantizer deadzoneMichael Niedermayer2017-08-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'de452e503734ebb0fdbce86e9d16693b3530fad3'Clément Bœsch2017-03-20
|\ | | | | | | | | | | | | * commit 'de452e503734ebb0fdbce86e9d16693b3530fad3': pixblockdsp: Change type of stride parameters to ptrdiff_t Merged-by: Clément Bœsch <u@pkh.me>
| * pixblockdsp: Change type of stride parameters to ptrdiff_tDiego Biurrun2016-09-14
| | | | | | | | | | | | | | This avoids SIMD-optimized functions having to sign-extend their line size argument manually to be able to do pointer arithmetic. Also adjust parameter names to be "stride" everywhere.
* | Merge commit 'b7f98659f21dce438c33b512e25fd64b8d07c347'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit 'b7f98659f21dce438c33b512e25fd64b8d07c347': Remove unnecessary get_bits.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Remove unnecessary get_bits.h #includesDiego Biurrun2016-06-07
| |
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer2015-07-27
| | | | | | | | | | | | | | | | 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>
* | Merge commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370'Michael Niedermayer2015-07-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Deprecate avctx.coded_frameVittorio Giovara2015-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'Michael Niedermayer2015-07-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Gather all coded_frame allocations and free functions to a single placeVittorio Giovara2015-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | avcodec: use av_mod_uintp2() where usefulJames Almer2015-04-21
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | dvenc: fix 2x4x8 (interlaced) weight tableChristophe Gisquet2015-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the decoder has been fixed to output something similar to other implementations, the encoder weight table needed this fix. Reference PSNR values on a progressive sequence (from tiny_psnr) from a chained encoding and decoding: Full progressive: stddev: 0.74 PSNR: 50.69 MAXDIFF: 19 Before: stddev: 1.43 PSNR: 44.97 MAXDIFF: 17 This patch: stddev: 0.76 PSNR: 50.44 MAXDIFF: 14 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | replaced av_dv_codec_profile by av_dv_codec_profile2 in encoder and dv muxersSteve Jiekak2014-12-04
| | | | | | | | | | Signed-off-by: Steve Jiekak <devaureshy@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dvenc: mark encoder as intraChristophe Gisquet2014-10-28
| | | | | | | | | | | | And thus allow various multithreading. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ee0ebd3c1412fdd9d80aa97c98d1a20b893f1f47'Michael Niedermayer2014-09-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ee0ebd3c1412fdd9d80aa97c98d1a20b893f1f47': dv: K&R formatting cosmetics Conflicts: libavcodec/dv.c libavcodec/dv.h libavcodec/dv_profile.c libavcodec/dvdec.c libavcodec/dvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dv: K&R formatting cosmeticsGabriel Dume2014-09-09
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '7835c24e19d9e1cb43fba5a02ce9d81d518f1300'Michael Niedermayer2014-08-03
|\| | | | | | | | | | | | | | | | | | | * commit '7835c24e19d9e1cb43fba5a02ce9d81d518f1300': dv: Update DV-profile-related functions to current public API Conflicts: libavcodec/dvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dv: Update DV-profile-related functions to current public APIDiego Biurrun2014-08-02
| |
* | avcodec/dvenc: clear all dsp contextsMichael Niedermayer2014-07-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2d60444331fca1910510038dd3817bea885c2367'Michael Niedermayer2014-07-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2d60444331fca1910510038dd3817bea885c2367': dsputil: Split motion estimation compare bits off into their own context Conflicts: configure libavcodec/Makefile libavcodec/arm/Makefile libavcodec/dvenc.c libavcodec/error_resilience.c libavcodec/h264.h libavcodec/h264_slice.c libavcodec/me_cmp.c libavcodec/me_cmp.h libavcodec/motion_est.c libavcodec/motion_est_template.c libavcodec/mpeg4videoenc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split motion estimation compare bits off into their own contextDiego Biurrun2014-07-17
| |
* | Merge commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e'Michael Niedermayer2014-07-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f46bb608d9d76c543e4929dc8cffe36b84bd789e': dsputil: Split off pixel block routines into their own context Conflicts: configure libavcodec/dsputil.c libavcodec/mpegvideo_enc.c libavcodec/pixblockdsp_template.c libavcodec/x86/dsputilenc.asm libavcodec/x86/dsputilenc_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split off pixel block routines into their own contextDiego Biurrun2014-07-09
| |
* | Merge commit 'f6ee61fb05482c617f5deee29a190d8ff483b3d1'Michael Niedermayer2014-07-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f6ee61fb05482c617f5deee29a190d8ff483b3d1': lavc: export DV profile API used by muxer/demuxer as public Conflicts: configure doc/APIchanges libavcodec/Makefile libavcodec/dv_profile.c libavcodec/dv_profile.h libavcodec/version.h libavformat/dvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: export DV profile API used by muxer/demuxer as publicAnton Khirnov2014-07-09
| |
* | Merge commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3'Michael Niedermayer2014-07-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3': dsputil: Split off FDCT bits into their own context Conflicts: configure libavcodec/Makefile libavcodec/asvenc.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/dsputilenc_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split off FDCT bits into their own contextDiego Biurrun2014-07-07
| |
* | Merge commit 'e63b818dbe6060b606ae10eb184859f8b97d2353'Michael Niedermayer2014-06-27
|\| | | | | | | | | | | | | | | | | | | * commit 'e63b818dbe6060b606ae10eb184859f8b97d2353': dv: Properly split decoder and encoder initialization Conflicts: libavcodec/dv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dv: Properly split decoder and encoder initializationDiego Biurrun2014-06-27
| |
* | Merge commit '650dee63c8b1e6693c6cf5983f4a5ed3f571379f'Michael Niedermayer2014-06-20
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '650dee63c8b1e6693c6cf5983f4a5ed3f571379f': dv: get rid of global non-const tables Conflicts: libavcodec/dv_profile.h libavcodec/dvdec.c libavcodec/dvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dv: get rid of global non-const tablesAnton Khirnov2014-06-20
| | | | | | | | Instead, store them in the context and compute on each parameter change.
* | Merge commit '778111592bf5f38630858ee6dfcfd097cd6c6da9'Michael Niedermayer2014-06-20
|\| | | | | | | | | | | | | | | | | | | * commit '778111592bf5f38630858ee6dfcfd097cd6c6da9': dvenc: initialize the profile only once, at init Conflicts: libavcodec/dvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dvenc: initialize the profile only once, at initAnton Khirnov2014-06-20
| | | | | | | | | | We do not allow the frame parameters to change during encoding, so there is no need to do this for each frame.