summaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_enc.c
Commit message (Collapse)AuthorAgeFilesLines
* mpegvideo_enc: export vbv_delay in side dataAnton Khirnov2015-12-061-0/+13
| | | | Deprecate AVCodecContext.vbv_delay
* mpegvideo_enc: export CPB props side dataAnton Khirnov2015-12-061-0/+9
|
* lavc: Deprecate avctx.rtp_callback fieldVittorio Giovara2015-11-201-0/+8
| | | | | | | | | | | | | | | | | | | | | This function returns the encoded data of a frame, one slice at a time directly when that slice is encoded, instead of waiting for the full frame to be done. However this field has a debatable usefulness, since it looks like it is just a convoluted way to get data at lowest possible latency, or a somewhat hacky way to store h263 in RFC-2190 rtp encapsulation. Moreover when multi-threading is enabled (which is by default) the order of returned slices is not deterministic at all, making the use of this function not reliable at all (or at the very least, more complicated than it should be). So, for the reasons stated above, and being used by only a single encoder family (mpegvideo), this field is deemed unnecessary, overcomplicated, and not really belonging to libavcodec. Libavformat features a complete implementation of RFC-2190, for any other case. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpegvideo_enc: enable rtp_mode when multiple slices are usedAnton Khirnov2015-11-201-3/+7
| | | | | | | | | | Currently, multiple slices with just one thread produce corrupted output. Additionally, enable slice structured mode for h263(+) Bug-Id: 912 CC: libav-stabl@libav.org
* mpevideo_enc: disallow multiple slices for h261 and flvAnton Khirnov2015-11-201-0/+6
| | | | | | They do not work and produce corrupted output. CC: libav-stable@libav.org
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-261-1/+1
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* mpegvideo_enc: Fix encoding videos with less frames than the delay of the ↵Alexis Ballier2015-10-251-4/+16
| | | | | | | | | | | | encoder When the encoder is fed with less frames than its delay, the picture list looks like { NULL, NULL, ..., frame, frame, frame }. When flushing the encoder (input frame == NULL), we need to ensure the picture list is shifted enough so that we do not return an empty packet, which would mean the encoder has finished, while it has not encoded any frame. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpegvideo_enc: Merge ifs with identical conditionsMichael Niedermayer2015-10-251-2/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mpegvideo_enc: Factor new_picture unref outMichael Niedermayer2015-10-251-3/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu: Deprecate AVFrame.error[]Vittorio Giovara2015-09-301-9/+15
| | | | | | | | | | | These field are difficult to interpret, and are provided by a single encoder (mpegvideoenc). In general they do not belong to a structure containing raw data only, so remove them from AVFrame. Mpegvideoenc now uses a private field in Picture for its internal computations. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Simplify checking quant bias optionVittorio Giovara2015-09-291-4/+2
|
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-271-1/+1
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec flagsVittorio Giovara2015-07-271-35/+35
| | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Deprecate avctx.me_methodVittorio Giovara2015-07-271-0/+4
| | | | | | | | This option is extremely codec specific and only a few codecs employ it. Move it to codec private options instead: mpegenc family supports only 3 values, xavs and x264 use 5, and xvid has a different metric entirely. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Deprecate avctx.coded_frameVittorio Giovara2015-07-201-0/+4
| | | | | | | | | | | | | | | | | 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>
* Add a quality factor packet side dataVittorio Giovara2015-07-201-0/+7
| | | | | | | | This is necessary to preserve the quality information currently exported with coded_frame. Add the new side data to every encoder that needs it, and use it in avconv. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Gather all coded_frame allocations and free functions to a single placeVittorio Giovara2015-07-201-2/+1
| | | | | | | | | | | | | | 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>
* mpegvideo_enc: Drop unnneded initializationVittorio Giovara2015-07-201-2/+0
| | | | coded_frame is already initialized where needed.
* lavc: Deprecate avctx.{inter,intra}_quant_biasVittorio Giovara2015-07-021-2/+8
| | | | | | | They are used by dnxhd and mpegvideo_enc exclusively, move them to codec private options instead. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpegvideo: Expand macroVittorio Giovara2015-06-121-3/+18
| | | | | | Having this macro in an header only facilitates the use of such header. The code increase is minimal and files have one less dependency on mpegvideo.h.
* mpegvideo: rv10: Move function declaration to a separate headerVittorio Giovara2015-06-121-0/+1
|
* mpegvideo: h263: Move all tables to a single fileVittorio Giovara2015-06-121-0/+1
|
* mpegvideo: Move block permutation function where is usedVittorio Giovara2015-06-101-2/+38
| | | | Mark it as static.
* mpegvideo: Split picture allocation for encoding and decodingVittorio Giovara2015-06-081-2/+9
| | | | | | | | | The main ff_alloc_picture() function is made more generic with all the parameters necessary as arguments. This will allows to move most of the related functions to a separate file later. Right now wrappers are provided to try and minimize the number of changes in the code.
* mpegvideo: Move various temporary buffers to a separate contextVittorio Giovara2015-06-081-7/+7
|
* mpegvideo: Move tables to a separate fileVittorio Giovara2015-05-311-0/+1
|
* mpegvideo: wmv2: Move function declarationsVittorio Giovara2015-05-311-0/+1
|
* mpegvideo: Rework various functions not to use MpegEncContext directlyVittorio Giovara2015-05-221-2/+2
|
* mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directlyVittorio Giovara2015-05-221-5/+5
|
* mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directlyVittorio Giovara2015-05-221-9/+9
| | | | | This skips setting the memory to 0 but allows for reuse on different contextes. Oracle did not report any unsual activity because of it.
* mpegvideo: Drop flags and flags2Vittorio Giovara2015-05-221-28/+28
| | | | They are just duplicates of AVCodecContext members so use those instead.
* h263: Convert function to macroVittorio Giovara2015-04-281-1/+1
|
* mpegvideo_enc: Simplify picture allocationVittorio Giovara2015-04-191-7/+5
|
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-191-3/+3
|
* mpegvideo_enc: Check AVCodecContext allocationVittorio Giovara2015-03-121-0/+2
|
* rv10: check size of s->mb_width * s->mb_heightAndreas Cadhalpun2015-03-051-2/+5
| | | | | | | If it doesn't fit into 12 bits it triggers an assertion. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegvideo_enc: initialize the encoding contextVittorio Giovara2015-01-291-1/+1
| | | | | | | | This prevents several uninitialized variable uses that take place towards the end of encoding. CC: libav-stable@libav.org Bug-Id: CID 700760
* mpegvideo_enc: Draw edges on input for non-multiple of 16 resolutionsMichael Niedermayer2015-01-231-3/+14
| | | | | | | | | | | | This improves motion estimation and avoids using uninitialized data for resolutions that aren't a multiple of 16. Prior to d2a25c40, the edges used to be initialized so that encoding was deterministic, but after that commit it started using uninitialized data (for non multiple of 16 resolutions). CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* msmpeg4: check memory allocations and propagate errorsVittorio Giovara2015-01-061-1/+2
| | | | Bug-Id: CID 1257781
* h261enc: Disallow sliced encodingMartin Storsjö2014-12-181-0/+1
| | | | | | | | | | | This avoids trying to do sliced encoding, even if a slice/packet size is requested (via the -ps option or the rtp_payload_size field), since the encoder currently doesn't support it (or at least our decoder can't decode it, even if the h261_encode_gob_header function is hooked up to be called from the slicing part in mpegvideo_enc.c). Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegvideo_enc: factor out denominator and explicitly cast operandsVittorio Giovara2014-11-061-9/+7
| | | | | CC: libav-stable@libav.org Bug-Id: CID 608053
* mpegvideo_enc: rework direct mode checkVittorio Giovara2014-11-061-20/+10
| | | | | | | Remove stray semicolon and share codepaths. CC: libav-stable@libav.org Bug-Id: CID 991857
* lavc: make lmax/lmin into private options of mpegvideo encodersAnton Khirnov2014-10-181-1/+5
|
* lavc: make border_masking into private options of mpegvideo encodersAnton Khirnov2014-10-181-1/+8
|
* lavc: deprecate unused mb_threshold fieldAnton Khirnov2014-10-181-7/+0
|
* lavc: make rc_buffer_aggressivity/rc_initial_cplx into private options of ↵Anton Khirnov2014-10-181-0/+4
| | | | mpegvideo encoders
* lavc: make rc_eq into private options of mpegvideo encodersAnton Khirnov2014-10-181-0/+7
|
* lavc: make rc_qmod_* into private options of mpegvideo encodersAnton Khirnov2014-10-181-0/+4
|
* lavc: make rc_qsquish a private option of mpegvideo encodersAnton Khirnov2014-10-181-0/+7
|
* Split off floating point AAN (I)DCT into separate componentsDiego Biurrun2014-09-071-2/+4
|
OpenPOWER on IntegriCloud