aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | ADPCM DTK decoderJames Almer2013-05-101-0/+2
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | lavu: add FF_CEIL_RSHIFT and use it in various places.Clément Bœsch2013-05-091-6/+7
| |
* | libswscale: GBRAP input & output and GBRAP16 input supportPaul B Mahol2013-05-081-0/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit 'e55e8b2c362a60bad66929d83d8c83b0d7f5ffc9'Michael Niedermayer2013-05-081-10/+9
|\| | | | | | | | | | | | | | | | | | | * commit 'e55e8b2c362a60bad66929d83d8c83b0d7f5ffc9': lavc: do not leak frames in avcodec_decode_audio4 Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: do not leak frames in avcodec_decode_audio4Luca Barbato2013-05-071-3/+1
| | | | | | | | | | | | | | Notwithstanding the return value the frame should be freed if is not going to be used. Reported-by: Matthew Wolenetz <wolenetz@chromium.org>
* | avcodec/utils: Fix leak by dereferencing audio frame when side data causes ↵Matt Wolenetz2013-05-071-0/+2
| | | | | | | | | | | | whole frame skip Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: Set frame.width/height on all exit pathes of ff_get_buffer()Michael Niedermayer2013-05-051-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'Michael Niedermayer2013-05-051-2/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487': avcodec: Add av_cold attributes to init functions missing them Conflicts: libavcodec/aacpsy.c libavcodec/atrac3.c libavcodec/dvdsubdec.c libavcodec/ffv1.c libavcodec/ffv1enc.c libavcodec/h261enc.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/h264pred.c libavcodec/libschroedingerenc.c libavcodec/libxvid_rc.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/proresdsp.c libavcodec/rangecoder.c libavcodec/videodsp.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-2/+3
| |
* | avcodec: move lowres down with the next ABI bump and add accessorsMichael Niedermayer2013-05-031-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '088f38a4f9f54bb923405c67c9e72d96d90aa284'Michael Niedermayer2013-05-011-16/+16
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '088f38a4f9f54bb923405c67c9e72d96d90aa284': avcodec: Drop unnecessary ff_ name prefixes from static functions Conflicts: libavcodec/ass.c libavcodec/h264_parser.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-301-20/+20
| |
* | Merge commit 'e036bb7899d0faca9159206be9bf5552e76e7633'Michael Niedermayer2013-05-011-0/+4
|\| | | | | | | | | | | | | | | * commit 'e036bb7899d0faca9159206be9bf5552e76e7633': lavc: clear AVBuffers on decoded frames if refcounted_frames is not set FATE: add an additional indeo3 test Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: clear AVBuffers on decoded frames if refcounted_frames is not setAnton Khirnov2013-04-301-0/+4
| | | | | | | | | | Otherwise some code might mistakenly think it is allowed to unref those buffers, which would lead to double unref.
* | avcodec_string: Print the used codec if it differs from the codec_id name.Michael Niedermayer2013-04-271-0/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec_string: remove the "(hq)" listingMichael Niedermayer2013-04-271-2/+2
| | | | | | | | | | | | | | printing "hq" depending on a single video encoding parameter makes little sense Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: check decoded subtitles encoding.Nicolas George2013-04-241-1/+30
| | | | | | | | Address trac ticket #2431.
* | avcodec: Fix lowres handling in buffer allocationMichael Niedermayer2013-04-191-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a7f46586bf47174b5fa00a905b767b1781ec8b72'Michael Niedermayer2013-04-191-5/+13
|\| | | | | | | | | | | | | * commit 'a7f46586bf47174b5fa00a905b767b1781ec8b72': ff_get_buffer(): allocate the frame for max(coded,display) dimensions Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ff_get_buffer(): allocate the frame for max(coded,display) dimensionsAnton Khirnov2013-04-191-5/+13
| | | | | | | | Needed e.g. for h264 cropping to work properly.
| * lavc: don't overwrite display dimensions with coded dimensions.Anton Khirnov2013-04-101-1/+1
| |
| * dsputil: Make dsputil selectableRonald S. Bultje2013-04-101-1/+2
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavc/utils: merge side data after video encode.Clément Bœsch2013-04-191-0/+2
| | | | | | | | This allows encoders to communicate side data to the muxers.
* | lavc: avcodec_open2(): pass context to av_log()Paul B Mahol2013-04-161-2/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Add thread-safe wrapper for get_format().Reimar Döffinger2013-04-151-0/+5
| | | | | | | | | | | | | | Just like get_buffer, get_format should not be called from a different thread if thread_safe_callbacks is not set. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | lavc: fix recoded subtitles end.Nicolas George2013-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | Text subtitles packets are not 0-terminated (and if they are, it is handled by the recoding process since 0 is a valid Unicode code point). The terminating 0 would overwrite the last payload octet. OTOH, packets must be 0-padded. Fix a problem reported in trac ticket #2431.
* | lavc: use packet duration for subtitles if necessary.Nicolas George2013-04-041-0/+8
| | | | | | | | Fix trac ticket #2397.
* | lavc: do not init frame with guessed layout.Nicolas George2013-04-031-2/+0
| | | | | | | | It is breaking support from files with unknown layout.
* | Merge commit 'c24469e812501903a46a06eff9722a82e136e841'Michael Niedermayer2013-03-271-1/+3
|\| | | | | | | | | | | | | | | | | | | | | * commit 'c24469e812501903a46a06eff9722a82e136e841': utils: add workaround for AVHWAccel in ff_get_buffer compat code configure: Remove a stray msmpeg4v1 encoder declaration Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * utils: add workaround for AVHWAccel in ff_get_buffer compat codeJanne Grunau2013-03-261-0/+4
| | | | | | | | | | | | | | Since c977039e585bfff28ecc037ef827c6c3d1ed88aa plane count for PIX_FMT_HWACCEL pixel formats is 0 instead of 1. The created dummy AVBuffers are still bogus since AVFrame does not hold frame data when AVHWAccels are used.
* | Merge commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0'Michael Niedermayer2013-03-261-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0': lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo Conflicts: libavcodec/h264_parser.c libavcodec/internal.h libavcodec/mpeg12.c libavcodec/utils.c libavformat/mpegtsenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideoMartin Storsjö2013-03-261-4/+3
| | | | | | | | | | | | | | Also move the declaration to internal.h, and add restrict qualifiers to the declaration (as in the implementation). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '75644335b907919057960716508477239c26fed4'Michael Niedermayer2013-03-261-0/+34
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '75644335b907919057960716508477239c26fed4': lavc: Move start code finding to utils.c Conflicts: configure libavcodec/mpegvideo.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Move start code finding to utils.cMartin Storsjö2013-03-261-0/+34
| | | | | | | | | | | | | | | | | | | | This allows dropping the mpegvideo dependency from a number of components. This also fixes standalone building of the h264 parser, which was broken in 64e438697. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avcodec/utils: initialize pixel buffer poolMichael Niedermayer2013-03-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This should silence many valgrind warnings about use of uninitialized data, all the warnings i looked at where false positives having their uninitialized data not actually used. The same effect could be achieved by listing all code that touches the pixel buffer in the valgrind suppression file. Note, valgrind also fails to trace the origins correctly. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Do not fail in get_buffer_internal() if pix_fmt planes == 0.Carl Eugen Hoyos2013-03-221-0/+2
| | | | | | | | Fixes VDPAU decoding, reported by Ilja Sekler
* | lavc/utils: fix metadata audio frame memleak in case of non refcounted frames.Clément Bœsch2013-03-211-1/+1
| | | | | | | | | | | | | | | | The metadata must be set before saving the frame to avci->to_free, otherwise it will leak. Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Clément Bœsch <ubitux@gmail.com>
* | Merge commit '6599b087de62a5f9f2a8d61a1952d777d1bff804'Michael Niedermayer2013-03-201-2/+2
|\| | | | | | | | | | | | | | | * commit '6599b087de62a5f9f2a8d61a1952d777d1bff804': buffersrc: fix a typo. lavc, lavfi: fix counting number of planes in AVBufferRef wrappers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc, lavfi: fix counting number of planes in AVBufferRef wrappersAnton Khirnov2013-03-191-2/+2
| | | | | | | | | | | | Number of planes is not always equal to the number of components even for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components in two planes.
* | lavc/utils: add VP6F hack for setting correct video size in streamStefano Sabatini2013-03-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some obscure reasons avcodec_set_dimensions() resets the width/height so that the resulting value set in the stream is equal to the corresponding coded_width/height, which is not the same as the correct width/height in case of the H.264 and VP6F codecs. This adds a codec-specific hack for VP6F which disables the call to avcodec_set_dimensions() in avcodec_open2(), like it is done with H264. A proper fix needs to be found yet. Fix trac ticket #1386. Based on a patch by Michael Niedermayer. Trolled-By: Daemon404 See thread: Subject: [FFmpeg-devel] [PATCH] ffprobe: Stash and use width and height before opening the codec Date: Fri, 1 Mar 2013 10:41:34 -0500
* | audio_get_buffer: add assert to ensure nb_extended_buf has a safe valueMichael Niedermayer2013-03-191-1/+3
| | | | | | | | | | | | May silence CID991853 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: fix avpacket memleak with subtitles recoding.Clément Bœsch2013-03-181-2/+8
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-03-171-2/+2
|\| | | | | | | | | | | | | * qatar/master: lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappersAnton Khirnov2013-03-171-2/+2
| | | | | | | | | | It is supposed to be height * linesize, not width * linesize. Thanks to Hendrik Leppkes for pointing out the bug.
* | lavc: make compilation of frame_thread_encoder.o optional.Ronald S. Bultje2013-03-141-3/+5
| | | | | | | | | | | | | | | | Only compile if CONFIG_ENCODERS is enabled, i.e. if at least one encoder is to be compiled. This prevents it from being includes in a decoder-only build. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8'Michael Niedermayer2013-03-141-0/+3
|\| | | | | | | | | | | | | | | * commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8': Add av_log_{ask_for_sample|missing_feature} replacements to libavutil ismindex: Check the return value of allocations Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add av_log_{ask_for_sample|missing_feature} replacements to libavutilDiego Biurrun2013-03-131-0/+3
| | | | | | | | | | This allows reporting missing features and requesting samples from all libraries in a standard way; with a simplified API.
* | avcodec: remove AVCodecContext->metadataHendrik Leppkes2013-03-131-3/+0
| | | | | | | | | | | | | | | | | | This field was only ever set and freed from avcodec, and not otherwise used. However, because frames are refcounted now, avcodec cannot make any assumptions about the lifetime of the frame metadata, which can result in double-frees or leaked memory. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: factorize ff_{thread_,re,}get_buffer error messages.Clément Bœsch2013-03-131-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coccinelle profile used: @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_get_buffer(ctx, f, flags)) < 0) + return r; @@ expression r, ctx, f, loglevel, str; @@ -if ((r = ff_reget_buffer(ctx, f)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_reget_buffer(ctx, f)) < 0) + return r; @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) + return r; ...along with some manual patches for the remaining ones.
* | Merge commit 'a2816230c5c0a8fc72bc0163b7d21a96b194d87a'Michael Niedermayer2013-03-131-1/+2
|\| | | | | | | | | | | | | | | | | | | * commit 'a2816230c5c0a8fc72bc0163b7d21a96b194d87a': avframe: call release_buffer only if it is set Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>