summaryrefslogtreecommitdiff
path: root/libavcodec/proresenc.c
Commit message (Collapse)AuthorAge
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* 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>
* 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>
* 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>
* proresenc: Do not entangle coded_frameVittorio Giovara2015-07-20
|
* prores: Set the bits_per_coded_sample for alpha pix_fmtLuca Barbato2015-04-22
| | | | Improve the compatibility with other software.
* prores: Evaluate all the quantizersLuca Barbato2014-12-15
| | | | | | | | | Prevent an uninitialized data access. CC: libav-stable@libav.org Bug-Id: CID 703824 / CID 703825 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* proresenc: Properly account for alpha planeChristophe Gisquet2014-08-18
| | | | | | | | | | The packet buffer allocation considers the alpha channel as DCT-coded, while it is actually run-coded and thus requires a larger buffer. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* proresenc: Realloc if buffer is too smallChristophe Gisquet2014-08-18
| | | | | | | | | | | | | | The buffer allocation may be incorrect (e.g. with an alpha plane), and currently causes the buffer to be set to NULL by init_put_bits, causing a crash later on. So, detect that situation, and if detected, reallocate the buffer and ask for a sample that shows the problem. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* proresenc: Report buffer overflowChristophe Gisquet2014-08-18
| | | | | | | | | | If the allocated size, despite best efforts, is too small, exit with the appropriate error. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* proresenc: Remove unneeded parameters from encode_alpha_plane()Christophe Gisquet2014-08-18
| | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dsputil: Split off FDCT bits into their own contextDiego Biurrun2014-07-07
|
* proresenc: Reuse proper dsputil infrastructure for FDCTDiego Biurrun2014-02-28
|
* prores: Drop DSP infrastructure for prores encoder bitsDiego Biurrun2014-02-28
| | | | None of the encoder bits are arch-optimized.
* proresenc: Drop unnecessary DCT permutation bitsDiego Biurrun2014-02-28
| | | | No permutation is necessary for the FDCT.
* Replace all instances of avcodec_alloc_frame() with av_frame_alloc().Anton Khirnov2013-11-16
|
* cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-03
|
* proresenc: alpha coding supportKostya Shishkov2013-05-30
|
* Drop DCTELEM typedefDiego Biurrun2013-01-22
| | | | | | It does not help as an abstraction and adds dsputil dependencies. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* proresenc: Don't free a buffer not owned by the codecMartin Storsjö2012-09-04
| | | | | | | | | | The data in coded_frame isn't allocated using get_buffer, but is copied from the input frame to the encoder, so we should not try to free it ourselves. This fixes an assert failure when running in debug mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* proresenc: Write the full value in one put_bits callMartin Storsjö2012-09-04
| | | | | | | | | Previously, the put_bits call writing the value wrote a value larger than the number of bits specified, failing asserts in debug mode. There was no actual bitstream writer corruption, since the overwritten bit already always was set to 1. Signed-off-by: Martin Storsjö <martin@martin.st>
* prores: interlaced ProRes encodingMaksalov Boris2012-08-14
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* proresenc: use the edge emulation bufferBoris Maksalov2012-08-13
| | | | | | Prevents reading past the end of frame buffer. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* proresenc: make a variable local to the loop where it is usedMans Rullgard2012-07-01
| | | | | | | This moves the mbs_per_slice declaration inside the only loop where it is used. Fixes a dead assignment. Signed-off-by: Mans Rullgard <mans@mansr.com>
* proresenc: multithreaded quantiser searchKostya Shishkov2012-04-17
|
* prores: allow user to set fixed quantiserKostya Shishkov2012-03-18
|
* proresenc: give user a possibility to alter some encoding parametersKostya Shishkov2012-03-04
| | | | | This allows user to select quantisation matrix from different profile, stamp frames with custom vendor string and change target bitrate.
* prores: store and retrieve extended colourspace informationKostya Shishkov2012-02-29
| | | | Based on the patch by Phil Barrett.
* proresenc: correct edge emulationPhil Barrett2012-02-29
| | | | Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
* prores: handle 444 chroma in right orderKostya Shishkov2012-02-29
| | | | | | | ProRes codes chroma blocks in 444 mode in different order than luma blocks, so make both decoder and encoder read/write chroma blocks in right order. Reported by Phil Barrett
* prores: use natural integer type for the codebook indexChristophe GISQUET2012-02-22
| | | | | | | | | | | The operations that use it require it to be promoted to a larger (natural) type and thus perform sign extension on it. While an optimal compiler may account for this, gcc 4.6 (for x86 Windows) fails. Using the natural integer type provides a 2% speedup for Win64 and 1% for Win32. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* proresenc: force bitrate not to exceed given limitKostya Shishkov2012-02-18
| | | | | | Apple ProRes Format Specifications mentions target data size for every frame, so make sure frame meets it. This also allows encoder to demand much smaller packet sizes for output.
* proresenc: initialise 'sign' variableKostya Shishkov2012-02-16
|
* prores encoderKostya Shishkov2012-02-15