aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dnxhdenc.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/dnxhdenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-021-4/+0
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/encoders: Remove redundant setting of AV_PKT_FLAG_KEYAndreas Rheinhardt2021-09-281-1/+0
| | | | | | | 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/dnxhdenc: Mark encoder as init-threadsafeAndreas Rheinhardt2021-05-101-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dnxhdenc: Use av_memdup() instead of av_malloc()+memcpy()Andreas Rheinhardt2021-05-101-2/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dnxhdenc: Fix segfault when using too many slice threadsAndreas Rheinhardt2021-05-101-1/+1
| | | | | | | | | | | | | | The DNXHD encoder's context contains an array of 32 pointers to DNXHDEncContexts used in case of slice threading; when trying to use more than 32 threads with slice threading, the encoder's init function errors out, but the close function takes avctx->thread_count at face value and tries to free inexistent elements of the array, leading to potential crashes. Fix this by modifying the check used to decide whether the slice contexts should be freed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dnxhdenc: Avoid copying packet data, allow user-supplied buffersAndreas Rheinhardt2021-05-051-2/+4
| | | | | | | | 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>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | | | | 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-271-17/+0
| | | | | | | | | | 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/dnxhd: Make ff_dxnhd_get_cid_table return a pointer, not indexAndreas Rheinhardt2021-01-261-5/+3
| | | | | | | All callers only use the index into ff_dnxhd_cid_table to get a pointer to the desired entry. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-011-0/+1
| | | | That is a more appropriate place for it.
* avcodec/dnxhdenc: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-131-43/+22
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/internal: move packet related functions to their own headerJames Almer2020-06-021-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: deprecate Lossless and Intra Only encoder capabilitesJames Almer2020-05-211-1/+1
| | | | | | | 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>
* libavcodec, libpostproc: Remove outcommented START/STOP_TIMERAndreas Rheinhardt2020-03-141-3/+1
| | | | | | | as well as includes of libavutil/timer.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dnxhdenc: Fix undefined left shifts of negative numbersAndreas Rheinhardt2019-09-281-3/+3
| | | | | | | Affected 61 FATE-tests: 60 vsynth tests and lavf-mxf_opatom. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dnxhdenc: return error if av_malloc failedLimin Wang2019-09-251-0/+2
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/dnxhd: change ff_dnxhd_get_hr_frame_size to avpriv_Jason Stevens2018-09-101-1/+1
| | | | | | | | refactor ff_dnxhd_get_hr_frame_size to avpriv_dnxhd_get_hr_frame_size, to allow cross library usage in libavformat/mxfenc this change makes this function no longer be always inlined. Signed-off-by: Jason Stevens <jay@wizardofthenet.com>
* avcodec/dnxhdenc: interlaced is not supported in DNxHRPaul B Mahol2018-09-061-0/+6
| | | | Fixes #7263.
* avcodec/dnxhdenc: stop leaking memory when initalization failsPaul B Mahol2018-08-311-9/+9
| | | | Fixes #6593.
* avcodec/dnxhdenc: do not free nonexistent slice threads data when frame ↵Paul B Mahol2018-06-011-2/+4
| | | | | | | | | threading is used Forgotten in 28e9ba951d1a0b0aca53b242aa64f484ca75e874. Fixes #7241. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '94eed68ace9f2416af8457fcbf142b175928c06b'James Almer2017-10-231-6/+0
|\ | | | | | | | | | | | | * commit '94eed68ace9f2416af8457fcbf142b175928c06b': lavc: Drop deprecated options moved to private contexts Merged-by: James Almer <jamrial@gmail.com>
| * lavc: Drop deprecated options moved to private contextsVittorio Giovara2017-03-231-6/+0
| | | | | | | | Deprecated in 10/2014 and 07/2015.
| * lavc: Remove deprecated XvMC support hacksDiego Biurrun2017-03-231-1/+1
| | | | | | | | Deprecated in 11/2013.
* | avcodec/dnxhdenc: fix DNxHR 444 encoding crashesFrédéric Devernay2017-09-261-8/+8
| | | | | | | | Fixes #6649.
* | avcodec/dnxhdenc: call slice thread code only if slice threading is enabledPaul B Mahol2017-08-171-6/+10
| |
* | avcodec/dnxhdenc: enable frame threadingPaul B Mahol2017-07-271-1/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/dnxhdenc: Assert that frame size is not assigned an error codeMichael Niedermayer2017-06-151-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/dnxhdenc: fix recent regressionPaul B Mahol2017-04-151-1/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/dnxhd*: add ff_dnxhd_get_hr_frame_size()Paul B Mahol2017-04-141-9/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/dnxhdenc: make sure that mb_height > 255 can be storedPaul B Mahol2017-04-141-1/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/dnxhdenc: fix indentation issuePaul B Mahol2017-04-011-3/+3
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/dnxhdenc: DNxHR 444 and HQX supportPaul B Mahol2017-04-011-68/+212
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '47756f51fe836959ffa5c6e2baeacbd71e150069'Clément Bœsch2017-03-241-9/+0
|\| | | | | | | | | | | | | * commit '47756f51fe836959ffa5c6e2baeacbd71e150069': dnxhdenc: Drop pointless, commented-out debug output Merged-by: Clément Bœsch <u@pkh.me>
| * dnxhdenc: Drop pointless, commented-out debug outputDiego Biurrun2016-10-271-9/+0
| |
| * Mark read-only tables as staticDiego Biurrun2016-05-051-1/+1
| |
* | avcodec/dnxhdenc: Move allocation out of radix_sort()Michael Niedermayer2016-10-211-5/+7
| | | | | | | | | | | | Its slow, its not checked, FPU state is not clean either currently there Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavcodec/dnxhdenc: fix typo, check if profile is dnxhr 444 or hqxMark Reid2016-08-221-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavcodec/dnxhdenc: add edge emulate for dnxhrMark Reid2016-08-121-17/+54
| | | | | | | | | | | | Fixes handling for resolutions that are not multiples of 16. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavcodec/dnxhdenc: add support for dnxhr encodingMark Reid2016-07-231-14/+71
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavcodec/dnxhdenc: add support for variable mircoblock countsMark Reid2016-07-231-18/+23
| | | | | | | | | | | | dnxhr has variable resolution, 8160 is the mb num for 1920x1080 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavcodec/dnxhd: add dnxhr profilesMark Reid2016-07-201-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-2/+1
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a'Derek Buitenhuis2016-04-171-2/+2
|\| | | | | | | | | | | | | * commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a': Move const qualifier before type name Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * Move const qualifier before type nameDiego Biurrun2016-03-231-2/+2
| |
| * dnxhd: Make the encoder message friendlierLuca Barbato2016-02-091-2/+3
| |
* | avcodec: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-041-1/+1
| |
* | dnxhdenc: Optimize get_pixels_8x4_sym for 10-bitTimothy Gu2015-10-201-16/+8
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 628e6d0164febc8e69b0f10dfa487e8a2dd1a28a and uses a better fix. Before: 4483 decicycles in get_pixels_8x4_sym, 131032 runs, 40 skips After: 2569 decicycles in get_pixels_8x4_sym, 131054 runs, 18 skips
* | dnxhd: interleave AC levels and flagsChristophe Gisquet2015-10-151-3/+3
| | | | | | | | | | | | | | This allows more efficient access to the array as the level and flags are contiguous. Around 4% faster coefficient decoding. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | dnxhdenc: fix access outside of imageChristophe Gisquet2015-10-131-2/+4
| | | | | | | | This is the same test as for the 8bit case.