aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'Michael Niedermayer2015-07-201-2/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-201-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * PCM signed 16-bit big-endian planar decoderPaul B Mahol2015-06-241-0/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/utils: Check that channel count is valid in avcodec_open2();Michael Niedermayer2015-07-191-0/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc: Add properties field to AVCodecContext.Carl Eugen Hoyos2015-07-161-0/+12
| | | | | | | | The new field can hold information about losslessness and closed captions for now.
* | avcodec/utils: Check that the sample rate is not negative when opening an ↵Michael Niedermayer2015-07-131-0/+6
| | | | | | | | | | | | encoder Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Factor duplicated ff_fast_malloc() out into mem_internal.hMichael Niedermayer2015-07-131-19/+1
| | | | | | | | | | | | | | | | internal.h is difficult to use due to circular dependancies mem.h is a public header ff_* is not public Alternative solutions probably are possible too Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Assert that the pointer is set when size is in ff_fast_malloc()Michael Niedermayer2015-07-111-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Avoid undefined void casts in ff_fast_malloc()Michael Niedermayer2015-07-111-5/+8
| | | | | | | | | | | | based on code from libavutil/mem.c Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Fix potential overflow in overallocation codeMichael Niedermayer2015-07-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: Document 32 min for h264 widthMichael Niedermayer2015-07-101-0/+5
| | | | | | | | | | Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/utils: use a minimum 32pixel width in avcodec_align_dimensions2() ↵Michael Niedermayer2015-07-101-1/+3
| | | | | | | | | | | | | | | | for H.264 Fixes Assertion failure Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: Check values in apply_param_change()Michael Niedermayer2015-07-081-2/+13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/utils: get rid of add_metadata_from_side_data forward declarationMarton Balint2015-07-061-13/+11
| | | | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/utils: call add_metadata_from_side_data in ff_init_buffer_infoMarton Balint2015-07-061-2/+3
| | | | | | | | | | | | | | | | This should ensure that each frame get its metadata from its proper packet regardless of frame delays caused by reordering or threading. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/utils: change add_metadata_from_side_data to accept avpacketMarton Balint2015-07-061-4/+4
| | | | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/utils: remove redundant call to ff_init_buffer_infoMarton Balint2015-07-061-2/+0
| | | | | | | | | | | | | | It does the same as calling ff_decode_frame_props. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: Replace ENOTSUP by AVERROR_PATCHWELCOMEMichael Niedermayer2015-06-271-1/+1
| | | | | | | | | | | | ENOTSUP is not available on all platforms Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: Add flag for experimental HWAccels and use it for VDPAU/HEVCPhilip Langdale2015-06-261-0/+7
| | | | | | | | | | | | | | | | This HWAccel isn't really usable right now due to an nvidia driver bug, so we don't want it selected by default. HWAccels have a capabilities field and there's a comment about flags, but no flags exist today, so let's add one for experimental hwaccels.
* | avcodec: Add codec_desc and remapping for ↵Michael Niedermayer2015-06-241-0/+1
| | | | | | | | | | | | AV_CODEC_ID_PCM_S16BE_PLANAR_DEPRECATED Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: add little-endian ADPCM_THP decoderRodger Combs2015-06-201-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/brstm: add support for BFSTM filesRodger Combs2015-06-171-0/+4
| | | | | | | | | | Previous version reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: Assert that audio decoders do not report using more data than ↵Michael Niedermayer2015-06-041-0/+1
| | | | | | | | | | | | was input Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: Print a warning if gray decoding was requested but not enabled.Carl Eugen Hoyos2015-05-171-0/+5
| |
* | lavc: add yuv440p10/12 formats to aligned pixfmt list.Ronald S. Bultje2015-05-061-0/+4
| |
* | Merge commit 'a78f5548d94f23ce23cece41edf0fe9d18926de6'Michael Niedermayer2015-04-231-1/+3
|\| | | | | | | | | | | | | | | * commit 'a78f5548d94f23ce23cece41edf0fe9d18926de6': avcodec: Free the default avoptions on init failure See: 1907ff0a67edeb98d9153aac79f35961837ba3f6 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Free the default avoptions on init failureLuca Barbato2015-04-221-0/+4
| |
* | Merge commit 'aef0be08756e00f363c524453c948a6e2a348614'Michael Niedermayer2015-04-231-0/+1
|\| | | | | | | | | | | | | * commit 'aef0be08756e00f363c524453c948a6e2a348614': avcodec: Unref the dummy buffer on the fail path Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Unref the dummy buffer on the fail pathLuca Barbato2015-04-221-0/+1
| |
* | lavc: use correct type for printf() argumentwm42015-04-141-1/+1
| | | | | | | | | | | | This was passing uint32_t for %d. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat, avcodec: log discard paddingwm42015-04-141-2/+2
| | | | | | | | | | | | Useful for debugging. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: mark codec argument as const in ff_lock_avcodec()Michael Niedermayer2015-03-141-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: use atomic operations on entangled_thread_counterMichael Niedermayer2015-03-131-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '117b432748ca87de4cd0f09d9b1495545e264733'Michael Niedermayer2015-03-131-5/+10
|\| | | | | | | | | | | | | | | | | | | * commit '117b432748ca87de4cd0f09d9b1495545e264733': lavc: Introduce AVCodec internal capabilities Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Introduce AVCodec internal capabilitiesVittorio Giovara2015-03-131-1/+6
| | | | | | | | | | | | | | This field is designed for marking codec properties useful to lavc internals. Two internal capabilities are added: - FF_CODEC_CAP_INIT_THREADSAFE: codec can be opened without locks; - FF_CODEC_CAP_INIT_CLEANUP: codec frees memory if initialization fails.
* | Merge commit '9993a067f6c8c7e7838052ac3146aa6b80dd7e81'Michael Niedermayer2015-03-131-1/+4
|\| | | | | | | | | | | | | | | | | | | * commit '9993a067f6c8c7e7838052ac3146aa6b80dd7e81': lavc: Improve thread locking error message Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Improve thread locking error messageVittorio Giovara2015-03-131-1/+4
| |
| * avcodec/utils: use correct printf specifier in ff_set_sarAndreas Cadhalpun2015-02-281-1/+1
| | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavc: Print number of reference frames if debug level >= verbose.Carl Eugen Hoyos2015-03-131-0/+6
| |
* | avcodec/utils: Align YUV411 by as much as the other YUV variantsMichael Niedermayer2015-03-071-1/+1
| | | | | | | | | | | | | | | | | | Fixes out of array accesses Fixes: ffmpeg_mjpeg_crash2.avi Found-by: Thomas Lindroth <thomas.lindroth@gmail.com> Tested-by: Thomas Lindroth <thomas.lindroth@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: use correct printf specifier in ff_set_sarAndreas Cadhalpun2015-02-281-1/+1
| | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: Assert that dst->progress is clear before ff_thread_ref_frame()Michael Niedermayer2015-02-081-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a536a4e4bc52d05f59869761337452fb1f1977f6'Michael Niedermayer2015-01-271-0/+7
|\| | | | | | | | | | | | | * commit 'a536a4e4bc52d05f59869761337452fb1f1977f6': lavc: support extracting audio service type from side data Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: support extracting audio service type from side dataAnton Khirnov2015-01-271-0/+7
| |
* | Merge commit '728685f37ab333ca35980bd01766c78d197f784a'Michael Niedermayer2015-01-271-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '728685f37ab333ca35980bd01766c78d197f784a': Add a side data type for audio service type. Conflicts: doc/APIchanges libavcodec/avcodec.h libavcodec/version.h libavutil/frame.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add a side data type for audio service type.Anton Khirnov2015-01-271-0/+1
| | | | | | | | | | Currently, audio service type is a field in AVCodecContext. However, side data is more appropriate for this kind of information.
* | Merge commit '9a4aaae3b29392b6d74997e06be249d7d54a7394'Michael Niedermayer2015-01-151-1/+1
|\| | | | | | | | | | | | | | | * commit '9a4aaae3b29392b6d74997e06be249d7d54a7394': lavc: add GBRAP to avcodec_align_dimensions2 See: 5c057433ccd32f37ddc828d3f82c5b1ad7d3e3db Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: add GBRAP to avcodec_align_dimensions2Paul B Mahol2015-01-141-0/+1
| |
* | Merge commit '57b6704ecd0f56d6a3092e448687cfd837bb0ac1'Michael Niedermayer2014-12-271-4/+11
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '57b6704ecd0f56d6a3092e448687cfd837bb0ac1': avcodec: add AVCodecContext.sw_pix_fmt Conflicts: doc/APIchanges libavcodec/avcodec.h libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: add AVCodecContext.sw_pix_fmtRémi Denis-Courmont2014-12-251-4/+11
| | | | | | | | | | | | | | | | This carries the pixel format that would be used if it were not for hardware acceleration. This is equal to AVCodecContext.pix_fmt if hardware acceleration is not in use. Signed-off-by: Anton Khirnov <anton@khirnov.net>