summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
Commit message (Collapse)AuthorAge
* Reduce the scope of some variablesDiego Biurrun2016-05-11
| | | | | This avoids unused variable warnings after the next version bump. Also drop a trace level av_log() call that is in the way.
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mpegvideo_enc: use avcodec_free_context() instead of av_free()Anton Khirnov2016-02-26
|
* lavc: Move pre_me to codec private optionsVittorio Giovara2016-01-21
| | | | | | | This option is only used by mpegvideoenc. It is a very codec-specific option, so deprecate the global variant. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move me_penalty_compensation to codec private optionsVittorio Giovara2016-01-21
| | | | | | | This option is only used by mpegvideoenc. It is a very codec-specific options, so deprecate the global variant. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move prediction_method to codec private optionsVittorio Giovara2016-01-21
| | | | | | | | | | This options is only used by huffyuv, ffvhuv, jpegls, mjpeg, mpegvideoenc, png, utvideo. It is a very codec-specific options, so deprecate the global variant. Set proper limits to the maximum allowed values, and update utvideoenc tests to use the new option name. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move rtp_payload_size to codec private optionsVittorio Giovara2016-01-21
| | | | | | | | | | This option is only used by mpegvideoenc and openh264. It is a very codec-specific option, so deprecate the global variant. The openh264 option is dropped altogether since it is just a fallback for -max_nal_size anyway. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move mpeg_quant to codec private optionsVittorio Giovara2016-01-21
| | | | | | | This option is only used by mpegvideoenc, and xvid. It is a very codec-specific option, so deprecate the global variant. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move noise_reduction to codec private optionsVittorio Giovara2016-01-21
| | | | | | | This option is only used by mpegvideoenc, x264, xavs, and vpx. It is a very codec-specific option, so deprecate the global variant. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move scenechange_threshold to codec private optionsVittorio Giovara2016-01-21
| | | | | | | This option is only used by mpegvideoenc, x264, and xavs. It is a very codec-specific option, so deprecate the global variant. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move frame_skip_* to codec private optionsVittorio Giovara2016-01-21
| | | | | | | | | | | | | | These options are only used by mpegvideoenc and vpx. They are very codec-specific options, so deprecate the global variants. Add an allowed value to the private options for frame_skip_cmp which seems to have been forgotten, but perfectly working. The libvpx frame dropping feature uses one of such option (frame_skip_threshold) without the other three. For this reason rename the option to something more consistent with the other libvpx variables. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move brd_scale to codec private optionsVittorio Giovara2016-01-21
| | | | | | | | This option is only used by mpegvideoenc, It is a very codec-specific option, so deprecate the global variant. Set proper limits to the maximum allowed values. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Move b_frame_strategy and b_sensitivity to codec private optionsVittorio Giovara2016-01-21
| | | | | | | | | | The b_frame_strategy option is only used by mpegvideoenc, qsv, x264, and xavs, while b_sensitivity is only used by mpegvideoenc. These are very codec-specific options, so deprecate the global variants. Set proper limits to the maximum allowed values. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpegvideo_enc: actually add the side data with vbv_delay to the packetAnton Khirnov2015-12-12
| | | | Fixes 2507b5dd674834be7261772996f47ae3b95cca69
* lavc: Drop exporting 2-pass encoding statsVittorio Giovara2015-12-07
| | | | | | | | | | | | | | These variables are coming from mpegvideoenc where are supposedly used as bit counters on various frame properties. However their use is unclear as they lack documentation, are available only from a very small subset of encoders, and they are hardly used in the wild. Also frame_bits in aacenc is employed in a similar way. Remove this functionality from AVCodecContex, these variable are mostly frame properties, and too few encoders support setting them with anything useful. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpegvideo_enc: export vbv_delay in side dataAnton Khirnov2015-12-06
| | | | Deprecate AVCodecContext.vbv_delay
* mpegvideo_enc: export CPB props side dataAnton Khirnov2015-12-06
|
* lavc: Deprecate avctx.rtp_callback fieldVittorio Giovara2015-11-20
| | | | | | | | | | | | | | | | | | | | | 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-20
| | | | | | | | | | 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-20
| | | | | | They do not work and produce corrupted output. CC: libav-stable@libav.org
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | `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-25
| | | | | | | | | | | | 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-25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mpegvideo_enc: Factor new_picture unref outMichael Niedermayer2015-10-25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu: Deprecate AVFrame.error[]Vittorio Giovara2015-09-30
| | | | | | | | | | | 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-29
|
* 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>
* lavc: Deprecate avctx.me_methodVittorio Giovara2015-07-27
| | | | | | | | 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-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>
* Add a quality factor packet side dataVittorio Giovara2015-07-20
| | | | | | | | 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-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>
* mpegvideo_enc: Drop unnneded initializationVittorio Giovara2015-07-20
| | | | coded_frame is already initialized where needed.
* lavc: Deprecate avctx.{inter,intra}_quant_biasVittorio Giovara2015-07-02
| | | | | | | 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-12
| | | | | | 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-12
|
* mpegvideo: h263: Move all tables to a single fileVittorio Giovara2015-06-12
|
* mpegvideo: Move block permutation function where is usedVittorio Giovara2015-06-10
| | | | Mark it as static.
* mpegvideo: Split picture allocation for encoding and decodingVittorio Giovara2015-06-08
| | | | | | | | | 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-08
|
* mpegvideo: Move tables to a separate fileVittorio Giovara2015-05-31
|
* mpegvideo: wmv2: Move function declarationsVittorio Giovara2015-05-31
|
* mpegvideo: Rework various functions not to use MpegEncContext directlyVittorio Giovara2015-05-22
|
* mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directlyVittorio Giovara2015-05-22
|
* mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directlyVittorio Giovara2015-05-22
| | | | | 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-22
| | | | They are just duplicates of AVCodecContext members so use those instead.
* h263: Convert function to macroVittorio Giovara2015-04-28
|
* mpegvideo_enc: Simplify picture allocationVittorio Giovara2015-04-19
|
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
|
* mpegvideo_enc: Check AVCodecContext allocationVittorio Giovara2015-03-12
|